@versini/ui-table 3.0.11 → 3.0.12

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 +72 -72
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import o from "clsx";
2
- import { jsx as l, jsxs as y, Fragment as W } from "react/jsx-runtime";
2
+ import { jsx as i, jsxs as y, Fragment as A } from "react/jsx-runtime";
3
3
  import T, { useContext as p } from "react";
4
4
  /*!
5
- @versini/ui-table v3.0.11
5
+ @versini/ui-table v3.0.12
6
6
  © 2025 gizmette.com
7
7
  */
8
8
  try {
9
9
  window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
10
- version: "3.0.11",
11
- buildTime: "01/14/2025 10:39 AM EST",
10
+ version: "3.0.12",
11
+ buildTime: "01/16/2025 07:57 PM EST",
12
12
  homepage: "https://github.com/aversini/ui-components",
13
13
  license: "MIT"
14
14
  });
@@ -17,7 +17,7 @@ try {
17
17
  const _ = "thead", C = "tfoot", u = "tbody", f = {
18
18
  ASC: "asc",
19
19
  DESC: "desc"
20
- }, P = ({
20
+ }, W = ({
21
21
  mode: e,
22
22
  className: a,
23
23
  wrapperClassName: t,
@@ -136,12 +136,12 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
136
136
  labelLeft: r,
137
137
  align: s
138
138
  }) => {
139
- const i = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
139
+ const l = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
140
140
  switch (e) {
141
141
  case S:
142
142
  case N:
143
143
  return o({
144
- [i]: a === "small",
144
+ [l]: a === "small",
145
145
  [d]: a === "medium",
146
146
  [c]: a === "large"
147
147
  });
@@ -164,20 +164,20 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
164
164
  labelRight: t,
165
165
  labelLeft: r
166
166
  }) => {
167
- const s = "text-sm font-medium", i = "text-base font-medium", d = "text-lg font-medium";
167
+ const s = "text-sm font-medium", l = "text-base font-medium", d = "text-lg font-medium";
168
168
  switch (e) {
169
169
  case S:
170
170
  case N:
171
171
  return o({
172
172
  "text-center": e === N,
173
173
  [s]: a === "small",
174
- [i]: a === "medium",
174
+ [l]: a === "medium",
175
175
  [d]: a === "large"
176
176
  });
177
177
  case B:
178
178
  return o({
179
179
  [s]: a === "small" && (t || r),
180
- [i]: a === "medium" && (t || r),
180
+ [l]: a === "medium" && (t || r),
181
181
  [d]: a === "large" && (t || r)
182
182
  });
183
183
  }
@@ -356,7 +356,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
356
356
  raw: t,
357
357
  mode: r,
358
358
  focusMode: s,
359
- disabled: i,
359
+ disabled: l,
360
360
  fullWidth: d,
361
361
  size: c,
362
362
  noBorder: n,
@@ -387,11 +387,11 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
387
387
  J({ type: e, size: c, labelRight: g, labelLeft: b }),
388
388
  ee({ mode: r, variant: h, noBorder: n }),
389
389
  te({ focusMode: s }),
390
- Z({ mode: r, variant: h, disabled: i }),
391
- $({ mode: r, variant: h, disabled: i }),
390
+ Z({ mode: r, variant: h, disabled: l }),
391
+ $({ mode: r, variant: h, disabled: l }),
392
392
  {
393
393
  "w-full": d,
394
- "disabled:cursor-not-allowed disabled:opacity-50": i
394
+ "disabled:cursor-not-allowed disabled:opacity-50": l
395
395
  },
396
396
  a
397
397
  )), re = (e, a, t) => {
@@ -399,12 +399,12 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
399
399
  !a && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((r = e == null ? void 0 : e.currentTarget) == null ? void 0 : r.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
400
400
  }, E = T.forwardRef((e, a) => {
401
401
  const { onClick: t, noInternalClick: r = !1, ...s } = e;
402
- return /* @__PURE__ */ l(
402
+ return /* @__PURE__ */ i(
403
403
  "button",
404
404
  {
405
405
  ref: a,
406
- onClick: (i) => {
407
- re(i, r, t);
406
+ onClick: (l) => {
407
+ re(l, r, t);
408
408
  },
409
409
  ...s
410
410
  }
@@ -412,13 +412,13 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
412
412
  });
413
413
  E.displayName = "BaseButton";
414
414
  /*!
415
- @versini/ui-button v4.0.10
415
+ @versini/ui-button v4.1.0
416
416
  © 2025 gizmette.com
417
417
  */
418
418
  try {
419
419
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
420
- version: "4.0.10",
421
- buildTime: "01/14/2025 10:39 AM EST",
420
+ version: "4.1.0",
421
+ buildTime: "01/16/2025 07:57 PM EST",
422
422
  homepage: "https://github.com/aversini/ui-components",
423
423
  license: "MIT"
424
424
  });
@@ -431,7 +431,7 @@ const R = T.forwardRef(
431
431
  mode: t = "system",
432
432
  focusMode: r = "system",
433
433
  fullWidth: s = !1,
434
- className: i,
434
+ className: l,
435
435
  type: d = "button",
436
436
  raw: c = !1,
437
437
  noBorder: n = !1,
@@ -445,15 +445,15 @@ const R = T.forwardRef(
445
445
  active: L = !1,
446
446
  radius: M = "large",
447
447
  ...V
448
- }, A) => {
449
- const U = ae({
448
+ }, U) => {
449
+ const O = ae({
450
450
  type: B,
451
451
  mode: t,
452
452
  focusMode: r,
453
453
  fullWidth: s,
454
454
  disabled: a,
455
455
  raw: c,
456
- className: i,
456
+ className: l,
457
457
  noBorder: n,
458
458
  size: m,
459
459
  labelRight: h,
@@ -461,7 +461,7 @@ const R = T.forwardRef(
461
461
  noBackground: x,
462
462
  align: w,
463
463
  radius: M
464
- }), O = o({
464
+ }), P = o({
465
465
  "text-copy-accent-dark": t === "light" && !c,
466
466
  "text-copy-light": t === "dark" && !c,
467
467
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !c,
@@ -483,19 +483,19 @@ const R = T.forwardRef(
483
483
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
484
484
  }
485
485
  ) : "";
486
- return /* @__PURE__ */ l("div", { className: j, children: /* @__PURE__ */ y(
486
+ return /* @__PURE__ */ i("div", { className: j, children: /* @__PURE__ */ y(
487
487
  E,
488
488
  {
489
- ref: A,
490
- className: U,
489
+ ref: U,
490
+ className: O,
491
491
  disabled: a,
492
492
  type: d,
493
493
  "aria-label": g || b,
494
494
  ...V,
495
495
  children: [
496
- v && /* @__PURE__ */ l("span", { className: "pr-2", children: v }),
497
- /* @__PURE__ */ l("div", { className: O, children: e }),
498
- h && /* @__PURE__ */ l("span", { className: "pl-2", children: h })
496
+ v && /* @__PURE__ */ i("span", { className: "pr-2", children: v }),
497
+ /* @__PURE__ */ i("div", { className: P, children: e }),
498
+ h && /* @__PURE__ */ i("span", { className: "pl-2", children: h })
499
499
  ]
500
500
  }
501
501
  ) });
@@ -508,14 +508,14 @@ const z = ({
508
508
  viewBox: t,
509
509
  className: r,
510
510
  defaultViewBox: s,
511
- size: i,
511
+ size: l,
512
512
  title: d,
513
513
  semantic: c = !1,
514
514
  ...n
515
515
  }) => {
516
- const g = o(i, r);
517
- return /* @__PURE__ */ y(W, { children: [
518
- /* @__PURE__ */ l(
516
+ const g = o(l, r);
517
+ return /* @__PURE__ */ y(A, { children: [
518
+ /* @__PURE__ */ i(
519
519
  "svg",
520
520
  {
521
521
  xmlns: "http://www.w3.org/2000/svg",
@@ -529,17 +529,17 @@ const z = ({
529
529
  children: e
530
530
  }
531
531
  ),
532
- d && c && /* @__PURE__ */ l("span", { className: "sr-only", children: d })
532
+ d && c && /* @__PURE__ */ i("span", { className: "sr-only", children: d })
533
533
  ] });
534
534
  };
535
535
  /*!
536
- @versini/ui-svgicon v4.0.3
536
+ @versini/ui-svgicon v4.0.4
537
537
  © 2025 gizmette.com
538
538
  */
539
539
  try {
540
540
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
541
- version: "4.0.3",
542
- buildTime: "01/14/2025 10:39 AM EST",
541
+ version: "4.0.4",
542
+ buildTime: "01/16/2025 07:57 PM EST",
543
543
  homepage: "https://github.com/aversini/ui-components",
544
544
  license: "MIT"
545
545
  });
@@ -561,7 +561,7 @@ const se = ({
561
561
  title: t || "Sort",
562
562
  ...s,
563
563
  children: [
564
- /* @__PURE__ */ l(
564
+ /* @__PURE__ */ i(
565
565
  "path",
566
566
  {
567
567
  className: "fa-secondary",
@@ -569,7 +569,7 @@ const se = ({
569
569
  d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3 384 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0c6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96C432.4 35.1 424.2 32 416 32s-16.4 3.1-22.6 9.4l-96 96z"
570
570
  }
571
571
  ),
572
- /* @__PURE__ */ l(
572
+ /* @__PURE__ */ i(
573
573
  "path",
574
574
  {
575
575
  className: "fa-primary",
@@ -594,7 +594,7 @@ const se = ({
594
594
  title: t || "Sort Down",
595
595
  ...s,
596
596
  children: [
597
- /* @__PURE__ */ l(
597
+ /* @__PURE__ */ i(
598
598
  "path",
599
599
  {
600
600
  className: "fa-secondary",
@@ -602,7 +602,7 @@ const se = ({
602
602
  d: "M288 64c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32z"
603
603
  }
604
604
  ),
605
- /* @__PURE__ */ l(
605
+ /* @__PURE__ */ i(
606
606
  "path",
607
607
  {
608
608
  className: "fa-primary",
@@ -611,7 +611,7 @@ const se = ({
611
611
  )
612
612
  ]
613
613
  }
614
- ), le = ({
614
+ ), ie = ({
615
615
  className: e,
616
616
  viewBox: a,
617
617
  title: t,
@@ -627,7 +627,7 @@ const se = ({
627
627
  title: t || "Sort Up",
628
628
  ...s,
629
629
  children: [
630
- /* @__PURE__ */ l(
630
+ /* @__PURE__ */ i(
631
631
  "path",
632
632
  {
633
633
  className: "fa-secondary",
@@ -635,7 +635,7 @@ const se = ({
635
635
  d: "M288 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32z"
636
636
  }
637
637
  ),
638
- /* @__PURE__ */ l(
638
+ /* @__PURE__ */ i(
639
639
  "path",
640
640
  {
641
641
  className: "fa-primary",
@@ -646,13 +646,13 @@ const se = ({
646
646
  }
647
647
  );
648
648
  /*!
649
- @versini/ui-icons v4.4.2
649
+ @versini/ui-icons v4.4.3
650
650
  © 2025 gizmette.com
651
651
  */
652
652
  try {
653
653
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
654
- version: "4.4.2",
655
- buildTime: "01/14/2025 10:39 AM EST",
654
+ version: "4.4.3",
655
+ buildTime: "01/16/2025 07:57 PM EST",
656
656
  homepage: "https://github.com/aversini/ui-components",
657
657
  license: "MIT"
658
658
  });
@@ -670,25 +670,25 @@ const k = T.createContext({
670
670
  caption: t,
671
671
  compact: r,
672
672
  summary: s,
673
- className: i,
673
+ className: l,
674
674
  wrapperClassName: d,
675
675
  maxHeight: c,
676
676
  stickyHeader: n,
677
677
  stickyFooter: g,
678
678
  ...b
679
679
  }) => {
680
- const m = P({
680
+ const m = W({
681
681
  mode: a,
682
- className: i,
682
+ className: l,
683
683
  wrapperClassName: d,
684
684
  stickyHeader: n,
685
685
  stickyFooter: g
686
686
  });
687
- return /* @__PURE__ */ l(
687
+ return /* @__PURE__ */ i(
688
688
  k.Provider,
689
689
  {
690
690
  value: { mode: a, stickyHeader: n, stickyFooter: g, compact: r },
691
- children: /* @__PURE__ */ l(
691
+ children: /* @__PURE__ */ i(
692
692
  "div",
693
693
  {
694
694
  className: m.wrapper,
@@ -696,7 +696,7 @@ const k = T.createContext({
696
696
  style: { maxHeight: c }
697
697
  },
698
698
  children: /* @__PURE__ */ y("table", { className: m.table, summary: s, ...b, children: [
699
- t && /* @__PURE__ */ l("caption", { className: m.caption, children: t }),
699
+ t && /* @__PURE__ */ i("caption", { className: m.caption, children: t }),
700
700
  e
701
701
  ] })
702
702
  }
@@ -715,7 +715,7 @@ const k = T.createContext({
715
715
  mode: r.mode,
716
716
  stickyHeader: r.stickyHeader
717
717
  });
718
- return /* @__PURE__ */ l("thead", { className: s, ...t, children: e });
718
+ return /* @__PURE__ */ i("thead", { className: s, ...t, children: e });
719
719
  }, be = ({
720
720
  children: e,
721
721
  className: a,
@@ -728,10 +728,10 @@ const k = T.createContext({
728
728
  mode: r.mode,
729
729
  stickyFooter: r.stickyFooter
730
730
  });
731
- return /* @__PURE__ */ l("tfoot", { className: s, ...t, children: e });
731
+ return /* @__PURE__ */ i("tfoot", { className: s, ...t, children: e });
732
732
  }, me = ({ children: e, ...a }) => {
733
733
  const t = p(k);
734
- return t.cellWrapper = u, /* @__PURE__ */ l("tbody", { ...a, children: e });
734
+ return t.cellWrapper = u, /* @__PURE__ */ i("tbody", { ...a, children: e });
735
735
  }, ue = ({
736
736
  children: e,
737
737
  className: a,
@@ -742,29 +742,29 @@ const k = T.createContext({
742
742
  cellWrapper: r.cellWrapper,
743
743
  className: a
744
744
  });
745
- return /* @__PURE__ */ l("tr", { className: s, ...t, children: e });
746
- }, ie = ({
745
+ return /* @__PURE__ */ i("tr", { className: s, ...t, children: e });
746
+ }, le = ({
747
747
  children: e,
748
748
  component: a,
749
749
  className: t,
750
750
  align: r,
751
751
  ...s
752
752
  }) => {
753
- const i = p(k), d = a || (i.cellWrapper === _ ? "th" : "td"), { mainClasses: c, alignClasses: n } = Y({
754
- cellWrapper: i.cellWrapper,
753
+ const l = p(k), d = a || (l.cellWrapper === _ ? "th" : "td"), { mainClasses: c, alignClasses: n } = Y({
754
+ cellWrapper: l.cellWrapper,
755
755
  className: t,
756
- mode: i.mode,
757
- compact: i.compact,
756
+ mode: l.mode,
757
+ compact: l.compact,
758
758
  align: r
759
759
  });
760
- return r ? /* @__PURE__ */ l(d, { className: c, ...s, children: /* @__PURE__ */ l("div", { className: n, children: e }) }) : /* @__PURE__ */ l(d, { className: c, ...s, children: e });
760
+ return r ? /* @__PURE__ */ i(d, { className: c, ...s, children: /* @__PURE__ */ i("div", { className: n, children: e }) }) : /* @__PURE__ */ i(d, { className: c, ...s, children: e });
761
761
  }, ye = ({
762
762
  align: e,
763
763
  children: a,
764
764
  buttonClassName: t,
765
765
  className: r,
766
766
  component: s,
767
- focusMode: i = "alt-system",
767
+ focusMode: l = "alt-system",
768
768
  mode: d = "alt-system",
769
769
  onClick: c,
770
770
  sortDirection: n,
@@ -773,15 +773,15 @@ const k = T.createContext({
773
773
  ...m
774
774
  }) => {
775
775
  const h = q({ buttonClassName: t });
776
- return /* @__PURE__ */ l(
777
- ie,
776
+ return /* @__PURE__ */ i(
777
+ le,
778
778
  {
779
779
  component: s,
780
780
  className: r,
781
781
  role: "columnheader",
782
782
  "aria-sort": n === f.ASC && g === b ? "ascending" : n === f.DESC && g === b ? "descending" : "other",
783
783
  ...m,
784
- children: /* @__PURE__ */ l(
784
+ children: /* @__PURE__ */ i(
785
785
  R,
786
786
  {
787
787
  active: g === b,
@@ -789,11 +789,11 @@ const k = T.createContext({
789
789
  onClick: c,
790
790
  align: e,
791
791
  noBorder: !0,
792
- focusMode: i,
792
+ focusMode: l,
793
793
  mode: d,
794
794
  fullWidth: !0,
795
795
  labelRight: a,
796
- children: n === f.ASC && g === b ? /* @__PURE__ */ l(le, { className: "size-4", monotone: !0 }) : n === f.DESC && g === b ? /* @__PURE__ */ l(oe, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(se, { className: "size-4", monotone: !0 })
796
+ children: n === f.ASC && g === b ? /* @__PURE__ */ i(ie, { className: "size-4", monotone: !0 }) : n === f.DESC && g === b ? /* @__PURE__ */ i(oe, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ i(se, { className: "size-4", monotone: !0 })
797
797
  }
798
798
  )
799
799
  }
@@ -802,7 +802,7 @@ const k = T.createContext({
802
802
  export {
803
803
  ge as Table,
804
804
  me as TableBody,
805
- ie as TableCell,
805
+ le as TableCell,
806
806
  ye as TableCellSort,
807
807
  f as TableCellSortDirections,
808
808
  be as TableFooter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-table",
3
- "version": "3.0.11",
3
+ "version": "3.0.12",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -38,17 +38,17 @@
38
38
  "react-dom": "^18.3.1 || ^19.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@versini/ui-types": "4.1.0"
41
+ "@versini/ui-types": "4.2.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@tailwindcss/typography": "0.5.16",
45
- "@versini/ui-button": "4.0.10",
46
- "@versini/ui-icons": "4.4.2",
45
+ "@versini/ui-button": "4.1.0",
46
+ "@versini/ui-icons": "4.4.3",
47
47
  "clsx": "2.1.1",
48
48
  "tailwindcss": "3.4.17"
49
49
  },
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "4c958ec69e74cca8bba692d7988f47151f39f2b7"
53
+ "gitHead": "2be4fd5fe7dd74804533efdedcc6cfa4023a739a"
54
54
  }