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