UNPKG

5.43 kBTypeScriptView Raw
1import { Style as StyleDefinition } from '.';
2import { Color } from '../../../color';
3import { Font, FontStyle, FontWeight } from '../font';
4import { Background } from '../background';
5import { ViewBase } from '../../core/view-base';
6import { LinearGradient } from '../../styling/linear-gradient';
7import { Observable } from '../../../data/observable';
8import { FlexDirection, FlexWrap, JustifyContent, AlignItems, AlignContent, Order, FlexGrow, FlexShrink, FlexWrapBefore, AlignSelf } from '../../layouts/flexbox-layout';
9import { CoreTypes } from '../../../core-types';
10import { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState } from '../../../accessibility/accessibility-types';
11import { CSSShadow } from '../css-shadow';
12export interface CommonLayoutParams {
13 width: number;
14 height: number;
15 widthPercent: number;
16 heightPercent: number;
17 leftMargin: number;
18 topMargin: number;
19 rightMargin: number;
20 bottomMargin: number;
21 leftMarginPercent: number;
22 topMarginPercent: number;
23 rightMarginPercent: number;
24 bottomMarginPercent: number;
25 horizontalAlignment: CoreTypes.HorizontalAlignmentType;
26 verticalAlignment: CoreTypes.VerticalAlignmentType;
27}
28export declare class Style extends Observable implements StyleDefinition {
29 private unscopedCssVariables;
30 private scopedCssVariables;
31 constructor(ownerView: ViewBase | WeakRef<ViewBase>);
32 setScopedCssVariable(varName: string, value: string): void;
33 setUnscopedCssVariable(varName: string, value: string): void;
34 getCssVariable(varName: string): string | null;
35 resetScopedCssVariables(): void;
36 resetUnscopedCssVariables(): void;
37 toString(): string;
38 fontInternal: Font;
39 _fontScale: number;
40 backgroundInternal: Background;
41 rotate: number;
42 rotateX: number;
43 rotateY: number;
44 perspective: number;
45 scaleX: number;
46 scaleY: number;
47 translateX: CoreTypes.dip;
48 translateY: CoreTypes.dip;
49 clipPath: string;
50 color: Color;
51 tintColor: Color;
52 placeholderColor: Color;
53 background: string;
54 backgroundColor: Color;
55 backgroundImage: string | LinearGradient;
56 backgroundRepeat: CoreTypes.BackgroundRepeatType;
57 backgroundSize: string;
58 backgroundPosition: string;
59 borderColor: string | Color;
60 borderTopColor: Color;
61 borderRightColor: Color;
62 borderBottomColor: Color;
63 borderLeftColor: Color;
64 borderWidth: string | CoreTypes.LengthType;
65 borderTopWidth: CoreTypes.LengthType;
66 borderRightWidth: CoreTypes.LengthType;
67 borderBottomWidth: CoreTypes.LengthType;
68 borderLeftWidth: CoreTypes.LengthType;
69 borderRadius: string | CoreTypes.LengthType;
70 borderTopLeftRadius: CoreTypes.LengthType;
71 borderTopRightRadius: CoreTypes.LengthType;
72 borderBottomRightRadius: CoreTypes.LengthType;
73 borderBottomLeftRadius: CoreTypes.LengthType;
74 boxShadow: CSSShadow;
75 fontSize: number;
76 fontFamily: string;
77 fontStyle: FontStyle;
78 fontWeight: FontWeight;
79 font: string;
80 androidElevation: number;
81 androidDynamicElevationOffset: number;
82 zIndex: number;
83 opacity: number;
84 visibility: CoreTypes.VisibilityType;
85 letterSpacing: number;
86 lineHeight: number;
87 textAlignment: CoreTypes.TextAlignmentType;
88 textDecoration: CoreTypes.TextDecorationType;
89 textTransform: CoreTypes.TextTransformType;
90 textShadow: CSSShadow;
91 whiteSpace: CoreTypes.WhiteSpaceType;
92 minWidth: CoreTypes.LengthType;
93 minHeight: CoreTypes.LengthType;
94 width: CoreTypes.PercentLengthType;
95 height: CoreTypes.PercentLengthType;
96 margin: string | CoreTypes.PercentLengthType;
97 marginLeft: CoreTypes.PercentLengthType;
98 marginTop: CoreTypes.PercentLengthType;
99 marginRight: CoreTypes.PercentLengthType;
100 marginBottom: CoreTypes.PercentLengthType;
101 padding: string | CoreTypes.LengthType;
102 paddingLeft: CoreTypes.LengthType;
103 paddingTop: CoreTypes.LengthType;
104 paddingRight: CoreTypes.LengthType;
105 paddingBottom: CoreTypes.LengthType;
106 horizontalAlignment: CoreTypes.HorizontalAlignmentType;
107 verticalAlignment: CoreTypes.VerticalAlignmentType;
108 tabTextFontSize: number;
109 tabTextColor: Color;
110 tabBackgroundColor: Color;
111 selectedTabTextColor: Color;
112 androidSelectedTabHighlightColor: Color;
113 separatorColor: Color;
114 selectedBackgroundColor: Color;
115 statusBarStyle: 'light' | 'dark';
116 androidStatusBarBackground: Color;
117 androidContentInset: string | CoreTypes.LengthType;
118 androidContentInsetLeft: CoreTypes.LengthType;
119 androidContentInsetRight: CoreTypes.LengthType;
120 flexDirection: FlexDirection;
121 flexWrap: FlexWrap;
122 justifyContent: JustifyContent;
123 alignItems: AlignItems;
124 alignContent: AlignContent;
125 order: Order;
126 flexGrow: FlexGrow;
127 flexShrink: FlexShrink;
128 flexWrapBefore: FlexWrapBefore;
129 alignSelf: AlignSelf;
130 accessible: boolean;
131 accessibilityHidden: boolean;
132 accessibilityRole: AccessibilityRole;
133 accessibilityState: AccessibilityState;
134 accessibilityLiveRegion: AccessibilityLiveRegion;
135 accessibilityLanguage: string;
136 accessibilityMediaSession: boolean;
137 accessibilityStep: number;
138 PropertyBag: {
139 new (): {
140 [property: string]: string;
141 };
142 prototype: {
143 [property: string]: string;
144 };
145 };
146 viewRef: WeakRef<ViewBase>;
147 get view(): ViewBase;
148}