@draftbit/core 46.4.4-7f27fb.2 → 46.4.4-808a01.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/components/AnimatedCircularProgress.js +12 -2
- package/lib/commonjs/components/AspectRatio.js +19 -2
- package/lib/commonjs/components/AvatarEdit.js +17 -5
- package/lib/commonjs/components/Banner.js +24 -4
- package/lib/commonjs/components/Button.js +32 -11
- package/lib/commonjs/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardContainer.js +15 -5
- package/lib/commonjs/components/CardContainerRating.js +15 -5
- package/lib/commonjs/components/CardContainerShortImage.js +17 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +24 -6
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/CircleImage.js +16 -2
- package/lib/commonjs/components/CircularProgress.js +15 -7
- package/lib/commonjs/components/DeprecatedCardWrapper.js +17 -2
- package/lib/commonjs/components/DeprecatedFAB.js +22 -4
- package/lib/commonjs/components/Divider.js +16 -2
- package/lib/commonjs/components/FAB.js +20 -5
- package/lib/commonjs/components/FormRow.js +17 -3
- package/lib/commonjs/components/IconButton.js +22 -5
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/NumberInput.js +13 -2
- package/lib/commonjs/components/Picker/PickerComponent.web.js +24 -5
- package/lib/commonjs/components/Portal/PortalConsumer.js +10 -8
- package/lib/commonjs/components/Portal/PortalHost.js +27 -15
- package/lib/commonjs/components/Portal/PortalManager.js +19 -11
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/RadioButton/RadioButton.js +14 -3
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +24 -6
- package/lib/commonjs/components/ScreenContainer.js +23 -5
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/StarRating.js +25 -5
- package/lib/commonjs/components/StepIndicator.js +34 -16
- package/lib/commonjs/components/Surface.js +14 -3
- package/lib/commonjs/components/Text.js +37 -11
- package/lib/commonjs/components/TextField.js +63 -30
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/components/Touchable.js +16 -2
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/mappings/AudioPlayer.js +32 -2
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/ToggleButton.js +3 -17
- package/lib/module/index.js +0 -1
- package/lib/module/mappings/AudioPlayer.js +33 -3
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/mappings/AudioPlayer.d.ts +62 -1
- package/package.json +4 -6
- package/src/index.js +0 -1
- package/src/index.tsx +0 -1
- package/src/mappings/AudioPlayer.js +39 -2
- package/src/mappings/AudioPlayer.ts +41 -1
- package/lib/commonjs/components/TabView/TabView.js +0 -102
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
- package/lib/commonjs/components/TabView/index.js +0 -23
- package/lib/commonjs/mappings/TabView.js +0 -79
- package/lib/module/components/TabView/TabView.js +0 -87
- package/lib/module/components/TabView/TabViewItem.js +0 -18
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
- package/lib/typescript/src/components/TabView/index.d.ts +0 -2
- package/lib/typescript/src/mappings/TabView.d.ts +0 -111
- package/src/components/TabView/TabView.js +0 -34
- package/src/components/TabView/TabView.tsx +0 -97
- package/src/components/TabView/TabViewItem.js +0 -5
- package/src/components/TabView/TabViewItem.tsx +0 -21
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.tsx +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -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
|
|
@@ -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 RadioButton = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -51,7 +49,20 @@ const RadioButton = _ref => {
|
|
|
51
49
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
52
50
|
};
|
|
53
51
|
|
|
54
|
-
return /*#__PURE__*/React.createElement(_IconButton.default,
|
|
52
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
53
|
+
Icon: Icon,
|
|
54
|
+
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
55
|
+
color: isSelected ? color : unselectedColor,
|
|
56
|
+
disabled: disabled,
|
|
57
|
+
onPress: handlePress,
|
|
58
|
+
size: size,
|
|
59
|
+
style: style,
|
|
60
|
+
...rest
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var _default = RadioButton;
|
|
65
|
+
exports.default = _default;turn /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
55
66
|
Icon: Icon,
|
|
56
67
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
57
68
|
color: isSelected ? color : unselectedColor,
|
|
@@ -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) {
|
|
@@ -90,13 +88,14 @@ const RadioButtonRow = _ref => {
|
|
|
90
88
|
textStyles,
|
|
91
89
|
viewStyles
|
|
92
90
|
} = (0, _utilities.extractStyles)(style);
|
|
93
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
91
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
94
92
|
onPress: handlePress,
|
|
95
93
|
style: [styles.mainParent, {
|
|
96
94
|
flexDirection: direction
|
|
97
95
|
}, viewStyles],
|
|
98
|
-
disabled: disabled
|
|
99
|
-
|
|
96
|
+
disabled: disabled,
|
|
97
|
+
...rest
|
|
98
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
99
|
style: [styles.label, {
|
|
101
100
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
102
101
|
}, labelContainerStyle]
|
|
@@ -135,5 +134,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
135
134
|
}
|
|
136
135
|
});
|
|
137
136
|
|
|
137
|
+
var _default = RadioButtonRow;
|
|
138
|
+
exports.default = _default; "center",
|
|
139
|
+
justifyContent: "space-around",
|
|
140
|
+
paddingStart: 20,
|
|
141
|
+
minHeight: 50,
|
|
142
|
+
paddingEnd: 20,
|
|
143
|
+
display: "flex",
|
|
144
|
+
..._reactNative.Platform.select({
|
|
145
|
+
web: {
|
|
146
|
+
cursor: "pointer",
|
|
147
|
+
userSelect: "none"
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
label: {
|
|
152
|
+
flex: 3
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
138
156
|
var _default = RadioButtonRow;
|
|
139
157
|
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
|
function ScreenContainer(_ref) {
|
|
23
21
|
let {
|
|
24
22
|
scrollable = false,
|
|
@@ -41,12 +39,13 @@ function ScreenContainer(_ref) {
|
|
|
41
39
|
edges.push("bottom");
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView,
|
|
42
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
45
43
|
edges: edges,
|
|
46
44
|
style: [styles.container, {
|
|
47
45
|
backgroundColor
|
|
48
|
-
}]
|
|
49
|
-
|
|
46
|
+
}],
|
|
47
|
+
...rest
|
|
48
|
+
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
50
49
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
51
50
|
backgroundColor
|
|
52
51
|
}, style]
|
|
@@ -69,4 +68,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
69
68
|
|
|
70
69
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
71
70
|
|
|
71
|
+
exports.default = _default;reactNative.View, {
|
|
72
|
+
style: [styles.container, {
|
|
73
|
+
backgroundColor
|
|
74
|
+
}, style]
|
|
75
|
+
}, children));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = _reactNative.StyleSheet.create({
|
|
79
|
+
container: {
|
|
80
|
+
flex: 1
|
|
81
|
+
},
|
|
82
|
+
scrollViewContainer: {
|
|
83
|
+
flexGrow: 1,
|
|
84
|
+
flex: undefined
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
89
|
+
|
|
72
90
|
exports.default = _default;
|
|
@@ -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;
|
|
@@ -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 StarRating = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -47,9 +45,10 @@ const StarRating = _ref => {
|
|
|
47
45
|
!!onPress && onPress(r);
|
|
48
46
|
}, [onPress]);
|
|
49
47
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
50
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
51
|
-
style: [styles.container, style]
|
|
52
|
-
|
|
48
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
49
|
+
style: [styles.container, style],
|
|
50
|
+
...rest
|
|
51
|
+
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
53
52
|
key: i,
|
|
54
53
|
style: {
|
|
55
54
|
display: "flex"
|
|
@@ -93,4 +92,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
93
92
|
|
|
94
93
|
var _default = (0, _theming.withTheme)(StarRating);
|
|
95
94
|
|
|
95
|
+
exports.default = _default;ignItems: "center"
|
|
96
|
+
},
|
|
97
|
+
touchContainer: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
flexDirection: "row",
|
|
100
|
+
position: "absolute",
|
|
101
|
+
top: 0,
|
|
102
|
+
right: 0,
|
|
103
|
+
left: 0,
|
|
104
|
+
bottom: 0,
|
|
105
|
+
zIndex: 1
|
|
106
|
+
},
|
|
107
|
+
pressable: {
|
|
108
|
+
flex: 1,
|
|
109
|
+
height: "100%",
|
|
110
|
+
width: "50%"
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
var _default = (0, _theming.withTheme)(StarRating);
|
|
115
|
+
|
|
96
116
|
exports.default = _default;
|
|
@@ -13,8 +13,7 @@ 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
|
-
|
|
17
|
-
|
|
16
|
+
// @ts-nocheck
|
|
18
17
|
const STEP_STATUS = {
|
|
19
18
|
CURRENT: "current",
|
|
20
19
|
FINISHED: "finished",
|
|
@@ -25,7 +24,7 @@ class StepIndicator extends _react.Component {
|
|
|
25
24
|
constructor(props) {
|
|
26
25
|
super(props);
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
this.renderProgressBarBackground = () => {
|
|
29
28
|
const {
|
|
30
29
|
stepCount,
|
|
31
30
|
direction
|
|
@@ -70,9 +69,9 @@ class StepIndicator extends _react.Component {
|
|
|
70
69
|
},
|
|
71
70
|
style: progressBarBackgroundStyle
|
|
72
71
|
});
|
|
73
|
-
}
|
|
72
|
+
};
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
this.renderProgressBar = () => {
|
|
76
75
|
const {
|
|
77
76
|
stepCount,
|
|
78
77
|
direction
|
|
@@ -104,9 +103,9 @@ class StepIndicator extends _react.Component {
|
|
|
104
103
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
105
104
|
style: progressBarStyle
|
|
106
105
|
});
|
|
107
|
-
}
|
|
106
|
+
};
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
this.renderStepIndicator = () => {
|
|
110
109
|
let steps = [];
|
|
111
110
|
const {
|
|
112
111
|
stepCount,
|
|
@@ -139,9 +138,9 @@ class StepIndicator extends _react.Component {
|
|
|
139
138
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
140
139
|
}]
|
|
141
140
|
}, steps);
|
|
142
|
-
}
|
|
141
|
+
};
|
|
143
142
|
|
|
144
|
-
|
|
143
|
+
this.renderStepLabels = () => {
|
|
145
144
|
const {
|
|
146
145
|
labels,
|
|
147
146
|
direction,
|
|
@@ -183,9 +182,9 @@ class StepIndicator extends _react.Component {
|
|
|
183
182
|
alignItems: this.state.customStyles.labelAlign
|
|
184
183
|
}]
|
|
185
184
|
}, labelViews);
|
|
186
|
-
}
|
|
185
|
+
};
|
|
187
186
|
|
|
188
|
-
|
|
187
|
+
this.renderStep = position => {
|
|
189
188
|
const {
|
|
190
189
|
renderStepIndicator
|
|
191
190
|
} = this.props;
|
|
@@ -257,9 +256,9 @@ class StepIndicator extends _react.Component {
|
|
|
257
256
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
258
257
|
style: indicatorLabelStyle
|
|
259
258
|
}, "".concat(position + 1)));
|
|
260
|
-
}
|
|
259
|
+
};
|
|
261
260
|
|
|
262
|
-
|
|
261
|
+
this.getStepStatus = stepPosition => {
|
|
263
262
|
const {
|
|
264
263
|
currentPosition
|
|
265
264
|
} = this.props;
|
|
@@ -271,9 +270,9 @@ class StepIndicator extends _react.Component {
|
|
|
271
270
|
} else {
|
|
272
271
|
return STEP_STATUS.UNFINISHED;
|
|
273
272
|
}
|
|
274
|
-
}
|
|
273
|
+
};
|
|
275
274
|
|
|
276
|
-
|
|
275
|
+
this.onCurrentPositionChanged = position => {
|
|
277
276
|
let {
|
|
278
277
|
stepCount
|
|
279
278
|
} = this.props;
|
|
@@ -296,7 +295,7 @@ class StepIndicator extends _react.Component {
|
|
|
296
295
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
297
296
|
duration: 100
|
|
298
297
|
})])]).start();
|
|
299
|
-
}
|
|
298
|
+
};
|
|
300
299
|
|
|
301
300
|
const defaultStyles = {
|
|
302
301
|
stepIndicatorSize: 30,
|
|
@@ -411,6 +410,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
411
410
|
}
|
|
412
411
|
});
|
|
413
412
|
|
|
413
|
+
StepIndicator.defaultProps = {
|
|
414
|
+
currentPosition: 0,
|
|
415
|
+
stepCount: 5,
|
|
416
|
+
customStyles: {},
|
|
417
|
+
direction: "horizontal"
|
|
418
|
+
}; justifyContent: "center"
|
|
419
|
+
},
|
|
420
|
+
stepLabel: {
|
|
421
|
+
fontSize: 12,
|
|
422
|
+
textAlign: "center",
|
|
423
|
+
fontWeight: "500"
|
|
424
|
+
},
|
|
425
|
+
stepLabelItem: {
|
|
426
|
+
flex: 1,
|
|
427
|
+
alignItems: "center",
|
|
428
|
+
justifyContent: "center"
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
|
|
414
432
|
StepIndicator.defaultProps = {
|
|
415
433
|
currentPosition: 0,
|
|
416
434
|
stepCount: 5,
|
|
@@ -21,8 +21,7 @@ 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
|
-
|
|
25
|
-
|
|
24
|
+
/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
|
|
26
25
|
const Surface = _ref => {
|
|
27
26
|
let {
|
|
28
27
|
elevation: propElevation,
|
|
@@ -54,7 +53,19 @@ const Surface = _ref => {
|
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
55
|
|
|
57
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View,
|
|
56
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, { ...rest,
|
|
57
|
+
style: [{
|
|
58
|
+
backgroundColor: getBackgroundColor(),
|
|
59
|
+
elevation,
|
|
60
|
+
...evalationStyles,
|
|
61
|
+
...restStyle
|
|
62
|
+
}]
|
|
63
|
+
}, children);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var _default = (0, _theming.withTheme)(Surface);
|
|
67
|
+
|
|
68
|
+
exports.default = _default;, _extends({}, rest, {
|
|
58
69
|
style: [{
|
|
59
70
|
backgroundColor: getBackgroundColor(),
|
|
60
71
|
elevation,
|
|
@@ -15,17 +15,7 @@ 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
|
-
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; }
|
|
21
|
-
|
|
22
18
|
class Text extends React.Component {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_root", void 0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
19
|
setNativeProps(args) {
|
|
30
20
|
return this._root && this._root.setNativeProps(args);
|
|
31
21
|
}
|
|
@@ -36,7 +26,43 @@ class Text extends React.Component {
|
|
|
36
26
|
...rest
|
|
37
27
|
} = this.props;
|
|
38
28
|
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
39
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text,
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
|
|
30
|
+
ref: c => {
|
|
31
|
+
this._root = c;
|
|
32
|
+
},
|
|
33
|
+
style: [{
|
|
34
|
+
textAlign: "left",
|
|
35
|
+
writingDirection
|
|
36
|
+
}, style]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const BaseLink = _ref => {
|
|
43
|
+
let {
|
|
44
|
+
style,
|
|
45
|
+
theme,
|
|
46
|
+
title,
|
|
47
|
+
...props
|
|
48
|
+
} = _ref;
|
|
49
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
hitSlop: 8,
|
|
51
|
+
style: [{
|
|
52
|
+
color: theme.colors.primary
|
|
53
|
+
}, style],
|
|
54
|
+
theme: theme,
|
|
55
|
+
...props
|
|
56
|
+
}, title);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.BaseLink = BaseLink;
|
|
60
|
+
const Link = (0, _theming.withTheme)(BaseLink);
|
|
61
|
+
exports.Link = Link;
|
|
62
|
+
|
|
63
|
+
var _default = (0, _theming.withTheme)(Text);
|
|
64
|
+
|
|
65
|
+
exports.default = _default;/React.createElement(_reactNative.Text, _extends({}, rest, {
|
|
40
66
|
ref: c => {
|
|
41
67
|
this._root = c;
|
|
42
68
|
},
|