@giro-ds/react 3.0.7 → 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/Avatar/Avatar.d.ts +4 -0
- package/dist/dts-temp/components/Avatar/Avatar.types.d.ts +23 -0
- package/dist/dts-temp/components/Avatar/index.d.ts +2 -0
- package/dist/{components → dts-temp/components}/Button/Button.types.d.ts +6 -0
- 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/dts-temp/components/Dialog/Dialog.d.ts +4 -0
- package/dist/dts-temp/components/Dialog/Dialog.types.d.ts +27 -0
- 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.d.ts +4 -0
- package/dist/dts-temp/components/Popover/Popover.types.d.ts +25 -0
- package/dist/dts-temp/components/Popover/__test__/Popover.test.d.ts +1 -0
- package/dist/dts-temp/components/Popover/index.d.ts +2 -0
- package/dist/dts-temp/components/Radio/__tests__/Radio.test.d.ts +1 -0
- package/dist/{components → dts-temp/components}/Search/Search.types.d.ts +4 -1
- package/dist/dts-temp/components/Search/__tests__/Search.test.d.ts +1 -0
- package/dist/dts-temp/components/Select/__tests__/SelectRadix.test.d.ts +1 -0
- package/dist/dts-temp/components/Switch/__tests__/Switch.test.d.ts +1 -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/__tests__/TextArea.test.d.ts +1 -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/__tests__/Textfield.test.d.ts +1 -0
- package/dist/dts-temp/components/TextField/utils/__tests__/validation.test.d.ts +1 -0
- package/dist/dts-temp/components/Toast/Toast.d.ts +34 -0
- package/dist/dts-temp/components/Toast/Toast.types.d.ts +57 -0
- package/dist/dts-temp/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/dts-temp/components/Toast/components/ToastContainer.d.ts +22 -0
- package/dist/dts-temp/components/Toast/components/ToastProvider.d.ts +35 -0
- package/dist/dts-temp/components/Toast/index.d.ts +5 -0
- package/dist/dts-temp/components/Tooltip/Tooltip.types.d.ts +14 -0
- package/dist/dts-temp/components/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/{components → dts-temp/components}/index.d.ts +8 -6
- package/dist/dts-temp/contexts/ToastContext.d.ts +43 -0
- package/dist/dts-temp/hooks/useToast.d.ts +46 -0
- package/dist/dts-temp/index.d.ts +1 -0
- package/dist/index.cjs +3930 -5646
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +3918 -5636
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -2
- package/dist/components/Avatar/Avatar.d.ts +0 -3
- package/dist/components/Avatar/Avatar.types.d.ts +0 -23
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Calendar/Calendar.d.ts +0 -7
- package/dist/components/Calendar/Calendar.types.d.ts +0 -86
- package/dist/components/Calendar/i18n.d.ts +0 -56
- package/dist/components/DatePicker/DateUtils.d.ts +0 -23
- package/dist/components/Dialog/Dialog.d.ts +0 -4
- package/dist/components/Dialog/Dialog.types.d.ts +0 -48
- package/dist/components/Dialog/utils/DialogUtils.d.ts +0 -1
- 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/Toast/Toast.d.ts +0 -13
- package/dist/components/Toast/Toast.types.d.ts +0 -59
- package/dist/components/Toast/index.d.ts +0 -2
- package/dist/components/Tooltip/Tooltip.types.d.ts +0 -39
- package/dist/index.d.ts +0 -1496
- /package/dist/{components/Button/__tests__/Button.test.d.ts → dts-temp/components/Avatar/__tests__/Avatar.test.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/Menu/__tests__/Menu.test.d.ts → 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/Radio/__tests__/Radio.test.d.ts → 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/Container/index.d.ts → 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/Select/__tests__/SelectRadix.test.d.ts → 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/Switch/__tests__/Switch.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/TextField/__tests__/Textfield.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/TextField/utils/__tests__/validation.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/Tooltip/__tests__/Tooltip.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}/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 → 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/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 → 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 → 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 → dts-temp/components}/TextField/TextField.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}/Tooltip/Tooltip.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/{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/{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,1496 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ReactNode, ReactElement, CSSProperties } from 'react';
|
|
4
|
-
|
|
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 {
|
|
13
|
-
id?: string;
|
|
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;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare let Avatar: ({ id, icon, size, className, ...rest }: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
41
|
-
|
|
42
|
-
/** Tipos de badge suportados */
|
|
43
|
-
type BadgeType = 'notification' | 'status';
|
|
44
|
-
/** Valores possíveis para exibição no badge */
|
|
45
|
-
type BadgeValue = number | string | null;
|
|
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 {
|
|
66
|
-
/** Tipo de badge (notificação ou status) */
|
|
67
|
-
type: BadgeType;
|
|
68
|
-
/** Conteúdo a ser envolvido pelo badge */
|
|
69
|
-
children?: ReactNode;
|
|
70
|
-
/** Valor a ser exibido no badge (número, texto ou null) */
|
|
71
|
-
badgeValue?: BadgeValue;
|
|
72
|
-
/** Valor máximo a ser exibido (ex: 99+ quando badgeValue > maxValue) */
|
|
73
|
-
maxValue?: number;
|
|
74
|
-
/** Label acessível para leitores de tela */
|
|
75
|
-
'aria-label'?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
declare const Badge: React__default.FC<BadgeProps>;
|
|
79
|
-
|
|
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) */
|
|
102
|
-
as?: React__default.ElementType;
|
|
103
|
-
/** Conteúdo do botão */
|
|
104
|
-
children?: React__default.ReactNode;
|
|
105
|
-
/** Variante visual do botão */
|
|
106
|
-
variant?: Variant;
|
|
107
|
-
/** Define se o botão exibe apenas ícone (sem texto) */
|
|
108
|
-
iconOnly?: boolean;
|
|
109
|
-
/** Posição do ícone em relação ao texto */
|
|
110
|
-
iconPosition?: Position;
|
|
111
|
-
/** URL de destino quando usado como link (renderiza <a>) */
|
|
112
|
-
href?: string;
|
|
113
|
-
/** Rota de destino para roteadores (ex: React Router) */
|
|
114
|
-
to?: string;
|
|
115
|
-
/** Define se o link abre em nova aba */
|
|
116
|
-
external?: boolean;
|
|
117
|
-
/** Atributo target do HTML para links */
|
|
118
|
-
target?: string;
|
|
119
|
-
/** Atributo rel do HTML para links */
|
|
120
|
-
rel?: string;
|
|
121
|
-
/** Tipo HTML do botão */
|
|
122
|
-
type?: 'button' | 'submit' | 'reset';
|
|
123
|
-
/** Tamanho do botão */
|
|
124
|
-
size?: Size;
|
|
125
|
-
/** Ícone a ser exibido no botão */
|
|
126
|
-
icon?: React__default.ReactNode;
|
|
127
|
-
/** Define se o botão ocupa 100% da largura do container */
|
|
128
|
-
fullWidth?: boolean;
|
|
129
|
-
/** Label acessível para leitores de tela */
|
|
130
|
-
ariaLabel?: string;
|
|
131
|
-
/** Estado de carregamento (exibe spinner) */
|
|
132
|
-
loading?: boolean;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLElement>>;
|
|
136
|
-
|
|
137
|
-
/** Formatos de exibição de data disponíveis */
|
|
138
|
-
type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy';
|
|
139
|
-
/**
|
|
140
|
-
* Representa um dia no calendário
|
|
141
|
-
*/
|
|
142
|
-
interface DayItem {
|
|
143
|
-
/** Tipo do item (sempre 'day') */
|
|
144
|
-
type: 'day';
|
|
145
|
-
/** Chave única para renderização */
|
|
146
|
-
key: number;
|
|
147
|
-
/** Número do dia */
|
|
148
|
-
day: number;
|
|
149
|
-
/** Objeto Date completo */
|
|
150
|
-
date: Date;
|
|
151
|
-
/** Indica se é o dia atual */
|
|
152
|
-
isToday: boolean;
|
|
153
|
-
/** Indica se o dia está selecionado */
|
|
154
|
-
isSelected: boolean;
|
|
155
|
-
/** Label acessível do dia */
|
|
156
|
-
label: string;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Representa um espaço vazio no grid do calendário
|
|
160
|
-
*/
|
|
161
|
-
interface EmptyItem {
|
|
162
|
-
/** Tipo do item (sempre 'empty') */
|
|
163
|
-
type: 'empty';
|
|
164
|
-
/** Chave única para renderização */
|
|
165
|
-
key: string;
|
|
166
|
-
}
|
|
167
|
-
/** Item do calendário (pode ser um dia ou espaço vazio) */
|
|
168
|
-
type CalendarItem = DayItem | EmptyItem;
|
|
169
|
-
/**
|
|
170
|
-
* Representa um ano na visualização de seleção de ano
|
|
171
|
-
*/
|
|
172
|
-
interface YearItem {
|
|
173
|
-
/** Número do ano */
|
|
174
|
-
year: number;
|
|
175
|
-
/** Indica se é o ano atual */
|
|
176
|
-
isCurrent: boolean;
|
|
177
|
-
/** Chave única para renderização */
|
|
178
|
-
key: number;
|
|
179
|
-
}
|
|
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 */
|
|
204
|
-
currentDate: Date | null;
|
|
205
|
-
/** Dia selecionado pelo usuário */
|
|
206
|
-
selectedDate?: Date | null;
|
|
207
|
-
/** Callback executado quando a data escolhida é alterada: (date) => void */
|
|
208
|
-
onDateChange?: (date: Date) => void;
|
|
209
|
-
/** Callback executado quando um dia é selecionado: (date) => void */
|
|
210
|
-
onDaySelect?: (date: Date) => void;
|
|
211
|
-
/** Callback executado ao limpar a seleção: () => void */
|
|
212
|
-
onClear?: () => void;
|
|
213
|
-
/** Data mínima selecionável */
|
|
214
|
-
minDate?: Date;
|
|
215
|
-
/** Data máxima selecionável */
|
|
216
|
-
maxDate?: Date;
|
|
217
|
-
/** Locale do calendário */
|
|
218
|
-
locale?: Locale;
|
|
219
|
-
/** Formato de exibição da data */
|
|
220
|
-
format?: DateFormat;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
declare const MemoizedCalendar: React__default.NamedExoticComponent<CalendarProps>;
|
|
224
|
-
|
|
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) */
|
|
249
|
-
title?: string | null;
|
|
250
|
-
/** Texto descritivo do callout */
|
|
251
|
-
text?: string;
|
|
252
|
-
/** Ícone a ser exibido no callout */
|
|
253
|
-
icon?: React$1.ReactNode;
|
|
254
|
-
/** Props adicionais para o elemento div */
|
|
255
|
-
[key: string]: any;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
declare const Callout: React__default.FC<CalloutProps>;
|
|
259
|
-
|
|
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 */
|
|
284
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
285
|
-
/** Estado inicial (modo não controlado) */
|
|
286
|
-
defaultChecked?: boolean;
|
|
287
|
-
/** Estado atual (modo controlado) */
|
|
288
|
-
checked?: boolean;
|
|
289
|
-
/** Estado indeterminado (usado em selecionar todos com seleção parcial) */
|
|
290
|
-
indeterminate?: boolean;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
294
|
-
|
|
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 */
|
|
319
|
-
title: string;
|
|
320
|
-
/** Ícone posicionado à esquerda do texto */
|
|
321
|
-
leftIcon?: React$1.ReactNode;
|
|
322
|
-
/** Ícone posicionado à direita do texto */
|
|
323
|
-
rightIcon?: React$1.ReactNode;
|
|
324
|
-
/** Props adicionais para o elemento div */
|
|
325
|
-
[key: string]: any;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
declare const MemoizedChips: React__default.NamedExoticComponent<ChipsProps>;
|
|
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
|
-
*/
|
|
340
|
-
interface ContainerProps {
|
|
341
|
-
/** Conteúdo a ser renderizado dentro do container */
|
|
342
|
-
children: React__default.ReactNode;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
declare function Container({ children }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
346
|
-
|
|
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 {
|
|
371
|
-
/** Locale para formatação da data */
|
|
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 */
|
|
376
|
-
helperText?: string;
|
|
377
|
-
/** Define se o campo é obrigatório */
|
|
378
|
-
required?: boolean;
|
|
379
|
-
/** Label do campo de data */
|
|
380
|
-
label?: string;
|
|
381
|
-
/** Valor controlado da data */
|
|
382
|
-
value?: Date | null;
|
|
383
|
-
/** Valor inicial para modo não controlado */
|
|
384
|
-
defaultValue?: Date | null;
|
|
385
|
-
/** Callback executado quando a data muda: (date) => void */
|
|
386
|
-
onChange?: (date: Date | null) => void;
|
|
387
|
-
/** Mensagem de erro a ser exibida */
|
|
388
|
-
error?: string;
|
|
389
|
-
/** Data mínima selecionável */
|
|
390
|
-
minDate?: Date;
|
|
391
|
-
/** Data máxima selecionável */
|
|
392
|
-
maxDate?: Date;
|
|
393
|
-
/** ID para testes automatizados */
|
|
394
|
-
'data-testid'?: string;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
declare const _default$1: React__default.NamedExoticComponent<DatePickerProps>;
|
|
398
|
-
|
|
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 */
|
|
427
|
-
children?: ReactNode;
|
|
428
|
-
/** Define se o dialog está visível */
|
|
429
|
-
show: boolean;
|
|
430
|
-
/** Título exibido no cabeçalho do dialog */
|
|
431
|
-
title: string;
|
|
432
|
-
/** Texto ou conteúdo do corpo do dialog */
|
|
433
|
-
text?: ReactNode;
|
|
434
|
-
/** Texto do botão de confirmação */
|
|
435
|
-
textConfirm?: string;
|
|
436
|
-
/** Texto do botão de cancelamento */
|
|
437
|
-
textCancel?: string;
|
|
438
|
-
/** Callback executado ao confirmar: () => void */
|
|
439
|
-
fnConfirm?: () => void;
|
|
440
|
-
/** Callback executado ao cancelar: () => void */
|
|
441
|
-
fnCancel?: () => void;
|
|
442
|
-
/** Callback executado ao fechar o dialog: () => void */
|
|
443
|
-
onClose?: () => void;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
declare const MemoizedDialog: React__default.NamedExoticComponent<DialogProps>;
|
|
447
|
-
|
|
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 */
|
|
479
|
-
children?: ReactNode;
|
|
480
|
-
/** Largura customizada do drawer (ex: '400px', '50%') */
|
|
481
|
-
customWidth?: string;
|
|
482
|
-
/** Callback executado ao fechar o drawer: () => void */
|
|
483
|
-
onClose: () => void;
|
|
484
|
-
/** Título exibido no cabeçalho do drawer */
|
|
485
|
-
title?: string;
|
|
486
|
-
/** Define se o drawer está aberto */
|
|
487
|
-
isOpen: boolean;
|
|
488
|
-
/** Callback executado ao abrir o drawer: () => void */
|
|
489
|
-
onOpen?: () => void;
|
|
490
|
-
/** Callback executado ao clicar no overlay: () => void */
|
|
491
|
-
onOverlayClick?: () => void;
|
|
492
|
-
/** Define se o drawer fecha ao clicar no overlay */
|
|
493
|
-
closeOnOverlayClick?: boolean;
|
|
494
|
-
/** Define se o drawer fecha ao pressionar ESC */
|
|
495
|
-
closeOnEscape?: boolean;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* Componente Drawer do Zanthus Design System
|
|
500
|
-
* Implementa um painel lateral deslizante com overlay
|
|
501
|
-
* Segue padrões WCAG 2.1 AA para acessibilidade
|
|
502
|
-
*/
|
|
503
|
-
declare const Drawer: React__default.FC<DrawerProps>;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Representa um item individual do dropdown
|
|
507
|
-
*/
|
|
508
|
-
interface DropdownItem {
|
|
509
|
-
/** ID único do item (será gerado automaticamente se não fornecido) */
|
|
510
|
-
id?: string;
|
|
511
|
-
/** Texto principal do item */
|
|
512
|
-
text: string;
|
|
513
|
-
/** Texto secundário/descrição do item */
|
|
514
|
-
subText?: string;
|
|
515
|
-
/** Ícone do item */
|
|
516
|
-
icon?: React__default.ReactNode;
|
|
517
|
-
/** Define se o item está desabilitado */
|
|
518
|
-
disabled?: boolean;
|
|
519
|
-
}
|
|
520
|
-
/** Tipos de dropdown disponíveis */
|
|
521
|
-
type DropdownType = 'text' | 'checkbox' | 'icon';
|
|
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) */
|
|
549
|
-
position?: 'top' | 'bottom';
|
|
550
|
-
/** Array de itens para o dropdown */
|
|
551
|
-
items: DropdownItem[];
|
|
552
|
-
/** Tipo do dropdown */
|
|
553
|
-
type?: DropdownType;
|
|
554
|
-
/** Habilita campo de busca */
|
|
555
|
-
applySearch?: boolean;
|
|
556
|
-
/** Placeholder do campo de busca */
|
|
557
|
-
placeholder?: string;
|
|
558
|
-
/** Callback executado quando a seleção muda: (selectedIds) => void */
|
|
559
|
-
onSelectionChange?: (selectedIds: string[]) => void;
|
|
560
|
-
/** Controla exibição do subtexto dos itens */
|
|
561
|
-
showSubText?: boolean;
|
|
562
|
-
/** IDs dos itens selecionados por padrão */
|
|
563
|
-
defaultSelectedIds?: string[];
|
|
564
|
-
/** Estado inicial dos itens selecionados (objeto chave-valor) */
|
|
565
|
-
initialItemsSelected?: Record<string, boolean>;
|
|
566
|
-
/** Largura do dropdown */
|
|
567
|
-
width?: string | number;
|
|
568
|
-
/** Largura máxima do dropdown */
|
|
569
|
-
maxWidth?: string | number;
|
|
570
|
-
/** Largura mínima do dropdown */
|
|
571
|
-
minWidth?: string | number;
|
|
572
|
-
/** Altura máxima do dropdown */
|
|
573
|
-
maxHeight?: string | number;
|
|
574
|
-
/** Define se o componente está sendo usado para filtro */
|
|
575
|
-
filter?: boolean;
|
|
576
|
-
/** Configurações para paginação infinita */
|
|
577
|
-
infiniteScroll?: {
|
|
578
|
-
/** Status atual do carregamento */
|
|
579
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
580
|
-
/** Página atual */
|
|
581
|
-
page: number;
|
|
582
|
-
/** Última página disponível */
|
|
583
|
-
lastPage: number;
|
|
584
|
-
/** Callback executado para carregar próxima página: () => void */
|
|
585
|
-
onLoadMore: () => void;
|
|
586
|
-
/** Threshold para trigger do scroll infinito (0-1) */
|
|
587
|
-
threshold?: number;
|
|
588
|
-
/** Margem para trigger do scroll infinito */
|
|
589
|
-
rootMargin?: string;
|
|
590
|
-
/** Modo de debug */
|
|
591
|
-
debug?: boolean;
|
|
592
|
-
};
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
declare const MemoizedDropdown: React__default.NamedExoticComponent<DropdownProps>;
|
|
596
|
-
|
|
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 */
|
|
623
|
-
items?: DropdownItem[];
|
|
624
|
-
/** Tipo do filtro (dropdown ou calendário) */
|
|
625
|
-
type?: DropdownType | 'calendar';
|
|
626
|
-
/** IDs dos itens selecionados */
|
|
627
|
-
selectedIds?: string[];
|
|
628
|
-
/** Callback executado ao aplicar filtro: (selectedIds) => void */
|
|
629
|
-
onApplyFilter?: (selectedIds: string[]) => void;
|
|
630
|
-
/** Placeholder do campo de busca */
|
|
631
|
-
placeholder?: string;
|
|
632
|
-
/** Habilita campo de busca no dropdown */
|
|
633
|
-
enableSearch?: boolean;
|
|
634
|
-
/** Texto ou conteúdo do botão de filtro */
|
|
635
|
-
buttonText?: string | ReactNode;
|
|
636
|
-
/** Ícone do botão de filtro */
|
|
637
|
-
icon?: ReactElement;
|
|
638
|
-
/** Variante visual do botão */
|
|
639
|
-
variant?: Variant;
|
|
640
|
-
/** Callback executado ao abrir o filtro: () => void */
|
|
641
|
-
onOpen?: () => void;
|
|
642
|
-
/** Callback executado ao fechar o filtro: () => void */
|
|
643
|
-
onClose?: () => void;
|
|
644
|
-
/** Posição do dropdown em relação ao botão */
|
|
645
|
-
position?: Position;
|
|
646
|
-
/** Data selecionada (para tipo calendar) */
|
|
647
|
-
selectedDate?: Date | null;
|
|
648
|
-
/** Callback executado ao selecionar data: (date) => void */
|
|
649
|
-
onDateSelect?: (date: Date) => void;
|
|
650
|
-
/** Callback executado ao limpar data: () => void */
|
|
651
|
-
onClearDate?: () => void;
|
|
652
|
-
/** Data mínima selecionável (para tipo calendar) */
|
|
653
|
-
minDate?: Date;
|
|
654
|
-
/** Data máxima selecionável (para tipo calendar) */
|
|
655
|
-
maxDate?: Date;
|
|
656
|
-
/** Locale do calendário */
|
|
657
|
-
locale?: Locale;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
declare const Filter: React__default.FC<FilterProps>;
|
|
661
|
-
|
|
662
|
-
/** Variantes disponíveis para o ListItem */
|
|
663
|
-
type ListItemVariant = 'text' | 'checkbox' | 'radio' | 'icon';
|
|
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 {
|
|
687
|
-
/** Variante do item da lista */
|
|
688
|
-
variant?: ListItemVariant;
|
|
689
|
-
/** Texto principal do item */
|
|
690
|
-
text?: string;
|
|
691
|
-
/** Nome do input (para variantes checkbox/radio) */
|
|
692
|
-
name?: string;
|
|
693
|
-
/** Texto secundário/descrição do item */
|
|
694
|
-
subText?: string;
|
|
695
|
-
/** Estado de checked (para variantes checkbox/radio) */
|
|
696
|
-
checked?: boolean;
|
|
697
|
-
/** Estado de selecionado (para variantes text/icon) */
|
|
698
|
-
selected?: boolean;
|
|
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 */
|
|
702
|
-
onChange?: (checked: boolean) => void;
|
|
703
|
-
/** Ícone do item (para variante icon) */
|
|
704
|
-
icon?: React$1.ReactNode;
|
|
705
|
-
/** Valor do input (para variantes checkbox/radio) */
|
|
706
|
-
value?: string;
|
|
707
|
-
/** Define se deve mostrar o subtexto */
|
|
708
|
-
showSubText?: boolean;
|
|
709
|
-
/** Estado de hover */
|
|
710
|
-
hovered?: boolean;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
declare const ListItem: React__default.FC<ListItemProps>;
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Representa um item do menu (suporta subitens aninhados)
|
|
717
|
-
*/
|
|
718
|
-
interface MenuItemProps {
|
|
719
|
-
/** ID único do item */
|
|
720
|
-
id?: string;
|
|
721
|
-
/** Texto principal do item */
|
|
722
|
-
text?: string;
|
|
723
|
-
/** Texto secundário/descrição do item */
|
|
724
|
-
subText?: string;
|
|
725
|
-
/** Estado desabilitado do item */
|
|
726
|
-
disabled?: boolean;
|
|
727
|
-
/** Ícone do item */
|
|
728
|
-
icon?: React$1.ReactNode;
|
|
729
|
-
/** Subitens do menu (para menus aninhados) */
|
|
730
|
-
children?: MenuItemProps[];
|
|
731
|
-
/** Valor do item */
|
|
732
|
-
value?: string;
|
|
733
|
-
}
|
|
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 */
|
|
763
|
-
items: MenuItemProps[];
|
|
764
|
-
/** Elemento trigger customizado para abrir o menu */
|
|
765
|
-
children?: ReactElement;
|
|
766
|
-
/** Tipo de visualização do menu */
|
|
767
|
-
type?: 'text' | 'icon';
|
|
768
|
-
/** Callback executado quando um item é selecionado: (item) => void */
|
|
769
|
-
onItemSelect?: (items: MenuItemProps) => void;
|
|
770
|
-
/** Array de itens selecionados */
|
|
771
|
-
selectedItems?: MenuItemProps[];
|
|
772
|
-
/** Habilita campo de busca */
|
|
773
|
-
search?: boolean;
|
|
774
|
-
/** Alinhamento do menu */
|
|
775
|
-
align?: 'start' | 'end' | 'center';
|
|
776
|
-
/** Altura máxima do menu */
|
|
777
|
-
maxHeight?: number | string;
|
|
778
|
-
/** Habilita scroll infinito */
|
|
779
|
-
enableInfiniteScroll?: boolean;
|
|
780
|
-
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
781
|
-
onScrollEnd?: () => void;
|
|
782
|
-
/** Estado de carregamento de mais itens */
|
|
783
|
-
isLoadingMore?: boolean;
|
|
784
|
-
/** Habilita busca via API */
|
|
785
|
-
enableApiSearch?: boolean;
|
|
786
|
-
/** Callback executado na busca via API: (searchTerm) => void */
|
|
787
|
-
onApiSearch?: (searchTerm: string) => void;
|
|
788
|
-
/** Callback executado quando o menu abre/fecha: (open) => void */
|
|
789
|
-
onOpenChange?: (open: boolean) => void;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
declare const Menu: React__default.FC<MenuProps>;
|
|
793
|
-
|
|
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) */
|
|
817
|
-
defaultValue?: number;
|
|
818
|
-
/** Valor atual (modo controlado) */
|
|
819
|
-
value?: number;
|
|
820
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
821
|
-
onChange?: (value: number) => void;
|
|
822
|
-
/** Habilita entrada de valores decimais */
|
|
823
|
-
decimal?: boolean;
|
|
824
|
-
/** Tamanho do componente */
|
|
825
|
-
size?: Size;
|
|
826
|
-
/** Número de casas decimais permitidas */
|
|
827
|
-
decimalPlaces?: number;
|
|
828
|
-
/** Incremento/decremento ao clicar nos botões */
|
|
829
|
-
step?: number;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
declare const memorizedQuantity: React__default.NamedExoticComponent<QuantityProps>;
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Props de um item individual de rádio
|
|
836
|
-
*/
|
|
837
|
-
interface RadioProps {
|
|
838
|
-
/** ID único do elemento */
|
|
839
|
-
id?: string | number;
|
|
840
|
-
/** Valor do radio button */
|
|
841
|
-
value: string;
|
|
842
|
-
/** Label exibida ao lado do radio button */
|
|
843
|
-
label: string;
|
|
844
|
-
/** Estado desabilitado do item */
|
|
845
|
-
disabled?: boolean;
|
|
846
|
-
}
|
|
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 */
|
|
873
|
-
items: RadioProps[];
|
|
874
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
875
|
-
onValueChange?: (value: string) => void;
|
|
876
|
-
/** Valor inicial selecionado */
|
|
877
|
-
defaultValue?: string;
|
|
878
|
-
/** Nome do grupo de radio buttons */
|
|
879
|
-
name?: string;
|
|
880
|
-
/** Label acessível para leitores de tela */
|
|
881
|
-
ariaLabel?: string;
|
|
882
|
-
/** Orientação do layout dos radio buttons */
|
|
883
|
-
orientation?: "horizontal" | "vertical";
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
declare const Radio: React__default.FC<RadioGroupProps>;
|
|
887
|
-
|
|
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 */
|
|
911
|
-
placeholder?: string;
|
|
912
|
-
/** Valor controlado do campo */
|
|
913
|
-
value?: string;
|
|
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 */
|
|
923
|
-
onClear?: () => void;
|
|
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 */
|
|
929
|
-
'data-testid'?: string;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Representa um item do select
|
|
936
|
-
*/
|
|
937
|
-
interface SelectItemProps extends BaseProps {
|
|
938
|
-
/** Texto principal do item */
|
|
939
|
-
text: ReactNode;
|
|
940
|
-
/** Subtítulo ou descrição do item */
|
|
941
|
-
subTitle?: ReactNode;
|
|
942
|
-
/** Ícone do item */
|
|
943
|
-
icon?: ReactNode;
|
|
944
|
-
/** Valor do item */
|
|
945
|
-
value: string;
|
|
946
|
-
/** Define se o item está selecionado */
|
|
947
|
-
selected?: boolean;
|
|
948
|
-
/** Subitens do select (para selects aninhados) */
|
|
949
|
-
children?: SelectItemProps[];
|
|
950
|
-
}
|
|
951
|
-
/** Variantes disponíveis para o Select */
|
|
952
|
-
type SelectVariant = 'text' | 'icon' | 'checkbox';
|
|
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 */
|
|
982
|
-
items: SelectItemProps[];
|
|
983
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
984
|
-
onValueChange?: (value: string | string[]) => void;
|
|
985
|
-
/** Callback executado quando o select abre/fecha: (open) => void */
|
|
986
|
-
onOpenChange?: (open: boolean) => void;
|
|
987
|
-
/** Variante visual do select */
|
|
988
|
-
variant: SelectVariant;
|
|
989
|
-
/** Define se o campo é obrigatório */
|
|
990
|
-
required?: boolean;
|
|
991
|
-
/** Valor(es) selecionado(s) */
|
|
992
|
-
value?: string | string[];
|
|
993
|
-
/** Habilita seleção múltipla */
|
|
994
|
-
multiple?: boolean;
|
|
995
|
-
/** Placeholder do campo */
|
|
996
|
-
placeholder?: string;
|
|
997
|
-
/** Habilita campo de busca */
|
|
998
|
-
search?: boolean;
|
|
999
|
-
/** Label do campo */
|
|
1000
|
-
label?: string;
|
|
1001
|
-
/** Texto de ajuda exibido abaixo do campo */
|
|
1002
|
-
helperText?: string;
|
|
1003
|
-
/** Largura máxima do select */
|
|
1004
|
-
maxWidth?: number;
|
|
1005
|
-
/** Mensagem de erro a ser exibida */
|
|
1006
|
-
errorMessage?: string;
|
|
1007
|
-
/** Label acessível para leitores de tela */
|
|
1008
|
-
'aria-label'?: string;
|
|
1009
|
-
/** ID para testes automatizados */
|
|
1010
|
-
'data-testid'?: string;
|
|
1011
|
-
/** Habilita tooltip */
|
|
1012
|
-
tooltip?: boolean;
|
|
1013
|
-
/** Texto do tooltip */
|
|
1014
|
-
tooltipText?: string;
|
|
1015
|
-
/** Lado onde o dropdown abre */
|
|
1016
|
-
side?: Side;
|
|
1017
|
-
/** Alinhamento do dropdown */
|
|
1018
|
-
align?: Align;
|
|
1019
|
-
/** Habilita scroll infinito */
|
|
1020
|
-
enableInfiniteScroll?: boolean;
|
|
1021
|
-
/** Callback executado ao chegar ao final do scroll: () => void */
|
|
1022
|
-
onScrollEnd?: () => void;
|
|
1023
|
-
/** Estado de carregamento de mais itens */
|
|
1024
|
-
isLoadingMore?: boolean;
|
|
1025
|
-
/** Habilita busca via API */
|
|
1026
|
-
enableApiSearch?: boolean;
|
|
1027
|
-
/** Callback executado na busca via API: (term) => void */
|
|
1028
|
-
onApiSearch?: (term: string) => void;
|
|
1029
|
-
/** Estado de busca em andamento */
|
|
1030
|
-
isSearching?: boolean;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
declare const Select: React__default.FC<SelectProps>;
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* Tipo base para dados da tabela. Use `<Table<SeuTipo>>` para type-safety completo.
|
|
1037
|
-
* @example <Table<User> dataSource={users} />
|
|
1038
|
-
*/
|
|
1039
|
-
type TableRowData = Record<string, any>;
|
|
1040
|
-
/** Tipos de coluna suportados */
|
|
1041
|
-
type TableColumnType = 'text' | 'datetime' | 'custom';
|
|
1042
|
-
/** Opções de alinhamento de coluna */
|
|
1043
|
-
type TableAlign = 'left' | 'center' | 'right';
|
|
1044
|
-
/**
|
|
1045
|
-
* Configuração de coluna da tabela
|
|
1046
|
-
* @typeParam T - Tipo dos dados da linha
|
|
1047
|
-
*/
|
|
1048
|
-
interface TableColumn<T = TableRowData> {
|
|
1049
|
-
/** Chave única identificadora da coluna */
|
|
1050
|
-
key: string;
|
|
1051
|
-
/** Conteúdo do cabeçalho da coluna */
|
|
1052
|
-
label: ReactNode;
|
|
1053
|
-
/** Tipo de dados da coluna */
|
|
1054
|
-
type?: TableColumnType;
|
|
1055
|
-
/** Formato de exibição (ex: 'dd/MM/yyyy' para datetime) */
|
|
1056
|
-
format?: string;
|
|
1057
|
-
/** Função customizada para renderizar o conteúdo da célula */
|
|
1058
|
-
render?: (row: T, index: number) => ReactNode;
|
|
1059
|
-
/** Alinhamento do conteúdo */
|
|
1060
|
-
align?: TableAlign;
|
|
1061
|
-
/** Estilos CSS customizados */
|
|
1062
|
-
style?: CSSProperties;
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Props do componente Table. Use genérico para autocomplete: `<Table<User>>`
|
|
1066
|
-
* @typeParam T - Tipo dos dados da linha
|
|
1067
|
-
*/
|
|
1068
|
-
interface TableProps<T = TableRowData> extends BaseProps {
|
|
1069
|
-
/** Configuração das colunas */
|
|
1070
|
-
columns: TableColumn<T>[];
|
|
1071
|
-
/** Array de dados a serem exibidos */
|
|
1072
|
-
dataSource: T[];
|
|
1073
|
-
/** Estado de carregamento */
|
|
1074
|
-
loading?: boolean;
|
|
1075
|
-
/** Configuração de seleção de linhas */
|
|
1076
|
-
rowSelection?: {
|
|
1077
|
-
/** Keys das linhas selecionadas (modo controlado) */
|
|
1078
|
-
selectedRowKeys?: (string | number)[];
|
|
1079
|
-
/** Callback quando seleção muda: (keys, rows) => void */
|
|
1080
|
-
onChange?: (keys: (string | number)[], rows: T[]) => void;
|
|
1081
|
-
/** Customiza props dos checkboxes: (row, index) => { disabled? } */
|
|
1082
|
-
getCheckboxProps?: (row: T, index: number) => {
|
|
1083
|
-
disabled?: boolean;
|
|
1084
|
-
};
|
|
1085
|
-
/** Desabilita o checkbox "selecionar todos" */
|
|
1086
|
-
disableSelectAll?: boolean;
|
|
1087
|
-
};
|
|
1088
|
-
/** Configurações de localização */
|
|
1089
|
-
locale?: {
|
|
1090
|
-
/** Texto quando não há dados */
|
|
1091
|
-
emptyText?: ReactNode;
|
|
1092
|
-
};
|
|
1093
|
-
/** Eventos de linha: (row, index) => { onClick?, onDoubleClick?, className? } */
|
|
1094
|
-
onRow?: (row: T, index: number) => {
|
|
1095
|
-
/** Clique simples na linha */
|
|
1096
|
-
onClick?: () => void;
|
|
1097
|
-
/** Clique duplo na linha */
|
|
1098
|
-
onDoubleClick?: () => void;
|
|
1099
|
-
/** Classe CSS da linha */
|
|
1100
|
-
className?: string;
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
declare const Table: <T extends TableRowData = TableRowData>({ columns, dataSource, className, loading, rowSelection, locale, onRow, ...rest }: TableProps<T>) => react_jsx_runtime.JSX.Element | null;
|
|
1105
|
-
|
|
1106
|
-
interface BaseFilterItem {
|
|
1107
|
-
id?: string;
|
|
1108
|
-
buttonText: string | React__default.ReactNode;
|
|
1109
|
-
icon?: React__default.ReactElement;
|
|
1110
|
-
position?: 'left' | 'right';
|
|
1111
|
-
disabled?: boolean;
|
|
1112
|
-
onToggle?: (isOpen: boolean) => void;
|
|
1113
|
-
tooltip?: string;
|
|
1114
|
-
}
|
|
1115
|
-
interface CheckboxFilterItem extends BaseFilterItem {
|
|
1116
|
-
type: 'checkbox' | 'text' | 'icon';
|
|
1117
|
-
items: DropdownItem[];
|
|
1118
|
-
selectedIds?: string[];
|
|
1119
|
-
onSelectionChange?: (selectedIds: string[]) => void;
|
|
1120
|
-
placeholder?: string;
|
|
1121
|
-
enableSearch?: boolean;
|
|
1122
|
-
}
|
|
1123
|
-
interface CalendarFilterItem extends BaseFilterItem {
|
|
1124
|
-
type: 'calendar';
|
|
1125
|
-
selectedDate?: Date | null;
|
|
1126
|
-
onDateSelect?: (date: Date) => void;
|
|
1127
|
-
onClear?: () => void;
|
|
1128
|
-
minDate?: Date;
|
|
1129
|
-
maxDate?: Date;
|
|
1130
|
-
locale?: string;
|
|
1131
|
-
placeholder?: string;
|
|
1132
|
-
}
|
|
1133
|
-
type FilterItem = CheckboxFilterItem | CalendarFilterItem;
|
|
1134
|
-
interface TableHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1135
|
-
searchValue?: string;
|
|
1136
|
-
onSearchChange?: (value: string) => void;
|
|
1137
|
-
searchPlaceholder?: string;
|
|
1138
|
-
showSearch?: boolean;
|
|
1139
|
-
showFilters?: boolean;
|
|
1140
|
-
filters?: React__default.ReactNode;
|
|
1141
|
-
filterItems?: FilterItem[];
|
|
1142
|
-
className?: string;
|
|
1143
|
-
onSearch?: (value: string) => void;
|
|
1144
|
-
showClearSearch?: boolean;
|
|
1145
|
-
}
|
|
1146
|
-
declare const TableHeader: React__default.FC<TableHeaderProps>;
|
|
1147
|
-
|
|
1148
|
-
interface TablePaginationProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1149
|
-
currentPage: number;
|
|
1150
|
-
totalItems: number;
|
|
1151
|
-
itemsPerPage: number;
|
|
1152
|
-
onPageChange: (page: number) => void;
|
|
1153
|
-
onItemsPerPageChange: (itemsPerPage: number) => void;
|
|
1154
|
-
pageSizeOptions?: number[];
|
|
1155
|
-
disabled?: boolean;
|
|
1156
|
-
className?: string;
|
|
1157
|
-
}
|
|
1158
|
-
declare const TablePagination: React__default.FC<TablePaginationProps>;
|
|
1159
|
-
|
|
1160
|
-
/** Tipos de input suportados pelo TextField */
|
|
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
|
-
*/
|
|
1188
|
-
interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
|
|
1189
|
-
/** Valor controlado do campo */
|
|
1190
|
-
value?: string | number;
|
|
1191
|
-
/** Callback executado quando o valor muda: (value) => void */
|
|
1192
|
-
onChange?: (value: string) => void;
|
|
1193
|
-
/** Label do campo */
|
|
1194
|
-
label?: string;
|
|
1195
|
-
/** Tipo do input */
|
|
1196
|
-
type?: TextFieldType;
|
|
1197
|
-
/** Texto de ajuda exibido abaixo do campo */
|
|
1198
|
-
helperText?: string;
|
|
1199
|
-
/** Habilita tooltip */
|
|
1200
|
-
tooltip?: boolean;
|
|
1201
|
-
/** Texto do tooltip */
|
|
1202
|
-
tooltipText?: string;
|
|
1203
|
-
/** Lado onde o tooltip aparece */
|
|
1204
|
-
side?: Side;
|
|
1205
|
-
/** Alinhamento do tooltip */
|
|
1206
|
-
align?: Align;
|
|
1207
|
-
/** Mensagem de erro a ser exibida */
|
|
1208
|
-
errorMessage?: string;
|
|
1209
|
-
/** Ícone a ser exibido no campo */
|
|
1210
|
-
icon?: React__default.ReactNode;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1214
|
-
|
|
1215
|
-
/** Tipos de toast disponíveis */
|
|
1216
|
-
type ToastType = 'success' | 'alert' | 'info';
|
|
1217
|
-
/**
|
|
1218
|
-
* Representa uma mensagem de toast
|
|
1219
|
-
*/
|
|
1220
|
-
interface ToastMessage {
|
|
1221
|
-
/** ID único da mensagem */
|
|
1222
|
-
id: string;
|
|
1223
|
-
/** Conteúdo da mensagem */
|
|
1224
|
-
message: string;
|
|
1225
|
-
/** Tipo visual do toast */
|
|
1226
|
-
type: ToastType;
|
|
1227
|
-
/** Define se o toast permanece até ser fechado manualmente */
|
|
1228
|
-
persistent?: boolean;
|
|
1229
|
-
/** Duração em milissegundos antes de auto-fechar */
|
|
1230
|
-
duration?: number;
|
|
1231
|
-
/** Timestamp de quando foi criado */
|
|
1232
|
-
timestamp: number;
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
* Opções para exibição do toast
|
|
1236
|
-
*/
|
|
1237
|
-
interface ToastOptions {
|
|
1238
|
-
/** Define se o toast permanece até ser fechado manualmente */
|
|
1239
|
-
persistent?: boolean;
|
|
1240
|
-
/** Duração em milissegundos antes de auto-fechar */
|
|
1241
|
-
duration?: number;
|
|
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
|
-
*/
|
|
1252
|
-
interface ToastContextType {
|
|
1253
|
-
/** Exibe um toast e retorna seu ID: (message, type?, options?) => string */
|
|
1254
|
-
showToast: (message: string, type?: ToastType, options?: ToastOptions) => string;
|
|
1255
|
-
/** Oculta um toast específico: (id) => void */
|
|
1256
|
-
hideToast: (id: string) => void;
|
|
1257
|
-
/** Oculta todos os toasts: () => void */
|
|
1258
|
-
hideAllToasts: () => void;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
interface ToastProviderProps {
|
|
1262
|
-
children: ReactNode;
|
|
1263
|
-
maxToasts?: number;
|
|
1264
|
-
}
|
|
1265
|
-
declare const ToastProvider: React__default.FC<ToastProviderProps>;
|
|
1266
|
-
declare const useToast: () => ToastContextType;
|
|
1267
|
-
|
|
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 */
|
|
1291
|
-
text: React__default.ReactNode;
|
|
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 */
|
|
1297
|
-
sideOffset?: number;
|
|
1298
|
-
/** Deslocamento em pixels no eixo de alinhamento */
|
|
1299
|
-
alignOffset?: number;
|
|
1300
|
-
/** Largura máxima do tooltip em pixels */
|
|
1301
|
-
maxWidth?: number;
|
|
1302
|
-
/** Elemento que dispara o tooltip ao hover */
|
|
1303
|
-
children: React__default.ReactNode;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
declare const Tooltip: React__default.FC<TooltipProps>;
|
|
1307
|
-
|
|
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) */
|
|
1329
|
-
defaultChecked?: boolean;
|
|
1330
|
-
/** Callback executado quando o estado muda: (checked) => void */
|
|
1331
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
1332
|
-
/** Nome do input */
|
|
1333
|
-
name?: string;
|
|
1334
|
-
/** Valor do input */
|
|
1335
|
-
value?: string;
|
|
1336
|
-
/** Estado atual (modo controlado) */
|
|
1337
|
-
checked?: boolean;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
declare const Switch: React$1.FC<SwitchProps>;
|
|
1341
|
-
|
|
1342
|
-
/** Tipos de entrada suportados pelo VerificationCode */
|
|
1343
|
-
type InputType = 'numeric' | 'alpha' | 'alphanumeric';
|
|
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) */
|
|
1368
|
-
length?: number;
|
|
1369
|
-
/** Tipo de entrada permitida (padrão: "numeric") */
|
|
1370
|
-
inputType?: InputType;
|
|
1371
|
-
/** Callback executado quando todos os campos são preenchidos: (value) => void */
|
|
1372
|
-
onComplete?: (value: string) => void;
|
|
1373
|
-
/** Define se o campo está em estado de erro */
|
|
1374
|
-
hasError?: boolean;
|
|
1375
|
-
/** Mensagem de erro exibida abaixo do componente */
|
|
1376
|
-
errorMessage?: string;
|
|
1377
|
-
/** Props adicionais passadas para os inputs */
|
|
1378
|
-
[key: string]: any;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
/**
|
|
1382
|
-
* Componente VerificationCode para entrada de códigos de verificação
|
|
1383
|
-
*
|
|
1384
|
-
* @description Permite entrada de códigos com múltiplos dígitos,
|
|
1385
|
-
* suportando diferentes tipos de caracteres e navegação por teclado.
|
|
1386
|
-
*
|
|
1387
|
-
* @example
|
|
1388
|
-
* ```tsx
|
|
1389
|
-
* <VerificationCode
|
|
1390
|
-
* length={6}
|
|
1391
|
-
* inputType="numeric"
|
|
1392
|
-
* onComplete={(code) => console.log('Código:', code)}
|
|
1393
|
-
* hasError={false}
|
|
1394
|
-
* />
|
|
1395
|
-
* ```
|
|
1396
|
-
*/
|
|
1397
|
-
declare const VerificationCode: React__default.FC<VerificationCodeProps>;
|
|
1398
|
-
|
|
1399
|
-
/**
|
|
1400
|
-
* Configurações para simulação de API
|
|
1401
|
-
*/
|
|
1402
|
-
interface ApiSimulationConfig {
|
|
1403
|
-
/** Items por página */
|
|
1404
|
-
itemsPerPage?: number;
|
|
1405
|
-
/** Total de items no dataset */
|
|
1406
|
-
totalItems?: number;
|
|
1407
|
-
/** Delay em ms para simular latência */
|
|
1408
|
-
delay?: number;
|
|
1409
|
-
/** Taxa de erro (0-1) para simular falhas */
|
|
1410
|
-
errorRate?: number;
|
|
1411
|
-
/** Função geradora de items customizada */
|
|
1412
|
-
itemGenerator?: (index: number, searchQuery?: string) => any;
|
|
1413
|
-
/** Debug mode */
|
|
1414
|
-
debug?: boolean;
|
|
1415
|
-
}
|
|
1416
|
-
/**
|
|
1417
|
-
* Estado da simulação de API
|
|
1418
|
-
*/
|
|
1419
|
-
interface ApiSimulationState<T> {
|
|
1420
|
-
/** Items carregados */
|
|
1421
|
-
items: T[];
|
|
1422
|
-
/** Página atual */
|
|
1423
|
-
currentPage: number;
|
|
1424
|
-
/** Total de páginas */
|
|
1425
|
-
totalPages: number;
|
|
1426
|
-
/** Status do carregamento */
|
|
1427
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
1428
|
-
/** Erro atual (se houver) */
|
|
1429
|
-
error: string | null;
|
|
1430
|
-
/** Query de busca atual */
|
|
1431
|
-
searchQuery: string;
|
|
1432
|
-
/** Se há próxima página */
|
|
1433
|
-
hasNextPage: boolean;
|
|
1434
|
-
/** Se é a primeira página */
|
|
1435
|
-
isFirstPage: boolean;
|
|
1436
|
-
}
|
|
1437
|
-
interface ApiSimulationActions {
|
|
1438
|
-
/** Carregar próxima página */
|
|
1439
|
-
loadNextPage: () => Promise<void>;
|
|
1440
|
-
/** Realizar nova busca */
|
|
1441
|
-
search: (query: string) => Promise<void>;
|
|
1442
|
-
/** Reset completo */
|
|
1443
|
-
reset: () => void;
|
|
1444
|
-
/** Retry da última operação */
|
|
1445
|
-
retry: () => Promise<void>;
|
|
1446
|
-
}
|
|
1447
|
-
interface UseApiSimulationReturn<T> extends ApiSimulationState<T> {
|
|
1448
|
-
actions: ApiSimulationActions;
|
|
1449
|
-
}
|
|
1450
|
-
declare function useApiSimulation<T = any>(config?: ApiSimulationConfig): UseApiSimulationReturn<T>;
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1453
|
-
* Props para o hook useInfiniteScroll
|
|
1454
|
-
*/
|
|
1455
|
-
interface UseInfiniteScrollProps {
|
|
1456
|
-
/** Status atual do carregamento */
|
|
1457
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
1458
|
-
/** Página atual */
|
|
1459
|
-
page: number;
|
|
1460
|
-
/** Última página disponível */
|
|
1461
|
-
lastPage: number;
|
|
1462
|
-
/** Callback para carregar próxima página */
|
|
1463
|
-
onLoadMore: () => void;
|
|
1464
|
-
/** Threshold para IntersectionObserver (0-1) */
|
|
1465
|
-
threshold?: number;
|
|
1466
|
-
/** Margem raiz para IntersectionObserver */
|
|
1467
|
-
rootMargin?: string;
|
|
1468
|
-
/** Habilita/desabilita o hook */
|
|
1469
|
-
enabled?: boolean;
|
|
1470
|
-
/** Debug mode - logs no console */
|
|
1471
|
-
debug?: boolean;
|
|
1472
|
-
}
|
|
1473
|
-
/**
|
|
1474
|
-
* Retorno do hook useInfiniteScroll
|
|
1475
|
-
*/
|
|
1476
|
-
interface UseInfiniteScrollReturn {
|
|
1477
|
-
/** Ref para o elemento observador */
|
|
1478
|
-
observerRef: React.RefObject<HTMLDivElement | null>;
|
|
1479
|
-
/** Se o elemento está visível */
|
|
1480
|
-
isIntersecting: boolean;
|
|
1481
|
-
/** Se há próxima página */
|
|
1482
|
-
hasNextPage: boolean;
|
|
1483
|
-
/** Se todas as páginas foram carregadas */
|
|
1484
|
-
isCompleted: boolean;
|
|
1485
|
-
/** Função para reset manual */
|
|
1486
|
-
reset: () => void;
|
|
1487
|
-
}
|
|
1488
|
-
/**
|
|
1489
|
-
* Hook otimizado para scroll infinito usando IntersectionObserver
|
|
1490
|
-
*/
|
|
1491
|
-
declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, threshold, rootMargin, enabled, debug }: UseInfiniteScrollProps): UseInfiniteScrollReturn;
|
|
1492
|
-
|
|
1493
|
-
declare const normalizeText: (text: React.ReactNode) => string;
|
|
1494
|
-
|
|
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 };
|
|
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 };
|