@scmlatam/web-ui 0.2.18 → 0.2.20
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/src/components/rb.d.ts +2 -2
- package/dist/src/pages/home/rb/sections/ConfirmDialogSection.d.ts +1 -0
- package/dist/src/rb-components/ui/index.d.ts +2 -0
- package/dist/src/rb-components/ui/overlays/ConfirmDialog.d.ts +105 -0
- package/dist/src/rb-components/ui/primitives/AutoCustomCompleteField.d.ts +1 -1
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangePicker.d.ts +12 -3
- package/dist/web-ui.js +4145 -3868
- package/dist/web-ui.umd.cjs +98 -79
- package/package.json +2 -2
|
@@ -10,8 +10,8 @@ export { RbList, RbListItem } from '../rb-components/list';
|
|
|
10
10
|
export type { RbListItemProps, RbListProps, RbListSize, RbListVariant, } from '../rb-components/list';
|
|
11
11
|
export { PillsTabs, PillsTabs as RbPillsTabs, } from '../rb-components/navigation';
|
|
12
12
|
export type { PillsTabItem, PillsTabsProps } from '../rb-components/navigation';
|
|
13
|
-
export { Button as RBButton, Input, AutoCustomCompleteField, CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, RbInlineChipField, CalendarChipIcon, ClockChipIcon, Card, CardHeader, CardTitle, CardContent, CardFooter, IconButton as RbIconButton, Tooltip, Portal, RbContextMenu, Checkbox, Radio, cn, } from '../rb-components/ui';
|
|
14
|
-
export type { AutoValueItem, ButtonProps as RBButtonProps, InputProps, CustomAutoCompleteFieldProps, CustomDatefieldProps, CustomDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, RbInlineChipFieldProps, RbInlineChipFieldAction, RbContextMenuAlign, RbContextMenuItem, RbContextMenuPosition, RbContextMenuProps, RbContextMenuVariant, CardProps, IconButtonProps as RbIconButtonProps, CheckboxProps, CheckboxSize, RadioProps, PortalProps, TooltipProps, } from '../rb-components/ui';
|
|
13
|
+
export { Button as RBButton, Input, AutoCustomCompleteField, CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, RbInlineChipField, CalendarChipIcon, ClockChipIcon, Card, CardHeader, CardTitle, CardContent, CardFooter, IconButton as RbIconButton, Tooltip, Portal, ConfirmDialog, RbContextMenu, Checkbox, Radio, cn, } from '../rb-components/ui';
|
|
14
|
+
export type { AutoValueItem, ButtonProps as RBButtonProps, InputProps, CustomAutoCompleteFieldProps, CustomDatefieldProps, CustomDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, RbInlineChipFieldProps, RbInlineChipFieldAction, RbContextMenuAlign, RbContextMenuItem, RbContextMenuPosition, RbContextMenuProps, RbContextMenuVariant, CardProps, IconButtonProps as RbIconButtonProps, CheckboxProps, CheckboxSize, RadioProps, PortalProps, TooltipProps, ConfirmDialogProps, ConfirmDialogInitialFocus, ConfirmDialogIconType, } from '../rb-components/ui';
|
|
15
15
|
export { RbTable, RbExcelTable, RbTableToolbar, RbToolbarActionButton, RbToolbarActions, RbToolbarDateRangeField, RbToolbarMultiSelectField, RbToolbarSearchField, RbToolbarSelectField, formatRbExcelDate, formatRbExcelTime, getRbExcelValueAtPath, isRbExcelEmptyValue, isValidRbExcelDate, isValidRbExcelNumber, isValidRbExcelTime, parseRbExcelValue, setRbExcelValueAtPath, } from '../rb-components/table';
|
|
16
16
|
export type { RbExcelCellContext, RbExcelCreateRowContext, RbExcelEditorContext, RbExcelFieldType, RbExcelImportContext, RbExcelParseContext, RbExcelRenderContext, RbExcelRowsChangeMeta, RbExcelRowsChangeSource, RbExcelTableActions, RbExcelTableColumn, RbExcelTableLabels, RbExcelTableProps, RbExcelTableRef, RbExcelValidationError, RbExcelValidationErrorInput, RbExcelValidationErrorSource, RbExcelValidationResult, RbExcelValueSource, RbTableColumn, RbTableRowId, RbTableProps, RbTableCellParams, RbTableRowParams, RbTableInitialState, RbTablePinnedColumns, RbTableBaseRow, RbTableSize, RbTableDensity, RbTableAlign, RbTableCellContextMenuParams, RbTableCellContextMenuPosition, RbTablePaginationMode, RbTablePaginationModel, RbRowSelectionModel, RbRowsPerPageOption, RbToolbarActionsProps, RbToolbarDateRangeFieldProps, RbToolbarDateRangeValue, RbAnyTableColumn, RbLegacyGridColumn, } from '../rb-components/table';
|
|
17
17
|
export { DashboardShell, ShellContent } from '../rb-components/shell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ConfirmDialogSection(): import("react").JSX.Element;
|
|
@@ -34,3 +34,5 @@ export { default as Portal, } from './overlays/Portal';
|
|
|
34
34
|
export type { PortalProps, } from './overlays/Portal';
|
|
35
35
|
export { default as Tooltip, } from './overlays/Tooltip';
|
|
36
36
|
export type { TooltipProps, } from './overlays/Tooltip';
|
|
37
|
+
export { default as ConfirmDialog, } from './overlays/ConfirmDialog';
|
|
38
|
+
export type { ConfirmDialogProps, ConfirmDialogInitialFocus, ConfirmDialogIconType, } from './overlays/ConfirmDialog';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '../primitives/Button';
|
|
3
|
+
export type ConfirmDialogInitialFocus = "cancel" | "confirm" | "dialog";
|
|
4
|
+
export type ConfirmDialogIconType = "info" | "error" | "warning" | "success" | "suggestion";
|
|
5
|
+
export interface ConfirmDialogProps {
|
|
6
|
+
/**
|
|
7
|
+
* Controla si el diálogo está visible.
|
|
8
|
+
*/
|
|
9
|
+
open: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Título principal del diálogo.
|
|
12
|
+
*/
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Mensaje o contenido descriptivo.
|
|
16
|
+
*/
|
|
17
|
+
message?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Ícono personalizado mostrado junto al título.
|
|
20
|
+
*
|
|
21
|
+
* Si se entrega icon, tiene prioridad sobre iconType.
|
|
22
|
+
*/
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Ícono semántico estándar de la librería.
|
|
26
|
+
*/
|
|
27
|
+
iconType?: ConfirmDialogIconType;
|
|
28
|
+
/**
|
|
29
|
+
* Texto del botón de confirmación.
|
|
30
|
+
*/
|
|
31
|
+
confirmText?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Texto del botón de cancelación.
|
|
34
|
+
*/
|
|
35
|
+
cancelText?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Define si se muestra el botón de cancelación.
|
|
38
|
+
*
|
|
39
|
+
* Útil para diálogos informativos o de error
|
|
40
|
+
* que solamente requieren una acción,
|
|
41
|
+
* por ejemplo "Entendido".
|
|
42
|
+
*
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
showCancel?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Indica que la acción de confirmación
|
|
48
|
+
* se encuentra ejecutándose.
|
|
49
|
+
*/
|
|
50
|
+
loading?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Texto mostrado mientras loading está activo.
|
|
53
|
+
*/
|
|
54
|
+
loadingText?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Acción ejecutada al confirmar.
|
|
57
|
+
*/
|
|
58
|
+
onConfirm: () => void | Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Acción ejecutada al cerrar o cancelar.
|
|
61
|
+
*/
|
|
62
|
+
onClose: () => void;
|
|
63
|
+
/**
|
|
64
|
+
* Variante visual del botón principal.
|
|
65
|
+
*/
|
|
66
|
+
confirmVariant?: ButtonProps["variant"];
|
|
67
|
+
/**
|
|
68
|
+
* Variante visual del botón cancelar.
|
|
69
|
+
*/
|
|
70
|
+
cancelVariant?: ButtonProps["variant"];
|
|
71
|
+
/**
|
|
72
|
+
* Permite cerrar con Escape.
|
|
73
|
+
*/
|
|
74
|
+
closeOnEscape?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Permite cerrar haciendo clic
|
|
77
|
+
* directamente sobre el backdrop.
|
|
78
|
+
*/
|
|
79
|
+
closeOnBackdrop?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Define dónde queda el foco
|
|
82
|
+
* cuando se abre el diálogo.
|
|
83
|
+
*
|
|
84
|
+
* Si se utiliza "cancel" pero showCancel
|
|
85
|
+
* es false, el foco pasa automáticamente
|
|
86
|
+
* al botón de confirmación.
|
|
87
|
+
*/
|
|
88
|
+
initialFocus?: ConfirmDialogInitialFocus;
|
|
89
|
+
/**
|
|
90
|
+
* Nombre accesible utilizado cuando
|
|
91
|
+
* no existe un título visible.
|
|
92
|
+
*/
|
|
93
|
+
ariaLabel?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Permite extender estilos del contenedor.
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Permite extender estilos del contenedor
|
|
100
|
+
* del ícono.
|
|
101
|
+
*/
|
|
102
|
+
iconClassName?: string;
|
|
103
|
+
}
|
|
104
|
+
export declare function ConfirmDialog({ open, title, message, icon, iconType, confirmText, cancelText, showCancel, loading, loadingText, onConfirm, onClose, confirmVariant, cancelVariant, closeOnEscape, closeOnBackdrop, initialFocus, ariaLabel, className, iconClassName, }: ConfirmDialogProps): React.JSX.Element | null;
|
|
105
|
+
export default ConfirmDialog;
|
|
@@ -74,4 +74,4 @@ interface CustomAutoCompleteMultipleProps extends CustomAutoCompleteBaseProps {
|
|
|
74
74
|
}
|
|
75
75
|
export type CustomAutoCompleteFieldProps = CustomAutoCompleteSingleProps | CustomAutoCompleteMultipleProps;
|
|
76
76
|
declare const AutoCustomCompleteField: (props: CustomAutoCompleteFieldProps) => React.JSX.Element;
|
|
77
|
-
export { AutoCustomCompleteField };
|
|
77
|
+
export { AutoCustomCompleteField, };
|
|
@@ -2,9 +2,18 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
3
|
export interface CustomDateRangePickerProps {
|
|
4
4
|
label: string;
|
|
5
|
-
initialValue: [
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
initialValue: [
|
|
6
|
+
Dayjs | null,
|
|
7
|
+
Dayjs | null
|
|
8
|
+
];
|
|
9
|
+
value: [
|
|
10
|
+
Dayjs | null,
|
|
11
|
+
Dayjs | null
|
|
12
|
+
];
|
|
13
|
+
setValue: (newValue: [
|
|
14
|
+
Dayjs | null,
|
|
15
|
+
Dayjs | null
|
|
16
|
+
]) => void;
|
|
8
17
|
calendars: 1 | 2 | 3;
|
|
9
18
|
disabled: boolean;
|
|
10
19
|
white: boolean;
|