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