@draftbit/core 46.10.3-7db6c9.2 → 46.10.3-84bbff.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 -1
- package/lib/commonjs/components/Banner.js +23 -4
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +22 -4
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +127 -111
- package/lib/commonjs/components/Button.js +33 -10
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -4
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -4
- package/lib/commonjs/components/DeprecatedCardWrapper.js +15 -1
- package/lib/commonjs/components/Divider.js +14 -1
- package/lib/commonjs/components/FAB.js +18 -4
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +36 -11
- package/lib/commonjs/components/Portal/Portal.js +27 -3
- package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
- package/lib/commonjs/components/Pressable.js +15 -2
- package/lib/commonjs/components/ScreenContainer.js +24 -6
- package/lib/commonjs/components/Shadow.js +15 -2
- package/lib/commonjs/components/Slider.js +21 -4
- package/lib/commonjs/components/Switch.js +19 -10
- package/lib/commonjs/components/TabView/TabView.js +13 -7
- package/lib/commonjs/components/Table/Table.js +123 -0
- package/lib/commonjs/components/Table/TableCell.js +49 -0
- package/lib/commonjs/components/Table/TableCommon.js +30 -0
- package/lib/commonjs/components/Table/TableRow.js +60 -0
- package/lib/commonjs/components/Table/index.js +27 -0
- package/lib/commonjs/components/Text.js +50 -4
- package/lib/commonjs/components/TextField.js +76 -28
- package/lib/commonjs/components/ToggleButton.js +15 -2
- package/lib/commonjs/components/Touchable.js +15 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +19 -7
- package/lib/commonjs/mappings/FieldSearchBarFull.js +3 -1
- package/lib/commonjs/mappings/NativeBase/Layout.js +2 -11
- package/lib/commonjs/mappings/StarRating.js +6 -2
- package/lib/commonjs/mappings/Table.js +140 -0
- package/lib/commonjs/styles/overlay.js +1 -3
- package/lib/module/components/Accordion/AccordionItem.js +25 -4
- package/lib/module/components/AnimatedCircularProgress.js +13 -1
- package/lib/module/components/AspectRatio.js +18 -1
- package/lib/module/components/AvatarEdit.js +15 -4
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +124 -111
- package/lib/module/components/Checkbox/CheckboxGroup.js +16 -2
- package/lib/module/components/DeprecatedButton.js +21 -3
- package/lib/module/components/DeprecatedCardWrapper.js +18 -1
- package/lib/module/components/Picker/PickerComponent.android.js +21 -3
- package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
- package/lib/module/components/Portal/PortalHost.js +45 -15
- package/lib/module/components/RadioButton/RadioButton.js +13 -1
- package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -2
- package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
- package/lib/module/components/Surface.js +15 -1
- package/lib/module/components/TabView/TabView.js +17 -7
- package/lib/module/components/Table/Table.js +114 -0
- package/lib/module/components/Table/TableCell.js +41 -0
- package/lib/module/components/Table/TableCommon.js +21 -0
- package/lib/module/components/Table/TableRow.js +53 -0
- package/lib/module/components/Table/index.js +3 -0
- package/lib/module/components/Touchable.js +15 -2
- package/lib/module/constants.js +1 -0
- package/lib/module/hooks.js +1 -2
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/NativeBase/Layout.js +3 -12
- package/lib/module/mappings/Table.js +133 -0
- package/lib/typescript/src/components/Table/Table.d.ts +19 -0
- package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
- package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts +14 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/index.d.ts +4 -0
- package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +4 -27
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Table.d.ts +337 -0
- package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Table/Table.js +93 -0
- package/src/components/Table/Table.tsx +176 -0
- package/src/components/Table/TableCell.js +31 -0
- package/src/components/Table/TableCell.tsx +63 -0
- package/src/components/Table/TableCommon.js +12 -0
- package/src/components/Table/TableCommon.ts +40 -0
- package/src/components/Table/TableRow.js +37 -0
- package/src/components/Table/TableRow.tsx +77 -0
- package/src/components/Table/index.js +3 -0
- package/src/components/Table/index.tsx +3 -0
- package/src/index.js +1 -1
- package/src/index.tsx +2 -1
- package/src/mappings/NativeBase/Layout.js +9 -11
- package/src/mappings/NativeBase/Layout.ts +8 -11
- package/src/mappings/Table.js +150 -0
- package/src/mappings/Table.ts +170 -0
- package/lib/commonjs/components/Container.js +0 -93
- package/lib/module/components/Container.js +0 -83
- package/lib/typescript/src/components/Container.d.ts +0 -21
- package/lib/typescript/src/components/Container.d.ts.map +0 -1
- package/src/components/Container.js +0 -43
- package/src/components/Container.tsx +0 -116
|
@@ -10,7 +10,6 @@ var _theming = require("../../theming");
|
|
|
10
10
|
var _hooks = require("../../hooks");
|
|
11
11
|
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); }
|
|
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
|
-
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); }
|
|
14
13
|
const Checkbox = _ref => {
|
|
15
14
|
let {
|
|
16
15
|
Icon,
|
|
@@ -34,7 +33,6 @@ const Checkbox = _ref => {
|
|
|
34
33
|
setInternalValue(status);
|
|
35
34
|
}
|
|
36
35
|
}, [status]);
|
|
37
|
-
|
|
38
36
|
// This special logic is to handle weird APIs like Airtable that return
|
|
39
37
|
// true or undefined for a boolean
|
|
40
38
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -58,7 +56,8 @@ const Checkbox = _ref => {
|
|
|
58
56
|
onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
|
|
59
57
|
}
|
|
60
58
|
};
|
|
61
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
59
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
60
|
+
...rest,
|
|
62
61
|
onPress: handlePress,
|
|
63
62
|
disabled: disabled,
|
|
64
63
|
accessibilityState: {
|
|
@@ -70,7 +69,7 @@ const Checkbox = _ref => {
|
|
|
70
69
|
width: size,
|
|
71
70
|
height: size
|
|
72
71
|
}]
|
|
73
|
-
}
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
74
73
|
style: styles.icon,
|
|
75
74
|
name: internalValue ? checkedIcon : uncheckedIcon,
|
|
76
75
|
size: size,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.checkboxGroupContext = exports.Direction = void 0;
|
|
7
7
|
exports.useCheckboxGroupContext = useCheckboxGroupContext;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
|
|
9
|
+
let Direction;
|
|
10
10
|
exports.Direction = Direction;
|
|
11
11
|
(function (Direction) {
|
|
12
12
|
Direction["Horizontal"] = "horizontal";
|
|
@@ -31,7 +31,6 @@ const DeckSwiper = _ref => {
|
|
|
31
31
|
console.warn("'children' of DeckSwiper ignored due to usage of 'data' and 'renderItem'");
|
|
32
32
|
}
|
|
33
33
|
const childrenArray = _react.default.useMemo(() => _react.default.Children.toArray(children), [children]);
|
|
34
|
-
|
|
35
34
|
// an array of indices based on children count
|
|
36
35
|
const cardsFillerData = _react.default.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
|
|
37
36
|
const cardsData = data || cardsFillerData;
|
|
@@ -58,7 +57,6 @@ const DeckSwiper = _ref => {
|
|
|
58
57
|
return card === null || card === void 0 ? void 0 : card.toString();
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
|
-
|
|
62
60
|
/**
|
|
63
61
|
* By default react-native-deck-swiper positions everything with absolute position.
|
|
64
62
|
* To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
|
|
@@ -68,7 +66,6 @@ const DeckSwiper = _ref => {
|
|
|
68
66
|
* To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
|
|
69
67
|
* This effectivley makes the default height of the container be the height of the first card.
|
|
70
68
|
*/
|
|
71
|
-
|
|
72
69
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
73
70
|
style: styles.containerHeightFiller
|
|
74
71
|
}, renderFirstCard()), /*#__PURE__*/_react.default.createElement(_reactNativeDeckSwiper.default, {
|
|
@@ -105,4 +102,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
105
102
|
}
|
|
106
103
|
});
|
|
107
104
|
var _default = DeckSwiper;
|
|
108
|
-
exports.default = _default;
|
|
105
|
+
exports.default = _default;lt;
|
|
@@ -8,7 +8,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _theming = require("../theming");
|
|
9
9
|
var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); }
|
|
12
11
|
const getWidth = numColumns => {
|
|
13
12
|
switch (numColumns) {
|
|
14
13
|
case 1:
|
|
@@ -28,6 +27,21 @@ const Card = _ref => {
|
|
|
28
27
|
...rest
|
|
29
28
|
} = _ref;
|
|
30
29
|
const width = getWidth(numColumns);
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
31
|
+
disabled: !onPress,
|
|
32
|
+
onPress: onPress,
|
|
33
|
+
style: [style, {
|
|
34
|
+
width
|
|
35
|
+
}],
|
|
36
|
+
...rest
|
|
37
|
+
}, children);
|
|
38
|
+
};
|
|
39
|
+
var _default = (0, _theming.withTheme)(Card);
|
|
40
|
+
exports.default = _default;s,
|
|
41
|
+
style,
|
|
42
|
+
...rest
|
|
43
|
+
} = _ref;
|
|
44
|
+
const width = getWidth(numColumns);
|
|
31
45
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
32
46
|
disabled: !onPress,
|
|
33
47
|
onPress: onPress,
|
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _theming = require("../theming");
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
|
-
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); }
|
|
13
12
|
const Divider = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
style,
|
|
@@ -19,6 +18,20 @@ const Divider = _ref => {
|
|
|
19
18
|
},
|
|
20
19
|
...rest
|
|
21
20
|
} = _ref;
|
|
21
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
22
|
+
style: [{
|
|
23
|
+
backgroundColor: color || colors.divider,
|
|
24
|
+
height: _reactNative.StyleSheet.hairlineWidth
|
|
25
|
+
}, style],
|
|
26
|
+
...rest
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var _default = (0, _theming.withTheme)(Divider);
|
|
30
|
+
exports.default = _default;eme: {
|
|
31
|
+
colors
|
|
32
|
+
},
|
|
33
|
+
...rest
|
|
34
|
+
} = _ref;
|
|
22
35
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
23
36
|
style: [{
|
|
24
37
|
backgroundColor: color || colors.divider,
|
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _theming = require("../theming");
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
|
-
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); }
|
|
13
12
|
const FAB = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
onPress,
|
|
@@ -33,7 +32,7 @@ const FAB = _ref => {
|
|
|
33
32
|
borderRadius: size / 2,
|
|
34
33
|
overflow: "hidden"
|
|
35
34
|
}, style]
|
|
36
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
35
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
37
36
|
onPress: onPress,
|
|
38
37
|
disabled: loading || disabled,
|
|
39
38
|
android_ripple: {
|
|
@@ -51,8 +50,9 @@ const FAB = _ref => {
|
|
|
51
50
|
borderRadius: size / 2,
|
|
52
51
|
backgroundColor
|
|
53
52
|
}];
|
|
54
|
-
}
|
|
55
|
-
|
|
53
|
+
},
|
|
54
|
+
...props
|
|
55
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
56
56
|
style: size > 50 ? {
|
|
57
57
|
marginTop: 2,
|
|
58
58
|
marginLeft: 2
|
|
@@ -79,4 +79,18 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
var _default = (0, _theming.withTheme)(FAB);
|
|
82
|
+
exports.default = _default; styles = _reactNative.StyleSheet.create({
|
|
83
|
+
button: {
|
|
84
|
+
backgroundColor: "#5a45ff",
|
|
85
|
+
justifyContent: "center",
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
..._reactNative.Platform.select({
|
|
88
|
+
web: {
|
|
89
|
+
cursor: "pointer",
|
|
90
|
+
userSelect: "none"
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
82
96
|
exports.default = _default;
|
|
@@ -13,7 +13,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactNative = require("react-native");
|
|
14
14
|
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
15
|
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; }
|
|
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
16
|
function Center(_ref) {
|
|
18
17
|
let {
|
|
19
18
|
width = 240,
|
|
@@ -23,15 +22,16 @@ function Center(_ref) {
|
|
|
23
22
|
style,
|
|
24
23
|
...rest
|
|
25
24
|
} = _ref;
|
|
26
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
25
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
27
26
|
style: [{
|
|
28
27
|
justifyContent: "center",
|
|
29
28
|
alignItems: "center",
|
|
30
29
|
width,
|
|
31
30
|
height,
|
|
32
31
|
backgroundColor: bgColor
|
|
33
|
-
}, style]
|
|
34
|
-
|
|
32
|
+
}, style],
|
|
33
|
+
...rest
|
|
34
|
+
}, children);
|
|
35
35
|
}
|
|
36
36
|
function Circle(_ref2) {
|
|
37
37
|
let {
|
|
@@ -42,7 +42,7 @@ function Circle(_ref2) {
|
|
|
42
42
|
...rest
|
|
43
43
|
} = _ref2;
|
|
44
44
|
const borderRadius = 1000;
|
|
45
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
45
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
46
46
|
width: size,
|
|
47
47
|
height: size,
|
|
48
48
|
bgColor: bgColor,
|
|
@@ -50,8 +50,9 @@ function Circle(_ref2) {
|
|
|
50
50
|
backgroundColor: bgColor,
|
|
51
51
|
borderRadius,
|
|
52
52
|
overflow: "hidden"
|
|
53
|
-
}]
|
|
54
|
-
|
|
53
|
+
}],
|
|
54
|
+
...rest
|
|
55
|
+
}, children);
|
|
55
56
|
}
|
|
56
57
|
function Square(_ref3) {
|
|
57
58
|
let {
|
|
@@ -61,12 +62,13 @@ function Square(_ref3) {
|
|
|
61
62
|
style,
|
|
62
63
|
...rest
|
|
63
64
|
} = _ref3;
|
|
64
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
65
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
65
66
|
style: style,
|
|
66
67
|
width: size,
|
|
67
68
|
height: size,
|
|
68
|
-
bgColor: bgColor
|
|
69
|
-
|
|
69
|
+
bgColor: bgColor,
|
|
70
|
+
...rest
|
|
71
|
+
}, children);
|
|
70
72
|
}
|
|
71
73
|
function Row(_ref4) {
|
|
72
74
|
let {
|
|
@@ -76,15 +78,14 @@ function Row(_ref4) {
|
|
|
76
78
|
style,
|
|
77
79
|
...rest
|
|
78
80
|
} = _ref4;
|
|
79
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
80
|
-
style: [style,
|
|
81
|
-
// style goes first b/c we can't override these
|
|
82
|
-
{
|
|
81
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
82
|
+
style: [style, {
|
|
83
83
|
alignItems,
|
|
84
84
|
flexDirection: "row",
|
|
85
85
|
justifyContent: justifyContent
|
|
86
|
-
}]
|
|
87
|
-
|
|
86
|
+
}],
|
|
87
|
+
...rest
|
|
88
|
+
}, children);
|
|
88
89
|
}
|
|
89
90
|
function Spacer(_ref5) {
|
|
90
91
|
let {
|
|
@@ -96,16 +97,36 @@ function Spacer(_ref5) {
|
|
|
96
97
|
style,
|
|
97
98
|
...rest
|
|
98
99
|
} = _ref5;
|
|
99
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
100
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
101
|
style: [style, {
|
|
101
102
|
paddingRight: right,
|
|
102
103
|
paddingTop: top,
|
|
103
104
|
paddingLeft: left,
|
|
104
105
|
paddingBottom: bottom
|
|
105
|
-
}]
|
|
106
|
-
|
|
106
|
+
}],
|
|
107
|
+
...rest
|
|
108
|
+
}, children);
|
|
107
109
|
}
|
|
108
110
|
function Stack(_ref6) {
|
|
111
|
+
let {
|
|
112
|
+
children,
|
|
113
|
+
justifyContent = "flex-start",
|
|
114
|
+
alignItems = "flex-start",
|
|
115
|
+
style,
|
|
116
|
+
...rest
|
|
117
|
+
} = _ref6;
|
|
118
|
+
return (
|
|
119
|
+
/*#__PURE__*/
|
|
120
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
121
|
+
React.createElement(_reactNative.View, {
|
|
122
|
+
style: [style, {
|
|
123
|
+
justifyContent,
|
|
124
|
+
alignItems
|
|
125
|
+
}],
|
|
126
|
+
...rest
|
|
127
|
+
}, children)
|
|
128
|
+
);
|
|
129
|
+
}Stack(_ref6) {
|
|
109
130
|
let {
|
|
110
131
|
children,
|
|
111
132
|
justifyContent = "flex-start",
|
|
@@ -18,9 +18,7 @@ var _utilities = require("../../utilities");
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
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); }
|
|
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
|
-
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); }
|
|
22
21
|
const Picker = _ref => {
|
|
23
|
-
var _options$find$label, _options$find;
|
|
24
22
|
let {
|
|
25
23
|
Icon,
|
|
26
24
|
style,
|
|
@@ -34,6 +32,7 @@ const Picker = _ref => {
|
|
|
34
32
|
},
|
|
35
33
|
...props
|
|
36
34
|
} = _ref;
|
|
35
|
+
var _a, _b;
|
|
37
36
|
const {
|
|
38
37
|
viewStyles: {
|
|
39
38
|
borderRadius,
|
|
@@ -74,26 +73,24 @@ const Picker = _ref => {
|
|
|
74
73
|
};
|
|
75
74
|
|
|
76
75
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
77
|
-
const selectedLabel = selectedValue && ((
|
|
76
|
+
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);
|
|
78
77
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
79
78
|
style: [styles.container, viewStyles]
|
|
80
79
|
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
81
80
|
disabled: disabled,
|
|
82
81
|
onPress: toggleVisibility
|
|
83
|
-
}, /*#__PURE__*/React.createElement(_TextField.default,
|
|
82
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, {
|
|
83
|
+
...props,
|
|
84
84
|
value: String(selectedLabel),
|
|
85
|
-
placeholder: placeholder
|
|
85
|
+
placeholder: placeholder,
|
|
86
86
|
// @ts-ignore
|
|
87
|
-
,
|
|
88
|
-
ref: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
|
|
89
|
-
,
|
|
87
|
+
ref: textField,
|
|
90
88
|
disabled: disabled,
|
|
91
|
-
pointerEvents: "none"
|
|
89
|
+
pointerEvents: "none",
|
|
92
90
|
// @ts-expect-error
|
|
93
|
-
,
|
|
94
91
|
style: stylesWithoutMargin,
|
|
95
92
|
Icon: Icon
|
|
96
|
-
}))
|
|
93
|
+
})), pickerVisible && /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
97
94
|
style: [styles.picker, {
|
|
98
95
|
backgroundColor: colors.divider
|
|
99
96
|
}]
|
|
@@ -138,4 +135,32 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
138
135
|
}
|
|
139
136
|
});
|
|
140
137
|
var _default = (0, _theming.withTheme)(Picker);
|
|
138
|
+
exports.default = _default;ateElement(_picker.Picker.Item, {
|
|
139
|
+
label: o.label,
|
|
140
|
+
value: o.value,
|
|
141
|
+
key: o.value
|
|
142
|
+
})))))));
|
|
143
|
+
};
|
|
144
|
+
const styles = _reactNative.StyleSheet.create({
|
|
145
|
+
container: {
|
|
146
|
+
alignSelf: "stretch"
|
|
147
|
+
},
|
|
148
|
+
picker: {
|
|
149
|
+
position: "absolute",
|
|
150
|
+
bottom: 0,
|
|
151
|
+
left: 0,
|
|
152
|
+
right: 0,
|
|
153
|
+
flexDirection: "row",
|
|
154
|
+
justifyContent: "center"
|
|
155
|
+
},
|
|
156
|
+
pickerContainer: {
|
|
157
|
+
backgroundColor: "white",
|
|
158
|
+
flexDirection: "column",
|
|
159
|
+
width: "100%"
|
|
160
|
+
},
|
|
161
|
+
closeButton: {
|
|
162
|
+
alignSelf: "flex-end"
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
141
166
|
exports.default = _default;
|
|
@@ -11,9 +11,6 @@ var _theming = require("../../theming");
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
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
13
|
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; }
|
|
14
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
14
|
/**
|
|
18
15
|
* Portal allows to render a component at a different place in the parent tree.
|
|
19
16
|
* You can use it to render content which should appear above other elements, similar to `Modal`.
|
|
@@ -35,6 +32,33 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
35
32
|
* }
|
|
36
33
|
* ```
|
|
37
34
|
*/
|
|
35
|
+
class Portal extends React.Component {
|
|
36
|
+
render() {
|
|
37
|
+
const {
|
|
38
|
+
children,
|
|
39
|
+
theme
|
|
40
|
+
} = this.props;
|
|
41
|
+
return /*#__PURE__*/React.createElement(_PortalHost.PortalContext.Consumer, null, manager => /*#__PURE__*/React.createElement(_PortalConsumer.default, {
|
|
42
|
+
manager: manager
|
|
43
|
+
}, /*#__PURE__*/React.createElement(_theming.ThemeProvider, {
|
|
44
|
+
theme: theme
|
|
45
|
+
}, children)));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// @component ./PortalHost.tsx
|
|
49
|
+
Portal.Host = _PortalHost.default;
|
|
50
|
+
var _default = (0, _theming.withTheme)(Portal);
|
|
51
|
+
exports.default = _default;nent extends React.Component {
|
|
52
|
+
* render() {
|
|
53
|
+
* return (
|
|
54
|
+
* <Portal>
|
|
55
|
+
* <Text>This is rendered at a different place</Text>
|
|
56
|
+
* </Portal>
|
|
57
|
+
* );
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
38
62
|
class Portal extends React.Component {
|
|
39
63
|
// @component ./PortalHost.tsx
|
|
40
64
|
|
|
@@ -7,16 +7,31 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
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); }
|
|
9
9
|
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; }
|
|
10
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
class PortalConsumer extends React.Component {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
_defineProperty(this, "key", void 0);
|
|
17
|
-
}
|
|
18
11
|
async componentDidMount() {
|
|
19
12
|
this.checkManager();
|
|
13
|
+
// Delay updating to prevent React from going to infinite loop
|
|
14
|
+
await Promise.resolve();
|
|
15
|
+
this.key = this.props.manager.mount(this.props.children);
|
|
16
|
+
}
|
|
17
|
+
componentDidUpdate() {
|
|
18
|
+
this.checkManager();
|
|
19
|
+
this.props.manager.update(this.key, this.props.children);
|
|
20
|
+
}
|
|
21
|
+
componentWillUnmount() {
|
|
22
|
+
this.checkManager();
|
|
23
|
+
this.props.manager.unmount(this.key);
|
|
24
|
+
}
|
|
25
|
+
checkManager() {
|
|
26
|
+
if (!this.props.manager) {
|
|
27
|
+
throw new Error("Looks like you forgot to wrap your root component with `Provider` 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");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = PortalConsumer;s.checkManager();
|
|
20
35
|
|
|
21
36
|
// Delay updating to prevent React from going to infinite loop
|
|
22
37
|
await Promise.resolve();
|
|
@@ -7,7 +7,6 @@ exports.default = Pressable;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
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); }
|
|
11
10
|
function Pressable(_ref) {
|
|
12
11
|
let {
|
|
13
12
|
children,
|
|
@@ -20,8 +19,22 @@ function Pressable(_ref) {
|
|
|
20
19
|
style,
|
|
21
20
|
...props
|
|
22
21
|
} = _ref;
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable,
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
24
23
|
onPress: onPress,
|
|
24
|
+
disabled: disabled,
|
|
25
|
+
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
26
|
+
hitSlop: hitSlop ? hitSlop : 8,
|
|
27
|
+
style: _ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
pressed
|
|
30
|
+
} = _ref2;
|
|
31
|
+
return [{
|
|
32
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
33
|
+
}, style];
|
|
34
|
+
},
|
|
35
|
+
...props
|
|
36
|
+
}, children);
|
|
37
|
+
} onPress: onPress,
|
|
25
38
|
disabled: disabled,
|
|
26
39
|
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
27
40
|
hitSlop: hitSlop ? hitSlop : 8,
|
|
@@ -10,9 +10,7 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
|
10
10
|
var _theming = require("../theming");
|
|
11
11
|
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); }
|
|
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
|
-
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); }
|
|
14
13
|
function ScreenContainer(_ref) {
|
|
15
|
-
var _StyleSheet$flatten;
|
|
16
14
|
let {
|
|
17
15
|
scrollable = false,
|
|
18
16
|
hasSafeArea = false,
|
|
@@ -23,7 +21,8 @@ function ScreenContainer(_ref) {
|
|
|
23
21
|
children,
|
|
24
22
|
...rest
|
|
25
23
|
} = _ref;
|
|
26
|
-
|
|
24
|
+
var _a;
|
|
25
|
+
const backgroundColor = ((_a = _reactNative.StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background;
|
|
27
26
|
const edges = ["left", "right"];
|
|
28
27
|
if (hasSafeArea || hasTopSafeArea) {
|
|
29
28
|
edges.push("top");
|
|
@@ -31,12 +30,13 @@ function ScreenContainer(_ref) {
|
|
|
31
30
|
if (hasSafeArea || hasBottomSafeArea) {
|
|
32
31
|
edges.push("bottom");
|
|
33
32
|
}
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView,
|
|
33
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
35
34
|
edges: edges,
|
|
36
35
|
style: [styles.container, {
|
|
37
36
|
backgroundColor
|
|
38
|
-
}]
|
|
39
|
-
|
|
37
|
+
}],
|
|
38
|
+
...rest
|
|
39
|
+
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
40
40
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
41
41
|
backgroundColor
|
|
42
42
|
}, style]
|
|
@@ -56,4 +56,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
59
|
+
exports.default = _default;olor
|
|
60
|
+
}, style]
|
|
61
|
+
}, children) : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
62
|
+
style: [styles.container, {
|
|
63
|
+
backgroundColor
|
|
64
|
+
}, style]
|
|
65
|
+
}, children));
|
|
66
|
+
}
|
|
67
|
+
const styles = _reactNative.StyleSheet.create({
|
|
68
|
+
container: {
|
|
69
|
+
flex: 1
|
|
70
|
+
},
|
|
71
|
+
scrollViewContainer: {
|
|
72
|
+
flexGrow: 1,
|
|
73
|
+
flex: undefined
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
59
77
|
exports.default = _default;
|
|
@@ -7,7 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNativeShadow = require("react-native-shadow-2");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
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); }
|
|
11
10
|
const Shadow = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
offsetX = 0,
|
|
@@ -24,7 +23,7 @@ const Shadow = _ref => {
|
|
|
24
23
|
style,
|
|
25
24
|
...rest
|
|
26
25
|
} = _ref;
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow,
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow, {
|
|
28
27
|
offset: [offsetX, offsetY],
|
|
29
28
|
sides: {
|
|
30
29
|
start: showShadowSideStart,
|
|
@@ -39,6 +38,20 @@ const Shadow = _ref => {
|
|
|
39
38
|
bottomEnd: showShadowCornerBottomEnd
|
|
40
39
|
},
|
|
41
40
|
containerStyle: style,
|
|
41
|
+
paintInside: paintInside,
|
|
42
|
+
...rest
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var _default = Shadow;
|
|
46
|
+
exports.default = _default;showShadowSideBottom
|
|
47
|
+
},
|
|
48
|
+
corners: {
|
|
49
|
+
topStart: showShadowCornerTopStart,
|
|
50
|
+
topEnd: showShadowCornerTopEnd,
|
|
51
|
+
bottomStart: showShadowCornerBottomStart,
|
|
52
|
+
bottomEnd: showShadowCornerBottomEnd
|
|
53
|
+
},
|
|
54
|
+
containerStyle: style,
|
|
42
55
|
paintInside: paintInside
|
|
43
56
|
}, rest));
|
|
44
57
|
};
|
|
@@ -13,7 +13,6 @@ var _theming = require("../theming");
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
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
15
|
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; }
|
|
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
16
|
function maybeParseValue(value) {
|
|
18
17
|
if (value === undefined) {
|
|
19
18
|
return undefined;
|
|
@@ -73,9 +72,10 @@ function Slider(_ref) {
|
|
|
73
72
|
setInternalValue(newValue);
|
|
74
73
|
onValueChange(newValue);
|
|
75
74
|
};
|
|
76
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
77
|
-
style: [styles.container, style]
|
|
78
|
-
|
|
75
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
76
|
+
style: [styles.container, style],
|
|
77
|
+
...rest
|
|
78
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
79
79
|
color: leftIconThemeColor,
|
|
80
80
|
name: leftIcon,
|
|
81
81
|
size: 24
|
|
@@ -108,4 +108,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
var _default = (0, _theming.withTheme)(Slider);
|
|
111
|
+
exports.default = _default;or: rightIconThemeColor,
|
|
112
|
+
name: rightIcon,
|
|
113
|
+
size: 24
|
|
114
|
+
}) : null);
|
|
115
|
+
}
|
|
116
|
+
const styles = _reactNative.StyleSheet.create({
|
|
117
|
+
container: {
|
|
118
|
+
height: 40,
|
|
119
|
+
flexDirection: "row",
|
|
120
|
+
alignItems: "center"
|
|
121
|
+
},
|
|
122
|
+
slider: {
|
|
123
|
+
flex: 1,
|
|
124
|
+
marginHorizontal: 12
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
var _default = (0, _theming.withTheme)(Slider);
|
|
111
128
|
exports.default = _default;
|