@billgangcom/theme-lib 1.7.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 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 = [
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,10 +23,10 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
23
23
  "bottomLeft",
24
24
  "bottom",
25
25
  "bottomRight"
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) {
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
30
  case "left":
31
31
  case "topLeft":
32
32
  case "bottomLeft":
@@ -43,24 +43,24 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
43
43
  return "center";
44
44
  }
45
45
  }
46
- return /* @__PURE__ */ t.jsxs("div", { className: x.layout, children: [
47
- /* @__PURE__ */ t.jsx("h3", { className: x.title, children: "Layout" }),
48
- /* @__PURE__ */ t.jsxs("div", { className: x.alignmentBlock, children: [
49
- /* @__PURE__ */ t.jsx("h5", { className: x.subtitle, children: "Alignment" }),
50
- /* @__PURE__ */ t.jsxs("div", { className: x.alignmentContent, children: [
51
- /* @__PURE__ */ t.jsx("div", { className: x.alignments, children: ot.map((l) => /* @__PURE__ */ t.jsxs(
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(
52
52
  "div",
53
53
  {
54
54
  onClick: () => {
55
- n((m) => l);
55
+ l(c);
56
56
  },
57
- className: x.alignment,
57
+ className: v.alignment,
58
58
  children: [
59
- l !== e && /* @__PURE__ */ t.jsx("div", { className: x.circle }),
60
- l === e && /* @__PURE__ */ t.jsx(
61
- p,
59
+ c !== s && /* @__PURE__ */ t.jsx("div", { className: v.circle }),
60
+ c === s && /* @__PURE__ */ t.jsx(
61
+ m,
62
62
  {
63
- name: `text-align-${u()}`,
63
+ name: `text-align-${e()}`,
64
64
  fill: "#FF3F19",
65
65
  width: 22,
66
66
  height: 22
@@ -68,26 +68,26 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
68
68
  )
69
69
  ]
70
70
  },
71
- l
71
+ c
72
72
  )) }),
73
- /* @__PURE__ */ t.jsx("div", { className: x.paddings, children: ct.map((l) => /* @__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: [
74
74
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
75
- p,
75
+ m,
76
76
  {
77
- name: `align-${l}`,
77
+ name: `align-${c}`,
78
78
  width: 20,
79
79
  height: 20
80
80
  }
81
81
  ) }),
82
82
  /* @__PURE__ */ t.jsx(
83
- A,
83
+ T,
84
84
  {
85
85
  type: "text",
86
- value: String(i[l]),
87
- onChange: (m) => s((o) => ({
86
+ value: String(o[c]),
87
+ onChange: (a) => n({
88
88
  ...o,
89
- [l]: Number(m)
90
- })),
89
+ [c]: Number(a)
90
+ }),
91
91
  paddingless: !0,
92
92
  borderless: !0
93
93
  }
@@ -96,190 +96,321 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
96
96
  ] })
97
97
  ] })
98
98
  ] });
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(
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(
112
112
  "div",
113
113
  {
114
- className: Y(S.block, {
115
- [S.active]: e === s
114
+ className: F(E.block, {
115
+ [E.active]: s === n
116
116
  }),
117
- onClick: () => i((n) => s),
117
+ onClick: () => o(n),
118
118
  children: /* @__PURE__ */ t.jsx(
119
- p,
119
+ m,
120
120
  {
121
- name: `text-${s}`,
122
- fill: e === s ? "#252525" : "#757575",
121
+ name: `text-${n}`,
122
+ fill: s === n ? "#252525" : "#757575",
123
123
  width: 20,
124
124
  height: 20
125
125
  }
126
126
  )
127
127
  },
128
- String(s)
128
+ String(n)
129
129
  )) });
130
- }, Ne = (r) => {
130
+ }, ft = (d) => {
131
131
  const {
132
- typeText: e,
133
- isActiveText: i,
134
- setIsActiveText: s,
135
- text: n,
136
- setText: u,
137
- setTypeText: l,
138
- title: m,
139
- subtitle: o = "Items"
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 }),
144
- /* @__PURE__ */ t.jsx(
145
- N,
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,
146
146
  {
147
- current: i,
148
- onChange: (a) => s((d) => a)
147
+ current: o,
148
+ onChange: (u) => n(u)
149
149
  }
150
150
  )
151
151
  ] }),
152
- /* @__PURE__ */ t.jsxs("div", { className: w.itemsBlock, children: [
153
- /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: o }),
152
+ /* @__PURE__ */ t.jsxs("div", { className: S.itemsBlock, children: [
153
+ /* @__PURE__ */ t.jsx("h5", { className: S.subtitle, children: r }),
154
154
  /* @__PURE__ */ t.jsx(
155
- O,
155
+ G,
156
156
  {
157
- onChange: (a) => u((d) => a),
158
- value: n,
157
+ onChange: (u) => e(u),
158
+ value: l,
159
159
  maxLength: 150
160
160
  }
161
161
  ),
162
162
  /* @__PURE__ */ t.jsx(
163
- H,
163
+ q,
164
164
  {
165
- typeText: e,
166
- setTypeText: l
165
+ typeText: s,
166
+ setTypeText: c
167
167
  }
168
168
  )
169
169
  ] })
170
170
  ] });
171
- }, mt = "_subtitle_fsotk_1", xt = "_header_fsotk_8", gt = "_text_fsotk_9", bt = "_productsBlock_fsotk_10", kt = "_top_fsotk_22", ft = "_itemsBlock_fsotk_29", jt = "_typeTexts_fsotk_35", vt = "_block_fsotk_41", yt = "_active_fsotk_52", $t = "_products_fsotk_10", wt = "_product_fsotk_10", Bt = "_button_fsotk_70", Nt = "_image_fsotk_80", Ct = "_info_fsotk_87", Tt = "_name_fsotk_98", Pt = "_buttons_fsotk_102", It = "_modal_fsotk_108", g = {
172
- subtitle: mt,
173
- header: xt,
174
- text: gt,
175
- productsBlock: bt,
176
- top: kt,
177
- itemsBlock: ft,
178
- typeTexts: jt,
179
- block: vt,
180
- active: yt,
181
- products: $t,
182
- product: wt,
183
- button: Bt,
184
- image: Nt,
185
- info: Ct,
186
- name: Tt,
187
- buttons: Pt,
188
- modal: It
189
- }, St = (r) => {
190
- const { activeItem: e, setActiveItem: i, popupPosition: s } = r;
191
- 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(
192
194
  "div",
193
195
  {
194
- className: g.modal,
195
- onClick: (n) => {
196
- n.stopPropagation();
196
+ className: b.modal,
197
+ onClick: (e) => {
198
+ e.stopPropagation();
197
199
  },
198
200
  style: {
199
- top: `${s.top}px`,
200
- left: `${s.left}px`
201
+ top: `${n.top}px`,
202
+ left: `${n.left}px`
201
203
  },
202
204
  children: [
203
- /* @__PURE__ */ t.jsxs("div", { className: g.top, children: [
204
- /* @__PURE__ */ t.jsx("h3", { children: e.name }),
205
+ /* @__PURE__ */ t.jsxs("div", { className: b.top, children: [
206
+ /* @__PURE__ */ t.jsx("h3", { children: s.name }),
205
207
  /* @__PURE__ */ t.jsx(
206
- p,
208
+ m,
207
209
  {
208
210
  name: "x",
209
211
  height: 20,
210
212
  width: 20,
211
213
  hoverable: !0,
212
- onClick: () => i(null)
214
+ onClick: () => o(null)
213
215
  }
214
216
  )
215
217
  ] }),
216
- /* @__PURE__ */ t.jsxs("div", { children: [
217
- /* @__PURE__ */ t.jsx("span", { children: "Put up an attractive image" }),
218
- /* @__PURE__ */ t.jsx("div", { children: "Choose Image" })
219
- ] })
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
+ }) })
220
334
  ]
221
335
  }
222
336
  );
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,
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,
232
347
  {
233
- current: e,
234
- onChange: (u) => i((l) => u),
235
- label: n,
348
+ current: n.isItem,
349
+ onChange: (l) => n.setIsItem(l),
350
+ label: n.label,
236
351
  hasBackground: !0,
237
352
  paddingless: !1
238
353
  }
239
- )
354
+ )) })
240
355
  ] });
