@versini/ui-table 3.1.10 → 3.1.11

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.
Files changed (2) hide show
  1. package/dist/index.js +68 -68
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import o from "clsx";
2
2
  import { jsx as i, jsxs as _, Fragment as se } from "react/jsx-runtime";
3
- import I, { useRef as w, useLayoutEffect as $, useMemo as H, useState as oe, useEffect as q, useCallback as le, useContext as N } from "react";
3
+ import I, { useRef as w, useLayoutEffect as D, useMemo as q, useState as oe, useEffect as G, useCallback as le, useContext as N } from "react";
4
4
  /*!
5
- @versini/ui-table v3.1.10
5
+ @versini/ui-table v3.1.11
6
6
  © 2025 gizmette.com
7
7
  */
8
8
  try {
9
9
  window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
10
- version: "3.1.10",
11
- buildTime: "03/05/2025 01:31 PM EST",
10
+ version: "3.1.11",
11
+ buildTime: "03/10/2025 02:05 PM EDT",
12
12
  homepage: "https://github.com/aversini/ui-components",
13
13
  license: "MIT"
14
14
  });
@@ -129,7 +129,7 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
129
129
  )
130
130
  }), he = ({
131
131
  buttonClassName: e
132
- }) => o("rounded-none text-sm", e), F = "av-button", S = "icon", G = "button", O = "link", be = ({
132
+ }) => o("rounded-none text-sm", e), F = "av-button", E = "icon", $ = "button", O = "link", be = ({
133
133
  type: e,
134
134
  size: a,
135
135
  labelRight: t,
@@ -139,14 +139,14 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
139
139
  }) => {
140
140
  const n = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
141
141
  switch (e) {
142
- case G:
142
+ case $:
143
143
  case O:
144
144
  return o({
145
145
  [n]: a === "small",
146
146
  [d]: a === "medium",
147
147
  [c]: a === "large"
148
148
  });
149
- case S:
149
+ case E:
150
150
  return o("flex items-center", {
151
151
  "justify-center": s === "center",
152
152
  "justify-start": s === "left",
@@ -173,7 +173,7 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
173
173
  }) => {
174
174
  const s = "text-sm font-medium", l = "text-base font-medium", n = "text-lg font-medium";
175
175
  switch (e) {
176
- case G:
176
+ case $:
177
177
  case O:
178
178
  return o({
179
179
  "text-center": e === O,
@@ -181,7 +181,7 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
181
181
  [l]: a === "medium",
182
182
  [n]: a === "large"
183
183
  });
184
- case S:
184
+ case E:
185
185
  return o({
186
186
  [s]: a === "small" && (t || r),
187
187
  [l]: a === "medium" && (t || r),
@@ -254,13 +254,13 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
254
254
  if (t === "selected")
255
255
  return "bg-action-selected-dark";
256
256
  }
257
- }, fe = ({
257
+ }, ke = ({
258
258
  radius: e
259
259
  }) => o({
260
260
  "rounded-full": e === "large",
261
261
  "rounded-md": e === "medium",
262
262
  "rounded-sm": e === "small"
263
- }), ke = ({
263
+ }), fe = ({
264
264
  mode: e,
265
265
  disabled: a,
266
266
  variant: t
@@ -388,7 +388,7 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
388
388
  noBackground: h,
389
389
  variant: b,
390
390
  noTruncate: y,
391
- align: E,
391
+ align: S,
392
392
  radius: z,
393
393
  animated: C
394
394
  }) => (b || (b = "primary"), t ? o(F, a) : o(
@@ -400,26 +400,26 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
400
400
  noTruncate: y
401
401
  }),
402
402
  ye({ mode: r, noBackground: h, variant: b }),
403
- fe({ radius: z }),
403
+ ke({ radius: z }),
404
404
  be({
405
405
  type: e,
406
406
  size: d,
407
407
  labelRight: g,
408
408
  labelLeft: m,
409
- align: E,
409
+ align: S,
410
410
  animated: C
411
411
  }),
412
412
  me({ type: e, size: d, labelRight: g, labelLeft: m }),
413
413
  pe({ mode: r, variant: b, noBorder: c }),
414
414
  _e({ focusMode: s }),
415
- ke({ mode: r, variant: b, disabled: l }),
415
+ fe({ mode: r, variant: b, disabled: l }),
416
416
  ve({ mode: r, variant: b, disabled: l }),
417
417
  {
418
418
  "w-full": n,
419
419
  "disabled:cursor-not-allowed disabled:opacity-50": l
420
420
  },
421
421
  o({
422
- "transition-[width] duration-300 ease-in-out": e === S && C
422
+ "transition-[width] duration-300 ease-in-out": e === E && C
423
423
  }),
424
424
  a
425
425
  )), Ce = (e, a, t) => {
@@ -441,12 +441,12 @@ const R = "thead", P = "tfoot", p = "tbody", B = {
441
441
  X.displayName = "BaseButton";
442
442
  function Te() {
443
443
  const e = w(!1);
444
- return q(() => (e.current = !0, () => {
444
+ return G(() => (e.current = !0, () => {
445
445
  e.current = !1;
446
446
  }), []), le(() => e.current, []);
447
447
  }
448
448
  function Be(e) {
449
- return H(() => e.every((a) => a == null) ? () => {
449
+ return q(() => e.every((a) => a == null) ? () => {
450
450
  } : (a) => {
451
451
  e.forEach((t) => {
452
452
  typeof t == "function" ? t(a) : t != null && (t.current = a);
@@ -464,13 +464,13 @@ const Ie = {
464
464
  right: 0
465
465
  };
466
466
  function A(e) {
467
- const a = Te(), t = w(0), r = w(null), [s, l] = oe(Ie), n = H(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
467
+ const a = Te(), t = w(0), r = w(null), [s, l] = oe(Ie), n = q(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
468
468
  const c = d[0];
469
469
  c && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
470
470
  r.current && a() && l(c.contentRect);
471
471
  }));
472
472
  }), [a]);
473
- return q(() => (r.current && (n == null || n.observe(r.current, e)), () => {
473
+ return G(() => (r.current && (n == null || n.observe(r.current, e)), () => {
474
474
  n == null || n.disconnect(), t.current && cancelAnimationFrame(t.current);
475
475
  }), [n, e]), [r, s];
476
476
  }
@@ -481,14 +481,14 @@ const Re = {
481
481
  // w-8
482
482
  large: 48
483
483
  // w-12
484
- }, Se = {
484
+ }, Ee = {
485
485
  small: 8 * 2,
486
486
  // px-2 x 2
487
487
  medium: 12 * 2,
488
488
  // px-3 x 2
489
489
  large: 16 * 2
490
490
  // px-4 x 2
491
- }, Ee = 2, Y = I.forwardRef(
491
+ }, Se = 2, Y = I.forwardRef(
492
492
  ({
493
493
  children: e,
494
494
  disabled: a = !1,
@@ -504,16 +504,16 @@ const Re = {
504
504
  size: h = "medium",
505
505
  labelRight: b,
506
506
  labelLeft: y,
507
- noBackground: E = !1,
507
+ noBackground: S = !1,
508
508
  align: z = "center",
509
509
  radius: C = "large",
510
510
  variant: J = "primary",
511
511
  iconClassName: K,
512
- animated: f = !1,
512
+ animated: k = !1,
513
513
  ...Q
514
514
  }, ee) => {
515
515
  const te = Ne({
516
- type: S,
516
+ type: E,
517
517
  mode: t,
518
518
  focusMode: r,
519
519
  fullWidth: s,
@@ -524,25 +524,25 @@ const Re = {
524
524
  size: h,
525
525
  labelRight: b,
526
526
  labelLeft: y,
527
- noBackground: E,
527
+ noBackground: S,
528
528
  align: z,
529
529
  radius: C,
530
530
  variant: J,
531
- animated: f
532
- }), ae = xe({ mode: t, raw: d, iconClassName: K }), j = we({ animated: f }), [u, V] = A(), [k, M] = A(), [T, W] = A(), L = w(0), v = w(null), re = Be([ee, v]);
533
- return $(() => {
534
- T && T.current && f && (L.current = W.width + Se[h] + (c ? 0 : Ee));
535
- }, [W, T, h, c, f]), $(() => {
536
- v && v.current && f && (b && u && V.width > 0 ? (u.current && (u.current.style.opacity = "100"), v.current.style.width = `${V.width + L.current}px`) : y && M.width > 0 ? (k.current && (k.current.style.opacity = "100"), v.current.style.width = `${M.width + L.current}px`) : (u.current && (u.current.style.opacity = "0"), k.current && (k.current.style.opacity = "0"), v.current.style.width = `${Re[h]}px`));
531
+ animated: k
532
+ }), ae = xe({ mode: t, raw: d, iconClassName: K }), j = we({ animated: k }), [u, V] = A(), [f, M] = A(), [T, W] = A(), L = w(0), v = w(null), re = Be([ee, v]);
533
+ return D(() => {
534
+ T && T.current && k && (L.current = W.width + Ee[h] + (c ? 0 : Se));
535
+ }, [W, T, h, c, k]), D(() => {
536
+ v && v.current && k && (b && u && V.width > 0 ? (u.current && (u.current.style.opacity = "100"), v.current.style.width = `${V.width + L.current}px`) : y && M.width > 0 ? (f.current && (f.current.style.opacity = "100"), v.current.style.width = `${M.width + L.current}px`) : (u.current && (u.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"), v.current.style.width = `${Re[h]}px`));
537
537
  }, [
538
538
  V,
539
539
  b,
540
540
  u,
541
541
  M,
542
542
  y,
543
- k,
543
+ f,
544
544
  h,
545
- f
545
+ k
546
546
  ]), /* @__PURE__ */ _(
547
547
  X,
548
548
  {
@@ -554,17 +554,17 @@ const Re = {
554
554
  ...Q,
555
555
  children: [
556
556
  /* @__PURE__ */ i(
557
- D,
557
+ H,
558
558
  {
559
559
  label: y,
560
- labelRef: k,
560
+ labelRef: f,
561
561
  labelClass: j,
562
562
  labelInnerClass: "pr-2"
563
563
  }
564
564
  ),
565
565
  /* @__PURE__ */ i("span", { ref: T, className: ae, children: e }),
566
566
  /* @__PURE__ */ i(
567
- D,
567
+ H,
568
568
  {
569
569
  label: b,
570
570
  labelRef: u,
@@ -576,7 +576,7 @@ const Re = {
576
576
  }
577
577
  );
578
578
  }
579
- ), D = ({
579
+ ), H = ({
580
580
  labelRef: e,
581
581
  labelClass: a,
582
582
  label: t,
@@ -584,13 +584,13 @@ const Re = {
584
584
  }) => /* @__PURE__ */ i("span", { ref: e, className: a, children: t && /* @__PURE__ */ i("span", { className: r, children: t }) });
585
585
  Y.displayName = "ButtonIcon";
586
586
  /*!
587
- @versini/ui-button v4.2.10
587
+ @versini/ui-button v4.2.11
588
588
  © 2025 gizmette.com
589
589
  */
590
590
  try {
591
591
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
592
- version: "4.2.10",
593
- buildTime: "03/05/2025 01:30 PM EST",
592
+ version: "4.2.11",
593
+ buildTime: "03/10/2025 02:04 PM EDT",
594
594
  homepage: "https://github.com/aversini/ui-components",
595
595
  license: "MIT"
596
596
  });
@@ -647,32 +647,32 @@ const U = ({
647
647
  ...c
648
648
  }) => {
649
649
  const g = o(l, r);
650
- return /* @__PURE__ */ _(se, { children: [
651
- /* @__PURE__ */ i(
652
- "svg",
653
- {
654
- xmlns: "http://www.w3.org/2000/svg",
655
- className: g,
656
- viewBox: t || s,
657
- fill: a || "currentColor",
658
- role: "img",
659
- "aria-hidden": !d,
660
- focusable: !1,
661
- ...c,
662
- children: e
663
- }
664
- ),
665
- n && d && /* @__PURE__ */ i("span", { className: "sr-only", children: n })
666
- ] });
650
+ return /* @__PURE__ */ i(se, { children: /* @__PURE__ */ _(
651
+ "svg",
652
+ {
653
+ xmlns: "http://www.w3.org/2000/svg",
654
+ className: g,
655
+ viewBox: t || s,
656
+ fill: a || "currentColor",
657
+ role: "img",
658
+ "aria-hidden": !d,
659
+ focusable: !1,
660
+ ...c,
661
+ children: [
662
+ n && d && /* @__PURE__ */ i("title", { children: n }),
663
+ e
664
+ ]
665
+ }
666
+ ) });
667
667
  };
668
668
  /*!
669
- @versini/ui-svgicon v4.0.7
669
+ @versini/ui-svgicon v4.1.1
670
670
  © 2025 gizmette.com
671
671
  */
672
672
  try {
673
673
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
674
- version: "4.0.7",
675
- buildTime: "01/20/2025 01:49 PM EST",
674
+ version: "4.1.1",
675
+ buildTime: "02/27/2025 03:46 PM EST",
676
676
  homepage: "https://github.com/aversini/ui-components",
677
677
  license: "MIT"
678
678
  });
@@ -758,13 +758,13 @@ const ze = ({
758
758
  }
759
759
  );
760
760
  /*!
761
- @versini/ui-icons v4.6.1
761
+ @versini/ui-icons v4.8.1
762
762
  © 2025 gizmette.com
763
763
  */
764
764
  try {
765
765
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
766
- version: "4.6.1",
767
- buildTime: "01/21/2025 01:33 PM EST",
766
+ version: "4.8.1",
767
+ buildTime: "02/27/2025 03:46 PM EST",
768
768
  homepage: "https://github.com/aversini/ui-components",
769
769
  license: "MIT"
770
770
  });
@@ -841,7 +841,7 @@ const x = I.createContext({
841
841
  stickyFooter: r.stickyFooter
842
842
  });
843
843
  return /* @__PURE__ */ i("tfoot", { className: s, ...t, children: e });
844
- }, $e = ({ children: e, ...a }) => {
844
+ }, De = ({ children: e, ...a }) => {
845
845
  const t = N(x);
846
846
  return t.cellWrapper = p, /* @__PURE__ */ i("tbody", { ...a, children: e });
847
847
  }, Fe = ({
@@ -870,7 +870,7 @@ const x = I.createContext({
870
870
  align: r
871
871
  });
872
872
  return r ? /* @__PURE__ */ i(n, { className: d, ...s, children: /* @__PURE__ */ i("div", { className: c, children: e }) }) : /* @__PURE__ */ i(n, { className: d, ...s, children: e });
873
- }, De = ({
873
+ }, He = ({
874
874
  align: e,
875
875
  children: a,
876
876
  buttonClassName: t,
@@ -913,9 +913,9 @@ const x = I.createContext({
913
913
  };
914
914
  export {
915
915
  Ue as Table,
916
- $e as TableBody,
916
+ De as TableBody,
917
917
  Le as TableCell,
918
- De as TableCellSort,
918
+ He as TableCellSort,
919
919
  B as TableCellSortDirections,
920
920
  We as TableFooter,
921
921
  je as TableHead,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-table",
3
- "version": "3.1.10",
3
+ "version": "3.1.11",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,17 +39,17 @@
39
39
  "react-dom": "^18.3.1 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@versini/ui-types": "4.5.2"
42
+ "@versini/ui-types": "4.5.3"
43
43
  },
44
44
  "dependencies": {
45
45
  "@tailwindcss/typography": "0.5.16",
46
- "@versini/ui-button": "4.2.10",
47
- "@versini/ui-icons": "*",
46
+ "@versini/ui-button": "4.2.11",
47
+ "@versini/ui-icons": "4.8.1",
48
48
  "clsx": "2.1.1",
49
49
  "tailwindcss": "3.4.17"
50
50
  },
51
51
  "sideEffects": [
52
52
  "**/*.css"
53
53
  ],
54
- "gitHead": "9e5d6d4b86a1c509628c6e5ea0a101921cd8eb78"
54
+ "gitHead": "fc7e720b770c5ee2e8537eabf9b2f458dba07696"
55
55
  }