@proef/common-ui 2.6.22 → 2.6.24

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 (27) hide show
  1. package/dist/esm/index.js +5 -0
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/v1/capabilities/calendar/useDateSelection.js +115 -0
  4. package/dist/esm/v1/capabilities/calendar/useDateSelection.js.map +1 -0
  5. package/dist/esm/v1/capabilities/documents/QRScanning/scanQRCodes.js.map +1 -1
  6. package/dist/esm/v1/components/data/MonthCalendar/MonthCalendar.js +64 -16
  7. package/dist/esm/v1/components/data/MonthCalendar/MonthCalendar.js.map +1 -1
  8. package/dist/esm/v1/components/documents/DocumentDropzone/DocumentDropzone.js.map +1 -1
  9. package/dist/esm/v1/components/overlays/ContextMenu/ContextMenu.js +115 -0
  10. package/dist/esm/v1/components/overlays/ContextMenu/ContextMenu.js.map +1 -0
  11. package/dist/esm/v1/components/tables/Table/ColumnFilter.js +24 -24
  12. package/dist/esm/v1/components/tables/Table/ColumnFilter.js.map +1 -1
  13. package/dist/esm/v1/components/tables/Table/OverlayScrollbar.js +1 -1
  14. package/dist/esm/v1/components/tables/Table/OverlayScrollbar.js.map +1 -1
  15. package/dist/esm/v1/components/tables/Table/Table.js +51 -51
  16. package/dist/esm/v1/components/tables/Table/Table.js.map +1 -1
  17. package/dist/esm/v1/primitives/documents/PdfPreview/PdfPreview.js.map +1 -1
  18. package/dist/esm/v1/primitives/documents/PdfPreview/pdfjs.js.map +1 -1
  19. package/dist/style.components.css +2 -2
  20. package/dist/style.css +2 -2
  21. package/dist/style.layered.css +2 -2
  22. package/dist/theme.css +13 -0
  23. package/dist/types/v1/capabilities/calendar/useDateSelection.d.ts +30 -0
  24. package/dist/types/v1/components/data/MonthCalendar/MonthCalendar.d.ts +30 -2
  25. package/dist/types/v1/components/overlays/ContextMenu/ContextMenu.d.ts +46 -0
  26. package/dist/types/v1/index.d.ts +5 -1
  27. package/package.json +1 -1
