@giro-ds/react 4.0.0 → 5.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/dts-temp/components/Calendar/Calendar.d.ts +3 -0
- package/dist/dts-temp/components/Calendar/Calendar.types.d.ts +55 -0
- package/dist/{components → dts-temp/components}/DatePicker/DatePicker.types.d.ts +5 -3
- package/dist/dts-temp/components/DatePicker/Utils/DateUtils.d.ts +6 -0
- package/dist/{components → dts-temp/components}/Dialog/Dialog.types.d.ts +3 -4
- package/dist/dts-temp/components/Drawer/Drawer.d.ts +4 -0
- package/dist/{components → dts-temp/components}/Drawer/Drawer.types.d.ts +2 -0
- package/dist/{components → dts-temp/components}/Filter/Filter.types.d.ts +15 -6
- package/dist/dts-temp/components/Filter/index.d.ts +2 -0
- package/dist/dts-temp/components/Popover/Popover.types.d.ts +25 -0
- package/dist/{components → dts-temp/components}/Table/TableHeader.d.ts +5 -3
- package/dist/dts-temp/components/TextArea/TextArea.d.ts +4 -0
- package/dist/dts-temp/components/TextArea/TextArea.types.d.ts +56 -0
- package/dist/dts-temp/components/TextArea/index.d.ts +2 -0
- package/dist/{components → dts-temp/components}/TextField/TextField.types.d.ts +9 -1
- package/dist/dts-temp/components/TextField/utils/__tests__/validation.test.d.ts +1 -0
- package/dist/dts-temp/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/dts-temp/components/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/{components → dts-temp/components}/index.d.ts +2 -2
- package/dist/dts-temp/index.d.ts +1 -0
- package/dist/index.cjs +429 -703
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +431 -705
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/components/Calendar/Calendar.d.ts +0 -3
- package/dist/components/Calendar/Calendar.types.d.ts +0 -109
- package/dist/components/DatePicker/DateUtils.d.ts +0 -23
- package/dist/components/Drawer/Drawer.d.ts +0 -9
- package/dist/components/Dropdown/Dropdown.d.ts +0 -4
- package/dist/components/Dropdown/Dropdown.types.d.ts +0 -91
- package/dist/components/Dropdown/DropdownUtils.d.ts +0 -8
- package/dist/components/Dropdown/index.d.ts +0 -2
- package/dist/components/Filter/index.d.ts +0 -2
- package/dist/components/Popover/Popover.types.d.ts +0 -8
- package/dist/index.d.ts +0 -1618
- /package/dist/{components → dts-temp/components}/Avatar/Avatar.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Avatar/Avatar.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Avatar/__tests__/Avatar.test.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Avatar/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Badge/Badge.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Badge/Badge.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Badge/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Button/Button.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Button/Button.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Button/__tests__/Button.test.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Button/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Calendar/__tests__/Calendar.test.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Calendar/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Callout/Callout.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Callout/Callout.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Callout/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Checkbox/Checkbox.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Checkbox/__tests__/Checkbox.test.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Checkbox/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Chips/Chips.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Chips/Chips.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Chips/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Container/Container.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Container/Container.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Container/__tests__/Container.test.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{components/Dialog/__tests__/Dialog.test.d.ts → dts-temp/components/DatePicker/__test__/DatePicker.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/DatePicker/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Dialog/Dialog.d.ts +0 -0
- /package/dist/{components/Menu/__tests__/Menu.test.d.ts → dts-temp/components/Dialog/__tests__/Dialog.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Dialog/index.d.ts +0 -0
- /package/dist/{components/Popover/__test__/Popover.test.d.ts → dts-temp/components/Drawer/__tests__/Drawer.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Drawer/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Filter/Filter.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/ListItem/ListItem.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/ListItem/ListItem.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/ListItem/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Menu/Menu.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Menu/Menu.types.d.ts +0 -0
- /package/dist/{components/Radio/__tests__/Radio.test.d.ts → dts-temp/components/Menu/__tests__/Menu.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Menu/components/MenuItem.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Menu/hooks/useMenuLogic.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Menu/hooks/useSearchLogic.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Menu/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Popover/Popover.d.ts +0 -0
- /package/dist/{components/Search/__tests__/Search.test.d.ts → dts-temp/components/Popover/__test__/Popover.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Popover/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Quantity/Quantity.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Quantity/Quantity.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Quantity/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Radio/Radio.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Radio/Radio.types.d.ts +0 -0
- /package/dist/{components/Select/__tests__/SelectRadix.test.d.ts → dts-temp/components/Radio/__tests__/Radio.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Radio/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Search/Search.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Search/Search.types.d.ts +0 -0
- /package/dist/{components/Switch/__tests__/Switch.test.d.ts → dts-temp/components/Search/__tests__/Search.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Search/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Select/Select.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Select/Select.types.d.ts +0 -0
- /package/dist/{components/TextField/__tests__/Textfield.test.d.ts → dts-temp/components/Select/__tests__/SelectRadix.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Select/components/CheckboxSelectItem.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Select/components/ExpandableSelectItem.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Select/components/SelectItem.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Select/hooks/useSelectLogic.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Select/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Switch/Switch.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Switch/Switch.types.d.ts +0 -0
- /package/dist/{components/TextField/utils/__tests__/validation.test.d.ts → dts-temp/components/Switch/__tests__/Switch.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/Switch/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/EmptyRows150Color.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/LoaderList.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/MultiLineText/MultiLineText.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/MultiLineText/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/Table.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/Table.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/TablePagination.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Table/utils/tableActions.d.ts +0 -0
- /package/dist/{components/Toast/__tests__/Toast.test.d.ts → dts-temp/components/TextArea/__tests__/TextArea.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/TextField/TextField.d.ts +0 -0
- /package/dist/{components/Tooltip/__tests__/Tooltip.test.d.ts → dts-temp/components/TextField/__tests__/Textfield.test.d.ts} +0 -0
- /package/dist/{components → dts-temp/components}/TextField/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/TextField/utils/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/TextField/utils/validation.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Toast/Toast.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Toast/Toast.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Toast/components/ToastContainer.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Toast/components/ToastProvider.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Toast/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Tooltip/Tooltip.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Tooltip/Tooltip.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/Tooltip/index.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/VerificationCode/VerificationCode.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/VerificationCode/VerificationCode.types.d.ts +0 -0
- /package/dist/{components → dts-temp/components}/VerificationCode/index.d.ts +0 -0
- /package/dist/{contexts → dts-temp/contexts}/ToastContext.d.ts +0 -0
- /package/dist/{hooks → dts-temp/hooks}/ApiSimulation.d.ts +0 -0
- /package/dist/{hooks → dts-temp/hooks}/InfiniteScroll.d.ts +0 -0
- /package/dist/{hooks → dts-temp/hooks}/NormalizeText.d.ts +0 -0
- /package/dist/{hooks → dts-temp/hooks}/useToast.d.ts +0 -0
- /package/dist/{shared → dts-temp/shared}/Label/index.d.ts +0 -0
- /package/dist/{shared → dts-temp/shared}/icons/CheckHalf.d.ts +0 -0
- /package/dist/{shared → dts-temp/shared}/icons/CheckSmall.d.ts +0 -0
- /package/dist/{shared → dts-temp/shared}/icons/index.d.ts +0 -0
- /package/dist/{types → dts-temp/types}/common.types.d.ts +0 -0
- /package/dist/{types → dts-temp/types}/index.d.ts +0 -0
package/dist/index.d.ts
DELETED
|
@@ -1,1618 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ReactNode, ReactElement, ComponentPropsWithoutRef, CSSProperties } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Matcher } from 'react-day-picker';
|
|
5
|
-
import { Toast as Toast$1 } from 'radix-ui';
|
|
6
|
-
import { BaseProps as BaseProps$1, Side as Side$1, Align as Align$1 } from '@/types';
|
|
7
|
-
|
|
8
|
-
type Size = 'sm' | 'lg';
|
|
9
|
-
type Variant = 'filled' | 'outlined' | 'text';
|
|
10
|
-
type TextVariant = 'neutral' | 'brand' | 'color' | 'success' | 'alert';
|
|
11
|
-
type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
12
|
-
type Align = 'start' | 'center' | 'end';
|
|
13
|
-
type Position = 'right' | 'left' | 'both';
|
|
14
|
-
type Locale = 'pt-br' | 'en-us';
|
|
15
|
-
interface BaseProps {
|
|
16
|
-
id?: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Props do componente Avatar
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* // Avatar com ícone
|
|
26
|
-
* <Avatar icon={<UserIcon />} size="lg" />
|
|
27
|
-
*
|
|
28
|
-
* // Avatar com imagem
|
|
29
|
-
* <Avatar src="https://example.com/avatar.jpg" icon={<UserIcon />} size="sm" />
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
interface AvatarProps extends BaseProps {
|
|
33
|
-
/** Ícone ou conteúdo a ser exibido no fallback quando não há imagem ou ela falha ao carregar */
|
|
34
|
-
icon?: React$1.ReactNode;
|
|
35
|
-
/** Tamanho do avatar: 'sm' (32px) ou 'lg' (44px). @default 'lg' */
|
|
36
|
-
size?: Size;
|
|
37
|
-
/** URL da imagem do avatar. Quando fornecido, exibe a imagem; caso contrário, mostra o ícone */
|
|
38
|
-
src?: string;
|
|
39
|
-
/** Texto alternativo da imagem do avatar, usado como as iniciais do nome */
|
|
40
|
-
initialLetters?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare const Avatar: React__default.FC<AvatarProps>;
|
|
44
|
-
|
|
45
|
-
/** Tipos de badge suportados */
|
|
46
|
-
type BadgeType = 'notification' | 'status';
|
|
47
|
-
/** Valores possíveis para exibição no badge */
|
|
48
|
-
type BadgeValue = number | string | null;
|
|
49
|
-
/**
|
|
50
|
-
* Props do componente Badge
|
|
51
|
-
* @example
|
|
52
|
-
* ```tsx
|
|
53
|
-
* <Badge type="notification" badgeValue={5}>
|
|
54
|
-
* <IconButton icon={<BellIcon />} />
|
|
55
|
-
* </Badge>
|
|
56
|
-
* ```
|
|
57
|
-
* @example
|
|
58
|
-
* ```tsx
|
|
59
|
-
* <Badge
|
|
60
|
-
* type="status"
|
|
61
|
-
* badgeValue="novo"
|
|
62
|
-
* aria-label="Novo item disponível"
|
|
63
|
-
* >
|
|
64
|
-
* <Avatar icon={<UserIcon />} />
|
|
65
|
-
* </Badge>
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
interface BadgeProps extends BaseProps {
|
|
69
|
-
/** Tipo de badge (notificação ou status) */
|
|
70
|
-
type: BadgeType;
|
|
71
|
-
/** Conteúdo a ser envolvido pelo badge */
|
|
72
|
-
children?: ReactNode;
|
|
73
|
-
/** Valor a ser exibido no badge (número, texto ou null) */
|
|
74
|
-
badgeValue?: BadgeValue;
|
|
75
|
-
/** Valor máximo a ser exibido (ex: 99+ quando badgeValue > maxValue) */
|
|
76
|
-
maxValue?: number;
|
|
77
|
-
/** Label acessível para leitores de tela */
|
|
78
|
-
'aria-label'?: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
declare const Badge: React__default.FC<BadgeProps>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Props do componente Button
|
|
85
|
-
* @example
|
|
86
|
-
* ```tsx
|
|
87
|
-
* <Button variant="filled" size="lg" onClick={handleClick}>
|
|
88
|
-
* Clique aqui
|
|
89
|
-
* </Button>
|
|
90
|
-
* ```
|
|
91
|
-
* @example
|
|
92
|
-
* ```tsx
|
|
93
|
-
* <Button
|
|
94
|
-
* variant="outlined"
|
|
95
|
-
* icon={<Icon />}
|
|
96
|
-
* iconPosition="left"
|
|
97
|
-
* loading={isLoading}
|
|
98
|
-
* >
|
|
99
|
-
* Salvar
|
|
100
|
-
* </Button>
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
interface ButtonProps extends BaseProps, React__default.HTMLAttributes<HTMLElement> {
|
|
104
|
-
/** Elemento customizado a ser renderizado (ex: 'a', Link do React Router) */
|
|
105
|
-
as?: React__default.ElementType;
|
|
106
|
-
/** Conteúdo do botão */
|
|
107
|
-
children?: React__default.ReactNode;
|
|
108
|
-
/** Variante visual do botão */
|
|
109
|
-
variant?: Variant;
|
|
110
|
-
/** Define se o botão exibe apenas ícone (sem texto) */
|
|
111
|
-
iconOnly?: boolean;
|
|
112
|
-
/** Posição do ícone em relação ao texto */
|
|
113
|
-
iconPosition?: Position;
|
|
114
|
-
/** URL de destino quando usado como link (renderiza <a>) */
|
|
115
|
-
href?: string;
|
|
116
|
-
/** Rota de destino para roteadores (ex: React Router) */
|
|
117
|
-
to?: string;
|
|
118
|
-
/** Define se o link abre em nova aba */
|
|
119
|
-
external?: boolean;
|
|
120
|
-
/** Atributo target do HTML para links */
|
|
121
|
-
target?: string;
|
|
122
|
-
/** Atributo rel do HTML para links */
|
|
123
|
-
rel?: string;
|
|
124
|
-
/** Tipo HTML do botão */
|
|
125
|
-
type?: 'button' | 'submit' | 'reset';
|
|
126
|
-
/** Tamanho do botão */
|
|
127
|
-
size?: Size;
|
|
128
|
-
/** Ícone a ser exibido no botão */
|
|
129
|
-
icon?: React__default.ReactNode;
|
|
130
|
-
/** Define se o botão ocupa 100% da largura do container */
|
|
131
|
-
fullWidth?: boolean;
|
|
132
|
-
/** Label acessível para leitores de tela */
|
|
133
|
-
ariaLabel?: string;
|
|
134
|
-
/** Estado de carregamento (exibe spinner) */
|
|
135
|
-
loading?: boolean;
|
|
136
|
-
/** Texto do tooltip exibido quando o botão é apenas ícone */
|
|
137
|
-
tooltipText?: string;
|
|
138
|
-
/** Lado em que o tooltip será exibido */
|
|
139
|
-
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
140
|
-
/** Alinhamento do tooltip */
|
|
141
|
-
tooltipAlign?: 'start' | 'center' | 'end';
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLElement>>;
|
|
145
|
-
|
|
146
|
-
/** Formato de exibição da data aceito pelo componente. */
|
|
147
|
-
type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy' | (string & {});
|
|
148
|
-
interface CalendarProps extends Omit<BaseProps, 'disabled'> {
|
|
149
|
-
/** Data selecionada atualmente (usada pelo DatePicker). */
|
|
150
|
-
selected?: Date | null;
|
|
151
|
-
/** Data selecionada atualmente (usada pelo Filter). */
|
|
152
|
-
selectedDate?: Date | null;
|
|
153
|
-
/**
|
|
154
|
-
* Mês exibido no calendário. Use junto com `onDateChange` para
|
|
155
|
-
* controlar a navegação externamente.
|
|
156
|
-
*/
|
|
157
|
-
currentDate?: Date | null;
|
|
158
|
-
/**
|
|
159
|
-
* Mês inicial padrão exibido quando não controlado.
|
|
160
|
-
* @default currentMonth
|
|
161
|
-
*/
|
|
162
|
-
defaultMonth?: Date;
|
|
163
|
-
/** Primeiro mês navegável. */
|
|
164
|
-
startMonth?: Date;
|
|
165
|
-
/** Último mês navegável. */
|
|
166
|
-
endMonth?: Date;
|
|
167
|
-
/** Número de meses exibidos simultaneamente. @default 1 */
|
|
168
|
-
numberOfMonths?: number;
|
|
169
|
-
/** Chamado quando o usuário seleciona um dia. */
|
|
170
|
-
onDaySelect?: (date: Date) => void;
|
|
171
|
-
/** Chamado quando o usuário navega entre meses. */
|
|
172
|
-
onDateChange?: (date: Date) => void;
|
|
173
|
-
/** Chamado quando o usuário limpa a seleção. */
|
|
174
|
-
onClear?: () => void;
|
|
175
|
-
/** Data mínima selecionável. */
|
|
176
|
-
minDate?: Date;
|
|
177
|
-
/** Data máxima selecionável. */
|
|
178
|
-
maxDate?: Date;
|
|
179
|
-
/**
|
|
180
|
-
* Dias desabilitados — aceita qualquer `Matcher` do react-day-picker
|
|
181
|
-
* (Date, DateRange, DateBefore, DateAfter, DayOfWeek, função…).
|
|
182
|
-
*/
|
|
183
|
-
disabled?: Matcher | Matcher[];
|
|
184
|
-
/**
|
|
185
|
-
* Dias ocultados — aceita qualquer `Matcher` do react-day-picker.
|
|
186
|
-
*/
|
|
187
|
-
hidden?: Matcher | Matcher[];
|
|
188
|
-
/**
|
|
189
|
-
* Formato de exibição da data.
|
|
190
|
-
* @example 'dd/mm/yyyy' | 'mm/dd/yyyy'
|
|
191
|
-
*/
|
|
192
|
-
format?: DateFormat;
|
|
193
|
-
/**
|
|
194
|
-
* Locale da interface — aceita os códigos internos do design system.
|
|
195
|
-
* @default 'pt-br'
|
|
196
|
-
*/
|
|
197
|
-
locale?: Locale;
|
|
198
|
-
/**
|
|
199
|
-
* Layout do cabeçalho do calendário.
|
|
200
|
-
* - `'label'` — exibe mês/ano como texto (padrão).
|
|
201
|
-
* - `'dropdown'` — exibe dropdowns para mês e ano.
|
|
202
|
-
* - `'dropdown-months'` — dropdown apenas para mês.
|
|
203
|
-
* - `'dropdown-years'` — dropdown apenas para ano.
|
|
204
|
-
*/
|
|
205
|
-
captionLayout?: 'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years';
|
|
206
|
-
/** Inverte a ordem dos anos no dropdown. */
|
|
207
|
-
reverseYears?: boolean;
|
|
208
|
-
/** Sempre exibe 6 semanas por mês, preenchendo com dias do mês seguinte. */
|
|
209
|
-
fixedWeeks?: boolean;
|
|
210
|
-
/** Exibe os dias pertencentes ao mês anterior/próximo. */
|
|
211
|
-
showOutsideDays?: boolean;
|
|
212
|
-
/** Exibe a coluna com o número da semana. */
|
|
213
|
-
showWeekNumber?: boolean;
|
|
214
|
-
/** Oculta os botões de navegação (sem desabilitar a navegação). */
|
|
215
|
-
hideNavigation?: boolean;
|
|
216
|
-
/** Desabilita a navegação entre meses. */
|
|
217
|
-
disableNavigation?: boolean;
|
|
218
|
-
/**
|
|
219
|
-
* Posicionamento dos botões de navegação.
|
|
220
|
-
* - `'around'` — um botão de cada lado do caption.
|
|
221
|
-
* - `'after'` — ambos após o caption.
|
|
222
|
-
*/
|
|
223
|
-
navLayout?: 'after' | 'around';
|
|
224
|
-
/** Atributo `aria-label` para o elemento raiz. */
|
|
225
|
-
'aria-label'?: string;
|
|
226
|
-
/** Atributo `aria-labelledby` para o elemento raiz. */
|
|
227
|
-
'aria-labelledby'?: string;
|
|
228
|
-
/** Foca automaticamente o primeiro dia selecionado ou hoje. */
|
|
229
|
-
autoFocus?: boolean;
|
|
230
|
-
/** Atributo `role` do elemento raiz (`'application'` ou `'dialog'`). */
|
|
231
|
-
role?: 'application' | 'dialog';
|
|
232
|
-
/** Atributo `title` do elemento raiz. */
|
|
233
|
-
title?: string;
|
|
234
|
-
/** Anima a transição entre meses. */
|
|
235
|
-
animate?: boolean;
|
|
236
|
-
/**
|
|
237
|
-
* Fuso horário IANA usado nos cálculos de datas.
|
|
238
|
-
* @example 'America/Sao_Paulo'
|
|
239
|
-
*/
|
|
240
|
-
timeZone?: string;
|
|
241
|
-
/** Estilos inline para o elemento raiz. */
|
|
242
|
-
style?: React__default.CSSProperties;
|
|
243
|
-
/** Substitui os `classNames` padrão do react-day-picker. */
|
|
244
|
-
classNames?: Partial<Record<string, string>>;
|
|
245
|
-
/** Modificadores customizados para dias específicos. */
|
|
246
|
-
modifiers?: Record<string, Matcher | Matcher[] | undefined>;
|
|
247
|
-
/** ClassNames aplicadas aos dias que correspondem aos `modifiers`. */
|
|
248
|
-
modifiersClassNames?: Record<string, string>;
|
|
249
|
-
/** Rodapé do calendário — exibido como live region para acessibilidade. */
|
|
250
|
-
footer?: React__default.ReactNode;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
declare const Calendar: ({ selected, selectedDate, currentDate, defaultMonth, startMonth, endMonth, numberOfMonths, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, hidden, format: _format, locale, captionLayout, reverseYears, fixedWeeks, showOutsideDays, showWeekNumber, hideNavigation, disableNavigation, navLayout, role, title, animate, timeZone, modifiers, modifiersClassNames, footer, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Props do componente Callout
|
|
257
|
-
* @example
|
|
258
|
-
* ```tsx
|
|
259
|
-
* <Callout
|
|
260
|
-
* type="success"
|
|
261
|
-
* title="Sucesso!"
|
|
262
|
-
* text="Operação realizada com sucesso"
|
|
263
|
-
* icon={<CheckIcon />}
|
|
264
|
-
* />
|
|
265
|
-
* ```
|
|
266
|
-
* @example
|
|
267
|
-
* ```tsx
|
|
268
|
-
* <Callout
|
|
269
|
-
* type="alert"
|
|
270
|
-
* title="Atenção"
|
|
271
|
-
* text="Verifique os campos obrigatórios"
|
|
272
|
-
* />
|
|
273
|
-
* ```
|
|
274
|
-
*/
|
|
275
|
-
interface CalloutProps extends BaseProps {
|
|
276
|
-
/** Tipo visual do callout */
|
|
277
|
-
type?: TextVariant;
|
|
278
|
-
/** Título principal do callout (texto em destaque) */
|
|
279
|
-
title?: string | null;
|
|
280
|
-
/** Texto descritivo do callout */
|
|
281
|
-
text?: string;
|
|
282
|
-
/** Ícone a ser exibido no callout */
|
|
283
|
-
icon?: React$1.ReactNode;
|
|
284
|
-
/** Props adicionais para o elemento div */
|
|
285
|
-
[key: string]: any;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
declare const Callout: React__default.FC<CalloutProps>;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Props do componente Checkbox
|
|
292
|
-
* @example
|
|
293
|
-
* ```tsx
|
|
294
|
-
* <Checkbox
|
|
295
|
-
* label="Aceito os termos"
|
|
296
|
-
* checked={accepted}
|
|
297
|
-
* onCheckedChange={setAccepted}
|
|
298
|
-
* />
|
|
299
|
-
* ```
|
|
300
|
-
* @example
|
|
301
|
-
* ```tsx
|
|
302
|
-
* <Checkbox
|
|
303
|
-
* label="Selecionar todos"
|
|
304
|
-
* indeterminate={someSelected}
|
|
305
|
-
* onCheckedChange={handleSelectAll}
|
|
306
|
-
* disabled={isLoading}
|
|
307
|
-
* />
|
|
308
|
-
* ```
|
|
309
|
-
*/
|
|
310
|
-
interface CheckboxProps extends BaseProps {
|
|
311
|
-
/** Label ou conteúdo a ser exibido ao lado do checkbox */
|
|
312
|
-
label?: React__default.ReactNode;
|
|
313
|
-
/** Callback executado quando o estado muda: (checked) => void */
|
|
314
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
315
|
-
/** Estado inicial (modo não controlado) */
|
|
316
|
-
defaultChecked?: boolean;
|
|
317
|
-
/** Estado atual (modo controlado) */
|
|
318
|
-
checked?: boolean;
|
|
319
|
-
/** Estado indeterminado (usado em selecionar todos com seleção parcial) */
|
|
320
|
-
indeterminate?: boolean;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Props do componente Chips
|
|
327
|
-
* @example
|
|
328
|
-
* ```tsx
|
|
329
|
-
* <Chips
|
|
330
|
-
* type="success"
|
|
331
|
-
* title="Ativo"
|
|
332
|
-
* leftIcon={<CheckIcon />}
|
|
333
|
-
* />
|
|
334
|
-
* ```
|
|
335
|
-
* @example
|
|
336
|
-
* ```tsx
|
|
337
|
-
* <Chips
|
|
338
|
-
* type="brand"
|
|
339
|
-
* title="Novo"
|
|
340
|
-
* rightIcon={<CloseIcon />}
|
|
341
|
-
* disabled={false}
|
|
342
|
-
* />
|
|
343
|
-
* ```
|
|
344
|
-
*/
|
|
345
|
-
interface ChipsProps extends BaseProps {
|
|
346
|
-
/** Tipo visual do chip */
|
|
347
|
-
type?: TextVariant;
|
|
348
|
-
/** Texto a ser exibido dentro do chip */
|
|
349
|
-
title: string;
|
|
350
|
-
/** Ícone posicionado à esquerda do texto */
|
|
351
|
-
leftIcon?: React$1.ReactNode;
|
|
352
|
-
/** Ícone posicionado à direita do texto */
|
|
353
|
-
rightIcon?: React$1.ReactNode;
|
|
354
|
-
/** Props adicionais para o elemento div */
|
|
355
|
-
[key: string]: any;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
declare const MemoizedChips: React__default.NamedExoticComponent<ChipsProps>;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Props do componente Container
|
|
362
|
-
* @example
|
|
363
|
-
* ```tsx
|
|
364
|
-
* <Container>
|
|
365
|
-
* <h1>Conteúdo da página</h1>
|
|
366
|
-
* <p>Texto dentro do container</p>
|
|
367
|
-
* </Container>
|
|
368
|
-
* ```
|
|
369
|
-
*/
|
|
370
|
-
interface ContainerProps {
|
|
371
|
-
/** Conteúdo a ser renderizado dentro do container */
|
|
372
|
-
children: React__default.ReactNode;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
declare function Container({ children }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Props do componente DatePicker
|
|
379
|
-
* @example
|
|
380
|
-
* ```tsx
|
|
381
|
-
* <DatePicker
|
|
382
|
-
* label="Data de nascimento"
|
|
383
|
-
* value={birthDate}
|
|
384
|
-
* onChange={setBirthDate}
|
|
385
|
-
* locale="pt-br"
|
|
386
|
-
* />
|
|
387
|
-
* ```
|
|
388
|
-
* @example
|
|
389
|
-
* ```tsx
|
|
390
|
-
* <DatePicker
|
|
391
|
-
* label="Data de início"
|
|
392
|
-
* required
|
|
393
|
-
* helperText="Selecione a data de início do projeto"
|
|
394
|
-
* minDate={new Date()}
|
|
395
|
-
* calendarPosition="right"
|
|
396
|
-
* error={errorMessage}
|
|
397
|
-
* />
|
|
398
|
-
* ```
|
|
399
|
-
*/
|
|
400
|
-
interface DatePickerProps extends BaseProps {
|
|
401
|
-
/** Locale para formatação da data */
|
|
402
|
-
locale?: Locale;
|
|
403
|
-
/** Posição do calendário em relação ao campo */
|
|
404
|
-
calendarPosition?: Position;
|
|
405
|
-
/** Texto de ajuda exibido abaixo do campo */
|
|
406
|
-
helperText?: string;
|
|
407
|
-
/** Define se o campo é obrigatório */
|
|
408
|
-
required?: boolean;
|
|
409
|
-
/** Label do campo de data */
|
|
410
|
-
label?: string;
|
|
411
|
-
/** Valor controlado da data */
|
|
412
|
-
value?: Date | null;
|
|
413
|
-
/** Valor inicial para modo não controlado */
|
|
414
|
-
defaultValue?: Date | null;
|
|
415
|
-
/** Callback executado quando a data muda: (date) => void */
|
|
416
|
-
onChange?: (date: Date | null) => void;
|
|
417
|
-
/** Mensagem de erro a ser exibida */
|
|
418
|
-
error?: string;
|
|
419
|
-
/** Data mínima selecionável */
|
|
420
|
-
minDate?: Date;
|
|
421
|
-
/** Data máxima selecionável */
|
|
422
|
-
maxDate?: Date;
|
|
423
|
-
/** ID para testes automatizados */
|
|
424
|
-
'data-testid'?: string;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
declare const _default$1: React__default.NamedExoticComponent<DatePickerProps>;
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Props do componente Dialog
|
|
431
|
-
* @example
|
|
432
|
-
* <Dialog
|
|
433
|
-
* title="Confirmar ação"
|
|
434
|
-
* bodyContent="Tem certeza que deseja continuar?"
|
|
435
|
-
* textConfirm="Confirmar"
|
|
436
|
-
* textCancel="Cancelar"
|
|
437
|
-
* />
|
|
438
|
-
*/
|
|
439
|
-
interface DialogProps extends BaseProps, React.HTMLAttributes<HTMLDivElement> {
|
|
440
|
-
/** Conteúdo customizado do diálogo */
|
|
441
|
-
show: boolean;
|
|
442
|
-
/** Título exibido no cabeçalho do diálogo */
|
|
443
|
-
title?: string;
|
|
444
|
-
/** Texto ou conteúdo do corpo do diálogo */
|
|
445
|
-
bodyContent?: ReactNode;
|
|
446
|
-
/** Texto do botão de ação primária */
|
|
447
|
-
textPrimaryAction?: string;
|
|
448
|
-
/** Texto do botão de ação secundária */
|
|
449
|
-
textSecondaryAction?: string;
|
|
450
|
-
/** Função chamada ao executar a ação primária */
|
|
451
|
-
onPrimaryAction?: () => void;
|
|
452
|
-
/** Função chamada ao executar a ação secundária */
|
|
453
|
-
onSecondaryAction?: () => void;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
declare const Dialog: React$1.FC<DialogProps>;
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Props do componente Drawer
|
|
460
|
-
* @example
|
|
461
|
-
* ```tsx
|
|
462
|
-
* <Drawer
|
|
463
|
-
* isOpen={isDrawerOpen}
|
|
464
|
-
* onClose={handleClose}
|
|
465
|
-
* title="Menu"
|
|
466
|
-
* >
|
|
467
|
-
* <nav>
|
|
468
|
-
* <a href="/home">Home</a>
|
|
469
|
-
* <a href="/about">Sobre</a>
|
|
470
|
-
* </nav>
|
|
471
|
-
* </Drawer>
|
|
472
|
-
* ```
|
|
473
|
-
* @example
|
|
474
|
-
* ```tsx
|
|
475
|
-
* <Drawer
|
|
476
|
-
* isOpen={showDrawer}
|
|
477
|
-
* onClose={() => setShowDrawer(false)}
|
|
478
|
-
* title="Configurações"
|
|
479
|
-
* customWidth="400px"
|
|
480
|
-
* closeOnOverlayClick={true}
|
|
481
|
-
* closeOnEscape={true}
|
|
482
|
-
* >
|
|
483
|
-
* <Settings />
|
|
484
|
-
* </Drawer>
|
|
485
|
-
* ```
|
|
486
|
-
*/
|
|
487
|
-
interface DrawerProps extends BaseProps {
|
|
488
|
-
/** Conteúdo a ser exibido dentro do drawer */
|
|
489
|
-
children?: ReactNode;
|
|
490
|
-
/** Largura customizada do drawer (ex: '400px', '50%') */
|
|
491
|
-
customWidth?: string;
|
|
492
|
-
/** Callback executado ao fechar o drawer: () => void */
|
|
493
|
-
onClose: () => void;
|
|
494
|
-
/** Título exibido no cabeçalho do drawer */
|
|
495
|
-
title?: string;
|
|
496
|
-
/** Define se o drawer está aberto */
|
|
497
|
-
isOpen: boolean;
|
|
498
|
-
/** Callback executado ao abrir o drawer: () => void */
|
|
499
|
-
onOpen?: () => void;
|
|
500
|
-
/** Callback executado ao clicar no overlay: () => void */
|
|
501
|
-
onOverlayClick?: () => void;
|
|
502
|
-
/** Define se o drawer fecha ao clicar no overlay */
|
|
503
|
-
closeOnOverlayClick?: boolean;
|
|
504
|
-
/** Define se o drawer fecha ao pressionar ESC */
|
|
505
|
-
closeOnEscape?: boolean;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Componente Drawer do Zanthus Design System
|
|
510
|
-
* Implementa um painel lateral deslizante com overlay
|
|
511
|
-
* Segue padrões WCAG 2.1 AA para acessibilidade
|
|
512
|
-
*/
|
|
513
|
-
declare const Drawer: React__default.FC<DrawerProps>;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Representa um item individual do dropdown
|
|
517
|
-
*/
|
|
518
|
-
interface DropdownItem {
|
|
519
|
-
/** ID único do item (será gerado automaticamente se não fornecido) */
|
|
520
|
-
id?: string;
|
|
521
|
-
/** Texto principal do item */
|
|
522
|
-
text: string;
|
|
523
|
-
/** Texto secundário/descrição do item */
|
|
524
|
-
subText?: string;
|
|
525
|
-
/** Ícone do item */
|
|
526
|
-
icon?: React__default.ReactNode;
|
|
527
|
-
/** Define se o item está desabilitado */
|
|
528
|
-
disabled?: boolean;
|
|
529
|
-
}
|
|
530
|
-
/** Tipos de dropdown disponíveis */
|
|
531
|
-
type DropdownType = 'text' | 'checkbox' | 'icon';
|
|
532
|
-
/**
|
|
533
|
-
* Props do componente Dropdown
|
|
534
|
-
* @example
|
|
535
|
-
* ```tsx
|
|
536
|
-
* <Dropdown
|
|
537
|
-
* items={[
|
|
538
|
-
* { text: 'Opção 1', icon: <Icon1 /> },
|
|
539
|
-
* { text: 'Opção 2', icon: <Icon2 /> }
|
|
540
|
-
* ]}
|
|
541
|
-
* type="text"
|
|
542
|
-
* placeholder="Selecione uma opção"
|
|
543
|
-
* />
|
|
544
|
-
* ```
|
|
545
|
-
* @example
|
|
546
|
-
* ```tsx
|
|
547
|
-
* <Dropdown
|
|
548
|
-
* items={items}
|
|
549
|
-
* type="checkbox"
|
|
550
|
-
* applySearch={true}
|
|
551
|
-
* onSelectionChange={(ids) => console.log(ids)}
|
|
552
|
-
* defaultSelectedIds={['1', '2']}
|
|
553
|
-
* maxHeight="300px"
|
|
554
|
-
* />
|
|
555
|
-
* ```
|
|
556
|
-
*/
|
|
557
|
-
interface DropdownProps extends BaseProps {
|
|
558
|
-
/** Força posição do dropdown: 'top' abre para cima, 'bottom' para baixo (detecção automática se não especificado) */
|
|
559
|
-
position?: 'top' | 'bottom';
|
|
560
|
-
/** Array de itens para o dropdown */
|
|
561
|
-
items: DropdownItem[];
|
|
562
|
-
/** Tipo do dropdown */
|
|
563
|
-
type?: DropdownType;
|
|
564
|
-
/** Habilita campo de busca */
|
|
565
|
-
applySearch?: boolean;
|
|
566
|
-
/** Placeholder do campo de busca */
|
|
567
|
-
placeholder?: string;
|
|
568
|
-
/** Callback executado quando a seleção muda: (selectedIds) => void */
|
|
569
|
-
onSelectionChange?: (selectedIds: string[]) => void;
|
|
570
|
-
/** Controla exibição do subtexto dos itens */
|
|
571
|
-
showSubText?: boolean;
|
|
572
|
-
/** IDs dos itens selecionados por padrão */
|
|
573
|
-
defaultSelectedIds?: string[];
|
|
574
|
-
/** Estado inicial dos itens selecionados (objeto chave-valor) */
|
|
575
|
-
initialItemsSelected?: Record<string, boolean>;
|
|
576
|
-
/** Largura do dropdown */
|
|
577
|
-
width?: string | number;
|
|
578
|
-
/** Largura máxima do dropdown */
|
|
579
|
-
maxWidth?: string | number;
|
|
580
|
-
/** Largura mínima do dropdown */
|
|
581
|
-
minWidth?: string | number;
|
|
582
|
-
/** Altura máxima do dropdown */
|
|
583
|
-
maxHeight?: string | number;
|
|
584
|
-
/** Define se o componente está sendo usado para filtro */
|
|
585
|
-
filter?: boolean;
|
|
586
|
-
/** Configurações para paginação infinita */
|
|
587
|
-
infiniteScroll?: {
|
|
588
|
-
/** Status atual do carregamento */
|
|
589
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
590
|
-
/** Página atual */
|
|
591
|
-
page: number;
|
|
592
|
-
/** Última página disponível */
|
|
593
|
-
lastPage: number;
|
|
594
|
-
/** Callback executado para carregar próxima página: () => void */
|
|
595
|
-
onLoadMore: () => void;
|
|
596
|
-
/** Threshold para trigger do scroll infinito (0-1) */
|
|
597
|
-
threshold?: number;
|
|
598
|
-
/** Margem para trigger do scroll infinito */
|
|
599
|
-
rootMargin?: string;
|
|
600
|
-
/** Modo de debug */
|
|
601
|
-
debug?: boolean;
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
declare const MemoizedDropdown: React__default.NamedExoticComponent<DropdownProps>;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Props do componente Filter
|
|
609
|
-
* @example
|
|
610
|
-
* ```tsx
|
|
611
|
-
* <Filter
|
|
612
|
-
* items={filterItems}
|
|
613
|
-
* type="checkbox"
|
|
614
|
-
* placeholder="Filtrar por categoria"
|
|
615
|
-
* onApplyFilter={(ids) => handleFilter(ids)}
|
|
616
|
-
* buttonText="Filtros"
|
|
617
|
-
* />
|
|
618
|
-
* ```
|
|
619
|
-
* @example
|
|
620
|
-
* ```tsx
|
|
621
|
-
* <Filter
|
|
622
|
-
* type="calendar"
|
|
623
|
-
* selectedDate={selectedDate}
|
|
624
|
-
* onDateSelect={handleDateSelect}
|
|
625
|
-
* minDate={new Date('2024-01-01')}
|
|
626
|
-
* locale="pt-br"
|
|
627
|
-
* icon={<CalendarIcon />}
|
|
628
|
-
* />
|
|
629
|
-
* ```
|
|
630
|
-
*/
|
|
631
|
-
interface FilterProps extends BaseProps {
|
|
632
|
-
/** Array de itens para filtros do tipo dropdown */
|
|
633
|
-
items?: DropdownItem[];
|
|
634
|
-
/** Tipo do filtro (dropdown ou calendário) */
|
|
635
|
-
type?: DropdownType | 'calendar';
|
|
636
|
-
/** IDs dos itens selecionados */
|
|
637
|
-
selectedIds?: string[];
|
|
638
|
-
/** Callback executado ao aplicar filtro: (selectedIds) => void */
|
|
639
|
-
onApplyFilter?: (selectedIds: string[]) => void;
|
|
640
|
-
/** Placeholder do campo de busca */
|
|
641
|
-
placeholder?: string;
|
|
642
|
-
/** Habilita campo de busca no dropdown */
|
|
643
|
-
enableSearch?: boolean;
|
|
644
|
-
/** Texto ou conteúdo do botão de filtro */
|
|
645
|
-
buttonText?: string | ReactNode;
|
|
646
|
-
/** Ícone do botão de filtro */
|
|
647
|
-
icon?: ReactElement;
|
|
648
|
-
/** Variante visual do botão */
|
|
649
|
-
variant?: Variant;
|
|
650
|
-
/** Callback executado ao abrir o filtro: () => void */
|
|
651
|
-
onOpen?: () => void;
|
|
652
|
-
/** Callback executado ao fechar o filtro: () => void */
|
|
653
|
-
onClose?: () => void;
|
|
654
|
-
/** Posição do dropdown em relação ao botão */
|
|
655
|
-
position?: Position;
|
|
656
|
-
/** Data selecionada (para tipo calendar) */
|
|
657
|
-
selectedDate?: Date | null;
|
|
658
|
-
/** Callback executado ao selecionar data: (date) => void */
|
|
659
|
-
onDateSelect?: (date: Date) => void;
|
|
660
|
-
/** Callback executado ao limpar data: () => void */
|
|
661
|
-
onClearDate?: () => void;
|
|
662
|
-
/** Data mínima selecionável (para tipo calendar) */
|
|
663
|
-
minDate?: Date;
|
|
664
|
-
/** Data máxima selecionável (para tipo calendar) */
|
|
665
|
-
maxDate?: Date;
|
|
666
|
-
/** Locale do calendário */
|
|
667
|
-
locale?: Locale;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
declare const Filter: React__default.FC<FilterProps>;
|
|
671
|
-
|
|
672
|
-
/** Variantes disponíveis para o ListItem */
|
|
673
|
-
type ListItemVariant = 'text' | 'checkbox' | 'radio' | 'icon';
|
|
674
|
-
/**
|
|
675
|
-
* Props do componente ListItem
|
|
676
|
-
* @example
|
|
677
|
-
* ```tsx
|
|
678
|
-
* <ListItem
|
|
679
|
-
* variant="text"
|
|
680
|
-
* text="Item da lista"
|
|
681
|
-
* subText="Descrição do item"
|
|
682
|
-
* onClick={handleClick}
|
|
683
|
-
* />
|
|
684
|
-
* ```
|
|
685
|
-
* @example
|
|
686
|
-
* ```tsx
|
|
687
|
-
* <ListItem
|
|
688
|
-
* variant="checkbox"
|
|
689
|
-
* text="Aceitar termos"
|
|
690
|
-
* checked={isChecked}
|
|
691
|
-
* onChange={setIsChecked}
|
|
692
|
-
* disabled={false}
|
|
693
|
-
* />
|
|
694
|
-
* ```
|
|
695
|
-
*/
|
|
696
|
-
interface ListItemProps extends BaseProps {
|
|
697
|
-
/** Variante do item da lista */
|
|
698
|
-
variant?: ListItemVariant;
|
|
699
|
-
/** Texto principal do item */
|
|
700
|
-
text?: string;
|
|
701
|
-
/** Nome do input (para variantes checkbox/radio) */
|
|
702
|
-
name?: string;
|
|
703
|
-
/** Texto secundário/descrição do item */
|
|
704
|
-
subText?: string;
|
|
705
|
-
/** Estado de checked (para variantes checkbox/radio) */
|
|
706
|
-
checked?: boolean;
|
|
707
|
-
/** Estado de selecionado (para variantes text/icon) */
|
|
708
|
-
selected?: boolean;
|
|
709
|
-
/** Callback executado ao clicar no item: (event) => void */
|
|
710
|
-
onClick?: (event: React$1.MouseEvent<HTMLElement> | React$1.KeyboardEvent<HTMLElement>) => void;
|
|
711
|
-
/** Callback executado quando o estado muda: (checked) => void */
|
|
712
|
-
onChange?: (checked: boolean) => void;
|
|
713
|
-
/** Ícone do item (para variante icon) */
|
|
714
|
-
icon?: React$1.ReactNode;
|
|
715
|
-
/** Valor do input (para variantes checkbox/radio) */
|
|
716
|
-
value?: string;
|
|
717
|
-
/** Define se deve mostrar o subtexto */
|
|
718
|
-
showSubText?: boolean;
|
|
719
|
-
/** Estado de hover */
|
|
720
|
-
hovered?: boolean;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
declare const ListItem: React__default.FC<ListItemProps>;
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* Representa um item do menu (suporta subitens aninhados)
|
|
727
|
-
*/
|
|
728
|
-
interface MenuItemProps {
|
|
729
|
-
/** ID único do item */
|
|
730
|
-
id?: string;
|
|
731
|
-
/** Texto principal do item */
|
|
732
|
-
text?: string;
|
|
733
|
-
/** Texto secundário/descrição do item */
|
|
734
|
-
subText?: string;
|
|
735
|
-
/** Estado desabilitado do item */
|
|
736
|
-
disabled?: boolean;
|
|
737
|
-
/** Ícone do item */
|
|
738
|
-
icon?: React$1.ReactNode;
|
|
739
|
-
/** Subitens do menu (para menus aninhados) */
|
|
740
|
-
children?: MenuItemProps[];
|
|
741
|
-
/** Valor do item */
|
|
742
|
-
value?: string;
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Props do componente Menu
|
|
746
|
-
* @example
|
|
747
|
-
* ```tsx
|
|
748
|
-
* <Menu
|
|
749
|
-
* items={[
|
|
750
|
-
* { id: '1', text: 'Perfil', icon: <UserIcon /> },
|
|
751
|
-
* { id: '2', text: 'Configurações', icon: <SettingsIcon /> }
|
|
752
|
-
* ]}
|
|
753
|
-
* onItemSelect={(item) => handleSelect(item)}
|
|
754
|
-
* >
|
|
755
|
-
* <Button>Menu</Button>
|
|
756
|
-
* </Menu>
|
|
757
|
-
* ```
|
|
758
|
-
* @example
|
|
759
|
-
* ```tsx
|
|
760
|
-
* <Menu
|
|
761
|
-
* items={menuItems}
|
|
762
|
-
* type="icon"
|
|
763
|
-
* search={true}
|
|
764
|
-
* enableInfiniteScroll={true}
|
|
765
|
-
* onScrollEnd={loadMore}
|
|
766
|
-
* maxHeight="400px"
|
|
767
|
-
* align="end"
|
|
768
|
-
* />
|
|
769
|
-
* ```
|
|
770
|
-
*/
|
|
771
|
-
interface MenuProps extends BaseProps {
|
|
772
|
-
/** Array de itens do menu */
|
|
773
|
-
items: MenuItemProps[];
|
|
774
|
-
/** Elemento trigger customizado para abrir o menu */
|
|
775
|
-
children?: ReactElement;
|
|
776
|
-
/** Tipo de visualização do menu */
|
|
777
|
-
type?: 'text' | 'icon';
|
|
778
|
-
/** Callback executado quando um item é selecionado: (item) => void */
|
|
779
|
-
onItemSelect?: (items: MenuItemProps) => void;
|
|
780
|
-
/** Array de itens selecionados */
|
|
781
|
-
selectedItems?: MenuItemProps[];
|
|
782
|
-
/** Habilita campo de busca */
|
|
783
|
-
search?: boolean;
|
|
784
|
-
/** Alinhamento do menu */
|
|
785
|
-
align?: 'start' | 'end' | 'center';
|
|
786
|
-
/** Altura máxima do menu */
|
|
787
|
-
maxHeight?: number | string;
|
|
788
|
-
/** Habilita scroll infinito */
|
|
789
|
-
enableInfiniteScroll?: boolean;
|
|
790
|
-
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
791
|
-
onScrollEnd?: () => void;
|
|
792
|
-
/** Estado de carregamento de mais itens */
|
|
793
|
-
isLoadingMore?: boolean;
|
|
794
|
-
/** Habilita busca via API */
|
|
795
|
-
enableApiSearch?: boolean;
|
|
796
|
-
/** Callback executado na busca via API: (searchTerm) => void */
|
|
797
|
-
onApiSearch?: (searchTerm: string) => void;
|
|
798
|
-
/** Callback executado quando o menu abre/fecha: (open) => void */
|
|
799
|
-
onOpenChange?: (open: boolean) => void;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
declare const Menu: React__default.FC<MenuProps>;
|
|
803
|
-
|
|
804
|
-
interface PopoverProps {
|
|
805
|
-
trigger: React.ReactNode;
|
|
806
|
-
content: React.ReactNode;
|
|
807
|
-
onDateSelect?: (date: Date) => void;
|
|
808
|
-
align?: Align;
|
|
809
|
-
side?: Side;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
declare const Popover: React$1.FC<PopoverProps>;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Props do componente Quantity
|
|
816
|
-
* @example
|
|
817
|
-
* ```tsx
|
|
818
|
-
* <Quantity
|
|
819
|
-
* value={quantity}
|
|
820
|
-
* onChange={setQuantity}
|
|
821
|
-
* size="lg"
|
|
822
|
-
* />
|
|
823
|
-
* ```
|
|
824
|
-
* @example
|
|
825
|
-
* ```tsx
|
|
826
|
-
* <Quantity
|
|
827
|
-
* defaultValue={1}
|
|
828
|
-
* decimal={true}
|
|
829
|
-
* decimalPlaces={2}
|
|
830
|
-
* step={0.5}
|
|
831
|
-
* disabled={false}
|
|
832
|
-
* />
|
|
833
|
-
* ```
|
|
834
|
-
*/
|
|
835
|
-
interface QuantityProps extends BaseProps {
|
|
836
|
-
/** Valor inicial (modo não controlado) */
|
|
837
|
-
defaultValue?: number;
|
|
838
|
-
/** Valor atual (modo controlado) */
|
|
839
|
-
value?: number;
|
|
840
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
841
|
-
onChange?: (value: number) => void;
|
|
842
|
-
/** Habilita entrada de valores decimais */
|
|
843
|
-
decimal?: boolean;
|
|
844
|
-
/** Tamanho do componente */
|
|
845
|
-
size?: Size;
|
|
846
|
-
/** Número de casas decimais permitidas */
|
|
847
|
-
decimalPlaces?: number;
|
|
848
|
-
/** Incremento/decremento ao clicar nos botões */
|
|
849
|
-
step?: number;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
declare const memorizedQuantity: React__default.NamedExoticComponent<QuantityProps>;
|
|
853
|
-
|
|
854
|
-
/**
|
|
855
|
-
* Props de um item individual de rádio
|
|
856
|
-
*/
|
|
857
|
-
interface RadioProps {
|
|
858
|
-
/** ID único do elemento */
|
|
859
|
-
id?: string | number;
|
|
860
|
-
/** Valor do radio button */
|
|
861
|
-
value: string;
|
|
862
|
-
/** Label exibida ao lado do radio button */
|
|
863
|
-
label: string;
|
|
864
|
-
/** Estado desabilitado do item */
|
|
865
|
-
disabled?: boolean;
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* Props do componente RadioGroup
|
|
869
|
-
* @example
|
|
870
|
-
* ```tsx
|
|
871
|
-
* <RadioGroup
|
|
872
|
-
* items={[
|
|
873
|
-
* { value: 'option1', label: 'Opção 1' },
|
|
874
|
-
* { value: 'option2', label: 'Opção 2' }
|
|
875
|
-
* ]}
|
|
876
|
-
* onValueChange={(value) => setSelected(value)}
|
|
877
|
-
* defaultValue="option1"
|
|
878
|
-
* />
|
|
879
|
-
* ```
|
|
880
|
-
* @example
|
|
881
|
-
* ```tsx
|
|
882
|
-
* <RadioGroup
|
|
883
|
-
* items={options}
|
|
884
|
-
* onValueChange={handleChange}
|
|
885
|
-
* name="preference"
|
|
886
|
-
* orientation="horizontal"
|
|
887
|
-
* ariaLabel="Selecione sua preferência"
|
|
888
|
-
* />
|
|
889
|
-
* ```
|
|
890
|
-
*/
|
|
891
|
-
interface RadioGroupProps extends BaseProps {
|
|
892
|
-
/** Array de itens de rádio */
|
|
893
|
-
items: RadioProps[];
|
|
894
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
895
|
-
onValueChange?: (value: string) => void;
|
|
896
|
-
/** Valor inicial selecionado */
|
|
897
|
-
defaultValue?: string;
|
|
898
|
-
/** Nome do grupo de radio buttons */
|
|
899
|
-
name?: string;
|
|
900
|
-
/** Label acessível para leitores de tela */
|
|
901
|
-
ariaLabel?: string;
|
|
902
|
-
/** Orientação do layout dos radio buttons */
|
|
903
|
-
orientation?: "horizontal" | "vertical";
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
declare const Radio: React__default.FC<RadioGroupProps>;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* Props do componente Search
|
|
910
|
-
* @example
|
|
911
|
-
* ```tsx
|
|
912
|
-
* <Search
|
|
913
|
-
* placeholder="Buscar..."
|
|
914
|
-
* value={searchTerm}
|
|
915
|
-
* onChange={(e) => setSearchTerm(e.target.value)}
|
|
916
|
-
* onClear={() => setSearchTerm('')}
|
|
917
|
-
* />
|
|
918
|
-
* ```
|
|
919
|
-
* @example
|
|
920
|
-
* ```tsx
|
|
921
|
-
* <Search
|
|
922
|
-
* placeholder="Pesquisar produtos"
|
|
923
|
-
* disabled={isLoading}
|
|
924
|
-
* onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
|
|
925
|
-
* onFocus={handleFocus}
|
|
926
|
-
* />
|
|
927
|
-
* ```
|
|
928
|
-
*/
|
|
929
|
-
type NativeInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown'>;
|
|
930
|
-
interface SearchProps extends BaseProps, NativeInputProps {
|
|
931
|
-
/** Placeholder do campo de busca */
|
|
932
|
-
placeholder?: string;
|
|
933
|
-
/** Valor controlado do campo */
|
|
934
|
-
value?: string;
|
|
935
|
-
/** Callback executado quando o valor muda: (e) => void */
|
|
936
|
-
onChange?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
937
|
-
/** Callback executado ao pressionar tecla: (e) => void */
|
|
938
|
-
onKeyDown?: (e: React$1.KeyboardEvent<HTMLInputElement>) => void;
|
|
939
|
-
/** Callback executado ao focar no campo: (e) => void */
|
|
940
|
-
onFocus?: (e: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
941
|
-
/** Callback executado ao desfocar do campo: (e) => void */
|
|
942
|
-
onBlur?: (e: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
943
|
-
/** Callback executado ao limpar o campo: () => void */
|
|
944
|
-
onClear?: () => void;
|
|
945
|
-
/** Callback executado ao clicar no componente: (e) => void */
|
|
946
|
-
onClick?: (e: React$1.MouseEvent<HTMLDivElement>) => void;
|
|
947
|
-
/** Callback executado ao pressionar mouse no componente: (e) => void */
|
|
948
|
-
onMouseDown?: (e: React$1.MouseEvent<HTMLDivElement>) => void;
|
|
949
|
-
/** ID para testes automatizados */
|
|
950
|
-
'data-testid'?: string;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* Representa um item do select
|
|
957
|
-
*/
|
|
958
|
-
interface SelectItemProps extends BaseProps {
|
|
959
|
-
/** Texto principal do item */
|
|
960
|
-
text: ReactNode;
|
|
961
|
-
/** Subtítulo ou descrição do item */
|
|
962
|
-
subTitle?: ReactNode;
|
|
963
|
-
/** Ícone do item */
|
|
964
|
-
icon?: ReactNode;
|
|
965
|
-
/** Valor do item */
|
|
966
|
-
value: string;
|
|
967
|
-
/** Define se o item está selecionado */
|
|
968
|
-
selected?: boolean;
|
|
969
|
-
/** Subitens do select (para selects aninhados) */
|
|
970
|
-
children?: SelectItemProps[];
|
|
971
|
-
}
|
|
972
|
-
/** Variantes disponíveis para o Select */
|
|
973
|
-
type SelectVariant = 'text' | 'icon' | 'checkbox';
|
|
974
|
-
/**
|
|
975
|
-
* Props do componente Select
|
|
976
|
-
* @example
|
|
977
|
-
* ```tsx
|
|
978
|
-
* <Select
|
|
979
|
-
* items={[
|
|
980
|
-
* { value: '1', text: 'Opção 1' },
|
|
981
|
-
* { value: '2', text: 'Opção 2' }
|
|
982
|
-
* ]}
|
|
983
|
-
* variant="text"
|
|
984
|
-
* placeholder="Selecione uma opção"
|
|
985
|
-
* onValueChange={(value) => console.log(value)}
|
|
986
|
-
* />
|
|
987
|
-
* ```
|
|
988
|
-
* @example
|
|
989
|
-
* ```tsx
|
|
990
|
-
* <Select
|
|
991
|
-
* items={options}
|
|
992
|
-
* variant="checkbox"
|
|
993
|
-
* multiple={true}
|
|
994
|
-
* search={true}
|
|
995
|
-
* label="Selecione múltiplas opções"
|
|
996
|
-
* helperText="Você pode selecionar mais de uma"
|
|
997
|
-
* required={true}
|
|
998
|
-
* />
|
|
999
|
-
* ```
|
|
1000
|
-
*/
|
|
1001
|
-
interface SelectProps extends BaseProps {
|
|
1002
|
-
/** Array de itens do select */
|
|
1003
|
-
items: SelectItemProps[];
|
|
1004
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
1005
|
-
onValueChange?: (value: string | string[]) => void;
|
|
1006
|
-
/** Callback executado quando o select abre/fecha: (open) => void */
|
|
1007
|
-
onOpenChange?: (open: boolean) => void;
|
|
1008
|
-
/** Variante visual do select */
|
|
1009
|
-
variant: SelectVariant;
|
|
1010
|
-
/** Define se o campo é obrigatório */
|
|
1011
|
-
required?: boolean;
|
|
1012
|
-
/** Valor(es) selecionado(s) */
|
|
1013
|
-
value?: string | string[];
|
|
1014
|
-
/** Habilita seleção múltipla */
|
|
1015
|
-
multiple?: boolean;
|
|
1016
|
-
/** Placeholder do campo */
|
|
1017
|
-
placeholder?: string;
|
|
1018
|
-
/** Habilita campo de busca */
|
|
1019
|
-
search?: boolean;
|
|
1020
|
-
/** Label do campo */
|
|
1021
|
-
label?: string;
|
|
1022
|
-
/** Texto de ajuda exibido abaixo do campo */
|
|
1023
|
-
helperText?: string;
|
|
1024
|
-
/** Largura máxima do select */
|
|
1025
|
-
maxWidth?: number;
|
|
1026
|
-
/** Mensagem de erro a ser exibida */
|
|
1027
|
-
errorMessage?: string;
|
|
1028
|
-
/** Label acessível para leitores de tela */
|
|
1029
|
-
'aria-label'?: string;
|
|
1030
|
-
/** ID para testes automatizados */
|
|
1031
|
-
'data-testid'?: string;
|
|
1032
|
-
/** Habilita tooltip */
|
|
1033
|
-
tooltip?: boolean;
|
|
1034
|
-
/** Texto do tooltip */
|
|
1035
|
-
tooltipText?: string;
|
|
1036
|
-
/** Lado onde o dropdown abre */
|
|
1037
|
-
side?: Side;
|
|
1038
|
-
/** Alinhamento do dropdown */
|
|
1039
|
-
align?: Align;
|
|
1040
|
-
/** Habilita scroll infinito */
|
|
1041
|
-
enableInfiniteScroll?: boolean;
|
|
1042
|
-
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
1043
|
-
onScrollEnd?: () => void;
|
|
1044
|
-
/** Estado de carregamento de mais itens */
|
|
1045
|
-
isLoadingMore?: boolean;
|
|
1046
|
-
/** Habilita busca via API */
|
|
1047
|
-
enableApiSearch?: boolean;
|
|
1048
|
-
/** Callback executado na busca via API: (term) => void */
|
|
1049
|
-
onApiSearch?: (term: string) => void;
|
|
1050
|
-
/** Estado de busca em andamento */
|
|
1051
|
-
isSearching?: boolean;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
declare const Select: React__default.FC<SelectProps>;
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* Tipo base para dados da tabela. Use `<Table<SeuTipo>>` para type-safety completo.
|
|
1058
|
-
* @example <Table<User> dataSource={users} />
|
|
1059
|
-
*/
|
|
1060
|
-
type TableRowData = Record<string, any>;
|
|
1061
|
-
/** Tipos de coluna suportados */
|
|
1062
|
-
type TableColumnType = 'text' | 'datetime' | 'custom';
|
|
1063
|
-
/** Opções de alinhamento de coluna */
|
|
1064
|
-
type TableAlign = 'left' | 'center' | 'right';
|
|
1065
|
-
/**
|
|
1066
|
-
* Configuração de coluna da tabela
|
|
1067
|
-
* @typeParam T - Tipo dos dados da linha
|
|
1068
|
-
*/
|
|
1069
|
-
interface TableColumn<T = TableRowData> {
|
|
1070
|
-
/** Chave única identificadora da coluna */
|
|
1071
|
-
key: string;
|
|
1072
|
-
/** Conteúdo do cabeçalho da coluna */
|
|
1073
|
-
label: ReactNode;
|
|
1074
|
-
/** Tipo de dados da coluna */
|
|
1075
|
-
type?: TableColumnType;
|
|
1076
|
-
/** Formato de exibição (ex: 'dd/MM/yyyy' para datetime) */
|
|
1077
|
-
format?: string;
|
|
1078
|
-
/** Função customizada para renderizar o conteúdo da célula */
|
|
1079
|
-
render?: (row: T, index: number) => ReactNode;
|
|
1080
|
-
/** Alinhamento do conteúdo */
|
|
1081
|
-
align?: TableAlign;
|
|
1082
|
-
/** Estilos CSS customizados */
|
|
1083
|
-
style?: CSSProperties;
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
* Props do componente Table. Use genérico para autocomplete: `<Table<User>>`
|
|
1087
|
-
* @typeParam T - Tipo dos dados da linha
|
|
1088
|
-
*/
|
|
1089
|
-
interface TableProps<T = TableRowData> extends BaseProps {
|
|
1090
|
-
/** Configuração das colunas */
|
|
1091
|
-
columns: TableColumn<T>[];
|
|
1092
|
-
/** Array de dados a serem exibidos */
|
|
1093
|
-
dataSource: T[];
|
|
1094
|
-
/** Estado de carregamento */
|
|
1095
|
-
loading?: boolean;
|
|
1096
|
-
/** Configuração de seleção de linhas */
|
|
1097
|
-
rowSelection?: {
|
|
1098
|
-
/** Keys das linhas selecionadas (modo controlado) */
|
|
1099
|
-
selectedRowKeys?: (string | number)[];
|
|
1100
|
-
/** Callback quando seleção muda: (keys, rows) => void */
|
|
1101
|
-
onChange?: (keys: (string | number)[], rows: T[]) => void;
|
|
1102
|
-
/** Customiza props dos checkboxes: (row, index) => { disabled? } */
|
|
1103
|
-
getCheckboxProps?: (row: T, index: number) => {
|
|
1104
|
-
disabled?: boolean;
|
|
1105
|
-
};
|
|
1106
|
-
/** Desabilita o checkbox "selecionar todos" */
|
|
1107
|
-
disableSelectAll?: boolean;
|
|
1108
|
-
};
|
|
1109
|
-
/** Configurações de localização */
|
|
1110
|
-
locale?: {
|
|
1111
|
-
/** Texto quando não há dados */
|
|
1112
|
-
emptyText?: ReactNode;
|
|
1113
|
-
};
|
|
1114
|
-
/** Eventos de linha: (row, index) => { onClick?, onDoubleClick?, className? } */
|
|
1115
|
-
onRow?: (row: T, index: number) => {
|
|
1116
|
-
/** Clique simples na linha */
|
|
1117
|
-
onClick?: () => void;
|
|
1118
|
-
/** Clique duplo na linha */
|
|
1119
|
-
onDoubleClick?: () => void;
|
|
1120
|
-
/** Classe CSS da linha */
|
|
1121
|
-
className?: string;
|
|
1122
|
-
};
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) => react_jsx_runtime.JSX.Element | null;
|
|
1126
|
-
|
|
1127
|
-
interface BaseFilterItem {
|
|
1128
|
-
id?: string;
|
|
1129
|
-
buttonText: string | React__default.ReactNode;
|
|
1130
|
-
icon?: React__default.ReactElement;
|
|
1131
|
-
position?: 'left' | 'right';
|
|
1132
|
-
disabled?: boolean;
|
|
1133
|
-
onToggle?: (isOpen: boolean) => void;
|
|
1134
|
-
tooltip?: string;
|
|
1135
|
-
}
|
|
1136
|
-
interface CheckboxFilterItem extends BaseFilterItem {
|
|
1137
|
-
type: 'checkbox' | 'text' | 'icon';
|
|
1138
|
-
items: DropdownItem[];
|
|
1139
|
-
selectedIds?: string[];
|
|
1140
|
-
onSelectionChange?: (selectedIds: string[]) => void;
|
|
1141
|
-
placeholder?: string;
|
|
1142
|
-
enableSearch?: boolean;
|
|
1143
|
-
}
|
|
1144
|
-
interface CalendarFilterItem extends BaseFilterItem {
|
|
1145
|
-
type: 'calendar';
|
|
1146
|
-
selectedDate?: Date | null;
|
|
1147
|
-
onDateSelect?: (date: Date) => void;
|
|
1148
|
-
onClear?: () => void;
|
|
1149
|
-
minDate?: Date;
|
|
1150
|
-
maxDate?: Date;
|
|
1151
|
-
locale?: string;
|
|
1152
|
-
placeholder?: string;
|
|
1153
|
-
}
|
|
1154
|
-
type FilterItem = CheckboxFilterItem | CalendarFilterItem;
|
|
1155
|
-
interface TableHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1156
|
-
searchValue?: string;
|
|
1157
|
-
onSearchChange?: (value: string) => void;
|
|
1158
|
-
searchPlaceholder?: string;
|
|
1159
|
-
showSearch?: boolean;
|
|
1160
|
-
showFilters?: boolean;
|
|
1161
|
-
filters?: React__default.ReactNode;
|
|
1162
|
-
filterItems?: FilterItem[];
|
|
1163
|
-
className?: string;
|
|
1164
|
-
onSearch?: (value: string) => void;
|
|
1165
|
-
showClearSearch?: boolean;
|
|
1166
|
-
}
|
|
1167
|
-
declare const TableHeader: React__default.FC<TableHeaderProps>;
|
|
1168
|
-
|
|
1169
|
-
interface TablePaginationProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1170
|
-
currentPage: number;
|
|
1171
|
-
totalItems: number;
|
|
1172
|
-
itemsPerPage: number;
|
|
1173
|
-
onPageChange: (page: number) => void;
|
|
1174
|
-
onItemsPerPageChange: (itemsPerPage: number) => void;
|
|
1175
|
-
pageSizeOptions?: number[];
|
|
1176
|
-
disabled?: boolean;
|
|
1177
|
-
className?: string;
|
|
1178
|
-
}
|
|
1179
|
-
declare const TablePagination: React__default.FC<TablePaginationProps>;
|
|
1180
|
-
|
|
1181
|
-
/** Tipos de input suportados pelo TextField */
|
|
1182
|
-
type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
1183
|
-
/**
|
|
1184
|
-
* Props do componente TextField
|
|
1185
|
-
* @example
|
|
1186
|
-
* ```tsx
|
|
1187
|
-
* <TextField
|
|
1188
|
-
* label="Email"
|
|
1189
|
-
* type="email"
|
|
1190
|
-
* value={email}
|
|
1191
|
-
* onChange={setEmail}
|
|
1192
|
-
* placeholder="Digite seu email"
|
|
1193
|
-
* />
|
|
1194
|
-
* ```
|
|
1195
|
-
* @example
|
|
1196
|
-
* ```tsx
|
|
1197
|
-
* <TextField
|
|
1198
|
-
* label="Senha"
|
|
1199
|
-
* type="password"
|
|
1200
|
-
* required
|
|
1201
|
-
* helperText="Mínimo 8 caracteres"
|
|
1202
|
-
* errorMessage={error}
|
|
1203
|
-
* tooltip={true}
|
|
1204
|
-
* tooltipText="Deve conter letras e números"
|
|
1205
|
-
* icon={<LockIcon />}
|
|
1206
|
-
* />
|
|
1207
|
-
* ```
|
|
1208
|
-
*/
|
|
1209
|
-
interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
|
|
1210
|
-
/** Valor controlado do campo */
|
|
1211
|
-
value?: string | number;
|
|
1212
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
1213
|
-
onChange?: (value: string) => void;
|
|
1214
|
-
/** Label do campo */
|
|
1215
|
-
label?: string;
|
|
1216
|
-
/** Tipo do input */
|
|
1217
|
-
type?: TextFieldType;
|
|
1218
|
-
/** Texto de ajuda exibido abaixo do campo */
|
|
1219
|
-
helperText?: string;
|
|
1220
|
-
/** Habilita tooltip */
|
|
1221
|
-
tooltip?: boolean;
|
|
1222
|
-
/** Texto do tooltip */
|
|
1223
|
-
tooltipText?: string;
|
|
1224
|
-
/** Lado onde o tooltip aparece */
|
|
1225
|
-
side?: Side;
|
|
1226
|
-
/** Alinhamento do tooltip */
|
|
1227
|
-
align?: Align;
|
|
1228
|
-
/** Mensagem de erro a ser exibida */
|
|
1229
|
-
errorMessage?: string;
|
|
1230
|
-
/** Ícone a ser exibido no campo */
|
|
1231
|
-
icon?: React__default.ReactNode;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1235
|
-
|
|
1236
|
-
/**
|
|
1237
|
-
* Props do componente individual de notificação `Toast`.
|
|
1238
|
-
*
|
|
1239
|
-
* Estende {@link BaseProps} e os atributos nativos do `Toast.Root` do Radix UI,
|
|
1240
|
-
* excluindo as propriedades controladas internamente (`open`, `onOpenChange`,
|
|
1241
|
-
* `duration`, `className`).
|
|
1242
|
-
*
|
|
1243
|
-
* @example
|
|
1244
|
-
* ```tsx
|
|
1245
|
-
* showToast({
|
|
1246
|
-
* title: 'Sucesso!',
|
|
1247
|
-
* iconType: 'Success',
|
|
1248
|
-
* duration: 3000,
|
|
1249
|
-
* });
|
|
1250
|
-
* ```
|
|
1251
|
-
*/
|
|
1252
|
-
interface ToastProps extends BaseProps, Omit<React$1.ComponentPropsWithoutRef<typeof Toast$1.Root>, 'open' | 'onOpenChange' | 'duration' | 'className'> {
|
|
1253
|
-
/**
|
|
1254
|
-
* Título principal exibido no toast.
|
|
1255
|
-
*/
|
|
1256
|
-
title: string;
|
|
1257
|
-
/**
|
|
1258
|
-
* Define se o toast fecha automaticamente após o tempo definido em `duration`.
|
|
1259
|
-
* @default true
|
|
1260
|
-
*/
|
|
1261
|
-
automaticClose?: boolean;
|
|
1262
|
-
/**
|
|
1263
|
-
* Tempo em milissegundos até o toast fechar automaticamente.
|
|
1264
|
-
* Só tem efeito quando `automaticClose` é `true`.
|
|
1265
|
-
* @default 5000
|
|
1266
|
-
*/
|
|
1267
|
-
duration?: number;
|
|
1268
|
-
/**
|
|
1269
|
-
* Ícone customizado exibido no toast.
|
|
1270
|
-
* Quando fornecido, substitui o ícone gerado automaticamente por `iconType`.
|
|
1271
|
-
*/
|
|
1272
|
-
icon?: React$1.ReactNode;
|
|
1273
|
-
/**
|
|
1274
|
-
* Ícone exibido no botão de fechar o toast.
|
|
1275
|
-
* @default <Dismiss16Filled />
|
|
1276
|
-
*/
|
|
1277
|
-
iconClosed?: React$1.ReactNode;
|
|
1278
|
-
/**
|
|
1279
|
-
* Tipo do ícone exibido automaticamente no toast.
|
|
1280
|
-
*
|
|
1281
|
-
* - `'Info'` → ícone informativo (`Info20Filled`)
|
|
1282
|
-
* - `'Success'` → ícone de sucesso (`CheckmarkCircle20Filled`)
|
|
1283
|
-
* - `'Alert'` → ícone de alerta/erro (`Warning20Filled`)
|
|
1284
|
-
*
|
|
1285
|
-
* Ignorado quando a prop `icon` for fornecida.
|
|
1286
|
-
* @default 'Info'
|
|
1287
|
-
*/
|
|
1288
|
-
iconType?: 'Info' | 'Success' | 'Alert';
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
/**
|
|
1292
|
-
* Componente individual de notificação Toast.
|
|
1293
|
-
*
|
|
1294
|
-
* Consome o contexto do `ToastProvider` para gerenciar seu próprio ciclo de vida.
|
|
1295
|
-
* Cada instância recebe um `id` único gerado pelo provider e o utiliza para
|
|
1296
|
-
* se remover da fila ao ser fechada.
|
|
1297
|
-
*
|
|
1298
|
-
* Construído sobre `Toast.Root` do **Radix UI**, com suporte completo a
|
|
1299
|
-
* acessibilidade (ARIA) e gesto de swipe para a esquerda.
|
|
1300
|
-
*
|
|
1301
|
-
* @remarks
|
|
1302
|
-
* Este componente não deve ser usado diretamente. Utilize o hook `useToast`
|
|
1303
|
-
* para exibir toasts programaticamente.
|
|
1304
|
-
*
|
|
1305
|
-
* @example
|
|
1306
|
-
* ```tsx
|
|
1307
|
-
* // Uso indireto via hook (recomendado)
|
|
1308
|
-
* const { showToast } = useToast();
|
|
1309
|
-
*
|
|
1310
|
-
* showToast({
|
|
1311
|
-
* title: 'Item salvo',
|
|
1312
|
-
* iconType: 'Success',
|
|
1313
|
-
* duration: 3000,
|
|
1314
|
-
* });
|
|
1315
|
-
* ```
|
|
1316
|
-
*
|
|
1317
|
-
* @param props - {@link ToastProps} combinadas com o `id` único do toast
|
|
1318
|
-
*/
|
|
1319
|
-
declare const Toast: React$1.FC<ToastProps & {
|
|
1320
|
-
id: string;
|
|
1321
|
-
}>;
|
|
1322
|
-
|
|
1323
|
-
/**
|
|
1324
|
-
* Provider que gerencia o estado global dos toasts na aplicação.
|
|
1325
|
-
*
|
|
1326
|
-
* Deve envolver toda a árvore de componentes que precisará exibir toasts.
|
|
1327
|
-
* Disponibiliza o contexto com `showToast` e `dismissToast` para todos os
|
|
1328
|
-
* componentes filhos via `useToast()`.
|
|
1329
|
-
*
|
|
1330
|
-
* @remarks
|
|
1331
|
-
* O `ToastContainer` deve ser renderizado **dentro** do `ToastProvider`.
|
|
1332
|
-
*
|
|
1333
|
-
* @example
|
|
1334
|
-
* ```tsx
|
|
1335
|
-
* // App.tsx ou layout principal
|
|
1336
|
-
* import { ToastProvider, ToastContainer } from '@giro-ds/react';
|
|
1337
|
-
*
|
|
1338
|
-
* function App() {
|
|
1339
|
-
* return (
|
|
1340
|
-
* <ToastProvider maxToasts={5}>
|
|
1341
|
-
* <Routes />
|
|
1342
|
-
* <ToastContainer />
|
|
1343
|
-
* </ToastProvider>
|
|
1344
|
-
* );
|
|
1345
|
-
* }
|
|
1346
|
-
* ```
|
|
1347
|
-
*
|
|
1348
|
-
* @param children - Árvore de componentes filhos da aplicação.
|
|
1349
|
-
* @param maxToasts - Número máximo de toasts exibidos simultaneamente.
|
|
1350
|
-
* Quando o limite é excedido, o toast mais antigo é removido automaticamente.
|
|
1351
|
-
* @default 5
|
|
1352
|
-
*/
|
|
1353
|
-
declare const ToastProvider: React$1.FC<{
|
|
1354
|
-
children: React$1.ReactNode;
|
|
1355
|
-
maxToasts?: number;
|
|
1356
|
-
}>;
|
|
1357
|
-
|
|
1358
|
-
/**
|
|
1359
|
-
* Componente responsável por renderizar todos os toasts ativos na tela.
|
|
1360
|
-
*
|
|
1361
|
-
* Lê a lista de toasts do contexto fornecido pelo `ToastProvider` e os
|
|
1362
|
-
* renderiza individualmente. Configura o `Toast.Provider` do Radix UI com
|
|
1363
|
-
* direção de swipe para a esquerda.
|
|
1364
|
-
*
|
|
1365
|
-
* @remarks
|
|
1366
|
-
* - Deve ser posicionado **dentro** do `ToastProvider`.
|
|
1367
|
-
* - Geralmente é colocado próximo à raiz da aplicação, após os demais filhos.
|
|
1368
|
-
* - Toasts sem `id` são ignorados automaticamente.
|
|
1369
|
-
*
|
|
1370
|
-
* @example
|
|
1371
|
-
* ```tsx
|
|
1372
|
-
* <ToastProvider>
|
|
1373
|
-
* <App />
|
|
1374
|
-
* <ToastContainer /> {/* Deve estar aqui *\/}
|
|
1375
|
-
* </ToastProvider>
|
|
1376
|
-
* ```
|
|
1377
|
-
*/
|
|
1378
|
-
declare const ToastContainer: React$1.FC;
|
|
1379
|
-
|
|
1380
|
-
/**
|
|
1381
|
-
* Hook para exibir e remover toasts na aplicação.
|
|
1382
|
-
*
|
|
1383
|
-
* O componente que usa este hook deve ser filho de um `ToastProvider`.
|
|
1384
|
-
*
|
|
1385
|
-
* @throws {Error} Lança um erro se utilizado fora de um `ToastProvider`:
|
|
1386
|
-
* *"useToastContext deve ser usado dentro de ToastProvider"*
|
|
1387
|
-
*
|
|
1388
|
-
* @returns Objeto com os métodos `showToast` e `dismissToast`.
|
|
1389
|
-
*
|
|
1390
|
-
* @example
|
|
1391
|
-
* ```tsx
|
|
1392
|
-
* import { useToast } from '@giro-ds/react';
|
|
1393
|
-
*
|
|
1394
|
-
* function MeuComponente() {
|
|
1395
|
-
* const { showToast } = useToast();
|
|
1396
|
-
*
|
|
1397
|
-
* const handleSalvar = async () => {
|
|
1398
|
-
* try {
|
|
1399
|
-
* await salvarDados();
|
|
1400
|
-
* showToast({ title: 'Sucesso!', iconType: 'Success', duration: 3000 });
|
|
1401
|
-
* } catch (err) {
|
|
1402
|
-
* showToast({ title: 'Erro ao salvar', iconType: 'Alert', automaticClose: false });
|
|
1403
|
-
* }
|
|
1404
|
-
* };
|
|
1405
|
-
*
|
|
1406
|
-
* return <button onClick={handleSalvar}>Salvar</button>;
|
|
1407
|
-
* }
|
|
1408
|
-
* ```
|
|
1409
|
-
*/
|
|
1410
|
-
declare const useToast: () => {
|
|
1411
|
-
showToast: (toast: Omit<ToastProps, "id">) => void;
|
|
1412
|
-
dismissToast: (id: string) => void;
|
|
1413
|
-
};
|
|
1414
|
-
|
|
1415
|
-
interface TooltipProps extends BaseProps$1 {
|
|
1416
|
-
text: React__default.ReactNode;
|
|
1417
|
-
side?: Side$1;
|
|
1418
|
-
align?: Align$1;
|
|
1419
|
-
sideOffset?: number;
|
|
1420
|
-
/** Deslocamento em pixels no eixo de alinhamento */
|
|
1421
|
-
alignOffset?: number;
|
|
1422
|
-
/** Largura máxima do tooltip em pixels */
|
|
1423
|
-
maxWidth?: number;
|
|
1424
|
-
/** Elemento que dispara o tooltip ao hover */
|
|
1425
|
-
children: React__default.ReactNode;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
declare const Tooltip: React__default.FC<TooltipProps>;
|
|
1429
|
-
|
|
1430
|
-
/**
|
|
1431
|
-
* Props do componente Switch
|
|
1432
|
-
* @example
|
|
1433
|
-
* ```tsx
|
|
1434
|
-
* <Switch
|
|
1435
|
-
* checked={isEnabled}
|
|
1436
|
-
* onCheckedChange={setIsEnabled}
|
|
1437
|
-
* />
|
|
1438
|
-
* ```
|
|
1439
|
-
* @example
|
|
1440
|
-
* ```tsx
|
|
1441
|
-
* <Switch
|
|
1442
|
-
* defaultChecked={true}
|
|
1443
|
-
* disabled={isLoading}
|
|
1444
|
-
* onCheckedChange={(checked) => console.log(checked)}
|
|
1445
|
-
* name="notifications"
|
|
1446
|
-
* />
|
|
1447
|
-
* ```
|
|
1448
|
-
*/
|
|
1449
|
-
interface SwitchProps extends BaseProps {
|
|
1450
|
-
/** Estado inicial (modo não controlado) */
|
|
1451
|
-
defaultChecked?: boolean;
|
|
1452
|
-
/** Callback executado quando o estado muda: (checked) => void */
|
|
1453
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
1454
|
-
/** Nome do input */
|
|
1455
|
-
name?: string;
|
|
1456
|
-
/** Valor do input */
|
|
1457
|
-
value?: string;
|
|
1458
|
-
/** Estado atual (modo controlado) */
|
|
1459
|
-
checked?: boolean;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
declare const Switch: React$1.FC<SwitchProps>;
|
|
1463
|
-
|
|
1464
|
-
/** Tipos de entrada suportados pelo VerificationCode */
|
|
1465
|
-
type InputType = 'numeric' | 'alpha' | 'alphanumeric';
|
|
1466
|
-
/**
|
|
1467
|
-
* Props do componente VerificationCode
|
|
1468
|
-
* @example
|
|
1469
|
-
* ```tsx
|
|
1470
|
-
* <VerificationCode
|
|
1471
|
-
* length={6}
|
|
1472
|
-
* inputType="numeric"
|
|
1473
|
-
* onComplete={(code) => handleVerification(code)}
|
|
1474
|
-
* />
|
|
1475
|
-
* ```
|
|
1476
|
-
* @example
|
|
1477
|
-
* ```tsx
|
|
1478
|
-
* <VerificationCode
|
|
1479
|
-
* length={4}
|
|
1480
|
-
* inputType="alphanumeric"
|
|
1481
|
-
* onComplete={handleCode}
|
|
1482
|
-
* hasError={!!error}
|
|
1483
|
-
* errorMessage="Código inválido"
|
|
1484
|
-
* disabled={isVerifying}
|
|
1485
|
-
* />
|
|
1486
|
-
* ```
|
|
1487
|
-
*/
|
|
1488
|
-
interface VerificationCodeProps extends BaseProps {
|
|
1489
|
-
/** Número de dígitos do código (padrão: 6) */
|
|
1490
|
-
length?: number;
|
|
1491
|
-
/** Tipo de entrada permitida (padrão: "numeric") */
|
|
1492
|
-
inputType?: InputType;
|
|
1493
|
-
/** Callback executado quando todos os campos são preenchidos: (value) => void */
|
|
1494
|
-
onComplete?: (value: string) => void;
|
|
1495
|
-
/** Define se o campo está em estado de erro */
|
|
1496
|
-
hasError?: boolean;
|
|
1497
|
-
/** Mensagem de erro exibida abaixo do componente */
|
|
1498
|
-
errorMessage?: string;
|
|
1499
|
-
/** Props adicionais passadas para os inputs */
|
|
1500
|
-
[key: string]: any;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* Componente VerificationCode para entrada de códigos de verificação
|
|
1505
|
-
*
|
|
1506
|
-
* @description Permite entrada de códigos com múltiplos dígitos,
|
|
1507
|
-
* suportando diferentes tipos de caracteres e navegação por teclado.
|
|
1508
|
-
*
|
|
1509
|
-
* @example
|
|
1510
|
-
* ```tsx
|
|
1511
|
-
* <VerificationCode
|
|
1512
|
-
* length={6}
|
|
1513
|
-
* inputType="numeric"
|
|
1514
|
-
* onComplete={(code) => console.log('Código:', code)}
|
|
1515
|
-
* hasError={false}
|
|
1516
|
-
* />
|
|
1517
|
-
* ```
|
|
1518
|
-
*/
|
|
1519
|
-
declare const VerificationCode: React__default.FC<VerificationCodeProps>;
|
|
1520
|
-
|
|
1521
|
-
/**
|
|
1522
|
-
* Configurações para simulação de API
|
|
1523
|
-
*/
|
|
1524
|
-
interface ApiSimulationConfig {
|
|
1525
|
-
/** Items por página */
|
|
1526
|
-
itemsPerPage?: number;
|
|
1527
|
-
/** Total de items no dataset */
|
|
1528
|
-
totalItems?: number;
|
|
1529
|
-
/** Delay em ms para simular latência */
|
|
1530
|
-
delay?: number;
|
|
1531
|
-
/** Taxa de erro (0-1) para simular falhas */
|
|
1532
|
-
errorRate?: number;
|
|
1533
|
-
/** Função geradora de items customizada */
|
|
1534
|
-
itemGenerator?: (index: number, searchQuery?: string) => any;
|
|
1535
|
-
/** Debug mode */
|
|
1536
|
-
debug?: boolean;
|
|
1537
|
-
}
|
|
1538
|
-
/**
|
|
1539
|
-
* Estado da simulação de API
|
|
1540
|
-
*/
|
|
1541
|
-
interface ApiSimulationState<T> {
|
|
1542
|
-
/** Items carregados */
|
|
1543
|
-
items: T[];
|
|
1544
|
-
/** Página atual */
|
|
1545
|
-
currentPage: number;
|
|
1546
|
-
/** Total de páginas */
|
|
1547
|
-
totalPages: number;
|
|
1548
|
-
/** Status do carregamento */
|
|
1549
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
1550
|
-
/** Erro atual (se houver) */
|
|
1551
|
-
error: string | null;
|
|
1552
|
-
/** Query de busca atual */
|
|
1553
|
-
searchQuery: string;
|
|
1554
|
-
/** Se há próxima página */
|
|
1555
|
-
hasNextPage: boolean;
|
|
1556
|
-
/** Se é a primeira página */
|
|
1557
|
-
isFirstPage: boolean;
|
|
1558
|
-
}
|
|
1559
|
-
interface ApiSimulationActions {
|
|
1560
|
-
/** Carregar próxima página */
|
|
1561
|
-
loadNextPage: () => Promise<void>;
|
|
1562
|
-
/** Realizar nova busca */
|
|
1563
|
-
search: (query: string) => Promise<void>;
|
|
1564
|
-
/** Reset completo */
|
|
1565
|
-
reset: () => void;
|
|
1566
|
-
/** Retry da última operação */
|
|
1567
|
-
retry: () => Promise<void>;
|
|
1568
|
-
}
|
|
1569
|
-
interface UseApiSimulationReturn<T> extends ApiSimulationState<T> {
|
|
1570
|
-
actions: ApiSimulationActions;
|
|
1571
|
-
}
|
|
1572
|
-
declare function useApiSimulation<T = any>(config?: ApiSimulationConfig): UseApiSimulationReturn<T>;
|
|
1573
|
-
|
|
1574
|
-
/**
|
|
1575
|
-
* Props para o hook useInfiniteScroll
|
|
1576
|
-
*/
|
|
1577
|
-
interface UseInfiniteScrollProps {
|
|
1578
|
-
/** Status atual do carregamento */
|
|
1579
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
1580
|
-
/** Página atual */
|
|
1581
|
-
page: number;
|
|
1582
|
-
/** Última página disponível */
|
|
1583
|
-
lastPage: number;
|
|
1584
|
-
/** Callback para carregar próxima página */
|
|
1585
|
-
onLoadMore: () => void;
|
|
1586
|
-
/** Threshold para IntersectionObserver (0-1) */
|
|
1587
|
-
threshold?: number;
|
|
1588
|
-
/** Margem raiz para IntersectionObserver */
|
|
1589
|
-
rootMargin?: string;
|
|
1590
|
-
/** Habilita/desabilita o hook */
|
|
1591
|
-
enabled?: boolean;
|
|
1592
|
-
/** Debug mode - logs no console */
|
|
1593
|
-
debug?: boolean;
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
* Retorno do hook useInfiniteScroll
|
|
1597
|
-
*/
|
|
1598
|
-
interface UseInfiniteScrollReturn {
|
|
1599
|
-
/** Ref para o elemento observador */
|
|
1600
|
-
observerRef: React.RefObject<HTMLDivElement | null>;
|
|
1601
|
-
/** Se o elemento está visível */
|
|
1602
|
-
isIntersecting: boolean;
|
|
1603
|
-
/** Se há próxima página */
|
|
1604
|
-
hasNextPage: boolean;
|
|
1605
|
-
/** Se todas as páginas foram carregadas */
|
|
1606
|
-
isCompleted: boolean;
|
|
1607
|
-
/** Função para reset manual */
|
|
1608
|
-
reset: () => void;
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
* Hook otimizado para scroll infinito usando IntersectionObserver
|
|
1612
|
-
*/
|
|
1613
|
-
declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, threshold, rootMargin, enabled, debug }: UseInfiniteScrollProps): UseInfiniteScrollReturn;
|
|
1614
|
-
|
|
1615
|
-
declare const normalizeText: (text: React.ReactNode) => string;
|
|
1616
|
-
|
|
1617
|
-
export { Avatar, Badge, Button, Calendar, Callout, Checkbox, MemoizedChips as Chips, Container, _default$1 as DatePicker, Dialog, Drawer, MemoizedDropdown as Dropdown, Filter, ListItem, Menu, Popover, memorizedQuantity as Quantity, Radio, Search, Select, Switch, Table, TableHeader, TablePagination, _default as TextField, Toast, ToastContainer, ToastProvider, Tooltip, VerificationCode, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
|
|
1618
|
-
export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, DropdownItem, DropdownProps, DropdownType, FilterItem, FilterProps, ListItemProps, MenuProps, PopoverProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableHeaderProps, TablePaginationProps, TableProps, TextFieldProps, ToastProps, TooltipProps, VerificationCodeProps };
|