@billgangcom/theme-lib 1.6.0 → 1.8.0
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/App.d.ts +5 -0
- package/dist/builder.cjs.js +3 -3
- package/dist/builder.es.js +6 -6
- package/dist/{index-2iAZ7WmX.js → index-D2fsOZUo.js} +1442 -1419
- package/dist/index-K_gSTxJk.cjs +39 -0
- package/dist/shared/ui/Icon/index.d.ts +1 -0
- package/dist/shared/ui/Input/index.d.ts +2 -0
- package/dist/store/useChooseImageStore.d.ts +3 -0
- package/dist/text-align-center-CBdXLnfL.js +5 -0
- package/dist/text-align-center-DSiXCwfH.cjs +1 -0
- package/dist/text-align-right-B1liYPsk.cjs +1 -0
- package/dist/text-align-right-CTznh4bt.js +5 -0
- package/dist/ui/ButtonTypeSettings/index.d.ts +1 -1
- package/dist/ui/ButtonsSettings/index.d.ts +3 -3
- package/dist/ui/ButtonsSettings/popup.d.ts +1 -1
- package/dist/ui/ChooseImage/index.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +18 -10
- package/dist/ui/ItemsSettings/popup.d.ts +46 -2
- package/dist/ui/LayoutSettings/index.d.ts +2 -2
- package/dist/ui/OtherSettings/index.d.ts +11 -0
- package/dist/ui/RangeSelector/index.d.ts +11 -0
- package/dist/ui/TextSettings/index.d.ts +5 -5
- package/dist/ui/TypeTexts/index.d.ts +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +681 -375
- package/package.json +1 -1
- package/dist/index-DSUcxVxJ.cjs +0 -39
package/dist/ui.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import { g as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
wrapper:
|
|
6
|
-
alignmentBlock:
|
|
7
|
-
title:
|
|
8
|
-
subtitle:
|
|
9
|
-
alignmentContent:
|
|
10
|
-
alignments:
|
|
11
|
-
alignment:
|
|
12
|
-
circle:
|
|
13
|
-
paddings:
|
|
14
|
-
padding:
|
|
15
|
-
input:
|
|
16
|
-
},
|
|
1
|
+
import { j as t, I as m, a as T, c as F, S as I, T as G, C as Y, b as O, B as U, v as R } from "./index-D2fsOZUo.js";
|
|
2
|
+
import { g as ts, h as es, e as ss, M as ns, P as os, R as cs, d as ls, f as is } from "./index-D2fsOZUo.js";
|
|
3
|
+
import j from "react";
|
|
4
|
+
const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_15", tt = "_subtitle_1g82c_22", et = "_alignmentContent_1g82c_29", st = "_alignments_1g82c_35", nt = "_alignment_1g82c_8", ot = "_circle_1g82c_54", ct = "_paddings_1g82c_61", lt = "_padding_1g82c_61", it = "_input_1g82c_79", v = {
|
|
5
|
+
wrapper: W,
|
|
6
|
+
alignmentBlock: X,
|
|
7
|
+
title: Z,
|
|
8
|
+
subtitle: tt,
|
|
9
|
+
alignmentContent: et,
|
|
10
|
+
alignments: st,
|
|
11
|
+
alignment: nt,
|
|
12
|
+
circle: ot,
|
|
13
|
+
paddings: ct,
|
|
14
|
+
padding: lt,
|
|
15
|
+
input: it
|
|
16
|
+
}, at = [
|
|
17
17
|
"topLeft",
|
|
18
18
|
"top",
|
|
19
19
|
"topRight",
|
|
@@ -23,36 +23,56 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
],
|
|
27
|
-
const { alignment:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
], rt = ["left", "top", "right", "bottom"], Ve = (d) => {
|
|
27
|
+
const { alignment: s, padding: o, setPadding: n, setAlignment: l } = d;
|
|
28
|
+
function e() {
|
|
29
|
+
switch (s) {
|
|
30
|
+
case "left":
|
|
31
|
+
case "topLeft":
|
|
32
|
+
case "bottomLeft":
|
|
33
|
+
return "left";
|
|
34
|
+
case "right":
|
|
35
|
+
case "topRight":
|
|
36
|
+
case "bottomRight":
|
|
37
|
+
return "right";
|
|
38
|
+
case "center":
|
|
39
|
+
case "top":
|
|
40
|
+
case "bottom":
|
|
41
|
+
return "center";
|
|
42
|
+
default:
|
|
43
|
+
return "center";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ t.jsxs("div", { className: v.layout, children: [
|
|
47
|
+
/* @__PURE__ */ t.jsx("h3", { className: v.title, children: "Layout" }),
|
|
48
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.alignmentBlock, children: [
|
|
49
|
+
/* @__PURE__ */ t.jsx("h5", { className: v.subtitle, children: "Alignment" }),
|
|
50
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.alignmentContent, children: [
|
|
51
|
+
/* @__PURE__ */ t.jsx("div", { className: v.alignments, children: at.map((c) => /* @__PURE__ */ t.jsxs(
|
|
34
52
|
"div",
|
|
35
53
|
{
|
|
36
54
|
onClick: () => {
|
|
37
|
-
|
|
55
|
+
l(c);
|
|
38
56
|
},
|
|
39
|
-
className:
|
|
57
|
+
className: v.alignment,
|
|
40
58
|
children: [
|
|
41
|
-
c !==
|
|
42
|
-
c ===
|
|
43
|
-
|
|
59
|
+
c !== s && /* @__PURE__ */ t.jsx("div", { className: v.circle }),
|
|
60
|
+
c === s && /* @__PURE__ */ t.jsx(
|
|
61
|
+
m,
|
|
44
62
|
{
|
|
45
|
-
name:
|
|
46
|
-
fill: "#FF3F19"
|
|
63
|
+
name: `text-align-${e()}`,
|
|
64
|
+
fill: "#FF3F19",
|
|
65
|
+
width: 22,
|
|
66
|
+
height: 22
|
|
47
67
|
}
|
|
48
68
|
)
|
|
49
69
|
]
|
|
50
70
|
},
|
|
51
71
|
c
|
|
52
72
|
)) }),
|
|
53
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
73
|
+
/* @__PURE__ */ t.jsx("div", { className: v.paddings, children: rt.map((c) => /* @__PURE__ */ t.jsxs("label", { className: v.padding, children: [
|
|
54
74
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
55
|
-
|
|
75
|
+
m,
|
|
56
76
|
{
|
|
57
77
|
name: `align-${c}`,
|
|
58
78
|
width: 20,
|
|
@@ -60,187 +80,337 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
60
80
|
}
|
|
61
81
|
) }),
|
|
62
82
|
/* @__PURE__ */ t.jsx(
|
|
63
|
-
|
|
83
|
+
T,
|
|
64
84
|
{
|
|
65
85
|
type: "text",
|
|
66
|
-
value: String(
|
|
67
|
-
onChange: (
|
|
68
|
-
...
|
|
69
|
-
[c]: Number(
|
|
70
|
-
})
|
|
71
|
-
paddingless: !0
|
|
86
|
+
value: String(o[c]),
|
|
87
|
+
onChange: (a) => n({
|
|
88
|
+
...o,
|
|
89
|
+
[c]: Number(a)
|
|
90
|
+
}),
|
|
91
|
+
paddingless: !0,
|
|
92
|
+
borderless: !0
|
|
72
93
|
}
|
|
73
94
|
)
|
|
74
95
|
] })) })
|
|
75
96
|
] })
|
|
76
97
|
] })
|
|
77
98
|
] });
|
|
78
|
-
},
|
|
79
|
-
subtitle:
|
|
80
|
-
header:
|
|
81
|
-
text:
|
|
82
|
-
top:
|
|
83
|
-
itemsBlock:
|
|
84
|
-
},
|
|
85
|
-
typeTexts:
|
|
86
|
-
block:
|
|
87
|
-
active:
|
|
88
|
-
},
|
|
89
|
-
const { typeText:
|
|
90
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
99
|
+
}, dt = "_subtitle_2zbxx_1", ut = "_header_2zbxx_8", _t = "_text_2zbxx_9", pt = "_top_2zbxx_16", mt = "_itemsBlock_2zbxx_23", S = {
|
|
100
|
+
subtitle: dt,
|
|
101
|
+
header: ut,
|
|
102
|
+
text: _t,
|
|
103
|
+
top: pt,
|
|
104
|
+
itemsBlock: mt
|
|
105
|
+
}, ht = "_typeTexts_3zlec_1", gt = "_block_3zlec_7", bt = "_active_3zlec_18", E = {
|
|
106
|
+
typeTexts: ht,
|
|
107
|
+
block: gt,
|
|
108
|
+
active: bt
|
|
109
|
+
}, xt = ["bold", "italic", "underline", "strike-through", "code"], q = (d) => {
|
|
110
|
+
const { typeText: s, setTypeText: o } = d;
|
|
111
|
+
return /* @__PURE__ */ t.jsx("div", { className: E.typeTexts, children: xt.map((n) => /* @__PURE__ */ t.jsx(
|
|
91
112
|
"div",
|
|
92
113
|
{
|
|
93
|
-
className:
|
|
94
|
-
[
|
|
114
|
+
className: F(E.block, {
|
|
115
|
+
[E.active]: s === n
|
|
95
116
|
}),
|
|
96
|
-
onClick: () =>
|
|
117
|
+
onClick: () => o(n),
|
|
97
118
|
children: /* @__PURE__ */ t.jsx(
|
|
98
|
-
|
|
119
|
+
m,
|
|
99
120
|
{
|
|
100
|
-
name: `text-${
|
|
101
|
-
fill:
|
|
121
|
+
name: `text-${n}`,
|
|
122
|
+
fill: s === n ? "#252525" : "#757575",
|
|
102
123
|
width: 20,
|
|
103
124
|
height: 20
|
|
104
125
|
}
|
|
105
126
|
)
|
|
106
127
|
},
|
|
107
|
-
String(
|
|
128
|
+
String(n)
|
|
108
129
|
)) });
|
|
109
|
-
},
|
|
130
|
+
}, ft = (d) => {
|
|
110
131
|
const {
|
|
111
|
-
typeText:
|
|
112
|
-
isActiveText:
|
|
113
|
-
setIsActiveText:
|
|
114
|
-
text:
|
|
115
|
-
setText:
|
|
116
|
-
setTypeText:
|
|
117
|
-
title:
|
|
118
|
-
subtitle:
|
|
119
|
-
} =
|
|
120
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
121
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
122
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
123
|
-
/* @__PURE__ */ t.jsx(
|
|
124
|
-
|
|
132
|
+
typeText: s,
|
|
133
|
+
isActiveText: o,
|
|
134
|
+
setIsActiveText: n,
|
|
135
|
+
text: l,
|
|
136
|
+
setText: e,
|
|
137
|
+
setTypeText: c,
|
|
138
|
+
title: a,
|
|
139
|
+
subtitle: r = "Items"
|
|
140
|
+
} = d;
|
|
141
|
+
return /* @__PURE__ */ t.jsxs("div", { className: S.text, children: [
|
|
142
|
+
(a || o) && /* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
|
|
143
|
+
a && /* @__PURE__ */ t.jsx("h3", { className: S.title, children: a }),
|
|
144
|
+
o && n && /* @__PURE__ */ t.jsx(
|
|
145
|
+
I,
|
|
125
146
|
{
|
|
126
|
-
current:
|
|
127
|
-
onChange: (
|
|
147
|
+
current: o,
|
|
148
|
+
onChange: (u) => n(u)
|
|
128
149
|
}
|
|
129
150
|
)
|
|
130
151
|
] }),
|
|
131
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
132
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
152
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.itemsBlock, children: [
|
|
153
|
+
/* @__PURE__ */ t.jsx("h5", { className: S.subtitle, children: r }),
|
|
133
154
|
/* @__PURE__ */ t.jsx(
|
|
134
|
-
|
|
155
|
+
G,
|
|
135
156
|
{
|
|
136
|
-
onChange: (
|
|
137
|
-
value:
|
|
157
|
+
onChange: (u) => e(u),
|
|
158
|
+
value: l,
|
|
138
159
|
maxLength: 150
|
|
139
160
|
}
|
|
140
161
|
),
|
|
141
162
|
/* @__PURE__ */ t.jsx(
|
|
142
|
-
|
|
163
|
+
q,
|
|
143
164
|
{
|
|
144
|
-
typeText:
|
|
145
|
-
setTypeText:
|
|
165
|
+
typeText: s,
|
|
166
|
+
setTypeText: c
|
|
146
167
|
}
|
|
147
168
|
)
|
|
148
169
|
] })
|
|
149
170
|
] });
|
|
150
|
-
},
|
|
151
|
-
subtitle:
|
|
152
|
-
header:
|
|
153
|
-
text:
|
|
154
|
-
productsBlock:
|
|
155
|
-
top:
|
|
156
|
-
itemsBlock:
|
|
157
|
-
typeTexts:
|
|
158
|
-
block:
|
|
159
|
-
active:
|
|
160
|
-
products:
|
|
161
|
-
product:
|
|
162
|
-
button:
|
|
163
|
-
image:
|
|
164
|
-
info:
|
|
165
|
-
name:
|
|
166
|
-
buttons:
|
|
167
|
-
modal:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
}, jt = "_subtitle_14b87_1", vt = "_header_14b87_8", kt = "_text_14b87_9", yt = "_productsBlock_14b87_10", $t = "_top_14b87_22", wt = "_itemsBlock_14b87_29", Nt = "_typeTexts_14b87_35", Bt = "_block_14b87_41", Ct = "_active_14b87_52", Tt = "_products_14b87_10", It = "_product_14b87_10", Pt = "_button_14b87_70", St = "_image_14b87_80", At = "_info_14b87_87", Ot = "_name_14b87_98", Lt = "_buttons_14b87_102", Rt = "_modal_14b87_108", zt = "_link_14b87_125", Et = "_modalOptions_14b87_131", b = {
|
|
172
|
+
subtitle: jt,
|
|
173
|
+
header: vt,
|
|
174
|
+
text: kt,
|
|
175
|
+
productsBlock: yt,
|
|
176
|
+
top: $t,
|
|
177
|
+
itemsBlock: wt,
|
|
178
|
+
typeTexts: Nt,
|
|
179
|
+
block: Bt,
|
|
180
|
+
active: Ct,
|
|
181
|
+
products: Tt,
|
|
182
|
+
product: It,
|
|
183
|
+
button: Pt,
|
|
184
|
+
image: St,
|
|
185
|
+
info: At,
|
|
186
|
+
name: Ot,
|
|
187
|
+
buttons: Lt,
|
|
188
|
+
modal: Rt,
|
|
189
|
+
link: zt,
|
|
190
|
+
modalOptions: Et
|
|
191
|
+
}, Dt = (d) => {
|
|
192
|
+
const { activeItem: s, setActiveItem: o, popupPosition: n, modalOptions: l } = d;
|
|
193
|
+
return console.log(s, l), /* @__PURE__ */ t.jsxs(
|
|
172
194
|
"div",
|
|
173
195
|
{
|
|
174
|
-
className:
|
|
175
|
-
onClick: (
|
|
176
|
-
|
|
196
|
+
className: b.modal,
|
|
197
|
+
onClick: (e) => {
|
|
198
|
+
e.stopPropagation();
|
|
177
199
|
},
|
|
178
200
|
style: {
|
|
179
|
-
top: `${
|
|
180
|
-
left: `${
|
|
201
|
+
top: `${n.top}px`,
|
|
202
|
+
left: `${n.left}px`
|
|
181
203
|
},
|
|
182
204
|
children: [
|
|
183
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
184
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
205
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.top, children: [
|
|
206
|
+
/* @__PURE__ */ t.jsx("h3", { children: s.name }),
|
|
185
207
|
/* @__PURE__ */ t.jsx(
|
|
186
|
-
|
|
208
|
+
m,
|
|
187
209
|
{
|
|
188
210
|
name: "x",
|
|
189
211
|
height: 20,
|
|
190
212
|
width: 20,
|
|
191
213
|
hoverable: !0,
|
|
192
|
-
onClick: () =>
|
|
214
|
+
onClick: () => o(null)
|
|
193
215
|
}
|
|
194
216
|
)
|
|
195
217
|
] }),
|
|
196
|
-
/* @__PURE__ */ t.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
218
|
+
/* @__PURE__ */ t.jsx("div", { className: b.modalOptions, children: l.map((e) => {
|
|
219
|
+
if (e.type === "image")
|
|
220
|
+
return /* @__PURE__ */ t.jsx(
|
|
221
|
+
Y,
|
|
222
|
+
{
|
|
223
|
+
label: "Put up an attractive image",
|
|
224
|
+
onChange: (c) => {
|
|
225
|
+
const a = {
|
|
226
|
+
...s,
|
|
227
|
+
[e.field]: c[0]
|
|
228
|
+
};
|
|
229
|
+
o(a);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
if (e.type === "text")
|
|
234
|
+
return /* @__PURE__ */ t.jsx(
|
|
235
|
+
ft,
|
|
236
|
+
{
|
|
237
|
+
typeText: s[e.field.type] || "bold",
|
|
238
|
+
setTypeText: (c) => {
|
|
239
|
+
const a = {
|
|
240
|
+
...s,
|
|
241
|
+
[e.field.type]: c
|
|
242
|
+
};
|
|
243
|
+
o(a);
|
|
244
|
+
},
|
|
245
|
+
text: s[e.field.text] || "",
|
|
246
|
+
setText: (c) => {
|
|
247
|
+
const a = {
|
|
248
|
+
...s,
|
|
249
|
+
[e.field.text]: c
|
|
250
|
+
};
|
|
251
|
+
o(a);
|
|
252
|
+
},
|
|
253
|
+
subtitle: e.label
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
if (e.type === "input")
|
|
257
|
+
return /* @__PURE__ */ t.jsx(
|
|
258
|
+
T,
|
|
259
|
+
{
|
|
260
|
+
onChange: (c) => {
|
|
261
|
+
const a = {
|
|
262
|
+
...s,
|
|
263
|
+
[e.field]: c
|
|
264
|
+
};
|
|
265
|
+
o(a);
|
|
266
|
+
},
|
|
267
|
+
value: s[e.field] || "",
|
|
268
|
+
label: e.label,
|
|
269
|
+
placeholder: e.placeholder
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
if (e.type === "inputSwitch")
|
|
273
|
+
return /* @__PURE__ */ t.jsxs("div", { className: b.link, children: [
|
|
274
|
+
/* @__PURE__ */ t.jsx(
|
|
275
|
+
T,
|
|
276
|
+
{
|
|
277
|
+
onChange: (c) => {
|
|
278
|
+
const a = {
|
|
279
|
+
...s,
|
|
280
|
+
[e.field.text]: c
|
|
281
|
+
};
|
|
282
|
+
o(a);
|
|
283
|
+
},
|
|
284
|
+
value: s[e.field.text] || "",
|
|
285
|
+
label: e.inputLabel,
|
|
286
|
+
placeholder: e.placeholder
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ t.jsx(
|
|
290
|
+
I,
|
|
291
|
+
{
|
|
292
|
+
current: !!s[e.field.switch] || !1,
|
|
293
|
+
label: e.switchLabel
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
] });
|
|
297
|
+
if (e.type === "list")
|
|
298
|
+
return /* @__PURE__ */ t.jsx(
|
|
299
|
+
Yt,
|
|
300
|
+
{
|
|
301
|
+
items: s[e.field] || [],
|
|
302
|
+
setItems: (c) => {
|
|
303
|
+
const a = {
|
|
304
|
+
...s,
|
|
305
|
+
[e.field]: c
|
|
306
|
+
};
|
|
307
|
+
o(a);
|
|
308
|
+
},
|
|
309
|
+
itemsType: "select",
|
|
310
|
+
draggable: e.draggable || !1,
|
|
311
|
+
itemsOptions: e.itemsOptions,
|
|
312
|
+
deletable: e.deletable || !1,
|
|
313
|
+
editable: !1,
|
|
314
|
+
subtitle: e.label
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
if (e.type === "select")
|
|
318
|
+
return /* @__PURE__ */ t.jsx(
|
|
319
|
+
O,
|
|
320
|
+
{
|
|
321
|
+
options: e.itemsOptions,
|
|
322
|
+
onChange: (c) => {
|
|
323
|
+
const a = {
|
|
324
|
+
...s,
|
|
325
|
+
[e.field]: c
|
|
326
|
+
};
|
|
327
|
+
o(a);
|
|
328
|
+
},
|
|
329
|
+
label: e.label,
|
|
330
|
+
value: s[e.field] || "String"
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
}) })
|
|
200
334
|
]
|
|
201
335
|
}
|
|
202
336
|
);
|
|
203
|
-
},
|
|
337
|
+
}, Ht = "_other_1wtgi_1", Mt = "_subtitle_1wtgi_7", Ft = "_items_1wtgi_14", D = {
|
|
338
|
+
other: Ht,
|
|
339
|
+
subtitle: Mt,
|
|
340
|
+
items: Ft
|
|
341
|
+
}, Gt = (d) => {
|
|
342
|
+
const { items: s, title: o = "Other" } = d;
|
|
343
|
+
return /* @__PURE__ */ t.jsxs("div", { className: D.other, children: [
|
|
344
|
+
/* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: o }),
|
|
345
|
+
/* @__PURE__ */ t.jsx("div", { className: D.items, children: s.map((n) => /* @__PURE__ */ t.jsx(
|
|
346
|
+
I,
|
|
347
|
+
{
|
|
348
|
+
current: n.isItem,
|
|
349
|
+
onChange: (l) => n.setIsItem(l),
|
|
350
|
+
label: n.label,
|
|
351
|
+
hasBackground: !0,
|
|
352
|
+
paddingless: !1
|
|
353
|
+
}
|
|
354
|
+
)) })
|
|
355
|
+
] });
|
|
356
|
+
}, Yt = (d) => {
|
|
204
357
|
const {
|
|
205
|
-
isActiveItems:
|
|
206
|
-
setIsActiveItems:
|
|
207
|
-
items:
|
|
208
|
-
setItems:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
358
|
+
isActiveItems: s,
|
|
359
|
+
setIsActiveItems: o,
|
|
360
|
+
items: n,
|
|
361
|
+
setItems: l,
|
|
362
|
+
other: e,
|
|
363
|
+
title: c,
|
|
364
|
+
subtitle: a,
|
|
365
|
+
editable: r = !0,
|
|
366
|
+
draggable: u = !1,
|
|
367
|
+
withImage: p = !1,
|
|
368
|
+
deletable: y = !0,
|
|
369
|
+
addable: k = !0,
|
|
370
|
+
itemsType: x,
|
|
371
|
+
itemsPlaceholder: $ = "",
|
|
372
|
+
itemsOptions: g,
|
|
373
|
+
hasRangeSelector: L = !1,
|
|
374
|
+
rangeSelectorOptions: H,
|
|
375
|
+
modalOptions: M
|
|
376
|
+
} = d, [B, P] = j.useState(null), [J, K] = j.useState({
|
|
220
377
|
top: 0,
|
|
221
378
|
left: 0
|
|
222
379
|
});
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
|
|
380
|
+
j.useEffect(() => {
|
|
381
|
+
const i = () => {
|
|
382
|
+
P(null);
|
|
226
383
|
};
|
|
227
|
-
return document.body.addEventListener("click",
|
|
228
|
-
|
|
384
|
+
return document.body.addEventListener("click", i), P(null), () => {
|
|
385
|
+
P(null), document.body.removeEventListener("click", i);
|
|
229
386
|
};
|
|
230
|
-
}, [])
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
387
|
+
}, []), j.useEffect(() => {
|
|
388
|
+
if (B) {
|
|
389
|
+
const i = [...n].map((h) => h.id === B.id ? B : h);
|
|
390
|
+
l(i);
|
|
391
|
+
}
|
|
392
|
+
}, [B]), console.log(n);
|
|
393
|
+
const Q = (i, h) => {
|
|
394
|
+
i.stopPropagation();
|
|
395
|
+
const N = i.target.getBoundingClientRect(), w = 100, f = window.innerHeight;
|
|
396
|
+
let z = N.top + window.scrollY;
|
|
397
|
+
z + w > f && (z = f - w - 20), K({
|
|
398
|
+
top: z - 80,
|
|
399
|
+
left: N.left - 30
|
|
400
|
+
}), P(h);
|
|
239
401
|
};
|
|
240
|
-
function
|
|
241
|
-
if (
|
|
242
|
-
return /* @__PURE__ */ t.jsx(
|
|
243
|
-
|
|
402
|
+
function V(i) {
|
|
403
|
+
if (p)
|
|
404
|
+
return i ? /* @__PURE__ */ t.jsx(
|
|
405
|
+
"img",
|
|
406
|
+
{
|
|
407
|
+
src: `https://imagedelivery.net/${i}/w=1000`,
|
|
408
|
+
alt: "image",
|
|
409
|
+
width: 16,
|
|
410
|
+
height: 16
|
|
411
|
+
}
|
|
412
|
+
) : /* @__PURE__ */ t.jsx(
|
|
413
|
+
m,
|
|
244
414
|
{
|
|
245
415
|
name: "image",
|
|
246
416
|
width: 16,
|
|
@@ -249,34 +419,36 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
249
419
|
}
|
|
250
420
|
);
|
|
251
421
|
}
|
|
252
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
253
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
254
|
-
|
|
255
|
-
/* @__PURE__ */ t.jsx(
|
|
256
|
-
|
|
422
|
+
return /* @__PURE__ */ t.jsxs("div", { className: b.productsBlock, children: [
|
|
423
|
+
(c || s) && /* @__PURE__ */ t.jsxs("div", { className: b.top, children: [
|
|
424
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: b.title, children: c }),
|
|
425
|
+
s && /* @__PURE__ */ t.jsx(
|
|
426
|
+
I,
|
|
257
427
|
{
|
|
258
|
-
current:
|
|
259
|
-
onChange: (
|
|
428
|
+
current: s,
|
|
429
|
+
onChange: (i) => o == null ? void 0 : o(i)
|
|
260
430
|
}
|
|
261
431
|
)
|
|
262
432
|
] }),
|
|
263
|
-
|
|
264
|
-
|
|
433
|
+
B && r && M && /* @__PURE__ */ t.jsx(
|
|
434
|
+
Dt,
|
|
265
435
|
{
|
|
266
|
-
activeItem:
|
|
267
|
-
setActiveItem:
|
|
268
|
-
popupPosition:
|
|
436
|
+
activeItem: B,
|
|
437
|
+
setActiveItem: P,
|
|
438
|
+
popupPosition: J,
|
|
439
|
+
modalOptions: M
|
|
269
440
|
}
|
|
270
441
|
),
|
|
271
|
-
/* @__PURE__ */ t.
|
|
272
|
-
|
|
273
|
-
|
|
442
|
+
L && H && /* @__PURE__ */ t.jsx(Je, { ...H }),
|
|
443
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.products, children: [
|
|
444
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: b.subtitle, children: a }),
|
|
445
|
+
n.map((i) => /* @__PURE__ */ t.jsxs(
|
|
274
446
|
"div",
|
|
275
447
|
{
|
|
276
|
-
className:
|
|
448
|
+
className: b.product,
|
|
277
449
|
children: [
|
|
278
|
-
|
|
279
|
-
|
|
450
|
+
u && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
451
|
+
m,
|
|
280
452
|
{
|
|
281
453
|
name: "drag",
|
|
282
454
|
hoverable: !0,
|
|
@@ -284,53 +456,69 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
284
456
|
height: 20
|
|
285
457
|
}
|
|
286
458
|
) }),
|
|
287
|
-
|
|
288
|
-
|
|
459
|
+
x === "select" && /* @__PURE__ */ t.jsx(
|
|
460
|
+
O,
|
|
289
461
|
{
|
|
290
|
-
onChange: (
|
|
291
|
-
|
|
292
|
-
...
|
|
293
|
-
name:
|
|
294
|
-
} :
|
|
462
|
+
onChange: (h) => {
|
|
463
|
+
const w = [...n].map((f) => f.id === i.id ? {
|
|
464
|
+
...i,
|
|
465
|
+
name: h
|
|
466
|
+
} : f);
|
|
467
|
+
l(w);
|
|
295
468
|
},
|
|
296
|
-
value:
|
|
297
|
-
options:
|
|
298
|
-
leftAddon:
|
|
469
|
+
value: i.name,
|
|
470
|
+
options: g,
|
|
471
|
+
leftAddon: V(i.image)
|
|
299
472
|
}
|
|
300
473
|
),
|
|
301
|
-
|
|
302
|
-
|
|
474
|
+
x === "input" && /* @__PURE__ */ t.jsx(
|
|
475
|
+
T,
|
|
303
476
|
{
|
|
304
|
-
onChange: (
|
|
305
|
-
|
|
306
|
-
...
|
|
307
|
-
name:
|
|
308
|
-
} :
|
|
477
|
+
onChange: (h) => {
|
|
478
|
+
const w = [...n].map((f) => f.id === i.id ? {
|
|
479
|
+
...i,
|
|
480
|
+
name: h
|
|
481
|
+
} : f);
|
|
482
|
+
l(w);
|
|
309
483
|
},
|
|
310
|
-
value:
|
|
311
|
-
placeholder:
|
|
484
|
+
value: i.name,
|
|
485
|
+
placeholder: $
|
|
312
486
|
}
|
|
313
487
|
),
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
488
|
+
x === "image" && /* @__PURE__ */ t.jsx(
|
|
489
|
+
Y,
|
|
490
|
+
{
|
|
491
|
+
onChange: (h) => {
|
|
492
|
+
const w = [...n].map((f) => f.id === i.id ? {
|
|
493
|
+
...i,
|
|
494
|
+
image: h[0]
|
|
495
|
+
} : f);
|
|
496
|
+
l(w);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
),
|
|
500
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.buttons, children: [
|
|
501
|
+
r && /* @__PURE__ */ t.jsx(
|
|
502
|
+
m,
|
|
318
503
|
{
|
|
319
504
|
name: "sliders",
|
|
320
505
|
hoverable: !0,
|
|
321
506
|
width: 20,
|
|
322
507
|
height: 20,
|
|
323
|
-
onClick: (
|
|
324
|
-
|
|
508
|
+
onClick: (h) => {
|
|
509
|
+
Q(h, i);
|
|
325
510
|
}
|
|
326
511
|
}
|
|
327
512
|
),
|
|
328
|
-
/* @__PURE__ */ t.jsx(
|
|
329
|
-
|
|
513
|
+
y && /* @__PURE__ */ t.jsx(
|
|
514
|
+
m,
|
|
330
515
|
{
|
|
331
516
|
name: "trash",
|
|
332
517
|
hoverable: !0,
|
|
333
|
-
onClick: () =>
|
|
518
|
+
onClick: () => {
|
|
519
|
+
const h = n.filter((N) => N.id !== i.id);
|
|
520
|
+
l(h);
|
|
521
|
+
},
|
|
334
522
|
width: 20,
|
|
335
523
|
height: 20,
|
|
336
524
|
fill: "#C12A2A"
|
|
@@ -339,29 +527,30 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
339
527
|
] })
|
|
340
528
|
]
|
|
341
529
|
},
|
|
342
|
-
|
|
530
|
+
i.id
|
|
343
531
|
)),
|
|
344
|
-
/* @__PURE__ */ t.jsxs(
|
|
345
|
-
|
|
532
|
+
k && /* @__PURE__ */ t.jsxs(
|
|
533
|
+
U,
|
|
346
534
|
{
|
|
347
|
-
className:
|
|
535
|
+
className: b.button,
|
|
348
536
|
size: "s",
|
|
349
|
-
onClick: () =>
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
name:
|
|
353
|
-
id:
|
|
354
|
-
}) :
|
|
537
|
+
onClick: () => {
|
|
538
|
+
const i = [...n];
|
|
539
|
+
x === "select" ? i.push({
|
|
540
|
+
name: g[0] || `Product ${n.length + 1}`,
|
|
541
|
+
id: R()
|
|
542
|
+
}) : x === "input" ? i.push({
|
|
355
543
|
name: "",
|
|
356
|
-
id:
|
|
357
|
-
}) :
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
544
|
+
id: R()
|
|
545
|
+
}) : i.push({
|
|
546
|
+
name: `Image ${n.length + 1}`,
|
|
547
|
+
id: R()
|
|
548
|
+
}), l(i);
|
|
549
|
+
},
|
|
361
550
|
children: [
|
|
362
551
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
363
552
|
/* @__PURE__ */ t.jsx(
|
|
364
|
-
|
|
553
|
+
m,
|
|
365
554
|
{
|
|
366
555
|
name: "plus",
|
|
367
556
|
width: 16,
|
|
@@ -372,80 +561,68 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
372
561
|
}
|
|
373
562
|
)
|
|
374
563
|
] }),
|
|
375
|
-
|
|
376
|
-
/* @__PURE__ */ t.jsx("h5", { className: m.subtitle, children: "Other" }),
|
|
377
|
-
/* @__PURE__ */ t.jsx(
|
|
378
|
-
C,
|
|
379
|
-
{
|
|
380
|
-
current: c,
|
|
381
|
-
onChange: (e) => u == null ? void 0 : u((d) => e),
|
|
382
|
-
label: "Product Stats",
|
|
383
|
-
hasBackground: !0,
|
|
384
|
-
paddingless: !1
|
|
385
|
-
}
|
|
386
|
-
)
|
|
387
|
-
] })
|
|
564
|
+
e !== void 0 && /* @__PURE__ */ t.jsx(Gt, { items: e })
|
|
388
565
|
] });
|
|
389
|
-
},
|
|
390
|
-
subtitle:
|
|
391
|
-
header:
|
|
392
|
-
text:
|
|
393
|
-
productsBlock:
|
|
394
|
-
buttonsBlock:
|
|
395
|
-
top:
|
|
396
|
-
itemsBlock:
|
|
397
|
-
typeTexts:
|
|
398
|
-
block:
|
|
399
|
-
active:
|
|
400
|
-
products:
|
|
401
|
-
product:
|
|
402
|
-
button:
|
|
403
|
-
image:
|
|
404
|
-
info:
|
|
405
|
-
name:
|
|
406
|
-
buttons:
|
|
407
|
-
modal:
|
|
408
|
-
other:
|
|
409
|
-
options:
|
|
410
|
-
},
|
|
411
|
-
const { activeButton:
|
|
566
|
+
}, Ut = "_subtitle_41klp_1", qt = "_header_41klp_8", Jt = "_text_41klp_9", Kt = "_productsBlock_41klp_10", Qt = "_buttonsBlock_41klp_11", Vt = "_top_41klp_21", Wt = "_itemsBlock_41klp_28", Xt = "_typeTexts_41klp_34", Zt = "_block_41klp_40", te = "_active_41klp_51", ee = "_products_41klp_10", se = "_product_41klp_10", ne = "_button_41klp_11", oe = "_image_41klp_79", ce = "_info_41klp_86", le = "_name_41klp_97", ie = "_buttons_41klp_11", ae = "_modal_41klp_107", re = "_other_41klp_124", de = "_options_41klp_130", C = {
|
|
567
|
+
subtitle: Ut,
|
|
568
|
+
header: qt,
|
|
569
|
+
text: Jt,
|
|
570
|
+
productsBlock: Kt,
|
|
571
|
+
buttonsBlock: Qt,
|
|
572
|
+
top: Vt,
|
|
573
|
+
itemsBlock: Wt,
|
|
574
|
+
typeTexts: Xt,
|
|
575
|
+
block: Zt,
|
|
576
|
+
active: te,
|
|
577
|
+
products: ee,
|
|
578
|
+
product: se,
|
|
579
|
+
button: ne,
|
|
580
|
+
image: oe,
|
|
581
|
+
info: ce,
|
|
582
|
+
name: le,
|
|
583
|
+
buttons: ie,
|
|
584
|
+
modal: ae,
|
|
585
|
+
other: re,
|
|
586
|
+
options: de
|
|
587
|
+
}, ue = (d) => {
|
|
588
|
+
const { activeButton: s, setActiveButton: o, popupPosition: n } = d, [l, e] = j.useState(s.typeText), [c, a] = j.useState(s.destination), [r, u] = j.useState(s.link || "");
|
|
412
589
|
return /* @__PURE__ */ t.jsxs(
|
|
413
590
|
"div",
|
|
414
591
|
{
|
|
415
|
-
className:
|
|
416
|
-
onClick: (
|
|
417
|
-
|
|
592
|
+
className: C.modal,
|
|
593
|
+
onClick: (p) => {
|
|
594
|
+
p.stopPropagation();
|
|
418
595
|
},
|
|
419
596
|
style: {
|
|
420
|
-
top: `${
|
|
421
|
-
left: `${
|
|
597
|
+
top: `${n.top}px`,
|
|
598
|
+
left: `${n.left}px`
|
|
422
599
|
},
|
|
423
600
|
children: [
|
|
424
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
425
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
601
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
602
|
+
/* @__PURE__ */ t.jsx("h3", { children: s.type }),
|
|
426
603
|
/* @__PURE__ */ t.jsx(
|
|
427
|
-
|
|
604
|
+
m,
|
|
428
605
|
{
|
|
429
606
|
name: "x",
|
|
430
607
|
height: 20,
|
|
431
608
|
width: 20,
|
|
432
609
|
hoverable: !0,
|
|
433
|
-
onClick: () =>
|
|
610
|
+
onClick: () => o(null)
|
|
434
611
|
}
|
|
435
612
|
)
|
|
436
613
|
] }),
|
|
437
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
614
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.options, children: [
|
|
438
615
|
/* @__PURE__ */ t.jsx(
|
|
439
|
-
|
|
616
|
+
O,
|
|
440
617
|
{
|
|
441
618
|
label: "Destination",
|
|
442
|
-
onChange: (
|
|
619
|
+
onChange: (p) => a(p),
|
|
443
620
|
options: ["Go to Page", "Open Link"],
|
|
444
|
-
value:
|
|
621
|
+
value: c
|
|
445
622
|
}
|
|
446
623
|
),
|
|
447
|
-
|
|
448
|
-
|
|
624
|
+
c === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
625
|
+
O,
|
|
449
626
|
{
|
|
450
627
|
label: "Go to",
|
|
451
628
|
onChange: () => {
|
|
@@ -454,23 +631,23 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
454
631
|
value: "Homepage"
|
|
455
632
|
}
|
|
456
633
|
) : /* @__PURE__ */ t.jsx(
|
|
457
|
-
|
|
634
|
+
T,
|
|
458
635
|
{
|
|
459
|
-
onChange: (
|
|
460
|
-
value:
|
|
636
|
+
onChange: (p) => u(p),
|
|
637
|
+
value: r,
|
|
461
638
|
placeholder: "https://",
|
|
462
639
|
label: "Link"
|
|
463
640
|
}
|
|
464
641
|
),
|
|
465
642
|
/* @__PURE__ */ t.jsx(
|
|
466
|
-
|
|
643
|
+
I,
|
|
467
644
|
{
|
|
468
645
|
current: !1,
|
|
469
646
|
label: "Open in new tab"
|
|
470
647
|
}
|
|
471
648
|
),
|
|
472
649
|
/* @__PURE__ */ t.jsx(
|
|
473
|
-
|
|
650
|
+
G,
|
|
474
651
|
{
|
|
475
652
|
onChange: () => {
|
|
476
653
|
},
|
|
@@ -480,98 +657,102 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
480
657
|
}
|
|
481
658
|
),
|
|
482
659
|
/* @__PURE__ */ t.jsx(
|
|
483
|
-
|
|
660
|
+
q,
|
|
484
661
|
{
|
|
485
|
-
typeText:
|
|
486
|
-
setTypeText:
|
|
662
|
+
typeText: l,
|
|
663
|
+
setTypeText: e
|
|
487
664
|
}
|
|
488
665
|
)
|
|
489
666
|
] })
|
|
490
667
|
]
|
|
491
668
|
}
|
|
492
669
|
);
|
|
493
|
-
},
|
|
494
|
-
subtitle:
|
|
495
|
-
header:
|
|
496
|
-
text:
|
|
497
|
-
productsBlock:
|
|
498
|
-
buttonsBlock:
|
|
499
|
-
top:
|
|
500
|
-
itemsBlock:
|
|
501
|
-
typeTexts:
|
|
502
|
-
block:
|
|
503
|
-
active:
|
|
504
|
-
products:
|
|
505
|
-
product:
|
|
506
|
-
button:
|
|
507
|
-
image:
|
|
508
|
-
info:
|
|
509
|
-
name:
|
|
510
|
-
buttons:
|
|
511
|
-
modal:
|
|
512
|
-
other:
|
|
513
|
-
options:
|
|
514
|
-
},
|
|
515
|
-
const { buttons:
|
|
670
|
+
}, _e = "_subtitle_1y5sw_1", pe = "_header_1y5sw_8", me = "_text_1y5sw_9", he = "_productsBlock_1y5sw_10", ge = "_buttonsBlock_1y5sw_11", be = "_top_1y5sw_22", xe = "_itemsBlock_1y5sw_29", fe = "_typeTexts_1y5sw_35", je = "_block_1y5sw_41", ve = "_active_1y5sw_52", ke = "_products_1y5sw_10", ye = "_product_1y5sw_10", $e = "_button_1y5sw_11", we = "_image_1y5sw_80", Ne = "_info_1y5sw_87", Be = "_name_1y5sw_98", Ce = "_buttons_1y5sw_11", Te = "_modal_1y5sw_108", Ie = "_other_1y5sw_125", Pe = "_options_1y5sw_131", A = {
|
|
671
|
+
subtitle: _e,
|
|
672
|
+
header: pe,
|
|
673
|
+
text: me,
|
|
674
|
+
productsBlock: he,
|
|
675
|
+
buttonsBlock: ge,
|
|
676
|
+
top: be,
|
|
677
|
+
itemsBlock: xe,
|
|
678
|
+
typeTexts: fe,
|
|
679
|
+
block: je,
|
|
680
|
+
active: ve,
|
|
681
|
+
products: ke,
|
|
682
|
+
product: ye,
|
|
683
|
+
button: $e,
|
|
684
|
+
image: we,
|
|
685
|
+
info: Ne,
|
|
686
|
+
name: Be,
|
|
687
|
+
buttons: Ce,
|
|
688
|
+
modal: Te,
|
|
689
|
+
other: Ie,
|
|
690
|
+
options: Pe
|
|
691
|
+
}, Se = (d) => {
|
|
692
|
+
const { buttons: s, setButtons: o } = d, [n, l] = j.useState(null), [e, c] = j.useState({
|
|
516
693
|
top: 0,
|
|
517
694
|
left: 0
|
|
518
695
|
});
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
|
|
696
|
+
j.useEffect(() => {
|
|
697
|
+
const r = () => {
|
|
698
|
+
l(null);
|
|
522
699
|
};
|
|
523
|
-
return document.body.addEventListener("click",
|
|
524
|
-
|
|
700
|
+
return document.body.addEventListener("click", r), l(null), () => {
|
|
701
|
+
l(null), document.body.removeEventListener("click", r);
|
|
525
702
|
};
|
|
526
703
|
}, []);
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
const
|
|
530
|
-
let
|
|
531
|
-
|
|
532
|
-
top:
|
|
533
|
-
left:
|
|
534
|
-
}),
|
|
704
|
+
const a = (r, u) => {
|
|
705
|
+
r.stopPropagation();
|
|
706
|
+
const p = r.target.getBoundingClientRect(), y = 490, k = window.innerHeight;
|
|
707
|
+
let x = p.top + window.scrollY;
|
|
708
|
+
x + y > k && (x = k - y - 20), c({
|
|
709
|
+
top: x,
|
|
710
|
+
left: p.left - 30
|
|
711
|
+
}), l(u);
|
|
535
712
|
};
|
|
536
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
537
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
538
|
-
|
|
713
|
+
return /* @__PURE__ */ t.jsxs("div", { className: A.products, children: [
|
|
714
|
+
/* @__PURE__ */ t.jsx("h5", { className: A.subtitle, children: "Button Type" }),
|
|
715
|
+
s.map((r) => /* @__PURE__ */ t.jsxs(
|
|
539
716
|
"div",
|
|
540
717
|
{
|
|
541
|
-
className:
|
|
718
|
+
className: A.product,
|
|
542
719
|
children: [
|
|
543
720
|
/* @__PURE__ */ t.jsx(
|
|
544
|
-
|
|
721
|
+
O,
|
|
545
722
|
{
|
|
546
|
-
onChange: (
|
|
547
|
-
|
|
548
|
-
...
|
|
549
|
-
type:
|
|
550
|
-
} :
|
|
723
|
+
onChange: (u) => {
|
|
724
|
+
const y = [...s].map((k) => k.id === r.id ? {
|
|
725
|
+
...r,
|
|
726
|
+
type: u
|
|
727
|
+
} : k);
|
|
728
|
+
o(y);
|
|
551
729
|
},
|
|
552
|
-
value:
|
|
553
|
-
options: ["Primary", "Secondary"]
|
|
730
|
+
value: r.type,
|
|
731
|
+
options: ["Primary", "Secondary", "Tertiary"]
|
|
554
732
|
}
|
|
555
733
|
),
|
|
556
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
734
|
+
/* @__PURE__ */ t.jsxs("div", { className: A.buttons, children: [
|
|
557
735
|
/* @__PURE__ */ t.jsx(
|
|
558
|
-
|
|
736
|
+
m,
|
|
559
737
|
{
|
|
560
738
|
name: "sliders",
|
|
561
739
|
hoverable: !0,
|
|
562
740
|
width: 20,
|
|
563
741
|
height: 20,
|
|
564
|
-
onClick: (
|
|
565
|
-
|
|
742
|
+
onClick: (u) => {
|
|
743
|
+
a(u, r);
|
|
566
744
|
}
|
|
567
745
|
}
|
|
568
746
|
),
|
|
569
747
|
/* @__PURE__ */ t.jsx(
|
|
570
|
-
|
|
748
|
+
m,
|
|
571
749
|
{
|
|
572
750
|
name: "trash",
|
|
573
751
|
hoverable: !0,
|
|
574
|
-
onClick: () =>
|
|
752
|
+
onClick: () => {
|
|
753
|
+
const u = s.filter((p) => p.id !== r.id);
|
|
754
|
+
o(u);
|
|
755
|
+
},
|
|
575
756
|
width: 20,
|
|
576
757
|
height: 20,
|
|
577
758
|
fill: "#C12A2A"
|
|
@@ -580,34 +761,34 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
580
761
|
] })
|
|
581
762
|
]
|
|
582
763
|
},
|
|
583
|
-
|
|
764
|
+
r.id
|
|
584
765
|
)),
|
|
585
|
-
|
|
586
|
-
|
|
766
|
+
n && /* @__PURE__ */ t.jsx(
|
|
767
|
+
ue,
|
|
587
768
|
{
|
|
588
|
-
activeButton:
|
|
589
|
-
setActiveButton:
|
|
590
|
-
popupPosition:
|
|
769
|
+
activeButton: n,
|
|
770
|
+
setActiveButton: l,
|
|
771
|
+
popupPosition: e
|
|
591
772
|
}
|
|
592
773
|
),
|
|
593
774
|
/* @__PURE__ */ t.jsxs(
|
|
594
|
-
|
|
775
|
+
U,
|
|
595
776
|
{
|
|
596
|
-
className:
|
|
777
|
+
className: A.button,
|
|
597
778
|
size: "s",
|
|
598
|
-
onClick: () =>
|
|
599
|
-
const
|
|
600
|
-
|
|
779
|
+
onClick: () => {
|
|
780
|
+
const r = [...s];
|
|
781
|
+
r.push({
|
|
601
782
|
type: "Primary",
|
|
602
|
-
id:
|
|
783
|
+
id: R(),
|
|
603
784
|
typeText: "bold",
|
|
604
785
|
destination: "Go to Page"
|
|
605
|
-
}),
|
|
606
|
-
}
|
|
786
|
+
}), o(r);
|
|
787
|
+
},
|
|
607
788
|
children: [
|
|
608
789
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
609
790
|
/* @__PURE__ */ t.jsx(
|
|
610
|
-
|
|
791
|
+
m,
|
|
611
792
|
{
|
|
612
793
|
name: "plus",
|
|
613
794
|
width: 16,
|
|
@@ -618,48 +799,173 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
|
|
|
618
799
|
}
|
|
619
800
|
)
|
|
620
801
|
] });
|
|
621
|
-
},
|
|
622
|
-
const { isActiveButtons:
|
|
623
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
624
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
625
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
802
|
+
}, We = (d) => {
|
|
803
|
+
const { isActiveButtons: s, setIsActiveButtons: o, buttons: n, setButtons: l } = d;
|
|
804
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: C.buttonsBlock, children: [
|
|
805
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
806
|
+
/* @__PURE__ */ t.jsx("h3", { className: C.title, children: "Buttons" }),
|
|
626
807
|
/* @__PURE__ */ t.jsx(
|
|
627
|
-
|
|
808
|
+
I,
|
|
628
809
|
{
|
|
629
|
-
current:
|
|
630
|
-
onChange: (
|
|
810
|
+
current: s,
|
|
811
|
+
onChange: (e) => o(e)
|
|
631
812
|
}
|
|
632
813
|
)
|
|
633
814
|
] }),
|
|
634
815
|
/* @__PURE__ */ t.jsx(
|
|
635
|
-
|
|
816
|
+
Se,
|
|
636
817
|
{
|
|
637
|
-
buttons:
|
|
638
|
-
setButtons:
|
|
818
|
+
buttons: n,
|
|
819
|
+
setButtons: l
|
|
639
820
|
}
|
|
640
821
|
)
|
|
641
822
|
] }) });
|
|
823
|
+
}, Ae = "_wrapper_tn7gb_1", Oe = "_subtitle_tn7gb_7", Le = "_content_tn7gb_14", Re = "_range_tn7gb_21", ze = "_track_tn7gb_26", Ee = "_progress_tn7gb_35", De = "_dots_tn7gb_45", He = "_dot_tn7gb_45", Me = "_active_tn7gb_62", Fe = "_input_tn7gb_74", Ge = "_countBlock_tn7gb_88", Ye = "_count_tn7gb_88", Ue = "_controls_tn7gb_103", qe = "_button_tn7gb_108", _ = {
|
|
824
|
+
wrapper: Ae,
|
|
825
|
+
subtitle: Oe,
|
|
826
|
+
content: Le,
|
|
827
|
+
range: Re,
|
|
828
|
+
track: ze,
|
|
829
|
+
progress: Ee,
|
|
830
|
+
dots: De,
|
|
831
|
+
dot: He,
|
|
832
|
+
active: Me,
|
|
833
|
+
input: Fe,
|
|
834
|
+
countBlock: Ge,
|
|
835
|
+
count: Ye,
|
|
836
|
+
controls: Ue,
|
|
837
|
+
button: qe
|
|
838
|
+
}, Je = (d) => {
|
|
839
|
+
const { label: s, min: o = 1, max: n = 4, step: l = 1, count: e, setCount: c } = d, [a, r] = j.useState(!1), u = Array.from({ length: (n - o) / l + 1 }), p = (e - o) / (n - o) * 100, y = () => {
|
|
840
|
+
e < n && c(e + l);
|
|
841
|
+
}, k = () => {
|
|
842
|
+
e > o && c(e - l);
|
|
843
|
+
}, x = ($) => {
|
|
844
|
+
const g = o + $ * l;
|
|
845
|
+
c(g);
|
|
846
|
+
};
|
|
847
|
+
return /* @__PURE__ */ t.jsxs("div", { className: _.wrapper, children: [
|
|
848
|
+
s && /* @__PURE__ */ t.jsx("h5", { className: _.subtitle, children: s }),
|
|
849
|
+
/* @__PURE__ */ t.jsxs("div", { className: _.content, children: [
|
|
850
|
+
/* @__PURE__ */ t.jsxs("div", { className: _.range, children: [
|
|
851
|
+
/* @__PURE__ */ t.jsx("div", { className: _.track }),
|
|
852
|
+
/* @__PURE__ */ t.jsx(
|
|
853
|
+
"div",
|
|
854
|
+
{
|
|
855
|
+
className: _.progress,
|
|
856
|
+
style: { width: `${p}%` }
|
|
857
|
+
}
|
|
858
|
+
),
|
|
859
|
+
/* @__PURE__ */ t.jsx("div", { className: _.dots, children: u.map(($, g) => {
|
|
860
|
+
const L = g <= (e - o) / l;
|
|
861
|
+
return /* @__PURE__ */ t.jsx(
|
|
862
|
+
"button",
|
|
863
|
+
{
|
|
864
|
+
onClick: () => x(g),
|
|
865
|
+
className: F(_.dot, {
|
|
866
|
+
[_.active]: L,
|
|
867
|
+
[_.inactive]: !L,
|
|
868
|
+
[_.dragging]: a
|
|
869
|
+
}),
|
|
870
|
+
"aria-label": `Set value to ${o + g * l}`
|
|
871
|
+
},
|
|
872
|
+
g
|
|
873
|
+
);
|
|
874
|
+
}) }),
|
|
875
|
+
/* @__PURE__ */ t.jsx(
|
|
876
|
+
"input",
|
|
877
|
+
{
|
|
878
|
+
type: "range",
|
|
879
|
+
min: o,
|
|
880
|
+
max: n,
|
|
881
|
+
step: l,
|
|
882
|
+
value: e,
|
|
883
|
+
onChange: ($) => c(Number($.target.value)),
|
|
884
|
+
onMouseDown: () => r(!0),
|
|
885
|
+
onMouseUp: () => r(!1),
|
|
886
|
+
onTouchStart: () => r(!0),
|
|
887
|
+
onTouchEnd: () => r(!1),
|
|
888
|
+
className: _.input
|
|
889
|
+
}
|
|
890
|
+
)
|
|
891
|
+
] }),
|
|
892
|
+
/* @__PURE__ */ t.jsxs("div", { className: _.countBlock, children: [
|
|
893
|
+
/* @__PURE__ */ t.jsx(
|
|
894
|
+
T,
|
|
895
|
+
{
|
|
896
|
+
type: "number",
|
|
897
|
+
min: o,
|
|
898
|
+
max: n,
|
|
899
|
+
paddingless: !0,
|
|
900
|
+
onChange: ($) => {
|
|
901
|
+
const g = Number($);
|
|
902
|
+
g > n ? c(n) : g < o ? c(o) : c(g);
|
|
903
|
+
},
|
|
904
|
+
value: String(e)
|
|
905
|
+
}
|
|
906
|
+
),
|
|
907
|
+
/* @__PURE__ */ t.jsxs("div", { className: _.controls, children: [
|
|
908
|
+
/* @__PURE__ */ t.jsx(
|
|
909
|
+
"button",
|
|
910
|
+
{
|
|
911
|
+
onClick: y,
|
|
912
|
+
disabled: e >= n,
|
|
913
|
+
className: _.button,
|
|
914
|
+
"aria-label": "Increment count",
|
|
915
|
+
children: /* @__PURE__ */ t.jsx(
|
|
916
|
+
m,
|
|
917
|
+
{
|
|
918
|
+
name: "arrow-down",
|
|
919
|
+
width: 15,
|
|
920
|
+
height: 15,
|
|
921
|
+
rotated: !0
|
|
922
|
+
}
|
|
923
|
+
)
|
|
924
|
+
}
|
|
925
|
+
),
|
|
926
|
+
/* @__PURE__ */ t.jsx(
|
|
927
|
+
"button",
|
|
928
|
+
{
|
|
929
|
+
onClick: k,
|
|
930
|
+
disabled: e <= o,
|
|
931
|
+
className: _.button,
|
|
932
|
+
"aria-label": "Decrement count",
|
|
933
|
+
children: /* @__PURE__ */ t.jsx(
|
|
934
|
+
m,
|
|
935
|
+
{
|
|
936
|
+
name: "arrow-down",
|
|
937
|
+
width: 15,
|
|
938
|
+
height: 15
|
|
939
|
+
}
|
|
940
|
+
)
|
|
941
|
+
}
|
|
942
|
+
)
|
|
943
|
+
] })
|
|
944
|
+
] })
|
|
945
|
+
] })
|
|
946
|
+
] });
|
|
642
947
|
};
|
|
643
948
|
export {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
949
|
+
U as Button,
|
|
950
|
+
Se as ButtonTypeSettings,
|
|
951
|
+
We as ButtonsSettings,
|
|
952
|
+
ts as Checkbox,
|
|
648
953
|
Y as ChooseImage,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
954
|
+
es as ChooseImageModal,
|
|
955
|
+
ss as ColorPicker,
|
|
956
|
+
m as Icon,
|
|
957
|
+
T as Input,
|
|
958
|
+
Yt as ItemsSettings,
|
|
959
|
+
Ve as LayoutSettings,
|
|
960
|
+
ns as Modal,
|
|
961
|
+
os as Picker,
|
|
962
|
+
cs as Radio,
|
|
963
|
+
Je as RangeSelector,
|
|
964
|
+
O as Select,
|
|
965
|
+
ls as Submodal,
|
|
966
|
+
I as Switch,
|
|
967
|
+
ft as TextSettings,
|
|
968
|
+
G as Textarea,
|
|
969
|
+
is as Tip,
|
|
970
|
+
q as TypeTexts
|
|
665
971
|
};
|