@draftbit/core 46.5.2-13b65f.2 → 46.5.2-5f6e91.0
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/Button.js +15 -27
- package/lib/commonjs/components/CardBlock.js +13 -4
- package/lib/commonjs/components/CardContainerRating.js +13 -4
- package/lib/commonjs/components/CardContainerShortImage.js +15 -4
- package/lib/commonjs/components/Carousel.js +30 -8
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
- package/lib/commonjs/components/CircleImage.js +15 -1
- package/lib/commonjs/components/CircularProgress.js +26 -8
- package/lib/commonjs/components/DatePicker/DatePicker.js +4 -0
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js +6 -0
- package/lib/commonjs/components/DeprecatedButton.js +151 -0
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
- package/lib/commonjs/components/DeprecatedFAB.js +2 -1
- package/lib/commonjs/components/Elevation.js +14 -2
- package/lib/commonjs/components/FieldSearchBarFull.js +1 -2
- package/lib/commonjs/components/FormRow.js +16 -2
- package/lib/commonjs/components/IconButton.js +19 -4
- package/lib/commonjs/components/Image.js +17 -2
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Picker/Picker.js +13 -7
- package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -3
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +38 -13
- package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
- package/lib/commonjs/components/Portal/PortalHost.js +44 -15
- package/lib/commonjs/components/ProgressBar.js +37 -7
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -5
- package/lib/commonjs/components/Slider.js +21 -4
- package/lib/commonjs/components/Surface.js +14 -2
- package/lib/commonjs/components/Switch.js +19 -10
- package/lib/commonjs/components/Text.js +50 -4
- package/lib/commonjs/components/Touchable.js +27 -28
- package/lib/commonjs/components/Touchable.web.js +9 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/hooks.js +1 -2
- package/lib/commonjs/mappings/Button.js +10 -13
- package/lib/commonjs/mappings/Touchable.js +20 -0
- package/lib/commonjs/styles/overlay.js +1 -3
- package/lib/module/components/AnimatedCircularProgress.js +13 -1
- package/lib/module/components/Button.js +9 -21
- package/lib/module/components/CardContainer.js +14 -4
- package/lib/module/components/Checkbox/Checkbox.js +3 -2
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -5
- package/lib/module/components/Checkbox/CheckboxRow.js +24 -6
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/CircleImage.js +16 -1
- package/lib/module/components/DatePicker/DatePicker.js +4 -0
- package/lib/module/components/DatePicker/DatePickerComponent.js +6 -0
- package/lib/module/components/DeprecatedButton.js +141 -0
- package/lib/module/components/DeprecatedCardWrapper.js +2 -2
- package/lib/module/components/DeprecatedFAB.js +25 -4
- package/lib/module/components/Divider.js +18 -1
- package/lib/module/components/Elevation.js +14 -2
- package/lib/module/components/IconButton.js +21 -4
- package/lib/module/components/Layout.js +42 -21
- package/lib/module/components/Picker/Picker.js +4 -3
- package/lib/module/components/Picker/PickerComponent.ios.js +1 -1
- package/lib/module/components/Picker/PickerComponent.web.js +21 -3
- package/lib/module/components/Portal/PortalHost.js +45 -15
- package/lib/module/components/Portal/PortalManager.js +33 -7
- package/lib/module/components/ProgressBar.js +39 -7
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +10 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
- package/lib/module/components/ScreenContainer.js +21 -4
- package/lib/module/components/Slider.js +21 -4
- package/lib/module/components/StepIndicator.js +58 -18
- package/lib/module/components/Surface.js +15 -1
- package/lib/module/components/TextField.js +78 -28
- package/lib/module/components/ToggleButton.js +16 -2
- package/lib/module/components/Touchable.js +10 -25
- package/lib/module/components/Touchable.web.js +2 -0
- package/lib/module/constants.js +1 -2
- package/lib/module/hooks.js +1 -2
- package/lib/module/index.js +1 -3
- package/lib/module/mappings/Button.js +11 -14
- package/lib/module/mappings/FieldSearchBarFull.js +4 -1
- package/lib/module/mappings/StarRating.js +7 -2
- package/lib/module/mappings/Touchable.js +13 -0
- package/lib/module/styles/overlay.js +1 -3
- package/lib/typescript/src/components/Button.d.ts +0 -2
- package/lib/typescript/src/components/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +2 -0
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts +2 -0
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +54 -0
- package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts +2 -9
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
- package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
- package/lib/typescript/src/mappings/Button.d.ts +4 -113
- package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +22 -0
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Button.js +11 -18
- package/src/components/Button.tsx +11 -45
- package/src/components/Checkbox/Checkbox.js +3 -2
- package/src/components/Checkbox/Checkbox.tsx +7 -5
- package/src/components/DatePicker/DatePicker.js +2 -2
- package/src/components/DatePicker/DatePicker.tsx +6 -0
- package/src/components/DatePicker/DatePickerComponent.js +3 -3
- package/src/components/DatePicker/DatePickerComponent.tsx +6 -0
- package/src/components/DatePicker/DatePickerComponentType.ts +2 -0
- package/src/components/DeprecatedButton.js +95 -0
- package/src/components/DeprecatedButton.tsx +214 -0
- package/src/components/DeprecatedCardWrapper.js +2 -2
- package/src/components/DeprecatedCardWrapper.tsx +4 -3
- package/src/components/DeprecatedFAB.js +3 -2
- package/src/components/DeprecatedFAB.tsx +5 -5
- package/src/components/Picker/Picker.js +4 -3
- package/src/components/Picker/Picker.tsx +4 -4
- package/src/components/Picker/PickerComponent.ios.js +1 -1
- package/src/components/Picker/PickerComponent.ios.tsx +1 -1
- package/src/components/Touchable.js +11 -16
- package/src/components/Touchable.tsx +11 -42
- package/src/components/Touchable.web.js +2 -0
- package/src/components/Touchable.web.tsx +3 -0
- package/src/mappings/Button.js +10 -13
- package/src/mappings/Button.ts +10 -13
- package/src/mappings/Touchable.js +17 -0
- package/src/mappings/Touchable.ts +23 -0
- package/lib/commonjs/components/Pressable.js +0 -48
- package/lib/commonjs/mappings/Pressable.js +0 -34
- package/lib/module/components/Pressable.js +0 -40
- package/lib/module/mappings/Pressable.js +0 -27
- package/lib/typescript/src/components/Pressable.d.ts +0 -18
- package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Pressable.d.ts +0 -76
- package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
- package/src/components/Pressable.js +0 -17
- package/src/components/Pressable.tsx +0 -67
- package/src/mappings/Pressable.js +0 -34
- package/src/mappings/Pressable.ts +0 -42
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ButtonSolid = exports.ButtonOutline = exports.Button = void 0;
|
|
7
|
-
var
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
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); }
|
|
@@ -22,9 +22,6 @@ function Base(_ref) {
|
|
|
22
22
|
icon,
|
|
23
23
|
title,
|
|
24
24
|
onPress,
|
|
25
|
-
onLongPress,
|
|
26
|
-
activeOpacity,
|
|
27
|
-
disabledOpacity,
|
|
28
25
|
loading,
|
|
29
26
|
disabled,
|
|
30
27
|
style,
|
|
@@ -63,36 +60,27 @@ function Base(_ref) {
|
|
|
63
60
|
if (textAlign === "right") {
|
|
64
61
|
buttonStyles.justifyContent = "flex-end";
|
|
65
62
|
}
|
|
66
|
-
|
|
67
|
-
if (disabled) {
|
|
68
|
-
return disabledOpacity;
|
|
69
|
-
} else {
|
|
70
|
-
if (pressed) return activeOpacity;else return 1;
|
|
71
|
-
}
|
|
72
|
-
}, [activeOpacity, disabled, disabledOpacity]);
|
|
73
|
-
const _style = (0, _react.useCallback)(_ref2 => {
|
|
74
|
-
let {
|
|
75
|
-
pressed
|
|
76
|
-
} = _ref2;
|
|
77
|
-
return [buttonStyles, {
|
|
78
|
-
opacity: getOpacity(pressed)
|
|
79
|
-
}];
|
|
80
|
-
}, [getOpacity, buttonStyles]);
|
|
81
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
|
|
63
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
82
64
|
onPress: onPress,
|
|
83
|
-
onLongPress: onLongPress,
|
|
84
65
|
disabled: disabled || loading,
|
|
85
|
-
style:
|
|
86
|
-
|
|
66
|
+
style: _ref2 => {
|
|
67
|
+
let {
|
|
68
|
+
pressed
|
|
69
|
+
} = _ref2;
|
|
70
|
+
return [styles.base, {
|
|
71
|
+
opacity: pressed || disabled ? 0.75 : 1
|
|
72
|
+
}, buttonStyles];
|
|
73
|
+
}
|
|
74
|
+
}, props), loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
87
75
|
size: "small",
|
|
88
76
|
color: color,
|
|
89
77
|
style: styles.loading
|
|
90
|
-
}) : null, icon && !loading ? /*#__PURE__*/
|
|
78
|
+
}) : null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
91
79
|
name: icon,
|
|
92
80
|
color: color,
|
|
93
81
|
style: styles.icon,
|
|
94
82
|
size: CONSTANTS.icon
|
|
95
|
-
}) : null, /*#__PURE__*/
|
|
83
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
96
84
|
style: titleStyles
|
|
97
85
|
}, title));
|
|
98
86
|
}
|
|
@@ -102,7 +90,7 @@ const Solid = _ref3 => {
|
|
|
102
90
|
theme,
|
|
103
91
|
...props
|
|
104
92
|
} = _ref3;
|
|
105
|
-
return /*#__PURE__*/
|
|
93
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
106
94
|
style: [{
|
|
107
95
|
color: "#FFF",
|
|
108
96
|
borderRadius: theme.roundness,
|
|
@@ -120,7 +108,7 @@ const Outline = _ref4 => {
|
|
|
120
108
|
theme,
|
|
121
109
|
...props
|
|
122
110
|
} = _ref4;
|
|
123
|
-
return /*#__PURE__*/
|
|
111
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
124
112
|
style: [styles.outline, {
|
|
125
113
|
borderRadius: theme.roundness,
|
|
126
114
|
borderColor: theme.colors.primary,
|
|
@@ -12,7 +12,6 @@ var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
|
12
12
|
var _theming = require("../theming");
|
|
13
13
|
var _Config = _interopRequireDefault(require("./Config"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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 CardBlock = _ref => {
|
|
17
16
|
let {
|
|
18
17
|
image = _Config.default.cardImageUrl,
|
|
@@ -49,11 +48,12 @@ const CardBlock = _ref => {
|
|
|
49
48
|
const rightDescriptionStyles = [typography.subtitle2, {
|
|
50
49
|
color: colors.light
|
|
51
50
|
}];
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
53
52
|
style: style,
|
|
54
53
|
onPress: onPress,
|
|
55
|
-
numColumns: numColumns
|
|
56
|
-
|
|
54
|
+
numColumns: numColumns,
|
|
55
|
+
...rest
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
57
57
|
style: {
|
|
58
58
|
backgroundColor: colors.background
|
|
59
59
|
}
|
|
@@ -103,4 +103,13 @@ const CardBlock = _ref => {
|
|
|
103
103
|
}, rightDescription) : null) : null));
|
|
104
104
|
};
|
|
105
105
|
var _default = (0, _theming.withTheme)(CardBlock);
|
|
106
|
+
exports.default = _default;yle: [typography.body2, {
|
|
107
|
+
color: colors.medium
|
|
108
|
+
}]
|
|
109
|
+
}, leftDescription), rightDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
110
|
+
numberOfLines: 1,
|
|
111
|
+
style: rightDescriptionStyles
|
|
112
|
+
}, rightDescription) : null) : null));
|
|
113
|
+
};
|
|
114
|
+
var _default = (0, _theming.withTheme)(CardBlock);
|
|
106
115
|
exports.default = _default;
|
|
@@ -14,7 +14,6 @@ var _StarRating = _interopRequireDefault(require("./StarRating"));
|
|
|
14
14
|
var _theming = require("../theming");
|
|
15
15
|
var _Config = _interopRequireDefault(require("./Config"));
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
17
|
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
19
18
|
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
20
19
|
const CardContainerRating = _ref => {
|
|
@@ -49,11 +48,12 @@ const CardContainerRating = _ref => {
|
|
|
49
48
|
rightDescriptionStyle = typography.caption;
|
|
50
49
|
break;
|
|
51
50
|
}
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
53
52
|
style: style,
|
|
54
53
|
onPress: onPress,
|
|
55
|
-
numColumns: numColumns
|
|
56
|
-
|
|
54
|
+
numColumns: numColumns,
|
|
55
|
+
...rest
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
57
57
|
style: {
|
|
58
58
|
elevation,
|
|
59
59
|
borderRadius: roundness
|
|
@@ -130,4 +130,13 @@ const CardContainerRating = _ref => {
|
|
|
130
130
|
})) : null)));
|
|
131
131
|
};
|
|
132
132
|
var _default = (0, _theming.withTheme)(CardContainerRating);
|
|
133
|
+
exports.default = _default;lor.default)(colors.strong).alpha(_Config.default.cardIconBackgroundOpacity).rgb().string()
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
136
|
+
name: icon,
|
|
137
|
+
size: _Config.default.cardIconSize,
|
|
138
|
+
color: colors.surface
|
|
139
|
+
})) : null)));
|
|
140
|
+
};
|
|
141
|
+
var _default = (0, _theming.withTheme)(CardContainerRating);
|
|
133
142
|
exports.default = _default;
|
|
@@ -12,7 +12,6 @@ var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
|
12
12
|
var _theming = require("../theming");
|
|
13
13
|
var _Config = _interopRequireDefault(require("./Config"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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 CardContainerShortImage = _ref => {
|
|
17
16
|
let {
|
|
18
17
|
image = _Config.default.squareImageUrl,
|
|
@@ -30,10 +29,11 @@ const CardContainerShortImage = _ref => {
|
|
|
30
29
|
onPress,
|
|
31
30
|
...rest
|
|
32
31
|
} = _ref;
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
34
33
|
style: style,
|
|
35
|
-
onPress: onPress
|
|
36
|
-
|
|
34
|
+
onPress: onPress,
|
|
35
|
+
...rest
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
37
37
|
style: {
|
|
38
38
|
elevation,
|
|
39
39
|
borderRadius: roundness
|
|
@@ -81,4 +81,15 @@ const CardContainerShortImage = _ref => {
|
|
|
81
81
|
}))));
|
|
82
82
|
};
|
|
83
83
|
var _default = (0, _theming.withTheme)(CardContainerShortImage);
|
|
84
|
+
exports.default = _default; }, subtitle) : null), mode === "right" && /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
85
|
+
style: {
|
|
86
|
+
aspectRatio
|
|
87
|
+
},
|
|
88
|
+
source: typeof image === "string" ? {
|
|
89
|
+
uri: image
|
|
90
|
+
} : image,
|
|
91
|
+
resizeMode: "cover"
|
|
92
|
+
}))));
|
|
93
|
+
};
|
|
94
|
+
var _default = (0, _theming.withTheme)(CardContainerShortImage);
|
|
84
95
|
exports.default = _default;
|
|
@@ -11,7 +11,6 @@ var _Image = _interopRequireDefault(require("./Image"));
|
|
|
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
|
const screenWidth = _reactNative.Dimensions.get("window").width;
|
|
16
15
|
function Pager(_ref) {
|
|
17
16
|
let {
|
|
@@ -39,7 +38,6 @@ function Pager(_ref) {
|
|
|
39
38
|
}));
|
|
40
39
|
}
|
|
41
40
|
function Carousel(_ref2) {
|
|
42
|
-
var _data$length;
|
|
43
41
|
let {
|
|
44
42
|
data,
|
|
45
43
|
children,
|
|
@@ -47,9 +45,10 @@ function Carousel(_ref2) {
|
|
|
47
45
|
style,
|
|
48
46
|
...rest
|
|
49
47
|
} = _ref2;
|
|
48
|
+
var _a;
|
|
50
49
|
const [index, setIndex] = React.useState(0);
|
|
51
50
|
const length = React.Children.count(children);
|
|
52
|
-
const itemsLength = ((
|
|
51
|
+
const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
|
|
53
52
|
const slides = Array.isArray(data) ? data : [];
|
|
54
53
|
const {
|
|
55
54
|
width,
|
|
@@ -57,9 +56,10 @@ function Carousel(_ref2) {
|
|
|
57
56
|
} = _reactNative.StyleSheet.flatten(style || {});
|
|
58
57
|
const slideWidth = width || screenWidth;
|
|
59
58
|
const slideHeight = height || 250;
|
|
60
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
61
|
-
style: [styles.container, style]
|
|
62
|
-
|
|
59
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
60
|
+
style: [styles.container, style],
|
|
61
|
+
...rest
|
|
62
|
+
}, /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
63
63
|
pagingEnabled: true,
|
|
64
64
|
horizontal: true,
|
|
65
65
|
decelerationRate: "fast",
|
|
@@ -87,8 +87,8 @@ function Carousel(_ref2) {
|
|
|
87
87
|
}]
|
|
88
88
|
});
|
|
89
89
|
}) : null, React.Children.map(children, child => {
|
|
90
|
-
var
|
|
91
|
-
const s = (child === null || child === void 0 ? void 0 :
|
|
90
|
+
var _a;
|
|
91
|
+
const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
|
|
92
92
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
93
|
style: {
|
|
94
94
|
width: slideWidth
|
|
@@ -127,4 +127,26 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
var _default = (0, _theming.withTheme)(Carousel);
|
|
130
|
+
exports.default = _default;ate({
|
|
131
|
+
container: {
|
|
132
|
+
backgroundColor: "#eee"
|
|
133
|
+
},
|
|
134
|
+
pager: {
|
|
135
|
+
position: "absolute",
|
|
136
|
+
bottom: 12,
|
|
137
|
+
left: 0,
|
|
138
|
+
right: 0,
|
|
139
|
+
flexDirection: "row",
|
|
140
|
+
justifyContent: "center",
|
|
141
|
+
alignItems: "center"
|
|
142
|
+
},
|
|
143
|
+
bullet: {
|
|
144
|
+
marginHorizontal: 2,
|
|
145
|
+
width: 10,
|
|
146
|
+
height: 10,
|
|
147
|
+
borderRadius: 20,
|
|
148
|
+
backgroundColor: "#000"
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
var _default = (0, _theming.withTheme)(Carousel);
|
|
130
152
|
exports.default = _default;
|
|
@@ -7,7 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _theming = require("../../theming");
|
|
10
|
+
var _Touchable = _interopRequireDefault(require("../Touchable"));
|
|
10
11
|
var _hooks = require("../../hooks");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
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); }
|
|
12
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; }
|
|
13
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); }
|
|
@@ -58,7 +60,7 @@ const Checkbox = _ref => {
|
|
|
58
60
|
onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
|
-
return /*#__PURE__*/React.createElement(
|
|
63
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
62
64
|
onPress: handlePress,
|
|
63
65
|
disabled: disabled,
|
|
64
66
|
accessibilityState: {
|
|
@@ -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]
|
|
@@ -15,8 +15,7 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
|
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
|
-
|
|
19
|
-
let Direction;
|
|
18
|
+
var Direction;
|
|
20
19
|
exports.Direction = Direction;
|
|
21
20
|
(function (Direction) {
|
|
22
21
|
Direction["Row"] = "row";
|
|
@@ -59,7 +58,6 @@ const CheckboxRow = _ref => {
|
|
|
59
58
|
setInternalValue(status);
|
|
60
59
|
}
|
|
61
60
|
}, [status]);
|
|
62
|
-
|
|
63
61
|
// This special logic is to handle weird APIs like Airtable that return
|
|
64
62
|
// true or undefined for a boolean
|
|
65
63
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -83,13 +81,14 @@ const CheckboxRow = _ref => {
|
|
|
83
81
|
textStyles,
|
|
84
82
|
viewStyles
|
|
85
83
|
} = (0, _utilities.extractStyles)(style);
|
|
86
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
84
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
87
85
|
onPress: handlePress,
|
|
88
86
|
style: [viewStyles, styles.mainParent, {
|
|
89
87
|
flexDirection: direction
|
|
90
88
|
}],
|
|
91
|
-
disabled: disabled
|
|
92
|
-
|
|
89
|
+
disabled: disabled,
|
|
90
|
+
...rest
|
|
91
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
92
|
style: [styles.label, {
|
|
94
93
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
95
94
|
}, labelContainerStyle]
|
|
@@ -126,4 +125,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
126
125
|
}
|
|
127
126
|
});
|
|
128
127
|
var _default = CheckboxRow;
|
|
128
|
+
exports.default = _default;ems: "center",
|
|
129
|
+
justifyContent: "space-around",
|
|
130
|
+
paddingStart: 20,
|
|
131
|
+
minHeight: 50,
|
|
132
|
+
paddingEnd: 20,
|
|
133
|
+
display: "flex",
|
|
134
|
+
..._reactNative.Platform.select({
|
|
135
|
+
web: {
|
|
136
|
+
cursor: "pointer",
|
|
137
|
+
userSelect: "none"
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
},
|
|
141
|
+
label: {
|
|
142
|
+
flex: 3
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
var _default = CheckboxRow;
|
|
129
146
|
exports.default = _default;
|
|
@@ -10,7 +10,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
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); }
|
|
14
13
|
const CircleImage = _ref => {
|
|
15
14
|
let {
|
|
16
15
|
source = _Config.default.placeholderImageURL,
|
|
@@ -19,6 +18,21 @@ const CircleImage = _ref => {
|
|
|
19
18
|
...props
|
|
20
19
|
} = _ref;
|
|
21
20
|
const borderRadius = size / 2;
|
|
21
|
+
return /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
22
|
+
style: [{
|
|
23
|
+
width: size,
|
|
24
|
+
height: size,
|
|
25
|
+
borderRadius
|
|
26
|
+
}, style],
|
|
27
|
+
source: typeof source === "string" ? {
|
|
28
|
+
uri: source
|
|
29
|
+
} : source,
|
|
30
|
+
resizeMode: "cover",
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var _default = CircleImage;
|
|
35
|
+
exports.default = _default;size / 2;
|
|
22
36
|
return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
|
|
23
37
|
style: [{
|
|
24
38
|
width: size,
|
|
@@ -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;
|
|
@@ -48,6 +48,8 @@ const DatePicker = _ref => {
|
|
|
48
48
|
placeholder,
|
|
49
49
|
borderColor: inputBorderColor,
|
|
50
50
|
borderColorActive: inputBorderColorActive,
|
|
51
|
+
pickerAccentColor,
|
|
52
|
+
pickerTextColor,
|
|
51
53
|
...props
|
|
52
54
|
} = _ref;
|
|
53
55
|
const [value, setValue] = React.useState(date || defaultValue);
|
|
@@ -350,6 +352,8 @@ const DatePicker = _ref => {
|
|
|
350
352
|
paddingRight: insets.right
|
|
351
353
|
}]
|
|
352
354
|
}, /*#__PURE__*/React.createElement(_DatePickerComponent.default, {
|
|
355
|
+
accentColor: pickerAccentColor,
|
|
356
|
+
textColor: pickerTextColor,
|
|
353
357
|
value: getValidDate(),
|
|
354
358
|
mode: mode,
|
|
355
359
|
isVisible: pickerVisible,
|
|
@@ -13,12 +13,16 @@ const DatePickerComponent = _ref => {
|
|
|
13
13
|
let {
|
|
14
14
|
value,
|
|
15
15
|
onChange,
|
|
16
|
+
textColor,
|
|
17
|
+
accentColor,
|
|
16
18
|
mode,
|
|
17
19
|
toggleVisibility
|
|
18
20
|
} = _ref;
|
|
19
21
|
return _reactNative.Platform.OS === "ios" || _reactNative.Platform.OS === "android" ? /*#__PURE__*/_react.default.createElement(_reactNativeModalDatetimePicker.default, {
|
|
20
22
|
date: value,
|
|
21
23
|
mode: mode,
|
|
24
|
+
textColor: textColor,
|
|
25
|
+
accentColor: accentColor,
|
|
22
26
|
isVisible: true,
|
|
23
27
|
display: _reactNative.Platform.OS === "ios" ? "spinner" : "default",
|
|
24
28
|
onCancel: () => {
|
|
@@ -31,6 +35,8 @@ const DatePickerComponent = _ref => {
|
|
|
31
35
|
}) : /*#__PURE__*/_react.default.createElement(_datetimepicker.default, {
|
|
32
36
|
value: value,
|
|
33
37
|
mode: mode,
|
|
38
|
+
textColor: textColor,
|
|
39
|
+
accentColor: accentColor,
|
|
34
40
|
onChange: onChange,
|
|
35
41
|
display: "default"
|
|
36
42
|
});
|