@selectwin/kit 0.1.77 → 0.1.79
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 +29 -29
- package/dist/SelectDataTable.d.ts +21 -0
- package/dist/SelectPreviewFrame.d.ts +6 -0
- package/dist/SelectTable.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1911 -1872
- package/dist/internal/listChrome.d.ts +17 -1
- package/dist/style.css +1 -1
- package/package.json +64 -64
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# @selectwin/kit
|
|
2
|
-
|
|
3
|
-
Design system da Selectwin — primitivos React, charts SVG (sem dependência de biblioteca de
|
|
4
|
-
gráficos) e tokens CSS, theme-aware (light/dark).
|
|
5
|
-
|
|
6
|
-
Uso interno da Selectwin. Publicado no npm para facilitar a distribuição entre os apps da casa;
|
|
7
|
-
não há suporte, documentação pública nem garantia de estabilidade de API para terceiros.
|
|
8
|
-
|
|
9
|
-
## Uso
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm i @selectwin/kit
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import '@selectwin/kit/styles.css'; // tokens + estilos (uma vez, no root)
|
|
17
|
-
import { SelectButton, SelectSection } from '@selectwin/kit';
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Peer deps: **react**, **react-dom** (obrigatórios); **gsap** (opcional — só componentes animados),
|
|
21
|
-
**react-router-dom** (opcional). Tematização = sobrescrever os tokens CSS `--select-*` / `--sw-*`.
|
|
22
|
-
|
|
23
|
-
## Build
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm run build # → dist/index.js (ESM) + dist/style.css + dist/index.d.ts
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
`npm publish` roda `prepublishOnly` (= build) e publica só `dist/` (sem sourcemaps).
|
|
1
|
+
# @selectwin/kit
|
|
2
|
+
|
|
3
|
+
Design system da Selectwin — primitivos React, charts SVG (sem dependência de biblioteca de
|
|
4
|
+
gráficos) e tokens CSS, theme-aware (light/dark).
|
|
5
|
+
|
|
6
|
+
Uso interno da Selectwin. Publicado no npm para facilitar a distribuição entre os apps da casa;
|
|
7
|
+
não há suporte, documentação pública nem garantia de estabilidade de API para terceiros.
|
|
8
|
+
|
|
9
|
+
## Uso
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i @selectwin/kit
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import '@selectwin/kit/styles.css'; // tokens + estilos (uma vez, no root)
|
|
17
|
+
import { SelectButton, SelectSection } from '@selectwin/kit';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Peer deps: **react**, **react-dom** (obrigatórios); **gsap** (opcional — só componentes animados),
|
|
21
|
+
**react-router-dom** (opcional). Tematização = sobrescrever os tokens CSS `--select-*` / `--sw-*`.
|
|
22
|
+
|
|
23
|
+
## Build
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run build # → dist/index.js (ESM) + dist/style.css + dist/index.d.ts
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`npm publish` roda `prepublishOnly` (= build) e publica só `dist/` (sem sourcemaps).
|
|
@@ -13,12 +13,33 @@ import { SelectListPagination } from './internal/listChrome';
|
|
|
13
13
|
* that renders `formatDateTime`.
|
|
14
14
|
*/
|
|
15
15
|
export declare const SELECT_COL_DATETIME = "9.5rem";
|
|
16
|
+
/**
|
|
17
|
+
* Coluna de ID — espalhe com `...SELECT_COL_ID` na definição da coluna.
|
|
18
|
+
*
|
|
19
|
+
* Um id não é uma célula qualquer: é longo, é o que o lojista COPIA para levar ao suporte e,
|
|
20
|
+
* cortado no meio, não serve para nada. Com o `1fr` uniforme ele recebia exatamente a mesma
|
|
21
|
+
* sobra que uma coluna de "—" (150px numa tabela de oito colunas) e vinha truncado. Aqui pede
|
|
22
|
+
* o DOBRO da sobra e um piso maior — sem virar `width` fixo, que engordaria o mínimo da
|
|
23
|
+
* tabela e pioraria a rolagem no celular.
|
|
24
|
+
*
|
|
25
|
+
* NÃO use em id curto que já cabe inteiro (um número de pedido de 6 dígitos): peso extra sem
|
|
26
|
+
* texto para ocupar só rouba espaço de quem precisa.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SELECT_COL_ID: {
|
|
29
|
+
readonly minWidth: "9.5rem";
|
|
30
|
+
readonly grow: 2;
|
|
31
|
+
};
|
|
16
32
|
export interface SelectDataColumn<T> {
|
|
17
33
|
key: string;
|
|
18
34
|
title: ReactNode;
|
|
19
35
|
render: (item: T) => ReactNode;
|
|
20
36
|
align?: 'start' | 'end' | 'center';
|
|
21
37
|
width?: string;
|
|
38
|
+
/** Piso do track flexível (default `--select-table-col-min`, 6.5rem). Ignorado com `width`. */
|
|
39
|
+
minWidth?: string;
|
|
40
|
+
/** Fatia da SOBRA de largura, relativa às outras colunas flexíveis (default 1). Uma coluna
|
|
41
|
+
* de travessão não merece o mesmo que uma de id — ver `SELECT_COL_ID`. */
|
|
42
|
+
grow?: number;
|
|
22
43
|
/**
|
|
23
44
|
* Comparison value for client-side sorting — its presence makes the column sortable.
|
|
24
45
|
* Sorts only the LOADED page (the server page/order is the baseline; clearing the sort
|
|
@@ -40,6 +40,12 @@ export interface SelectPreviewFrameProps {
|
|
|
40
40
|
initialDevice?: Device;
|
|
41
41
|
showDeviceToggle?: boolean;
|
|
42
42
|
emptyLabel?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Largura de viewport do modo desktop, em px (padrão 1280). É o número que as media
|
|
45
|
+
* queries da página de dentro vão ler — suba-o se o site previsto só vira desktop acima
|
|
46
|
+
* de 1280. Não é o tamanho na tela: o palco escala para caber.
|
|
47
|
+
*/
|
|
48
|
+
desktopWidth?: number;
|
|
43
49
|
}
|
|
44
50
|
export declare const SelectPreviewFrame: import('react').ForwardRefExoticComponent<SelectPreviewFrameProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectPreviewFrameProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
45
51
|
export {};
|
package/dist/SelectTable.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ export interface SelectColumn {
|
|
|
3
3
|
label: ReactNode;
|
|
4
4
|
align?: 'start' | 'end' | 'center';
|
|
5
5
|
width?: string;
|
|
6
|
+
/** Piso do track flexível (default `--select-table-col-min`, 6.5rem): abaixo dele a coluna
|
|
7
|
+
* não encolhe e a tabela rola na horizontal. Ignorado quando há `width` fixo. */
|
|
8
|
+
minWidth?: string;
|
|
9
|
+
/** Fatia da SOBRA de largura, relativa às outras colunas flexíveis (default 1) — ver a nota
|
|
10
|
+
* em `gridTemplate`. Ignorado quando há `width` fixo. */
|
|
11
|
+
grow?: number;
|
|
6
12
|
/** Render the header as a sort control with a caret. */
|
|
7
13
|
sortable?: boolean;
|
|
8
14
|
sortDir?: 'asc' | 'desc' | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export { SelectRowActions } from './SelectRowActions';
|
|
|
78
78
|
export { SelectConfirmModal } from './SelectConfirmModal';
|
|
79
79
|
export { SelectFormModal } from './SelectFormModal';
|
|
80
80
|
export { detectSelectTheme } from './detectSelectTheme';
|
|
81
|
-
export { SelectDataTable, SELECT_COL_DATETIME, useSelectPageSize } from './SelectDataTable';
|
|
81
|
+
export { SelectDataTable, SELECT_COL_DATETIME, SELECT_COL_ID, useSelectPageSize } from './SelectDataTable';
|
|
82
82
|
export { SelectCardGrid } from './SelectCardGrid';
|
|
83
83
|
export { SelectRecordCard, SelectLayoutThumb } from './SelectRecordCard';
|
|
84
84
|
export { SelectSplitChain } from './SelectSplitChain';
|