@scmlatam/web-ui 0.2.42 → 0.2.47

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.
@@ -1,5 +1,5 @@
1
- export { MessageAlert } from '../rb-components/feedback';
2
- export type { MessageAlertAction, MessageAlertProps, MessageAlertType, } from '../rb-components/feedback';
1
+ export { EmptyState, MessageAlert } from '../rb-components/feedback';
2
+ export type { EmptyStateAction, EmptyStateContext, EmptyStateProps, EmptyStateVariant, MessageAlertAction, MessageAlertProps, MessageAlertType, } from '../rb-components/feedback';
3
3
  export { SystemAlert } from '../rb-components/feedback/system-alert';
4
4
  export { useSystemAlert as useRbSystemAlert } from '../rb-components/feedback/system-alert';
5
5
  export type { SystemAlertKey, SystemAlertOptions, SystemAlertSeverity, } from '../rb-components/feedback/system-alert';
@@ -10,11 +10,12 @@ 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, TabPanel, TabPanel as RbTabPanel, } from '../rb-components/navigation';
12
12
  export type { PillsTabItem, PillsTabsProps, TabPanelItem, TabPanelProps, } from '../rb-components/navigation';
13
- export { Button as RBButton, Input, AutoCustomCompleteField, CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, CustomIndefiniteDatePicker, CustomDateControl, RbInlineChipField, CalendarChipIcon, ClockChipIcon, Card, CardHeader, CardTitle, CardContent, CardFooter, IconButton as RbIconButton, Tooltip, Portal, ConfirmDialog, RbContextMenu, Checkbox, Radio, RbStepper, cn, } from '../rb-components/ui';
14
- export type { AutoValueItem, ButtonProps as RBButtonProps, InputProps, CustomAutoCompleteFieldProps, CustomDatefieldProps, CustomDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, CustomIndefiniteDatePickerProps, CustomDateControlProps, RbInlineChipFieldProps, RbInlineChipFieldAction, RbContextMenuAlign, RbContextMenuItem, RbContextMenuPosition, RbContextMenuProps, RbContextMenuVariant, CardProps, IconButtonProps as RbIconButtonProps, CheckboxProps, CheckboxSize, RadioProps, RbStepperProps, RbStepperStep, PortalProps, TooltipProps, ConfirmDialogProps, ConfirmDialogInitialFocus, ConfirmDialogIconType, } from '../rb-components/ui';
13
+ export { Button as RBButton, Input, AutoCustomCompleteField, CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, CustomIndefiniteDatePicker, CustomDateControl, Calendario, RbInlineChipField, CalendarChipIcon, ClockChipIcon, Card, CardHeader, CardTitle, CardContent, CardFooter, IconButton as RbIconButton, Tooltip, Portal, ConfirmDialog, RbContextMenu, Checkbox, Radio, RbStepper, cn, } from '../rb-components/ui';
14
+ export type { AutoValueItem, ButtonProps as RBButtonProps, InputProps, CustomAutoCompleteFieldProps, CustomDatefieldProps, CustomDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, CustomIndefiniteDatePickerProps, CustomDateControlProps, CalendarioProps, CalendarioSingleProps, CalendarioRangeProps, CalendarioRange, CalendarioMonths, CalendarioCaptionLayout, CalendarioTimeFormat, CalendarioLocale, CalendarioDateFormat, RbInlineChipFieldProps, RbInlineChipFieldAction, RbContextMenuAlign, RbContextMenuItem, RbContextMenuPosition, RbContextMenuProps, RbContextMenuVariant, CardProps, IconButtonProps as RbIconButtonProps, CheckboxProps, CheckboxSize, RadioProps, RbStepperProps, RbStepperStep, 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
- export { DashboardShell, ShellContent } from '../rb-components/shell';
17
+ export { Breadcrumbs, DashboardShell, ShellContent, } from '../rb-components/shell';
18
+ export type { BreadcrumbItem, BreadcrumbsProps } from '../rb-components/shell';
18
19
  export { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, } from '../rb-components/sidebar';
19
20
  export { TopBar, TopBarUserMenu } from '../rb-components/topbar';
20
21
  export { TreePanel, VirtualTree, findNodeById, flattenTree, getExpandableNodeIds, getNodeSelectionState, getSelectableDescendantIds, getSelectableSubtreeIds, hasNodeChildren, isNodeSelectable, isNodeSelectionMutable, normalizeHierarchicalSelection, toggleExpandedNode, toggleNodeSelection, buildVirtualTreeIndex, filterVirtualTreeItems, getVirtualTreeAncestorIds, getVisibleVirtualTreeItems, normalizeVirtualTreeSearch, normalizeVirtualTreeSelection, toggleVirtualTreeSelection, useVirtualTreeState, } from '../rb-components/tree-panel';
@@ -0,0 +1,8 @@
1
+ import { PropDefinition } from '../types/documentation.types';
2
+ export interface PropsTableProps {
3
+ componentName: string;
4
+ rows: PropDefinition[];
5
+ description?: string;
6
+ className?: string;
7
+ }
8
+ export declare function PropsTable({ componentName, rows, description, className, }: PropsTableProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function BreadcrumbsSection(): import("react").JSX.Element;
@@ -4,3 +4,9 @@ export interface RbDocumentationIndexItem {
4
4
  description: string;
5
5
  }
6
6
  export type DemoPillTab = "general" | "detalle";
7
+ export interface PropDefinition {
8
+ name: string;
9
+ type: string;
10
+ default?: string;
11
+ description: string;
12
+ }
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ export type EmptyStateContext = "form" | "page";
3
+ export type EmptyStateVariant = "empty" | "no-permission" | "not-found";
4
+ export interface EmptyStateAction {
5
+ label: ReactNode;
6
+ onClick: () => void;
7
+ disabled?: boolean;
8
+ }
9
+ export interface EmptyStateProps {
10
+ variant?: EmptyStateVariant;
11
+ context?: EmptyStateContext;
12
+ icon?: ReactNode;
13
+ title?: ReactNode;
14
+ description?: ReactNode;
15
+ primaryAction?: EmptyStateAction;
16
+ secondaryAction?: EmptyStateAction;
17
+ permissions?: string[];
18
+ onGoHome?: () => void;
19
+ homePath?: string;
20
+ hideIcon?: boolean;
21
+ hideTitle?: boolean;
22
+ hideDescription?: boolean;
23
+ hidePrimaryAction?: boolean;
24
+ hideSecondaryAction?: boolean;
25
+ className?: string;
26
+ }
27
+ export declare function EmptyState({ variant, context, icon, title, description, primaryAction, secondaryAction, permissions, onGoHome, homePath, hideIcon, hideTitle, hideDescription, hidePrimaryAction, hideSecondaryAction, className, }: EmptyStateProps): import("react").JSX.Element;
28
+ export default EmptyState;
@@ -0,0 +1,2 @@
1
+ export { EmptyState } from './EmptyState';
2
+ export type { EmptyStateAction, EmptyStateContext, EmptyStateProps, EmptyStateVariant, } from './EmptyState';
@@ -1,2 +1,3 @@
1
1
  export * from './system-alert';
2
2
  export * from './message-alert';
3
+ export * from './empty-state';
@@ -3,7 +3,7 @@ export type BreadcrumbItem = {
3
3
  label: ReactNode;
4
4
  to?: string;
5
5
  };
6
- interface BreadcrumbsProps {
6
+ export interface BreadcrumbsProps {
7
7
  items?: BreadcrumbItem[];
8
8
  separator?: ReactNode;
9
9
  className?: string;
@@ -30,4 +30,3 @@ interface BreadcrumbsProps {
30
30
  }) => ReactNode;
31
31
  }
32
32
  export default function Breadcrumbs({ items, separator, className, queryKeys, includeHome, homeLabel, homeTo, labelFormatter, }: BreadcrumbsProps): import("react").JSX.Element | null;
33
- export {};
@@ -1,2 +1,4 @@
1
1
  export { DashboardShell } from './DashboardShell';
2
2
  export { ShellContent } from './ShellContent';
3
+ export { default as Breadcrumbs } from './Breadcrumbs';
4
+ export type { BreadcrumbItem, BreadcrumbsProps } from './Breadcrumbs';
@@ -17,7 +17,9 @@ export type { AutoValueItem, CustomAutoCompleteFieldProps, } from './primitives/
17
17
  export { CustomDatefield, CustomDatePicker, CustomIndefiniteDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, CustomDateControl, } from './primitives/date-fields';
18
18
  export type { CustomDatefieldProps, CustomDatePickerProps, CustomIndefiniteDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, CustomDateControlProps, } from './primitives/date-fields';
19
19
  export { Calendario } from './primitives/Calendario';
20
- export type { CalendarioProps, CalendarioSingleProps, CalendarioRangeProps, CalendarioRange, CalendarioMonths, } from './primitives/Calendario';
20
+ export { getDateShortcuts, getDateRangeShortcuts, } from './primitives/date-fields/DateShortcuts';
21
+ export type { DateShortcut, DateRangeShortcut, } from './primitives/date-fields/DateShortcuts';
22
+ export type { CalendarioProps, CalendarioSingleProps, CalendarioRangeProps, CalendarioRange, CalendarioMonths, CalendarioCaptionLayout, CalendarioTimeFormat, CalendarioLocale, CalendarioDateFormat, } from './primitives/Calendario';
21
23
  export { RbInlineChipField, CalendarChipIcon, ClockChipIcon, } from './primitives/RbInlineChipField';
22
24
  export type { RbInlineChipFieldProps, RbInlineChipFieldAction, } from './primitives/RbInlineChipField';
23
25
  export { RbContextMenu } from './primitives/RbContextMenu';
@@ -14,6 +14,15 @@ export interface AutoValueItem {
14
14
  active?: boolean;
15
15
  tooltip?: string;
16
16
  };
17
+ /**
18
+ * Agrupa la opción bajo un encabezado.
19
+ *
20
+ * Se asume que 'values' ya viene ordenado
21
+ * por grupo, el encabezado
22
+ * se muestra al detectar un cambio de grupo
23
+ * respecto a la opción anterior.
24
+ */
25
+ groupLabel?: string;
17
26
  }
18
27
  export type AutoCompleteSearchMode = "local" | "external";
19
28
  export interface AutoCompleteSearchConfig {
@@ -1,19 +1,60 @@
1
1
  import { default as React } from 'react';
2
2
  import { Dayjs } from 'dayjs';
3
+ import { CalendarioTimeFormat } from './CalendarioTimePanel';
4
+ import { DateRangeShortcut, DateShortcut } from './date-fields/DateShortcuts';
3
5
  declare const CALENDARIO_LOCALES: {
4
6
  readonly en: import('react-day-picker').DayPickerLocale;
5
7
  readonly es: import('react-day-picker').DayPickerLocale;
6
8
  };
7
9
  type CalendarioLocale = keyof typeof CALENDARIO_LOCALES;
10
+ export type { CalendarioLocale };
8
11
  export type CalendarioMonths = 1 | 2 | 3;
12
+ export type CalendarioCaptionLayout = "label" | "month" | "year" | "dropdown" | "hidden";
13
+ export type { CalendarioTimeFormat };
9
14
  export type CalendarioRange = [Dayjs | null, Dayjs | null];
15
+ export type CalendarioDateFormat = "DD/MM/YYYY" | "MM/DD/YYYY" | "YYYY-MM-DD";
10
16
  interface CalendarioBaseProps {
11
17
  label: string;
12
18
  disabled: boolean;
13
19
  white: boolean;
14
20
  fullWidth: boolean;
15
21
  placeholder?: string;
16
- captionLayout?: "label" | "dropdown";
22
+ /**
23
+ * label: mes y año como texto.
24
+ * month: selector de mes.
25
+ * year: selector de año.
26
+ * dropdown: selectores de mes y año.
27
+ * hidden: sin cabecera de mes/año.
28
+ */
29
+ captionLayout?: CalendarioCaptionLayout;
30
+ /**
31
+ * Permite cambiar de mes y de año.
32
+ * En false oculta las flechas, los selectores
33
+ * y bloquea el cambio al escribir.
34
+ */
35
+ enableMonthNavigation?: boolean;
36
+ /**
37
+ * Muestra el calendario. En false el panel
38
+ * solo permite elegir hora.
39
+ */
40
+ includeDatePicker?: boolean;
41
+ /**
42
+ * Agrega la selección de hora al panel.
43
+ */
44
+ includeTimePicker?: boolean;
45
+ /**
46
+ * Formato del selector de hora.
47
+ */
48
+ timeFormat?: CalendarioTimeFormat;
49
+ /**
50
+ * Agrega la columna de segundos
51
+ * al selector de hora.
52
+ */
53
+ includeSeconds?: boolean;
54
+ /**
55
+ * Intervalo de minutos del selector de hora.
56
+ */
57
+ minuteStep?: number;
17
58
  locale?: CalendarioLocale | null;
18
59
  minDate?: Dayjs | Date;
19
60
  maxDate?: Dayjs | Date;
@@ -28,11 +69,26 @@ interface CalendarioBaseProps {
28
69
  * dentro del panel.
29
70
  */
30
71
  centerCalendars?: boolean;
72
+ /**
73
+ * Formato de la fecha en el campo:
74
+ * display, máscara al escribir y parseo.
75
+ */
76
+ dateFormat?: CalendarioDateFormat;
31
77
  /**
32
78
  * Muestra el valor del trigger en formato corto
33
- * (DD/MM/YY), útil en espacios reducidos.
79
+ * (año de dos dígitos), útil en espacios reducidos.
34
80
  */
35
81
  compact?: boolean;
82
+ /**
83
+ * Muestra la columna de atajos
84
+ * (hoy, ayer, mañana, etc.).
85
+ */
86
+ hasShortcuts?: boolean;
87
+ /**
88
+ * Exige confirmar con el botón "Listo"
89
+ * en vez de cerrar al completar la selección.
90
+ */
91
+ noInstantAcept?: boolean;
36
92
  /**
37
93
  * Activa el estado visual y accesible de error.
38
94
  */
@@ -48,12 +104,30 @@ export interface CalendarioSingleProps extends CalendarioBaseProps {
48
104
  initialValue: Dayjs | null;
49
105
  value: Dayjs | null;
50
106
  setValue: (newValue: Dayjs | null) => void;
107
+ /**
108
+ * Habilita el check de fecha indefinida
109
+ * dentro del panel.
110
+ */
111
+ isIndefiniteAllowed?: boolean;
112
+ indefinite?: boolean;
113
+ onIndefiniteChange?: (indefinite: boolean) => void;
114
+ indefiniteLabel?: string;
115
+ /**
116
+ * Reemplaza los atajos por defecto
117
+ * (ayer, hoy, mañana).
118
+ */
119
+ shortcuts?: DateShortcut[];
51
120
  }
52
121
  export interface CalendarioRangeProps extends CalendarioBaseProps {
53
122
  selectionMode: "range";
54
123
  initialValue: CalendarioRange;
55
124
  value: CalendarioRange;
56
125
  setValue: (newValue: CalendarioRange) => void;
126
+ /**
127
+ * Reemplaza los atajos de rango por defecto
128
+ * (semana pasada, últimos 7 días, etc.).
129
+ */
130
+ shortcuts?: DateRangeShortcut[];
57
131
  }
58
132
  export type CalendarioProps = CalendarioSingleProps | CalendarioRangeProps;
59
133
  declare const Calendario: (props: CalendarioProps) => React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { Dayjs } from 'dayjs';
3
+ export type CalendarioTimeFormat = "ampm" | "24h";
4
+ export interface CalendarioTimePanelProps {
5
+ value: Dayjs | null;
6
+ onChange: (newValue: Dayjs) => void;
7
+ timeFormat?: CalendarioTimeFormat;
8
+ includeSeconds?: boolean;
9
+ minuteStep?: number;
10
+ disabled?: boolean;
11
+ /** Se dispara al elegir en la última columna. */
12
+ onComplete?: () => void;
13
+ }
14
+ export declare function CalendarioTimePanel({ value, onChange, timeFormat, includeSeconds, minuteStep, disabled, onComplete, }: CalendarioTimePanelProps): React.JSX.Element;
15
+ export declare function getCalendarioTimePattern(timeFormat: CalendarioTimeFormat, includeSeconds: boolean): "HH:mm" | "HH:mm:ss" | "hh:mm:ss A" | "hh:mm A";
16
+ export interface CalendarioTimeFieldProps extends Omit<CalendarioTimePanelProps, "onChange"> {
17
+ label?: string;
18
+ white?: boolean;
19
+ onChange: (newValue: Dayjs) => void;
20
+ }
21
+ export declare function parseCalendarioTimeText(text: string, base: Dayjs | null, timeFormat: CalendarioTimeFormat): Dayjs | null;
22
+ export declare function CalendarioTimeField({ value, onChange, label, timeFormat, includeSeconds, minuteStep, disabled, white, }: CalendarioTimeFieldProps): React.JSX.Element;
@@ -12,6 +12,7 @@ interface DateInputTriggerProps {
12
12
  error: boolean;
13
13
  helperText?: React.ReactNode;
14
14
  maxLength?: number;
15
+ readOnly?: boolean;
15
16
  onChange: (value: string) => void;
16
17
  onOpen: () => void;
17
18
  onBlur: () => void;