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