@draftbit/core 46.10.3-e89832.2 → 46.10.3-fb35c9.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 +1 -12
- package/lib/commonjs/components/AvatarEdit.js +4 -15
- package/lib/commonjs/components/Banner.js +4 -23
- package/lib/commonjs/components/Button.js +10 -33
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -23
- package/lib/commonjs/components/DeprecatedButton.js +3 -20
- package/lib/commonjs/components/Divider.js +1 -14
- package/lib/commonjs/components/FieldSearchBarFull.js +2 -1
- package/lib/commonjs/components/Layout.js +19 -40
- package/lib/commonjs/components/NumberInput.js +3 -12
- package/lib/commonjs/components/Picker/PickerComponent.android.js +3 -20
- package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
- package/lib/commonjs/components/Portal/PortalManager.js +8 -34
- package/lib/commonjs/components/RadioButton/RadioButton.js +2 -13
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +1 -9
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +2 -15
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +5 -23
- package/lib/commonjs/components/ScreenContainer.js +6 -24
- package/lib/commonjs/components/Shadow.js +2 -15
- package/lib/commonjs/components/Slider.js +4 -21
- package/lib/commonjs/components/StarRating.js +4 -23
- package/lib/commonjs/components/StepIndicator.js +18 -57
- package/lib/commonjs/components/Surface.js +2 -14
- package/lib/commonjs/components/TabView/TabView.js +7 -13
- 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 +61 -0
- package/lib/commonjs/components/Table/index.js +27 -0
- package/lib/commonjs/components/Text.js +4 -50
- package/lib/commonjs/components/TextField.js +28 -76
- package/lib/commonjs/components/ToggleButton.js +2 -15
- package/lib/commonjs/components/Touchable.js +2 -15
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +19 -28
- package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
- package/lib/commonjs/mappings/Table.js +140 -0
- package/lib/commonjs/styles/overlay.js +3 -1
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Portal/PortalManager.js +33 -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/index.js +1 -4
- package/lib/module/mappings/NativeBase/Layout.js +101 -0
- 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/{DeprecatedCardWrapper.d.ts → Table/TableRow.d.ts} +7 -8
- 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 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
- package/lib/typescript/src/mappings/{CardBlock.d.ts → Table.d.ts} +129 -81
- 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 -4
- package/src/index.tsx +2 -4
- package/src/mappings/NativeBase/Layout.js +124 -0
- package/src/mappings/NativeBase/Layout.ts +145 -0
- package/src/mappings/Table.js +150 -0
- package/src/mappings/Table.ts +170 -0
- package/lib/commonjs/components/Container.js +0 -104
- package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
- package/lib/commonjs/components/DeprecatedFAB.js +0 -157
- package/lib/commonjs/components/ProgressIndicator.js +0 -55
- package/lib/commonjs/components/ResizeMode.js +0 -5
- package/lib/commonjs/components/Row.js +0 -73
- package/lib/commonjs/components/RowBodyIcon.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
- package/lib/commonjs/mappings/CardBlock.js +0 -126
- package/lib/commonjs/mappings/CardContainer.js +0 -108
- package/lib/commonjs/mappings/CardContainerRating.js +0 -130
- package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
- package/lib/commonjs/mappings/CardInline.js +0 -59
- package/lib/commonjs/mappings/Container.js +0 -37
- package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
- package/lib/module/components/Container.js +0 -83
- package/lib/module/components/DeprecatedCardWrapper.js +0 -32
- package/lib/module/components/DeprecatedFAB.js +0 -147
- package/lib/module/components/ProgressIndicator.js +0 -45
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/components/Row.js +0 -63
- package/lib/module/components/RowBodyIcon.js +0 -35
- package/lib/module/components/RowHeadlineImageCaption.js +0 -35
- package/lib/module/components/RowHeadlineImageIcon.js +0 -41
- package/lib/module/mappings/CardBlock.js +0 -119
- package/lib/module/mappings/CardContainer.js +0 -101
- package/lib/module/mappings/CardContainerRating.js +0 -123
- package/lib/module/mappings/CardContainerShortImage.js +0 -117
- package/lib/module/mappings/CardInline.js +0 -52
- package/lib/module/mappings/Container.js +0 -30
- package/lib/module/mappings/ProgressIndicator.js +0 -181
- package/lib/typescript/src/components/Container.d.ts +0 -21
- package/lib/typescript/src/components/Container.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
- package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
- package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
- package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
- package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
- package/lib/typescript/src/components/Row.d.ts +0 -21
- package/lib/typescript/src/components/Row.d.ts.map +0 -1
- package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
- package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
- package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
- package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
- package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Container.d.ts +0 -55
- package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
- package/src/components/Container.js +0 -43
- package/src/components/Container.tsx +0 -116
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedCardWrapper.tsx +0 -46
- package/src/components/DeprecatedFAB.js +0 -114
- package/src/components/DeprecatedFAB.tsx +0 -231
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/ProgressIndicator.tsx +0 -71
- package/src/components/ResizeMode.js +0 -1
- package/src/components/ResizeMode.ts +0 -7
- package/src/components/Row.js +0 -48
- package/src/components/Row.tsx +0 -108
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowBodyIcon.tsx +0 -47
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageCaption.tsx +0 -49
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/RowHeadlineImageIcon.tsx +0 -61
- package/src/mappings/CardBlock.js +0 -123
- package/src/mappings/CardBlock.ts +0 -136
- package/src/mappings/CardContainer.js +0 -104
- package/src/mappings/CardContainer.ts +0 -116
- package/src/mappings/CardContainerRating.js +0 -126
- package/src/mappings/CardContainerRating.ts +0 -137
- package/src/mappings/CardContainerShortImage.js +0 -120
- package/src/mappings/CardContainerShortImage.ts +0 -130
- package/src/mappings/CardInline.js +0 -52
- package/src/mappings/CardInline.ts +0 -61
- package/src/mappings/Container.js +0 -30
- package/src/mappings/Container.ts +0 -41
- package/src/mappings/ProgressIndicator.js +0 -181
- package/src/mappings/ProgressIndicator.ts +0 -190
|
@@ -10,6 +10,7 @@ var _CircularProgress = _interopRequireDefault(require("./CircularProgress"));
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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); }
|
|
13
14
|
const AnimatedProgress = _reactNative.Animated.createAnimatedComponent(_CircularProgress.default);
|
|
14
15
|
const AnimatedCircularProgress = _ref => {
|
|
15
16
|
let {
|
|
@@ -54,18 +55,6 @@ const AnimatedCircularProgress = _ref => {
|
|
|
54
55
|
React.useEffect(() => {
|
|
55
56
|
animate();
|
|
56
57
|
}, [fill, animate]);
|
|
57
|
-
return /*#__PURE__*/React.createElement(AnimatedProgress, {
|
|
58
|
-
...other,
|
|
59
|
-
style: other.style,
|
|
60
|
-
childrenContainerStyle: other.childrenContainerStyle,
|
|
61
|
-
fill: fillAnimation,
|
|
62
|
-
tintColor: animateColor()
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
var _default = AnimatedCircularProgress;
|
|
66
|
-
exports.default = _default;ect(() => {
|
|
67
|
-
animate();
|
|
68
|
-
}, [fill, animate]);
|
|
69
58
|
return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
|
|
70
59
|
style: other.style,
|
|
71
60
|
childrenContainerStyle: other.childrenContainerStyle,
|
|
@@ -12,6 +12,7 @@ var _theming = require("../theming");
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
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); }
|
|
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
|
+
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); }
|
|
15
16
|
const AvatarEdit = _ref => {
|
|
16
17
|
let {
|
|
17
18
|
Icon,
|
|
@@ -31,10 +32,9 @@ const AvatarEdit = _ref => {
|
|
|
31
32
|
width: size,
|
|
32
33
|
height: size
|
|
33
34
|
};
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
35
|
-
style: [style, dimensions]
|
|
36
|
-
|
|
37
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
35
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
36
|
+
style: [style, dimensions]
|
|
37
|
+
}, rest), /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
38
38
|
onPress: onPress
|
|
39
39
|
}, /*#__PURE__*/React.createElement(_CircleImage.default, {
|
|
40
40
|
source: image,
|
|
@@ -56,15 +56,4 @@ const AvatarEdit = _ref => {
|
|
|
56
56
|
}))));
|
|
57
57
|
};
|
|
58
58
|
var _default = (0, _theming.withTheme)(AvatarEdit);
|
|
59
|
-
exports.default = _default;r: colorStyles.editBackgroundColor,
|
|
60
|
-
borderRadius: size * (3 / 16),
|
|
61
|
-
padding: size * (3 / 32)
|
|
62
|
-
}
|
|
63
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
64
|
-
name: "MaterialIcons/edit",
|
|
65
|
-
color: colorStyles.editIconColor,
|
|
66
|
-
size: size * (3 / 16)
|
|
67
|
-
}))));
|
|
68
|
-
};
|
|
69
|
-
var _default = (0, _theming.withTheme)(AvatarEdit);
|
|
70
59
|
exports.default = _default;
|
|
@@ -12,6 +12,7 @@ var _theming = require("../theming");
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
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); }
|
|
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
|
+
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); }
|
|
15
16
|
const ELEVATION = 1;
|
|
16
17
|
const DEFAULT_MAX_WIDTH = 960;
|
|
17
18
|
const Banner = _ref => {
|
|
@@ -69,6 +70,7 @@ const Banner = _ref => {
|
|
|
69
70
|
measured: true
|
|
70
71
|
});
|
|
71
72
|
};
|
|
73
|
+
|
|
72
74
|
// The banner animation has 2 parts:
|
|
73
75
|
// 1. Blank spacer element which animates its height to move the content
|
|
74
76
|
// 2. Actual banner which animates its translateY
|
|
@@ -78,10 +80,9 @@ const Banner = _ref => {
|
|
|
78
80
|
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
79
81
|
const height = _reactNative.Animated.multiply(position, layout.height);
|
|
80
82
|
const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
|
|
81
|
-
return /*#__PURE__*/React.createElement(_Surface.default, {
|
|
82
|
-
...rest,
|
|
83
|
+
return /*#__PURE__*/React.createElement(_Surface.default, _extends({}, rest, {
|
|
83
84
|
style: [styles.container, (0, _shadow.default)(ELEVATION), style]
|
|
84
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
85
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
85
86
|
style: [styles.wrapper, contentStyle]
|
|
86
87
|
}, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
87
88
|
style: {
|
|
@@ -163,24 +164,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
163
164
|
}
|
|
164
165
|
});
|
|
165
166
|
var _default = (0, _theming.withTheme)(Banner);
|
|
166
|
-
exports.default = _default;",
|
|
167
|
-
justifyContent: "flex-start",
|
|
168
|
-
marginHorizontal: 8,
|
|
169
|
-
marginTop: 16,
|
|
170
|
-
marginBottom: 0
|
|
171
|
-
},
|
|
172
|
-
icon: {
|
|
173
|
-
margin: 8
|
|
174
|
-
},
|
|
175
|
-
message: {
|
|
176
|
-
flex: 1,
|
|
177
|
-
margin: 8
|
|
178
|
-
},
|
|
179
|
-
actions: {
|
|
180
|
-
flexDirection: "row",
|
|
181
|
-
justifyContent: "flex-end",
|
|
182
|
-
margin: 8
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
var _default = (0, _theming.withTheme)(Banner);
|
|
186
167
|
exports.default = _default;
|
|
@@ -9,6 +9,7 @@ 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); }
|
|
12
13
|
const CONSTANTS = {
|
|
13
14
|
baseHeight: 42,
|
|
14
15
|
borderRadius: 4,
|
|
@@ -60,7 +61,7 @@ function Base(_ref) {
|
|
|
60
61
|
if (textAlign === "right") {
|
|
61
62
|
buttonStyles.justifyContent = "flex-end";
|
|
62
63
|
}
|
|
63
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
64
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
64
65
|
disabled: disabled || loading,
|
|
65
66
|
style: _ref2 => {
|
|
66
67
|
let {
|
|
@@ -69,9 +70,8 @@ function Base(_ref) {
|
|
|
69
70
|
return [styles.base, {
|
|
70
71
|
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
71
72
|
}, buttonStyles];
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
}, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
73
|
+
}
|
|
74
|
+
}, props), loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
75
75
|
size: "small",
|
|
76
76
|
color: color,
|
|
77
77
|
style: styles.loading
|
|
@@ -90,14 +90,13 @@ const Solid = _ref3 => {
|
|
|
90
90
|
theme,
|
|
91
91
|
...props
|
|
92
92
|
} = _ref3;
|
|
93
|
-
return /*#__PURE__*/React.createElement(Base, {
|
|
93
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
94
94
|
style: [{
|
|
95
95
|
color: "#FFF",
|
|
96
96
|
borderRadius: theme.roundness,
|
|
97
97
|
backgroundColor: theme.colors.primary
|
|
98
|
-
}, style]
|
|
99
|
-
|
|
100
|
-
});
|
|
98
|
+
}, style]
|
|
99
|
+
}, props));
|
|
101
100
|
};
|
|
102
101
|
const ButtonSolid = (0, _theming.withTheme)(Solid);
|
|
103
102
|
exports.ButtonSolid = ButtonSolid;
|
|
@@ -109,14 +108,13 @@ const Outline = _ref4 => {
|
|
|
109
108
|
theme,
|
|
110
109
|
...props
|
|
111
110
|
} = _ref4;
|
|
112
|
-
return /*#__PURE__*/React.createElement(Base, {
|
|
111
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
113
112
|
style: [styles.outline, {
|
|
114
113
|
borderRadius: theme.roundness,
|
|
115
114
|
borderColor: theme.colors.primary,
|
|
116
115
|
color: theme.colors.primary
|
|
117
|
-
}, style]
|
|
118
|
-
|
|
119
|
-
});
|
|
116
|
+
}, style]
|
|
117
|
+
}, props));
|
|
120
118
|
};
|
|
121
119
|
const ButtonOutline = (0, _theming.withTheme)(Outline);
|
|
122
120
|
exports.ButtonOutline = ButtonOutline;
|
|
@@ -163,25 +161,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
163
161
|
}
|
|
164
162
|
})
|
|
165
163
|
}
|
|
166
|
-
});ent",
|
|
167
|
-
padding: 0,
|
|
168
|
-
minHeight: undefined
|
|
169
|
-
},
|
|
170
|
-
loading: {
|
|
171
|
-
marginRight: 6
|
|
172
|
-
},
|
|
173
|
-
icon: {
|
|
174
|
-
..._reactNative.Platform.select({
|
|
175
|
-
web: {
|
|
176
|
-
marginTop: 1,
|
|
177
|
-
marginRight: 4,
|
|
178
|
-
alignSelf: "center"
|
|
179
|
-
},
|
|
180
|
-
default: {
|
|
181
|
-
marginBottom: 2,
|
|
182
|
-
marginRight: 4,
|
|
183
|
-
alignSelf: "center"
|
|
184
|
-
}
|
|
185
|
-
})
|
|
186
|
-
}
|
|
187
164
|
});
|
|
@@ -13,7 +13,8 @@ var _utilities = require("../../utilities");
|
|
|
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
|
-
var
|
|
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
|
+
let Direction;
|
|
17
18
|
exports.Direction = Direction;
|
|
18
19
|
(function (Direction) {
|
|
19
20
|
Direction["Row"] = "row";
|
|
@@ -71,14 +72,13 @@ const CheckboxGroupRow = _ref => {
|
|
|
71
72
|
textStyles,
|
|
72
73
|
viewStyles
|
|
73
74
|
} = (0, _utilities.extractStyles)(style);
|
|
74
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
75
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
75
76
|
onPress: handlePress,
|
|
76
77
|
style: [styles.mainParent, {
|
|
77
78
|
flexDirection: direction
|
|
78
79
|
}, viewStyles],
|
|
79
|
-
disabled: disabled
|
|
80
|
-
|
|
81
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
80
|
+
disabled: disabled
|
|
81
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
82
82
|
style: [styles.label, {
|
|
83
83
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
84
84
|
}, labelContainerStyle]
|
|
@@ -117,22 +117,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
var _default = CheckboxGroupRow;
|
|
120
|
-
exports.default = _default;center",
|
|
121
|
-
justifyContent: "space-around",
|
|
122
|
-
paddingStart: 20,
|
|
123
|
-
minHeight: 50,
|
|
124
|
-
paddingEnd: 20,
|
|
125
|
-
display: "flex",
|
|
126
|
-
..._reactNative.Platform.select({
|
|
127
|
-
web: {
|
|
128
|
-
cursor: "pointer",
|
|
129
|
-
userSelect: "none"
|
|
130
|
-
}
|
|
131
|
-
})
|
|
132
|
-
},
|
|
133
|
-
label: {
|
|
134
|
-
flex: 3
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
var _default = CheckboxGroupRow;
|
|
138
120
|
exports.default = _default;
|
|
@@ -13,6 +13,7 @@ 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); }
|
|
16
17
|
const Button = _ref => {
|
|
17
18
|
let {
|
|
18
19
|
Icon,
|
|
@@ -83,8 +84,7 @@ const Button = _ref => {
|
|
|
83
84
|
elevation,
|
|
84
85
|
alignSelf: "stretch"
|
|
85
86
|
}
|
|
86
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
87
|
-
...rest,
|
|
87
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
|
|
88
88
|
onPress: onPress,
|
|
89
89
|
accessibilityState: {
|
|
90
90
|
disabled
|
|
@@ -92,7 +92,7 @@ const Button = _ref => {
|
|
|
92
92
|
accessibilityRole: "button",
|
|
93
93
|
disabled: disabled || loading,
|
|
94
94
|
style: [styles.button, buttonStyle]
|
|
95
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
95
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
96
96
|
style: styles.content
|
|
97
97
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
98
98
|
style: iconStyle
|
|
@@ -124,21 +124,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
var _default = (0, _theming.withTheme)(Button);
|
|
127
|
-
exports.default = _default;;
|
|
128
|
-
};
|
|
129
|
-
const styles = _reactNative.StyleSheet.create({
|
|
130
|
-
button: {
|
|
131
|
-
minWidth: 64,
|
|
132
|
-
borderStyle: "solid"
|
|
133
|
-
},
|
|
134
|
-
content: {
|
|
135
|
-
flexDirection: "row",
|
|
136
|
-
alignItems: "center",
|
|
137
|
-
justifyContent: "center"
|
|
138
|
-
},
|
|
139
|
-
icon: {
|
|
140
|
-
width: _Config.default.buttonIconSize
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
var _default = (0, _theming.withTheme)(Button);
|
|
144
127
|
exports.default = _default;
|
|
@@ -9,6 +9,7 @@ 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); }
|
|
12
13
|
const Divider = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
style,
|
|
@@ -18,20 +19,6 @@ const Divider = _ref => {
|
|
|
18
19
|
},
|
|
19
20
|
...rest
|
|
20
21
|
} = _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;
|
|
35
22
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
36
23
|
style: [{
|
|
37
24
|
backgroundColor: color || colors.divider,
|
|
@@ -55,6 +55,7 @@ const FieldSearchBarFull = _ref => {
|
|
|
55
55
|
lineHeight,
|
|
56
56
|
...typeStyles
|
|
57
57
|
} = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
58
|
+
|
|
58
59
|
const handleChangeText = newValue => {
|
|
59
60
|
setInternalValue(newValue);
|
|
60
61
|
if (onChange) {
|
|
@@ -93,4 +94,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
var _default = (0, _theming.withTheme)(FieldSearchBarFull);
|
|
96
|
-
exports.default = _default
|
|
97
|
+
exports.default = _default;
|
|
@@ -13,6 +13,7 @@ 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); }
|
|
16
17
|
function Center(_ref) {
|
|
17
18
|
let {
|
|
18
19
|
width = 240,
|
|
@@ -22,16 +23,15 @@ function Center(_ref) {
|
|
|
22
23
|
style,
|
|
23
24
|
...rest
|
|
24
25
|
} = _ref;
|
|
25
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
26
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
26
27
|
style: [{
|
|
27
28
|
justifyContent: "center",
|
|
28
29
|
alignItems: "center",
|
|
29
30
|
width,
|
|
30
31
|
height,
|
|
31
32
|
backgroundColor: bgColor
|
|
32
|
-
}, style]
|
|
33
|
-
|
|
34
|
-
}, children);
|
|
33
|
+
}, style]
|
|
34
|
+
}, rest), 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, _extends({
|
|
46
46
|
width: size,
|
|
47
47
|
height: size,
|
|
48
48
|
bgColor: bgColor,
|
|
@@ -50,9 +50,8 @@ function Circle(_ref2) {
|
|
|
50
50
|
backgroundColor: bgColor,
|
|
51
51
|
borderRadius,
|
|
52
52
|
overflow: "hidden"
|
|
53
|
-
}]
|
|
54
|
-
|
|
55
|
-
}, children);
|
|
53
|
+
}]
|
|
54
|
+
}, rest), children);
|
|
56
55
|
}
|
|
57
56
|
function Square(_ref3) {
|
|
58
57
|
let {
|
|
@@ -62,13 +61,12 @@ function Square(_ref3) {
|
|
|
62
61
|
style,
|
|
63
62
|
...rest
|
|
64
63
|
} = _ref3;
|
|
65
|
-
return /*#__PURE__*/React.createElement(Center, {
|
|
64
|
+
return /*#__PURE__*/React.createElement(Center, _extends({
|
|
66
65
|
style: style,
|
|
67
66
|
width: size,
|
|
68
67
|
height: size,
|
|
69
|
-
bgColor: bgColor
|
|
70
|
-
|
|
71
|
-
}, children);
|
|
68
|
+
bgColor: bgColor
|
|
69
|
+
}, rest), children);
|
|
72
70
|
}
|
|
73
71
|
function Row(_ref4) {
|
|
74
72
|
let {
|
|
@@ -78,14 +76,15 @@ function Row(_ref4) {
|
|
|
78
76
|
style,
|
|
79
77
|
...rest
|
|
80
78
|
} = _ref4;
|
|
81
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
82
|
-
style: [style,
|
|
79
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
80
|
+
style: [style,
|
|
81
|
+
// style goes first b/c we can't override these
|
|
82
|
+
{
|
|
83
83
|
alignItems,
|
|
84
84
|
flexDirection: "row",
|
|
85
85
|
justifyContent: justifyContent
|
|
86
|
-
}]
|
|
87
|
-
|
|
88
|
-
}, children);
|
|
86
|
+
}]
|
|
87
|
+
}, rest), children);
|
|
89
88
|
}
|
|
90
89
|
function Spacer(_ref5) {
|
|
91
90
|
let {
|
|
@@ -97,36 +96,16 @@ function Spacer(_ref5) {
|
|
|
97
96
|
style,
|
|
98
97
|
...rest
|
|
99
98
|
} = _ref5;
|
|
100
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
99
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
101
100
|
style: [style, {
|
|
102
101
|
paddingRight: right,
|
|
103
102
|
paddingTop: top,
|
|
104
103
|
paddingLeft: left,
|
|
105
104
|
paddingBottom: bottom
|
|
106
|
-
}]
|
|
107
|
-
|
|
108
|
-
}, children);
|
|
105
|
+
}]
|
|
106
|
+
}, rest), children);
|
|
109
107
|
}
|
|
110
108
|
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) {
|
|
130
109
|
let {
|
|
131
110
|
children,
|
|
132
111
|
justifyContent = "flex-start",
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _lodash = require("lodash");
|
|
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); }
|
|
12
13
|
const NumberInput = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
onChangeText,
|
|
@@ -39,6 +40,7 @@ const NumberInput = _ref => {
|
|
|
39
40
|
setCurrentStringNumberValue(newStringNumberValue);
|
|
40
41
|
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(number);
|
|
41
42
|
};
|
|
43
|
+
|
|
42
44
|
// run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)
|
|
43
45
|
(0, _react.useEffect)(() => {
|
|
44
46
|
const nextStringNumberValue = formatValueToStringNumber(value);
|
|
@@ -47,6 +49,7 @@ const NumberInput = _ref => {
|
|
|
47
49
|
}
|
|
48
50
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
51
|
}, [value]);
|
|
52
|
+
|
|
50
53
|
// set currentStringNumberValue as defaultValue prop if there is a differnce on first render only
|
|
51
54
|
(0, _react.useEffect)(() => {
|
|
52
55
|
const defaultStringNumberValue = formatValueToStringNumber(defaultValue);
|
|
@@ -55,18 +58,6 @@ const NumberInput = _ref => {
|
|
|
55
58
|
}
|
|
56
59
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
57
60
|
}, []);
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
59
|
-
keyboardType: "numeric",
|
|
60
|
-
value: currentStringNumberValue,
|
|
61
|
-
onChangeText: handleChangeText,
|
|
62
|
-
...props
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
var _default = NumberInput;
|
|
66
|
-
exports.default = _default;erValue);
|
|
67
|
-
}
|
|
68
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
-
}, []);
|
|
70
61
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
|
|
71
62
|
keyboardType: "numeric",
|
|
72
63
|
value: currentStringNumberValue,
|
|
@@ -15,7 +15,9 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
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); }
|
|
17
17
|
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; }
|
|
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); }
|
|
18
19
|
const Picker = _ref => {
|
|
20
|
+
var _options$find$label, _options$find;
|
|
19
21
|
let {
|
|
20
22
|
style,
|
|
21
23
|
options,
|
|
@@ -25,7 +27,6 @@ const Picker = _ref => {
|
|
|
25
27
|
onValueChange: onValueChangeOverride = () => {},
|
|
26
28
|
...props
|
|
27
29
|
} = _ref;
|
|
28
|
-
var _a, _b;
|
|
29
30
|
const {
|
|
30
31
|
viewStyles: {
|
|
31
32
|
borderRadius,
|
|
@@ -70,7 +71,7 @@ const Picker = _ref => {
|
|
|
70
71
|
};
|
|
71
72
|
|
|
72
73
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
73
|
-
const selectedLabel = selectedValue && ((
|
|
74
|
+
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);
|
|
74
75
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
75
76
|
disabled: disabled,
|
|
76
77
|
onPress: toggleFocus,
|
|
@@ -94,24 +95,6 @@ const Picker = _ref => {
|
|
|
94
95
|
key: o.value
|
|
95
96
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
96
97
|
pointerEvents: "none"
|
|
97
|
-
}, /*#__PURE__*/React.createElement(_TextField.default, {
|
|
98
|
-
...props,
|
|
99
|
-
value: selectedLabel,
|
|
100
|
-
placeholder: placeholder,
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
ref: textField,
|
|
103
|
-
disabled: disabled,
|
|
104
|
-
// @ts-expect-error
|
|
105
|
-
style: stylesWithoutMargin
|
|
106
|
-
}))));
|
|
107
|
-
};
|
|
108
|
-
const styles = _reactNative.StyleSheet.create({
|
|
109
|
-
container: {
|
|
110
|
-
alignSelf: "stretch"
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
var _default = (0, _theming.withTheme)(Picker);
|
|
114
|
-
exports.default = _default;pointerEvents: "none"
|
|
115
98
|
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
116
99
|
value: selectedLabel,
|
|
117
100
|
placeholder: placeholder
|
|
@@ -7,31 +7,16 @@ 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); }
|
|
10
13
|
class PortalConsumer extends React.Component {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
await Promise.resolve();
|
|
15
|
-
this.key = this.props.manager.mount(this.props.children);
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
_defineProperty(this, "key", void 0);
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
this.checkManager();
|
|
19
|
-
this.props.manager.update(this.key, this.props.children);
|
|
20
|
-
}
|
|
21
|
-
componentWillUnmount() {
|
|
18
|
+
async componentDidMount() {
|
|
22
19
|
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();
|
|
35
20
|
|
|
36
21
|
// Delay updating to prevent React from going to infinite loop
|
|
37
22
|
await Promise.resolve();
|