@memobit/libs 1.0.40 → 1.0.41

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/index.esm.js CHANGED
@@ -11024,7 +11024,7 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11024
11024
  }, y1 = () => {
11025
11025
  const A = new Date(z.getFullYear() + 1, z.getMonth(), 1);
11026
11026
  p ? p(A) : f(A);
11027
- }, k1 = () => {
11027
+ }, _1 = () => {
11028
11028
  const A = [];
11029
11029
  for (let j = 0; j < O1; j++) A.push(C + j);
11030
11030
  return A;
@@ -11129,7 +11129,7 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11129
11129
  })
11130
11130
  ]
11131
11131
  }), t1 = () => {
11132
- const A = k1(), j = (/* @__PURE__ */ new Date()).getFullYear(), l1 = z.getFullYear();
11132
+ const A = _1(), j = (/* @__PURE__ */ new Date()).getFullYear(), l1 = z.getFullYear();
11133
11133
  return /* @__PURE__ */ e("div", {
11134
11134
  className: "calendar__years-grid",
11135
11135
  children: A.map((m1) => /* @__PURE__ */ e("button", {
@@ -12425,11 +12425,11 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12425
12425
  }, [p, B]);
12426
12426
  const E = Z(() => {
12427
12427
  if (p || !B || !_.current || !R.current) return;
12428
- const G = _.current.getBoundingClientRect(), D = R.current.getBoundingClientRect(), Q = 16, h1 = 8, U = window.innerHeight - G.bottom - Q, d1 = G.top - Q, v1 = U < D.height && d1 > D.height ? G.top - D.height - h1 : G.bottom + h1, y1 = Math.max(Q, Math.min(v1, window.innerHeight - D.height - Q)), k1 = Math.max(Q, Math.min(G.left, window.innerWidth - D.width - Q));
12428
+ const G = _.current.getBoundingClientRect(), D = R.current.getBoundingClientRect(), Q = 16, h1 = 8, U = window.innerHeight - G.bottom - Q, d1 = G.top - Q, v1 = U < D.height && d1 > D.height ? G.top - D.height - h1 : G.bottom + h1, y1 = Math.max(Q, Math.min(v1, window.innerHeight - D.height - Q)), _1 = Math.max(Q, Math.min(G.left, window.innerWidth - D.width - Q));
12429
12429
  S({
12430
12430
  position: "fixed",
12431
12431
  top: `${y1}px`,
12432
- left: `${k1}px`,
12432
+ left: `${_1}px`,
12433
12433
  zIndex: 1100
12434
12434
  });
12435
12435
  }, [p, B]);
@@ -12649,7 +12649,7 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12649
12649
  left: 0,
12650
12650
  width: 0,
12651
12651
  maxHeight: 300
12652
- }), [D, Q] = L(!1), h1 = X(null), U = X([]), d1 = X(null), v1 = X(null), y1 = z0(), k1 = o ?? `dropdown-${y1}`, C1 = X(null);
12652
+ }), [D, Q] = L(!1), h1 = X(null), U = X([]), d1 = X(null), v1 = X(null), y1 = z0(), _1 = o ?? `dropdown-${y1}`, C1 = X(null);
12653
12653
  O(() => {
12654
12654
  if (H && x && s) {
12655
12655
  const W = new Set(N.map((r1) => r1.value)), I = [], Y = [];
@@ -12943,29 +12943,29 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12943
12943
  })
12944
12944
  });
12945
12945
  return V ? K1(W, document.body) : W;