@@ -50,7 +50,7 @@ function TableBase({
50
50
  onMoveColumn: onMoverColuna,
51
51
  measureAllData: larguraPeloConjunto = false,
52
52
  overlayScrollbars: barraSobreposta = false,
53
- headerRowClassName: classeCabecalho = "bg-slate-50",
53
+ headerRowClassName: classeCabecalho = "bg-slate-50 dark:bg-slate-900",
54
54
  scrollbarOnEdge: barraNaBorda = true,
55
55
  bordered: comCaixa = false,
56
56
  resizableColumns: redimensionavel = false,
@@ -68,7 +68,7 @@ function TableBase({
68
68
  const [realcada, setRealcada] = useState(null);
69
69
  const alvoArrasto = useRef(void 0);
70
70
  const recuoFim = (i) => barraSobreposta && i === columns.length - 1 ? "pr-6!" : "";
71
- const realce = (chave, cabecalho2 = false) => realcada === chave ? fixaMedida(chave) ? "" : `${cabecalho2 ? "bg-proef-blue/15" : "bg-proef-blue/5"} shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]` : cabecalho2 && fundoNosTitulos ? "bg-slate-50" : "";
71
+ const realce = (chave, cabecalho2 = false) => realcada === chave ? fixaMedida(chave) ? "" : `${cabecalho2 ? "bg-proef-blue/15" : "bg-proef-blue/5"} shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]` : cabecalho2 && fundoNosTitulos ? "bg-slate-50 dark:bg-slate-900" : "";
72
72
  const bordasSeparadas = !!onMoverColuna;
73
73
  const fundoNosTitulos = bordasSeparadas && !preencheAltura;
74
74
  const classeTabela = bordasSeparadas ? "text-left border-separate border-spacing-0" : "text-left";
@@ -591,20 +591,20 @@ function TableBase({
591
591
  for (const th of Array.from(cabecalhoRef.current?.children ?? [])) ro.observe(th);
592
592
  return () => ro.disconnect();
593
593
  }, [nFixas, columns, data, esquerdas]);
594
- const fundoLinha = (k) => `${selectable && selectedKeys.has(k) ? "bg-[#f2fdf9]" : "bg-white"} group-hover/linha:bg-slate-50`;
594
+ const fundoLinha = (k) => `${selectable && selectedKeys.has(k) ? "bg-[#f2fdf9] dark:bg-[#062a20]" : "bg-white dark:bg-slate-950"} group-hover/linha:bg-slate-50 dark:group-hover/linha:bg-slate-900`;
595
595
  const cabecaFixa = (i) => {
596
596
  const realcadaAqui = realcada !== null && realcada === chaveDoIndice(i);
597
597
  const linhaDeBaixo = bordasSeparadas && !fundoNosTitulos;
598
598
  const f = fixa(
599
599
  i,
600
- realcadaAqui ? "bg-[color-mix(in_srgb,var(--color-proef-blue)_15%,var(--color-slate-50))]" : "bg-slate-50",
601
- realcadaAqui ? linhaDeBaixo ? "shadow-[inset_0_-2px_0_0_var(--color-slate-200),inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]" : "shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]" : linhaDeBaixo ? "shadow-[inset_0_-2px_0_0_var(--color-slate-200)]" : ""
600
+ realcadaAqui ? "bg-[color-mix(in_srgb,var(--color-proef-blue)_15%,var(--tbl-s50))]" : "bg-slate-50 dark:bg-slate-900",
601
+ realcadaAqui ? linhaDeBaixo ? "shadow-[inset_0_-2px_0_0_var(--tbl-s200),inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]" : "shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]" : linhaDeBaixo ? "shadow-[inset_0_-2px_0_0_var(--tbl-s200)]" : ""
602
602
  );
603
603
  return { className: f.className, style: f.style ? { ...f.style, zIndex: 30 } : void 0 };
604
604
  };
605
- const filetesFixos = bordasSeparadas ? "[tr+tr>&]:shadow-[inset_0_1px_0_0_var(--color-slate-100)]" : "";
606
- const fundoRealceFixa = "bg-[color-mix(in_srgb,var(--color-proef-blue)_5%,white)]";
607
- const filetesRealceFixa = bordasSeparadas ? "shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)] [tr+tr>&]:shadow-[inset_0_1px_0_0_var(--color-slate-100),inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]" : "shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]";
605
+ const filetesFixos = bordasSeparadas ? "[tr+tr>&]:shadow-[inset_0_1px_0_0_var(--tbl-s100)]" : "";
606
+ const fundoRealceFixa = "bg-[color-mix(in_srgb,var(--color-proef-blue)_5%,var(--tbl-white))]";
607
+ const filetesRealceFixa = bordasSeparadas ? "shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)] [tr+tr>&]:shadow-[inset_0_1px_0_0_var(--tbl-s100),inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]" : "shadow-[inset_1px_0_0_0_rgb(0_118_206/0.35),inset_-1px_0_0_0_rgb(0_118_206/0.35)]";
608
608
  const chaveDoIndice = (i) => columns[i - (selectable ? 1 : 0)]?.key;
609
609
  const fixaMedida = (chave) => {
610
610
  const i = columns.findIndex((c) => c.key === chave) + (selectable ? 1 : 0);
@@ -621,7 +621,7 @@ function TableBase({
621
621
  // A borda marca onde acaba o bloco congelado, e só aparece quando
622
622
  // há mesmo colunas a passar por baixo (rolado para o lado): parada,
623
623
  // era uma linha a mais sem razão à vista.
624
- className: `${fundo} ${filete} ${i === nFixas - 1 && roladoLado ? "border-r border-slate-200" : ""}`
624
+ className: `${fundo} ${filete} ${i === nFixas - 1 && roladoLado ? "border-r border-slate-200 dark:border-slate-700" : ""}`
625
625
  } : { style: void 0, className: "" };
626
626
  };
627
627
  const renderGroupNodes = (nodes, depth) => {
@@ -629,7 +629,7 @@ function TableBase({
629
629
  const isCollapsed = collapsedGroups.has(node.path);
630
630
  const hasChildren = node.children.length > 0;
631
631
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
632
- /* @__PURE__ */ jsx("tr", { className: "bg-slate-50/80 cursor-pointer select-none", onClick: () => toggleCollapse(node.path), children: /* @__PURE__ */ jsx("td", { colSpan: colCount, className: "px-4 py-1.5 border-b border-t border-slate-100", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", style: { paddingLeft: depth * 16 }, children: [
632
+ /* @__PURE__ */ jsx("tr", { className: "bg-slate-50/80 dark:bg-slate-900/80 cursor-pointer select-none", onClick: () => toggleCollapse(node.path), children: /* @__PURE__ */ jsx("td", { colSpan: colCount, className: "px-4 py-1.5 border-b border-t border-slate-100 dark:border-slate-800", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", style: { paddingLeft: depth * 16 }, children: [
633
633
  /* @__PURE__ */ jsx(
634
634
  ChevronRightIcon,
635
635
  {
@@ -638,7 +638,7 @@ function TableBase({
638
638
  }
639
639
  ),
640
640
  /* @__PURE__ */ jsx("span", { className: "text-micro font-black uppercase tracking-[0.15em] text-proef-blue/70", children: node.val }),
641
- /* @__PURE__ */ jsxs("span", { className: "text-micro text-slate-400 ml-1", children: [
641
+ /* @__PURE__ */ jsxs("span", { className: "text-micro text-slate-400 dark:text-slate-500 ml-1", children: [
642
642
  "(",
643
643
  node.items.length,
644
644
  ")"
@@ -649,12 +649,12 @@ function TableBase({
649
649
  {
650
650
  onClick: () => onRowClick?.(row),
651
651
  onDoubleClick: () => onRowDoubleClick?.(row),
652
- className: `group/linha hover:bg-slate-50 transition-colors ${onRowClick || onRowDoubleClick ? "cursor-pointer" : ""} ${selectable && selectedKeys.has(rowKey(row)) ? "bg-proef-turquoise/5" : ""} ${rowClassName?.(row) ?? ""}`,
652
+ className: `group/linha hover:bg-slate-50 dark:hover:bg-slate-900 transition-colors ${onRowClick || onRowDoubleClick ? "cursor-pointer" : ""} ${selectable && selectedKeys.has(rowKey(row)) ? "bg-proef-turquoise/5" : ""} ${rowClassName?.(row) ?? ""}`,
653
653
  children: [
654
654
  selectable && /* @__PURE__ */ jsx("td", { style: fixa(0, fundoLinha(rowKey(row))).style, className: `px-4 py-3 ${fixa(0, fundoLinha(rowKey(row))).className}`, onClick: (e) => {
655
655
  e.stopPropagation();
656
656
  toggleRow(rowKey(row));
657
- }, children: /* @__PURE__ */ jsx("div", { className: `w-4 h-4 flex items-center justify-center rounded-sm border transition-colors ${selectedKeys.has(rowKey(row)) ? "bg-primary border-primary" : "border-slate-300 hover:border-slate-400"}`, children: selectedKeys.has(rowKey(row)) && /* @__PURE__ */ jsx(CheckIcon, { size: 9, strokeWidth: 3, className: "text-white" }) }) }),
657
+ }, children: /* @__PURE__ */ jsx("div", { className: `w-4 h-4 flex items-center justify-center rounded-sm border transition-colors ${selectedKeys.has(rowKey(row)) ? "bg-primary border-primary" : "border-slate-300 dark:border-slate-600 hover:border-slate-400 dark:hover:border-slate-500"}`, children: selectedKeys.has(rowKey(row)) && /* @__PURE__ */ jsx(CheckIcon, { size: 9, strokeWidth: 3, className: "text-white" }) }) }),
658
658
  columns.map((col, i) => {
659
659
  const f = fixa(i + (selectable ? 1 : 0), fundoLinha(rowKey(row)));
660
660
  return /* @__PURE__ */ jsx("td", { style: f.style, className: `px-3 py-1.5 ${col.cellClassName ?? ""} ${f.className} ${recuoFim(i)} ${realce(col.key)} ${transicaoRealce}`, "data-col": col.key, children: col.render(row) }, col.key);
@@ -924,8 +924,8 @@ function TableBase({
924
924
  ) : null;
925
925
  const grupoColunas = largurasVista ? /* @__PURE__ */ jsx("colgroup", { children: chavesVista.map((k) => /* @__PURE__ */ jsx("col", { style: { width: largurasVista[k] } }, k)) }) : null;
926
926
  const estiloTabela = largurasVista ? { tableLayout: "fixed", width: chavesVista.reduce((a, k) => a + (largurasVista[k] ?? 0), 0), minWidth: "100%" } : { width: "max-content" };
927
- const cabecalho = (fixoNoTopo) => /* @__PURE__ */ jsx("thead", { className: fixoNoTopo ? "sticky top-0 z-20" : void 0, children: /* @__PURE__ */ jsxs("tr", { ref: cabecalhoRef, className: `text-micro font-black uppercase text-slate-400 tracking-[0.15em] ${!bordasSeparadas ? "border-b-2 border-slate-200 bg-slate-50" : fundoNosTitulos ? "[&>th]:border-b-2 [&>th]:border-slate-200" : "shadow-[inset_0_-2px_0_0_var(--color-slate-200)]"}`, children: [
928
- selectable && /* @__PURE__ */ jsx("th", { style: cabecaFixa(0).style, className: `px-4 py-3 w-10 ${fundoNosTitulos ? "bg-slate-50" : ""} ${cabecaFixa(0).className}`, children: /* @__PURE__ */ jsx("button", { onClick: toggleAll, className: `w-4 h-4 flex items-center justify-center rounded-sm border transition-colors ${allVisibleSelected ? "bg-primary border-primary" : someVisibleSelected ? "bg-slate-300 border-slate-300" : "border-slate-300 hover:border-slate-400"}`, children: (allVisibleSelected || someVisibleSelected) && /* @__PURE__ */ jsx(CheckIcon, { size: 9, strokeWidth: 3, className: "text-white" }) }) }),
927
+ const cabecalho = (fixoNoTopo) => /* @__PURE__ */ jsx("thead", { className: fixoNoTopo ? "sticky top-0 z-20" : void 0, children: /* @__PURE__ */ jsxs("tr", { ref: cabecalhoRef, className: `text-micro font-black uppercase text-slate-400 dark:text-slate-500 tracking-[0.15em] ${!bordasSeparadas ? "border-b-2 border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900" : fundoNosTitulos ? "[&>th]:border-b-2 [&>th]:border-slate-200 dark:[&>th]:border-slate-700" : "shadow-[inset_0_-2px_0_0_var(--tbl-s200)]"}`, children: [
928
+ selectable && /* @__PURE__ */ jsx("th", { style: cabecaFixa(0).style, className: `px-4 py-3 w-10 ${fundoNosTitulos ? "bg-slate-50 dark:bg-slate-900" : ""} ${cabecaFixa(0).className}`, children: /* @__PURE__ */ jsx("button", { onClick: toggleAll, className: `w-4 h-4 flex items-center justify-center rounded-sm border transition-colors ${allVisibleSelected ? "bg-primary border-primary" : someVisibleSelected ? "bg-slate-300 dark:bg-slate-600 border-slate-300 dark:border-slate-600" : "border-slate-300 dark:border-slate-600 hover:border-slate-400 dark:hover:border-slate-500"}`, children: (allVisibleSelected || someVisibleSelected) && /* @__PURE__ */ jsx(CheckIcon, { size: 9, strokeWidth: 3, className: "text-white" }) }) }),
929
929
  columns.map((col, i) => {
930
930
  const canSort = col.sortable !== false && !!col.value;
931
931
  const canFilter = col.filterable !== false && !!col.value;
@@ -959,7 +959,7 @@ function TableBase({
959
959
  }
960
960
  },
961
961
  title: isSortActive && sortDir === "desc" ? L.resetSort : void 0,
962
- className: `flex items-center gap-0.5 transition-colors hover:text-slate-700 ${isSortActive ? "text-proef-blue" : ""}`,
962
+ className: `flex items-center gap-0.5 transition-colors hover:text-slate-700 dark:hover:text-slate-200 ${isSortActive ? "text-proef-blue" : ""}`,
963
963
  children: [
964
964
  /* @__PURE__ */ jsx("span", { children: col.label }),
965
965
  isSortActive && sortDir === "asc" ? /* @__PURE__ */ jsx(ChevronUpIcon, { size: 11 }) : isSortActive && sortDir === "desc" ? /* @__PURE__ */ jsx(ChevronDownIcon, { size: 11 }) : /* @__PURE__ */ jsx(ChevronsUpDownIcon, { size: 11, className: "opacity-50 group-hover/hdr:opacity-100" })
@@ -973,7 +973,7 @@ function TableBase({
973
973
  title: isColGrouped ? L.ungroupBy(col.label) : L.groupBy(col.label),
974
974
  "aria-label": isColGrouped ? L.ungroupBy(col.label) : L.groupBy(col.label),
975
975
  "aria-pressed": isColGrouped,
976
- className: `p-0.5 rounded transition-colors ${isColGrouped ? "text-violet-600 bg-violet-100 opacity-100" : "text-slate-400 opacity-50 group-hover/hdr:opacity-100 hover:text-slate-600"}`,
976
+ className: `p-0.5 rounded transition-colors ${isColGrouped ? "text-violet-600 bg-violet-100 opacity-100" : "text-slate-400 dark:text-slate-500 opacity-50 group-hover/hdr:opacity-100 hover:text-slate-600 dark:hover:text-slate-300"}`,
977
977
  children: /* @__PURE__ */ jsx(LayersIcon, { size: 10 })
978
978
  }
979
979
  ),
@@ -994,7 +994,7 @@ function TableBase({
994
994
  title: L.filterBy(col.label),
995
995
  "aria-label": L.filterBy(col.label),
996
996
  "aria-expanded": isFilterOpen,
997
- className: `p-0.5 transition-colors ${isFiltered || isFilterOpen ? "text-proef-blue opacity-100" : "text-slate-400 opacity-50 group-hover/hdr:opacity-100 hover:text-slate-600"}`,
997
+ className: `p-0.5 transition-colors ${isFiltered || isFilterOpen ? "text-proef-blue opacity-100" : "text-slate-400 dark:text-slate-500 opacity-50 group-hover/hdr:opacity-100 hover:text-slate-600 dark:hover:text-slate-300"}`,
998
998
  children: /* @__PURE__ */ jsx(FilterIcon, { size: 10 })
999
999
  }
1000
1000
  ),
@@ -1060,7 +1060,7 @@ function TableBase({
1060
1060
  title: L.filterBy(sf.label),
1061
1061
  "aria-label": L.filterBy(sf.label),
1062
1062
  "aria-expanded": isEfOpen,
1063
- className: `p-0.5 transition-colors ${isEfFiltered || isEfOpen ? "text-violet-600 opacity-100" : "text-slate-300 opacity-40 group-hover/hdr:opacity-90 hover:text-slate-500"}`,
1063
+ className: `p-0.5 transition-colors ${isEfFiltered || isEfOpen ? "text-violet-600 opacity-100" : "text-slate-300 dark:text-slate-600 opacity-40 group-hover/hdr:opacity-90 hover:text-slate-500 dark:hover:text-slate-400"}`,
1064
1064
  children: /* @__PURE__ */ jsx(FilterIcon, { size: 9 })
1065
1065
  }
1066
1066
  ),
@@ -1110,23 +1110,23 @@ function TableBase({
1110
1110
  ] }) });
1111
1111
  const LARGURAS_ESQUELETO = ["w-3/4", "w-1/2", "w-2/3", "w-5/6", "w-2/5"];
1112
1112
  const linhasEsqueleto = Array.from({ length: 20 }, (_, r) => /* @__PURE__ */ jsxs("tr", { "aria-hidden": true, className: "animate-pulse motion-reduce:animate-none", children: [
1113
- selectable && /* @__PURE__ */ jsx("td", { style: fixa(0, "bg-white").style, className: `px-4 py-3 ${fixa(0, "bg-white").className}`, children: /* @__PURE__ */ jsx("div", { className: "w-4 h-4 rounded-sm border border-slate-200 bg-slate-50" }) }),
1113
+ selectable && /* @__PURE__ */ jsx("td", { style: fixa(0, "bg-white dark:bg-slate-950").style, className: `px-4 py-3 ${fixa(0, "bg-white dark:bg-slate-950").className}`, children: /* @__PURE__ */ jsx("div", { className: "w-4 h-4 rounded-sm border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900" }) }),
1114
1114
  columns.map((col, i) => {
1115
- const f = fixa(i + (selectable ? 1 : 0), "bg-white");
1116
- return /* @__PURE__ */ jsx("td", { style: f.style, className: `px-3 py-2.5 ${f.className} ${recuoFim(i)}`, children: /* @__PURE__ */ jsx("div", { className: `h-2 bg-slate-200 ${LARGURAS_ESQUELETO[(r + i) % LARGURAS_ESQUELETO.length]} ${/text-right/.test(col.cellClassName ?? "") ? "ml-auto" : /text-center/.test(col.cellClassName ?? "") ? "mx-auto" : ""}` }) }, col.key);
1115
+ const f = fixa(i + (selectable ? 1 : 0), "bg-white dark:bg-slate-950");
1116
+ return /* @__PURE__ */ jsx("td", { style: f.style, className: `px-3 py-2.5 ${f.className} ${recuoFim(i)}`, children: /* @__PURE__ */ jsx("div", { className: `h-2 bg-slate-200 dark:bg-slate-700 ${LARGURAS_ESQUELETO[(r + i) % LARGURAS_ESQUELETO.length]} ${/text-right/.test(col.cellClassName ?? "") ? "ml-auto" : /text-center/.test(col.cellClassName ?? "") ? "mx-auto" : ""}` }) }, col.key);
1117
1117
  })
1118
1118
  ] }, `esqueleto-${r}`));
1119
- const corpo = /* @__PURE__ */ jsx("tbody", { className: bordasSeparadas ? "[&>tr+tr]:shadow-[inset_0_1px_0_0_var(--color-slate-100)]" : "divide-y divide-slate-100", children: aCarregar ? esqueletoAoCarregar ? linhasEsqueleto : null : isGrouped ? /* @__PURE__ */ jsx(Fragment, { children: renderGroupNodes(groups, 0) }) : paginatedData.map((row) => /* @__PURE__ */ jsxs(
1119
+ const corpo = /* @__PURE__ */ jsx("tbody", { className: bordasSeparadas ? "[&>tr+tr]:shadow-[inset_0_1px_0_0_var(--tbl-s100)]" : "divide-y divide-slate-100 dark:divide-slate-800", children: aCarregar ? esqueletoAoCarregar ? linhasEsqueleto : null : isGrouped ? /* @__PURE__ */ jsx(Fragment, { children: renderGroupNodes(groups, 0) }) : paginatedData.map((row) => /* @__PURE__ */ jsxs(
1120
1120
  "tr",
1121
1121
  {
1122
1122
  onClick: () => onRowClick?.(row),
1123
1123
  onDoubleClick: () => onRowDoubleClick?.(row),
1124
- className: `group/linha hover:bg-slate-50 transition-colors ${onRowClick || onRowDoubleClick ? "cursor-pointer" : ""} ${selectable && selectedKeys.has(rowKey(row)) ? "bg-proef-turquoise/5" : ""} ${rowClassName?.(row) ?? ""}`,
1124
+ className: `group/linha hover:bg-slate-50 dark:hover:bg-slate-900 transition-colors ${onRowClick || onRowDoubleClick ? "cursor-pointer" : ""} ${selectable && selectedKeys.has(rowKey(row)) ? "bg-proef-turquoise/5" : ""} ${rowClassName?.(row) ?? ""}`,
1125
1125
  children: [
1126
1126
  selectable && /* @__PURE__ */ jsx("td", { style: fixa(0, fundoLinha(rowKey(row))).style, className: `px-4 py-3 ${fixa(0, fundoLinha(rowKey(row))).className}`, onClick: (e) => {
1127
1127
  e.stopPropagation();
1128
1128
  toggleRow(rowKey(row));
1129
- }, children: /* @__PURE__ */ jsx("div", { className: `w-4 h-4 flex items-center justify-center rounded-sm border transition-colors ${selectedKeys.has(rowKey(row)) ? "bg-primary border-primary" : "border-slate-300 hover:border-slate-400"}`, children: selectedKeys.has(rowKey(row)) && /* @__PURE__ */ jsx(CheckIcon, { size: 9, strokeWidth: 3, className: "text-white" }) }) }),
1129
+ }, children: /* @__PURE__ */ jsx("div", { className: `w-4 h-4 flex items-center justify-center rounded-sm border transition-colors ${selectedKeys.has(rowKey(row)) ? "bg-primary border-primary" : "border-slate-300 dark:border-slate-600 hover:border-slate-400 dark:hover:border-slate-500"}`, children: selectedKeys.has(rowKey(row)) && /* @__PURE__ */ jsx(CheckIcon, { size: 9, strokeWidth: 3, className: "text-white" }) }) }),
1130
1130
  columns.map((col, i) => {
1131
1131
  const f = fixa(i + (selectable ? 1 : 0), fundoLinha(rowKey(row)));
1132
1132
  return /* @__PURE__ */ jsx("td", { style: f.style, className: `px-3 py-1.5 ${col.cellClassName ?? ""} ${f.className} ${recuoFim(i)} ${realce(col.key)} ${transicaoRealce}`, "data-col": col.key, children: col.render(row) }, col.key);
@@ -1140,10 +1140,10 @@ function TableBase({
1140
1140
  loadingLabel ? /* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: loadingLabel }) : null
1141
1141
  ) : semLinhas ? /* @__PURE__ */ jsx("div", { className: "sticky left-0 w-full flex-1 py-10 flex flex-col items-center justify-center gap-3 text-center", children: aCarregar ? /* @__PURE__ */ jsxs(Fragment, { children: [
1142
1142
  /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-7 w-7 animate-spin rounded-full border-2 border-current border-t-transparent text-proef-turquoise" }),
1143
- loadingLabel && /* @__PURE__ */ jsx("span", { className: "text-xs font-bold uppercase tracking-widest text-slate-400", children: loadingLabel })
1143
+ loadingLabel && /* @__PURE__ */ jsx("span", { className: "text-xs font-bold uppercase tracking-widest text-slate-400 dark:text-slate-500", children: loadingLabel })
1144
1144
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1145
- /* @__PURE__ */ jsx("p", { className: "text-slate-600 font-bold text-sm", children: vazio }),
1146
- emptySubLabel && /* @__PURE__ */ jsx("p", { className: "text-slate-400 text-xs -mt-1", children: emptySubLabel })
1145
+ /* @__PURE__ */ jsx("p", { className: "text-slate-600 dark:text-slate-300 font-bold text-sm", children: vazio }),
1146
+ emptySubLabel && /* @__PURE__ */ jsx("p", { className: "text-slate-400 dark:text-slate-500 text-xs -mt-1", children: emptySubLabel })
1147
1147
  ] }) }) : null;
1148
1148
  const temRodape = !paginacaoNoTopo && isClientMode && !isGrouped && !!pageSize && internalTotalPages > 1;
1149
1149
  const topo = paginacaoNoTopo;
@@ -1156,7 +1156,7 @@ function TableBase({
1156
1156
  const contagem = filtradaTopo ? filteredData.length : totalTopo;
1157
1157
  const topoACarregar = !!isLoading && data.length === 0;
1158
1158
  const numerosPagina = totalPaginasTopo <= 7 ? Array.from({ length: totalPaginasTopo }, (_, i) => i + 1) : paginaTopo <= 4 ? [1, 2, 3, 4, 5, "…", totalPaginasTopo] : paginaTopo >= totalPaginasTopo - 3 ? [1, "…", ...Array.from({ length: 5 }, (_, i) => totalPaginasTopo - 4 + i)] : [1, "…", paginaTopo - 1, paginaTopo, paginaTopo + 1, "…", totalPaginasTopo];
1159
- const esqueletoTopo = /* @__PURE__ */ jsx("span", { className: "inline-block h-2 w-8 rounded-sm bg-slate-200 animate-pulse motion-reduce:animate-none", "aria-hidden": true });
1159
+ const esqueletoTopo = /* @__PURE__ */ jsx("span", { className: "inline-block h-2 w-8 rounded-sm bg-slate-200 dark:bg-slate-700 animate-pulse motion-reduce:animate-none", "aria-hidden": true });
1160
1160
  const nomeDoFiltro = (colKey) => columns.find((c) => c.key === colKey)?.label ?? columns.flatMap((c) => c.extraFilters ?? []).find((f) => f.key === colKey)?.label ?? colKey;
1161
1161
  const itemChip = (chave, tipo, rotulo, valor, remover) => ({ chave, tipo, rotulo, valor, remover, texto: tipo === "grupo" ? `${rotulo} ${valor}` : `${rotulo}: ${valor}` });
1162
1162
  const textoData = (r) => r.from && r.to ? `${r.from} → ${r.to}` : r.from ? `≥ ${r.from}` : `≤ ${r.to}`;
@@ -1176,10 +1176,10 @@ function TableBase({
1176
1176
  // escondia linhas sem nada à vista que o dissesse.
1177
1177
  ...Object.entries(numFilters).filter(([, r]) => numFilterActive(r)).map(([k, r]) => itemChip(`n-${k}`, "filtro", nomeDoFiltro(k), textoNum(r), () => clearColumnFilter(k)))
1178
1178
  ];
1179
- const chip = (it, focavel = true) => /* @__PURE__ */ jsxs("div", { className: "shrink-0 whitespace-nowrap h-7 flex items-center gap-1.5 pl-2.5 pr-1 rounded-md border border-slate-200 bg-white text-caption", children: [
1180
- it.tipo === "grupo" && /* @__PURE__ */ jsx(LayersIcon, { size: 12, className: "text-slate-400" }),
1181
- /* @__PURE__ */ jsx("span", { className: "text-slate-500", children: it.rotulo }),
1182
- /* @__PURE__ */ jsx("span", { className: "font-semibold text-slate-800", children: it.valor }),
1179
+ const chip = (it, focavel = true) => /* @__PURE__ */ jsxs("div", { className: "shrink-0 whitespace-nowrap h-7 flex items-center gap-1.5 pl-2.5 pr-1 rounded-md border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-950 text-caption", children: [
1180
+ it.tipo === "grupo" && /* @__PURE__ */ jsx(LayersIcon, { size: 12, className: "text-slate-400 dark:text-slate-500" }),
1181
+ /* @__PURE__ */ jsx("span", { className: "text-slate-500 dark:text-slate-400", children: it.rotulo }),
1182
+ /* @__PURE__ */ jsx("span", { className: "font-semibold text-slate-800 dark:text-slate-100", children: it.valor }),
1183
1183
  /* @__PURE__ */ jsx(
1184
1184
  "button",
1185
1185
  {
@@ -1187,12 +1187,12 @@ function TableBase({
1187
1187
  tabIndex: focavel ? void 0 : -1,
1188
1188
  "aria-label": L.removeChip(it.texto),
1189
1189
  onClick: it.remover,
1190
- className: "h-5 w-5 flex items-center justify-center rounded text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700",
1190
+ className: "h-5 w-5 flex items-center justify-center rounded text-slate-400 dark:text-slate-500 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-700 dark:hover:text-slate-200",
1191
1191
  children: /* @__PURE__ */ jsx(CloseIcon, { size: 10 })
1192
1192
  }
1193
1193
  )
1194
1194
  ] }, it.chave);
1195
- const classeLimpar = "shrink-0 whitespace-nowrap text-caption font-medium text-slate-500 hover:text-red-600 transition-colors";
1195
+ const classeLimpar = "shrink-0 whitespace-nowrap text-caption font-medium text-slate-500 dark:text-slate-400 hover:text-red-600 transition-colors";
1196
1196
  const chipsGrupo = isGrouped ? /* @__PURE__ */ jsxs(Fragment, { children: [
1197
1197
  itensChips.filter((i) => i.tipo === "grupo").map((i) => chip(i)),
1198
1198
  /* @__PURE__ */ jsx("button", { type: "button", onClick: clearAllGroups, className: classeLimpar, children: L.clearGroups })
@@ -1201,7 +1201,7 @@ function TableBase({
1201
1201
  itensChips.filter((i) => i.tipo === "filtro").map((i) => chip(i)),
1202
1202
  /* @__PURE__ */ jsx("button", { type: "button", onClick: clearAllFilters, className: classeLimpar, children: L.clearAll })
1203
1203
  ] }) : null;
1204
- const classeMais = "shrink-0 whitespace-nowrap h-7 px-2 rounded-md border border-slate-200 bg-slate-50 text-caption font-semibold text-slate-600 hover:bg-slate-100 transition-colors";
1204
+ const classeMais = "shrink-0 whitespace-nowrap h-7 px-2 rounded-md border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900 text-caption font-semibold text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors";
1205
1205
  const meioRef = useRef(null);
1206
1206
  const medidaChipsRef = useRef(null);
1207
1207
  const limparRef = useRef(null);
@@ -1255,10 +1255,10 @@ function TableBase({
1255
1255
  useEffect(() => {
1256
1256
  if (!chipsEscondidos.length) setMaisAberto(false);
1257
1257
  }, [chipsEscondidos.length]);
1258
- const barraTopo = topo ? /* @__PURE__ */ jsxs("div", { className: "px-4 py-2 bg-white border-b border-slate-200 flex items-center justify-between gap-3 text-caption text-slate-500 shrink-0", children: [
1258
+ const barraTopo = topo ? /* @__PURE__ */ jsxs("div", { className: "px-4 py-2 bg-white dark:bg-slate-950 border-b border-slate-200 dark:border-slate-700 flex items-center justify-between gap-3 text-caption text-slate-500 dark:text-slate-400 shrink-0", children: [
1259
1259
  /* @__PURE__ */ jsxs("div", { className: "shrink-0 flex items-center gap-3", children: [
1260
1260
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
1261
- topoACarregar ? esqueletoTopo : /* @__PURE__ */ jsx("span", { className: "font-semibold text-slate-800 tabular-nums", children: contagem }),
1261
+ topoACarregar ? esqueletoTopo : /* @__PURE__ */ jsx("span", { className: "font-semibold text-slate-800 dark:text-slate-100 tabular-nums", children: contagem }),
1262
1262
  filtradaTopo && !topoACarregar && /* @__PURE__ */ jsxs(Fragment, { children: [
1263
1263
  L.of,
1264
1264
  " ",
@@ -1273,11 +1273,11 @@ function TableBase({
1273
1273
  value: pageSize,
1274
1274
  onChange: (e) => topo.onPageSizeChange(Number(e.target.value)),
1275
1275
  "aria-label": L.pageSize,
1276
- className: "h-7 appearance-none rounded-md border border-slate-200 bg-white pl-2.5 pr-7 text-caption font-medium text-slate-600 cursor-pointer transition-colors hover:border-slate-300 focus:outline-none focus-visible:border-proef-blue focus-visible:ring-2 focus-visible:ring-proef-blue/15",
1276
+ className: "h-7 appearance-none rounded-md border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-950 pl-2.5 pr-7 text-caption font-medium text-slate-600 dark:text-slate-300 cursor-pointer transition-colors hover:border-slate-300 dark:hover:border-slate-600 focus:outline-none focus-visible:border-proef-blue focus-visible:ring-2 focus-visible:ring-proef-blue/15",
1277
1277
  children: topo.pageSizeOptions.map((n) => /* @__PURE__ */ jsx("option", { value: n, children: L.perPage(n) }, n))
1278
1278
  }
1279
1279
  ),
1280
- /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12, className: "pointer-events-none absolute right-2 text-slate-400" })
1280
+ /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12, className: "pointer-events-none absolute right-2 text-slate-400 dark:text-slate-500" })
1281
1281
  ] })
1282
1282
  ] }),
1283
1283
  /* @__PURE__ */ jsxs("div", { ref: meioRef, className: "relative flex-1 min-w-0 flex items-center gap-1.5", children: [
@@ -1301,7 +1301,7 @@ function TableBase({
1301
1301
  ]
1302
1302
  }
1303
1303
  ),
1304
- maisAberto && /* @__PURE__ */ jsx("div", { className: "absolute left-0 top-full mt-1.5 z-40 w-max max-w-[22rem] p-2 flex flex-wrap gap-1.5 bg-white border border-slate-200 shadow-popover", children: chipsEscondidos.map((i) => chip(i)) })
1304
+ maisAberto && /* @__PURE__ */ jsx("div", { className: "absolute left-0 top-full mt-1.5 z-40 w-max max-w-[22rem] p-2 flex flex-wrap gap-1.5 bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-700 shadow-popover", children: chipsEscondidos.map((i) => chip(i)) })
1305
1305
  ] }),
1306
1306
  itensChips.length > 0 && /* @__PURE__ */ jsx(
1307
1307
  "button",
@@ -1317,7 +1317,7 @@ function TableBase({
1317
1317
  }
1318
1318
  )
1319
1319
  ] }),
1320
- /* @__PURE__ */ jsx("div", { className: "shrink-0 min-w-[220px] flex justify-end", children: topoACarregar ? /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-1", "aria-hidden": true, children: Array.from({ length: 7 }, (_, i) => /* @__PURE__ */ jsx("span", { className: "h-7 min-w-7 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "h-2 w-3 rounded-sm bg-slate-200 animate-pulse motion-reduce:animate-none" }) }, i)) }) : totalPaginasTopo > 1 && !isGrouped && /* @__PURE__ */ jsxs("nav", { "aria-label": L.pagination, className: "shrink-0 flex items-center gap-1", children: [
1320
+ /* @__PURE__ */ jsx("div", { className: "shrink-0 min-w-[220px] flex justify-end", children: topoACarregar ? /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-1", "aria-hidden": true, children: Array.from({ length: 7 }, (_, i) => /* @__PURE__ */ jsx("span", { className: "h-7 min-w-7 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "h-2 w-3 rounded-sm bg-slate-200 dark:bg-slate-700 animate-pulse motion-reduce:animate-none" }) }, i)) }) : totalPaginasTopo > 1 && !isGrouped && /* @__PURE__ */ jsxs("nav", { "aria-label": L.pagination, className: "shrink-0 flex items-center gap-1", children: [
1321
1321
  /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
1322
1322
  L.page,
1323
1323
  " ",
@@ -1325,13 +1325,13 @@ function TableBase({
1325
1325
  " / ",
1326
1326
  totalPaginasTopo
1327
1327
  ] }),
1328
- numerosPagina.map((p, i) => p === "…" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-7 min-w-5 flex items-center justify-center text-slate-300", children: "…" }, `r${i}`) : /* @__PURE__ */ jsx(
1328
+ numerosPagina.map((p, i) => p === "…" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-7 min-w-5 flex items-center justify-center text-slate-300 dark:text-slate-600", children: "…" }, `r${i}`) : /* @__PURE__ */ jsx(
1329
1329
  "button",
1330
1330
  {
1331
1331
  type: "button",
1332
1332
  onClick: () => irParaPagina(p),
1333
1333
  "aria-current": p === paginaTopo ? "page" : void 0,
1334
- className: `h-7 min-w-7 px-1.5 rounded-md text-caption font-semibold tabular-nums transition-colors ${p === paginaTopo ? "bg-primary text-white cursor-default" : "text-slate-500 hover:bg-slate-100 hover:text-slate-800"}`,
1334
+ className: `h-7 min-w-7 px-1.5 rounded-md text-caption font-semibold tabular-nums transition-colors ${p === paginaTopo ? "bg-primary text-white cursor-default" : "text-slate-500 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-800 dark:hover:text-slate-100"}`,
1335
1335
  children: p
1336
1336
  },
1337
1337
  p
@@ -1342,10 +1342,10 @@ function TableBase({
1342
1342
  /* A coluna só existe a preencher: as barras de chips e o rodapé são irmãos
1343
1343
  da caixa de scroll, e é a coluna que lhes dá topo e fundo fixos com o
1344
1344
  scroll pelo meio. */
1345
- /* @__PURE__ */ jsxs("div", { ref: raizRef, className: `v1-reset text-control text-slate-800 ${preencheAltura ? "h-full min-h-0 flex flex-col" : ""} ${comCaixa ? "rounded-xl border border-slate-200 bg-white overflow-hidden" : ""}`, children: [
1345
+ /* @__PURE__ */ jsxs("div", { ref: raizRef, className: `v1-reset text-control text-slate-800 dark:text-slate-100 ${preencheAltura ? "h-full min-h-0 flex flex-col" : ""} ${comCaixa ? "rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-950 overflow-hidden" : ""}`, children: [
1346
1346
  barraTopo,
1347
- !topo && isGrouped && /* @__PURE__ */ jsx("div", { className: "px-4 py-2 bg-slate-50 border-b border-slate-200 flex items-center gap-1.5 flex-wrap", children: chipsGrupo }),
1348
- !topo && totalActiveFilters > 0 && /* @__PURE__ */ jsx("div", { className: "px-4 py-2 bg-slate-50 border-b border-slate-200 flex items-center gap-1.5 flex-wrap", children: chipsFiltro }),
1347
+ !topo && isGrouped && /* @__PURE__ */ jsx("div", { className: "px-4 py-2 bg-slate-50 dark:bg-slate-900 border-b border-slate-200 dark:border-slate-700 flex items-center gap-1.5 flex-wrap", children: chipsGrupo }),
1348
+ !topo && totalActiveFilters > 0 && /* @__PURE__ */ jsx("div", { className: "px-4 py-2 bg-slate-50 dark:bg-slate-900 border-b border-slate-200 dark:border-slate-700 flex items-center gap-1.5 flex-wrap", children: chipsFiltro }),
1349
1349
  preencheAltura ? /* @__PURE__ */ jsxs(Fragment, { children: [
1350
1350
  !barraSobreposta && /* @__PURE__ */ jsx(
1351
1351
  "div",
@@ -1409,8 +1409,8 @@ function TableBase({
1409
1409
  ] }),
1410
1410
  aviso
1411
1411
  ] }) }),
1412
- temRodape && /* @__PURE__ */ jsxs("div", { className: "px-4 py-3 bg-slate-50 border-t border-slate-100 flex items-center justify-between", children: [
1413
- /* @__PURE__ */ jsxs("span", { className: "text-micro font-black uppercase text-slate-400 tracking-wider", children: [
1412
+ temRodape && /* @__PURE__ */ jsxs("div", { className: "px-4 py-3 bg-slate-50 dark:bg-slate-900 border-t border-slate-100 dark:border-slate-800 flex items-center justify-between", children: [
1413
+ /* @__PURE__ */ jsxs("span", { className: "text-micro font-black uppercase text-slate-400 dark:text-slate-500 tracking-wider", children: [
1414
1414
  L.page,
1415
1415
  " ",
1416
1416
  internalPage,
@@ -1423,7 +1423,7 @@ function TableBase({
1423
1423
  {
1424
1424
  disabled: internalPage <= 1,
1425
1425
  onClick: () => setInternalPage((p) => p - 1),
1426
- className: "flex items-center gap-1 px-3 py-1.5 rounded-md text-micro font-black uppercase tracking-widest bg-white border border-slate-200 disabled:opacity-30 hover:enabled:border-proef-blue hover:enabled:text-proef-blue transition-colors",
1426
+ className: "flex items-center gap-1 px-3 py-1.5 rounded-md text-micro font-black uppercase tracking-widest bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-700 disabled:opacity-30 hover:enabled:border-proef-blue hover:enabled:text-proef-blue transition-colors",
1427
1427
  children: [
1428
1428
  /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 12 }),
1429
1429
  L.prev
@@ -1435,7 +1435,7 @@ function TableBase({
1435
1435
  {
1436
1436
  disabled: internalPage >= internalTotalPages,
1437
1437
  onClick: () => setInternalPage((p) => p + 1),
1438
- className: "flex items-center gap-1 px-3 py-1.5 rounded-md text-micro font-black uppercase tracking-widest bg-white border border-slate-200 disabled:opacity-30 hover:enabled:border-proef-blue hover:enabled:text-proef-blue transition-colors",
1438
+ className: "flex items-center gap-1 px-3 py-1.5 rounded-md text-micro font-black uppercase tracking-widest bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-700 disabled:opacity-30 hover:enabled:border-proef-blue hover:enabled:text-proef-blue transition-colors",
1439
1439
  children: [
1440
1440
  L.next,
1441
1441
  /* @__PURE__ */ jsx(ChevronRightIcon, { size: 12 })