@billgangcom/theme-lib 1.18.0 → 1.19.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,5 +1,5 @@
1
- import { j as t, c as H, I as x, a as G, S as z, T as lt, C as ot, b as Y, D as rt, H as dt, B as X, v as tt, u as ut, d as _t, e as it, f as at, M as mt } from "./root-CL1RHy-a.js";
2
- import { k as Gn, l as Yn, h as Xn, L as Qn, P as Wn, R as Jn, g as Kn, i as Zn } from "./root-CL1RHy-a.js";
1
+ import { j as t, c as H, I as x, a as G, S as z, T as lt, C as ot, b as Y, D as rt, H as dt, B as X, v as tt, u as ut, d as _t, e as it, f as at, M as mt } from "./root-BudTzp0i.js";
2
+ import { k as Gn, l as Yn, h as Xn, E as Qn, L as Wn, P as Jn, R as Kn, g as Zn, i as tc } from "./root-BudTzp0i.js";
3
3
  import b from "react";
4
4
  const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16", jt = "_open_2tiiw_19", ft = "_content_2tiiw_23", J = {
5
5
  accordion: gt,
@@ -155,11 +155,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
155
155
  text: qt,
156
156
  top: Lt,
157
157
  itemsBlock: Mt
158
- }, Ht = "_typeTexts_3zlec_1", Rt = "_block_3zlec_7", Vt = "_active_3zlec_18", nt = {
158
+ }, Ht = "_typeTexts_3zlec_1", Rt = "_block_3zlec_7", Et = "_active_3zlec_18", nt = {
159
159
  typeTexts: Ht,
160
160
  block: Rt,
161
- active: Vt
162
- }, Et = ["bold", "italic", "underline", "strike-through", "code"], pt = (r) => {
161
+ active: Et
162
+ }, Vt = ["bold", "italic", "underline", "strike-through", "code"], pt = (r) => {
163
163
  const { typesText: n, setTypesText: s } = r;
164
164
  function c(a) {
165
165
  switch (a) {
@@ -175,7 +175,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
175
175
  return "TextUnderline";
176
176
  }
177
177
  }
178
- return /* @__PURE__ */ t.jsx("div", { className: nt.typeTexts, children: Et.map((a) => /* @__PURE__ */ t.jsx(
178
+ return /* @__PURE__ */ t.jsx("div", { className: nt.typeTexts, children: Vt.map((a) => /* @__PURE__ */ t.jsx(
179
179
  "div",
180
180
  {
181
181
  className: H(nt.block, {
@@ -219,7 +219,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
219
219
  z,
220
220
  {
221
221
  current: s,
222
- onChange: (y) => c(y)
222
+ onChange: (k) => c(k)
223
223
  }
224
224
  )
225
225
  ] }),
@@ -228,7 +228,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
228
228
  /* @__PURE__ */ t.jsx(
229
229
  lt,
230
230
  {
231
- onChange: (y) => l(y),
231
+ onChange: (k) => l(k),
232
232
  value: a,
233
233
  maxLength: 150
234
234
  }
@@ -471,9 +471,9 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
471
471
  title: e,
472
472
  subtitle: i,
473
473
  editable: u = !0,
474
- draggable: y = !1,
474
+ draggable: k = !1,
475
475
  withImage: h = !1,
476
- deletable: v = !0,
476
+ deletable: y = !0,
477
477
  addable: j = !0,
478
478
  itemsType: o,
479
479
  itemsPlaceholder: _ = "",
@@ -483,19 +483,19 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
483
483
  modalOptions: N,
484
484
  addableOptions: Q = {},
485
485
  limit: D
486
- } = r, [R, V] = b.useState(null), [st, et] = b.useState({
486
+ } = r, [R, E] = b.useState(null), [st, et] = b.useState({
487
487
  top: 0,
488
488
  left: 0
489
- }), [p, k] = b.useState(!1), S = (d, B) => {
489
+ }), [p, v] = b.useState(!1), S = (d, B) => {
490
490
  const O = [...c], [$] = O.splice(d, 1);
491
491
  O.splice(B, 0, $), a(O);
492
492
  };
493
493
  b.useEffect(() => {
494
494
  const d = () => {
495
- V(null), k(!1);
495
+ E(null), v(!1);
496
496
  };
497
- return document.body.addEventListener("click", d), V(null), k(!1), () => {
498
- V(null), k(!1), document.body.removeEventListener("click", d);
497
+ return document.body.addEventListener("click", d), E(null), v(!1), () => {
498
+ E(null), v(!1), document.body.removeEventListener("click", d);
499
499
  };
500
500
  }, []), b.useEffect(() => {
501
501
  if (R) {
@@ -504,13 +504,13 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
504
504
  }
505
505
  }, [R]);
506
506
  const C = (d, B) => {
507
- d.stopPropagation(), k(!0);
507
+ d.stopPropagation(), v(!0);
508
508
  const O = d.target.getBoundingClientRect(), $ = 500, W = window.innerHeight;
509
509
  let M = O.top + window.scrollY;
510
510
  M + $ > W && (M = W - $ - 20), et({
511
511
  top: M - 80,
512
512
  left: O.left - 30
513
- }), V(B);
513
+ }), E(B);
514
514
  };
515
515
  function F(d) {
516
516
  if (h)
@@ -534,7 +534,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
534
534
  }
535
535
  const q = (d, B) => {
536
536
  const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
537
- y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
537
+ k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
538
538
  x,
539
539
  {
540
540
  name: "DotsSixVertical",
@@ -547,11 +547,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
547
547
  Y,
548
548
  {
549
549
  onChange: ($) => {
550
- const M = [...c].map((E) => E.id === d.id ? {
550
+ const M = [...c].map((V) => V.id === d.id ? {
551
551
  ...d,
552
552
  name: $
553
- } : E);
554
- V({
553
+ } : V);
554
+ E({
555
555
  ...d,
556
556
  name: $
557
557
  }), a([...M]);
@@ -565,10 +565,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
565
565
  G,
566
566
  {
567
567
  onChange: ($) => {
568
- const M = [...c].map((E) => E.id === d.id ? {
568
+ const M = [...c].map((V) => V.id === d.id ? {
569
569
  ...d,
570
570
  name: $
571
- } : E);
571
+ } : V);
572
572
  a([...M]);
573
573
  },
574
574
  value: d.name,
@@ -579,10 +579,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
579
579
  ot,
580
580
  {
581
581
  onChange: ($) => {
582
- const M = [...c].map((E) => E.id === d.id ? {
582
+ const M = [...c].map((V) => V.id === d.id ? {
583
583
  ...d,
584
584
  images: $
585
- } : E);
585
+ } : V);
586
586
  a([...M]);
587
587
  }
588
588
  }
@@ -598,7 +598,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
598
598
  onClick: ($) => C($, d)
599
599
  }
600
600
  ),
601
- v && /* @__PURE__ */ t.jsx(
601
+ y && /* @__PURE__ */ t.jsx(
602
602
  x,
603
603
  {
604
604
  name: "Trash",
@@ -611,7 +611,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
611
611
  )
612
612
  ] })
613
613
  ] });
614
- return y ? /* @__PURE__ */ t.jsx(
614
+ return k ? /* @__PURE__ */ t.jsx(
615
615
  he,
616
616
  {
617
617
  product: d,
@@ -644,16 +644,16 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
644
644
  de,
645
645
  {
646
646
  activeItem: R,
647
- setActiveItem: V,
647
+ setActiveItem: E,
648
648
  popupPosition: st,
649
649
  modalOptions: N,
650
- setIsOpenModal: k
650
+ setIsOpenModal: v
651
651
  }
652
652
  ),
653
653
  P && A && /* @__PURE__ */ t.jsx(bs, { ...A }),
654
654
  /* @__PURE__ */ t.jsxs("div", { className: I.products, children: [
655
655
  i && /* @__PURE__ */ t.jsx("h5", { className: I.subtitle, children: i }),
656
- y ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: c.map((d, B) => q(d, B)) }) : c.map((d, B) => q(d, B)),
656
+ k ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: c.map((d, B) => q(d, B)) }) : c.map((d, B) => q(d, B)),
657
657
  j && /* @__PURE__ */ t.jsxs(
658
658
  X,
659
659
  {
@@ -716,7 +716,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
716
716
  other: Oe,
717
717
  options: De
718
718
  }, qe = (r) => {
719
- const { activeButton: n, setActiveButton: s, popupPosition: c } = r, [a, l] = b.useState(n.typesText), [e, i] = b.useState(n.destination), [u, y] = b.useState(n.link || ""), [h, v] = b.useState(n.text || "");
719
+ const { activeButton: n, setActiveButton: s, popupPosition: c } = r, [a, l] = b.useState(n.typesText), [e, i] = b.useState(n.destination), [u, k] = b.useState(n.link || ""), [h, y] = b.useState(n.text || "");
720
720
  return b.useEffect(() => {
721
721
  s({
722
722
  ...n,
@@ -774,7 +774,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
774
774
  ) : /* @__PURE__ */ t.jsx(
775
775
  G,
776
776
  {
777
- onChange: (j) => y(j),
777
+ onChange: (j) => k(j),
778
778
  value: u,
779
779
  placeholder: "https://",
780
780
  label: "Link"
@@ -790,7 +790,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
790
790
  /* @__PURE__ */ t.jsx(
791
791
  lt,
792
792
  {
793
- onChange: (j) => v(j),
793
+ onChange: (j) => y(j),
794
794
  value: h,
795
795
  label: "Text",
796
796
  maxLength: 150
@@ -807,13 +807,13 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
807
807
  ]
808
808
  }
809
809
  );
810
- }, Le = "_subtitle_1y5sw_1", Me = "_header_1y5sw_8", He = "_text_1y5sw_9", Re = "_productsBlock_1y5sw_10", Ve = "_buttonsBlock_1y5sw_11", Ee = "_top_1y5sw_22", ze = "_itemsBlock_1y5sw_29", Fe = "_typeTexts_1y5sw_35", Ue = "_block_1y5sw_41", Ge = "_active_1y5sw_52", Ye = "_products_1y5sw_10", Xe = "_product_1y5sw_10", Qe = "_button_1y5sw_11", We = "_image_1y5sw_80", Je = "_info_1y5sw_87", Ke = "_name_1y5sw_98", Ze = "_buttons_1y5sw_11", ts = "_modal_1y5sw_108", es = "_other_1y5sw_125", ss = "_options_1y5sw_131", Z = {
810
+ }, Le = "_subtitle_1y5sw_1", Me = "_header_1y5sw_8", He = "_text_1y5sw_9", Re = "_productsBlock_1y5sw_10", Ee = "_buttonsBlock_1y5sw_11", Ve = "_top_1y5sw_22", ze = "_itemsBlock_1y5sw_29", Fe = "_typeTexts_1y5sw_35", Ue = "_block_1y5sw_41", Ge = "_active_1y5sw_52", Ye = "_products_1y5sw_10", Xe = "_product_1y5sw_10", Qe = "_button_1y5sw_11", We = "_image_1y5sw_80", Je = "_info_1y5sw_87", Ke = "_name_1y5sw_98", Ze = "_buttons_1y5sw_11", ts = "_modal_1y5sw_108", es = "_other_1y5sw_125", ss = "_options_1y5sw_131", Z = {
811
811
  subtitle: Le,
812
812
  header: Me,
813
813
  text: He,
814
814
  productsBlock: Re,
815
- buttonsBlock: Ve,
816
- top: Ee,
815
+ buttonsBlock: Ee,
816
+ top: Ve,
817
817
  itemsBlock: ze,
818
818
  typeTexts: Fe,
819
819
  block: Ue,
@@ -842,18 +842,18 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
842
842
  };
843
843
  }, []), b.useEffect(() => {
844
844
  if (l) {
845
- const h = [...n].map((v) => v.id === l.id ? l : v);
845
+ const h = [...n].map((y) => y.id === l.id ? l : y);
846
846
  s(h);
847
847
  }
848
848
  }, [l]);
849
- const y = (h, v) => {
849
+ const k = (h, y) => {
850
850
  h.stopPropagation();
851
851
  const j = h.target.getBoundingClientRect(), o = 490, _ = window.innerHeight;
852
852
  let m = j.top + window.scrollY;
853
853
  m + o > _ && (m = _ - o - 20), u({
854
854
  top: m,
855
855
  left: j.left - 30
856
- }), e(v);
856
+ }), e(y);
857
857
  };
858
858
  return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
859
859
  /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
@@ -865,10 +865,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
865
865
  /* @__PURE__ */ t.jsx(
866
866
  Y,
867
867
  {
868
- onChange: (v) => {
868
+ onChange: (y) => {
869
869
  const o = [...n].map((_) => _.id === h.id ? {
870
870
  ...h,
871
- type: v
871
+ type: y
872
872
  } : _);
873
873
  s(o);
874
874
  },
@@ -884,8 +884,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
884
884
  hoverable: !0,
885
885
  width: 20,
886
886
  height: 20,
887
- onClick: (v) => {
888
- y(v, h);
887
+ onClick: (y) => {
888
+ k(y, h);
889
889
  }
890
890
  }
891
891
  ),
@@ -895,8 +895,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
895
895
  name: "Trash",
896
896
  hoverable: !0,
897
897
  onClick: () => {
898
- const v = n.filter((j) => j.id !== h.id);
899
- s(v);
898
+ const y = n.filter((j) => j.id !== h.id);
899
+ s(y);
900
900
  },
901
901
  width: 20,
902
902
  height: 20,
@@ -982,7 +982,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
982
982
  controls: gs,
983
983
  button: xs
984
984
  }, bs = (r) => {
985
- const { label: n, min: s = 1, max: c = 4, step: a = 1, count: l, setCount: e } = r, [i, u] = b.useState(!1), y = Array.from({ length: (c - s) / a + 1 }), h = (l - s) / (c - s) * 100, v = () => {
985
+ const { label: n, min: s = 1, max: c = 4, step: a = 1, count: l, setCount: e } = r, [i, u] = b.useState(!1), k = Array.from({ length: (c - s) / a + 1 }), h = (l - s) / (c - s) * 100, y = () => {
986
986
  l < c && e(l + a);
987
987
  }, j = () => {
988
988
  l > s && e(l - a);
@@ -1002,7 +1002,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1002
1002
  style: { width: `${h}%` }
1003
1003
  }
1004
1004
  ),
1005
- /* @__PURE__ */ t.jsx("div", { className: w.dots, children: y.map((_, m) => {
1005
+ /* @__PURE__ */ t.jsx("div", { className: w.dots, children: k.map((_, m) => {
1006
1006
  const P = m <= (l - s) / a;
1007
1007
  return /* @__PURE__ */ t.jsx(
1008
1008
  "button",
@@ -1054,7 +1054,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1054
1054
  /* @__PURE__ */ t.jsx(
1055
1055
  "button",
1056
1056
  {
1057
- onClick: v,
1057
+ onClick: y,
1058
1058
  disabled: l >= c,
1059
1059
  className: w.button,
1060
1060
  "aria-label": "Increment count",
@@ -1176,7 +1176,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1176
1176
  children: c
1177
1177
  }
1178
1178
  );
1179
- }, Vn = (r) => {
1179
+ }, En = (r) => {
1180
1180
  const {
1181
1181
  isActiveItems: n,
1182
1182
  setIsActiveItems: s,
@@ -1186,18 +1186,18 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1186
1186
  title: e,
1187
1187
  subtitle: i,
1188
1188
  editable: u = !0,
1189
- draggable: y = !1,
1189
+ draggable: k = !1,
1190
1190
  withImage: h = !1,
1191
- deletable: v = !0,
1191
+ deletable: y = !0,
1192
1192
  addable: j = !0,
1193
1193
  itemsType: o,
1194
1194
  itemsOptions: _
1195
1195
  } = r, [m, P] = b.useState(null), [A, N] = b.useState({
1196
1196
  top: 0,
1197
1197
  left: 0
1198
- }), [Q, D] = b.useState(!1), R = (p, k) => {
1198
+ }), [Q, D] = b.useState(!1), R = (p, v) => {
1199
1199
  const S = [...c], [C] = S.splice(p, 1);
1200
- S.splice(k, 0, C), a(S);
1200
+ S.splice(v, 0, C), a(S);
1201
1201
  };
1202
1202
  b.useEffect(() => {
1203
1203
  const p = () => {
@@ -1208,18 +1208,18 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1208
1208
  };
1209
1209
  }, []), b.useEffect(() => {
1210
1210
  if (m) {
1211
- const p = [...c].map((k) => k.id === m.id ? m : k);
1211
+ const p = [...c].map((v) => v.id === m.id ? m : v);
1212
1212
  a(p);
1213
1213
  }
1214
1214
  }, [m]);
1215
- const V = (p, k) => {
1215
+ const E = (p, v) => {
1216
1216
  p.stopPropagation();
1217
1217
  const S = p.target.getBoundingClientRect(), C = 100, F = window.innerHeight;
1218
1218
  let q = S.top + window.scrollY;
1219
1219
  q + C > F && (q = F - C - 20), D(!0), N({
1220
1220
  top: q - 80,
1221
1221
  left: S.left - 30
1222
- }), P(k);
1222
+ }), P(v);
1223
1223
  };
1224
1224
  function st(p) {
1225
1225
  if (h)
@@ -1241,9 +1241,9 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1241
1241
  }
1242
1242
  );
1243
1243
  }
1244
- const et = (p, k) => {
1244
+ const et = (p, v) => {
1245
1245
  const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1246
- y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1246
+ k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1247
1247
  x,
1248
1248
  {
1249
1249
  name: "DotsSixVertical",
@@ -1251,7 +1251,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1251
1251
  width: 20,
1252
1252
  height: 20
1253
1253
  }
1254
- ) }),
1254
+ ) }, v),
1255
1255
  o === "select" && /* @__PURE__ */ t.jsx(
1256
1256
  Y,
1257
1257
  {
@@ -1277,7 +1277,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1277
1277
  value: p.name,
1278
1278
  options: [..._.map((C) => `Product ${C.id}`)],
1279
1279
  leftAddon: st(p.images[0])
1280
- }
1280
+ },
1281
+ v
1281
1282
  ),
1282
1283
  /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1283
1284
  u && /* @__PURE__ */ t.jsx(
@@ -1287,10 +1288,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1287
1288
  hoverable: !0,
1288
1289
  width: 20,
1289
1290
  height: 20,
1290
- onClick: (C) => V(C, p)
1291
+ onClick: (C) => E(C, p)
1291
1292
  }
1292
1293
  ),
1293
- v && /* @__PURE__ */ t.jsx(
1294
+ y && /* @__PURE__ */ t.jsx(
1294
1295
  x,
1295
1296
  {
1296
1297
  name: "Trash",
@@ -1303,11 +1304,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1303
1304
  )
1304
1305
  ] })
1305
1306
  ] });
1306
- return y ? /* @__PURE__ */ t.jsx(
1307
+ return k ? /* @__PURE__ */ t.jsx(
1307
1308
  Hs,
1308
1309
  {
1309
1310
  product: p,
1310
- index: k,
1311
+ index: v,
1311
1312
  moveProduct: R,
1312
1313
  children: S
1313
1314
  },
@@ -1343,18 +1344,18 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1343
1344
  ),
1344
1345
  /* @__PURE__ */ t.jsxs("div", { className: T.products, children: [
1345
1346
  i && /* @__PURE__ */ t.jsx("h5", { className: T.subtitle, children: i }),
1346
- y ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: c.map((p, k) => et(p, k)) }) : c.map((p, k) => et(p, k)),
1347
+ k ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: c.map((p, v) => et(p, v)) }) : c.map((p, v) => et(p, v)),
1347
1348
  j && /* @__PURE__ */ t.jsxs(
1348
1349
  X,
1349
1350
  {
1350
1351
  className: T.button,
1351
1352
  size: "s",
1352
1353
  onClick: () => {
1353
- const p = [...c], k = _[0].id;
1354
+ const p = [...c], v = _[0].id;
1354
1355
  p.push({
1355
- name: `Product ${k}`,
1356
+ name: `Product ${v}`,
1356
1357
  id: tt(),
1357
- listingId: k,
1358
+ listingId: v,
1358
1359
  imagePath: "",
1359
1360
  images: [],
1360
1361
  stats: {
@@ -1380,10 +1381,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1380
1381
  ] }),
1381
1382
  l !== void 0 && /* @__PURE__ */ t.jsx(ht, { items: l })
1382
1383
  ] });
1383
- }, Rs = "_options_163bj_1", Vs = "_price_163bj_12", Es = "_oldPrice_163bj_18", zs = "_newPrice_163bj_26", Fs = "_meta_163bj_33", Us = "_info_163bj_39", Gs = "_infoRight_163bj_46", Ys = "_buttons_163bj_52", Xs = "_variants_163bj_59", Qs = "_variant_163bj_59", Ws = "_stock_163bj_74", Js = "_variantInfo_163bj_81", Ks = "_quantity_163bj_87", Zs = "_count_163bj_93", tn = "_button_163bj_52", en = "_activeVariant_163bj_110", sn = "_chargeTypes_163bj_114", nn = "_charge_163bj_114", cn = "_chargeActive_163bj_131", f = {
1384
+ }, Rs = "_options_163bj_1", Es = "_price_163bj_12", Vs = "_oldPrice_163bj_18", zs = "_newPrice_163bj_26", Fs = "_meta_163bj_33", Us = "_info_163bj_39", Gs = "_infoRight_163bj_46", Ys = "_buttons_163bj_52", Xs = "_variants_163bj_59", Qs = "_variant_163bj_59", Ws = "_stock_163bj_74", Js = "_variantInfo_163bj_81", Ks = "_quantity_163bj_87", Zs = "_count_163bj_93", tn = "_button_163bj_52", en = "_activeVariant_163bj_110", sn = "_chargeTypes_163bj_114", nn = "_charge_163bj_114", cn = "_chargeActive_163bj_131", f = {
1384
1385
  options: Rs,
1385
- price: Vs,
1386
- oldPrice: Es,
1386
+ price: Es,
1387
+ oldPrice: Vs,
1387
1388
  newPrice: zs,
1388
1389
  meta: Fs,
1389
1390
  info: Us,
@@ -1400,16 +1401,16 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1400
1401
  chargeTypes: sn,
1401
1402
  charge: nn,
1402
1403
  chargeActive: cn
1403
- }, En = (r) => {
1404
- const { variants: n } = r, [s, c] = b.useState(n[0]), a = it(), [l, e] = b.useState(1), { reset: i, addProductToCart: u, getProducts: y } = at();
1404
+ }, Vn = (r) => {
1405
+ const { variants: n } = r, [s, c] = b.useState(n[0]), a = it(), [l, e] = b.useState(1), { reset: i, addProductToCart: u, getProducts: k } = at();
1405
1406
  async function h() {
1406
- await y(), await u({
1407
+ await k(), await u({
1407
1408
  productId: r.id,
1408
1409
  productVariantId: s.id,
1409
1410
  quantity: l
1410
1411
  });
1411
1412
  }
1412
- function v() {
1413
+ function y() {
1413
1414
  i(), h(), a("/checkout");
1414
1415
  }
1415
1416
  function j(o) {
@@ -1511,7 +1512,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1511
1512
  X,
1512
1513
  {
1513
1514
  type: "Primary",
1514
- onClick: () => v(),
1515
+ onClick: () => y(),
1515
1516
  children: "Buy Now"
1516
1517
  }
1517
1518
  ),
@@ -1609,7 +1610,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1609
1610
  if (r.parts[_].productVariantId === o.variants[_].id)
1610
1611
  return r.parts[_].productVariantId;
1611
1612
  }
1612
- function y(o) {
1613
+ function k(o) {
1613
1614
  for (let _ = 0; _ < r.parts.length; _++)
1614
1615
  for (let m = 0; m < o.variants.length; m++)
1615
1616
  if (r.parts[_].productVariantId === o.variants[_].id)
@@ -1618,7 +1619,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1618
1619
  function h(o) {
1619
1620
  i(o);
1620
1621
  }
1621
- function v(o) {
1622
+ function y(o) {
1622
1623
  a({
1623
1624
  productId: o.id,
1624
1625
  productVariantId: o.activeVariantId,
@@ -1637,7 +1638,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1637
1638
  const _ = r.parts.map((A) => String(A.productId)), P = (await s([..._])).map((A) => ({
1638
1639
  ...A,
1639
1640
  activeVariantId: u(A),
1640
- quantity: y(A)
1641
+ quantity: k(A)
1641
1642
  }));
1642
1643
  e(P);
1643
1644
  })();
@@ -1712,7 +1713,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
1712
1713
  /* @__PURE__ */ t.jsx(
1713
1714
  "div",
1714
1715
  {
1715
- onClick: () => v(o),
1716
+ onClick: () => y(o),
1716
1717
  className: g.productButton,
1717
1718
  children: /* @__PURE__ */ t.jsx(
1718
1719
  x,
@@ -1770,25 +1771,26 @@ export {
1770
1771
  Yn as ChooseImageModal,
1771
1772
  Xn as ColorPicker,
1772
1773
  Dn as EmptyCart,
1774
+ Qn as ErrorableBlock,
1773
1775
  zn as HeaderButtons,
1774
1776
  x as Icon,
1775
1777
  G as Input,
1776
1778
  me as ItemsSettings,
1777
1779
  Hn as LayoutSettings,
1778
- Vn as ListingSelector,
1779
- Qn as Loader,
1780
+ En as ListingSelector,
1781
+ Wn as Loader,
1780
1782
  mt as Modal,
1781
- Wn as Picker,
1782
- En as ProductOptions,
1783
- Jn as Radio,
1783
+ Jn as Picker,
1784
+ Vn as ProductOptions,
1785
+ Kn as Radio,
1784
1786
  bs as RangeSelector,
1785
1787
  Y as Select,
1786
1788
  Sn as ShoppingButton,
1787
1789
  On as ShoppingModalCart,
1788
- Kn as Submodal,
1790
+ Zn as Submodal,
1789
1791
  z as Switch,
1790
1792
  zt as TextSettings,
1791
1793
  lt as Textarea,
1792
- Zn as Tip,
1794
+ tc as Tip,
1793
1795
  pt as TypesText
1794
1796
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@billgangcom/theme-lib",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@billgangcom/frontend-lib": "^4.0.0",
26
+ "@billgangcom/frontend-lib": "^4.0.1",
27
27
  "axios": "^1.7.7",
28
28
  "react": "^18.3.1",
29
29
  "react-dnd": "^16.0.1",