241
- }, Ce = (r) => {
356
+ }, Yt = (d) => {
242
357
  const {
243
- isActiveItems: e,
244
- setIsActiveItems: i,
245
- items: s,
246
- setItems: n,
247
- other: u,
248
- title: l,
249
- subtitle: m,
250
- editable: o = !0,
251
- draggable: a = !1,
252
- withImage: d = !1,
253
- deletable: v = !0,
254
- addable: y = !0,
255
- itemsType: h,
256
- itemsPlaceholder: F = "",
257
- itemsOptions: L
258
- } = r, [z, $] = k.useState(null), [G, M] = k.useState({
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({
259
377
  top: 0,
260
378
  left: 0
261
379
  });
262
- k.useEffect(() => {
263
- const c = () => {
264
- $(null);
380
+ j.useEffect(() => {
381
+ const i = () => {
382
+ P(null);
265
383
  };
266
- return document.body.addEventListener("click", c), $(null), () => {
267
- $(null), document.body.removeEventListener("click", c);
384
+ return document.body.addEventListener("click", i), P(null), () => {
385
+ P(null), document.body.removeEventListener("click", i);
268
386
  };
269
- }, []);
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
- }), $(_);
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);
278
401
  };
279
- function D(c) {
280
- if (d && !c)
281
- return /* @__PURE__ */ t.jsx(
282
- 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,
283
414
  {
284
415
  name: "image",
285
416
  width: 16,
@@ -288,34 +419,36 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
288
419
  }
289
420
  );
290
421
  }
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,
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,
296
427
  {
297
- current: e,
298
- onChange: (c) => i == null ? void 0 : i((_) => c)
428
+ current: s,
429
+ onChange: (i) => o == null ? void 0 : o(i)
299
430
  }
300
431
  )
301
432
  ] }),
