@draftbit/core 47.1.1-cbba04.2 → 47.1.1-dbfde6.2
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/lib/commonjs/mappings/FlashList.js +3 -3
- package/lib/commonjs/mappings/FlatList.js +2 -2
- package/lib/commonjs/mappings/ScrollView.js +1 -1
- package/lib/commonjs/mappings/Shadow.js +46 -0
- package/lib/module/components/Banner.js +4 -25
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/DeprecatedButton.js +3 -21
- package/lib/module/components/DeprecatedCardWrapper.js +1 -18
- package/lib/module/components/Layout.js +21 -42
- package/lib/module/components/Pressable.js +2 -15
- package/lib/module/components/ProgressBar.js +7 -39
- package/lib/module/components/StarRating.js +4 -24
- package/lib/module/components/StepIndicator.js +18 -58
- package/lib/module/mappings/FlashList.js +3 -3
- package/lib/module/mappings/FlatList.js +2 -2
- package/lib/module/mappings/ScrollView.js +1 -1
- package/lib/module/mappings/Shadow.js +39 -0
- package/lib/typescript/src/mappings/Shadow.d.ts +73 -0
- package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/mappings/FlashList.js +3 -3
- package/src/mappings/FlashList.ts +3 -3
- package/src/mappings/FlatList.js +2 -2
- package/src/mappings/FlatList.ts +2 -2
- package/src/mappings/ScrollView.js +1 -1
- package/src/mappings/ScrollView.ts +1 -1
- package/src/mappings/Shadow.js +39 -0
- package/src/mappings/Shadow.ts +47 -0
|
@@ -46,8 +46,8 @@ const SEED_DATA = [{
|
|
|
46
46
|
}),
|
|
47
47
|
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
48
48
|
label: "Show Horizontal Scroll Indicator",
|
|
49
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
50
|
-
defaultValue:
|
|
49
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
50
|
+
defaultValue: true
|
|
51
51
|
}),
|
|
52
52
|
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
53
53
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -105,7 +105,7 @@ const SEED_DATA = [{
|
|
|
105
105
|
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
106
106
|
label: "Show Horizontal Scroll Indicator",
|
|
107
107
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
108
|
-
defaultValue:
|
|
108
|
+
defaultValue: true
|
|
109
109
|
}),
|
|
110
110
|
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
111
111
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -45,8 +45,8 @@ const SEED_DATA = {
|
|
|
45
45
|
}),
|
|
46
46
|
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
47
47
|
label: "Show Horizontal Scroll Indicator",
|
|
48
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
49
|
-
defaultValue:
|
|
48
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
49
|
+
defaultValue: true
|
|
50
50
|
}),
|
|
51
51
|
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
52
52
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -23,7 +23,7 @@ const SEED_DATA = {
|
|
|
23
23
|
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
24
24
|
label: "Show Horizontal Scroll Indicator",
|
|
25
25
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: true
|
|
27
27
|
}),
|
|
28
28
|
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
29
29
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA = {
|
|
9
|
+
name: "Shadow",
|
|
10
|
+
tag: "Shadow View",
|
|
11
|
+
description: "A cross-platform, universal shadow.",
|
|
12
|
+
library: "react-native-shadow-2",
|
|
13
|
+
category: _types.COMPONENT_TYPES.view,
|
|
14
|
+
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
15
|
+
layout: {},
|
|
16
|
+
props: {
|
|
17
|
+
disabled: (0, _types.createDisabledProp)({
|
|
18
|
+
description: "Disabled the shadow."
|
|
19
|
+
}),
|
|
20
|
+
startColor: (0, _types.createColorProp)({
|
|
21
|
+
label: "Start Color",
|
|
22
|
+
description: "The initial gradient color of the shadow.",
|
|
23
|
+
defaultValue: null
|
|
24
|
+
}),
|
|
25
|
+
endColor: (0, _types.createColorProp)({
|
|
26
|
+
label: "End Color",
|
|
27
|
+
description: "The final gradient color of the shadow.",
|
|
28
|
+
defaultValue: null
|
|
29
|
+
}),
|
|
30
|
+
distance: (0, _types.createStaticNumberProp)({
|
|
31
|
+
label: "Distance",
|
|
32
|
+
description: "The distance of the shadow."
|
|
33
|
+
}),
|
|
34
|
+
paintInside: (0, _types.createStaticBoolProp)({
|
|
35
|
+
label: "Paint Inside",
|
|
36
|
+
description: "Apply the shadow below/inside the content.",
|
|
37
|
+
defaultValue: null
|
|
38
|
+
}),
|
|
39
|
+
stretch: (0, _types.createStaticBoolProp)({
|
|
40
|
+
label: "Stretch",
|
|
41
|
+
description: "Force children to occupy all available horizontal space.",
|
|
42
|
+
defaultValue: null
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { Button, Text, View, StyleSheet, Animated } from "react-native";
|
|
3
4
|
import Surface from "./Surface";
|
|
@@ -60,6 +61,7 @@ const Banner = _ref => {
|
|
|
60
61
|
measured: true
|
|
61
62
|
});
|
|
62
63
|
};
|
|
64
|
+
|
|
63
65
|
// The banner animation has 2 parts:
|
|
64
66
|
// 1. Blank spacer element which animates its height to move the content
|
|
65
67
|
// 2. Actual banner which animates its translateY
|
|
@@ -69,10 +71,9 @@ const Banner = _ref => {
|
|
|
69
71
|
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
70
72
|
const height = Animated.multiply(position, layout.height);
|
|
71
73
|
const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
|
|
72
|
-
return /*#__PURE__*/React.createElement(Surface, {
|
|
73
|
-
...rest,
|
|
74
|
+
return /*#__PURE__*/React.createElement(Surface, _extends({}, rest, {
|
|
74
75
|
style: [styles.container, shadow(ELEVATION), style]
|
|
75
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
76
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
76
77
|
style: [styles.wrapper, contentStyle]
|
|
77
78
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
78
79
|
style: {
|
|
@@ -153,26 +154,4 @@ const styles = StyleSheet.create({
|
|
|
153
154
|
margin: 8
|
|
154
155
|
}
|
|
155
156
|
});
|
|
156
|
-
export default withTheme(Banner);
|
|
157
|
-
},
|
|
158
|
-
content: {
|
|
159
|
-
flexDirection: "row",
|
|
160
|
-
justifyContent: "flex-start",
|
|
161
|
-
marginHorizontal: 8,
|
|
162
|
-
marginTop: 16,
|
|
163
|
-
marginBottom: 0
|
|
164
|
-
},
|
|
165
|
-
icon: {
|
|
166
|
-
margin: 8
|
|
167
|
-
},
|
|
168
|
-
message: {
|
|
169
|
-
flex: 1,
|
|
170
|
-
margin: 8
|
|
171
|
-
},
|
|
172
|
-
actions: {
|
|
173
|
-
flexDirection: "row",
|
|
174
|
-
justifyContent: "flex-end",
|
|
175
|
-
margin: 8
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
157
|
export default withTheme(Banner);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { ActivityIndicator, View, Text, StyleSheet, Pressable } from "react-native";
|
|
3
4
|
import color from "color";
|
|
@@ -74,8 +75,7 @@ const Button = _ref => {
|
|
|
74
75
|
elevation,
|
|
75
76
|
alignSelf: "stretch"
|
|
76
77
|
}
|
|
77
|
-
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
78
|
-
...rest,
|
|
78
|
+
}, /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
|
|
79
79
|
onPress: onPress,
|
|
80
80
|
accessibilityState: {
|
|
81
81
|
disabled
|
|
@@ -83,7 +83,7 @@ const Button = _ref => {
|
|
|
83
83
|
accessibilityRole: "button",
|
|
84
84
|
disabled: disabled || loading,
|
|
85
85
|
style: [styles.button, buttonStyle]
|
|
86
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
86
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
87
87
|
style: styles.content
|
|
88
88
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
|
|
89
89
|
style: iconStyle
|
|
@@ -114,22 +114,4 @@ const styles = StyleSheet.create({
|
|
|
114
114
|
width: Config.buttonIconSize
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
-
export default withTheme(Button);: 1,
|
|
118
|
-
style: [textStyle, typography.button]
|
|
119
|
-
}, children))));
|
|
120
|
-
};
|
|
121
|
-
const styles = StyleSheet.create({
|
|
122
|
-
button: {
|
|
123
|
-
minWidth: 64,
|
|
124
|
-
borderStyle: "solid"
|
|
125
|
-
},
|
|
126
|
-
content: {
|
|
127
|
-
flexDirection: "row",
|
|
128
|
-
alignItems: "center",
|
|
129
|
-
justifyContent: "center"
|
|
130
|
-
},
|
|
131
|
-
icon: {
|
|
132
|
-
width: Config.buttonIconSize
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
117
|
export default withTheme(Button);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { withTheme } from "../theming";
|
|
3
4
|
import Touchable from "./Touchable";
|
|
@@ -12,24 +13,6 @@ const getWidth = numColumns => {
|
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
15
|
const Card = _ref => {
|
|
15
|
-
let {
|
|
16
|
-
numColumns = 3,
|
|
17
|
-
children,
|
|
18
|
-
onPress,
|
|
19
|
-
style,
|
|
20
|
-
...rest
|
|
21
|
-
} = _ref;
|
|
22
|
-
const width = getWidth(numColumns);
|
|
23
|
-
return /*#__PURE__*/React.createElement(Touchable, {
|
|
24
|
-
disabled: !onPress,
|
|
25
|
-
onPress: onPress,
|
|
26
|
-
style: [style, {
|
|
27
|
-
width
|
|
28
|
-
}],
|
|
29
|
-
...rest
|
|
30
|
-
}, children);
|
|
31
|
-
};
|
|
32
|
-
export default withTheme(Card);ef => {
|
|
33
16
|
let {
|
|
34
17
|
numColumns = 3,
|
|
35
18
|
children,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { View } from "react-native";
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
3
6
|
export function Center(_ref) {
|
|
4
7
|
let {
|
|
5
8
|
width = 240,
|
|
@@ -9,16 +12,15 @@ export function Center(_ref) {
|
|
|
9
12
|
style,
|
|
10
13
|
...rest
|
|
11
14
|
} = _ref;
|
|
12
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
15
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
13
16
|
style: [{
|
|
14
17
|
justifyContent: "center",
|
|
15
18
|
alignItems: "center",
|
|
16
19
|
width,
|
|
17
20
|
height,
|
|
18
21
|
backgroundColor: bgColor
|
|
19
|
-
}, style]
|
|
20
|
-
|
|
21
|
-
}, children);
|
|
22
|
+
}, style]
|
|
23
|
+
}, rest), children);
|
|
22
24
|
}
|
|
23
25
|
export function Circle(_ref2) {
|
|
24
26
|
let {
|
|
@@ -29,7 +31,7 @@ export function Circle(_ref2) {
|
|
|
29
31
|
...rest
|
|
30
32
|
} = _ref2;
|
|
31
33
|
const borderRadius = 1000;
|
|
32
|
-
return /*#__PURE__*/React.createElement(Center, {
|
|
34
|
+
return /*#__PURE__*/React.createElement(Center, _extends({
|
|
33
35
|
width: size,
|
|
34
36
|
height: size,
|
|
35
37
|
bgColor: bgColor,
|
|
@@ -37,9 +39,8 @@ export function Circle(_ref2) {
|
|
|
37
39
|
backgroundColor: bgColor,
|
|
38
40
|
borderRadius,
|
|
39
41
|
overflow: "hidden"
|
|
40
|
-
}]
|
|
41
|
-
|
|
42
|
-
}, children);
|
|
42
|
+
}]
|
|
43
|
+
}, rest), children);
|
|
43
44
|
}
|
|
44
45
|
export function Square(_ref3) {
|
|
45
46
|
let {
|
|
@@ -49,13 +50,12 @@ export function Square(_ref3) {
|
|
|
49
50
|
style,
|
|
50
51
|
...rest
|
|
51
52
|
} = _ref3;
|
|
52
|
-
return /*#__PURE__*/React.createElement(Center, {
|
|
53
|
+
return /*#__PURE__*/React.createElement(Center, _extends({
|
|
53
54
|
style: style,
|
|
54
55
|
width: size,
|
|
55
56
|
height: size,
|
|
56
|
-
bgColor: bgColor
|
|
57
|
-
|
|
58
|
-
}, children);
|
|
57
|
+
bgColor: bgColor
|
|
58
|
+
}, rest), children);
|
|
59
59
|
}
|
|
60
60
|
export function Row(_ref4) {
|
|
61
61
|
let {
|
|
@@ -65,14 +65,15 @@ export function Row(_ref4) {
|
|
|
65
65
|
style,
|
|
66
66
|
...rest
|
|
67
67
|
} = _ref4;
|
|
68
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
69
|
-
style: [style,
|
|
68
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
69
|
+
style: [style,
|
|
70
|
+
// style goes first b/c we can't override these
|
|
71
|
+
{
|
|
70
72
|
alignItems,
|
|
71
73
|
flexDirection: "row",
|
|
72
74
|
justifyContent: justifyContent
|
|
73
|
-
}]
|
|
74
|
-
|
|
75
|
-
}, children);
|
|
75
|
+
}]
|
|
76
|
+
}, rest), children);
|
|
76
77
|
}
|
|
77
78
|
export function Spacer(_ref5) {
|
|
78
79
|
let {
|
|
@@ -84,36 +85,14 @@ export function Spacer(_ref5) {
|
|
|
84
85
|
style,
|
|
85
86
|
...rest
|
|
86
87
|
} = _ref5;
|
|
87
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
88
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
88
89
|
style: [style, {
|
|
89
90
|
paddingRight: right,
|
|
90
91
|
paddingTop: top,
|
|
91
92
|
paddingLeft: left,
|
|
92
93
|
paddingBottom: bottom
|
|
93
|
-
}]
|
|
94
|
-
|
|
95
|
-
}, children);
|
|
96
|
-
}
|
|
97
|
-
export function Stack(_ref6) {
|
|
98
|
-
let {
|
|
99
|
-
children,
|
|
100
|
-
justifyContent = "flex-start",
|
|
101
|
-
alignItems = "flex-start",
|
|
102
|
-
style,
|
|
103
|
-
...rest
|
|
104
|
-
} = _ref6;
|
|
105
|
-
return (
|
|
106
|
-
/*#__PURE__*/
|
|
107
|
-
// style must go first since we don't want justifyContent, alignItems overridden
|
|
108
|
-
React.createElement(View, {
|
|
109
|
-
style: [style, {
|
|
110
|
-
justifyContent,
|
|
111
|
-
alignItems
|
|
112
|
-
}],
|
|
113
|
-
...rest
|
|
114
|
-
}, children)
|
|
115
|
-
);
|
|
116
|
-
}hildren);
|
|
94
|
+
}]
|
|
95
|
+
}, rest), children);
|
|
117
96
|
}
|
|
118
97
|
export function Stack(_ref6) {
|
|
119
98
|
let {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Pressable as NativePressable } from "react-native";
|
|
3
4
|
export default function Pressable(_ref) {
|
|
@@ -12,22 +13,8 @@ export default function Pressable(_ref) {
|
|
|
12
13
|
style,
|
|
13
14
|
...props
|
|
14
15
|
} = _ref;
|
|
15
|
-
return /*#__PURE__*/React.createElement(NativePressable, {
|
|
16
|
+
return /*#__PURE__*/React.createElement(NativePressable, _extends({
|
|
16
17
|
onPress: onPress,
|
|
17
|
-
disabled: disabled,
|
|
18
|
-
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
19
|
-
hitSlop: hitSlop ? hitSlop : 8,
|
|
20
|
-
style: _ref2 => {
|
|
21
|
-
let {
|
|
22
|
-
pressed
|
|
23
|
-
} = _ref2;
|
|
24
|
-
return [{
|
|
25
|
-
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
26
|
-
}, style];
|
|
27
|
-
},
|
|
28
|
-
...props
|
|
29
|
-
}, children);
|
|
30
|
-
} onPress: onPress,
|
|
31
18
|
disabled: disabled,
|
|
32
19
|
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
33
20
|
hitSlop: hitSlop ? hitSlop : 8,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
5
|
import React, { Component } from "react";
|
|
2
6
|
import { Animated, Easing, View, I18nManager } from "react-native";
|
|
3
7
|
const INDETERMINATE_WIDTH_FACTOR = 0.3;
|
|
@@ -5,7 +9,7 @@ const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_
|
|
|
5
9
|
export default class ProgressBar extends Component {
|
|
6
10
|
constructor(props) {
|
|
7
11
|
super(props);
|
|
8
|
-
this
|
|
12
|
+
_defineProperty(this, "handleLayout", event => {
|
|
9
13
|
const {
|
|
10
14
|
width = 150,
|
|
11
15
|
onLayout
|
|
@@ -18,7 +22,7 @@ export default class ProgressBar extends Component {
|
|
|
18
22
|
if (onLayout) {
|
|
19
23
|
onLayout(event);
|
|
20
24
|
}
|
|
21
|
-
};
|
|
25
|
+
});
|
|
22
26
|
const {
|
|
23
27
|
progress: progressP = 0,
|
|
24
28
|
indeterminate = false
|
|
@@ -66,6 +70,7 @@ export default class ProgressBar extends Component {
|
|
|
66
70
|
...animationConfig,
|
|
67
71
|
toValue: progress,
|
|
68
72
|
velocity: 0,
|
|
73
|
+
//adjust this value if animation fails - velocity is required
|
|
69
74
|
useNativeDriver
|
|
70
75
|
}).start();
|
|
71
76
|
} else {
|
|
@@ -134,43 +139,6 @@ export default class ProgressBar extends Component {
|
|
|
134
139
|
})
|
|
135
140
|
}]
|
|
136
141
|
};
|
|
137
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
138
|
-
style: [containerStyle, style],
|
|
139
|
-
onLayout: this.handleLayout,
|
|
140
|
-
...restProps
|
|
141
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
142
|
-
style: progressStyle
|
|
143
|
-
}), children);
|
|
144
|
-
}
|
|
145
|
-
} width,
|
|
146
|
-
borderWidth,
|
|
147
|
-
borderColor: borderColor || color,
|
|
148
|
-
borderRadius,
|
|
149
|
-
overflow: "hidden",
|
|
150
|
-
backgroundColor: unfilledColor
|
|
151
|
-
};
|
|
152
|
-
const progressStyle = {
|
|
153
|
-
backgroundColor: color,
|
|
154
|
-
// Always take up full height of container.
|
|
155
|
-
height: "100%",
|
|
156
|
-
transform: [{
|
|
157
|
-
translateX: this.state.animationValue.interpolate({
|
|
158
|
-
inputRange: [0, 1],
|
|
159
|
-
outputRange: [innerWidth * -INDETERMINATE_WIDTH_FACTOR, innerWidth]
|
|
160
|
-
})
|
|
161
|
-
}, {
|
|
162
|
-
translateX: this.state.progress.interpolate({
|
|
163
|
-
inputRange: [0, 1],
|
|
164
|
-
outputRange: [innerWidth / (I18nManager.isRTL ? 2 : -2), 0]
|
|
165
|
-
})
|
|
166
|
-
}, {
|
|
167
|
-
// Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
|
|
168
|
-
scaleX: this.state.progress.interpolate({
|
|
169
|
-
inputRange: [0, 1],
|
|
170
|
-
outputRange: [0.0001, 1]
|
|
171
|
-
})
|
|
172
|
-
}]
|
|
173
|
-
};
|
|
174
142
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
175
143
|
style: [containerStyle, style],
|
|
176
144
|
onLayout: this.handleLayout
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { View, StyleSheet, Pressable } from "react-native";
|
|
3
4
|
import { withTheme } from "../theming";
|
|
@@ -31,10 +32,9 @@ const StarRating = _ref => {
|
|
|
31
32
|
!!onPress && onPress(r);
|
|
32
33
|
}, [onPress]);
|
|
33
34
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
34
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
35
|
-
style: [styles.container, style]
|
|
36
|
-
|
|
37
|
-
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
|
|
35
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
36
|
+
style: [styles.container, style]
|
|
37
|
+
}, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
|
|
38
38
|
key: i,
|
|
39
39
|
style: {
|
|
40
40
|
display: "flex"
|
|
@@ -74,24 +74,4 @@ const styles = StyleSheet.create({
|
|
|
74
74
|
width: "50%"
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
export default withTheme(StarRating);ntainer: {
|
|
78
|
-
flexDirection: "row",
|
|
79
|
-
alignItems: "center"
|
|
80
|
-
},
|
|
81
|
-
touchContainer: {
|
|
82
|
-
display: "flex",
|
|
83
|
-
flexDirection: "row",
|
|
84
|
-
position: "absolute",
|
|
85
|
-
top: 0,
|
|
86
|
-
right: 0,
|
|
87
|
-
left: 0,
|
|
88
|
-
bottom: 0,
|
|
89
|
-
zIndex: 1
|
|
90
|
-
},
|
|
91
|
-
pressable: {
|
|
92
|
-
flex: 1,
|
|
93
|
-
height: "100%",
|
|
94
|
-
width: "50%"
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
77
|
export default withTheme(StarRating);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
4
|
// @ts-nocheck
|
|
2
5
|
import React, { Component } from "react";
|
|
3
6
|
import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
|
|
@@ -9,7 +12,7 @@ const STEP_STATUS = {
|
|
|
9
12
|
export default class StepIndicator extends Component {
|
|
10
13
|
constructor(props) {
|
|
11
14
|
super(props);
|
|
12
|
-
this
|
|
15
|
+
_defineProperty(this, "renderProgressBarBackground", () => {
|
|
13
16
|
const {
|
|
14
17
|
stepCount,
|
|
15
18
|
direction
|
|
@@ -52,8 +55,8 @@ export default class StepIndicator extends Component {
|
|
|
52
55
|
},
|
|
53
56
|
style: progressBarBackgroundStyle
|
|
54
57
|
});
|
|
55
|
-
};
|
|
56
|
-
this
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "renderProgressBar", () => {
|
|
57
60
|
const {
|
|
58
61
|
stepCount,
|
|
59
62
|
direction
|
|
@@ -83,8 +86,8 @@ export default class StepIndicator extends Component {
|
|
|
83
86
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
84
87
|
style: progressBarStyle
|
|
85
88
|
});
|
|
86
|
-
};
|
|
87
|
-
this
|
|
89
|
+
});
|
|
90
|
+
_defineProperty(this, "renderStepIndicator", () => {
|
|
88
91
|
let steps = [];
|
|
89
92
|
const {
|
|
90
93
|
stepCount,
|
|
@@ -115,8 +118,8 @@ export default class StepIndicator extends Component {
|
|
|
115
118
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
116
119
|
}]
|
|
117
120
|
}, steps);
|
|
118
|
-
};
|
|
119
|
-
this
|
|
121
|
+
});
|
|
122
|
+
_defineProperty(this, "renderStepLabels", () => {
|
|
120
123
|
const {
|
|
121
124
|
labels,
|
|
122
125
|
direction,
|
|
@@ -158,8 +161,8 @@ export default class StepIndicator extends Component {
|
|
|
158
161
|
alignItems: this.state.customStyles.labelAlign
|
|
159
162
|
}]
|
|
160
163
|
}, labelViews);
|
|
161
|
-
};
|
|
162
|
-
this
|
|
164
|
+
});
|
|
165
|
+
_defineProperty(this, "renderStep", position => {
|
|
163
166
|
const {
|
|
164
167
|
renderStepIndicator
|
|
165
168
|
} = this.props;
|
|
@@ -226,8 +229,8 @@ export default class StepIndicator extends Component {
|
|
|
226
229
|
}) : /*#__PURE__*/React.createElement(Text, {
|
|
227
230
|
style: indicatorLabelStyle
|
|
228
231
|
}, "".concat(position + 1)));
|
|
229
|
-
};
|
|
230
|
-
this
|
|
232
|
+
});
|
|
233
|
+
_defineProperty(this, "getStepStatus", stepPosition => {
|
|
231
234
|
const {
|
|
232
235
|
currentPosition
|
|
233
236
|
} = this.props;
|
|
@@ -238,8 +241,8 @@ export default class StepIndicator extends Component {
|
|
|
238
241
|
} else {
|
|
239
242
|
return STEP_STATUS.UNFINISHED;
|
|
240
243
|
}
|
|
241
|
-
};
|
|
242
|
-
this
|
|
244
|
+
});
|
|
245
|
+
_defineProperty(this, "onCurrentPositionChanged", position => {
|
|
243
246
|
let {
|
|
244
247
|
stepCount
|
|
245
248
|
} = this.props;
|
|
@@ -259,7 +262,7 @@ export default class StepIndicator extends Component {
|
|
|
259
262
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
260
263
|
duration: 100
|
|
261
264
|
})])]).start();
|
|
262
|
-
};
|
|
265
|
+
});
|
|
263
266
|
const defaultStyles = {
|
|
264
267
|
stepIndicatorSize: 30,
|
|
265
268
|
currentStepIndicatorSize: 40,
|
|
@@ -325,6 +328,7 @@ export default class StepIndicator extends Component {
|
|
|
325
328
|
// ),
|
|
326
329
|
// }));
|
|
327
330
|
// }
|
|
331
|
+
|
|
328
332
|
if (prevProps.currentPosition !== this.props.currentPosition) {
|
|
329
333
|
this.onCurrentPositionChanged(this.props.currentPosition);
|
|
330
334
|
}
|
|
@@ -365,50 +369,6 @@ const styles = StyleSheet.create({
|
|
|
365
369
|
justifyContent: "center"
|
|
366
370
|
}
|
|
367
371
|
});
|
|
368
|
-
StepIndicator.defaultProps = {
|
|
369
|
-
currentPosition: 0,
|
|
370
|
-
stepCount: 5,
|
|
371
|
-
customStyles: {},
|
|
372
|
-
direction: "horizontal"
|
|
373
|
-
};rrentPositionChanged(this.props.currentPosition);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
const styles = StyleSheet.create({
|
|
378
|
-
container: {
|
|
379
|
-
backgroundColor: "transparent"
|
|
380
|
-
},
|
|
381
|
-
stepIndicatorContainer: {
|
|
382
|
-
flexDirection: "row",
|
|
383
|
-
alignItems: "center",
|
|
384
|
-
justifyContent: "space-around",
|
|
385
|
-
backgroundColor: "transparent"
|
|
386
|
-
},
|
|
387
|
-
stepLabelsContainer: {
|
|
388
|
-
justifyContent: "space-around"
|
|
389
|
-
},
|
|
390
|
-
step: {
|
|
391
|
-
alignItems: "center",
|
|
392
|
-
justifyContent: "center",
|
|
393
|
-
zIndex: 2
|
|
394
|
-
},
|
|
395
|
-
stepContainer: {
|
|
396
|
-
flex: 1,
|
|
397
|
-
flexDirection: "row",
|
|
398
|
-
alignItems: "center",
|
|
399
|
-
justifyContent: "center"
|
|
400
|
-
},
|
|
401
|
-
stepLabel: {
|
|
402
|
-
fontSize: 12,
|
|
403
|
-
textAlign: "center",
|
|
404
|
-
fontWeight: "500"
|
|
405
|
-
},
|
|
406
|
-
stepLabelItem: {
|
|
407
|
-
flex: 1,
|
|
408
|
-
alignItems: "center",
|
|
409
|
-
justifyContent: "center"
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
372
|
StepIndicator.defaultProps = {
|
|
413
373
|
currentPosition: 0,
|
|
414
374
|
stepCount: 5,
|
|
@@ -40,8 +40,8 @@ export const SEED_DATA = [{
|
|
|
40
40
|
}),
|
|
41
41
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
42
42
|
label: "Show Horizontal Scroll Indicator",
|
|
43
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
44
|
-
defaultValue:
|
|
43
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
44
|
+
defaultValue: true
|
|
45
45
|
}),
|
|
46
46
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
47
47
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -99,7 +99,7 @@ export const SEED_DATA = [{
|
|
|
99
99
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
100
100
|
label: "Show Horizontal Scroll Indicator",
|
|
101
101
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
102
|
-
defaultValue:
|
|
102
|
+
defaultValue: true
|
|
103
103
|
}),
|
|
104
104
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
105
105
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -39,8 +39,8 @@ export const SEED_DATA = {
|
|
|
39
39
|
}),
|
|
40
40
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
41
41
|
label: "Show Horizontal Scroll Indicator",
|
|
42
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
43
|
-
defaultValue:
|
|
42
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
43
|
+
defaultValue: true
|
|
44
44
|
}),
|
|
45
45
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
46
46
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -17,7 +17,7 @@ export const SEED_DATA = {
|
|
|
17
17
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
18
18
|
label: "Show Horizontal Scroll Indicator",
|
|
19
19
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: true
|
|
21
21
|
}),
|
|
22
22
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
23
23
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Shadow",
|
|
4
|
+
tag: "Shadow View",
|
|
5
|
+
description: "A cross-platform, universal shadow.",
|
|
6
|
+
library: "react-native-shadow-2",
|
|
7
|
+
category: COMPONENT_TYPES.view,
|
|
8
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
+
layout: {},
|
|
10
|
+
props: {
|
|
11
|
+
disabled: createDisabledProp({
|
|
12
|
+
description: "Disabled the shadow."
|
|
13
|
+
}),
|
|
14
|
+
startColor: createColorProp({
|
|
15
|
+
label: "Start Color",
|
|
16
|
+
description: "The initial gradient color of the shadow.",
|
|
17
|
+
defaultValue: null
|
|
18
|
+
}),
|
|
19
|
+
endColor: createColorProp({
|
|
20
|
+
label: "End Color",
|
|
21
|
+
description: "The final gradient color of the shadow.",
|
|
22
|
+
defaultValue: null
|
|
23
|
+
}),
|
|
24
|
+
distance: createStaticNumberProp({
|
|
25
|
+
label: "Distance",
|
|
26
|
+
description: "The distance of the shadow."
|
|
27
|
+
}),
|
|
28
|
+
paintInside: createStaticBoolProp({
|
|
29
|
+
label: "Paint Inside",
|
|
30
|
+
description: "Apply the shadow below/inside the content.",
|
|
31
|
+
defaultValue: null
|
|
32
|
+
}),
|
|
33
|
+
stretch: createStaticBoolProp({
|
|
34
|
+
label: "Stretch",
|
|
35
|
+
description: "Force children to occupy all available horizontal space.",
|
|
36
|
+
defaultValue: null
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const SEED_DATA: {
|
|
2
|
+
name: string;
|
|
3
|
+
tag: string;
|
|
4
|
+
description: string;
|
|
5
|
+
library: string;
|
|
6
|
+
category: string;
|
|
7
|
+
stylesPanelSections: string[];
|
|
8
|
+
layout: {};
|
|
9
|
+
props: {
|
|
10
|
+
disabled: {
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
group: string;
|
|
14
|
+
editable: boolean;
|
|
15
|
+
required: boolean;
|
|
16
|
+
formType: string;
|
|
17
|
+
propType: string;
|
|
18
|
+
defaultValue: null;
|
|
19
|
+
};
|
|
20
|
+
startColor: {
|
|
21
|
+
group: string;
|
|
22
|
+
label: string;
|
|
23
|
+
description: string;
|
|
24
|
+
editable: boolean;
|
|
25
|
+
required: boolean;
|
|
26
|
+
defaultValue: null;
|
|
27
|
+
formType: string;
|
|
28
|
+
propType: string;
|
|
29
|
+
};
|
|
30
|
+
endColor: {
|
|
31
|
+
group: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description: string;
|
|
34
|
+
editable: boolean;
|
|
35
|
+
required: boolean;
|
|
36
|
+
defaultValue: null;
|
|
37
|
+
formType: string;
|
|
38
|
+
propType: string;
|
|
39
|
+
};
|
|
40
|
+
distance: {
|
|
41
|
+
label: string;
|
|
42
|
+
description: string;
|
|
43
|
+
formType: string;
|
|
44
|
+
propType: string;
|
|
45
|
+
group: string;
|
|
46
|
+
defaultValue: null;
|
|
47
|
+
editable: boolean;
|
|
48
|
+
required: boolean;
|
|
49
|
+
step: number;
|
|
50
|
+
};
|
|
51
|
+
paintInside: {
|
|
52
|
+
label: string;
|
|
53
|
+
description: string;
|
|
54
|
+
formType: string;
|
|
55
|
+
propType: string;
|
|
56
|
+
defaultValue: boolean;
|
|
57
|
+
editable: boolean;
|
|
58
|
+
required: boolean;
|
|
59
|
+
group: string;
|
|
60
|
+
};
|
|
61
|
+
stretch: {
|
|
62
|
+
label: string;
|
|
63
|
+
description: string;
|
|
64
|
+
formType: string;
|
|
65
|
+
propType: string;
|
|
66
|
+
defaultValue: boolean;
|
|
67
|
+
editable: boolean;
|
|
68
|
+
required: boolean;
|
|
69
|
+
group: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=Shadow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Shadow.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "47.1.1-
|
|
3
|
+
"version": "47.1.1-dbfde6.2+dbfde6a",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^47.1.1-
|
|
44
|
+
"@draftbit/types": "^47.1.1-dbfde6.2+dbfde6a",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.4",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "dbfde6ad1cdac6b48b63a2db76a55563c1232fd5"
|
|
95
95
|
}
|
|
@@ -41,8 +41,8 @@ export const SEED_DATA = [
|
|
|
41
41
|
}),
|
|
42
42
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
43
43
|
label: "Show Horizontal Scroll Indicator",
|
|
44
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
45
|
-
defaultValue:
|
|
44
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
45
|
+
defaultValue: true,
|
|
46
46
|
}),
|
|
47
47
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
48
48
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -101,7 +101,7 @@ export const SEED_DATA = [
|
|
|
101
101
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
102
102
|
label: "Show Horizontal Scroll Indicator",
|
|
103
103
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
104
|
-
defaultValue:
|
|
104
|
+
defaultValue: true,
|
|
105
105
|
}),
|
|
106
106
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
107
107
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -55,8 +55,8 @@ export const SEED_DATA = [
|
|
|
55
55
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
56
56
|
label: "Show Horizontal Scroll Indicator",
|
|
57
57
|
description:
|
|
58
|
-
"When true, shows a horizontal scroll indicator. The default value is
|
|
59
|
-
defaultValue:
|
|
58
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
59
|
+
defaultValue: true,
|
|
60
60
|
}),
|
|
61
61
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
62
62
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -118,7 +118,7 @@ export const SEED_DATA = [
|
|
|
118
118
|
label: "Show Horizontal Scroll Indicator",
|
|
119
119
|
description:
|
|
120
120
|
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
121
|
-
defaultValue:
|
|
121
|
+
defaultValue: true,
|
|
122
122
|
}),
|
|
123
123
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
124
124
|
label: "Show Vertical Scroll Indicator",
|
package/src/mappings/FlatList.js
CHANGED
|
@@ -39,8 +39,8 @@ export const SEED_DATA = {
|
|
|
39
39
|
}),
|
|
40
40
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
41
41
|
label: "Show Horizontal Scroll Indicator",
|
|
42
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
43
|
-
defaultValue:
|
|
42
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
43
|
+
defaultValue: true,
|
|
44
44
|
}),
|
|
45
45
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
46
46
|
label: "Show Vertical Scroll Indicator",
|
package/src/mappings/FlatList.ts
CHANGED
|
@@ -51,8 +51,8 @@ export const SEED_DATA = {
|
|
|
51
51
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
52
52
|
label: "Show Horizontal Scroll Indicator",
|
|
53
53
|
description:
|
|
54
|
-
"When true, shows a horizontal scroll indicator. The default value is
|
|
55
|
-
defaultValue:
|
|
54
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
55
|
+
defaultValue: true,
|
|
56
56
|
}),
|
|
57
57
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
58
58
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -17,7 +17,7 @@ export const SEED_DATA = {
|
|
|
17
17
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
18
18
|
label: "Show Horizontal Scroll Indicator",
|
|
19
19
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: true,
|
|
21
21
|
}),
|
|
22
22
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
23
23
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -26,7 +26,7 @@ export const SEED_DATA = {
|
|
|
26
26
|
label: "Show Horizontal Scroll Indicator",
|
|
27
27
|
description:
|
|
28
28
|
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
29
|
-
defaultValue:
|
|
29
|
+
defaultValue: true,
|
|
30
30
|
}),
|
|
31
31
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
32
32
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Shadow",
|
|
4
|
+
tag: "Shadow View",
|
|
5
|
+
description: "A cross-platform, universal shadow.",
|
|
6
|
+
library: "react-native-shadow-2",
|
|
7
|
+
category: COMPONENT_TYPES.view,
|
|
8
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
+
layout: {},
|
|
10
|
+
props: {
|
|
11
|
+
disabled: createDisabledProp({
|
|
12
|
+
description: "Disabled the shadow.",
|
|
13
|
+
}),
|
|
14
|
+
startColor: createColorProp({
|
|
15
|
+
label: "Start Color",
|
|
16
|
+
description: "The initial gradient color of the shadow.",
|
|
17
|
+
defaultValue: null,
|
|
18
|
+
}),
|
|
19
|
+
endColor: createColorProp({
|
|
20
|
+
label: "End Color",
|
|
21
|
+
description: "The final gradient color of the shadow.",
|
|
22
|
+
defaultValue: null,
|
|
23
|
+
}),
|
|
24
|
+
distance: createStaticNumberProp({
|
|
25
|
+
label: "Distance",
|
|
26
|
+
description: "The distance of the shadow.",
|
|
27
|
+
}),
|
|
28
|
+
paintInside: createStaticBoolProp({
|
|
29
|
+
label: "Paint Inside",
|
|
30
|
+
description: "Apply the shadow below/inside the content.",
|
|
31
|
+
defaultValue: null,
|
|
32
|
+
}),
|
|
33
|
+
stretch: createStaticBoolProp({
|
|
34
|
+
label: "Stretch",
|
|
35
|
+
description: "Force children to occupy all available horizontal space.",
|
|
36
|
+
defaultValue: null,
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
4
|
+
createColorProp,
|
|
5
|
+
createStaticNumberProp,
|
|
6
|
+
createStaticBoolProp,
|
|
7
|
+
createDisabledProp,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
export const SEED_DATA = {
|
|
11
|
+
name: "Shadow",
|
|
12
|
+
tag: "Shadow View",
|
|
13
|
+
description: "A cross-platform, universal shadow.",
|
|
14
|
+
library: "react-native-shadow-2",
|
|
15
|
+
category: COMPONENT_TYPES.view,
|
|
16
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
17
|
+
layout: {},
|
|
18
|
+
props: {
|
|
19
|
+
disabled: createDisabledProp({
|
|
20
|
+
description: "Disabled the shadow.",
|
|
21
|
+
}),
|
|
22
|
+
startColor: createColorProp({
|
|
23
|
+
label: "Start Color",
|
|
24
|
+
description: "The initial gradient color of the shadow.",
|
|
25
|
+
defaultValue: null,
|
|
26
|
+
}),
|
|
27
|
+
endColor: createColorProp({
|
|
28
|
+
label: "End Color",
|
|
29
|
+
description: "The final gradient color of the shadow.",
|
|
30
|
+
defaultValue: null,
|
|
31
|
+
}),
|
|
32
|
+
distance: createStaticNumberProp({
|
|
33
|
+
label: "Distance",
|
|
34
|
+
description: "The distance of the shadow.",
|
|
35
|
+
}),
|
|
36
|
+
paintInside: createStaticBoolProp({
|
|
37
|
+
label: "Paint Inside",
|
|
38
|
+
description: "Apply the shadow below/inside the content.",
|
|
39
|
+
defaultValue: null,
|
|
40
|
+
}),
|
|
41
|
+
stretch: createStaticBoolProp({
|
|
42
|
+
label: "Stretch",
|
|
43
|
+
description: "Force children to occupy all available horizontal space.",
|
|
44
|
+
defaultValue: null,
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
};
|