@giro-ds/react 11.2.0 → 12.1.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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, ReactElement, RefObject, ComponentPropsWithoutRef, CSSProperties } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { Matcher } from 'react-day-picker';
2
+ import React__default, { ReactNode, ReactElement, RefObject, ComponentPropsWithoutRef } from 'react';
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 da imagem do avatar, usado como as iniciais do nome */
60
- initialLetters?: string;
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$4 {
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$4 extends BaseTooltipConfig$4 {
111
+ /** Texto do tooltip exibido no hover */
112
+ tooltipText: string;
113
+ }
114
+ /**
115
+ * Configuração sem tooltip.
116
+ */
117
+ interface WithoutTooltip$4 {
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$4 | WithoutTooltip$4;
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: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
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
- /** Data selecionada atualmente (usada pelo DatePicker). */
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
- /** Chamado quando o usuário seleciona um dia. */
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: _onClear, minDate, maxDate, disabled, format: _format, locale, autoFocus, className, style, scale, id, "aria-label": ariaLabel, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
451
+ declare function Container({ children, className }: ContainerProps): React$1.JSX.Element;
409
452
 
410
453
  /**
411
454
  * Props do componente DatePicker
@@ -583,9 +626,14 @@ interface FileUploadProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
583
626
  description?: string;
584
627
  }
585
628
 
586
- declare const FileUpload: React__default.ForwardRefExoticComponent<FileUploadProps & React__default.RefAttributes<HTMLInputElement>>;
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
- interface FilterItem$2 {
636
+ interface FilterItem$1 {
589
637
  /** Identificador único do item (usado em `selectedIds` e `onApplyFilter`) */
590
638
  id?: BaseProps['id'];
591
639
  /** Texto principal exibido no item */
@@ -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 FilterType = 'single' | 'multiple' | 'calendar';
648
+ type FilterTypes = 'single' | 'multiple' | 'calendar';
601
649
  /**
602
650
  * Props do componente Filter
603
651
  * @example
@@ -624,9 +672,9 @@ type FilterType = 'single' | 'multiple' | 'calendar';
624
672
  */
625
673
  interface FilterProps extends BaseProps {
626
674
  /** Array de itens para filtros do tipo dropdown */
627
- items?: FilterItem$2[];
675
+ items?: FilterItem$1[];
628
676
  /** Tipo do filtro (dropdown ou calendário) */
629
- type?: FilterType;
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 ativos exibido como badge no botão */
677
- activeCount?: number;
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 */
@@ -688,7 +736,7 @@ interface FilterProps extends BaseProps {
688
736
  declare const Filter: React__default.FC<FilterProps>;
689
737
 
690
738
  /** Variantes disponíveis para o ListItem */
691
- type ListItemVariant = 'text' | 'checkbox' | 'radio' | 'icon';
739
+ type ListItemVariant = 'text' | 'checkbox' | 'icon';
692
740
  /**
693
741
  * Props do componente ListItem
694
742
  * @example
@@ -716,11 +764,9 @@ interface ListItemProps extends BaseProps {
716
764
  variant?: ListItemVariant;
717
765
  /** Texto principal do item */
718
766
  text?: string;
719
- /** Nome do input (para variantes checkbox/radio) */
720
- name?: string;
721
767
  /** Texto secundário/descrição do item */
722
768
  subText?: string;
723
- /** Estado de checked (para variantes checkbox/radio) */
769
+ /** Estado de checked (para variante checkbox) */
724
770
  checked?: boolean;
725
771
  /** Estado de selecionado (para variantes text/icon) */
726
772
  selected?: boolean;
@@ -730,14 +776,18 @@ interface ListItemProps extends BaseProps {
730
776
  onChange?: (checked: boolean) => void;
731
777
  /** Ícone do item (para variante icon) */
732
778
  icon?: React$1.ReactNode;
733
- /** Valor do input (para variantes checkbox/radio) */
734
- value?: string;
735
- /** Controla a visibilidade do subtexto explicitamente, independentemente de `subText` estar preenchido */
736
- showSubText?: boolean;
737
- /** Força o estado visual de hover no item (útil para controle externo de foco/seleção) */
738
- hovered?: boolean;
739
- /** Classe CSS opcional */
740
- className?: string;
779
+ /** Largura do item. Quando não informada, ocupa 100% do container */
780
+ customWidth?: React$1.CSSProperties['width'];
781
+ /** Escala visual do componente (1, 1.5 ou 2) */
782
+ scale?: Scale;
783
+ /** Itens filhos para criar estrutura de árvore (outros ListItems) */
784
+ children?: React$1.ReactNode;
785
+ /** Estado inicial de expansão — modo não controlado (default: false) */
786
+ defaultExpanded?: boolean;
787
+ /** Estado de expansão controlado */
788
+ expanded?: boolean;
789
+ /** Callback executado quando o estado de expansão muda */
790
+ onExpandedChange?: (expanded: boolean) => void;
741
791
  }
742
792
 
743
793
  declare const ListItem: React__default.FC<ListItemProps>;
@@ -1082,7 +1132,7 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
1082
1132
  /** Controla a exibição do botão {emoticon} nos layouts suportados */
1083
1133
  Emoji?: boolean;
1084
1134
  /** Placeholder do TextField exibido no modo `fixed` */
1085
- textFieldPlaceholder?: string;
1135
+ placeholder?: string;
1086
1136
  /** Escala do TextField exibido no modo `fixed` */
1087
1137
  textFieldScale?: 1 | 1.5 | 2;
1088
1138
  /**
@@ -1170,8 +1220,43 @@ interface SearchProps extends ScalableProps, NativeInputProps {
1170
1220
  virtualKeyboard?: VirtualKeyboardType;
1171
1221
  }
1172
1222
 
1173
- declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
1223
+ declare const Search: {
1224
+ ({ ref, placeholder, disabled, value, onChange, onKeyDown, onFocus, onBlur, onClear, onClick, onMouseDown, searchMode, onSearch, id, scale, className, style, virtualKeyboard, "data-testid": testId, ...rest }: SearchProps & {
1225
+ ref?: React__default.Ref<HTMLInputElement>;
1226
+ }): React__default.JSX.Element;
1227
+ displayName: string;
1228
+ };
1174
1229
 
1230
+ /**
1231
+ * Props base compartilhadas por todas as configurações de tooltip do select.
1232
+ */
1233
+ interface BaseTooltipConfig$3 {
1234
+ /** Lado em que o tooltip será exibido */
1235
+ tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
1236
+ /** Alinhamento do tooltip */
1237
+ tooltipAlign?: 'start' | 'center' | 'end';
1238
+ }
1239
+ /**
1240
+ * Configuração de tooltip com texto.
1241
+ * Exibe um tooltip ao redor da label do select.
1242
+ */
1243
+ interface WithTooltip$3 extends BaseTooltipConfig$3 {
1244
+ /** Texto do tooltip exibido no hover */
1245
+ tooltipText: string;
1246
+ }
1247
+ /**
1248
+ * Configuração sem tooltip.
1249
+ */
1250
+ interface WithoutTooltip$3 {
1251
+ tooltipText?: never;
1252
+ tooltipSide?: never;
1253
+ tooltipAlign?: never;
1254
+ }
1255
+ /**
1256
+ * Union type representando a configuração de tooltip do select.
1257
+ * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
1258
+ */
1259
+ type SelectTooltipConfig = WithTooltip$3 | WithoutTooltip$3;
1175
1260
  /**
1176
1261
  * Representa um item do select
1177
1262
  */
@@ -1218,7 +1303,7 @@ type SelectVariant = 'text' | 'icon' | 'checkbox';
1218
1303
  * />
1219
1304
  * ```
1220
1305
  */
1221
- interface SelectProps extends ScalableProps {
1306
+ interface SelectPropsBase extends ScalableProps {
1222
1307
  /** Array de itens do select */
1223
1308
  items: SelectItemProps[];
1224
1309
  /** Callback executado quando o valor muda: (value) => void */
@@ -1243,20 +1328,14 @@ interface SelectProps extends ScalableProps {
1243
1328
  helperText?: string;
1244
1329
  /** Largura máxima do select */
1245
1330
  maxWidth?: number;
1331
+ /** Indica estado de erro externo */
1332
+ error?: boolean;
1246
1333
  /** Mensagem de erro a ser exibida */
1247
1334
  errorMessage?: string;
1248
1335
  /** Label acessível para leitores de tela */
1249
1336
  'aria-label'?: string;
1250
1337
  /** ID para testes automatizados */
1251
1338
  '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
1339
  /** Habilita scroll infinito */
1261
1340
  enableInfiniteScroll?: boolean;
1262
1341
  /** Callback executado ao chegar ao final do scroll: () => void */
@@ -1270,140 +1349,21 @@ interface SelectProps extends ScalableProps {
1270
1349
  /** Estado de busca em andamento */
1271
1350
  isSearching?: boolean;
1272
1351
  }
1273
-
1274
- declare const Select: React__default.FC<SelectProps>;
1275
-
1276
1352
  /**
1277
- * Tipo base para dados da tabela. Use `<Table<SeuTipo>>` para type-safety completo.
1278
- * @example <Table<User> dataSource={users} />
1279
- */
1280
- type TableRowData = Record<string, any>;
1281
- /** Tipos de coluna suportados */
1282
- type TableColumnType = 'text' | 'datetime' | 'custom';
1283
- /** Opções de alinhamento de coluna */
1284
- type TableAlign = 'left' | 'center' | 'right';
1285
- /**
1286
- * Configuração de coluna da tabela
1287
- * @typeParam T - Tipo dos dados da linha
1353
+ * Props completas do Select, incluindo a configuração de tooltip.
1354
+ *
1355
+ * O tooltip é ativado automaticamente quando `tooltipText` é informado,
1356
+ * e as props `tooltipSide` e `tooltipAlign` ficam disponíveis para posicionamento.
1288
1357
  */
1289
- interface TableColumn<T = TableRowData> {
1290
- /** Chave única identificadora da coluna */
1291
- key: string;
1292
- /** Conteúdo do cabeçalho da coluna */
1293
- label: ReactNode;
1294
- /** Tipo de dados da coluna */
1295
- type?: TableColumnType;
1296
- /** Formato de exibição (ex: 'dd/MM/yyyy' para datetime) */
1297
- format?: string;
1298
- /** Função customizada para renderizar o conteúdo da célula */
1299
- render?: (row: T, index: number) => ReactNode;
1300
- /** Alinhamento do conteúdo */
1301
- align?: TableAlign;
1302
- /** Estilos CSS customizados */
1303
- style?: CSSProperties;
1304
- }
1305
- /**
1306
- * Props do componente Table. Use genérico para autocomplete: `<Table<User>>`
1307
- * @typeParam T - Tipo dos dados da linha
1308
- */
1309
- interface TableProps<T = TableRowData> extends BaseProps {
1310
- /** Configuração das colunas */
1311
- columns: TableColumn<T>[];
1312
- /** Array de dados a serem exibidos */
1313
- dataSource: T[];
1314
- /** Estado de carregamento */
1315
- loading?: boolean;
1316
- /** Configuração de seleção de linhas */
1317
- rowSelection?: {
1318
- /** Keys das linhas selecionadas (modo controlado) */
1319
- selectedRowKeys?: (string | number)[];
1320
- /** Callback quando seleção muda: (keys, rows) => void */
1321
- onChange?: (keys: (string | number)[], rows: T[]) => void;
1322
- /** Customiza props dos checkboxes: (row, index) => { disabled? } */
1323
- getCheckboxProps?: (row: T, index: number) => {
1324
- disabled?: boolean;
1325
- };
1326
- /** Desabilita o checkbox "selecionar todos" */
1327
- disableSelectAll?: boolean;
1328
- };
1329
- /** Configurações de localização */
1330
- locale?: {
1331
- /** Texto quando não há dados */
1332
- emptyText?: ReactNode;
1333
- };
1334
- /** Eventos de linha: (row, index) => { onClick?, onDoubleClick?, className? } */
1335
- onRow?: (row: T, index: number) => {
1336
- /** Clique simples na linha */
1337
- onClick?: () => void;
1338
- /** Clique duplo na linha */
1339
- onDoubleClick?: () => void;
1340
- /** Classe CSS da linha */
1341
- className?: string;
1342
- };
1343
- }
1344
-
1345
- declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) => react_jsx_runtime.JSX.Element | null;
1346
-
1347
- interface BaseFilterItem$1 {
1348
- id?: string;
1349
- buttonText: string | React__default.ReactNode;
1350
- icon?: React__default.ReactElement;
1351
- side?: Side;
1352
- align?: Exclude<Align, 'center'>;
1353
- disabled?: boolean;
1354
- onToggle?: (isOpen: boolean) => void;
1355
- tooltip?: string;
1356
- }
1357
- interface CheckboxFilterItem$1 extends BaseFilterItem$1 {
1358
- type: 'multiple' | 'single';
1359
- items: FilterItem$2[];
1360
- selectedIds?: string[];
1361
- onSelectionChange?: (selectedIds: string[]) => void;
1362
- placeholder?: string;
1363
- enableSearch?: boolean;
1364
- }
1365
- interface CalendarFilterItem$1 extends BaseFilterItem$1 {
1366
- type: 'calendar';
1367
- selectedDate?: Date | null;
1368
- onDateSelect?: (date: Date) => void;
1369
- onClear?: () => void;
1370
- minDate?: Date;
1371
- maxDate?: Date;
1372
- locale?: string;
1373
- placeholder?: string;
1374
- }
1375
- type FilterItem$1 = CheckboxFilterItem$1 | CalendarFilterItem$1;
1376
- interface TableHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
1377
- searchValue?: string;
1378
- onSearchChange?: (value: string) => void;
1379
- searchPlaceholder?: string;
1380
- showSearch?: boolean;
1381
- showFilters?: boolean;
1382
- filters?: React__default.ReactNode;
1383
- filterItems?: FilterItem$1[];
1384
- className?: string;
1385
- onSearch?: (value: string) => void;
1386
- showClearSearch?: boolean;
1387
- }
1388
- declare const TableHeader: React__default.FC<TableHeaderProps>;
1358
+ type SelectProps = SelectPropsBase & SelectTooltipConfig;
1389
1359
 
1390
- interface TablePaginationProps extends React__default.HTMLAttributes<HTMLDivElement> {
1391
- currentPage: number;
1392
- totalItems: number;
1393
- itemsPerPage: number;
1394
- onPageChange: (page: number) => void;
1395
- onItemsPerPageChange: (itemsPerPage: number) => void;
1396
- pageSizeOptions?: number[];
1397
- disabled?: boolean;
1398
- className?: string;
1399
- }
1400
- declare const TablePagination: React__default.FC<TablePaginationProps>;
1360
+ declare const Select: React__default.FC<SelectProps>;
1401
1361
 
1402
1362
  declare module '@tanstack/react-table' {
1403
1363
  interface ColumnMeta<TData extends RowData, TValue> {
1404
1364
  /** Alinhamento do conteúdo da célula */
1405
1365
  align?: 'left' | 'center' | 'right';
1406
- /** Altura máxima do conteúdo da célula (ex: 48, '3rem'). Aplica overflow: hidden */
1366
+ /** Altura máxima do conteúdo da célula (padrão: 64px). Aplica overflow: hidden */
1407
1367
  maxHeight?: number | string;
1408
1368
  }
1409
1369
  }
@@ -1434,7 +1394,7 @@ interface CheckboxFilterItem extends BaseFilterItem {
1434
1394
  /** Tipo do filtro */
1435
1395
  type: 'multiple' | 'single';
1436
1396
  /** Lista de itens disponíveis para seleção */
1437
- items: FilterItem$2[];
1397
+ items: FilterItem$1[];
1438
1398
  /** IDs dos itens atualmente selecionados */
1439
1399
  selectedIds?: string[];
1440
1400
  /** Callback chamado quando a seleção muda */
@@ -1495,10 +1455,42 @@ interface CombinedFilterItem extends BaseFilterItem {
1495
1455
  * Pode ser do tipo multiple/single, calendário ou combined (Drawer).
1496
1456
  */
1497
1457
  type FilterItem = CheckboxFilterItem | CalendarFilterItem | CombinedFilterItem;
1458
+ /**
1459
+ * Item de um ToggleButton de vista da tabela.
1460
+ */
1461
+ interface ViewToggleItem {
1462
+ /** Valor único do item */
1463
+ value: string;
1464
+ /** Ícone exibido no botão (iconOnly) */
1465
+ icon: ReactNode;
1466
+ /** Texto do tooltip exibido no hover */
1467
+ tooltipText?: string;
1468
+ }
1469
+ /**
1470
+ * Props do ToggleButton de alternância de vistas no cabeçalho do TableV2.
1471
+ */
1472
+ interface TableV2ViewToggleProps<T = Record<string, unknown>> {
1473
+ /** Exatamente 2 itens icon-only para alternar entre as vistas */
1474
+ items: [ViewToggleItem, ViewToggleItem];
1475
+ /** Valor controlado do item selecionado */
1476
+ value?: string;
1477
+ /** Valor selecionado inicial (não controlado) */
1478
+ defaultValue?: string;
1479
+ /** Callback chamado quando a vista selecionada muda */
1480
+ onValueChange?: (value: string) => void;
1481
+ /**
1482
+ * Mapa de vistas: cada chave corresponde ao `value` de um item do toggle.
1483
+ * Quando presente, o TableV2 alterna internamente entre as colunas e dados de cada vista.
1484
+ */
1485
+ views?: Record<string, {
1486
+ columns: ColumnDef<T, any>[];
1487
+ data: T[];
1488
+ }>;
1489
+ }
1498
1490
  /**
1499
1491
  * Props do cabeçalho do TableV2, com busca global e filtros.
1500
1492
  */
1501
- interface TableV2HeaderProps {
1493
+ interface TableV2HeaderProps<T = Record<string, unknown>> {
1502
1494
  /** Placeholder do campo de busca global */
1503
1495
  searchPlaceholder?: string;
1504
1496
  /** Items de filtro (Status, Data de início, etc.) */
@@ -1519,6 +1511,12 @@ interface TableV2HeaderProps {
1519
1511
  * A paginação é automaticamente resetada para a página 1 ao buscar.
1520
1512
  */
1521
1513
  onSearchChange?: (value: string) => void;
1514
+ /**
1515
+ * Quando presente, exibe um ToggleButton de 2 vistas (iconOnly) ao lado do Search.
1516
+ * Use `views` para que o TableV2 alterne internamente entre colunas e dados.
1517
+ * Use `onValueChange` se preferir controlar externamente.
1518
+ */
1519
+ viewToggle?: TableV2ViewToggleProps<T>;
1522
1520
  }
1523
1521
  /**
1524
1522
  * Props do rodapé do TableV2, com controles de paginação.
@@ -1638,7 +1636,7 @@ interface TableV2Props<T = Record<string, unknown>> extends EmptyStateProps {
1638
1636
  /** Configuração das ações em massa exibidas quando há linhas selecionadas */
1639
1637
  bulkActions?: TableV2BulkActionsProps<T>;
1640
1638
  /** Header acima da tabela com busca + filtros */
1641
- header?: TableV2HeaderProps;
1639
+ header?: TableV2HeaderProps<T>;
1642
1640
  /** Footer com paginação */
1643
1641
  footer?: TableV2FooterProps;
1644
1642
  /** Classe CSS personalizada para o componente */
@@ -1653,32 +1651,42 @@ interface TableV2Props<T = Record<string, unknown>> extends EmptyStateProps {
1653
1651
  };
1654
1652
  }
1655
1653
 
1656
- declare const TableV2: <T>({ columns, data, rowSelection: rowSelectionConfig, enableSorting, bulkActions, header, footer, loading, emptyIcon, emptyTitle, emptyText, onRow, className, }: TableV2Props<T>) => react_jsx_runtime.JSX.Element;
1654
+ 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
1655
 
1658
1656
  /**
1659
- * Props do componente TextArea
1660
- * @example
1661
- * ```tsx
1662
- * <TextArea
1663
- * label="Descrição"
1664
- * value={description}
1665
- * onChange={setDescription}
1666
- * placeholder="Digite uma descrição"
1667
- * />
1668
- * ```
1669
- * @example
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
- * ```
1657
+ * Props base compartilhadas por todas as configurações de tooltip do TextArea.
1680
1658
  */
1681
- interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'value'> {
1659
+ interface BaseTooltipConfig$2 {
1660
+ /** Lado em que o tooltip será exibido */
1661
+ tooltipSide?: Side;
1662
+ /** Alinhamento do tooltip */
1663
+ tooltipAlign?: Align;
1664
+ }
1665
+ /**
1666
+ * Configuração de tooltip com texto.
1667
+ * Exibe um tooltip ao redor da label do TextArea.
1668
+ */
1669
+ interface WithTooltip$2 extends BaseTooltipConfig$2 {
1670
+ /** Texto do tooltip exibido no hover */
1671
+ tooltipText: string;
1672
+ }
1673
+ /**
1674
+ * Configuração sem tooltip.
1675
+ */
1676
+ interface WithoutTooltip$2 {
1677
+ tooltipText?: never;
1678
+ tooltipSide?: never;
1679
+ tooltipAlign?: never;
1680
+ }
1681
+ /**
1682
+ * Union type representando a configuração de tooltip do TextArea.
1683
+ * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
1684
+ */
1685
+ type TextAreaTooltipConfig = WithTooltip$2 | WithoutTooltip$2;
1686
+ /**
1687
+ * Props base do componente TextArea.
1688
+ */
1689
+ interface TextAreaPropsBase extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'value'> {
1682
1690
  /** Valor controlado do campo */
1683
1691
  value?: string;
1684
1692
  /** Callback executado quando o valor muda: (value) => void */
@@ -1687,14 +1695,6 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
1687
1695
  label?: string;
1688
1696
  /** Texto de ajuda exibido abaixo do campo */
1689
1697
  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
1698
  /**
1699
1699
  * Mensagem de erro exibida no campo.
1700
1700
  * Usada tanto pela validação interna (required, etc.)
@@ -1706,7 +1706,7 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
1706
1706
  /** Controla o redimensionamento do textarea */
1707
1707
  resize?: 'none' | 'vertical' | 'both';
1708
1708
  /** Exibe contador de caracteres (requer maxLength) */
1709
- showCharCount?: boolean;
1709
+ charCount?: boolean;
1710
1710
  /** Altura do textarea em pixels */
1711
1711
  height?: number;
1712
1712
  /** Classe CSS opcional */
@@ -1714,13 +1714,55 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
1714
1714
  /** Tipo do teclado virtual (padrão: undefined = desabilitado) */
1715
1715
  virtualKeyboard?: VirtualKeyboardType;
1716
1716
  }
1717
+ /**
1718
+ * Props completas do TextArea, incluindo a configuração de tooltip.
1719
+ *
1720
+ * O tooltip é ativado automaticamente quando `tooltipText` é informado,
1721
+ * e as props `tooltipSide` e `tooltipAlign` ficam disponíveis para posicionamento.
1722
+ */
1723
+ type TextAreaProps = TextAreaPropsBase & TextAreaTooltipConfig;
1717
1724
 
1718
- declare const _default$1: React__default.NamedExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
1725
+ declare const _default$1: React__default.MemoExoticComponent<{
1726
+ ({ 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 & {
1727
+ ref?: React__default.Ref<HTMLTextAreaElement>;
1728
+ }): React__default.JSX.Element;
1729
+ displayName: string;
1730
+ }>;
1719
1731
 
1720
1732
  /** Tipos de input suportados pelo TextField */
1721
1733
  type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
1722
1734
  /**
1723
- * Props do componente TextField
1735
+ * Props base compartilhadas por todas as configurações de tooltip do TextField.
1736
+ */
1737
+ interface BaseTooltipConfig$1 {
1738
+ /** Lado em que o tooltip será exibido */
1739
+ tooltipSide?: Side;
1740
+ /** Alinhamento do tooltip */
1741
+ tooltipAlign?: Align;
1742
+ }
1743
+ /**
1744
+ * Configuração de tooltip com texto.
1745
+ * Exibe um tooltip ao redor da label do TextField.
1746
+ */
1747
+ interface WithTooltip$1 extends BaseTooltipConfig$1 {
1748
+ /** Texto do tooltip exibido no hover */
1749
+ tooltipText: string;
1750
+ }
1751
+ /**
1752
+ * Configuração sem tooltip.
1753
+ */
1754
+ interface WithoutTooltip$1 {
1755
+ tooltipText?: never;
1756
+ tooltipSide?: never;
1757
+ tooltipAlign?: never;
1758
+ }
1759
+ /**
1760
+ * Union type representando a configuração de tooltip do TextField.
1761
+ * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
1762
+ */
1763
+ type TextFieldTooltipConfig = WithTooltip$1 | WithoutTooltip$1;
1764
+ /**
1765
+ * Props base do componente TextField
1724
1766
  * @example
1725
1767
  * ```tsx
1726
1768
  * <TextField
@@ -1739,13 +1781,12 @@ type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
1739
1781
  * required
1740
1782
  * helperText="Mínimo 8 caracteres"
1741
1783
  * errorMessage={error}
1742
- * tooltip={true}
1743
1784
  * tooltipText="Deve conter letras e números"
1744
1785
  * icon={<LockIcon />}
1745
1786
  * />
1746
1787
  * ```
1747
1788
  */
1748
- interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
1789
+ interface TextFieldPropsBase extends ScalableProps, Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
1749
1790
  /** Valor controlado do campo */
1750
1791
  value?: string | number;
1751
1792
  /** Callback executado quando o valor muda: (value) => void */
@@ -1756,14 +1797,6 @@ interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAtt
1756
1797
  type?: TextFieldType;
1757
1798
  /** Texto de ajuda exibido abaixo do campo */
1758
1799
  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
1800
  /**
1768
1801
  * Mensagem de erro exibida no campo.
1769
1802
  * Usada tanto pela validação interna (required, formato, etc.)
@@ -1783,8 +1816,20 @@ interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAtt
1783
1816
  /** Desabilita o autocomplete nativo do browser (padrão: false) */
1784
1817
  disableAutoComplete?: boolean;
1785
1818
  }
1819
+ /**
1820
+ * Props completas do TextField, incluindo a configuração de tooltip.
1821
+ *
1822
+ * O tooltip é ativado automaticamente quando `tooltipText` é informado,
1823
+ * e as props `tooltipSide` e `tooltipAlign` ficam disponíveis para posicionamento.
1824
+ */
1825
+ type TextFieldProps = TextFieldPropsBase & TextFieldTooltipConfig;
1786
1826
 
1787
- declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
1827
+ declare const _default: React__default.MemoExoticComponent<{
1828
+ ({ 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 & {
1829
+ ref?: React__default.Ref<HTMLInputElement>;
1830
+ }): React__default.JSX.Element;
1831
+ displayName: string;
1832
+ }>;
1788
1833
 
1789
1834
  /**
1790
1835
  * Props do componente individual de notificação `Toast`.
@@ -2022,6 +2067,125 @@ interface SwitchProps extends ScalableProps {
2022
2067
 
2023
2068
  declare const Switch: React$1.FC<SwitchProps>;
2024
2069
 
2070
+ /** Modo do componente: 'simple' (toggle único) ou 'combined' (grupo de toggles) */
2071
+ type ToggleButtonMode = 'simple' | 'combined';
2072
+ /** Tipo de seleção do grupo: 'single' (um item) ou 'multiple' (múltiplos itens) */
2073
+ type ToggleGroupType = 'single' | 'multiple';
2074
+ /** Orientação do grupo de toggles */
2075
+ type ToggleButtonOrientation = 'horizontal' | 'vertical';
2076
+ interface BaseTooltipConfig {
2077
+ tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
2078
+ tooltipAlign?: 'start' | 'center' | 'end';
2079
+ }
2080
+ interface WithTooltip extends BaseTooltipConfig {
2081
+ /** Texto do tooltip exibido no hover */
2082
+ tooltipText: string;
2083
+ }
2084
+ interface WithoutTooltip {
2085
+ tooltipText?: never;
2086
+ tooltipSide?: never;
2087
+ tooltipAlign?: never;
2088
+ }
2089
+ type ToggleButtonTooltipConfig = WithTooltip | WithoutTooltip;
2090
+ /**
2091
+ * Item de um ToggleGroup
2092
+ */
2093
+ interface ToggleGroupItem {
2094
+ /** Valor único do item (usado em `value` e `onValueChange`) */
2095
+ value: string;
2096
+ /** Conteúdo textual ou nó React exibido no item */
2097
+ label?: ReactNode;
2098
+ /** Ícone exibido à esquerda do label */
2099
+ icon?: ReactNode;
2100
+ /** Exibe somente o ícone, sem label */
2101
+ iconOnly?: boolean;
2102
+ /** Desabilita o item, impedindo sua seleção */
2103
+ disabled?: boolean;
2104
+ }
2105
+ /** @internal */
2106
+ type ToggleGroupSingleSelectionProps = {
2107
+ selectionType?: 'single';
2108
+ /** Valor do Toggle selecionado controlado */
2109
+ value?: string;
2110
+ /** Valor do Toggle selecionado padrão (não controlado) */
2111
+ defaultValue?: string;
2112
+ /**
2113
+ * Callback chamado quando o Toggle selecionado muda.
2114
+ * Retorna o `value` do Toggle selecionado.
2115
+ */
2116
+ onValueChange?: (value: string) => void;
2117
+ };
2118
+ /** @internal */
2119
+ type ToggleGroupMultipleSelectionProps = {
2120
+ selectionType: 'multiple';
2121
+ /** Valores dos Toggles selecionados controlados */
2122
+ value?: string[];
2123
+ /** Valores dos Toggles selecionados padrão (não controlados) */
2124
+ defaultValue?: string[];
2125
+ /**
2126
+ * Callback chamado quando os Toggles selecionados mudam.
2127
+ * Retorna um array com os `value`s dos Toggles selecionados.
2128
+ */
2129
+ onValueChange?: (value: string[]) => void;
2130
+ };
2131
+ /**
2132
+ * Props específicas do ToggleGroup (modo `combined`).
2133
+ *
2134
+ * Use a prop `onValueChange` para saber qual Toggle está selecionado:
2135
+ * - `selectionType="single"` → `onValueChange: (value: string) => void`
2136
+ * - `selectionType="multiple"` → `onValueChange: (value: string[]) => void`
2137
+ */
2138
+ type ToggleGroupProps = {
2139
+ /** Orientação do grupo: `'horizontal'` (padrão) ou `'vertical'` */
2140
+ orientation?: ToggleButtonOrientation;
2141
+ /** Items do grupo de toggles */
2142
+ items?: ToggleGroupItem[];
2143
+ } & (ToggleGroupSingleSelectionProps | ToggleGroupMultipleSelectionProps);
2144
+ /**
2145
+ * Props do componente ToggleButton
2146
+ * @example
2147
+ * ```tsx
2148
+ * // Toggle único (modo simple — padrão)
2149
+ * <ToggleButton mode="simple" onPressedChange={(pressed) => console.log(pressed)}>
2150
+ * Negrito
2151
+ * </ToggleButton>
2152
+ * ```
2153
+ * @example
2154
+ * ```tsx
2155
+ * // Grupo de toggles (modo combined)
2156
+ * <ToggleButton
2157
+ * mode="combined"
2158
+ * type="single"
2159
+ * items={[
2160
+ * { value: 'left', label: 'Esquerda' },
2161
+ * { value: 'center', label: 'Centro' },
2162
+ * { value: 'right', label: 'Direita' },
2163
+ * ]}
2164
+ * onValueChange={(value) => console.log(value)}
2165
+ * />
2166
+ * ```
2167
+ */
2168
+ type ToggleButtonProps = ScalableProps & {
2169
+ /** Modo do componente: `'simple'` (toggle único, padrão) ou `'combined'` (grupo de toggles) */
2170
+ mode?: ToggleButtonMode;
2171
+ /** Tamanho do componente: `'lg'` (padrão) ou `'sm'` */
2172
+ size?: Size;
2173
+ /** Ícone exibido à esquerda do conteúdo (modo simple) */
2174
+ icon?: ReactNode;
2175
+ /** Exibe somente o ícone, sem texto (modo simple) */
2176
+ iconOnly?: boolean;
2177
+ /** Conteúdo do botão (modo combined) */
2178
+ children?: ReactNode;
2179
+ /** Estado pressionado controlado (modo simple) */
2180
+ pressed?: boolean;
2181
+ /** Estado pressionado padrão não controlado (modo simple) */
2182
+ defaultPressed?: boolean;
2183
+ /** Callback ao alterar estado pressionado: `(pressed: boolean) => void` (modo simple) */
2184
+ onPressedChange?: (pressed: boolean) => void;
2185
+ } & ToggleGroupProps & ToggleButtonTooltipConfig;
2186
+
2187
+ declare const ToggleButton: React__default.FC<ToggleButtonProps>;
2188
+
2025
2189
  /** Tipos de validação suportados pelo VerificationCode */
2026
2190
  type OTPValidationType = 'numeric' | 'alphanumeric' | 'alpha';
2027
2191
  /**
@@ -2198,5 +2362,5 @@ declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, thresho
2198
2362
 
2199
2363
  declare const normalizeText: (text: React.ReactNode) => string;
2200
2364
 
2201
- export { Avatar, Badge, Button, Calendar, Callout, Card, Checkbox, MemoizedChips as Chips, Container, _default$2 as DatePicker, Dialog, Drawer, FileUpload, Filter, ListItem, Menu, Modal, Popover, memorizedQuantity as Quantity, Radio, Search, Select, Switch, Table, TableHeader, TablePagination, TableV2, _default$1 as TextArea, _default as TextField, Toast, ToastContainer, ToastProvider, Tooltip, VerificationCode, VirtualKeyboard, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
2202
- export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CardProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, FileUploadProps, FilterItem$1 as FilterItem, FilterProps, ListItemProps, MenuProps, ModalProps, PopoverProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableHeaderProps, TablePaginationProps, TableProps, TableV2FooterProps, TableV2HeaderProps, TableV2Props, TextAreaProps, TextFieldProps, ToastProps, TooltipProps, VerificationCodeProps, VirtualKeyboardProps, VirtualKeyboardVariant };
2365
+ export { Avatar, Badge, Button, Calendar, Callout, Card, Checkbox, MemoizedChips as Chips, Container, _default$2 as DatePicker, Dialog, Drawer, FileUpload, Filter, ListItem, Menu, Modal, Popover, memorizedQuantity as Quantity, Radio, Search, Select, Switch, TableV2, _default$1 as TextArea, _default as TextField, Toast, ToastContainer, ToastProvider, ToggleButton, Tooltip, VerificationCode, VirtualKeyboard, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
2366
+ export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CardProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, FileUploadProps, FilterProps, ListItemProps, MenuProps, ModalProps, PopoverProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableV2FooterProps, TableV2HeaderProps, TableV2Props, TextAreaProps, TextFieldProps, ToastProps, ToggleButtonMode, ToggleButtonOrientation, ToggleButtonProps, ToggleGroupItem, ToggleGroupType, TooltipProps, VerificationCodeProps, VirtualKeyboardProps, VirtualKeyboardVariant };