@selectwin/kit 0.1.125 → 0.1.127
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/SelectChartLegend.d.ts +2 -0
- package/dist/SelectChoiceCard.d.ts +6 -0
- package/dist/SelectListCard.d.ts +5 -0
- package/dist/SelectMiniStats.d.ts +5 -0
- package/dist/SelectModal.d.ts +3 -1
- package/dist/SelectProgressList.d.ts +6 -1
- package/dist/SelectTileMap.d.ts +31 -0
- package/dist/chartUtils.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +534 -266
- package/dist/style.css +1 -1
- package/package.json +64 -64
|
@@ -6,6 +6,8 @@ export interface SelectChartLegendItem {
|
|
|
6
6
|
color?: string;
|
|
7
7
|
/** Match a `pattern: 'hatch'` series. */
|
|
8
8
|
pattern?: 'hatch';
|
|
9
|
+
/** Um traço no lugar do quadrado — a legenda de um gráfico de LINHAS; `dashed` = a série tracejada (0.1.126). */
|
|
10
|
+
line?: 'solid' | 'dashed';
|
|
9
11
|
/** Instead of a swatch (a total that isn't drawn, e.g. "Cancelados"). */
|
|
10
12
|
icon?: ReactNode;
|
|
11
13
|
}
|
|
@@ -33,6 +33,12 @@ type SelectChoiceGridOwnProps = {
|
|
|
33
33
|
loading?: boolean;
|
|
34
34
|
/** Quantos esqueletos — o número de cards que VAI aparecer, para a grade não mudar de forma. */
|
|
35
35
|
skeletonCount?: number;
|
|
36
|
+
/**
|
|
37
|
+
* No celular (≤ 40rem), a grade vira UMA lista numa caixa: cada card é uma linha — ícone, nome,
|
|
38
|
+
* a linha de apoio (o `meta`, ou a descrição quando não há meta), o selo e a chamada à direita
|
|
39
|
+
* (0.1.127). Para os "por onde começar" que no celular empurrariam o conteúdo da tela para baixo.
|
|
40
|
+
*/
|
|
41
|
+
listOnPhone?: boolean;
|
|
36
42
|
};
|
|
37
43
|
export type SelectChoiceGridProps = SelectChoiceGridOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectChoiceGridOwnProps>;
|
|
38
44
|
export declare const SelectChoiceGrid: import('react').ForwardRefExoticComponent<SelectChoiceGridOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectChoiceGridOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/SelectListCard.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ type SelectListCardOwnProps = {
|
|
|
11
11
|
* (cinco nomes num card de um terço sem esticar a linha inteira).
|
|
12
12
|
*/
|
|
13
13
|
dense?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* As linhas dividem a altura da caixa (0.1.126): esticado ao lado de um vizinho mais alto, o
|
|
16
|
+
* card não sobra com uma faixa branca embaixo — cada linha cresce igual, o conteúdo no meio.
|
|
17
|
+
*/
|
|
18
|
+
spread?: boolean;
|
|
14
19
|
children: ReactNode;
|
|
15
20
|
};
|
|
16
21
|
export type SelectListCardProps = SelectListCardOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectListCardOwnProps>;
|
|
@@ -9,6 +9,11 @@ export interface SelectMiniStat {
|
|
|
9
9
|
type SelectMiniStatsOwnProps = {
|
|
10
10
|
items: SelectMiniStat[];
|
|
11
11
|
order?: 'label-first' | 'value-first';
|
|
12
|
+
/**
|
|
13
|
+
* Colunas FIXAS (0.1.126): 2 = 2×2, 3 = 3×2 — sem o item órfão sozinho na última linha que o
|
|
14
|
+
* encaixe automático deixa com 5 ou 6 números. Em telas estreitas cai para 2 (ou 1).
|
|
15
|
+
*/
|
|
16
|
+
columns?: 2 | 3 | 4;
|
|
12
17
|
};
|
|
13
18
|
export type SelectMiniStatsProps = SelectMiniStatsOwnProps & Omit<ComponentPropsWithoutRef<'dl'>, keyof SelectMiniStatsOwnProps>;
|
|
14
19
|
export declare const SelectMiniStats: import('react').ForwardRefExoticComponent<SelectMiniStatsOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDListElement>, HTMLDListElement>, "ref">, keyof SelectMiniStatsOwnProps> & import('react').RefAttributes<HTMLDListElement>>;
|
package/dist/SelectModal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export declare function SelectModal({ open, onClose, title, subtitle, children, footer, aside, size, showClose, noise, dividedHeader, backdrop, theme, }: {
|
|
2
|
+
export declare function SelectModal({ open, onClose, title, subtitle, children, footer, aside, size, showClose, noise, dividedHeader, backdrop, theme, placement, }: {
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
title?: ReactNode;
|
|
@@ -17,4 +17,6 @@ export declare function SelectModal({ open, onClose, title, subtitle, children,
|
|
|
17
17
|
* trás (queda do servidor): escurecer só não esconde, o conteúdo segue legível. */
|
|
18
18
|
backdrop?: 'dim' | 'blur';
|
|
19
19
|
theme?: 'light' | 'dark';
|
|
20
|
+
/** `side` = folha lateral à direita, na altura inteira (o detalhe de uma linha da lista). */
|
|
21
|
+
placement?: 'center' | 'side';
|
|
20
22
|
}): import('react').ReactPortal | null;
|
|
@@ -14,7 +14,7 @@ export interface SelectProgressItem {
|
|
|
14
14
|
/** Override this row's bar colour. */
|
|
15
15
|
color?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare function SelectProgressList({ items, format, color, emptyText, spread, }: {
|
|
17
|
+
export declare function SelectProgressList({ items, format, color, emptyText, spread, max: fixedMax, }: {
|
|
18
18
|
items: SelectProgressItem[];
|
|
19
19
|
format?: (n: number) => string;
|
|
20
20
|
/** One colour for every bar (else the chart ramp, one hue per row). */
|
|
@@ -26,5 +26,10 @@ export declare function SelectProgressList({ items, format, color, emptyText, sp
|
|
|
26
26
|
* extra room is shared between the rows instead of piling up as an empty band.
|
|
27
27
|
*/
|
|
28
28
|
spread?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Escala FIXA (0.1.126): a barra cheia vale `max` — 100 para uma taxa, e 42% de aprovação ocupa
|
|
31
|
+
* 42% do trilho. Sem ele a barra é relativa à MAIOR linha (o ranking de hoje).
|
|
32
|
+
*/
|
|
33
|
+
max?: number;
|
|
29
34
|
}): import("react").JSX.Element;
|
|
30
35
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface SelectTile {
|
|
3
|
+
/** Chave estável (a sigla da UF). */
|
|
4
|
+
key: string;
|
|
5
|
+
/** O que o quadrado mostra ("SP"). */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Coluna e linha na grade (a partir de 0). */
|
|
8
|
+
col: number;
|
|
9
|
+
row: number;
|
|
10
|
+
/** O valor que pinta o quadrado; ausente ou 0 = quadrado claro, sem valor. */
|
|
11
|
+
value?: number;
|
|
12
|
+
/** O nome completo, no título do tooltip ("São Paulo"). */
|
|
13
|
+
title?: string;
|
|
14
|
+
}
|
|
15
|
+
type SelectTileMapOwnProps = {
|
|
16
|
+
tiles: SelectTile[];
|
|
17
|
+
/** A cor da escala (padrão: `--select-chart-1`). */
|
|
18
|
+
color?: string;
|
|
19
|
+
/** Lado do quadrado em px (padrão 36). */
|
|
20
|
+
tileSize?: number;
|
|
21
|
+
gap?: number;
|
|
22
|
+
/** Como o valor aparece no tooltip. */
|
|
23
|
+
format?: (n: number) => ReactNode;
|
|
24
|
+
/** A régua "menos → mais" embaixo do mapa. */
|
|
25
|
+
legend?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type SelectTileMapProps = SelectTileMapOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTileMapOwnProps>;
|
|
28
|
+
export declare const SelectTileMap: import('react').ForwardRefExoticComponent<SelectTileMapOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTileMapOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
29
|
+
/** Os 27 estados numa grade de 6 × 8, cada um perto de onde fica no mapa. */
|
|
30
|
+
export declare const SELECT_BR_UF_TILES: ReadonlyArray<Omit<SelectTile, 'value'>>;
|
|
31
|
+
export {};
|
package/dist/chartUtils.d.ts
CHANGED
|
@@ -62,6 +62,9 @@ export interface SelectChartSeries {
|
|
|
62
62
|
* gradient — the second encoding for "not happened yet" (scheduled, projected), so the
|
|
63
63
|
* difference never rides on color alone. */
|
|
64
64
|
pattern?: 'hatch';
|
|
65
|
+
/** SelectLineChart: linha tracejada e mais clara, sem área — a COMPARAÇÃO (o período anterior),
|
|
66
|
+
* que fica atrás da série principal sem disputar com ela. Pode ser mais curta que `labels`. */
|
|
67
|
+
dashed?: boolean;
|
|
65
68
|
}
|
|
66
69
|
export interface SelectBarDatum {
|
|
67
70
|
label: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ export type { SelectPaymentCardProps } from './SelectPaymentCard';
|
|
|
127
127
|
export { SelectFunnel } from './SelectFunnel';
|
|
128
128
|
export { SelectGauge } from './SelectGauge';
|
|
129
129
|
export { SelectHeatmap } from './SelectHeatmap';
|
|
130
|
+
export { SelectTileMap, SELECT_BR_UF_TILES } from './SelectTileMap';
|
|
130
131
|
export { SelectProgressList } from './SelectProgressList';
|
|
131
132
|
export { SelectRadialBar } from './SelectRadialBar';
|
|
132
133
|
export { SelectHorizontalBar } from './SelectHorizontalBar';
|
|
@@ -260,6 +261,7 @@ export type { SelectColumnChartProps, SelectColumnTooltip } from './SelectColumn
|
|
|
260
261
|
export type { SelectChartLegendProps, SelectChartLegendItem } from './SelectChartLegend';
|
|
261
262
|
export type { SelectShareBarProps, SelectShareItem } from './SelectShareBar';
|
|
262
263
|
export type { SelectHeatmapRow } from './SelectHeatmap';
|
|
264
|
+
export type { SelectTile, SelectTileMapProps } from './SelectTileMap';
|
|
263
265
|
export type { SelectProgressItem } from './SelectProgressList';
|
|
264
266
|
export type { SelectRadialSeries } from './SelectRadialBar';
|
|
265
267
|
export type { SelectWaterfallStep } from './SelectWaterfall';
|