@billgangcom/theme-lib 1.6.0 → 1.8.0

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