UNPKG

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