@als-tp/als-react-ts-ui
Version:
A comprehensive React TypeScript UI component library built with Base UI by ALSInnovation
68 lines • 2.29 kB
TypeScript
import React from "react";
type AsidePosition = "left" | "right";
type HeaderBehavior = "fixed" | "sticky" | "relative";
type AsideVariant = "fixed" | "relative";
type FooterVariant = "fixed" | "sticky" | "relative";
interface MainLayoutProps {
children?: React.ReactNode;
className?: string;
asidePosition?: AsidePosition;
}
interface MainLayoutHeaderProps {
children: React.ReactNode;
className?: string;
behavior?: HeaderBehavior;
scrollThreshold?: number;
elevated?: boolean;
transparent?: boolean;
height?: number | string;
}
interface MainLayoutAsideProps {
children: React.ReactNode;
className?: string;
collapsed?: boolean;
hidden?: boolean;
variant?: AsideVariant;
width?: number | string;
collapsedWidth?: number | string;
resizable?: boolean;
minWidth?: number;
maxWidth?: number;
onWidthChange?: (width: number) => void;
overlay?: boolean;
onOverlayClose?: () => void;
/** Content to show when collapsed (icons only) */
collapsedContent?: React.ReactNode;
/** Animation duration in ms */
transitionDuration?: number;
/** Whether aside should span full viewport height */
fullHeight?: boolean;
}
interface MainLayoutMainProps {
children: React.ReactNode;
className?: string;
maxWidth?: number | string;
centered?: boolean;
padding?: "none" | "sm" | "md" | "lg" | "xl";
}
interface MainLayoutFooterProps {
children: React.ReactNode;
className?: string;
variant?: FooterVariant;
height?: number | string;
}
interface LayoutContextValue {
asidePosition: AsidePosition;
asideHidden: boolean;
asideCollapsed: boolean;
asideFullHeight: boolean;
headerBehavior: HeaderBehavior;
scrollY: number;
mainRef: React.RefObject<HTMLElement | null> | null;
registerAside: (collapsed: boolean, hidden: boolean, fullHeight: boolean) => void;
registerHeader: (behavior: HeaderBehavior) => void;
}
export declare const useLayout: () => LayoutContextValue;
export declare const MainLayout: any;
export type { MainLayoutProps, MainLayoutHeaderProps, MainLayoutAsideProps, MainLayoutMainProps, MainLayoutFooterProps, AsidePosition, HeaderBehavior, AsideVariant, FooterVariant, };
//# sourceMappingURL=index.d.ts.map