@scmlatam/web-ui 0.2.50 → 0.2.53

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.
Files changed (25) hide show
  1. package/dist/src/components/core/dashboard/sidebar/Content.d.ts +1 -1
  2. package/dist/src/components/core/dashboard/sidebar/Footer.d.ts +1 -1
  3. package/dist/src/components/core/dashboard/sidebar/Header.d.ts +1 -1
  4. package/dist/src/rb-components/auth/components/AuthLanguageDropdown.d.ts +2 -1
  5. package/dist/src/rb-components/auth/components/AuthPasswordInput.d.ts +2 -1
  6. package/dist/src/rb-components/feedback/empty-state/EmptyState.d.ts +2 -1
  7. package/dist/src/rb-components/feedback/message-alert/MessageAlert.d.ts +2 -1
  8. package/dist/src/rb-components/feedback/system-alert/SystemAlert.d.ts +3 -2
  9. package/dist/src/rb-components/navigation/PillsTabs.d.ts +2 -1
  10. package/dist/src/rb-components/navigation/TabPanel.d.ts +2 -1
  11. package/dist/src/rb-components/shell/Breadcrumbs.d.ts +2 -1
  12. package/dist/src/rb-components/sidebar/Sidebar.d.ts +2 -1
  13. package/dist/src/rb-components/table/RbTable.d.ts +1 -1
  14. package/dist/src/rb-components/table/RbTableToolbar.d.ts +2 -1
  15. package/dist/src/rb-components/table/types.d.ts +12 -11
  16. package/dist/src/rb-components/topbar/TopBar.d.ts +2 -1
  17. package/dist/src/rb-components/topbar/TopBarUserMenu.d.ts +2 -1
  18. package/dist/src/rb-components/ui/overlays/Tooltip.d.ts +2 -1
  19. package/dist/src/rb-components/ui/primitives/Input.d.ts +1 -0
  20. package/dist/src/rb-components/ui/primitives/RbContextMenu.d.ts +2 -1
  21. package/dist/src/rb-components/ui/primitives/RbInlineChipField.d.ts +3 -1
  22. package/dist/src/stories/rb/RbTable.stories.d.ts +6 -0
  23. package/dist/web-ui.js +3742 -3667
  24. package/dist/web-ui.umd.cjs +71 -79
  25. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
1
  import { ContentProps } from '../../types/types';
2
- declare const Content: ({ state, setState, groups, tooltips }: ContentProps) => import("react").JSX.Element;
2
+ declare const Content: ({ id, state, setState, groups, tooltips }: ContentProps) => import("react").JSX.Element;
3
3
  export default Content;
@@ -1,3 +1,3 @@
1
1
  import { FooterProps } from '../../types/types';
2
- declare const Footer: ({ state, signOut }: FooterProps) => import("react").JSX.Element;
2
+ declare const Footer: ({ id, state, signOut }: FooterProps) => import("react").JSX.Element;
3
3
  export default Footer;
@@ -1,3 +1,3 @@
1
1
  import { HeaderProps } from '../../types/types';
2
- declare const Header: ({ tooltips, state, setState }: HeaderProps) => import("react").JSX.Element;
2
+ declare const Header: ({ id, tooltips, state, setState }: HeaderProps) => import("react").JSX.Element;
3
3
  export default Header;
@@ -6,9 +6,10 @@ interface AuthLanguage {
6
6
  onClick: () => void;
7
7
  }
8
8
  interface AuthLanguageDropdownProps {
9
+ id?: string;
9
10
  languages: AuthLanguage[];
10
11
  value: string;
11
12
  onChange: (code: string) => void;
12
13
  }
13
- export declare function AuthLanguageDropdown({ languages, value, onChange, }: AuthLanguageDropdownProps): import("react").JSX.Element | null;
14
+ export declare function AuthLanguageDropdown({ id, languages, value, onChange, }: AuthLanguageDropdownProps): import("react").JSX.Element | null;
14
15
  export {};
@@ -1,5 +1,6 @@
1
1
  import { KeyboardEventHandler } from 'react';
