import { FormAssociatedCSSBoxModel } from "./css-box-model.form-associated.js"; export declare enum expandableSection { margin = "marginOpen", border = "borderOpen", padding = "paddingOpen" } /** * Utility class for storing all four side width values of a box. * Also has helper functions for parsing and building margin, padding and border-width type css values. */ declare class CSSBox { top: string; bottom: string; left: string; right: string; /** * Resets values to default empty strings. */ private resetValues; hasValues(): boolean; /** * Sets the values based on a 1-4 part css value string * @param value A string value with 1 to 4 parts seperated by spaces (i.e: "10px 20px", "1em 2em 3em 4em") */ setFromCSSValue(value: string): void; /** * Converts the values into the most efficient css string. * @returns A string containing the the 1 to 4 parts of a margin, padding, border-width type style or an empty string * if the values can not be correctly represented (one of the values is empty). */ getCSSShorthandFourValues(): string; } declare class BorderValue { originalValue: string; lengthValue: string; } declare class BorderValues { all: BorderValue; top: BorderValue; left: BorderValue; right: BorderValue; bottom: BorderValue; } /** * Helper class for managing the text field values for the BoxModel UI. The border property should be used for the * "border" shorthand style values (i.e. "border:1px solid red"). It will attempt to identify the length part of the value * and set the borderWidth property accordingly. The border getter will return the original border value with the length * part replaced with the new value in borderWidth if all four values are the same, otherwise it returns an empty string. */ declare class CSSBoxModelValues { margin: CSSBox; borderWidth: CSSBox; padding: CSSBox; width: string; height: string; borderValues: BorderValues; get border(): string; set border(value: string); get borderTop(): string; set borderTop(value: string); get borderLeft(): string; set borderLeft(value: string); get borderRight(): string; set borderRight(value: string); get borderBottom(): string; set borderBottom(value: string); private getBorderValue; private setBorderValue; } /** * A Box Model Custom HTML Element. * * @public */ export declare class CSSBoxModel extends FormAssociatedCSSBoxModel { uiValues: CSSBoxModelValues; marginOpen: boolean; private marginStick; borderOpen: boolean; private borderStick; paddingOpen: boolean; private paddingStick; valueChanged(previous: any, next: any): void; handleOpenButtonClick: (section: expandableSection) => void; private cssPropertyDictionary; private internalChange; /** * Handle changes made in the UI text fields * @param param The css style being modified. * @param e The event object. * @returns false */ handleInputChange: (param: string, e: Event) => boolean; /** * Parses a css style string and sets the uiValues values. * @param style A css style string (i.e. "margin:0;padding:10px 20px;") */ private parseCSSStyles; /** * Builds a css style string based on the original styles passed to parseCSSStyles() and the values in uiValues. * Any styles in the original string not modified by the ui will be retained. * @returns A css style string representing the current state of the UI. */ private buildCSSStyles; } export {};