@draftbit/core 46.2.4-fab8f2.5 → 46.2.4-fba591.5
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/components/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/AnimatedCircularProgress.js +12 -2
- package/lib/commonjs/components/AvatarEdit.js +17 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/commonjs/components/IconButton.js +22 -5
- package/lib/commonjs/components/Picker/PickerComponent.web.js +24 -5
- package/lib/commonjs/components/Portal/PortalConsumer.js +10 -8
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -3
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/{SVG/SVG.js → SVG.js} +17 -2
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/TextField.js +63 -30
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/mappings/SVG.js +1 -1
- package/lib/module/components/SVG.js +31 -0
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/SVG.js +2 -2
- package/lib/typescript/src/components/{SVG/SVG.web.d.ts → SVG.d.ts} +2 -2
- package/lib/typescript/src/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/SVG.js +13 -0
- package/src/components/SVG.tsx +35 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/src/mappings/SVG.js +2 -2
- package/src/mappings/SVG.ts +2 -2
- package/lib/commonjs/components/SVG/SVG.web.js +0 -30
- package/lib/module/components/SVG/SVG.js +0 -19
- package/lib/module/components/SVG/SVG.web.js +0 -17
- package/lib/typescript/src/components/SVG/SVG.d.ts +0 -8
- package/src/components/SVG/SVG.js +0 -8
- package/src/components/SVG/SVG.tsx +0 -21
- package/src/components/SVG/SVG.web.js +0 -6
- package/src/components/SVG/SVG.web.tsx +0 -16
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
padding: 8
|
|
79
|
+
},
|
|
80
|
+
row: {
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
item: {
|
|
86
|
+
marginVertical: 6,
|
|
87
|
+
paddingLeft: 8
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
justifyContent: "center"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
96
|
+
|
|
77
97
|
exports.default = _default;
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
20
|
const AnimatedProgress = _reactNative.Animated.createAnimatedComponent(_CircularProgress.default);
|
|
23
21
|
|
|
24
22
|
const AnimatedCircularProgress = _ref => {
|
|
@@ -69,6 +67,18 @@ const AnimatedCircularProgress = _ref => {
|
|
|
69
67
|
React.useEffect(() => {
|
|
70
68
|
animate();
|
|
71
69
|
}, [fill, animate]);
|
|
70
|
+
return /*#__PURE__*/React.createElement(AnimatedProgress, { ...other,
|
|
71
|
+
style: other.style,
|
|
72
|
+
childrenContainerStyle: other.childrenContainerStyle,
|
|
73
|
+
fill: fillAnimation,
|
|
74
|
+
tintColor: animateColor()
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var _default = AnimatedCircularProgress;
|
|
79
|
+
exports.default = _default;eEffect(() => {
|
|
80
|
+
animate();
|
|
81
|
+
}, [fill, animate]);
|
|
72
82
|
return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
|
|
73
83
|
style: other.style,
|
|
74
84
|
childrenContainerStyle: other.childrenContainerStyle,
|
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const AvatarEdit = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -42,9 +40,10 @@ const AvatarEdit = _ref => {
|
|
|
42
40
|
width: size,
|
|
43
41
|
height: size
|
|
44
42
|
};
|
|
45
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
46
|
-
style: [style, dimensions]
|
|
47
|
-
|
|
43
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
44
|
+
style: [style, dimensions],
|
|
45
|
+
...rest
|
|
46
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
48
47
|
onPress: onPress
|
|
49
48
|
}, /*#__PURE__*/React.createElement(_CircleImage.default, {
|
|
50
49
|
source: image,
|
|
@@ -68,4 +67,17 @@ const AvatarEdit = _ref => {
|
|
|
68
67
|
|
|
69
68
|
var _default = (0, _theming.withTheme)(AvatarEdit);
|
|
70
69
|
|
|
70
|
+
exports.default = _default;: colorStyles.editBackgroundColor,
|
|
71
|
+
borderRadius: size * (3 / 16),
|
|
72
|
+
padding: size * (3 / 32)
|
|
73
|
+
}
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
75
|
+
name: "MaterialIcons/edit",
|
|
76
|
+
color: colorStyles.editIconColor,
|
|
77
|
+
size: size * (3 / 16)
|
|
78
|
+
}))));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var _default = (0, _theming.withTheme)(AvatarEdit);
|
|
82
|
+
|
|
71
83
|
exports.default = _default;
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
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); }
|
|
23
|
-
|
|
24
22
|
const screenWidth = _reactNative.Dimensions.get("window").width;
|
|
25
23
|
|
|
26
24
|
function Pager(_ref) {
|
|
@@ -50,8 +48,6 @@ function Pager(_ref) {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
function Carousel(_ref2) {
|
|
53
|
-
var _data$length;
|
|
54
|
-
|
|
55
51
|
let {
|
|
56
52
|
data,
|
|
57
53
|
children,
|
|
@@ -59,9 +55,12 @@ function Carousel(_ref2) {
|
|
|
59
55
|
style,
|
|
60
56
|
...rest
|
|
61
57
|
} = _ref2;
|
|
58
|
+
|
|
59
|
+
var _a;
|
|
60
|
+
|
|
62
61
|
const [index, setIndex] = React.useState(0);
|
|
63
62
|
const length = React.Children.count(children);
|
|
64
|
-
const itemsLength = ((
|
|
63
|
+
const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
|
|
65
64
|
const slides = Array.isArray(data) ? data : [];
|
|
66
65
|
|
|
67
66
|
const {
|
|
@@ -71,9 +70,10 @@ function Carousel(_ref2) {
|
|
|
71
70
|
|
|
72
71
|
const slideWidth = width || screenWidth;
|
|
73
72
|
const slideHeight = height || 250;
|
|
74
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
75
|
-
style: [styles.container, style]
|
|
76
|
-
|
|
73
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
74
|
+
style: [styles.container, style],
|
|
75
|
+
...rest
|
|
76
|
+
}, /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
77
77
|
pagingEnabled: true,
|
|
78
78
|
horizontal: true,
|
|
79
79
|
decelerationRate: "fast",
|
|
@@ -101,9 +101,9 @@ function Carousel(_ref2) {
|
|
|
101
101
|
}]
|
|
102
102
|
});
|
|
103
103
|
}) : null, React.Children.map(children, child => {
|
|
104
|
-
var
|
|
104
|
+
var _a;
|
|
105
105
|
|
|
106
|
-
const s = (child === null || child === void 0 ? void 0 :
|
|
106
|
+
const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
|
|
107
107
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
108
108
|
style: {
|
|
109
109
|
width: slideWidth
|
|
@@ -144,4 +144,28 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
144
144
|
|
|
145
145
|
var _default = (0, _theming.withTheme)(Carousel);
|
|
146
146
|
|
|
147
|
+
exports.default = _default;e({
|
|
148
|
+
container: {
|
|
149
|
+
backgroundColor: "#eee"
|
|
150
|
+
},
|
|
151
|
+
pager: {
|
|
152
|
+
position: "absolute",
|
|
153
|
+
bottom: 12,
|
|
154
|
+
left: 0,
|
|
155
|
+
right: 0,
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
justifyContent: "center",
|
|
158
|
+
alignItems: "center"
|
|
159
|
+
},
|
|
160
|
+
bullet: {
|
|
161
|
+
marginHorizontal: 2,
|
|
162
|
+
width: 10,
|
|
163
|
+
height: 10,
|
|
164
|
+
borderRadius: 20,
|
|
165
|
+
backgroundColor: "#000"
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
var _default = (0, _theming.withTheme)(Carousel);
|
|
170
|
+
|
|
147
171
|
exports.default = _default;
|
|
@@ -25,9 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let Direction;
|
|
28
|
+
var Direction;
|
|
31
29
|
exports.Direction = Direction;
|
|
32
30
|
|
|
33
31
|
(function (Direction) {
|
|
@@ -91,13 +89,14 @@ const CheckboxGroupRow = _ref => {
|
|
|
91
89
|
textStyles,
|
|
92
90
|
viewStyles
|
|
93
91
|
} = (0, _utilities.extractStyles)(style);
|
|
94
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
92
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
95
93
|
onPress: handlePress,
|
|
96
94
|
style: [styles.mainParent, {
|
|
97
95
|
flexDirection: direction
|
|
98
96
|
}, viewStyles],
|
|
99
|
-
disabled: disabled
|
|
100
|
-
|
|
97
|
+
disabled: disabled,
|
|
98
|
+
...rest
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
101
100
|
style: [styles.label, {
|
|
102
101
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
103
102
|
}, labelContainerStyle]
|
|
@@ -137,5 +136,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
|
|
139
|
+
var _default = CheckboxGroupRow;
|
|
140
|
+
exports.default = _default;center",
|
|
141
|
+
justifyContent: "space-around",
|
|
142
|
+
paddingStart: 20,
|
|
143
|
+
minHeight: 50,
|
|
144
|
+
paddingEnd: 20,
|
|
145
|
+
display: "flex",
|
|
146
|
+
..._reactNative.Platform.select({
|
|
147
|
+
web: {
|
|
148
|
+
cursor: "pointer",
|
|
149
|
+
userSelect: "none"
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
label: {
|
|
154
|
+
flex: 3
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
140
158
|
var _default = CheckboxGroupRow;
|
|
141
159
|
exports.default = _default;
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const IconButton = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -31,7 +29,7 @@ const IconButton = _ref => {
|
|
|
31
29
|
...props
|
|
32
30
|
} = _ref;
|
|
33
31
|
const iconColor = customColor || theme.colors.primary;
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
32
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
35
33
|
onPress: onPress,
|
|
36
34
|
disabled: disabled || loading,
|
|
37
35
|
style: _ref2 => {
|
|
@@ -45,8 +43,9 @@ const IconButton = _ref => {
|
|
|
45
43
|
alignItems: "center",
|
|
46
44
|
justifyContent: "center"
|
|
47
45
|
}, style];
|
|
48
|
-
}
|
|
49
|
-
|
|
46
|
+
},
|
|
47
|
+
...props
|
|
48
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
50
49
|
name: icon,
|
|
51
50
|
size: size - 2,
|
|
52
51
|
color: iconColor
|
|
@@ -71,4 +70,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
71
70
|
|
|
72
71
|
var _default = (0, _theming.withTheme)(IconButton);
|
|
73
72
|
|
|
73
|
+
exports.default = _default;) : null));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
justifyContent: "center",
|
|
80
|
+
..._reactNative.Platform.select({
|
|
81
|
+
web: {
|
|
82
|
+
cursor: "pointer",
|
|
83
|
+
userSelect: "none"
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
var _default = (0, _theming.withTheme)(IconButton);
|
|
90
|
+
|
|
74
91
|
exports.default = _default;
|
|
@@ -27,11 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
30
|
const Picker = _ref => {
|
|
33
|
-
var _options$find$label, _options$find;
|
|
34
|
-
|
|
35
31
|
let {
|
|
36
32
|
style,
|
|
37
33
|
options,
|
|
@@ -41,6 +37,9 @@ const Picker = _ref => {
|
|
|
41
37
|
onValueChange: onValueChangeOverride = () => {},
|
|
42
38
|
...props
|
|
43
39
|
} = _ref;
|
|
40
|
+
|
|
41
|
+
var _a, _b;
|
|
42
|
+
|
|
44
43
|
const {
|
|
45
44
|
viewStyles: {
|
|
46
45
|
borderRadius,
|
|
@@ -87,7 +86,7 @@ const Picker = _ref => {
|
|
|
87
86
|
};
|
|
88
87
|
|
|
89
88
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
90
|
-
const selectedLabel = selectedValue && ((
|
|
89
|
+
const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
|
|
91
90
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
92
91
|
disabled: disabled,
|
|
93
92
|
onPress: toggleFocus,
|
|
@@ -112,6 +111,26 @@ const Picker = _ref => {
|
|
|
112
111
|
key: o.value
|
|
113
112
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
114
113
|
pointerEvents: "none"
|
|
114
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
|
|
115
|
+
value: selectedLabel,
|
|
116
|
+
placeholder: placeholder,
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
ref: textField,
|
|
119
|
+
disabled: disabled,
|
|
120
|
+
// @ts-expect-error
|
|
121
|
+
style: stylesWithoutMargin
|
|
122
|
+
}))));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const styles = _reactNative.StyleSheet.create({
|
|
126
|
+
container: {
|
|
127
|
+
alignSelf: "stretch"
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
132
|
+
|
|
133
|
+
exports.default = _default; pointerEvents: "none"
|
|
115
134
|
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
116
135
|
value: selectedLabel,
|
|
117
136
|
placeholder: placeholder // @ts-ignore
|
|
@@ -11,15 +11,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
|
|
16
14
|
class PortalConsumer extends React.Component {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
|
|
20
|
-
_defineProperty(this, "key", void 0);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
15
|
async componentDidMount() {
|
|
24
16
|
this.checkManager(); // Delay updating to prevent React from going to infinite loop
|
|
25
17
|
|
|
@@ -49,4 +41,14 @@ class PortalConsumer extends React.Component {
|
|
|
49
41
|
|
|
50
42
|
}
|
|
51
43
|
|
|
44
|
+
exports.default = PortalConsumer;er` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
render() {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
52
54
|
exports.default = PortalConsumer;
|
|
@@ -13,10 +13,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
-
|
|
20
16
|
const INDETERMINATE_WIDTH_FACTOR = 0.3;
|
|
21
17
|
const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
|
|
22
18
|
|
|
@@ -24,7 +20,7 @@ class ProgressBar extends _react.Component {
|
|
|
24
20
|
constructor(props) {
|
|
25
21
|
super(props);
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
this.handleLayout = event => {
|
|
28
24
|
const {
|
|
29
25
|
width = 150,
|
|
30
26
|
onLayout
|
|
@@ -39,7 +35,7 @@ class ProgressBar extends _react.Component {
|
|
|
39
35
|
if (onLayout) {
|
|
40
36
|
onLayout(event);
|
|
41
37
|
}
|
|
42
|
-
}
|
|
38
|
+
};
|
|
43
39
|
|
|
44
40
|
const {
|
|
45
41
|
progress: progressP = 0,
|
|
@@ -93,7 +89,6 @@ class ProgressBar extends _react.Component {
|
|
|
93
89
|
_reactNative.Animated[animationType](this.state.progress, { ...animationConfig,
|
|
94
90
|
toValue: progress,
|
|
95
91
|
velocity: 0,
|
|
96
|
-
//adjust this value if animation fails - velocity is required
|
|
97
92
|
useNativeDriver
|
|
98
93
|
}).start();
|
|
99
94
|
} else {
|
|
@@ -165,6 +160,27 @@ class ProgressBar extends _react.Component {
|
|
|
165
160
|
})
|
|
166
161
|
}]
|
|
167
162
|
};
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
164
|
+
style: [containerStyle, style],
|
|
165
|
+
onLayout: this.handleLayout,
|
|
166
|
+
...restProps
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
168
|
+
style: progressStyle
|
|
169
|
+
}), children);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
exports.default = ProgressBar;h / (_reactNative.I18nManager.isRTL ? 2 : -2), 0]
|
|
175
|
+
})
|
|
176
|
+
}, {
|
|
177
|
+
// Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
|
|
178
|
+
scaleX: this.state.progress.interpolate({
|
|
179
|
+
inputRange: [0, 1],
|
|
180
|
+
outputRange: [0.0001, 1]
|
|
181
|
+
})
|
|
182
|
+
}]
|
|
183
|
+
};
|
|
168
184
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
|
|
169
185
|
style: [containerStyle, style],
|
|
170
186
|
onLayout: this.handleLayout
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
20
|
const {
|
|
23
21
|
Provider
|
|
24
22
|
} = _context.radioButtonGroupContext;
|
|
@@ -63,9 +61,24 @@ const RadioButtonGroup = _ref => {
|
|
|
63
61
|
});
|
|
64
62
|
}
|
|
65
63
|
|
|
66
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
64
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
67
65
|
style: [{
|
|
68
66
|
minHeight: 40
|
|
67
|
+
}, style],
|
|
68
|
+
...rest
|
|
69
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
70
|
+
value: {
|
|
71
|
+
value: internalValue,
|
|
72
|
+
onValueChange: handleValueChange,
|
|
73
|
+
direction
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
76
|
+
style: _containerStyle
|
|
77
|
+
}, children)));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var _default = RadioButtonGroup;
|
|
81
|
+
exports.default = _default;0
|
|
69
82
|
}, style]
|
|
70
83
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
71
84
|
value: {
|
|
@@ -11,21 +11,36 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
|
|
12
12
|
var _reactNativeSvg = require("react-native-svg");
|
|
13
13
|
|
|
14
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
14
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
19
|
|
|
16
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
21
|
|
|
18
22
|
const SVG = _ref => {
|
|
19
23
|
let {
|
|
20
|
-
source =
|
|
24
|
+
source = _Config.default.placeholderSvgURL,
|
|
21
25
|
style
|
|
22
26
|
} = _ref;
|
|
23
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
27
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
+
style: style
|
|
29
|
+
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
30
|
+
width: "100%",
|
|
31
|
+
height: "100%",
|
|
32
|
+
uri: source
|
|
33
|
+
})), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
24
34
|
style: style
|
|
25
35
|
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
26
36
|
width: "100%",
|
|
27
37
|
height: "100%",
|
|
28
38
|
uri: source
|
|
39
|
+
})), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
40
|
+
style: style,
|
|
41
|
+
source: {
|
|
42
|
+
uri: source
|
|
43
|
+
}
|
|
29
44
|
}));
|
|
30
45
|
};
|
|
31
46
|
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
26
|
function maybeParseValue(value) {
|
|
29
27
|
if (value === undefined) {
|
|
30
28
|
return undefined;
|
|
@@ -91,9 +89,10 @@ function Slider(_ref) {
|
|
|
91
89
|
onValueChange(newValue);
|
|
92
90
|
};
|
|
93
91
|
|
|
94
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
95
|
-
style: [styles.container, style]
|
|
96
|
-
|
|
92
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
|
+
style: [styles.container, style],
|
|
94
|
+
...rest
|
|
95
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
97
96
|
color: leftIconThemeColor,
|
|
98
97
|
name: leftIcon,
|
|
99
98
|
size: 24
|
|
@@ -129,4 +128,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
129
128
|
|
|
130
129
|
var _default = (0, _theming.withTheme)(Slider);
|
|
131
130
|
|
|
131
|
+
exports.default = _default;: rightIconThemeColor,
|
|
132
|
+
name: rightIcon,
|
|
133
|
+
size: 24
|
|
134
|
+
}) : null);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const styles = _reactNative.StyleSheet.create({
|
|
138
|
+
container: {
|
|
139
|
+
height: 40,
|
|
140
|
+
flexDirection: "row",
|
|
141
|
+
alignItems: "center"
|
|
142
|
+
},
|
|
143
|
+
slider: {
|
|
144
|
+
flex: 1,
|
|
145
|
+
marginHorizontal: 12
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
var _default = (0, _theming.withTheme)(Slider);
|
|
150
|
+
|
|
132
151
|
exports.default = _default;
|
|
@@ -17,10 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
|
|
24
20
|
const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
25
21
|
|
|
26
22
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
@@ -30,8 +26,7 @@ const ICON_SIZE = 24;
|
|
|
30
26
|
class TextField extends React.Component {
|
|
31
27
|
constructor() {
|
|
32
28
|
super(...arguments);
|
|
33
|
-
|
|
34
|
-
_defineProperty(this, "state", {
|
|
29
|
+
this.state = {
|
|
35
30
|
labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
|
|
36
31
|
focused: false,
|
|
37
32
|
placeholder: this.props.error ? this.props.placeholder : "",
|
|
@@ -39,36 +34,35 @@ class TextField extends React.Component {
|
|
|
39
34
|
measured: false,
|
|
40
35
|
width: 0
|
|
41
36
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_defineProperty(this, "_timer", setTimeout(() => {}, 0));
|
|
37
|
+
};
|
|
38
|
+
this._timer = setTimeout(() => {}, 0);
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
this._showPlaceholder = () => {
|
|
47
41
|
clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
|
|
48
42
|
// If we show it immediately, they'll overlap and look ugly
|
|
49
43
|
|
|
50
44
|
this._timer = setTimeout(() => this.setState({
|
|
51
45
|
placeholder: this.props.placeholder
|
|
52
46
|
}), 50);
|
|
53
|
-
}
|
|
47
|
+
};
|
|
54
48
|
|
|
55
|
-
|
|
49
|
+
this._hidePlaceholder = () => this.setState({
|
|
56
50
|
placeholder: ""
|
|
57
|
-
})
|
|
51
|
+
});
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
|
|
60
54
|
toValue: 1,
|
|
61
55
|
duration: FOCUS_ANIMATION_DURATION,
|
|
62
56
|
useNativeDriver: true
|
|
63
|
-
}).start()
|
|
57
|
+
}).start();
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
|
|
66
60
|
toValue: 0,
|
|
67
61
|
duration: BLUR_ANIMATION_DURATION,
|
|
68
62
|
useNativeDriver: true
|
|
69
|
-
}).start()
|
|
63
|
+
}).start();
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
this._handleFocus = () => {
|
|
72
66
|
if (this.props.disabled) {
|
|
73
67
|
return;
|
|
74
68
|
}
|
|
@@ -76,9 +70,9 @@ class TextField extends React.Component {
|
|
|
76
70
|
this.setState({
|
|
77
71
|
focused: true
|
|
78
72
|
});
|
|
79
|
-
}
|
|
73
|
+
};
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
this._handleBlur = () => {
|
|
82
76
|
if (this.props.disabled) {
|
|
83
77
|
return;
|
|
84
78
|
}
|
|
@@ -86,9 +80,9 @@ class TextField extends React.Component {
|
|
|
86
80
|
this.setState({
|
|
87
81
|
focused: false
|
|
88
82
|
});
|
|
89
|
-
}
|
|
83
|
+
};
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
this._handleChangeText = value => {
|
|
92
86
|
if (this.props.disabled) {
|
|
93
87
|
return;
|
|
94
88
|
}
|
|
@@ -104,9 +98,9 @@ class TextField extends React.Component {
|
|
|
104
98
|
});
|
|
105
99
|
this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
|
|
106
100
|
}
|
|
107
|
-
}
|
|
101
|
+
};
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
this._root = undefined;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
static getDerivedStateFromProps(nextProps, prevState) {
|
|
@@ -157,10 +151,11 @@ class TextField extends React.Component {
|
|
|
157
151
|
focused: !prevState.focused
|
|
158
152
|
}));
|
|
159
153
|
}
|
|
160
|
-
|
|
161
154
|
/**
|
|
162
155
|
* @internal
|
|
163
156
|
*/
|
|
157
|
+
|
|
158
|
+
|
|
164
159
|
setNativeProps(args) {
|
|
165
160
|
return this._root && this._root.setNativeProps(args);
|
|
166
161
|
}
|
|
@@ -203,7 +198,8 @@ class TextField extends React.Component {
|
|
|
203
198
|
roundness,
|
|
204
199
|
disabledOpacity
|
|
205
200
|
},
|
|
206
|
-
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props
|
|
201
|
+
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, { ...props
|
|
202
|
+
}),
|
|
207
203
|
...rest
|
|
208
204
|
} = this.props;
|
|
209
205
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
@@ -357,9 +353,9 @@ class TextField extends React.Component {
|
|
|
357
353
|
|
|
358
354
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
359
355
|
style: [styles.container, styleProp]
|
|
360
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon,
|
|
356
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
361
357
|
style: leftIconStyle
|
|
362
|
-
})
|
|
358
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
363
359
|
style: (0, _utilities.applyStyles)([containerStyle], {
|
|
364
360
|
height: style === null || style === void 0 ? void 0 : style.height,
|
|
365
361
|
backgroundColor: bgColor,
|
|
@@ -426,9 +422,9 @@ class TextField extends React.Component {
|
|
|
426
422
|
style: {
|
|
427
423
|
justifyContent: type === "solid" ? "center" : undefined
|
|
428
424
|
}
|
|
429
|
-
}, /*#__PURE__*/React.createElement(Icon,
|
|
425
|
+
}, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
430
426
|
style: leftIconStyle
|
|
431
|
-
}))
|
|
427
|
+
})) : null, render({
|
|
432
428
|
ref: c => {
|
|
433
429
|
this._root = c;
|
|
434
430
|
},
|
|
@@ -469,6 +465,43 @@ var _default = (0, _theming.withTheme)(TextField);
|
|
|
469
465
|
|
|
470
466
|
exports.default = _default;
|
|
471
467
|
|
|
468
|
+
const styles = _reactNative.StyleSheet.create({
|
|
469
|
+
container: {
|
|
470
|
+
alignSelf: "stretch"
|
|
471
|
+
},
|
|
472
|
+
placeholder: {
|
|
473
|
+
position: "absolute",
|
|
474
|
+
left: 0
|
|
475
|
+
},
|
|
476
|
+
underline: {
|
|
477
|
+
position: "absolute",
|
|
478
|
+
left: 0,
|
|
479
|
+
right: 0,
|
|
480
|
+
bottom: 0,
|
|
481
|
+
height: 2
|
|
482
|
+
},
|
|
483
|
+
input: {
|
|
484
|
+
flexGrow: 1,
|
|
485
|
+
justifyContent: "center",
|
|
486
|
+
textAlignVertical: "center",
|
|
487
|
+
margin: 0,
|
|
488
|
+
textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
|
|
489
|
+
}
|
|
490
|
+
});? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
491
|
+
style: [{
|
|
492
|
+
color: error ? colors.error : colors.light,
|
|
493
|
+
marginTop: 8,
|
|
494
|
+
marginLeft: assistiveTextLeftMargin
|
|
495
|
+
}]
|
|
496
|
+
}, assistiveText) : null);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var _default = (0, _theming.withTheme)(TextField);
|
|
502
|
+
|
|
503
|
+
exports.default = _default;
|
|
504
|
+
|
|
472
505
|
const styles = _reactNative.StyleSheet.create({
|
|
473
506
|
container: {
|
|
474
507
|
alignSelf: "stretch"
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
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); }
|
|
23
|
-
|
|
24
22
|
const ToggleButton = _ref => {
|
|
25
23
|
let {
|
|
26
24
|
Icon,
|
|
@@ -58,7 +56,7 @@ const ToggleButton = _ref => {
|
|
|
58
56
|
onPress(!internalValue);
|
|
59
57
|
};
|
|
60
58
|
|
|
61
|
-
return /*#__PURE__*/React.createElement(_IconButton.default,
|
|
59
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
62
60
|
Icon: Icon,
|
|
63
61
|
icon: icon,
|
|
64
62
|
size: iconSize,
|
|
@@ -70,6 +68,23 @@ const ToggleButton = _ref => {
|
|
|
70
68
|
height,
|
|
71
69
|
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
72
70
|
borderColor: colors[borderColor]
|
|
71
|
+
}, style],
|
|
72
|
+
...rest
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
mainContainer: {
|
|
78
|
+
borderWidth: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
var _default = (0, _theming.withTheme)(ToggleButton);
|
|
83
|
+
|
|
84
|
+
exports.default = _default;th,
|
|
85
|
+
height,
|
|
86
|
+
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
87
|
+
borderColor: colors[borderColor]
|
|
73
88
|
}, style]
|
|
74
89
|
}, rest));
|
|
75
90
|
};
|
package/lib/commonjs/index.js
CHANGED
|
@@ -448,7 +448,7 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton"));
|
|
|
448
448
|
|
|
449
449
|
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
450
450
|
|
|
451
|
-
var _SVG = _interopRequireDefault(require("./components/SVG
|
|
451
|
+
var _SVG = _interopRequireDefault(require("./components/SVG"));
|
|
452
452
|
|
|
453
453
|
var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
|
|
454
454
|
|
|
@@ -18,7 +18,7 @@ const SEED_DATA = {
|
|
|
18
18
|
},
|
|
19
19
|
stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
20
20
|
props: {
|
|
21
|
-
source: (0, _types.
|
|
21
|
+
source: (0, _types.createSVGProp)()
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, Platform, Image } from "react-native";
|
|
3
|
+
import { SvgUri } from "react-native-svg";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
|
|
6
|
+
const SVG = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
source = Config.placeholderSvgURL,
|
|
9
|
+
style
|
|
10
|
+
} = _ref;
|
|
11
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, Platform.OS === "ios" && /*#__PURE__*/React.createElement(View, {
|
|
12
|
+
style: style
|
|
13
|
+
}, /*#__PURE__*/React.createElement(SvgUri, {
|
|
14
|
+
width: "100%",
|
|
15
|
+
height: "100%",
|
|
16
|
+
uri: source
|
|
17
|
+
})), Platform.OS === "android" && /*#__PURE__*/React.createElement(View, {
|
|
18
|
+
style: style
|
|
19
|
+
}, /*#__PURE__*/React.createElement(SvgUri, {
|
|
20
|
+
width: "100%",
|
|
21
|
+
height: "100%",
|
|
22
|
+
uri: source
|
|
23
|
+
})), Platform.OS === "web" && /*#__PURE__*/React.createElement(Image, {
|
|
24
|
+
style: style,
|
|
25
|
+
source: {
|
|
26
|
+
uri: source
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default SVG;
|
package/lib/module/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as SVG } from "./components/SVG
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "SVG",
|
|
4
4
|
tag: "SVG",
|
|
@@ -10,6 +10,6 @@ export const SEED_DATA = {
|
|
|
10
10
|
},
|
|
11
11
|
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
12
12
|
props: {
|
|
13
|
-
source:
|
|
13
|
+
source: createSVGProp()
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StyleProp, ImageStyle } from "react-native";
|
|
3
|
-
declare type
|
|
3
|
+
declare type SVGComponentProps = {
|
|
4
4
|
source: string;
|
|
5
5
|
style?: StyleProp<ImageStyle>;
|
|
6
6
|
};
|
|
7
|
-
declare const SVG: React.FC<React.PropsWithChildren<
|
|
7
|
+
declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
|
|
8
8
|
export default SVG;
|
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as SVG } from "./components/SVG
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.2.4-
|
|
3
|
+
"version": "46.2.4-fba591.5+fba59138",
|
|
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": "^46.2.4-
|
|
44
|
+
"@draftbit/types": "^46.2.4-fba591.5+fba59138",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "fba591388f0266ada6d067e2a46a9d3eef53c3c4"
|
|
84
84
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, Platform, Image } from "react-native";
|
|
3
|
+
import { SvgUri } from "react-native-svg";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
|
|
6
|
+
return (React.createElement(React.Fragment, null,
|
|
7
|
+
Platform.OS === "ios" && (React.createElement(View, { style: style },
|
|
8
|
+
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
|
|
9
|
+
Platform.OS === "android" && (React.createElement(View, { style: style },
|
|
10
|
+
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
|
|
11
|
+
Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
|
|
12
|
+
};
|
|
13
|
+
export default SVG;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, Platform, Image, StyleProp, ImageStyle } from "react-native";
|
|
3
|
+
import { SvgUri } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
import Config from "./Config";
|
|
6
|
+
|
|
7
|
+
type SVGComponentProps = {
|
|
8
|
+
source: string;
|
|
9
|
+
style?: StyleProp<ImageStyle>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
|
|
13
|
+
source = Config.placeholderSvgURL,
|
|
14
|
+
style,
|
|
15
|
+
}) => {
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
{Platform.OS === "ios" && (
|
|
19
|
+
<View style={style}>
|
|
20
|
+
<SvgUri width="100%" height="100%" uri={source} />
|
|
21
|
+
</View>
|
|
22
|
+
)}
|
|
23
|
+
{Platform.OS === "android" && (
|
|
24
|
+
<View style={style}>
|
|
25
|
+
<SvgUri width="100%" height="100%" uri={source} />
|
|
26
|
+
</View>
|
|
27
|
+
)}
|
|
28
|
+
{Platform.OS === "web" && (
|
|
29
|
+
<Image style={style} source={{ uri: source }} />
|
|
30
|
+
)}
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default SVG;
|
package/src/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as SVG } from "./components/SVG
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
package/src/index.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
18
18
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
19
19
|
export { default as IconButton } from "./components/IconButton";
|
|
20
20
|
export { default as Image } from "./components/Image";
|
|
21
|
-
export { default as SVG } from "./components/SVG
|
|
21
|
+
export { default as SVG } from "./components/SVG";
|
|
22
22
|
export { default as NumberInput } from "./components/NumberInput";
|
|
23
23
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
24
24
|
export { default as StarRating } from "./components/StarRating";
|
package/src/mappings/SVG.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "SVG",
|
|
4
4
|
tag: "SVG",
|
|
@@ -15,6 +15,6 @@ export const SEED_DATA = {
|
|
|
15
15
|
StylesPanelSections.Effects,
|
|
16
16
|
],
|
|
17
17
|
props: {
|
|
18
|
-
source:
|
|
18
|
+
source: createSVGProp(),
|
|
19
19
|
},
|
|
20
20
|
};
|
package/src/mappings/SVG.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMPONENT_TYPES,
|
|
3
|
-
|
|
3
|
+
createSVGProp,
|
|
4
4
|
StylesPanelSections,
|
|
5
5
|
} from "@draftbit/types";
|
|
6
6
|
|
|
@@ -20,6 +20,6 @@ export const SEED_DATA = {
|
|
|
20
20
|
StylesPanelSections.Effects,
|
|
21
21
|
],
|
|
22
22
|
props: {
|
|
23
|
-
source:
|
|
23
|
+
source: createSVGProp(),
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
|
-
const SVG = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
source = "https://static.draftbit.com/images/placeholder-image.svg",
|
|
19
|
-
style
|
|
20
|
-
} = _ref;
|
|
21
|
-
return /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
22
|
-
style: style,
|
|
23
|
-
source: {
|
|
24
|
-
uri: source
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var _default = SVG;
|
|
30
|
-
exports.default = _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { SvgUri } from "react-native-svg";
|
|
4
|
-
|
|
5
|
-
const SVG = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
source = "https://static.draftbit.com/images/placeholder-image.svg",
|
|
8
|
-
style
|
|
9
|
-
} = _ref;
|
|
10
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
11
|
-
style: style
|
|
12
|
-
}, /*#__PURE__*/React.createElement(SvgUri, {
|
|
13
|
-
width: "100%",
|
|
14
|
-
height: "100%",
|
|
15
|
-
uri: source
|
|
16
|
-
}));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default SVG;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Image } from "react-native";
|
|
3
|
-
|
|
4
|
-
const SVG = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
source = "https://static.draftbit.com/images/placeholder-image.svg",
|
|
7
|
-
style
|
|
8
|
-
} = _ref;
|
|
9
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
10
|
-
style: style,
|
|
11
|
-
source: {
|
|
12
|
-
uri: source
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default SVG;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
declare type SvgComponentProps = {
|
|
4
|
-
source: string;
|
|
5
|
-
style?: StyleProp<ViewStyle>;
|
|
6
|
-
};
|
|
7
|
-
declare const SVG: React.FC<React.PropsWithChildren<SvgComponentProps>>;
|
|
8
|
-
export default SVG;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { SvgUri } from "react-native-svg";
|
|
4
|
-
const SVG = ({ source = "https://static.draftbit.com/images/placeholder-image.svg", style, }) => {
|
|
5
|
-
return (React.createElement(View, { style: style },
|
|
6
|
-
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source })));
|
|
7
|
-
};
|
|
8
|
-
export default SVG;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import { SvgUri } from "react-native-svg";
|
|
4
|
-
|
|
5
|
-
type SvgComponentProps = {
|
|
6
|
-
source: string;
|
|
7
|
-
style?: StyleProp<ViewStyle>;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const SVG: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
|
|
11
|
-
source = "https://static.draftbit.com/images/placeholder-image.svg",
|
|
12
|
-
style,
|
|
13
|
-
}) => {
|
|
14
|
-
return (
|
|
15
|
-
<View style={style}>
|
|
16
|
-
<SvgUri width="100%" height="100%" uri={source} />
|
|
17
|
-
</View>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default SVG;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Image } from "react-native";
|
|
3
|
-
const SVG = ({ source = "https://static.draftbit.com/images/placeholder-image.svg", style, }) => {
|
|
4
|
-
return React.createElement(Image, { style: style, source: { uri: source } });
|
|
5
|
-
};
|
|
6
|
-
export default SVG;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Image, StyleProp, ImageStyle } from "react-native";
|
|
3
|
-
|
|
4
|
-
type SvgComponentProps = {
|
|
5
|
-
source: string;
|
|
6
|
-
style?: StyleProp<ImageStyle>;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const SVG: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
|
|
10
|
-
source = "https://static.draftbit.com/images/placeholder-image.svg",
|
|
11
|
-
style,
|
|
12
|
-
}) => {
|
|
13
|
-
return <Image style={style} source={{ uri: source }} />;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default SVG;
|