@aurea-uds/react 0.23.0 → 0.24.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.
@@ -1,7 +1,17 @@
1
1
  import React, { type HTMLAttributes, type RefAttributes, type ReactNode } from "react";
2
- export declare function Table({ caption, children, className, ...props }: HTMLAttributes<HTMLTableElement> & RefAttributes<HTMLTableElement> & {
2
+ export interface TableProps extends HTMLAttributes<HTMLTableElement>, RefAttributes<HTMLTableElement> {
3
+ /** Um `<caption>` de verdade; se for texto, vira também o nome da região que rola. */
3
4
  caption?: ReactNode;
4
- }): React.JSX.Element;
5
+ /** GAR-13: o cabeçalho fica preso no topo da caixa da tabela, que ganha teto (`--table-max-h`, 60vh) e rola por dentro. */
6
+ stickyHeader?: boolean;
7
+ /** GAR-12: a primeira coluna fica parada ao rolar de lado. */
8
+ stickyFirstColumn?: boolean;
9
+ /** GAR-12: a tabela cabe na largura da caixa, sem o mínimo de 720 — a comparação de dois itens no celular. */
10
+ fit?: boolean;
11
+ /** GAR-12: esconde as linhas marcadas como iguais (`<tr data-same>`) — o "Só diferenças". */
12
+ differencesOnly?: boolean;
13
+ }
14
+ export declare function Table({ caption, stickyHeader, stickyFirstColumn, fit, differencesOnly, children, className, ...props }: TableProps): React.JSX.Element;
5
15
  export interface SortableItem {
6
16
  id: string;
7
17
  label: ReactNode;
@@ -6,7 +6,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
6
6
  import React from "react";
7
7
  import { cx, useAureaStrings, useReorder } from "./internal.js";
8
8
  import { Icon } from "./system.js";
9
- export function Table({ caption, children, className, ...props }) { const s = useAureaStrings(); return _jsx("div", { className: "table-region", role: "region", "aria-label": typeof caption === "string" ? caption : s.tableLabel, tabIndex: 0, children: _jsxs("table", { className: cx("table", className), ...props, children: [caption && _jsx("caption", { children: caption }), children] }) }); }
9
+ export function Table({ caption, stickyHeader, stickyFirstColumn, fit, differencesOnly, children, className, ...props }) { const s = useAureaStrings(); return _jsx("div", { className: cx("table-region", stickyHeader && "table-sticky-header", stickyFirstColumn && "table-sticky-first"), role: "region", "aria-label": typeof caption === "string" ? caption : s.tableLabel, tabIndex: 0, children: _jsxs("table", { className: cx("table", fit && "table-fit", differencesOnly && "table-differences-only", className), ...props, children: [caption && _jsx("caption", { children: caption }), children] }) }); }
10
10
  // O protocolo de teclado e de ponteiro saiu daqui para o `useReorder` do `internal` no item N1,
11
11
  // quando o `BlockEditor` virou o segundo dono dele. A DOM abaixo não mudou uma vírgula na
12
12
  // extração — é o que o gate de pixel e o `skin.spec` continuam medindo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurea-uds/react",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Os componentes React da Aurea UDS. Importe @aurea-uds/fonts/css e @aurea-uds/core/css junto.",
5
5
  "keywords": [
6
6
  "aurea",