@giro-ds/react 11.2.0 → 12.0.0
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/index.cjs +397 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +211 -80
- package/dist/index.esm.js +398 -125
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +4 -4
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ReactElement, RefObject, ComponentPropsWithoutRef, CSSProperties } from 'react';
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import { DateRange, Matcher } from 'react-day-picker';
|
|
4
|
+
export { DateRange } from 'react-day-picker';
|
|
5
5
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
|
6
6
|
export { ColumnDef as TableColumnDefinition, createColumnHelper as createTableColumnHelper } from '@tanstack/react-table';
|
|
7
7
|
import { Toast as Toast$1 } from 'radix-ui';
|
|
@@ -56,8 +56,8 @@ interface AvatarProps extends Omit<BaseProps, 'disabled'> {
|
|
|
56
56
|
size?: Size;
|
|
57
57
|
/** URL da imagem do avatar. Quando fornecido, exibe a imagem; caso contrário, mostra o ícone */
|
|
58
58
|
src?: string;
|
|
59
|
-
/** Texto alternativo
|
|
60
|
-
|
|
59
|
+
/** Texto alternativo exibido no fallback (ex.: iniciais). Limitado a no máximo 2 caracteres */
|
|
60
|
+
text?: string;
|
|
61
61
|
/** Classe CSS opcional */
|
|
62
62
|
className?: string;
|
|
63
63
|
}
|
|
@@ -94,6 +94,36 @@ interface BadgeProps extends BaseProps {
|
|
|
94
94
|
|
|
95
95
|
declare const Badge: React__default.FC<BadgeProps>;
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Props base compartilhadas por todas as configurações de tooltip do botão.
|
|
99
|
+
*/
|
|
100
|
+
interface BaseTooltipConfig$3 {
|
|
101
|
+
/** Lado em que o tooltip será exibido */
|
|
102
|
+
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
103
|
+
/** Alinhamento do tooltip */
|
|
104
|
+
tooltipAlign?: 'start' | 'center' | 'end';
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Configuração de tooltip com texto.
|
|
108
|
+
* Exibe um tooltip ao redor do botão — útil especialmente para botões icon-only.
|
|
109
|
+
*/
|
|
110
|
+
interface WithTooltip$3 extends BaseTooltipConfig$3 {
|
|
111
|
+
/** Texto do tooltip exibido no hover */
|
|
112
|
+
tooltipText: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Configuração sem tooltip.
|
|
116
|
+
*/
|
|
117
|
+
interface WithoutTooltip$3 {
|
|
118
|
+
tooltipText?: never;
|
|
119
|
+
tooltipSide?: never;
|
|
120
|
+
tooltipAlign?: never;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Union type representando a configuração de tooltip do botão.
|
|
124
|
+
* Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
|
|
125
|
+
*/
|
|
126
|
+
type ButtonTooltipConfig = WithTooltip$3 | WithoutTooltip$3;
|
|
97
127
|
/**
|
|
98
128
|
* Props base do Button, independentes da variante iconOnly/icon.
|
|
99
129
|
* `target`, `rel`, `type` e `onClick` são declarados aqui para garantir
|
|
@@ -128,19 +158,13 @@ type ButtonOwnPropsBase = {
|
|
|
128
158
|
ariaLabel?: string;
|
|
129
159
|
/** Estado de carregamento (exibe spinner) */
|
|
130
160
|
loading?: boolean;
|
|
131
|
-
/** Texto do tooltip exibido quando o botão é apenas ícone */
|
|
132
|
-
tooltipText?: string;
|
|
133
|
-
/** Lado em que o tooltip será exibido */
|
|
134
|
-
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
135
|
-
/** Alinhamento do tooltip */
|
|
136
|
-
tooltipAlign?: 'start' | 'center' | 'end';
|
|
137
161
|
/**
|
|
138
162
|
* Classe CSS adicional para customização. Use com moderação e prefira as variantes e estilos pré-definidos do design system.
|
|
139
163
|
*/
|
|
140
164
|
className?: string;
|
|
141
165
|
/** Handler de clique; tipado em HTMLElement para ser compatível com todos os modos */
|
|
142
166
|
onClick?: React__default.MouseEventHandler<HTMLElement>;
|
|
143
|
-
} & ScalableProps;
|
|
167
|
+
} & ScalableProps & ButtonTooltipConfig;
|
|
144
168
|
/**
|
|
145
169
|
* Props próprias do componente Button.
|
|
146
170
|
* Quando `iconOnly: true`, a prop `icon` é **obrigatória**.
|
|
@@ -187,13 +211,25 @@ type ButtonAsCustom = ButtonOwnProps & Omit<React__default.HTMLAttributes<HTMLEl
|
|
|
187
211
|
*/
|
|
188
212
|
type ButtonProps = ButtonAsButton | ButtonAsAnchor | ButtonAsCustom;
|
|
189
213
|
|
|
190
|
-
declare const Button:
|
|
214
|
+
declare const Button: {
|
|
215
|
+
({ ref, as, children, variant, iconPosition, href, to, external, target, rel, disabled, onClick, size, scale, className, type, id, icon, fullWidth, ariaLabel, iconOnly, loading, tooltipText, tooltipSide, tooltipAlign, ...rest }: ButtonProps & {
|
|
216
|
+
ref?: React__default.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
217
|
+
}): React__default.JSX.Element;
|
|
218
|
+
displayName: string;
|
|
219
|
+
};
|
|
191
220
|
|
|
192
221
|
/** Formato de exibição da data aceito pelo componente. */
|
|
193
222
|
type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy' | (string & {});
|
|
194
223
|
interface CalendarBaseProps extends Omit<ScalableProps, 'disabled'> {
|
|
195
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* Modo de seleção de datas.
|
|
226
|
+
* @default 'single'
|
|
227
|
+
*/
|
|
228
|
+
mode?: 'single' | 'range';
|
|
229
|
+
/** Data selecionada atualmente (modo `single`). */
|
|
196
230
|
selected?: Date | null;
|
|
231
|
+
/** Intervalo de datas selecionado (modo `range`). */
|
|
232
|
+
selectedRange?: DateRange | null;
|
|
197
233
|
/**
|
|
198
234
|
* Mês exibido no calendário. Use junto com `onDateChange` para
|
|
199
235
|
* controlar a navegação externamente.
|
|
@@ -208,8 +244,15 @@ interface CalendarBaseProps extends Omit<ScalableProps, 'disabled'> {
|
|
|
208
244
|
startMonth?: Date;
|
|
209
245
|
/** Último mês navegável. */
|
|
210
246
|
endMonth?: Date;
|
|
211
|
-
/**
|
|
247
|
+
/**
|
|
248
|
+
* Quantidade de meses exibidos simultaneamente.
|
|
249
|
+
* @default 1
|
|
250
|
+
*/
|
|
251
|
+
numberOfMonths?: number;
|
|
252
|
+
/** Chamado quando o usuário seleciona um dia (modo `single`). */
|
|
212
253
|
onDaySelect?: (date: Date) => void;
|
|
254
|
+
/** Chamado quando o usuário seleciona um intervalo (modo `range`). */
|
|
255
|
+
onRangeSelect?: (range: DateRange | undefined) => void;
|
|
213
256
|
/** Chamado quando o usuário navega entre meses. */
|
|
214
257
|
onDateChange?: (date: Date) => void;
|
|
215
258
|
/** Chamado quando o usuário limpa a seleção. */
|
|
@@ -242,7 +285,7 @@ interface CalendarBaseProps extends Omit<ScalableProps, 'disabled'> {
|
|
|
242
285
|
}
|
|
243
286
|
type CalendarProps = CalendarBaseProps;
|
|
244
287
|
|
|
245
|
-
declare const Calendar: ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear
|
|
288
|
+
declare const Calendar: ({ mode, selected, selectedRange, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onRangeSelect, onDateChange, onClear, minDate, maxDate, disabled, format: _format, locale, autoFocus, numberOfMonths, className, style, scale, id, "aria-label": ariaLabel, ...rest }: CalendarProps) => React$1.JSX.Element;
|
|
246
289
|
|
|
247
290
|
/**
|
|
248
291
|
* Props do componente Callout
|
|
@@ -316,7 +359,7 @@ interface CardProps {
|
|
|
316
359
|
hoverable?: boolean;
|
|
317
360
|
}
|
|
318
361
|
|
|
319
|
-
declare function Card({ children, className, hoverable }: CardProps):
|
|
362
|
+
declare function Card({ children, className, hoverable }: CardProps): React$1.JSX.Element;
|
|
320
363
|
|
|
321
364
|
/**
|
|
322
365
|
* Props do componente Checkbox
|
|
@@ -405,7 +448,7 @@ interface ContainerProps {
|
|
|
405
448
|
className?: string;
|
|
406
449
|
}
|
|
407
450
|
|
|
408
|
-
declare function Container({ children, className }: ContainerProps):
|
|
451
|
+
declare function Container({ children, className }: ContainerProps): React$1.JSX.Element;
|
|
409
452
|
|
|
410
453
|
/**
|
|
411
454
|
* Props do componente DatePicker
|
|
@@ -583,7 +626,12 @@ interface FileUploadProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
|
|
|
583
626
|
description?: string;
|
|
584
627
|
}
|
|
585
628
|
|
|
586
|
-
declare const FileUpload:
|
|
629
|
+
declare const FileUpload: {
|
|
630
|
+
({ ref, value, onChange, helperText, error, errorMessage, maxFileSize, maxFilesQuantity, disabled, className, id, accept, multiple, description, descriptionErrorMessage, ...rest }: FileUploadProps & {
|
|
631
|
+
ref?: React__default.Ref<HTMLInputElement>;
|
|
632
|
+
}): React__default.JSX.Element;
|
|
633
|
+
displayName: string;
|
|
634
|
+
};
|
|
587
635
|
|
|
588
636
|
interface FilterItem$2 {
|
|
589
637
|
/** Identificador único do item (usado em `selectedIds` e `onApplyFilter`) */
|
|
@@ -597,7 +645,7 @@ interface FilterItem$2 {
|
|
|
597
645
|
/** Desabilita o item, impedindo sua seleção */
|
|
598
646
|
disabled?: BaseProps['disabled'];
|
|
599
647
|
}
|
|
600
|
-
type
|
|
648
|
+
type FilterTypes = 'single' | 'multiple' | 'calendar';
|
|
601
649
|
/**
|
|
602
650
|
* Props do componente Filter
|
|
603
651
|
* @example
|
|
@@ -626,7 +674,7 @@ interface FilterProps extends BaseProps {
|
|
|
626
674
|
/** Array de itens para filtros do tipo dropdown */
|
|
627
675
|
items?: FilterItem$2[];
|
|
628
676
|
/** Tipo do filtro (dropdown ou calendário) */
|
|
629
|
-
type?:
|
|
677
|
+
type?: FilterTypes;
|
|
630
678
|
/** IDs dos itens selecionados */
|
|
631
679
|
selectedIds?: string[];
|
|
632
680
|
/** Callback executado ao aplicar filtro: (selectedIds) => void */
|
|
@@ -673,8 +721,8 @@ interface FilterProps extends BaseProps {
|
|
|
673
721
|
drawerWidth?: string;
|
|
674
722
|
/** Título do painel lateral (padrão: 'Filtrar') */
|
|
675
723
|
title?: string;
|
|
676
|
-
/** Número de filtros
|
|
677
|
-
|
|
724
|
+
/** Número de filtros aplicados exibido como badge no botão */
|
|
725
|
+
appliedFilterCount?: number;
|
|
678
726
|
/** Conteúdo customizado no cabeçalho do Drawer */
|
|
679
727
|
drawerHeaderContent?: ReactNode;
|
|
680
728
|
/** Conteúdo do painel lateral no modo combined */
|
|
@@ -1082,7 +1130,7 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
|
|
|
1082
1130
|
/** Controla a exibição do botão {emoticon} nos layouts suportados */
|
|
1083
1131
|
Emoji?: boolean;
|
|
1084
1132
|
/** Placeholder do TextField exibido no modo `fixed` */
|
|
1085
|
-
|
|
1133
|
+
placeholder?: string;
|
|
1086
1134
|
/** Escala do TextField exibido no modo `fixed` */
|
|
1087
1135
|
textFieldScale?: 1 | 1.5 | 2;
|
|
1088
1136
|
/**
|
|
@@ -1170,8 +1218,43 @@ interface SearchProps extends ScalableProps, NativeInputProps {
|
|
|
1170
1218
|
virtualKeyboard?: VirtualKeyboardType;
|
|
1171
1219
|
}
|
|
1172
1220
|
|
|
1173
|
-
declare const Search:
|
|
1221
|
+
declare const Search: {
|
|
1222
|
+
({ ref, placeholder, disabled, value, onChange, onKeyDown, onFocus, onBlur, onClear, onClick, onMouseDown, searchMode, onSearch, id, scale, className, style, virtualKeyboard, "data-testid": testId, ...rest }: SearchProps & {
|
|
1223
|
+
ref?: React__default.Ref<HTMLInputElement>;
|
|
1224
|
+
}): React__default.JSX.Element;
|
|
1225
|
+
displayName: string;
|
|
1226
|
+
};
|
|
1174
1227
|
|
|
1228
|
+
/**
|
|
1229
|
+
* Props base compartilhadas por todas as configurações de tooltip do select.
|
|
1230
|
+
*/
|
|
1231
|
+
interface BaseTooltipConfig$2 {
|
|
1232
|
+
/** Lado em que o tooltip será exibido */
|
|
1233
|
+
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
1234
|
+
/** Alinhamento do tooltip */
|
|
1235
|
+
tooltipAlign?: 'start' | 'center' | 'end';
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Configuração de tooltip com texto.
|
|
1239
|
+
* Exibe um tooltip ao redor da label do select.
|
|
1240
|
+
*/
|
|
1241
|
+
interface WithTooltip$2 extends BaseTooltipConfig$2 {
|
|
1242
|
+
/** Texto do tooltip exibido no hover */
|
|
1243
|
+
tooltipText: string;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Configuração sem tooltip.
|
|
1247
|
+
*/
|
|
1248
|
+
interface WithoutTooltip$2 {
|
|
1249
|
+
tooltipText?: never;
|
|
1250
|
+
tooltipSide?: never;
|
|
1251
|
+
tooltipAlign?: never;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Union type representando a configuração de tooltip do select.
|
|
1255
|
+
* Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
|
|
1256
|
+
*/
|
|
1257
|
+
type SelectTooltipConfig = WithTooltip$2 | WithoutTooltip$2;
|
|
1175
1258
|
/**
|
|
1176
1259
|
* Representa um item do select
|
|
1177
1260
|
*/
|
|
@@ -1218,7 +1301,7 @@ type SelectVariant = 'text' | 'icon' | 'checkbox';
|
|
|
1218
1301
|
* />
|
|
1219
1302
|
* ```
|
|
1220
1303
|
*/
|
|
1221
|
-
interface
|
|
1304
|
+
interface SelectPropsBase extends ScalableProps {
|
|
1222
1305
|
/** Array de itens do select */
|
|
1223
1306
|
items: SelectItemProps[];
|
|
1224
1307
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -1243,20 +1326,14 @@ interface SelectProps extends ScalableProps {
|
|
|
1243
1326
|
helperText?: string;
|
|
1244
1327
|
/** Largura máxima do select */
|
|
1245
1328
|
maxWidth?: number;
|
|
1329
|
+
/** Indica estado de erro externo */
|
|
1330
|
+
error?: boolean;
|
|
1246
1331
|
/** Mensagem de erro a ser exibida */
|
|
1247
1332
|
errorMessage?: string;
|
|
1248
1333
|
/** Label acessível para leitores de tela */
|
|
1249
1334
|
'aria-label'?: string;
|
|
1250
1335
|
/** ID para testes automatizados */
|
|
1251
1336
|
'data-testid'?: string;
|
|
1252
|
-
/** Habilita tooltip */
|
|
1253
|
-
tooltip?: boolean;
|
|
1254
|
-
/** Texto do tooltip */
|
|
1255
|
-
tooltipText?: string;
|
|
1256
|
-
/** Lado onde o dropdown abre */
|
|
1257
|
-
side?: Side;
|
|
1258
|
-
/** Alinhamento do dropdown */
|
|
1259
|
-
align?: Align;
|
|
1260
1337
|
/** Habilita scroll infinito */
|
|
1261
1338
|
enableInfiniteScroll?: boolean;
|
|
1262
1339
|
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
@@ -1270,6 +1347,13 @@ interface SelectProps extends ScalableProps {
|
|
|
1270
1347
|
/** Estado de busca em andamento */
|
|
1271
1348
|
isSearching?: boolean;
|
|
1272
1349
|
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Props completas do Select, incluindo a configuração de tooltip.
|
|
1352
|
+
*
|
|
1353
|
+
* O tooltip é ativado automaticamente quando `tooltipText` é informado,
|
|
1354
|
+
* e as props `tooltipSide` e `tooltipAlign` ficam disponíveis para posicionamento.
|
|
1355
|
+
*/
|
|
1356
|
+
type SelectProps = SelectPropsBase & SelectTooltipConfig;
|
|
1273
1357
|
|
|
1274
1358
|
declare const Select: React__default.FC<SelectProps>;
|
|
1275
1359
|
|
|
@@ -1342,7 +1426,7 @@ interface TableProps<T = TableRowData> extends BaseProps {
|
|
|
1342
1426
|
};
|
|
1343
1427
|
}
|
|
1344
1428
|
|
|
1345
|
-
declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) =>
|
|
1429
|
+
declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) => React__default.JSX.Element | null;
|
|
1346
1430
|
|
|
1347
1431
|
interface BaseFilterItem$1 {
|
|
1348
1432
|
id?: string;
|
|
@@ -1403,7 +1487,7 @@ declare module '@tanstack/react-table' {
|
|
|
1403
1487
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
1404
1488
|
/** Alinhamento do conteúdo da célula */
|
|
1405
1489
|
align?: 'left' | 'center' | 'right';
|
|
1406
|
-
/** Altura máxima do conteúdo da célula (
|
|
1490
|
+
/** Altura máxima do conteúdo da célula (padrão: 64px). Aplica overflow: hidden */
|
|
1407
1491
|
maxHeight?: number | string;
|
|
1408
1492
|
}
|
|
1409
1493
|
}
|
|
@@ -1653,32 +1737,42 @@ interface TableV2Props<T = Record<string, unknown>> extends EmptyStateProps {
|
|
|
1653
1737
|
};
|
|
1654
1738
|
}
|
|
1655
1739
|
|
|
1656
|
-
declare const TableV2: <T>({ columns, data, rowSelection: rowSelectionConfig, enableSorting, bulkActions, header, footer, loading, emptyIcon, emptyTitle, emptyText, onRow, className, }: TableV2Props<T>) =>
|
|
1740
|
+
declare const TableV2: <T>({ columns, data, rowSelection: rowSelectionConfig, enableSorting, bulkActions, header, footer, loading, emptyIcon, emptyTitle, emptyText, onRow, className, }: TableV2Props<T>) => React$1.JSX.Element;
|
|
1657
1741
|
|
|
1658
1742
|
/**
|
|
1659
|
-
* Props do
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
*
|
|
1669
|
-
*
|
|
1670
|
-
* ```tsx
|
|
1671
|
-
* <TextArea
|
|
1672
|
-
* label="Comentário"
|
|
1673
|
-
* required
|
|
1674
|
-
* maxLength={500}
|
|
1675
|
-
* showCharCount
|
|
1676
|
-
* helperText="Máximo de 500 caracteres"
|
|
1677
|
-
* errorMessage={error}
|
|
1678
|
-
* />
|
|
1679
|
-
* ```
|
|
1743
|
+
* Props base compartilhadas por todas as configurações de tooltip do TextArea.
|
|
1744
|
+
*/
|
|
1745
|
+
interface BaseTooltipConfig$1 {
|
|
1746
|
+
/** Lado em que o tooltip será exibido */
|
|
1747
|
+
tooltipSide?: Side;
|
|
1748
|
+
/** Alinhamento do tooltip */
|
|
1749
|
+
tooltipAlign?: Align;
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* Configuração de tooltip com texto.
|
|
1753
|
+
* Exibe um tooltip ao redor da label do TextArea.
|
|
1680
1754
|
*/
|
|
1681
|
-
interface
|
|
1755
|
+
interface WithTooltip$1 extends BaseTooltipConfig$1 {
|
|
1756
|
+
/** Texto do tooltip exibido no hover */
|
|
1757
|
+
tooltipText: string;
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Configuração sem tooltip.
|
|
1761
|
+
*/
|
|
1762
|
+
interface WithoutTooltip$1 {
|
|
1763
|
+
tooltipText?: never;
|
|
1764
|
+
tooltipSide?: never;
|
|
1765
|
+
tooltipAlign?: never;
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* Union type representando a configuração de tooltip do TextArea.
|
|
1769
|
+
* Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
|
|
1770
|
+
*/
|
|
1771
|
+
type TextAreaTooltipConfig = WithTooltip$1 | WithoutTooltip$1;
|
|
1772
|
+
/**
|
|
1773
|
+
* Props base do componente TextArea.
|
|
1774
|
+
*/
|
|
1775
|
+
interface TextAreaPropsBase extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'value'> {
|
|
1682
1776
|
/** Valor controlado do campo */
|
|
1683
1777
|
value?: string;
|
|
1684
1778
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -1687,14 +1781,6 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
1687
1781
|
label?: string;
|
|
1688
1782
|
/** Texto de ajuda exibido abaixo do campo */
|
|
1689
1783
|
helperText?: string;
|
|
1690
|
-
/** Habilita tooltip */
|
|
1691
|
-
tooltip?: boolean;
|
|
1692
|
-
/** Texto do tooltip */
|
|
1693
|
-
tooltipText?: string;
|
|
1694
|
-
/** Lado onde o tooltip aparece */
|
|
1695
|
-
side?: Side;
|
|
1696
|
-
/** Alinhamento do tooltip */
|
|
1697
|
-
align?: Align;
|
|
1698
1784
|
/**
|
|
1699
1785
|
* Mensagem de erro exibida no campo.
|
|
1700
1786
|
* Usada tanto pela validação interna (required, etc.)
|
|
@@ -1706,7 +1792,7 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
1706
1792
|
/** Controla o redimensionamento do textarea */
|
|
1707
1793
|
resize?: 'none' | 'vertical' | 'both';
|
|
1708
1794
|
/** Exibe contador de caracteres (requer maxLength) */
|
|
1709
|
-
|
|
1795
|
+
charCount?: boolean;
|
|
1710
1796
|
/** Altura do textarea em pixels */
|
|
1711
1797
|
height?: number;
|
|
1712
1798
|
/** Classe CSS opcional */
|
|
@@ -1714,13 +1800,55 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
1714
1800
|
/** Tipo do teclado virtual (padrão: undefined = desabilitado) */
|
|
1715
1801
|
virtualKeyboard?: VirtualKeyboardType;
|
|
1716
1802
|
}
|
|
1803
|
+
/**
|
|
1804
|
+
* Props completas do TextArea, incluindo a configuração de tooltip.
|
|
1805
|
+
*
|
|
1806
|
+
* O tooltip é ativado automaticamente quando `tooltipText` é informado,
|
|
1807
|
+
* e as props `tooltipSide` e `tooltipAlign` ficam disponíveis para posicionamento.
|
|
1808
|
+
*/
|
|
1809
|
+
type TextAreaProps = TextAreaPropsBase & TextAreaTooltipConfig;
|
|
1717
1810
|
|
|
1718
|
-
declare const _default$1: React__default.
|
|
1811
|
+
declare const _default$1: React__default.MemoExoticComponent<{
|
|
1812
|
+
({ ref, className, value, label, placeholder, onChange, disabled, maxLength, required, helperText, tooltipText, tooltipSide, tooltipAlign, errorMessage, error, id, onBlur, onFocus, name, resize, charCount, height, virtualKeyboard, ...rest }: TextAreaProps & {
|
|
1813
|
+
ref?: React__default.Ref<HTMLTextAreaElement>;
|
|
1814
|
+
}): React__default.JSX.Element;
|
|
1815
|
+
displayName: string;
|
|
1816
|
+
}>;
|
|
1719
1817
|
|
|
1720
1818
|
/** Tipos de input suportados pelo TextField */
|
|
1721
1819
|
type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
1722
1820
|
/**
|
|
1723
|
-
* Props do
|
|
1821
|
+
* Props base compartilhadas por todas as configurações de tooltip do TextField.
|
|
1822
|
+
*/
|
|
1823
|
+
interface BaseTooltipConfig {
|
|
1824
|
+
/** Lado em que o tooltip será exibido */
|
|
1825
|
+
tooltipSide?: Side;
|
|
1826
|
+
/** Alinhamento do tooltip */
|
|
1827
|
+
tooltipAlign?: Align;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Configuração de tooltip com texto.
|
|
1831
|
+
* Exibe um tooltip ao redor da label do TextField.
|
|
1832
|
+
*/
|
|
1833
|
+
interface WithTooltip extends BaseTooltipConfig {
|
|
1834
|
+
/** Texto do tooltip exibido no hover */
|
|
1835
|
+
tooltipText: string;
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Configuração sem tooltip.
|
|
1839
|
+
*/
|
|
1840
|
+
interface WithoutTooltip {
|
|
1841
|
+
tooltipText?: never;
|
|
1842
|
+
tooltipSide?: never;
|
|
1843
|
+
tooltipAlign?: never;
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Union type representando a configuração de tooltip do TextField.
|
|
1847
|
+
* Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
|
|
1848
|
+
*/
|
|
1849
|
+
type TextFieldTooltipConfig = WithTooltip | WithoutTooltip;
|
|
1850
|
+
/**
|
|
1851
|
+
* Props base do componente TextField
|
|
1724
1852
|
* @example
|
|
1725
1853
|
* ```tsx
|
|
1726
1854
|
* <TextField
|
|
@@ -1739,13 +1867,12 @@ type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
|
1739
1867
|
* required
|
|
1740
1868
|
* helperText="Mínimo 8 caracteres"
|
|
1741
1869
|
* errorMessage={error}
|
|
1742
|
-
* tooltip={true}
|
|
1743
1870
|
* tooltipText="Deve conter letras e números"
|
|
1744
1871
|
* icon={<LockIcon />}
|
|
1745
1872
|
* />
|
|
1746
1873
|
* ```
|
|
1747
1874
|
*/
|
|
1748
|
-
interface
|
|
1875
|
+
interface TextFieldPropsBase extends ScalableProps, Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
|
|
1749
1876
|
/** Valor controlado do campo */
|
|
1750
1877
|
value?: string | number;
|
|
1751
1878
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -1756,14 +1883,6 @@ interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAtt
|
|
|
1756
1883
|
type?: TextFieldType;
|
|
1757
1884
|
/** Texto de ajuda exibido abaixo do campo */
|
|
1758
1885
|
helperText?: string;
|
|
1759
|
-
/** Habilita tooltip */
|
|
1760
|
-
tooltip?: boolean;
|
|
1761
|
-
/** Texto do tooltip */
|
|
1762
|
-
tooltipText?: string;
|
|
1763
|
-
/** Lado onde o tooltip aparece */
|
|
1764
|
-
tooltipSide?: Side;
|
|
1765
|
-
/** Alinhamento do tooltip */
|
|
1766
|
-
tooltipAlign?: Align;
|
|
1767
1886
|
/**
|
|
1768
1887
|
* Mensagem de erro exibida no campo.
|
|
1769
1888
|
* Usada tanto pela validação interna (required, formato, etc.)
|
|
@@ -1783,8 +1902,20 @@ interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAtt
|
|
|
1783
1902
|
/** Desabilita o autocomplete nativo do browser (padrão: false) */
|
|
1784
1903
|
disableAutoComplete?: boolean;
|
|
1785
1904
|
}
|
|
1905
|
+
/**
|
|
1906
|
+
* Props completas do TextField, incluindo a configuração de tooltip.
|
|
1907
|
+
*
|
|
1908
|
+
* O tooltip é ativado automaticamente quando `tooltipText` é informado,
|
|
1909
|
+
* e as props `tooltipSide` e `tooltipAlign` ficam disponíveis para posicionamento.
|
|
1910
|
+
*/
|
|
1911
|
+
type TextFieldProps = TextFieldPropsBase & TextFieldTooltipConfig;
|
|
1786
1912
|
|
|
1787
|
-
declare const _default: React__default.
|
|
1913
|
+
declare const _default: React__default.MemoExoticComponent<{
|
|
1914
|
+
({ ref, className, style, value, label, placeholder, type, onChange, disabled, maxLength, required, helperText, tooltipText, tooltipSide, tooltipAlign, errorMessage, error, id, icon, scale, onBlur, onFocus, name, persistIcon, virtualKeyboard, attachedToVirtualKeyboard, disableAutoComplete, ...rest }: TextFieldProps & {
|
|
1915
|
+
ref?: React__default.Ref<HTMLInputElement>;
|
|
1916
|
+
}): React__default.JSX.Element;
|
|
1917
|
+
displayName: string;
|
|
1918
|
+
}>;
|
|
1788
1919
|
|
|
1789
1920
|
/**
|
|
1790
1921
|
* Props do componente individual de notificação `Toast`.
|