@phsa.tec/design-system-react 0.3.1 → 0.4.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/README.md +91 -28
- package/dist/index.d.mts +1851 -434
- package/dist/index.d.ts +1851 -434
- package/dist/index.js +3130 -3619
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3068 -3591
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -1
- package/package.json +23 -18
package/dist/index.d.mts
CHANGED
|
@@ -1,499 +1,1916 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { PropsWithChildren } from 'react';
|
|
3
|
-
import { ColumnDef, SortingState, VisibilityState } from '@tanstack/react-table';
|
|
4
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as class_variance_authority from 'class-variance-authority';
|
|
5
4
|
import { VariantProps } from 'class-variance-authority';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
9
|
-
import { NumericFormatProps } from 'react-number-format';
|
|
10
|
-
import * as react_hook_form from 'react-hook-form';
|
|
11
|
-
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
12
|
-
export { useFormContext } from 'react-hook-form';
|
|
13
|
-
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
14
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
15
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
|
+
import { Column, Row, Table as Table$2, ColumnDef } from '@tanstack/react-table';
|
|
6
|
+
import { NumericFormatProps, PatternFormatProps } from 'react-number-format';
|
|
16
7
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
17
|
-
import * as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
|
|
8
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
9
|
+
import { DayPicker, DayPickerProps, DateRange } from 'react-day-picker';
|
|
10
|
+
import { Dialog as Dialog$2 } from 'radix-ui';
|
|
11
|
+
import * as sonner from 'sonner';
|
|
12
|
+
import { Toaster as Toaster$2 } from 'sonner';
|
|
13
|
+
export { ToastT, toast } from 'sonner';
|
|
14
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
15
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
16
|
+
export { IconType } from 'react-icons';
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
sorting?: boolean;
|
|
31
|
-
columnVisibility?: boolean;
|
|
32
|
-
filters?: React.ReactNode;
|
|
33
|
-
rowsPerPage?: number[];
|
|
34
|
-
defaultSort?: SortingState;
|
|
35
|
-
defaultVisibility?: VisibilityState;
|
|
18
|
+
declare const buttonVariants: (props?: ({
|
|
19
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
20
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
21
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
22
|
+
interface ButtonProps$1 extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
23
|
+
asChild?: boolean;
|
|
36
24
|
}
|
|
25
|
+
declare const Button$1: React$1.ForwardRefExoticComponent<ButtonProps$1 & React$1.RefAttributes<HTMLButtonElement>>;
|
|
37
26
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
27
|
+
type ButtonProps = ButtonProps$1;
|
|
28
|
+
/**
|
|
29
|
+
* Botão padrão do Design System.
|
|
30
|
+
* Reexporta o primitivo do shadcn com a mesma API.
|
|
31
|
+
*/
|
|
32
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps$1 & React$1.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
interface ButtonIconProps extends Omit<ButtonProps, "children" | "size"> {
|
|
34
|
+
/**
|
|
35
|
+
* Nome do ícone do `react-icons` que será renderizado dentro do botão.
|
|
36
|
+
* Exemplo: "MdHome", "FiUser", "FaHeart".
|
|
37
|
+
*/
|
|
38
|
+
iconName: string;
|
|
39
|
+
/**
|
|
40
|
+
* Cor do ícone. Valor CSS direto (ex: `"#fff"`, `"red"`).
|
|
41
|
+
* Encaminhada para a prop `color` do componente `Icon`.
|
|
42
|
+
*/
|
|
43
|
+
iconColor?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Classes CSS do Tailwind para estilizar o ícone.
|
|
46
|
+
* Exemplo: `iconClassName="text-white"`, `iconClassName="text-primary"`.
|
|
47
|
+
* Encaminhada para a prop `className` do componente `Icon`.
|
|
48
|
+
*/
|
|
49
|
+
iconClassName?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Texto acessível para leitores de tela.
|
|
52
|
+
* Use quando o botão não tiver label de texto visível.
|
|
53
|
+
*/
|
|
54
|
+
"aria-label": string;
|
|
55
|
+
/**
|
|
56
|
+
* Define se o botão deve ser apenas ícone (circular) ou ícone + texto.
|
|
57
|
+
* - `true`: usa `size="icon"` e não renderiza children
|
|
58
|
+
* - `false`: renderiza ícone seguido do children
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
iconOnly?: boolean;
|
|
53
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Variação de botão com ícone.
|
|
65
|
+
*
|
|
66
|
+
* - `iconOnly=true`: renderiza somente o ícone, usando o tamanho `icon` do botão.
|
|
67
|
+
* - `iconOnly=false`: renderiza ícone + children, usando o tamanho padrão do botão.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* <ButtonIcon iconName="MdHome" iconColor="#fff" aria-label="Ir para home" />
|
|
71
|
+
* <ButtonIcon iconName="FiUser" iconOnly={false} iconClassName="text-primary" aria-label="Perfil do usuário">
|
|
72
|
+
* Perfil
|
|
73
|
+
* </ButtonIcon>
|
|
74
|
+
*/
|
|
75
|
+
declare const ButtonIcon: ({ iconName, iconColor, iconClassName, iconOnly, className, children, "aria-label": ariaLabel, size, ...rest }: ButtonIconProps & {
|
|
76
|
+
children?: React$1.ReactNode;
|
|
77
|
+
size?: ButtonProps["size"];
|
|
78
|
+
}) => React$1.JSX.Element;
|
|
54
79
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
80
|
+
interface IconProps extends Omit<React$1.SVGProps<SVGSVGElement>, "ref"> {
|
|
81
|
+
/**
|
|
82
|
+
* Nome do ícone do `react-icons` como string.
|
|
83
|
+
* Exemplos: "MdHome", "FiUser", "FaHeart", "Hi2ArrowRight", etc.
|
|
84
|
+
* O componente identifica automaticamente a biblioteca baseado no prefixo.
|
|
85
|
+
*/
|
|
86
|
+
iconName: string;
|
|
87
|
+
/**
|
|
88
|
+
* Tamanho do ícone em pixels ou qualquer valor CSS válido.
|
|
89
|
+
* Atalho para a prop `size` do `react-icons`.
|
|
90
|
+
* @default 20
|
|
91
|
+
*/
|
|
92
|
+
size?: number | string;
|
|
93
|
+
/**
|
|
94
|
+
* Texto descritivo para acessibilidade.
|
|
95
|
+
* Se informado, o ícone terá `role="img"` e `aria-label`.
|
|
96
|
+
* Se omitido, o ícone será decorativo (`aria-hidden="true"`).
|
|
97
|
+
*/
|
|
98
|
+
"aria-label"?: string;
|
|
59
99
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
declare const
|
|
78
|
-
|
|
79
|
-
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
80
|
-
declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
81
|
-
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
82
|
-
inset?: boolean;
|
|
83
|
-
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
84
|
-
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
85
|
-
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
86
|
-
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
87
|
-
inset?: boolean;
|
|
88
|
-
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
89
|
-
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
90
|
-
declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
92
|
-
inset?: boolean;
|
|
93
|
-
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
94
|
-
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
95
|
-
declare const DropdownMenuShortcut: {
|
|
96
|
-
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): React$1.JSX.Element;
|
|
100
|
+
/**
|
|
101
|
+
* Componente de ícone genérico do Design System.
|
|
102
|
+
*
|
|
103
|
+
* Ele padroniza o uso de `react-icons` na aplicação, garantindo
|
|
104
|
+
* tamanho, acessibilidade e extensibilidade consistentes.
|
|
105
|
+
*
|
|
106
|
+
* A cor do ícone pode ser controlada via:
|
|
107
|
+
* - Prop `color` (valor CSS direto, ex: `color="#000"`, `color="red"`)
|
|
108
|
+
* - Classes Tailwind CSS no `className` (ex: `className="text-primary"`, `className="text-red-500"`)
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```tsx
|
|
112
|
+
* <Icon iconName="MdHome" size={24} color="#000" aria-label="Página inicial" />
|
|
113
|
+
* <Icon iconName="FiUser" size={20} className="text-red-500" />
|
|
114
|
+
* <Icon iconName="Fa6Heart" size={16} aria-label="Favorito" />
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
declare const Icon: {
|
|
118
|
+
({ iconName, size, className, "aria-label": ariaLabel, ...rest }: IconProps): React$1.JSX.Element | null;
|
|
97
119
|
displayName: string;
|
|
98
120
|
};
|
|
99
121
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
direction?: "vertical" | "horizontal";
|
|
107
|
-
withBorder?: boolean;
|
|
108
|
-
header?: React.ReactNode;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
declare const DataPairList: ({ title, data, labels, className, infoDirection, direction, withBorder, header, }: DataPairListProps) => React__default.JSX.Element | null;
|
|
112
|
-
|
|
113
|
-
declare const textVariants: (props?: ({
|
|
114
|
-
variant?: "title" | "caption" | "display" | "subtitle" | "normal" | "muted" | null | undefined;
|
|
115
|
-
align?: "left" | "center" | "right" | "justify" | null | undefined;
|
|
116
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
117
|
-
type TextProps = VariantProps<typeof textVariants> & {
|
|
118
|
-
className?: string;
|
|
119
|
-
children: React.ReactNode;
|
|
120
|
-
};
|
|
121
|
-
declare function Text({ variant, align, className, children, }: TextProps): React$1.JSX.Element;
|
|
122
|
-
|
|
123
|
-
type CardProps = {
|
|
124
|
-
title?: string;
|
|
125
|
-
description?: string;
|
|
126
|
-
footer?: () => React__default.ReactNode;
|
|
127
|
-
children?: React__default.ReactNode;
|
|
128
|
-
};
|
|
129
|
-
declare const Card$1: ({ title, children, description, footer, }: CardProps) => React__default.JSX.Element;
|
|
122
|
+
declare const Card$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
123
|
+
declare const CardHeader$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
124
|
+
declare const CardTitle$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
125
|
+
declare const CardDescription$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
126
|
+
declare const CardContent$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
127
|
+
declare const CardFooter$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
130
128
|
|
|
131
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Card raiz (primitivo) baseado no shadcn.
|
|
131
|
+
*
|
|
132
|
+
* Use quando precisar de controle total sobre a estrutura do card.
|
|
133
|
+
*/
|
|
134
|
+
declare const CardRoot: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
135
|
+
type CardRootProps = React$1.ComponentProps<typeof Card$1>;
|
|
136
|
+
/**
|
|
137
|
+
* Cabeçalho do Card (primitivo).
|
|
138
|
+
*
|
|
139
|
+
* Normalmente contém `CardTitle` e `CardDescription`.
|
|
140
|
+
*/
|
|
132
141
|
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
type CardHeaderProps = React$1.ComponentProps<typeof CardHeader$1>;
|
|
143
|
+
/**
|
|
144
|
+
* Título do Card (primitivo).
|
|
145
|
+
*/
|
|
133
146
|
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
147
|
+
type CardTitleProps = React$1.ComponentProps<typeof CardTitle$1>;
|
|
148
|
+
/**
|
|
149
|
+
* Descrição do Card (primitivo).
|
|
150
|
+
*/
|
|
134
151
|
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
152
|
+
type CardDescriptionProps = React$1.ComponentProps<typeof CardDescription$1>;
|
|
153
|
+
/**
|
|
154
|
+
* Conteúdo principal do Card (primitivo).
|
|
155
|
+
*/
|
|
135
156
|
declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
157
|
+
type CardContentProps = React$1.ComponentProps<typeof CardContent$1>;
|
|
158
|
+
/**
|
|
159
|
+
* Rodapé do Card (primitivo).
|
|
160
|
+
*
|
|
161
|
+
* Ideal para ações (botões) ou informações complementares.
|
|
162
|
+
*/
|
|
136
163
|
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
164
|
+
type CardFooterProps = React$1.ComponentProps<typeof CardFooter$1>;
|
|
165
|
+
interface CardProps extends Omit<CardRootProps, "children" | "title"> {
|
|
166
|
+
/**
|
|
167
|
+
* Imagem ou mídia a ser exibida no topo do card.
|
|
168
|
+
* Pode ser uma URL de imagem, um elemento React, ou qualquer conteúdo.
|
|
169
|
+
*/
|
|
170
|
+
image?: React$1.ReactNode;
|
|
171
|
+
/**
|
|
172
|
+
* Título do card.
|
|
173
|
+
* Quando informado, é renderizado dentro de `CardHeader` usando `CardTitle`.
|
|
174
|
+
*/
|
|
175
|
+
title?: React$1.ReactNode;
|
|
176
|
+
/**
|
|
177
|
+
* Badge ou tag a ser exibida ao lado do título (ex: "Featured", "Novo", etc.).
|
|
178
|
+
* Renderizado no mesmo nível do título, alinhado à direita.
|
|
179
|
+
*/
|
|
180
|
+
badge?: React$1.ReactNode;
|
|
181
|
+
/**
|
|
182
|
+
* Descrição do card.
|
|
183
|
+
* Quando informada, é renderizada dentro de `CardHeader` usando `CardDescription`.
|
|
184
|
+
*/
|
|
185
|
+
description?: React$1.ReactNode;
|
|
186
|
+
/**
|
|
187
|
+
* Conteúdo principal do card.
|
|
188
|
+
* Renderizado dentro de `CardContent`.
|
|
189
|
+
*/
|
|
190
|
+
children?: React$1.ReactNode;
|
|
191
|
+
/**
|
|
192
|
+
* Conteúdo do rodapé do card.
|
|
193
|
+
* Renderizado dentro de `CardFooter` (ex: botões de ação).
|
|
194
|
+
*/
|
|
195
|
+
footer?: React$1.ReactNode;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Card padrão do Design System.
|
|
199
|
+
*
|
|
200
|
+
* Fornece uma estrutura de layout comum:
|
|
201
|
+
* - Imagem/mídia opcional no topo (`image`)
|
|
202
|
+
* - Header opcional com `title`, `badge` e `description`
|
|
203
|
+
* - Content com `children`
|
|
204
|
+
* - Footer opcional com `footer`
|
|
205
|
+
*
|
|
206
|
+
* Quando precisar de mais flexibilidade, use os primitivos:
|
|
207
|
+
* `CardRoot`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter`.
|
|
208
|
+
*/
|
|
209
|
+
declare const Card: ({ image, title, badge, description, children, footer, ...rest }: CardProps) => React$1.JSX.Element;
|
|
137
210
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
};
|
|
145
|
-
declare const Checkbox: ({ label, error, withoutForm, ...props }: CheckboxProps) => React$1.JSX.Element;
|
|
146
|
-
|
|
147
|
-
type InputProps$1 = React$1.ComponentProps<"input">;
|
|
148
|
-
|
|
149
|
-
type InputBaseProps = InputProps$1 & {
|
|
150
|
-
onChangeText?: (text: string) => void;
|
|
151
|
-
mask?: string | string[];
|
|
152
|
-
"data-testid"?: string;
|
|
153
|
-
};
|
|
211
|
+
declare const Table$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
|
|
212
|
+
declare const TableHeader$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
213
|
+
declare const TableBody$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
214
|
+
declare const TableRow$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
215
|
+
declare const TableHead$1: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
216
|
+
declare const TableCell$1: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
154
217
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Table raiz (primitivo) baseado no shadcn.
|
|
220
|
+
*/
|
|
221
|
+
declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
|
|
222
|
+
type TableProps = React$1.ComponentProps<typeof Table$1>;
|
|
223
|
+
/**
|
|
224
|
+
* TableHeader (primitivo).
|
|
225
|
+
*/
|
|
226
|
+
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
227
|
+
type TableHeaderProps = React$1.ComponentProps<typeof TableHeader$1>;
|
|
228
|
+
/**
|
|
229
|
+
* TableBody (primitivo).
|
|
230
|
+
*/
|
|
231
|
+
declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
232
|
+
type TableBodyProps = React$1.ComponentProps<typeof TableBody$1>;
|
|
233
|
+
/**
|
|
234
|
+
* TableRow (primitivo).
|
|
235
|
+
*/
|
|
236
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
237
|
+
type TableRowProps = React$1.ComponentProps<typeof TableRow$1>;
|
|
238
|
+
/**
|
|
239
|
+
* TableHead (primitivo).
|
|
240
|
+
*/
|
|
241
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
242
|
+
type TableHeadProps = React$1.ComponentProps<typeof TableHead$1>;
|
|
243
|
+
/**
|
|
244
|
+
* TableCell (primitivo).
|
|
245
|
+
*/
|
|
246
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
247
|
+
type TableCellProps = React$1.ComponentProps<typeof TableCell$1>;
|
|
248
|
+
interface DataTableColumnHeaderProps<TData, TValue> extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
249
|
+
column: Column<TData, TValue>;
|
|
250
|
+
title: string;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Componente de cabeçalho de coluna com ordenação.
|
|
254
|
+
*/
|
|
255
|
+
declare function DataTableColumnHeader<TData, TValue>({ column, title, className, }: DataTableColumnHeaderProps<TData, TValue>): React$1.JSX.Element;
|
|
256
|
+
interface DataTableRowActionsProps<TData> {
|
|
257
|
+
row: Row<TData>;
|
|
258
|
+
actions?: Array<{
|
|
259
|
+
label: string;
|
|
260
|
+
onClick: (row: TData) => void;
|
|
261
|
+
icon?: React$1.ReactNode;
|
|
262
|
+
variant?: "default" | "destructive";
|
|
263
|
+
}>;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Componente de ações da linha (menu dropdown).
|
|
267
|
+
*/
|
|
268
|
+
declare function DataTableRowActions<TData>({ row, actions, }: DataTableRowActionsProps<TData>): React$1.JSX.Element | null;
|
|
269
|
+
interface DataTableToolbarProps<TData> {
|
|
270
|
+
table: Table$2<TData>;
|
|
271
|
+
searchKey?: string;
|
|
272
|
+
searchPlaceholder?: string;
|
|
273
|
+
filterComponent?: React$1.ReactNode;
|
|
274
|
+
actions?: React$1.ReactNode;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Barra de ferramentas do DataTable (busca, filtros, visibilidade de colunas).
|
|
278
|
+
*/
|
|
279
|
+
declare function DataTableToolbar<TData>({ table, searchKey, searchPlaceholder, filterComponent, actions, }: DataTableToolbarProps<TData>): React$1.JSX.Element;
|
|
280
|
+
interface DataTablePaginationProps<TData> {
|
|
281
|
+
table: Table$2<TData>;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Componente de paginação do DataTable.
|
|
285
|
+
*/
|
|
286
|
+
declare function DataTablePagination<TData>({ table }: DataTablePaginationProps<TData>): React$1.JSX.Element;
|
|
287
|
+
interface DataTableProps<TData, TValue> {
|
|
288
|
+
/**
|
|
289
|
+
* Definições das colunas da tabela.
|
|
290
|
+
*/
|
|
291
|
+
columns: ColumnDef<TData, TValue>[];
|
|
292
|
+
/**
|
|
293
|
+
* Dados da tabela.
|
|
294
|
+
*/
|
|
295
|
+
data: TData[];
|
|
296
|
+
/**
|
|
297
|
+
* Chave da coluna usada para busca (opcional).
|
|
298
|
+
*/
|
|
299
|
+
searchKey?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Placeholder do campo de busca.
|
|
302
|
+
*/
|
|
303
|
+
searchPlaceholder?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Componente de filtro customizado.
|
|
306
|
+
*/
|
|
307
|
+
filterComponent?: React$1.ReactNode;
|
|
308
|
+
/**
|
|
309
|
+
* Ações adicionais na toolbar.
|
|
310
|
+
*/
|
|
311
|
+
toolbarActions?: React$1.ReactNode;
|
|
312
|
+
/**
|
|
313
|
+
* Ações da linha (menu dropdown).
|
|
314
|
+
*/
|
|
315
|
+
rowActions?: Array<{
|
|
316
|
+
label: string;
|
|
317
|
+
onClick: (row: TData) => void;
|
|
318
|
+
icon?: React$1.ReactNode;
|
|
319
|
+
variant?: "default" | "destructive";
|
|
320
|
+
}>;
|
|
321
|
+
/**
|
|
322
|
+
* Classes CSS adicionais para a tabela.
|
|
323
|
+
*/
|
|
324
|
+
className?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Classes CSS adicionais para o container.
|
|
327
|
+
*/
|
|
166
328
|
containerClassName?: string;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
329
|
+
/**
|
|
330
|
+
* Mostrar toolbar (busca, filtros, etc.).
|
|
331
|
+
* @default true
|
|
332
|
+
*/
|
|
333
|
+
showToolbar?: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Mostrar paginação.
|
|
336
|
+
* @default true
|
|
337
|
+
*/
|
|
338
|
+
showPagination?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Tamanho da página inicial.
|
|
341
|
+
* @default 10
|
|
342
|
+
*/
|
|
343
|
+
pageSize?: number;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* DataTable padrão do Design System.
|
|
347
|
+
*
|
|
348
|
+
* Componente de tabela completo com ordenação, filtros, busca, paginação e ações.
|
|
349
|
+
* Baseado em @tanstack/react-table.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```tsx
|
|
353
|
+
* import { DataTable, type ColumnDef } from "@phsa.tec/design-system-react"
|
|
354
|
+
*
|
|
355
|
+
* interface User {
|
|
356
|
+
* id: string
|
|
357
|
+
* name: string
|
|
358
|
+
* email: string
|
|
359
|
+
* }
|
|
360
|
+
*
|
|
361
|
+
* const columns: ColumnDef<User>[] = [
|
|
362
|
+
* {
|
|
363
|
+
* accessorKey: "name",
|
|
364
|
+
* header: "Nome",
|
|
365
|
+
* },
|
|
366
|
+
* {
|
|
367
|
+
* accessorKey: "email",
|
|
368
|
+
* header: "E-mail",
|
|
369
|
+
* },
|
|
370
|
+
* ]
|
|
371
|
+
*
|
|
372
|
+
* function MyTable() {
|
|
373
|
+
* const data: User[] = [
|
|
374
|
+
* { id: "1", name: "João", email: "joao@example.com" },
|
|
375
|
+
* { id: "2", name: "Maria", email: "maria@example.com" },
|
|
376
|
+
* ]
|
|
377
|
+
*
|
|
378
|
+
* return <DataTable columns={columns} data={data} searchKey="name" />
|
|
379
|
+
* }
|
|
380
|
+
* ```
|
|
381
|
+
*/
|
|
382
|
+
declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, filterComponent, toolbarActions, rowActions, className, containerClassName, showToolbar, showPagination, pageSize, }: DataTableProps<TData, TValue>): React$1.JSX.Element;
|
|
173
383
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
declare const
|
|
384
|
+
/**
|
|
385
|
+
* Componente H1 padronizado.
|
|
386
|
+
*/
|
|
387
|
+
declare const H1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
388
|
+
/**
|
|
389
|
+
* Componente H2 padronizado.
|
|
390
|
+
*/
|
|
391
|
+
declare const H2: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
392
|
+
/**
|
|
393
|
+
* Componente H3 padronizado.
|
|
394
|
+
*/
|
|
395
|
+
declare const H3: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
396
|
+
/**
|
|
397
|
+
* Componente H4 padronizado.
|
|
398
|
+
*/
|
|
399
|
+
declare const H4: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
400
|
+
/**
|
|
401
|
+
* Componente de parágrafo padronizado.
|
|
402
|
+
*/
|
|
403
|
+
declare const P: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
404
|
+
/**
|
|
405
|
+
* Componente de blockquote padronizado.
|
|
406
|
+
*/
|
|
407
|
+
declare const Blockquote: React$1.ForwardRefExoticComponent<React$1.BlockquoteHTMLAttributes<HTMLQuoteElement> & React$1.RefAttributes<HTMLQuoteElement>>;
|
|
408
|
+
/**
|
|
409
|
+
* Componente de lista não ordenada padronizada.
|
|
410
|
+
*/
|
|
411
|
+
declare const Ul: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLUListElement> & React$1.RefAttributes<HTMLUListElement>>;
|
|
412
|
+
/**
|
|
413
|
+
* Componente de lista ordenada padronizada.
|
|
414
|
+
*/
|
|
415
|
+
declare const Ol: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLOListElement> & React$1.RefAttributes<HTMLOListElement>>;
|
|
416
|
+
/**
|
|
417
|
+
* Componente de item de lista padronizado.
|
|
418
|
+
*/
|
|
419
|
+
declare const Li: React$1.ForwardRefExoticComponent<React$1.LiHTMLAttributes<HTMLLIElement> & React$1.RefAttributes<HTMLLIElement>>;
|
|
420
|
+
/**
|
|
421
|
+
* Componente de código inline padronizado.
|
|
422
|
+
*/
|
|
423
|
+
declare const Code: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
|
|
424
|
+
/**
|
|
425
|
+
* Componente de código em bloco padronizado.
|
|
426
|
+
*/
|
|
427
|
+
declare const Pre: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLPreElement> & React$1.RefAttributes<HTMLPreElement>>;
|
|
428
|
+
/**
|
|
429
|
+
* Componente de texto lead (destaque) padronizado.
|
|
430
|
+
*/
|
|
431
|
+
declare const Lead: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
432
|
+
/**
|
|
433
|
+
* Componente de texto large padronizado.
|
|
434
|
+
*/
|
|
435
|
+
declare const Large: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
436
|
+
/**
|
|
437
|
+
* Componente de texto small padronizado.
|
|
438
|
+
*/
|
|
439
|
+
declare const Small: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
|
|
440
|
+
/**
|
|
441
|
+
* Componente de texto muted padronizado.
|
|
442
|
+
*/
|
|
443
|
+
declare const Muted: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
444
|
+
/**
|
|
445
|
+
* Componente de tabela padronizada para uso em tipografia.
|
|
446
|
+
* Renomeado para TypographyTable para evitar conflito com Table do DataTable.
|
|
447
|
+
*/
|
|
448
|
+
declare const TypographyTable: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
|
|
449
|
+
/**
|
|
450
|
+
* Componente de cabeçalho de tabela padronizado para tipografia.
|
|
451
|
+
*/
|
|
452
|
+
declare const TypographyThead: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
453
|
+
/**
|
|
454
|
+
* Componente de corpo de tabela padronizado para tipografia.
|
|
455
|
+
*/
|
|
456
|
+
declare const TypographyTbody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
457
|
+
/**
|
|
458
|
+
* Componente de linha de tabela padronizada para tipografia.
|
|
459
|
+
*/
|
|
460
|
+
declare const TypographyTr: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
461
|
+
/**
|
|
462
|
+
* Componente de célula de cabeçalho de tabela padronizada para tipografia.
|
|
463
|
+
*/
|
|
464
|
+
declare const TypographyTh: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
465
|
+
/**
|
|
466
|
+
* Componente de célula de tabela padronizada para tipografia.
|
|
467
|
+
*/
|
|
468
|
+
declare const TypographyTd: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
469
|
+
/**
|
|
470
|
+
* Componente Typography - Container para agrupar elementos tipográficos.
|
|
471
|
+
*
|
|
472
|
+
* Útil para aplicar estilos consistentes a um bloco de texto.
|
|
473
|
+
*/
|
|
474
|
+
interface TypographyProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
475
|
+
/**
|
|
476
|
+
* Variante de espaçamento entre elementos.
|
|
477
|
+
* @default "normal"
|
|
478
|
+
*/
|
|
479
|
+
spacing?: "tight" | "normal" | "relaxed";
|
|
480
|
+
/**
|
|
481
|
+
* Alinhamento do texto.
|
|
482
|
+
*/
|
|
483
|
+
align?: "left" | "center" | "right" | "justify";
|
|
484
|
+
}
|
|
485
|
+
declare const Typography: React$1.ForwardRefExoticComponent<TypographyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
178
486
|
|
|
179
|
-
type
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
487
|
+
type InputProps = React$1.ComponentProps<"input">;
|
|
488
|
+
/**
|
|
489
|
+
* Campo de entrada padrão do Design System.
|
|
490
|
+
*
|
|
491
|
+
* Pode ser usado de duas formas:
|
|
492
|
+
* 1. Como input simples: <Input placeholder="..." />
|
|
493
|
+
* 2. Com Field integrado: <Input label="Nome" description="..." />
|
|
494
|
+
*
|
|
495
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
496
|
+
* cria o Field ao redor do input.
|
|
497
|
+
*/
|
|
498
|
+
interface InputWithFieldProps extends InputProps {
|
|
499
|
+
/**
|
|
500
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
501
|
+
*/
|
|
502
|
+
label?: React$1.ReactNode;
|
|
503
|
+
/**
|
|
504
|
+
* Descrição ou texto de ajuda do campo.
|
|
505
|
+
*/
|
|
506
|
+
description?: React$1.ReactNode;
|
|
507
|
+
/**
|
|
508
|
+
* Mensagem de erro ou array de erros.
|
|
509
|
+
*/
|
|
510
|
+
error?: React$1.ReactNode | Array<{
|
|
511
|
+
message?: string;
|
|
512
|
+
} | undefined>;
|
|
513
|
+
/**
|
|
514
|
+
* Define se o campo está inválido.
|
|
515
|
+
*/
|
|
516
|
+
invalid?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
519
|
+
*/
|
|
520
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
521
|
+
/**
|
|
522
|
+
* Classes CSS adicionais para o container do Field.
|
|
523
|
+
*/
|
|
524
|
+
fieldClassName?: string;
|
|
525
|
+
}
|
|
526
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputWithFieldProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
527
|
+
type InputFieldProps = InputWithFieldProps;
|
|
528
|
+
declare const InputField: React$1.ForwardRefExoticComponent<Omit<InputWithFieldProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
188
529
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
530
|
+
interface FormFieldProps {
|
|
531
|
+
/**
|
|
532
|
+
* Nome do campo no formulário (`react-hook-form`).
|
|
533
|
+
*/
|
|
192
534
|
name: string;
|
|
193
|
-
|
|
194
|
-
|
|
535
|
+
/**
|
|
536
|
+
* Rótulo visível do campo.
|
|
537
|
+
*/
|
|
538
|
+
label?: React$1.ReactNode;
|
|
539
|
+
/**
|
|
540
|
+
* Texto de ajuda exibido abaixo do campo.
|
|
541
|
+
*/
|
|
542
|
+
description?: React$1.ReactNode;
|
|
543
|
+
/**
|
|
544
|
+
* Props adicionais encaminhadas para o componente `Input`.
|
|
545
|
+
*/
|
|
546
|
+
inputProps?: React$1.ComponentProps<typeof Input>;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Campo de formulário integrado ao `react-hook-form`.
|
|
550
|
+
*
|
|
551
|
+
* Combina os primitivos `Field` e `Input` do design system,
|
|
552
|
+
* exibindo automaticamente label, descrição e mensagens de erro.
|
|
553
|
+
*/
|
|
554
|
+
declare const FormField: ({ name, label, description, inputProps, }: FormFieldProps) => React$1.JSX.Element;
|
|
195
555
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
556
|
+
type NumericInputBaseProps = Omit<NumericFormatProps, "customInput" | "getInputRef">;
|
|
557
|
+
interface NumericInputProps extends NumericInputBaseProps {
|
|
558
|
+
/**
|
|
559
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
560
|
+
*/
|
|
561
|
+
label?: React$1.ReactNode;
|
|
562
|
+
/**
|
|
563
|
+
* Descrição ou texto de ajuda do campo.
|
|
564
|
+
*/
|
|
565
|
+
description?: React$1.ReactNode;
|
|
566
|
+
/**
|
|
567
|
+
* Mensagem de erro ou array de erros.
|
|
568
|
+
*/
|
|
569
|
+
error?: React$1.ReactNode | Array<{
|
|
570
|
+
message?: string;
|
|
571
|
+
} | undefined>;
|
|
572
|
+
/**
|
|
573
|
+
* Define se o campo está inválido.
|
|
574
|
+
*/
|
|
575
|
+
invalid?: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
578
|
+
*/
|
|
579
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
580
|
+
/**
|
|
581
|
+
* Classes CSS adicionais para o container do Field.
|
|
582
|
+
*/
|
|
583
|
+
fieldClassName?: string;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Input numérico com máscara/formatação usando `react-number-format`,
|
|
587
|
+
* integrado com o sistema de Field (label, descrição, erro).
|
|
588
|
+
*
|
|
589
|
+
* Exemplos de uso:
|
|
590
|
+
*
|
|
591
|
+
* - Moeda:
|
|
592
|
+
* <NumericInput
|
|
593
|
+
* label="Valor"
|
|
594
|
+
* prefix="R$ "
|
|
595
|
+
* thousandSeparator="."
|
|
596
|
+
* decimalSeparator=","
|
|
597
|
+
* decimalScale={2}
|
|
598
|
+
* />
|
|
599
|
+
*
|
|
600
|
+
* - Percentual:
|
|
601
|
+
* <NumericInput
|
|
602
|
+
* label="Taxa"
|
|
603
|
+
* suffix="%"
|
|
604
|
+
* decimalScale={2}
|
|
605
|
+
* />
|
|
606
|
+
*/
|
|
607
|
+
declare const NumericInput: React$1.ForwardRefExoticComponent<NumericInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
215
608
|
|
|
216
|
-
type
|
|
609
|
+
type PatternInputBaseProps = Omit<PatternFormatProps, "customInput" | "getInputRef">;
|
|
610
|
+
interface PatternInputProps extends PatternInputBaseProps {
|
|
611
|
+
/**
|
|
612
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
613
|
+
*/
|
|
614
|
+
label?: React$1.ReactNode;
|
|
615
|
+
/**
|
|
616
|
+
* Descrição ou texto de ajuda do campo.
|
|
617
|
+
*/
|
|
618
|
+
description?: React$1.ReactNode;
|
|
619
|
+
/**
|
|
620
|
+
* Mensagem de erro ou array de erros.
|
|
621
|
+
*/
|
|
622
|
+
error?: React$1.ReactNode | Array<{
|
|
623
|
+
message?: string;
|
|
624
|
+
} | undefined>;
|
|
625
|
+
/**
|
|
626
|
+
* Define se o campo está inválido.
|
|
627
|
+
*/
|
|
628
|
+
invalid?: boolean;
|
|
629
|
+
/**
|
|
630
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
631
|
+
*/
|
|
632
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
633
|
+
/**
|
|
634
|
+
* Classes CSS adicionais para o container do Field.
|
|
635
|
+
*/
|
|
636
|
+
fieldClassName?: string;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Input com formatação de padrão usando `react-number-format`,
|
|
640
|
+
* integrado com o sistema de Field (label, descrição, erro).
|
|
641
|
+
*
|
|
642
|
+
* Exemplos de uso:
|
|
643
|
+
*
|
|
644
|
+
* - Telefone:
|
|
645
|
+
* <PatternInput
|
|
646
|
+
* label="Telefone"
|
|
647
|
+
* format="(##) #####-####"
|
|
648
|
+
* allowEmptyFormatting
|
|
649
|
+
* mask="_"
|
|
650
|
+
* />
|
|
651
|
+
*
|
|
652
|
+
* - CPF:
|
|
653
|
+
* <PatternInput
|
|
654
|
+
* label="CPF"
|
|
655
|
+
* format="###.###.###-##"
|
|
656
|
+
* allowEmptyFormatting
|
|
657
|
+
* mask="_"
|
|
658
|
+
* />
|
|
659
|
+
*
|
|
660
|
+
* - CEP:
|
|
661
|
+
* <PatternInput
|
|
662
|
+
* label="CEP"
|
|
663
|
+
* format="#####-###"
|
|
664
|
+
* allowEmptyFormatting
|
|
665
|
+
* mask="_"
|
|
666
|
+
* />
|
|
667
|
+
*/
|
|
668
|
+
declare const PatternInput: React$1.ForwardRefExoticComponent<PatternInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
217
669
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
670
|
+
interface SelectOption {
|
|
671
|
+
value: string;
|
|
672
|
+
label: string;
|
|
673
|
+
disabled?: boolean;
|
|
674
|
+
}
|
|
675
|
+
interface SelectGroupOption {
|
|
676
|
+
label: string;
|
|
677
|
+
options: SelectOption[];
|
|
678
|
+
}
|
|
679
|
+
type SelectBaseProps = {
|
|
680
|
+
/**
|
|
681
|
+
* Opções do select. Pode ser um array simples ou com grupos.
|
|
682
|
+
*/
|
|
683
|
+
options: SelectOption[] | SelectGroupOption[];
|
|
684
|
+
/**
|
|
685
|
+
* Placeholder quando nenhum valor está selecionado.
|
|
686
|
+
*/
|
|
223
687
|
placeholder?: string;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
688
|
+
/**
|
|
689
|
+
* Valor selecionado (controlado).
|
|
690
|
+
*/
|
|
227
691
|
value?: string;
|
|
228
|
-
|
|
692
|
+
/**
|
|
693
|
+
* Callback quando o valor muda.
|
|
694
|
+
*/
|
|
695
|
+
onValueChange?: (value: string) => void;
|
|
696
|
+
/**
|
|
697
|
+
* Valor padrão (não controlado).
|
|
698
|
+
*/
|
|
699
|
+
defaultValue?: string;
|
|
700
|
+
/**
|
|
701
|
+
* Se o select está desabilitado.
|
|
702
|
+
*/
|
|
703
|
+
disabled?: boolean;
|
|
704
|
+
/**
|
|
705
|
+
* Habilita busca no select.
|
|
706
|
+
*/
|
|
707
|
+
searchable?: boolean;
|
|
708
|
+
/**
|
|
709
|
+
* Placeholder do campo de busca.
|
|
710
|
+
*/
|
|
711
|
+
searchPlaceholder?: string;
|
|
229
712
|
};
|
|
713
|
+
interface SelectWithFieldProps extends SelectBaseProps {
|
|
714
|
+
/**
|
|
715
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
716
|
+
*/
|
|
717
|
+
label?: React$1.ReactNode;
|
|
718
|
+
/**
|
|
719
|
+
* Descrição ou texto de ajuda do campo.
|
|
720
|
+
*/
|
|
721
|
+
description?: React$1.ReactNode;
|
|
722
|
+
/**
|
|
723
|
+
* Mensagem de erro ou array de erros.
|
|
724
|
+
*/
|
|
725
|
+
error?: React$1.ReactNode | Array<{
|
|
726
|
+
message?: string;
|
|
727
|
+
} | undefined>;
|
|
728
|
+
/**
|
|
729
|
+
* Define se o campo está inválido.
|
|
730
|
+
*/
|
|
731
|
+
invalid?: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
734
|
+
*/
|
|
735
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
736
|
+
/**
|
|
737
|
+
* Classes CSS adicionais para o container do Field.
|
|
738
|
+
*/
|
|
739
|
+
fieldClassName?: string;
|
|
740
|
+
/**
|
|
741
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
742
|
+
*/
|
|
743
|
+
id?: string;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Select padrão do Design System com suporte a busca opcional.
|
|
747
|
+
*
|
|
748
|
+
* Pode ser usado de duas formas:
|
|
749
|
+
* 1. Como select simples: <Select options={[...]} />
|
|
750
|
+
* 2. Com Field integrado: <Select label="Estado" options={[...]} />
|
|
751
|
+
* 3. Com busca: <Select options={[...]} searchable />
|
|
752
|
+
*
|
|
753
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
754
|
+
* cria o Field ao redor do select.
|
|
755
|
+
*/
|
|
756
|
+
declare const Select: React$1.ForwardRefExoticComponent<SelectWithFieldProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
757
|
+
interface MultiSelectWithFieldProps {
|
|
758
|
+
/**
|
|
759
|
+
* Opções do select.
|
|
760
|
+
*/
|
|
761
|
+
options: SelectOption[];
|
|
762
|
+
/**
|
|
763
|
+
* Valores selecionados (controlado).
|
|
764
|
+
*/
|
|
765
|
+
value?: string[];
|
|
766
|
+
/**
|
|
767
|
+
* Callback quando os valores mudam.
|
|
768
|
+
*/
|
|
769
|
+
onValueChange?: (values: string[]) => void;
|
|
770
|
+
/**
|
|
771
|
+
* Valores padrão (não controlado).
|
|
772
|
+
*/
|
|
773
|
+
defaultValue?: string[];
|
|
774
|
+
/**
|
|
775
|
+
* Placeholder quando nenhum valor está selecionado.
|
|
776
|
+
*/
|
|
777
|
+
placeholder?: string;
|
|
778
|
+
/**
|
|
779
|
+
* Se o select está desabilitado.
|
|
780
|
+
*/
|
|
781
|
+
disabled?: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* Placeholder do campo de busca.
|
|
784
|
+
*/
|
|
785
|
+
searchPlaceholder?: string;
|
|
786
|
+
/**
|
|
787
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
788
|
+
*/
|
|
789
|
+
label?: React$1.ReactNode;
|
|
790
|
+
/**
|
|
791
|
+
* Descrição ou texto de ajuda do campo.
|
|
792
|
+
*/
|
|
793
|
+
description?: React$1.ReactNode;
|
|
794
|
+
/**
|
|
795
|
+
* Mensagem de erro ou array de erros.
|
|
796
|
+
*/
|
|
797
|
+
error?: React$1.ReactNode | Array<{
|
|
798
|
+
message?: string;
|
|
799
|
+
} | undefined>;
|
|
800
|
+
/**
|
|
801
|
+
* Define se o campo está inválido.
|
|
802
|
+
*/
|
|
803
|
+
invalid?: boolean;
|
|
804
|
+
/**
|
|
805
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
806
|
+
*/
|
|
807
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
808
|
+
/**
|
|
809
|
+
* Classes CSS adicionais para o container do Field.
|
|
810
|
+
*/
|
|
811
|
+
fieldClassName?: string;
|
|
812
|
+
/**
|
|
813
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
814
|
+
*/
|
|
815
|
+
id?: string;
|
|
816
|
+
/**
|
|
817
|
+
* Máximo de itens que podem ser selecionados.
|
|
818
|
+
*/
|
|
819
|
+
maxSelected?: number;
|
|
820
|
+
/**
|
|
821
|
+
* Número máximo de opções visíveis no input. Quando há mais opções selecionadas,
|
|
822
|
+
* apenas as primeiras N são mostradas com um indicador do restante.
|
|
823
|
+
* Padrão: 5
|
|
824
|
+
*/
|
|
825
|
+
maxVisible?: number;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Select com múltiplas seleções e busca integrada usando Command.
|
|
829
|
+
*
|
|
830
|
+
* Permite selecionar múltiplos valores com busca/filtro.
|
|
831
|
+
*/
|
|
832
|
+
declare const MultiSelect: React$1.ForwardRefExoticComponent<MultiSelectWithFieldProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
230
833
|
|
|
231
|
-
type
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
834
|
+
type TextAreaProps = React$1.ComponentProps<"textarea">;
|
|
835
|
+
/**
|
|
836
|
+
* Campo de texto multilinha padrão do Design System.
|
|
837
|
+
*
|
|
838
|
+
* Pode ser usado de duas formas:
|
|
839
|
+
* 1. Como textarea simples: <TextArea placeholder="..." />
|
|
840
|
+
* 2. Com Field integrado: <TextArea label="Descrição" description="..." />
|
|
841
|
+
*
|
|
842
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
843
|
+
* cria o Field ao redor do textarea.
|
|
844
|
+
*/
|
|
845
|
+
interface TextAreaWithFieldProps extends TextAreaProps {
|
|
846
|
+
/**
|
|
847
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
848
|
+
*/
|
|
849
|
+
label?: React$1.ReactNode;
|
|
850
|
+
/**
|
|
851
|
+
* Descrição ou texto de ajuda do campo.
|
|
852
|
+
*/
|
|
853
|
+
description?: React$1.ReactNode;
|
|
854
|
+
/**
|
|
855
|
+
* Mensagem de erro ou array de erros.
|
|
856
|
+
*/
|
|
857
|
+
error?: React$1.ReactNode | Array<{
|
|
858
|
+
message?: string;
|
|
859
|
+
} | undefined>;
|
|
860
|
+
/**
|
|
861
|
+
* Define se o campo está inválido.
|
|
862
|
+
*/
|
|
863
|
+
invalid?: boolean;
|
|
864
|
+
/**
|
|
865
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
866
|
+
*/
|
|
867
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
868
|
+
/**
|
|
869
|
+
* Classes CSS adicionais para o container do Field.
|
|
870
|
+
*/
|
|
871
|
+
fieldClassName?: string;
|
|
872
|
+
}
|
|
873
|
+
declare const TextArea: React$1.ForwardRefExoticComponent<Omit<TextAreaWithFieldProps, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
874
|
+
type TextAreaFieldProps = TextAreaWithFieldProps;
|
|
875
|
+
declare const TextAreaField: React$1.ForwardRefExoticComponent<Omit<TextAreaWithFieldProps, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
239
876
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
877
|
+
interface RadioGroupOption {
|
|
878
|
+
value: string;
|
|
879
|
+
label: string;
|
|
880
|
+
disabled?: boolean;
|
|
881
|
+
}
|
|
882
|
+
type RadioGroupBaseProps = {
|
|
883
|
+
/**
|
|
884
|
+
* Opções do radio group.
|
|
885
|
+
*/
|
|
886
|
+
options: RadioGroupOption[];
|
|
887
|
+
/**
|
|
888
|
+
* Valor selecionado (controlado).
|
|
889
|
+
*/
|
|
890
|
+
value?: string;
|
|
891
|
+
/**
|
|
892
|
+
* Callback quando o valor muda.
|
|
893
|
+
*/
|
|
894
|
+
onValueChange?: (value: string) => void;
|
|
895
|
+
/**
|
|
896
|
+
* Valor padrão (não controlado).
|
|
897
|
+
*/
|
|
898
|
+
defaultValue?: string;
|
|
899
|
+
/**
|
|
900
|
+
* Se o radio group está desabilitado.
|
|
901
|
+
*/
|
|
902
|
+
disabled?: boolean;
|
|
903
|
+
/**
|
|
904
|
+
* Orientação dos itens (vertical ou horizontal).
|
|
905
|
+
*/
|
|
906
|
+
orientation?: "vertical" | "horizontal";
|
|
907
|
+
/**
|
|
908
|
+
* Classes CSS adicionais para o container do RadioGroup.
|
|
909
|
+
*/
|
|
248
910
|
className?: string;
|
|
249
911
|
};
|
|
912
|
+
interface RadioGroupWithFieldProps extends RadioGroupBaseProps {
|
|
913
|
+
/**
|
|
914
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
915
|
+
*/
|
|
916
|
+
label?: React$1.ReactNode;
|
|
917
|
+
/**
|
|
918
|
+
* Descrição ou texto de ajuda do campo.
|
|
919
|
+
*/
|
|
920
|
+
description?: React$1.ReactNode;
|
|
921
|
+
/**
|
|
922
|
+
* Mensagem de erro ou array de erros.
|
|
923
|
+
*/
|
|
924
|
+
error?: React$1.ReactNode | Array<{
|
|
925
|
+
message?: string;
|
|
926
|
+
} | undefined>;
|
|
927
|
+
/**
|
|
928
|
+
* Define se o campo está inválido.
|
|
929
|
+
*/
|
|
930
|
+
invalid?: boolean;
|
|
931
|
+
/**
|
|
932
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
933
|
+
*/
|
|
934
|
+
fieldOrientation?: "vertical" | "horizontal" | "responsive";
|
|
935
|
+
/**
|
|
936
|
+
* Classes CSS adicionais para o container do Field.
|
|
937
|
+
*/
|
|
938
|
+
fieldClassName?: string;
|
|
939
|
+
/**
|
|
940
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
941
|
+
*/
|
|
942
|
+
id?: string;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* RadioGroup padrão do Design System.
|
|
946
|
+
*
|
|
947
|
+
* Pode ser usado de duas formas:
|
|
948
|
+
* 1. Como radio group simples: <RadioGroup options={[...]} />
|
|
949
|
+
* 2. Com Field integrado: <RadioGroup label="Opção" options={[...]} />
|
|
950
|
+
*
|
|
951
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
952
|
+
* cria o Field ao redor do radio group.
|
|
953
|
+
*/
|
|
954
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupWithFieldProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
250
955
|
|
|
251
|
-
|
|
252
|
-
label?: string;
|
|
253
|
-
name?: string;
|
|
254
|
-
withoutForm?: boolean;
|
|
255
|
-
className?: string;
|
|
256
|
-
required?: boolean;
|
|
257
|
-
"data-testid"?: string;
|
|
258
|
-
};
|
|
259
|
-
declare function MultiSelect({ label, name, withoutForm, className, required, "data-testid": testId, ...props }: MultiSelectProps): React__default.JSX.Element;
|
|
956
|
+
declare const Switch$1: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
260
957
|
|
|
261
|
-
type SwitchProps
|
|
958
|
+
type SwitchProps = React$1.ComponentProps<typeof Switch$1>;
|
|
959
|
+
/**
|
|
960
|
+
* Switch padrão do Design System.
|
|
961
|
+
*
|
|
962
|
+
* Pode ser usado de duas formas:
|
|
963
|
+
* 1. Como switch simples: <Switch />
|
|
964
|
+
* 2. Com Field integrado: <Switch label="Ativar notificações" description="..." />
|
|
965
|
+
*
|
|
966
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
967
|
+
* cria o Field ao redor do switch.
|
|
968
|
+
*/
|
|
969
|
+
interface SwitchWithFieldProps extends SwitchProps {
|
|
970
|
+
/**
|
|
971
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
972
|
+
*/
|
|
973
|
+
label?: React$1.ReactNode;
|
|
974
|
+
/**
|
|
975
|
+
* Descrição ou texto de ajuda do campo.
|
|
976
|
+
*/
|
|
977
|
+
description?: React$1.ReactNode;
|
|
978
|
+
/**
|
|
979
|
+
* Mensagem de erro ou array de erros.
|
|
980
|
+
*/
|
|
981
|
+
error?: React$1.ReactNode | Array<{
|
|
982
|
+
message?: string;
|
|
983
|
+
} | undefined>;
|
|
984
|
+
/**
|
|
985
|
+
* Define se o campo está inválido.
|
|
986
|
+
*/
|
|
987
|
+
invalid?: boolean;
|
|
988
|
+
/**
|
|
989
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
990
|
+
*/
|
|
991
|
+
/**
|
|
992
|
+
* Classes CSS adicionais para o container do Field.
|
|
993
|
+
*/
|
|
994
|
+
fieldClassName?: string;
|
|
995
|
+
/**
|
|
996
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
997
|
+
*/
|
|
998
|
+
id?: string;
|
|
999
|
+
/**
|
|
1000
|
+
* Posição do label em relação ao switch (left ou right).
|
|
1001
|
+
* Padrão: "right"
|
|
1002
|
+
*/
|
|
1003
|
+
labelPosition?: "left" | "right";
|
|
1004
|
+
}
|
|
1005
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchWithFieldProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
262
1006
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
};
|
|
267
|
-
declare function Switch({ label, withoutForm, className, ...props }: SwitchProps): React$1.JSX.Element;
|
|
1007
|
+
declare function Calendar$1({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React$1.ComponentProps<typeof DayPicker> & {
|
|
1008
|
+
buttonVariant?: React$1.ComponentProps<typeof Button$1>["variant"];
|
|
1009
|
+
}): React$1.JSX.Element;
|
|
268
1010
|
|
|
269
|
-
declare const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
1011
|
+
declare const Popover$1: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
1012
|
+
declare const PopoverTrigger$1: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1013
|
+
declare const PopoverContent$1: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Calendar raiz (primitivo) baseado no react-day-picker.
|
|
1017
|
+
*
|
|
1018
|
+
* Use quando precisar de controle total sobre o calendário.
|
|
1019
|
+
*/
|
|
1020
|
+
declare const Calendar: typeof Calendar$1;
|
|
1021
|
+
type CalendarProps = React$1.ComponentProps<typeof Calendar$1>;
|
|
1022
|
+
/**
|
|
1023
|
+
* Popover raiz (primitivo) baseado no Radix UI.
|
|
1024
|
+
*/
|
|
1025
|
+
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
1026
|
+
type PopoverProps = React$1.ComponentProps<typeof Popover$1>;
|
|
1027
|
+
/**
|
|
1028
|
+
* PopoverTrigger (primitivo).
|
|
1029
|
+
*/
|
|
1030
|
+
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1031
|
+
type PopoverTriggerProps = React$1.ComponentProps<typeof PopoverTrigger$1>;
|
|
1032
|
+
/**
|
|
1033
|
+
* PopoverContent (primitivo).
|
|
1034
|
+
*/
|
|
1035
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1036
|
+
type PopoverContentProps = React$1.ComponentProps<typeof PopoverContent$1>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Props base compartilhadas entre todos os tipos de DatePicker.
|
|
1039
|
+
*/
|
|
1040
|
+
interface DatePickerBaseProps {
|
|
1041
|
+
/**
|
|
1042
|
+
* Placeholder exibido quando nenhuma data está selecionada.
|
|
1043
|
+
* @default "Selecione uma data"
|
|
1044
|
+
*/
|
|
1045
|
+
placeholder?: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* Formato da data exibida no botão.
|
|
1048
|
+
* Usa date-fns format. Padrão: "PPP" (ex: "January 1, 2024")
|
|
1049
|
+
*/
|
|
1050
|
+
dateFormat?: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* Define se o DatePicker está desabilitado.
|
|
1053
|
+
*/
|
|
1054
|
+
disabled?: boolean;
|
|
1055
|
+
/**
|
|
1056
|
+
* Classes CSS adicionais para o botão trigger.
|
|
1057
|
+
*/
|
|
1058
|
+
buttonClassName?: string;
|
|
1059
|
+
/**
|
|
1060
|
+
* Classes CSS adicionais para o conteúdo do popover.
|
|
1061
|
+
*/
|
|
1062
|
+
popoverContentClassName?: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Classes CSS adicionais para o calendário.
|
|
1065
|
+
*/
|
|
1066
|
+
calendarClassName?: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* Props adicionais passadas para o componente Calendar.
|
|
1069
|
+
*/
|
|
1070
|
+
calendarProps?: Omit<DayPickerProps, "selected" | "onSelect" | "mode" | "disabled">;
|
|
1071
|
+
/**
|
|
1072
|
+
* Define se o calendário deve mostrar dias fora do mês.
|
|
1073
|
+
* @default true
|
|
1074
|
+
*/
|
|
1075
|
+
showOutsideDays?: boolean;
|
|
1076
|
+
/**
|
|
1077
|
+
* Data mínima selecionável.
|
|
1078
|
+
*/
|
|
1079
|
+
minDate?: Date;
|
|
1080
|
+
/**
|
|
1081
|
+
* Data máxima selecionável.
|
|
1082
|
+
*/
|
|
1083
|
+
maxDate?: Date;
|
|
1084
|
+
/**
|
|
1085
|
+
* Datas desabilitadas.
|
|
1086
|
+
*/
|
|
1087
|
+
disabledDates?: Date[];
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Props para DatePickerSingle - seleção de data única.
|
|
1091
|
+
*/
|
|
1092
|
+
interface DatePickerSingleBaseProps extends DatePickerBaseProps {
|
|
1093
|
+
/**
|
|
1094
|
+
* Data selecionada.
|
|
1095
|
+
*/
|
|
1096
|
+
date?: Date;
|
|
1097
|
+
/**
|
|
1098
|
+
* Callback chamado quando a data é selecionada.
|
|
1099
|
+
*/
|
|
1100
|
+
onSelect?: (date: Date | undefined) => void;
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Props para DatePickerSingle com suporte a Field.
|
|
1104
|
+
*/
|
|
1105
|
+
interface DatePickerSingleProps extends DatePickerSingleBaseProps {
|
|
1106
|
+
/**
|
|
1107
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
1108
|
+
*/
|
|
1109
|
+
label?: React$1.ReactNode;
|
|
1110
|
+
/**
|
|
1111
|
+
* Descrição ou texto de ajuda do campo.
|
|
1112
|
+
*/
|
|
1113
|
+
description?: React$1.ReactNode;
|
|
1114
|
+
/**
|
|
1115
|
+
* Mensagem de erro ou array de erros.
|
|
1116
|
+
*/
|
|
1117
|
+
error?: React$1.ReactNode | Array<{
|
|
1118
|
+
message?: string;
|
|
1119
|
+
} | undefined>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Define se o campo está inválido.
|
|
1122
|
+
*/
|
|
1123
|
+
invalid?: boolean;
|
|
1124
|
+
/**
|
|
1125
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
1126
|
+
*/
|
|
1127
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
1128
|
+
/**
|
|
1129
|
+
* Classes CSS adicionais para o container do Field.
|
|
1130
|
+
*/
|
|
1131
|
+
fieldClassName?: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
1134
|
+
*/
|
|
1135
|
+
id?: string;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* DatePicker para seleção de data única.
|
|
1139
|
+
*
|
|
1140
|
+
* Pode ser usado de duas formas:
|
|
1141
|
+
* 1. Como DatePicker simples: <DatePickerSingle date={date} onSelect={setDate} />
|
|
1142
|
+
* 2. Com Field integrado: <DatePickerSingle label="Data" date={date} onSelect={setDate} />
|
|
1143
|
+
*
|
|
1144
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
1145
|
+
* cria o Field ao redor do DatePicker.
|
|
1146
|
+
*
|
|
1147
|
+
* @example
|
|
1148
|
+
* ```tsx
|
|
1149
|
+
* import { DatePickerSingle } from "@phsa.tec/design-system-react"
|
|
1150
|
+
*
|
|
1151
|
+
* function MyForm() {
|
|
1152
|
+
* const [date, setDate] = React.useState<Date>()
|
|
1153
|
+
*
|
|
1154
|
+
* return (
|
|
1155
|
+
* <DatePickerSingle
|
|
1156
|
+
* label="Data de nascimento"
|
|
1157
|
+
* description="Selecione sua data de nascimento"
|
|
1158
|
+
* date={date}
|
|
1159
|
+
* onSelect={setDate}
|
|
1160
|
+
* placeholder="Selecione uma data"
|
|
1161
|
+
* />
|
|
1162
|
+
* )
|
|
1163
|
+
* }
|
|
1164
|
+
* ```
|
|
1165
|
+
*/
|
|
1166
|
+
declare const DatePickerSingle: React$1.ForwardRefExoticComponent<DatePickerSingleProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1167
|
+
/**
|
|
1168
|
+
* Props para DatePickerRange - seleção de range de datas.
|
|
1169
|
+
*/
|
|
1170
|
+
interface DatePickerRangeBaseProps extends DatePickerBaseProps {
|
|
1171
|
+
/**
|
|
1172
|
+
* Range de datas selecionado.
|
|
1173
|
+
*/
|
|
1174
|
+
date?: DateRange;
|
|
1175
|
+
/**
|
|
1176
|
+
* Callback chamado quando o range é selecionado.
|
|
1177
|
+
*/
|
|
1178
|
+
onSelect?: (range: DateRange | undefined) => void;
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Props para DatePickerRange com suporte a Field.
|
|
1182
|
+
*/
|
|
1183
|
+
interface DatePickerRangeProps extends DatePickerRangeBaseProps {
|
|
1184
|
+
/**
|
|
1185
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
1186
|
+
*/
|
|
1187
|
+
label?: React$1.ReactNode;
|
|
1188
|
+
/**
|
|
1189
|
+
* Descrição ou texto de ajuda do campo.
|
|
1190
|
+
*/
|
|
1191
|
+
description?: React$1.ReactNode;
|
|
1192
|
+
/**
|
|
1193
|
+
* Mensagem de erro ou array de erros.
|
|
1194
|
+
*/
|
|
1195
|
+
error?: React$1.ReactNode | Array<{
|
|
1196
|
+
message?: string;
|
|
1197
|
+
} | undefined>;
|
|
1198
|
+
/**
|
|
1199
|
+
* Define se o campo está inválido.
|
|
1200
|
+
*/
|
|
1201
|
+
invalid?: boolean;
|
|
1202
|
+
/**
|
|
1203
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
1204
|
+
*/
|
|
1205
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
1206
|
+
/**
|
|
1207
|
+
* Classes CSS adicionais para o container do Field.
|
|
1208
|
+
*/
|
|
1209
|
+
fieldClassName?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
1212
|
+
*/
|
|
1213
|
+
id?: string;
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* DatePicker para seleção de range de datas.
|
|
1217
|
+
*
|
|
1218
|
+
* Pode ser usado de duas formas:
|
|
1219
|
+
* 1. Como DatePicker simples: <DatePickerRange date={range} onSelect={setRange} />
|
|
1220
|
+
* 2. Com Field integrado: <DatePickerRange label="Período" date={range} onSelect={setRange} />
|
|
1221
|
+
*
|
|
1222
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
1223
|
+
* cria o Field ao redor do DatePicker.
|
|
1224
|
+
*
|
|
1225
|
+
* @example
|
|
1226
|
+
* ```tsx
|
|
1227
|
+
* import { DatePickerRange } from "@phsa.tec/design-system-react"
|
|
1228
|
+
* import type { DateRange } from "react-day-picker"
|
|
1229
|
+
*
|
|
1230
|
+
* function MyForm() {
|
|
1231
|
+
* const [range, setRange] = React.useState<DateRange>()
|
|
1232
|
+
*
|
|
1233
|
+
* return (
|
|
1234
|
+
* <DatePickerRange
|
|
1235
|
+
* label="Período de viagem"
|
|
1236
|
+
* description="Selecione as datas de ida e volta"
|
|
1237
|
+
* date={range}
|
|
1238
|
+
* onSelect={setRange}
|
|
1239
|
+
* placeholder="Selecione um range"
|
|
1240
|
+
* />
|
|
1241
|
+
* )
|
|
1242
|
+
* }
|
|
1243
|
+
* ```
|
|
1244
|
+
*/
|
|
1245
|
+
declare const DatePickerRange: React$1.ForwardRefExoticComponent<DatePickerRangeProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Props para DatePickerMultiple - seleção de múltiplas datas.
|
|
1248
|
+
*/
|
|
1249
|
+
interface DatePickerMultipleBaseProps extends DatePickerBaseProps {
|
|
1250
|
+
/**
|
|
1251
|
+
* Datas selecionadas.
|
|
1252
|
+
*/
|
|
1253
|
+
date?: Date[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Callback chamado quando as datas são selecionadas.
|
|
1256
|
+
*/
|
|
1257
|
+
onSelect?: (dates: Date[]) => void;
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* Props para DatePickerMultiple com suporte a Field.
|
|
1261
|
+
*/
|
|
1262
|
+
interface DatePickerMultipleProps extends DatePickerMultipleBaseProps {
|
|
1263
|
+
/**
|
|
1264
|
+
* Label do campo. Quando fornecido, cria o Field automaticamente.
|
|
1265
|
+
*/
|
|
1266
|
+
label?: React$1.ReactNode;
|
|
1267
|
+
/**
|
|
1268
|
+
* Descrição ou texto de ajuda do campo.
|
|
1269
|
+
*/
|
|
1270
|
+
description?: React$1.ReactNode;
|
|
1271
|
+
/**
|
|
1272
|
+
* Mensagem de erro ou array de erros.
|
|
1273
|
+
*/
|
|
1274
|
+
error?: React$1.ReactNode | Array<{
|
|
1275
|
+
message?: string;
|
|
1276
|
+
} | undefined>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Define se o campo está inválido.
|
|
1279
|
+
*/
|
|
1280
|
+
invalid?: boolean;
|
|
1281
|
+
/**
|
|
1282
|
+
* Orientação do Field (vertical, horizontal, responsive).
|
|
1283
|
+
*/
|
|
1284
|
+
orientation?: "vertical" | "horizontal" | "responsive";
|
|
1285
|
+
/**
|
|
1286
|
+
* Classes CSS adicionais para o container do Field.
|
|
1287
|
+
*/
|
|
1288
|
+
fieldClassName?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* ID do campo. Se não fornecido, será gerado automaticamente.
|
|
1291
|
+
*/
|
|
1292
|
+
id?: string;
|
|
275
1293
|
}
|
|
1294
|
+
/**
|
|
1295
|
+
* DatePicker para seleção de múltiplas datas.
|
|
1296
|
+
*
|
|
1297
|
+
* Pode ser usado de duas formas:
|
|
1298
|
+
* 1. Como DatePicker simples: <DatePickerMultiple date={dates} onSelect={setDates} />
|
|
1299
|
+
* 2. Com Field integrado: <DatePickerMultiple label="Datas" date={dates} onSelect={setDates} />
|
|
1300
|
+
*
|
|
1301
|
+
* Quando usado com props do Field (label, description, error), automaticamente
|
|
1302
|
+
* cria o Field ao redor do DatePicker.
|
|
1303
|
+
*
|
|
1304
|
+
* @example
|
|
1305
|
+
* ```tsx
|
|
1306
|
+
* import { DatePickerMultiple } from "@phsa.tec/design-system-react"
|
|
1307
|
+
*
|
|
1308
|
+
* function MyForm() {
|
|
1309
|
+
* const [dates, setDates] = React.useState<Date[]>([])
|
|
1310
|
+
*
|
|
1311
|
+
* return (
|
|
1312
|
+
* <DatePickerMultiple
|
|
1313
|
+
* label="Datas disponíveis"
|
|
1314
|
+
* description="Selecione todas as datas que deseja"
|
|
1315
|
+
* date={dates}
|
|
1316
|
+
* onSelect={setDates}
|
|
1317
|
+
* placeholder="Selecione múltiplas datas"
|
|
1318
|
+
* />
|
|
1319
|
+
* )
|
|
1320
|
+
* }
|
|
1321
|
+
* ```
|
|
1322
|
+
*/
|
|
1323
|
+
declare const DatePickerMultiple: React$1.ForwardRefExoticComponent<DatePickerMultipleProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1324
|
+
/**
|
|
1325
|
+
* DatePicker padrão - alias para DatePickerSingle para manter compatibilidade.
|
|
1326
|
+
*
|
|
1327
|
+
* @deprecated Use DatePickerSingle, DatePickerRange ou DatePickerMultiple diretamente.
|
|
1328
|
+
* Este componente será removido em uma versão futura.
|
|
1329
|
+
*
|
|
1330
|
+
* @example
|
|
1331
|
+
* ```tsx
|
|
1332
|
+
* import { DatePicker } from "@phsa.tec/design-system-react"
|
|
1333
|
+
*
|
|
1334
|
+
* function MyForm() {
|
|
1335
|
+
* const [date, setDate] = React.useState<Date>()
|
|
1336
|
+
*
|
|
1337
|
+
* return (
|
|
1338
|
+
* <DatePicker
|
|
1339
|
+
* date={date}
|
|
1340
|
+
* onSelect={setDate}
|
|
1341
|
+
* placeholder="Selecione uma data"
|
|
1342
|
+
* />
|
|
1343
|
+
* )
|
|
1344
|
+
* }
|
|
1345
|
+
* ```
|
|
1346
|
+
*/
|
|
1347
|
+
declare const DatePicker: React$1.ForwardRefExoticComponent<DatePickerSingleProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1348
|
+
/**
|
|
1349
|
+
* @deprecated Use DatePickerSingleProps
|
|
1350
|
+
*/
|
|
1351
|
+
type DatePickerProps = DatePickerSingleProps;
|
|
276
1352
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
};
|
|
280
|
-
declare
|
|
281
|
-
|
|
282
|
-
}
|
|
1353
|
+
declare function Dialog$1({ ...props }: React$1.ComponentProps<typeof Dialog$2.Root>): React$1.JSX.Element;
|
|
1354
|
+
declare function DialogTrigger$1({ ...props }: React$1.ComponentProps<typeof Dialog$2.Trigger>): React$1.JSX.Element;
|
|
1355
|
+
declare function DialogPortal$1({ ...props }: React$1.ComponentProps<typeof Dialog$2.Portal>): React$1.JSX.Element;
|
|
1356
|
+
declare function DialogClose$1({ ...props }: React$1.ComponentProps<typeof Dialog$2.Close>): React$1.JSX.Element;
|
|
1357
|
+
declare function DialogOverlay$1({ className, ...props }: React$1.ComponentProps<typeof Dialog$2.Overlay>): React$1.JSX.Element;
|
|
1358
|
+
declare function DialogContent$1({ className, children, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog$2.Content> & {
|
|
1359
|
+
showCloseButton?: boolean;
|
|
1360
|
+
}): React$1.JSX.Element;
|
|
1361
|
+
declare function DialogHeader$1({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
1362
|
+
declare function DialogFooter$1({ className, showCloseButton, children, ...props }: React$1.ComponentProps<"div"> & {
|
|
1363
|
+
showCloseButton?: boolean;
|
|
1364
|
+
}): React$1.JSX.Element;
|
|
1365
|
+
declare function DialogTitle$1({ className, ...props }: React$1.ComponentProps<typeof Dialog$2.Title>): React$1.JSX.Element;
|
|
1366
|
+
declare function DialogDescription$1({ className, ...props }: React$1.ComponentProps<typeof Dialog$2.Description>): React$1.JSX.Element;
|
|
283
1367
|
|
|
284
|
-
|
|
1368
|
+
/**
|
|
1369
|
+
* Dialog raiz (primitivo) baseado no shadcn.
|
|
1370
|
+
*
|
|
1371
|
+
* Use quando precisar de controle total sobre a estrutura do dialog.
|
|
1372
|
+
*/
|
|
1373
|
+
declare const DialogRoot: typeof Dialog$1;
|
|
1374
|
+
type DialogRootProps = React$1.ComponentProps<typeof Dialog$1>;
|
|
1375
|
+
/**
|
|
1376
|
+
* Trigger do Dialog (primitivo).
|
|
1377
|
+
*
|
|
1378
|
+
* Elemento que abre o dialog quando clicado.
|
|
1379
|
+
*/
|
|
1380
|
+
declare const DialogTrigger: typeof DialogTrigger$1;
|
|
1381
|
+
type DialogTriggerProps = React$1.ComponentProps<typeof DialogTrigger$1>;
|
|
1382
|
+
/**
|
|
1383
|
+
* Portal do Dialog (primitivo).
|
|
1384
|
+
*
|
|
1385
|
+
* Controla onde o dialog é renderizado no DOM.
|
|
1386
|
+
*/
|
|
1387
|
+
declare const DialogPortal: typeof DialogPortal$1;
|
|
1388
|
+
type DialogPortalProps = React$1.ComponentProps<typeof DialogPortal$1>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Overlay do Dialog (primitivo).
|
|
1391
|
+
*
|
|
1392
|
+
* Fundo escuro que aparece atrás do dialog.
|
|
1393
|
+
*/
|
|
1394
|
+
declare const DialogOverlay: typeof DialogOverlay$1;
|
|
1395
|
+
type DialogOverlayProps = React$1.ComponentProps<typeof DialogOverlay$1>;
|
|
1396
|
+
/**
|
|
1397
|
+
* Botão de fechar do Dialog (primitivo).
|
|
1398
|
+
*/
|
|
1399
|
+
declare const DialogClose: typeof DialogClose$1;
|
|
1400
|
+
type DialogCloseProps = React$1.ComponentProps<typeof DialogClose$1>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Conteúdo principal do Dialog (primitivo).
|
|
1403
|
+
*
|
|
1404
|
+
* Container que envolve todo o conteúdo do dialog.
|
|
1405
|
+
*/
|
|
1406
|
+
declare const DialogContent: typeof DialogContent$1;
|
|
1407
|
+
type DialogContentProps = React$1.ComponentProps<typeof DialogContent$1>;
|
|
1408
|
+
/**
|
|
1409
|
+
* Cabeçalho do Dialog (primitivo).
|
|
1410
|
+
*
|
|
1411
|
+
* Normalmente contém `DialogTitle` e `DialogDescription`.
|
|
1412
|
+
*/
|
|
1413
|
+
declare const DialogHeader: typeof DialogHeader$1;
|
|
1414
|
+
type DialogHeaderProps = React$1.ComponentProps<typeof DialogHeader$1>;
|
|
1415
|
+
/**
|
|
1416
|
+
* Rodapé do Dialog (primitivo).
|
|
1417
|
+
*
|
|
1418
|
+
* Ideal para ações (botões) ou informações complementares.
|
|
1419
|
+
*/
|
|
1420
|
+
declare const DialogFooter: typeof DialogFooter$1;
|
|
1421
|
+
type DialogFooterProps = React$1.ComponentProps<typeof DialogFooter$1>;
|
|
1422
|
+
/**
|
|
1423
|
+
* Título do Dialog (primitivo).
|
|
1424
|
+
*/
|
|
1425
|
+
declare const DialogTitle: typeof DialogTitle$1;
|
|
1426
|
+
type DialogTitleProps = React$1.ComponentProps<typeof DialogTitle$1>;
|
|
1427
|
+
/**
|
|
1428
|
+
* Descrição do Dialog (primitivo).
|
|
1429
|
+
*/
|
|
1430
|
+
declare const DialogDescription: typeof DialogDescription$1;
|
|
1431
|
+
type DialogDescriptionProps = React$1.ComponentProps<typeof DialogDescription$1>;
|
|
1432
|
+
interface DialogProps extends Omit<DialogRootProps, "children"> {
|
|
1433
|
+
/**
|
|
1434
|
+
* Elemento que aciona a abertura do dialog.
|
|
1435
|
+
* Normalmente um botão ou link.
|
|
1436
|
+
*/
|
|
1437
|
+
trigger?: React$1.ReactNode;
|
|
1438
|
+
/**
|
|
1439
|
+
* Título do dialog.
|
|
1440
|
+
* Quando informado, é renderizado dentro de `DialogHeader` usando `DialogTitle`.
|
|
1441
|
+
*/
|
|
1442
|
+
title?: React$1.ReactNode;
|
|
1443
|
+
/**
|
|
1444
|
+
* Descrição do dialog.
|
|
1445
|
+
* Quando informada, é renderizada dentro de `DialogHeader` usando `DialogDescription`.
|
|
1446
|
+
*/
|
|
1447
|
+
description?: React$1.ReactNode;
|
|
1448
|
+
/**
|
|
1449
|
+
* Conteúdo principal do dialog.
|
|
1450
|
+
* Renderizado dentro de `DialogContent`.
|
|
1451
|
+
*/
|
|
1452
|
+
children?: React$1.ReactNode;
|
|
1453
|
+
/**
|
|
1454
|
+
* Conteúdo do rodapé do dialog.
|
|
1455
|
+
* Renderizado dentro de `DialogFooter` (ex: botões de ação).
|
|
1456
|
+
*/
|
|
1457
|
+
footer?: React$1.ReactNode;
|
|
1458
|
+
/**
|
|
1459
|
+
* Controla se o dialog está aberto ou fechado.
|
|
1460
|
+
* Use para controlar o estado do dialog externamente.
|
|
1461
|
+
*/
|
|
1462
|
+
open?: boolean;
|
|
1463
|
+
/**
|
|
1464
|
+
* Callback chamado quando o estado de abertura do dialog muda.
|
|
1465
|
+
*/
|
|
1466
|
+
onOpenChange?: (open: boolean) => void;
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Dialog padrão do Design System.
|
|
1470
|
+
*
|
|
1471
|
+
* Fornece uma estrutura de layout comum:
|
|
1472
|
+
* - Trigger opcional (`trigger`)
|
|
1473
|
+
* - Header opcional com `title` e `description`
|
|
1474
|
+
* - Content com `children`
|
|
1475
|
+
* - Footer opcional com `footer`
|
|
1476
|
+
*
|
|
1477
|
+
* Quando precisar de mais flexibilidade, use os primitivos:
|
|
1478
|
+
* `DialogRoot`, `DialogTrigger`, `DialogContent`, `DialogHeader`, `DialogTitle`,
|
|
1479
|
+
* `DialogDescription`, `DialogFooter`, etc.
|
|
1480
|
+
*/
|
|
1481
|
+
declare const Dialog: ({ trigger, title, description, children, footer, open, onOpenChange, ...rest }: DialogProps) => React$1.JSX.Element;
|
|
285
1482
|
|
|
286
|
-
type
|
|
287
|
-
|
|
288
|
-
title?: string;
|
|
289
|
-
description?: string;
|
|
290
|
-
footer?: () => React.ReactNode;
|
|
291
|
-
};
|
|
292
|
-
declare function Dialog({ title, description, className, children, footer, ...props }: DialogProps): React$1.JSX.Element;
|
|
293
|
-
type DialogWithFormProps = DialogProps & {
|
|
294
|
-
onSubmit: () => void;
|
|
295
|
-
};
|
|
296
|
-
declare const DialogWithForm: ({ title, description, className, children, footer, onSubmit, ...props }: DialogWithFormProps) => React$1.JSX.Element;
|
|
1483
|
+
type ToasterProps$1 = React.ComponentProps<typeof Toaster$2>;
|
|
1484
|
+
declare const Toaster$1: ({ ...props }: ToasterProps$1) => React$1.JSX.Element;
|
|
297
1485
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
1486
|
+
/**
|
|
1487
|
+
* Toaster raiz (primitivo) baseado no sonner.
|
|
1488
|
+
*
|
|
1489
|
+
* Componente que renderiza o container de toasts.
|
|
1490
|
+
* Deve ser adicionado na raiz da aplicação (ex: layout.tsx).
|
|
1491
|
+
*
|
|
1492
|
+
* @example
|
|
1493
|
+
* ```tsx
|
|
1494
|
+
* import { Toaster } from "@phsa.tec/design-system-react"
|
|
1495
|
+
*
|
|
1496
|
+
* function App() {
|
|
1497
|
+
* return (
|
|
1498
|
+
* <>
|
|
1499
|
+
* <YourApp />
|
|
1500
|
+
* <Toaster />
|
|
1501
|
+
* </>
|
|
1502
|
+
* )
|
|
1503
|
+
* }
|
|
1504
|
+
* ```
|
|
1505
|
+
*/
|
|
1506
|
+
declare const Toaster: ({ ...props }: sonner.ToasterProps & React$1.RefAttributes<HTMLElement>) => React$1.JSX.Element;
|
|
1507
|
+
type ToasterProps = React$1.ComponentProps<typeof Toaster$1>;
|
|
301
1508
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
onClick?: (id: number) => void;
|
|
308
|
-
value?: number;
|
|
309
|
-
};
|
|
310
|
-
declare const Steps: ({ data, onClick, value }: StepsProps) => React$1.JSX.Element;
|
|
1509
|
+
declare const Alert$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
1510
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
1511
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1512
|
+
declare const AlertTitle$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1513
|
+
declare const AlertDescription$1: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
311
1514
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
1515
|
+
/**
|
|
1516
|
+
* Alert raiz (primitivo) baseado no shadcn.
|
|
1517
|
+
*
|
|
1518
|
+
* Use quando precisar de controle total sobre a estrutura do alert.
|
|
1519
|
+
*/
|
|
1520
|
+
declare const AlertRoot: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & class_variance_authority.VariantProps<(props?: ({
|
|
1521
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
1522
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1523
|
+
type AlertRootProps = React$1.ComponentProps<typeof Alert$1>;
|
|
1524
|
+
/**
|
|
1525
|
+
* Título do Alert (primitivo).
|
|
1526
|
+
*/
|
|
1527
|
+
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1528
|
+
type AlertTitleProps = React$1.ComponentProps<typeof AlertTitle$1>;
|
|
1529
|
+
/**
|
|
1530
|
+
* Descrição do Alert (primitivo).
|
|
1531
|
+
*/
|
|
1532
|
+
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1533
|
+
type AlertDescriptionProps = React$1.ComponentProps<typeof AlertDescription$1>;
|
|
1534
|
+
type AlertVariant = "default" | "destructive" | "success" | "warning" | "info";
|
|
1535
|
+
interface AlertProps extends Omit<AlertRootProps, "variant" | "children" | "title"> {
|
|
1536
|
+
/**
|
|
1537
|
+
* Variante do alert.
|
|
1538
|
+
* @default "default"
|
|
1539
|
+
*/
|
|
1540
|
+
variant?: AlertVariant;
|
|
1541
|
+
/**
|
|
1542
|
+
* Ícone exibido no alert.
|
|
1543
|
+
* Se não fornecido, um ícone padrão será usado baseado na variante.
|
|
1544
|
+
*/
|
|
1545
|
+
icon?: React$1.ReactNode;
|
|
1546
|
+
/**
|
|
1547
|
+
* Título do alert.
|
|
1548
|
+
*/
|
|
1549
|
+
title?: React$1.ReactNode;
|
|
1550
|
+
/**
|
|
1551
|
+
* Descrição ou conteúdo do alert.
|
|
1552
|
+
*/
|
|
1553
|
+
description?: React$1.ReactNode;
|
|
1554
|
+
/**
|
|
1555
|
+
* Conteúdo adicional do alert.
|
|
1556
|
+
*/
|
|
1557
|
+
children?: React$1.ReactNode;
|
|
1558
|
+
/**
|
|
1559
|
+
* Mostrar botão de fechar.
|
|
1560
|
+
* @default false
|
|
1561
|
+
*/
|
|
1562
|
+
dismissible?: boolean;
|
|
1563
|
+
/**
|
|
1564
|
+
* Callback chamado quando o alert é fechado.
|
|
1565
|
+
*/
|
|
1566
|
+
onDismiss?: () => void;
|
|
1567
|
+
/**
|
|
1568
|
+
* Classes CSS adicionais para o container.
|
|
1569
|
+
*/
|
|
1570
|
+
containerClassName?: string;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* Alert padrão do Design System.
|
|
1574
|
+
*
|
|
1575
|
+
* Componente de alerta para exibir mensagens importantes ao usuário.
|
|
1576
|
+
* Suporta diferentes variantes: default, destructive, success, warning, info.
|
|
1577
|
+
*
|
|
1578
|
+
* @example
|
|
1579
|
+
* ```tsx
|
|
1580
|
+
* import { Alert } from "@phsa.tec/design-system-react"
|
|
1581
|
+
*
|
|
1582
|
+
* // Alert simples
|
|
1583
|
+
* <Alert title="Atenção" description="Esta é uma mensagem importante." />
|
|
1584
|
+
*
|
|
1585
|
+
* // Alert de sucesso
|
|
1586
|
+
* <Alert variant="success" title="Sucesso!" description="Operação realizada com sucesso." />
|
|
1587
|
+
*
|
|
1588
|
+
* // Alert com ícone customizado
|
|
1589
|
+
* <Alert
|
|
1590
|
+
* variant="warning"
|
|
1591
|
+
* icon={<CustomIcon />}
|
|
1592
|
+
* title="Aviso"
|
|
1593
|
+
* description="Verifique os dados antes de continuar."
|
|
1594
|
+
* />
|
|
1595
|
+
* ```
|
|
1596
|
+
*/
|
|
1597
|
+
declare const Alert: ({ variant, icon, title, description, children, dismissible, onDismiss, className, containerClassName, ...rest }: AlertProps) => React$1.JSX.Element | null;
|
|
320
1598
|
|
|
321
|
-
|
|
322
|
-
declare const
|
|
323
|
-
|
|
1599
|
+
declare const AlertDialog$1: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
1600
|
+
declare const AlertDialogTrigger$1: React$1.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1601
|
+
declare const AlertDialogPortal$1: React$1.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
1602
|
+
declare const AlertDialogOverlay$1: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1603
|
+
declare const AlertDialogContent$1: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1604
|
+
declare const AlertDialogHeader$1: {
|
|
1605
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
324
1606
|
displayName: string;
|
|
325
1607
|
};
|
|
326
|
-
declare const
|
|
327
|
-
declare const DrawerPortal: typeof vaul.Portal;
|
|
328
|
-
declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
329
|
-
declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
330
|
-
declare const DrawerContent: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
331
|
-
declare const DrawerHeader: {
|
|
1608
|
+
declare const AlertDialogFooter$1: {
|
|
332
1609
|
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
333
1610
|
displayName: string;
|
|
334
1611
|
};
|
|
335
|
-
declare const
|
|
1612
|
+
declare const AlertDialogTitle$1: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1613
|
+
declare const AlertDialogDescription$1: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1614
|
+
declare const AlertDialogAction$1: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1615
|
+
declare const AlertDialogCancel$1: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* AlertDialog raiz (primitivo) baseado no Radix UI.
|
|
1619
|
+
*
|
|
1620
|
+
* Use quando precisar de controle total sobre a estrutura do alert dialog.
|
|
1621
|
+
*/
|
|
1622
|
+
declare const AlertDialogRoot: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
1623
|
+
type AlertDialogRootProps = React$1.ComponentProps<typeof AlertDialog$1>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Trigger do AlertDialog (primitivo).
|
|
1626
|
+
*
|
|
1627
|
+
* Elemento que abre o alert dialog quando clicado.
|
|
1628
|
+
*/
|
|
1629
|
+
declare const AlertDialogTrigger: React$1.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1630
|
+
type AlertDialogTriggerProps = React$1.ComponentProps<typeof AlertDialogTrigger$1>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Portal do AlertDialog (primitivo).
|
|
1633
|
+
*/
|
|
1634
|
+
declare const AlertDialogPortal: React$1.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
1635
|
+
type AlertDialogPortalProps = React$1.ComponentProps<typeof AlertDialogPortal$1>;
|
|
1636
|
+
/**
|
|
1637
|
+
* Overlay do AlertDialog (primitivo).
|
|
1638
|
+
*/
|
|
1639
|
+
declare const AlertDialogOverlay: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1640
|
+
type AlertDialogOverlayProps = React$1.ComponentProps<typeof AlertDialogOverlay$1>;
|
|
1641
|
+
/**
|
|
1642
|
+
* Conteúdo principal do AlertDialog (primitivo).
|
|
1643
|
+
*/
|
|
1644
|
+
declare const AlertDialogContent: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1645
|
+
type AlertDialogContentProps = React$1.ComponentProps<typeof AlertDialogContent$1>;
|
|
1646
|
+
/**
|
|
1647
|
+
* Cabeçalho do AlertDialog (primitivo).
|
|
1648
|
+
*/
|
|
1649
|
+
declare const AlertDialogHeader: {
|
|
336
1650
|
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
337
1651
|
displayName: string;
|
|
338
1652
|
};
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
1653
|
+
type AlertDialogHeaderProps = React$1.ComponentProps<typeof AlertDialogHeader$1>;
|
|
1654
|
+
/**
|
|
1655
|
+
* Rodapé do AlertDialog (primitivo).
|
|
1656
|
+
*/
|
|
1657
|
+
declare const AlertDialogFooter: {
|
|
1658
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
1659
|
+
displayName: string;
|
|
344
1660
|
};
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
1661
|
+
type AlertDialogFooterProps = React$1.ComponentProps<typeof AlertDialogFooter$1>;
|
|
1662
|
+
/**
|
|
1663
|
+
* Título do AlertDialog (primitivo).
|
|
1664
|
+
*/
|
|
1665
|
+
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1666
|
+
type AlertDialogTitleProps = React$1.ComponentProps<typeof AlertDialogTitle$1>;
|
|
1667
|
+
/**
|
|
1668
|
+
* Descrição do AlertDialog (primitivo).
|
|
1669
|
+
*/
|
|
1670
|
+
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1671
|
+
type AlertDialogDescriptionProps = React$1.ComponentProps<typeof AlertDialogDescription$1>;
|
|
1672
|
+
/**
|
|
1673
|
+
* Botão de ação do AlertDialog (primitivo).
|
|
1674
|
+
*/
|
|
1675
|
+
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1676
|
+
type AlertDialogActionProps = React$1.ComponentProps<typeof AlertDialogAction$1>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Botão de cancelar do AlertDialog (primitivo).
|
|
1679
|
+
*/
|
|
1680
|
+
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1681
|
+
type AlertDialogCancelProps = React$1.ComponentProps<typeof AlertDialogCancel$1>;
|
|
1682
|
+
interface AlertDialogProps extends Omit<AlertDialogRootProps, "children"> {
|
|
1683
|
+
/**
|
|
1684
|
+
* Elemento que aciona a abertura do alert dialog.
|
|
1685
|
+
* Normalmente um botão ou link.
|
|
1686
|
+
*/
|
|
1687
|
+
trigger?: React$1.ReactNode;
|
|
1688
|
+
/**
|
|
1689
|
+
* Título do alert dialog.
|
|
1690
|
+
* Quando informado, é renderizado dentro de `AlertDialogHeader` usando `AlertDialogTitle`.
|
|
1691
|
+
*/
|
|
1692
|
+
title?: React$1.ReactNode;
|
|
1693
|
+
/**
|
|
1694
|
+
* Descrição do alert dialog.
|
|
1695
|
+
* Quando informada, é renderizada dentro de `AlertDialogHeader` usando `AlertDialogDescription`.
|
|
1696
|
+
*/
|
|
1697
|
+
description?: React$1.ReactNode;
|
|
1698
|
+
/**
|
|
1699
|
+
* Conteúdo principal do alert dialog.
|
|
1700
|
+
* Renderizado dentro de `AlertDialogContent`.
|
|
1701
|
+
*/
|
|
1702
|
+
children?: React$1.ReactNode;
|
|
1703
|
+
/**
|
|
1704
|
+
* Label do botão de ação principal (confirmar).
|
|
1705
|
+
* @default "Confirmar"
|
|
1706
|
+
*/
|
|
1707
|
+
actionLabel?: string;
|
|
1708
|
+
/**
|
|
1709
|
+
* Label do botão de cancelar.
|
|
1710
|
+
* @default "Cancelar"
|
|
1711
|
+
*/
|
|
1712
|
+
cancelLabel?: string;
|
|
1713
|
+
/**
|
|
1714
|
+
* Variante do botão de ação.
|
|
1715
|
+
* @default "default"
|
|
1716
|
+
*/
|
|
1717
|
+
actionVariant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
1718
|
+
/**
|
|
1719
|
+
* Callback chamado quando o botão de ação é clicado.
|
|
1720
|
+
*/
|
|
1721
|
+
onAction?: () => void;
|
|
1722
|
+
/**
|
|
1723
|
+
* Callback chamado quando o botão de cancelar é clicado.
|
|
1724
|
+
*/
|
|
1725
|
+
onCancel?: () => void;
|
|
1726
|
+
/**
|
|
1727
|
+
* Mostrar botão de cancelar.
|
|
1728
|
+
* @default true
|
|
1729
|
+
*/
|
|
1730
|
+
showCancel?: boolean;
|
|
1731
|
+
/**
|
|
1732
|
+
* Conteúdo customizado do rodapé.
|
|
1733
|
+
* Quando fornecido, substitui os botões padrão.
|
|
1734
|
+
*/
|
|
1735
|
+
footer?: React$1.ReactNode;
|
|
1736
|
+
/**
|
|
1737
|
+
* Controla se o alert dialog está aberto ou fechado.
|
|
1738
|
+
* Use para controlar o estado externamente.
|
|
1739
|
+
*/
|
|
353
1740
|
open?: boolean;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
footer?: () => React$1.ReactNode;
|
|
359
|
-
user?: {
|
|
360
|
-
email?: string;
|
|
361
|
-
name?: string;
|
|
362
|
-
};
|
|
363
|
-
enterprise?: {
|
|
364
|
-
name: string;
|
|
365
|
-
logo: () => React$1.ReactNode;
|
|
366
|
-
plan: string;
|
|
367
|
-
};
|
|
368
|
-
navbar: {
|
|
369
|
-
title: string;
|
|
370
|
-
url: string;
|
|
371
|
-
items: {
|
|
372
|
-
title: string;
|
|
373
|
-
url: string;
|
|
374
|
-
isActive?: boolean | undefined;
|
|
375
|
-
icon?: () => React$1.ReactNode;
|
|
376
|
-
}[];
|
|
377
|
-
}[];
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
interface SidebarProps extends AppSidebarProps {
|
|
381
|
-
children: React.ReactNode;
|
|
382
|
-
contentClassName?: string;
|
|
383
|
-
showFooter?: boolean;
|
|
384
|
-
defaultPath?: string;
|
|
385
|
-
defaultCollapsed?: boolean;
|
|
1741
|
+
/**
|
|
1742
|
+
* Callback chamado quando o estado de abertura muda.
|
|
1743
|
+
*/
|
|
1744
|
+
onOpenChange?: (open: boolean) => void;
|
|
386
1745
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
1746
|
+
/**
|
|
1747
|
+
* AlertDialog padrão do Design System.
|
|
1748
|
+
*
|
|
1749
|
+
* Componente de dialog de alerta usado para confirmações críticas.
|
|
1750
|
+
* Diferente do Dialog comum, não pode ser fechado clicando fora ou pressionando ESC -
|
|
1751
|
+
* apenas através dos botões de ação.
|
|
1752
|
+
*
|
|
1753
|
+
* @example
|
|
1754
|
+
* ```tsx
|
|
1755
|
+
* import { AlertDialog } from "@phsa.tec/design-system-react"
|
|
1756
|
+
*
|
|
1757
|
+
* // Confirmação simples
|
|
1758
|
+
* <AlertDialog
|
|
1759
|
+
* trigger={<Button>Excluir</Button>}
|
|
1760
|
+
* title="Confirmar exclusão"
|
|
1761
|
+
* description="Esta ação não pode ser desfeita."
|
|
1762
|
+
* onAction={() => console.log("Confirmado")}
|
|
1763
|
+
* />
|
|
1764
|
+
*
|
|
1765
|
+
* // Com ações customizadas
|
|
1766
|
+
* <AlertDialog
|
|
1767
|
+
* trigger={<Button>Salvar</Button>}
|
|
1768
|
+
* title="Salvar alterações?"
|
|
1769
|
+
* description="Você tem alterações não salvas."
|
|
1770
|
+
* actionLabel="Salvar"
|
|
1771
|
+
* cancelLabel="Descartar"
|
|
1772
|
+
* onAction={handleSave}
|
|
1773
|
+
* onCancel={handleDiscard}
|
|
1774
|
+
* />
|
|
1775
|
+
* ```
|
|
1776
|
+
*/
|
|
1777
|
+
declare const AlertDialog: ({ trigger, title, description, children, actionLabel, cancelLabel, actionVariant, onAction, onCancel, showCancel, footer, open, onOpenChange, ...rest }: AlertDialogProps) => React$1.JSX.Element;
|
|
397
1778
|
|
|
398
|
-
declare const
|
|
1779
|
+
declare const Tabs$1: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1780
|
+
declare const TabsList$1: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1781
|
+
declare const TabsTrigger$1: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1782
|
+
declare const TabsContent$1: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
399
1783
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
declare const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
1784
|
+
/**
|
|
1785
|
+
* Tabs raiz (primitivo) baseado no Radix UI.
|
|
1786
|
+
*
|
|
1787
|
+
* Use quando precisar de controle total sobre a estrutura das tabs.
|
|
1788
|
+
*/
|
|
1789
|
+
declare const TabsRoot: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1790
|
+
type TabsRootProps = React$1.ComponentProps<typeof Tabs$1>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Lista de tabs (primitivo).
|
|
1793
|
+
*
|
|
1794
|
+
* Container que agrupa os triggers das tabs.
|
|
1795
|
+
*/
|
|
1796
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1797
|
+
type TabsListProps = React$1.ComponentProps<typeof TabsList$1>;
|
|
1798
|
+
/**
|
|
1799
|
+
* Trigger de tab (primitivo).
|
|
1800
|
+
*
|
|
1801
|
+
* Botão que ativa uma tab específica.
|
|
1802
|
+
*/
|
|
1803
|
+
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1804
|
+
type TabsTriggerProps = React$1.ComponentProps<typeof TabsTrigger$1>;
|
|
1805
|
+
/**
|
|
1806
|
+
* Conteúdo de tab (primitivo).
|
|
1807
|
+
*
|
|
1808
|
+
* Container que exibe o conteúdo de uma tab quando ativa.
|
|
1809
|
+
*/
|
|
1810
|
+
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1811
|
+
type TabsContentProps = React$1.ComponentProps<typeof TabsContent$1>;
|
|
1812
|
+
interface TabItem {
|
|
1813
|
+
/**
|
|
1814
|
+
* Valor único que identifica a tab.
|
|
1815
|
+
*/
|
|
1816
|
+
value: string;
|
|
1817
|
+
/**
|
|
1818
|
+
* Label exibido no trigger da tab.
|
|
1819
|
+
*/
|
|
1820
|
+
label: React$1.ReactNode;
|
|
1821
|
+
/**
|
|
1822
|
+
* Conteúdo exibido quando a tab está ativa.
|
|
1823
|
+
*/
|
|
1824
|
+
content: React$1.ReactNode;
|
|
1825
|
+
/**
|
|
1826
|
+
* Ícone opcional exibido antes do label.
|
|
1827
|
+
*/
|
|
1828
|
+
icon?: React$1.ReactNode;
|
|
1829
|
+
/**
|
|
1830
|
+
* Define se a tab está desabilitada.
|
|
1831
|
+
*/
|
|
1832
|
+
disabled?: boolean;
|
|
1833
|
+
/**
|
|
1834
|
+
* Badge ou contador exibido ao lado do label.
|
|
1835
|
+
*/
|
|
1836
|
+
badge?: React$1.ReactNode;
|
|
415
1837
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
declare const loaderVariants: (props?: ({
|
|
440
|
-
size?: "small" | "medium" | "large" | null | undefined;
|
|
441
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
442
|
-
interface SpinnerContentProps extends VariantProps<typeof spinnerVariants>, VariantProps<typeof loaderVariants> {
|
|
1838
|
+
interface TabsProps extends Omit<TabsRootProps, "children"> {
|
|
1839
|
+
/**
|
|
1840
|
+
* Array de itens de tab.
|
|
1841
|
+
* Cada item define uma tab com seu valor, label e conteúdo.
|
|
1842
|
+
*/
|
|
1843
|
+
items: TabItem[];
|
|
1844
|
+
/**
|
|
1845
|
+
* Valor da tab ativa inicialmente.
|
|
1846
|
+
* Se não fornecido, a primeira tab será ativa.
|
|
1847
|
+
*/
|
|
1848
|
+
defaultValue?: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Valor da tab ativa (controlado).
|
|
1851
|
+
* Use junto com `onValueChange` para controlar o estado externamente.
|
|
1852
|
+
*/
|
|
1853
|
+
value?: string;
|
|
1854
|
+
/**
|
|
1855
|
+
* Callback chamado quando o valor da tab muda.
|
|
1856
|
+
*/
|
|
1857
|
+
onValueChange?: (value: string) => void;
|
|
1858
|
+
/**
|
|
1859
|
+
* Classes CSS adicionais para o container das tabs.
|
|
1860
|
+
*/
|
|
443
1861
|
className?: string;
|
|
444
|
-
|
|
1862
|
+
/**
|
|
1863
|
+
* Classes CSS adicionais para a lista de tabs.
|
|
1864
|
+
*/
|
|
1865
|
+
listClassName?: string;
|
|
1866
|
+
/**
|
|
1867
|
+
* Classes CSS adicionais para o conteúdo.
|
|
1868
|
+
*/
|
|
1869
|
+
contentClassName?: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* Orientação das tabs.
|
|
1872
|
+
* @default "horizontal"
|
|
1873
|
+
*/
|
|
1874
|
+
orientation?: "horizontal" | "vertical";
|
|
445
1875
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
486
|
-
declare const reducer: (state: State, action: Action) => State;
|
|
487
|
-
type Toast = Omit<ToasterToast, "id">;
|
|
488
|
-
declare function toast({ ...props }: Toast): {
|
|
489
|
-
id: string;
|
|
490
|
-
dismiss: () => void;
|
|
491
|
-
update: (props: ToasterToast) => void;
|
|
492
|
-
};
|
|
493
|
-
declare function useToast(): {
|
|
494
|
-
toast: typeof toast;
|
|
495
|
-
dismiss: (toastId?: string) => void;
|
|
496
|
-
toasts: ToasterToast[];
|
|
497
|
-
};
|
|
1876
|
+
/**
|
|
1877
|
+
* Tabs padrão do Design System.
|
|
1878
|
+
*
|
|
1879
|
+
* Componente de tabs para organizar conteúdo em múltiplas seções.
|
|
1880
|
+
* Suporta tabs horizontais e verticais, com ícones e badges opcionais.
|
|
1881
|
+
*
|
|
1882
|
+
* @example
|
|
1883
|
+
* ```tsx
|
|
1884
|
+
* import { Tabs } from "@phsa.tec/design-system-react"
|
|
1885
|
+
*
|
|
1886
|
+
* // Tabs simples
|
|
1887
|
+
* <Tabs
|
|
1888
|
+
* items={[
|
|
1889
|
+
* { value: "tab1", label: "Tab 1", content: <div>Conteúdo 1</div> },
|
|
1890
|
+
* { value: "tab2", label: "Tab 2", content: <div>Conteúdo 2</div> },
|
|
1891
|
+
* ]}
|
|
1892
|
+
* />
|
|
1893
|
+
*
|
|
1894
|
+
* // Tabs com ícones e badges
|
|
1895
|
+
* <Tabs
|
|
1896
|
+
* items={[
|
|
1897
|
+
* {
|
|
1898
|
+
* value: "profile",
|
|
1899
|
+
* label: "Perfil",
|
|
1900
|
+
* icon: <UserIcon />,
|
|
1901
|
+
* content: <ProfileContent />,
|
|
1902
|
+
* },
|
|
1903
|
+
* {
|
|
1904
|
+
* value: "settings",
|
|
1905
|
+
* label: "Configurações",
|
|
1906
|
+
* icon: <SettingsIcon />,
|
|
1907
|
+
* badge: <Badge>3</Badge>,
|
|
1908
|
+
* content: <SettingsContent />,
|
|
1909
|
+
* },
|
|
1910
|
+
* ]}
|
|
1911
|
+
* />
|
|
1912
|
+
* ```
|
|
1913
|
+
*/
|
|
1914
|
+
declare const Tabs: ({ items, defaultValue, value, onValueChange, className, listClassName, contentClassName, orientation, ...rest }: TabsProps) => React$1.JSX.Element;
|
|
498
1915
|
|
|
499
|
-
export { AlertDialog, type AlertDialogProps,
|
|
1916
|
+
export { Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogRoot, type AlertDialogRootProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertVariant, Blockquote, Button, ButtonIcon, type ButtonIconProps, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardRoot, type CardRootProps, CardTitle, type CardTitleProps, Code, DataTable, DataTableColumnHeader, type DataTableColumnHeaderProps, DataTablePagination, type DataTablePaginationProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableToolbar, type DataTableToolbarProps, DatePicker, type DatePickerBaseProps, DatePickerMultiple, type DatePickerMultipleBaseProps, type DatePickerMultipleProps, type DatePickerProps, DatePickerRange, type DatePickerRangeBaseProps, type DatePickerRangeProps, DatePickerSingle, type DatePickerSingleBaseProps, type DatePickerSingleProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogRoot, type DialogRootProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, FormField, type FormFieldProps, H1, H2, H3, H4, Icon, type IconProps, Input, InputField, type InputFieldProps, type InputProps, type InputWithFieldProps, Large, Lead, Li, MultiSelect, type MultiSelectWithFieldProps, Muted, NumericInput, type NumericInputBaseProps, type NumericInputProps, Ol, P, PatternInput, type PatternInputBaseProps, type PatternInputProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Pre, RadioGroup, type RadioGroupBaseProps, type RadioGroupOption, type RadioGroupWithFieldProps, Select, type SelectBaseProps, type SelectGroupOption, type SelectOption, type SelectWithFieldProps, Small, Switch, type SwitchProps, type SwitchWithFieldProps, type TabItem, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsRoot, type TabsRootProps, TabsTrigger, type TabsTriggerProps, TextArea, TextAreaField, type TextAreaFieldProps, type TextAreaProps, type TextAreaWithFieldProps, Toaster, type ToasterProps, Typography, type TypographyProps, TypographyTable, TypographyTbody, TypographyTd, TypographyTh, TypographyThead, TypographyTr, Ul };
|