@tarojs/rn-style-transformer 4.0.0-beta.92 → 4.0.0-beta.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -8
- package/dist/index.d.ts +8 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/transforms/StyleSheet/ColorPropType.d.ts +10 -0
- package/dist/transforms/StyleSheet/ColorPropType.js.map +1 -1
- package/dist/transforms/StyleSheet/ImageResizeMode.d.ts +6 -0
- package/dist/transforms/StyleSheet/ImageStylePropTypes.d.ts +128 -0
- package/dist/transforms/StyleSheet/ImageStylePropTypes.js +1 -1
- package/dist/transforms/StyleSheet/ImageStylePropTypes.js.map +1 -1
- package/dist/transforms/StyleSheet/LayoutPropTypes.d.ts +388 -0
- package/dist/transforms/StyleSheet/ShadowPropTypesIOS.d.ts +45 -0
- package/dist/transforms/StyleSheet/ShadowPropTypesIOS.js +1 -1
- package/dist/transforms/StyleSheet/ShadowPropTypesIOS.js.map +1 -1
- package/dist/transforms/StyleSheet/StyleSheetValidation.d.ts +15 -0
- package/dist/transforms/StyleSheet/StyleSheetValidation.js +1 -1
- package/dist/transforms/StyleSheet/StyleSheetValidation.js.map +1 -1
- package/dist/transforms/StyleSheet/TextStylePropTypes.d.ts +191 -0
- package/dist/transforms/StyleSheet/TextStylePropTypes.js +1 -1
- package/dist/transforms/StyleSheet/TextStylePropTypes.js.map +1 -1
- package/dist/transforms/StyleSheet/TransformPropTypes.d.ts +67 -0
- package/dist/transforms/StyleSheet/TransformPropTypes.js.map +1 -1
- package/dist/transforms/StyleSheet/ViewStylePropTypes.d.ts +136 -0
- package/dist/transforms/StyleSheet/ViewStylePropTypes.js +1 -1
- package/dist/transforms/StyleSheet/ViewStylePropTypes.js.map +1 -1
- package/dist/transforms/StyleSheet/deprecatedPropType.d.ts +13 -0
- package/dist/transforms/StyleSheet/deprecatedPropType.js.map +1 -1
- package/dist/transforms/StyleSheet/index.d.ts +2 -0
- package/dist/transforms/StyleSheet/normalizeColor.d.ts +10 -0
- package/dist/transforms/StyleSheet/normalizeColor.js.map +1 -1
- package/dist/transforms/index.d.ts +56 -0
- package/dist/transforms/index.js +5 -5
- package/dist/transforms/index.js.map +1 -1
- package/dist/transforms/less.d.ts +2 -0
- package/dist/transforms/less.js.map +1 -1
- package/dist/transforms/postcss.d.ts +13 -0
- package/dist/transforms/postcss.js +5 -1
- package/dist/transforms/postcss.js.map +1 -1
- package/dist/transforms/sass.d.ts +2 -0
- package/dist/transforms/sass.js +3 -0
- package/dist/transforms/sass.js.map +1 -1
- package/dist/transforms/stylus.d.ts +3 -0
- package/dist/transforms/stylus.js +1 -1
- package/dist/transforms/stylus.js.map +1 -1
- package/dist/types/index.d.ts +206 -0
- package/dist/utils/index.d.ts +21 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lessImport.d.ts +5 -0
- package/dist/utils/reporterSkip.d.ts +7 -0
- package/dist/utils/reporterSkip.js.map +1 -1
- package/package.json +32 -31
- package/.eslintrc.js +0 -8
- package/__tests__/config.spec.js +0 -203
- package/__tests__/index.spec.js +0 -252
- package/__tests__/platform.spec.js +0 -78
- package/__tests__/styles/b.css +0 -3
- package/__tests__/styles/b.less +0 -3
- package/__tests__/styles/b.rn.css +0 -3
- package/__tests__/styles/b.scss +0 -3
- package/__tests__/styles/b.styl +0 -3
- package/__tests__/styles/c.css +0 -3
- package/__tests__/styles/c.less +0 -5
- package/__tests__/styles/c.rn.scss +0 -5
- package/__tests__/styles/c.scss +0 -5
- package/__tests__/styles/d.rn.scss +0 -3
- package/__tests__/styles/d.scss +0 -3
- package/__tests__/styles/mixins.scss +0 -18
- package/__tests__/styles/nest.rn.less +0 -3
- package/__tests__/styles/variable.scss +0 -1
- package/babel.config.js +0 -12
- package/jest.config.js +0 -8
- package/src/config/rn-stylelint.json +0 -5
- package/src/index.ts +0 -52
- package/src/transforms/StyleSheet/ColorPropType.ts +0 -76
- package/src/transforms/StyleSheet/ImageResizeMode.ts +0 -50
- package/src/transforms/StyleSheet/ImageStylePropTypes.ts +0 -62
- package/src/transforms/StyleSheet/LayoutPropTypes.ts +0 -559
- package/src/transforms/StyleSheet/ShadowPropTypesIOS.ts +0 -48
- package/src/transforms/StyleSheet/StyleSheetValidation.ts +0 -81
- package/src/transforms/StyleSheet/TextStylePropTypes.ts +0 -123
- package/src/transforms/StyleSheet/TransformPropTypes.ts +0 -109
- package/src/transforms/StyleSheet/ViewStylePropTypes.ts +0 -61
- package/src/transforms/StyleSheet/deprecatedPropType.ts +0 -31
- package/src/transforms/StyleSheet/index.ts +0 -5
- package/src/transforms/StyleSheet/normalizeColor.ts +0 -369
- package/src/transforms/index.ts +0 -229
- package/src/transforms/less.ts +0 -50
- package/src/transforms/postcss.ts +0 -95
- package/src/transforms/sass.ts +0 -148
- package/src/transforms/stylus.ts +0 -124
- package/src/types/index.ts +0 -242
- package/src/utils/index.ts +0 -229
- package/src/utils/lessImport.ts +0 -50
- package/src/utils/reporterSkip.ts +0 -27
- package/tsconfig.json +0 -12
package/LICENSE
CHANGED
|
@@ -154,15 +154,8 @@ See `/LICENSE` for details of the license.
|
|
|
154
154
|
|
|
155
155
|
==================
|
|
156
156
|
|
|
157
|
-
MIT (stencil-vue2-output-target):
|
|
158
|
-
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
|
-
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
|
-
See `/LICENSE` for details of the license.
|
|
161
|
-
|
|
162
|
-
==================
|
|
163
|
-
|
|
164
157
|
MIT (weui):
|
|
165
|
-
The following files embed [
|
|
158
|
+
The following files embed [weui](https://github.com/Tencent/weui) MIT:
|
|
166
159
|
`/packages/taro-components/src/components/*.scss`
|
|
167
160
|
See `/LICENSE.txt` for details of the license.
|
|
168
161
|
|
|
@@ -172,3 +165,10 @@ Apache-2.0 (intersection-observer):
|
|
|
172
165
|
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
173
166
|
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
174
167
|
See `/LICENSE.txt` for details of the license.
|
|
168
|
+
|
|
169
|
+
==================
|
|
170
|
+
|
|
171
|
+
MIT (babel-plugin-jsx-dom-expressions):
|
|
172
|
+
The following files embed [babel-plugin-jsx-dom-expressions](https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions) MIT:
|
|
173
|
+
`/packages/babel-plugin-transform-solid-jsx/src/*`
|
|
174
|
+
See `/LICENSE` for details of the license.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TransformOptions } from './types';
|
|
2
|
+
export declare function transform(src: string, filename: string, options: TransformOptions): Promise<any>;
|
|
3
|
+
export declare function rollupTransform(options: TransformOptions): {
|
|
4
|
+
name: string;
|
|
5
|
+
transform(src: string, filename: string): Promise<{
|
|
6
|
+
code: string;
|
|
7
|
+
} | undefined>;
|
|
8
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ async function transform(src, filename, options) {
|
|
|
49
49
|
}
|
|
50
50
|
const ext = path.extname(filename);
|
|
51
51
|
if (RN_CSS_EXT.includes(ext)) {
|
|
52
|
-
const styleTransform = getSingleStyleTransform(options.config);
|
|
52
|
+
const styleTransform = getSingleStyleTransform(options.config || {});
|
|
53
53
|
const styles = await styleTransform.transform(src, filename, options);
|
|
54
54
|
return upstreamTransformer.transform({
|
|
55
55
|
src: styles,
|
|
@@ -62,11 +62,11 @@ async function transform(src, filename, options) {
|
|
|
62
62
|
exports.transform = transform;
|
|
63
63
|
function rollupTransform(options) {
|
|
64
64
|
return {
|
|
65
|
-
name: 'rn-style-transformer',
|
|
65
|
+
name: 'rn-style-transformer', // this name will show up in warnings and errors
|
|
66
66
|
async transform(src, filename) {
|
|
67
67
|
const ext = path.extname(filename);
|
|
68
68
|
if (RN_CSS_EXT.includes(ext)) {
|
|
69
|
-
const styleTransform = getSingleStyleTransform(options.config);
|
|
69
|
+
const styleTransform = getSingleStyleTransform(options.config || {});
|
|
70
70
|
const code = await styleTransform.transform(src, filename, options);
|
|
71
71
|
return { code };
|
|
72
72
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B,8DAAyC;AAGzC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAC1E,MAAM,mBAAmB,GAAG,OAAO,CAAC,uCAAuC,CAAC,CAAA;AAE5E,MAAM,uBAAuB,GAAG,iBAAiB,EAAE,CAAA;AAEnD,SAAS,iBAAiB;IACxB,IAAI,cAAc,GAA0B,IAAI,CAAA;IAChD,OAAO,UAAU,MAAc;QAC7B,aAAa;QACb,IAAI,CAAC,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B,8DAAyC;AAGzC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAC1E,MAAM,mBAAmB,GAAG,OAAO,CAAC,uCAAuC,CAAC,CAAA;AAE5E,MAAM,uBAAuB,GAAG,iBAAiB,EAAE,CAAA;AAEnD,SAAS,iBAAiB;IACxB,IAAI,cAAc,GAA0B,IAAI,CAAA;IAChD,OAAO,UAAU,MAAc;QAC7B,aAAa;QACb,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,cAAc,GAAG,IAAI,oBAAc,CAAC,MAAM,CAAC,CAAA;QAC7C,CAAC;QACD,OAAO,cAAc,CAAA;IACvB,CAAC,CAAA;AACH,CAAC;AAEM,KAAK,UAAU,SAAS,CAAE,GAAW,EAAE,QAAgB,EAAE,OAAyB;IACvF,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,oBAAoB;QACpB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,CAAA;IACpC,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAClC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,MAAM,cAAc,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;QACpE,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;QACrE,OAAO,mBAAmB,CAAC,SAAS,CAAC;YACnC,GAAG,EAAE,MAAM;YACX,QAAQ;YACR,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,mBAAmB,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAA;AAClE,CAAC;AAhBD,8BAgBC;AAED,SAAgB,eAAe,CAAE,OAAyB;IACxD,OAAO;QACL,IAAI,EAAE,sBAAsB,EAAE,gDAAgD;QAC9E,KAAK,CAAC,SAAS,CAAE,GAAW,EAAE,QAAgB;YAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAClC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC7B,MAAM,cAAc,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;gBACpE,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;gBACnE,OAAO,EAAE,IAAI,EAAE,CAAA;YACjB,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAZD,0CAYC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
declare const ColorPropType: any;
|
|
10
|
+
export default ColorPropType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPropType.js","sourceRoot":"","sources":["../../../src/transforms/StyleSheet/ColorPropType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,CAAA;;;;;AAEZ,sEAA6C;AAE7C,MAAM,aAAa,GAAG,UACpB,UAAU,EACV,KAAK,EACL,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,YAAY;IAEZ,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"ColorPropType.js","sourceRoot":"","sources":["../../../src/transforms/StyleSheet/ColorPropType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,CAAA;;;;;AAEZ,sEAA6C;AAE7C,MAAM,aAAa,GAAG,UACpB,UAAU,EACV,KAAK,EACL,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,YAAY;IAEZ,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,IAAI,KAAK,CACd,WAAW;gBACT,QAAQ;gBACR,IAAI;gBACJ,CAAC,YAAY,IAAI,QAAQ,CAAC;gBAC1B,0BAA0B;gBAC1B,aAAa;gBACb,IAAI,CACP,CAAA;QACH,CAAC;QACD,OAAM;IACR,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,qEAAqE;QACrE,2EAA2E;QAC3E,6CAA6C;QAC7C,OAAM;IACR,CAAC;IAED,IAAI,IAAA,wBAAc,EAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;QACnC,OAAO,IAAI,KAAK,CACd,UAAU;YACR,QAAQ;YACR,IAAI;YACJ,CAAC,YAAY,IAAI,QAAQ,CAAC;YAC1B,iBAAiB;YACjB,aAAa;YACb,KAAK;YACL,KAAK;YACL,IAAI;YACJ;;;;;;;;;;;;CAYP,CACI,CAAA;IACH,CAAC;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;AACtE,aAAa,CAAC,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAA;AAE1E,kBAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as ReactPropTypes from 'prop-types';
|
|
2
|
+
declare const ImageStylePropTypes: {
|
|
3
|
+
resizeMode: ReactPropTypes.Requireable<string>;
|
|
4
|
+
backfaceVisibility: ReactPropTypes.Requireable<string>;
|
|
5
|
+
backgroundColor: any;
|
|
6
|
+
borderColor: any;
|
|
7
|
+
borderWidth: ReactPropTypes.Requireable<number>;
|
|
8
|
+
borderRadius: ReactPropTypes.Requireable<number>;
|
|
9
|
+
overflow: ReactPropTypes.Requireable<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Changes the color of all the non-transparent pixels to the tintColor.
|
|
12
|
+
*/
|
|
13
|
+
tintColor: any;
|
|
14
|
+
opacity: ReactPropTypes.Requireable<number>;
|
|
15
|
+
/**
|
|
16
|
+
* When the image has rounded corners, specifying an overlayColor will
|
|
17
|
+
* cause the remaining space in the corners to be filled with a solid color.
|
|
18
|
+
* This is useful in cases which are not supported by the Android
|
|
19
|
+
* implementation of rounded corners:
|
|
20
|
+
* - Certain resize modes, such as 'contain'
|
|
21
|
+
* - Animated GIFs
|
|
22
|
+
*
|
|
23
|
+
* A typical way to use this prop is with images displayed on a solid
|
|
24
|
+
* background and setting the `overlayColor` to the same color
|
|
25
|
+
* as the background.
|
|
26
|
+
*
|
|
27
|
+
* For details of how this works under the hood, see
|
|
28
|
+
* http://frescolib.org/docs/rounded-corners-and-circles.html
|
|
29
|
+
*
|
|
30
|
+
* @platform android
|
|
31
|
+
*/
|
|
32
|
+
overlayColor: ReactPropTypes.Requireable<string>;
|
|
33
|
+
borderTopLeftRadius: ReactPropTypes.Requireable<number>;
|
|
34
|
+
borderTopRightRadius: ReactPropTypes.Requireable<number>;
|
|
35
|
+
borderBottomLeftRadius: ReactPropTypes.Requireable<number>;
|
|
36
|
+
borderBottomRightRadius: ReactPropTypes.Requireable<number>;
|
|
37
|
+
transform: ReactPropTypes.Requireable<(NonNullable<ReactPropTypes.InferProps<{
|
|
38
|
+
perspective: ReactPropTypes.Requireable<number>;
|
|
39
|
+
}> | ReactPropTypes.InferProps<{
|
|
40
|
+
rotate: ReactPropTypes.Requireable<string>;
|
|
41
|
+
}> | ReactPropTypes.InferProps<{
|
|
42
|
+
rotateX: ReactPropTypes.Requireable<string>;
|
|
43
|
+
}> | ReactPropTypes.InferProps<{
|
|
44
|
+
rotateY: ReactPropTypes.Requireable<string>;
|
|
45
|
+
}> | ReactPropTypes.InferProps<{
|
|
46
|
+
rotateZ: ReactPropTypes.Requireable<string>;
|
|
47
|
+
}> | ReactPropTypes.InferProps<{
|
|
48
|
+
scale: ReactPropTypes.Requireable<number>;
|
|
49
|
+
}> | ReactPropTypes.InferProps<{
|
|
50
|
+
scaleX: ReactPropTypes.Requireable<number>;
|
|
51
|
+
}> | ReactPropTypes.InferProps<{
|
|
52
|
+
scaleY: ReactPropTypes.Requireable<number>;
|
|
53
|
+
}> | ReactPropTypes.InferProps<{
|
|
54
|
+
translateX: ReactPropTypes.Requireable<number>;
|
|
55
|
+
}> | ReactPropTypes.InferProps<{
|
|
56
|
+
translateY: ReactPropTypes.Requireable<number>;
|
|
57
|
+
}> | ReactPropTypes.InferProps<{
|
|
58
|
+
skewX: ReactPropTypes.Requireable<string>;
|
|
59
|
+
}> | ReactPropTypes.InferProps<{
|
|
60
|
+
skewY: ReactPropTypes.Requireable<string>;
|
|
61
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
62
|
+
transformMatrix: (props: any, propName: any, _componentName: any) => Error | undefined;
|
|
63
|
+
decomposedMatrix: (props: any, propName: any, _componentName: any) => Error | undefined;
|
|
64
|
+
scaleX: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
65
|
+
scaleY: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
66
|
+
rotation: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
67
|
+
translateX: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
68
|
+
translateY: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
69
|
+
shadowColor: any;
|
|
70
|
+
shadowOffset: ReactPropTypes.Requireable<ReactPropTypes.InferProps<{
|
|
71
|
+
width: ReactPropTypes.Requireable<number>;
|
|
72
|
+
height: ReactPropTypes.Requireable<number>;
|
|
73
|
+
}>>;
|
|
74
|
+
shadowOpacity: ReactPropTypes.Requireable<number>;
|
|
75
|
+
shadowRadius: ReactPropTypes.Requireable<number>;
|
|
76
|
+
display: ReactPropTypes.Requireable<string>;
|
|
77
|
+
width: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
78
|
+
height: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
79
|
+
start: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
80
|
+
end: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
81
|
+
top: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
82
|
+
left: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
83
|
+
right: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
84
|
+
bottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
85
|
+
minWidth: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
86
|
+
maxWidth: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
87
|
+
minHeight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
88
|
+
maxHeight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
89
|
+
margin: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
90
|
+
marginVertical: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
91
|
+
marginHorizontal: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
92
|
+
marginTop: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
93
|
+
marginBottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
94
|
+
marginLeft: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
95
|
+
marginRight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
96
|
+
marginStart: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
97
|
+
marginEnd: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
98
|
+
padding: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
99
|
+
paddingVertical: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
100
|
+
paddingHorizontal: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
101
|
+
paddingTop: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
102
|
+
paddingBottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
103
|
+
paddingLeft: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
104
|
+
paddingRight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
105
|
+
paddingStart: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
106
|
+
paddingEnd: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
107
|
+
borderTopWidth: ReactPropTypes.Requireable<number>;
|
|
108
|
+
borderStartWidth: ReactPropTypes.Requireable<number>;
|
|
109
|
+
borderEndWidth: ReactPropTypes.Requireable<number>;
|
|
110
|
+
borderRightWidth: ReactPropTypes.Requireable<number>;
|
|
111
|
+
borderBottomWidth: ReactPropTypes.Requireable<number>;
|
|
112
|
+
borderLeftWidth: ReactPropTypes.Requireable<number>;
|
|
113
|
+
position: ReactPropTypes.Requireable<string>;
|
|
114
|
+
flexDirection: ReactPropTypes.Requireable<string>;
|
|
115
|
+
flexWrap: ReactPropTypes.Requireable<string>;
|
|
116
|
+
justifyContent: ReactPropTypes.Requireable<string>;
|
|
117
|
+
alignItems: ReactPropTypes.Requireable<string>;
|
|
118
|
+
alignSelf: ReactPropTypes.Requireable<string>;
|
|
119
|
+
alignContent: ReactPropTypes.Requireable<string>;
|
|
120
|
+
flex: ReactPropTypes.Requireable<number>;
|
|
121
|
+
flexGrow: ReactPropTypes.Requireable<number>;
|
|
122
|
+
flexShrink: ReactPropTypes.Requireable<number>;
|
|
123
|
+
flexBasis: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
124
|
+
aspectRatio: ReactPropTypes.Requireable<number>;
|
|
125
|
+
zIndex: ReactPropTypes.Requireable<number>;
|
|
126
|
+
direction: ReactPropTypes.Requireable<string>;
|
|
127
|
+
};
|
|
128
|
+
export default ImageStylePropTypes;
|
|
@@ -35,10 +35,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
const ReactPropTypes = __importStar(require("prop-types"));
|
|
38
39
|
const ColorPropType_1 = __importDefault(require("./ColorPropType"));
|
|
39
40
|
const ImageResizeMode_1 = __importDefault(require("./ImageResizeMode"));
|
|
40
41
|
const LayoutPropTypes_1 = __importDefault(require("./LayoutPropTypes"));
|
|
41
|
-
const ReactPropTypes = __importStar(require("prop-types"));
|
|
42
42
|
const ShadowPropTypesIOS_1 = __importDefault(require("./ShadowPropTypesIOS"));
|
|
43
43
|
const TransformPropTypes_1 = __importDefault(require("./TransformPropTypes"));
|
|
44
44
|
const ImageStylePropTypes = Object.assign(Object.assign(Object.assign(Object.assign({}, LayoutPropTypes_1.default), ShadowPropTypesIOS_1.default), TransformPropTypes_1.default), { resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode_1.default)), backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']), backgroundColor: ColorPropType_1.default, borderColor: ColorPropType_1.default, borderWidth: ReactPropTypes.number, borderRadius: ReactPropTypes.number, overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageStylePropTypes.js","sourceRoot":"","sources":["../../../src/transforms/StyleSheet/ImageStylePropTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,oEAA2C;AAC3C,wEAA+C;AAC/C,wEAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"ImageStylePropTypes.js","sourceRoot":"","sources":["../../../src/transforms/StyleSheet/ImageStylePropTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,2DAA4C;AAE5C,oEAA2C;AAC3C,wEAA+C;AAC/C,wEAA+C;AAC/C,8EAAqD;AACrD,8EAAqD;AAErD,MAAM,mBAAmB,+DACpB,yBAAe,GACf,4BAAkB,GAClB,4BAAkB,KACrB,UAAU,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAe,CAAC,CAAC,EAC9D,kBAAkB,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,EAC/D,eAAe,EAAE,uBAAa,EAC9B,WAAW,EAAE,uBAAa,EAC1B,WAAW,EAAE,cAAc,CAAC,MAAM,EAClC,YAAY,EAAE,cAAc,CAAC,MAAM,EACnC,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAErD;;OAEG;IACH,SAAS,EAAE,uBAAa,EACxB,OAAO,EAAE,cAAc,CAAC,MAAM;IAC9B;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,EAAE,cAAc,CAAC,MAAM;IAEnC,0BAA0B;IAC1B,mBAAmB,EAAE,cAAc,CAAC,MAAM,EAC1C,oBAAoB,EAAE,cAAc,CAAC,MAAM,EAC3C,sBAAsB,EAAE,cAAc,CAAC,MAAM,EAC7C,uBAAuB,EAAE,cAAc,CAAC,MAAM,GAC/C,CAAA;AAED,kBAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* strict
|
|
9
|
+
*/
|
|
10
|
+
import * as ReactPropTypes from 'prop-types';
|
|
11
|
+
/**
|
|
12
|
+
* React Native's layout system is based on Flexbox and is powered both
|
|
13
|
+
* on iOS and Android by an open source project called `Yoga`:
|
|
14
|
+
* https://github.com/facebook/yoga
|
|
15
|
+
*
|
|
16
|
+
* The implementation in Yoga is slightly different from what the
|
|
17
|
+
* Flexbox spec defines - for example, we chose more sensible default
|
|
18
|
+
* values. Since our layout docs are generated from the comments in this
|
|
19
|
+
* file, please keep a brief comment describing each prop type.
|
|
20
|
+
*
|
|
21
|
+
* These properties are a subset of our styles that are consumed by the layout
|
|
22
|
+
* algorithm and affect the positioning and sizing of views.
|
|
23
|
+
*/
|
|
24
|
+
declare const LayoutPropTypes: {
|
|
25
|
+
/** `display` sets the display type of this component.
|
|
26
|
+
*
|
|
27
|
+
* It works similarly to `display` in CSS, but only support 'flex' and 'none'.
|
|
28
|
+
* 'flex' is the default.
|
|
29
|
+
*/
|
|
30
|
+
display: ReactPropTypes.Requireable<string>;
|
|
31
|
+
/** `width` sets the width of this component.
|
|
32
|
+
*
|
|
33
|
+
* It works similarly to `width` in CSS, but in React Native you
|
|
34
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
35
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details.
|
|
36
|
+
*/
|
|
37
|
+
width: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
38
|
+
/** `height` sets the height of this component.
|
|
39
|
+
*
|
|
40
|
+
* It works similarly to `height` in CSS, but in React Native you
|
|
41
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
42
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details.
|
|
43
|
+
*/
|
|
44
|
+
height: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
45
|
+
/**
|
|
46
|
+
* When the direction is `ltr`, `start` is equivalent to `left`.
|
|
47
|
+
* When the direction is `rtl`, `start` is equivalent to `right`.
|
|
48
|
+
*
|
|
49
|
+
* This style takes precedence over the `left`, `right`, and `end` styles.
|
|
50
|
+
*/
|
|
51
|
+
start: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
52
|
+
/**
|
|
53
|
+
* When the direction is `ltr`, `end` is equivalent to `right`.
|
|
54
|
+
* When the direction is `rtl`, `end` is equivalent to `left`.
|
|
55
|
+
*
|
|
56
|
+
* This style takes precedence over the `left` and `right` styles.
|
|
57
|
+
*/
|
|
58
|
+
end: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
59
|
+
/** `top` is the number of logical pixels to offset the top edge of
|
|
60
|
+
* this component.
|
|
61
|
+
*
|
|
62
|
+
* It works similarly to `top` in CSS, but in React Native you
|
|
63
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
64
|
+
*
|
|
65
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/top
|
|
66
|
+
* for more details of how `top` affects layout.
|
|
67
|
+
*/
|
|
68
|
+
top: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
69
|
+
/** `left` is the number of logical pixels to offset the left edge of
|
|
70
|
+
* this component.
|
|
71
|
+
*
|
|
72
|
+
* It works similarly to `left` in CSS, but in React Native you
|
|
73
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
74
|
+
*
|
|
75
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/left
|
|
76
|
+
* for more details of how `left` affects layout.
|
|
77
|
+
*/
|
|
78
|
+
left: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
79
|
+
/** `right` is the number of logical pixels to offset the right edge of
|
|
80
|
+
* this component.
|
|
81
|
+
*
|
|
82
|
+
* It works similarly to `right` in CSS, but in React Native you
|
|
83
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
84
|
+
*
|
|
85
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/right
|
|
86
|
+
* for more details of how `right` affects layout.
|
|
87
|
+
*/
|
|
88
|
+
right: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
89
|
+
/** `bottom` is the number of logical pixels to offset the bottom edge of
|
|
90
|
+
* this component.
|
|
91
|
+
*
|
|
92
|
+
* It works similarly to `bottom` in CSS, but in React Native you
|
|
93
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
94
|
+
*
|
|
95
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom
|
|
96
|
+
* for more details of how `bottom` affects layout.
|
|
97
|
+
*/
|
|
98
|
+
bottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
99
|
+
/** `minWidth` is the minimum width for this component, in logical pixels.
|
|
100
|
+
*
|
|
101
|
+
* It works similarly to `min-width` in CSS, but in React Native you
|
|
102
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
103
|
+
*
|
|
104
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/min-width
|
|
105
|
+
* for more details.
|
|
106
|
+
*/
|
|
107
|
+
minWidth: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
108
|
+
/** `maxWidth` is the maximum width for this component, in logical pixels.
|
|
109
|
+
*
|
|
110
|
+
* It works similarly to `max-width` in CSS, but in React Native you
|
|
111
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
112
|
+
*
|
|
113
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
|
|
114
|
+
* for more details.
|
|
115
|
+
*/
|
|
116
|
+
maxWidth: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
117
|
+
/** `minHeight` is the minimum height for this component, in logical pixels.
|
|
118
|
+
*
|
|
119
|
+
* It works similarly to `min-height` in CSS, but in React Native you
|
|
120
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
121
|
+
*
|
|
122
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height
|
|
123
|
+
* for more details.
|
|
124
|
+
*/
|
|
125
|
+
minHeight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
126
|
+
/** `maxHeight` is the maximum height for this component, in logical pixels.
|
|
127
|
+
*
|
|
128
|
+
* It works similarly to `max-height` in CSS, but in React Native you
|
|
129
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
130
|
+
*
|
|
131
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/max-height
|
|
132
|
+
* for more details.
|
|
133
|
+
*/
|
|
134
|
+
maxHeight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
135
|
+
/** Setting `margin` has the same effect as setting each of
|
|
136
|
+
* `marginTop`, `marginLeft`, `marginBottom`, and `marginRight`.
|
|
137
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin
|
|
138
|
+
* for more details.
|
|
139
|
+
*/
|
|
140
|
+
margin: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
141
|
+
/** Setting `marginVertical` has the same effect as setting both
|
|
142
|
+
* `marginTop` and `marginBottom`.
|
|
143
|
+
*/
|
|
144
|
+
marginVertical: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
145
|
+
/** Setting `marginHorizontal` has the same effect as setting
|
|
146
|
+
* both `marginLeft` and `marginRight`.
|
|
147
|
+
*/
|
|
148
|
+
marginHorizontal: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
149
|
+
/** `marginTop` works like `margin-top` in CSS.
|
|
150
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top
|
|
151
|
+
* for more details.
|
|
152
|
+
*/
|
|
153
|
+
marginTop: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
154
|
+
/** `marginBottom` works like `margin-bottom` in CSS.
|
|
155
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom
|
|
156
|
+
* for more details.
|
|
157
|
+
*/
|
|
158
|
+
marginBottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
159
|
+
/** `marginLeft` works like `margin-left` in CSS.
|
|
160
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
|
|
161
|
+
* for more details.
|
|
162
|
+
*/
|
|
163
|
+
marginLeft: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
164
|
+
/** `marginRight` works like `margin-right` in CSS.
|
|
165
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right
|
|
166
|
+
* for more details.
|
|
167
|
+
*/
|
|
168
|
+
marginRight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
169
|
+
/**
|
|
170
|
+
* When direction is `ltr`, `marginStart` is equivalent to `marginLeft`.
|
|
171
|
+
* When direction is `rtl`, `marginStart` is equivalent to `marginRight`.
|
|
172
|
+
*/
|
|
173
|
+
marginStart: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
174
|
+
/**
|
|
175
|
+
* When direction is `ltr`, `marginEnd` is equivalent to `marginRight`.
|
|
176
|
+
* When direction is `rtl`, `marginEnd` is equivalent to `marginLeft`.
|
|
177
|
+
*/
|
|
178
|
+
marginEnd: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
179
|
+
/** Setting `padding` has the same effect as setting each of
|
|
180
|
+
* `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`.
|
|
181
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding
|
|
182
|
+
* for more details.
|
|
183
|
+
*/
|
|
184
|
+
padding: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
185
|
+
/** Setting `paddingVertical` is like setting both of
|
|
186
|
+
* `paddingTop` and `paddingBottom`.
|
|
187
|
+
*/
|
|
188
|
+
paddingVertical: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
189
|
+
/** Setting `paddingHorizontal` is like setting both of
|
|
190
|
+
* `paddingLeft` and `paddingRight`.
|
|
191
|
+
*/
|
|
192
|
+
paddingHorizontal: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
193
|
+
/** `paddingTop` works like `padding-top` in CSS.
|
|
194
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top
|
|
195
|
+
* for more details.
|
|
196
|
+
*/
|
|
197
|
+
paddingTop: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
198
|
+
/** `paddingBottom` works like `padding-bottom` in CSS.
|
|
199
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom
|
|
200
|
+
* for more details.
|
|
201
|
+
*/
|
|
202
|
+
paddingBottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
203
|
+
/** `paddingLeft` works like `padding-left` in CSS.
|
|
204
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left
|
|
205
|
+
* for more details.
|
|
206
|
+
*/
|
|
207
|
+
paddingLeft: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
208
|
+
/** `paddingRight` works like `padding-right` in CSS.
|
|
209
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right
|
|
210
|
+
* for more details.
|
|
211
|
+
*/
|
|
212
|
+
paddingRight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
213
|
+
/**
|
|
214
|
+
* When direction is `ltr`, `paddingStart` is equivalent to `paddingLeft`.
|
|
215
|
+
* When direction is `rtl`, `paddingStart` is equivalent to `paddingRight`.
|
|
216
|
+
*/
|
|
217
|
+
paddingStart: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
218
|
+
/**
|
|
219
|
+
* When direction is `ltr`, `paddingEnd` is equivalent to `paddingRight`.
|
|
220
|
+
* When direction is `rtl`, `paddingEnd` is equivalent to `paddingLeft`.
|
|
221
|
+
*/
|
|
222
|
+
paddingEnd: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
223
|
+
/** `borderWidth` works like `border-width` in CSS.
|
|
224
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-width
|
|
225
|
+
* for more details.
|
|
226
|
+
*/
|
|
227
|
+
borderWidth: ReactPropTypes.Requireable<number>;
|
|
228
|
+
/** `borderTopWidth` works like `border-top-width` in CSS.
|
|
229
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width
|
|
230
|
+
* for more details.
|
|
231
|
+
*/
|
|
232
|
+
borderTopWidth: ReactPropTypes.Requireable<number>;
|
|
233
|
+
/**
|
|
234
|
+
* When direction is `ltr`, `borderStartWidth` is equivalent to `borderLeftWidth`.
|
|
235
|
+
* When direction is `rtl`, `borderStartWidth` is equivalent to `borderRightWidth`.
|
|
236
|
+
*/
|
|
237
|
+
borderStartWidth: ReactPropTypes.Requireable<number>;
|
|
238
|
+
/**
|
|
239
|
+
* When direction is `ltr`, `borderEndWidth` is equivalent to `borderRightWidth`.
|
|
240
|
+
* When direction is `rtl`, `borderEndWidth` is equivalent to `borderLeftWidth`.
|
|
241
|
+
*/
|
|
242
|
+
borderEndWidth: ReactPropTypes.Requireable<number>;
|
|
243
|
+
/** `borderRightWidth` works like `border-right-width` in CSS.
|
|
244
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width
|
|
245
|
+
* for more details.
|
|
246
|
+
*/
|
|
247
|
+
borderRightWidth: ReactPropTypes.Requireable<number>;
|
|
248
|
+
/** `borderBottomWidth` works like `border-bottom-width` in CSS.
|
|
249
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width
|
|
250
|
+
* for more details.
|
|
251
|
+
*/
|
|
252
|
+
borderBottomWidth: ReactPropTypes.Requireable<number>;
|
|
253
|
+
/** `borderLeftWidth` works like `border-left-width` in CSS.
|
|
254
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width
|
|
255
|
+
* for more details.
|
|
256
|
+
*/
|
|
257
|
+
borderLeftWidth: ReactPropTypes.Requireable<number>;
|
|
258
|
+
/** `position` in React Native is similar to regular CSS, but
|
|
259
|
+
* everything is set to `relative` by default, so `absolute`
|
|
260
|
+
* positioning is always just relative to the parent.
|
|
261
|
+
*
|
|
262
|
+
* If you want to position a child using specific numbers of logical
|
|
263
|
+
* pixels relative to its parent, set the child to have `absolute`
|
|
264
|
+
* position.
|
|
265
|
+
*
|
|
266
|
+
* If you want to position a child relative to something
|
|
267
|
+
* that is not its parent, just don't use styles for that. Use the
|
|
268
|
+
* component tree.
|
|
269
|
+
*
|
|
270
|
+
* See https://github.com/facebook/yoga
|
|
271
|
+
* for more details on how `position` differs between React Native
|
|
272
|
+
* and CSS.
|
|
273
|
+
*/
|
|
274
|
+
position: ReactPropTypes.Requireable<string>;
|
|
275
|
+
/** `flexDirection` controls which directions children of a container go.
|
|
276
|
+
* `row` goes left to right, `column` goes top to bottom, and you may
|
|
277
|
+
* be able to guess what the other two do. It works like `flex-direction`
|
|
278
|
+
* in CSS, except the default is `column`.
|
|
279
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction
|
|
280
|
+
* for more details.
|
|
281
|
+
*/
|
|
282
|
+
flexDirection: ReactPropTypes.Requireable<string>;
|
|
283
|
+
/** `flexWrap` controls whether children can wrap around after they
|
|
284
|
+
* hit the end of a flex container.
|
|
285
|
+
* It works like `flex-wrap` in CSS (default: nowrap).
|
|
286
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap
|
|
287
|
+
* for more details.
|
|
288
|
+
*/
|
|
289
|
+
flexWrap: ReactPropTypes.Requireable<string>;
|
|
290
|
+
/** `justifyContent` aligns children in the main direction.
|
|
291
|
+
* For example, if children are flowing vertically, `justifyContent`
|
|
292
|
+
* controls how they align vertically.
|
|
293
|
+
* It works like `justify-content` in CSS (default: flex-start).
|
|
294
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
|
|
295
|
+
* for more details.
|
|
296
|
+
*/
|
|
297
|
+
justifyContent: ReactPropTypes.Requireable<string>;
|
|
298
|
+
/** `alignItems` aligns children in the cross direction.
|
|
299
|
+
* For example, if children are flowing vertically, `alignItems`
|
|
300
|
+
* controls how they align horizontally.
|
|
301
|
+
* It works like `align-items` in CSS (default: stretch).
|
|
302
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
|
|
303
|
+
* for more details.
|
|
304
|
+
*/
|
|
305
|
+
alignItems: ReactPropTypes.Requireable<string>;
|
|
306
|
+
/** `alignSelf` controls how a child aligns in the cross direction,
|
|
307
|
+
* overriding the `alignItems` of the parent. It works like `align-self`
|
|
308
|
+
* in CSS (default: auto).
|
|
309
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/align-self
|
|
310
|
+
* for more details.
|
|
311
|
+
*/
|
|
312
|
+
alignSelf: ReactPropTypes.Requireable<string>;
|
|
313
|
+
/** `alignContent` controls how rows align in the cross direction,
|
|
314
|
+
* overriding the `alignContent` of the parent.
|
|
315
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content
|
|
316
|
+
* for more details.
|
|
317
|
+
*/
|
|
318
|
+
alignContent: ReactPropTypes.Requireable<string>;
|
|
319
|
+
/** `overflow` controls how children are measured and displayed.
|
|
320
|
+
* `overflow: hidden` causes views to be clipped while `overflow: scroll`
|
|
321
|
+
* causes views to be measured independently of their parents main axis.
|
|
322
|
+
* It works like `overflow` in CSS (default: visible).
|
|
323
|
+
* See https://developer.mozilla.org/en/docs/Web/CSS/overflow
|
|
324
|
+
* for more details.
|
|
325
|
+
* `overflow: visible` only works on iOS. On Android, all views will clip
|
|
326
|
+
* their children.
|
|
327
|
+
*/
|
|
328
|
+
overflow: ReactPropTypes.Requireable<string>;
|
|
329
|
+
/** In React Native `flex` does not work the same way that it does in CSS.
|
|
330
|
+
* `flex` is a number rather than a string, and it works
|
|
331
|
+
* according to the `Yoga` library
|
|
332
|
+
* at https://github.com/facebook/yoga
|
|
333
|
+
*
|
|
334
|
+
* When `flex` is a positive number, it makes the component flexible
|
|
335
|
+
* and it will be sized proportional to its flex value. So a
|
|
336
|
+
* component with `flex` set to 2 will take twice the space as a
|
|
337
|
+
* component with `flex` set to 1.
|
|
338
|
+
*
|
|
339
|
+
* When `flex` is 0, the component is sized according to `width`
|
|
340
|
+
* and `height` and it is inflexible.
|
|
341
|
+
*
|
|
342
|
+
* When `flex` is -1, the component is normally sized according
|
|
343
|
+
* `width` and `height`. However, if there's not enough space,
|
|
344
|
+
* the component will shrink to its `minWidth` and `minHeight`.
|
|
345
|
+
*
|
|
346
|
+
* flexGrow, flexShrink, and flexBasis work the same as in CSS.
|
|
347
|
+
*/
|
|
348
|
+
flex: ReactPropTypes.Requireable<number>;
|
|
349
|
+
flexGrow: ReactPropTypes.Requireable<number>;
|
|
350
|
+
flexShrink: ReactPropTypes.Requireable<number>;
|
|
351
|
+
flexBasis: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
352
|
+
/**
|
|
353
|
+
* Aspect ratio control the size of the undefined dimension of a node. Aspect ratio is a
|
|
354
|
+
* non-standard property only available in react native and not CSS.
|
|
355
|
+
*
|
|
356
|
+
* - On a node with a set width/height aspect ratio control the size of the unset dimension
|
|
357
|
+
* - On a node with a set flex basis aspect ratio controls the size of the node in the cross axis
|
|
358
|
+
* if unset
|
|
359
|
+
* - On a node with a measure function aspect ratio works as though the measure function measures
|
|
360
|
+
* the flex basis
|
|
361
|
+
* - On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis
|
|
362
|
+
* if unset
|
|
363
|
+
* - Aspect ratio takes min/max dimensions into account
|
|
364
|
+
*/
|
|
365
|
+
aspectRatio: ReactPropTypes.Requireable<number>;
|
|
366
|
+
/** `zIndex` controls which components display on top of others.
|
|
367
|
+
* Normally, you don't use `zIndex`. Components render according to
|
|
368
|
+
* their order in the document tree, so later components draw over
|
|
369
|
+
* earlier ones. `zIndex` may be useful if you have animations or custom
|
|
370
|
+
* modal interfaces where you don't want this behavior.
|
|
371
|
+
*
|
|
372
|
+
* It works like the CSS `z-index` property - components with a larger
|
|
373
|
+
* `zIndex` will render on top. Think of the z-direction like it's
|
|
374
|
+
* pointing from the phone into your eyeball.
|
|
375
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/z-index for
|
|
376
|
+
* more details.
|
|
377
|
+
*/
|
|
378
|
+
zIndex: ReactPropTypes.Requireable<number>;
|
|
379
|
+
/** `direction` specifies the directional flow of the user interface.
|
|
380
|
+
* The default is `inherit`, except for root node which will have
|
|
381
|
+
* value based on the current locale.
|
|
382
|
+
* See https://facebook.github.io/yoga/docs/rtl/
|
|
383
|
+
* for more details.
|
|
384
|
+
* @platform ios
|
|
385
|
+
*/
|
|
386
|
+
direction: ReactPropTypes.Requireable<string>;
|
|
387
|
+
};
|
|
388
|
+
export default LayoutPropTypes;
|