@selectwin/kit 0.1.74 → 0.1.75
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/SelectCardGrid.d.ts +28 -0
- package/dist/SelectDataTable.d.ts +3 -27
- package/dist/SelectRecordCard.d.ts +42 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2836 -2746
- package/dist/internal/listChrome.d.ts +60 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectListChromeProps {
|
|
3
|
+
/** Faixa 1, à esquerda: o nome da lista. */
|
|
4
|
+
title?: ReactNode;
|
|
5
|
+
/** Ajuda contextual: vira o "!" ao lado do título (SelectInfoTip). Precisa de `title`. */
|
|
6
|
+
help?: ReactNode;
|
|
7
|
+
/** Linha discreta ABAIXO do título (subtítulo/descrição da lista). */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Faixa 1, à direita: ação sobre o RECURSO (Criar, Exportar). */
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
/** Faixa 2, à esquerda: os filtros (SelectFilterBar). */
|
|
12
|
+
filters?: ReactNode;
|
|
13
|
+
/** Faixa 2, à direita: controles da VISTA (colunas, "Personalizar"). Sem `filters` não
|
|
14
|
+
* existe faixa 2 e eles voltam para o lado do `action`. */
|
|
15
|
+
tools?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/** Quais faixas existem — de que a casca precisa para decidir bordas e colapso. */
|
|
18
|
+
export declare function listChromeShape({ title, description, action, filters, tools }: SelectListChromeProps): {
|
|
19
|
+
hasFilters: boolean;
|
|
20
|
+
inlineTools: ReactNode;
|
|
21
|
+
hasIdentity: boolean;
|
|
22
|
+
hasTitleRow: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** As faixas 1 e 2 — a faixa 3 (o conteúdo) é de quem chama. */
|
|
25
|
+
export declare function SelectListChrome({ title, help, description, action, filters, tools }: SelectListChromeProps): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Rodapé da lista. Os campos de cursor (hasPrevious/onPrevious/hasNext/onNext) já dão o
|
|
28
|
+
* prev/next centrado; `total` + `pageSize` + `page` acrescentam o rótulo de contagem, e
|
|
29
|
+
* `onPage` (+ `pageCount`) os botões numerados.
|
|
30
|
+
*/
|
|
31
|
+
export interface SelectListPagination {
|
|
32
|
+
hasPrevious: boolean;
|
|
33
|
+
onPrevious: () => void;
|
|
34
|
+
hasNext: boolean;
|
|
35
|
+
onNext: () => void;
|
|
36
|
+
/** Total de itens em todas as páginas (alimenta o "de N"). */
|
|
37
|
+
total?: number;
|
|
38
|
+
/** Itens por página — com `total` + `page` rende o rótulo "X–Y de N". */
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
/** Página atual, base 1. */
|
|
41
|
+
page?: number;
|
|
42
|
+
/** Total de páginas — com `onPage`, liga os botões numerados. */
|
|
43
|
+
pageCount?: number;
|
|
44
|
+
/** Pula para a página (base 1). */
|
|
45
|
+
onPage?: (page: number) => void;
|
|
46
|
+
/** Substantivo do rótulo, ex.: "produtos" (padrão: "resultados"). */
|
|
47
|
+
noun?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Menu de tamanho de página ("N por página", canto inferior esquerdo) — o usuário
|
|
50
|
+
* escolhe quantos itens vê. Limite as opções a 50% do max do zod do endpoint (max 100
|
|
51
|
+
* → [10, 25, 50]). Exige `onPageSizeChange`; guarde o estado com `useSelectPageSize`
|
|
52
|
+
* para a escolha persistir por lista.
|
|
53
|
+
*/
|
|
54
|
+
pageSizeOptions?: number[];
|
|
55
|
+
/** Aplica o novo tamanho (zere o offset no chamador). */
|
|
56
|
+
onPageSizeChange?: (size: number) => void;
|
|
57
|
+
}
|
|
58
|
+
export declare function SelectListFooter({ pagination }: {
|
|
59
|
+
pagination: SelectListPagination;
|
|
60
|
+
}): import("react").JSX.Element;
|