@giro-ds/react 3.0.4 → 3.0.6
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/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.types.d.ts +21 -5
- package/dist/components/Badge/Badge.types.d.ts +25 -7
- package/dist/components/Button/Button.types.d.ts +41 -8
- package/dist/components/Calendar/Calendar.d.ts +2 -1
- package/dist/components/Calendar/Calendar.types.d.ts +56 -12
- package/dist/components/Callout/Callout.types.d.ts +28 -11
- package/dist/components/Checkbox/Checkbox.types.d.ts +28 -4
- package/dist/components/Chips/Chips.types.d.ts +28 -11
- package/dist/components/Container/Container.types.d.ts +11 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +36 -18
- package/dist/components/DatePicker/DateUtils.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/Dialog/Dialog.types.d.ts +35 -11
- package/dist/components/Drawer/Drawer.types.d.ts +58 -27
- package/dist/components/Dropdown/Dropdown.types.d.ts +47 -20
- package/dist/components/Filter/Filter.types.d.ts +47 -28
- package/dist/components/ListItem/ListItem.d.ts +0 -5
- package/dist/components/ListItem/ListItem.types.d.ts +35 -17
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/Menu.types.d.ts +60 -2
- package/dist/components/Quantity/Quantity.types.d.ts +31 -13
- package/dist/components/Radio/Radio.types.d.ts +39 -2
- package/dist/components/Search/Search.types.d.ts +34 -5
- package/dist/components/Select/Select.types.d.ts +117 -8
- package/dist/components/Switch/Switch.types.d.ts +26 -2
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.types.d.ts +2 -3
- package/dist/components/Table/TableHeader.d.ts +1 -1
- package/dist/components/Table/TablePagination.d.ts +1 -9
- package/dist/components/TextField/TextField.types.d.ts +49 -11
- package/dist/components/Toast/Toast.types.d.ts +37 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +32 -4
- package/dist/components/VerificationCode/VerificationCode.types.d.ts +29 -9
- package/dist/components/index.d.ts +1 -1
- package/dist/index.cjs +142 -170
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +860 -250
- package/dist/index.esm.js +135 -181
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/common.types.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,248 +2,496 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ReactNode, ReactElement, CSSProperties } from 'react';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type Size = 'sm' | 'lg';
|
|
6
|
+
type Variant = 'filled' | 'outlined' | 'text';
|
|
7
|
+
type TextVariant = 'neutral' | 'brand' | 'color' | 'success' | 'alert';
|
|
8
|
+
type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
type Align = 'start' | 'center' | 'end';
|
|
10
|
+
type Position = 'right' | 'left' | 'both';
|
|
11
|
+
type Locale = 'pt-br' | 'en-us';
|
|
12
|
+
interface BaseProps {
|
|
6
13
|
id?: string;
|
|
7
|
-
icon: React__default.ReactNode;
|
|
8
|
-
size?: 'small' | 'large';
|
|
9
14
|
className?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Props do componente Avatar
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Avatar icon={<UserIcon />} size="lg" />
|
|
23
|
+
* ```
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Avatar
|
|
27
|
+
* icon={<ProfileIcon />}
|
|
28
|
+
* size="sm"
|
|
29
|
+
* className="custom-avatar"
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
interface AvatarProps extends BaseProps {
|
|
34
|
+
/** Ícone ou conteúdo a ser exibido no avatar */
|
|
35
|
+
icon: React$1.ReactNode;
|
|
36
|
+
/** Tamanho do avatar */
|
|
37
|
+
size?: Size;
|
|
10
38
|
}
|
|
11
39
|
|
|
12
|
-
declare let Avatar: ({ id, icon, size, className }: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare let Avatar: ({ id, icon, size, className, ...rest }: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
13
41
|
|
|
42
|
+
/** Tipos de badge suportados */
|
|
14
43
|
type BadgeType = 'notification' | 'status';
|
|
44
|
+
/** Valores possíveis para exibição no badge */
|
|
15
45
|
type BadgeValue = number | string | null;
|
|
16
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Props do componente Badge
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <Badge type="notification" badgeValue={5}>
|
|
51
|
+
* <IconButton icon={<BellIcon />} />
|
|
52
|
+
* </Badge>
|
|
53
|
+
* ```
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <Badge
|
|
57
|
+
* type="status"
|
|
58
|
+
* badgeValue="novo"
|
|
59
|
+
* aria-label="Novo item disponível"
|
|
60
|
+
* >
|
|
61
|
+
* <Avatar icon={<UserIcon />} />
|
|
62
|
+
* </Badge>
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
interface BadgeProps extends BaseProps {
|
|
17
66
|
/** Tipo de badge (notificação ou status) */
|
|
18
67
|
type: BadgeType;
|
|
19
68
|
/** Conteúdo a ser envolvido pelo badge */
|
|
20
69
|
children?: ReactNode;
|
|
21
70
|
/** Valor a ser exibido no badge (número, texto ou null) */
|
|
22
71
|
badgeValue?: BadgeValue;
|
|
23
|
-
/**
|
|
24
|
-
className?: string;
|
|
25
|
-
/** ID único do componente */
|
|
26
|
-
id?: string;
|
|
27
|
-
/** Se o badge está desabilitado */
|
|
72
|
+
/** Valor máximo a ser exibido (ex: 99+ quando badgeValue > maxValue) */
|
|
28
73
|
maxValue?: number;
|
|
29
|
-
/**
|
|
74
|
+
/** Label acessível para leitores de tela */
|
|
30
75
|
'aria-label'?: string;
|
|
31
76
|
}
|
|
32
77
|
|
|
33
78
|
declare const Badge: React__default.FC<BadgeProps>;
|
|
34
79
|
|
|
35
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Props do componente Button
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* <Button variant="filled" size="lg" onClick={handleClick}>
|
|
85
|
+
* Clique aqui
|
|
86
|
+
* </Button>
|
|
87
|
+
* ```
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <Button
|
|
91
|
+
* variant="outlined"
|
|
92
|
+
* icon={<Icon />}
|
|
93
|
+
* iconPosition="left"
|
|
94
|
+
* loading={isLoading}
|
|
95
|
+
* >
|
|
96
|
+
* Salvar
|
|
97
|
+
* </Button>
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
interface ButtonProps extends BaseProps, React__default.HTMLAttributes<HTMLElement> {
|
|
101
|
+
/** Elemento customizado a ser renderizado (ex: 'a', Link do React Router) */
|
|
36
102
|
as?: React__default.ElementType;
|
|
103
|
+
/** Conteúdo do botão */
|
|
37
104
|
children?: React__default.ReactNode;
|
|
38
|
-
|
|
105
|
+
/** Variante visual do botão */
|
|
106
|
+
variant?: Variant;
|
|
107
|
+
/** Define se o botão exibe apenas ícone (sem texto) */
|
|
39
108
|
iconOnly?: boolean;
|
|
40
|
-
|
|
109
|
+
/** Posição do ícone em relação ao texto */
|
|
110
|
+
iconPosition?: Position;
|
|
111
|
+
/** URL de destino quando usado como link (renderiza <a>) */
|
|
41
112
|
href?: string;
|
|
113
|
+
/** Rota de destino para roteadores (ex: React Router) */
|
|
42
114
|
to?: string;
|
|
115
|
+
/** Define se o link abre em nova aba */
|
|
43
116
|
external?: boolean;
|
|
117
|
+
/** Atributo target do HTML para links */
|
|
44
118
|
target?: string;
|
|
119
|
+
/** Atributo rel do HTML para links */
|
|
45
120
|
rel?: string;
|
|
121
|
+
/** Tipo HTML do botão */
|
|
46
122
|
type?: 'button' | 'submit' | 'reset';
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
className?: string;
|
|
51
|
-
id?: string;
|
|
123
|
+
/** Tamanho do botão */
|
|
124
|
+
size?: Size;
|
|
125
|
+
/** Ícone a ser exibido no botão */
|
|
52
126
|
icon?: React__default.ReactNode;
|
|
127
|
+
/** Define se o botão ocupa 100% da largura do container */
|
|
53
128
|
fullWidth?: boolean;
|
|
129
|
+
/** Label acessível para leitores de tela */
|
|
54
130
|
ariaLabel?: string;
|
|
131
|
+
/** Estado de carregamento (exibe spinner) */
|
|
55
132
|
loading?: boolean;
|
|
56
133
|
}
|
|
57
134
|
|
|
58
135
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLElement>>;
|
|
59
136
|
|
|
60
|
-
|
|
137
|
+
/** Formatos de exibição de data disponíveis */
|
|
61
138
|
type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy';
|
|
139
|
+
/**
|
|
140
|
+
* Representa um dia no calendário
|
|
141
|
+
*/
|
|
62
142
|
interface DayItem {
|
|
143
|
+
/** Tipo do item (sempre 'day') */
|
|
63
144
|
type: 'day';
|
|
145
|
+
/** Chave única para renderização */
|
|
64
146
|
key: number;
|
|
147
|
+
/** Número do dia */
|
|
65
148
|
day: number;
|
|
149
|
+
/** Objeto Date completo */
|
|
66
150
|
date: Date;
|
|
151
|
+
/** Indica se é o dia atual */
|
|
67
152
|
isToday: boolean;
|
|
153
|
+
/** Indica se o dia está selecionado */
|
|
68
154
|
isSelected: boolean;
|
|
155
|
+
/** Label acessível do dia */
|
|
69
156
|
label: string;
|
|
70
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Representa um espaço vazio no grid do calendário
|
|
160
|
+
*/
|
|
71
161
|
interface EmptyItem {
|
|
162
|
+
/** Tipo do item (sempre 'empty') */
|
|
72
163
|
type: 'empty';
|
|
164
|
+
/** Chave única para renderização */
|
|
73
165
|
key: string;
|
|
74
166
|
}
|
|
167
|
+
/** Item do calendário (pode ser um dia ou espaço vazio) */
|
|
75
168
|
type CalendarItem = DayItem | EmptyItem;
|
|
169
|
+
/**
|
|
170
|
+
* Representa um ano na visualização de seleção de ano
|
|
171
|
+
*/
|
|
76
172
|
interface YearItem {
|
|
173
|
+
/** Número do ano */
|
|
77
174
|
year: number;
|
|
175
|
+
/** Indica se é o ano atual */
|
|
78
176
|
isCurrent: boolean;
|
|
177
|
+
/** Chave única para renderização */
|
|
79
178
|
key: number;
|
|
80
179
|
}
|
|
81
|
-
|
|
82
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Props do componente Calendar
|
|
182
|
+
* @example
|
|
183
|
+
* ```tsx
|
|
184
|
+
* <Calendar
|
|
185
|
+
* currentDate={new Date()}
|
|
186
|
+
* onDateChange={(date) => console.log(date)}
|
|
187
|
+
* locale="pt-br"
|
|
188
|
+
* />
|
|
189
|
+
* ```
|
|
190
|
+
* @example
|
|
191
|
+
* ```tsx
|
|
192
|
+
* <Calendar
|
|
193
|
+
* currentDate={new Date()}
|
|
194
|
+
* selectedDate={selectedDate}
|
|
195
|
+
* onDaySelect={handleDaySelect}
|
|
196
|
+
* minDate={new Date('2024-01-01')}
|
|
197
|
+
* maxDate={new Date('2024-12-31')}
|
|
198
|
+
* format="dd/mm/yyyy"
|
|
199
|
+
* />
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
interface CalendarProps extends BaseProps {
|
|
203
|
+
/** Data do dia atual */
|
|
83
204
|
currentDate: Date | null;
|
|
84
|
-
/**
|
|
85
|
-
className?: string;
|
|
86
|
-
/** Dia Selecionado pelo usuário */
|
|
205
|
+
/** Dia selecionado pelo usuário */
|
|
87
206
|
selectedDate?: Date | null;
|
|
88
|
-
/**
|
|
207
|
+
/** Callback executado quando a data escolhida é alterada: (date) => void */
|
|
89
208
|
onDateChange?: (date: Date) => void;
|
|
90
|
-
/**
|
|
209
|
+
/** Callback executado quando um dia é selecionado: (date) => void */
|
|
91
210
|
onDaySelect?: (date: Date) => void;
|
|
211
|
+
/** Callback executado ao limpar a seleção: () => void */
|
|
92
212
|
onClear?: () => void;
|
|
213
|
+
/** Data mínima selecionável */
|
|
93
214
|
minDate?: Date;
|
|
215
|
+
/** Data máxima selecionável */
|
|
94
216
|
maxDate?: Date;
|
|
95
|
-
/** Locale do calendário
|
|
217
|
+
/** Locale do calendário */
|
|
96
218
|
locale?: Locale;
|
|
97
|
-
/** Formato de exibição da data
|
|
219
|
+
/** Formato de exibição da data */
|
|
98
220
|
format?: DateFormat;
|
|
99
|
-
/** Identificador do elemento raiz do calendário */
|
|
100
|
-
id?: string;
|
|
101
221
|
}
|
|
102
222
|
|
|
103
223
|
declare const MemoizedCalendar: React__default.NamedExoticComponent<CalendarProps>;
|
|
104
224
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Props do componente Callout
|
|
227
|
+
* @example
|
|
228
|
+
* ```tsx
|
|
229
|
+
* <Callout
|
|
230
|
+
* type="success"
|
|
231
|
+
* title="Sucesso!"
|
|
232
|
+
* text="Operação realizada com sucesso"
|
|
233
|
+
* icon={<CheckIcon />}
|
|
234
|
+
* />
|
|
235
|
+
* ```
|
|
236
|
+
* @example
|
|
237
|
+
* ```tsx
|
|
238
|
+
* <Callout
|
|
239
|
+
* type="alert"
|
|
240
|
+
* title="Atenção"
|
|
241
|
+
* text="Verifique os campos obrigatórios"
|
|
242
|
+
* />
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
interface CalloutProps extends BaseProps {
|
|
246
|
+
/** Tipo visual do callout */
|
|
247
|
+
type?: TextVariant;
|
|
248
|
+
/** Título principal do callout (texto em destaque) */
|
|
109
249
|
title?: string | null;
|
|
110
|
-
/**
|
|
250
|
+
/** Texto descritivo do callout */
|
|
111
251
|
text?: string;
|
|
112
|
-
/**
|
|
113
|
-
icon?:
|
|
114
|
-
/** Define a classe CSS adicional */
|
|
115
|
-
className?: string;
|
|
116
|
-
/** Define o id do callout */
|
|
117
|
-
id?: string;
|
|
252
|
+
/** Ícone a ser exibido no callout */
|
|
253
|
+
icon?: React$1.ReactNode;
|
|
118
254
|
/** Props adicionais para o elemento div */
|
|
119
255
|
[key: string]: any;
|
|
120
256
|
}
|
|
121
257
|
|
|
122
258
|
declare const Callout: React__default.FC<CalloutProps>;
|
|
123
259
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
260
|
+
/**
|
|
261
|
+
* Props do componente Checkbox
|
|
262
|
+
* @example
|
|
263
|
+
* ```tsx
|
|
264
|
+
* <Checkbox
|
|
265
|
+
* label="Aceito os termos"
|
|
266
|
+
* checked={accepted}
|
|
267
|
+
* onCheckedChange={setAccepted}
|
|
268
|
+
* />
|
|
269
|
+
* ```
|
|
270
|
+
* @example
|
|
271
|
+
* ```tsx
|
|
272
|
+
* <Checkbox
|
|
273
|
+
* label="Selecionar todos"
|
|
274
|
+
* indeterminate={someSelected}
|
|
275
|
+
* onCheckedChange={handleSelectAll}
|
|
276
|
+
* disabled={isLoading}
|
|
277
|
+
* />
|
|
278
|
+
* ```
|
|
279
|
+
*/
|
|
280
|
+
interface CheckboxProps extends BaseProps {
|
|
281
|
+
/** Label ou conteúdo a ser exibido ao lado do checkbox */
|
|
282
|
+
label?: React__default.ReactNode;
|
|
283
|
+
/** Callback executado quando o estado muda: (checked) => void */
|
|
127
284
|
onCheckedChange?: (checked: boolean) => void;
|
|
285
|
+
/** Estado inicial (modo não controlado) */
|
|
128
286
|
defaultChecked?: boolean;
|
|
287
|
+
/** Estado atual (modo controlado) */
|
|
129
288
|
checked?: boolean;
|
|
130
|
-
|
|
131
|
-
className?: string;
|
|
289
|
+
/** Estado indeterminado (usado em selecionar todos com seleção parcial) */
|
|
132
290
|
indeterminate?: boolean;
|
|
133
291
|
}
|
|
134
292
|
|
|
135
293
|
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
136
294
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
295
|
+
/**
|
|
296
|
+
* Props do componente Chips
|
|
297
|
+
* @example
|
|
298
|
+
* ```tsx
|
|
299
|
+
* <Chips
|
|
300
|
+
* type="success"
|
|
301
|
+
* title="Ativo"
|
|
302
|
+
* leftIcon={<CheckIcon />}
|
|
303
|
+
* />
|
|
304
|
+
* ```
|
|
305
|
+
* @example
|
|
306
|
+
* ```tsx
|
|
307
|
+
* <Chips
|
|
308
|
+
* type="brand"
|
|
309
|
+
* title="Novo"
|
|
310
|
+
* rightIcon={<CloseIcon />}
|
|
311
|
+
* disabled={false}
|
|
312
|
+
* />
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
interface ChipsProps extends BaseProps {
|
|
316
|
+
/** Tipo visual do chip */
|
|
317
|
+
type?: TextVariant;
|
|
318
|
+
/** Texto a ser exibido dentro do chip */
|
|
141
319
|
title: string;
|
|
142
|
-
/** Ícone
|
|
143
|
-
leftIcon?:
|
|
144
|
-
/** Ícone
|
|
145
|
-
rightIcon?:
|
|
146
|
-
/** Estado alterável para desabilitar */
|
|
147
|
-
disabled?: boolean;
|
|
148
|
-
/** Classe CSS adicional */
|
|
149
|
-
className?: string;
|
|
320
|
+
/** Ícone posicionado à esquerda do texto */
|
|
321
|
+
leftIcon?: React$1.ReactNode;
|
|
322
|
+
/** Ícone posicionado à direita do texto */
|
|
323
|
+
rightIcon?: React$1.ReactNode;
|
|
150
324
|
/** Props adicionais para o elemento div */
|
|
151
325
|
[key: string]: any;
|
|
152
326
|
}
|
|
153
327
|
|
|
154
328
|
declare const MemoizedChips: React__default.NamedExoticComponent<ChipsProps>;
|
|
155
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Props do componente Container
|
|
332
|
+
* @example
|
|
333
|
+
* ```tsx
|
|
334
|
+
* <Container>
|
|
335
|
+
* <h1>Conteúdo da página</h1>
|
|
336
|
+
* <p>Texto dentro do container</p>
|
|
337
|
+
* </Container>
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
156
340
|
interface ContainerProps {
|
|
341
|
+
/** Conteúdo a ser renderizado dentro do container */
|
|
157
342
|
children: React__default.ReactNode;
|
|
158
343
|
}
|
|
159
344
|
|
|
160
345
|
declare function Container({ children }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
161
346
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
347
|
+
/**
|
|
348
|
+
* Props do componente DatePicker
|
|
349
|
+
* @example
|
|
350
|
+
* ```tsx
|
|
351
|
+
* <DatePicker
|
|
352
|
+
* label="Data de nascimento"
|
|
353
|
+
* value={birthDate}
|
|
354
|
+
* onChange={setBirthDate}
|
|
355
|
+
* locale="pt-br"
|
|
356
|
+
* />
|
|
357
|
+
* ```
|
|
358
|
+
* @example
|
|
359
|
+
* ```tsx
|
|
360
|
+
* <DatePicker
|
|
361
|
+
* label="Data de início"
|
|
362
|
+
* required
|
|
363
|
+
* helperText="Selecione a data de início do projeto"
|
|
364
|
+
* minDate={new Date()}
|
|
365
|
+
* calendarPosition="right"
|
|
366
|
+
* error={errorMessage}
|
|
367
|
+
* />
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
interface DatePickerProps extends BaseProps {
|
|
165
371
|
/** Locale para formatação da data */
|
|
166
|
-
locale?:
|
|
167
|
-
/** Posição do calendário */
|
|
168
|
-
calendarPosition?:
|
|
169
|
-
/** Texto de ajuda */
|
|
372
|
+
locale?: Locale;
|
|
373
|
+
/** Posição do calendário em relação ao campo */
|
|
374
|
+
calendarPosition?: Position;
|
|
375
|
+
/** Texto de ajuda exibido abaixo do campo */
|
|
170
376
|
helperText?: string;
|
|
171
|
-
/**
|
|
377
|
+
/** Define se o campo é obrigatório */
|
|
172
378
|
required?: boolean;
|
|
173
|
-
/** Label do campo */
|
|
379
|
+
/** Label do campo de data */
|
|
174
380
|
label?: string;
|
|
175
381
|
/** Valor controlado da data */
|
|
176
382
|
value?: Date | null;
|
|
177
383
|
/** Valor inicial para modo não controlado */
|
|
178
384
|
defaultValue?: Date | null;
|
|
179
|
-
/** Callback
|
|
385
|
+
/** Callback executado quando a data muda: (date) => void */
|
|
180
386
|
onChange?: (date: Date | null) => void;
|
|
181
|
-
/**
|
|
182
|
-
disabled?: boolean;
|
|
183
|
-
/** Mensagem de erro */
|
|
387
|
+
/** Mensagem de erro a ser exibida */
|
|
184
388
|
error?: string;
|
|
185
|
-
/** Data mínima
|
|
389
|
+
/** Data mínima selecionável */
|
|
186
390
|
minDate?: Date;
|
|
187
|
-
/** Data máxima
|
|
391
|
+
/** Data máxima selecionável */
|
|
188
392
|
maxDate?: Date;
|
|
189
|
-
/**
|
|
190
|
-
className?: string;
|
|
191
|
-
/** ID para testes */
|
|
393
|
+
/** ID para testes automatizados */
|
|
192
394
|
'data-testid'?: string;
|
|
193
395
|
}
|
|
194
396
|
|
|
195
397
|
declare const _default$1: React__default.NamedExoticComponent<DatePickerProps>;
|
|
196
398
|
|
|
197
|
-
|
|
399
|
+
/**
|
|
400
|
+
* Props do componente Dialog
|
|
401
|
+
* @example
|
|
402
|
+
* ```tsx
|
|
403
|
+
* <Dialog
|
|
404
|
+
* show={isOpen}
|
|
405
|
+
* title="Confirmar exclusão"
|
|
406
|
+
* text="Tem certeza que deseja excluir este item?"
|
|
407
|
+
* textConfirm="Excluir"
|
|
408
|
+
* textCancel="Cancelar"
|
|
409
|
+
* fnConfirm={handleDelete}
|
|
410
|
+
* fnCancel={handleCancel}
|
|
411
|
+
* onClose={handleClose}
|
|
412
|
+
* />
|
|
413
|
+
* ```
|
|
414
|
+
* @example
|
|
415
|
+
* ```tsx
|
|
416
|
+
* <Dialog
|
|
417
|
+
* show={showDialog}
|
|
418
|
+
* title="Informação"
|
|
419
|
+
* onClose={() => setShowDialog(false)}
|
|
420
|
+
* >
|
|
421
|
+
* <p>Conteúdo customizado do dialog</p>
|
|
422
|
+
* </Dialog>
|
|
423
|
+
* ```
|
|
424
|
+
*/
|
|
425
|
+
interface DialogProps extends BaseProps {
|
|
426
|
+
/** Conteúdo customizado do dialog */
|
|
198
427
|
children?: ReactNode;
|
|
199
|
-
/**
|
|
428
|
+
/** Define se o dialog está visível */
|
|
200
429
|
show: boolean;
|
|
201
|
-
/** Título exibido no cabeçalho do
|
|
430
|
+
/** Título exibido no cabeçalho do dialog */
|
|
202
431
|
title: string;
|
|
203
|
-
/** Texto do corpo do
|
|
432
|
+
/** Texto ou conteúdo do corpo do dialog */
|
|
204
433
|
text?: ReactNode;
|
|
205
434
|
/** Texto do botão de confirmação */
|
|
206
435
|
textConfirm?: string;
|
|
207
436
|
/** Texto do botão de cancelamento */
|
|
208
437
|
textCancel?: string;
|
|
209
|
-
/**
|
|
438
|
+
/** Callback executado ao confirmar: () => void */
|
|
210
439
|
fnConfirm?: () => void;
|
|
211
|
-
/**
|
|
440
|
+
/** Callback executado ao cancelar: () => void */
|
|
212
441
|
fnCancel?: () => void;
|
|
213
|
-
/**
|
|
442
|
+
/** Callback executado ao fechar o dialog: () => void */
|
|
214
443
|
onClose?: () => void;
|
|
215
|
-
/** ID opcional para o Dialog */
|
|
216
|
-
id?: string;
|
|
217
|
-
/** Classe CSS opcional */
|
|
218
|
-
className?: string;
|
|
219
444
|
}
|
|
220
445
|
|
|
221
446
|
declare const MemoizedDialog: React__default.NamedExoticComponent<DialogProps>;
|
|
222
447
|
|
|
223
|
-
|
|
224
|
-
|
|
448
|
+
/**
|
|
449
|
+
* Props do componente Drawer
|
|
450
|
+
* @example
|
|
451
|
+
* ```tsx
|
|
452
|
+
* <Drawer
|
|
453
|
+
* isOpen={isDrawerOpen}
|
|
454
|
+
* onClose={handleClose}
|
|
455
|
+
* title="Menu"
|
|
456
|
+
* >
|
|
457
|
+
* <nav>
|
|
458
|
+
* <a href="/home">Home</a>
|
|
459
|
+
* <a href="/about">Sobre</a>
|
|
460
|
+
* </nav>
|
|
461
|
+
* </Drawer>
|
|
462
|
+
* ```
|
|
463
|
+
* @example
|
|
464
|
+
* ```tsx
|
|
465
|
+
* <Drawer
|
|
466
|
+
* isOpen={showDrawer}
|
|
467
|
+
* onClose={() => setShowDrawer(false)}
|
|
468
|
+
* title="Configurações"
|
|
469
|
+
* customWidth="400px"
|
|
470
|
+
* closeOnOverlayClick={true}
|
|
471
|
+
* closeOnEscape={true}
|
|
472
|
+
* >
|
|
473
|
+
* <Settings />
|
|
474
|
+
* </Drawer>
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
interface DrawerProps extends BaseProps {
|
|
478
|
+
/** Conteúdo a ser exibido dentro do drawer */
|
|
225
479
|
children?: ReactNode;
|
|
226
|
-
/** Largura do
|
|
480
|
+
/** Largura customizada do drawer (ex: '400px', '50%') */
|
|
227
481
|
customWidth?: string;
|
|
228
|
-
/** Callback
|
|
482
|
+
/** Callback executado ao fechar o drawer: () => void */
|
|
229
483
|
onClose: () => void;
|
|
230
|
-
/** Título do
|
|
484
|
+
/** Título exibido no cabeçalho do drawer */
|
|
231
485
|
title?: string;
|
|
232
|
-
/**
|
|
486
|
+
/** Define se o drawer está aberto */
|
|
233
487
|
isOpen: boolean;
|
|
234
|
-
/** Callback
|
|
488
|
+
/** Callback executado ao abrir o drawer: () => void */
|
|
235
489
|
onOpen?: () => void;
|
|
236
|
-
/**
|
|
237
|
-
className?: string;
|
|
238
|
-
/** ID único do componente */
|
|
239
|
-
id?: string;
|
|
240
|
-
/** Se o drawer está desabilitado */
|
|
241
|
-
disabled?: boolean;
|
|
242
|
-
/** Callback chamado quando clica no overlay */
|
|
490
|
+
/** Callback executado ao clicar no overlay: () => void */
|
|
243
491
|
onOverlayClick?: () => void;
|
|
244
|
-
/**
|
|
492
|
+
/** Define se o drawer fecha ao clicar no overlay */
|
|
245
493
|
closeOnOverlayClick?: boolean;
|
|
246
|
-
/**
|
|
494
|
+
/** Define se o drawer fecha ao pressionar ESC */
|
|
247
495
|
closeOnEscape?: boolean;
|
|
248
496
|
}
|
|
249
497
|
|
|
@@ -254,52 +502,78 @@ interface DrawerProps {
|
|
|
254
502
|
*/
|
|
255
503
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
256
504
|
|
|
505
|
+
/**
|
|
506
|
+
* Representa um item individual do dropdown
|
|
507
|
+
*/
|
|
257
508
|
interface DropdownItem {
|
|
258
|
-
/** ID único do item (
|
|
509
|
+
/** ID único do item (será gerado automaticamente se não fornecido) */
|
|
259
510
|
id?: string;
|
|
260
511
|
/** Texto principal do item */
|
|
261
512
|
text: string;
|
|
262
513
|
/** Texto secundário/descrição do item */
|
|
263
514
|
subText?: string;
|
|
264
|
-
/** Ícone do item
|
|
515
|
+
/** Ícone do item */
|
|
265
516
|
icon?: React__default.ReactNode;
|
|
266
517
|
/** Define se o item está desabilitado */
|
|
267
518
|
disabled?: boolean;
|
|
268
519
|
}
|
|
520
|
+
/** Tipos de dropdown disponíveis */
|
|
269
521
|
type DropdownType = 'text' | 'checkbox' | 'icon';
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
522
|
+
/**
|
|
523
|
+
* Props do componente Dropdown
|
|
524
|
+
* @example
|
|
525
|
+
* ```tsx
|
|
526
|
+
* <Dropdown
|
|
527
|
+
* items={[
|
|
528
|
+
* { text: 'Opção 1', icon: <Icon1 /> },
|
|
529
|
+
* { text: 'Opção 2', icon: <Icon2 /> }
|
|
530
|
+
* ]}
|
|
531
|
+
* type="text"
|
|
532
|
+
* placeholder="Selecione uma opção"
|
|
533
|
+
* />
|
|
534
|
+
* ```
|
|
535
|
+
* @example
|
|
536
|
+
* ```tsx
|
|
537
|
+
* <Dropdown
|
|
538
|
+
* items={items}
|
|
539
|
+
* type="checkbox"
|
|
540
|
+
* applySearch={true}
|
|
541
|
+
* onSelectionChange={(ids) => console.log(ids)}
|
|
542
|
+
* defaultSelectedIds={['1', '2']}
|
|
543
|
+
* maxHeight="300px"
|
|
544
|
+
* />
|
|
545
|
+
* ```
|
|
546
|
+
*/
|
|
547
|
+
interface DropdownProps extends BaseProps {
|
|
548
|
+
/** Força posição do dropdown: 'top' abre para cima, 'bottom' para baixo (detecção automática se não especificado) */
|
|
274
549
|
position?: 'top' | 'bottom';
|
|
275
|
-
/** Array de itens para o dropdown
|
|
550
|
+
/** Array de itens para o dropdown */
|
|
276
551
|
items: DropdownItem[];
|
|
277
|
-
/** ID único do componente */
|
|
278
|
-
id?: string;
|
|
279
552
|
/** Tipo do dropdown */
|
|
280
553
|
type?: DropdownType;
|
|
281
554
|
/** Habilita campo de busca */
|
|
282
555
|
applySearch?: boolean;
|
|
283
556
|
/** Placeholder do campo de busca */
|
|
284
557
|
placeholder?: string;
|
|
285
|
-
/** Callback
|
|
558
|
+
/** Callback executado quando a seleção muda: (selectedIds) => void */
|
|
286
559
|
onSelectionChange?: (selectedIds: string[]) => void;
|
|
287
|
-
/** Controla exibição do subtexto */
|
|
560
|
+
/** Controla exibição do subtexto dos itens */
|
|
288
561
|
showSubText?: boolean;
|
|
289
562
|
/** IDs dos itens selecionados por padrão */
|
|
290
563
|
defaultSelectedIds?: string[];
|
|
291
|
-
/** Estado inicial dos itens selecionados (objeto
|
|
564
|
+
/** Estado inicial dos itens selecionados (objeto chave-valor) */
|
|
292
565
|
initialItemsSelected?: Record<string, boolean>;
|
|
566
|
+
/** Largura do dropdown */
|
|
293
567
|
width?: string | number;
|
|
568
|
+
/** Largura máxima do dropdown */
|
|
294
569
|
maxWidth?: string | number;
|
|
570
|
+
/** Largura mínima do dropdown */
|
|
295
571
|
minWidth?: string | number;
|
|
296
572
|
/** Altura máxima do dropdown */
|
|
297
573
|
maxHeight?: string | number;
|
|
298
|
-
/** Define se o componente
|
|
574
|
+
/** Define se o componente está sendo usado para filtro */
|
|
299
575
|
filter?: boolean;
|
|
300
|
-
/**
|
|
301
|
-
* Configurações para paginação infinita
|
|
302
|
-
*/
|
|
576
|
+
/** Configurações para paginação infinita */
|
|
303
577
|
infiniteScroll?: {
|
|
304
578
|
/** Status atual do carregamento */
|
|
305
579
|
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
@@ -307,232 +581,452 @@ interface DropdownProps {
|
|
|
307
581
|
page: number;
|
|
308
582
|
/** Última página disponível */
|
|
309
583
|
lastPage: number;
|
|
310
|
-
/** Callback para carregar próxima página */
|
|
584
|
+
/** Callback executado para carregar próxima página: () => void */
|
|
311
585
|
onLoadMore: () => void;
|
|
312
|
-
/** Threshold para trigger (0-1) */
|
|
586
|
+
/** Threshold para trigger do scroll infinito (0-1) */
|
|
313
587
|
threshold?: number;
|
|
314
|
-
/** Margem para trigger */
|
|
588
|
+
/** Margem para trigger do scroll infinito */
|
|
315
589
|
rootMargin?: string;
|
|
316
|
-
/**
|
|
590
|
+
/** Modo de debug */
|
|
317
591
|
debug?: boolean;
|
|
318
592
|
};
|
|
319
593
|
}
|
|
320
594
|
|
|
321
595
|
declare const MemoizedDropdown: React__default.NamedExoticComponent<DropdownProps>;
|
|
322
596
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
597
|
+
/**
|
|
598
|
+
* Props do componente Filter
|
|
599
|
+
* @example
|
|
600
|
+
* ```tsx
|
|
601
|
+
* <Filter
|
|
602
|
+
* items={filterItems}
|
|
603
|
+
* type="checkbox"
|
|
604
|
+
* placeholder="Filtrar por categoria"
|
|
605
|
+
* onApplyFilter={(ids) => handleFilter(ids)}
|
|
606
|
+
* buttonText="Filtros"
|
|
607
|
+
* />
|
|
608
|
+
* ```
|
|
609
|
+
* @example
|
|
610
|
+
* ```tsx
|
|
611
|
+
* <Filter
|
|
612
|
+
* type="calendar"
|
|
613
|
+
* selectedDate={selectedDate}
|
|
614
|
+
* onDateSelect={handleDateSelect}
|
|
615
|
+
* minDate={new Date('2024-01-01')}
|
|
616
|
+
* locale="pt-br"
|
|
617
|
+
* icon={<CalendarIcon />}
|
|
618
|
+
* />
|
|
619
|
+
* ```
|
|
620
|
+
*/
|
|
621
|
+
interface FilterProps extends BaseProps {
|
|
622
|
+
/** Array de itens para filtros do tipo dropdown */
|
|
326
623
|
items?: DropdownItem[];
|
|
327
|
-
/** Tipo do dropdown */
|
|
624
|
+
/** Tipo do filtro (dropdown ou calendário) */
|
|
328
625
|
type?: DropdownType | 'calendar';
|
|
329
|
-
/** IDs selecionados */
|
|
626
|
+
/** IDs dos itens selecionados */
|
|
330
627
|
selectedIds?: string[];
|
|
331
|
-
/** Callback
|
|
628
|
+
/** Callback executado ao aplicar filtro: (selectedIds) => void */
|
|
332
629
|
onApplyFilter?: (selectedIds: string[]) => void;
|
|
333
|
-
/** Placeholder do
|
|
630
|
+
/** Placeholder do campo de busca */
|
|
334
631
|
placeholder?: string;
|
|
335
|
-
/** Habilita busca no dropdown */
|
|
632
|
+
/** Habilita campo de busca no dropdown */
|
|
336
633
|
enableSearch?: boolean;
|
|
337
|
-
/** Texto do botão
|
|
634
|
+
/** Texto ou conteúdo do botão de filtro */
|
|
338
635
|
buttonText?: string | ReactNode;
|
|
339
|
-
/** Ícone do botão */
|
|
636
|
+
/** Ícone do botão de filtro */
|
|
340
637
|
icon?: ReactElement;
|
|
341
|
-
/** Variante do botão */
|
|
342
|
-
variant?:
|
|
343
|
-
/** Callback
|
|
638
|
+
/** Variante visual do botão */
|
|
639
|
+
variant?: Variant;
|
|
640
|
+
/** Callback executado ao abrir o filtro: () => void */
|
|
344
641
|
onOpen?: () => void;
|
|
345
|
-
/** Callback
|
|
642
|
+
/** Callback executado ao fechar o filtro: () => void */
|
|
346
643
|
onClose?: () => void;
|
|
347
|
-
/** Posição do dropdown */
|
|
348
|
-
position?:
|
|
349
|
-
/**
|
|
350
|
-
disabled?: boolean;
|
|
351
|
-
/** Classes CSS adicionais */
|
|
352
|
-
className?: string;
|
|
353
|
-
/** Data selecionada (quando type='calendar') */
|
|
644
|
+
/** Posição do dropdown em relação ao botão */
|
|
645
|
+
position?: Position;
|
|
646
|
+
/** Data selecionada (para tipo calendar) */
|
|
354
647
|
selectedDate?: Date | null;
|
|
355
|
-
/** Callback
|
|
648
|
+
/** Callback executado ao selecionar data: (date) => void */
|
|
356
649
|
onDateSelect?: (date: Date) => void;
|
|
357
|
-
/** Callback
|
|
650
|
+
/** Callback executado ao limpar data: () => void */
|
|
358
651
|
onClearDate?: () => void;
|
|
359
|
-
/** Data mínima
|
|
652
|
+
/** Data mínima selecionável (para tipo calendar) */
|
|
360
653
|
minDate?: Date;
|
|
361
|
-
/** Data máxima
|
|
654
|
+
/** Data máxima selecionável (para tipo calendar) */
|
|
362
655
|
maxDate?: Date;
|
|
363
|
-
/** Locale do
|
|
364
|
-
locale?:
|
|
656
|
+
/** Locale do calendário */
|
|
657
|
+
locale?: Locale;
|
|
365
658
|
}
|
|
366
659
|
|
|
367
660
|
declare const Filter: React__default.FC<FilterProps>;
|
|
368
661
|
|
|
662
|
+
/** Variantes disponíveis para o ListItem */
|
|
369
663
|
type ListItemVariant = 'text' | 'checkbox' | 'radio' | 'icon';
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
664
|
+
/**
|
|
665
|
+
* Props do componente ListItem
|
|
666
|
+
* @example
|
|
667
|
+
* ```tsx
|
|
668
|
+
* <ListItem
|
|
669
|
+
* variant="text"
|
|
670
|
+
* text="Item da lista"
|
|
671
|
+
* subText="Descrição do item"
|
|
672
|
+
* onClick={handleClick}
|
|
673
|
+
* />
|
|
674
|
+
* ```
|
|
675
|
+
* @example
|
|
676
|
+
* ```tsx
|
|
677
|
+
* <ListItem
|
|
678
|
+
* variant="checkbox"
|
|
679
|
+
* text="Aceitar termos"
|
|
680
|
+
* checked={isChecked}
|
|
681
|
+
* onChange={setIsChecked}
|
|
682
|
+
* disabled={false}
|
|
683
|
+
* />
|
|
684
|
+
* ```
|
|
685
|
+
*/
|
|
686
|
+
interface ListItemProps extends BaseProps {
|
|
375
687
|
/** Variante do item da lista */
|
|
376
688
|
variant?: ListItemVariant;
|
|
377
689
|
/** Texto principal do item */
|
|
378
690
|
text?: string;
|
|
379
|
-
/** Nome do input (para checkbox/radio) */
|
|
691
|
+
/** Nome do input (para variantes checkbox/radio) */
|
|
380
692
|
name?: string;
|
|
381
|
-
/** Texto secundário/descrição */
|
|
693
|
+
/** Texto secundário/descrição do item */
|
|
382
694
|
subText?: string;
|
|
383
|
-
/**
|
|
384
|
-
disabled?: boolean;
|
|
385
|
-
/** Estado de checked (para checkbox/radio) */
|
|
695
|
+
/** Estado de checked (para variantes checkbox/radio) */
|
|
386
696
|
checked?: boolean;
|
|
387
|
-
/** Estado de selecionado (para text/icon) */
|
|
697
|
+
/** Estado de selecionado (para variantes text/icon) */
|
|
388
698
|
selected?: boolean;
|
|
389
|
-
/** Callback
|
|
390
|
-
onClick?: (event:
|
|
391
|
-
/** Callback
|
|
699
|
+
/** Callback executado ao clicar no item: (event) => void */
|
|
700
|
+
onClick?: (event: React$1.MouseEvent<HTMLElement> | React$1.KeyboardEvent<HTMLElement>) => void;
|
|
701
|
+
/** Callback executado quando o estado muda: (checked) => void */
|
|
392
702
|
onChange?: (checked: boolean) => void;
|
|
393
|
-
/** Ícone do item (para
|
|
394
|
-
icon?:
|
|
395
|
-
/** Valor do input (para checkbox/radio) */
|
|
703
|
+
/** Ícone do item (para variante icon) */
|
|
704
|
+
icon?: React$1.ReactNode;
|
|
705
|
+
/** Valor do input (para variantes checkbox/radio) */
|
|
396
706
|
value?: string;
|
|
397
|
-
/**
|
|
707
|
+
/** Define se deve mostrar o subtexto */
|
|
398
708
|
showSubText?: boolean;
|
|
399
709
|
/** Estado de hover */
|
|
400
710
|
hovered?: boolean;
|
|
401
711
|
}
|
|
402
712
|
|
|
403
|
-
/**
|
|
404
|
-
* Componente ListItem do Zanthus Design System
|
|
405
|
-
* Implementa item de lista unificado com variações text, checkbox, radio e icon
|
|
406
|
-
* Segue padrões WCAG 2.1 AA para acessibilidade
|
|
407
|
-
*/
|
|
408
713
|
declare const ListItem: React__default.FC<ListItemProps>;
|
|
409
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Representa um item do menu (suporta subitens aninhados)
|
|
717
|
+
*/
|
|
410
718
|
interface MenuItemProps {
|
|
719
|
+
/** ID único do item */
|
|
411
720
|
id?: string;
|
|
721
|
+
/** Texto principal do item */
|
|
412
722
|
text?: string;
|
|
723
|
+
/** Texto secundário/descrição do item */
|
|
413
724
|
subText?: string;
|
|
725
|
+
/** Estado desabilitado do item */
|
|
414
726
|
disabled?: boolean;
|
|
415
|
-
|
|
727
|
+
/** Ícone do item */
|
|
728
|
+
icon?: React$1.ReactNode;
|
|
729
|
+
/** Subitens do menu (para menus aninhados) */
|
|
416
730
|
children?: MenuItemProps[];
|
|
731
|
+
/** Valor do item */
|
|
417
732
|
value?: string;
|
|
418
733
|
}
|
|
419
|
-
|
|
734
|
+
/**
|
|
735
|
+
* Props do componente Menu
|
|
736
|
+
* @example
|
|
737
|
+
* ```tsx
|
|
738
|
+
* <Menu
|
|
739
|
+
* items={[
|
|
740
|
+
* { id: '1', text: 'Perfil', icon: <UserIcon /> },
|
|
741
|
+
* { id: '2', text: 'Configurações', icon: <SettingsIcon /> }
|
|
742
|
+
* ]}
|
|
743
|
+
* onItemSelect={(item) => handleSelect(item)}
|
|
744
|
+
* >
|
|
745
|
+
* <Button>Menu</Button>
|
|
746
|
+
* </Menu>
|
|
747
|
+
* ```
|
|
748
|
+
* @example
|
|
749
|
+
* ```tsx
|
|
750
|
+
* <Menu
|
|
751
|
+
* items={menuItems}
|
|
752
|
+
* type="icon"
|
|
753
|
+
* search={true}
|
|
754
|
+
* enableInfiniteScroll={true}
|
|
755
|
+
* onScrollEnd={loadMore}
|
|
756
|
+
* maxHeight="400px"
|
|
757
|
+
* align="end"
|
|
758
|
+
* />
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
interface MenuProps extends BaseProps {
|
|
762
|
+
/** Array de itens do menu */
|
|
420
763
|
items: MenuItemProps[];
|
|
764
|
+
/** Elemento trigger customizado para abrir o menu */
|
|
421
765
|
children?: ReactElement;
|
|
766
|
+
/** Tipo de visualização do menu */
|
|
422
767
|
type?: 'text' | 'icon';
|
|
423
|
-
|
|
768
|
+
/** Callback executado quando um item é selecionado: (item) => void */
|
|
424
769
|
onItemSelect?: (items: MenuItemProps) => void;
|
|
770
|
+
/** Array de itens selecionados */
|
|
425
771
|
selectedItems?: MenuItemProps[];
|
|
772
|
+
/** Habilita campo de busca */
|
|
426
773
|
search?: boolean;
|
|
774
|
+
/** Alinhamento do menu */
|
|
427
775
|
align?: 'start' | 'end' | 'center';
|
|
776
|
+
/** Altura máxima do menu */
|
|
428
777
|
maxHeight?: number | string;
|
|
778
|
+
/** Habilita scroll infinito */
|
|
429
779
|
enableInfiniteScroll?: boolean;
|
|
780
|
+
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
430
781
|
onScrollEnd?: () => void;
|
|
782
|
+
/** Estado de carregamento de mais itens */
|
|
431
783
|
isLoadingMore?: boolean;
|
|
784
|
+
/** Habilita busca via API */
|
|
432
785
|
enableApiSearch?: boolean;
|
|
786
|
+
/** Callback executado na busca via API: (searchTerm) => void */
|
|
433
787
|
onApiSearch?: (searchTerm: string) => void;
|
|
788
|
+
/** Callback executado quando o menu abre/fecha: (open) => void */
|
|
434
789
|
onOpenChange?: (open: boolean) => void;
|
|
435
790
|
}
|
|
436
791
|
|
|
437
792
|
declare const Menu: React__default.FC<MenuProps>;
|
|
438
793
|
|
|
439
|
-
|
|
440
|
-
|
|
794
|
+
/**
|
|
795
|
+
* Props do componente Quantity
|
|
796
|
+
* @example
|
|
797
|
+
* ```tsx
|
|
798
|
+
* <Quantity
|
|
799
|
+
* value={quantity}
|
|
800
|
+
* onChange={setQuantity}
|
|
801
|
+
* size="lg"
|
|
802
|
+
* />
|
|
803
|
+
* ```
|
|
804
|
+
* @example
|
|
805
|
+
* ```tsx
|
|
806
|
+
* <Quantity
|
|
807
|
+
* defaultValue={1}
|
|
808
|
+
* decimal={true}
|
|
809
|
+
* decimalPlaces={2}
|
|
810
|
+
* step={0.5}
|
|
811
|
+
* disabled={false}
|
|
812
|
+
* />
|
|
813
|
+
* ```
|
|
814
|
+
*/
|
|
815
|
+
interface QuantityProps extends BaseProps {
|
|
816
|
+
/** Valor inicial (modo não controlado) */
|
|
441
817
|
defaultValue?: number;
|
|
442
|
-
/** Valor controlado
|
|
818
|
+
/** Valor atual (modo controlado) */
|
|
443
819
|
value?: number;
|
|
444
|
-
/** Callback
|
|
820
|
+
/** Callback executado quando o valor muda: (value) => void */
|
|
445
821
|
onChange?: (value: number) => void;
|
|
446
|
-
/**
|
|
447
|
-
disabled?: boolean;
|
|
448
|
-
/** Define se o valor do input será decimal ou inteiro */
|
|
822
|
+
/** Habilita entrada de valores decimais */
|
|
449
823
|
decimal?: boolean;
|
|
450
|
-
/**
|
|
451
|
-
size?:
|
|
452
|
-
/**
|
|
824
|
+
/** Tamanho do componente */
|
|
825
|
+
size?: Size;
|
|
826
|
+
/** Número de casas decimais permitidas */
|
|
453
827
|
decimalPlaces?: number;
|
|
828
|
+
/** Incremento/decremento ao clicar nos botões */
|
|
454
829
|
step?: number;
|
|
455
|
-
id?: string;
|
|
456
|
-
/** ClassName adicional para customização */
|
|
457
|
-
className?: string;
|
|
458
830
|
}
|
|
459
831
|
|
|
460
832
|
declare const memorizedQuantity: React__default.NamedExoticComponent<QuantityProps>;
|
|
461
833
|
|
|
834
|
+
/**
|
|
835
|
+
* Props de um item individual de rádio
|
|
836
|
+
*/
|
|
462
837
|
interface RadioProps {
|
|
838
|
+
/** ID único do elemento */
|
|
463
839
|
id?: string | number;
|
|
840
|
+
/** Valor do radio button */
|
|
464
841
|
value: string;
|
|
842
|
+
/** Label exibida ao lado do radio button */
|
|
465
843
|
label: string;
|
|
844
|
+
/** Estado desabilitado do item */
|
|
466
845
|
disabled?: boolean;
|
|
467
846
|
}
|
|
468
|
-
|
|
469
|
-
|
|
847
|
+
/**
|
|
848
|
+
* Props do componente RadioGroup
|
|
849
|
+
* @example
|
|
850
|
+
* ```tsx
|
|
851
|
+
* <RadioGroup
|
|
852
|
+
* items={[
|
|
853
|
+
* { value: 'option1', label: 'Opção 1' },
|
|
854
|
+
* { value: 'option2', label: 'Opção 2' }
|
|
855
|
+
* ]}
|
|
856
|
+
* onValueChange={(value) => setSelected(value)}
|
|
857
|
+
* defaultValue="option1"
|
|
858
|
+
* />
|
|
859
|
+
* ```
|
|
860
|
+
* @example
|
|
861
|
+
* ```tsx
|
|
862
|
+
* <RadioGroup
|
|
863
|
+
* items={options}
|
|
864
|
+
* onValueChange={handleChange}
|
|
865
|
+
* name="preference"
|
|
866
|
+
* orientation="horizontal"
|
|
867
|
+
* ariaLabel="Selecione sua preferência"
|
|
868
|
+
* />
|
|
869
|
+
* ```
|
|
870
|
+
*/
|
|
871
|
+
interface RadioGroupProps extends BaseProps {
|
|
872
|
+
/** Array de itens de rádio */
|
|
470
873
|
items: RadioProps[];
|
|
874
|
+
/** Callback executado quando o valor muda: (value) => void */
|
|
471
875
|
onValueChange?: (value: string) => void;
|
|
876
|
+
/** Valor inicial selecionado */
|
|
472
877
|
defaultValue?: string;
|
|
878
|
+
/** Nome do grupo de radio buttons */
|
|
473
879
|
name?: string;
|
|
880
|
+
/** Label acessível para leitores de tela */
|
|
474
881
|
ariaLabel?: string;
|
|
882
|
+
/** Orientação do layout dos radio buttons */
|
|
475
883
|
orientation?: "horizontal" | "vertical";
|
|
476
884
|
}
|
|
477
885
|
|
|
478
886
|
declare const Radio: React__default.FC<RadioGroupProps>;
|
|
479
887
|
|
|
480
|
-
|
|
888
|
+
/**
|
|
889
|
+
* Props do componente Search
|
|
890
|
+
* @example
|
|
891
|
+
* ```tsx
|
|
892
|
+
* <Search
|
|
893
|
+
* placeholder="Buscar..."
|
|
894
|
+
* value={searchTerm}
|
|
895
|
+
* onChange={(e) => setSearchTerm(e.target.value)}
|
|
896
|
+
* onClear={() => setSearchTerm('')}
|
|
897
|
+
* />
|
|
898
|
+
* ```
|
|
899
|
+
* @example
|
|
900
|
+
* ```tsx
|
|
901
|
+
* <Search
|
|
902
|
+
* placeholder="Pesquisar produtos"
|
|
903
|
+
* disabled={isLoading}
|
|
904
|
+
* onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
|
|
905
|
+
* onFocus={handleFocus}
|
|
906
|
+
* />
|
|
907
|
+
* ```
|
|
908
|
+
*/
|
|
909
|
+
interface SearchProps extends BaseProps {
|
|
910
|
+
/** Placeholder do campo de busca */
|
|
481
911
|
placeholder?: string;
|
|
482
|
-
|
|
912
|
+
/** Valor controlado do campo */
|
|
483
913
|
value?: string;
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
914
|
+
/** Callback executado quando o valor muda: (e) => void */
|
|
915
|
+
onChange?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
916
|
+
/** Callback executado ao pressionar tecla: (e) => void */
|
|
917
|
+
onKeyDown?: (e: React$1.KeyboardEvent<HTMLInputElement>) => void;
|
|
918
|
+
/** Callback executado ao focar no campo: (e) => void */
|
|
919
|
+
onFocus?: (e: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
920
|
+
/** Callback executado ao desfocar do campo: (e) => void */
|
|
921
|
+
onBlur?: (e: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
922
|
+
/** Callback executado ao limpar o campo: () => void */
|
|
488
923
|
onClear?: () => void;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
924
|
+
/** Callback executado ao clicar no componente: (e) => void */
|
|
925
|
+
onClick?: (e: React$1.MouseEvent<HTMLDivElement>) => void;
|
|
926
|
+
/** Callback executado ao pressionar mouse no componente: (e) => void */
|
|
927
|
+
onMouseDown?: (e: React$1.MouseEvent<HTMLDivElement>) => void;
|
|
928
|
+
/** ID para testes automatizados */
|
|
493
929
|
'data-testid'?: string;
|
|
494
930
|
}
|
|
495
931
|
|
|
496
932
|
declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
497
933
|
|
|
498
|
-
|
|
499
|
-
|
|
934
|
+
/**
|
|
935
|
+
* Representa um item do select
|
|
936
|
+
*/
|
|
937
|
+
interface SelectItemProps extends BaseProps {
|
|
938
|
+
/** Texto principal do item */
|
|
500
939
|
text: ReactNode;
|
|
940
|
+
/** Subtítulo ou descrição do item */
|
|
501
941
|
subTitle?: ReactNode;
|
|
942
|
+
/** Ícone do item */
|
|
502
943
|
icon?: ReactNode;
|
|
503
|
-
|
|
944
|
+
/** Valor do item */
|
|
504
945
|
value: string;
|
|
946
|
+
/** Define se o item está selecionado */
|
|
505
947
|
selected?: boolean;
|
|
948
|
+
/** Subitens do select (para selects aninhados) */
|
|
506
949
|
children?: SelectItemProps[];
|
|
507
950
|
}
|
|
951
|
+
/** Variantes disponíveis para o Select */
|
|
508
952
|
type SelectVariant = 'text' | 'icon' | 'checkbox';
|
|
509
|
-
|
|
953
|
+
/**
|
|
954
|
+
* Props do componente Select
|
|
955
|
+
* @example
|
|
956
|
+
* ```tsx
|
|
957
|
+
* <Select
|
|
958
|
+
* items={[
|
|
959
|
+
* { value: '1', text: 'Opção 1' },
|
|
960
|
+
* { value: '2', text: 'Opção 2' }
|
|
961
|
+
* ]}
|
|
962
|
+
* variant="text"
|
|
963
|
+
* placeholder="Selecione uma opção"
|
|
964
|
+
* onValueChange={(value) => console.log(value)}
|
|
965
|
+
* />
|
|
966
|
+
* ```
|
|
967
|
+
* @example
|
|
968
|
+
* ```tsx
|
|
969
|
+
* <Select
|
|
970
|
+
* items={options}
|
|
971
|
+
* variant="checkbox"
|
|
972
|
+
* multiple={true}
|
|
973
|
+
* search={true}
|
|
974
|
+
* label="Selecione múltiplas opções"
|
|
975
|
+
* helperText="Você pode selecionar mais de uma"
|
|
976
|
+
* required={true}
|
|
977
|
+
* />
|
|
978
|
+
* ```
|
|
979
|
+
*/
|
|
980
|
+
interface SelectProps extends BaseProps {
|
|
981
|
+
/** Array de itens do select */
|
|
510
982
|
items: SelectItemProps[];
|
|
983
|
+
/** Callback executado quando o valor muda: (value) => void */
|
|
511
984
|
onValueChange?: (value: string | string[]) => void;
|
|
985
|
+
/** Callback executado quando o select abre/fecha: (open) => void */
|
|
512
986
|
onOpenChange?: (open: boolean) => void;
|
|
987
|
+
/** Variante visual do select */
|
|
513
988
|
variant: SelectVariant;
|
|
989
|
+
/** Define se o campo é obrigatório */
|
|
514
990
|
required?: boolean;
|
|
991
|
+
/** Valor(es) selecionado(s) */
|
|
515
992
|
value?: string | string[];
|
|
993
|
+
/** Habilita seleção múltipla */
|
|
516
994
|
multiple?: boolean;
|
|
995
|
+
/** Placeholder do campo */
|
|
517
996
|
placeholder?: string;
|
|
997
|
+
/** Habilita campo de busca */
|
|
518
998
|
search?: boolean;
|
|
999
|
+
/** Label do campo */
|
|
519
1000
|
label?: string;
|
|
1001
|
+
/** Texto de ajuda exibido abaixo do campo */
|
|
520
1002
|
helperText?: string;
|
|
1003
|
+
/** Largura máxima do select */
|
|
521
1004
|
maxWidth?: number;
|
|
1005
|
+
/** Mensagem de erro a ser exibida */
|
|
522
1006
|
errorMessage?: string;
|
|
523
|
-
|
|
524
|
-
className?: string;
|
|
1007
|
+
/** Label acessível para leitores de tela */
|
|
525
1008
|
'aria-label'?: string;
|
|
1009
|
+
/** ID para testes automatizados */
|
|
526
1010
|
'data-testid'?: string;
|
|
1011
|
+
/** Habilita tooltip */
|
|
527
1012
|
tooltip?: boolean;
|
|
1013
|
+
/** Texto do tooltip */
|
|
528
1014
|
tooltipText?: string;
|
|
529
|
-
|
|
530
|
-
|
|
1015
|
+
/** Lado onde o dropdown abre */
|
|
1016
|
+
side?: Side;
|
|
1017
|
+
/** Alinhamento do dropdown */
|
|
1018
|
+
align?: Align;
|
|
1019
|
+
/** Habilita scroll infinito */
|
|
531
1020
|
enableInfiniteScroll?: boolean;
|
|
1021
|
+
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
532
1022
|
onScrollEnd?: () => void;
|
|
1023
|
+
/** Estado de carregamento de mais itens */
|
|
533
1024
|
isLoadingMore?: boolean;
|
|
1025
|
+
/** Habilita busca via API */
|
|
534
1026
|
enableApiSearch?: boolean;
|
|
1027
|
+
/** Callback executado na busca via API: (term) => void */
|
|
535
1028
|
onApiSearch?: (term: string) => void;
|
|
1029
|
+
/** Estado de busca em andamento */
|
|
536
1030
|
isSearching?: boolean;
|
|
537
1031
|
}
|
|
538
1032
|
|
|
@@ -571,13 +1065,11 @@ interface TableColumn<T = TableRowData> {
|
|
|
571
1065
|
* Props do componente Table. Use genérico para autocomplete: `<Table<User>>`
|
|
572
1066
|
* @typeParam T - Tipo dos dados da linha
|
|
573
1067
|
*/
|
|
574
|
-
interface TableProps<T = TableRowData> {
|
|
1068
|
+
interface TableProps<T = TableRowData> extends BaseProps {
|
|
575
1069
|
/** Configuração das colunas */
|
|
576
1070
|
columns: TableColumn<T>[];
|
|
577
1071
|
/** Array de dados a serem exibidos */
|
|
578
1072
|
dataSource: T[];
|
|
579
|
-
/** Classe CSS customizada */
|
|
580
|
-
className?: string;
|
|
581
1073
|
/** Estado de carregamento */
|
|
582
1074
|
loading?: boolean;
|
|
583
1075
|
/** Configuração de seleção de linhas */
|
|
@@ -609,7 +1101,7 @@ interface TableProps<T = TableRowData> {
|
|
|
609
1101
|
};
|
|
610
1102
|
}
|
|
611
1103
|
|
|
612
|
-
declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, }: TableProps<T>) => react_jsx_runtime.JSX.Element | null;
|
|
1104
|
+
declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) => react_jsx_runtime.JSX.Element | null;
|
|
613
1105
|
|
|
614
1106
|
interface BaseFilterItem {
|
|
615
1107
|
id?: string;
|
|
@@ -639,7 +1131,7 @@ interface CalendarFilterItem extends BaseFilterItem {
|
|
|
639
1131
|
placeholder?: string;
|
|
640
1132
|
}
|
|
641
1133
|
type FilterItem = CheckboxFilterItem | CalendarFilterItem;
|
|
642
|
-
interface TableHeaderProps {
|
|
1134
|
+
interface TableHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
643
1135
|
searchValue?: string;
|
|
644
1136
|
onSearchChange?: (value: string) => void;
|
|
645
1137
|
searchPlaceholder?: string;
|
|
@@ -653,67 +1145,116 @@ interface TableHeaderProps {
|
|
|
653
1145
|
}
|
|
654
1146
|
declare const TableHeader: React__default.FC<TableHeaderProps>;
|
|
655
1147
|
|
|
656
|
-
interface TablePaginationProps {
|
|
657
|
-
/** Página atual */
|
|
1148
|
+
interface TablePaginationProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
658
1149
|
currentPage: number;
|
|
659
|
-
/** Total de itens */
|
|
660
1150
|
totalItems: number;
|
|
661
|
-
/** Itens por página */
|
|
662
1151
|
itemsPerPage: number;
|
|
663
|
-
/** Callback quando a página muda */
|
|
664
1152
|
onPageChange: (page: number) => void;
|
|
665
|
-
/** Callback quando itens por página muda */
|
|
666
1153
|
onItemsPerPageChange: (itemsPerPage: number) => void;
|
|
667
|
-
/** Opções disponíveis para itens por página */
|
|
668
1154
|
pageSizeOptions?: number[];
|
|
669
|
-
/** Desabilita a paginação */
|
|
670
1155
|
disabled?: boolean;
|
|
671
|
-
/** Classes CSS adicionais */
|
|
672
1156
|
className?: string;
|
|
673
1157
|
}
|
|
674
1158
|
declare const TablePagination: React__default.FC<TablePaginationProps>;
|
|
675
1159
|
|
|
1160
|
+
/** Tipos de input suportados pelo TextField */
|
|
676
1161
|
type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
1162
|
+
/**
|
|
1163
|
+
* Props do componente TextField
|
|
1164
|
+
* @example
|
|
1165
|
+
* ```tsx
|
|
1166
|
+
* <TextField
|
|
1167
|
+
* label="Email"
|
|
1168
|
+
* type="email"
|
|
1169
|
+
* value={email}
|
|
1170
|
+
* onChange={setEmail}
|
|
1171
|
+
* placeholder="Digite seu email"
|
|
1172
|
+
* />
|
|
1173
|
+
* ```
|
|
1174
|
+
* @example
|
|
1175
|
+
* ```tsx
|
|
1176
|
+
* <TextField
|
|
1177
|
+
* label="Senha"
|
|
1178
|
+
* type="password"
|
|
1179
|
+
* required
|
|
1180
|
+
* helperText="Mínimo 8 caracteres"
|
|
1181
|
+
* errorMessage={error}
|
|
1182
|
+
* tooltip={true}
|
|
1183
|
+
* tooltipText="Deve conter letras e números"
|
|
1184
|
+
* icon={<LockIcon />}
|
|
1185
|
+
* />
|
|
1186
|
+
* ```
|
|
1187
|
+
*/
|
|
677
1188
|
interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
|
|
678
|
-
/**
|
|
1189
|
+
/** Valor controlado do campo */
|
|
679
1190
|
value?: string | number;
|
|
680
|
-
/**
|
|
1191
|
+
/** Callback executado quando o valor muda: (value) => void */
|
|
681
1192
|
onChange?: (value: string) => void;
|
|
682
|
-
/** Label
|
|
1193
|
+
/** Label do campo */
|
|
683
1194
|
label?: string;
|
|
684
|
-
/**
|
|
1195
|
+
/** Tipo do input */
|
|
685
1196
|
type?: TextFieldType;
|
|
686
|
-
/**
|
|
1197
|
+
/** Texto de ajuda exibido abaixo do campo */
|
|
687
1198
|
helperText?: string;
|
|
688
|
-
/**
|
|
1199
|
+
/** Habilita tooltip */
|
|
689
1200
|
tooltip?: boolean;
|
|
690
|
-
/**
|
|
1201
|
+
/** Texto do tooltip */
|
|
691
1202
|
tooltipText?: string;
|
|
692
|
-
|
|
693
|
-
|
|
1203
|
+
/** Lado onde o tooltip aparece */
|
|
1204
|
+
side?: Side;
|
|
1205
|
+
/** Alinhamento do tooltip */
|
|
1206
|
+
align?: Align;
|
|
1207
|
+
/** Mensagem de erro a ser exibida */
|
|
694
1208
|
errorMessage?: string;
|
|
695
|
-
/**
|
|
1209
|
+
/** Ícone a ser exibido no campo */
|
|
696
1210
|
icon?: React__default.ReactNode;
|
|
697
1211
|
}
|
|
698
1212
|
|
|
699
1213
|
declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
700
1214
|
|
|
1215
|
+
/** Tipos de toast disponíveis */
|
|
701
1216
|
type ToastType = 'success' | 'alert' | 'info';
|
|
1217
|
+
/**
|
|
1218
|
+
* Representa uma mensagem de toast
|
|
1219
|
+
*/
|
|
702
1220
|
interface ToastMessage {
|
|
1221
|
+
/** ID único da mensagem */
|
|
703
1222
|
id: string;
|
|
1223
|
+
/** Conteúdo da mensagem */
|
|
704
1224
|
message: string;
|
|
1225
|
+
/** Tipo visual do toast */
|
|
705
1226
|
type: ToastType;
|
|
1227
|
+
/** Define se o toast permanece até ser fechado manualmente */
|
|
706
1228
|
persistent?: boolean;
|
|
1229
|
+
/** Duração em milissegundos antes de auto-fechar */
|
|
707
1230
|
duration?: number;
|
|
1231
|
+
/** Timestamp de quando foi criado */
|
|
708
1232
|
timestamp: number;
|
|
709
1233
|
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Opções para exibição do toast
|
|
1236
|
+
*/
|
|
710
1237
|
interface ToastOptions {
|
|
1238
|
+
/** Define se o toast permanece até ser fechado manualmente */
|
|
711
1239
|
persistent?: boolean;
|
|
1240
|
+
/** Duração em milissegundos antes de auto-fechar */
|
|
712
1241
|
duration?: number;
|
|
713
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Contexto do sistema de toasts
|
|
1245
|
+
* @example
|
|
1246
|
+
* ```tsx
|
|
1247
|
+
* const { showToast, hideToast } = useToast();
|
|
1248
|
+
*
|
|
1249
|
+
* showToast('Operação realizada com sucesso!', 'success');
|
|
1250
|
+
* ```
|
|
1251
|
+
*/
|
|
714
1252
|
interface ToastContextType {
|
|
1253
|
+
/** Exibe um toast e retorna seu ID: (message, type?, options?) => string */
|
|
715
1254
|
showToast: (message: string, type?: ToastType, options?: ToastOptions) => string;
|
|
1255
|
+
/** Oculta um toast específico: (id) => void */
|
|
716
1256
|
hideToast: (id: string) => void;
|
|
1257
|
+
/** Oculta todos os toasts: () => void */
|
|
717
1258
|
hideAllToasts: () => void;
|
|
718
1259
|
}
|
|
719
1260
|
|
|
@@ -724,46 +1265,115 @@ interface ToastProviderProps {
|
|
|
724
1265
|
declare const ToastProvider: React__default.FC<ToastProviderProps>;
|
|
725
1266
|
declare const useToast: () => ToastContextType;
|
|
726
1267
|
|
|
727
|
-
|
|
728
|
-
|
|
1268
|
+
/**
|
|
1269
|
+
* Props do componente Tooltip
|
|
1270
|
+
* @example
|
|
1271
|
+
* ```tsx
|
|
1272
|
+
* <Tooltip text="Informação adicional">
|
|
1273
|
+
* <Button>Hover me</Button>
|
|
1274
|
+
* </Tooltip>
|
|
1275
|
+
* ```
|
|
1276
|
+
* @example
|
|
1277
|
+
* ```tsx
|
|
1278
|
+
* <Tooltip
|
|
1279
|
+
* text="Clique para mais detalhes"
|
|
1280
|
+
* side="top"
|
|
1281
|
+
* align="center"
|
|
1282
|
+
* sideOffset={10}
|
|
1283
|
+
* maxWidth={300}
|
|
1284
|
+
* >
|
|
1285
|
+
* <IconButton icon={<InfoIcon />} />
|
|
1286
|
+
* </Tooltip>
|
|
1287
|
+
* ```
|
|
1288
|
+
*/
|
|
1289
|
+
interface TooltipProps extends BaseProps {
|
|
1290
|
+
/** Conteúdo do tooltip */
|
|
729
1291
|
text: React__default.ReactNode;
|
|
730
|
-
|
|
731
|
-
|
|
1292
|
+
/** Lado onde o tooltip aparece em relação ao elemento */
|
|
1293
|
+
side?: Side;
|
|
1294
|
+
/** Alinhamento do tooltip */
|
|
1295
|
+
align?: Align;
|
|
1296
|
+
/** Distância em pixels do lado do elemento */
|
|
732
1297
|
sideOffset?: number;
|
|
1298
|
+
/** Deslocamento em pixels no eixo de alinhamento */
|
|
733
1299
|
alignOffset?: number;
|
|
1300
|
+
/** Largura máxima do tooltip em pixels */
|
|
734
1301
|
maxWidth?: number;
|
|
1302
|
+
/** Elemento que dispara o tooltip ao hover */
|
|
735
1303
|
children: React__default.ReactNode;
|
|
736
1304
|
}
|
|
737
1305
|
|
|
738
1306
|
declare const Tooltip: React__default.FC<TooltipProps>;
|
|
739
1307
|
|
|
740
|
-
|
|
1308
|
+
/**
|
|
1309
|
+
* Props do componente Switch
|
|
1310
|
+
* @example
|
|
1311
|
+
* ```tsx
|
|
1312
|
+
* <Switch
|
|
1313
|
+
* checked={isEnabled}
|
|
1314
|
+
* onCheckedChange={setIsEnabled}
|
|
1315
|
+
* />
|
|
1316
|
+
* ```
|
|
1317
|
+
* @example
|
|
1318
|
+
* ```tsx
|
|
1319
|
+
* <Switch
|
|
1320
|
+
* defaultChecked={true}
|
|
1321
|
+
* disabled={isLoading}
|
|
1322
|
+
* onCheckedChange={(checked) => console.log(checked)}
|
|
1323
|
+
* name="notifications"
|
|
1324
|
+
* />
|
|
1325
|
+
* ```
|
|
1326
|
+
*/
|
|
1327
|
+
interface SwitchProps extends BaseProps {
|
|
1328
|
+
/** Estado inicial (modo não controlado) */
|
|
741
1329
|
defaultChecked?: boolean;
|
|
742
|
-
|
|
1330
|
+
/** Callback executado quando o estado muda: (checked) => void */
|
|
743
1331
|
onCheckedChange?: (checked: boolean) => void;
|
|
1332
|
+
/** Nome do input */
|
|
744
1333
|
name?: string;
|
|
1334
|
+
/** Valor do input */
|
|
745
1335
|
value?: string;
|
|
1336
|
+
/** Estado atual (modo controlado) */
|
|
746
1337
|
checked?: boolean;
|
|
747
1338
|
}
|
|
748
1339
|
|
|
749
1340
|
declare const Switch: React$1.FC<SwitchProps>;
|
|
750
1341
|
|
|
1342
|
+
/** Tipos de entrada suportados pelo VerificationCode */
|
|
751
1343
|
type InputType = 'numeric' | 'alpha' | 'alphanumeric';
|
|
752
|
-
|
|
753
|
-
|
|
1344
|
+
/**
|
|
1345
|
+
* Props do componente VerificationCode
|
|
1346
|
+
* @example
|
|
1347
|
+
* ```tsx
|
|
1348
|
+
* <VerificationCode
|
|
1349
|
+
* length={6}
|
|
1350
|
+
* inputType="numeric"
|
|
1351
|
+
* onComplete={(code) => handleVerification(code)}
|
|
1352
|
+
* />
|
|
1353
|
+
* ```
|
|
1354
|
+
* @example
|
|
1355
|
+
* ```tsx
|
|
1356
|
+
* <VerificationCode
|
|
1357
|
+
* length={4}
|
|
1358
|
+
* inputType="alphanumeric"
|
|
1359
|
+
* onComplete={handleCode}
|
|
1360
|
+
* hasError={!!error}
|
|
1361
|
+
* errorMessage="Código inválido"
|
|
1362
|
+
* disabled={isVerifying}
|
|
1363
|
+
* />
|
|
1364
|
+
* ```
|
|
1365
|
+
*/
|
|
1366
|
+
interface VerificationCodeProps extends BaseProps {
|
|
1367
|
+
/** Número de dígitos do código (padrão: 6) */
|
|
754
1368
|
length?: number;
|
|
755
|
-
/**
|
|
1369
|
+
/** Tipo de entrada permitida (padrão: "numeric") */
|
|
756
1370
|
inputType?: InputType;
|
|
757
|
-
/** Callback
|
|
1371
|
+
/** Callback executado quando todos os campos são preenchidos: (value) => void */
|
|
758
1372
|
onComplete?: (value: string) => void;
|
|
759
|
-
/**
|
|
1373
|
+
/** Define se o campo está em estado de erro */
|
|
760
1374
|
hasError?: boolean;
|
|
761
1375
|
/** Mensagem de erro exibida abaixo do componente */
|
|
762
1376
|
errorMessage?: string;
|
|
763
|
-
/** Define se o componente deve estar desabilitado */
|
|
764
|
-
disabled?: boolean;
|
|
765
|
-
/** Classe CSS adicional para estilização externa */
|
|
766
|
-
className?: string;
|
|
767
1377
|
/** Props adicionais passadas para os inputs */
|
|
768
1378
|
[key: string]: any;
|
|
769
1379
|
}
|
|
@@ -883,4 +1493,4 @@ declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, thresho
|
|
|
883
1493
|
declare const normalizeText: (text: React.ReactNode) => string;
|
|
884
1494
|
|
|
885
1495
|
export { Avatar, Badge, Button, MemoizedCalendar as Calendar, Callout, Checkbox, MemoizedChips as Chips, Container, _default$1 as DatePicker, MemoizedDialog as Dialog, Drawer, MemoizedDropdown as Dropdown, Filter, ListItem, Menu, memorizedQuantity as Quantity, Radio, Search, Select, Switch, Table, TableHeader, TablePagination, _default as TextField, ToastProvider as Toast, ToastProvider, Tooltip, VerificationCode, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
|
|
886
|
-
export type { AvatarProps, BadgeProps, ButtonProps, CalendarItem, CalendarProps, CalloutProps, CheckboxProps, ChipsProps, ContainerProps, DateFormat, DatePickerProps, DayItem, DialogProps, DrawerProps, DropdownItem, DropdownProps, DropdownType, EmptyItem, FilterItem, FilterProps, ListItemProps,
|
|
1496
|
+
export type { AvatarProps, BadgeProps, ButtonProps, CalendarItem, CalendarProps, CalloutProps, CheckboxProps, ChipsProps, ContainerProps, DateFormat, DatePickerProps, DayItem, DialogProps, DrawerProps, DropdownItem, DropdownProps, DropdownType, EmptyItem, FilterItem, FilterProps, ListItemProps, MenuProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableHeaderProps, TablePaginationProps, TableProps, TextFieldProps, ToastContextType, ToastMessage, ToastOptions, ToastType, TooltipProps, VerificationCodeProps, YearItem };
|