@draftbit/core 46.2.4-7028ac.5 → 46.2.4-710cbc.10
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/CardContainer.js +5 -15
- package/lib/commonjs/components/CircleImage.js +2 -16
- package/lib/commonjs/components/DeprecatedButton.js +4 -22
- package/lib/commonjs/components/IconButton.js +5 -22
- package/lib/commonjs/components/Image.js +3 -16
- package/lib/commonjs/components/Portal/Portal.js +3 -12
- package/lib/commonjs/components/Portal/PortalConsumer.js +8 -10
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +6 -24
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/StarRating.js +0 -1
- package/lib/commonjs/components/Switch.js +10 -23
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/FlashList.js +42 -0
- package/lib/commonjs/mappings/SVG.js +0 -1
- package/lib/module/components/AspectRatio.js +19 -2
- package/lib/module/components/Banner.js +4 -24
- package/lib/module/components/CardBlock.js +5 -15
- package/lib/module/components/CardContainer.js +15 -5
- package/lib/module/components/CardContainerShortImage.js +19 -5
- package/lib/module/components/Carousel.js +35 -10
- package/lib/module/components/Checkbox/CheckboxGroup.js +3 -17
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/IconButton.js +5 -22
- package/lib/module/components/Picker/PickerComponent.android.js +5 -23
- package/lib/module/components/Picker/PickerComponent.web.js +5 -23
- package/lib/module/components/ProgressBar.js +7 -23
- package/lib/module/components/Slider.js +22 -5
- package/lib/module/components/StarRating.js +5 -25
- package/lib/module/components/Surface.js +2 -16
- package/lib/module/components/Text.js +10 -33
- package/lib/module/components/TextField.js +30 -62
- package/lib/module/components/Touchable.js +2 -18
- package/lib/module/constants.js +0 -1
- package/lib/module/mappings/FlashList.js +33 -0
- package/lib/module/mappings/SVG.js +0 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +54 -0
- package/lib/typescript/src/mappings/SVG.d.ts +0 -1
- package/package.json +5 -4
- package/src/components/StarRating.js +0 -1
- package/src/components/StarRating.tsx +0 -1
- package/src/mappings/FlashList.js +33 -0
- package/src/mappings/FlashList.ts +41 -0
- package/src/mappings/SVG.js +0 -1
- package/src/mappings/SVG.ts +0 -1
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
import React from "react";
|
|
4
2
|
import { View, Text } from "react-native";
|
|
5
3
|
import Image from "./Image";
|
|
@@ -25,10 +23,11 @@ const CardContainerShortImage = _ref => {
|
|
|
25
23
|
onPress,
|
|
26
24
|
...rest
|
|
27
25
|
} = _ref;
|
|
28
|
-
return /*#__PURE__*/React.createElement(Card,
|
|
26
|
+
return /*#__PURE__*/React.createElement(Card, {
|
|
29
27
|
style: style,
|
|
30
|
-
onPress: onPress
|
|
31
|
-
|
|
28
|
+
onPress: onPress,
|
|
29
|
+
...rest
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Elevation, {
|
|
32
31
|
style: {
|
|
33
32
|
elevation,
|
|
34
33
|
borderRadius: roundness
|
|
@@ -76,4 +75,19 @@ const CardContainerShortImage = _ref => {
|
|
|
76
75
|
}))));
|
|
77
76
|
};
|
|
78
77
|
|
|
78
|
+
export default withTheme(CardContainerShortImage);2, {
|
|
79
|
+
color: colors.medium,
|
|
80
|
+
marginTop: 4
|
|
81
|
+
}]
|
|
82
|
+
}, subtitle) : null), mode === "right" && /*#__PURE__*/React.createElement(Image, {
|
|
83
|
+
style: {
|
|
84
|
+
aspectRatio
|
|
85
|
+
},
|
|
86
|
+
source: typeof image === "string" ? {
|
|
87
|
+
uri: image
|
|
88
|
+
} : image,
|
|
89
|
+
resizeMode: "cover"
|
|
90
|
+
}))));
|
|
91
|
+
};
|
|
92
|
+
|
|
79
93
|
export default withTheme(CardContainerShortImage);
|
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { withTheme } from "../theming";
|
|
5
3
|
import { ScrollView, View, StyleSheet, Dimensions } from "react-native";
|
|
@@ -33,8 +31,6 @@ function Pager(_ref) {
|
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
function Carousel(_ref2) {
|
|
36
|
-
var _data$length;
|
|
37
|
-
|
|
38
34
|
let {
|
|
39
35
|
data,
|
|
40
36
|
children,
|
|
@@ -42,9 +38,12 @@ function Carousel(_ref2) {
|
|
|
42
38
|
style,
|
|
43
39
|
...rest
|
|
44
40
|
} = _ref2;
|
|
41
|
+
|
|
42
|
+
var _a;
|
|
43
|
+
|
|
45
44
|
const [index, setIndex] = React.useState(0);
|
|
46
45
|
const length = React.Children.count(children);
|
|
47
|
-
const itemsLength = ((
|
|
46
|
+
const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
|
|
48
47
|
const slides = Array.isArray(data) ? data : [];
|
|
49
48
|
const {
|
|
50
49
|
width,
|
|
@@ -52,9 +51,10 @@ function Carousel(_ref2) {
|
|
|
52
51
|
} = StyleSheet.flatten(style || {});
|
|
53
52
|
const slideWidth = width || screenWidth;
|
|
54
53
|
const slideHeight = height || 250;
|
|
55
|
-
return /*#__PURE__*/React.createElement(View,
|
|
56
|
-
style: [styles.container, style]
|
|
57
|
-
|
|
54
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
55
|
+
style: [styles.container, style],
|
|
56
|
+
...rest
|
|
57
|
+
}, /*#__PURE__*/React.createElement(ScrollView, {
|
|
58
58
|
pagingEnabled: true,
|
|
59
59
|
horizontal: true,
|
|
60
60
|
decelerationRate: "fast",
|
|
@@ -82,9 +82,9 @@ function Carousel(_ref2) {
|
|
|
82
82
|
}]
|
|
83
83
|
});
|
|
84
84
|
}) : null, React.Children.map(children, child => {
|
|
85
|
-
var
|
|
85
|
+
var _a;
|
|
86
86
|
|
|
87
|
-
const s = (child === null || child === void 0 ? void 0 :
|
|
87
|
+
const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
|
|
88
88
|
return /*#__PURE__*/React.createElement(View, {
|
|
89
89
|
style: {
|
|
90
90
|
width: slideWidth
|
|
@@ -101,6 +101,31 @@ function Carousel(_ref2) {
|
|
|
101
101
|
}));
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
const styles = StyleSheet.create({
|
|
105
|
+
container: {
|
|
106
|
+
backgroundColor: "#eee"
|
|
107
|
+
},
|
|
108
|
+
pager: {
|
|
109
|
+
position: "absolute",
|
|
110
|
+
bottom: 12,
|
|
111
|
+
left: 0,
|
|
112
|
+
right: 0,
|
|
113
|
+
flexDirection: "row",
|
|
114
|
+
justifyContent: "center",
|
|
115
|
+
alignItems: "center"
|
|
116
|
+
},
|
|
117
|
+
bullet: {
|
|
118
|
+
marginHorizontal: 2,
|
|
119
|
+
width: 10,
|
|
120
|
+
height: 10,
|
|
121
|
+
borderRadius: 20,
|
|
122
|
+
backgroundColor: "#000"
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export default withTheme(Carousel);th
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
|
|
104
129
|
const styles = StyleSheet.create({
|
|
105
130
|
container: {
|
|
106
131
|
backgroundColor: "#eee"
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View } from "react-native";
|
|
3
5
|
import { checkboxGroupContext, Direction } from "./context";
|
|
@@ -25,23 +27,7 @@ const CheckboxGroup = _ref => {
|
|
|
25
27
|
});
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
29
|
-
style: [{
|
|
30
|
-
minHeight: 40
|
|
31
|
-
}, style],
|
|
32
|
-
...rest
|
|
33
|
-
}, /*#__PURE__*/React.createElement(Provider, {
|
|
34
|
-
value: {
|
|
35
|
-
values,
|
|
36
|
-
onValueChange,
|
|
37
|
-
direction
|
|
38
|
-
}
|
|
39
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
40
|
-
style: _containerStyle
|
|
41
|
-
}, children)));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default CheckboxGroup;PURE__*/React.createElement(View, _extends({
|
|
30
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
45
31
|
style: [{
|
|
46
32
|
minHeight: 40
|
|
47
33
|
}, style]
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet, ActivityIndicator, Pressable, Platform } from "react-native";
|
|
3
5
|
import { withTheme } from "../theming";
|
|
@@ -16,7 +18,7 @@ const IconButton = _ref => {
|
|
|
16
18
|
...props
|
|
17
19
|
} = _ref;
|
|
18
20
|
const iconColor = customColor || theme.colors.primary;
|
|
19
|
-
return /*#__PURE__*/React.createElement(Pressable, {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
20
22
|
onPress: onPress,
|
|
21
23
|
disabled: disabled || loading,
|
|
22
24
|
style: _ref2 => {
|
|
@@ -30,9 +32,8 @@ const IconButton = _ref => {
|
|
|
30
32
|
alignItems: "center",
|
|
31
33
|
justifyContent: "center"
|
|
32
34
|
}, style];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}, /*#__PURE__*/React.createElement(View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
35
|
+
}
|
|
36
|
+
}, props), /*#__PURE__*/React.createElement(View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
36
37
|
name: icon,
|
|
37
38
|
size: size - 2,
|
|
38
39
|
color: iconColor
|
|
@@ -42,24 +43,6 @@ const IconButton = _ref => {
|
|
|
42
43
|
}) : null));
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
const styles = StyleSheet.create({
|
|
46
|
-
container: {
|
|
47
|
-
alignItems: "center",
|
|
48
|
-
justifyContent: "center",
|
|
49
|
-
...Platform.select({
|
|
50
|
-
web: {
|
|
51
|
-
cursor: "pointer",
|
|
52
|
-
userSelect: "none"
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export default withTheme(IconButton);ement(ActivityIndicator, {
|
|
58
|
-
size: "small",
|
|
59
|
-
color: iconColor
|
|
60
|
-
}) : null));
|
|
61
|
-
};
|
|
62
|
-
|
|
63
46
|
const styles = StyleSheet.create({
|
|
64
47
|
container: {
|
|
65
48
|
alignItems: "center",
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet } from "react-native";
|
|
3
5
|
import omit from "lodash.omit";
|
|
@@ -8,6 +10,8 @@ import TextField from "../TextField";
|
|
|
8
10
|
import Touchable from "../Touchable";
|
|
9
11
|
|
|
10
12
|
const Picker = _ref => {
|
|
13
|
+
var _options$find$label, _options$find;
|
|
14
|
+
|
|
11
15
|
let {
|
|
12
16
|
style,
|
|
13
17
|
options,
|
|
@@ -17,9 +21,6 @@ const Picker = _ref => {
|
|
|
17
21
|
onValueChange: onValueChangeOverride = () => {},
|
|
18
22
|
...props
|
|
19
23
|
} = _ref;
|
|
20
|
-
|
|
21
|
-
var _a, _b;
|
|
22
|
-
|
|
23
24
|
const {
|
|
24
25
|
viewStyles: {
|
|
25
26
|
borderRadius,
|
|
@@ -66,7 +67,7 @@ const Picker = _ref => {
|
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
69
|
-
const selectedLabel = selectedValue && ((
|
|
70
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
70
71
|
return /*#__PURE__*/React.createElement(Touchable, {
|
|
71
72
|
disabled: disabled,
|
|
72
73
|
onPress: toggleFocus,
|
|
@@ -88,25 +89,6 @@ const Picker = _ref => {
|
|
|
88
89
|
label: o.label,
|
|
89
90
|
value: o.value,
|
|
90
91
|
key: o.value
|
|
91
|
-
}))), /*#__PURE__*/React.createElement(View, {
|
|
92
|
-
pointerEvents: "none"
|
|
93
|
-
}, /*#__PURE__*/React.createElement(TextField, { ...props,
|
|
94
|
-
value: selectedLabel,
|
|
95
|
-
placeholder: placeholder,
|
|
96
|
-
// @ts-ignore
|
|
97
|
-
ref: textField,
|
|
98
|
-
disabled: disabled,
|
|
99
|
-
// @ts-expect-error
|
|
100
|
-
style: stylesWithoutMargin
|
|
101
|
-
}))));
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const styles = StyleSheet.create({
|
|
105
|
-
container: {
|
|
106
|
-
alignSelf: "stretch"
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
export default withTheme(Picker); key: o.value
|
|
110
92
|
}))), /*#__PURE__*/React.createElement(View, {
|
|
111
93
|
pointerEvents: "none"
|
|
112
94
|
}, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet } from "react-native";
|
|
3
5
|
import { Picker as NativePicker } from "@react-native-picker/picker";
|
|
@@ -8,6 +10,8 @@ import TextField from "../TextField";
|
|
|
8
10
|
import Touchable from "../Touchable";
|
|
9
11
|
|
|
10
12
|
const Picker = _ref => {
|
|
13
|
+
var _options$find$label, _options$find;
|
|
14
|
+
|
|
11
15
|
let {
|
|
12
16
|
style,
|
|
13
17
|
options,
|
|
@@ -17,9 +21,6 @@ const Picker = _ref => {
|
|
|
17
21
|
onValueChange: onValueChangeOverride = () => {},
|
|
18
22
|
...props
|
|
19
23
|
} = _ref;
|
|
20
|
-
|
|
21
|
-
var _a, _b;
|
|
22
|
-
|
|
23
24
|
const {
|
|
24
25
|
viewStyles: {
|
|
25
26
|
borderRadius,
|
|
@@ -66,7 +67,7 @@ const Picker = _ref => {
|
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
69
|
-
const selectedLabel = selectedValue && ((
|
|
70
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
70
71
|
return /*#__PURE__*/React.createElement(Touchable, {
|
|
71
72
|
disabled: disabled,
|
|
72
73
|
onPress: toggleFocus,
|
|
@@ -89,25 +90,6 @@ const Picker = _ref => {
|
|
|
89
90
|
label: o.label,
|
|
90
91
|
value: o.value,
|
|
91
92
|
key: o.value
|
|
92
|
-
}))), /*#__PURE__*/React.createElement(View, {
|
|
93
|
-
pointerEvents: "none"
|
|
94
|
-
}, /*#__PURE__*/React.createElement(TextField, { ...props,
|
|
95
|
-
value: selectedLabel,
|
|
96
|
-
placeholder: placeholder,
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
ref: textField,
|
|
99
|
-
disabled: disabled,
|
|
100
|
-
// @ts-expect-error
|
|
101
|
-
style: stylesWithoutMargin
|
|
102
|
-
}))));
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const styles = StyleSheet.create({
|
|
106
|
-
container: {
|
|
107
|
-
alignSelf: "stretch"
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
export default withTheme(Picker); key: o.value
|
|
111
93
|
}))), /*#__PURE__*/React.createElement(View, {
|
|
112
94
|
pointerEvents: "none"
|
|
113
95
|
}, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
|
|
@@ -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
|
+
|
|
3
|
+
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; }
|
|
4
|
+
|
|
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;
|
|
@@ -6,7 +10,7 @@ export default class ProgressBar extends Component {
|
|
|
6
10
|
constructor(props) {
|
|
7
11
|
super(props);
|
|
8
12
|
|
|
9
|
-
this
|
|
13
|
+
_defineProperty(this, "handleLayout", event => {
|
|
10
14
|
const {
|
|
11
15
|
width = 150,
|
|
12
16
|
onLayout
|
|
@@ -21,7 +25,7 @@ export default class ProgressBar extends Component {
|
|
|
21
25
|
if (onLayout) {
|
|
22
26
|
onLayout(event);
|
|
23
27
|
}
|
|
24
|
-
};
|
|
28
|
+
});
|
|
25
29
|
|
|
26
30
|
const {
|
|
27
31
|
progress: progressP = 0,
|
|
@@ -75,6 +79,7 @@ export default class ProgressBar extends Component {
|
|
|
75
79
|
Animated[animationType](this.state.progress, { ...animationConfig,
|
|
76
80
|
toValue: progress,
|
|
77
81
|
velocity: 0,
|
|
82
|
+
//adjust this value if animation fails - velocity is required
|
|
78
83
|
useNativeDriver
|
|
79
84
|
}).start();
|
|
80
85
|
} else {
|
|
@@ -145,27 +150,6 @@ export default class ProgressBar extends Component {
|
|
|
145
150
|
})
|
|
146
151
|
}]
|
|
147
152
|
};
|
|
148
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
149
|
-
style: [containerStyle, style],
|
|
150
|
-
onLayout: this.handleLayout,
|
|
151
|
-
...restProps
|
|
152
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
153
|
-
style: progressStyle
|
|
154
|
-
}), children);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
}te.progress.interpolate({
|
|
158
|
-
inputRange: [0, 1],
|
|
159
|
-
outputRange: [innerWidth / (I18nManager.isRTL ? 2 : -2), 0]
|
|
160
|
-
})
|
|
161
|
-
}, {
|
|
162
|
-
// Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
|
|
163
|
-
scaleX: this.state.progress.interpolate({
|
|
164
|
-
inputRange: [0, 1],
|
|
165
|
-
outputRange: [0.0001, 1]
|
|
166
|
-
})
|
|
167
|
-
}]
|
|
168
|
-
};
|
|
169
153
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
170
154
|
style: [containerStyle, style],
|
|
171
155
|
onLayout: this.handleLayout
|
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { View, StyleSheet } from "react-native";
|
|
5
3
|
import NativeSlider from "@react-native-community/slider";
|
|
@@ -73,9 +71,10 @@ function Slider(_ref) {
|
|
|
73
71
|
onValueChange(newValue);
|
|
74
72
|
};
|
|
75
73
|
|
|
76
|
-
return /*#__PURE__*/React.createElement(View,
|
|
77
|
-
style: [styles.container, style]
|
|
78
|
-
|
|
74
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
75
|
+
style: [styles.container, style],
|
|
76
|
+
...rest
|
|
77
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
79
78
|
color: leftIconThemeColor,
|
|
80
79
|
name: leftIcon,
|
|
81
80
|
size: 24
|
|
@@ -97,6 +96,24 @@ function Slider(_ref) {
|
|
|
97
96
|
}) : null);
|
|
98
97
|
}
|
|
99
98
|
|
|
99
|
+
const styles = StyleSheet.create({
|
|
100
|
+
container: {
|
|
101
|
+
height: 40,
|
|
102
|
+
flexDirection: "row",
|
|
103
|
+
alignItems: "center"
|
|
104
|
+
},
|
|
105
|
+
slider: {
|
|
106
|
+
flex: 1,
|
|
107
|
+
marginHorizontal: 12
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
export default withTheme(Slider);Icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
111
|
+
color: rightIconThemeColor,
|
|
112
|
+
name: rightIcon,
|
|
113
|
+
size: 24
|
|
114
|
+
}) : null);
|
|
115
|
+
}
|
|
116
|
+
|
|
100
117
|
const styles = StyleSheet.create({
|
|
101
118
|
container: {
|
|
102
119
|
height: 40,
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet, Pressable } from "react-native";
|
|
3
5
|
import { withTheme } from "../theming";
|
|
@@ -32,10 +34,9 @@ const StarRating = _ref => {
|
|
|
32
34
|
!!onPress && onPress(r);
|
|
33
35
|
}, [onPress]);
|
|
34
36
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
35
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
36
|
-
style: [styles.container, style]
|
|
37
|
-
|
|
38
|
-
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
|
|
37
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
38
|
+
style: [styles.container, style]
|
|
39
|
+
}, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
|
|
39
40
|
key: i,
|
|
40
41
|
style: {
|
|
41
42
|
display: "flex"
|
|
@@ -56,7 +57,6 @@ const StarRating = _ref => {
|
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
const styles = StyleSheet.create({
|
|
59
|
-
//comment!
|
|
60
60
|
container: {
|
|
61
61
|
flexDirection: "row",
|
|
62
62
|
alignItems: "center"
|
|
@@ -77,24 +77,4 @@ const styles = StyleSheet.create({
|
|
|
77
77
|
width: "50%"
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
export default withTheme(StarRating);ontainer: {
|
|
81
|
-
flexDirection: "row",
|
|
82
|
-
alignItems: "center"
|
|
83
|
-
},
|
|
84
|
-
touchContainer: {
|
|
85
|
-
display: "flex",
|
|
86
|
-
flexDirection: "row",
|
|
87
|
-
position: "absolute",
|
|
88
|
-
top: 0,
|
|
89
|
-
right: 0,
|
|
90
|
-
left: 0,
|
|
91
|
-
bottom: 0,
|
|
92
|
-
zIndex: 1
|
|
93
|
-
},
|
|
94
|
-
pressable: {
|
|
95
|
-
flex: 1,
|
|
96
|
-
height: "100%",
|
|
97
|
-
width: "50%"
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
80
|
export default withTheme(StarRating);
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
|
|
2
4
|
import * as React from "react";
|
|
3
5
|
import { Animated, StyleSheet } from "react-native";
|
|
@@ -36,22 +38,6 @@ const Surface = _ref => {
|
|
|
36
38
|
}
|
|
37
39
|
};
|
|
38
40
|
|
|
39
|
-
return /*#__PURE__*/React.createElement(Animated.View, { ...rest,
|
|
40
|
-
style: [{
|
|
41
|
-
backgroundColor: getBackgroundColor(),
|
|
42
|
-
elevation,
|
|
43
|
-
...evalationStyles,
|
|
44
|
-
...restStyle
|
|
45
|
-
}]
|
|
46
|
-
}, children);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default withTheme(Surface); overlay(elevation, colors.surface);
|
|
50
|
-
} else {
|
|
51
|
-
return colors.surface;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
41
|
return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
|
|
56
42
|
style: [{
|
|
57
43
|
backgroundColor: getBackgroundColor(),
|
|
@@ -1,8 +1,18 @@
|
|
|
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
|
+
|
|
3
|
+
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; }
|
|
4
|
+
|
|
1
5
|
import * as React from "react";
|
|
2
6
|
import { Text as NativeText, I18nManager } from "react-native";
|
|
3
7
|
import { withTheme } from "../theming";
|
|
4
8
|
|
|
5
9
|
class Text extends React.Component {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
|
|
13
|
+
_defineProperty(this, "_root", void 0);
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
setNativeProps(args) {
|
|
7
17
|
return this._root && this._root.setNativeProps(args);
|
|
8
18
|
}
|
|
@@ -12,39 +22,6 @@ class Text extends React.Component {
|
|
|
12
22
|
style,
|
|
13
23
|
...rest
|
|
14
24
|
} = this.props;
|
|
15
|
-
const writingDirection = I18nManager.isRTL ? "rtl" : "ltr";
|
|
16
|
-
return /*#__PURE__*/React.createElement(NativeText, { ...rest,
|
|
17
|
-
ref: c => {
|
|
18
|
-
this._root = c;
|
|
19
|
-
},
|
|
20
|
-
style: [{
|
|
21
|
-
textAlign: "left",
|
|
22
|
-
writingDirection
|
|
23
|
-
}, style]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const BaseLink = _ref => {
|
|
30
|
-
let {
|
|
31
|
-
style,
|
|
32
|
-
theme,
|
|
33
|
-
title,
|
|
34
|
-
...props
|
|
35
|
-
} = _ref;
|
|
36
|
-
return /*#__PURE__*/React.createElement(Text, {
|
|
37
|
-
hitSlop: 8,
|
|
38
|
-
style: [{
|
|
39
|
-
color: theme.colors.primary
|
|
40
|
-
}, style],
|
|
41
|
-
theme: theme,
|
|
42
|
-
...props
|
|
43
|
-
}, title);
|
|
44
|
-
};
|
|
45
|
-
const Link = withTheme(BaseLink);
|
|
46
|
-
export { Link };
|
|
47
|
-
export default withTheme(Text);ops;
|
|
48
25
|
const writingDirection = I18nManager.isRTL ? "rtl" : "ltr";
|
|
49
26
|
return /*#__PURE__*/React.createElement(NativeText, _extends({}, rest, {
|
|
50
27
|
ref: c => {
|