UNPKG

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