@codeplex-sac/layout 0.0.1

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,28 @@
1
+ import { default as React } from 'react';
2
+ export interface CodeplexAccordionItem {
3
+ id: string;
4
+ title: string;
5
+ subtitle?: string;
6
+ /** Contenido del panel: puede ser texto o JSX */
7
+ content: React.ReactNode;
8
+ iconLeft?: React.ReactNode;
9
+ disabled?: boolean;
10
+ }
11
+ export type AccordionVariant = 'simple' | 'bordered' | 'splitted';
12
+ export interface CodeplexAccordionProps {
13
+ items: CodeplexAccordionItem[];
14
+ /** Si true, permite múltiples paneles abiertos a la vez */
15
+ multiple?: boolean;
16
+ /** Estilo visual del acordeón */
17
+ variant?: AccordionVariant;
18
+ /** IDs de los items abiertos inicialmente */
19
+ defaultOpenIds?: string[];
20
+ /** Clase CSS adicional para el contenedor */
21
+ className?: string;
22
+ /** Callback al cambiar el estado */
23
+ onChange?: (openIds: string[]) => void;
24
+ }
25
+ /**
26
+ * Accordion profesional con animaciones Grid y múltiples variantes.
27
+ */
28
+ export declare const CodeplexAccordion: ({ items, multiple, variant, defaultOpenIds, onChange, className, }: CodeplexAccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { BoxProps as MuiBoxProps } from '@mui/material';
2
+ export interface CodeplexBoxProps extends MuiBoxProps {
3
+ /**
4
+ * Shorcut to make the box a flex container with content centered (vertical & horizontal).
5
+ */
6
+ centered?: boolean;
7
+ /**
8
+ * Shortcut to set width: 100vw and height: 100vh
9
+ */
10
+ fullScreen?: boolean;
11
+ /**
12
+ * Shortcut for display: 'flex', flexDirection: 'row'
13
+ */
14
+ flexRow?: boolean;
15
+ /**
16
+ * Shortcut for display: 'flex', flexDirection: 'column'
17
+ */
18
+ flexCol?: boolean;
19
+ }
20
+ export declare const CodeplexBox: ({ centered, fullScreen, flexRow, flexCol, sx, ...props }: CodeplexBoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export type ColSize = boolean | 'auto' | number | string;
3
+ export interface CodeplexColProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ xs?: ColSize;
5
+ sm?: ColSize;
6
+ md?: ColSize;
7
+ lg?: ColSize;
8
+ xl?: ColSize;
9
+ xxl?: ColSize;
10
+ tag?: React.ElementType;
11
+ }
12
+ export declare const CodeplexCol: ({ xs, sm, md, lg, xl, xxl, tag: Tag, className, children, ...props }: CodeplexColProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { ContainerProps as MuiContainerProps } from '@mui/material';
2
+ export interface CodeplexContainerProps extends MuiContainerProps {
3
+ /**
4
+ * If true, the container will be fluid (maxWidth={false}).
5
+ */
6
+ fluid?: boolean;
7
+ /**
8
+ * If true, makes the container full height (100vh) and centers content.
9
+ */
10
+ pageCentered?: boolean;
11
+ }
12
+ export declare const CodeplexContainer: ({ fluid, pageCentered, sx, maxWidth, ...props }: CodeplexContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { default as React } from 'react';
2
+ export type CodeplexDrawerSide = 'left' | 'right';
3
+ export type CodeplexDrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
+ export interface CodeplexDrawerProps {
5
+ /** Estado de visibilidad */
6
+ open: boolean;
7
+ /** Lado desde donde aparece */
8
+ side?: CodeplexDrawerSide;
9
+ /** Ancho del panel */
10
+ size?: CodeplexDrawerSize;
11
+ /** Título del panel */
12
+ title?: string;
13
+ /** Descripción o subtítulo */
14
+ description?: string;
15
+ /** Mostrar botón de cierre */
16
+ showClose?: boolean;
17
+ /** Cerrar al hacer clic fuera */
18
+ closeOnOverlayClick?: boolean;
19
+ /** Cerrar al presionar ESC */
20
+ closeOnEsc?: boolean;
21
+ /** Clases adicionales */
22
+ className?: string;
23
+ /** Callback para cerrar */
24
+ onClose?: () => void;
25
+ /** Contenido principal */
26
+ children?: React.ReactNode;
27
+ /** Contenido del footer */
28
+ footer?: React.ReactNode;
29
+ }
30
+ /**
31
+ * Panel deslizante lateral (Drawer / Off-canvas).
32
+ * Soporta animaciones, múltiples tamaños y accesibilidad.
33
+ */
34
+ export declare const CodeplexDrawer: ({ open, side, size, title, description, showClose, closeOnOverlayClick, closeOnEsc, className, onClose, children, footer, }: CodeplexDrawerProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface CodeplexFooterLink {
3
+ label: string;
4
+ href: string;
5
+ }
6
+ export interface CodeplexFooterProps extends React.HTMLAttributes<HTMLElement> {
7
+ copyright?: string;
8
+ links?: CodeplexFooterLink[];
9
+ socialLinks?: {
10
+ facebook?: string;
11
+ twitter?: string;
12
+ github?: string;
13
+ linkedin?: string;
14
+ };
15
+ sidebarCollapsed?: boolean;
16
+ }
17
+ export declare const CodeplexFooter: ({ copyright, links, socialLinks, sidebarCollapsed, className, children, ...props }: CodeplexFooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { GridProps as MuiGridProps } from '@mui/material';
2
+ export interface CodeplexGridProps extends MuiGridProps {
3
+ /**
4
+ * If true (and container is true), centers items via justifyContent="center" and alignItems="center".
5
+ */
6
+ centered?: boolean;
7
+ }
8
+ export declare const CodeplexGrid: ({ centered, sx, ...props }: CodeplexGridProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ export interface CodeplexBreadcrumb {
3
+ label: string;
4
+ href?: string;
5
+ onClick?: () => void;
6
+ }
7
+ export interface CodeplexUserInfo {
8
+ name: string;
9
+ email?: string;
10
+ role?: string;
11
+ avatar?: string;
12
+ }
13
+ export interface CodeplexHeaderProps extends React.HTMLAttributes<HTMLElement> {
14
+ title?: string;
15
+ breadcrumbs?: CodeplexBreadcrumb[];
16
+ user?: CodeplexUserInfo;
17
+ showSearch?: boolean;
18
+ onSearch?: (query: string) => void;
19
+ onNotifications?: () => void;
20
+ onProfile?: () => void;
21
+ notificationCount?: number;
22
+ sidebarCollapsed?: boolean;
23
+ }
24
+ export declare const CodeplexHeader: ({ title, breadcrumbs, user, showSearch, onSearch, onNotifications, onProfile, notificationCount, sidebarCollapsed, className, children, ...props }: CodeplexHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { ImageListProps as MuiImageListProps, ImageListItemProps as MuiImageListItemProps, ImageListItemBarProps as MuiImageListItemBarProps } from '@mui/material';
2
+ export interface CodeplexImageListProps extends MuiImageListProps {
3
+ }
4
+ export interface CodeplexImageListItemProps extends MuiImageListItemProps {
5
+ }
6
+ export interface CodeplexImageListItemBarProps extends MuiImageListItemBarProps {
7
+ }
8
+ export declare const CodeplexImageList: (props: CodeplexImageListProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const CodeplexImageListItem: (props: CodeplexImageListItemProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const CodeplexImageListItemBar: (props: CodeplexImageListItemBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare function Layout(): import("react/jsx-runtime").JSX.Element;
2
+ export default Layout;
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { CodeplexUserInfo } from '../header/header';
3
+ export interface CodeplexNavbarLink {
4
+ id: string;
5
+ label: string;
6
+ href?: string;
7
+ active?: boolean;
8
+ disabled?: boolean;
9
+ onClick?: () => void;
10
+ }
11
+ export interface CodeplexNavbarProps {
12
+ logoText?: string;
13
+ logoSrc?: string;
14
+ links?: CodeplexNavbarLink[];
15
+ user?: CodeplexUserInfo;
16
+ position?: 'fixed' | 'sticky' | 'static';
17
+ className?: string;
18
+ children?: React.ReactNode;
19
+ }
20
+ export declare const CodeplexNavbar: ({ logoText, logoSrc, links, user, position, className, children, }: CodeplexNavbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface CodeplexRowProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ noGutters?: boolean;
4
+ align?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
5
+ justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
6
+ tag?: React.ElementType;
7
+ }
8
+ export declare const CodeplexRow: ({ noGutters, align, justify, tag: Tag, className, children, ...props }: CodeplexRowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { CodeplexUserInfo } from '../header/header';
3
+ export interface CodeplexMenuItem {
4
+ id: string;
5
+ label: string;
6
+ icon?: React.ReactNode;
7
+ href?: string;
8
+ active?: boolean;
9
+ disabled?: boolean;
10
+ badge?: string;
11
+ children?: CodeplexMenuItem[];
12
+ onClick?: () => void;
13
+ }
14
+ export interface CodeplexSidebarProps {
15
+ items: CodeplexMenuItem[];
16
+ user?: CodeplexUserInfo;
17
+ logo?: string;
18
+ logoText?: string;
19
+ collapsed?: boolean;
20
+ autoCloseOnNavigate?: boolean;
21
+ onToggle?: (collapsed: boolean) => void;
22
+ onNavigate?: (href: string) => void;
23
+ onLogout?: () => void;
24
+ footer?: boolean;
25
+ children?: React.ReactNode;
26
+ }
27
+ export declare const CodeplexSidebar: ({ items, user, logo, logoText, collapsed, autoCloseOnNavigate, onToggle, onNavigate, onLogout, footer, children, }: CodeplexSidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { StackProps as MuiStackProps } from '@mui/material';
2
+ export interface CodeplexStackProps extends MuiStackProps {
3
+ /**
4
+ * Centers children horizontally and vertically.
5
+ */
6
+ centered?: boolean;
7
+ /**
8
+ * Applies justifyContent: 'space-between'
9
+ */
10
+ between?: boolean;
11
+ }
12
+ export declare const CodeplexStack: ({ centered, between, sx, alignItems, justifyContent, ...props }: CodeplexStackProps) => import("react/jsx-runtime").JSX.Element;
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@codeplex-sac/layout",
3
+ "version": "0.0.1",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./index.d.ts",
9
+ "import": "./index.mjs",
10
+ "require": "./index.js"
11
+ }
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "peerDependencies": {
17
+ "react": "^19.0.0",
18
+ "react-dom": "^19.0.0",
19
+ "react-router-dom": "^6.0.0 || ^7.0.0"
20
+ }
21
+ }