@billgangcom/theme-lib 1.5.0 → 1.7.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/builder.cjs.js +3 -3
- package/dist/builder.es.js +8 -8
- package/dist/index-DPhpcpnj.cjs +39 -0
- package/dist/{index-O501BDCu.js → index-DxdTFgwx.js} +1216 -1197
- package/dist/shared/ui/Input/index.d.ts +2 -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 +8 -0
- package/dist/ui/ButtonsSettings/index.d.ts +1 -1
- package/dist/ui/ItemsSettings/index.d.ts +26 -5
- package/dist/ui/OtherSettings/index.d.ts +8 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +445 -343
- package/package.json +1 -1
- package/dist/index-BO6B5tl0.cjs +0 -39
package/dist/ui.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
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 p, a as A, c as Y, S as N, T as O, b as I, C as J, B as E, v as P } from "./index-DxdTFgwx.js";
|
|
2
|
+
import { g as Se, h as Ae, e as Le, M as ze, P as Re, R as Oe, d as Ee, f as He } from "./index-DxdTFgwx.js";
|
|
3
|
+
import k from "react";
|
|
4
|
+
const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_15", V = "_subtitle_1g82c_22", W = "_alignmentContent_1g82c_29", X = "_alignments_1g82c_35", Z = "_alignment_1g82c_8", tt = "_circle_1g82c_54", et = "_paddings_1g82c_61", st = "_padding_1g82c_61", nt = "_input_1g82c_79", x = {
|
|
5
|
+
wrapper: K,
|
|
6
|
+
alignmentBlock: Q,
|
|
7
|
+
title: U,
|
|
8
|
+
subtitle: V,
|
|
9
|
+
alignmentContent: W,
|
|
10
|
+
alignments: X,
|
|
11
|
+
alignment: Z,
|
|
12
|
+
circle: tt,
|
|
13
|
+
paddings: et,
|
|
14
|
+
padding: st,
|
|
15
|
+
input: nt
|
|
16
|
+
}, ot = [
|
|
17
17
|
"topLeft",
|
|
18
18
|
"top",
|
|
19
19
|
"topRight",
|
|
@@ -23,38 +23,58 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
],
|
|
27
|
-
const { alignment:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
], ct = ["left", "top", "right", "bottom"], Be = (r) => {
|
|
27
|
+
const { alignment: e, padding: i, setPadding: s, setAlignment: n } = r;
|
|
28
|
+
function u() {
|
|
29
|
+
switch (e) {
|
|
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: x.layout, children: [
|
|
47
|
+
/* @__PURE__ */ t.jsx("h3", { className: x.title, children: "Layout" }),
|
|
48
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.alignmentBlock, children: [
|
|
49
|
+
/* @__PURE__ */ t.jsx("h5", { className: x.subtitle, children: "Alignment" }),
|
|
50
|
+
/* @__PURE__ */ t.jsxs("div", { className: x.alignmentContent, children: [
|
|
51
|
+
/* @__PURE__ */ t.jsx("div", { className: x.alignments, children: ot.map((l) => /* @__PURE__ */ t.jsxs(
|
|
34
52
|
"div",
|
|
35
53
|
{
|
|
36
54
|
onClick: () => {
|
|
37
|
-
|
|
55
|
+
n((m) => l);
|
|
38
56
|
},
|
|
39
|
-
className:
|
|
57
|
+
className: x.alignment,
|
|
40
58
|
children: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
l !== e && /* @__PURE__ */ t.jsx("div", { className: x.circle }),
|
|
60
|
+
l === e && /* @__PURE__ */ t.jsx(
|
|
61
|
+
p,
|
|
44
62
|
{
|
|
45
|
-
name:
|
|
46
|
-
fill: "#FF3F19"
|
|
63
|
+
name: `text-align-${u()}`,
|
|
64
|
+
fill: "#FF3F19",
|
|
65
|
+
width: 22,
|
|
66
|
+
height: 22
|
|
47
67
|
}
|
|
48
68
|
)
|
|
49
69
|
]
|
|
50
70
|
},
|
|
51
|
-
|
|
71
|
+
l
|
|
52
72
|
)) }),
|
|
53
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
73
|
+
/* @__PURE__ */ t.jsx("div", { className: x.paddings, children: ct.map((l) => /* @__PURE__ */ t.jsxs("label", { className: x.padding, children: [
|
|
54
74
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
55
|
-
|
|
75
|
+
p,
|
|
56
76
|
{
|
|
57
|
-
name: `align-${
|
|
77
|
+
name: `align-${l}`,
|
|
58
78
|
width: 20,
|
|
59
79
|
height: 20
|
|
60
80
|
}
|
|
@@ -63,42 +83,43 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
63
83
|
A,
|
|
64
84
|
{
|
|
65
85
|
type: "text",
|
|
66
|
-
value: String(
|
|
67
|
-
onChange: (
|
|
68
|
-
...
|
|
69
|
-
[
|
|
86
|
+
value: String(i[l]),
|
|
87
|
+
onChange: (m) => s((o) => ({
|
|
88
|
+
...o,
|
|
89
|
+
[l]: Number(m)
|
|
70
90
|
})),
|
|
71
|
-
paddingless: !0
|
|
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
|
+
}, it = "_subtitle_2zbxx_1", lt = "_header_2zbxx_8", at = "_text_2zbxx_9", rt = "_top_2zbxx_16", dt = "_itemsBlock_2zbxx_23", w = {
|
|
100
|
+
subtitle: it,
|
|
101
|
+
header: lt,
|
|
102
|
+
text: at,
|
|
103
|
+
top: rt,
|
|
104
|
+
itemsBlock: dt
|
|
105
|
+
}, _t = "_typeTexts_3zlec_1", ut = "_block_3zlec_7", pt = "_active_3zlec_18", S = {
|
|
106
|
+
typeTexts: _t,
|
|
107
|
+
block: ut,
|
|
108
|
+
active: pt
|
|
109
|
+
}, ht = ["bold", "italic", "underline", "strike-through", "code"], H = (r) => {
|
|
110
|
+
const { typeText: e, setTypeText: i } = r;
|
|
111
|
+
return /* @__PURE__ */ t.jsx("div", { className: S.typeTexts, children: ht.map((s) => /* @__PURE__ */ t.jsx(
|
|
91
112
|
"div",
|
|
92
113
|
{
|
|
93
|
-
className:
|
|
94
|
-
[
|
|
114
|
+
className: Y(S.block, {
|
|
115
|
+
[S.active]: e === s
|
|
95
116
|
}),
|
|
96
|
-
onClick: () =>
|
|
117
|
+
onClick: () => i((n) => s),
|
|
97
118
|
children: /* @__PURE__ */ t.jsx(
|
|
98
|
-
|
|
119
|
+
p,
|
|
99
120
|
{
|
|
100
121
|
name: `text-${s}`,
|
|
101
|
-
fill:
|
|
122
|
+
fill: e === s ? "#252525" : "#757575",
|
|
102
123
|
width: 20,
|
|
103
124
|
height: 20
|
|
104
125
|
}
|
|
@@ -106,90 +127,89 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
106
127
|
},
|
|
107
128
|
String(s)
|
|
108
129
|
)) });
|
|
109
|
-
},
|
|
130
|
+
}, Ne = (r) => {
|
|
110
131
|
const {
|
|
111
|
-
typeText:
|
|
112
|
-
isActiveText:
|
|
132
|
+
typeText: e,
|
|
133
|
+
isActiveText: i,
|
|
113
134
|
setIsActiveText: s,
|
|
114
|
-
text:
|
|
115
|
-
setText:
|
|
135
|
+
text: n,
|
|
136
|
+
setText: u,
|
|
116
137
|
setTypeText: l,
|
|
117
|
-
title:
|
|
118
|
-
subtitle:
|
|
138
|
+
title: m,
|
|
139
|
+
subtitle: o = "Items"
|
|
119
140
|
} = r;
|
|
120
141
|
return /* @__PURE__ */ t.jsxs("div", { className: w.text, children: [
|
|
121
142
|
/* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
|
|
122
|
-
/* @__PURE__ */ t.jsx("h3", { className: w.title, children:
|
|
143
|
+
/* @__PURE__ */ t.jsx("h3", { className: w.title, children: m }),
|
|
123
144
|
/* @__PURE__ */ t.jsx(
|
|
124
|
-
|
|
145
|
+
N,
|
|
125
146
|
{
|
|
126
|
-
current:
|
|
127
|
-
onChange: (
|
|
147
|
+
current: i,
|
|
148
|
+
onChange: (a) => s((d) => a)
|
|
128
149
|
}
|
|
129
150
|
)
|
|
130
151
|
] }),
|
|
131
152
|
/* @__PURE__ */ t.jsxs("div", { className: w.itemsBlock, children: [
|
|
132
|
-
/* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children:
|
|
153
|
+
/* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: o }),
|
|
133
154
|
/* @__PURE__ */ t.jsx(
|
|
134
|
-
|
|
155
|
+
O,
|
|
135
156
|
{
|
|
136
|
-
onChange: (
|
|
137
|
-
value:
|
|
157
|
+
onChange: (a) => u((d) => a),
|
|
158
|
+
value: n,
|
|
138
159
|
maxLength: 150
|
|
139
160
|
}
|
|
140
161
|
),
|
|
141
162
|
/* @__PURE__ */ t.jsx(
|
|
142
|
-
|
|
163
|
+
H,
|
|
143
164
|
{
|
|
144
|
-
typeText:
|
|
165
|
+
typeText: e,
|
|
145
166
|
setTypeText: l
|
|
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
|
-
const { activeItem: n, setActiveItem: _, popupPosition: s } = r;
|
|
171
|
+
}, mt = "_subtitle_fsotk_1", xt = "_header_fsotk_8", gt = "_text_fsotk_9", bt = "_productsBlock_fsotk_10", kt = "_top_fsotk_22", ft = "_itemsBlock_fsotk_29", jt = "_typeTexts_fsotk_35", vt = "_block_fsotk_41", yt = "_active_fsotk_52", $t = "_products_fsotk_10", wt = "_product_fsotk_10", Bt = "_button_fsotk_70", Nt = "_image_fsotk_80", Ct = "_info_fsotk_87", Tt = "_name_fsotk_98", Pt = "_buttons_fsotk_102", It = "_modal_fsotk_108", g = {
|
|
172
|
+
subtitle: mt,
|
|
173
|
+
header: xt,
|
|
174
|
+
text: gt,
|
|
175
|
+
productsBlock: bt,
|
|
176
|
+
top: kt,
|
|
177
|
+
itemsBlock: ft,
|
|
178
|
+
typeTexts: jt,
|
|
179
|
+
block: vt,
|
|
180
|
+
active: yt,
|
|
181
|
+
products: $t,
|
|
182
|
+
product: wt,
|
|
183
|
+
button: Bt,
|
|
184
|
+
image: Nt,
|
|
185
|
+
info: Ct,
|
|
186
|
+
name: Tt,
|
|
187
|
+
buttons: Pt,
|
|
188
|
+
modal: It
|
|
189
|
+
}, St = (r) => {
|
|
190
|
+
const { activeItem: e, setActiveItem: i, popupPosition: s } = r;
|
|
171
191
|
return /* @__PURE__ */ t.jsxs(
|
|
172
192
|
"div",
|
|
173
193
|
{
|
|
174
|
-
className:
|
|
175
|
-
onClick: (
|
|
176
|
-
|
|
194
|
+
className: g.modal,
|
|
195
|
+
onClick: (n) => {
|
|
196
|
+
n.stopPropagation();
|
|
177
197
|
},
|
|
178
198
|
style: {
|
|
179
199
|
top: `${s.top}px`,
|
|
180
200
|
left: `${s.left}px`
|
|
181
201
|
},
|
|
182
202
|
children: [
|
|
183
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
184
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
203
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.top, children: [
|
|
204
|
+
/* @__PURE__ */ t.jsx("h3", { children: e.name }),
|
|
185
205
|
/* @__PURE__ */ t.jsx(
|
|
186
|
-
|
|
206
|
+
p,
|
|
187
207
|
{
|
|
188
208
|
name: "x",
|
|
189
209
|
height: 20,
|
|
190
210
|
width: 20,
|
|
191
211
|
hoverable: !0,
|
|
192
|
-
onClick: () =>
|
|
212
|
+
onClick: () => i(null)
|
|
193
213
|
}
|
|
194
214
|
)
|
|
195
215
|
] }),
|
|
@@ -200,107 +220,156 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
200
220
|
]
|
|
201
221
|
}
|
|
202
222
|
);
|
|
203
|
-
},
|
|
223
|
+
}, At = "_other_jqtww_1", Lt = "_subtitle_jqtww_7", R = {
|
|
224
|
+
other: At,
|
|
225
|
+
subtitle: Lt
|
|
226
|
+
}, zt = (r) => {
|
|
227
|
+
const { isItem: e, setIsItem: i, title: s = "Other", label: n } = r;
|
|
228
|
+
return /* @__PURE__ */ t.jsxs("div", { className: R.other, children: [
|
|
229
|
+
/* @__PURE__ */ t.jsx("h5", { className: R.subtitle, children: s }),
|
|
230
|
+
/* @__PURE__ */ t.jsx(
|
|
231
|
+
N,
|
|
232
|
+
{
|
|
233
|
+
current: e,
|
|
234
|
+
onChange: (u) => i((l) => u),
|
|
235
|
+
label: n,
|
|
236
|
+
hasBackground: !0,
|
|
237
|
+
paddingless: !1
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
] });
|
|
241
|
+
}, Ce = (r) => {
|
|
204
242
|
const {
|
|
205
|
-
isActiveItems:
|
|
206
|
-
setIsActiveItems:
|
|
243
|
+
isActiveItems: e,
|
|
244
|
+
setIsActiveItems: i,
|
|
207
245
|
items: s,
|
|
208
|
-
setItems:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
246
|
+
setItems: n,
|
|
247
|
+
other: u,
|
|
248
|
+
title: l,
|
|
249
|
+
subtitle: m,
|
|
250
|
+
editable: o = !0,
|
|
251
|
+
draggable: a = !1,
|
|
252
|
+
withImage: d = !1,
|
|
253
|
+
deletable: v = !0,
|
|
254
|
+
addable: y = !0,
|
|
255
|
+
itemsType: h,
|
|
256
|
+
itemsPlaceholder: F = "",
|
|
257
|
+
itemsOptions: L
|
|
258
|
+
} = r, [z, $] = k.useState(null), [G, M] = k.useState({
|
|
217
259
|
top: 0,
|
|
218
260
|
left: 0
|
|
219
261
|
});
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
262
|
+
k.useEffect(() => {
|
|
263
|
+
const c = () => {
|
|
264
|
+
$(null);
|
|
223
265
|
};
|
|
224
|
-
return document.body.addEventListener("click",
|
|
225
|
-
|
|
266
|
+
return document.body.addEventListener("click", c), $(null), () => {
|
|
267
|
+
$(null), document.body.removeEventListener("click", c);
|
|
226
268
|
};
|
|
227
269
|
}, []);
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
top:
|
|
234
|
-
left:
|
|
235
|
-
}),
|
|
270
|
+
const q = (c, _) => {
|
|
271
|
+
c.stopPropagation();
|
|
272
|
+
const f = c.target.getBoundingClientRect(), C = 100, T = window.innerHeight;
|
|
273
|
+
let b = f.top + window.scrollY;
|
|
274
|
+
b + C > T && (b = T - C - 20), M({
|
|
275
|
+
top: b - 80,
|
|
276
|
+
left: f.left - 30
|
|
277
|
+
}), $(_);
|
|
236
278
|
};
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
279
|
+
function D(c) {
|
|
280
|
+
if (d && !c)
|
|
281
|
+
return /* @__PURE__ */ t.jsx(
|
|
282
|
+
p,
|
|
283
|
+
{
|
|
284
|
+
name: "image",
|
|
285
|
+
width: 16,
|
|
286
|
+
height: 16,
|
|
287
|
+
fill: "#757575"
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
return /* @__PURE__ */ t.jsxs("div", { className: g.productsBlock, children: [
|
|
292
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.top, children: [
|
|
293
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: g.title, children: l }),
|
|
294
|
+
e && /* @__PURE__ */ t.jsx(
|
|
295
|
+
N,
|
|
242
296
|
{
|
|
243
|
-
current:
|
|
244
|
-
onChange: (
|
|
297
|
+
current: e,
|
|
298
|
+
onChange: (c) => i == null ? void 0 : i((_) => c)
|
|
245
299
|
}
|
|
246
300
|
)
|
|
247
301
|
] }),
|
|
248
|
-
|
|
249
|
-
|
|
302
|
+
z && o && /* @__PURE__ */ t.jsx(
|
|
303
|
+
St,
|
|
250
304
|
{
|
|
251
|
-
activeItem:
|
|
252
|
-
setActiveItem:
|
|
253
|
-
popupPosition:
|
|
305
|
+
activeItem: z,
|
|
306
|
+
setActiveItem: $,
|
|
307
|
+
popupPosition: G
|
|
254
308
|
}
|
|
255
309
|
),
|
|
256
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
257
|
-
|
|
258
|
-
s.map((
|
|
310
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.products, children: [
|
|
311
|
+
m && /* @__PURE__ */ t.jsx("h5", { className: g.subtitle, children: m }),
|
|
312
|
+
s.map((c) => /* @__PURE__ */ t.jsxs(
|
|
259
313
|
"div",
|
|
260
314
|
{
|
|
261
|
-
className:
|
|
315
|
+
className: g.product,
|
|
262
316
|
children: [
|
|
263
|
-
|
|
264
|
-
|
|
317
|
+
a && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
318
|
+
p,
|
|
265
319
|
{
|
|
266
320
|
name: "drag",
|
|
267
321
|
hoverable: !0,
|
|
268
322
|
width: 20,
|
|
269
323
|
height: 20
|
|
270
324
|
}
|
|
325
|
+
) }),
|
|
326
|
+
h === "select" && /* @__PURE__ */ t.jsx(
|
|
327
|
+
I,
|
|
328
|
+
{
|
|
329
|
+
onChange: (_) => {
|
|
330
|
+
n((f) => [...f].map((b) => b.id === c.id ? {
|
|
331
|
+
...c,
|
|
332
|
+
name: _
|
|
333
|
+
} : b));
|
|
334
|
+
},
|
|
335
|
+
value: c.name,
|
|
336
|
+
options: L,
|
|
337
|
+
leftAddon: D(c.image)
|
|
338
|
+
}
|
|
271
339
|
),
|
|
272
|
-
/* @__PURE__ */ t.
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
{
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
/* @__PURE__ */ t.
|
|
286
|
-
|
|
287
|
-
|
|
340
|
+
h === "input" && /* @__PURE__ */ t.jsx(
|
|
341
|
+
A,
|
|
342
|
+
{
|
|
343
|
+
onChange: (_) => {
|
|
344
|
+
n((f) => [...f].map((b) => b.id === c.id ? {
|
|
345
|
+
...c,
|
|
346
|
+
name: _
|
|
347
|
+
} : b));
|
|
348
|
+
},
|
|
349
|
+
value: c.name,
|
|
350
|
+
placeholder: F
|
|
351
|
+
}
|
|
352
|
+
),
|
|
353
|
+
h === "image" && /* @__PURE__ */ t.jsx(J, {}),
|
|
354
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.buttons, children: [
|
|
355
|
+
o && /* @__PURE__ */ t.jsx(
|
|
356
|
+
p,
|
|
288
357
|
{
|
|
289
358
|
name: "sliders",
|
|
290
359
|
hoverable: !0,
|
|
291
360
|
width: 20,
|
|
292
361
|
height: 20,
|
|
293
|
-
onClick: (
|
|
294
|
-
|
|
362
|
+
onClick: (_) => {
|
|
363
|
+
q(_, c);
|
|
295
364
|
}
|
|
296
365
|
}
|
|
297
366
|
),
|
|
298
|
-
/* @__PURE__ */ t.jsx(
|
|
299
|
-
|
|
367
|
+
v && /* @__PURE__ */ t.jsx(
|
|
368
|
+
p,
|
|
300
369
|
{
|
|
301
370
|
name: "trash",
|
|
302
371
|
hoverable: !0,
|
|
303
|
-
onClick: () =>
|
|
372
|
+
onClick: () => n((_) => _.filter((f) => f.id !== c.id)),
|
|
304
373
|
width: 20,
|
|
305
374
|
height: 20,
|
|
306
375
|
fill: "#C12A2A"
|
|
@@ -309,24 +378,29 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
309
378
|
] })
|
|
310
379
|
]
|
|
311
380
|
},
|
|
312
|
-
|
|
381
|
+
c.id
|
|
313
382
|
)),
|
|
314
|
-
/* @__PURE__ */ t.jsxs(
|
|
315
|
-
|
|
383
|
+
y && /* @__PURE__ */ t.jsxs(
|
|
384
|
+
E,
|
|
316
385
|
{
|
|
317
|
-
className:
|
|
386
|
+
className: g.button,
|
|
318
387
|
size: "s",
|
|
319
|
-
onClick: () =>
|
|
320
|
-
const
|
|
321
|
-
return
|
|
322
|
-
name:
|
|
323
|
-
id:
|
|
324
|
-
})
|
|
388
|
+
onClick: () => n((c) => {
|
|
389
|
+
const _ = [...c];
|
|
390
|
+
return h === "select" ? _.push({
|
|
391
|
+
name: L[0] || "",
|
|
392
|
+
id: P()
|
|
393
|
+
}) : h === "input" ? _.push({
|
|
394
|
+
name: "",
|
|
395
|
+
id: P()
|
|
396
|
+
}) : _.push({
|
|
397
|
+
id: P()
|
|
398
|
+
}), _;
|
|
325
399
|
}),
|
|
326
400
|
children: [
|
|
327
401
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
328
402
|
/* @__PURE__ */ t.jsx(
|
|
329
|
-
|
|
403
|
+
p,
|
|
330
404
|
{
|
|
331
405
|
name: "plus",
|
|
332
406
|
width: 16,
|
|
@@ -337,74 +411,62 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
337
411
|
}
|
|
338
412
|
)
|
|
339
413
|
] }),
|
|
340
|
-
|
|
341
|
-
/* @__PURE__ */ t.jsx("h5", { className: c.subtitle, children: "Other" }),
|
|
342
|
-
/* @__PURE__ */ t.jsx(
|
|
343
|
-
f,
|
|
344
|
-
{
|
|
345
|
-
current: o,
|
|
346
|
-
onChange: (i) => l == null ? void 0 : l((x) => i),
|
|
347
|
-
label: "Product Stats",
|
|
348
|
-
hasBackground: !0,
|
|
349
|
-
paddingless: !1
|
|
350
|
-
}
|
|
351
|
-
)
|
|
352
|
-
] })
|
|
414
|
+
u !== void 0 && /* @__PURE__ */ t.jsx(zt, { ...u })
|
|
353
415
|
] });
|
|
354
|
-
},
|
|
355
|
-
subtitle:
|
|
356
|
-
header:
|
|
357
|
-
text:
|
|
358
|
-
productsBlock:
|
|
359
|
-
buttonsBlock:
|
|
360
|
-
top:
|
|
361
|
-
itemsBlock:
|
|
362
|
-
typeTexts:
|
|
363
|
-
block:
|
|
364
|
-
active:
|
|
365
|
-
products:
|
|
366
|
-
product:
|
|
367
|
-
button:
|
|
368
|
-
image:
|
|
369
|
-
info:
|
|
370
|
-
name:
|
|
371
|
-
buttons:
|
|
372
|
-
modal:
|
|
373
|
-
other:
|
|
374
|
-
options:
|
|
375
|
-
},
|
|
376
|
-
const { activeButton:
|
|
416
|
+
}, Rt = "_subtitle_41klp_1", Ot = "_header_41klp_8", Et = "_text_41klp_9", Ht = "_productsBlock_41klp_10", Ft = "_buttonsBlock_41klp_11", Gt = "_top_41klp_21", Mt = "_itemsBlock_41klp_28", qt = "_typeTexts_41klp_34", Dt = "_block_41klp_40", Yt = "_active_41klp_51", Jt = "_products_41klp_10", Kt = "_product_41klp_10", Qt = "_button_41klp_11", Ut = "_image_41klp_79", Vt = "_info_41klp_86", Wt = "_name_41klp_97", Xt = "_buttons_41klp_11", Zt = "_modal_41klp_107", te = "_other_41klp_124", ee = "_options_41klp_130", j = {
|
|
417
|
+
subtitle: Rt,
|
|
418
|
+
header: Ot,
|
|
419
|
+
text: Et,
|
|
420
|
+
productsBlock: Ht,
|
|
421
|
+
buttonsBlock: Ft,
|
|
422
|
+
top: Gt,
|
|
423
|
+
itemsBlock: Mt,
|
|
424
|
+
typeTexts: qt,
|
|
425
|
+
block: Dt,
|
|
426
|
+
active: Yt,
|
|
427
|
+
products: Jt,
|
|
428
|
+
product: Kt,
|
|
429
|
+
button: Qt,
|
|
430
|
+
image: Ut,
|
|
431
|
+
info: Vt,
|
|
432
|
+
name: Wt,
|
|
433
|
+
buttons: Xt,
|
|
434
|
+
modal: Zt,
|
|
435
|
+
other: te,
|
|
436
|
+
options: ee
|
|
437
|
+
}, se = (r) => {
|
|
438
|
+
const { activeButton: e, setActiveButton: i, popupPosition: s } = r, [n, u] = k.useState(e.typeText), [l, m] = k.useState(e.destination), [o, a] = k.useState(e.link || "");
|
|
377
439
|
return /* @__PURE__ */ t.jsxs(
|
|
378
440
|
"div",
|
|
379
441
|
{
|
|
380
|
-
className:
|
|
381
|
-
onClick: (
|
|
382
|
-
|
|
442
|
+
className: j.modal,
|
|
443
|
+
onClick: (d) => {
|
|
444
|
+
d.stopPropagation();
|
|
383
445
|
},
|
|
384
446
|
style: {
|
|
385
447
|
top: `${s.top}px`,
|
|
386
448
|
left: `${s.left}px`
|
|
387
449
|
},
|
|
388
450
|
children: [
|
|
389
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
390
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
451
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.top, children: [
|
|
452
|
+
/* @__PURE__ */ t.jsx("h3", { children: e.type }),
|
|
391
453
|
/* @__PURE__ */ t.jsx(
|
|
392
|
-
|
|
454
|
+
p,
|
|
393
455
|
{
|
|
394
456
|
name: "x",
|
|
395
457
|
height: 20,
|
|
396
458
|
width: 20,
|
|
397
459
|
hoverable: !0,
|
|
398
|
-
onClick: () =>
|
|
460
|
+
onClick: () => i(null)
|
|
399
461
|
}
|
|
400
462
|
)
|
|
401
463
|
] }),
|
|
402
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
464
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.options, children: [
|
|
403
465
|
/* @__PURE__ */ t.jsx(
|
|
404
466
|
I,
|
|
405
467
|
{
|
|
406
468
|
label: "Destination",
|
|
407
|
-
onChange: (
|
|
469
|
+
onChange: (d) => m(d),
|
|
408
470
|
options: ["Go to Page", "Open Link"],
|
|
409
471
|
value: l
|
|
410
472
|
}
|
|
@@ -421,21 +483,21 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
421
483
|
) : /* @__PURE__ */ t.jsx(
|
|
422
484
|
A,
|
|
423
485
|
{
|
|
424
|
-
onChange: (
|
|
425
|
-
value:
|
|
486
|
+
onChange: (d) => a(d),
|
|
487
|
+
value: o,
|
|
426
488
|
placeholder: "https://",
|
|
427
489
|
label: "Link"
|
|
428
490
|
}
|
|
429
491
|
),
|
|
430
492
|
/* @__PURE__ */ t.jsx(
|
|
431
|
-
|
|
493
|
+
N,
|
|
432
494
|
{
|
|
433
495
|
current: !1,
|
|
434
496
|
label: "Open in new tab"
|
|
435
497
|
}
|
|
436
498
|
),
|
|
437
499
|
/* @__PURE__ */ t.jsx(
|
|
438
|
-
|
|
500
|
+
O,
|
|
439
501
|
{
|
|
440
502
|
onChange: () => {
|
|
441
503
|
},
|
|
@@ -445,146 +507,186 @@ const O = "_wrapper_o1bnv_2", F = "_alignmentBlock_o1bnv_8", G = "_title_o1bnv_1
|
|
|
445
507
|
}
|
|
446
508
|
),
|
|
447
509
|
/* @__PURE__ */ t.jsx(
|
|
448
|
-
|
|
510
|
+
H,
|
|
449
511
|
{
|
|
450
|
-
typeText:
|
|
451
|
-
setTypeText:
|
|
512
|
+
typeText: n,
|
|
513
|
+
setTypeText: u
|
|
452
514
|
}
|
|
453
515
|
)
|
|
454
516
|
] })
|
|
455
517
|
]
|
|
456
518
|
}
|
|
457
519
|
);
|
|
458
|
-
},
|
|
459
|
-
|
|
520
|
+
}, ne = "_subtitle_1y5sw_1", oe = "_header_1y5sw_8", ce = "_text_1y5sw_9", ie = "_productsBlock_1y5sw_10", le = "_buttonsBlock_1y5sw_11", ae = "_top_1y5sw_22", re = "_itemsBlock_1y5sw_29", de = "_typeTexts_1y5sw_35", _e = "_block_1y5sw_41", ue = "_active_1y5sw_52", pe = "_products_1y5sw_10", he = "_product_1y5sw_10", me = "_button_1y5sw_11", xe = "_image_1y5sw_80", ge = "_info_1y5sw_87", be = "_name_1y5sw_98", ke = "_buttons_1y5sw_11", fe = "_modal_1y5sw_108", je = "_other_1y5sw_125", ve = "_options_1y5sw_131", B = {
|
|
521
|
+
subtitle: ne,
|
|
522
|
+
header: oe,
|
|
523
|
+
text: ce,
|
|
524
|
+
productsBlock: ie,
|
|
525
|
+
buttonsBlock: le,
|
|
526
|
+
top: ae,
|
|
527
|
+
itemsBlock: re,
|
|
528
|
+
typeTexts: de,
|
|
529
|
+
block: _e,
|
|
530
|
+
active: ue,
|
|
531
|
+
products: pe,
|
|
532
|
+
product: he,
|
|
533
|
+
button: me,
|
|
534
|
+
image: xe,
|
|
535
|
+
info: ge,
|
|
536
|
+
name: be,
|
|
537
|
+
buttons: ke,
|
|
538
|
+
modal: fe,
|
|
539
|
+
other: je,
|
|
540
|
+
options: ve
|
|
541
|
+
}, ye = (r) => {
|
|
542
|
+
const { buttons: e, setButtons: i } = r, [s, n] = k.useState(null), [u, l] = k.useState({
|
|
460
543
|
top: 0,
|
|
461
544
|
left: 0
|
|
462
545
|
});
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
|
|
546
|
+
k.useEffect(() => {
|
|
547
|
+
const o = () => {
|
|
548
|
+
n(null);
|
|
466
549
|
};
|
|
467
|
-
return document.body.addEventListener("click",
|
|
468
|
-
|
|
550
|
+
return document.body.addEventListener("click", o), n(null), () => {
|
|
551
|
+
n(null), document.body.removeEventListener("click", o);
|
|
469
552
|
};
|
|
470
553
|
}, []);
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
const
|
|
474
|
-
let
|
|
475
|
-
|
|
476
|
-
top:
|
|
477
|
-
left:
|
|
478
|
-
}),
|
|
554
|
+
const m = (o, a) => {
|
|
555
|
+
o.stopPropagation();
|
|
556
|
+
const d = o.target.getBoundingClientRect(), v = 490, y = window.innerHeight;
|
|
557
|
+
let h = d.top + window.scrollY;
|
|
558
|
+
h + v > y && (h = y - v - 20), l({
|
|
559
|
+
top: h,
|
|
560
|
+
left: d.left - 30
|
|
561
|
+
}), n(a);
|
|
479
562
|
};
|
|
480
|
-
return /* @__PURE__ */ t.
|
|
481
|
-
/* @__PURE__ */ t.
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
onClick: (m) => {
|
|
511
|
-
u(m, e);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
),
|
|
515
|
-
/* @__PURE__ */ t.jsx(
|
|
516
|
-
a,
|
|
517
|
-
{
|
|
518
|
-
name: "trash",
|
|
519
|
-
hoverable: !0,
|
|
520
|
-
onClick: () => d((m) => m.filter((y) => y.id !== e.id)),
|
|
521
|
-
width: 20,
|
|
522
|
-
height: 20,
|
|
523
|
-
fill: "#C12A2A"
|
|
563
|
+
return /* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
|
|
564
|
+
/* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: "Button Type" }),
|
|
565
|
+
e.map((o) => /* @__PURE__ */ t.jsxs(
|
|
566
|
+
"div",
|
|
567
|
+
{
|
|
568
|
+
className: B.product,
|
|
569
|
+
children: [
|
|
570
|
+
/* @__PURE__ */ t.jsx(
|
|
571
|
+
I,
|
|
572
|
+
{
|
|
573
|
+
onChange: (a) => {
|
|
574
|
+
i((d) => [...d].map((h) => h.id === o.id ? {
|
|
575
|
+
...o,
|
|
576
|
+
type: a
|
|
577
|
+
} : h));
|
|
578
|
+
},
|
|
579
|
+
value: o.type,
|
|
580
|
+
options: ["Primary", "Secondary", "Tertiary"]
|
|
581
|
+
}
|
|
582
|
+
),
|
|
583
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
|
|
584
|
+
/* @__PURE__ */ t.jsx(
|
|
585
|
+
p,
|
|
586
|
+
{
|
|
587
|
+
name: "sliders",
|
|
588
|
+
hoverable: !0,
|
|
589
|
+
width: 20,
|
|
590
|
+
height: 20,
|
|
591
|
+
onClick: (a) => {
|
|
592
|
+
m(a, o);
|
|
524
593
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
]
|
|
528
|
-
},
|
|
529
|
-
e.id
|
|
530
|
-
)),
|
|
531
|
-
o && /* @__PURE__ */ t.jsx(
|
|
532
|
-
Jt,
|
|
533
|
-
{
|
|
534
|
-
activeButton: o,
|
|
535
|
-
setActiveButton: l,
|
|
536
|
-
popupPosition: p
|
|
537
|
-
}
|
|
538
|
-
),
|
|
539
|
-
/* @__PURE__ */ t.jsxs(
|
|
540
|
-
L,
|
|
541
|
-
{
|
|
542
|
-
className: h.button,
|
|
543
|
-
size: "s",
|
|
544
|
-
onClick: () => d((e) => {
|
|
545
|
-
const m = [...e];
|
|
546
|
-
return m.push({
|
|
547
|
-
type: "Primary",
|
|
548
|
-
id: z(),
|
|
549
|
-
typeText: "bold",
|
|
550
|
-
destination: "Go to Page"
|
|
551
|
-
}), m;
|
|
552
|
-
}),
|
|
553
|
-
children: [
|
|
554
|
-
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
594
|
+
}
|
|
595
|
+
),
|
|
555
596
|
/* @__PURE__ */ t.jsx(
|
|
556
|
-
|
|
597
|
+
p,
|
|
557
598
|
{
|
|
558
|
-
name: "
|
|
559
|
-
|
|
560
|
-
|
|
599
|
+
name: "trash",
|
|
600
|
+
hoverable: !0,
|
|
601
|
+
onClick: () => i((a) => a.filter((d) => d.id !== o.id)),
|
|
602
|
+
width: 20,
|
|
603
|
+
height: 20,
|
|
604
|
+
fill: "#C12A2A"
|
|
561
605
|
}
|
|
562
606
|
)
|
|
563
|
-
]
|
|
607
|
+
] })
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
o.id
|
|
611
|
+
)),
|
|
612
|
+
s && /* @__PURE__ */ t.jsx(
|
|
613
|
+
se,
|
|
614
|
+
{
|
|
615
|
+
activeButton: s,
|
|
616
|
+
setActiveButton: n,
|
|
617
|
+
popupPosition: u
|
|
618
|
+
}
|
|
619
|
+
),
|
|
620
|
+
/* @__PURE__ */ t.jsxs(
|
|
621
|
+
E,
|
|
622
|
+
{
|
|
623
|
+
className: B.button,
|
|
624
|
+
size: "s",
|
|
625
|
+
onClick: () => i((o) => {
|
|
626
|
+
const a = [...o];
|
|
627
|
+
return a.push({
|
|
628
|
+
type: "Primary",
|
|
629
|
+
id: P(),
|
|
630
|
+
typeText: "bold",
|
|
631
|
+
destination: "Go to Page"
|
|
632
|
+
}), a;
|
|
633
|
+
}),
|
|
634
|
+
children: [
|
|
635
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
636
|
+
/* @__PURE__ */ t.jsx(
|
|
637
|
+
p,
|
|
638
|
+
{
|
|
639
|
+
name: "plus",
|
|
640
|
+
width: 16,
|
|
641
|
+
height: 16
|
|
642
|
+
}
|
|
643
|
+
)
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
)
|
|
647
|
+
] });
|
|
648
|
+
}, Te = (r) => {
|
|
649
|
+
const { isActiveButtons: e, setIsActiveButtons: i, buttons: s, setButtons: n } = r;
|
|
650
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: j.buttonsBlock, children: [
|
|
651
|
+
/* @__PURE__ */ t.jsxs("div", { className: j.top, children: [
|
|
652
|
+
/* @__PURE__ */ t.jsx("h3", { className: j.title, children: "Buttons" }),
|
|
653
|
+
/* @__PURE__ */ t.jsx(
|
|
654
|
+
N,
|
|
655
|
+
{
|
|
656
|
+
current: e,
|
|
657
|
+
onChange: (u) => i((l) => u)
|
|
564
658
|
}
|
|
565
659
|
)
|
|
566
|
-
] })
|
|
660
|
+
] }),
|
|
661
|
+
/* @__PURE__ */ t.jsx(
|
|
662
|
+
ye,
|
|
663
|
+
{
|
|
664
|
+
buttons: s,
|
|
665
|
+
setButtons: n
|
|
666
|
+
}
|
|
667
|
+
)
|
|
567
668
|
] }) });
|
|
568
669
|
};
|
|
569
670
|
export {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
671
|
+
E as Button,
|
|
672
|
+
ye as ButtonTypeSettings,
|
|
673
|
+
Te as ButtonsSettings,
|
|
674
|
+
Se as Checkbox,
|
|
675
|
+
J as ChooseImage,
|
|
676
|
+
Ae as ChooseImageModal,
|
|
677
|
+
Le as ColorPicker,
|
|
678
|
+
p as Icon,
|
|
577
679
|
A as Input,
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
680
|
+
Ce as ItemsSettings,
|
|
681
|
+
Be as LayoutSettings,
|
|
682
|
+
ze as Modal,
|
|
683
|
+
Re as Picker,
|
|
684
|
+
Oe as Radio,
|
|
583
685
|
I as Select,
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
686
|
+
Ee as Submodal,
|
|
687
|
+
N as Switch,
|
|
688
|
+
Ne as TextSettings,
|
|
689
|
+
O as Textarea,
|
|
690
|
+
He as Tip,
|
|
691
|
+
H as TypeTexts
|
|
590
692
|
};
|