@selectwin/kit 0.1.87 → 0.1.89
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/SelectFlowCanvas.d.ts +104 -0
- package/dist/SelectPasswordStrength.d.ts +8 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2328 -2151
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SelectFlowEdgeState = 'default' | 'on' | 'muted';
|
|
3
|
+
export interface SelectFlowEdge {
|
|
4
|
+
id: string;
|
|
5
|
+
/** `d` de um <path> SVG, em coordenadas do canvas. */
|
|
6
|
+
d: string;
|
|
7
|
+
state?: SelectFlowEdgeState;
|
|
8
|
+
}
|
|
9
|
+
export interface SelectFlowLabel {
|
|
10
|
+
id: string;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
text: ReactNode;
|
|
14
|
+
/** `yes` = saída afirmativa de uma decisão (verde). */
|
|
15
|
+
tone?: 'neutral' | 'yes';
|
|
16
|
+
/** No caminho do teste. */
|
|
17
|
+
active?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface SelectFlowPlus {
|
|
20
|
+
id: string;
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
/** Nome acessível e dica — o que o "+" insere ali. */
|
|
24
|
+
label: string;
|
|
25
|
+
onClick: () => void;
|
|
26
|
+
}
|
|
27
|
+
export interface SelectFlowCanvasProps {
|
|
28
|
+
/** Tamanho do desenho em px (antes do zoom). */
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
edges: SelectFlowEdge[];
|
|
32
|
+
labels?: SelectFlowLabel[];
|
|
33
|
+
pluses?: SelectFlowPlus[];
|
|
34
|
+
/** Os nós (`SelectFlowNode`) e qualquer conteúdo posicionado no canvas. */
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/** Zoom controlado; sem ele o canvas guarda o próprio. */
|
|
37
|
+
zoom?: number;
|
|
38
|
+
defaultZoom?: number;
|
|
39
|
+
onZoomChange?: (zoom: number) => void;
|
|
40
|
+
minZoom?: number;
|
|
41
|
+
maxZoom?: number;
|
|
42
|
+
/** Clique no fundo (fora de nó) — normalmente limpa a seleção. */
|
|
43
|
+
onBackgroundClick?: () => void;
|
|
44
|
+
ariaLabel: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function SelectFlowCanvas({ width, height, edges, labels, pluses, children, zoom, defaultZoom, onZoomChange, minZoom, maxZoom, onBackgroundClick, ariaLabel, }: SelectFlowCanvasProps): import("react").JSX.Element;
|
|
47
|
+
export interface SelectFlowNodeProps {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
/**
|
|
53
|
+
* `card` = passo (gatilho, espera, envio) · `decision` = pergunta, com pontas laterais de fluxograma ·
|
|
54
|
+
* `pill` = desfecho curto no fim de um ramo ("Para a fila") · `terminal` = fim do fluxo, tracejado.
|
|
55
|
+
*/
|
|
56
|
+
shape?: 'card' | 'decision' | 'pill' | 'terminal';
|
|
57
|
+
/** Cor do chip do ícone (só `card`). */
|
|
58
|
+
tone?: 'primary' | 'info' | 'warning' | 'success' | 'neutral';
|
|
59
|
+
icon?: ReactNode;
|
|
60
|
+
/** Número de ordem (só `decision`). */
|
|
61
|
+
order?: ReactNode;
|
|
62
|
+
eyebrow?: ReactNode;
|
|
63
|
+
title?: ReactNode;
|
|
64
|
+
subtitle?: ReactNode;
|
|
65
|
+
/** Badges embaixo do texto. */
|
|
66
|
+
tags?: ReactNode;
|
|
67
|
+
/** Título em tom de alerta (ex.: "Escolher mensagem"). */
|
|
68
|
+
titleTone?: 'default' | 'warning';
|
|
69
|
+
selected?: boolean;
|
|
70
|
+
/** No caminho do teste. */
|
|
71
|
+
active?: boolean;
|
|
72
|
+
/** Fora do caminho, pausado ou inalcançável. */
|
|
73
|
+
muted?: boolean;
|
|
74
|
+
invalid?: boolean;
|
|
75
|
+
onClick?: () => void;
|
|
76
|
+
ariaLabel?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare function SelectFlowNode({ x, y, width, height, shape, tone, icon, order, eyebrow, title, subtitle, tags, titleTone, selected, active, muted, invalid, onClick, ariaLabel, }: SelectFlowNodeProps): import("react").JSX.Element;
|
|
79
|
+
export interface SelectFlowLayoutProps {
|
|
80
|
+
title: ReactNode;
|
|
81
|
+
subtitle?: ReactNode;
|
|
82
|
+
/** Voltar (seta à esquerda do título). */
|
|
83
|
+
onBack?: () => void;
|
|
84
|
+
backLabel?: string;
|
|
85
|
+
/** Controles do meio da barra (ex.: o seletor de fluxo). */
|
|
86
|
+
toolbar?: ReactNode;
|
|
87
|
+
/** Ações à direita (estado de salvamento, Salvar). */
|
|
88
|
+
actions?: ReactNode;
|
|
89
|
+
/** Aviso/erro acima do canvas. */
|
|
90
|
+
error?: ReactNode;
|
|
91
|
+
/** O `SelectFlowCanvas`. */
|
|
92
|
+
canvas: ReactNode;
|
|
93
|
+
/** Cabeçalho fixo do painel lateral (ex.: abas Editar | Testar). */
|
|
94
|
+
inspectorHead?: ReactNode;
|
|
95
|
+
inspector: ReactNode;
|
|
96
|
+
inspectorLabel?: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* SelectFlowLayout — a página de um editor de fluxo: barra (voltar · identidade · ferramentas · ações),
|
|
100
|
+
* o canvas ocupando o que sobra e um painel lateral para o bloco selecionado. Como o
|
|
101
|
+
* `SelectBuilderWorkspace`, mede `height: 100%` e governa a própria rolagem (o shell zera o respiro
|
|
102
|
+
* de rodapé para ela). Em telas estreitas o painel desce para baixo do canvas.
|
|
103
|
+
*/
|
|
104
|
+
export declare function SelectFlowLayout({ title, subtitle, onBack, backLabel, toolbar, actions, error, canvas, inspectorHead, inspector, inspectorLabel, }: SelectFlowLayoutProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
/** 0–4 score from length thresholds + lower/upper/digit/symbol variety. */
|
|
3
3
|
export declare function passwordScore(pw: string): number;
|
|
4
|
+
/** One requirement of the password policy — the caller owns the policy, the kit only draws it. */
|
|
5
|
+
export interface SelectPasswordRule {
|
|
6
|
+
label: string;
|
|
7
|
+
met: boolean;
|
|
8
|
+
}
|
|
4
9
|
type SelectPasswordStrengthOwnProps = {
|
|
5
10
|
value: string;
|
|
11
|
+
/** Requirements checklist under the meter (e.g. "12 a 32 caracteres", "Número"). */
|
|
12
|
+
rules?: SelectPasswordRule[];
|
|
6
13
|
};
|
|
7
14
|
export type SelectPasswordStrengthProps = SelectPasswordStrengthOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectPasswordStrengthOwnProps>;
|
|
8
|
-
export declare const SelectPasswordStrength: import('react').ForwardRefExoticComponent<SelectPasswordStrengthOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">,
|
|
15
|
+
export declare const SelectPasswordStrength: import('react').ForwardRefExoticComponent<SelectPasswordStrengthOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectPasswordStrengthOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
16
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export { SelectIdentityFooter } from './SelectIdentityFooter';
|
|
|
40
40
|
export { SelectOtpInput } from './SelectOtpInput';
|
|
41
41
|
export { SelectBackLink } from './SelectBackLink';
|
|
42
42
|
export { SelectResendButton } from './SelectResendButton';
|
|
43
|
-
export { SelectPasswordStrength, passwordScore } from './SelectPasswordStrength';
|
|
43
|
+
export { SelectPasswordStrength, passwordScore, type SelectPasswordRule } from './SelectPasswordStrength';
|
|
44
44
|
export { SelectLoader, type SelectLoaderProps } from './SelectLoader';
|
|
45
45
|
export { SelectText } from './SelectText';
|
|
46
46
|
export { SelectBox, SelectStack, SelectInline, SelectGrid } from './SelectLayout';
|
|
@@ -168,6 +168,7 @@ export { SelectNumberField } from './SelectNumberField';
|
|
|
168
168
|
export { SelectRepeatingFieldArray } from './SelectRepeatingFieldArray';
|
|
169
169
|
export { SelectBuilderLayout } from './SelectBuilderLayout';
|
|
170
170
|
export { SelectBuilderWorkspace } from './SelectBuilderWorkspace';
|
|
171
|
+
export { SelectFlowCanvas, SelectFlowNode, SelectFlowLayout } from './SelectFlowCanvas';
|
|
171
172
|
export { SelectSwitchField } from './SelectSwitchField';
|
|
172
173
|
export { SelectColorField } from './SelectColorField';
|
|
173
174
|
export { SelectImageField } from './SelectImageField';
|
|
@@ -176,6 +177,7 @@ export type { SelectNumberFieldProps } from './SelectNumberField';
|
|
|
176
177
|
export type { SelectRepeatingFieldArrayProps, SelectRepeatingRowHelpers } from './SelectRepeatingFieldArray';
|
|
177
178
|
export type { SelectBuilderLayoutProps } from './SelectBuilderLayout';
|
|
178
179
|
export type { SelectBuilderSection, SelectBuilderWorkspaceProps } from './SelectBuilderWorkspace';
|
|
180
|
+
export type { SelectFlowCanvasProps, SelectFlowNodeProps, SelectFlowEdge, SelectFlowEdgeState, SelectFlowLabel, SelectFlowPlus, SelectFlowLayoutProps } from './SelectFlowCanvas';
|
|
179
181
|
export type { SelectSwitchFieldProps } from './SelectSwitchField';
|
|
180
182
|
export type { SelectColorFieldProps } from './SelectColorField';
|
|
181
183
|
export type { SelectImageFieldProps } from './SelectImageField';
|