@amaui/style
Version:
CSS in JS styling solution
68 lines (67 loc) • 1.88 kB
TypeScript
import AmauiStyle from './AmauiStyle';
import AmauiStyleSheetManager from './AmauiStyleSheetManager';
import AmauiTheme from './AmauiTheme';
import { TMode, IOptionsRule, IValuesVersion, TStatus, TPriority, IAddRuleResponse, TValueObject } from './interfaces';
declare type TVersion = 'all' | 'static' | 'dynamic';
export interface IRuleItem {
property: string;
value: any;
}
export interface IOptionsStyle {
attributes?: Record<string, any>;
}
export interface IOptions {
version?: TVersion;
mode?: TMode;
pure?: boolean;
priority?: TPriority;
amauiTheme?: AmauiTheme;
amauiStyleSheetManager?: AmauiStyleSheetManager;
amauiStyle?: AmauiStyle;
props?: any;
style?: IOptionsStyle;
rule?: IOptionsRule;
name?: string;
}
declare class AmauiStyleSheet {
value?: TValueObject;
options: IOptions;
id: string;
version: TVersion;
mode: TMode;
pure: boolean;
priority: TPriority;
amauiTheme: AmauiTheme;
amauiStyleSheetManager: AmauiStyleSheetManager;
amauiStyle: AmauiStyle;
status: TStatus;
element: HTMLStyleElement;
sheet: CSSStyleSheet;
domElementForTesting: HTMLDivElement;
private props_;
values: {
css: string;
};
rules: Array<IRuleItem>;
names: {
classNames: {};
classes: {};
keyframes: {};
styles: (...args: string[]) => string;
};
constructor(value?: TValueObject, options?: IOptions);
get props(): any;
set props(props: any);
get response(): IValuesVersion;
get css(): string;
private get sort();
private init;
addRule(value: any, property_?: string, add?: boolean): IAddRuleResponse;
add(props?: any): void;
update(value: any): void;
remove(): void;
private updateProps;
private propsAreNew;
private makeRule;
}
export default AmauiStyleSheet;