@giro-ds/react 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +232 -208
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1656 -0
- package/dist/index.esm.js +234 -211
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +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
|
@@ -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';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ReactElement } from 'react';
|
|
2
|
-
import { Variant, BaseProps, Locale, Side, Align } from '../../types/common.types';
|
|
3
|
-
export interface FilterItem {
|
|
4
|
-
id?: string;
|
|
5
|
-
text: string;
|
|
6
|
-
subText?: string;
|
|
7
|
-
icon?: ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export type FilterType = 'text' | 'checkbox' | 'icon' | 'calendar';
|
|
11
|
-
/**
|
|
12
|
-
* Props do componente Filter
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Filter
|
|
16
|
-
* items={filterItems}
|
|
17
|
-
* type="checkbox"
|
|
18
|
-
* placeholder="Filtrar por categoria"
|
|
19
|
-
* onApplyFilter={(ids) => handleFilter(ids)}
|
|
20
|
-
* buttonText="Filtros"
|
|
21
|
-
* />
|
|
22
|
-
* ```
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <Filter
|
|
26
|
-
* type="calendar"
|
|
27
|
-
* selectedDate={selectedDate}
|
|
28
|
-
* onDateSelect={handleDateSelect}
|
|
29
|
-
* minDate={new Date('2024-01-01')}
|
|
30
|
-
* locale="pt-br"
|
|
31
|
-
* icon={<CalendarIcon />}
|
|
32
|
-
* />
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export interface FilterProps extends BaseProps {
|
|
36
|
-
/** Array de itens para filtros do tipo dropdown */
|
|
37
|
-
items?: FilterItem[];
|
|
38
|
-
/** Tipo do filtro (dropdown ou calendário) */
|
|
39
|
-
type?: FilterType;
|
|
40
|
-
/** IDs dos itens selecionados */
|
|
41
|
-
selectedIds?: string[];
|
|
42
|
-
/** Callback executado ao aplicar filtro: (selectedIds) => void */
|
|
43
|
-
onApplyFilter?: (selectedIds: string[]) => void;
|
|
44
|
-
/** Placeholder do campo de busca */
|
|
45
|
-
placeholder?: string;
|
|
46
|
-
/** Habilita campo de busca no dropdown */
|
|
47
|
-
enableSearch?: boolean;
|
|
48
|
-
/** Texto ou conteúdo do botão de filtro */
|
|
49
|
-
buttonText?: string | ReactNode;
|
|
50
|
-
/** Ícone do botão de filtro */
|
|
51
|
-
icon?: ReactElement;
|
|
52
|
-
/** Variante visual do botão */
|
|
53
|
-
variant?: Variant;
|
|
54
|
-
/** Callback executado ao abrir o filtro: () => void */
|
|
55
|
-
onOpen?: () => void;
|
|
56
|
-
/** Callback executado ao fechar o filtro: () => void */
|
|
57
|
-
onClose?: () => void;
|
|
58
|
-
/** Posição do popover em relação ao botão */
|
|
59
|
-
side?: Side;
|
|
60
|
-
/** Alinhamento do popover em relação ao botão */
|
|
61
|
-
align?: Exclude<Align, 'center'>;
|
|
62
|
-
/** Data selecionada (para tipo calendar) */
|
|
63
|
-
selectedDate?: Date | null;
|
|
64
|
-
/** Callback executado ao selecionar data: (date) => void */
|
|
65
|
-
onDateSelect?: (date: Date) => void;
|
|
66
|
-
/** Callback executado ao limpar data: () => void */
|
|
67
|
-
onClearDate?: () => void;
|
|
68
|
-
/** Data mínima selecionável (para tipo calendar) */
|
|
69
|
-
minDate?: Date;
|
|
70
|
-
/** Data máxima selecionável (para tipo calendar) */
|
|
71
|
-
maxDate?: Date;
|
|
72
|
-
/** Locale do calendário */
|
|
73
|
-
locale?: Locale;
|
|
74
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/common.types';
|
|
3
|
-
/** Variantes disponíveis para o ListItem */
|
|
4
|
-
export type ListItemVariant = 'text' | 'checkbox' | 'radio' | 'icon';
|
|
5
|
-
/**
|
|
6
|
-
* Props do componente ListItem
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <ListItem
|
|
10
|
-
* variant="text"
|
|
11
|
-
* text="Item da lista"
|
|
12
|
-
* subText="Descrição do item"
|
|
13
|
-
* onClick={handleClick}
|
|
14
|
-
* />
|
|
15
|
-
* ```
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <ListItem
|
|
19
|
-
* variant="checkbox"
|
|
20
|
-
* text="Aceitar termos"
|
|
21
|
-
* checked={isChecked}
|
|
22
|
-
* onChange={setIsChecked}
|
|
23
|
-
* disabled={false}
|
|
24
|
-
* />
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export interface ListItemProps extends BaseProps {
|
|
28
|
-
/** Variante do item da lista */
|
|
29
|
-
variant?: ListItemVariant;
|
|
30
|
-
/** Texto principal do item */
|
|
31
|
-
text?: string;
|
|
32
|
-
/** Nome do input (para variantes checkbox/radio) */
|
|
33
|
-
name?: string;
|
|
34
|
-
/** Texto secundário/descrição do item */
|
|
35
|
-
subText?: string;
|
|
36
|
-
/** Estado de checked (para variantes checkbox/radio) */
|
|
37
|
-
checked?: boolean;
|
|
38
|
-
/** Estado de selecionado (para variantes text/icon) */
|
|
39
|
-
selected?: boolean;
|
|
40
|
-
/** Callback executado ao clicar no item: (event) => void */
|
|
41
|
-
onClick?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
42
|
-
/** Callback executado quando o estado muda: (checked) => void */
|
|
43
|
-
onChange?: (checked: boolean) => void;
|
|
44
|
-
/** Ícone do item (para variante icon) */
|
|
45
|
-
icon?: React.ReactNode;
|
|
46
|
-
/** Valor do input (para variantes checkbox/radio) */
|
|
47
|
-
value?: string;
|
|
48
|
-
/** Define se deve mostrar o subtexto */
|
|
49
|
-
showSubText?: boolean;
|
|
50
|
-
/** Estado de hover */
|
|
51
|
-
hovered?: boolean;
|
|
52
|
-
}
|