@archbase/components 3.0.25 → 4.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/buttons/ArchbaseSpeedDial.d.ts +59 -0
- package/dist/buttons/index.d.ts +2 -0
- package/dist/charts/ArchbaseArcGauge.d.ts +55 -0
- package/dist/charts/ArchbaseGantt.d.ts +70 -0
- package/dist/charts/ArchbaseLinearGauge.d.ts +55 -0
- package/dist/charts/ArchbaseResourceTimeline.d.ts +61 -0
- package/dist/charts/ArchbaseSparkline.d.ts +45 -0
- package/dist/charts/index.d.ts +10 -0
- package/dist/containers/ArchbaseExpansionPanel.d.ts +60 -0
- package/dist/containers/ArchbaseFloatingPanel.d.ts +91 -0
- package/dist/containers/index.d.ts +4 -0
- package/dist/datagrid/export/ArchbaseDataGridExcelExport.d.ts +67 -0
- package/dist/datagrid/export/index.d.ts +2 -0
- package/dist/datagrid/index.d.ts +1 -0
- package/dist/display/ArchbaseAnimationWrapper.d.ts +73 -0
- package/dist/display/ArchbaseBarcodeGenerator.d.ts +50 -0
- package/dist/display/ArchbaseCarousel.d.ts +100 -0
- package/dist/display/ArchbaseCodeViewer.d.ts +63 -0
- package/dist/display/ArchbaseDiffViewer.d.ts +41 -0
- package/dist/display/ArchbaseJsonTree.d.ts +34 -0
- package/dist/display/ArchbaseLightbox.d.ts +89 -0
- package/dist/display/ArchbaseMarquee.d.ts +46 -0
- package/dist/display/ArchbasePhotoAlbum.d.ts +58 -0
- package/dist/display/ArchbaseQRCode.d.ts +44 -0
- package/dist/display/ArchbaseTooltipRich.d.ts +82 -0
- package/dist/display/ArchbaseVirtualList.d.ts +116 -0
- package/dist/display/index.d.ts +24 -0
- package/dist/editors/ArchbaseAIPromptInput.d.ts +69 -0
- package/dist/editors/ArchbaseAsyncMultiSelect.d.ts +1 -1
- package/dist/editors/ArchbaseAsyncSelect.d.ts +1 -1
- package/dist/editors/ArchbaseBarcodeScanner.d.ts +63 -0
- package/dist/editors/ArchbaseCepInput.d.ts +26 -0
- package/dist/editors/ArchbaseColorGradientPicker.d.ts +80 -0
- package/dist/editors/ArchbaseCpfCnpjInput.d.ts +21 -0
- package/dist/editors/ArchbaseCurrencyInput.d.ts +25 -0
- package/dist/editors/ArchbaseDualListbox.d.ts +61 -0
- package/dist/editors/ArchbaseInPlaceEditor.d.ts +67 -0
- package/dist/editors/ArchbaseLightGrid.d.ts +56 -0
- package/dist/editors/ArchbaseMentionInput.d.ts +75 -0
- package/dist/editors/ArchbaseMultiEmail.d.ts +53 -0
- package/dist/editors/ArchbaseMultiViewCalendar.d.ts +47 -0
- package/dist/editors/ArchbaseNumberStepper.d.ts +66 -0
- package/dist/editors/ArchbaseOTPInput.d.ts +27 -0
- package/dist/editors/ArchbasePhoneInput.d.ts +52 -0
- package/dist/editors/ArchbaseRangeSlider.d.ts +22 -0
- package/dist/editors/ArchbaseSignaturePad.d.ts +60 -0
- package/dist/editors/ArchbaseSpeechToTextInput.d.ts +106 -0
- package/dist/editors/ArchbaseSpreadsheet.d.ts +56 -0
- package/dist/editors/ArchbaseTagInput.d.ts +55 -0
- package/dist/editors/index.d.ts +40 -0
- package/dist/feedback/ArchbaseChunkProgressBar.d.ts +35 -0
- package/dist/feedback/ArchbaseRipple.d.ts +43 -0
- package/dist/feedback/ArchbaseSkeleton.d.ts +115 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/filters/ArchbaseColumnSelector.d.ts +38 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/forms/ArchbaseFieldArray.d.ts +80 -0
- package/dist/forms/ArchbaseFormWizard.d.ts +73 -0
- package/dist/forms/ArchbaseStepper.d.ts +51 -0
- package/dist/forms/index.d.ts +8 -0
- package/dist/forms/useArchbaseFormWizard.d.ts +74 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useArchbaseConfirm.d.ts +59 -0
- package/dist/image/editor/index.d.ts +43 -4
- package/dist/image/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22510 -13820
- package/dist/list/ArchbaseTreeList.d.ts +76 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/navigation/ArchbaseActionSheet.d.ts +70 -0
- package/dist/navigation/ArchbaseAppBar.d.ts +63 -0
- package/dist/navigation/ArchbaseBottomNavigation.d.ts +61 -0
- package/dist/navigation/ArchbaseContextMenu.d.ts +76 -0
- package/dist/navigation/ArchbaseKeyboardShortcuts.d.ts +85 -0
- package/dist/navigation/ArchbaseSpotlight.d.ts +69 -0
- package/dist/navigation/index.d.ts +12 -0
- package/dist/notification/ArchbaseNotificationCenter.d.ts +56 -0
- package/dist/notification/index.d.ts +2 -0
- package/dist/onboarding/ArchbaseOnboardingTour.d.ts +27 -76
- package/dist/viewers/ArchbaseDocViewer.d.ts +40 -0
- package/dist/viewers/ArchbasePdfBuilder.d.ts +53 -0
- package/dist/viewers/ArchbaseXmlViewer.d.ts +36 -0
- package/dist/viewers/index.d.ts +6 -0
- package/package.json +41 -18
- package/src/buttons/ArchbaseSpeedDial.tsx +282 -0
- package/src/buttons/index.ts +3 -0
- package/src/charts/ArchbaseArcGauge.tsx +325 -0
- package/src/charts/ArchbaseGantt.tsx +494 -0
- package/src/charts/ArchbaseLinearGauge.tsx +288 -0
- package/src/charts/ArchbaseResourceTimeline.tsx +433 -0
- package/src/charts/ArchbaseSparkline.tsx +193 -0
- package/src/charts/index.ts +20 -1
- package/src/containers/ArchbaseExpansionPanel.tsx +208 -0
- package/src/containers/ArchbaseFloatingPanel.tsx +448 -0
- package/src/containers/index.ts +17 -0
- package/src/datagrid/components/pagination/grid-pagination.tsx +2 -2
- package/src/datagrid/export/ArchbaseDataGridExcelExport.tsx +293 -0
- package/src/datagrid/export/index.ts +8 -0
- package/src/datagrid/index.tsx +2 -0
- package/src/display/ArchbaseAnimationWrapper.tsx +272 -0
- package/src/display/ArchbaseBarcodeGenerator.tsx +303 -0
- package/src/display/ArchbaseCarousel.tsx +679 -0
- package/src/display/ArchbaseCodeViewer.tsx +271 -0
- package/src/display/ArchbaseDiffViewer.tsx +108 -0
- package/src/display/ArchbaseJsonTree.tsx +150 -0
- package/src/display/ArchbaseLightbox.tsx +279 -0
- package/src/display/ArchbaseMarquee.tsx +268 -0
- package/src/display/ArchbasePhotoAlbum.tsx +415 -0
- package/src/display/ArchbaseQRCode.tsx +137 -0
- package/src/display/ArchbaseTooltipRich.tsx +317 -0
- package/src/display/ArchbaseVirtualList.tsx +618 -0
- package/src/display/index.ts +94 -1
- package/src/editors/ArchbaseAIPromptInput.tsx +432 -0
- package/src/editors/ArchbaseBarcodeScanner.tsx +570 -0
- package/src/editors/ArchbaseCepInput.tsx +173 -0
- package/src/editors/ArchbaseColorGradientPicker.tsx +460 -0
- package/src/editors/ArchbaseCpfCnpjInput.tsx +193 -0
- package/src/editors/ArchbaseCurrencyInput.tsx +100 -0
- package/src/editors/ArchbaseDualListbox.tsx +671 -0
- package/src/editors/ArchbaseInPlaceEditor.tsx +406 -0
- package/src/editors/ArchbaseLightGrid.tsx +538 -0
- package/src/editors/ArchbaseMentionInput.tsx +384 -0
- package/src/editors/ArchbaseMultiEmail.tsx +367 -0
- package/src/editors/ArchbaseMultiViewCalendar.tsx +439 -0
- package/src/editors/ArchbaseNumberStepper.tsx +219 -0
- package/src/editors/ArchbaseOTPInput.tsx +133 -0
- package/src/editors/ArchbaseOperationHoursEditor.tsx +1 -1
- package/src/editors/ArchbasePhoneInput.tsx +355 -0
- package/src/editors/ArchbaseRangeSlider.tsx +109 -0
- package/src/editors/ArchbaseSignaturePad.tsx +425 -0
- package/src/editors/ArchbaseSpeechToTextInput.tsx +444 -0
- package/src/editors/ArchbaseSpreadsheet.tsx +388 -0
- package/src/editors/ArchbaseTagInput.tsx +326 -0
- package/src/editors/index.tsx +92 -0
- package/src/feedback/ArchbaseChunkProgressBar.tsx +156 -0
- package/src/feedback/ArchbaseRipple.tsx +278 -0
- package/src/feedback/ArchbaseSkeleton.tsx +419 -0
- package/src/feedback/index.ts +22 -1
- package/src/filters/ArchbaseColumnSelector.tsx +268 -0
- package/src/filters/index.ts +2 -0
- package/src/forms/ArchbaseFieldArray.tsx +305 -0
- package/src/forms/ArchbaseFormWizard.tsx +284 -0
- package/src/forms/ArchbaseStepper.tsx +137 -0
- package/src/forms/index.ts +24 -2
- package/src/forms/useArchbaseFormWizard.ts +283 -0
- package/src/hooks/index.ts +12 -0
- package/src/hooks/useArchbaseConfirm.ts +293 -0
- package/src/image/editor/functions/image-processing.ts +5 -0
- package/src/image/editor/index.tsx +305 -391
- package/src/image/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/list/ArchbaseTreeList.tsx +422 -0
- package/src/list/index.ts +3 -0
- package/src/navigation/ArchbaseActionSheet.tsx +301 -0
- package/src/navigation/ArchbaseAppBar.tsx +233 -0
- package/src/navigation/ArchbaseBottomNavigation.tsx +243 -0
- package/src/navigation/ArchbaseContextMenu.tsx +298 -0
- package/src/navigation/ArchbaseKeyboardShortcuts.tsx +472 -0
- package/src/navigation/ArchbaseSpotlight.tsx +483 -0
- package/src/navigation/index.ts +48 -1
- package/src/notification/ArchbaseNotificationCenter.tsx +502 -0
- package/src/notification/index.ts +2 -0
- package/src/onboarding/ArchbaseOnboardingTour.tsx +229 -102
- package/src/viewers/ArchbaseDocViewer.tsx +584 -0
- package/src/viewers/ArchbasePdfBuilder.tsx +291 -0
- package/src/viewers/ArchbaseXmlViewer.tsx +142 -0
- package/src/viewers/index.ts +12 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
import { ArchbaseDataSource } from '@archbase/data';
|
|
4
|
+
export interface ArchbaseTreeListColumn<T> {
|
|
5
|
+
/** ID da coluna */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Header da coluna */
|
|
8
|
+
header: string;
|
|
9
|
+
/** Accessor do campo */
|
|
10
|
+
accessor: keyof T | ((row: T) => any);
|
|
11
|
+
/** Largura da coluna */
|
|
12
|
+
width?: number | string;
|
|
13
|
+
/** Alinhamento */
|
|
14
|
+
align?: 'left' | 'center' | 'right';
|
|
15
|
+
/** Renderizador customizado */
|
|
16
|
+
render?: (value: any, row: T, index: number) => ReactNode;
|
|
17
|
+
/** Se é a coluna de árvore (com indent e expand) */
|
|
18
|
+
isTreeColumn?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ArchbaseTreeListProps<T extends object, ID> {
|
|
21
|
+
/** Dados da árvore */
|
|
22
|
+
data?: T[];
|
|
23
|
+
/** Fonte de dados */
|
|
24
|
+
dataSource?: ArchbaseDataSource<T, ID>;
|
|
25
|
+
/** Colunas */
|
|
26
|
+
columns: ArchbaseTreeListColumn<T>[];
|
|
27
|
+
/** Função para obter filhos de um item */
|
|
28
|
+
getSubRows?: (row: T) => T[] | undefined;
|
|
29
|
+
/** Campo que contém os filhos */
|
|
30
|
+
childrenField?: string;
|
|
31
|
+
/** Campo de ID único */
|
|
32
|
+
idField?: keyof T;
|
|
33
|
+
/** IDs expandidos (controlado) */
|
|
34
|
+
expandedIds?: Set<any>;
|
|
35
|
+
/** IDs expandidos por padrão */
|
|
36
|
+
defaultExpandedIds?: Set<any>;
|
|
37
|
+
/** Se deve expandir todos por padrão */
|
|
38
|
+
defaultExpandAll?: boolean;
|
|
39
|
+
/** Callback ao expandir/colapsar */
|
|
40
|
+
onExpandChange?: (expandedIds: Set<any>) => void;
|
|
41
|
+
/** Profundidade máxima */
|
|
42
|
+
maxDepth?: number;
|
|
43
|
+
/** Indentação por nível em pixels */
|
|
44
|
+
indentSize?: number;
|
|
45
|
+
/** Se deve mostrar linhas de conexão */
|
|
46
|
+
showLines?: boolean;
|
|
47
|
+
/** Se permite seleção */
|
|
48
|
+
selectable?: boolean;
|
|
49
|
+
/** Modo de seleção */
|
|
50
|
+
selectionMode?: 'single' | 'multiple';
|
|
51
|
+
/** IDs selecionados */
|
|
52
|
+
selectedIds?: Set<any>;
|
|
53
|
+
/** Callback ao selecionar */
|
|
54
|
+
onSelectionChange?: (selectedIds: Set<any>) => void;
|
|
55
|
+
/** Cor de destaque */
|
|
56
|
+
highlightColor?: MantineColor;
|
|
57
|
+
/** Altura da linha */
|
|
58
|
+
rowHeight?: number;
|
|
59
|
+
/** Altura máxima (scroll) */
|
|
60
|
+
maxHeight?: number | string;
|
|
61
|
+
/** Tamanho */
|
|
62
|
+
size?: MantineSize;
|
|
63
|
+
/** Se deve ter bordas */
|
|
64
|
+
withBorder?: boolean;
|
|
65
|
+
/** Se deve ter listras */
|
|
66
|
+
striped?: boolean;
|
|
67
|
+
/** Se deve destacar no hover */
|
|
68
|
+
highlightOnHover?: boolean;
|
|
69
|
+
/** Classe CSS */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** Estilo */
|
|
72
|
+
style?: React.CSSProperties;
|
|
73
|
+
}
|
|
74
|
+
export declare const ArchbaseTreeList: <T extends object = any, ID = string>(props: ArchbaseTreeListProps<T, ID> & {
|
|
75
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
76
|
+
}) => React.ReactElement;
|
package/dist/list/index.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export type { ArchbaseListItemProps } from './ArchbaseListItem';
|
|
|
6
6
|
export type { ArchbaseListContextValue } from './ArchbaseList.context';
|
|
7
7
|
export { ArchbaseListContext };
|
|
8
8
|
export * from './treeview';
|
|
9
|
+
export { ArchbaseTreeList } from './ArchbaseTreeList';
|
|
10
|
+
export type { ArchbaseTreeListProps, ArchbaseTreeListColumn } from './ArchbaseTreeList';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseActionSheetItem {
|
|
4
|
+
/** Chave única */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Tipo do item */
|
|
7
|
+
type?: 'item' | 'divider';
|
|
8
|
+
/** Label do item */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Descrição */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Ícone */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** Cor */
|
|
15
|
+
color?: MantineColor;
|
|
16
|
+
/** Se está desabilitado */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Callback ao clicar */
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ArchbaseActionSheetProps {
|
|
22
|
+
/** Itens do action sheet */
|
|
23
|
+
items: ArchbaseActionSheetItem[];
|
|
24
|
+
/** Se está aberto */
|
|
25
|
+
opened: boolean;
|
|
26
|
+
/** Callback ao fechar */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
/** Título */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** Descrição */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** Label do botão cancelar */
|
|
33
|
+
cancelLabel?: string;
|
|
34
|
+
/** Se deve mostrar botão cancelar */
|
|
35
|
+
showCancel?: boolean;
|
|
36
|
+
/** Breakpoint para mudar de drawer para menu */
|
|
37
|
+
breakpoint?: string;
|
|
38
|
+
/** Posição do menu no desktop */
|
|
39
|
+
menuPosition?: 'bottom' | 'top' | 'left' | 'right';
|
|
40
|
+
/** Elemento alvo do menu (desktop) */
|
|
41
|
+
target?: ReactNode;
|
|
42
|
+
/** Tamanho */
|
|
43
|
+
size?: MantineSize;
|
|
44
|
+
/** Raio das bordas do drawer */
|
|
45
|
+
radius?: MantineSize;
|
|
46
|
+
/** Se deve ter overlay */
|
|
47
|
+
withOverlay?: boolean;
|
|
48
|
+
/** Classe CSS */
|
|
49
|
+
className?: string;
|
|
50
|
+
/** Estilo */
|
|
51
|
+
style?: React.CSSProperties;
|
|
52
|
+
}
|
|
53
|
+
export declare const ArchbaseActionSheet: React.ForwardRefExoticComponent<ArchbaseActionSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
export interface UseArchbaseActionSheetOptions {
|
|
55
|
+
items: ArchbaseActionSheetItem[];
|
|
56
|
+
title?: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
cancelLabel?: string;
|
|
59
|
+
showCancel?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface UseArchbaseActionSheetReturn {
|
|
62
|
+
opened: boolean;
|
|
63
|
+
open: () => void;
|
|
64
|
+
close: () => void;
|
|
65
|
+
toggle: () => void;
|
|
66
|
+
ActionSheet: React.FC<{
|
|
67
|
+
target?: ReactNode;
|
|
68
|
+
}>;
|
|
69
|
+
}
|
|
70
|
+
export declare function useArchbaseActionSheet(options: UseArchbaseActionSheetOptions): UseArchbaseActionSheetReturn;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseAppBarAction {
|
|
4
|
+
/** Chave única */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Ícone */
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
/** Label (para menu mobile) */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Callback ao clicar */
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
/** Cor */
|
|
13
|
+
color?: MantineColor;
|
|
14
|
+
/** Se está desabilitado */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Se deve esconder no mobile */
|
|
17
|
+
hideOnMobile?: boolean;
|
|
18
|
+
/** Se deve mostrar sempre (não ir para menu) */
|
|
19
|
+
alwaysVisible?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ArchbaseAppBarProps {
|
|
22
|
+
/** Seção esquerda (logo, back button, menu) */
|
|
23
|
+
leftSection?: ReactNode;
|
|
24
|
+
/** Seção central (título, busca) */
|
|
25
|
+
centerSection?: ReactNode;
|
|
26
|
+
/** Seção direita (ações, avatar) */
|
|
27
|
+
rightSection?: ReactNode;
|
|
28
|
+
/** Ações (alternativa ao rightSection) */
|
|
29
|
+
actions?: ArchbaseAppBarAction[];
|
|
30
|
+
/** Título */
|
|
31
|
+
title?: string;
|
|
32
|
+
/** Subtítulo */
|
|
33
|
+
subtitle?: string;
|
|
34
|
+
/** Altura */
|
|
35
|
+
height?: number;
|
|
36
|
+
/** Cor de fundo */
|
|
37
|
+
backgroundColor?: string;
|
|
38
|
+
/** Cor do texto */
|
|
39
|
+
textColor?: MantineColor;
|
|
40
|
+
/** Se deve ter sombra */
|
|
41
|
+
withShadow?: boolean;
|
|
42
|
+
/** Se deve ter borda inferior */
|
|
43
|
+
withBorder?: boolean;
|
|
44
|
+
/** Se está fixo no topo */
|
|
45
|
+
fixed?: boolean;
|
|
46
|
+
/** Z-index quando fixo */
|
|
47
|
+
zIndex?: number;
|
|
48
|
+
/** Breakpoint para modo mobile */
|
|
49
|
+
mobileBreakpoint?: string;
|
|
50
|
+
/** Callback do burger (para abrir drawer) */
|
|
51
|
+
onBurgerClick?: () => void;
|
|
52
|
+
/** Se o burger está aberto */
|
|
53
|
+
burgerOpened?: boolean;
|
|
54
|
+
/** Padding horizontal */
|
|
55
|
+
px?: MantineSize | number;
|
|
56
|
+
/** Tamanho das ações */
|
|
57
|
+
actionSize?: MantineSize;
|
|
58
|
+
/** Classe CSS */
|
|
59
|
+
className?: string;
|
|
60
|
+
/** Estilo */
|
|
61
|
+
style?: React.CSSProperties;
|
|
62
|
+
}
|
|
63
|
+
export declare const ArchbaseAppBar: React.ForwardRefExoticComponent<ArchbaseAppBarProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseBottomNavigationItem {
|
|
4
|
+
/** Chave única */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Label do item */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Ícone */
|
|
9
|
+
icon: ReactNode;
|
|
10
|
+
/** Ícone quando ativo */
|
|
11
|
+
activeIcon?: ReactNode;
|
|
12
|
+
/** Badge */
|
|
13
|
+
badge?: number | string;
|
|
14
|
+
/** Cor do badge */
|
|
15
|
+
badgeColor?: MantineColor;
|
|
16
|
+
/** Se está desabilitado */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Link (navegação) */
|
|
19
|
+
href?: string;
|
|
20
|
+
/** Callback ao clicar */
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface ArchbaseBottomNavigationProps {
|
|
24
|
+
/** Itens da navegação */
|
|
25
|
+
items: ArchbaseBottomNavigationItem[];
|
|
26
|
+
/** Item ativo (controlado) */
|
|
27
|
+
value?: string;
|
|
28
|
+
/** Item ativo padrão */
|
|
29
|
+
defaultValue?: string;
|
|
30
|
+
/** Callback ao mudar */
|
|
31
|
+
onChange?: (value: string) => void;
|
|
32
|
+
/** Altura da barra */
|
|
33
|
+
height?: number;
|
|
34
|
+
/** Cor de destaque */
|
|
35
|
+
activeColor?: MantineColor;
|
|
36
|
+
/** Cor inativa */
|
|
37
|
+
inactiveColor?: MantineColor;
|
|
38
|
+
/** Tamanho do ícone */
|
|
39
|
+
iconSize?: number;
|
|
40
|
+
/** Tamanho do texto */
|
|
41
|
+
labelSize?: MantineSize;
|
|
42
|
+
/** Se deve mostrar labels */
|
|
43
|
+
showLabels?: boolean;
|
|
44
|
+
/** Se deve mostrar labels apenas no ativo */
|
|
45
|
+
showActiveLabel?: boolean;
|
|
46
|
+
/** Se deve ter sombra */
|
|
47
|
+
withShadow?: boolean;
|
|
48
|
+
/** Se deve ter borda superior */
|
|
49
|
+
withBorder?: boolean;
|
|
50
|
+
/** Cor de fundo */
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
/** Se está fixo na parte inferior */
|
|
53
|
+
fixed?: boolean;
|
|
54
|
+
/** Z-index quando fixo */
|
|
55
|
+
zIndex?: number;
|
|
56
|
+
/** Classe CSS */
|
|
57
|
+
className?: string;
|
|
58
|
+
/** Estilo */
|
|
59
|
+
style?: React.CSSProperties;
|
|
60
|
+
}
|
|
61
|
+
export declare const ArchbaseBottomNavigation: React.ForwardRefExoticComponent<ArchbaseBottomNavigationProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { default as React, ReactNode, MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseContextMenuItem {
|
|
4
|
+
/** Chave única do item */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Tipo do item */
|
|
7
|
+
type?: 'item' | 'divider' | 'label';
|
|
8
|
+
/** Label do item */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Ícone do item */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Ícone à direita */
|
|
13
|
+
rightSection?: ReactNode;
|
|
14
|
+
/** Atalho de teclado */
|
|
15
|
+
shortcut?: string;
|
|
16
|
+
/** Cor do item */
|
|
17
|
+
color?: MantineColor;
|
|
18
|
+
/** Se está desabilitado */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Callback ao clicar */
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
/** Subitems (submenu) */
|
|
23
|
+
children?: ArchbaseContextMenuItem[];
|
|
24
|
+
}
|
|
25
|
+
export interface ArchbaseContextMenuProps {
|
|
26
|
+
/** Itens do menu */
|
|
27
|
+
items: ArchbaseContextMenuItem[];
|
|
28
|
+
/** Elemento alvo (elemento que abre o menu ao clicar com botão direito) */
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
/** Se está desabilitado */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Tamanho do menu */
|
|
33
|
+
size?: MantineSize;
|
|
34
|
+
/** Largura do menu */
|
|
35
|
+
width?: number | string;
|
|
36
|
+
/** Se deve mostrar sombra */
|
|
37
|
+
shadow?: MantineSize;
|
|
38
|
+
/** Raio das bordas */
|
|
39
|
+
radius?: MantineSize;
|
|
40
|
+
/** Offset do menu */
|
|
41
|
+
offset?: number;
|
|
42
|
+
/** Classe CSS do menu */
|
|
43
|
+
menuClassName?: string;
|
|
44
|
+
/** Estilo do menu */
|
|
45
|
+
menuStyle?: React.CSSProperties;
|
|
46
|
+
/** Callback ao abrir */
|
|
47
|
+
onOpen?: () => void;
|
|
48
|
+
/** Callback ao fechar */
|
|
49
|
+
onClose?: () => void;
|
|
50
|
+
/** Classe CSS */
|
|
51
|
+
className?: string;
|
|
52
|
+
/** Estilo */
|
|
53
|
+
style?: React.CSSProperties;
|
|
54
|
+
}
|
|
55
|
+
export declare const ArchbaseContextMenu: React.ForwardRefExoticComponent<ArchbaseContextMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
export interface UseArchbaseContextMenuOptions {
|
|
57
|
+
items: ArchbaseContextMenuItem[];
|
|
58
|
+
onOpen?: () => void;
|
|
59
|
+
onClose?: () => void;
|
|
60
|
+
}
|
|
61
|
+
export interface UseArchbaseContextMenuReturn {
|
|
62
|
+
opened: boolean;
|
|
63
|
+
position: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
};
|
|
67
|
+
open: (event: ReactMouseEvent) => void;
|
|
68
|
+
close: () => void;
|
|
69
|
+
getHandlers: () => {
|
|
70
|
+
onContextMenu: (event: ReactMouseEvent) => void;
|
|
71
|
+
};
|
|
72
|
+
Menu: React.FC<{
|
|
73
|
+
children?: ReactNode;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
export declare function useArchbaseContextMenu(options: UseArchbaseContextMenuOptions): UseArchbaseContextMenuReturn;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface KeyboardShortcut {
|
|
3
|
+
/** Identificador único */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Combinação de teclas (formato Mantine: 'mod+K', 'shift+Enter', etc.) */
|
|
6
|
+
keys: string;
|
|
7
|
+
/** Handler do atalho */
|
|
8
|
+
handler: () => void;
|
|
9
|
+
/** Descrição do atalho */
|
|
10
|
+
description: string;
|
|
11
|
+
/** Grupo do atalho */
|
|
12
|
+
group?: string;
|
|
13
|
+
/** Se o atalho está desabilitado */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Escopo (global ou específico) */
|
|
16
|
+
scope?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ArchbaseKeyboardShortcutsContextValue {
|
|
19
|
+
/** Atalhos registrados */
|
|
20
|
+
shortcuts: KeyboardShortcut[];
|
|
21
|
+
/** Registrar um atalho */
|
|
22
|
+
registerShortcut: (shortcut: KeyboardShortcut) => void;
|
|
23
|
+
/** Remover um atalho */
|
|
24
|
+
unregisterShortcut: (id: string) => void;
|
|
25
|
+
/** Atualizar um atalho */
|
|
26
|
+
updateShortcut: (id: string, updates: Partial<KeyboardShortcut>) => void;
|
|
27
|
+
/** Abrir modal de ajuda */
|
|
28
|
+
openHelpModal: () => void;
|
|
29
|
+
/** Fechar modal de ajuda */
|
|
30
|
+
closeHelpModal: () => void;
|
|
31
|
+
/** Se o modal está aberto */
|
|
32
|
+
isHelpModalOpen: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ArchbaseKeyboardShortcutsProviderProps {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
/** Tecla para abrir o modal de ajuda (padrão: '?') */
|
|
37
|
+
helpKey?: string;
|
|
38
|
+
/** Desabilitar modal de ajuda */
|
|
39
|
+
disableHelpModal?: boolean;
|
|
40
|
+
/** Atalhos iniciais */
|
|
41
|
+
initialShortcuts?: Omit<KeyboardShortcut, 'id'>[];
|
|
42
|
+
}
|
|
43
|
+
export interface ArchbaseKeyboardShortcutsModalProps {
|
|
44
|
+
/** Se o modal está aberto */
|
|
45
|
+
opened: boolean;
|
|
46
|
+
/** Callback ao fechar */
|
|
47
|
+
onClose: () => void;
|
|
48
|
+
/** Atalhos a exibir */
|
|
49
|
+
shortcuts: KeyboardShortcut[];
|
|
50
|
+
/** Título do modal */
|
|
51
|
+
title?: string;
|
|
52
|
+
/** Mostrar campo de busca */
|
|
53
|
+
searchable?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface UseArchbaseRegisterShortcutOptions {
|
|
56
|
+
/** Descrição do atalho */
|
|
57
|
+
description: string;
|
|
58
|
+
/** Grupo do atalho */
|
|
59
|
+
group?: string;
|
|
60
|
+
/** Se o atalho está desabilitado */
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
/** Escopo do atalho */
|
|
63
|
+
scope?: string;
|
|
64
|
+
}
|
|
65
|
+
export declare function useArchbaseKeyboardShortcuts(): ArchbaseKeyboardShortcutsContextValue;
|
|
66
|
+
export declare function ArchbaseKeyboardShortcutsProvider({ children, helpKey, disableHelpModal, initialShortcuts, }: ArchbaseKeyboardShortcutsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export declare function ArchbaseKeyboardShortcutsModal({ opened, onClose, shortcuts, title, searchable, }: ArchbaseKeyboardShortcutsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
export declare function useArchbaseRegisterShortcut(keys: string, handler: () => void, options: UseArchbaseRegisterShortcutOptions): void;
|
|
69
|
+
export interface UseArchbaseShortcutScopeReturn {
|
|
70
|
+
/** Registrar atalho no escopo */
|
|
71
|
+
register: (keys: string, handler: () => void, description: string, group?: string) => () => void;
|
|
72
|
+
/** Desabilitar todos os atalhos do escopo */
|
|
73
|
+
disable: () => void;
|
|
74
|
+
/** Habilitar todos os atalhos do escopo */
|
|
75
|
+
enable: () => void;
|
|
76
|
+
}
|
|
77
|
+
export declare function useArchbaseShortcutScope(scope: string): UseArchbaseShortcutScopeReturn;
|
|
78
|
+
export interface ArchbaseShortcutHintProps {
|
|
79
|
+
/** Combinação de teclas */
|
|
80
|
+
keys: string;
|
|
81
|
+
/** Tamanho */
|
|
82
|
+
size?: 'xs' | 'sm' | 'md';
|
|
83
|
+
}
|
|
84
|
+
export declare function ArchbaseShortcutHint({ keys, size }: ArchbaseShortcutHintProps): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
export default ArchbaseKeyboardShortcutsProvider;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightAction {
|
|
3
|
+
/** ID único da ação */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Título da ação */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Descrição opcional */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Ícone */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** Grupo/categoria */
|
|
12
|
+
group?: string;
|
|
13
|
+
/** Atalho de teclado */
|
|
14
|
+
shortcut?: string[];
|
|
15
|
+
/** Callback ao selecionar */
|
|
16
|
+
onTrigger: () => void;
|
|
17
|
+
/** Desabilitado */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Palavras-chave para busca */
|
|
20
|
+
keywords?: string[];
|
|
21
|
+
/** Badge */
|
|
22
|
+
badge?: string;
|
|
23
|
+
/** Cor do badge */
|
|
24
|
+
badgeColor?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ArchbaseSpotlightProps {
|
|
27
|
+
/** Array de ações */
|
|
28
|
+
actions: SpotlightAction[];
|
|
29
|
+
/** Atalho para abrir (padrão: mod+K) */
|
|
30
|
+
shortcut?: string;
|
|
31
|
+
/** Placeholder da busca */
|
|
32
|
+
searchPlaceholder?: string;
|
|
33
|
+
/** Mensagem quando não encontra resultados */
|
|
34
|
+
nothingFoundMessage?: string;
|
|
35
|
+
/** Limite de resultados exibidos */
|
|
36
|
+
limit?: number;
|
|
37
|
+
/** Filtrar ações por permissão */
|
|
38
|
+
filterByPermission?: (action: SpotlightAction) => boolean;
|
|
39
|
+
/** Agrupar ações */
|
|
40
|
+
groupActions?: boolean;
|
|
41
|
+
/** Loading state */
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
/** Aberto (controlado) */
|
|
44
|
+
opened?: boolean;
|
|
45
|
+
/** Callback ao mudar estado */
|
|
46
|
+
onOpenChange?: (opened: boolean) => void;
|
|
47
|
+
/** Fechar ao selecionar ação */
|
|
48
|
+
closeOnActionTrigger?: boolean;
|
|
49
|
+
/** Destacar match na busca */
|
|
50
|
+
highlightQuery?: boolean;
|
|
51
|
+
/** Ações recentes */
|
|
52
|
+
recentActions?: string[];
|
|
53
|
+
/** Callback ao usar ação (para rastrear recentes) */
|
|
54
|
+
onActionUsed?: (actionId: string) => void;
|
|
55
|
+
/** Máximo de ações recentes */
|
|
56
|
+
maxRecentActions?: number;
|
|
57
|
+
}
|
|
58
|
+
export declare function ArchbaseSpotlight({ actions, shortcut, searchPlaceholder, nothingFoundMessage, limit, filterByPermission, groupActions, loading, opened: controlledOpened, onOpenChange, closeOnActionTrigger, highlightQuery, recentActions, onActionUsed, maxRecentActions, }: ArchbaseSpotlightProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export interface UseArchbaseSpotlightOptions {
|
|
60
|
+
shortcut?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function useArchbaseSpotlight(options?: UseArchbaseSpotlightOptions): {
|
|
63
|
+
opened: boolean;
|
|
64
|
+
open: () => void;
|
|
65
|
+
close: () => void;
|
|
66
|
+
toggle: () => void;
|
|
67
|
+
setOpened: React.Dispatch<React.SetStateAction<boolean>>;
|
|
68
|
+
};
|
|
69
|
+
export default ArchbaseSpotlight;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
export { NavLink as ArchbaseNavLink } from '@mantine/core';
|
|
2
2
|
export { Breadcrumbs as ArchbaseBreadcrumbs } from '@mantine/core';
|
|
3
3
|
export { Pagination as ArchbasePagination } from '@mantine/core';
|
|
4
|
+
export { ArchbaseContextMenu, useArchbaseContextMenu } from './ArchbaseContextMenu';
|
|
5
|
+
export type { ArchbaseContextMenuProps, ArchbaseContextMenuItem, UseArchbaseContextMenuOptions, UseArchbaseContextMenuReturn, } from './ArchbaseContextMenu';
|
|
6
|
+
export { ArchbaseActionSheet, useArchbaseActionSheet } from './ArchbaseActionSheet';
|
|
7
|
+
export type { ArchbaseActionSheetProps, ArchbaseActionSheetItem, UseArchbaseActionSheetOptions, UseArchbaseActionSheetReturn, } from './ArchbaseActionSheet';
|
|
8
|
+
export { ArchbaseBottomNavigation } from './ArchbaseBottomNavigation';
|
|
9
|
+
export type { ArchbaseBottomNavigationProps, ArchbaseBottomNavigationItem } from './ArchbaseBottomNavigation';
|
|
10
|
+
export { ArchbaseAppBar } from './ArchbaseAppBar';
|
|
11
|
+
export type { ArchbaseAppBarProps, ArchbaseAppBarAction } from './ArchbaseAppBar';
|
|
12
|
+
export { ArchbaseSpotlight, useArchbaseSpotlight } from './ArchbaseSpotlight';
|
|
13
|
+
export type { ArchbaseSpotlightProps, SpotlightAction, UseArchbaseSpotlightOptions, } from './ArchbaseSpotlight';
|
|
14
|
+
export { ArchbaseKeyboardShortcutsProvider, ArchbaseKeyboardShortcutsModal, ArchbaseShortcutHint, useArchbaseKeyboardShortcuts, useArchbaseRegisterShortcut, useArchbaseShortcutScope, } from './ArchbaseKeyboardShortcuts';
|
|
15
|
+
export type { KeyboardShortcut, ArchbaseKeyboardShortcutsContextValue, ArchbaseKeyboardShortcutsProviderProps, ArchbaseKeyboardShortcutsModalProps, UseArchbaseRegisterShortcutOptions, UseArchbaseShortcutScopeReturn, ArchbaseShortcutHintProps, } from './ArchbaseKeyboardShortcuts';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { MantineSize, FloatingPosition } from '@mantine/core';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
export interface ArchbaseNotificationItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
type?: 'info' | 'success' | 'warning' | 'error';
|
|
8
|
+
read: boolean;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
action?: {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
};
|
|
15
|
+
metadata?: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
export interface ArchbaseNotificationCenterProps {
|
|
18
|
+
/** Lista de notificacoes a exibir */
|
|
19
|
+
notifications: ArchbaseNotificationItem[];
|
|
20
|
+
/** Callback ao marcar uma notificacao como lida */
|
|
21
|
+
onMarkAsRead?: (id: string) => void;
|
|
22
|
+
/** Callback ao marcar todas como lidas */
|
|
23
|
+
onMarkAllAsRead?: () => void;
|
|
24
|
+
/** Callback ao remover uma notificacao */
|
|
25
|
+
onRemove?: (id: string) => void;
|
|
26
|
+
/** Callback ao limpar todas as notificacoes */
|
|
27
|
+
onClearAll?: () => void;
|
|
28
|
+
/** Callback ao clicar em uma notificacao */
|
|
29
|
+
onClick?: (notification: ArchbaseNotificationItem) => void;
|
|
30
|
+
/** Modo de renderizacao: popover ou drawer */
|
|
31
|
+
renderAs?: 'drawer' | 'popover';
|
|
32
|
+
/** Posicao do popover (ignorado no modo drawer) */
|
|
33
|
+
position?: FloatingPosition;
|
|
34
|
+
/** Largura do painel */
|
|
35
|
+
width?: number;
|
|
36
|
+
/** Altura maxima da area de scroll */
|
|
37
|
+
maxHeight?: number;
|
|
38
|
+
/** Titulo do painel */
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Mensagem quando nao ha notificacoes */
|
|
41
|
+
emptyMessage?: string;
|
|
42
|
+
/** Mostrar badge com contagem de nao-lidas */
|
|
43
|
+
showBadge?: boolean;
|
|
44
|
+
/** Tamanho do botao */
|
|
45
|
+
buttonSize?: MantineSize;
|
|
46
|
+
/** Variante do botao */
|
|
47
|
+
buttonVariant?: string;
|
|
48
|
+
/** Estilo customizado do wrapper */
|
|
49
|
+
style?: CSSProperties;
|
|
50
|
+
/** Classe CSS customizada */
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function ArchbaseNotificationCenter(props: ArchbaseNotificationCenterProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare namespace ArchbaseNotificationCenter {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
@@ -2,3 +2,5 @@ export { ArchbaseNotifications } from './ArchbaseNotifications';
|
|
|
2
2
|
export { ArchbaseAlert } from './ArchbaseAlert';
|
|
3
3
|
export type { ArchbaseAlertProps } from './ArchbaseAlert';
|
|
4
4
|
export { ArchbaseDialog, CustomShowErrorModal } from './ArchbaseDialog';
|
|
5
|
+
export { ArchbaseNotificationCenter } from './ArchbaseNotificationCenter';
|
|
6
|
+
export type { ArchbaseNotificationCenterProps, ArchbaseNotificationItem } from './ArchbaseNotificationCenter';
|