import Async from "typescene-async"; import ComponentRenderOutput from "./Components/ComponentRenderOutput"; /** Encapsulates DOM element CSS styles, classes, and hidden/selected attributes */ export declare class Style { /** Add global CSS styles for given selectors; if important flag is set, all rules get the !important suffix; if a wrapper selector is given, the entire rule set is wrapped in an additional block (e.g. for @keyframes) */ static applyGlobalCSS(selectors: { [selector: string]: Style.StyleSet | Style | string; }, important?: boolean, wrapper?: string): void; /** Load external stylesheet(s) by URL; returns a promise that resolves after the style sheet(s) have been applied (or after a 1s timeout for browsers that do not support onload event for link elements) */ static loadExternalCSS(...urls: string[]): PromiseLike; /** Set the global root-em unit size in pixels or using a CSS value string (default overridden at 16px, unless in turn overridden by e.g. Bootstrap loaded through .loadExternalCSS(...), Bootstrap 3 uses 10px; alternatively use `setTextSize(...)` to adjust text size only */ static setCSSRemSize(px: number | string): void; /** Set the global font size for text within all containers (CSS value; defaults to 1rem, so alternatively use `setCSSRemSize(...)` to set the base value, which is recommended for use with Bootstrap 4 when needing to change font size) */ static setTextSize(cssSize: string): void; /** Get the global font size for text within containers (CSS value) */ static getTextSize(): string; /** Set the class name globally applied to selected list items (in addition to the `selected` custom DOM attribute) */ static setSelectionClass(className: string): void; /** Get the class name globally applied to selected list items (if any) */ static getSelectionClass(): string; /** Create a Style instance that only contains given class name(s); alias for new Style(undefined, *className*) */ static withClass(className: string): Style; /** Create a new instance with given styles */ constructor(styles?: Style.StyleSet, className?: string, hidden?: boolean); /** Add the given class name(s); returns this */ addClass(className: string): this; /** Remove the given class name or any class names that match the given regular expression pattern (only if set directly on this Style instance, does not work on overrides); returns this */ removeClass(className: string | RegExp): this; /** Remove (all) existing CSS class name(s) and use given class(es); returns this */ setClass(className: string): this; /** Return the full CSS text for all properties set/overridden */ getCSSText(): string; /** Return explicitly set value for given property */ get(propertyName: string): any; /** Add the "hidden" attribute; returns this */ hide(): this; /** Remove the "hidden" attribute; returns this */ show(): this; /** Add the "selected" attribute; returns this */ select(): this; /** Remove the "selected" attribute; returns this */ deselect(): this; /** Set a style property; if given value is observable, styles will also be applied on change (but does not watch directly); returns this */ set(cssProperty: string, value: string | Async.ObservableValue): any; /** Set multiple style properties using values in given object in alphabetical order (e.g. marginTop after margin); if given object is an Observable, styles will also be applied on change (but does not watch directly); returns this */ set(obj: Style.StyleSet | Async.ObservableObject): any; /** Override styles and classes with those from given Style instance; returns this */ override(style: Style | Style.StyleSet | Async.ObservableObject | Async.ObservableValue