@selectwin/kit 0.1.80 → 0.1.82
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/dist/SelectTable.d.ts +16 -0
- package/dist/index.js +2277 -2153
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectTable.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export interface SelectColumn {
|
|
|
13
13
|
sortable?: boolean;
|
|
14
14
|
sortDir?: 'asc' | 'desc' | null;
|
|
15
15
|
onSort?: () => void;
|
|
16
|
+
/** Deixa a coluna fora do arrasto de largura (default: arrastável). Use em coluna que não é
|
|
17
|
+
* conteúdo — a de ações, que tem tamanho de ícone e nada a revelar se esticada. */
|
|
18
|
+
resizable?: boolean;
|
|
16
19
|
}
|
|
17
20
|
type SelectTableOwnProps = {
|
|
18
21
|
columns: SelectColumn[];
|
|
@@ -41,6 +44,19 @@ type SelectTableOwnProps = {
|
|
|
41
44
|
* filtros, não junto do título. Sem `filters` não existe faixa de consulta, então eles
|
|
42
45
|
* voltam para o lado do `action` (uma faixa só para a engrenagem seria vazia). */
|
|
43
46
|
tools?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Liga as alças de arrastar a largura da coluna (a barrinha na divisa do cabeçalho).
|
|
49
|
+
*
|
|
50
|
+
* A tabela NÃO guarda a largura: ela avisa, e quem chamou decide. É o mesmo arranjo do sort e
|
|
51
|
+
* da visibilidade — o primitivo desenha, a SelectDataTable é dona do estado e da persistência.
|
|
52
|
+
* O `width` que voltar entra como track fixo do grid, exatamente como um `width` declarado.
|
|
53
|
+
*
|
|
54
|
+
* Sem esta prop não há alça nenhuma: uma tabela que não sabe guardar a largura não deve
|
|
55
|
+
* oferecer o gesto, porque ele se desfaria no próximo render.
|
|
56
|
+
*/
|
|
57
|
+
onColumnResize?: (index: number, width: string) => void;
|
|
58
|
+
/** Duplo clique na alça devolve a coluna ao tamanho automático. */
|
|
59
|
+
onColumnResizeReset?: (index: number) => void;
|
|
44
60
|
};
|
|
45
61
|
export type SelectTableProps = SelectTableOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableOwnProps>;
|
|
46
62
|
export declare const SelectTable: import('react').ForwardRefExoticComponent<SelectTableOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|