@selectwin/kit 0.1.103 → 0.1.105
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 +4 -1
- package/dist/SelectCertificatePreview.d.ts +26 -0
- package/dist/SelectChoiceCard.d.ts +39 -0
- package/dist/SelectColorField.d.ts +21 -4
- package/dist/SelectHorizontalBar.d.ts +7 -1
- package/dist/SelectKpiCard.d.ts +2 -0
- package/dist/SelectProgressBar.d.ts +24 -0
- package/dist/SelectRecordCard.d.ts +7 -0
- package/dist/SelectSection.d.ts +3 -1
- package/dist/SelectSkeleton.d.ts +14 -1
- package/dist/icons.d.ts +12 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1597 -1078
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectCardGrid.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SelectListChromeProps, SelectListPagination } from './internal/listChrome';
|
|
3
|
-
export declare function SelectCardGrid<T>({ items, getId, renderItem, loading, skeletonCount, empty, pagination, create, minCardWidth, title, help, description, action, filters, tools, }: {
|
|
3
|
+
export declare function SelectCardGrid<T>({ items, getId, renderItem, loading, skeletonCount, empty, pagination, create, minCardWidth, skeletonCover, title, help, description, action, filters, tools, }: {
|
|
4
4
|
items: T[];
|
|
5
5
|
getId: (item: T) => string;
|
|
6
6
|
/** O card de um item — tipicamente um SelectRecordCard. */
|
|
@@ -25,4 +25,7 @@ export declare function SelectCardGrid<T>({ items, getId, renderItem, loading, s
|
|
|
25
25
|
};
|
|
26
26
|
/** Piso da coluna da grade (`auto-fill` + `minmax`). */
|
|
27
27
|
minCardWidth?: string;
|
|
28
|
+
/** Os cards têm capa (`SelectRecordCard cover`): o esqueleto traz a faixa 16:9 no topo, para a
|
|
29
|
+
* grade não pular de altura quando as capas chegam. */
|
|
30
|
+
skeletonCover?: boolean;
|
|
28
31
|
} & SelectListChromeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectCertificateSignature {
|
|
3
|
+
name: ReactNode;
|
|
4
|
+
role?: ReactNode;
|
|
5
|
+
imageUrl?: string | null;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectCertificatePreviewProps {
|
|
8
|
+
side?: 'front' | 'back';
|
|
9
|
+
/** A cor do Club (moldura + chamada). */
|
|
10
|
+
accent?: string;
|
|
11
|
+
/** O título da folha — no site, o nome do curso. */
|
|
12
|
+
courseTitle: ReactNode;
|
|
13
|
+
/** Linha sob o título (o título configurado, quando difere do curso). */
|
|
14
|
+
subtitle?: ReactNode;
|
|
15
|
+
/** Quem recebe — na miniatura, um exemplo. */
|
|
16
|
+
memberName?: ReactNode;
|
|
17
|
+
body?: ReactNode;
|
|
18
|
+
signatures?: SelectCertificateSignature[];
|
|
19
|
+
/** Rodapé da frente. */
|
|
20
|
+
issuedAt?: ReactNode;
|
|
21
|
+
verificationCode?: ReactNode;
|
|
22
|
+
/** Chamada do topo. Padrão: "Certificado de conclusão" (frente) / "Verso". */
|
|
23
|
+
eyebrow?: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const SelectCertificatePreview: import('react').ForwardRefExoticComponent<SelectCertificatePreviewProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface SelectChoiceCardProps {
|
|
3
|
+
/** O glifo (um ícone do kit). */
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
/** Cor do quadrado do ícone (hex/var). Padrão: a primária da casa. */
|
|
6
|
+
accent?: string;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Canto superior direito — um SelectBadge ("3 cursos", "Recomendado"). */
|
|
10
|
+
badge?: ReactNode;
|
|
11
|
+
/** Rodapé à esquerda — contexto curto ("Até 5 GB", "MP4, MOV…"). */
|
|
12
|
+
meta?: ReactNode;
|
|
13
|
+
/** A chamada do rodapé à direita ("Criar", "Abrir"). A seta vem junto. */
|
|
14
|
+
cta?: ReactNode;
|
|
15
|
+
to?: string;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Âncora de tour/teste. */
|
|
21
|
+
'data-tour'?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const SelectChoiceCard: import('react').ForwardRefExoticComponent<SelectChoiceCardProps & import('react').RefAttributes<HTMLElement>>;
|
|
24
|
+
/** O card carregando, na FORMA do real: quadrado do ícone, selo no canto, nome, duas linhas e o rodapé. */
|
|
25
|
+
export declare function SelectChoiceCardSkeleton({ badge }: {
|
|
26
|
+
badge?: boolean;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
type SelectChoiceGridOwnProps = {
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/** Largura mínima de um card antes de a grade quebrar a linha. */
|
|
31
|
+
minCardWidth?: string;
|
|
32
|
+
/** Carregando: a grade desenha `skeletonCount` cards-esqueleto no lugar dos filhos. */
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/** Quantos esqueletos — o número de cards que VAI aparecer, para a grade não mudar de forma. */
|
|
35
|
+
skeletonCount?: number;
|
|
36
|
+
};
|
|
37
|
+
export type SelectChoiceGridProps = SelectChoiceGridOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectChoiceGridOwnProps>;
|
|
38
|
+
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>>;
|
|
39
|
+
export {};
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Paleta para marca: neutros e tons médios que aguentam texto branco por cima. */
|
|
3
|
+
export declare const SELECT_COLOR_PRESETS: string[];
|
|
4
|
+
/** `#abc` / `abc` / `#aabbcc` → `#AABBCC`; qualquer outra coisa → null. */
|
|
5
|
+
export declare function normalizeHex(input: string): string | null;
|
|
6
|
+
/** Razão de contraste WCAG entre duas cores (1 a 21). */
|
|
7
|
+
export declare function contrastRatio(a: string, b: string): number;
|
|
1
8
|
export interface SelectColorFieldProps {
|
|
2
|
-
label?:
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
help?: ReactNode;
|
|
11
|
+
hint?: ReactNode;
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
/** `#RRGGBB`, ou vazio quando `allowEmpty`. */
|
|
3
14
|
value: string;
|
|
4
15
|
onChange: (hex: string) => void;
|
|
16
|
+
presets?: string[];
|
|
5
17
|
disabled?: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
18
|
+
/** Deixa apagar a cor (volta ao padrão de quem usa). */
|
|
19
|
+
allowEmpty?: boolean;
|
|
20
|
+
/** A cor do texto que vai POR CIMA desta — mede o contraste e avisa quando fica ilegível. */
|
|
21
|
+
contrastWith?: string;
|
|
22
|
+
/** Como chamar esse texto no aviso ("o texto branco", "o texto do botão"). */
|
|
23
|
+
contrastLabel?: string;
|
|
24
|
+
id?: string;
|
|
8
25
|
}
|
|
9
|
-
export declare function SelectColorField({ label, value, onChange, disabled,
|
|
26
|
+
export declare function SelectColorField({ label, help, hint, error, value, onChange, presets, disabled, allowEmpty, contrastWith, contrastLabel, id: idProp, }: SelectColorFieldProps): import("react").JSX.Element;
|
|
@@ -17,7 +17,13 @@ type SelectHorizontalBarOwnProps = {
|
|
|
17
17
|
distributed?: boolean;
|
|
18
18
|
/** Width reserved for the category labels. Omit to size it from the longest label (recommended). */
|
|
19
19
|
labelWidth?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Fixed top of the scale (e.g. 100 for percentages). Omit to scale to the largest value. A
|
|
22
|
+
* percentage chart scaled to its own maximum draws a 30% bar at full width — which reads as
|
|
23
|
+
* "everyone watched it all".
|
|
24
|
+
*/
|
|
25
|
+
max?: number;
|
|
20
26
|
};
|
|
21
27
|
export type SelectHorizontalBarProps = SelectHorizontalBarOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectHorizontalBarOwnProps>;
|
|
22
|
-
export declare function SelectHorizontalBar({ data, height, color, format, formatValue, distributed, labelWidth, className, ...rest }: SelectHorizontalBarProps): import("react").JSX.Element;
|
|
28
|
+
export declare function SelectHorizontalBar({ data, height, color, format, formatValue, distributed, labelWidth, max: fixedMax, className, ...rest }: SelectHorizontalBarProps): import("react").JSX.Element;
|
|
23
29
|
export {};
|
package/dist/SelectKpiCard.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
type SelectKpiCardOwnProps = {
|
|
3
3
|
label: ReactNode;
|
|
4
|
+
/** O número ainda carrega: valor e legenda viram skeleton na altura deles (o rótulo fica). */
|
|
5
|
+
loading?: boolean;
|
|
4
6
|
value: ReactNode;
|
|
5
7
|
caption?: ReactNode;
|
|
6
8
|
chart?: ReactNode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type SelectProgressTone = 'brand' | 'success' | 'warning' | 'critical';
|
|
3
|
+
type SelectProgressBarOwnProps = {
|
|
4
|
+
/** De 0 a `max`. */
|
|
5
|
+
value?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
tone?: SelectProgressTone;
|
|
8
|
+
size?: 'sm' | 'md';
|
|
9
|
+
/** Texto à esquerda, acima da barra. */
|
|
10
|
+
label?: ReactNode;
|
|
11
|
+
/** Texto à direita, acima da barra (o número: "42%", "1,2 GB de 5 GB"). */
|
|
12
|
+
valueLabel?: ReactNode;
|
|
13
|
+
/** Linha de apoio sob a barra. */
|
|
14
|
+
caption?: ReactNode;
|
|
15
|
+
/** Sem número: a faixa corre (processando). */
|
|
16
|
+
indeterminate?: boolean;
|
|
17
|
+
/** Nome acessível quando não há `label` visível. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** O número ainda não chegou: rótulo, valor e trilho viram esqueleto na mesma altura. */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type SelectProgressBarProps = SelectProgressBarOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectProgressBarOwnProps>;
|
|
23
|
+
export declare const SelectProgressBar: import('react').ForwardRefExoticComponent<SelectProgressBarOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectProgressBarOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export {};
|
|
@@ -27,6 +27,13 @@ type SelectRecordCardOwnProps = {
|
|
|
27
27
|
to?: string;
|
|
28
28
|
/** Faixa de destaque no topo (ex.: o registro em vigor). */
|
|
29
29
|
accent?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Capa larga (16:9) no topo do card — a imagem que o lojista reconhece de relance (a capa de
|
|
32
|
+
* um curso). `null` = o registro não tem capa: mostra `coverFallback` num fundo neutro, para a
|
|
33
|
+
* grade não ficar com cards de alturas diferentes. Omitido = card sem faixa de capa.
|
|
34
|
+
*/
|
|
35
|
+
cover?: string | null;
|
|
36
|
+
coverFallback?: ReactNode;
|
|
30
37
|
};
|
|
31
38
|
export type SelectRecordCardProps = SelectRecordCardOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectRecordCardOwnProps>;
|
|
32
39
|
export declare const SelectRecordCard: import('react').ForwardRefExoticComponent<SelectRecordCardOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectRecordCardOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/SelectSection.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ type SelectSectionOwnProps = {
|
|
|
5
5
|
* `collapsible` — ali o head inteiro é um <button>, e botão dentro de botão é DOM
|
|
6
6
|
* inválido. */
|
|
7
7
|
help?: ReactNode;
|
|
8
|
-
/** Subdued line under the title (e.g. the step subtitle of a wizard card).
|
|
8
|
+
/** Subdued line under the title (e.g. the step subtitle of a wizard card). Collapsible too:
|
|
9
|
+
* there it is the SUMMARY of what is inside ("Liberação imediata · conclui com 90%"), so the
|
|
10
|
+
* closed card still says what it holds. */
|
|
9
11
|
description?: ReactNode;
|
|
10
12
|
/** Right-aligned action in the head (e.g. an "Editar" link). Ignored when collapsible. */
|
|
11
13
|
action?: ReactNode;
|
package/dist/SelectSkeleton.d.ts
CHANGED
|
@@ -9,8 +9,19 @@ declare function SkeletonThumbnail({ size }: {
|
|
|
9
9
|
}): import("react").JSX.Element;
|
|
10
10
|
/** Área de conteúdo não-textual carregando (chart, mapa, imagem, preview): retângulo
|
|
11
11
|
* shimmer com 100% da largura do pai e a altura dada. */
|
|
12
|
-
declare function SkeletonBlock({ height }: {
|
|
12
|
+
declare function SkeletonBlock({ height, aspectRatio }: {
|
|
13
13
|
height?: number | string;
|
|
14
|
+
aspectRatio?: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Um campo de formulário carregando: o rótulo curto e a caixa do controle na altura real. */
|
|
17
|
+
declare function SkeletonField({ tall }: {
|
|
18
|
+
tall?: boolean;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
/** Uma linha de lista carregando. `boxed` = o item emoldurado (linha dentro de um well). */
|
|
21
|
+
declare function SkeletonRow({ media, action, boxed }: {
|
|
22
|
+
media?: boolean;
|
|
23
|
+
action?: boolean;
|
|
24
|
+
boxed?: boolean;
|
|
14
25
|
}): import("react").JSX.Element;
|
|
15
26
|
export declare const SelectSkeleton: (({ lines }: {
|
|
16
27
|
lines?: number;
|
|
@@ -19,5 +30,7 @@ export declare const SelectSkeleton: (({ lines }: {
|
|
|
19
30
|
Display: typeof SkeletonDisplay;
|
|
20
31
|
Thumbnail: typeof SkeletonThumbnail;
|
|
21
32
|
Block: typeof SkeletonBlock;
|
|
33
|
+
Field: typeof SkeletonField;
|
|
34
|
+
Row: typeof SkeletonRow;
|
|
22
35
|
};
|
|
23
36
|
export {};
|
package/dist/icons.d.ts
CHANGED
|
@@ -122,4 +122,16 @@ export declare function CartIcon(): import("react").JSX.Element;
|
|
|
122
122
|
export declare function MenuIcon(): import("react").JSX.Element;
|
|
123
123
|
/** Marketplace — a storefront with an awning (a platform of sub-stores). */
|
|
124
124
|
export declare function StorefrontIcon({ duotone }?: IconVariantProps): import("react").JSX.Element;
|
|
125
|
+
/** Vídeo — o play no círculo (Iconsax play-circle). Aula em vídeo, envio de vídeo. */
|
|
126
|
+
export declare function PlayCircleIcon(): import("react").JSX.Element;
|
|
127
|
+
/** Livro aberto (Iconsax book) — e-book, material de leitura. */
|
|
128
|
+
export declare function BookIcon(): import("react").JSX.Element;
|
|
129
|
+
/** Documento com download (Iconsax document-download) — arquivo para baixar. */
|
|
130
|
+
export declare function FileDownloadIcon(): import("react").JSX.Element;
|
|
131
|
+
/** Medalha (Iconsax medal) — certificado, conquista. */
|
|
132
|
+
export declare function AwardIcon(): import("react").JSX.Element;
|
|
133
|
+
/** Duas pessoas (Iconsax profile-2user) — membros, alunos, equipe. */
|
|
134
|
+
export declare function UsersIcon(): import("react").JSX.Element;
|
|
135
|
+
/** Três círculos sobrepostos (Iconsax colorfilter) — cor, identidade visual. */
|
|
136
|
+
export declare function PaletteIcon(): import("react").JSX.Element;
|
|
125
137
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -176,7 +176,10 @@ export { SelectBuilderLayout } from './SelectBuilderLayout';
|
|
|
176
176
|
export { SelectBuilderWorkspace } from './SelectBuilderWorkspace';
|
|
177
177
|
export { SelectFlowCanvas, SelectFlowNode, SelectFlowLayout } from './SelectFlowCanvas';
|
|
178
178
|
export { SelectSwitchField } from './SelectSwitchField';
|
|
179
|
-
export { SelectColorField } from './SelectColorField';
|
|
179
|
+
export { SelectColorField, SELECT_COLOR_PRESETS, normalizeHex, contrastRatio } from './SelectColorField';
|
|
180
|
+
export { SelectProgressBar, type SelectProgressBarProps, type SelectProgressTone } from './SelectProgressBar';
|
|
181
|
+
export { SelectChoiceCard, SelectChoiceCardSkeleton, SelectChoiceGrid, type SelectChoiceCardProps, type SelectChoiceGridProps } from './SelectChoiceCard';
|
|
182
|
+
export { SelectCertificatePreview, type SelectCertificatePreviewProps, type SelectCertificateSignature } from './SelectCertificatePreview';
|
|
180
183
|
export { SelectImageField } from './SelectImageField';
|
|
181
184
|
export { SelectAccordion } from './SelectAccordion';
|
|
182
185
|
export type { SelectNumberFieldProps } from './SelectNumberField';
|