@selectwin/kit 0.1.119 → 0.1.121
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/SelectButton.d.ts +4 -0
- package/dist/SelectCombobox.d.ts +5 -0
- package/dist/SelectCopyableId.d.ts +4 -1
- package/dist/SelectField.d.ts +7 -0
- package/dist/SelectImageGalleryField.d.ts +40 -0
- package/dist/SelectOfferPrice.d.ts +5 -0
- package/dist/SelectSegmented.d.ts +6 -0
- package/dist/SelectShareBar.d.ts +19 -0
- package/dist/SelectTextarea.d.ts +2 -0
- package/dist/SelectToggle.d.ts +6 -0
- package/dist/icons.d.ts +6 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1880 -1475
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectButton.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export interface SelectButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonE
|
|
|
12
12
|
trailingIcon?: ReactNode;
|
|
13
13
|
/** Size to content instead of filling the width (toolbars, inline actions). */
|
|
14
14
|
inline?: boolean;
|
|
15
|
+
/** `critical` on a `secondary` button: the outlined button with red ink — the quiet
|
|
16
|
+
* destructive action at the foot of a page ("Excluir produto"), where the solid `danger`
|
|
17
|
+
* would shout louder than the page's own save. */
|
|
18
|
+
tone?: 'critical';
|
|
15
19
|
children: ReactNode;
|
|
16
20
|
}
|
|
17
21
|
export declare const SelectButton: import('react').ForwardRefExoticComponent<SelectButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
package/dist/SelectCombobox.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ type SelectComboboxOwnProps = {
|
|
|
29
29
|
/** Show the in-list search box (default true). Set false for a plain styled picker — the
|
|
30
30
|
* portal dropdown of SelectSelect without a search field (short option lists). */
|
|
31
31
|
searchable?: boolean;
|
|
32
|
+
/** Aceita um valor que não está nas opções: o que foi digitado na busca vira a linha
|
|
33
|
+
* `Usar "…"` (e o Enter escolhe). O valor livre continua aparecendo no gatilho. */
|
|
34
|
+
allowCustom?: boolean;
|
|
35
|
+
/** Rótulo da linha do valor livre. Padrão: `Usar "…"`. */
|
|
36
|
+
customLabel?: (query: string) => ReactNode;
|
|
32
37
|
};
|
|
33
38
|
export type SelectComboboxProps = SelectComboboxOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectComboboxOwnProps>;
|
|
34
39
|
export declare const SelectCombobox: import('react').ForwardRefExoticComponent<SelectComboboxOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectComboboxOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -16,5 +16,8 @@ export interface SelectCopyableIdProps {
|
|
|
16
16
|
* tabela. 'always' mantém o botão sempre visível: use fora de tabelas (menus,
|
|
17
17
|
* mastheads), onde não há hover de linha para revelar o affordance. */
|
|
18
18
|
reveal?: 'hover' | 'always';
|
|
19
|
+
/** 'inline' (padrão) é o id discreto de tabela. 'code' é o chip tracejado de um código que a
|
|
20
|
+
* pessoa digita (cupom): monoespaçado, com o botão de copiar sempre visível. */
|
|
21
|
+
variant?: 'inline' | 'code';
|
|
19
22
|
}
|
|
20
|
-
export declare function SelectCopyableId({ value, children, truncate, label, fallback, to, reveal, }: SelectCopyableIdProps): import("react").JSX.Element;
|
|
23
|
+
export declare function SelectCopyableId({ value, children, truncate, label, fallback, to, reveal, variant, }: SelectCopyableIdProps): import("react").JSX.Element;
|
package/dist/SelectField.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ type SelectLabelRowOwnProps = {
|
|
|
11
11
|
};
|
|
12
12
|
export type SelectLabelRowProps = SelectLabelRowOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectLabelRowOwnProps>;
|
|
13
13
|
export declare const SelectLabelRow: import('react').ForwardRefExoticComponent<SelectLabelRowOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectLabelRowOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
/** O contador "24/40" da linha do rótulo (`showCount`). Sem teto não há o que contar. */
|
|
15
|
+
export declare function charCount(value: string, maxLength: number | undefined): ReactNode;
|
|
16
|
+
/** Junta o contador à ação do rótulo — os dois cabem na mesma ponta da linha. */
|
|
17
|
+
export declare function withCount(action: ReactNode, count: ReactNode): ReactNode;
|
|
14
18
|
export interface SelectFieldProps {
|
|
15
19
|
/** Field label. Omit when an outer row already labels the field. */
|
|
16
20
|
label?: string;
|
|
@@ -55,6 +59,9 @@ export interface SelectFieldProps {
|
|
|
55
59
|
id?: string;
|
|
56
60
|
minLength?: number;
|
|
57
61
|
maxLength?: number;
|
|
62
|
+
/** Contador "24/40" na linha do rótulo (exige `maxLength`). Para textos com teto que a pessoa
|
|
63
|
+
* escreve — nome, título —, onde descobrir o limite pelo corte do teclado é pior que vê-lo chegar. */
|
|
64
|
+
showCount?: boolean;
|
|
58
65
|
/** Numeric bounds (type="number"). */
|
|
59
66
|
min?: number | string;
|
|
60
67
|
max?: number | string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectGalleryItem {
|
|
3
|
+
/** Chave estável: a própria url de uma imagem hospedada, um id gerado para um arquivo. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Imagem já hospedada (https://…). */
|
|
6
|
+
url?: string;
|
|
7
|
+
/** Arquivo escolhido agora — sobe no salvar; a prévia é um object URL. */
|
|
8
|
+
file?: File;
|
|
9
|
+
}
|
|
10
|
+
/** Item de galeria para um arquivo recém-escolhido (chave única, estável enquanto ele existir). */
|
|
11
|
+
export declare function galleryItemFromFile(file: File): SelectGalleryItem;
|
|
12
|
+
/** Item de galeria para uma imagem que já está hospedada. */
|
|
13
|
+
export declare function galleryItemFromUrl(url: string): SelectGalleryItem;
|
|
14
|
+
type SelectImageGalleryFieldOwnProps = {
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
/** Ajuda contextual: o "!" ao lado do rótulo. */
|
|
17
|
+
help?: ReactNode;
|
|
18
|
+
items: SelectGalleryItem[];
|
|
19
|
+
onChange: (items: SelectGalleryItem[]) => void;
|
|
20
|
+
/** Teto de fotos (o botão de adicionar some ao chegar). Padrão 10. */
|
|
21
|
+
max?: number;
|
|
22
|
+
/** Tipos aceitos, ex. '.jpg,.jpeg,.png,.webp'. */
|
|
23
|
+
accept?: string;
|
|
24
|
+
/** Teto por arquivo, em MB. */
|
|
25
|
+
maxSizeMB?: number;
|
|
26
|
+
hint?: ReactNode;
|
|
27
|
+
error?: string;
|
|
28
|
+
/** Oferece "Colar link de imagem" (padrão true). */
|
|
29
|
+
allowUrl?: boolean;
|
|
30
|
+
/** Lado do quadrado de cada foto, em px (padrão 88). */
|
|
31
|
+
tileSize?: number;
|
|
32
|
+
/** Rótulo do quadrado de adicionar (padrão "Adicionar"). */
|
|
33
|
+
addLabel?: string;
|
|
34
|
+
/** Selo da primeira foto (padrão "Capa"); `null` tira o selo e o "Tornar capa" (foto única). */
|
|
35
|
+
coverLabel?: string | null;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type SelectImageGalleryFieldProps = SelectImageGalleryFieldOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectImageGalleryFieldOwnProps>;
|
|
39
|
+
export declare const SelectImageGalleryField: import('react').ForwardRefExoticComponent<SelectImageGalleryFieldOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectImageGalleryFieldOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
40
|
+
export {};
|
|
@@ -11,6 +11,11 @@ type SelectOfferPriceOwnProps = {
|
|
|
11
11
|
zeroLabel?: ReactNode;
|
|
12
12
|
/** Nota discreta ao lado do preço (o prazo de entrega, por exemplo). */
|
|
13
13
|
note?: ReactNode;
|
|
14
|
+
/** Texto miúdo ANTES do preço — "a partir de", quando o card resume vários preços pelo menor. */
|
|
15
|
+
prefix?: ReactNode;
|
|
16
|
+
/** Texto miúdo colado DEPOIS do preço — a cadência de uma assinatura ("/mês", "a cada 3 meses").
|
|
17
|
+
* Fica antes do "de" riscado: é parte do preço, não do desconto. */
|
|
18
|
+
suffix?: ReactNode;
|
|
14
19
|
};
|
|
15
20
|
export type SelectOfferPriceProps = SelectOfferPriceOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectOfferPriceOwnProps>;
|
|
16
21
|
export declare const SelectOfferPrice: import('react').ForwardRefExoticComponent<SelectOfferPriceOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectOfferPriceOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -13,6 +13,12 @@ type SelectSegmentedOwnProps = {
|
|
|
13
13
|
ariaLabel?: string;
|
|
14
14
|
/** Stretch to 100% width with equal-width segments (forms/tabs). Default: hugs labels. */
|
|
15
15
|
fullWidth?: boolean;
|
|
16
|
+
/** Form label above the track (wraps the control in the field shell). */
|
|
17
|
+
label?: ReactNode;
|
|
18
|
+
/** Helper line under the track (only with `label`). */
|
|
19
|
+
hint?: ReactNode;
|
|
20
|
+
/** Freeze the choice: segments don't respond and the track dims. */
|
|
21
|
+
disabled?: boolean;
|
|
16
22
|
};
|
|
17
23
|
export type SelectSegmentedProps = SelectSegmentedOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectSegmentedOwnProps>;
|
|
18
24
|
export declare const SelectSegmented: import('react').ForwardRefExoticComponent<SelectSegmentedOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectSegmentedOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface SelectShareItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
/** Segment + dot color (else the chart ramp, in order). */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** Shown before the % in the legend (e.g. the amount). */
|
|
8
|
+
valueText?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
type SelectShareBarOwnProps = {
|
|
11
|
+
items: SelectShareItem[];
|
|
12
|
+
/** Small heading on the left, above the bar ("Por meio de pagamento"). */
|
|
13
|
+
label?: ReactNode;
|
|
14
|
+
/** Right side of that line (a total, a scope like "aprovado"). */
|
|
15
|
+
aside?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export type SelectShareBarProps = SelectShareBarOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectShareBarOwnProps>;
|
|
18
|
+
export declare function SelectShareBar({ items, label, aside, className, ...rest }: SelectShareBarProps): import("react").JSX.Element | null;
|
|
19
|
+
export {};
|
package/dist/SelectTextarea.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ type SelectTextareaOwnProps = {
|
|
|
20
20
|
required?: boolean;
|
|
21
21
|
disabled?: boolean;
|
|
22
22
|
maxLength?: number;
|
|
23
|
+
/** Contador "96/400" na linha do rótulo (exige `maxLength`). */
|
|
24
|
+
showCount?: boolean;
|
|
23
25
|
onBlur?: () => void;
|
|
24
26
|
/** Control density. Default `md`; use `sm` in dense surfaces and modal/card forms. */
|
|
25
27
|
size?: 'sm' | 'md';
|
package/dist/SelectToggle.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
|
2
2
|
type SelectToggleListOwnProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
scroll?: boolean;
|
|
5
|
+
/** Hairline ABOVE the first row too — for a list that follows other fields in a form. */
|
|
6
|
+
bordered?: boolean;
|
|
5
7
|
};
|
|
6
8
|
export type SelectToggleListProps = SelectToggleListOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectToggleListOwnProps>;
|
|
7
9
|
export declare const SelectToggleList: import('react').ForwardRefExoticComponent<SelectToggleListOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectToggleListOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -11,6 +13,10 @@ type SelectToggleRowOwnProps = {
|
|
|
11
13
|
checked: boolean;
|
|
12
14
|
onChange: (checked: boolean) => void;
|
|
13
15
|
disabled?: boolean;
|
|
16
|
+
/** Quiet line under the label — what turning it on DOES. */
|
|
17
|
+
description?: ReactNode;
|
|
18
|
+
/** Revealed under the row while `checked` (the fields the switch turns on). */
|
|
19
|
+
children?: ReactNode;
|
|
14
20
|
};
|
|
15
21
|
export type SelectToggleRowProps = SelectToggleRowOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectToggleRowOwnProps>;
|
|
16
22
|
export declare const SelectToggleRow: import('react').ForwardRefExoticComponent<SelectToggleRowOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectToggleRowOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/icons.d.ts
CHANGED
|
@@ -106,6 +106,12 @@ export declare function MoneyReceiveIcon(): import("react").JSX.Element;
|
|
|
106
106
|
export declare function ClipboardIcon(): import("react").JSX.Element;
|
|
107
107
|
export declare function NoteIcon(): import("react").JSX.Element;
|
|
108
108
|
export declare function DiscountIcon(): import("react").JSX.Element;
|
|
109
|
+
/**
|
|
110
|
+
* Bilhete com o "%" — o glifo de UM cupom (o card da lista, a prévia do formulário). O
|
|
111
|
+
* `DiscountIcon` (o selo) continua sendo a SEÇÃO Cupons no menu: o recurso e o item dele
|
|
112
|
+
* não usam o mesmo desenho. Iconsax Linear "ticket-discount".
|
|
113
|
+
*/
|
|
114
|
+
export declare function TicketDiscountIcon(): import("react").JSX.Element;
|
|
109
115
|
/**
|
|
110
116
|
* Sinal saindo de um ponto — o glifo do RASTREIO (pixels do checkout). Não reaproveitar
|
|
111
117
|
* `ChartLineIcon` aqui: aquele é o glifo do **Analytics** (item do menu lateral e empty
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { SelectDocumentField } from './SelectDocumentField';
|
|
|
14
14
|
export { SelectFileDropzone } from './SelectFileDropzone';
|
|
15
15
|
export { SelectImageUrlsField } from './SelectImageUrlsField';
|
|
16
16
|
export { SelectImageUploadField } from './SelectImageUploadField';
|
|
17
|
+
export { SelectImageGalleryField, galleryItemFromFile, galleryItemFromUrl } from './SelectImageGalleryField';
|
|
17
18
|
export { SelectBankAccountField } from './SelectBankAccountField';
|
|
18
19
|
export { SelectFieldGrid } from './SelectFieldGrid';
|
|
19
20
|
export { SelectToggleList, SelectToggleRow } from './SelectToggle';
|
|
@@ -106,6 +107,7 @@ export { SelectComboChart } from './SelectComboChart';
|
|
|
106
107
|
export { SelectDonut } from './SelectDonut';
|
|
107
108
|
export { SelectColumnChart } from './SelectColumnChart';
|
|
108
109
|
export { SelectChartLegend } from './SelectChartLegend';
|
|
110
|
+
export { SelectShareBar } from './SelectShareBar';
|
|
109
111
|
export { SelectFunnel } from './SelectFunnel';
|
|
110
112
|
export { SelectGauge } from './SelectGauge';
|
|
111
113
|
export { SelectHeatmap } from './SelectHeatmap';
|
|
@@ -213,6 +215,7 @@ export type { SelectDateRangeFieldProps, SelectDateRangeValue } from './SelectDa
|
|
|
213
215
|
export type { SelectFileDropzoneProps } from './SelectFileDropzone';
|
|
214
216
|
export type { SelectImageUrlsFieldProps } from './SelectImageUrlsField';
|
|
215
217
|
export type { SelectImageUploadFieldProps, SelectImageUploadMode } from './SelectImageUploadField';
|
|
218
|
+
export type { SelectImageGalleryFieldProps, SelectGalleryItem } from './SelectImageGalleryField';
|
|
216
219
|
export type { SelectFileTileProps } from './SelectFileTile';
|
|
217
220
|
export type { SelectKeyValuePair, SelectKeyValueEditorProps } from './SelectKeyValueEditor';
|
|
218
221
|
export type { SelectBankAccount, SelectBankOption } from './SelectBankAccountField';
|
|
@@ -239,6 +242,7 @@ export type { SelectTagOption } from './SelectTagSelect';
|
|
|
239
242
|
export type { SelectChartSeries, SelectBarDatum, SelectDonutSegment, SelectFunnelStage } from './chartUtils';
|
|
240
243
|
export type { SelectColumnChartProps, SelectColumnTooltip } from './SelectColumnChart';
|
|
241
244
|
export type { SelectChartLegendProps, SelectChartLegendItem } from './SelectChartLegend';
|
|
245
|
+
export type { SelectShareBarProps, SelectShareItem } from './SelectShareBar';
|
|
242
246
|
export type { SelectHeatmapRow } from './SelectHeatmap';
|
|
243
247
|
export type { SelectProgressItem } from './SelectProgressList';
|
|
244
248
|
export type { SelectRadialSeries } from './SelectRadialBar';
|