@scmlatam/web-ui 0.2.6 → 0.2.8
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/images/clock.svg +8 -0
- package/dist/src/rb-components/feedback/system-alert/SystemAlert.d.ts +6 -0
- package/dist/src/rb-components/feedback/system-alert/index.d.ts +3 -0
- package/dist/src/rb-components/feedback/system-alert/systemAlertStore.d.ts +13 -0
- package/dist/src/rb-components/feedback/system-alert/useSystemAlert.d.ts +7 -0
- package/dist/src/rb-components/form/FormShell.d.ts +15 -0
- package/dist/src/rb-components/form/index.d.ts +2 -0
- package/dist/src/rb-components/index.d.ts +4 -0
- package/dist/src/rb-components/navigation/PillsTabs.d.ts +47 -0
- package/dist/src/rb-components/navigation/index.d.ts +3 -0
- package/dist/src/rb-components/table/RbTable.d.ts +8 -0
- package/dist/src/rb-components/table/RbTableToolbar.d.ts +26 -0
- package/dist/src/rb-components/table/index.d.ts +8 -0
- package/dist/src/rb-components/table/table.helpers.d.ts +36 -0
- package/dist/src/rb-components/table/toolbar/RbToolbarActionButton.d.ts +17 -0
- package/dist/src/rb-components/table/toolbar/RbToolbarDateRangeField.d.ts +23 -0
- package/dist/src/rb-components/table/toolbar/RbToolbarMultiSelectField.d.ts +30 -0
- package/dist/src/rb-components/table/toolbar/RbToolbarSearchField.d.ts +18 -0
- package/dist/src/rb-components/table/toolbar/RbToolbarSelectField.d.ts +36 -0
- package/dist/src/rb-components/table/toolbar/index.d.ts +10 -0
- package/dist/src/rb-components/table/types.d.ts +282 -0
- package/dist/src/rb-components/ui/index.d.ts +6 -0
- package/dist/src/rb-components/ui/primitives/AutoCustomCompleteField.d.ts +20 -0
- package/dist/src/rb-components/ui/primitives/RbInlineChipField.d.ts +42 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDatePicker.d.ts +12 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangeCalendar.d.ts +11 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangePicker.d.ts +18 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangefield.d.ts +9 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDatefield.d.ts +12 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomTimefield.d.ts +12 -0
- package/dist/src/rb-components/ui/primitives/date-fields/DateFieldTrigger.d.ts +16 -0
- package/dist/src/rb-components/ui/primitives/date-fields/DateShortcuts.d.ts +25 -0
- package/dist/src/rb-components/ui/primitives/date-fields/TimePickerPanel.d.ts +7 -0
- package/dist/src/rb-components/ui/primitives/date-fields/dateUtils.d.ts +18 -0
- package/dist/src/rb-components/ui/primitives/date-fields/index.d.ts +12 -0
- package/dist/src/rb-components/ui/primitives/date-fields/useDatePopover.d.ts +25 -0
- package/dist/src/themes/GoodRabbitDarkTheme.d.ts +13 -0
- package/dist/src/themes/GoodRabbitTooltips.d.ts +14 -0
- package/dist/web-ui.js +6936 -2622
- package/dist/web-ui.umd.cjs +61 -19
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface AutoValueItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
sublabel?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
highlight?: {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface CustomAutoCompleteFieldProps {
|
|
12
|
+
label: string;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
values: AutoValueItem[];
|
|
15
|
+
value: string[];
|
|
16
|
+
setValue: (newValue: string[]) => void;
|
|
17
|
+
white: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const AutoCustomCompleteField: ({ label, placeholder, values, value, setValue, white, }: CustomAutoCompleteFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { AutoCustomCompleteField };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type RbInlineChipFieldType = "text" | "date" | "time" | "datetime-local";
|
|
3
|
+
type RbInlineChipFieldVariant = "default" | "success" | "warning" | "error" | "info" | "neutral";
|
|
4
|
+
type DateSeparator = "-" | "/";
|
|
5
|
+
export type RbInlineChipFieldAction = {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
danger?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type RbInlineChipFieldProps = {
|
|
12
|
+
value?: string | null;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
type?: RbInlineChipFieldType;
|
|
15
|
+
variant?: RbInlineChipFieldVariant;
|
|
16
|
+
/**
|
|
17
|
+
* Para type="date" y type="datetime-local".
|
|
18
|
+
* Por defecto se usa "-", para mantener formato tipo 2026-06-10.
|
|
19
|
+
*/
|
|
20
|
+
dateSeparator?: DateSeparator;
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Ícono custom.
|
|
25
|
+
* Si hay variant success/warning/error/info, se usa el ícono de estado.
|
|
26
|
+
* Si no hay estado, puede mostrarse este ícono custom.
|
|
27
|
+
* Si no hay nada, se mantiene el espacio vacío.
|
|
28
|
+
*/
|
|
29
|
+
icon?: React.ReactNode;
|
|
30
|
+
showIcon?: boolean;
|
|
31
|
+
actions?: RbInlineChipFieldAction[];
|
|
32
|
+
showMenu?: boolean;
|
|
33
|
+
onChange?: (value: string) => void;
|
|
34
|
+
onClick?: () => void;
|
|
35
|
+
className?: string;
|
|
36
|
+
inputClassName?: string;
|
|
37
|
+
ariaLabel?: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function CalendarChipIcon(): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function ClockChipIcon(): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function RbInlineChipField({ value, placeholder, type, variant, dateSeparator, editable, disabled, icon, showIcon, actions, showMenu, onChange, onClick, className, inputClassName, ariaLabel, }: RbInlineChipFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export default RbInlineChipField;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface CustomDatePickerProps {
|
|
3
|
+
label: string;
|
|
4
|
+
initialValue: Dayjs | null;
|
|
5
|
+
value: Dayjs | null;
|
|
6
|
+
setValue: (newValue: Dayjs | null) => void;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
white: boolean;
|
|
9
|
+
fullWidth: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const CustomDatePicker: ({ label, initialValue, value, setValue, disabled, white, fullWidth, }: CustomDatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { CustomDatePicker };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface CustomDateRangeCalendarProps {
|
|
3
|
+
initialValue: [Dayjs | null, Dayjs | null];
|
|
4
|
+
value: [Dayjs | null, Dayjs | null];
|
|
5
|
+
setValue: (newValue: [Dayjs | null, Dayjs | null]) => void;
|
|
6
|
+
calendars: 1 | 2 | 3;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
white: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const CustomDateRangeCalendar: ({ initialValue, value, setValue, calendars, disabled, white, }: CustomDateRangeCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { CustomDateRangeCalendar };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface CustomDateRangePickerProps {
|
|
3
|
+
label: string;
|
|
4
|
+
initialValue: [Dayjs | null, Dayjs | null];
|
|
5
|
+
value: [Dayjs | null, Dayjs | null];
|
|
6
|
+
setValue: (newValue: [Dayjs | null, Dayjs | null]) => void;
|
|
7
|
+
calendars: 1 | 2 | 3;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
white: boolean;
|
|
10
|
+
fullWidth: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Permite que el trigger use una versión más corta del texto.
|
|
13
|
+
* Ideal para toolbar, donde el espacio puede variar harto.
|
|
14
|
+
*/
|
|
15
|
+
compact?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const CustomDateRangePicker: ({ label, initialValue, value, setValue, calendars, disabled, white, fullWidth, compact, }: CustomDateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { CustomDateRangePicker };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface CustomDateRangefieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: [Dayjs | null, Dayjs | null];
|
|
5
|
+
setValue: (newValue: [Dayjs | null, Dayjs | null]) => void;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const CustomDateRangefield: ({ label, value, setValue, disabled, }: CustomDateRangefieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { CustomDateRangefield };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface CustomDatefieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
initialValue: Dayjs | null;
|
|
5
|
+
value: Dayjs | null;
|
|
6
|
+
setValue: (newValue: Dayjs | null) => void;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
white: boolean;
|
|
9
|
+
fullWidth: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const CustomDatefield: ({ label, initialValue, value, setValue, disabled, white, fullWidth, }: CustomDatefieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { CustomDatefield };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface CustomTimefieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
initialValue: Dayjs | null;
|
|
5
|
+
value: Dayjs | null;
|
|
6
|
+
setValue: (newValue: Dayjs | null) => void;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
white: boolean;
|
|
9
|
+
fullWidth: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const CustomTimefield: ({ label, initialValue, value, setValue, disabled, white, fullWidth, }: CustomTimefieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { CustomTimefield };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type DateFieldIcon = "chevron" | "clock";
|
|
3
|
+
interface DateFieldTriggerProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
white?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
icon?: DateFieldIcon;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const DateFieldTrigger: React.ForwardRefExoticComponent<DateFieldTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface DateShortcut {
|
|
3
|
+
label: string;
|
|
4
|
+
value: Dayjs | null;
|
|
5
|
+
}
|
|
6
|
+
export interface DateRangeShortcut {
|
|
7
|
+
label: string;
|
|
8
|
+
value: [Dayjs | null, Dayjs | null];
|
|
9
|
+
}
|
|
10
|
+
type ShortcutVariant = "light" | "dark";
|
|
11
|
+
export declare function getDateShortcuts(): DateShortcut[];
|
|
12
|
+
export declare function getDateRangeShortcuts(): DateRangeShortcut[];
|
|
13
|
+
interface DateShortcutsProps {
|
|
14
|
+
shortcuts: DateShortcut[];
|
|
15
|
+
onSelect: (value: Dayjs | null) => void;
|
|
16
|
+
variant?: ShortcutVariant;
|
|
17
|
+
}
|
|
18
|
+
export declare function DateShortcuts({ shortcuts, onSelect, variant, }: DateShortcutsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface DateRangeShortcutsProps {
|
|
20
|
+
shortcuts: DateRangeShortcut[];
|
|
21
|
+
onSelect: (value: [Dayjs | null, Dayjs | null]) => void;
|
|
22
|
+
variant?: ShortcutVariant;
|
|
23
|
+
}
|
|
24
|
+
export declare function DateRangeShortcuts({ shortcuts, onSelect, variant, }: DateRangeShortcutsProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
interface TimePickerPanelProps {
|
|
3
|
+
value: Dayjs | null;
|
|
4
|
+
onChange: (newValue: Dayjs) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function TimePickerPanel({ value, onChange }: TimePickerPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as dayjs, Dayjs } from 'dayjs';
|
|
2
|
+
export declare const DATE_DISPLAY_FORMAT = "DD/MM/YYYY";
|
|
3
|
+
export declare const TIME_DISPLAY_FORMAT = "HH:mm";
|
|
4
|
+
export declare const DATETIME_DISPLAY_FORMAT = "DD/MM/YYYY HH:mm";
|
|
5
|
+
export declare function toDate(value?: Dayjs | null): Date | undefined;
|
|
6
|
+
export declare function toDayjs(value?: Date | null): Dayjs | null;
|
|
7
|
+
export declare function formatDate(value?: Dayjs | null): string;
|
|
8
|
+
export declare function formatTime(value?: Dayjs | null): string;
|
|
9
|
+
export declare function formatDateTime(value?: Dayjs | null): string;
|
|
10
|
+
export declare function formatDateRange(value?: [Dayjs | null, Dayjs | null]): string;
|
|
11
|
+
export declare function getDateInputValue(value?: Dayjs | null): string;
|
|
12
|
+
export declare function getTimeInputValue(value?: Dayjs | null): string;
|
|
13
|
+
export declare function getDateTimeInputValue(value?: Dayjs | null): string;
|
|
14
|
+
export declare function fromDateInputValue(value: string): dayjs.Dayjs | null;
|
|
15
|
+
export declare function fromTimeInputValue(value: string, baseValue?: Dayjs | null): dayjs.Dayjs | null;
|
|
16
|
+
export declare function fromDateTimeInputValue(value: string): dayjs.Dayjs | null;
|
|
17
|
+
export declare function mergeDateAndTime(dateValue: Dayjs, timeValue?: Dayjs | null): dayjs.Dayjs;
|
|
18
|
+
export declare function normalizeCalendars(calendars?: 1 | 2 | 3): 1 | 2 | 3;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { CustomDatefield } from './CustomDatefield';
|
|
2
|
+
export type { CustomDatefieldProps } from './CustomDatefield';
|
|
3
|
+
export { CustomDatePicker } from './CustomDatePicker';
|
|
4
|
+
export type { CustomDatePickerProps } from './CustomDatePicker';
|
|
5
|
+
export { CustomTimefield } from './CustomTimefield';
|
|
6
|
+
export type { CustomTimefieldProps } from './CustomTimefield';
|
|
7
|
+
export { CustomDateRangefield } from './CustomDateRangefield';
|
|
8
|
+
export type { CustomDateRangefieldProps } from './CustomDateRangefield';
|
|
9
|
+
export { CustomDateRangePicker } from './CustomDateRangePicker';
|
|
10
|
+
export type { CustomDateRangePickerProps } from './CustomDateRangePicker';
|
|
11
|
+
export { CustomDateRangeCalendar } from './CustomDateRangeCalendar';
|
|
12
|
+
export type { CustomDateRangeCalendarProps } from './CustomDateRangeCalendar';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AnchorPosition {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
placement: "top" | "bottom";
|
|
7
|
+
maxHeight: number;
|
|
8
|
+
}
|
|
9
|
+
interface UseDatePopoverOptions {
|
|
10
|
+
estimatedHeight?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
screenPadding?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function useDatePopover(options?: UseDatePopoverOptions): {
|
|
15
|
+
open: boolean;
|
|
16
|
+
ready: boolean;
|
|
17
|
+
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
|
+
close: () => void;
|
|
19
|
+
toggle: () => void;
|
|
20
|
+
position: AnchorPosition;
|
|
21
|
+
floatingStyle: React.CSSProperties;
|
|
22
|
+
triggerRef: React.RefObject<HTMLButtonElement | null>;
|
|
23
|
+
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -369,6 +369,19 @@ declare const BaseGoodRabbitDarkTheme: {
|
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
371
|
};
|
|
372
|
+
MuiTooltip: {
|
|
373
|
+
styleOverrides: {
|
|
374
|
+
tooltip: {
|
|
375
|
+
backgroundColor: string;
|
|
376
|
+
color: string;
|
|
377
|
+
fontSize: string;
|
|
378
|
+
borderRadius: string;
|
|
379
|
+
};
|
|
380
|
+
arrow: {
|
|
381
|
+
color: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
};
|
|
372
385
|
};
|
|
373
386
|
};
|
|
374
387
|
declare const GoodRabbitDarkTheme: import('@mui/material').Theme;
|