@billgangcom/theme-lib 1.6.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/ui.es.js CHANGED
@@ -1,19 +1,19 @@
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 = [
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,82 +23,103 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
23
23
  "bottomLeft",
24
24
  "bottom",
25
25
  "bottomRight"
26
- ], nt = ["left", "top", "right", "bottom"], ke = (_) => {
27
- const { alignment: i, padding: a, setPadding: s, setAlignment: n } = _;
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
+ }
28
46
  return /* @__PURE__ */ t.jsxs("div", { className: x.layout, children: [
29
47
  /* @__PURE__ */ t.jsx("h3", { className: x.title, children: "Layout" }),
30
48
  /* @__PURE__ */ t.jsxs("div", { className: x.alignmentBlock, children: [
31
49
  /* @__PURE__ */ t.jsx("h5", { className: x.subtitle, children: "Alignment" }),
32
50
  /* @__PURE__ */ t.jsxs("div", { className: x.alignmentContent, children: [
33
- /* @__PURE__ */ t.jsx("div", { className: x.alignments, children: st.map((c) => /* @__PURE__ */ t.jsxs(
51
+ /* @__PURE__ */ t.jsx("div", { className: x.alignments, children: ot.map((l) => /* @__PURE__ */ t.jsxs(
34
52
  "div",
35
53
  {
36
54
  onClick: () => {
37
- n((u) => c);
55
+ n((m) => l);
38
56
  },
39
57
  className: x.alignment,
40
58
  children: [
41
- c !== i && /* @__PURE__ */ t.jsx("div", { className: x.circle }),
42
- c === i && /* @__PURE__ */ t.jsx(
59
+ l !== e && /* @__PURE__ */ t.jsx("div", { className: x.circle }),
60
+ l === e && /* @__PURE__ */ t.jsx(
43
61
  p,
44
62
  {
45
- name: "text-align-left",
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
- c
71
+ l
52
72
  )) }),
53
- /* @__PURE__ */ t.jsx("div", { className: x.paddings, children: nt.map((c) => /* @__PURE__ */ t.jsxs("label", { className: x.padding, children: [
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-${c}`,
77
+ name: `align-${l}`,
58
78
  width: 20,
59
79
  height: 20
60
80
  }
61
81
  ) }),
62
82
  /* @__PURE__ */ t.jsx(
63
- S,
83
+ A,
64
84
  {
65
85
  type: "text",
66
- value: String(a[c]),
67
- onChange: (u) => s((h) => ({
68
- ...h,
69
- [c]: Number(u)
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
- }, 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(
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: D(A.block, {
94
- [A.active]: i === s
114
+ className: Y(S.block, {
115
+ [S.active]: e === s
95
116
  }),
96
- onClick: () => a((n) => s),
117
+ onClick: () => i((n) => s),
97
118
  children: /* @__PURE__ */ t.jsx(
98
119
  p,
99
120
  {
100
121
  name: `text-${s}`,
101
- fill: i === s ? "#252525" : "#757575",
122
+ fill: e === s ? "#252525" : "#757575",
102
123
  width: 20,
103
124
  height: 20
104
125
  }
@@ -106,72 +127,71 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
106
127
  },
107
128
  String(s)
108
129
  )) });
109
- }, fe = (_) => {
130
+ }, Ne = (r) => {
110
131
  const {
111
- typeText: i,
112
- isActiveText: a,
132
+ typeText: e,
133
+ isActiveText: i,
113
134
  setIsActiveText: s,
114
135
  text: n,
115
- setText: c,
116
- setTypeText: u,
117
- title: h,
136
+ setText: u,
137
+ setTypeText: l,
138
+ title: m,
118
139
  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 }),
140
+ } = r;
141
+ return /* @__PURE__ */ t.jsxs("div", { className: w.text, children: [
142
+ /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
143
+ /* @__PURE__ */ t.jsx("h3", { className: w.title, children: m }),
123
144
  /* @__PURE__ */ t.jsx(
124
- C,
145
+ N,
125
146
  {
126
- current: a,
127
- onChange: (l) => s((r) => l)
147
+ current: i,
148
+ onChange: (a) => s((d) => a)
128
149
  }
129
150
  )
130
151
  ] }),
131
- /* @__PURE__ */ t.jsxs("div", { className: $.itemsBlock, children: [
132
- /* @__PURE__ */ t.jsx("h5", { className: $.subtitle, children: o }),
152
+ /* @__PURE__ */ t.jsxs("div", { className: w.itemsBlock, children: [
153
+ /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: o }),
133
154
  /* @__PURE__ */ t.jsx(
134
155
  O,
135
156
  {
136
- onChange: (l) => c((r) => l),
157
+ onChange: (a) => u((d) => a),
137
158
  value: n,
138
159
  maxLength: 150
139
160
  }
140
161
  ),
141
162
  /* @__PURE__ */ t.jsx(
142
- E,
163
+ H,
143
164
  {
144
- typeText: i,
145
- setTypeText: u
165
+ typeText: e,
166
+ setTypeText: l
146
167
  }
147
168
  )
148
169
  ] })
149
170
  ] });
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,
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,
158
179
  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 } = _;
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: m.modal,
194
+ className: g.modal,
175
195
  onClick: (n) => {
176
196
  n.stopPropagation();
177
197
  },
@@ -180,8 +200,8 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
180
200
  left: `${s.left}px`
181
201
  },
182
202
  children: [
183
- /* @__PURE__ */ t.jsxs("div", { className: m.top, children: [
184
- /* @__PURE__ */ t.jsx("h3", { children: i.name }),
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
  {
@@ -189,7 +209,7 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
189
209
  height: 20,
190
210
  width: 20,
191
211
  hoverable: !0,
192
- onClick: () => a(null)
212
+ onClick: () => i(null)
193
213
  }
194
214
  )
195
215
  ] }),
@@ -200,45 +220,64 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
200
220
  ]
201
221
  }
202
222
  );
203
- }, we = (_) => {
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: i,
206
- setIsActiveItems: a,
243
+ isActiveItems: e,
244
+ setIsActiveItems: i,
207
245
  items: s,
208
246
  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 = "",
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 = "",
218
257
  itemsOptions: L
219
- } = _, [z, w] = y.useState(null), [H, F] = y.useState({
258
+ } = r, [z, $] = k.useState(null), [G, M] = k.useState({
220
259
  top: 0,
221
260
  left: 0
222
261
  });
223
- y.useEffect(() => {
224
- const e = () => {
225
- w(null);
262
+ k.useEffect(() => {
263
+ const c = () => {
264
+ $(null);
226
265
  };
227
- return document.body.addEventListener("click", e), w(null), () => {
228
- w(null), document.body.removeEventListener("click", e);
266
+ return document.body.addEventListener("click", c), $(null), () => {
267
+ $(null), document.body.removeEventListener("click", c);
229
268
  };
230
269
  }, []);
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);
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
+ }), $(_);
239
278
  };
240
- function M(e) {
241
- if (f && !e)
279
+ function D(c) {
280
+ if (d && !c)
242
281
  return /* @__PURE__ */ t.jsx(
243
282
  p,
244
283
  {
@@ -249,33 +288,33 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
249
288
  }
250
289
  );
251
290
  }
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 }),
255
- /* @__PURE__ */ t.jsx(
256
- C,
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,
257
296
  {
258
- current: i,
259
- onChange: (e) => a((d) => e)
297
+ current: e,
298
+ onChange: (c) => i == null ? void 0 : i((_) => c)
260
299
  }
261
300
  )
262
301
  ] }),
263
- z && l && /* @__PURE__ */ t.jsx(
264
- It,
302
+ z && o && /* @__PURE__ */ t.jsx(
303
+ St,
265
304
  {
266
305
  activeItem: z,
267
- setActiveItem: w,
268
- popupPosition: H
306
+ setActiveItem: $,
307
+ popupPosition: G
269
308
  }
270
309
  ),
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(
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(
274
313
  "div",
275
314
  {
276
- className: m.product,
315
+ className: g.product,
277
316
  children: [
278
- r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
317
+ a && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
279
318
  p,
280
319
  {
281
320
  name: "drag",
@@ -284,53 +323,53 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
284
323
  height: 20
285
324
  }
286
325
  ) }),
287
- b === "select" && /* @__PURE__ */ t.jsx(
326
+ h === "select" && /* @__PURE__ */ t.jsx(
288
327
  I,
289
328
  {
290
- onChange: (d) => {
291
- n((j) => [...j].map((g) => g.id === e.id ? {
292
- ...e,
293
- name: d
294
- } : g));
329
+ onChange: (_) => {
330
+ n((f) => [...f].map((b) => b.id === c.id ? {
331
+ ...c,
332
+ name: _
333
+ } : b));
295
334
  },
296
- value: e.name,
335
+ value: c.name,
297
336
  options: L,
298
- leftAddon: M(e.image)
337
+ leftAddon: D(c.image)
299
338
  }
300
339
  ),
301
- b === "input" && /* @__PURE__ */ t.jsx(
302
- S,
340
+ h === "input" && /* @__PURE__ */ t.jsx(
341
+ A,
303
342
  {
304
- onChange: (d) => {
305
- n((j) => [...j].map((g) => g.id === e.id ? {
306
- ...e,
307
- name: d
308
- } : g));
343
+ onChange: (_) => {
344
+ n((f) => [...f].map((b) => b.id === c.id ? {
345
+ ...c,
346
+ name: _
347
+ } : b));
309
348
  },
310
- value: e.name,
311
- placeholder: v
349
+ value: c.name,
350
+ placeholder: F
312
351
  }
313
352
  ),
314
- b === "image" && /* @__PURE__ */ t.jsx(Y, {}),
315
- /* @__PURE__ */ t.jsxs("div", { className: m.buttons, children: [
316
- l && /* @__PURE__ */ t.jsx(
353
+ h === "image" && /* @__PURE__ */ t.jsx(J, {}),
354
+ /* @__PURE__ */ t.jsxs("div", { className: g.buttons, children: [
355
+ o && /* @__PURE__ */ t.jsx(
317
356
  p,
318
357
  {
319
358
  name: "sliders",
320
359
  hoverable: !0,
321
360
  width: 20,
322
361
  height: 20,
323
- onClick: (d) => {
324
- G(d, e);
362
+ onClick: (_) => {
363
+ q(_, c);
325
364
  }
326
365
  }
327
366
  ),
328
- /* @__PURE__ */ t.jsx(
367
+ v && /* @__PURE__ */ t.jsx(
329
368
  p,
330
369
  {
331
370
  name: "trash",
332
371
  hoverable: !0,
333
- onClick: () => n((d) => d.filter((j) => j.id !== e.id)),
372
+ onClick: () => n((_) => _.filter((f) => f.id !== c.id)),
334
373
  width: 20,
335
374
  height: 20,
336
375
  fill: "#C12A2A"
@@ -339,24 +378,24 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
339
378
  ] })
340
379
  ]
341
380
  },
342
- e.id
381
+ c.id
343
382
  )),
344
- /* @__PURE__ */ t.jsxs(
345
- R,
383
+ y && /* @__PURE__ */ t.jsxs(
384
+ E,
346
385
  {
347
- className: m.button,
386
+ className: g.button,
348
387
  size: "s",
349
- onClick: () => n((e) => {
350
- const d = [...e];
351
- return b === "select" ? d.push({
388
+ onClick: () => n((c) => {
389
+ const _ = [...c];
390
+ return h === "select" ? _.push({
352
391
  name: L[0] || "",
353
392
  id: P()
354
- }) : b === "input" ? d.push({
393
+ }) : h === "input" ? _.push({
355
394
  name: "",
356
395
  id: P()
357
- }) : d.push({
396
+ }) : _.push({
358
397
  id: P()
359
- }), d;
398
+ }), _;
360
399
  }),
361
400
  children: [
362
401
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
@@ -372,57 +411,45 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
372
411
  }
373
412
  )
374
413
  ] }),
375
- c !== void 0 && /* @__PURE__ */ t.jsxs("div", { className: m.other, children: [
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
- ] })
414
+ u !== void 0 && /* @__PURE__ */ t.jsx(zt, { ...u })
388
415
  ] });
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 || "");
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 || "");
412
439
  return /* @__PURE__ */ t.jsxs(
413
440
  "div",
414
441
  {
415
- className: k.modal,
416
- onClick: (r) => {
417
- r.stopPropagation();
442
+ className: j.modal,
443
+ onClick: (d) => {
444
+ d.stopPropagation();
418
445
  },
419
446
  style: {
420
447
  top: `${s.top}px`,
421
448
  left: `${s.left}px`
422
449
  },
423
450
  children: [
424
- /* @__PURE__ */ t.jsxs("div", { className: k.top, children: [
425
- /* @__PURE__ */ t.jsx("h3", { children: i.type }),
451
+ /* @__PURE__ */ t.jsxs("div", { className: j.top, children: [
452
+ /* @__PURE__ */ t.jsx("h3", { children: e.type }),
426
453
  /* @__PURE__ */ t.jsx(
427
454
  p,
428
455
  {
@@ -430,21 +457,21 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
430
457
  height: 20,
431
458
  width: 20,
432
459
  hoverable: !0,
433
- onClick: () => a(null)
460
+ onClick: () => i(null)
434
461
  }
435
462
  )
436
463
  ] }),
437
- /* @__PURE__ */ t.jsxs("div", { className: k.options, children: [
464
+ /* @__PURE__ */ t.jsxs("div", { className: j.options, children: [
438
465
  /* @__PURE__ */ t.jsx(
439
466
  I,
440
467
  {
441
468
  label: "Destination",
442
- onChange: (r) => h(r),
469
+ onChange: (d) => m(d),
443
470
  options: ["Go to Page", "Open Link"],
444
- value: u
471
+ value: l
445
472
  }
446
473
  ),
447
- u === "Go to Page" ? /* @__PURE__ */ t.jsx(
474
+ l === "Go to Page" ? /* @__PURE__ */ t.jsx(
448
475
  I,
449
476
  {
450
477
  label: "Go to",
@@ -454,16 +481,16 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
454
481
  value: "Homepage"
455
482
  }
456
483
  ) : /* @__PURE__ */ t.jsx(
457
- S,
484
+ A,
458
485
  {
459
- onChange: (r) => l(r),
486
+ onChange: (d) => a(d),
460
487
  value: o,
461
488
  placeholder: "https://",
462
489
  label: "Link"
463
490
  }
464
491
  ),
465
492
  /* @__PURE__ */ t.jsx(
466
- C,
493
+ N,
467
494
  {
468
495
  current: !1,
469
496
  label: "Open in new tab"
@@ -480,43 +507,43 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
480
507
  }
481
508
  ),
482
509
  /* @__PURE__ */ t.jsx(
483
- E,
510
+ H,
484
511
  {
485
512
  typeText: n,
486
- setTypeText: c
513
+ setTypeText: u
487
514
  }
488
515
  )
489
516
  ] })
490
517
  ]
491
518
  }
492
519
  );
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({
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({
516
543
  top: 0,
517
544
  left: 0
518
545
  });
519
- y.useEffect(() => {
546
+ k.useEffect(() => {
520
547
  const o = () => {
521
548
  n(null);
522
549
  };
@@ -524,18 +551,18 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
524
551
  n(null), document.body.removeEventListener("click", o);
525
552
  };
526
553
  }, []);
527
- const h = (o, l) => {
554
+ const m = (o, a) => {
528
555
  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);
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);
535
562
  };
536
563
  return /* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
537
564
  /* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: "Button Type" }),
538
- i.map((o) => /* @__PURE__ */ t.jsxs(
565
+ e.map((o) => /* @__PURE__ */ t.jsxs(
539
566
  "div",
540
567
  {
541
568
  className: B.product,
@@ -543,14 +570,14 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
543
570
  /* @__PURE__ */ t.jsx(
544
571
  I,
545
572
  {
546
- onChange: (l) => {
547
- a((r) => [...r].map((v) => v.id === o.id ? {
573
+ onChange: (a) => {
574
+ i((d) => [...d].map((h) => h.id === o.id ? {
548
575
  ...o,
549
- type: l
550
- } : v));
576
+ type: a
577
+ } : h));
551
578
  },
552
579
  value: o.type,
553
- options: ["Primary", "Secondary"]
580
+ options: ["Primary", "Secondary", "Tertiary"]
554
581
  }
555
582
  ),
556
583
  /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
@@ -561,8 +588,8 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
561
588
  hoverable: !0,
562
589
  width: 20,
563
590
  height: 20,
564
- onClick: (l) => {
565
- h(l, o);
591
+ onClick: (a) => {
592
+ m(a, o);
566
593
  }
567
594
  }
568
595
  ),
@@ -571,7 +598,7 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
571
598
  {
572
599
  name: "trash",
573
600
  hoverable: !0,
574
- onClick: () => a((l) => l.filter((r) => r.id !== o.id)),
601
+ onClick: () => i((a) => a.filter((d) => d.id !== o.id)),
575
602
  width: 20,
576
603
  height: 20,
577
604
  fill: "#C12A2A"
@@ -583,26 +610,26 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
583
610
  o.id
584
611
  )),
585
612
  s && /* @__PURE__ */ t.jsx(
586
- Xt,
613
+ se,
587
614
  {
588
615
  activeButton: s,
589
616
  setActiveButton: n,
590
- popupPosition: c
617
+ popupPosition: u
591
618
  }
592
619
  ),
593
620
  /* @__PURE__ */ t.jsxs(
594
- R,
621
+ E,
595
622
  {
596
623
  className: B.button,
597
624
  size: "s",
598
- onClick: () => a((o) => {
599
- const l = [...o];
600
- return l.push({
625
+ onClick: () => i((o) => {
626
+ const a = [...o];
627
+ return a.push({
601
628
  type: "Primary",
602
629
  id: P(),
603
630
  typeText: "bold",
604
631
  destination: "Go to Page"
605
- }), l;
632
+ }), a;
606
633
  }),
607
634
  children: [
608
635
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
@@ -618,16 +645,16 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
618
645
  }
619
646
  )
620
647
  ] });
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" }),
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" }),
626
653
  /* @__PURE__ */ t.jsx(
627
- C,
654
+ N,
628
655
  {
629
- current: i,
630
- onChange: (c) => a((u) => c)
656
+ current: e,
657
+ onChange: (u) => i((l) => u)
631
658
  }
632
659
  )
633
660
  ] }),
@@ -641,25 +668,25 @@ const q = "_wrapper_o1bnv_2", J = "_alignmentBlock_o1bnv_8", K = "_title_o1bnv_1
641
668
  ] }) });
642
669
  };
643
670
  export {
644
- R as Button,
671
+ E as Button,
645
672
  ye as ButtonTypeSettings,
646
- $e as ButtonsSettings,
647
- Ne as Checkbox,
648
- Y as ChooseImage,
649
- Te as ChooseImageModal,
650
- Pe as ColorPicker,
673
+ Te as ButtonsSettings,
674
+ Se as Checkbox,
675
+ J as ChooseImage,
676
+ Ae as ChooseImageModal,
677
+ Le as ColorPicker,
651
678
  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,
679
+ A as Input,
680
+ Ce as ItemsSettings,
681
+ Be as LayoutSettings,
682
+ ze as Modal,
683
+ Re as Picker,
684
+ Oe as Radio,
658
685
  I as Select,
659
- Le as Submodal,
660
- C as Switch,
661
- fe as TextSettings,
686
+ Ee as Submodal,
687
+ N as Switch,
688
+ Ne as TextSettings,
662
689
  O as Textarea,
663
- ze as Tip,
664
- E as TypeTexts
690
+ He as Tip,
691
+ H as TypeTexts
665
692
  };