builder-settings-types 0.0.269 → 0.0.270
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/Font.svg +3 -3
- package/dist/Opacity.svg +7 -7
- package/dist/Typography-Size.svg +3 -3
- package/dist/URL.svg +3 -3
- package/dist/Upload.svg +4 -4
- package/dist/Weight.svg +3 -3
- package/dist/align-centre.svg +4 -4
- package/dist/align-left.svg +4 -4
- package/dist/align-right.svg +4 -4
- package/dist/border-size.svg +3 -3
- package/dist/builder-settings-types.cjs.js +25 -25
- package/dist/builder-settings-types.es.js +89 -74
- package/dist/chevron-down.svg +5 -5
- package/dist/colors.svg +3 -3
- package/dist/index.css +1 -1
- package/dist/margins-bottom.svg +3 -3
- package/dist/margins-left.svg +3 -3
- package/dist/margins-right.svg +3 -3
- package/dist/margins-top.svg +3 -3
- package/dist/radius.svg +3 -3
- package/dist/settings/gradient-settings/gradientSettings.d.ts +4 -1
- package/dist/spacing-height.svg +3 -3
- package/dist/spacing-width.svg +3 -3
- package/dist/types/index.d.ts +3 -1
- package/package.json +1 -1
|
@@ -237,7 +237,7 @@ function X(p) {
|
|
|
237
237
|
return p instanceof T;
|
|
238
238
|
}
|
|
239
239
|
function H(p) {
|
|
240
|
-
return p instanceof
|
|
240
|
+
return p instanceof U;
|
|
241
241
|
}
|
|
242
242
|
function ct(p) {
|
|
243
243
|
return X(p) || H(p);
|
|
@@ -810,11 +810,11 @@ const it = class it {
|
|
|
810
810
|
}
|
|
811
811
|
};
|
|
812
812
|
it.hiddenElements = /* @__PURE__ */ new Set();
|
|
813
|
-
let
|
|
813
|
+
let U = it;
|
|
814
814
|
function Zt(p) {
|
|
815
815
|
return new bt(p);
|
|
816
816
|
}
|
|
817
|
-
class bt extends
|
|
817
|
+
class bt extends U {
|
|
818
818
|
constructor(t) {
|
|
819
819
|
super(t);
|
|
820
820
|
const e = Object.keys(this.settings)[0];
|
|
@@ -866,7 +866,7 @@ class bt extends z {
|
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
function wt(p) {
|
|
869
|
-
return new
|
|
869
|
+
return new U(p);
|
|
870
870
|
}
|
|
871
871
|
function Yt(p) {
|
|
872
872
|
return p;
|
|
@@ -1155,7 +1155,7 @@ class Kt extends T {
|
|
|
1155
1155
|
return e.addEventListener("input", i), e.addEventListener("change", i), e.addEventListener("blur", s), t.appendChild(e), t;
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
class
|
|
1158
|
+
class z extends T {
|
|
1159
1159
|
constructor(t) {
|
|
1160
1160
|
super(t), this.inputType = "number", this.inputElement = null, this.mobileValue = t.mobile, this.validateProps(), this.value = this.validateValue(this.value);
|
|
1161
1161
|
}
|
|
@@ -1219,7 +1219,7 @@ const Mt = `
|
|
|
1219
1219
|
<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"/>
|
|
1220
1220
|
<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"/>
|
|
1221
1221
|
</svg>`;
|
|
1222
|
-
class St extends
|
|
1222
|
+
class St extends z {
|
|
1223
1223
|
constructor(t = {}) {
|
|
1224
1224
|
const e = {
|
|
1225
1225
|
title: "Opacity",
|
|
@@ -1450,14 +1450,14 @@ class te extends T {
|
|
|
1450
1450
|
this.value || (this.value = {
|
|
1451
1451
|
width: e,
|
|
1452
1452
|
height: i
|
|
1453
|
-
}), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new
|
|
1453
|
+
}), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new z({
|
|
1454
1454
|
title: "Width",
|
|
1455
1455
|
default: this.value.width,
|
|
1456
1456
|
suffix: "px",
|
|
1457
1457
|
minValue: this.minWidth,
|
|
1458
1458
|
maxValue: this.maxWidth,
|
|
1459
1459
|
icon: Vt
|
|
1460
|
-
}), this.heightSetting = new
|
|
1460
|
+
}), this.heightSetting = new z({
|
|
1461
1461
|
title: "Height",
|
|
1462
1462
|
default: this.value.height,
|
|
1463
1463
|
suffix: "px",
|
|
@@ -1714,7 +1714,7 @@ class pt extends T {
|
|
|
1714
1714
|
}, t;
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
|
-
class ee extends
|
|
1717
|
+
class ee extends z {
|
|
1718
1718
|
constructor(t = {}) {
|
|
1719
1719
|
super({
|
|
1720
1720
|
...t,
|
|
@@ -1735,7 +1735,7 @@ class ee extends U {
|
|
|
1735
1735
|
const $t = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1736
1736
|
<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"/>
|
|
1737
1737
|
</svg>`;
|
|
1738
|
-
class ie extends
|
|
1738
|
+
class ie extends z {
|
|
1739
1739
|
constructor(t = {}) {
|
|
1740
1740
|
super({
|
|
1741
1741
|
...t,
|
|
@@ -2014,33 +2014,33 @@ class oe extends T {
|
|
|
2014
2014
|
this.mobileValue = t, t !== void 0 && this.setValue(t);
|
|
2015
2015
|
}
|
|
2016
2016
|
}
|
|
2017
|
-
const
|
|
2017
|
+
const Ft = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
2018
2018
|
<path d="M2.25 11.75H15.75M5.85 2.75H12.15C13.4101 2.75 14.0402 2.75 14.5215 2.99524C14.9448 3.21095 15.289 3.55516 15.5048 3.97852C15.75 4.45982 15.75 5.08988 15.75 6.35V12.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.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.65V6.35C2.25 5.08988 2.25 4.45982 2.49524 3.97852C2.71095 3.55516 3.05516 3.21095 3.47852 2.99524C3.95982 2.75 4.58988 2.75 5.85 2.75Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2019
2019
|
</svg>`;
|
|
2020
|
-
class ae extends
|
|
2020
|
+
class ae extends z {
|
|
2021
2021
|
constructor(t = {}) {
|
|
2022
2022
|
super({
|
|
2023
2023
|
...t,
|
|
2024
2024
|
minValue: t.minValue ?? 0,
|
|
2025
2025
|
maxValue: t.maxValue ?? 1e3,
|
|
2026
|
-
icon: t.icon ||
|
|
2026
|
+
icon: t.icon || Ft,
|
|
2027
2027
|
title: t.title || "Margin Bottom",
|
|
2028
2028
|
default: t.default ?? 20,
|
|
2029
2029
|
wrapperClassName: "margin-bottom-wrapper " + (t.wrapperClassName || "")
|
|
2030
2030
|
}), this.inputType = "number";
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
|
-
const
|
|
2033
|
+
const Rt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
2034
2034
|
<path d="M15.75 7.25H2.25m9.9 9h-6.3c-1.26 0-1.89 0-2.371-.245a2.25 2.25 0 0 1-.984-.983c-.245-.482-.245-1.112-.245-2.372v-6.3c0-1.26 0-1.89.245-2.371a2.25 2.25 0 0 1 .984-.984c.48-.245 1.11-.245 2.371-.245h6.3c1.26 0 1.89 0 2.371.245.424.216.768.56.984.984.245.48.245 1.11.245 2.371v6.3c0 1.26 0 1.89-.245 2.371-.216.424-.56.768-.984.984-.48.245-1.11.245-2.371.245"
|
|
2035
2035
|
stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2036
2036
|
</svg>`;
|
|
2037
|
-
class le extends
|
|
2037
|
+
class le extends z {
|
|
2038
2038
|
constructor(t = {}) {
|
|
2039
2039
|
super({
|
|
2040
2040
|
...t,
|
|
2041
2041
|
minValue: t.minValue ?? 0,
|
|
2042
2042
|
maxValue: t.maxValue ?? 1e3,
|
|
2043
|
-
icon: t.icon ||
|
|
2043
|
+
icon: t.icon || Rt,
|
|
2044
2044
|
title: t.title || "Margin Top",
|
|
2045
2045
|
default: t.default ?? 20,
|
|
2046
2046
|
wrapperClassName: "margin-top-wrapper " + (t.wrapperClassName || "")
|
|
@@ -2296,7 +2296,7 @@ function lt(p, t) {
|
|
|
2296
2296
|
}
|
|
2297
2297
|
s.style.display = "grid", n.style.display = "none", a.forEach((l) => {
|
|
2298
2298
|
const r = document.createElement("button");
|
|
2299
|
-
r.type = "button", r.className = "color-picker-recent-swatch", r.title = l, r.setAttribute("aria-label", `Use color ${l}`), r.style.
|
|
2299
|
+
r.type = "button", r.className = "color-picker-recent-swatch", r.title = l, r.setAttribute("aria-label", `Use color ${l}`), r.style.background = l, r.style.borderColor = l, r.addEventListener("click", () => p(l)), s.appendChild(r);
|
|
2300
2300
|
});
|
|
2301
2301
|
};
|
|
2302
2302
|
return o(), {
|
|
@@ -2363,12 +2363,9 @@ class ht {
|
|
|
2363
2363
|
h.className = "color-picker-opacity", this.opacitySlider = h;
|
|
2364
2364
|
const d = document.createElement("div");
|
|
2365
2365
|
d.className = "color-picker-opacity-marker", this.opacityMarker = d, h.appendChild(d);
|
|
2366
|
-
const C = lt(
|
|
2367
|
-
(E)
|
|
2368
|
-
|
|
2369
|
-
},
|
|
2370
|
-
this.recentScope
|
|
2371
|
-
);
|
|
2366
|
+
const C = lt((E) => {
|
|
2367
|
+
this.setColor(E), this.queueRecentColor(E);
|
|
2368
|
+
}, this.recentScope);
|
|
2372
2369
|
this.recentColorsSection = C;
|
|
2373
2370
|
const u = document.createElement("div");
|
|
2374
2371
|
u.className = "color-picker-format-section";
|
|
@@ -2645,17 +2642,39 @@ class he extends T {
|
|
|
2645
2642
|
!s && !n && !a && this.closePopover();
|
|
2646
2643
|
}, this.detectChange = t.detectChange, this.forText = t.forText || !1;
|
|
2647
2644
|
}
|
|
2648
|
-
|
|
2649
|
-
t
|
|
2650
|
-
e.opacity === void 0 && (e.opacity = 100);
|
|
2651
|
-
})) : this.value = {
|
|
2645
|
+
getDefaultValue() {
|
|
2646
|
+
const t = this.props.default || {
|
|
2652
2647
|
type: "linear",
|
|
2653
2648
|
angle: 90,
|
|
2654
2649
|
stops: [
|
|
2655
2650
|
{ color: "#a84b4b", position: 0, opacity: 100 },
|
|
2656
2651
|
{ color: "#786666", position: 100, opacity: 100 }
|
|
2657
2652
|
]
|
|
2658
|
-
}
|
|
2653
|
+
};
|
|
2654
|
+
return this.normalizeGradientValue(t);
|
|
2655
|
+
}
|
|
2656
|
+
normalizeGradientValue(t) {
|
|
2657
|
+
const e = t.stops && t.stops.length > 0 ? t.stops : [{ color: "#000000", position: 0, opacity: 100 }];
|
|
2658
|
+
return {
|
|
2659
|
+
type: t.type && ["linear", "radial", "solid"].includes(t.type) ? t.type : "linear",
|
|
2660
|
+
angle: typeof t.angle == "number" ? t.angle : 90,
|
|
2661
|
+
stops: e.map((i, s) => ({
|
|
2662
|
+
color: i.color || "#000000",
|
|
2663
|
+
position: typeof i.position == "number" ? i.position : e.length === 1 ? 0 : Math.round(s / (e.length - 1) * 100),
|
|
2664
|
+
opacity: i.opacity === void 0 || Number.isNaN(i.opacity) ? 100 : i.opacity
|
|
2665
|
+
}))
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
resolveValueFromString(t) {
|
|
2669
|
+
const e = (t || "").trim();
|
|
2670
|
+
if (!e)
|
|
2671
|
+
return null;
|
|
2672
|
+
const i = this.parseGradientCSS(e);
|
|
2673
|
+
return i ? this.normalizeGradientValue(i) : null;
|
|
2674
|
+
}
|
|
2675
|
+
setValue(t) {
|
|
2676
|
+
let e = null;
|
|
2677
|
+
typeof t == "string" ? e = this.resolveValueFromString(t) : t && (e = this.normalizeGradientValue(t)), e || (e = this.getDefaultValue()), this.value = e, this.updateUI(), this.isPopoverOpen && this.refreshPopoverContent(), this.onChange && this.onChange(this.value), this.detectChange && this.detectChange(this.value);
|
|
2659
2678
|
}
|
|
2660
2679
|
updateUI() {
|
|
2661
2680
|
if (this.previewElement && this.value)
|
|
@@ -2823,7 +2842,9 @@ class he extends T {
|
|
|
2823
2842
|
(!this.value.stops || this.value.stops.length === 0) && (this.value.stops = [{ color: "#000000", position: 0, opacity: 100 }]);
|
|
2824
2843
|
let i = this.value.stops[0].color || "#000000", s = this.value.stops[0].opacity !== void 0 ? this.value.stops[0].opacity : 100;
|
|
2825
2844
|
const n = () => {
|
|
2826
|
-
this.value && (!this.value.stops || this.value.stops.length === 0) && (this.value.stops = [
|
|
2845
|
+
this.value && (!this.value.stops || this.value.stops.length === 0) && (this.value.stops = [
|
|
2846
|
+
{ color: i, position: 0, opacity: s }
|
|
2847
|
+
]);
|
|
2827
2848
|
}, o = document.createElement("div");
|
|
2828
2849
|
o.className = "gstop-row solid-row";
|
|
2829
2850
|
const a = document.createElement("div");
|
|
@@ -2953,12 +2974,9 @@ class he extends T {
|
|
|
2953
2974
|
}
|
|
2954
2975
|
},
|
|
2955
2976
|
"solid"
|
|
2956
|
-
), q = lt(
|
|
2957
|
-
(w)
|
|
2958
|
-
|
|
2959
|
-
},
|
|
2960
|
-
"solid"
|
|
2961
|
-
);
|
|
2977
|
+
), q = lt((w) => {
|
|
2978
|
+
O.applyColor(w);
|
|
2979
|
+
}, "solid");
|
|
2962
2980
|
y = () => q.refresh(), s.appendChild(q.container), s.appendChild(C);
|
|
2963
2981
|
const S = this.setupOpacitySlider(
|
|
2964
2982
|
h,
|
|
@@ -3019,12 +3037,9 @@ class he extends T {
|
|
|
3019
3037
|
}
|
|
3020
3038
|
},
|
|
3021
3039
|
"gradient"
|
|
3022
|
-
), y = lt(
|
|
3023
|
-
(E)
|
|
3024
|
-
|
|
3025
|
-
},
|
|
3026
|
-
"gradient"
|
|
3027
|
-
);
|
|
3040
|
+
), y = lt((E) => {
|
|
3041
|
+
M.applyColor(E);
|
|
3042
|
+
}, "gradient");
|
|
3028
3043
|
return L = () => y.refresh(), s.appendChild(y.container), s.appendChild(h), s;
|
|
3029
3044
|
}
|
|
3030
3045
|
setupEmbeddedColorPicker(t, e, i, s, n, o, a, l, r, c, h, d, C = "gradient") {
|
|
@@ -3047,8 +3062,8 @@ class he extends T {
|
|
|
3047
3062
|
o.value = u;
|
|
3048
3063
|
break;
|
|
3049
3064
|
case "rgb":
|
|
3050
|
-
const { r: $, g:
|
|
3051
|
-
o.value = `rgb(${$}, ${
|
|
3065
|
+
const { r: $, g: R, b: _ } = this.hexToRgb(u);
|
|
3066
|
+
o.value = `rgb(${$}, ${R}, ${_})`;
|
|
3052
3067
|
break;
|
|
3053
3068
|
case "hsl":
|
|
3054
3069
|
const { hue: G, sat: Z, lightness: st } = this.hsvToHsl(x, k, I);
|
|
@@ -3069,8 +3084,8 @@ class he extends T {
|
|
|
3069
3084
|
g = Math.max(0.1, Math.min(358.9, g));
|
|
3070
3085
|
const x = parseFloat(e.style.left || "50%") / 100, k = parseFloat(e.style.top || "50%") / 100;
|
|
3071
3086
|
t.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${g}, 100%, 50%))`;
|
|
3072
|
-
const I = x, $ = 1 - k,
|
|
3073
|
-
y(
|
|
3087
|
+
const I = x, $ = 1 - k, R = this.hsvToHex(g, I, $);
|
|
3088
|
+
y(R, m);
|
|
3074
3089
|
}, N = (g) => {
|
|
3075
3090
|
const x = t.getBoundingClientRect(), k = Math.max(0, Math.min(1, (g.clientX - x.left) / x.width)), I = Math.max(0, Math.min(1, (g.clientY - x.top) / x.height));
|
|
3076
3091
|
e.style.left = `${k * 100}%`, e.style.top = `${I * 100}%`, S(k, 1 - I);
|
|
@@ -3100,21 +3115,21 @@ class he extends T {
|
|
|
3100
3115
|
else if (k === "rgb") {
|
|
3101
3116
|
const $ = x.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
3102
3117
|
if ($) {
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3118
|
+
const R = parseInt($[1]), _ = parseInt($[2]), G = parseInt($[3]);
|
|
3119
|
+
R <= 255 && _ <= 255 && G <= 255 && (I = `#${R.toString(16).padStart(2, "0")}${_.toString(16).padStart(2, "0")}${G.toString(16).padStart(2, "0")}`);
|
|
3105
3120
|
}
|
|
3106
3121
|
} else if (k === "hsl") {
|
|
3107
3122
|
const $ = x.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
|
|
3108
3123
|
if ($) {
|
|
3109
|
-
const
|
|
3110
|
-
if (
|
|
3124
|
+
const R = parseInt($[1]), _ = parseInt($[2]) / 100, G = parseInt($[3]) / 100;
|
|
3125
|
+
if (R <= 360 && _ <= 1 && G <= 1) {
|
|
3111
3126
|
const Z = G + _ * Math.min(G, 1 - G), st = Z === 0 ? 0 : 2 * (1 - G / Z);
|
|
3112
|
-
I = this.hsvToHex(
|
|
3127
|
+
I = this.hsvToHex(R, st, Z);
|
|
3113
3128
|
}
|
|
3114
3129
|
}
|
|
3115
3130
|
}
|
|
3116
3131
|
I && O(I);
|
|
3117
|
-
},
|
|
3132
|
+
}, F = () => {
|
|
3118
3133
|
E(), M();
|
|
3119
3134
|
}, B = () => {
|
|
3120
3135
|
E();
|
|
@@ -3123,14 +3138,14 @@ class he extends T {
|
|
|
3123
3138
|
o.select(), document.execCommand("copy");
|
|
3124
3139
|
});
|
|
3125
3140
|
};
|
|
3126
|
-
E(), t.addEventListener("mousedown", D), t.addEventListener("click", (g) => g.stopPropagation()), i.addEventListener("mousedown", P), i.addEventListener("click", (g) => g.stopPropagation()), n.addEventListener("change", B), o.addEventListener("input", V), o.addEventListener("blur",
|
|
3127
|
-
g.key === "Enter" && (g.preventDefault(),
|
|
3141
|
+
E(), t.addEventListener("mousedown", D), t.addEventListener("click", (g) => g.stopPropagation()), i.addEventListener("mousedown", P), i.addEventListener("click", (g) => g.stopPropagation()), n.addEventListener("change", B), o.addEventListener("input", V), o.addEventListener("blur", F), o.addEventListener("keydown", (g) => {
|
|
3142
|
+
g.key === "Enter" && (g.preventDefault(), F(), o.blur());
|
|
3128
3143
|
}), a.addEventListener("click", gt);
|
|
3129
3144
|
const mt = async () => {
|
|
3130
3145
|
if ("EyeDropper" in window)
|
|
3131
3146
|
try {
|
|
3132
|
-
const k = (await new window.EyeDropper().open()).sRGBHex, { h: I, s: $, v:
|
|
3133
|
-
s.style.left = `${I / 360 * 100}%`, e.style.left = `${$ * 100}%`, e.style.top = `${(1 -
|
|
3147
|
+
const k = (await new window.EyeDropper().open()).sRGBHex, { h: I, s: $, v: R } = this.hexToHsv(k);
|
|
3148
|
+
s.style.left = `${I / 360 * 100}%`, e.style.left = `${$ * 100}%`, e.style.top = `${(1 - R) * 100}%`, t.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${I}, 100%, 50%))`, y(k, m), M();
|
|
3134
3149
|
} catch (g) {
|
|
3135
3150
|
console.log("User cancelled eyedropper or error occurred:", g);
|
|
3136
3151
|
}
|
|
@@ -3315,10 +3330,10 @@ class he extends T {
|
|
|
3315
3330
|
this.value.stops[n].position = P, w.value = `${P}%`;
|
|
3316
3331
|
const V = (A = this.popoverElement) == null ? void 0 : A.querySelector(
|
|
3317
3332
|
".gradient-preview"
|
|
3318
|
-
),
|
|
3333
|
+
), F = V == null ? void 0 : V.querySelector(
|
|
3319
3334
|
".gradient-handles"
|
|
3320
3335
|
);
|
|
3321
|
-
V &&
|
|
3336
|
+
V && F && this.createGradientHandles(F, V), this.updateGradientPreview(), this.updateUI(), this.triggerChange();
|
|
3322
3337
|
}
|
|
3323
3338
|
}), l.addEventListener("focus", (S) => {
|
|
3324
3339
|
const w = S.target, N = w.value.replace("%", "");
|
|
@@ -3356,10 +3371,10 @@ class he extends T {
|
|
|
3356
3371
|
}
|
|
3357
3372
|
const V = (A = this.popoverElement) == null ? void 0 : A.querySelector(
|
|
3358
3373
|
".gradient-preview"
|
|
3359
|
-
),
|
|
3374
|
+
), F = V == null ? void 0 : V.querySelector(
|
|
3360
3375
|
".gradient-handles"
|
|
3361
3376
|
);
|
|
3362
|
-
V &&
|
|
3377
|
+
V && F && this.createGradientHandles(F, V), this.updateGradientPreview(), this.updateUI(), this.triggerChange();
|
|
3363
3378
|
}
|
|
3364
3379
|
},
|
|
3365
3380
|
"gradient"
|
|
@@ -3384,10 +3399,10 @@ class he extends T {
|
|
|
3384
3399
|
}
|
|
3385
3400
|
const V = (A = this.popoverElement) == null ? void 0 : A.querySelector(
|
|
3386
3401
|
".gradient-preview"
|
|
3387
|
-
),
|
|
3402
|
+
), F = V == null ? void 0 : V.querySelector(
|
|
3388
3403
|
".gradient-handles"
|
|
3389
3404
|
);
|
|
3390
|
-
V &&
|
|
3405
|
+
V && F && this.createGradientHandles(F, V), this.updateGradientPreview(), this.updateUI(), this.triggerChange();
|
|
3391
3406
|
}
|
|
3392
3407
|
});
|
|
3393
3408
|
const v = () => {
|
|
@@ -3712,13 +3727,13 @@ const Gt = `
|
|
|
3712
3727
|
<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"/>
|
|
3713
3728
|
</svg>
|
|
3714
3729
|
`;
|
|
3715
|
-
class de extends
|
|
3730
|
+
class de extends U {
|
|
3716
3731
|
constructor(t) {
|
|
3717
3732
|
super({
|
|
3718
3733
|
title: "Border",
|
|
3719
3734
|
collapsed: t == null ? void 0 : t.collapsed,
|
|
3720
3735
|
settings: {
|
|
3721
|
-
size: new
|
|
3736
|
+
size: new z({
|
|
3722
3737
|
title: "Size",
|
|
3723
3738
|
icon: Wt,
|
|
3724
3739
|
default: (t == null ? void 0 : t.size) ?? 0,
|
|
@@ -3727,7 +3742,7 @@ class de extends z {
|
|
|
3727
3742
|
color: new j({
|
|
3728
3743
|
default: (t == null ? void 0 : t.color) ?? "0, 0, 30"
|
|
3729
3744
|
}),
|
|
3730
|
-
radius: new
|
|
3745
|
+
radius: new z({
|
|
3731
3746
|
title: "Radius",
|
|
3732
3747
|
icon: Gt,
|
|
3733
3748
|
default: (t == null ? void 0 : t.radius) ?? 12,
|
|
@@ -3748,11 +3763,11 @@ class de extends z {
|
|
|
3748
3763
|
`;
|
|
3749
3764
|
}
|
|
3750
3765
|
}
|
|
3751
|
-
const
|
|
3766
|
+
const zt = `
|
|
3752
3767
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
|
|
3753
3768
|
<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"/>
|
|
3754
3769
|
</svg>
|
|
3755
|
-
`,
|
|
3770
|
+
`, Ut = `
|
|
3756
3771
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3757
3772
|
<path d="M3 5.75C3 5.05109 3 4.70163 3.11418 4.42597C3.26642 4.05843 3.55843 3.76642 3.92597 3.61418C4.20163 3.5 4.55109 3.5 5.25 3.5H12.75C13.4489 3.5 13.7984 3.5 14.074 3.61418C14.4416 3.76642 14.7336 4.05843 14.8858 4.42597C15 4.70163 15 5.05109 15 5.75M6 15.5H12M7.6875 3.5V15.5M10.3125 3.5V15.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3758
3773
|
</svg>
|
|
@@ -3761,7 +3776,7 @@ const Ut = `
|
|
|
3761
3776
|
<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"/>
|
|
3762
3777
|
</svg>
|
|
3763
3778
|
`;
|
|
3764
|
-
class pe extends
|
|
3779
|
+
class pe extends U {
|
|
3765
3780
|
constructor(t = {}) {
|
|
3766
3781
|
const { showAlign: e = t.showAlign ?? !0, ...i } = t;
|
|
3767
3782
|
super({
|
|
@@ -3774,7 +3789,7 @@ class pe extends z {
|
|
|
3774
3789
|
}),
|
|
3775
3790
|
fontFamily: new at({
|
|
3776
3791
|
title: "Font",
|
|
3777
|
-
icon:
|
|
3792
|
+
icon: zt,
|
|
3778
3793
|
default: i.fontFamilyDefault ?? "Satoshi",
|
|
3779
3794
|
options: i.fontFamilyOptions ?? [
|
|
3780
3795
|
{ name: "Alt", value: "Croco Sans Black Caps Alt" },
|
|
@@ -3787,7 +3802,7 @@ class pe extends z {
|
|
|
3787
3802
|
}),
|
|
3788
3803
|
fontWeight: new at({
|
|
3789
3804
|
title: "Weight",
|
|
3790
|
-
icon:
|
|
3805
|
+
icon: Ut,
|
|
3791
3806
|
default: i.fontWeightDefault ?? "400",
|
|
3792
3807
|
options: i.fontWeightOptions ?? [
|
|
3793
3808
|
{ name: "Regular", value: "400" },
|
|
@@ -3797,7 +3812,7 @@ class pe extends z {
|
|
|
3797
3812
|
getOptions: i.fontWeightGetOptions,
|
|
3798
3813
|
getOptionsAsync: i.fontWeightGetOptionsAsync
|
|
3799
3814
|
}),
|
|
3800
|
-
fontSize: new
|
|
3815
|
+
fontSize: new z({
|
|
3801
3816
|
title: "Size",
|
|
3802
3817
|
icon: jt,
|
|
3803
3818
|
default: i.fontSizeDefault ?? 12,
|
|
@@ -3873,7 +3888,7 @@ class Q extends T {
|
|
|
3873
3888
|
}), i;
|
|
3874
3889
|
}
|
|
3875
3890
|
}
|
|
3876
|
-
class ue extends
|
|
3891
|
+
class ue extends U {
|
|
3877
3892
|
constructor(t) {
|
|
3878
3893
|
super({
|
|
3879
3894
|
title: "Margins",
|
|
@@ -3925,7 +3940,7 @@ const qt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewB
|
|
|
3925
3940
|
</svg>`, Xt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3926
3941
|
<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"/>
|
|
3927
3942
|
</svg>`;
|
|
3928
|
-
class ge extends
|
|
3943
|
+
class ge extends U {
|
|
3929
3944
|
constructor(t) {
|
|
3930
3945
|
super({
|
|
3931
3946
|
title: "Background Image",
|
|
@@ -3982,12 +3997,12 @@ export {
|
|
|
3982
3997
|
ue as MarginSettingGroup,
|
|
3983
3998
|
le as MarginTopSetting,
|
|
3984
3999
|
re as MultiLanguageSetting,
|
|
3985
|
-
|
|
4000
|
+
z as NumberSetting,
|
|
3986
4001
|
St as OpacitySetting,
|
|
3987
4002
|
se as SelectApiSettings,
|
|
3988
4003
|
at as SelectSetting,
|
|
3989
4004
|
T as Setting,
|
|
3990
|
-
|
|
4005
|
+
U as SettingGroup,
|
|
3991
4006
|
xt as StringSetting,
|
|
3992
4007
|
bt as TabSettingGroup,
|
|
3993
4008
|
bt as TabsSettingGroup,
|
package/dist/chevron-down.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="chevron-down">
|
|
3
|
-
<path id="Icon" d="M4 6.5L8 10.5L12 6.5" stroke="#344054" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
</g>
|
|
5
|
-
</svg>
|
|
1
|
+
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="chevron-down">
|
|
3
|
+
<path id="Icon" d="M4 6.5L8 10.5L12 6.5" stroke="#344054" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
package/dist/colors.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<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"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<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"/>
|
|
3
|
+
</svg>
|