@selectwin/kit 0.1.102 → 0.1.104

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.
@@ -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,31 @@
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
+ type SelectChoiceGridOwnProps = {
25
+ children: ReactNode;
26
+ /** Largura mínima de um card antes de a grade quebrar a linha. */
27
+ minCardWidth?: string;
28
+ };
29
+ export type SelectChoiceGridProps = SelectChoiceGridOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectChoiceGridOwnProps>;
30
+ 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>>;
31
+ 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?: string;
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
- hint?: string;
7
- error?: string;
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, hint, error }: SelectColorFieldProps): import("react").JSX.Element;
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 {};
@@ -0,0 +1,22 @@
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
+ };
20
+ export type SelectProgressBarProps = SelectProgressBarOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectProgressBarOwnProps>;
21
+ 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>>;
22
+ 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/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, 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';