@archbase/components 3.0.25 → 4.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/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,55 @@
|
|
|
1
|
+
import { MantineSize } from '@mantine/core';
|
|
2
|
+
import { CSSProperties, FocusEventHandler, default as React } from 'react';
|
|
3
|
+
import { IArchbaseDataSourceBase } from '@archbase/data';
|
|
4
|
+
export interface ArchbaseTagInputProps<T, ID> {
|
|
5
|
+
/** Fonte de dados onde sera atribuido o valor das tags (V1 ou V2) */
|
|
6
|
+
dataSource?: IArchbaseDataSourceBase<T>;
|
|
7
|
+
/** Campo onde devera ser atribuido o valor das tags na fonte de dados */
|
|
8
|
+
dataField?: string;
|
|
9
|
+
/** Valor controlado (array de strings) quando usado sem dataSource */
|
|
10
|
+
value?: string[];
|
|
11
|
+
/** Valor padrao inicial (array de strings) */
|
|
12
|
+
defaultValue?: string[];
|
|
13
|
+
/** Delimitador usado para serializar/deserializar quando o campo no dataSource e uma string. Padrao: ',' */
|
|
14
|
+
delimiter?: string;
|
|
15
|
+
/** Titulo do campo */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Descricao do campo */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Ultimo erro ocorrido no campo */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** Texto sugestao do campo */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/** Indicador se o preenchimento e obrigatorio */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/** Indicador se o campo esta desabilitado */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Indicador se o campo e somente leitura. Obs: usado em conjunto com o status da fonte de dados */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** Lista de caracteres que, ao serem digitados, criam uma nova tag. Ex: [',', ' ', 'Enter'] */
|
|
30
|
+
separators?: string[];
|
|
31
|
+
/** Numero maximo de tags permitidas */
|
|
32
|
+
maxTags?: number;
|
|
33
|
+
/** Permite tags duplicadas */
|
|
34
|
+
allowDuplicates?: boolean;
|
|
35
|
+
/** Evento quando o valor das tags e alterado */
|
|
36
|
+
onChangeValue?: (value: string[], event?: any) => void;
|
|
37
|
+
/** Evento quando o campo recebe o foco */
|
|
38
|
+
onFocusEnter?: FocusEventHandler<HTMLInputElement>;
|
|
39
|
+
/** Evento quando o foco sai do campo */
|
|
40
|
+
onFocusExit?: FocusEventHandler<HTMLInputElement>;
|
|
41
|
+
/** Referencia para o componente interno */
|
|
42
|
+
innerRef?: React.RefObject<HTMLInputElement>;
|
|
43
|
+
/** Estilo do campo */
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
/** Classe CSS adicional */
|
|
46
|
+
className?: string;
|
|
47
|
+
/** Largura do campo */
|
|
48
|
+
width?: string | number;
|
|
49
|
+
/** Tamanho do campo (Mantine size) */
|
|
50
|
+
size?: MantineSize;
|
|
51
|
+
}
|
|
52
|
+
export declare function ArchbaseTagInput<T, ID>({ dataSource, dataField, value: valueProp, defaultValue, delimiter, label, description, error, placeholder, required, disabled, readOnly, separators, maxTags, allowDuplicates, onChangeValue, onFocusEnter, onFocusExit, innerRef, style, className, width, size, }: ArchbaseTagInputProps<T, ID>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare namespace ArchbaseTagInput {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
package/dist/editors/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export type { ArchbaseChipItemProps } from './ArchbaseChipItem';
|
|
|
17
17
|
export { ArchbaseChipItem } from './ArchbaseChipItem';
|
|
18
18
|
export type { ArchbaseColorPickerProps } from './ArchbaseColorPicker';
|
|
19
19
|
export { ArchbaseColorPicker } from './ArchbaseColorPicker';
|
|
20
|
+
export { ArchbaseDualListbox } from './ArchbaseDualListbox';
|
|
21
|
+
export type { ArchbaseDualListboxProps, ArchbaseDualListboxOption } from './ArchbaseDualListbox';
|
|
20
22
|
export type { ArchbaseDatePickerRangeProps } from './ArchbaseDatePickerRange';
|
|
21
23
|
export { ArchbaseDatePickerRange } from './ArchbaseDatePickerRange';
|
|
22
24
|
export type { ArchbaseDateTimePickerEditProps, } from './ArchbaseDateTimePickerEdit';
|
|
@@ -79,3 +81,41 @@ export { ArchbaseTimeEdit } from './ArchbaseTimeEdit';
|
|
|
79
81
|
export type { ArchbaseTimeEditProps } from './ArchbaseTimeEdit';
|
|
80
82
|
export { ArchbaseAvatarEdit } from './ArchbaseAvatarEdit';
|
|
81
83
|
export type { ArchbaseAvatarEditProps } from './ArchbaseAvatarEdit';
|
|
84
|
+
export { ArchbaseTagInput } from './ArchbaseTagInput';
|
|
85
|
+
export type { ArchbaseTagInputProps } from './ArchbaseTagInput';
|
|
86
|
+
export { ArchbasePhoneInput } from './ArchbasePhoneInput';
|
|
87
|
+
export type { ArchbasePhoneInputProps } from './ArchbasePhoneInput';
|
|
88
|
+
export { ArchbaseMultiEmail } from './ArchbaseMultiEmail';
|
|
89
|
+
export type { ArchbaseMultiEmailProps } from './ArchbaseMultiEmail';
|
|
90
|
+
export { ArchbaseMentionInput } from './ArchbaseMentionInput';
|
|
91
|
+
export type { ArchbaseMentionInputProps, ArchbaseMentionConfig } from './ArchbaseMentionInput';
|
|
92
|
+
export { ArchbaseSignaturePad } from './ArchbaseSignaturePad';
|
|
93
|
+
export type { ArchbaseSignaturePadProps } from './ArchbaseSignaturePad';
|
|
94
|
+
export { ArchbaseBarcodeScanner } from './ArchbaseBarcodeScanner';
|
|
95
|
+
export type { ArchbaseBarcodeScannerProps } from './ArchbaseBarcodeScanner';
|
|
96
|
+
export { ArchbaseSpreadsheet } from './ArchbaseSpreadsheet';
|
|
97
|
+
export type { ArchbaseSpreadsheetProps, ArchbaseColumnDef, ArchbaseColumnType } from './ArchbaseSpreadsheet';
|
|
98
|
+
export { ArchbaseLightGrid } from './ArchbaseLightGrid';
|
|
99
|
+
export type { ArchbaseLightGridProps, ArchbaseLightGridColumn } from './ArchbaseLightGrid';
|
|
100
|
+
export { ArchbaseCurrencyInput } from './ArchbaseCurrencyInput';
|
|
101
|
+
export type { ArchbaseCurrencyInputProps, CurrencyCode } from './ArchbaseCurrencyInput';
|
|
102
|
+
export { ArchbaseCpfCnpjInput, validateCPF, validateCNPJ, formatCPF, formatCNPJ, detectDocumentType } from './ArchbaseCpfCnpjInput';
|
|
103
|
+
export type { ArchbaseCpfCnpjInputProps, DocumentType } from './ArchbaseCpfCnpjInput';
|
|
104
|
+
export { ArchbaseCepInput, formatCep } from './ArchbaseCepInput';
|
|
105
|
+
export type { ArchbaseCepInputProps, CepAddress } from './ArchbaseCepInput';
|
|
106
|
+
export { ArchbaseOTPInput } from './ArchbaseOTPInput';
|
|
107
|
+
export type { ArchbaseOTPInputProps } from './ArchbaseOTPInput';
|
|
108
|
+
export { ArchbaseRangeSlider } from './ArchbaseRangeSlider';
|
|
109
|
+
export type { ArchbaseRangeSliderProps, RangeValue } from './ArchbaseRangeSlider';
|
|
110
|
+
export { ArchbaseInPlaceEditor } from './ArchbaseInPlaceEditor';
|
|
111
|
+
export type { ArchbaseInPlaceEditorProps, InPlaceEditorType, SelectOption } from './ArchbaseInPlaceEditor';
|
|
112
|
+
export { ArchbaseNumberStepper } from './ArchbaseNumberStepper';
|
|
113
|
+
export type { ArchbaseNumberStepperProps } from './ArchbaseNumberStepper';
|
|
114
|
+
export { ArchbaseAIPromptInput, useArchbasePromptHistory } from './ArchbaseAIPromptInput';
|
|
115
|
+
export type { ArchbaseAIPromptInputProps, ArchbaseAIPromptSuggestion, UseArchbasePromptHistoryOptions, UseArchbasePromptHistoryReturn, } from './ArchbaseAIPromptInput';
|
|
116
|
+
export { ArchbaseColorGradientPicker, ArchbaseFlatColorPicker } from './ArchbaseColorGradientPicker';
|
|
117
|
+
export type { ArchbaseColorGradientPickerProps, ArchbaseFlatColorPickerProps, ArchbaseColorFormat, } from './ArchbaseColorGradientPicker';
|
|
118
|
+
export { useArchbaseSpeechToText, ArchbaseSpeechToTextButton, ArchbaseSpeechToTextInput, ArchbaseSpeechToTextArea, } from './ArchbaseSpeechToTextInput';
|
|
119
|
+
export type { UseArchbaseSpeechToTextOptions, UseArchbaseSpeechToTextReturn, ArchbaseSpeechToTextButtonProps, ArchbaseSpeechToTextInputProps, ArchbaseSpeechToTextAreaProps, } from './ArchbaseSpeechToTextInput';
|
|
120
|
+
export { ArchbaseMultiViewCalendar, ArchbaseMultiViewCalendarWithPresets, ArchbaseDateRangeQuickPicker, defaultDatePresets, createDatePreset, } from './ArchbaseMultiViewCalendar';
|
|
121
|
+
export type { ArchbaseMultiViewCalendarProps, ArchbaseMultiViewCalendarWithPresetsProps, ArchbaseDateRangeQuickPickerProps, DateRangePreset, } from './ArchbaseMultiViewCalendar';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseChunkProgressBarProps {
|
|
4
|
+
/** Valor atual (0-100) */
|
|
5
|
+
value: number;
|
|
6
|
+
/** Quantidade de chunks */
|
|
7
|
+
chunkCount?: number;
|
|
8
|
+
/** Gap entre os chunks em pixels */
|
|
9
|
+
gap?: number;
|
|
10
|
+
/** Cor dos chunks incompletos */
|
|
11
|
+
color?: MantineColor;
|
|
12
|
+
/** Cor dos chunks completos */
|
|
13
|
+
completedColor?: MantineColor;
|
|
14
|
+
/** Se deve animar os chunks */
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
/** Se deve ter listras */
|
|
17
|
+
striped?: boolean;
|
|
18
|
+
/** Tamanho da barra */
|
|
19
|
+
size?: MantineSize | number;
|
|
20
|
+
/** Raio da barra */
|
|
21
|
+
radius?: MantineSize | number;
|
|
22
|
+
/** Label opcional */
|
|
23
|
+
label?: string;
|
|
24
|
+
/** Se deve mostrar o percentual */
|
|
25
|
+
showPercentage?: boolean;
|
|
26
|
+
/** Formato do percentual */
|
|
27
|
+
percentageFormat?: (value: number) => string;
|
|
28
|
+
/** Largura */
|
|
29
|
+
width?: number | string;
|
|
30
|
+
/** Classe CSS */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Estilo */
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
}
|
|
35
|
+
export declare const ArchbaseChunkProgressBar: React.ForwardRefExoticComponent<ArchbaseChunkProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React, ReactNode, MouseEvent, CSSProperties } from 'react';
|
|
2
|
+
import { MantineColor } from '@mantine/core';
|
|
3
|
+
interface RippleItem {
|
|
4
|
+
id: number;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
size: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ArchbaseRippleProps {
|
|
10
|
+
/** Conteúdo a ser envolvido */
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/** Cor do ripple */
|
|
13
|
+
color?: MantineColor;
|
|
14
|
+
/** Opacidade do ripple */
|
|
15
|
+
opacity?: number;
|
|
16
|
+
/** Duração da animação em ms */
|
|
17
|
+
duration?: number;
|
|
18
|
+
/** Se o ripple deve ser centralizado */
|
|
19
|
+
centered?: boolean;
|
|
20
|
+
/** Se está desabilitado */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Se deve cobrir todo o elemento */
|
|
23
|
+
unbounded?: boolean;
|
|
24
|
+
/** Classe CSS */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Estilo */
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
export declare const ArchbaseRipple: React.ForwardRefExoticComponent<ArchbaseRippleProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export interface UseArchbaseRippleOptions {
|
|
31
|
+
color?: MantineColor;
|
|
32
|
+
opacity?: number;
|
|
33
|
+
duration?: number;
|
|
34
|
+
centered?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface UseArchbaseRippleReturn {
|
|
38
|
+
ripples: RippleItem[];
|
|
39
|
+
handleClick: (event: MouseEvent<HTMLElement>) => void;
|
|
40
|
+
RippleContainer: React.FC;
|
|
41
|
+
}
|
|
42
|
+
export declare function useArchbaseRipple(options?: UseArchbaseRippleOptions): UseArchbaseRippleReturn;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MantineRadius } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseDataGridSkeletonProps {
|
|
4
|
+
/** Número de linhas */
|
|
5
|
+
rows?: number;
|
|
6
|
+
/** Número de colunas */
|
|
7
|
+
columns?: number;
|
|
8
|
+
/** Se deve mostrar header */
|
|
9
|
+
showHeader?: boolean;
|
|
10
|
+
/** Altura da linha */
|
|
11
|
+
rowHeight?: number;
|
|
12
|
+
/** Espaçamento entre linhas */
|
|
13
|
+
gap?: number;
|
|
14
|
+
/** Raio das bordas */
|
|
15
|
+
radius?: MantineRadius;
|
|
16
|
+
/** Se deve animar */
|
|
17
|
+
animate?: boolean;
|
|
18
|
+
/** Classe CSS */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Estilo */
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
export declare const ArchbaseDataGridSkeleton: React.ForwardRefExoticComponent<ArchbaseDataGridSkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export interface ArchbaseFormSkeletonProps {
|
|
25
|
+
/** Número de campos */
|
|
26
|
+
fields?: number;
|
|
27
|
+
/** Número de colunas do form */
|
|
28
|
+
columns?: number;
|
|
29
|
+
/** Se deve mostrar labels */
|
|
30
|
+
showLabels?: boolean;
|
|
31
|
+
/** Altura do input */
|
|
32
|
+
inputHeight?: number;
|
|
33
|
+
/** Altura do label */
|
|
34
|
+
labelHeight?: number;
|
|
35
|
+
/** Espaçamento */
|
|
36
|
+
gap?: number;
|
|
37
|
+
/** Raio das bordas */
|
|
38
|
+
radius?: MantineRadius;
|
|
39
|
+
/** Se deve animar */
|
|
40
|
+
animate?: boolean;
|
|
41
|
+
/** Se deve mostrar botões de ação */
|
|
42
|
+
showActions?: boolean;
|
|
43
|
+
/** Classe CSS */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Estilo */
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
}
|
|
48
|
+
export declare const ArchbaseFormSkeleton: React.ForwardRefExoticComponent<ArchbaseFormSkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
export interface ArchbaseCardSkeletonProps {
|
|
50
|
+
/** Se deve mostrar avatar */
|
|
51
|
+
showAvatar?: boolean;
|
|
52
|
+
/** Tamanho do avatar */
|
|
53
|
+
avatarSize?: number;
|
|
54
|
+
/** Número de linhas de texto */
|
|
55
|
+
lines?: number;
|
|
56
|
+
/** Se deve mostrar imagem no topo */
|
|
57
|
+
showImage?: boolean;
|
|
58
|
+
/** Altura da imagem */
|
|
59
|
+
imageHeight?: number;
|
|
60
|
+
/** Se deve mostrar ações */
|
|
61
|
+
showActions?: boolean;
|
|
62
|
+
/** Raio das bordas */
|
|
63
|
+
radius?: MantineRadius;
|
|
64
|
+
/** Se deve animar */
|
|
65
|
+
animate?: boolean;
|
|
66
|
+
/** Classe CSS */
|
|
67
|
+
className?: string;
|
|
68
|
+
/** Estilo */
|
|
69
|
+
style?: React.CSSProperties;
|
|
70
|
+
}
|
|
71
|
+
export declare const ArchbaseCardSkeleton: React.ForwardRefExoticComponent<ArchbaseCardSkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
export interface ArchbaseKanbanSkeletonProps {
|
|
73
|
+
/** Número de colunas */
|
|
74
|
+
columns?: number;
|
|
75
|
+
/** Número de cards por coluna */
|
|
76
|
+
cardsPerColumn?: number;
|
|
77
|
+
/** Largura da coluna */
|
|
78
|
+
columnWidth?: number;
|
|
79
|
+
/** Altura do card */
|
|
80
|
+
cardHeight?: number;
|
|
81
|
+
/** Espaçamento */
|
|
82
|
+
gap?: number;
|
|
83
|
+
/** Raio das bordas */
|
|
84
|
+
radius?: MantineRadius;
|
|
85
|
+
/** Se deve animar */
|
|
86
|
+
animate?: boolean;
|
|
87
|
+
/** Classe CSS */
|
|
88
|
+
className?: string;
|
|
89
|
+
/** Estilo */
|
|
90
|
+
style?: React.CSSProperties;
|
|
91
|
+
}
|
|
92
|
+
export declare const ArchbaseKanbanSkeleton: React.ForwardRefExoticComponent<ArchbaseKanbanSkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
93
|
+
export interface ArchbaseListSkeletonProps {
|
|
94
|
+
/** Número de itens */
|
|
95
|
+
items?: number;
|
|
96
|
+
/** Se deve mostrar avatar */
|
|
97
|
+
showAvatar?: boolean;
|
|
98
|
+
/** Tamanho do avatar */
|
|
99
|
+
avatarSize?: number;
|
|
100
|
+
/** Se deve mostrar descrição */
|
|
101
|
+
showDescription?: boolean;
|
|
102
|
+
/** Se deve mostrar ação à direita */
|
|
103
|
+
showAction?: boolean;
|
|
104
|
+
/** Espaçamento */
|
|
105
|
+
gap?: number;
|
|
106
|
+
/** Raio das bordas */
|
|
107
|
+
radius?: MantineRadius;
|
|
108
|
+
/** Se deve animar */
|
|
109
|
+
animate?: boolean;
|
|
110
|
+
/** Classe CSS */
|
|
111
|
+
className?: string;
|
|
112
|
+
/** Estilo */
|
|
113
|
+
style?: React.CSSProperties;
|
|
114
|
+
}
|
|
115
|
+
export declare const ArchbaseListSkeleton: React.ForwardRefExoticComponent<ArchbaseListSkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/feedback/index.d.ts
CHANGED
|
@@ -2,3 +2,9 @@ export { Alert as ArchbaseMantineAlert } from '@mantine/core';
|
|
|
2
2
|
export { Notification as ArchbaseNotification } from '@mantine/core';
|
|
3
3
|
export { Loader as ArchbaseLoader } from '@mantine/core';
|
|
4
4
|
export { Progress as ArchbaseProgress } from '@mantine/core';
|
|
5
|
+
export { ArchbaseChunkProgressBar } from './ArchbaseChunkProgressBar';
|
|
6
|
+
export type { ArchbaseChunkProgressBarProps } from './ArchbaseChunkProgressBar';
|
|
7
|
+
export { ArchbaseDataGridSkeleton, ArchbaseFormSkeleton, ArchbaseCardSkeleton, ArchbaseKanbanSkeleton, ArchbaseListSkeleton, } from './ArchbaseSkeleton';
|
|
8
|
+
export type { ArchbaseDataGridSkeletonProps, ArchbaseFormSkeletonProps, ArchbaseCardSkeletonProps, ArchbaseKanbanSkeletonProps, ArchbaseListSkeletonProps, } from './ArchbaseSkeleton';
|
|
9
|
+
export { ArchbaseRipple, useArchbaseRipple } from './ArchbaseRipple';
|
|
10
|
+
export type { ArchbaseRippleProps, UseArchbaseRippleOptions, UseArchbaseRippleReturn } from './ArchbaseRipple';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ArchbaseColumnItem {
|
|
3
|
+
field: string;
|
|
4
|
+
label: string;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
order?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ArchbaseColumnSelectorProps {
|
|
9
|
+
/** Lista de colunas com configuração de visibilidade e ordem */
|
|
10
|
+
columns: ArchbaseColumnItem[];
|
|
11
|
+
/** Callback chamado quando a configuração de colunas muda */
|
|
12
|
+
onChange: (columns: Array<{
|
|
13
|
+
field: string;
|
|
14
|
+
label: string;
|
|
15
|
+
visible: boolean;
|
|
16
|
+
order: number;
|
|
17
|
+
}>) => void;
|
|
18
|
+
/** Rótulo exibido no topo do componente */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Descrição exibida abaixo do rótulo */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Exibir campo de busca */
|
|
23
|
+
showSearch?: boolean;
|
|
24
|
+
/** Exibir botões Selecionar Todos / Desmarcar Todos */
|
|
25
|
+
showSelectAll?: boolean;
|
|
26
|
+
/** Altura máxima da lista de colunas */
|
|
27
|
+
maxHeight?: number;
|
|
28
|
+
/** Estilos inline */
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
/** Classe CSS */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Largura do componente */
|
|
33
|
+
width?: number | string;
|
|
34
|
+
}
|
|
35
|
+
export declare function ArchbaseColumnSelector({ columns, onChange, label, description, showSearch, showSelectAll, maxHeight, style, className, width, }: ArchbaseColumnSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare namespace ArchbaseColumnSelector {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
package/dist/filters/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { ArchbaseCompositeFilters } from './ArchbaseCompositeFilters';
|
|
2
|
+
export { ArchbaseColumnSelector } from './ArchbaseColumnSelector';
|
|
3
|
+
export type { ArchbaseColumnSelectorProps, ArchbaseColumnItem } from './ArchbaseColumnSelector';
|
|
2
4
|
export { FilterPill } from './components/FilterPill';
|
|
3
5
|
export { useArchbaseFilters, useArchbaseFiltersControlled, } from './hooks/useArchbaseFilters';
|
|
4
6
|
export { useArchbaseFilterPresets } from './hooks/useArchbaseFilterPresets';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
import { UseFieldArrayReturn, Control, FieldValues, ArrayPath, FieldArrayWithId } from 'react-hook-form';
|
|
4
|
+
export interface ArchbaseFieldArrayItemProps<T extends FieldValues> {
|
|
5
|
+
/** Índice do item */
|
|
6
|
+
index: number;
|
|
7
|
+
/** Dados do item */
|
|
8
|
+
item: FieldArrayWithId<T>;
|
|
9
|
+
/** Função para remover o item */
|
|
10
|
+
remove: () => void;
|
|
11
|
+
/** Se pode remover (baseado em minItems) */
|
|
12
|
+
canRemove: boolean;
|
|
13
|
+
/** Se pode arrastar */
|
|
14
|
+
canDrag: boolean;
|
|
15
|
+
/** Props de drag handle */
|
|
16
|
+
dragHandleProps?: Record<string, any>;
|
|
17
|
+
}
|
|
18
|
+
export interface ArchbaseFieldArrayProps<T extends FieldValues> {
|
|
19
|
+
/** Nome do campo no form */
|
|
20
|
+
name: ArrayPath<T>;
|
|
21
|
+
/** Control do react-hook-form */
|
|
22
|
+
control: Control<T>;
|
|
23
|
+
/** Renderizador do item */
|
|
24
|
+
renderItem: (props: ArchbaseFieldArrayItemProps<T>) => ReactNode;
|
|
25
|
+
/** Valor padrão para novos itens */
|
|
26
|
+
defaultValue?: Record<string, any>;
|
|
27
|
+
/** Mínimo de itens */
|
|
28
|
+
minItems?: number;
|
|
29
|
+
/** Máximo de itens */
|
|
30
|
+
maxItems?: number;
|
|
31
|
+
/** Label do botão adicionar */
|
|
32
|
+
addLabel?: string;
|
|
33
|
+
/** Componente de empty state */
|
|
34
|
+
emptyState?: ReactNode;
|
|
35
|
+
/** Se permite reordenar */
|
|
36
|
+
sortable?: boolean;
|
|
37
|
+
/** Se deve mostrar o header */
|
|
38
|
+
showHeader?: boolean;
|
|
39
|
+
/** Título do campo */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** Descrição do campo */
|
|
42
|
+
description?: string;
|
|
43
|
+
/** Cor do botão adicionar */
|
|
44
|
+
addButtonColor?: MantineColor;
|
|
45
|
+
/** Variante do botão adicionar */
|
|
46
|
+
addButtonVariant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default';
|
|
47
|
+
/** Tamanho */
|
|
48
|
+
size?: MantineSize;
|
|
49
|
+
/** Se deve usar Paper em volta de cada item */
|
|
50
|
+
withPaper?: boolean;
|
|
51
|
+
/** Se deve mostrar índice */
|
|
52
|
+
showIndex?: boolean;
|
|
53
|
+
/** Espaçamento entre itens */
|
|
54
|
+
gap?: MantineSize | number;
|
|
55
|
+
/** Se está desabilitado */
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/** Callback quando array muda */
|
|
58
|
+
onArrayChange?: (items: any[]) => void;
|
|
59
|
+
/** Classe CSS */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** Estilo */
|
|
62
|
+
style?: React.CSSProperties;
|
|
63
|
+
}
|
|
64
|
+
export declare const ArchbaseFieldArray: <T extends FieldValues>(props: ArchbaseFieldArrayProps<T> & {
|
|
65
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
66
|
+
}) => React.ReactElement;
|
|
67
|
+
export interface UseArchbaseFieldArrayOptions<T extends FieldValues> {
|
|
68
|
+
name: ArrayPath<T>;
|
|
69
|
+
control: Control<T>;
|
|
70
|
+
minItems?: number;
|
|
71
|
+
maxItems?: number;
|
|
72
|
+
defaultValue?: Record<string, any>;
|
|
73
|
+
}
|
|
74
|
+
export interface UseArchbaseFieldArrayReturn<T extends FieldValues> extends UseFieldArrayReturn<T> {
|
|
75
|
+
canAdd: boolean;
|
|
76
|
+
canRemove: boolean;
|
|
77
|
+
addItem: () => void;
|
|
78
|
+
removeItem: (index: number) => void;
|
|
79
|
+
}
|
|
80
|
+
export declare function useArchbaseFieldArray<T extends FieldValues>(options: UseArchbaseFieldArrayOptions<T>): UseArchbaseFieldArrayReturn<T>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
import { ArchbaseDataSource } from '@archbase/data';
|
|
4
|
+
import { FormWizardStep } from './useArchbaseFormWizard';
|
|
5
|
+
export interface ArchbaseFormWizardStep<T = any> extends FormWizardStep<T> {
|
|
6
|
+
/** Componente React a ser renderizado no step */
|
|
7
|
+
component: ReactNode | ((props: {
|
|
8
|
+
data: T;
|
|
9
|
+
stepIndex: number;
|
|
10
|
+
}) => ReactNode);
|
|
11
|
+
}
|
|
12
|
+
export interface ArchbaseFormWizardProps<T extends object, ID = string> {
|
|
13
|
+
/** Lista de steps do wizard */
|
|
14
|
+
steps: ArchbaseFormWizardStep<T>[];
|
|
15
|
+
/** DataSource vinculado ao formulário */
|
|
16
|
+
dataSource?: ArchbaseDataSource<T, ID>;
|
|
17
|
+
/** Step inicial */
|
|
18
|
+
initialStep?: number;
|
|
19
|
+
/** Callback ao completar todos os steps */
|
|
20
|
+
onComplete?: (data: T) => void | Promise<void>;
|
|
21
|
+
/** Callback ao mudar de step */
|
|
22
|
+
onStepChange?: (fromStep: number, toStep: number, data: T) => void;
|
|
23
|
+
/** Se deve validar ao avançar */
|
|
24
|
+
validateOnNext?: boolean;
|
|
25
|
+
/** Se permite voltar para steps anteriores */
|
|
26
|
+
allowBack?: boolean;
|
|
27
|
+
/** Se permite clicar nos steps para navegar */
|
|
28
|
+
allowStepClick?: boolean;
|
|
29
|
+
/** Orientação do stepper */
|
|
30
|
+
orientation?: 'horizontal' | 'vertical';
|
|
31
|
+
/** Tamanho do stepper */
|
|
32
|
+
size?: MantineSize;
|
|
33
|
+
/** Cor do stepper */
|
|
34
|
+
color?: MantineColor;
|
|
35
|
+
/** Label do botão anterior */
|
|
36
|
+
backLabel?: string;
|
|
37
|
+
/** Label do botão próximo */
|
|
38
|
+
nextLabel?: string;
|
|
39
|
+
/** Label do botão finalizar */
|
|
40
|
+
completeLabel?: string;
|
|
41
|
+
/** Ícone do botão anterior */
|
|
42
|
+
backIcon?: ReactNode;
|
|
43
|
+
/** Ícone do botão próximo */
|
|
44
|
+
nextIcon?: ReactNode;
|
|
45
|
+
/** Ícone do botão finalizar */
|
|
46
|
+
completeIcon?: ReactNode;
|
|
47
|
+
/** Se deve mostrar os botões de navegação */
|
|
48
|
+
showNavigation?: boolean;
|
|
49
|
+
/** Posição dos botões de navegação */
|
|
50
|
+
navigationPosition?: 'top' | 'bottom' | 'both';
|
|
51
|
+
/** Componente de revisão final (opcional) */
|
|
52
|
+
reviewComponent?: ReactNode | ((props: {
|
|
53
|
+
data: T;
|
|
54
|
+
}) => ReactNode);
|
|
55
|
+
/** Componente de conclusão */
|
|
56
|
+
completedComponent?: ReactNode | ((props: {
|
|
57
|
+
data: T;
|
|
58
|
+
onReset: () => void;
|
|
59
|
+
}) => ReactNode);
|
|
60
|
+
/** Se deve mostrar o step de revisão */
|
|
61
|
+
showReviewStep?: boolean;
|
|
62
|
+
/** Padding do conteúdo */
|
|
63
|
+
contentPadding?: number | string;
|
|
64
|
+
/** Altura mínima do conteúdo */
|
|
65
|
+
contentMinHeight?: number | string;
|
|
66
|
+
/** Classe CSS adicional */
|
|
67
|
+
className?: string;
|
|
68
|
+
/** Estilos adicionais */
|
|
69
|
+
style?: React.CSSProperties;
|
|
70
|
+
}
|
|
71
|
+
export declare const ArchbaseFormWizard: <T extends object, ID = string>(props: ArchbaseFormWizardProps<T, ID> & {
|
|
72
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
73
|
+
}) => React.ReactElement;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { StepperProps, MantineColor, MantineSize } from '@mantine/core';
|
|
3
|
+
export interface ArchbaseStepperStep {
|
|
4
|
+
/** Identificador único do step */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Título do step */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Descrição do step */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Ícone do step */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Cor do step quando ativo */
|
|
13
|
+
color?: MantineColor;
|
|
14
|
+
/** Se o step pode ser clicado para navegar diretamente */
|
|
15
|
+
allowStepSelect?: boolean;
|
|
16
|
+
/** Se o step está desabilitado */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Conteúdo do step */
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
/** Estado de carregamento do step */
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ArchbaseStepperProps extends Omit<StepperProps, 'children' | 'active' | 'onStepClick'> {
|
|
24
|
+
/** Lista de steps */
|
|
25
|
+
steps: ArchbaseStepperStep[];
|
|
26
|
+
/** Step ativo (controlado) */
|
|
27
|
+
active?: number;
|
|
28
|
+
/** Step ativo inicial (não controlado) */
|
|
29
|
+
defaultActive?: number;
|
|
30
|
+
/** Callback quando o step muda */
|
|
31
|
+
onStepChange?: (nextStep: number, prevStep: number) => void;
|
|
32
|
+
/** Se permite clicar nos steps para navegar */
|
|
33
|
+
allowStepClick?: boolean;
|
|
34
|
+
/** Orientação do stepper */
|
|
35
|
+
orientation?: 'horizontal' | 'vertical';
|
|
36
|
+
/** Tamanho do stepper */
|
|
37
|
+
size?: MantineSize;
|
|
38
|
+
/** Cor do stepper */
|
|
39
|
+
color?: MantineColor;
|
|
40
|
+
/** Ícone de step completado */
|
|
41
|
+
completedIcon?: ReactNode;
|
|
42
|
+
/** Ícone de step em progresso */
|
|
43
|
+
progressIcon?: ReactNode;
|
|
44
|
+
/** Raio do ícone do step */
|
|
45
|
+
iconSize?: number;
|
|
46
|
+
/** Estilo do conector entre steps */
|
|
47
|
+
contentPadding?: number;
|
|
48
|
+
/** Se deve mostrar a barra de progresso */
|
|
49
|
+
withProgress?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare const ArchbaseStepper: React.ForwardRefExoticComponent<Omit<ArchbaseStepperProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
export { Button as ArchbaseButton } from '@mantine/core';
|
|
2
2
|
export { ActionIcon as ArchbaseActionIcon } from '@mantine/core';
|
|
3
3
|
export { Fieldset as ArchbaseFieldset } from '@mantine/core';
|
|
4
|
+
export { ArchbaseStepper } from './ArchbaseStepper';
|
|
5
|
+
export type { ArchbaseStepperProps, ArchbaseStepperStep } from './ArchbaseStepper';
|
|
6
|
+
export { ArchbaseFormWizard } from './ArchbaseFormWizard';
|
|
7
|
+
export type { ArchbaseFormWizardProps, ArchbaseFormWizardStep } from './ArchbaseFormWizard';
|
|
8
|
+
export { useArchbaseFormWizard } from './useArchbaseFormWizard';
|
|
9
|
+
export type { FormWizardStep, UseArchbaseFormWizardOptions, UseArchbaseFormWizardReturn, } from './useArchbaseFormWizard';
|
|
10
|
+
export { ArchbaseFieldArray, useArchbaseFieldArray } from './ArchbaseFieldArray';
|
|
11
|
+
export type { ArchbaseFieldArrayProps, ArchbaseFieldArrayItemProps, UseArchbaseFieldArrayOptions, UseArchbaseFieldArrayReturn, } from './ArchbaseFieldArray';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ArchbaseDataSource } from '@archbase/data';
|
|
2
|
+
export interface FormWizardStep<T = any> {
|
|
3
|
+
/** Identificador único do step */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Título do step */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Descrição do step */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Ícone do step */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Função de validação do step - retorna true se válido, string com erro se inválido */
|
|
12
|
+
validate?: (data: T) => boolean | string | Promise<boolean | string>;
|
|
13
|
+
/** Se o step é opcional */
|
|
14
|
+
optional?: boolean;
|
|
15
|
+
/** Campos do DataSource que pertencem a este step (para validação parcial) */
|
|
16
|
+
fields?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface UseArchbaseFormWizardOptions<T extends object, ID> {
|
|
19
|
+
/** Lista de steps do wizard */
|
|
20
|
+
steps: FormWizardStep<T>[];
|
|
21
|
+
/** DataSource vinculado ao formulário */
|
|
22
|
+
dataSource?: ArchbaseDataSource<T, ID>;
|
|
23
|
+
/** Step inicial */
|
|
24
|
+
initialStep?: number;
|
|
25
|
+
/** Callback ao completar todos os steps */
|
|
26
|
+
onComplete?: (data: T) => void | Promise<void>;
|
|
27
|
+
/** Callback ao mudar de step */
|
|
28
|
+
onStepChange?: (fromStep: number, toStep: number, data: T) => void;
|
|
29
|
+
/** Se deve validar ao avançar */
|
|
30
|
+
validateOnNext?: boolean;
|
|
31
|
+
/** Se permite voltar para steps anteriores */
|
|
32
|
+
allowBack?: boolean;
|
|
33
|
+
/** Se permite pular steps opcionais */
|
|
34
|
+
allowSkipOptional?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface UseArchbaseFormWizardReturn<T> {
|
|
37
|
+
/** Step atual (0-indexed) */
|
|
38
|
+
currentStep: number;
|
|
39
|
+
/** Total de steps */
|
|
40
|
+
totalSteps: number;
|
|
41
|
+
/** Se está no primeiro step */
|
|
42
|
+
isFirstStep: boolean;
|
|
43
|
+
/** Se está no último step */
|
|
44
|
+
isLastStep: boolean;
|
|
45
|
+
/** Se o wizard foi completado */
|
|
46
|
+
isCompleted: boolean;
|
|
47
|
+
/** Se está validando */
|
|
48
|
+
isValidating: boolean;
|
|
49
|
+
/** Erro de validação do step atual */
|
|
50
|
+
validationError: string | null;
|
|
51
|
+
/** Dados do step atual */
|
|
52
|
+
currentStepData: FormWizardStep<T>;
|
|
53
|
+
/** Steps completados */
|
|
54
|
+
completedSteps: Set<number>;
|
|
55
|
+
/** Avançar para o próximo step */
|
|
56
|
+
nextStep: () => Promise<boolean>;
|
|
57
|
+
/** Voltar para o step anterior */
|
|
58
|
+
prevStep: () => void;
|
|
59
|
+
/** Ir para um step específico */
|
|
60
|
+
goToStep: (step: number) => Promise<boolean>;
|
|
61
|
+
/** Resetar o wizard */
|
|
62
|
+
reset: () => void;
|
|
63
|
+
/** Completar o wizard */
|
|
64
|
+
complete: () => Promise<boolean>;
|
|
65
|
+
/** Marcar step como completado */
|
|
66
|
+
markStepCompleted: (step: number) => void;
|
|
67
|
+
/** Verificar se um step está completado */
|
|
68
|
+
isStepCompleted: (step: number) => boolean;
|
|
69
|
+
/** Verificar se pode avançar */
|
|
70
|
+
canGoNext: boolean;
|
|
71
|
+
/** Verificar se pode voltar */
|
|
72
|
+
canGoBack: boolean;
|
|
73
|
+
}
|
|
74
|
+
export declare function useArchbaseFormWizard<T extends object, ID = string>(options: UseArchbaseFormWizardOptions<T, ID>): UseArchbaseFormWizardReturn<T>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export { useArchbaseVisible } from './useArchbaseVisible';
|
|
|
3
3
|
export { useArchbaseNavigateParams } from './useArchbaseNavigateParams';
|
|
4
4
|
export { useArchbaseContainerDimensions } from './useArchbaseContainerDimensions';
|
|
5
5
|
export { useArchbaseElementSizeArea } from './useArchbaseElementSizeArea';
|
|
6
|
+
export { useArchbaseConfirm, archbaseConfirm, archbaseConfirmDelete, archbaseAlert, } from './useArchbaseConfirm';
|
|
7
|
+
export type { ArchbaseConfirmOptions, ArchbaseDeleteConfirmOptions, UseArchbaseConfirmReturn, } from './useArchbaseConfirm';
|