@codeplex-sac/navegacion 0.0.10

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.
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ export interface CodeplexInfoUsuario {
3
+ nombre: string;
4
+ rol?: string;
5
+ avatar?: string;
6
+ email?: string;
7
+ }
8
+ export interface CodeplexEnlaceNavegacion {
9
+ id: string;
10
+ etiqueta: string;
11
+ href?: string;
12
+ activo?: boolean;
13
+ deshabilitado?: boolean;
14
+ alHacerClick?: () => void;
15
+ }
16
+ export interface CodeplexBarraNavegacionProps {
17
+ textoLogo?: string;
18
+ srcLogo?: string;
19
+ enlaces?: CodeplexEnlaceNavegacion[];
20
+ usuario?: CodeplexInfoUsuario;
21
+ posicion?: 'fixed' | 'sticky' | 'static';
22
+ children?: React.ReactNode;
23
+ }
24
+ export declare const CodeplexBarraNavegacion: ({ textoLogo, srcLogo, enlaces, usuario, posicion, children, }: CodeplexBarraNavegacionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { DrawerProps, SwipeableDrawerProps } from '@mui/material';
3
+ export interface CodeplexCajonLateralProps extends Omit<DrawerProps, 'open' | 'onClose' | 'anchor' | 'PaperProps' | 'children'> {
4
+ deslizable?: boolean;
5
+ hijos?: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ ancho?: number | string;
8
+ cabecera?: React.ReactNode;
9
+ pie?: React.ReactNode;
10
+ mostrarIconoCierre?: boolean;
11
+ alAbrir?: SwipeableDrawerProps['onOpen'];
12
+ alCerrar?: (event: React.SyntheticEvent | object, reason: 'backdropClick' | 'escapeKeyDown' | 'closeIcon') => void;
13
+ abierto?: boolean;
14
+ anclaje?: DrawerProps['anchor'];
15
+ propsPapel?: DrawerProps['PaperProps'];
16
+ }
17
+ export declare const CodeplexCajonLateral: ({ deslizable, ancho, cabecera, pie, hijos, children, alAbrir, alCerrar, abierto, anclaje, mostrarIconoCierre, propsPapel, slotProps, sx, ...props }: CodeplexCajonLateralProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { LinkProps } from '@mui/material';
3
+ export interface CodeplexEnlaceProps extends Omit<LinkProps, 'underline' | 'children'> {
4
+ componente?: React.ElementType;
5
+ subrayado?: 'none' | 'hover' | 'always';
6
+ hijos?: React.ReactNode;
7
+ children?: React.ReactNode;
8
+ alHacerClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
9
+ }
10
+ export declare const CodeplexEnlace: ({ componente, subrayado, hijos, children, alHacerClick, onClick, ...props }: CodeplexEnlaceProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { SpeedDialProps, SpeedDialActionProps } from '@mui/material';
3
+ export interface CodeplexAccionMarcacionRapida extends Omit<SpeedDialActionProps, 'icon' | 'tooltipTitle' | 'onClick'> {
4
+ icono: React.ReactNode;
5
+ tituloTooltip: React.ReactNode;
6
+ alHacerClick?: SpeedDialActionProps['onClick'];
7
+ icon?: React.ReactNode;
8
+ tooltipTitle?: React.ReactNode;
9
+ onClick?: SpeedDialActionProps['onClick'];
10
+ }
11
+ export interface CodeplexMarcacionRapidaProps extends Omit<SpeedDialProps, 'ariaLabel' | 'icon' | 'children'> {
12
+ acciones?: CodeplexAccionMarcacionRapida[];
13
+ etiquetaAria: string;
14
+ icono?: React.ReactNode;
15
+ hijos?: React.ReactNode;
16
+ children?: React.ReactNode;
17
+ }
18
+ export declare const CodeplexMarcacionRapida: ({ acciones, icono, etiquetaAria, hijos, children, ...props }: CodeplexMarcacionRapidaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { MenuProps, MenuItemProps } from '@mui/material';
3
+ export interface CodeplexElementoMenu extends Omit<MenuItemProps, 'children' | 'onClick'> {
4
+ etiqueta?: React.ReactNode;
5
+ icono?: React.ReactNode;
6
+ alHacerClick?: (event: React.MouseEvent<HTMLLIElement>) => void;
7
+ label?: React.ReactNode;
8
+ icon?: React.ReactNode;
9
+ onClick?: (event: React.MouseEvent<HTMLLIElement>) => void;
10
+ }
11
+ export interface CodeplexMenuProps extends Omit<MenuProps, 'open' | 'onClose' | 'anchorEl' | 'children'> {
12
+ elementos?: CodeplexElementoMenu[];
13
+ elementoAnclaje?: MenuProps['anchorEl'];
14
+ abierto: boolean;
15
+ alCerrar?: MenuProps['onClose'];
16
+ hijos?: React.ReactNode;
17
+ children?: React.ReactNode;
18
+ open?: boolean;
19
+ onClose?: MenuProps['onClose'];
20
+ anchorEl?: MenuProps['anchorEl'];
21
+ }
22
+ export declare const CodeplexMenu: ({ elementos, hijos, children, elementoAnclaje, anchorEl, abierto, open, alCerrar, onClose, ...props }: CodeplexMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { BreadcrumbsProps } from '@mui/material';
3
+ export interface CodeplexElementoMigasPan {
4
+ etiqueta?: React.ReactNode;
5
+ href?: string;
6
+ icono?: React.ReactElement;
7
+ label?: string;
8
+ icon?: React.ReactElement;
9
+ }
10
+ export interface CodeplexMigasPanProps extends Omit<BreadcrumbsProps, 'separator' | 'children'> {
11
+ elementos: CodeplexElementoMigasPan[];
12
+ rutaInicio?: string;
13
+ colorActivo?: string;
14
+ separador?: React.ReactNode;
15
+ hijos?: React.ReactNode;
16
+ children?: React.ReactNode;
17
+ items?: CodeplexElementoMigasPan[];
18
+ homeRoute?: string;
19
+ activeColor?: string;
20
+ separator?: React.ReactNode;
21
+ }
22
+ export declare const CodeplexMigasPan: ({ elementos, items, rutaInicio, homeRoute, colorActivo, activeColor, separador, separator, hijos, children, ...props }: CodeplexMigasPanProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CodeplexMigasPan } from './migas-pan';
3
+ declare const meta: Meta<typeof CodeplexMigasPan>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CodeplexMigasPan>;
6
+ export declare const Basico: Story;
7
+ export declare const ConIconos: Story;
8
+ export declare const Largo: Story;
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ import { BottomNavigationProps, SxProps, Theme } from '@mui/material';
3
+ export interface CodeplexElementoNavegacionInferior {
4
+ etiqueta: string | React.ReactNode;
5
+ icono: React.ReactNode;
6
+ valor: string | number;
7
+ label?: string | React.ReactNode;
8
+ icon?: React.ReactNode;
9
+ value?: string | number;
10
+ }
11
+ export interface CodeplexNavegacionInferiorProps extends Omit<BottomNavigationProps, 'onChange' | 'value' | 'children'> {
12
+ elementos: CodeplexElementoNavegacionInferior[];
13
+ fijo?: boolean;
14
+ conPapel?: boolean;
15
+ sxContenedor?: SxProps<Theme>;
16
+ alCambiar?: (event: React.SyntheticEvent, nuevoValor: string | number) => void;
17
+ valor?: string | number;
18
+ hijos?: React.ReactNode;
19
+ children?: React.ReactNode;
20
+ items?: CodeplexElementoNavegacionInferior[];
21
+ fixed?: boolean;
22
+ withPaper?: boolean;
23
+ onChange?: (event: React.SyntheticEvent, nuevoValor: string | number) => void;
24
+ value?: string | number;
25
+ }
26
+ export declare const CodeplexNavegacionInferior: ({ elementos, items, fijo, fixed, conPapel, withPaper, sxContenedor, sx, alCambiar, onChange, valor, value, hijos, children, ...props }: CodeplexNavegacionInferiorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { PaginationProps, SxProps, Theme } from '@mui/material';
3
+ export interface CodeplexPaginacionProps extends Omit<PaginationProps, 'count' | 'page' | 'onChange' | 'sx'> {
4
+ total?: number;
5
+ pagina?: number;
6
+ alCambiar?: (event: React.ChangeEvent<unknown>, page: number) => void;
7
+ centrado?: boolean;
8
+ count?: number;
9
+ page?: number;
10
+ onChange?: (event: React.ChangeEvent<unknown>, page: number) => void;
11
+ sx?: SxProps<Theme>;
12
+ }
13
+ export declare const CodeplexPaginacion: ({ total, count, pagina, page, alCambiar, onChange, centrado, sx, ...props }: CodeplexPaginacionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CodeplexPaginacion } from './paginacion';
3
+ declare const meta: Meta<typeof CodeplexPaginacion>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CodeplexPaginacion>;
6
+ export declare const Basico: Story;
7
+ export declare const Variantes: Story;
8
+ export declare const Grande: Story;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ export type LadoPanelLateral = 'izquierda' | 'derecha';
3
+ export type TamanoPanelLateral = 'pequeno' | 'mediano' | 'grande' | 'enorme' | 'completo' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
+ export interface CodeplexPanelLateralProps {
5
+ abierto: boolean;
6
+ lado?: LadoPanelLateral;
7
+ tamano?: TamanoPanelLateral;
8
+ titulo?: string;
9
+ descripcion?: string;
10
+ mostrarCierre?: boolean;
11
+ cerrarAlClickFondo?: boolean;
12
+ alCerrar?: () => void;
13
+ children?: React.ReactNode;
14
+ pie?: React.ReactNode;
15
+ }
16
+ export declare const CodeplexPanelLateral: ({ abierto, lado, tamano, titulo, descripcion, mostrarCierre, cerrarAlClickFondo, alCerrar, children, pie, }: CodeplexPanelLateralProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { StepperProps } from '@mui/material';
3
+ export interface CodeplexPaso {
4
+ etiqueta: string;
5
+ descripcion?: string;
6
+ opcional?: boolean;
7
+ error?: boolean;
8
+ completado?: boolean;
9
+ label?: string;
10
+ description?: string;
11
+ optional?: boolean;
12
+ completed?: boolean;
13
+ }
14
+ export interface CodeplexPasosProps extends Omit<StepperProps, 'activeStep' | 'orientation' | 'children'> {
15
+ pasos?: CodeplexPaso[];
16
+ pasoActivo: number;
17
+ orientacion?: StepperProps['orientation'];
18
+ etiquetasAlternativas?: boolean;
19
+ noLineal?: boolean;
20
+ alHacerClickEnPaso?: (indice: number) => void;
21
+ hijos?: React.ReactNode;
22
+ children?: React.ReactNode;
23
+ activeStep?: number;
24
+ orientation?: StepperProps['orientation'];
25
+ alternativeLabel?: boolean;
26
+ nonLinear?: boolean;
27
+ onStepClick?: (index: number) => void;
28
+ }
29
+ export declare const CodeplexPasos: ({ pasos, pasoActivo, activeStep, orientacion, orientation, etiquetasAlternativas, alternativeLabel, noLineal, nonLinear, alHacerClickEnPaso, onStepClick, hijos, children, ...props }: CodeplexPasosProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CodeplexPasos } from './pasos';
3
+ declare const meta: Meta<typeof CodeplexPasos>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CodeplexPasos>;
6
+ export declare const Basico: Story;
7
+ export declare const Completado: Story;
8
+ export declare const Controlado: Story;
9
+ export declare const Vertical: Story;
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { TabsProps } from '@mui/material';
3
+ export interface CodeplexElementoPestana {
4
+ etiqueta: string;
5
+ icono?: React.ReactElement;
6
+ valor: string | number;
7
+ deshabilitado?: boolean;
8
+ label?: string;
9
+ icon?: React.ReactElement;
10
+ value?: string | number;
11
+ disabled?: boolean;
12
+ }
13
+ export interface CodeplexPestanasProps extends Omit<TabsProps, 'value' | 'onChange' | 'children'> {
14
+ elementos?: CodeplexElementoPestana[];
15
+ valor?: string | number;
16
+ alCambiar?: (event: React.SyntheticEvent, nuevoValor: string | number) => void;
17
+ centrado?: boolean;
18
+ posicionIcono?: 'top' | 'bottom' | 'start' | 'end';
19
+ hijos?: React.ReactNode;
20
+ children?: React.ReactNode;
21
+ items?: CodeplexElementoPestana[];
22
+ value?: string | number;
23
+ onChange?: (event: React.SyntheticEvent, nuevoValor: string | number) => void;
24
+ centered?: boolean;
25
+ iconPosition?: 'top' | 'bottom' | 'start' | 'end';
26
+ }
27
+ export declare const CodeplexPestanas: ({ elementos, items, valor, value, alCambiar, onChange, centrado, centered, posicionIcono, iconPosition, hijos, children, sx, ...props }: CodeplexPestanasProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { CodeplexPestanas } from './pestanas';
3
+ declare const meta: Meta<typeof CodeplexPestanas>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CodeplexPestanas>;
6
+ export declare const Basico: Story;
7
+ export declare const Controlado: Story;
8
+ export declare const AnchoCompleto: Story;
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@codeplex-sac/navegacion",
3
+ "version": "0.0.10",
4
+ "type": "module",
5
+ "main": "./index.js",
6
+ "module": "./index.js",
7
+ "types": "./index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./index.d.ts",
11
+ "import": "./index.js",
12
+ "require": "./index.js"
13
+ }
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "peerDependencies": {
19
+ "react": "^19.0.0",
20
+ "react-dom": "^19.0.0",
21
+ "react-router-dom": "^6.0.0 || ^7.0.0"
22
+ },
23
+ "dependencies": {
24
+ "@mui/icons-material": "^7.3.6",
25
+ "@mui/material": "^7.3.6"
26
+ }
27
+ }