@giro-ds/react 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1564 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/dts-temp/components/Avatar/Avatar.d.ts +0 -4
- package/dist/dts-temp/components/Avatar/Avatar.types.d.ts +0 -23
- package/dist/dts-temp/components/Avatar/__tests__/Avatar.test.d.ts +0 -1
- package/dist/dts-temp/components/Avatar/index.d.ts +0 -2
- package/dist/dts-temp/components/Badge/Badge.d.ts +0 -4
- package/dist/dts-temp/components/Badge/Badge.types.d.ts +0 -37
- package/dist/dts-temp/components/Badge/index.d.ts +0 -2
- package/dist/dts-temp/components/Button/Button.d.ts +0 -4
- package/dist/dts-temp/components/Button/Button.types.d.ts +0 -62
- package/dist/dts-temp/components/Button/__tests__/Button.test.d.ts +0 -1
- package/dist/dts-temp/components/Button/index.d.ts +0 -2
- package/dist/dts-temp/components/Calendar/Calendar.d.ts +0 -3
- package/dist/dts-temp/components/Calendar/Calendar.types.d.ts +0 -55
- package/dist/dts-temp/components/Calendar/__tests__/Calendar.test.d.ts +0 -1
- package/dist/dts-temp/components/Calendar/index.d.ts +0 -1
- package/dist/dts-temp/components/Callout/Callout.d.ts +0 -4
- package/dist/dts-temp/components/Callout/Callout.types.d.ts +0 -34
- package/dist/dts-temp/components/Callout/index.d.ts +0 -1
- package/dist/dts-temp/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/dts-temp/components/Checkbox/Checkbox.types.d.ts +0 -34
- package/dist/dts-temp/components/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/dts-temp/components/Checkbox/index.d.ts +0 -2
- package/dist/dts-temp/components/Chips/Chips.d.ts +0 -4
- package/dist/dts-temp/components/Chips/Chips.types.d.ts +0 -34
- package/dist/dts-temp/components/Chips/index.d.ts +0 -1
- package/dist/dts-temp/components/Container/Container.d.ts +0 -2
- package/dist/dts-temp/components/Container/Container.types.d.ts +0 -15
- package/dist/dts-temp/components/Container/__tests__/Container.test.d.ts +0 -1
- package/dist/dts-temp/components/DatePicker/DatePicker.d.ts +0 -4
- package/dist/dts-temp/components/DatePicker/DatePicker.types.d.ts +0 -52
- package/dist/dts-temp/components/DatePicker/Utils/DateUtils.d.ts +0 -6
- package/dist/dts-temp/components/DatePicker/__test__/DatePicker.test.d.ts +0 -1
- package/dist/dts-temp/components/DatePicker/index.d.ts +0 -2
- package/dist/dts-temp/components/Dialog/Dialog.d.ts +0 -4
- package/dist/dts-temp/components/Dialog/Dialog.types.d.ts +0 -27
- package/dist/dts-temp/components/Dialog/__tests__/Dialog.test.d.ts +0 -1
- package/dist/dts-temp/components/Dialog/index.d.ts +0 -2
- package/dist/dts-temp/components/Drawer/Drawer.d.ts +0 -4
- package/dist/dts-temp/components/Drawer/Drawer.types.d.ts +0 -76
- package/dist/dts-temp/components/Drawer/__tests__/Drawer.test.d.ts +0 -1
- package/dist/dts-temp/components/Drawer/index.d.ts +0 -1
- package/dist/dts-temp/components/Filter/Filter.d.ts +0 -4
- package/dist/dts-temp/components/Filter/Filter.types.d.ts +0 -74
- package/dist/dts-temp/components/Filter/index.d.ts +0 -2
- package/dist/dts-temp/components/ListItem/ListItem.d.ts +0 -4
- package/dist/dts-temp/components/ListItem/ListItem.types.d.ts +0 -52
- package/dist/dts-temp/components/ListItem/index.d.ts +0 -2
- package/dist/dts-temp/components/Menu/Menu.d.ts +0 -4
- package/dist/dts-temp/components/Menu/Menu.types.d.ts +0 -90
- package/dist/dts-temp/components/Menu/__tests__/Menu.test.d.ts +0 -1
- package/dist/dts-temp/components/Menu/components/MenuItem.d.ts +0 -3
- package/dist/dts-temp/components/Menu/hooks/useMenuLogic.d.ts +0 -15
- package/dist/dts-temp/components/Menu/hooks/useSearchLogic.d.ts +0 -13
- package/dist/dts-temp/components/Menu/index.d.ts +0 -2
- package/dist/dts-temp/components/Popover/Popover.d.ts +0 -4
- package/dist/dts-temp/components/Popover/Popover.types.d.ts +0 -25
- package/dist/dts-temp/components/Popover/__test__/Popover.test.d.ts +0 -1
- package/dist/dts-temp/components/Popover/index.d.ts +0 -2
- package/dist/dts-temp/components/Quantity/Quantity.d.ts +0 -4
- package/dist/dts-temp/components/Quantity/Quantity.types.d.ts +0 -38
- package/dist/dts-temp/components/Quantity/index.d.ts +0 -2
- package/dist/dts-temp/components/Radio/Radio.d.ts +0 -4
- package/dist/dts-temp/components/Radio/Radio.types.d.ts +0 -52
- package/dist/dts-temp/components/Radio/__tests__/Radio.test.d.ts +0 -1
- package/dist/dts-temp/components/Radio/index.d.ts +0 -2
- package/dist/dts-temp/components/Search/Search.d.ts +0 -4
- package/dist/dts-temp/components/Search/Search.types.d.ts +0 -48
- package/dist/dts-temp/components/Search/__tests__/Search.test.d.ts +0 -1
- package/dist/dts-temp/components/Search/index.d.ts +0 -2
- package/dist/dts-temp/components/Select/Select.d.ts +0 -4
- package/dist/dts-temp/components/Select/Select.types.d.ts +0 -224
- package/dist/dts-temp/components/Select/__tests__/SelectRadix.test.d.ts +0 -1
- package/dist/dts-temp/components/Select/components/CheckboxSelectItem.d.ts +0 -4
- package/dist/dts-temp/components/Select/components/ExpandableSelectItem.d.ts +0 -11
- package/dist/dts-temp/components/Select/components/SelectItem.d.ts +0 -7
- package/dist/dts-temp/components/Select/hooks/useSelectLogic.d.ts +0 -3
- package/dist/dts-temp/components/Select/index.d.ts +0 -5
- package/dist/dts-temp/components/Switch/Switch.d.ts +0 -4
- package/dist/dts-temp/components/Switch/Switch.types.d.ts +0 -32
- package/dist/dts-temp/components/Switch/__tests__/Switch.test.d.ts +0 -1
- package/dist/dts-temp/components/Switch/index.d.ts +0 -2
- package/dist/dts-temp/components/Table/EmptyRows150Color.d.ts +0 -8
- package/dist/dts-temp/components/Table/LoaderList.d.ts +0 -10
- package/dist/dts-temp/components/Table/MultiLineText/MultiLineText.d.ts +0 -14
- package/dist/dts-temp/components/Table/MultiLineText/index.d.ts +0 -2
- package/dist/dts-temp/components/Table/Table.d.ts +0 -3
- package/dist/dts-temp/components/Table/Table.types.d.ts +0 -70
- package/dist/dts-temp/components/Table/TableHeader.d.ts +0 -50
- package/dist/dts-temp/components/Table/TablePagination.d.ts +0 -13
- package/dist/dts-temp/components/Table/index.d.ts +0 -7
- package/dist/dts-temp/components/Table/utils/tableActions.d.ts +0 -21
- package/dist/dts-temp/components/TextArea/TextArea.d.ts +0 -4
- package/dist/dts-temp/components/TextArea/TextArea.types.d.ts +0 -56
- package/dist/dts-temp/components/TextArea/__tests__/TextArea.test.d.ts +0 -1
- package/dist/dts-temp/components/TextArea/index.d.ts +0 -2
- package/dist/dts-temp/components/TextField/TextField.d.ts +0 -4
- package/dist/dts-temp/components/TextField/TextField.types.d.ts +0 -77
- package/dist/dts-temp/components/TextField/__tests__/Textfield.test.d.ts +0 -1
- package/dist/dts-temp/components/TextField/index.d.ts +0 -2
- package/dist/dts-temp/components/TextField/utils/__tests__/validation.test.d.ts +0 -1
- package/dist/dts-temp/components/TextField/utils/index.d.ts +0 -2
- package/dist/dts-temp/components/TextField/utils/validation.d.ts +0 -8
- package/dist/dts-temp/components/Toast/Toast.d.ts +0 -34
- package/dist/dts-temp/components/Toast/Toast.types.d.ts +0 -57
- package/dist/dts-temp/components/Toast/__tests__/Toast.test.d.ts +0 -1
- package/dist/dts-temp/components/Toast/components/ToastContainer.d.ts +0 -22
- package/dist/dts-temp/components/Toast/components/ToastProvider.d.ts +0 -35
- package/dist/dts-temp/components/Toast/index.d.ts +0 -5
- package/dist/dts-temp/components/Tooltip/Tooltip.d.ts +0 -4
- package/dist/dts-temp/components/Tooltip/Tooltip.types.d.ts +0 -14
- package/dist/dts-temp/components/Tooltip/__tests__/Tooltip.test.d.ts +0 -1
- package/dist/dts-temp/components/Tooltip/index.d.ts +0 -2
- package/dist/dts-temp/components/VerificationCode/VerificationCode.d.ts +0 -20
- package/dist/dts-temp/components/VerificationCode/VerificationCode.types.d.ts +0 -39
- package/dist/dts-temp/components/VerificationCode/index.d.ts +0 -2
- package/dist/dts-temp/components/index.d.ts +0 -59
- package/dist/dts-temp/contexts/ToastContext.d.ts +0 -43
- package/dist/dts-temp/hooks/ApiSimulation.d.ts +0 -53
- package/dist/dts-temp/hooks/InfiniteScroll.d.ts +0 -41
- package/dist/dts-temp/hooks/NormalizeText.d.ts +0 -1
- package/dist/dts-temp/hooks/useToast.d.ts +0 -46
- package/dist/dts-temp/index.d.ts +0 -1
- package/dist/dts-temp/shared/Label/index.d.ts +0 -15
- package/dist/dts-temp/shared/icons/CheckHalf.d.ts +0 -10
- package/dist/dts-temp/shared/icons/CheckSmall.d.ts +0 -10
- package/dist/dts-temp/shared/icons/index.d.ts +0 -4
- package/dist/dts-temp/types/common.types.d.ts +0 -12
- package/dist/dts-temp/types/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseProps, Size } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Avatar
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* // Avatar com ícone
|
|
8
|
-
* <Avatar icon={<UserIcon />} size="lg" />
|
|
9
|
-
*
|
|
10
|
-
* // Avatar com imagem
|
|
11
|
-
* <Avatar src="https://example.com/avatar.jpg" icon={<UserIcon />} size="sm" />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export interface AvatarProps extends BaseProps {
|
|
15
|
-
/** Ícone ou conteúdo a ser exibido no fallback quando não há imagem ou ela falha ao carregar */
|
|
16
|
-
icon?: React.ReactNode;
|
|
17
|
-
/** Tamanho do avatar: 'sm' (32px) ou 'lg' (44px). @default 'lg' */
|
|
18
|
-
size?: Size;
|
|
19
|
-
/** URL da imagem do avatar. Quando fornecido, exibe a imagem; caso contrário, mostra o ícone */
|
|
20
|
-
src?: string;
|
|
21
|
-
/** Texto alternativo da imagem do avatar, usado como as iniciais do nome */
|
|
22
|
-
initialLetters?: string;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseProps } from '../../types';
|
|
3
|
-
/** Tipos de badge suportados */
|
|
4
|
-
export type BadgeType = 'notification' | 'status';
|
|
5
|
-
/** Valores possíveis para exibição no badge */
|
|
6
|
-
export type BadgeValue = number | string | null;
|
|
7
|
-
/**
|
|
8
|
-
* Props do componente Badge
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <Badge type="notification" badgeValue={5}>
|
|
12
|
-
* <IconButton icon={<BellIcon />} />
|
|
13
|
-
* </Badge>
|
|
14
|
-
* ```
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* <Badge
|
|
18
|
-
* type="status"
|
|
19
|
-
* badgeValue="novo"
|
|
20
|
-
* aria-label="Novo item disponível"
|
|
21
|
-
* >
|
|
22
|
-
* <Avatar icon={<UserIcon />} />
|
|
23
|
-
* </Badge>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export interface BadgeProps extends BaseProps {
|
|
27
|
-
/** Tipo de badge (notificação ou status) */
|
|
28
|
-
type: BadgeType;
|
|
29
|
-
/** Conteúdo a ser envolvido pelo badge */
|
|
30
|
-
children?: ReactNode;
|
|
31
|
-
/** Valor a ser exibido no badge (número, texto ou null) */
|
|
32
|
-
badgeValue?: BadgeValue;
|
|
33
|
-
/** Valor máximo a ser exibido (ex: 99+ quando badgeValue > maxValue) */
|
|
34
|
-
maxValue?: number;
|
|
35
|
-
/** Label acessível para leitores de tela */
|
|
36
|
-
'aria-label'?: string;
|
|
37
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Size, BaseProps, Variant, Position } from '../../types/common.types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Button
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* <Button variant="filled" size="lg" onClick={handleClick}>
|
|
8
|
-
* Clique aqui
|
|
9
|
-
* </Button>
|
|
10
|
-
* ```
|
|
11
|
-
* @example
|
|
12
|
-
* ```tsx
|
|
13
|
-
* <Button
|
|
14
|
-
* variant="outlined"
|
|
15
|
-
* icon={<Icon />}
|
|
16
|
-
* iconPosition="left"
|
|
17
|
-
* loading={isLoading}
|
|
18
|
-
* >
|
|
19
|
-
* Salvar
|
|
20
|
-
* </Button>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export interface ButtonProps extends BaseProps, React.HTMLAttributes<HTMLElement> {
|
|
24
|
-
/** Elemento customizado a ser renderizado (ex: 'a', Link do React Router) */
|
|
25
|
-
as?: React.ElementType;
|
|
26
|
-
/** Conteúdo do botão */
|
|
27
|
-
children?: React.ReactNode;
|
|
28
|
-
/** Variante visual do botão */
|
|
29
|
-
variant?: Variant;
|
|
30
|
-
/** Define se o botão exibe apenas ícone (sem texto) */
|
|
31
|
-
iconOnly?: boolean;
|
|
32
|
-
/** Posição do ícone em relação ao texto */
|
|
33
|
-
iconPosition?: Position;
|
|
34
|
-
/** URL de destino quando usado como link (renderiza <a>) */
|
|
35
|
-
href?: string;
|
|
36
|
-
/** Rota de destino para roteadores (ex: React Router) */
|
|
37
|
-
to?: string;
|
|
38
|
-
/** Define se o link abre em nova aba */
|
|
39
|
-
external?: boolean;
|
|
40
|
-
/** Atributo target do HTML para links */
|
|
41
|
-
target?: string;
|
|
42
|
-
/** Atributo rel do HTML para links */
|
|
43
|
-
rel?: string;
|
|
44
|
-
/** Tipo HTML do botão */
|
|
45
|
-
type?: 'button' | 'submit' | 'reset';
|
|
46
|
-
/** Tamanho do botão */
|
|
47
|
-
size?: Size;
|
|
48
|
-
/** Ícone a ser exibido no botão */
|
|
49
|
-
icon?: React.ReactNode;
|
|
50
|
-
/** Define se o botão ocupa 100% da largura do container */
|
|
51
|
-
fullWidth?: boolean;
|
|
52
|
-
/** Label acessível para leitores de tela */
|
|
53
|
-
ariaLabel?: string;
|
|
54
|
-
/** Estado de carregamento (exibe spinner) */
|
|
55
|
-
loading?: boolean;
|
|
56
|
-
/** Texto do tooltip exibido quando o botão é apenas ícone */
|
|
57
|
-
tooltipText?: string;
|
|
58
|
-
/** Lado em que o tooltip será exibido */
|
|
59
|
-
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
60
|
-
/** Alinhamento do tooltip */
|
|
61
|
-
tooltipAlign?: 'start' | 'center' | 'end';
|
|
62
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { CalendarProps } from "./Calendar.types";
|
|
2
|
-
declare const Calendar: ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, format: _format, locale, autoFocus, id, "aria-label": ariaLabel, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default Calendar;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { BaseProps, Locale } from '../../types/common.types';
|
|
2
|
-
import type { Matcher } from 'react-day-picker';
|
|
3
|
-
/** Formato de exibição da data aceito pelo componente. */
|
|
4
|
-
export type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy' | (string & {});
|
|
5
|
-
interface CalendarBaseProps extends Omit<BaseProps, 'disabled'> {
|
|
6
|
-
/** Data selecionada atualmente (usada pelo DatePicker). */
|
|
7
|
-
selected?: Date | null;
|
|
8
|
-
/**
|
|
9
|
-
* Mês exibido no calendário. Use junto com `onDateChange` para
|
|
10
|
-
* controlar a navegação externamente.
|
|
11
|
-
*/
|
|
12
|
-
currentDate?: Date | null;
|
|
13
|
-
/**
|
|
14
|
-
* Mês inicial padrão exibido quando não controlado.
|
|
15
|
-
* @default currentDate
|
|
16
|
-
*/
|
|
17
|
-
defaultMonth?: Date;
|
|
18
|
-
/** Primeiro mês navegável. */
|
|
19
|
-
startMonth?: Date;
|
|
20
|
-
/** Último mês navegável. */
|
|
21
|
-
endMonth?: Date;
|
|
22
|
-
/** Chamado quando o usuário seleciona um dia. */
|
|
23
|
-
onDaySelect?: (date: Date) => void;
|
|
24
|
-
/** Chamado quando o usuário navega entre meses. */
|
|
25
|
-
onDateChange?: (date: Date) => void;
|
|
26
|
-
/** Chamado quando o usuário limpa a seleção. */
|
|
27
|
-
onClear?: () => void;
|
|
28
|
-
/** Data mínima selecionável. */
|
|
29
|
-
minDate?: Date;
|
|
30
|
-
/** Data máxima selecionável. */
|
|
31
|
-
maxDate?: Date;
|
|
32
|
-
/**
|
|
33
|
-
* Dias desabilitados — aceita qualquer `Matcher` do react-day-picker
|
|
34
|
-
* (Date, DateRange, DateBefore, DateAfter, DayOfWeek, função…).
|
|
35
|
-
*/
|
|
36
|
-
disabled?: Matcher | Matcher[];
|
|
37
|
-
/**
|
|
38
|
-
* Formato de exibição da data.
|
|
39
|
-
* @example 'dd/mm/yyyy' | 'mm/dd/yyyy'
|
|
40
|
-
*/
|
|
41
|
-
format?: DateFormat;
|
|
42
|
-
/**
|
|
43
|
-
* Locale da interface — aceita os códigos internos do design system.
|
|
44
|
-
* @default 'pt-br'
|
|
45
|
-
*/
|
|
46
|
-
locale?: Locale;
|
|
47
|
-
/** Atributo `aria-label` para o elemento raiz. */
|
|
48
|
-
'aria-label'?: string;
|
|
49
|
-
/** Foca automaticamente o primeiro dia selecionado ou hoje. */
|
|
50
|
-
autoFocus?: boolean;
|
|
51
|
-
/** Substitui os `classNames` padrão do react-day-picker. */
|
|
52
|
-
classNames?: Partial<Record<string, string>>;
|
|
53
|
-
}
|
|
54
|
-
export type CalendarProps = CalendarBaseProps;
|
|
55
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Calendar';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TextVariant, BaseProps } from '../../types/common.types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Callout
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* <Callout
|
|
8
|
-
* type="success"
|
|
9
|
-
* title="Sucesso!"
|
|
10
|
-
* text="Operação realizada com sucesso"
|
|
11
|
-
* icon={<CheckIcon />}
|
|
12
|
-
* />
|
|
13
|
-
* ```
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <Callout
|
|
17
|
-
* type="alert"
|
|
18
|
-
* title="Atenção"
|
|
19
|
-
* text="Verifique os campos obrigatórios"
|
|
20
|
-
* />
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export interface CalloutProps extends BaseProps {
|
|
24
|
-
/** Tipo visual do callout */
|
|
25
|
-
type?: TextVariant;
|
|
26
|
-
/** Título principal do callout (texto em destaque) */
|
|
27
|
-
title?: string | null;
|
|
28
|
-
/** Texto descritivo do callout */
|
|
29
|
-
text?: string;
|
|
30
|
-
/** Ícone a ser exibido no callout */
|
|
31
|
-
icon?: React.ReactNode;
|
|
32
|
-
/** Props adicionais para o elemento div */
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Callout';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/common.types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Checkbox
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* <Checkbox
|
|
8
|
-
* label="Aceito os termos"
|
|
9
|
-
* checked={accepted}
|
|
10
|
-
* onCheckedChange={setAccepted}
|
|
11
|
-
* />
|
|
12
|
-
* ```
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Checkbox
|
|
16
|
-
* label="Selecionar todos"
|
|
17
|
-
* indeterminate={someSelected}
|
|
18
|
-
* onCheckedChange={handleSelectAll}
|
|
19
|
-
* disabled={isLoading}
|
|
20
|
-
* />
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export interface CheckboxProps extends BaseProps {
|
|
24
|
-
/** Label ou conteúdo a ser exibido ao lado do checkbox */
|
|
25
|
-
label?: React.ReactNode;
|
|
26
|
-
/** Callback executado quando o estado muda: (checked) => void */
|
|
27
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
28
|
-
/** Estado inicial (modo não controlado) */
|
|
29
|
-
defaultChecked?: boolean;
|
|
30
|
-
/** Estado atual (modo controlado) */
|
|
31
|
-
checked?: boolean;
|
|
32
|
-
/** Estado indeterminado (usado em selecionar todos com seleção parcial) */
|
|
33
|
-
indeterminate?: boolean;
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TextVariant, BaseProps } from '../../types/common.types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Chips
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* <Chips
|
|
8
|
-
* type="success"
|
|
9
|
-
* title="Ativo"
|
|
10
|
-
* leftIcon={<CheckIcon />}
|
|
11
|
-
* />
|
|
12
|
-
* ```
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Chips
|
|
16
|
-
* type="brand"
|
|
17
|
-
* title="Novo"
|
|
18
|
-
* rightIcon={<CloseIcon />}
|
|
19
|
-
* disabled={false}
|
|
20
|
-
* />
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export interface ChipsProps extends BaseProps {
|
|
24
|
-
/** Tipo visual do chip */
|
|
25
|
-
type?: TextVariant;
|
|
26
|
-
/** Texto a ser exibido dentro do chip */
|
|
27
|
-
title: string;
|
|
28
|
-
/** Ícone posicionado à esquerda do texto */
|
|
29
|
-
leftIcon?: React.ReactNode;
|
|
30
|
-
/** Ícone posicionado à direita do texto */
|
|
31
|
-
rightIcon?: React.ReactNode;
|
|
32
|
-
/** Props adicionais para o elemento div */
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Chips';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Props do componente Container
|
|
4
|
-
* @example
|
|
5
|
-
* ```tsx
|
|
6
|
-
* <Container>
|
|
7
|
-
* <h1>Conteúdo da página</h1>
|
|
8
|
-
* <p>Texto dentro do container</p>
|
|
9
|
-
* </Container>
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export interface ContainerProps {
|
|
13
|
-
/** Conteúdo a ser renderizado dentro do container */
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Locale, BaseProps, Side, Align } from '../../types/common.types';
|
|
2
|
-
/**
|
|
3
|
-
* Props do componente DatePicker
|
|
4
|
-
* @example
|
|
5
|
-
* ```tsx
|
|
6
|
-
* <DatePicker
|
|
7
|
-
* label="Data de nascimento"
|
|
8
|
-
* value={birthDate}
|
|
9
|
-
* onChange={setBirthDate}
|
|
10
|
-
* locale="pt-br"
|
|
11
|
-
* />
|
|
12
|
-
* ```
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <DatePicker
|
|
16
|
-
* label="Data de início"
|
|
17
|
-
* required
|
|
18
|
-
* helperText="Selecione a data de início do projeto"
|
|
19
|
-
* minDate={new Date()}
|
|
20
|
-
* calendarSide="right"
|
|
21
|
-
* error={errorMessage}
|
|
22
|
-
* />
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export interface DatePickerProps extends BaseProps {
|
|
26
|
-
/** Locale para formatação da data */
|
|
27
|
-
locale?: Locale;
|
|
28
|
-
/** Posição do calendário em relação ao campo */
|
|
29
|
-
calendarSide?: Side;
|
|
30
|
-
/** Alinhamento do calendário em relação ao campo */
|
|
31
|
-
calendarAlign?: Exclude<Align, 'center'>;
|
|
32
|
-
/** Texto de ajuda exibido abaixo do campo */
|
|
33
|
-
helperText?: string;
|
|
34
|
-
/** Define se o campo é obrigatório */
|
|
35
|
-
required?: boolean;
|
|
36
|
-
/** Label do campo de data */
|
|
37
|
-
label?: string;
|
|
38
|
-
/** Valor controlado da data */
|
|
39
|
-
value?: Date | null;
|
|
40
|
-
/** Valor inicial para modo não controlado */
|
|
41
|
-
defaultValue?: Date | null;
|
|
42
|
-
/** Callback executado quando a data muda: (date) => void */
|
|
43
|
-
onChange?: (date: Date | null) => void;
|
|
44
|
-
/** Mensagem de erro a ser exibida */
|
|
45
|
-
error?: string;
|
|
46
|
-
/** Data mínima selecionável */
|
|
47
|
-
minDate?: Date;
|
|
48
|
-
/** Data máxima selecionável */
|
|
49
|
-
maxDate?: Date;
|
|
50
|
-
/** ID para testes automatizados */
|
|
51
|
-
'data-testid'?: string;
|
|
52
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Locale } from '../../../types/common.types';
|
|
2
|
-
export declare function formatDate(date: Date, locale?: Locale): string;
|
|
3
|
-
export declare function applyDateMask(value: string, locale?: Locale): string;
|
|
4
|
-
export declare function isValidDateFormat(value: string, locale?: Locale): boolean;
|
|
5
|
-
export declare function parseDate(dateString: string, locale?: Locale): Date | null;
|
|
6
|
-
export declare function validatePartialDate(value: string, locale?: Locale): 'valid' | 'invalid' | 'incomplete';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/common.types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Dialog
|
|
5
|
-
* @example
|
|
6
|
-
* <Dialog
|
|
7
|
-
* title="Confirmar ação"
|
|
8
|
-
* bodyContent="Tem certeza que deseja continuar?"
|
|
9
|
-
* textPrimaryAction="Confirmar"
|
|
10
|
-
* textSecondaryAction="Cancelar"
|
|
11
|
-
* />
|
|
12
|
-
*/
|
|
13
|
-
export interface DialogProps extends BaseProps, React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
-
show?: boolean;
|
|
15
|
-
/** Título exibido no cabeçalho do diálogo */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** Texto ou conteúdo do corpo do diálogo */
|
|
18
|
-
bodyContent?: ReactNode;
|
|
19
|
-
/** Texto do botão de ação primária */
|
|
20
|
-
textPrimaryAction?: string;
|
|
21
|
-
/** Texto do botão de ação secundária */
|
|
22
|
-
textSecondaryAction?: string;
|
|
23
|
-
/** Função chamada ao executar a ação primária */
|
|
24
|
-
onPrimaryAction?: () => void;
|
|
25
|
-
/** Função chamada ao executar a ação secundária */
|
|
26
|
-
onSecondaryAction?: () => void;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ReactElement } from 'react';
|
|
2
|
-
import { Variant, BaseProps } from '../../types/common.types';
|
|
3
|
-
/**
|
|
4
|
-
* Props do componente Drawer
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* <Drawer
|
|
8
|
-
* isOpen={isDrawerOpen}
|
|
9
|
-
* onClose={handleClose}
|
|
10
|
-
* title="Menu"
|
|
11
|
-
* >
|
|
12
|
-
* <nav>
|
|
13
|
-
* <a href="/home">Home</a>
|
|
14
|
-
* <a href="/about">Sobre</a>
|
|
15
|
-
* </nav>
|
|
16
|
-
* </Drawer>
|
|
17
|
-
* ```
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* <Drawer
|
|
21
|
-
* isOpen={showDrawer}
|
|
22
|
-
* onClose={() => setShowDrawer(false)}
|
|
23
|
-
* title="Configurações"
|
|
24
|
-
* customWidth="400px"
|
|
25
|
-
* closeOnOverlayClick={true}
|
|
26
|
-
* closeOnEscape={true}
|
|
27
|
-
* >
|
|
28
|
-
* <Settings />
|
|
29
|
-
* </Drawer>
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export interface DrawerProps extends BaseProps {
|
|
33
|
-
/** Conteúdo a ser exibido dentro do drawer */
|
|
34
|
-
children?: ReactNode;
|
|
35
|
-
/** Conteúdo customizado do cabeçalho */
|
|
36
|
-
headerContent?: ReactNode;
|
|
37
|
-
/** Largura customizada do drawer (ex: '400px', '50%') */
|
|
38
|
-
customWidth?: string;
|
|
39
|
-
/** Callback executado ao fechar o drawer: () => void */
|
|
40
|
-
onClose: () => void;
|
|
41
|
-
/** Título exibido no cabeçalho do drawer */
|
|
42
|
-
title?: string;
|
|
43
|
-
/** Define se o drawer está aberto */
|
|
44
|
-
isOpen: boolean;
|
|
45
|
-
/** Callback executado ao abrir o drawer: () => void */
|
|
46
|
-
onOpen?: () => void;
|
|
47
|
-
/** Callback executado ao clicar no overlay: () => void */
|
|
48
|
-
onOverlayClick?: () => void;
|
|
49
|
-
/** Define se o drawer fecha ao clicar no overlay */
|
|
50
|
-
closeOnOverlayClick?: boolean;
|
|
51
|
-
/** Define se o drawer fecha ao pressionar ESC */
|
|
52
|
-
closeOnEscape?: boolean;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Props do componente DrawerExample (trigger para abrir o drawer)
|
|
56
|
-
* @example
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <DrawerExample
|
|
59
|
-
* text="Abrir menu"
|
|
60
|
-
* icon={<MenuIcon />}
|
|
61
|
-
* onOpen={handleOpen}
|
|
62
|
-
* />
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
export interface DrawerExampleProps extends BaseProps {
|
|
66
|
-
/** Texto do botão trigger */
|
|
67
|
-
text?: string;
|
|
68
|
-
/** Ícone do botão trigger */
|
|
69
|
-
icon?: ReactElement;
|
|
70
|
-
/** Conteúdo customizado do botão trigger */
|
|
71
|
-
children?: ReactNode;
|
|
72
|
-
/** Callback executado ao abrir: () => void */
|
|
73
|
-
onOpen?: () => void;
|
|
74
|
-
/** Variante visual do botão trigger */
|
|
75
|
-
variant?: Variant;
|
|
76
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Drawer';
|