builder-settings-types 0.0.280 → 0.0.282
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const vt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2
2
|
let ht = (c = 21) => {
|
|
3
3
|
let t = "", e = crypto.getRandomValues(new Uint8Array(c |= 0));
|
|
4
4
|
for (; c--; )
|
|
5
|
-
t +=
|
|
5
|
+
t += vt[e[c] & 63];
|
|
6
6
|
return t;
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function Ct(c) {
|
|
9
9
|
let t = 0, e = c.parentElement;
|
|
10
10
|
for (; e; )
|
|
11
11
|
e.classList.contains("setting-group") && e !== c && t++, e = e.parentElement;
|
|
@@ -21,15 +21,15 @@ function et(c, t = 0) {
|
|
|
21
21
|
J(s, n), et(s, n);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const yt = {
|
|
25
25
|
maxLevel: 5,
|
|
26
26
|
spacingMultiplier: 1,
|
|
27
27
|
visualIndentMultiplier: 2,
|
|
28
28
|
enableAutoDetection: !0
|
|
29
29
|
};
|
|
30
|
-
class
|
|
30
|
+
class Et {
|
|
31
31
|
constructor(t = {}) {
|
|
32
|
-
this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...
|
|
32
|
+
this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...yt, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Setup automatic detection using MutationObserver
|
|
@@ -63,7 +63,7 @@ class yt {
|
|
|
63
63
|
* Update nesting for a specific element
|
|
64
64
|
*/
|
|
65
65
|
updateElementNesting(t) {
|
|
66
|
-
const e =
|
|
66
|
+
const e = Ct(t);
|
|
67
67
|
this.applyNestingWithConfig(t, e);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -111,7 +111,7 @@ class yt {
|
|
|
111
111
|
this.observer && (this.observer.disconnect(), this.observer = void 0), this.observedElements.clear();
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
const ot = new
|
|
114
|
+
const ot = new Et();
|
|
115
115
|
function X(c) {
|
|
116
116
|
if (c === null || typeof c != "object") return c;
|
|
117
117
|
if (c instanceof Date) return new Date(c.getTime());
|
|
@@ -124,7 +124,7 @@ function X(c) {
|
|
|
124
124
|
}
|
|
125
125
|
return c;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function bt(c) {
|
|
128
128
|
switch (c) {
|
|
129
129
|
case "number":
|
|
130
130
|
return 0;
|
|
@@ -192,7 +192,7 @@ class w {
|
|
|
192
192
|
const i = document.createElement("div");
|
|
193
193
|
i.className = t.wrapperClassName || "";
|
|
194
194
|
const s = document.createElement("input");
|
|
195
|
-
this.inputEl = s, s.value = String(t.value ||
|
|
195
|
+
this.inputEl = s, s.value = String(t.value || bt(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "", this.dataPropsPath && s.setAttribute("data-test-id", this.dataPropsPath);
|
|
196
196
|
const n = (a) => {
|
|
197
197
|
const l = a.target;
|
|
198
198
|
let r = l.value;
|
|
@@ -345,7 +345,7 @@ const Y = class Y {
|
|
|
345
345
|
deleteItem: this.deleteItemCfg,
|
|
346
346
|
dataProps: this.dataProps,
|
|
347
347
|
hide: this.hide
|
|
348
|
-
}, i =
|
|
348
|
+
}, i = xt(e);
|
|
349
349
|
return i.initialValues = this.getValues(), i;
|
|
350
350
|
}
|
|
351
351
|
resetDefault() {
|
|
@@ -811,10 +811,10 @@ const Y = class Y {
|
|
|
811
811
|
};
|
|
812
812
|
Y.hiddenElements = /* @__PURE__ */ new Set();
|
|
813
813
|
let T = Y;
|
|
814
|
-
function
|
|
815
|
-
return new
|
|
814
|
+
function le(c) {
|
|
815
|
+
return new wt(c);
|
|
816
816
|
}
|
|
817
|
-
class
|
|
817
|
+
class wt extends T {
|
|
818
818
|
constructor(t) {
|
|
819
819
|
super(t);
|
|
820
820
|
const e = Object.keys(this.settings)[0];
|
|
@@ -865,13 +865,13 @@ class bt extends T {
|
|
|
865
865
|
return this.updateTabUI(), t;
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function xt(c) {
|
|
869
869
|
return new T(c);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function re(c) {
|
|
872
872
|
return c;
|
|
873
873
|
}
|
|
874
|
-
class
|
|
874
|
+
class Lt extends w {
|
|
875
875
|
constructor(t = {}) {
|
|
876
876
|
super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
|
|
877
877
|
}
|
|
@@ -891,12 +891,12 @@ class xt extends w {
|
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
const
|
|
895
|
-
class M extends
|
|
894
|
+
const kt = "<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>";
|
|
895
|
+
class M extends Lt {
|
|
896
896
|
constructor(t) {
|
|
897
897
|
super({
|
|
898
898
|
...t,
|
|
899
|
-
icon: t.icon ||
|
|
899
|
+
icon: t.icon || kt,
|
|
900
900
|
title: t.title || "Color",
|
|
901
901
|
default: t.default ? M.normalizeColorValue(t.default) : "#000000"
|
|
902
902
|
}), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.detectChange = t.detectChange;
|
|
@@ -995,7 +995,7 @@ class M extends xt {
|
|
|
995
995
|
return this.isValidHex() ? this.hexToRgb(this.value) : "0, 0, 0";
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const Mt = `
|
|
999
999
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1000
1000
|
<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"/>
|
|
1001
1001
|
<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="0.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5"/>
|
|
@@ -1005,7 +1005,7 @@ class R extends w {
|
|
|
1005
1005
|
constructor(t = {}) {
|
|
1006
1006
|
super({
|
|
1007
1007
|
...t,
|
|
1008
|
-
icon: t.icon ||
|
|
1008
|
+
icon: t.icon || Mt,
|
|
1009
1009
|
title: t.title || "Color & Opacity",
|
|
1010
1010
|
default: t.default || "#000000FF"
|
|
1011
1011
|
}), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.opacityInputEl = null, this.colorPreviewEl = null, this.detectChange = t.detectChange, this.value && (this.value = R.normalizeHexWithOpacity(this.value));
|
|
@@ -1123,7 +1123,7 @@ class R extends w {
|
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
|
-
class
|
|
1126
|
+
class ce extends w {
|
|
1127
1127
|
constructor(t = {}) {
|
|
1128
1128
|
super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
|
|
1129
1129
|
}
|
|
@@ -1214,12 +1214,12 @@ class I extends w {
|
|
|
1214
1214
|
);
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
const
|
|
1217
|
+
const St = `
|
|
1218
1218
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
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
|
|
1222
|
+
class It extends I {
|
|
1223
1223
|
constructor(t = {}) {
|
|
1224
1224
|
const e = {
|
|
1225
1225
|
title: "Opacity",
|
|
@@ -1228,7 +1228,7 @@ class St extends I {
|
|
|
1228
1228
|
maxValue: 100,
|
|
1229
1229
|
step: 1,
|
|
1230
1230
|
default: t.default ?? 100,
|
|
1231
|
-
icon:
|
|
1231
|
+
icon: St,
|
|
1232
1232
|
...t
|
|
1233
1233
|
};
|
|
1234
1234
|
super(e), this.inputType = "number", this.mobileValue = t.mobile;
|
|
@@ -1240,7 +1240,7 @@ class St extends I {
|
|
|
1240
1240
|
this.mobileValue = t, t !== void 0 && this.setValue(t);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
const
|
|
1243
|
+
const Nt = `
|
|
1244
1244
|
<svg xmlns="http://www.w3.org/2000/svg" class="svg-select" 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">
|
|
1245
1245
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
1246
1246
|
</svg>
|
|
@@ -1289,7 +1289,7 @@ class it extends w {
|
|
|
1289
1289
|
a.onclick = (l) => this.selectOption(l, o, e), i.appendChild(a);
|
|
1290
1290
|
}), document.body.appendChild(i);
|
|
1291
1291
|
const s = document.createElement("div");
|
|
1292
|
-
return s.classList.add("svg-container"), s.innerHTML =
|
|
1292
|
+
return s.classList.add("svg-container"), s.innerHTML = Nt, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
|
|
1293
1293
|
this._options.push(...n), this.isLoading = !1, this.updateOptionsList(), this.updateButtonText();
|
|
1294
1294
|
}).catch((n) => {
|
|
1295
1295
|
console.error("Failed to fetch async options:", n), this.isLoading = !1, this.updateButtonText("Failed to load options");
|
|
@@ -1352,7 +1352,7 @@ class it extends w {
|
|
|
1352
1352
|
this.clickOutsideListener && (document.removeEventListener("click", this.clickOutsideListener), this.clickOutsideListener = null), this.resizeListener && (window.removeEventListener("resize", this.resizeListener), this.resizeListener = null), this.cleanupDropdownPosition(), this.optionsListEl && this.optionsListEl.parentNode && this.optionsListEl.parentNode.removeChild(this.optionsListEl), super.destroy();
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
class
|
|
1355
|
+
class Vt extends w {
|
|
1356
1356
|
constructor(t = {}) {
|
|
1357
1357
|
super(t), this.inputType = "button", this.value || (this.value = "center");
|
|
1358
1358
|
}
|
|
@@ -1408,7 +1408,7 @@ class Nt extends w {
|
|
|
1408
1408
|
}), t.appendChild(i), t;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
class
|
|
1411
|
+
class he extends w {
|
|
1412
1412
|
constructor(t) {
|
|
1413
1413
|
super(t), this.inputType = "button", this.bgWithAlpha = "rgba(145, 158, 171, 0.08)";
|
|
1414
1414
|
}
|
|
@@ -1437,7 +1437,7 @@ class ce extends w {
|
|
|
1437
1437
|
return o.className = "button-setting-wrapper " + (this.props.wrapperClassName || ""), o.appendChild(t), o;
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
class
|
|
1440
|
+
class pe extends w {
|
|
1441
1441
|
constructor(t = {}) {
|
|
1442
1442
|
super(t), this.inputType = { width: "number", height: "number" }, this.aspectRatio = 1, this.isUpdating = !1;
|
|
1443
1443
|
const e = t.width || 0, i = t.height || 0;
|
|
@@ -1450,14 +1450,14 @@ class he extends w {
|
|
|
1450
1450
|
suffix: "px",
|
|
1451
1451
|
minValue: this.minWidth,
|
|
1452
1452
|
maxValue: this.maxWidth,
|
|
1453
|
-
icon:
|
|
1453
|
+
icon: Tt
|
|
1454
1454
|
}), this.heightSetting = new I({
|
|
1455
1455
|
title: "Height",
|
|
1456
1456
|
default: this.value.height,
|
|
1457
1457
|
suffix: "px",
|
|
1458
1458
|
minValue: this.minHeight,
|
|
1459
1459
|
maxValue: this.maxHeight,
|
|
1460
|
-
icon:
|
|
1460
|
+
icon: Pt
|
|
1461
1461
|
}), this.widthSetting.setOnChange(this.handleWidthChange.bind(this)), this.heightSetting.setOnChange(this.handleHeightChange.bind(this));
|
|
1462
1462
|
}
|
|
1463
1463
|
handleWidthChange(t) {
|
|
@@ -1551,9 +1551,9 @@ class he extends w {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
const
|
|
1554
|
+
const Tt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1555
1555
|
<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="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1556
|
-
</svg>`,
|
|
1556
|
+
</svg>`, Pt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1557
1557
|
<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="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1558
1558
|
</svg>`, Q = `
|
|
1559
1559
|
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
|
|
@@ -1564,11 +1564,11 @@ const Vt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewB
|
|
|
1564
1564
|
<rect width="91" height="71" rx="4" fill="#F2F4F7"/>
|
|
1565
1565
|
<path d="M37 31.5L39.5 29M39.5 29L42 31.5M39.5 29V34.625M44.5 31.9643C45.2634 31.3338 45.75 30.38 45.75 29.3125C45.75 27.414 44.211 25.875 42.3125 25.875C42.1759 25.875 42.0482 25.8037 41.9788 25.6861C41.1638 24.303 39.659 23.375 37.9375 23.375C35.3487 23.375 33.25 25.4737 33.25 28.0625C33.25 29.3538 33.7721 30.5232 34.6168 31.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1566
1566
|
</svg>
|
|
1567
|
-
`,
|
|
1567
|
+
`, Ht = `
|
|
1568
1568
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12 12" fill="none">
|
|
1569
1569
|
<path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1570
1570
|
</svg>
|
|
1571
|
-
`,
|
|
1571
|
+
`, $t = `
|
|
1572
1572
|
<svg xmlns="http://www.w3.org/2000/svg" width="29" height="29" viewBox="0 0 29 29" fill="none">
|
|
1573
1573
|
<!-- Top dot -->
|
|
1574
1574
|
<circle cx="14.5" cy="3" r="1.5" fill="#02CC59" opacity="1"/>
|
|
@@ -1685,9 +1685,9 @@ class pt extends w {
|
|
|
1685
1685
|
const s = this.value && this.value !== "";
|
|
1686
1686
|
s || i.classList.add("no-image");
|
|
1687
1687
|
const n = document.createElement("div");
|
|
1688
|
-
if (n.className = "preview-placeholder", n.innerHTML = Ot, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML =
|
|
1688
|
+
if (n.className = "preview-placeholder", n.innerHTML = Ot, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = $t, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
|
|
1689
1689
|
const a = document.createElement("button");
|
|
1690
|
-
a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML =
|
|
1690
|
+
a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML = Ht, this.previewWrapper.appendChild(a), a.onclick = (l) => {
|
|
1691
1691
|
var r;
|
|
1692
1692
|
l.stopPropagation(), this.value = "", this.updatePreviewState(null), (r = this.onChange) == null || r.call(this, ""), this.hideError();
|
|
1693
1693
|
};
|
|
@@ -1708,14 +1708,14 @@ class pt extends w {
|
|
|
1708
1708
|
}, t;
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
1711
|
-
class
|
|
1711
|
+
class de extends I {
|
|
1712
1712
|
constructor(t = {}) {
|
|
1713
1713
|
super({
|
|
1714
1714
|
...t,
|
|
1715
1715
|
title: t.title || "Height",
|
|
1716
1716
|
suffix: t.suffix || "px",
|
|
1717
1717
|
minValue: t.minValue ?? 0,
|
|
1718
|
-
icon: t.icon ||
|
|
1718
|
+
icon: t.icon || At,
|
|
1719
1719
|
default: t.default ?? 100
|
|
1720
1720
|
}), this.inputType = "number", this.mobileValue = t.mobile;
|
|
1721
1721
|
}
|
|
@@ -1726,17 +1726,17 @@ class pe extends I {
|
|
|
1726
1726
|
this.mobileValue = t, t !== void 0 && this.setValue(t);
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
|
-
const
|
|
1729
|
+
const At = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1730
1730
|
<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"/>
|
|
1731
1731
|
</svg>`;
|
|
1732
|
-
class
|
|
1732
|
+
class ue extends I {
|
|
1733
1733
|
constructor(t = {}) {
|
|
1734
1734
|
super({
|
|
1735
1735
|
...t,
|
|
1736
1736
|
title: t.title || "Width",
|
|
1737
1737
|
suffix: t.suffix || "px",
|
|
1738
1738
|
minValue: t.minValue ?? 0,
|
|
1739
|
-
icon: t.icon ||
|
|
1739
|
+
icon: t.icon || Bt,
|
|
1740
1740
|
default: t.default ?? 100
|
|
1741
1741
|
}), this.inputType = "number", this.mobileValue = t.mobile;
|
|
1742
1742
|
}
|
|
@@ -1747,14 +1747,14 @@ class de extends I {
|
|
|
1747
1747
|
this.mobileValue = t, t !== void 0 && this.setValue(t);
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
|
-
const
|
|
1750
|
+
const Bt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1751
1751
|
<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"/>
|
|
1752
|
-
</svg>`,
|
|
1752
|
+
</svg>`, Dt = `
|
|
1753
1753
|
<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">
|
|
1754
1754
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
1755
1755
|
</svg>
|
|
1756
1756
|
`;
|
|
1757
|
-
class
|
|
1757
|
+
class ge extends w {
|
|
1758
1758
|
constructor(t = {}) {
|
|
1759
1759
|
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) {
|
|
1760
1760
|
const e = this._options.findIndex(
|
|
@@ -1809,7 +1809,7 @@ class ue extends w {
|
|
|
1809
1809
|
a.onclick = (l) => this.selectApiOption(l, o, e), i.appendChild(a);
|
|
1810
1810
|
}), t.appendChild(i);
|
|
1811
1811
|
const s = document.createElement("div");
|
|
1812
|
-
return s.classList.add("svg-container"), s.innerHTML =
|
|
1812
|
+
return s.classList.add("svg-container"), s.innerHTML = Dt, t.appendChild(s), s.onclick = () => {
|
|
1813
1813
|
var n, o;
|
|
1814
1814
|
this.isLoading || (this.isOpen = !this.isOpen, (n = this.optionsListEl) == null || n.classList.toggle("open", this.isOpen), (o = this.svgContainer) == null || o.classList.toggle("open", this.isOpen));
|
|
1815
1815
|
}, this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && !this.hasInitializedOptions ? (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
|
|
@@ -1901,7 +1901,7 @@ class ue extends w {
|
|
|
1901
1901
|
), this.updateButtonText();
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
|
-
class
|
|
1904
|
+
class me extends w {
|
|
1905
1905
|
constructor(t) {
|
|
1906
1906
|
var e, i;
|
|
1907
1907
|
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;
|
|
@@ -1951,13 +1951,13 @@ class ge extends w {
|
|
|
1951
1951
|
this.detectChangeCallback = t;
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
|
-
const
|
|
1954
|
+
const Rt = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1955
1955
|
<path d="M13.3334 5.99996H2.66675M13.3334 9.99996H2.66675M5.33341 12.6666V3.33329M10.6667 12.6666V3.33329" stroke="#667085" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1956
1956
|
</svg>`;
|
|
1957
|
-
class
|
|
1957
|
+
class fe extends w {
|
|
1958
1958
|
// Store mobile value
|
|
1959
1959
|
constructor(t = {}) {
|
|
1960
|
-
t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ??
|
|
1960
|
+
t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? Rt, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
|
|
1961
1961
|
}
|
|
1962
1962
|
draw() {
|
|
1963
1963
|
const t = document.createElement("div");
|
|
@@ -2008,40 +2008,40 @@ class me extends w {
|
|
|
2008
2008
|
this.mobileValue = t, t !== void 0 && this.setValue(t);
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
|
-
const
|
|
2011
|
+
const Ft = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
2012
2012
|
<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"/>
|
|
2013
2013
|
</svg>`;
|
|
2014
|
-
class
|
|
2014
|
+
class ve extends I {
|
|
2015
2015
|
constructor(t = {}) {
|
|
2016
2016
|
super({
|
|
2017
2017
|
...t,
|
|
2018
2018
|
minValue: t.minValue ?? 0,
|
|
2019
2019
|
maxValue: t.maxValue ?? 1e3,
|
|
2020
|
-
icon: t.icon ||
|
|
2020
|
+
icon: t.icon || Ft,
|
|
2021
2021
|
title: t.title || "Margin Bottom",
|
|
2022
2022
|
default: t.default ?? 20,
|
|
2023
2023
|
wrapperClassName: "margin-bottom-wrapper " + (t.wrapperClassName || "")
|
|
2024
2024
|
}), this.inputType = "number";
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
const
|
|
2027
|
+
const Ut = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
2028
2028
|
<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"
|
|
2029
2029
|
stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2030
2030
|
</svg>`;
|
|
2031
|
-
class
|
|
2031
|
+
class Ce extends I {
|
|
2032
2032
|
constructor(t = {}) {
|
|
2033
2033
|
super({
|
|
2034
2034
|
...t,
|
|
2035
2035
|
minValue: t.minValue ?? 0,
|
|
2036
2036
|
maxValue: t.maxValue ?? 1e3,
|
|
2037
|
-
icon: t.icon ||
|
|
2037
|
+
icon: t.icon || Ut,
|
|
2038
2038
|
title: t.title || "Margin Top",
|
|
2039
2039
|
default: t.default ?? 20,
|
|
2040
2040
|
wrapperClassName: "margin-top-wrapper " + (t.wrapperClassName || "")
|
|
2041
2041
|
}), this.inputType = "number";
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
|
-
class
|
|
2044
|
+
class ye extends w {
|
|
2045
2045
|
constructor(t) {
|
|
2046
2046
|
super(t), this.inputType = {}, this.container = null, this.defaultLanguage = "", this.uploadSettings = /* @__PURE__ */ new Map(), t.default ? this.value = { ...t.default } : this.value || (this.value = {}), this.defaultLanguage = t.languages.includes(w.DefaultLanguage) ? w.DefaultLanguage : t.languages[0];
|
|
2047
2047
|
const e = t.defaultValue || `Enter text in ${this.capitalizeFirstLetter(this.defaultLanguage)}`;
|
|
@@ -2188,7 +2188,7 @@ class Ce extends w {
|
|
|
2188
2188
|
});
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
class
|
|
2191
|
+
class Ee extends w {
|
|
2192
2192
|
constructor(t = {}) {
|
|
2193
2193
|
super(t), this.inputType = "select";
|
|
2194
2194
|
const e = [
|
|
@@ -2215,7 +2215,7 @@ class ye extends w {
|
|
|
2215
2215
|
this.selectSetting.destroy(), super.destroy();
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
const
|
|
2218
|
+
const dt = (c, t) => {
|
|
2219
2219
|
let e = !1, i = 0, s = 0, n = 0, o = 0;
|
|
2220
2220
|
const a = (h) => {
|
|
2221
2221
|
if (h.target.closest("button")) return;
|
|
@@ -2231,7 +2231,7 @@ const Gt = (c, t) => {
|
|
|
2231
2231
|
e = !1, document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", r), document.body.style.userSelect = "";
|
|
2232
2232
|
};
|
|
2233
2233
|
c.addEventListener("mousedown", a);
|
|
2234
|
-
},
|
|
2234
|
+
}, U = (c) => {
|
|
2235
2235
|
if (!c) return null;
|
|
2236
2236
|
let t = c.trim();
|
|
2237
2237
|
return !t.startsWith("#") || (t = t.slice(1), t.length === 3 && (t = t.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(t)) ? null : `#${t.toUpperCase()}`;
|
|
@@ -2256,7 +2256,7 @@ const Gt = (c, t) => {
|
|
|
2256
2256
|
Math.round((l + o) * 255),
|
|
2257
2257
|
Math.round((r + o) * 255)
|
|
2258
2258
|
);
|
|
2259
|
-
},
|
|
2259
|
+
}, Gt = (c, t, e) => {
|
|
2260
2260
|
const i = e * (1 - t / 2), s = i === 0 || i === 1 ? 0 : (e - i) / Math.min(i, 1 - i);
|
|
2261
2261
|
return { hue: c, sat: s, lightness: i };
|
|
2262
2262
|
}, Z = (c, t, e) => {
|
|
@@ -2267,7 +2267,7 @@ const Gt = (c, t) => {
|
|
|
2267
2267
|
g: Math.round((a + n) * 255),
|
|
2268
2268
|
b: Math.round((l + n) * 255)
|
|
2269
2269
|
};
|
|
2270
|
-
},
|
|
2270
|
+
}, ut = (c, t) => {
|
|
2271
2271
|
const e = Math.max(0, Math.min(100, t)) / 100;
|
|
2272
2272
|
if (c.startsWith("#")) {
|
|
2273
2273
|
const { r: s, g: n, b: o } = S(c);
|
|
@@ -2299,7 +2299,7 @@ const Gt = (c, t) => {
|
|
|
2299
2299
|
return `rgba(${n}, ${o}, ${a}, ${e})`;
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
|
-
const i =
|
|
2302
|
+
const i = U(c);
|
|
2303
2303
|
if (i) {
|
|
2304
2304
|
const { r: s, g: n, b: o } = S(i);
|
|
2305
2305
|
return `rgba(${s}, ${n}, ${o}, ${e})`;
|
|
@@ -2329,17 +2329,17 @@ const Gt = (c, t) => {
|
|
|
2329
2329
|
"teal",
|
|
2330
2330
|
"fuchsia",
|
|
2331
2331
|
"transparent"
|
|
2332
|
-
].includes(c.toLowerCase()),
|
|
2332
|
+
].includes(c.toLowerCase()), gt = (c) => [
|
|
2333
2333
|
/^#[0-9a-fA-F]{3,8}$/,
|
|
2334
2334
|
/^rgba?\s*\([^)]+\)$/,
|
|
2335
2335
|
/^hsla?\s*\([^)]+\)$/,
|
|
2336
2336
|
/^[a-zA-Z]+$/
|
|
2337
2337
|
].some((e) => e.test(c.trim())), Wt = (c) => {
|
|
2338
2338
|
if (typeof document > "u")
|
|
2339
|
-
return
|
|
2339
|
+
return gt(c) || !!U(c);
|
|
2340
2340
|
const t = document.createElement("div");
|
|
2341
2341
|
return t.style.color = c, t.style.color !== "";
|
|
2342
|
-
},
|
|
2342
|
+
}, mt = (c) => {
|
|
2343
2343
|
const t = c.trim();
|
|
2344
2344
|
if (/^#[0-9A-Fa-f]{8}$/.test(t)) {
|
|
2345
2345
|
const n = t.slice(1), o = parseInt(n.slice(0, 2), 16), a = parseInt(n.slice(2, 4), 16), l = parseInt(n.slice(4, 6), 16), r = parseInt(n.slice(6, 8), 16);
|
|
@@ -2375,7 +2375,7 @@ const Gt = (c, t) => {
|
|
|
2375
2375
|
opacity: Math.round(l * 100)
|
|
2376
2376
|
};
|
|
2377
2377
|
}
|
|
2378
|
-
return { color:
|
|
2378
|
+
return { color: U(t) || t, position: 0, opacity: 100 };
|
|
2379
2379
|
}, lt = (c) => {
|
|
2380
2380
|
const t = [];
|
|
2381
2381
|
let e = "", i = 0;
|
|
@@ -2418,8 +2418,8 @@ const Gt = (c, t) => {
|
|
|
2418
2418
|
if (!s) return;
|
|
2419
2419
|
let n = "", o = 0;
|
|
2420
2420
|
const a = s.match(/^(.+?)\s+(\d+(?:\.\d+)?)%?\s*$/);
|
|
2421
|
-
a &&
|
|
2422
|
-
const l =
|
|
2421
|
+
a && gt(a[1].trim()) ? (n = a[1].trim(), o = parseFloat(a[2])) : (n = s, o = c.length === 1 ? 0 : i / (c.length - 1) * 100);
|
|
2422
|
+
const l = mt(n);
|
|
2423
2423
|
l.position = Math.max(0, Math.min(100, Math.round(o))), t.push(l);
|
|
2424
2424
|
}), t;
|
|
2425
2425
|
}, $ = (c) => {
|
|
@@ -2433,10 +2433,10 @@ const Gt = (c, t) => {
|
|
|
2433
2433
|
opacity: e.opacity === void 0 || Number.isNaN(e.opacity) ? 100 : e.opacity
|
|
2434
2434
|
}))
|
|
2435
2435
|
};
|
|
2436
|
-
},
|
|
2436
|
+
}, O = (c) => {
|
|
2437
2437
|
const t = c.replace(/;$/, "").trim();
|
|
2438
2438
|
if (Wt(t)) {
|
|
2439
|
-
const s =
|
|
2439
|
+
const s = mt(t);
|
|
2440
2440
|
return $({ type: "solid", angle: 0, stops: [s] });
|
|
2441
2441
|
}
|
|
2442
2442
|
const e = rt(t, "linear-gradient");
|
|
@@ -2472,13 +2472,22 @@ const Gt = (c, t) => {
|
|
|
2472
2472
|
return `#${s}${n}`;
|
|
2473
2473
|
}
|
|
2474
2474
|
const t = c.stops.map(
|
|
2475
|
-
(e) => `${
|
|
2475
|
+
(e) => `${ut(e.color, e.opacity ?? 100)} ${e.position}%`
|
|
2476
2476
|
).join(", ");
|
|
2477
2477
|
return c.type === "radial" ? `radial-gradient(circle, ${t})` : `linear-gradient(${c.angle}deg, ${t})`;
|
|
2478
|
-
}, tt = (c) => {
|
|
2478
|
+
}, jt = (c) => Math.round(c / 100 * 255).toString(16).toUpperCase().padStart(2, "0"), tt = (c) => {
|
|
2479
2479
|
if (c.type === "solid") {
|
|
2480
2480
|
const t = c.stops[0];
|
|
2481
|
-
|
|
2481
|
+
if (t) {
|
|
2482
|
+
const e = t.color.toUpperCase(), i = t.opacity ?? 100;
|
|
2483
|
+
if (i === 100)
|
|
2484
|
+
return e;
|
|
2485
|
+
{
|
|
2486
|
+
const s = jt(i);
|
|
2487
|
+
return `${e}${s}`;
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
return "#000000";
|
|
2482
2491
|
}
|
|
2483
2492
|
return c.type === "linear" ? `Linear ${c.angle}°` : "Radial Gradient";
|
|
2484
2493
|
}, q = class q {
|
|
@@ -2491,8 +2500,8 @@ const Gt = (c, t) => {
|
|
|
2491
2500
|
static normalizeList(t) {
|
|
2492
2501
|
const e = /* @__PURE__ */ new Set(), i = [];
|
|
2493
2502
|
return t.forEach((s) => {
|
|
2494
|
-
let n =
|
|
2495
|
-
n ||
|
|
2503
|
+
let n = U(s);
|
|
2504
|
+
n || O(s) && (n = s), n && (e.has(n) || (e.add(n), i.push(n)));
|
|
2496
2505
|
}), i.slice(0, this.MAX_COLORS);
|
|
2497
2506
|
}
|
|
2498
2507
|
static ensureLoaded() {
|
|
@@ -2535,11 +2544,11 @@ const Gt = (c, t) => {
|
|
|
2535
2544
|
}
|
|
2536
2545
|
static addColor(t, e) {
|
|
2537
2546
|
if (!t) return;
|
|
2538
|
-
let i =
|
|
2547
|
+
let i = U(t), s = "solid";
|
|
2539
2548
|
if (i)
|
|
2540
2549
|
s = "solid";
|
|
2541
2550
|
else {
|
|
2542
|
-
const l =
|
|
2551
|
+
const l = O(t);
|
|
2543
2552
|
l && (i = t, s = l.type === "solid" ? "solid" : "gradient");
|
|
2544
2553
|
}
|
|
2545
2554
|
if (!i) return;
|
|
@@ -2571,20 +2580,18 @@ const st = (c, t) => {
|
|
|
2571
2580
|
});
|
|
2572
2581
|
};
|
|
2573
2582
|
return o(), { container: e, refresh: o };
|
|
2574
|
-
},
|
|
2583
|
+
}, ft = `<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2575
2584
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
2576
2585
|
d="M6.12347 4.96653L1.41158 0.254304C1.25449 0.102568 1.04409 0.0186071 0.825694 0.0205049C0.607302 0.0224037 0.398393 0.110007 0.24396 0.26445C0.0895282 0.418893 0.0019303 0.627818 3.24698e-05 0.846225C-0.00186536 1.06463 0.0820894 1.27505 0.233815 1.43215L4.9457 6.14438L0.233814 10.8566C0.0820886 11.0137 -0.00186625 11.2241 3.15434e-05 11.4425C0.00192934 11.6609 0.0895272 11.8699 0.243959 12.0243C0.398392 12.1787 0.607301 12.2663 0.825693 12.2682C1.04408 12.2701 1.25449 12.1862 1.41158 12.0344L6.12347 7.32222L10.8354 12.0344C10.9932 12.1824 11.2023 12.2632 11.4186 12.2597C11.6349 12.2562 11.8414 12.1687 11.9943 12.0156C12.1472 11.8626 12.2346 11.6561 12.2379 11.4398C12.2413 11.2234 12.1604 11.0143 12.0123 10.8566L7.30123 6.14438L12.0131 1.43215C12.0927 1.35531 12.1561 1.2634 12.1998 1.16177C12.2434 1.06014 12.2664 0.950833 12.2674 0.84023C12.2683 0.729626 12.2473 0.61994 12.2054 0.517568C12.1635 0.415196 12.1017 0.322191 12.0234 0.243979C11.9452 0.165768 11.8522 0.103916 11.7499 0.0620327C11.6475 0.0201492 11.5378 -0.000927989 11.4272 3.33052e-05C11.3166 0.000993646 11.2073 0.0239743 11.1057 0.0676297C11.0041 0.111286 10.9122 0.174745 10.8354 0.254305L6.12347 4.96653Z"
|
|
2577
2586
|
fill="#919EAB"/>
|
|
2578
|
-
</svg>`,
|
|
2579
|
-
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
2580
|
-
|
|
2581
|
-
fill="#353C47"/>
|
|
2582
|
-
</svg>`, _t = `<svg width="15" height="17" viewBox="0 0 15 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2587
|
+
</svg>`, _t = `<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2588
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.1972 3.29156C18.936 3.03034 18.6259 2.82313 18.2847 2.68176C17.9434 2.54039 17.5777 2.46763 17.2083 2.46763C16.8389 2.46763 16.4731 2.54039 16.1319 2.68176C15.7906 2.82313 15.4805 3.03034 15.2194 3.29156L13.7822 4.72875C13.2585 4.4772 12.6697 4.39449 12.097 4.49207C11.5243 4.58964 10.9961 4.86267 10.5853 5.27343L9.91687 5.94281C9.74268 6.11693 9.6045 6.32366 9.51023 6.5512C9.41595 6.77873 9.36743 7.02261 9.36743 7.2689C9.36743 7.5152 9.41595 7.75907 9.51023 7.98661C9.6045 8.21414 9.74268 8.42088 9.91687 8.595L3.83625 14.6747C3.57512 14.936 3.36803 15.2462 3.2268 15.5875C3.08556 15.9288 3.01296 16.2947 3.01312 16.6641V18.3516C3.01312 18.6499 3.13165 18.9361 3.34263 19.1471C3.55361 19.358 3.83975 19.4766 4.13812 19.4766H5.82562C6.57129 19.4759 7.28618 19.1792 7.81312 18.6516L13.8937 12.5728C14.0679 12.747 14.2746 12.8852 14.5021 12.9795C14.7297 13.0737 14.9735 13.1223 15.2198 13.1223C15.4661 13.1223 15.71 13.0737 15.9375 12.9795C16.1651 12.8852 16.3718 12.747 16.5459 12.5728L17.2153 11.9025C17.6261 11.4917 17.8991 10.9635 17.9967 10.3908C18.0942 9.81811 18.0115 9.22926 17.76 8.70562L19.1972 7.26937C19.4584 7.0082 19.6656 6.69813 19.807 6.35687C19.9484 6.01561 20.0211 5.64985 20.0211 5.28047C20.0211 4.91108 19.9484 4.54532 19.807 4.20406C19.6656 3.8628 19.4584 3.55273 19.1972 3.29156ZM5.16281 16.0012L11.2425 9.92062L12.5681 11.2462L6.48844 17.3269C6.31266 17.5027 6.07424 17.6015 5.82562 17.6016H4.88812V16.6641C4.88818 16.4154 4.98698 16.177 5.16281 16.0012Z" fill="#353C47"/>
|
|
2589
|
+
</svg>`, Jt = `<svg width="15" height="17" viewBox="0 0 15 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2583
2590
|
<path d="M14.1333 12.4667H0.8M0.8 12.4667L4.13333 9.13332M0.8 12.4667L4.13333 15.8M0.8 4.13332H14.1333M14.1333 4.13332L10.8 0.799988M14.1333 4.13332L10.8 7.46665" stroke="#919EAB" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2584
|
-
</svg>`,
|
|
2591
|
+
</svg>`, Xt = `<svg width="14" height="2" viewBox="0 0 14 2" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2585
2592
|
<path d="M0.8 0.800003H12.4667" stroke="#919EAB" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2586
2593
|
</svg>`;
|
|
2587
|
-
class
|
|
2594
|
+
class Zt {
|
|
2588
2595
|
constructor(t, e = "gradient") {
|
|
2589
2596
|
this.isOpen = !1, this.currentColor = "#FF0000", this.currentOpacity = 100, this.outsideClick = (i) => {
|
|
2590
2597
|
if (!this.isOpen) return;
|
|
@@ -2618,7 +2625,7 @@ class Xt {
|
|
|
2618
2625
|
const i = document.createElement("span");
|
|
2619
2626
|
i.textContent = "Color";
|
|
2620
2627
|
const s = document.createElement("button");
|
|
2621
|
-
s.className = "color-picker-close", s.innerHTML =
|
|
2628
|
+
s.className = "color-picker-close", s.innerHTML = ft, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), dt(e, t);
|
|
2622
2629
|
const n = document.createElement("div");
|
|
2623
2630
|
n.className = "color-picker-area", this.colorArea = n;
|
|
2624
2631
|
const o = document.createElement("div");
|
|
@@ -2626,7 +2633,7 @@ class Xt {
|
|
|
2626
2633
|
const a = document.createElement("div");
|
|
2627
2634
|
a.className = "color-picker-hue-container";
|
|
2628
2635
|
const l = document.createElement("button");
|
|
2629
|
-
l.className = "color-picker-eyedropper", l.type = "button", l.innerHTML =
|
|
2636
|
+
l.className = "color-picker-eyedropper", l.type = "button", l.innerHTML = _t;
|
|
2630
2637
|
const r = document.createElement("div");
|
|
2631
2638
|
r.className = "color-picker-hue", this.hueSlider = r;
|
|
2632
2639
|
const h = document.createElement("div");
|
|
@@ -2636,8 +2643,8 @@ class Xt {
|
|
|
2636
2643
|
const d = document.createElement("div");
|
|
2637
2644
|
d.className = "color-picker-opacity-marker", this.opacityMarker = d, p.appendChild(d);
|
|
2638
2645
|
const u = st((B) => {
|
|
2639
|
-
var
|
|
2640
|
-
this.setColor(B), (
|
|
2646
|
+
var G;
|
|
2647
|
+
this.setColor(B), (G = this.onChange) == null || G.call(this, B, this.currentOpacity);
|
|
2641
2648
|
}, this.recentScope);
|
|
2642
2649
|
this.recentSectionRefresh = u.refresh;
|
|
2643
2650
|
const g = document.createElement("div");
|
|
@@ -2652,10 +2659,10 @@ class Xt {
|
|
|
2652
2659
|
y.value = "hsl", y.textContent = "HSL", m.appendChild(f), m.appendChild(C), m.appendChild(y);
|
|
2653
2660
|
const E = document.createElement("input");
|
|
2654
2661
|
E.type = "text", E.className = "color-picker-color-input", E.value = this.currentColor, this.input = E;
|
|
2655
|
-
const
|
|
2656
|
-
|
|
2662
|
+
const P = document.createElement("div");
|
|
2663
|
+
P.className = "color-picker-input-container";
|
|
2657
2664
|
const k = document.createElement("button");
|
|
2658
|
-
return k.className = "color-picker-copy-inside", k.textContent = "Copy",
|
|
2665
|
+
return k.className = "color-picker-copy-inside", k.textContent = "Copy", P.appendChild(E), P.appendChild(k), g.appendChild(m), g.appendChild(P), t.appendChild(e), t.appendChild(n), t.appendChild(a), t.appendChild(p), t.appendChild(u.container), t.appendChild(g), t.addEventListener("click", (B) => B.stopPropagation()), this.bind(n, r, p, E, m, k, l), t;
|
|
2659
2666
|
}
|
|
2660
2667
|
createBackdrop() {
|
|
2661
2668
|
const t = document.createElement("div");
|
|
@@ -2737,7 +2744,7 @@ class Xt {
|
|
|
2737
2744
|
const { r: n, g: o, b: a } = S(this.currentColor);
|
|
2738
2745
|
this.input.value = `rgb(${n}, ${o}, ${a})`;
|
|
2739
2746
|
} else {
|
|
2740
|
-
const { hue: n, sat: o, lightness: a } =
|
|
2747
|
+
const { hue: n, sat: o, lightness: a } = Gt(e, i, s);
|
|
2741
2748
|
this.input.value = `hsl(${Math.round(n)}, ${Math.round(
|
|
2742
2749
|
o * 100
|
|
2743
2750
|
)}%, ${Math.round(a * 100)}%)`;
|
|
@@ -2789,7 +2796,7 @@ class Xt {
|
|
|
2789
2796
|
return this.element;
|
|
2790
2797
|
}
|
|
2791
2798
|
}
|
|
2792
|
-
class
|
|
2799
|
+
class Kt {
|
|
2793
2800
|
constructor(t) {
|
|
2794
2801
|
this.recentScope = "all", this.currentColor = t.initialColor, this.currentOpacity = t.initialOpacity, this.onColorChange = t.onColorChange, t.scope && (this.recentScope = t.scope), this.container = this.createContainer(), this.initializePicker();
|
|
2795
2802
|
}
|
|
@@ -2984,7 +2991,7 @@ class Zt {
|
|
|
2984
2991
|
}
|
|
2985
2992
|
parseHexInput(t) {
|
|
2986
2993
|
const e = t.startsWith("#") ? t : `#${t}`;
|
|
2987
|
-
return
|
|
2994
|
+
return U(e);
|
|
2988
2995
|
}
|
|
2989
2996
|
parseRgbInput(t) {
|
|
2990
2997
|
const e = t.match(
|
|
@@ -3061,19 +3068,23 @@ const V = class V extends w {
|
|
|
3061
3068
|
const e = typeof t.default == "string" ? void 0 : t.default;
|
|
3062
3069
|
super({
|
|
3063
3070
|
...t,
|
|
3064
|
-
title: t.title || "
|
|
3071
|
+
title: t.title || "Color",
|
|
3065
3072
|
default: e
|
|
3066
3073
|
}), this.inputType = {
|
|
3067
3074
|
type: "text",
|
|
3068
3075
|
angle: "number",
|
|
3069
3076
|
stops: "text"
|
|
3070
|
-
}, this.element = null, this.previewEl = null, this.inputEl = void 0, this.popoverEl = null, this.isPopoverOpen = !1, this.isEditing = !1, this.previewUpdateTimeout = null, this.solidPicker = null, this.pendingSolidColor = null, this.onBackgroundClick = (i) => {
|
|
3071
|
-
var
|
|
3077
|
+
}, this.element = null, this.previewEl = null, this.inputEl = void 0, this.popoverEl = null, this.backdropEl = null, this.isPopoverOpen = !1, this.isEditing = !1, this.previewUpdateTimeout = null, this.solidPicker = null, this.pendingSolidColor = null, this.onBackgroundClick = (i) => {
|
|
3078
|
+
var d;
|
|
3072
3079
|
if (!this.popoverEl || !this.isPopoverOpen) return;
|
|
3073
|
-
const s = i.target, n = this.popoverEl.contains(s), o = (
|
|
3080
|
+
const s = i.target, n = this.popoverEl.contains(s), o = (d = this.element) == null ? void 0 : d.contains(s), a = document.querySelectorAll(".custom-color-picker"), l = Array.from(a).some((u) => u.contains(s)), r = s.closest(
|
|
3074
3081
|
".gstop-color-input, .gradient-mini-preview, .gstop-color-preview"
|
|
3075
|
-
), h = s.classList.contains(
|
|
3076
|
-
|
|
3082
|
+
), h = s.classList.contains(
|
|
3083
|
+
"color-picker-backdrop"
|
|
3084
|
+
), p = s.classList.contains(
|
|
3085
|
+
"gradient-popover-backdrop"
|
|
3086
|
+
);
|
|
3087
|
+
!n && !o && !l && !r && !h && !p && this.closePopover();
|
|
3077
3088
|
}, this.handlePopoverKeydown = (i) => {
|
|
3078
3089
|
if (this.isPopoverOpen) {
|
|
3079
3090
|
if (i.key === "Escape") {
|
|
@@ -3092,7 +3103,7 @@ const V = class V extends w {
|
|
|
3092
3103
|
defaultValue() {
|
|
3093
3104
|
const t = this.originalDefault;
|
|
3094
3105
|
if (typeof t == "string") {
|
|
3095
|
-
const i =
|
|
3106
|
+
const i = O(t);
|
|
3096
3107
|
if (i)
|
|
3097
3108
|
return $(i);
|
|
3098
3109
|
}
|
|
@@ -3108,13 +3119,13 @@ const V = class V extends w {
|
|
|
3108
3119
|
setValue(t) {
|
|
3109
3120
|
var i, s;
|
|
3110
3121
|
let e = null;
|
|
3111
|
-
typeof t == "string" ? e =
|
|
3122
|
+
typeof t == "string" ? e = O(t) : t && typeof t == "object" && (e = $(t)), e || (e = this.defaultValue()), this.value = e, this.updateUI(), this.isPopoverOpen && this.refreshPopoverContent(), (i = this.onChange) == null || i.call(this, this.value), (s = this.detectChange) == null || s.call(this, this.value), this.pendingSolidColor = null;
|
|
3112
3123
|
}
|
|
3113
3124
|
updateUI() {
|
|
3114
3125
|
if (this.previewEl && this.value)
|
|
3115
3126
|
if (this.value.type === "solid") {
|
|
3116
3127
|
const t = this.value.stops[0], e = t.opacity ?? 100;
|
|
3117
|
-
this.previewEl.style.background =
|
|
3128
|
+
this.previewEl.style.background = ut(t.color, e);
|
|
3118
3129
|
} else
|
|
3119
3130
|
this.previewEl.style.background = N(this.value);
|
|
3120
3131
|
this.inputEl && this.value && !this.isEditing && (this.inputEl.value = tt(this.value));
|
|
@@ -3137,10 +3148,23 @@ const V = class V extends w {
|
|
|
3137
3148
|
s.className = "input-label", s.textContent = this.props.title, i.appendChild(s), t.appendChild(i);
|
|
3138
3149
|
}
|
|
3139
3150
|
const e = document.createElement("div");
|
|
3140
|
-
return e.className = "gradient-input-wrapper", this.previewEl = document.createElement("div"), this.previewEl.className = "gradient-mini-preview", this.previewEl.style.background = this.value ? N(this.value) : "linear-gradient(90deg, #a84b4b 0%, #786666 100%)", this.previewEl.addEventListener("
|
|
3151
|
+
return e.className = "gradient-input-wrapper", this.previewEl = document.createElement("div"), this.previewEl.className = "gradient-mini-preview", this.previewEl.style.background = this.value ? N(this.value) : "linear-gradient(90deg, #a84b4b 0%, #786666 100%)", this.previewEl.addEventListener("click", (i) => {
|
|
3141
3152
|
i.preventDefault(), i.stopPropagation(), this.openPopover();
|
|
3142
3153
|
}), this.inputEl = document.createElement("input"), this.inputEl.type = "text", this.inputEl.className = "gradient-text-input", this.inputEl.placeholder = "Enter gradient CSS or paste color...", this.inputEl.value = this.value ? tt(this.value) : "", this.inputEl.readOnly = !1, this.inputEl.addEventListener("focus", () => {
|
|
3143
|
-
this.isEditing = !0, this.value
|
|
3154
|
+
if (this.isEditing = !0, this.value)
|
|
3155
|
+
if (this.value.type === "solid") {
|
|
3156
|
+
const i = this.value.stops[0];
|
|
3157
|
+
if (i) {
|
|
3158
|
+
const s = i.color.toUpperCase(), n = i.opacity ?? 100;
|
|
3159
|
+
if (n === 100)
|
|
3160
|
+
this.inputEl.value = s;
|
|
3161
|
+
else {
|
|
3162
|
+
const a = Math.round(n / 100 * 255).toString(16).toUpperCase().padStart(2, "0");
|
|
3163
|
+
this.inputEl.value = `${s}${a}`;
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
} else
|
|
3167
|
+
this.inputEl.value = N(this.value);
|
|
3144
3168
|
}), this.inputEl.addEventListener("blur", () => {
|
|
3145
3169
|
this.isEditing = !1, this.value && (this.inputEl.value = tt(this.value));
|
|
3146
3170
|
}), this.inputEl.addEventListener(
|
|
@@ -3152,19 +3176,23 @@ const V = class V extends w {
|
|
|
3152
3176
|
}
|
|
3153
3177
|
createPopover() {
|
|
3154
3178
|
if (this.popoverEl) return;
|
|
3155
|
-
this.
|
|
3179
|
+
this.backdropEl = document.createElement("div"), this.backdropEl.className = "gradient-popover-backdrop", this.backdropEl.style.display = "none", this.backdropEl.addEventListener("click", (a) => {
|
|
3180
|
+
a.preventDefault(), a.stopPropagation(), this.closePopover();
|
|
3181
|
+
}), this.popoverEl = document.createElement("div"), this.popoverEl.className = "gradient-popover", this.popoverEl.style.display = "none", this.popoverEl.addEventListener("click", (a) => {
|
|
3182
|
+
a.stopPropagation();
|
|
3183
|
+
});
|
|
3156
3184
|
const t = document.createElement("div");
|
|
3157
|
-
t.className = "gradient-popover-header";
|
|
3185
|
+
t.className = "gradient-popover-header", t.style.cursor = "move";
|
|
3158
3186
|
const e = document.createElement("span");
|
|
3159
3187
|
e.textContent = "Fill";
|
|
3160
3188
|
const i = document.createElement("button");
|
|
3161
|
-
i.type = "button", i.className = "gradient-popover-close", i.innerHTML =
|
|
3189
|
+
i.type = "button", i.className = "gradient-popover-close", i.innerHTML = ft, i.addEventListener("click", () => this.closePopover()), t.appendChild(e), t.appendChild(i), dt(t, this.popoverEl);
|
|
3162
3190
|
const s = document.createElement("div");
|
|
3163
3191
|
s.className = "gradient-editor";
|
|
3164
3192
|
const n = this.createTypeTabs();
|
|
3165
3193
|
s.appendChild(n);
|
|
3166
3194
|
const o = document.createElement("div");
|
|
3167
|
-
o.className = "gradient-editor-content", this.updatePopoverContent(o), s.appendChild(o), this.popoverEl.appendChild(t), this.popoverEl.appendChild(s), document.body.appendChild(this.popoverEl);
|
|
3195
|
+
o.className = "gradient-editor-content", this.updatePopoverContent(o), s.appendChild(o), this.popoverEl.appendChild(t), this.popoverEl.appendChild(s), document.body.appendChild(this.backdropEl), document.body.appendChild(this.popoverEl);
|
|
3168
3196
|
}
|
|
3169
3197
|
createTypeTabs() {
|
|
3170
3198
|
var s, n;
|
|
@@ -3185,7 +3213,7 @@ const V = class V extends w {
|
|
|
3185
3213
|
if (this.value.type = t, t !== "solid" && (!this.value.stops || this.value.stops.length === 0) && (this.value.stops = [
|
|
3186
3214
|
{ color: "#a84b4b", position: 0, opacity: 100 },
|
|
3187
3215
|
{ color: "#786666", position: 100, opacity: 100 }
|
|
3188
|
-
]), this.popoverEl) {
|
|
3216
|
+
]), t !== "solid" && this.value.stops.length < 2 && (this.value.angle = 90), this.popoverEl) {
|
|
3189
3217
|
const n = this.popoverEl.querySelectorAll(".gradient-type-tab");
|
|
3190
3218
|
n.forEach((l) => l.classList.remove("active"));
|
|
3191
3219
|
const o = n[0], a = n[1];
|
|
@@ -3199,12 +3227,12 @@ const V = class V extends w {
|
|
|
3199
3227
|
}
|
|
3200
3228
|
renderSolid(t) {
|
|
3201
3229
|
(!this.value || !this.value.stops || !this.value.stops.length) && (this.value || (this.value = this.defaultValue()), this.value.stops = [{ color: "#000000", position: 0, opacity: 100 }]);
|
|
3202
|
-
const e = this.value.stops[0], i = new
|
|
3230
|
+
const e = this.value.stops[0], i = new Kt({
|
|
3203
3231
|
initialColor: e.color,
|
|
3204
3232
|
initialOpacity: e.opacity ?? 100,
|
|
3205
3233
|
onColorChange: (s, n) => {
|
|
3206
3234
|
if (this.value) {
|
|
3207
|
-
const o =
|
|
3235
|
+
const o = O(s);
|
|
3208
3236
|
if (o && o.type !== "solid") {
|
|
3209
3237
|
this.value = o, this.switchType(o.type);
|
|
3210
3238
|
return;
|
|
@@ -3226,9 +3254,9 @@ const V = class V extends w {
|
|
|
3226
3254
|
const n = document.createElement("option");
|
|
3227
3255
|
n.value = "radial", n.textContent = "Radial", i.appendChild(s), i.appendChild(n), i.value = this.value.type === "radial" ? "radial" : "linear";
|
|
3228
3256
|
const o = document.createElement("input");
|
|
3229
|
-
o.type = "text", o.inputMode = "numeric", o.className = "gradient-degree-input", o.value = `${this.value.angle ??
|
|
3257
|
+
o.type = "text", o.inputMode = "numeric", o.className = "gradient-degree-input", o.value = `${this.value.angle ?? 90}°`, o.style.width = "75px", o.style.textAlign = "center", (!this.value.angle || this.value.stops.length < 2) && (this.value.angle = 90, o.value = "90°");
|
|
3230
3258
|
const a = document.createElement("button");
|
|
3231
|
-
a.type = "button", a.className = "gradient-flip-btn", a.innerHTML =
|
|
3259
|
+
a.type = "button", a.className = "gradient-flip-btn", a.innerHTML = Jt, i.addEventListener("change", () => {
|
|
3232
3260
|
this.switchType(i.value === "radial" ? "radial" : "linear"), this.updateDegreeVisibility(o);
|
|
3233
3261
|
}), o.addEventListener("focus", (m) => {
|
|
3234
3262
|
const f = m.target;
|
|
@@ -3260,7 +3288,7 @@ const V = class V extends w {
|
|
|
3260
3288
|
const u = document.createElement("div");
|
|
3261
3289
|
u.className = "gradient-stops", t.appendChild(h), t.appendChild(u), this.updateStopsList(u);
|
|
3262
3290
|
const g = st((m) => {
|
|
3263
|
-
const f =
|
|
3291
|
+
const f = O(m);
|
|
3264
3292
|
f && (this.value = f, this.switchType(f.type), this.updateUI(), this.triggerChange());
|
|
3265
3293
|
}, "all");
|
|
3266
3294
|
this.recentGradientRefresh = g.refresh, t.appendChild(g.container), d.addEventListener("click", () => {
|
|
@@ -3312,7 +3340,7 @@ const V = class V extends w {
|
|
|
3312
3340
|
(n, o) => n.position - o.position
|
|
3313
3341
|
);
|
|
3314
3342
|
i.forEach((n, o) => {
|
|
3315
|
-
var
|
|
3343
|
+
var G, nt;
|
|
3316
3344
|
const a = this.value.stops.findIndex(
|
|
3317
3345
|
(v, b) => v.position === n.position && v.color === n.color && v.opacity === n.opacity && this.value.stops.slice(0, b).filter(
|
|
3318
3346
|
(x) => x.position === n.position && x.color === n.color && x.opacity === n.opacity
|
|
@@ -3334,21 +3362,21 @@ const V = class V extends w {
|
|
|
3334
3362
|
const m = document.createElement("button");
|
|
3335
3363
|
m.type = "button", m.className = "gstop-color-copy", m.textContent = "Copy", d.appendChild(u), d.appendChild(g), d.appendChild(m);
|
|
3336
3364
|
const f = document.createElement("button");
|
|
3337
|
-
f.type = "button", f.className = "gstop-del", f.innerHTML =
|
|
3365
|
+
f.type = "button", f.className = "gstop-del", f.innerHTML = Xt, f.disabled = (((nt = (G = this.value) == null ? void 0 : G.stops) == null ? void 0 : nt.length) || 0) <= 2, r.appendChild(h), r.appendChild(d), r.appendChild(f), e.appendChild(r);
|
|
3338
3366
|
const C = document.createElement("span");
|
|
3339
3367
|
C.className = "gstop-opacity-label", C.textContent = "Opacity";
|
|
3340
3368
|
const y = document.createElement("div");
|
|
3341
3369
|
y.className = "gstop-opacity-group";
|
|
3342
3370
|
const E = document.createElement("input");
|
|
3343
3371
|
E.type = "range", E.className = "gstop-opacity-slider", E.min = "0", E.max = "100", E.value = String(n.opacity ?? 100);
|
|
3344
|
-
const
|
|
3372
|
+
const P = S(n.color);
|
|
3345
3373
|
E.style.setProperty(
|
|
3346
3374
|
"--slider-color",
|
|
3347
|
-
`rgb(${
|
|
3375
|
+
`rgb(${P.r}, ${P.g}, ${P.b})`
|
|
3348
3376
|
);
|
|
3349
3377
|
const k = document.createElement("span");
|
|
3350
3378
|
k.className = "gstop-opacity-value", k.textContent = `${n.opacity ?? 100}%`, y.appendChild(E), y.appendChild(k);
|
|
3351
|
-
const B = new
|
|
3379
|
+
const B = new Zt((v, b) => {
|
|
3352
3380
|
g.value = v.replace("#", "").toUpperCase(), u.style.backgroundColor = v, this.value.stops[l].color = v, b !== void 0 && (this.value.stops[l].opacity = b, E.value = String(b), k.textContent = `${b}%`);
|
|
3353
3381
|
const x = S(v);
|
|
3354
3382
|
E.style.setProperty(
|
|
@@ -3434,7 +3462,7 @@ const V = class V extends w {
|
|
|
3434
3462
|
}
|
|
3435
3463
|
openPopover() {
|
|
3436
3464
|
if (this.popoverEl && (V.openInstance && V.openInstance !== this && V.openInstance.closePopover(), !this.isPopoverOpen)) {
|
|
3437
|
-
if (this.isPopoverOpen = !0, V.openInstance = this, this.popoverEl.style.display = "flex", this.refreshPopoverContent(), this.element) {
|
|
3465
|
+
if (this.isPopoverOpen = !0, V.openInstance = this, this.backdropEl && (this.backdropEl.style.display = "block", this.backdropEl.parentElement || document.body.appendChild(this.backdropEl)), this.popoverEl.style.display = "flex", this.refreshPopoverContent(), this.element) {
|
|
3438
3466
|
const t = this.element.getBoundingClientRect(), e = 306, i = window.innerWidth, s = window.innerHeight, n = 16;
|
|
3439
3467
|
this.popoverEl.style.position = "fixed", this.popoverEl.style.zIndex = "10000", this.popoverEl.style.left = "-9999px", this.popoverEl.style.top = "0px";
|
|
3440
3468
|
const o = this.popoverEl.offsetHeight;
|
|
@@ -3446,7 +3474,7 @@ const V = class V extends w {
|
|
|
3446
3474
|
}
|
|
3447
3475
|
setTimeout(
|
|
3448
3476
|
() => document.addEventListener("click", this.onBackgroundClick, !0),
|
|
3449
|
-
|
|
3477
|
+
200
|
|
3450
3478
|
), document.addEventListener("keydown", this.handlePopoverKeydown, !0);
|
|
3451
3479
|
}
|
|
3452
3480
|
}
|
|
@@ -3476,7 +3504,7 @@ const V = class V extends w {
|
|
|
3476
3504
|
}
|
|
3477
3505
|
closePopover() {
|
|
3478
3506
|
if (!(!this.popoverEl || !this.isPopoverOpen)) {
|
|
3479
|
-
if (this.isPopoverOpen = !1, this.popoverEl.style.display = "none", document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), this.commitPendingSolidColor(), this.value && this.value.type !== "solid") {
|
|
3507
|
+
if (this.isPopoverOpen = !1, this.backdropEl && (this.backdropEl.style.display = "none"), this.popoverEl.style.display = "none", document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), this.commitPendingSolidColor(), this.value && this.value.type !== "solid") {
|
|
3480
3508
|
const t = N(this.value);
|
|
3481
3509
|
A.addColor(t, "gradient");
|
|
3482
3510
|
}
|
|
@@ -3497,7 +3525,7 @@ const V = class V extends w {
|
|
|
3497
3525
|
this.parseAndSet(e.value);
|
|
3498
3526
|
}
|
|
3499
3527
|
parseAndSet(t) {
|
|
3500
|
-
const e =
|
|
3528
|
+
const e = O(t.trim());
|
|
3501
3529
|
e && this.setValue(e);
|
|
3502
3530
|
}
|
|
3503
3531
|
triggerChange() {
|
|
@@ -3522,16 +3550,16 @@ const V = class V extends w {
|
|
|
3522
3550
|
};
|
|
3523
3551
|
V.openInstance = null;
|
|
3524
3552
|
let K = V;
|
|
3525
|
-
const
|
|
3553
|
+
const Yt = `
|
|
3526
3554
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3527
3555
|
<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"/>
|
|
3528
3556
|
</svg>
|
|
3529
|
-
`,
|
|
3557
|
+
`, Qt = `
|
|
3530
3558
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3531
3559
|
<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"/>
|
|
3532
3560
|
</svg>
|
|
3533
3561
|
`;
|
|
3534
|
-
class
|
|
3562
|
+
class be extends T {
|
|
3535
3563
|
constructor(t) {
|
|
3536
3564
|
super({
|
|
3537
3565
|
title: "Border",
|
|
@@ -3539,7 +3567,7 @@ class Ee extends T {
|
|
|
3539
3567
|
settings: {
|
|
3540
3568
|
size: new I({
|
|
3541
3569
|
title: "Size",
|
|
3542
|
-
icon:
|
|
3570
|
+
icon: Qt,
|
|
3543
3571
|
default: (t == null ? void 0 : t.size) ?? 0,
|
|
3544
3572
|
suffix: "px"
|
|
3545
3573
|
}),
|
|
@@ -3549,7 +3577,7 @@ class Ee extends T {
|
|
|
3549
3577
|
}),
|
|
3550
3578
|
radius: new I({
|
|
3551
3579
|
title: "Radius",
|
|
3552
|
-
icon:
|
|
3580
|
+
icon: Yt,
|
|
3553
3581
|
default: (t == null ? void 0 : t.radius) ?? 12,
|
|
3554
3582
|
suffix: "px"
|
|
3555
3583
|
})
|
|
@@ -3573,20 +3601,20 @@ class Ee extends T {
|
|
|
3573
3601
|
`;
|
|
3574
3602
|
}
|
|
3575
3603
|
}
|
|
3576
|
-
const
|
|
3604
|
+
const te = `
|
|
3577
3605
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
|
|
3578
3606
|
<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"/>
|
|
3579
3607
|
</svg>
|
|
3580
|
-
`,
|
|
3608
|
+
`, ee = `
|
|
3581
3609
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3582
3610
|
<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"/>
|
|
3583
3611
|
</svg>
|
|
3584
|
-
`,
|
|
3612
|
+
`, ie = `
|
|
3585
3613
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3586
3614
|
<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"/>
|
|
3587
3615
|
</svg>
|
|
3588
3616
|
`;
|
|
3589
|
-
class
|
|
3617
|
+
class we extends T {
|
|
3590
3618
|
constructor(t = {}) {
|
|
3591
3619
|
const { showAlign: e = t.showAlign ?? !0, ...i } = t;
|
|
3592
3620
|
super({
|
|
@@ -3600,7 +3628,7 @@ class be extends T {
|
|
|
3600
3628
|
}),
|
|
3601
3629
|
fontFamily: new it({
|
|
3602
3630
|
title: "Font",
|
|
3603
|
-
icon:
|
|
3631
|
+
icon: te,
|
|
3604
3632
|
default: i.fontFamilyDefault ?? "Satoshi",
|
|
3605
3633
|
options: i.fontFamilyOptions ?? [
|
|
3606
3634
|
{ name: "Alt", value: "Croco Sans Black Caps Alt" },
|
|
@@ -3613,7 +3641,7 @@ class be extends T {
|
|
|
3613
3641
|
}),
|
|
3614
3642
|
fontWeight: new it({
|
|
3615
3643
|
title: "Weight",
|
|
3616
|
-
icon:
|
|
3644
|
+
icon: ee,
|
|
3617
3645
|
default: i.fontWeightDefault ?? "400",
|
|
3618
3646
|
options: i.fontWeightOptions ?? [
|
|
3619
3647
|
{ name: "Regular", value: "400" },
|
|
@@ -3625,7 +3653,7 @@ class be extends T {
|
|
|
3625
3653
|
}),
|
|
3626
3654
|
fontSize: new I({
|
|
3627
3655
|
title: "Size",
|
|
3628
|
-
icon:
|
|
3656
|
+
icon: ie,
|
|
3629
3657
|
default: i.fontSizeDefault ?? 12,
|
|
3630
3658
|
suffix: "px",
|
|
3631
3659
|
mobile: i.fontSizeMobileDefault
|
|
@@ -3633,7 +3661,7 @@ class be extends T {
|
|
|
3633
3661
|
};
|
|
3634
3662
|
return e ? {
|
|
3635
3663
|
...s,
|
|
3636
|
-
align: new
|
|
3664
|
+
align: new Vt({
|
|
3637
3665
|
title: "Align",
|
|
3638
3666
|
default: i.alignDefault ?? "center"
|
|
3639
3667
|
})
|
|
@@ -3711,7 +3739,7 @@ class _ extends w {
|
|
|
3711
3739
|
}), i;
|
|
3712
3740
|
}
|
|
3713
3741
|
}
|
|
3714
|
-
class
|
|
3742
|
+
class xe extends T {
|
|
3715
3743
|
constructor(t) {
|
|
3716
3744
|
super({
|
|
3717
3745
|
title: "Margins",
|
|
@@ -3719,25 +3747,25 @@ class we extends T {
|
|
|
3719
3747
|
settings: {
|
|
3720
3748
|
marginTop: new _({
|
|
3721
3749
|
title: "Top",
|
|
3722
|
-
icon:
|
|
3750
|
+
icon: se,
|
|
3723
3751
|
suffix: "px",
|
|
3724
3752
|
default: (t == null ? void 0 : t.marginTop) ?? "auto"
|
|
3725
3753
|
}),
|
|
3726
3754
|
marginRight: new _({
|
|
3727
3755
|
title: "Right",
|
|
3728
|
-
icon:
|
|
3756
|
+
icon: ne,
|
|
3729
3757
|
suffix: "px",
|
|
3730
3758
|
default: (t == null ? void 0 : t.marginRight) ?? 0
|
|
3731
3759
|
}),
|
|
3732
3760
|
marginBottom: new _({
|
|
3733
3761
|
title: "Bottom",
|
|
3734
|
-
icon:
|
|
3762
|
+
icon: oe,
|
|
3735
3763
|
suffix: "px",
|
|
3736
3764
|
default: (t == null ? void 0 : t.marginBottom) ?? 0
|
|
3737
3765
|
}),
|
|
3738
3766
|
marginLeft: new _({
|
|
3739
3767
|
title: "Left",
|
|
3740
|
-
icon:
|
|
3768
|
+
icon: ae,
|
|
3741
3769
|
suffix: "px",
|
|
3742
3770
|
default: (t == null ? void 0 : t.marginLeft) ?? 0
|
|
3743
3771
|
})
|
|
@@ -3754,16 +3782,16 @@ class we extends T {
|
|
|
3754
3782
|
`;
|
|
3755
3783
|
}
|
|
3756
3784
|
}
|
|
3757
|
-
const
|
|
3785
|
+
const se = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3758
3786
|
<path d="M2.25 16.25H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 16.25H5.6325M5.625 9.5H5.6325M12.375 16.25H12.3825M12.375 9.5H12.3825M9 16.25H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 16.25H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 2.75H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3759
|
-
</svg>`, se = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3760
|
-
<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.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3761
3787
|
</svg>`, ne = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3762
|
-
<path d="
|
|
3788
|
+
<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.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3763
3789
|
</svg>`, oe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3790
|
+
<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"/>
|
|
3791
|
+
</svg>`, ae = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
3764
3792
|
<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"/>
|
|
3765
3793
|
</svg>`;
|
|
3766
|
-
class
|
|
3794
|
+
class Le extends T {
|
|
3767
3795
|
constructor(t) {
|
|
3768
3796
|
super({
|
|
3769
3797
|
title: "Background Image",
|
|
@@ -3773,7 +3801,7 @@ class xe extends T {
|
|
|
3773
3801
|
...t == null ? void 0 : t.uploadProps,
|
|
3774
3802
|
default: (t == null ? void 0 : t.backgroundImage) ?? ""
|
|
3775
3803
|
}),
|
|
3776
|
-
opacity: new
|
|
3804
|
+
opacity: new It({
|
|
3777
3805
|
default: (t == null ? void 0 : t.opacity) ?? 100
|
|
3778
3806
|
}),
|
|
3779
3807
|
backgroundColor: new R({
|
|
@@ -3803,38 +3831,38 @@ class xe extends T {
|
|
|
3803
3831
|
}
|
|
3804
3832
|
}
|
|
3805
3833
|
export {
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3834
|
+
Vt as AlignSetting,
|
|
3835
|
+
Ee as AnimationSetting,
|
|
3836
|
+
Le as BackgroundSettingSet,
|
|
3837
|
+
be as BorderSettingSet,
|
|
3838
|
+
he as ButtonSetting,
|
|
3811
3839
|
M as ColorSetting,
|
|
3812
3840
|
R as ColorWithOpacitySetting,
|
|
3813
|
-
|
|
3814
|
-
|
|
3841
|
+
pe as DimensionSetting,
|
|
3842
|
+
fe as GapSetting,
|
|
3815
3843
|
K as GradientSetting,
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3844
|
+
we as HeaderTypographySettingSet,
|
|
3845
|
+
de as HeightSetting,
|
|
3846
|
+
ce as HtmlSetting,
|
|
3847
|
+
ve as MarginBottomSetting,
|
|
3848
|
+
xe as MarginSettingGroup,
|
|
3849
|
+
Ce as MarginTopSetting,
|
|
3850
|
+
ye as MultiLanguageSetting,
|
|
3823
3851
|
I as NumberSetting,
|
|
3824
|
-
|
|
3825
|
-
|
|
3852
|
+
It as OpacitySetting,
|
|
3853
|
+
ge as SelectApiSettings,
|
|
3826
3854
|
it as SelectSetting,
|
|
3827
3855
|
w as Setting,
|
|
3828
3856
|
T as SettingGroup,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3857
|
+
Lt as StringSetting,
|
|
3858
|
+
wt as TabSettingGroup,
|
|
3859
|
+
wt as TabsSettingGroup,
|
|
3860
|
+
me as Toggle,
|
|
3833
3861
|
pt as UploadSetting,
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3862
|
+
ue as WidthSetting,
|
|
3863
|
+
re as asSettingGroupWithSettings,
|
|
3864
|
+
xt as createSettingGroup,
|
|
3865
|
+
le as createTabSettingGroup,
|
|
3838
3866
|
D as isSetting,
|
|
3839
3867
|
at as isSettingChild,
|
|
3840
3868
|
L as isSettingGroup,
|