@draftbit/core 46.8.2-0a0db3.2 → 46.8.2-387722.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/Accordion/AccordionItem.js +4 -23
- package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
- package/lib/commonjs/components/AspectRatio.js +1 -17
- package/lib/commonjs/components/Banner.js +4 -23
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -23
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/CircleImage.js +1 -15
- package/lib/commonjs/components/CircularProgress.js +8 -26
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
- package/lib/commonjs/components/DeprecatedFAB.js +3 -21
- package/lib/commonjs/components/Divider.js +1 -14
- package/lib/commonjs/components/Elevation.js +2 -14
- package/lib/commonjs/components/FormRow.js +2 -16
- package/lib/commonjs/components/IconButton.js +4 -19
- package/lib/commonjs/components/Image.js +2 -17
- package/lib/commonjs/components/Layout.js +19 -40
- package/lib/commonjs/components/Markdown.js +30 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js +3 -20
- package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
- package/lib/commonjs/components/Portal/PortalHost.js +15 -44
- package/lib/commonjs/components/Portal/PortalManager.js +8 -34
- package/lib/commonjs/components/Pressable.js +2 -15
- package/lib/commonjs/components/ProgressBar.js +7 -37
- 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/StarRating.js +4 -23
- package/lib/commonjs/components/StepIndicator.js +18 -57
- package/lib/commonjs/components/Surface.js +2 -14
- package/lib/commonjs/components/Switch.js +10 -19
- package/lib/commonjs/components/Text.js +4 -50
- package/lib/commonjs/components/TextField.js +28 -76
- package/lib/commonjs/components/Touchable.js +2 -15
- package/lib/commonjs/index.js +7 -13
- package/lib/commonjs/mappings/FlashList.js +2 -8
- package/lib/commonjs/mappings/Markdown.js +27 -0
- package/lib/module/components/AspectRatio.js +18 -1
- package/lib/module/components/Markdown.js +20 -0
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/FlashList.js +3 -9
- package/lib/module/mappings/Markdown.js +20 -0
- package/lib/typescript/src/components/Markdown.d.ts +8 -0
- package/lib/typescript/src/components/Markdown.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +0 -6
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/{TabViewItem.d.ts → Markdown.d.ts} +5 -10
- package/lib/typescript/src/mappings/Markdown.d.ts.map +1 -0
- package/package.json +4 -5
- package/src/components/Markdown.js +10 -0
- package/src/components/Markdown.tsx +22 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/src/mappings/FlashList.js +9 -9
- package/src/mappings/FlashList.ts +9 -9
- package/src/mappings/Markdown.js +25 -0
- package/src/mappings/Markdown.ts +32 -0
- package/lib/commonjs/components/TabView/TabView.js +0 -132
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -25
- package/lib/commonjs/components/TabView/index.js +0 -20
- package/lib/commonjs/mappings/TabView.js +0 -77
- package/lib/commonjs/mappings/TabViewItem.js +0 -37
- package/lib/module/components/TabView/TabView.js +0 -113
- package/lib/module/components/TabView/TabViewItem.js +0 -20
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/module/mappings/TabViewItem.js +0 -30
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -26
- package/lib/typescript/src/components/TabView/TabView.d.ts.map +0 -1
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -11
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +0 -1
- package/lib/typescript/src/components/TabView/index.d.ts +0 -3
- package/lib/typescript/src/components/TabView/index.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TabView.d.ts +0 -126
- package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TabViewItem.d.ts.map +0 -1
- package/src/components/TabView/TabView.js +0 -58
- package/src/components/TabView/TabView.tsx +0 -151
- package/src/components/TabView/TabViewItem.js +0 -11
- package/src/components/TabView/TabViewItem.tsx +0 -25
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.tsx +0 -2
- package/src/mappings/TabView.js +0 -76
- package/src/mappings/TabView.ts +0 -86
- package/src/mappings/TabViewItem.js +0 -30
- package/src/mappings/TabViewItem.ts +0 -38
|
@@ -14,7 +14,8 @@ var _utilities = require("../../utilities");
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
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
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
|
-
var
|
|
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
|
+
let Direction;
|
|
18
19
|
exports.Direction = Direction;
|
|
19
20
|
(function (Direction) {
|
|
20
21
|
Direction["Row"] = "row";
|
|
@@ -71,14 +72,13 @@ const RadioButtonRow = _ref => {
|
|
|
71
72
|
textStyles,
|
|
72
73
|
viewStyles
|
|
73
74
|
} = (0, _utilities.extractStyles)(style);
|
|
74
|
-
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
75
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, _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]
|
|
@@ -116,22 +116,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
118
|
var _default = RadioButtonRow;
|
|
119
|
-
exports.default = _default; "center",
|
|
120
|
-
justifyContent: "space-around",
|
|
121
|
-
paddingStart: 20,
|
|
122
|
-
minHeight: 50,
|
|
123
|
-
paddingEnd: 20,
|
|
124
|
-
display: "flex",
|
|
125
|
-
..._reactNative.Platform.select({
|
|
126
|
-
web: {
|
|
127
|
-
cursor: "pointer",
|
|
128
|
-
userSelect: "none"
|
|
129
|
-
}
|
|
130
|
-
})
|
|
131
|
-
},
|
|
132
|
-
label: {
|
|
133
|
-
flex: 3
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
var _default = RadioButtonRow;
|
|
137
119
|
exports.default = _default;
|
|
@@ -10,7 +10,9 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
|
10
10
|
var _theming = require("../theming");
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
14
|
function ScreenContainer(_ref) {
|
|
15
|
+
var _StyleSheet$flatten;
|
|
14
16
|
let {
|
|
15
17
|
scrollable = false,
|
|
16
18
|
hasSafeArea = false,
|
|
@@ -21,8 +23,7 @@ function ScreenContainer(_ref) {
|
|
|
21
23
|
children,
|
|
22
24
|
...rest
|
|
23
25
|
} = _ref;
|
|
24
|
-
|
|
25
|
-
const backgroundColor = ((_a = _reactNative.StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background;
|
|
26
|
+
const backgroundColor = ((_StyleSheet$flatten = _reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.backgroundColor) || theme.colors.background;
|
|
26
27
|
const edges = ["left", "right"];
|
|
27
28
|
if (hasSafeArea || hasTopSafeArea) {
|
|
28
29
|
edges.push("top");
|
|
@@ -30,13 +31,12 @@ function ScreenContainer(_ref) {
|
|
|
30
31
|
if (hasSafeArea || hasBottomSafeArea) {
|
|
31
32
|
edges.push("bottom");
|
|
32
33
|
}
|
|
33
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
34
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, _extends({
|
|
34
35
|
edges: edges,
|
|
35
36
|
style: [styles.container, {
|
|
36
37
|
backgroundColor
|
|
37
|
-
}]
|
|
38
|
-
|
|
39
|
-
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
38
|
+
}]
|
|
39
|
+
}, rest), scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
40
40
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
41
41
|
backgroundColor
|
|
42
42
|
}, style]
|
|
@@ -56,22 +56,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
59
|
-
exports.default = _default;olor
|
|
60
|
-
}, style]
|
|
61
|
-
}, children) : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
62
|
-
style: [styles.container, {
|
|
63
|
-
backgroundColor
|
|
64
|
-
}, style]
|
|
65
|
-
}, children));
|
|
66
|
-
}
|
|
67
|
-
const styles = _reactNative.StyleSheet.create({
|
|
68
|
-
container: {
|
|
69
|
-
flex: 1
|
|
70
|
-
},
|
|
71
|
-
scrollViewContainer: {
|
|
72
|
-
flexGrow: 1,
|
|
73
|
-
flex: undefined
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
77
59
|
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 StarRating = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
Icon,
|
|
@@ -39,10 +40,9 @@ const StarRating = _ref => {
|
|
|
39
40
|
!!onPress && onPress(r);
|
|
40
41
|
}, [onPress]);
|
|
41
42
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
42
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
|
-
style: [styles.container, style]
|
|
44
|
-
|
|
45
|
-
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
44
|
+
style: [styles.container, style]
|
|
45
|
+
}, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
46
46
|
key: i,
|
|
47
47
|
style: {
|
|
48
48
|
display: "flex"
|
|
@@ -83,23 +83,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
var _default = (0, _theming.withTheme)(StarRating);
|
|
86
|
-
exports.default = _default;lignItems: "center"
|
|
87
|
-
},
|
|
88
|
-
touchContainer: {
|
|
89
|
-
display: "flex",
|
|
90
|
-
flexDirection: "row",
|
|
91
|
-
position: "absolute",
|
|
92
|
-
top: 0,
|
|
93
|
-
right: 0,
|
|
94
|
-
left: 0,
|
|
95
|
-
bottom: 0,
|
|
96
|
-
zIndex: 1
|
|
97
|
-
},
|
|
98
|
-
pressable: {
|
|
99
|
-
flex: 1,
|
|
100
|
-
height: "100%",
|
|
101
|
-
width: "50%"
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
var _default = (0, _theming.withTheme)(StarRating);
|
|
105
86
|
exports.default = _default;
|
|
@@ -8,8 +8,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
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); }
|
|
10
10
|
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; }
|
|
11
|
-
|
|
12
|
-
|
|
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); }
|
|
13
14
|
const STEP_STATUS = {
|
|
14
15
|
CURRENT: "current",
|
|
15
16
|
FINISHED: "finished",
|
|
@@ -18,7 +19,7 @@ const STEP_STATUS = {
|
|
|
18
19
|
class StepIndicator extends _react.Component {
|
|
19
20
|
constructor(props) {
|
|
20
21
|
super(props);
|
|
21
|
-
this
|
|
22
|
+
_defineProperty(this, "renderProgressBarBackground", () => {
|
|
22
23
|
const {
|
|
23
24
|
stepCount,
|
|
24
25
|
direction
|
|
@@ -61,8 +62,8 @@ class StepIndicator extends _react.Component {
|
|
|
61
62
|
},
|
|
62
63
|
style: progressBarBackgroundStyle
|
|
63
64
|
});
|
|
64
|
-
};
|
|
65
|
-
this
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "renderProgressBar", () => {
|
|
66
67
|
const {
|
|
67
68
|
stepCount,
|
|
68
69
|
direction
|
|
@@ -92,8 +93,8 @@ class StepIndicator extends _react.Component {
|
|
|
92
93
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
93
94
|
style: progressBarStyle
|
|
94
95
|
});
|
|
95
|
-
};
|
|
96
|
-
this
|
|
96
|
+
});
|
|
97
|
+
_defineProperty(this, "renderStepIndicator", () => {
|
|
97
98
|
let steps = [];
|
|
98
99
|
const {
|
|
99
100
|
stepCount,
|
|
@@ -124,8 +125,8 @@ class StepIndicator extends _react.Component {
|
|
|
124
125
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
125
126
|
}]
|
|
126
127
|
}, steps);
|
|
127
|
-
};
|
|
128
|
-
this
|
|
128
|
+
});
|
|
129
|
+
_defineProperty(this, "renderStepLabels", () => {
|
|
129
130
|
const {
|
|
130
131
|
labels,
|
|
131
132
|
direction,
|
|
@@ -167,8 +168,8 @@ class StepIndicator extends _react.Component {
|
|
|
167
168
|
alignItems: this.state.customStyles.labelAlign
|
|
168
169
|
}]
|
|
169
170
|
}, labelViews);
|
|
170
|
-
};
|
|
171
|
-
this
|
|
171
|
+
});
|
|
172
|
+
_defineProperty(this, "renderStep", position => {
|
|
172
173
|
const {
|
|
173
174
|
renderStepIndicator
|
|
174
175
|
} = this.props;
|
|
@@ -235,8 +236,8 @@ class StepIndicator extends _react.Component {
|
|
|
235
236
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
236
237
|
style: indicatorLabelStyle
|
|
237
238
|
}, "".concat(position + 1)));
|
|
238
|
-
};
|
|
239
|
-
this
|
|
239
|
+
});
|
|
240
|
+
_defineProperty(this, "getStepStatus", stepPosition => {
|
|
240
241
|
const {
|
|
241
242
|
currentPosition
|
|
242
243
|
} = this.props;
|
|
@@ -247,8 +248,8 @@ class StepIndicator extends _react.Component {
|
|
|
247
248
|
} else {
|
|
248
249
|
return STEP_STATUS.UNFINISHED;
|
|
249
250
|
}
|
|
250
|
-
};
|
|
251
|
-
this
|
|
251
|
+
});
|
|
252
|
+
_defineProperty(this, "onCurrentPositionChanged", position => {
|
|
252
253
|
let {
|
|
253
254
|
stepCount
|
|
254
255
|
} = this.props;
|
|
@@ -268,7 +269,7 @@ class StepIndicator extends _react.Component {
|
|
|
268
269
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
269
270
|
duration: 100
|
|
270
271
|
})])]).start();
|
|
271
|
-
};
|
|
272
|
+
});
|
|
272
273
|
const defaultStyles = {
|
|
273
274
|
stepIndicatorSize: 30,
|
|
274
275
|
currentStepIndicatorSize: 40,
|
|
@@ -334,6 +335,7 @@ class StepIndicator extends _react.Component {
|
|
|
334
335
|
// ),
|
|
335
336
|
// }));
|
|
336
337
|
// }
|
|
338
|
+
|
|
337
339
|
if (prevProps.currentPosition !== this.props.currentPosition) {
|
|
338
340
|
this.onCurrentPositionChanged(this.props.currentPosition);
|
|
339
341
|
}
|
|
@@ -375,47 +377,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
375
377
|
justifyContent: "center"
|
|
376
378
|
}
|
|
377
379
|
});
|
|
378
|
-
StepIndicator.defaultProps = {
|
|
379
|
-
currentPosition: 0,
|
|
380
|
-
stepCount: 5,
|
|
381
|
-
customStyles: {},
|
|
382
|
-
direction: "horizontal"
|
|
383
|
-
};exports.default = StepIndicator;
|
|
384
|
-
const styles = _reactNative.StyleSheet.create({
|
|
385
|
-
container: {
|
|
386
|
-
backgroundColor: "transparent"
|
|
387
|
-
},
|
|
388
|
-
stepIndicatorContainer: {
|
|
389
|
-
flexDirection: "row",
|
|
390
|
-
alignItems: "center",
|
|
391
|
-
justifyContent: "space-around",
|
|
392
|
-
backgroundColor: "transparent"
|
|
393
|
-
},
|
|
394
|
-
stepLabelsContainer: {
|
|
395
|
-
justifyContent: "space-around"
|
|
396
|
-
},
|
|
397
|
-
step: {
|
|
398
|
-
alignItems: "center",
|
|
399
|
-
justifyContent: "center",
|
|
400
|
-
zIndex: 2
|
|
401
|
-
},
|
|
402
|
-
stepContainer: {
|
|
403
|
-
flex: 1,
|
|
404
|
-
flexDirection: "row",
|
|
405
|
-
alignItems: "center",
|
|
406
|
-
justifyContent: "center"
|
|
407
|
-
},
|
|
408
|
-
stepLabel: {
|
|
409
|
-
fontSize: 12,
|
|
410
|
-
textAlign: "center",
|
|
411
|
-
fontWeight: "500"
|
|
412
|
-
},
|
|
413
|
-
stepLabelItem: {
|
|
414
|
-
flex: 1,
|
|
415
|
-
alignItems: "center",
|
|
416
|
-
justifyContent: "center"
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
380
|
StepIndicator.defaultProps = {
|
|
420
381
|
currentPosition: 0,
|
|
421
382
|
stepCount: 5,
|
|
@@ -12,8 +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
|
-
|
|
16
|
-
|
|
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); }
|
|
17
16
|
const Surface = _ref => {
|
|
18
17
|
let {
|
|
19
18
|
elevation: propElevation,
|
|
@@ -43,18 +42,7 @@ const Surface = _ref => {
|
|
|
43
42
|
return colors.surface;
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
47
|
-
...rest,
|
|
48
|
-
style: [{
|
|
49
|
-
backgroundColor: getBackgroundColor(),
|
|
50
|
-
elevation,
|
|
51
|
-
...evalationStyles,
|
|
52
|
-
...restStyle
|
|
53
|
-
}]
|
|
54
|
-
}, children);
|
|
55
|
-
};
|
|
56
|
-
var _default = (0, _theming.withTheme)(Surface);
|
|
57
|
-
exports.default = _default;xtends({}, rest, {
|
|
45
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
|
|
58
46
|
style: [{
|
|
59
47
|
backgroundColor: getBackgroundColor(),
|
|
60
48
|
elevation,
|
|
@@ -13,6 +13,7 @@ var _hooks = require("../hooks");
|
|
|
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
|
function Switch(_ref) {
|
|
17
18
|
let {
|
|
18
19
|
value,
|
|
@@ -37,6 +38,7 @@ function Switch(_ref) {
|
|
|
37
38
|
setChecked(value);
|
|
38
39
|
}
|
|
39
40
|
}, [value, checked]);
|
|
41
|
+
|
|
40
42
|
// This special logic is to handle weird APIs like Airtable that return
|
|
41
43
|
// true or undefined for a boolean
|
|
42
44
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -45,24 +47,24 @@ function Switch(_ref) {
|
|
|
45
47
|
setChecked(Boolean(defaultValue));
|
|
46
48
|
}
|
|
47
49
|
}, [defaultValue, previousDefaultValue]);
|
|
48
|
-
return /*#__PURE__*/React.createElement(_reactNative.Switch, {
|
|
50
|
+
return /*#__PURE__*/React.createElement(_reactNative.Switch, _extends({
|
|
49
51
|
value: checked,
|
|
50
52
|
disabled: disabled,
|
|
51
53
|
trackColor: {
|
|
52
54
|
false: inactiveTrackThemeColor,
|
|
53
55
|
true: activeTrackThemeColor
|
|
54
56
|
},
|
|
55
|
-
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
57
|
+
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
56
58
|
// @ts-ignore react-native-web only
|
|
59
|
+
,
|
|
57
60
|
activeThumbColor: activeThumbThemeColor,
|
|
58
61
|
ios_backgroundColor: inactiveTrackThemeColor,
|
|
59
62
|
style: style,
|
|
60
63
|
onValueChange: bool => {
|
|
61
64
|
setChecked(bool);
|
|
62
65
|
onValueChange && onValueChange(bool);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
+
}
|
|
67
|
+
}, rest));
|
|
66
68
|
}
|
|
67
69
|
function Row(_ref2) {
|
|
68
70
|
let {
|
|
@@ -91,7 +93,7 @@ function Row(_ref2) {
|
|
|
91
93
|
setChecked(defaultValue);
|
|
92
94
|
}
|
|
93
95
|
}, [defaultValue]);
|
|
94
|
-
return /*#__PURE__*/React.createElement(_FormRow.default, {
|
|
96
|
+
return /*#__PURE__*/React.createElement(_FormRow.default, _extends({
|
|
95
97
|
disabled: disabled,
|
|
96
98
|
onPress: () => {
|
|
97
99
|
setChecked(!checked);
|
|
@@ -99,9 +101,8 @@ function Row(_ref2) {
|
|
|
99
101
|
},
|
|
100
102
|
label: label,
|
|
101
103
|
direction: direction,
|
|
102
|
-
style: style
|
|
103
|
-
|
|
104
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
104
|
+
style: style
|
|
105
|
+
}, rest), /*#__PURE__*/React.createElement(Switch, {
|
|
105
106
|
theme: theme,
|
|
106
107
|
value: checked,
|
|
107
108
|
disabled: disabled,
|
|
@@ -115,14 +116,4 @@ function Row(_ref2) {
|
|
|
115
116
|
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
116
117
|
exports.SwitchRow = SwitchRow;
|
|
117
118
|
var _default = (0, _theming.withTheme)(Switch);
|
|
118
|
-
exports.default = _default;hange: onValueChange,
|
|
119
|
-
activeTrackColor: activeTrackColor,
|
|
120
|
-
inactiveTrackColor: inactiveTrackColor,
|
|
121
|
-
activeThumbColor: activeThumbColor,
|
|
122
|
-
inactiveThumbColor: inactiveThumbColor
|
|
123
|
-
}));
|
|
124
|
-
}
|
|
125
|
-
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
126
|
-
exports.SwitchRow = SwitchRow;
|
|
127
|
-
var _default = (0, _theming.withTheme)(Switch);
|
|
128
119
|
exports.default = _default;
|
|
@@ -9,56 +9,10 @@ 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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
nativeProps: {}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
setNativeProps(args) {
|
|
20
|
-
this.state.nativeProps = args || {};
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const {
|
|
24
|
-
style,
|
|
25
|
-
...rest
|
|
26
|
-
} = this.props;
|
|
27
|
-
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
28
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
29
|
-
...rest,
|
|
30
|
-
...this.state.nativeProps,
|
|
31
|
-
ref: c => {
|
|
32
|
-
this._root = c;
|
|
33
|
-
},
|
|
34
|
-
style: [{
|
|
35
|
-
textAlign: "left",
|
|
36
|
-
writingDirection
|
|
37
|
-
}, style]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const BaseLink = _ref => {
|
|
42
|
-
let {
|
|
43
|
-
style,
|
|
44
|
-
theme,
|
|
45
|
-
title,
|
|
46
|
-
...props
|
|
47
|
-
} = _ref;
|
|
48
|
-
return /*#__PURE__*/React.createElement(Text, {
|
|
49
|
-
hitSlop: 8,
|
|
50
|
-
style: [{
|
|
51
|
-
color: theme.colors.primary
|
|
52
|
-
}, style],
|
|
53
|
-
theme: theme,
|
|
54
|
-
...props
|
|
55
|
-
}, title);
|
|
56
|
-
};
|
|
57
|
-
exports.BaseLink = BaseLink;
|
|
58
|
-
const Link = (0, _theming.withTheme)(BaseLink);
|
|
59
|
-
exports.Link = Link;
|
|
60
|
-
var _default = (0, _theming.withTheme)(Text);
|
|
61
|
-
exports.default = _default;tring : Number)(input); }
|
|
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
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
62
16
|
class Text extends React.Component {
|
|
63
17
|
constructor() {
|
|
64
18
|
super(...arguments);
|