@giro-ds/react 4.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +429 -703
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +117 -171
- 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/Avatar/Avatar.d.ts +0 -4
- package/dist/components/Avatar/Avatar.types.d.ts +0 -23
- package/dist/components/Avatar/__tests__/Avatar.test.d.ts +0 -1
- package/dist/components/Avatar/index.d.ts +0 -2
- package/dist/components/Badge/Badge.d.ts +0 -4
- package/dist/components/Badge/Badge.types.d.ts +0 -37
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Button/Button.d.ts +0 -4
- package/dist/components/Button/Button.types.d.ts +0 -62
- package/dist/components/Button/__tests__/Button.test.d.ts +0 -1
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Calendar/Calendar.d.ts +0 -3
- package/dist/components/Calendar/Calendar.types.d.ts +0 -109
- package/dist/components/Calendar/__tests__/Calendar.test.d.ts +0 -1
- package/dist/components/Calendar/index.d.ts +0 -1
- package/dist/components/Callout/Callout.d.ts +0 -4
- package/dist/components/Callout/Callout.types.d.ts +0 -34
- package/dist/components/Callout/index.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/components/Checkbox/Checkbox.types.d.ts +0 -34
- package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/components/Checkbox/index.d.ts +0 -2
- package/dist/components/Chips/Chips.d.ts +0 -4
- package/dist/components/Chips/Chips.types.d.ts +0 -34
- package/dist/components/Chips/index.d.ts +0 -1
- package/dist/components/Container/Container.d.ts +0 -2
- package/dist/components/Container/Container.types.d.ts +0 -15
- package/dist/components/Container/__tests__/Container.test.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -4
- package/dist/components/DatePicker/DatePicker.types.d.ts +0 -50
- package/dist/components/DatePicker/DateUtils.d.ts +0 -23
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/Dialog/Dialog.d.ts +0 -4
- package/dist/components/Dialog/Dialog.types.d.ts +0 -28
- package/dist/components/Dialog/__tests__/Dialog.test.d.ts +0 -1
- package/dist/components/Dialog/index.d.ts +0 -2
- package/dist/components/Drawer/Drawer.d.ts +0 -9
- package/dist/components/Drawer/Drawer.types.d.ts +0 -74
- package/dist/components/Drawer/index.d.ts +0 -1
- 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/Filter.d.ts +0 -4
- package/dist/components/Filter/Filter.types.d.ts +0 -65
- package/dist/components/Filter/index.d.ts +0 -2
- package/dist/components/ListItem/ListItem.d.ts +0 -4
- package/dist/components/ListItem/ListItem.types.d.ts +0 -52
- package/dist/components/ListItem/index.d.ts +0 -2
- package/dist/components/Menu/Menu.d.ts +0 -4
- package/dist/components/Menu/Menu.types.d.ts +0 -90
- package/dist/components/Menu/__tests__/Menu.test.d.ts +0 -1
- package/dist/components/Menu/components/MenuItem.d.ts +0 -3
- package/dist/components/Menu/hooks/useMenuLogic.d.ts +0 -15
- package/dist/components/Menu/hooks/useSearchLogic.d.ts +0 -13
- package/dist/components/Menu/index.d.ts +0 -2
- package/dist/components/Popover/Popover.d.ts +0 -4
- package/dist/components/Popover/Popover.types.d.ts +0 -8
- package/dist/components/Popover/__test__/Popover.test.d.ts +0 -1
- package/dist/components/Popover/index.d.ts +0 -2
- package/dist/components/Quantity/Quantity.d.ts +0 -4
- package/dist/components/Quantity/Quantity.types.d.ts +0 -38
- package/dist/components/Quantity/index.d.ts +0 -2
- package/dist/components/Radio/Radio.d.ts +0 -4
- package/dist/components/Radio/Radio.types.d.ts +0 -52
- package/dist/components/Radio/__tests__/Radio.test.d.ts +0 -1
- package/dist/components/Radio/index.d.ts +0 -2
- package/dist/components/Search/Search.d.ts +0 -4
- package/dist/components/Search/Search.types.d.ts +0 -48
- package/dist/components/Search/__tests__/Search.test.d.ts +0 -1
- package/dist/components/Search/index.d.ts +0 -2
- package/dist/components/Select/Select.d.ts +0 -4
- package/dist/components/Select/Select.types.d.ts +0 -224
- package/dist/components/Select/__tests__/SelectRadix.test.d.ts +0 -1
- package/dist/components/Select/components/CheckboxSelectItem.d.ts +0 -4
- package/dist/components/Select/components/ExpandableSelectItem.d.ts +0 -11
- package/dist/components/Select/components/SelectItem.d.ts +0 -7
- package/dist/components/Select/hooks/useSelectLogic.d.ts +0 -3
- package/dist/components/Select/index.d.ts +0 -5
- package/dist/components/Switch/Switch.d.ts +0 -4
- package/dist/components/Switch/Switch.types.d.ts +0 -32
- package/dist/components/Switch/__tests__/Switch.test.d.ts +0 -1
- package/dist/components/Switch/index.d.ts +0 -2
- package/dist/components/Table/EmptyRows150Color.d.ts +0 -8
- package/dist/components/Table/LoaderList.d.ts +0 -10
- package/dist/components/Table/MultiLineText/MultiLineText.d.ts +0 -14
- package/dist/components/Table/MultiLineText/index.d.ts +0 -2
- package/dist/components/Table/Table.d.ts +0 -3
- package/dist/components/Table/Table.types.d.ts +0 -70
- package/dist/components/Table/TableHeader.d.ts +0 -48
- package/dist/components/Table/TablePagination.d.ts +0 -13
- package/dist/components/Table/index.d.ts +0 -7
- package/dist/components/Table/utils/tableActions.d.ts +0 -21
- package/dist/components/TextField/TextField.d.ts +0 -4
- package/dist/components/TextField/TextField.types.d.ts +0 -69
- package/dist/components/TextField/__tests__/Textfield.test.d.ts +0 -1
- package/dist/components/TextField/index.d.ts +0 -2
- package/dist/components/TextField/utils/__tests__/validation.test.d.ts +0 -1
- package/dist/components/TextField/utils/index.d.ts +0 -2
- package/dist/components/TextField/utils/validation.d.ts +0 -8
- package/dist/components/Toast/Toast.d.ts +0 -34
- package/dist/components/Toast/Toast.types.d.ts +0 -57
- package/dist/components/Toast/__tests__/Toast.test.d.ts +0 -1
- package/dist/components/Toast/components/ToastContainer.d.ts +0 -22
- package/dist/components/Toast/components/ToastProvider.d.ts +0 -35
- package/dist/components/Toast/index.d.ts +0 -5
- package/dist/components/Tooltip/Tooltip.d.ts +0 -4
- package/dist/components/Tooltip/Tooltip.types.d.ts +0 -14
- package/dist/components/Tooltip/__tests__/Tooltip.test.d.ts +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/components/VerificationCode/VerificationCode.d.ts +0 -20
- package/dist/components/VerificationCode/VerificationCode.types.d.ts +0 -39
- package/dist/components/VerificationCode/index.d.ts +0 -2
- package/dist/components/index.d.ts +0 -59
- package/dist/contexts/ToastContext.d.ts +0 -43
- package/dist/hooks/ApiSimulation.d.ts +0 -53
- package/dist/hooks/InfiniteScroll.d.ts +0 -41
- package/dist/hooks/NormalizeText.d.ts +0 -1
- package/dist/hooks/useToast.d.ts +0 -46
- package/dist/shared/Label/index.d.ts +0 -15
- package/dist/shared/icons/CheckHalf.d.ts +0 -10
- package/dist/shared/icons/CheckSmall.d.ts +0 -10
- package/dist/shared/icons/index.d.ts +0 -4
- package/dist/types/common.types.d.ts +0 -12
- package/dist/types/index.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import React__default, { ReactNode, ReactElement, ComponentPropsWithoutRef, CSSP
|
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { Matcher } from 'react-day-picker';
|
|
5
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
6
|
|
|
8
7
|
type Size = 'sm' | 'lg';
|
|
9
8
|
type Variant = 'filled' | 'outlined' | 'text';
|
|
@@ -145,11 +144,9 @@ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Rea
|
|
|
145
144
|
|
|
146
145
|
/** Formato de exibição da data aceito pelo componente. */
|
|
147
146
|
type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy' | (string & {});
|
|
148
|
-
interface
|
|
147
|
+
interface CalendarBaseProps extends Omit<BaseProps, 'disabled'> {
|
|
149
148
|
/** Data selecionada atualmente (usada pelo DatePicker). */
|
|
150
149
|
selected?: Date | null;
|
|
151
|
-
/** Data selecionada atualmente (usada pelo Filter). */
|
|
152
|
-
selectedDate?: Date | null;
|
|
153
150
|
/**
|
|
154
151
|
* Mês exibido no calendário. Use junto com `onDateChange` para
|
|
155
152
|
* controlar a navegação externamente.
|
|
@@ -157,15 +154,13 @@ interface CalendarProps extends Omit<BaseProps, 'disabled'> {
|
|
|
157
154
|
currentDate?: Date | null;
|
|
158
155
|
/**
|
|
159
156
|
* Mês inicial padrão exibido quando não controlado.
|
|
160
|
-
* @default
|
|
157
|
+
* @default currentDate
|
|
161
158
|
*/
|
|
162
159
|
defaultMonth?: Date;
|
|
163
160
|
/** Primeiro mês navegável. */
|
|
164
161
|
startMonth?: Date;
|
|
165
162
|
/** Último mês navegável. */
|
|
166
163
|
endMonth?: Date;
|
|
167
|
-
/** Número de meses exibidos simultaneamente. @default 1 */
|
|
168
|
-
numberOfMonths?: number;
|
|
169
164
|
/** Chamado quando o usuário seleciona um dia. */
|
|
170
165
|
onDaySelect?: (date: Date) => void;
|
|
171
166
|
/** Chamado quando o usuário navega entre meses. */
|
|
@@ -181,10 +176,6 @@ interface CalendarProps extends Omit<BaseProps, 'disabled'> {
|
|
|
181
176
|
* (Date, DateRange, DateBefore, DateAfter, DayOfWeek, função…).
|
|
182
177
|
*/
|
|
183
178
|
disabled?: Matcher | Matcher[];
|
|
184
|
-
/**
|
|
185
|
-
* Dias ocultados — aceita qualquer `Matcher` do react-day-picker.
|
|
186
|
-
*/
|
|
187
|
-
hidden?: Matcher | Matcher[];
|
|
188
179
|
/**
|
|
189
180
|
* Formato de exibição da data.
|
|
190
181
|
* @example 'dd/mm/yyyy' | 'mm/dd/yyyy'
|
|
@@ -195,62 +186,16 @@ interface CalendarProps extends Omit<BaseProps, 'disabled'> {
|
|
|
195
186
|
* @default 'pt-br'
|
|
196
187
|
*/
|
|
197
188
|
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
189
|
/** Atributo `aria-label` para o elemento raiz. */
|
|
225
190
|
'aria-label'?: string;
|
|
226
|
-
/** Atributo `aria-labelledby` para o elemento raiz. */
|
|
227
|
-
'aria-labelledby'?: string;
|
|
228
191
|
/** Foca automaticamente o primeiro dia selecionado ou hoje. */
|
|
229
192
|
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
193
|
/** Substitui os `classNames` padrão do react-day-picker. */
|
|
244
194
|
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
195
|
}
|
|
196
|
+
type CalendarProps = CalendarBaseProps;
|
|
252
197
|
|
|
253
|
-
declare const Calendar: ({ selected,
|
|
198
|
+
declare const Calendar: ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, format: _format, locale, autoFocus, id, "aria-label": ariaLabel, }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
254
199
|
|
|
255
200
|
/**
|
|
256
201
|
* Props do componente Callout
|
|
@@ -392,7 +337,7 @@ declare function Container({ children }: ContainerProps): react_jsx_runtime.JSX.
|
|
|
392
337
|
* required
|
|
393
338
|
* helperText="Selecione a data de início do projeto"
|
|
394
339
|
* minDate={new Date()}
|
|
395
|
-
*
|
|
340
|
+
* calendarSide="right"
|
|
396
341
|
* error={errorMessage}
|
|
397
342
|
* />
|
|
398
343
|
* ```
|
|
@@ -401,7 +346,9 @@ interface DatePickerProps extends BaseProps {
|
|
|
401
346
|
/** Locale para formatação da data */
|
|
402
347
|
locale?: Locale;
|
|
403
348
|
/** Posição do calendário em relação ao campo */
|
|
404
|
-
|
|
349
|
+
calendarSide?: Side;
|
|
350
|
+
/** Alinhamento do calendário em relação ao campo */
|
|
351
|
+
calendarAlign?: Exclude<Align, 'center'>;
|
|
405
352
|
/** Texto de ajuda exibido abaixo do campo */
|
|
406
353
|
helperText?: string;
|
|
407
354
|
/** Define se o campo é obrigatório */
|
|
@@ -424,7 +371,7 @@ interface DatePickerProps extends BaseProps {
|
|
|
424
371
|
'data-testid'?: string;
|
|
425
372
|
}
|
|
426
373
|
|
|
427
|
-
declare const _default$
|
|
374
|
+
declare const _default$2: React__default.NamedExoticComponent<DatePickerProps>;
|
|
428
375
|
|
|
429
376
|
/**
|
|
430
377
|
* Props do componente Dialog
|
|
@@ -432,13 +379,12 @@ declare const _default$1: React__default.NamedExoticComponent<DatePickerProps>;
|
|
|
432
379
|
* <Dialog
|
|
433
380
|
* title="Confirmar ação"
|
|
434
381
|
* bodyContent="Tem certeza que deseja continuar?"
|
|
435
|
-
*
|
|
436
|
-
*
|
|
382
|
+
* textPrimaryAction="Confirmar"
|
|
383
|
+
* textSecondaryAction="Cancelar"
|
|
437
384
|
* />
|
|
438
385
|
*/
|
|
439
386
|
interface DialogProps extends BaseProps, React.HTMLAttributes<HTMLDivElement> {
|
|
440
|
-
|
|
441
|
-
show: boolean;
|
|
387
|
+
show?: boolean;
|
|
442
388
|
/** Título exibido no cabeçalho do diálogo */
|
|
443
389
|
title?: string;
|
|
444
390
|
/** Texto ou conteúdo do corpo do diálogo */
|
|
@@ -487,6 +433,8 @@ declare const Dialog: React$1.FC<DialogProps>;
|
|
|
487
433
|
interface DrawerProps extends BaseProps {
|
|
488
434
|
/** Conteúdo a ser exibido dentro do drawer */
|
|
489
435
|
children?: ReactNode;
|
|
436
|
+
/** Conteúdo customizado do cabeçalho */
|
|
437
|
+
headerContent?: ReactNode;
|
|
490
438
|
/** Largura customizada do drawer (ex: '400px', '50%') */
|
|
491
439
|
customWidth?: string;
|
|
492
440
|
/** Callback executado ao fechar o drawer: () => void */
|
|
@@ -505,105 +453,16 @@ interface DrawerProps extends BaseProps {
|
|
|
505
453
|
closeOnEscape?: boolean;
|
|
506
454
|
}
|
|
507
455
|
|
|
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
456
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
514
457
|
|
|
515
|
-
|
|
516
|
-
* Representa um item individual do dropdown
|
|
517
|
-
*/
|
|
518
|
-
interface DropdownItem {
|
|
519
|
-
/** ID único do item (será gerado automaticamente se não fornecido) */
|
|
458
|
+
interface FilterItem$1 {
|
|
520
459
|
id?: string;
|
|
521
|
-
/** Texto principal do item */
|
|
522
460
|
text: string;
|
|
523
|
-
/** Texto secundário/descrição do item */
|
|
524
461
|
subText?: string;
|
|
525
|
-
|
|
526
|
-
icon?: React__default.ReactNode;
|
|
527
|
-
/** Define se o item está desabilitado */
|
|
462
|
+
icon?: ReactNode;
|
|
528
463
|
disabled?: boolean;
|
|
529
464
|
}
|
|
530
|
-
|
|
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
|
-
|
|
465
|
+
type FilterType = 'text' | 'checkbox' | 'icon' | 'calendar';
|
|
607
466
|
/**
|
|
608
467
|
* Props do componente Filter
|
|
609
468
|
* @example
|
|
@@ -630,9 +489,9 @@ declare const MemoizedDropdown: React__default.NamedExoticComponent<DropdownProp
|
|
|
630
489
|
*/
|
|
631
490
|
interface FilterProps extends BaseProps {
|
|
632
491
|
/** Array de itens para filtros do tipo dropdown */
|
|
633
|
-
items?:
|
|
492
|
+
items?: FilterItem$1[];
|
|
634
493
|
/** Tipo do filtro (dropdown ou calendário) */
|
|
635
|
-
type?:
|
|
494
|
+
type?: FilterType;
|
|
636
495
|
/** IDs dos itens selecionados */
|
|
637
496
|
selectedIds?: string[];
|
|
638
497
|
/** Callback executado ao aplicar filtro: (selectedIds) => void */
|
|
@@ -651,8 +510,10 @@ interface FilterProps extends BaseProps {
|
|
|
651
510
|
onOpen?: () => void;
|
|
652
511
|
/** Callback executado ao fechar o filtro: () => void */
|
|
653
512
|
onClose?: () => void;
|
|
654
|
-
/** Posição do
|
|
655
|
-
|
|
513
|
+
/** Posição do popover em relação ao botão */
|
|
514
|
+
side?: Side;
|
|
515
|
+
/** Alinhamento do popover em relação ao botão */
|
|
516
|
+
align?: Exclude<Align, 'center'>;
|
|
656
517
|
/** Data selecionada (para tipo calendar) */
|
|
657
518
|
selectedDate?: Date | null;
|
|
658
519
|
/** Callback executado ao selecionar data: (date) => void */
|
|
@@ -804,9 +665,28 @@ declare const Menu: React__default.FC<MenuProps>;
|
|
|
804
665
|
interface PopoverProps {
|
|
805
666
|
trigger: React.ReactNode;
|
|
806
667
|
content: React.ReactNode;
|
|
807
|
-
onDateSelect?: (date: Date) => void;
|
|
808
668
|
align?: Align;
|
|
809
669
|
side?: Side;
|
|
670
|
+
/** Distância em pixels entre o conteúdo e o trigger */
|
|
671
|
+
sideOffset?: number;
|
|
672
|
+
/** Controla o estado de abertura em modo controlado */
|
|
673
|
+
open?: boolean;
|
|
674
|
+
/** Callback chamado quando o estado de abertura muda */
|
|
675
|
+
onOpenChange?: (open: boolean) => void;
|
|
676
|
+
/**
|
|
677
|
+
* Quando `true`, o trigger atua como âncora de posicionamento e o popover
|
|
678
|
+
* é aberto/fechado exclusivamente via `open`/`onOpenChange` (modo DatePicker).
|
|
679
|
+
* Quando `false` (padrão), o trigger continua abrindo/fechando o popover
|
|
680
|
+
* normalmente, mas o estado pode ser sincronizado via `open`/`onOpenChange`
|
|
681
|
+
* (modo Filter).
|
|
682
|
+
*/
|
|
683
|
+
asAnchor?: boolean;
|
|
684
|
+
/** Callback chamado quando o foco automático é ativado ao abrir o popover */
|
|
685
|
+
onOpenAutoFocus?: (event: Event) => void;
|
|
686
|
+
/** Callback chamado quando o foco automático é ativado ao fechar o popover */
|
|
687
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
688
|
+
/** Quando `true`, exibe uma seta apontando para o trigger */
|
|
689
|
+
showArrow?: boolean;
|
|
810
690
|
}
|
|
811
691
|
|
|
812
692
|
declare const Popover: React$1.FC<PopoverProps>;
|
|
@@ -1128,14 +1008,15 @@ interface BaseFilterItem {
|
|
|
1128
1008
|
id?: string;
|
|
1129
1009
|
buttonText: string | React__default.ReactNode;
|
|
1130
1010
|
icon?: React__default.ReactElement;
|
|
1131
|
-
|
|
1011
|
+
side?: Side;
|
|
1012
|
+
align?: Exclude<Align, 'center'>;
|
|
1132
1013
|
disabled?: boolean;
|
|
1133
1014
|
onToggle?: (isOpen: boolean) => void;
|
|
1134
1015
|
tooltip?: string;
|
|
1135
1016
|
}
|
|
1136
1017
|
interface CheckboxFilterItem extends BaseFilterItem {
|
|
1137
1018
|
type: 'checkbox' | 'text' | 'icon';
|
|
1138
|
-
items:
|
|
1019
|
+
items: FilterItem$1[];
|
|
1139
1020
|
selectedIds?: string[];
|
|
1140
1021
|
onSelectionChange?: (selectedIds: string[]) => void;
|
|
1141
1022
|
placeholder?: string;
|
|
@@ -1178,6 +1059,63 @@ interface TablePaginationProps extends React__default.HTMLAttributes<HTMLDivElem
|
|
|
1178
1059
|
}
|
|
1179
1060
|
declare const TablePagination: React__default.FC<TablePaginationProps>;
|
|
1180
1061
|
|
|
1062
|
+
/**
|
|
1063
|
+
* Props do componente TextArea
|
|
1064
|
+
* @example
|
|
1065
|
+
* ```tsx
|
|
1066
|
+
* <TextArea
|
|
1067
|
+
* label="Descrição"
|
|
1068
|
+
* value={description}
|
|
1069
|
+
* onChange={setDescription}
|
|
1070
|
+
* placeholder="Digite uma descrição"
|
|
1071
|
+
* />
|
|
1072
|
+
* ```
|
|
1073
|
+
* @example
|
|
1074
|
+
* ```tsx
|
|
1075
|
+
* <TextArea
|
|
1076
|
+
* label="Comentário"
|
|
1077
|
+
* required
|
|
1078
|
+
* maxLength={500}
|
|
1079
|
+
* showCharCount
|
|
1080
|
+
* helperText="Máximo de 500 caracteres"
|
|
1081
|
+
* errorMessage={error}
|
|
1082
|
+
* />
|
|
1083
|
+
* ```
|
|
1084
|
+
*/
|
|
1085
|
+
interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'value'> {
|
|
1086
|
+
/** Valor controlado do campo */
|
|
1087
|
+
value?: string;
|
|
1088
|
+
/** Callback executado quando o valor muda: (value) => void */
|
|
1089
|
+
onChange?: (value: string) => void;
|
|
1090
|
+
/** Label do campo */
|
|
1091
|
+
label?: string;
|
|
1092
|
+
/** Texto de ajuda exibido abaixo do campo */
|
|
1093
|
+
helperText?: string;
|
|
1094
|
+
/** Habilita tooltip */
|
|
1095
|
+
tooltip?: boolean;
|
|
1096
|
+
/** Texto do tooltip */
|
|
1097
|
+
tooltipText?: string;
|
|
1098
|
+
/** Lado onde o tooltip aparece */
|
|
1099
|
+
side?: Side;
|
|
1100
|
+
/** Alinhamento do tooltip */
|
|
1101
|
+
align?: Align;
|
|
1102
|
+
/**
|
|
1103
|
+
* Mensagem de erro exibida no campo.
|
|
1104
|
+
* Usada tanto pela validação interna (required, etc.)
|
|
1105
|
+
* quanto pelo controle externo via formulários (react-hook-form, formik, etc.)
|
|
1106
|
+
*/
|
|
1107
|
+
errorMessage?: string;
|
|
1108
|
+
/** Sinaliza erro externo para controle via formulários (react-hook-form, formik, etc.) */
|
|
1109
|
+
error?: boolean;
|
|
1110
|
+
/** Controla o redimensionamento do textarea */
|
|
1111
|
+
resize?: 'none' | 'vertical' | 'both';
|
|
1112
|
+
/** Exibe contador de caracteres (requer maxLength) */
|
|
1113
|
+
showCharCount?: boolean;
|
|
1114
|
+
height?: number;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
declare const _default$1: React__default.NamedExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
1118
|
+
|
|
1181
1119
|
/** Tipos de input suportados pelo TextField */
|
|
1182
1120
|
type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
1183
1121
|
/**
|
|
@@ -1225,10 +1163,18 @@ interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInp
|
|
|
1225
1163
|
side?: Side;
|
|
1226
1164
|
/** Alinhamento do tooltip */
|
|
1227
1165
|
align?: Align;
|
|
1228
|
-
/**
|
|
1166
|
+
/**
|
|
1167
|
+
* Mensagem de erro exibida no campo.
|
|
1168
|
+
* Usada tanto pela validação interna (required, formato, etc.)
|
|
1169
|
+
* quanto pelo controle externo via formulários (react-hook-form, formik, etc.)
|
|
1170
|
+
*/
|
|
1229
1171
|
errorMessage?: string;
|
|
1172
|
+
/** Sinaliza erro externo para controle via formulários (react-hook-form, formik, etc.) */
|
|
1173
|
+
error?: boolean;
|
|
1230
1174
|
/** Ícone a ser exibido no campo */
|
|
1231
1175
|
icon?: React__default.ReactNode;
|
|
1176
|
+
/** Mantém o ícone visível mesmo quando o campo tem valor */
|
|
1177
|
+
persistIcon?: boolean;
|
|
1232
1178
|
}
|
|
1233
1179
|
|
|
1234
1180
|
declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
@@ -1412,10 +1358,10 @@ declare const useToast: () => {
|
|
|
1412
1358
|
dismissToast: (id: string) => void;
|
|
1413
1359
|
};
|
|
1414
1360
|
|
|
1415
|
-
interface TooltipProps extends BaseProps
|
|
1361
|
+
interface TooltipProps extends BaseProps {
|
|
1416
1362
|
text: React__default.ReactNode;
|
|
1417
|
-
side?: Side
|
|
1418
|
-
align?: Align
|
|
1363
|
+
side?: Side;
|
|
1364
|
+
align?: Align;
|
|
1419
1365
|
sideOffset?: number;
|
|
1420
1366
|
/** Deslocamento em pixels no eixo de alinhamento */
|
|
1421
1367
|
alignOffset?: number;
|
|
@@ -1614,5 +1560,5 @@ declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, thresho
|
|
|
1614
1560
|
|
|
1615
1561
|
declare const normalizeText: (text: React.ReactNode) => string;
|
|
1616
1562
|
|
|
1617
|
-
export { Avatar, Badge, Button, Calendar, Callout, Checkbox, MemoizedChips as Chips, Container, _default$
|
|
1618
|
-
export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps,
|
|
1563
|
+
export { Avatar, Badge, Button, Calendar, Callout, Checkbox, MemoizedChips as Chips, Container, _default$2 as DatePicker, Dialog, Drawer, Filter, ListItem, Menu, Popover, memorizedQuantity as Quantity, Radio, Search, Select, Switch, Table, TableHeader, TablePagination, _default$1 as TextArea, _default as TextField, Toast, ToastContainer, ToastProvider, Tooltip, VerificationCode, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
|
|
1564
|
+
export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, FilterItem, FilterProps, ListItemProps, MenuProps, PopoverProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableHeaderProps, TablePaginationProps, TableProps, TextAreaProps, TextFieldProps, ToastProps, TooltipProps, VerificationCodeProps };
|