@selectwin/kit 0.1.75 → 0.1.77

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 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).
@@ -9,6 +9,9 @@ type SelectRecordCardOwnProps = {
9
9
  subtitle?: ReactNode;
10
10
  /** Canto direito do topo — tipicamente um SelectRowActions. */
11
11
  actions?: ReactNode;
12
+ /** Visual LARGO entre o cabeçalho e as badges — ocupa a linha inteira do card (ex.: o
13
+ * SelectSplitChain do Repart). Para o glifo pequeno do canto use `media`. */
14
+ body?: ReactNode;
12
15
  /** Badges no meio do card (layout, escopo, canal…). */
13
16
  tags?: ReactNode;
14
17
  /** Rodapé à esquerda: bolinha + rótulo do estado. Sem `status` e sem `meta` o rodapé
@@ -0,0 +1,22 @@
1
+ import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ export interface SelectSplitNode {
3
+ /** Chave de render (o publicId da empresa, por exemplo). */
4
+ id: string;
5
+ /** Nome da empresa — cai para o id truncado quando o nome não é conhecido. */
6
+ label: ReactNode;
7
+ /** A fatia: "20%", "R$ 20,00". Ausente = sem rótulo (não invente "0%"). */
8
+ share?: ReactNode;
9
+ /** Iniciais do nó (padrão: a primeira letra de `label` quando ela é texto). */
10
+ initials?: string;
11
+ }
12
+ type SelectSplitChainOwnProps = {
13
+ /** Quem recebe. */
14
+ nodes: SelectSplitNode[];
15
+ /** O nó da casa, à esquerda do fio — só quando a sobra é conhecida. */
16
+ origin?: SelectSplitNode;
17
+ /** Quantos nós de recebedor cabem antes do "+N" (padrão 3). */
18
+ max?: number;
19
+ };
20
+ export type SelectSplitChainProps = SelectSplitChainOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectSplitChainOwnProps>;
21
+ export declare const SelectSplitChain: import('react').ForwardRefExoticComponent<SelectSplitChainOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectSplitChainOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
22
+ export {};
package/dist/index.d.ts CHANGED
@@ -81,6 +81,7 @@ export { detectSelectTheme } from './detectSelectTheme';
81
81
  export { SelectDataTable, SELECT_COL_DATETIME, useSelectPageSize } from './SelectDataTable';
82
82
  export { SelectCardGrid } from './SelectCardGrid';
83
83
  export { SelectRecordCard, SelectLayoutThumb } from './SelectRecordCard';
84
+ export { SelectSplitChain } from './SelectSplitChain';
84
85
  export { SelectPagination } from './SelectPagination';
85
86
  export { SelectFilterBar } from './SelectFilterBar';
86
87
  export { SelectTagSelect } from './SelectTagSelect';
@@ -210,6 +211,7 @@ export type { SelectStatusMeta } from './SelectStatusBadge';
210
211
  export type { SelectTimelineItem, SelectTimelineTone } from './SelectTimeline';
211
212
  export type { SelectDataColumn } from './SelectDataTable';
212
213
  export type { SelectRecordCardProps, SelectRecordCardTone, SelectLayoutThumbProps } from './SelectRecordCard';
214
+ export type { SelectSplitChainProps, SelectSplitNode } from './SelectSplitChain';
213
215
  export type { SelectListPagination } from './internal/listChrome';
214
216
  export type { SelectPaginationProps } from './SelectPagination';
215
217
  export type { SelectFilterDef } from './SelectFilterBar';