import ControlElement from "./ControlElement"; import Component from "../Component"; import { ComponentFactory, ValueOrAsync } from "../ComponentFactory"; /** Represents an element with a vertical stack of elements within (not shrinkwrapped by default) */ export declare class Stack extends ControlElement { /** Create a stack element with given content, if any */ constructor(content?: ControlElement[]); /** Initialize a stack factory with given values */ static with(values: Stack.Initializer): ComponentFactory; /** Initialize a stack factory with given elements */ static withContent(content: ComponentFactory.SpecList): ComponentFactory; /** Initialize with given (observable) values; returns this */ initializeWith: (values: Stack.Initializer) => this; /** Initialize with given (observable) content; returns this */ initializeWithContent(content: ComponentFactory.SpecList): this; /** Array of elements that go into this stack (observed) */ content: (ControlElement | null)[]; /** Spacing between elements (CSS value, observed), defaults to Row.DEFAULT_SPACING, i.e. 0.5rem */ spacing: string; /** Horizontal alignment of fixed-width elements */ horizontalAlign: Stack.Alignment; /** Returns an array of directly contained UI components (observable) */ getChildren(): Component[]; private _wrappers; } export declare namespace Stack { /** Stack content horizontal alignment options */ enum Alignment { /** Alignment at the start (left) */ Start = 0, /** Horizontal center alignment */ Center = 1, /** Alignment at the end (right) */ End = 2, } } export declare namespace Stack { /** Initializer for .with({ ... }) */ interface Initializer extends ControlElement.Initializer { /** Property initializer */ content: ComponentFactory.SpecList; /** Property initializer */ spacing?: ValueOrAsync; /** Property initializer */ horizontalAlign?: ValueOrAsync; } } /** A stack element without inner element spacing (not shrinkwrapped by default) */ export declare class CloseStack extends Stack { spacing: string; } export default Stack;