302
- z && o && /* @__PURE__ */ t.jsx(
303
- St,
433
+ B && r && M && /* @__PURE__ */ t.jsx(
434
+ Dt,
304
435
  {
305
- activeItem: z,
306
- setActiveItem: $,
307
- popupPosition: G
436
+ activeItem: B,
437
+ setActiveItem: P,
438
+ popupPosition: J,
439
+ modalOptions: M
308
440
  }
309
441
  ),
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(
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(
313
446
  "div",
314
447
  {
315
- className: g.product,
448
+ className: b.product,
316
449
  children: [
317
- a && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
318
- p,
450
+ u && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
451
+ m,
319
452
  {
320
453
  name: "drag",
321
454
  hoverable: !0,
@@ -323,53 +456,69 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
323
456
  height: 20
324
457
  }
325
458
  ) }),
326
- h === "select" && /* @__PURE__ */ t.jsx(
327
- I,
459
+ x === "select" && /* @__PURE__ */ t.jsx(
460
+ O,
328
461
  {
329
- onChange: (_) => {
330
- n((f) => [...f].map((b) => b.id === c.id ? {
331
- ...c,
332
- name: _
333
- } : b));
462
+ onChange: (h) => {
463
+ const w = [...n].map((f) => f.id === i.id ? {
464
+ ...i,
465
+ name: h
466
+ } : f);
467
+ l(w);
334
468
  },
335
- value: c.name,
336
- options: L,
337
- leftAddon: D(c.image)
469
+ value: i.name,
470
+ options: g,
471
+ leftAddon: V(i.image)
338
472
  }
339
473
  ),
340
- h === "input" && /* @__PURE__ */ t.jsx(
341
- A,
474
+ x === "input" && /* @__PURE__ */ t.jsx(
475
+ T,
342
476
  {
343
- onChange: (_) => {
344
- n((f) => [...f].map((b) => b.id === c.id ? {
345
- ...c,
346
- name: _
347
- } : b));
477
+ onChange: (h) => {
478
+ const w = [...n].map((f) => f.id === i.id ? {
479
+ ...i,
480
+ name: h
481
+ } : f);
482
+ l(w);
348
483
  },
349
- value: c.name,
350
- placeholder: F
484
+ value: i.name,
485
+ placeholder: $
351
486
  }
352
487
  ),
353
- h === "image" && /* @__PURE__ */ t.jsx(J, {}),
354
- /* @__PURE__ */ t.jsxs("div", { className: g.buttons, children: [
355
- o && /* @__PURE__ */ t.jsx(
356
- 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,
357
503
  {
358
504
  name: "sliders",
359
505
  hoverable: !0,
360
506
  width: 20,
361
507
  height: 20,
362
- onClick: (_) => {
363
- q(_, c);
508
+ onClick: (h) => {
509
+ Q(h, i);
364
510
  }
365
511
  }
366
512
  ),
367
- v && /* @__PURE__ */ t.jsx(
368
- p,
513
+ y && /* @__PURE__ */ t.jsx(
514
+ m,
369
515
  {
370
516
  name: "trash",
371
517
  hoverable: !0,
372
- onClick: () => n((_) => _.filter((f) => f.id !== c.id)),
518
+ onClick: () => {
519
+ const h = n.filter((N) => N.id !== i.id);
520
+ l(h);
521
+ },
373
522
  width: 20,
374
523
  height: 20,
375
524
  fill: "#C12A2A"
@@ -378,29 +527,30 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
378
527
  ] })
379
528
  ]
380
529
  },
381
- c.id
530
+ i.id
382
531
  )),
383
- y && /* @__PURE__ */ t.jsxs(
384
- E,
532
+ k && /* @__PURE__ */ t.jsxs(
533
+ U,
385
534
  {
386
- className: g.button,
535
+ className: b.button,
387
536
  size: "s",
388
- onClick: () => n((c) => {
389
- const _ = [...c];
390
- return h === "select" ? _.push({
391
- name: L[0] || "",
392
- id: P()
393
- }) : h === "input" ? _.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({
394
543
  name: "",
395
- id: P()
396
- }) : _.push({
397
- id: P()
398
- }), _;
399
- }),
544
+ id: R()
545
+ }) : i.push({
546
+ name: `Image ${n.length + 1}`,
547
+ id: R()
548
+ }), l(i);
549
+ },
400
550
  children: [
401
551
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
402
552
  /* @__PURE__ */ t.jsx(
403
- p,
553
+ m,
404
554
  {
405
555
  name: "plus",
406
556
  width: 16,
@@ -411,68 +561,68 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
411
561
  }
412
562
  )
413
563
  ] }),
414
- u !== void 0 && /* @__PURE__ */ t.jsx(zt, { ...u })
564
+ e !== void 0 && /* @__PURE__ */ t.jsx(Gt, { items: e })
415
565
  ] });
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 || "");
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 || "");
439
589
  return /* @__PURE__ */ t.jsxs(
440
590
  "div",
441
591
  {
442
- className: j.modal,
443
- onClick: (d) => {
444
- d.stopPropagation();
592
+ className: C.modal,
593
+ onClick: (p) => {
594
+ p.stopPropagation();
445
595
  },
446
596
  style: {
447
- top: `${s.top}px`,
448
- left: `${s.left}px`
597
+ top: `${n.top}px`,
598
+ left: `${n.left}px`
449
599
  },
450
600
  children: [
451
- /* @__PURE__ */ t.jsxs("div", { className: j.top, children: [
452
- /* @__PURE__ */ t.jsx("h3", { children: e.type }),
601
+ /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
602
+ /* @__PURE__ */ t.jsx("h3", { children: s.type }),
453
603
  /* @__PURE__ */ t.jsx(
454
- p,
604
+ m,
455
605
  {
456
606
  name: "x",
457
607
  height: 20,
458
608
  width: 20,
459
609
  hoverable: !0,
460
- onClick: () => i(null)
610
+ onClick: () => o(null)
461
611
  }
462
612
  )
463
613
  ] }),
464
- /* @__PURE__ */ t.jsxs("div", { className: j.options, children: [
614
+ /* @__PURE__ */ t.jsxs("div", { className: C.options, children: [
465
615
  /* @__PURE__ */ t.jsx(
466
- I,
616
+ O,
467
617
  {
468
618
  label: "Destination",
469
- onChange: (d) => m(d),
619
+ onChange: (p) => a(p),
470
620
  options: ["Go to Page", "Open Link"],
471
- value: l
621
+ value: c
472
622
  }
473
623
  ),
474
- l === "Go to Page" ? /* @__PURE__ */ t.jsx(
475
- I,
624
+ c === "Go to Page" ? /* @__PURE__ */ t.jsx(
625
+ O,
476
626
  {
477
627
  label: "Go to",
478
628
  onChange: () => {
@@ -481,23 +631,23 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
481
631
  value: "Homepage"
482
632
  }
483
633
  ) : /* @__PURE__ */ t.jsx(
484
- A,
634
+ T,
485
635
  {
486
- onChange: (d) => a(d),
487
- value: o,
636
+ onChange: (p) => u(p),
637
+ value: r,
488
638
  placeholder: "https://",
489
639
  label: "Link"
490
640
  }
491
641
  ),
492
642
  /* @__PURE__ */ t.jsx(
493
- N,
643
+ I,
494
644
  {
495
645
  current: !1,
496
646
  label: "Open in new tab"
497
647
  }
498
648
  ),
499
649
  /* @__PURE__ */ t.jsx(
500
- O,
650
+ G,
501
651
  {
502
652
  onChange: () => {
503
653
  },
@@ -507,98 +657,102 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
507
657
  }
508
658
  ),
509
659
  /* @__PURE__ */ t.jsx(
510
- H,
660
+ q,
511
661
  {
512
- typeText: n,
513
- setTypeText: u
662
+ typeText: l,
663
+ setTypeText: e
514
664
  }
515
665
  )
516
666
  ] })
517
667
  ]
518
668
  }
519
669
  );
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({
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({
543
693
  top: 0,
544
694
  left: 0
545
695
  });
546
- k.useEffect(() => {
547
- const o = () => {
548
- n(null);
696
+ j.useEffect(() => {
697
+ const r = () => {
698
+ l(null);
549
699
  };
550
- return document.body.addEventListener("click", o), n(null), () => {
551
- n(null), document.body.removeEventListener("click", o);
700
+ return document.body.addEventListener("click", r), l(null), () => {
701
+ l(null), document.body.removeEventListener("click", r);
552
702
  };
553
703
  }, []);
554
- const m = (o, a) => {
555
- o.stopPropagation();
556
- const d = o.target.getBoundingClientRect(), v = 490, y = window.innerHeight;
557
- let h = d.top + window.scrollY;
558
- h + v > y && (h = y - v - 20), l({
559
- top: h,
560
- left: d.left - 30
561
- }), n(a);
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);
562
712
  };
563
- return /* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
564
- /* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: "Button Type" }),
565
- e.map((o) => /* @__PURE__ */ t.jsxs(
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(
566
716
  "div",
567
717
  {
568
- className: B.product,
718
+ className: A.product,
569
719
  children: [
570
720
  /* @__PURE__ */ t.jsx(
571
- I,
721
+ O,
572
722
  {
573
- onChange: (a) => {
574
- i((d) => [...d].map((h) => h.id === o.id ? {
575
- ...o,
576
- type: a
577
- } : h));
723
+ onChange: (u) => {
724
+ const y = [...s].map((k) => k.id === r.id ? {
725
+ ...r,
726
+ type: u
727
+ } : k);
728
+ o(y);
578
729
  },
579
- value: o.type,
730
+ value: r.type,
580
731
  options: ["Primary", "Secondary", "Tertiary"]
581
732
  }
582
733
  ),
583
- /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
734
+ /* @__PURE__ */ t.jsxs("div", { className: A.buttons, children: [
584
735
  /* @__PURE__ */ t.jsx(
585
- p,
736
+ m,
586
737
  {
587
738
  name: "sliders",
588
739
  hoverable: !0,
589
740
  width: 20,
590
741
  height: 20,
591
- onClick: (a) => {
592
- m(a, o);
742
+ onClick: (u) => {
743
+ a(u, r);
593
744
  }
594
745
  }
595
746
  ),
596
747
  /* @__PURE__ */ t.jsx(
597
- p,
748
+ m,
598
749
  {
599
750
  name: "trash",
600
751
  hoverable: !0,
601
- onClick: () => i((a) => a.filter((d) => d.id !== o.id)),
752
+ onClick: () => {
753
+ const u = s.filter((p) => p.id !== r.id);
754
+ o(u);
755
+ },
602
756
  width: 20,
603
757
  height: 20,
604
758
  fill: "#C12A2A"
@@ -607,34 +761,34 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
607
761
  ] })
608
762
  ]
609
763
  },
610
- o.id
764
+ r.id
611
765
  )),
612
- s && /* @__PURE__ */ t.jsx(
613
- se,
766
+ n && /* @__PURE__ */ t.jsx(
767
+ ue,
614
768
  {
615
- activeButton: s,
616
- setActiveButton: n,
617
- popupPosition: u
769
+ activeButton: n,
770
+ setActiveButton: l,
771
+ popupPosition: e
618
772
  }
619
773
  ),
620
774
  /* @__PURE__ */ t.jsxs(
621
- E,
775
+ U,
622
776
  {
623
- className: B.button,
777
+ className: A.button,
624
778
  size: "s",
625
- onClick: () => i((o) => {
626
- const a = [...o];
627
- return a.push({
779
+ onClick: () => {
780
+ const r = [...s];
781
+ r.push({
628
782
  type: "Primary",
629
- id: P(),
783
+ id: R(),
630
784
  typeText: "bold",
631
785
  destination: "Go to Page"
632
- }), a;
633
- }),
786
+ }), o(r);
787
+ },
634
788
  children: [
635
789
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
636
790
  /* @__PURE__ */ t.jsx(
637
- p,
791
+ m,
638
792
  {
639
793
  name: "plus",
640
794
  width: 16,
@@ -645,48 +799,173 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
645
799
  }
646
800
  )
647
801
  ] });
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" }),
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" }),
653
807
  /* @__PURE__ */ t.jsx(
654
- N,
808
+ I,
655
809
  {
656
- current: e,
657
- onChange: (u) => i((l) => u)
810
+ current: s,
811
+ onChange: (e) => o(e)
658
812
  }
659
813
  )
660
814
  ] }),
661
815
  /* @__PURE__ */ t.jsx(
662
- ye,
816
+ Se,
663
817
  {
664
- buttons: s,
665
- setButtons: n
818
+ buttons: n,
819
+ setButtons: l
666
820
  }
667
821
  )
668
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
+ ] });
669
947
  };
670
948
  export {
671
- E as Button,
672
- ye as ButtonTypeSettings,
673
- Te as ButtonsSettings,
674
- Se as Checkbox,
675
- J as ChooseImage,
676
- Ae as ChooseImageModal,
677
- Le as ColorPicker,
678
- p as Icon,
679
- A as Input,
680
- Ce as ItemsSettings,
681
- Be as LayoutSettings,
682
- ze as Modal,
683
- Re as Picker,
684
- Oe as Radio,
685
- I as Select,
686
- Ee as Submodal,
687
- N as Switch,
688
- Ne as TextSettings,
689
- O as Textarea,
690
- He as Tip,
691
- H as TypeTexts
949
+ U as Button,
950
+ Se as ButtonTypeSettings,
951
+ We as ButtonsSettings,
952
+ ts as Checkbox,
953
+ Y as ChooseImage,
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
692
971
  };