1 | import { LayoutBase } from '../layout-base';
|
2 | import { Style } from '../../styling/style';
|
3 | import { CssProperty } from '../../core/properties';
|
4 | import { View } from '../../core/view';
|
5 |
|
6 | export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
7 | export type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
8 | export type JustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around';
|
9 | export type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
10 | export type AlignContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export type Order = number;
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export type FlexGrow = number;
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | export type FlexShrink = number;
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export type FlexWrapBefore = boolean;
|
31 |
|
32 | export type AlignSelf = 'auto' | AlignItems;
|
33 |
|
34 | export class FlexboxLayout extends LayoutBase {
|
35 | public flexDirection: FlexDirection;
|
36 | public flexWrap: FlexWrap;
|
37 | public justifyContent: JustifyContent;
|
38 | public alignItems: AlignItems;
|
39 | public alignContent: AlignContent;
|
40 |
|
41 | public static setOrder(view: View, order: number);
|
42 | public static getOrder(view: View): number;
|
43 |
|
44 | public static setFlexGrow(view: View, grow: number);
|
45 | public static getFlexGrow(view: View);
|
46 |
|
47 | public static setFlexShrink(view: View, shrink: number);
|
48 | public static getFlexShrink(view: View): number;
|
49 |
|
50 | public static setAlignSelf(view: View, align: AlignSelf);
|
51 | public static getAlignSelf(view: View): AlignSelf;
|
52 |
|
53 | public static setFlexWrapBefore(view: View, wrap: boolean);
|
54 | public static getFlexWrapBefore(view: View): boolean;
|
55 | }
|
56 |
|
57 | export const flexDirectionProperty: CssProperty<Style, FlexDirection>;
|
58 | export const flexWrapProperty: CssProperty<Style, FlexWrap>;
|
59 | export const justifyContentProperty: CssProperty<Style, JustifyContent>;
|
60 | export const alignItemsProperty: CssProperty<Style, AlignItems>;
|
61 |
|
62 | export const orderProperty: CssProperty<Style, Order>;
|
63 | export const flexGrowProperty: CssProperty<Style, FlexGrow>;
|
64 | export const flexShrinkProperty: CssProperty<Style, FlexShrink>;
|
65 | export const flexWrapBeforeProperty: CssProperty<Style, FlexWrapBefore>;
|
66 | export const alignSelfProperty: CssProperty<Style, AlignSelf>;
|