@draftbit/core 46.10.3-177666.2 → 46.10.3-17bcb4.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/AvatarEdit.js +15 -4
- package/lib/commonjs/components/Banner.js +23 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -4
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
- package/lib/commonjs/components/CircularProgress.js +26 -8
- package/lib/commonjs/components/DeprecatedButton.js +20 -3
- package/lib/commonjs/components/DeprecatedCardWrapper.js +54 -0
- package/lib/commonjs/components/DeprecatedFAB.js +157 -0
- package/lib/commonjs/components/Elevation.js +14 -2
- package/lib/commonjs/components/FormRow.js +16 -2
- package/lib/commonjs/components/IconButton.js +19 -4
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/NumberInput.js +12 -3
- package/lib/commonjs/components/Picker/Picker.js +9 -6
- package/lib/commonjs/components/Picker/PickerComponent.web.js +20 -3
- package/lib/commonjs/components/Portal/Portal.js +27 -3
- package/lib/commonjs/components/Portal/PortalHost.js +44 -15
- package/lib/commonjs/components/Pressable.js +15 -2
- package/lib/commonjs/components/ProgressIndicator.js +55 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +13 -2
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +15 -2
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/ResizeMode.js +5 -0
- package/lib/commonjs/components/ScreenContainer.js +24 -6
- package/lib/commonjs/components/Slider.js +21 -4
- package/lib/commonjs/components/StarRating.js +23 -4
- package/lib/commonjs/components/StepIndicator.js +57 -18
- package/lib/commonjs/components/Surface.js +14 -2
- package/lib/commonjs/components/Switch.js +19 -10
- package/lib/commonjs/components/ToggleButton.js +15 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/hooks.js +1 -2
- package/lib/commonjs/mappings/CardBlock.js +126 -0
- package/lib/commonjs/mappings/CardContainer.js +108 -0
- package/lib/commonjs/mappings/CardContainerRating.js +130 -0
- package/lib/commonjs/mappings/CardContainerShortImage.js +124 -0
- package/lib/commonjs/mappings/CardInline.js +59 -0
- package/lib/commonjs/mappings/HeaderLarge.js +34 -0
- package/lib/commonjs/mappings/HeaderMedium.js +60 -0
- package/lib/commonjs/mappings/HeaderOverline.js +60 -0
- package/lib/commonjs/mappings/ProgressIndicator.js +188 -0
- package/lib/commonjs/styles/overlay.js +1 -3
- package/lib/module/components/Accordion/AccordionItem.js +4 -25
- package/lib/module/components/AnimatedCircularProgress.js +13 -1
- package/lib/module/components/AvatarEdit.js +15 -4
- package/lib/module/components/Banner.js +25 -4
- package/lib/module/components/Button.js +33 -10
- package/lib/module/components/Checkbox/CheckboxGroup.js +16 -2
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -5
- package/lib/module/components/Checkbox/CheckboxRow.js +24 -6
- package/lib/module/components/DatePicker/DatePicker.js +27 -13
- package/lib/module/components/DeprecatedCardWrapper.js +32 -0
- package/lib/module/components/DeprecatedFAB.js +167 -0
- package/lib/module/components/Divider.js +18 -1
- package/lib/module/components/Layout.js +42 -21
- package/lib/module/components/Picker/PickerComponent.android.js +21 -3
- package/lib/module/components/Portal/PortalConsumer.js +22 -7
- package/lib/module/components/ProgressIndicator.js +45 -0
- package/lib/module/components/RadioButton/RadioButton.js +13 -1
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +10 -1
- package/lib/module/components/RadioButton/context.js +1 -1
- package/lib/module/components/ResizeMode.js +1 -0
- package/lib/module/components/StepIndicator.js +58 -18
- package/lib/module/components/Surface.js +15 -1
- package/lib/module/components/Switch.js +21 -10
- package/lib/module/components/TabView/TabView.js +17 -7
- package/lib/module/components/TabView/TabViewItem.js +4 -3
- package/lib/module/components/Table/Table.js +6 -5
- package/lib/module/components/TextField.js +78 -28
- package/lib/module/components/ToggleButton.js +16 -2
- package/lib/module/constants.js +1 -0
- package/lib/module/mappings/CardBlock.js +119 -0
- package/lib/module/mappings/CardContainer.js +101 -0
- package/lib/module/mappings/CardContainerRating.js +123 -0
- package/lib/module/mappings/CardContainerShortImage.js +117 -0
- package/lib/module/mappings/CardInline.js +52 -0
- package/lib/module/mappings/HeaderLarge.js +27 -0
- package/lib/module/mappings/HeaderMedium.js +53 -0
- package/lib/module/mappings/HeaderOverline.js +53 -0
- package/lib/module/mappings/ProgressIndicator.js +181 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +15 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -0
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +56 -0
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -0
- package/lib/typescript/src/components/ProgressIndicator.d.ts +24 -0
- package/lib/typescript/src/components/ProgressIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/ResizeMode.d.ts +2 -0
- package/lib/typescript/src/components/ResizeMode.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardBlock.d.ts +289 -0
- package/lib/typescript/src/mappings/CardBlock.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainer.d.ts +102 -0
- package/lib/typescript/src/mappings/CardContainer.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainerRating.d.ts +108 -0
- package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +139 -0
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardInline.d.ts +62 -0
- package/lib/typescript/src/mappings/CardInline.d.ts.map +1 -0
- package/lib/typescript/src/mappings/HeaderLarge.d.ts +34 -0
- package/lib/typescript/src/mappings/HeaderLarge.d.ts.map +1 -0
- package/lib/typescript/src/mappings/HeaderMedium.d.ts +53 -0
- package/lib/typescript/src/mappings/HeaderMedium.d.ts.map +1 -0
- package/lib/typescript/src/mappings/HeaderOverline.d.ts +53 -0
- package/lib/typescript/src/mappings/HeaderOverline.d.ts.map +1 -0
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts +181 -0
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/DeprecatedCardWrapper.js +18 -0
- package/src/components/DeprecatedCardWrapper.tsx +46 -0
- package/src/components/DeprecatedFAB.js +114 -0
- package/src/components/DeprecatedFAB.tsx +231 -0
- package/src/components/ProgressIndicator.js +27 -0
- package/src/components/ProgressIndicator.tsx +71 -0
- package/src/components/ResizeMode.js +1 -0
- package/src/components/ResizeMode.ts +7 -0
- package/src/mappings/CardBlock.js +123 -0
- package/src/mappings/CardBlock.ts +136 -0
- package/src/mappings/CardContainer.js +104 -0
- package/src/mappings/CardContainer.ts +116 -0
- package/src/mappings/CardContainerRating.js +126 -0
- package/src/mappings/CardContainerRating.ts +137 -0
- package/src/mappings/CardContainerShortImage.js +120 -0
- package/src/mappings/CardContainerShortImage.ts +130 -0
- package/src/mappings/CardInline.js +52 -0
- package/src/mappings/CardInline.ts +61 -0
- package/src/mappings/HeaderLarge.js +29 -0
- package/src/mappings/HeaderLarge.ts +38 -0
- package/src/mappings/HeaderMedium.js +55 -0
- package/src/mappings/HeaderMedium.ts +63 -0
- package/src/mappings/HeaderOverline.js +55 -0
- package/src/mappings/HeaderOverline.ts +63 -0
- package/src/mappings/ProgressIndicator.js +181 -0
- package/src/mappings/ProgressIndicator.ts +190 -0
|
@@ -12,7 +12,6 @@ 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); }
|
|
16
15
|
const AvatarEdit = _ref => {
|
|
17
16
|
let {
|
|
18
17
|
Icon,
|
|
@@ -32,9 +31,10 @@ const AvatarEdit = _ref => {
|
|
|
32
31
|
width: size,
|
|
33
32
|
height: size
|
|
34
33
|
};
|
|
35
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
36
|
-
style: [style, dimensions]
|
|
37
|
-
|
|
34
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
35
|
+
style: [style, dimensions],
|
|
36
|
+
...rest
|
|
37
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
38
38
|
onPress: onPress
|
|
39
39
|
}, /*#__PURE__*/React.createElement(_CircleImage.default, {
|
|
40
40
|
source: image,
|
|
@@ -56,4 +56,15 @@ 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);
|
|
59
70
|
exports.default = _default;
|
|
@@ -12,7 +12,6 @@ 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); }
|
|
16
15
|
const ELEVATION = 1;
|
|
17
16
|
const DEFAULT_MAX_WIDTH = 960;
|
|
18
17
|
const Banner = _ref => {
|
|
@@ -70,7 +69,6 @@ const Banner = _ref => {
|
|
|
70
69
|
measured: true
|
|
71
70
|
});
|
|
72
71
|
};
|
|
73
|
-
|
|
74
72
|
// The banner animation has 2 parts:
|
|
75
73
|
// 1. Blank spacer element which animates its height to move the content
|
|
76
74
|
// 2. Actual banner which animates its translateY
|
|
@@ -80,9 +78,10 @@ const Banner = _ref => {
|
|
|
80
78
|
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
81
79
|
const height = _reactNative.Animated.multiply(position, layout.height);
|
|
82
80
|
const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
|
|
83
|
-
return /*#__PURE__*/React.createElement(_Surface.default,
|
|
81
|
+
return /*#__PURE__*/React.createElement(_Surface.default, {
|
|
82
|
+
...rest,
|
|
84
83
|
style: [styles.container, (0, _shadow.default)(ELEVATION), style]
|
|
85
|
-
}
|
|
84
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
86
85
|
style: [styles.wrapper, contentStyle]
|
|
87
86
|
}, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
88
87
|
style: {
|
|
@@ -164,4 +163,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
164
163
|
}
|
|
165
164
|
});
|
|
166
165
|
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);
|
|
167
186
|
exports.default = _default;
|
|
@@ -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,
|
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _context = require("./context");
|
|
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 {
|
|
14
13
|
Provider
|
|
15
14
|
} = _context.checkboxGroupContext;
|
|
@@ -31,7 +30,23 @@ const CheckboxGroup = _ref => {
|
|
|
31
30
|
alignItems: "center"
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
33
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
34
|
+
style: [{
|
|
35
|
+
minHeight: 40
|
|
36
|
+
}, style],
|
|
37
|
+
...rest
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
39
|
+
value: {
|
|
40
|
+
values,
|
|
41
|
+
onValueChange,
|
|
42
|
+
direction
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
45
|
+
style: _containerStyle
|
|
46
|
+
}, children)));
|
|
47
|
+
};
|
|
48
|
+
var _default = CheckboxGroup;
|
|
49
|
+
exports.default = _default;s({
|
|
35
50
|
style: [{
|
|
36
51
|
minHeight: 40
|
|
37
52
|
}, style]
|
|
@@ -8,27 +8,24 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeSvg = require("react-native-svg");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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; }
|
|
12
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
-
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); }
|
|
14
11
|
class CircularProgress extends _react.default.Component {
|
|
15
12
|
constructor() {
|
|
16
13
|
super(...arguments);
|
|
17
|
-
|
|
14
|
+
this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
|
|
18
15
|
var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
|
|
19
16
|
return {
|
|
20
17
|
x: centerX + radius * Math.cos(angleInRadians),
|
|
21
18
|
y: centerY + radius * Math.sin(angleInRadians)
|
|
22
19
|
};
|
|
23
|
-
}
|
|
24
|
-
|
|
20
|
+
};
|
|
21
|
+
this.circlePath = (x, y, radius, startAngle, endAngle) => {
|
|
25
22
|
var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
|
|
26
23
|
var end = this.polarToCartesian(x, y, radius, startAngle);
|
|
27
24
|
var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
|
|
28
25
|
var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
|
|
29
26
|
return d.join(" ");
|
|
30
|
-
}
|
|
31
|
-
|
|
27
|
+
};
|
|
28
|
+
this.clampFill = fill => Math.min(100, Math.max(0, fill));
|
|
32
29
|
}
|
|
33
30
|
render() {
|
|
34
31
|
const {
|
|
@@ -109,4 +106,25 @@ class CircularProgress extends _react.default.Component {
|
|
|
109
106
|
}
|
|
110
107
|
}
|
|
111
108
|
var _default = CircularProgress;
|
|
109
|
+
exports.default = _default;padding) / 2
|
|
110
|
+
}, backgroundColor && /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
|
|
111
|
+
d: backgroundPath,
|
|
112
|
+
stroke: backgroundColor,
|
|
113
|
+
strokeWidth: backgroundWidth || width,
|
|
114
|
+
strokeLinecap: lineCap,
|
|
115
|
+
strokeDasharray: strokeDasharrayBackground,
|
|
116
|
+
fill: "transparent"
|
|
117
|
+
}), fill > 0 && /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
|
|
118
|
+
d: circlePathItem,
|
|
119
|
+
stroke: tintColor,
|
|
120
|
+
strokeWidth: width,
|
|
121
|
+
strokeLinecap: lineCap,
|
|
122
|
+
strokeDasharray: strokeDasharrayTint,
|
|
123
|
+
fill: "transparent"
|
|
124
|
+
}), cap)), children && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
125
|
+
style: localChildrenContainerStyle
|
|
126
|
+
}, children(fill)));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
var _default = CircularProgress;
|
|
112
130
|
exports.default = _default;
|
|
@@ -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
|
const Button = _ref => {
|
|
18
17
|
let {
|
|
19
18
|
Icon,
|
|
@@ -84,7 +83,8 @@ const Button = _ref => {
|
|
|
84
83
|
elevation,
|
|
85
84
|
alignSelf: "stretch"
|
|
86
85
|
}
|
|
87
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
86
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
87
|
+
...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
|
-
}
|
|
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,4 +124,21 @@ 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);
|
|
127
144
|
exports.default = _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _theming = require("../theming");
|
|
9
|
+
var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const getWidth = numColumns => {
|
|
12
|
+
switch (numColumns) {
|
|
13
|
+
case 1:
|
|
14
|
+
return "33%";
|
|
15
|
+
case 2:
|
|
16
|
+
return "50%";
|
|
17
|
+
default:
|
|
18
|
+
return "100%";
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const Card = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
numColumns = 3,
|
|
24
|
+
children,
|
|
25
|
+
onPress,
|
|
26
|
+
style,
|
|
27
|
+
...rest
|
|
28
|
+
} = _ref;
|
|
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);
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
46
|
+
disabled: !onPress,
|
|
47
|
+
onPress: onPress,
|
|
48
|
+
style: [style, {
|
|
49
|
+
width
|
|
50
|
+
}]
|
|
51
|
+
}, rest), children);
|
|
52
|
+
};
|
|
53
|
+
var _default = (0, _theming.withTheme)(Card);
|
|
54
|
+
exports.default = _default;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _color = _interopRequireDefault(require("color"));
|
|
10
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
11
|
+
var _Text = _interopRequireDefault(require("./Text"));
|
|
12
|
+
var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
13
|
+
var _theming = require("../theming");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
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); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
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
|
+
const FAB = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
Icon,
|
|
21
|
+
icon,
|
|
22
|
+
disabled = false,
|
|
23
|
+
type = "solid",
|
|
24
|
+
loading = false,
|
|
25
|
+
color: colorOverride,
|
|
26
|
+
label,
|
|
27
|
+
onPress,
|
|
28
|
+
elevation = 0,
|
|
29
|
+
style,
|
|
30
|
+
theme: {
|
|
31
|
+
colors,
|
|
32
|
+
disabledOpacity,
|
|
33
|
+
roundness,
|
|
34
|
+
typography
|
|
35
|
+
},
|
|
36
|
+
...rest
|
|
37
|
+
} = _ref;
|
|
38
|
+
let backgroundColor, borderColor, textColor, borderWidth;
|
|
39
|
+
const buttonColor = colorOverride || colors.primary;
|
|
40
|
+
if (type === "standard" || type === "extended" || type === "fixed") {
|
|
41
|
+
backgroundColor = buttonColor;
|
|
42
|
+
if (disabled) {
|
|
43
|
+
textColor = (0, _color.default)(colors.surface).alpha(disabledOpacity).rgb().string();
|
|
44
|
+
} else {
|
|
45
|
+
textColor = colors.surface;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
backgroundColor = "transparent";
|
|
49
|
+
if (disabled) {
|
|
50
|
+
textColor = (0, _color.default)(buttonColor).alpha(disabledOpacity).rgb().string();
|
|
51
|
+
} else {
|
|
52
|
+
textColor = buttonColor;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (type === "outline") {
|
|
56
|
+
if (disabled) {
|
|
57
|
+
borderColor = (0, _color.default)(buttonColor).alpha(disabledOpacity).rgb().string();
|
|
58
|
+
} else {
|
|
59
|
+
borderColor = buttonColor;
|
|
60
|
+
}
|
|
61
|
+
borderWidth = _reactNative.StyleSheet.hairlineWidth;
|
|
62
|
+
} else {
|
|
63
|
+
borderColor = "transparent";
|
|
64
|
+
borderWidth = 0;
|
|
65
|
+
}
|
|
66
|
+
const buttonStyle = {
|
|
67
|
+
backgroundColor,
|
|
68
|
+
borderColor,
|
|
69
|
+
borderWidth,
|
|
70
|
+
borderRadius: roundness,
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
justifyContent: "center"
|
|
73
|
+
};
|
|
74
|
+
const buttonStyles = [styles.button, buttonStyle];
|
|
75
|
+
const contentStyle = [styles.content];
|
|
76
|
+
const textStyle = {
|
|
77
|
+
textAlign: "center",
|
|
78
|
+
color: textColor
|
|
79
|
+
};
|
|
80
|
+
const iconStyle = [styles.icon, {
|
|
81
|
+
width: _Config.default.buttonIconSize
|
|
82
|
+
}];
|
|
83
|
+
if (type === "standard" || type === "outline") {
|
|
84
|
+
buttonStyle.width = _Config.default.FABSize;
|
|
85
|
+
buttonStyle.height = _Config.default.FABSize;
|
|
86
|
+
buttonStyle.borderRadius = _Config.default.FABBorderRadius;
|
|
87
|
+
contentStyle.push({
|
|
88
|
+
width: _Config.default.FABSize,
|
|
89
|
+
height: _Config.default.FABSize
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (type === "extended" || type === "fixed") {
|
|
93
|
+
iconStyle.push({
|
|
94
|
+
marginLeft: 16,
|
|
95
|
+
marginRight: -8
|
|
96
|
+
});
|
|
97
|
+
textStyle.margin = 16;
|
|
98
|
+
}
|
|
99
|
+
if (type === "fixed") {
|
|
100
|
+
buttonStyles.push({
|
|
101
|
+
height: _Config.default.FABFixedHeight,
|
|
102
|
+
alignSelf: "stretch"
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return /*#__PURE__*/React.createElement(_Elevation.default, {
|
|
106
|
+
style: [{
|
|
107
|
+
elevation
|
|
108
|
+
}, style]
|
|
109
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
|
|
110
|
+
onPress: onPress,
|
|
111
|
+
accessibilityState: {
|
|
112
|
+
disabled
|
|
113
|
+
},
|
|
114
|
+
accessibilityRole: "button",
|
|
115
|
+
disabled: disabled || loading,
|
|
116
|
+
style: buttonStyles
|
|
117
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
118
|
+
style: styles.content
|
|
119
|
+
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
120
|
+
style: iconStyle
|
|
121
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
122
|
+
name: icon,
|
|
123
|
+
size: _Config.default.buttonIconSize,
|
|
124
|
+
color: textColor
|
|
125
|
+
})) : null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
126
|
+
size: "small",
|
|
127
|
+
color: textColor,
|
|
128
|
+
style: iconStyle
|
|
129
|
+
}) : null, label ? /*#__PURE__*/React.createElement(_Text.default, {
|
|
130
|
+
numberOfLines: 1,
|
|
131
|
+
style: [textStyle, typography.button]
|
|
132
|
+
}, label) : null)));
|
|
133
|
+
};
|
|
134
|
+
const styles = _reactNative.StyleSheet.create({
|
|
135
|
+
button: {
|
|
136
|
+
borderStyle: "solid"
|
|
137
|
+
},
|
|
138
|
+
content: {
|
|
139
|
+
flexDirection: "row",
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
justifyContent: "center"
|
|
142
|
+
},
|
|
143
|
+
icon: {
|
|
144
|
+
alignItems: "center",
|
|
145
|
+
justifyContent: "center",
|
|
146
|
+
width: _Config.default.buttonIconSize
|
|
147
|
+
},
|
|
148
|
+
fixed: {
|
|
149
|
+
left: 0,
|
|
150
|
+
right: 0,
|
|
151
|
+
bottom: 0,
|
|
152
|
+
height: 64,
|
|
153
|
+
borderRadius: 0
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
157
|
+
exports.default = _default;
|
|
@@ -11,7 +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 _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
14
|
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
16
15
|
const Elevation = _ref => {
|
|
17
16
|
let {
|
|
@@ -28,11 +27,24 @@ const Elevation = _ref => {
|
|
|
28
27
|
colors
|
|
29
28
|
} = theme;
|
|
30
29
|
const borderRadius = radius;
|
|
31
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View,
|
|
30
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
31
|
+
...rest,
|
|
32
32
|
style: [{
|
|
33
33
|
borderRadius,
|
|
34
34
|
backgroundColor: colors.surface
|
|
35
35
|
}, elevation ? (0, _shadow.default)(elevation) : null, style]
|
|
36
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
37
|
+
style: {
|
|
38
|
+
overflow: "hidden",
|
|
39
|
+
borderRadius
|
|
40
|
+
}
|
|
41
|
+
}, children));
|
|
42
|
+
};
|
|
43
|
+
var _default = (0, _theming.withTheme)(Elevation);
|
|
44
|
+
exports.default = _default;
|
|
45
|
+
borderRadius,
|
|
46
|
+
backgroundColor: colors.surface
|
|
47
|
+
}, elevation ? (0, _shadow.default)(elevation) : null, style]
|
|
36
48
|
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
37
49
|
style: {
|
|
38
50
|
overflow: "hidden",
|
|
@@ -11,7 +11,6 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
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 _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
14
|
function FormRow(_ref) {
|
|
16
15
|
let {
|
|
17
16
|
disabled,
|
|
@@ -26,11 +25,26 @@ function FormRow(_ref) {
|
|
|
26
25
|
textStyles,
|
|
27
26
|
viewStyles
|
|
28
27
|
} = (0, _utilities.extractStyles)(style);
|
|
29
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
28
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
30
29
|
disabled: disabled,
|
|
31
30
|
onPress: onPress,
|
|
32
31
|
style: [styles.row, {
|
|
33
32
|
flexDirection: direction
|
|
33
|
+
}, viewStyles],
|
|
34
|
+
...rest
|
|
35
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
36
|
+
style: textStyles
|
|
37
|
+
}, label), children);
|
|
38
|
+
}
|
|
39
|
+
const styles = _reactNative.StyleSheet.create({
|
|
40
|
+
row: {
|
|
41
|
+
marginLeft: 8,
|
|
42
|
+
marginRight: 8,
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
justifyContent: "space-between",
|
|
45
|
+
alignItems: "center"
|
|
46
|
+
}
|
|
47
|
+
});rection: direction
|
|
34
48
|
}, viewStyles]
|
|
35
49
|
}, rest), /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
36
50
|
style: textStyles
|
|
@@ -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 IconButton = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
Icon,
|
|
@@ -26,7 +25,7 @@ const IconButton = _ref => {
|
|
|
26
25
|
...props
|
|
27
26
|
} = _ref;
|
|
28
27
|
const iconColor = customColor || theme.colors.primary;
|
|
29
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
28
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
30
29
|
onPress: onPress,
|
|
31
30
|
disabled: disabled || loading,
|
|
32
31
|
style: _ref2 => {
|
|
@@ -40,8 +39,9 @@ const IconButton = _ref => {
|
|
|
40
39
|
alignItems: "center",
|
|
41
40
|
justifyContent: "center"
|
|
42
41
|
}, style];
|
|
43
|
-
}
|
|
44
|
-
|
|
42
|
+
},
|
|
43
|
+
...props
|
|
44
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
45
|
name: icon,
|
|
46
46
|
size: size - 2,
|
|
47
47
|
color: iconColor
|
|
@@ -63,4 +63,19 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
var _default = (0, _theming.withTheme)(IconButton);
|
|
66
|
+
exports.default = _default; }) : null));
|
|
67
|
+
};
|
|
68
|
+
const styles = _reactNative.StyleSheet.create({
|
|
69
|
+
container: {
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
justifyContent: "center",
|
|
72
|
+
..._reactNative.Platform.select({
|
|
73
|
+
web: {
|
|
74
|
+
cursor: "pointer",
|
|
75
|
+
userSelect: "none"
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
var _default = (0, _theming.withTheme)(IconButton);
|
|
66
81
|
exports.default = _default;
|