@ffid-br/tailor-ui 0.10.0 → 0.11.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.
- package/README.md +1 -0
- package/dist/index.es.js +656 -640
- package/dist/index.umd.js +1 -1
- package/dist/style.css +4 -0
- package/dist/types/components/TailorTable.d.ts +4 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -130,6 +130,10 @@
|
|
|
130
130
|
.tailor-table__arrow { opacity: 0.35; }
|
|
131
131
|
.tailor-table__arrow--active { opacity: 1; color: var(--tailor-brand-primary-text); }
|
|
132
132
|
.tailor-table__clickable { cursor: pointer; }
|
|
133
|
+
/* Linha aberta (renderExpanded): o detalhe fica colado na linha, sem hover nem borda entre os dois. */
|
|
134
|
+
.tailor-table__row--open td { background: color-mix(in srgb, var(--tailor-brand-text) 3%, transparent); }
|
|
135
|
+
.tailor-table tbody tr.tailor-table__expanded td { border-top: 0; padding: var(--tailor-table-expanded-padding, 13px 21px 21px); background: color-mix(in srgb, var(--tailor-brand-text) 3%, transparent); }
|
|
136
|
+
.tailor-table tbody tr.tailor-table__expanded:hover td { background: color-mix(in srgb, var(--tailor-brand-text) 3%, transparent); }
|
|
133
137
|
.tailor-table__clickable:focus-visible, .tailor-table button:focus-visible { outline: 3px solid var(--tailor-brand-primary); outline-offset: -3px; }
|
|
134
138
|
.tailor-table__state { padding: 34px 13px; text-align: center; color: var(--tailor-brand-text-muted); }
|
|
135
139
|
.tailor-table tfoot td { border-top: 1px solid var(--tailor-brand-text); font-weight: 600; }
|
|
@@ -42,6 +42,9 @@ export type TailorTableProps<T> = {
|
|
|
42
42
|
totalRows?: number;
|
|
43
43
|
};
|
|
44
44
|
onRowClick?: (row: T) => void;
|
|
45
|
+
/** Conteúdo aberto embaixo da linha (detalhe, formulário), na largura da tabela. Quem
|
|
46
|
+
* controla o que está aberto é o app: devolva `null` para a linha fechada. */
|
|
47
|
+
renderExpanded?: (row: T) => React.ReactNode;
|
|
45
48
|
/** Cabeçalho preso ao rolar a página. */
|
|
46
49
|
stickyHeader?: boolean;
|
|
47
50
|
className?: string;
|
|
@@ -53,6 +56,6 @@ export declare function formatValue(v: unknown, type?: TailorColumnType, locale?
|
|
|
53
56
|
* em mono, ordenação, paginação (navegador ou servidor) e linha de total.
|
|
54
57
|
* Visual por variáveis `--tailor-brand-*` e `--tailor-table-*`, como o cabeçalho.
|
|
55
58
|
*/
|
|
56
|
-
export declare function TailorTable<T>({ columns, rows, rowKey, caption, loading, empty, sort, onSortChange, defaultSort, pageSize, pagination, onRowClick, stickyHeader, className, }: TailorTableProps<T>): React.JSX.Element;
|
|
59
|
+
export declare function TailorTable<T>({ columns, rows, rowKey, caption, loading, empty, sort, onSortChange, defaultSort, pageSize, pagination, onRowClick, renderExpanded, stickyHeader, className, }: TailorTableProps<T>): React.JSX.Element;
|
|
57
60
|
/** Soma de uma coluna, para usar em `total`. */
|
|
58
61
|
export declare const sumBy: <T>(value: (r: T) => number) => (rows: T[]) => number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ffid-br/tailor-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"description": "Primitivos de marca Tailor.ia em React: loader, intro, transição de login, lockup e barra lateral.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.umd.js",
|