@giro-ds/react 12.0.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,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, ReactElement, RefObject, ComponentPropsWithoutRef, CSSProperties } from 'react';
2
+ import React__default, { ReactNode, ReactElement, RefObject, ComponentPropsWithoutRef } from 'react';
3
3
  import { DateRange, Matcher } from 'react-day-picker';
4
4
  export { DateRange } from 'react-day-picker';
5
5
  import { RowData, ColumnDef } from '@tanstack/react-table';
@@ -97,7 +97,7 @@ declare const Badge: React__default.FC<BadgeProps>;
97
97
  /**
98
98
  * Props base compartilhadas por todas as configurações de tooltip do botão.
99
99
  */
100
- interface BaseTooltipConfig$3 {
100
+ interface BaseTooltipConfig$4 {
101
101
  /** Lado em que o tooltip será exibido */
102
102
  tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
103
103
  /** Alinhamento do tooltip */
@@ -107,14 +107,14 @@ interface BaseTooltipConfig$3 {
107
107
  * Configuração de tooltip com texto.
108
108
  * Exibe um tooltip ao redor do botão — útil especialmente para botões icon-only.
109
109
  */
110
- interface WithTooltip$3 extends BaseTooltipConfig$3 {
110
+ interface WithTooltip$4 extends BaseTooltipConfig$4 {
111
111
  /** Texto do tooltip exibido no hover */
112
112
  tooltipText: string;
113
113
  }
114
114
  /**
115
115
  * Configuração sem tooltip.
116
116
  */
117
- interface WithoutTooltip$3 {
117
+ interface WithoutTooltip$4 {
118
118
  tooltipText?: never;
119
119
  tooltipSide?: never;
120
120
  tooltipAlign?: never;
@@ -123,7 +123,7 @@ interface WithoutTooltip$3 {
123
123
  * Union type representando a configuração de tooltip do botão.
124
124
  * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
125
125
  */
126
- type ButtonTooltipConfig = WithTooltip$3 | WithoutTooltip$3;
126
+ type ButtonTooltipConfig = WithTooltip$4 | WithoutTooltip$4;
127
127
  /**
128
128
  * Props base do Button, independentes da variante iconOnly/icon.
129
129
  * `target`, `rel`, `type` e `onClick` são declarados aqui para garantir
@@ -633,7 +633,7 @@ declare const FileUpload: {
633
633
  displayName: string;
634
634
  };
635
635
 
636
- interface FilterItem$2 {
636
+ interface FilterItem$1 {
637
637
  /** Identificador único do item (usado em `selectedIds` e `onApplyFilter`) */
638
638
  id?: BaseProps['id'];
639
639
  /** Texto principal exibido no item */
@@ -672,7 +672,7 @@ type FilterTypes = 'single' | 'multiple' | 'calendar';
672
672
  */
673
673
  interface FilterProps extends BaseProps {
674
674
  /** Array de itens para filtros do tipo dropdown */
675
- items?: FilterItem$2[];
675
+ items?: FilterItem$1[];
676
676
  /** Tipo do filtro (dropdown ou calendário) */
677
677
  type?: FilterTypes;
678
678
  /** IDs dos itens selecionados */
@@ -736,7 +736,7 @@ interface FilterProps extends BaseProps {
736
736
  declare const Filter: React__default.FC<FilterProps>;
737
737
 
738
738
  /** Variantes disponíveis para o ListItem */
739
- type ListItemVariant = 'text' | 'checkbox' | 'radio' | 'icon';
739
+ type ListItemVariant = 'text' | 'checkbox' | 'icon';
740
740
  /**
741
741
  * Props do componente ListItem
742
742
  * @example
@@ -764,11 +764,9 @@ interface ListItemProps extends BaseProps {
764
764
  variant?: ListItemVariant;
765
765
  /** Texto principal do item */
766
766
  text?: string;
767
- /** Nome do input (para variantes checkbox/radio) */
768
- name?: string;
769
767
  /** Texto secundário/descrição do item */
770
768
  subText?: string;
771
- /** Estado de checked (para variantes checkbox/radio) */
769
+ /** Estado de checked (para variante checkbox) */
772
770
  checked?: boolean;
773
771
  /** Estado de selecionado (para variantes text/icon) */
774
772
  selected?: boolean;
@@ -778,14 +776,18 @@ interface ListItemProps extends BaseProps {
778
776
  onChange?: (checked: boolean) => void;
779
777
  /** Ícone do item (para variante icon) */
780
778
  icon?: React$1.ReactNode;
781
- /** Valor do input (para variantes checkbox/radio) */
782
- value?: string;
783
- /** Controla a visibilidade do subtexto explicitamente, independentemente de `subText` estar preenchido */
784
- showSubText?: boolean;
785
- /** Força o estado visual de hover no item (útil para controle externo de foco/seleção) */
786
- hovered?: boolean;
787
- /** Classe CSS opcional */
788
- 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;
789
791
  }
790
792
 
791
793
  declare const ListItem: React__default.FC<ListItemProps>;
@@ -1228,7 +1230,7 @@ declare const Search: {
1228
1230
  /**
1229
1231
  * Props base compartilhadas por todas as configurações de tooltip do select.
1230
1232
  */
1231
- interface BaseTooltipConfig$2 {
1233
+ interface BaseTooltipConfig$3 {
1232
1234
  /** Lado em que o tooltip será exibido */
1233
1235
  tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
1234
1236
  /** Alinhamento do tooltip */
@@ -1238,14 +1240,14 @@ interface BaseTooltipConfig$2 {
1238
1240
  * Configuração de tooltip com texto.
1239
1241
  * Exibe um tooltip ao redor da label do select.
1240
1242
  */
1241
- interface WithTooltip$2 extends BaseTooltipConfig$2 {
1243
+ interface WithTooltip$3 extends BaseTooltipConfig$3 {
1242
1244
  /** Texto do tooltip exibido no hover */
1243
1245
  tooltipText: string;
1244
1246
  }
1245
1247
  /**
1246
1248
  * Configuração sem tooltip.
1247
1249
  */
1248
- interface WithoutTooltip$2 {
1250
+ interface WithoutTooltip$3 {
1249
1251
  tooltipText?: never;
1250
1252
  tooltipSide?: never;
1251
1253
  tooltipAlign?: never;
@@ -1254,7 +1256,7 @@ interface WithoutTooltip$2 {
1254
1256
  * Union type representando a configuração de tooltip do select.
1255
1257
  * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
1256
1258
  */
1257
- type SelectTooltipConfig = WithTooltip$2 | WithoutTooltip$2;
1259
+ type SelectTooltipConfig = WithTooltip$3 | WithoutTooltip$3;
1258
1260
  /**
1259
1261
  * Representa um item do select
1260
1262
  */
@@ -1357,132 +1359,6 @@ type SelectProps = SelectPropsBase & SelectTooltipConfig;
1357
1359
 
1358
1360
  declare const Select: React__default.FC<SelectProps>;
1359
1361
 
1360
- /**
1361
- * Tipo base para dados da tabela. Use `<Table<SeuTipo>>` para type-safety completo.
1362
- * @example <Table<User> dataSource={users} />
1363
- */
1364
- type TableRowData = Record<string, any>;
1365
- /** Tipos de coluna suportados */
1366
- type TableColumnType = 'text' | 'datetime' | 'custom';
1367
- /** Opções de alinhamento de coluna */
1368
- type TableAlign = 'left' | 'center' | 'right';
1369
- /**
1370
- * Configuração de coluna da tabela
1371
- * @typeParam T - Tipo dos dados da linha
1372
- */
1373
- interface TableColumn<T = TableRowData> {
1374
- /** Chave única identificadora da coluna */
1375
- key: string;
1376
- /** Conteúdo do cabeçalho da coluna */
1377
- label: ReactNode;
1378
- /** Tipo de dados da coluna */
1379
- type?: TableColumnType;
1380
- /** Formato de exibição (ex: 'dd/MM/yyyy' para datetime) */
1381
- format?: string;
1382
- /** Função customizada para renderizar o conteúdo da célula */
1383
- render?: (row: T, index: number) => ReactNode;
1384
- /** Alinhamento do conteúdo */
1385
- align?: TableAlign;
1386
- /** Estilos CSS customizados */
1387
- style?: CSSProperties;
1388
- }
1389
- /**
1390
- * Props do componente Table. Use genérico para autocomplete: `<Table<User>>`
1391
- * @typeParam T - Tipo dos dados da linha
1392
- */
1393
- interface TableProps<T = TableRowData> extends BaseProps {
1394
- /** Configuração das colunas */
1395
- columns: TableColumn<T>[];
1396
- /** Array de dados a serem exibidos */
1397
- dataSource: T[];
1398
- /** Estado de carregamento */
1399
- loading?: boolean;
1400
- /** Configuração de seleção de linhas */
1401
- rowSelection?: {
1402
- /** Keys das linhas selecionadas (modo controlado) */
1403
- selectedRowKeys?: (string | number)[];
1404
- /** Callback quando seleção muda: (keys, rows) => void */
1405
- onChange?: (keys: (string | number)[], rows: T[]) => void;
1406
- /** Customiza props dos checkboxes: (row, index) => { disabled? } */
1407
- getCheckboxProps?: (row: T, index: number) => {
1408
- disabled?: boolean;
1409
- };
1410
- /** Desabilita o checkbox "selecionar todos" */
1411
- disableSelectAll?: boolean;
1412
- };
1413
- /** Configurações de localização */
1414
- locale?: {
1415
- /** Texto quando não há dados */
1416
- emptyText?: ReactNode;
1417
- };
1418
- /** Eventos de linha: (row, index) => { onClick?, onDoubleClick?, className? } */
1419
- onRow?: (row: T, index: number) => {
1420
- /** Clique simples na linha */
1421
- onClick?: () => void;
1422
- /** Clique duplo na linha */
1423
- onDoubleClick?: () => void;
1424
- /** Classe CSS da linha */
1425
- className?: string;
1426
- };
1427
- }
1428
-
1429
- declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) => React__default.JSX.Element | null;
1430
-
1431
- interface BaseFilterItem$1 {
1432
- id?: string;
1433
- buttonText: string | React__default.ReactNode;
1434
- icon?: React__default.ReactElement;
1435
- side?: Side;
1436
- align?: Exclude<Align, 'center'>;
1437
- disabled?: boolean;
1438
- onToggle?: (isOpen: boolean) => void;
1439
- tooltip?: string;
1440
- }
1441
- interface CheckboxFilterItem$1 extends BaseFilterItem$1 {
1442
- type: 'multiple' | 'single';
1443
- items: FilterItem$2[];
1444
- selectedIds?: string[];
1445
- onSelectionChange?: (selectedIds: string[]) => void;
1446
- placeholder?: string;
1447
- enableSearch?: boolean;
1448
- }
1449
- interface CalendarFilterItem$1 extends BaseFilterItem$1 {
1450
- type: 'calendar';
1451
- selectedDate?: Date | null;
1452
- onDateSelect?: (date: Date) => void;
1453
- onClear?: () => void;
1454
- minDate?: Date;
1455
- maxDate?: Date;
1456
- locale?: string;
1457
- placeholder?: string;
1458
- }
1459
- type FilterItem$1 = CheckboxFilterItem$1 | CalendarFilterItem$1;
1460
- interface TableHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
1461
- searchValue?: string;
1462
- onSearchChange?: (value: string) => void;
1463
- searchPlaceholder?: string;
1464
- showSearch?: boolean;
1465
- showFilters?: boolean;
1466
- filters?: React__default.ReactNode;
1467
- filterItems?: FilterItem$1[];
1468
- className?: string;
1469
- onSearch?: (value: string) => void;
1470
- showClearSearch?: boolean;
1471
- }
1472
- declare const TableHeader: React__default.FC<TableHeaderProps>;
1473
-
1474
- interface TablePaginationProps extends React__default.HTMLAttributes<HTMLDivElement> {
1475
- currentPage: number;
1476
- totalItems: number;
1477
- itemsPerPage: number;
1478
- onPageChange: (page: number) => void;
1479
- onItemsPerPageChange: (itemsPerPage: number) => void;
1480
- pageSizeOptions?: number[];
1481
- disabled?: boolean;
1482
- className?: string;
1483
- }
1484
- declare const TablePagination: React__default.FC<TablePaginationProps>;
1485
-
1486
1362
  declare module '@tanstack/react-table' {
1487
1363
  interface ColumnMeta<TData extends RowData, TValue> {
1488
1364
  /** Alinhamento do conteúdo da célula */
@@ -1518,7 +1394,7 @@ interface CheckboxFilterItem extends BaseFilterItem {
1518
1394
  /** Tipo do filtro */
1519
1395
  type: 'multiple' | 'single';
1520
1396
  /** Lista de itens disponíveis para seleção */
1521
- items: FilterItem$2[];
1397
+ items: FilterItem$1[];
1522
1398
  /** IDs dos itens atualmente selecionados */
1523
1399
  selectedIds?: string[];
1524
1400
  /** Callback chamado quando a seleção muda */
@@ -1579,10 +1455,42 @@ interface CombinedFilterItem extends BaseFilterItem {
1579
1455
  * Pode ser do tipo multiple/single, calendário ou combined (Drawer).
1580
1456
  */
1581
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
+ }
1582
1490
  /**
1583
1491
  * Props do cabeçalho do TableV2, com busca global e filtros.
1584
1492
  */
1585
- interface TableV2HeaderProps {
1493
+ interface TableV2HeaderProps<T = Record<string, unknown>> {
1586
1494
  /** Placeholder do campo de busca global */
1587
1495
  searchPlaceholder?: string;
1588
1496
  /** Items de filtro (Status, Data de início, etc.) */
@@ -1603,6 +1511,12 @@ interface TableV2HeaderProps {
1603
1511
  * A paginação é automaticamente resetada para a página 1 ao buscar.
1604
1512
  */
1605
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>;
1606
1520
  }
1607
1521
  /**
1608
1522
  * Props do rodapé do TableV2, com controles de paginação.
@@ -1722,7 +1636,7 @@ interface TableV2Props<T = Record<string, unknown>> extends EmptyStateProps {
1722
1636
  /** Configuração das ações em massa exibidas quando há linhas selecionadas */
1723
1637
  bulkActions?: TableV2BulkActionsProps<T>;
1724
1638
  /** Header acima da tabela com busca + filtros */
1725
- header?: TableV2HeaderProps;
1639
+ header?: TableV2HeaderProps<T>;
1726
1640
  /** Footer com paginação */
1727
1641
  footer?: TableV2FooterProps;
1728
1642
  /** Classe CSS personalizada para o componente */
@@ -1742,7 +1656,7 @@ declare const TableV2: <T>({ columns, data, rowSelection: rowSelectionConfig, en
1742
1656
  /**
1743
1657
  * Props base compartilhadas por todas as configurações de tooltip do TextArea.
1744
1658
  */
1745
- interface BaseTooltipConfig$1 {
1659
+ interface BaseTooltipConfig$2 {
1746
1660
  /** Lado em que o tooltip será exibido */
1747
1661
  tooltipSide?: Side;
1748
1662
  /** Alinhamento do tooltip */
@@ -1752,14 +1666,14 @@ interface BaseTooltipConfig$1 {
1752
1666
  * Configuração de tooltip com texto.
1753
1667
  * Exibe um tooltip ao redor da label do TextArea.
1754
1668
  */
1755
- interface WithTooltip$1 extends BaseTooltipConfig$1 {
1669
+ interface WithTooltip$2 extends BaseTooltipConfig$2 {
1756
1670
  /** Texto do tooltip exibido no hover */
1757
1671
  tooltipText: string;
1758
1672
  }
1759
1673
  /**
1760
1674
  * Configuração sem tooltip.
1761
1675
  */
1762
- interface WithoutTooltip$1 {
1676
+ interface WithoutTooltip$2 {
1763
1677
  tooltipText?: never;
1764
1678
  tooltipSide?: never;
1765
1679
  tooltipAlign?: never;
@@ -1768,7 +1682,7 @@ interface WithoutTooltip$1 {
1768
1682
  * Union type representando a configuração de tooltip do TextArea.
1769
1683
  * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
1770
1684
  */
1771
- type TextAreaTooltipConfig = WithTooltip$1 | WithoutTooltip$1;
1685
+ type TextAreaTooltipConfig = WithTooltip$2 | WithoutTooltip$2;
1772
1686
  /**
1773
1687
  * Props base do componente TextArea.
1774
1688
  */
@@ -1820,7 +1734,7 @@ type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
1820
1734
  /**
1821
1735
  * Props base compartilhadas por todas as configurações de tooltip do TextField.
1822
1736
  */
1823
- interface BaseTooltipConfig {
1737
+ interface BaseTooltipConfig$1 {
1824
1738
  /** Lado em que o tooltip será exibido */
1825
1739
  tooltipSide?: Side;
1826
1740
  /** Alinhamento do tooltip */
@@ -1830,14 +1744,14 @@ interface BaseTooltipConfig {
1830
1744
  * Configuração de tooltip com texto.
1831
1745
  * Exibe um tooltip ao redor da label do TextField.
1832
1746
  */
1833
- interface WithTooltip extends BaseTooltipConfig {
1747
+ interface WithTooltip$1 extends BaseTooltipConfig$1 {
1834
1748
  /** Texto do tooltip exibido no hover */
1835
1749
  tooltipText: string;
1836
1750
  }
1837
1751
  /**
1838
1752
  * Configuração sem tooltip.
1839
1753
  */
1840
- interface WithoutTooltip {
1754
+ interface WithoutTooltip$1 {
1841
1755
  tooltipText?: never;
1842
1756
  tooltipSide?: never;
1843
1757
  tooltipAlign?: never;
@@ -1846,7 +1760,7 @@ interface WithoutTooltip {
1846
1760
  * Union type representando a configuração de tooltip do TextField.
1847
1761
  * Pode ter tooltip com texto (e opcionalmente side/align) ou sem tooltip.
1848
1762
  */
1849
- type TextFieldTooltipConfig = WithTooltip | WithoutTooltip;
1763
+ type TextFieldTooltipConfig = WithTooltip$1 | WithoutTooltip$1;
1850
1764
  /**
1851
1765
  * Props base do componente TextField
1852
1766
  * @example
@@ -2153,6 +2067,125 @@ interface SwitchProps extends ScalableProps {
2153
2067
 
2154
2068
  declare const Switch: React$1.FC<SwitchProps>;
2155
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
+
2156
2189
  /** Tipos de validação suportados pelo VerificationCode */
2157
2190
  type OTPValidationType = 'numeric' | 'alphanumeric' | 'alpha';
2158
2191
  /**
@@ -2329,5 +2362,5 @@ declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, thresho
2329
2362
 
2330
2363
  declare const normalizeText: (text: React.ReactNode) => string;
2331
2364
 
2332
- 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 };
2333
- 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 };