@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,59 +0,0 @@
|
|
|
1
|
-
export { default as Avatar } from './Avatar';
|
|
2
|
-
export { type AvatarProps } from './Avatar/Avatar.types';
|
|
3
|
-
export { default as Badge } from './Badge';
|
|
4
|
-
export { type BadgeProps } from './Badge/Badge.types';
|
|
5
|
-
export { default as Button } from './Button';
|
|
6
|
-
export { type ButtonProps } from './Button/Button.types';
|
|
7
|
-
export { default as Calendar } from './Calendar';
|
|
8
|
-
export { type CalendarProps } from './Calendar/Calendar.types';
|
|
9
|
-
export { default as Callout } from './Callout';
|
|
10
|
-
export { type CalloutProps } from './Callout/Callout.types';
|
|
11
|
-
export { default as Checkbox } from './Checkbox';
|
|
12
|
-
export { type CheckboxProps } from './Checkbox/Checkbox.types';
|
|
13
|
-
export { default as Chips } from './Chips';
|
|
14
|
-
export { type ChipsProps } from './Chips/Chips.types';
|
|
15
|
-
export { default as Container } from './Container/Container';
|
|
16
|
-
export { type ContainerProps } from './Container/Container.types';
|
|
17
|
-
export { default as DatePicker } from './DatePicker';
|
|
18
|
-
export { type DatePickerProps } from './DatePicker/DatePicker.types';
|
|
19
|
-
export { default as Dialog } from './Dialog';
|
|
20
|
-
export { type DialogProps } from './Dialog/Dialog.types';
|
|
21
|
-
export { default as Drawer } from './Drawer';
|
|
22
|
-
export { type DrawerProps } from './Drawer/Drawer.types';
|
|
23
|
-
export { default as Filter } from './Filter';
|
|
24
|
-
export { type FilterProps } from './Filter/Filter.types';
|
|
25
|
-
export { default as ListItem } from './ListItem';
|
|
26
|
-
export { type ListItemProps } from './ListItem/ListItem.types';
|
|
27
|
-
export { default as Menu } from './Menu';
|
|
28
|
-
export { type MenuProps } from './Menu/Menu.types';
|
|
29
|
-
export { default as Popover } from './Popover';
|
|
30
|
-
export { type PopoverProps } from './Popover/Popover.types';
|
|
31
|
-
export { default as Quantity } from './Quantity';
|
|
32
|
-
export { type QuantityProps } from './Quantity/Quantity.types';
|
|
33
|
-
export { default as Radio } from './Radio';
|
|
34
|
-
export { type RadioGroupProps, type RadioProps } from './Radio/Radio.types';
|
|
35
|
-
export { default as Search } from './Search';
|
|
36
|
-
export { type SearchProps } from './Search/Search.types';
|
|
37
|
-
export { default as Select } from './Select';
|
|
38
|
-
export { type SelectProps } from './Select/Select.types';
|
|
39
|
-
export { default as Table } from './Table';
|
|
40
|
-
export { default as TableHeader } from './Table/TableHeader';
|
|
41
|
-
export { default as TablePagination } from './Table/TablePagination';
|
|
42
|
-
export { type TableProps } from './Table/Table.types';
|
|
43
|
-
export { type TablePaginationProps } from './Table/TablePagination';
|
|
44
|
-
export { type TableHeaderProps, type FilterItem } from './Table/TableHeader';
|
|
45
|
-
export { default as TextArea } from './TextArea';
|
|
46
|
-
export { type TextAreaProps } from './TextArea/TextArea.types';
|
|
47
|
-
export { default as TextField } from './TextField';
|
|
48
|
-
export { type TextFieldProps } from './TextField/TextField.types';
|
|
49
|
-
export { Toast, ToastProvider, ToastContainer, useToast } from './Toast';
|
|
50
|
-
export { type ToastProps } from './Toast/Toast.types';
|
|
51
|
-
export { default as Tooltip } from './Tooltip';
|
|
52
|
-
export { type TooltipProps } from './Tooltip/Tooltip.types';
|
|
53
|
-
export { default as Switch } from './Switch';
|
|
54
|
-
export { type SwitchProps } from './Switch/Switch.types';
|
|
55
|
-
export { default as VerificationCode } from './VerificationCode';
|
|
56
|
-
export { type VerificationCodeProps } from './VerificationCode/VerificationCode.types';
|
|
57
|
-
export { default as useApiSimulation } from '../hooks/ApiSimulation';
|
|
58
|
-
export { useInfiniteScroll } from '../hooks/InfiniteScroll';
|
|
59
|
-
export { normalizeText } from '../hooks/NormalizeText';
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ToastProps } from '../components/Toast/Toast.types';
|
|
3
|
-
/**
|
|
4
|
-
* Valor disponibilizado pelo contexto do sistema de Toast.
|
|
5
|
-
*
|
|
6
|
-
* Acessível via `useToast()` em componentes filhos do `ToastProvider`.
|
|
7
|
-
*
|
|
8
|
-
* @see {@link useToast}
|
|
9
|
-
*/
|
|
10
|
-
export interface ToastContextValue {
|
|
11
|
-
/** Lista de toasts atualmente visíveis na tela. */
|
|
12
|
-
toasts: ToastProps[];
|
|
13
|
-
/**
|
|
14
|
-
* Exibe um novo toast na tela.
|
|
15
|
-
*
|
|
16
|
-
* Gera um `id` único automaticamente e adiciona o toast à fila.
|
|
17
|
-
* Quando o limite de `maxToasts` é atingido, o toast mais antigo é removido.
|
|
18
|
-
*
|
|
19
|
-
* @param toast - Propriedades do toast a ser exibido (sem `id`).
|
|
20
|
-
*/
|
|
21
|
-
showToast: (toast: Omit<ToastProps, 'id'>) => void;
|
|
22
|
-
/**
|
|
23
|
-
* Remove um toast específico da tela pelo seu `id`.
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Geralmente não é necessário chamar este método manualmente, pois os toasts
|
|
27
|
-
* se fecham automaticamente (via `duration`) ou pelo botão de fechar do usuário.
|
|
28
|
-
*
|
|
29
|
-
* @param id - ID único do toast a ser removido.
|
|
30
|
-
*/
|
|
31
|
-
dismissToast: (id: string) => void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Contexto React que armazena o estado e as ações do sistema de Toast.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* Não consuma este contexto diretamente. Utilize o hook `useToast()` para
|
|
38
|
-
* acessar as funcionalidades de forma segura e com verificação de provider.
|
|
39
|
-
*
|
|
40
|
-
* @see {@link ToastContextValue}
|
|
41
|
-
* @see {@link useToast}
|
|
42
|
-
*/
|
|
43
|
-
export declare const ToastContext: React.Context<ToastContextValue | undefined>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configurações para simulação de API
|
|
3
|
-
*/
|
|
4
|
-
export interface ApiSimulationConfig {
|
|
5
|
-
/** Items por página */
|
|
6
|
-
itemsPerPage?: number;
|
|
7
|
-
/** Total de items no dataset */
|
|
8
|
-
totalItems?: number;
|
|
9
|
-
/** Delay em ms para simular latência */
|
|
10
|
-
delay?: number;
|
|
11
|
-
/** Taxa de erro (0-1) para simular falhas */
|
|
12
|
-
errorRate?: number;
|
|
13
|
-
/** Função geradora de items customizada */
|
|
14
|
-
itemGenerator?: (index: number, searchQuery?: string) => any;
|
|
15
|
-
/** Debug mode */
|
|
16
|
-
debug?: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Estado da simulação de API
|
|
20
|
-
*/
|
|
21
|
-
export interface ApiSimulationState<T> {
|
|
22
|
-
/** Items carregados */
|
|
23
|
-
items: T[];
|
|
24
|
-
/** Página atual */
|
|
25
|
-
currentPage: number;
|
|
26
|
-
/** Total de páginas */
|
|
27
|
-
totalPages: number;
|
|
28
|
-
/** Status do carregamento */
|
|
29
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
30
|
-
/** Erro atual (se houver) */
|
|
31
|
-
error: string | null;
|
|
32
|
-
/** Query de busca atual */
|
|
33
|
-
searchQuery: string;
|
|
34
|
-
/** Se há próxima página */
|
|
35
|
-
hasNextPage: boolean;
|
|
36
|
-
/** Se é a primeira página */
|
|
37
|
-
isFirstPage: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface ApiSimulationActions {
|
|
40
|
-
/** Carregar próxima página */
|
|
41
|
-
loadNextPage: () => Promise<void>;
|
|
42
|
-
/** Realizar nova busca */
|
|
43
|
-
search: (query: string) => Promise<void>;
|
|
44
|
-
/** Reset completo */
|
|
45
|
-
reset: () => void;
|
|
46
|
-
/** Retry da última operação */
|
|
47
|
-
retry: () => Promise<void>;
|
|
48
|
-
}
|
|
49
|
-
export interface UseApiSimulationReturn<T> extends ApiSimulationState<T> {
|
|
50
|
-
actions: ApiSimulationActions;
|
|
51
|
-
}
|
|
52
|
-
export declare function useApiSimulation<T = any>(config?: ApiSimulationConfig): UseApiSimulationReturn<T>;
|
|
53
|
-
export default useApiSimulation;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props para o hook useInfiniteScroll
|
|
3
|
-
*/
|
|
4
|
-
interface UseInfiniteScrollProps {
|
|
5
|
-
/** Status atual do carregamento */
|
|
6
|
-
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
7
|
-
/** Página atual */
|
|
8
|
-
page: number;
|
|
9
|
-
/** Última página disponível */
|
|
10
|
-
lastPage: number;
|
|
11
|
-
/** Callback para carregar próxima página */
|
|
12
|
-
onLoadMore: () => void;
|
|
13
|
-
/** Threshold para IntersectionObserver (0-1) */
|
|
14
|
-
threshold?: number;
|
|
15
|
-
/** Margem raiz para IntersectionObserver */
|
|
16
|
-
rootMargin?: string;
|
|
17
|
-
/** Habilita/desabilita o hook */
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
/** Debug mode - logs no console */
|
|
20
|
-
debug?: boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Retorno do hook useInfiniteScroll
|
|
24
|
-
*/
|
|
25
|
-
interface UseInfiniteScrollReturn {
|
|
26
|
-
/** Ref para o elemento observador */
|
|
27
|
-
observerRef: React.RefObject<HTMLDivElement | null>;
|
|
28
|
-
/** Se o elemento está visível */
|
|
29
|
-
isIntersecting: boolean;
|
|
30
|
-
/** Se há próxima página */
|
|
31
|
-
hasNextPage: boolean;
|
|
32
|
-
/** Se todas as páginas foram carregadas */
|
|
33
|
-
isCompleted: boolean;
|
|
34
|
-
/** Função para reset manual */
|
|
35
|
-
reset: () => void;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Hook otimizado para scroll infinito usando IntersectionObserver
|
|
39
|
-
*/
|
|
40
|
-
export declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, threshold, rootMargin, enabled, debug }: UseInfiniteScrollProps): UseInfiniteScrollReturn;
|
|
41
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const normalizeText: (text: React.ReactNode) => string;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ToastProps } from '../components/Toast/Toast.types';
|
|
2
|
-
/**
|
|
3
|
-
* Hook interno que acessa o `ToastContext` diretamente.
|
|
4
|
-
*
|
|
5
|
-
* @throws {Error} Lança um erro se utilizado fora de um `ToastProvider`:
|
|
6
|
-
* *"useToastContext deve ser usado dentro de ToastProvider"*
|
|
7
|
-
*
|
|
8
|
-
* @returns O valor completo do contexto — `toasts`, `showToast` e `dismissToast`.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare const useToastContext: () => import("../contexts/ToastContext").ToastContextValue;
|
|
13
|
-
/**
|
|
14
|
-
* Hook para exibir e remover toasts na aplicação.
|
|
15
|
-
*
|
|
16
|
-
* O componente que usa este hook deve ser filho de um `ToastProvider`.
|
|
17
|
-
*
|
|
18
|
-
* @throws {Error} Lança um erro se utilizado fora de um `ToastProvider`:
|
|
19
|
-
* *"useToastContext deve ser usado dentro de ToastProvider"*
|
|
20
|
-
*
|
|
21
|
-
* @returns Objeto com os métodos `showToast` e `dismissToast`.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* import { useToast } from '@giro-ds/react';
|
|
26
|
-
*
|
|
27
|
-
* function MeuComponente() {
|
|
28
|
-
* const { showToast } = useToast();
|
|
29
|
-
*
|
|
30
|
-
* const handleSalvar = async () => {
|
|
31
|
-
* try {
|
|
32
|
-
* await salvarDados();
|
|
33
|
-
* showToast({ title: 'Sucesso!', iconType: 'Success', duration: 3000 });
|
|
34
|
-
* } catch (err) {
|
|
35
|
-
* showToast({ title: 'Erro ao salvar', iconType: 'Alert', automaticClose: false });
|
|
36
|
-
* }
|
|
37
|
-
* };
|
|
38
|
-
*
|
|
39
|
-
* return <button onClick={handleSalvar}>Salvar</button>;
|
|
40
|
-
* }
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export declare const useToast: () => {
|
|
44
|
-
showToast: (toast: Omit<ToastProps, "id">) => void;
|
|
45
|
-
dismissToast: (id: string) => void;
|
|
46
|
-
};
|
package/dist/dts-temp/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface LabelProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
htmlFor: string;
|
|
5
|
-
required?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
tooltipText?: string;
|
|
8
|
-
tooltip?: boolean;
|
|
9
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
10
|
-
align?: "start" | "center" | "end";
|
|
11
|
-
error?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare const LabelComponent: ({ children, htmlFor, required, tooltip, tooltipText, side, align, className, error, disabled }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export default LabelComponent;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface CheckHalfProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
width?: number | string;
|
|
5
|
-
height?: number | string;
|
|
6
|
-
fill?: string;
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
declare const CheckHalf: React.FC<CheckHalfProps>;
|
|
10
|
-
export default CheckHalf;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface CheckSmallProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
width?: number | string;
|
|
5
|
-
height?: number | string;
|
|
6
|
-
fill?: string;
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
declare const CheckSmall: React.FC<CheckSmallProps>;
|
|
10
|
-
export default CheckSmall;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type Size = 'sm' | 'lg';
|
|
2
|
-
export type Variant = 'filled' | 'outlined' | 'text';
|
|
3
|
-
export type TextVariant = 'neutral' | 'brand' | 'color' | 'success' | 'alert';
|
|
4
|
-
export type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
5
|
-
export type Align = 'start' | 'center' | 'end';
|
|
6
|
-
export type Position = 'right' | 'left' | 'both';
|
|
7
|
-
export type Locale = 'pt-br' | 'en-us';
|
|
8
|
-
export interface BaseProps {
|
|
9
|
-
id?: string;
|
|
10
|
-
className?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './common.types';
|