12946
- }, _1 = !s && N.length === 1 ? N[0] : null, D1 = b && !H && !s && N.length > 0, U1 = !!(_1?.icon && !_ && !D1), J1 = !!(_1?.suffixIcon && !D1), e0 = s && C;
12946
+ }, L1 = !s && N.length === 1 ? N[0] : null, D1 = b && !H && !s && N.length > 0, U1 = !!(L1?.icon && !_ && !D1), J1 = !!(L1?.suffixIcon && !D1), e0 = s && C;
12947
12947
  return /* @__PURE__ */ c("div", {
12948
12948
  className: `dropdown-container ${h ? "dropdown-error" : ""} ${k ? "dropdown-success" : ""} ${d ? "dropdown-highlighted" : ""} ${s ? "multiple" : ""} ${a ? "disabled" : ""} ${s ? `count-display-${y}` : ""} ${l}`,
12949
12949
  ref: h1,
12950
12950
  children: [
12951
12951
  m && /* @__PURE__ */ e("label", {
12952
- htmlFor: k1,
12952
+ htmlFor: _1,
12953
12953
  className: "dropdown-label",
12954
12954
  children: m
12955
12955
  }),
12956
12956
  /* @__PURE__ */ c("div", {
12957
12957
  className: `dropdown-input-container ${U1 ? "dropdown-input-container--has-prefix-icon" : ""} ${J1 ? "dropdown-input-container--has-suffix-icon" : ""} ${e0 ? "dropdown-input-container--chips" : ""} ${e0 && i ? "dropdown-input-container--chips-multiline" : ""}`,
12958
12958
  children: [
12959
- U1 && _1?.icon && /* @__PURE__ */ e("span", {
12959
+ U1 && L1?.icon && /* @__PURE__ */ e("span", {
12960
12960
  className: "dropdown-selected-icon dropdown-selected-icon--prefix",
12961
- children: /* @__PURE__ */ e(P, { name: _1.icon })
12961
+ children: /* @__PURE__ */ e(P, { name: L1.icon })
12962
12962
  }),
12963
- D1 && _1 && /* @__PURE__ */ c("span", {
12963
+ D1 && L1 && /* @__PURE__ */ c("span", {
12964
12964
  className: "dropdown-value-chip",
12965
12965
  onClick: m1,
12966
- children: [_1.icon && /* @__PURE__ */ e(P, { name: _1.icon }), /* @__PURE__ */ e("span", {
12966
+ children: [L1.icon && /* @__PURE__ */ e(P, { name: L1.icon }), /* @__PURE__ */ e("span", {
12967
12967
  className: "dropdown-value-chip__label",
12968
- children: _1.label
12968
+ children: L1.label
12969
12969
  })]
12970
12970
  }),
12971
12971
  e0 && N.map((W) => /* @__PURE__ */ c("span", {
@@ -12986,7 +12986,7 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12986
12986
  }, `dd-chip-${W.value}`)),
12987
12987
  /* @__PURE__ */ e(V1, {
12988
12988
  ref: d1,
12989
- id: k1,
12989
+ id: _1,
12990
12990
  placeholder: D1 ? "" : N1(),
12991
12991
  value: D1 ? "" : Q1(),
12992
12992
  onChange: f || s ? l1 : () => {
@@ -13000,9 +13000,9 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
13000
13000
  /* @__PURE__ */ c("div", {
13001
13001
  className: "dropdown-actions-buttons",
13002
13002
  children: [
13003
- J1 && _1?.suffixIcon && /* @__PURE__ */ e("span", {
13003
+ J1 && L1?.suffixIcon && /* @__PURE__ */ e("span", {
13004
13004
  className: "dropdown-selected-icon dropdown-selected-icon--suffix",
13005
- children: /* @__PURE__ */ e(P, { name: _1.suffixIcon })
13005
+ children: /* @__PURE__ */ e(P, { name: L1.suffixIcon })
13006
13006
  }),
13007
13007
  (!s && N.length > 0 || s && N.length > 0) && /* @__PURE__ */ e("span", {
13008
13008
  className: "dropdown-action-button dropdown-clear-button",
@@ -13592,13 +13592,13 @@ var ya = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
13592
13592
  selected: i,
13593
13593
  onClick: () => {
13594
13594
  if (n.disabled) return;
13595
- const s = i ? l.filter((p) => p !== n.value) : [...l, n.value];
13595
+ const s = t.multiple === !1, p = s ? i ? [] : [n.value] : i ? l.filter((u) => u !== n.value) : [...l, n.value];
13596
13596
  r({
13597
13597
  filterId: t.id,
13598
13598
  type: t.type,
13599
- value: w2(s),
13599
+ value: s ? p[0] ?? null : w2(p),
13600
13600
  option: n,
13601
- options: a.filter((p) => s.includes(p.value))
13601
+ options: a.filter((u) => p.includes(u.value))
13602
13602
  });
13603
13603
  },
13604
13604
  children: [n.imageUrl && /* @__PURE__ */ e("img", {
@@ -14532,7 +14532,7 @@ function Rc({ state: t }) {
14532
14532
  });
14533
14533
  }
14534
14534
  function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1, onSelectionChange: d, selectedIds: o, pageSizeOptions: m = C2, initialPageSize: n = C2[1], showPageSize: i = !0, card: s, actions: p, actionsWidth: u, timeline: g, onRowClick: v, rowHref: w, rowClassName: f, rowDetail: M, empty: y, initialSortKey: C = null, initialSortDirection: x = "asc", sortKey: k, sortDirection: V, onSortChange: z, miniSort: b, showCardSortControls: H = !0, desktopView: S = "table", cardMaxWidth: _, className: R, onPageChange: B, onPageSizeChange: E, currentPage: F, totalItems: n1, group: N, showResultsCount: q = !0, totalCount: a1, itemNoun: G, columnSelector: D }) {
14535
- const { isMobile: Q } = g0(), [h1, U] = L(C), [d1, v1] = L(x), [y1, k1] = L([]), C1 = o ?? y1, [I1, t1] = L(1), o1 = F ?? I1, [A, j] = L(n), [l1, m1] = L(() => t.reduce(($, c1) => (c1.width && ($[c1.key] = c1.width), $), {})), [x1, M1] = L(/* @__PURE__ */ new Set()), E1 = ($) => {
14535
+ const { isMobile: Q } = g0(), [h1, U] = L(C), [d1, v1] = L(x), [y1, _1] = L([]), C1 = o ?? y1, [I1, t1] = L(1), o1 = F ?? I1, [A, j] = L(n), [l1, m1] = L(() => t.reduce(($, c1) => (c1.width && ($[c1.key] = c1.width), $), {})), [x1, M1] = L(/* @__PURE__ */ new Set()), E1 = ($) => {
14536
14536
  M1((c1) => {
14537
14537
  const p1 = new Set(c1);
14538
14538
  return p1.has($) ? p1.delete($) : p1.add($), p1;
@@ -14544,7 +14544,7 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14544
14544
  key: $,
14545
14545
  direction: c1
14546
14546
  }), Q1(1);
14547
- }, i0 = g1(() => new Set(a ?? []), [a]), _1 = g1(() => {
14547
+ }, i0 = g1(() => new Set(a ?? []), [a]), L1 = g1(() => {
14548
14548
  let $ = r;
14549
14549
  if (N1) {
14550
14550
  const K = t.find((e1) => e1.key === N1);
@@ -14553,8 +14553,8 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14553
14553
  const S1 = B1[K.key];
14554
14554
  return typeof S1 == "string" || typeof S1 == "number" ? S1 : "";
14555
14555
  }), w1 = [...r].sort((B1, S1) => {
14556
- const T1 = e1(B1), L1 = e1(S1);
14557
- return typeof T1 == "number" && typeof L1 == "number" ? T1 - L1 : String(T1).localeCompare(String(L1));
14556
+ const T1 = e1(B1), k1 = e1(S1);
14557
+ return typeof T1 == "number" && typeof k1 == "number" ? T1 - k1 : String(T1).localeCompare(String(k1));
14558
14558
  });
14559
14559
  $ = H1 === "asc" ? w1 : w1.reverse();
14560
14560
  }
@@ -14576,9 +14576,9 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14576
14576
  i0,
14577
14577
  a
14578
14578
  ]), D1 = n1 !== void 0, U1 = g1(() => {
14579
- if (!N || D1) return _1;
14579
+ if (!N || D1) return L1;
14580
14580
  const $ = /* @__PURE__ */ new Map(), c1 = [];
14581
- _1.forEach((K) => {
14581
+ L1.forEach((K) => {
14582
14582
  const e1 = N.groupBy(K), w1 = $.get(e1);
14583
14583
  w1 ? w1.push(K) : ($.set(e1, [K]), c1.push(e1));
14584
14584
  });
@@ -14595,7 +14595,7 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14595
14595
  }, [
14596
14596
  N,
14597
14597
  D1,
14598
- _1
14598
+ L1
14599
14599
  ]), J1 = D1 ? n1 : U1.length, e0 = Math.max(1, Math.ceil(J1 / A)), W = Math.min(o1, e0), I = D1 ? U1 : U1.slice((W - 1) * A, W * A), Y = q ? vc(A, J1, a1 ?? J1, W, G) : null, r1 = g1(() => {
14600
14600
  if (!N) return null;
14601
14601
  const $ = /* @__PURE__ */ new Map();
@@ -14625,15 +14625,15 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14625
14625
  id: g.idAccessor($),
14626
14626
  date: g.dateAccessor($)
14627
14627
  })), g.granularity) : /* @__PURE__ */ new Map(), [I, g]), P1 = ($) => {
14628
- o === void 0 && k1($), d?.(r.filter((c1, p1) => $.includes(G1(c1, p1))));
14628
+ o === void 0 && _1($), d?.(r.filter((c1, p1) => $.includes(G1(c1, p1))));
14629
14629
  }, D0 = ($) => {
14630
14630
  $.sortable && (N1 === $.key ? Z1($.key, H1 === "asc" ? "desc" : "asc") : Z1($.key, "asc"));
14631
14631
  }, w0 = ($, c1) => {
14632
14632
  $.preventDefault();
14633
14633
  const p1 = $.clientX, K = l1[c1] ?? 150, e1 = (B1) => {
14634
- const S1 = B1.clientX - p1, T1 = t.find((L1) => L1.key === c1)?.minWidth ?? 120;
14635
- m1((L1) => ({
14636
- ...L1,
14634
+ const S1 = B1.clientX - p1, T1 = t.find((k1) => k1.key === c1)?.minWidth ?? 120;
14635
+ m1((k1) => ({
14636
+ ...k1,
14637
14637
  [c1]: Math.max(T1, K + S1)
14638
14638
  }));
14639
14639
  }, w1 = () => {
@@ -14815,19 +14815,23 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14815
14815
  }) : /* @__PURE__ */ e(r0, { title: "No data available" })
14816
14816
  }) });
14817
14817
  const $ = C0.length + (o0 ? 1 : 0) + (h ? 1 : 0) + (p ? 1 : 0), c1 = N?.showCount !== !1, p1 = (K, e1) => {
14818
- const w1 = G1(K, e1), B1 = C1.includes(w1), S1 = i0.has(w1), T1 = N0.get(e1), L1 = w?.(K), h2 = !!v || !!L1, C3 = (b1) => {
14819
- if (L1 && (b1.metaKey || b1.ctrlKey || b1.shiftKey)) {
14820
- window.open(L1, "_blank", "noopener,noreferrer");
14818
+ const w1 = G1(K, e1), B1 = C1.includes(w1), S1 = i0.has(w1), T1 = N0.get(e1), k1 = w?.(K), h2 = !!v || !!k1, C3 = (b1) => {
14819
+ if (k1 && (b1.metaKey || b1.ctrlKey || b1.shiftKey)) {
14820
+ window.open(k1, "_blank", "noopener,noreferrer");
14821
14821
  return;
14822
14822
  }
14823
- v?.(K, b1);
14823
+ if (v) {
14824
+ v(K, b1);
14825
+ return;
14826
+ }
14827
+ k1 && window.location.assign(k1);
14824
14828
  }, y3 = (b1) => {
14825
- b1.button !== 1 || !L1 || (b1.preventDefault(), window.open(L1, "_blank", "noopener,noreferrer"));
14829
+ b1.button !== 1 || !k1 || (b1.preventDefault(), window.open(k1, "_blank", "noopener,noreferrer"));
14826
14830
  }, Z0 = M?.(K);
14827
14831
  return /* @__PURE__ */ c(u1.Fragment, { children: [/* @__PURE__ */ c("tr", {
14828
14832
  className: `${B1 ? "is-selected" : ""} ${h2 ? "data-view__row--clickable" : ""} ${S1 ? "data-view__row--pinned" : ""} ${f?.(K) || ""}`,
14829
14833
  onClick: h2 ? C3 : void 0,
14830
- onAuxClick: L1 ? y3 : void 0,
14834
+ onAuxClick: k1 ? y3 : void 0,
14831
14835
  children: [
14832
14836
  o0 && /* @__PURE__ */ e("td", {
14833
14837
  className: "data-view__timeline-cell",
@@ -14909,7 +14913,7 @@ function Ja({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14909
14913
  /* @__PURE__ */ e(f2, {
14910
14914
  currentPage: W,
14911
14915
  totalPages: e0,
14912
- totalItems: _1.length,
14916
+ totalItems: L1.length,
14913
14917
  onPageChange: Q1,
14914
14918
  pageSizeOptions: i ? m : void 0,
14915
14919
  pageSize: i ? A : void 0,
@@ -14971,7 +14975,7 @@ var t0 = (t) => {
14971
14975
  }, [b.end]);
14972
14976
  const a1 = g1(() => k0(s, 1), [s]), G = d || v, D = !d && v, Q = Z(() => {
14973
14977
  if (!D || !V.current || !z.current) return;
14974
- const U = V.current.getBoundingClientRect(), d1 = z.current.getBoundingClientRect(), v1 = 16, y1 = 8, k1 = window.innerHeight - U.bottom - v1, C1 = U.top - v1, I1 = k1 < d1.height && C1 > d1.height ? U.top - d1.height - y1 : U.bottom + y1, t1 = Math.max(v1, Math.min(I1, window.innerHeight - d1.height - v1)), o1 = U.left, A = Math.max(v1, Math.min(o1, window.innerWidth - d1.width - v1));
14978
+ const U = V.current.getBoundingClientRect(), d1 = z.current.getBoundingClientRect(), v1 = 16, y1 = 8, _1 = window.innerHeight - U.bottom - v1, C1 = U.top - v1, I1 = _1 < d1.height && C1 > d1.height ? U.top - d1.height - y1 : U.bottom + y1, t1 = Math.max(v1, Math.min(I1, window.innerHeight - d1.height - v1)), o1 = U.left, A = Math.max(v1, Math.min(o1, window.innerWidth - d1.width - v1));
14975
14979
  M({
14976
14980
  position: "fixed",
14977
14981
  top: `${t1}px`,
@@ -23024,7 +23028,7 @@ ${h.textContent ?? ""}
23024
23028
  M1.setStart(m1, 1), M1.collapse(!0), o1.removeAllRanges(), o1.addRange(M1), w();
23025
23029
  }, [f, w]), y1 = Z(() => {
23026
23030
  U("insertHTML", bl);
23027
- }, [U]), k1 = Z((t1) => {
23031
+ }, [U]), _1 = Z((t1) => {
23028
23032
  const o1 = t1.target, A = o1.closest("a");
23029
23033
  if (A) {
23030
23034
  t1.preventDefault(), H(A), h1();
@@ -23130,7 +23134,7 @@ ${h.textContent ?? ""}
23130
23134
  onInput: w,
23131
23135
  onKeyUp: h1,
23132
23136
  onMouseUp: h1,
23133
- onClick: k1,
23137
+ onClick: _1,
23134
23138
  onKeyDown: C1,
23135
23139
  onBlur: d
23136
23140
  })
@@ -26485,9 +26489,9 @@ function cn({ isOpen: t, onClose: r }) {
26485
26489
  credentials: "include",
26486
26490
  headers: v1,
26487
26491
  body: h1 ? JSON.stringify(h1) : void 0
26488
- }), k1 = await y1.json().catch(() => ({}));
26489
- if (!y1.ok) throw new Error(k1.error || "Request failed");
26490
- return k1;
26492
+ }), _1 = await y1.json().catch(() => ({}));
26493
+ if (!y1.ok) throw new Error(_1.error || "Request failed");
26494
+ return _1;
26491
26495
  }, [l.apiBaseUrl]), S = Z(async () => {
26492
26496
  h("loading"), x("");
26493
26497
  try {
@@ -27006,7 +27010,7 @@ var hn = (t, r, l) => {
27006
27010
  } catch {
27007
27011
  return t.trim();
27008
27012
  }
27009
- }, aa = "1.0.40", wn = 296, ia = "1514427", na = "2026-08-06T19:25:41.348Z", fn = "296", oa = (t) => {
27013
+ }, aa = "1.0.41", wn = 300, ia = "ec59eec", na = "2026-08-11T17:52:09.065Z", fn = "300", oa = (t) => {
27010
27014
  const r = document.getElementById("mb-version-toast");
27011
27015
  if (r) {
27012
27016
  r.remove();
@@ -27030,7 +27034,7 @@ var hn = (t, r, l) => {
27030
27034
  const r = {
27031
27035
  ...t,
27032
27036
  lib: aa,
27033
- libBuildNumber: 296,
27037
+ libBuildNumber: 300,
27034
27038
  libCommit: ia,
27035
27039
  libBuildDate: na
27036
27040
  };
package/dist/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.0.40",
3
- "buildNumber": 296,
4
- "commit": "1514427",
5
- "buildDate": "2026-08-06T19:25:41.348Z"
2
+ "version": "1.0.41",
3
+ "buildNumber": 300,
4
+ "commit": "ec59eec",
5
+ "buildDate": "2026-08-11T17:52:09.065Z"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memobit/libs",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "React component library powering the Memobit apps — 100+ components, 470+ icons, 70+ themes, helpers and hooks. TypeScript-first, ESM-only, React 19.",
5
5
  "keywords": [
6
6
  "react",
@@ -166,14 +166,17 @@
166
166
  "vite-plugin-static-copy": "3.4.0"
167
167
  },
168
168
  "dependencies": {
169
- "qrcode.react": "^4.2.0"
169
+ "qrcode.react": "4.2.0"
170
170
  },
171
171
  "overrides": {
172
- "brace-expansion@1": "1.1.16",
173
- "brace-expansion@5": "5.0.8",
172
+ "brace-expansion@1": "1.1.18",
173
+ "brace-expansion@5": "5.0.9",
174
+ "fast-uri@3": "3.1.5",
174
175
  "immutable": "5.1.9",
175
176
  "js-yaml": "4.3.0",
177
+ "minimatch@10": "10.2.6",
176
178
  "picomatch@2": "2.3.2",
179
+ "postcss": "8.5.26",
177
180
  "esbuild": "0.28.1"
178
181
  }
179
182
  }