2
2
  interface AuthPasswordInputProps {
3
+ id?: string;
3
4
  value: string;
4
5
  onChange: (value: string) => void;
5
6
  label: string;
@@ -8,5 +9,5 @@ interface AuthPasswordInputProps {
8
9
  autoComplete?: string;
9
10
  onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
10
11
  }
11
- export declare function AuthPasswordInput({ value, onChange, label, placeholder, disabled, autoComplete, onKeyDown, }: AuthPasswordInputProps): import("react").JSX.Element;
12
+ export declare function AuthPasswordInput({ id, value, onChange, label, placeholder, disabled, autoComplete, onKeyDown, }: AuthPasswordInputProps): import("react").JSX.Element;
12
13
  export {};
@@ -7,6 +7,7 @@ export interface EmptyStateAction {
7
7
  disabled?: boolean;
8
8
  }
9
9
  export interface EmptyStateProps {
10
+ id?: string;
10
11
  variant?: EmptyStateVariant;
11
12
  context?: EmptyStateContext;
12
13
  icon?: ReactNode;
@@ -24,5 +25,5 @@ export interface EmptyStateProps {
24
25
  hideSecondaryAction?: boolean;
25
26
  className?: string;
26
27
  }
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 declare function EmptyState({ id, variant, context, icon, title, description, primaryAction, secondaryAction, permissions, onGoHome, homePath, hideIcon, hideTitle, hideDescription, hidePrimaryAction, hideSecondaryAction, className, }: EmptyStateProps): import("react").JSX.Element;
28
29
  export default EmptyState;
@@ -6,6 +6,7 @@ export interface MessageAlertAction {
6
6
  disabled?: boolean;
7
7
  }
8
8
  export interface MessageAlertProps {
9
+ id?: string;
9
10
  type?: MessageAlertType;
10
11
  title?: ReactNode;
11
12
  children?: ReactNode;
@@ -16,5 +17,5 @@ export interface MessageAlertProps {
16
17
  hideIcon?: boolean;
17
18
  className?: string;
18
19
  }
19
- export declare function MessageAlert({ type, title, children, message, onClose, closeLabel, actions, hideIcon, className, }: MessageAlertProps): import("react").JSX.Element;
20
+ export declare function MessageAlert({ id, type, title, children, message, onClose, closeLabel, actions, hideIcon, className, }: MessageAlertProps): import("react").JSX.Element;
20
21
  export default MessageAlert;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export interface SystemAlertProps {
3
+ id?: string;
3
4
  /**
4
5
  * Texto accesible por defecto
5
6
  * para el botón de cierre.
@@ -9,5 +10,5 @@ export interface SystemAlertProps {
9
10
  */
10
11
  closeLabel?: string;
11
12
  }
12
- declare const SystemAlert: ({ closeLabel, }: SystemAlertProps) => React.ReactPortal | null;
13
- export { SystemAlert, };
13
+ declare const SystemAlert: ({ id, closeLabel }: SystemAlertProps) => React.ReactPortal | null;
14
+ export { SystemAlert };
@@ -37,11 +37,12 @@ export type PillsTabItem<Value extends string = string> = {
37
37
  disabled?: boolean;
38
38
  };
39
39
  export type PillsTabsProps<Value extends string = string> = {
40
+ id?: string;
40
41
  value: Value;
41
42
  items: PillsTabItem<Value>[];
42
43
  onChange: (value: Value) => void;
43
44
  className?: string;
44
45
  ariaLabel?: string;
45
46
  };
46
- export declare function PillsTabs<Value extends string = string>({ value, items, onChange, className, ariaLabel, }: PillsTabsProps<Value>): React.JSX.Element;
47
+ export declare function PillsTabs<Value extends string = string>({ id, value, items, onChange, className, ariaLabel, }: PillsTabsProps<Value>): React.JSX.Element;
47
48
  export default PillsTabs;
@@ -36,6 +36,7 @@ export type TabPanelItem<Value extends string = string> = {
36
36
  disabled?: boolean;
37
37
  };
38
38
  export type TabPanelProps<Value extends string = string> = {
39
+ id?: string;
39
40
  value: Value;
40
41
  items: TabPanelItem<Value>[];
41
42
  onChange: (value: Value) => void;
@@ -45,5 +46,5 @@ export type TabPanelProps<Value extends string = string> = {
45
46
  className?: string;
46
47
  children?: React.ReactNode;
47
48
  };
48
- export declare function TabPanel<Value extends string = string>({ value, items, onChange, onClose, closeLabel, ariaLabel, className, children, }: TabPanelProps<Value>): React.JSX.Element;
49
+ export declare function TabPanel<Value extends string = string>({ id, value, items, onChange, onClose, closeLabel, ariaLabel, className, children, }: TabPanelProps<Value>): React.JSX.Element;
49
50
  export default TabPanel;
@@ -4,6 +4,7 @@ export type BreadcrumbItem = {
4
4
  to?: string;
5
5
  };
6
6
  export interface BreadcrumbsProps {
7
+ id?: string;
7
8
  items?: BreadcrumbItem[];
8
9
  separator?: ReactNode;
9
10
  className?: string;
@@ -29,4 +30,4 @@ export interface BreadcrumbsProps {
29
30
  value: string;
30
31
  }) => ReactNode;
31
32
  }
32
- export default function Breadcrumbs({ items, separator, className, queryKeys, includeHome, homeLabel, homeTo, labelFormatter, }: BreadcrumbsProps): import("react").JSX.Element | null;
33
+ export default function Breadcrumbs({ id, items, separator, className, queryKeys, includeHome, homeLabel, homeTo, labelFormatter, }: BreadcrumbsProps): import("react").JSX.Element | null;
@@ -1,8 +1,9 @@
1
1
  import { SidebarProps } from '../../components/core/types/types';
2
2
  type ResponsiveSidebarProps = SidebarProps & {
3
+ id?: string;
3
4
  isMobile?: boolean;
4
5
  mobileOpen?: boolean;
5
6
  onCloseMobile?: () => void;
6
7
  };
7
- declare const Sidebar: ({ items, signOut, tooltips, state, setState, getWidth, isMobile, mobileOpen, onCloseMobile, }: ResponsiveSidebarProps) => import("react").JSX.Element | null;
8
+ declare const Sidebar: ({ id, items, signOut, tooltips, state, setState, getWidth, isMobile, mobileOpen, onCloseMobile, }: ResponsiveSidebarProps) => import("react").JSX.Element | null;
8
9
  export { Sidebar };
@@ -1,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { RbTableBaseRow, RbTableProps } from './types';
3
- export declare function RbTable<Row extends RbTableBaseRow = RbTableBaseRow>({ columns, rows, loading, getRowKey, title, description, toolbarLeft, toolbarRight, showToolbar, toolbarClassName, emptyText, emptyState, className, rootClassName, bodyClassName, size, fill, density, maxHeight, onRowClick, onCellContextMenu, rowClassName, getCellClassName, getRowClassName, checkboxSelection, rowSelectionModel, setRowSelectionModel, onRowSelectionModelChange, isRowSelectable, disableRowSelectionOnClick, pinnedColumns, initialState, paginate, paginationMode, paginationModel, setPaginationModel, onPaginationModelChange, rowCount, defaultRowsPerPage, rowsPerPageOptions, resultsLabel, viewAllLabel, prevAriaLabel, nextAriaLabel, footer, footerActions, hideFooter, }: RbTableProps<Row>): React.JSX.Element;
3
+ export declare function RbTable<Row extends RbTableBaseRow = RbTableBaseRow>({ id, columns, rows, loading, getRowKey, title, description, toolbarLeft, toolbarRight, showToolbar, toolbarClassName, emptyText, emptyState, className, rootClassName, bodyClassName, size, fill, density, maxHeight, onRowClick, onCellContextMenu, rowClassName, getCellClassName, getRowClassName, checkboxSelection, rowSelectionModel, setRowSelectionModel, onRowSelectionModelChange, isRowSelectable, disableRowSelectionOnClick, pinnedColumns, initialState, paginate, paginationMode, paginationModel, setPaginationModel, onPaginationModelChange, rowCount, defaultRowsPerPage, rowsPerPageOptions, resultsLabel, viewAllLabel, prevAriaLabel, nextAriaLabel, footer, footerActions, hideFooter, }: RbTableProps<Row>): React.JSX.Element;
@@ -43,11 +43,12 @@ import { default as React } from 'react';
43
43
  * - data-toolbar-actions y rbToolbarActions continúan soportados.
44
44
  */
45
45
  export type RbTableToolbarProps = {
46
+ id?: string;
46
47
  title?: React.ReactNode;
47
48
  description?: React.ReactNode;
48
49
  left?: React.ReactNode;
49
50
  right?: React.ReactNode;
50
51
  className?: string;
51
52
  };
52
- export declare function RbTableToolbar({ title, description, left, right, className, }: RbTableToolbarProps): React.JSX.Element | null;
53
+ export declare function RbTableToolbar({ id, title, description, left, right, className, }: RbTableToolbarProps): React.JSX.Element | null;
53
54
  export default RbTableToolbar;
@@ -41,7 +41,7 @@ export type RbTableBaseRow = {
41
41
  [key: string]: any;
42
42
  };
43
43
  export type RbTableDensity = "compact" | "comfortable";
44
- export type RbTableSize = "s" | "m" | "l";
44
+ export type RbTableSize = "s" | "m" | "l" | "f";
45
45
  export type RbTableAlign = "left" | "center" | "right";
46
46
  export type RbTablePinnedColumns = {
47
47
  left?: string[];
@@ -169,15 +169,15 @@ export type RbRowsPerPageOption = number | {
169
169
  label: string;
170
170
  };
171
171
  /**
172
- * Define cómo se resuelve la paginación de la tabla.
173
- *
174
- * client:
175
- * La tabla recibe todos los rows y realiza el corte internamente.
176
- *
177
- * server:
178
- * La tabla recibe solamente los rows de la página actual.
179
- * El consumidor es responsable de consultar el backend.
180
- */
172
+ * Define cómo se resuelve la paginación de la tabla.
173
+ *
174
+ * client:
175
+ * La tabla recibe todos los rows y realiza el corte internamente.
176
+ *
177
+ * server:
178
+ * La tabla recibe solamente los rows de la página actual.
179
+ * El consumidor es responsable de consultar el backend.
180
+ */
181
181
  export type RbTablePaginationMode = "client" | "server";
182
182
  /**
183
183
  * Estado actual de paginación.
@@ -189,6 +189,7 @@ export type RbTablePaginationModel = {
189
189
  pageSize: number;
190
190
  };
191
191
  export type RbTableProps<Row extends RbTableBaseRow = RbTableBaseRow> = {
192
+ id?: string;
192
193
  columns?: RbAnyTableColumn<Row>[];
193
194
  rows?: Row[];
194
195
  loading?: boolean;
@@ -218,7 +219,7 @@ export type RbTableProps<Row extends RbTableBaseRow = RbTableBaseRow> = {
218
219
  * Altura máxima del body de la tabla. Acepta el mismo formato que el ancho
219
220
  * de columnas: number => px, o cualquier string CSS válido ("20rem", "50vh", etc).
220
221
  * Si no se define, se usa el valor por defecto asociado a 'size'.
221
- * Se ignora cuando 'fill' está activo.
222
+ * Se ignora cuando 'fill' está activo o 'size' es "f".
222
223
  */
223
224
  maxHeight?: number | string;
224
225
  onRowClick?: (row: Row, index: number) => void;
@@ -2,9 +2,10 @@ import { DashboardProps } from '../../components/core/types/types';
2
2
  type AccountType = DashboardProps["account"];
3
3
  type SidebarItemsType = DashboardProps["sidebar"]["items"];
4
4
  interface TopBarProps {
5
+ id?: string;
5
6
  account: AccountType;
6
7
  sidebarItems: SidebarItemsType;
7
8
  onOpenMobile?: () => void;
8
9
  }
9
- declare const TopBar: ({ account, sidebarItems, onOpenMobile, }: TopBarProps) => import("react").JSX.Element;
10
+ declare const TopBar: ({ id, account, sidebarItems, onOpenMobile }: TopBarProps) => import("react").JSX.Element;
10
11
  export { TopBar };
@@ -1,7 +1,8 @@
1
1
  import { DashboardProps } from '../../components/core/types/types';
2
2
  type AccountType = DashboardProps["account"];
3
3
  interface TopBarUserMenuProps {
4
+ id?: string;
4
5
  account: AccountType;
5
6
  }
6
- declare const TopBarUserMenu: ({ account }: TopBarUserMenuProps) => import("react").JSX.Element;
7
+ declare const TopBarUserMenu: ({ id, account }: TopBarUserMenuProps) => import("react").JSX.Element;
7
8
  export { TopBarUserMenu };
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  type TooltipPlacement = "bottom" | "right";
3
3
  export interface TooltipProps {
4
+ id?: string;
4
5
  content: React.ReactNode;
5
6
  children: React.ReactNode;
6
7
  placement?: TooltipPlacement;
@@ -11,5 +12,5 @@ export interface TooltipProps {
11
12
  openDelay?: number;
12
13
  closeDelay?: number;
13
14
  }
14
- export default function Tooltip({ content, children, placement, multiline, disabled, triggerClassName, className, openDelay, closeDelay, }: TooltipProps): React.JSX.Element;
15
+ export default function Tooltip({ id, content, children, placement, multiline, disabled, triggerClassName, className, openDelay, closeDelay, }: TooltipProps): React.JSX.Element;
15
16
  export {};
@@ -11,6 +11,7 @@ export type BaseInputProps = {
11
11
  unstyled?: boolean;
12
12
  infoTooltip?: React.ReactNode;
13
13
  infoAriaLabel?: string;
14
+ showCounter?: boolean;
14
15
  };
15
16
  type TextInputProps = BaseInputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
16
17
  as?: "input";
@@ -20,6 +20,7 @@ export type RbContextMenuItem = {
20
20
  className?: string;
21
21
  };
22
22
  export type RbContextMenuProps = {
23
+ id?: string;
23
24
  open: boolean;
24
25
  position?: RbContextMenuPosition | null;
25
26
  x?: number | null;
@@ -36,5 +37,5 @@ export type RbContextMenuProps = {
36
37
  closeOnResize?: boolean;
37
38
  onClose: () => void;
38
39
  };
39
- export declare function RbContextMenu({ open, position, x, y, align, items, variant, ariaLabel, emptyText, className, itemClassName, closeOnClickOutside, closeOnScroll, closeOnResize, onClose, }: RbContextMenuProps): React.JSX.Element | null;
40
+ export declare function RbContextMenu({ id, open, position, x, y, align, items, variant, ariaLabel, emptyText, className, itemClassName, closeOnClickOutside, closeOnScroll, closeOnResize, onClose, }: RbContextMenuProps): React.JSX.Element | null;
40
41
  export default RbContextMenu;
@@ -4,6 +4,7 @@ type RbInlineChipFieldType = "text" | "date" | "time" | "datetime-local";
4
4
  type RbInlineChipFieldVariant = "default" | "success" | "warning" | "error" | "info" | "neutral";
5
5
  type DateSeparator = "-" | "/";
6
6
  export type RbInlineChipFieldAction = {
7
+ id?: string;
7
8
  label: React.ReactNode;
8
9
  icon?: React.ReactNode;
9
10
  helper?: React.ReactNode;
@@ -15,6 +16,7 @@ export type RbInlineChipFieldAction = {
15
16
  closeOnSelect?: boolean;
16
17
  };
17
18
  export type RbInlineChipFieldProps = {
19
+ id?: string;
18
20
  value?: string | null;
19
21
  placeholder?: string;
20
22
  type?: RbInlineChipFieldType;
@@ -45,5 +47,5 @@ export type RbInlineChipFieldProps = {
45
47
  };
46
48
  export declare function CalendarChipIcon(): React.JSX.Element;
47
49
  export declare function ClockChipIcon(): React.JSX.Element;
48
- export declare function RbInlineChipField({ value, placeholder, type, variant, dateSeparator, editable, disabled, icon, showIcon, actions, showMenu, menuVariant, onChange, onClick, className, inputClassName, ariaLabel, }: RbInlineChipFieldProps): React.JSX.Element;
50
+ export declare function RbInlineChipField({ id, value, placeholder, type, variant, dateSeparator, editable, disabled, icon, showIcon, actions, showMenu, menuVariant, onChange, onClick, className, inputClassName, ariaLabel, }: RbInlineChipFieldProps): React.JSX.Element;
49
51
  export default RbInlineChipField;
@@ -27,4 +27,10 @@ declare const meta: {
27
27
  export default meta;
28
28
  type Story = StoryObj<typeof meta>;
29
29
  export declare const Basica: Story;
30
+ export declare const Full: Story;
31
+ export declare const Vacia: Story;
32
+ export declare const VaciaMediana: Story;
33
+ export declare const VaciaGrande: Story;
34
+ export declare const VaciaFull: Story;
35
+ export declare const VaciaPersonalizada: Story;
30
36
  export declare const ConToolbarYFiltros: Story;