/** * ZUI Stack Component * Arranges children in a line (vertical or horizontal) */ import { LayoutComponent, LayoutComponentProps } from '../core/Component'; import type { Rect, Direction, Alignment, JustifyContent, Size, PaddingInput } from '../core/types'; export interface StackProps extends LayoutComponentProps { /** Stack direction */ direction?: Direction; /** Spacing between children */ spacing?: number; /** Cross-axis alignment */ alignment?: Alignment; /** Main-axis content distribution */ justifyContent?: JustifyContent; /** Container width */ width?: Size; /** Container height */ height?: Size; /** Internal padding */ padding?: PaddingInput; } /** * Stack component for arranging children in a line * * @example * ```ts * // Vertical stack * const vstack = new Stack({ * direction: 'vertical', * spacing: 8, * alignment: 'center', * children: [ * new Text({ text: 'Item 1' }), * new Text({ text: 'Item 2' }), * new Text({ text: 'Item 3' }), * ], * }); * * // Horizontal stack * const hstack = new Stack({ * direction: 'horizontal', * spacing: 16, * justifyContent: 'space-between', * children: [ * new Button({ label: 'Cancel' }), * new Button({ label: 'OK' }), * ], * }); * ``` */ export declare class Stack extends LayoutComponent { readonly type = "Stack"; protected getDefaultProps(): Partial; protected calculateLayout(parentRect?: Rect): void; protected createWidgets(): void; protected updateWidgets(): void; protected destroyWidgets(): void; } /** * Create a Stack component */ export declare function createStack(props: StackProps): Stack; /** * Create a vertical Stack (VStack) */ export declare function VStack(props: Omit): Stack; /** * Create a horizontal Stack (HStack) */ export declare function HStack(props: Omit): Stack; //# sourceMappingURL=Stack.d.ts.map