UNPKG

2.88 kBTypeScriptView Raw
1import { CoreTypes } from '../../core-types';
2import { LinearGradient } from './linear-gradient';
3import { Color } from '../../color';
4import { CSSShadow } from './css-shadow';
5/**
6 * Flags used to hint the background handler if it has to clear a specific property
7 *
8 * Flags can be combined with the | operator
9 * for example: BackgroundClearFlags.CLEAR_BACKGROUND_COLOR | BackgroundClearFlags.CLEAR_BOX_SHADOW
10 *
11 * Flags can be checked for using the & operator
12 * for example: if(clearFlags & BackgroundClearFlags.CLEAR_BOX_SHADOW) { ...clear box shadow... }
13 */
14export declare const enum BackgroundClearFlags {
15 NONE = 0,
16 CLEAR_BACKGROUND_COLOR = 1,
17 CLEAR_BOX_SHADOW = 2
18}
19export declare class Background {
20 static default: Background;
21 color: Color;
22 image: string | LinearGradient;
23 repeat: CoreTypes.BackgroundRepeatType;
24 position: string;
25 size: string;
26 borderTopColor: Color;
27 borderRightColor: Color;
28 borderBottomColor: Color;
29 borderLeftColor: Color;
30 borderTopWidth: number;
31 borderRightWidth: number;
32 borderBottomWidth: number;
33 borderLeftWidth: number;
34 borderTopLeftRadius: number;
35 borderTopRightRadius: number;
36 borderBottomLeftRadius: number;
37 borderBottomRightRadius: number;
38 clipPath: string;
39 boxShadow: CSSShadow;
40 clearFlags: number;
41 private clone;
42 withColor(value: Color): Background;
43 withImage(value: string | LinearGradient): Background;
44 withRepeat(value: CoreTypes.BackgroundRepeatType): Background;
45 withPosition(value: string): Background;
46 withSize(value: string): Background;
47 withBorderTopColor(value: Color): Background;
48 withBorderRightColor(value: Color): Background;
49 withBorderBottomColor(value: Color): Background;
50 withBorderLeftColor(value: Color): Background;
51 withBorderTopWidth(value: number): Background;
52 withBorderRightWidth(value: number): Background;
53 withBorderBottomWidth(value: number): Background;
54 withBorderLeftWidth(value: number): Background;
55 withBorderTopLeftRadius(value: number): Background;
56 withBorderTopRightRadius(value: number): Background;
57 withBorderBottomRightRadius(value: number): Background;
58 withBorderBottomLeftRadius(value: number): Background;
59 withClipPath(value: string): Background;
60 withBoxShadow(value: CSSShadow): Background;
61 isEmpty(): boolean;
62 static equals(value1: Background, value2: Background): boolean;
63 hasBorderColor(): boolean;
64 hasBorderWidth(): boolean;
65 hasBorderRadius(): boolean;
66 hasUniformBorderColor(): boolean;
67 hasUniformBorderWidth(): boolean;
68 hasUniformBorderRadius(): boolean;
69 hasUniformBorder(): boolean;
70 getUniformBorderColor(): Color;
71 getUniformBorderWidth(): number;
72 getUniformBorderRadius(): number;
73 hasBoxShadow(): boolean;
74 getBoxShadow(): CSSShadow;
75 toString(): string;
76}