@draftbit/core 46.2.4-a3d00e.4 → 46.2.4-a3e5f4.10
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/Config.js +1 -1
- package/lib/commonjs/components/Markdown.js +33 -0
- package/lib/commonjs/components/Picker/PickerComponent.android.js +24 -5
- package/lib/commonjs/components/SVG.js +4 -5
- package/lib/commonjs/components/ScreenContainer.js +23 -5
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/StepIndicator.js +34 -16
- package/lib/commonjs/components/Surface.js +14 -3
- package/lib/commonjs/components/Switch.js +23 -10
- package/lib/commonjs/components/Text.js +37 -11
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/components/Touchable.js +16 -2
- package/lib/commonjs/index.js +8 -14
- package/lib/commonjs/mappings/MapView.js +1 -0
- package/lib/commonjs/mappings/Markdown.js +23 -0
- package/lib/commonjs/mappings/SVG.js +2 -1
- package/lib/module/components/CircularProgress.js +15 -7
- package/lib/module/components/Config.js +1 -1
- package/lib/module/components/FormRow.js +17 -3
- package/lib/module/components/Markdown.js +18 -0
- package/lib/module/components/Picker/PickerComponent.android.js +23 -5
- package/lib/module/components/ProgressBar.js +23 -7
- package/lib/module/components/SVG.js +4 -5
- package/lib/module/components/StepIndicator.js +33 -16
- package/lib/module/constants.js +1 -0
- package/lib/module/index.js +2 -2
- package/lib/module/mappings/MapView.js +1 -0
- package/lib/module/mappings/Markdown.js +14 -0
- package/lib/module/mappings/SVG.js +3 -2
- package/lib/typescript/src/components/Markdown.d.ts +6 -0
- package/lib/typescript/src/components/SVG.d.ts +2 -2
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/lib/typescript/src/mappings/Markdown.d.ts +9 -0
- package/lib/typescript/src/mappings/SVG.d.ts +1 -0
- package/package.json +6 -6
- package/src/components/Config.js +1 -1
- package/src/components/Config.ts +1 -1
- package/src/components/Markdown.js +12 -0
- package/src/components/Markdown.tsx +25 -0
- package/src/components/SVG.js +4 -5
- package/src/components/SVG.tsx +7 -7
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/src/mappings/MapView.js +1 -0
- package/src/mappings/MapView.ts +1 -0
- package/src/mappings/Markdown.js +14 -0
- package/src/mappings/Markdown.ts +15 -0
- package/src/mappings/SVG.js +8 -2
- package/src/mappings/SVG.ts +12 -2
- package/lib/commonjs/components/TabView/TabView.js +0 -102
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
- package/lib/commonjs/components/TabView/index.js +0 -23
- package/lib/commonjs/mappings/TabView.js +0 -79
- package/lib/module/components/TabView/TabView.js +0 -87
- package/lib/module/components/TabView/TabViewItem.js +0 -18
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
- package/lib/typescript/src/components/TabView/index.d.ts +0 -2
- package/lib/typescript/src/mappings/TabView.d.ts +0 -111
- package/src/components/TabView/TabView.js +0 -34
- package/src/components/TabView/TabView.tsx +0 -97
- package/src/components/TabView/TabViewItem.js +0 -5
- package/src/components/TabView/TabViewItem.tsx +0 -21
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.ts +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -62,7 +62,7 @@ var _default = {
|
|
|
62
62
|
width: size.width,
|
|
63
63
|
height: size.height
|
|
64
64
|
}, "image-placeholder_1"),
|
|
65
|
-
placeholderSvgURL: "https://static.draftbit.com/images/placeholder-
|
|
65
|
+
placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
|
|
66
66
|
squareImageUrl: buildImageUrl({
|
|
67
67
|
width: 100,
|
|
68
68
|
height: 100
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNativeMarkdownPackage = _interopRequireDefault(require("react-native-markdown-package"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
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
|
+
|
|
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
|
+
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
const MarkdownComponent = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
content
|
|
22
|
+
} = _ref;
|
|
23
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNativeMarkdownPackage.default, {
|
|
24
|
+
styles: markdownStyle
|
|
25
|
+
}, content));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const markdownStyle = {
|
|
29
|
+
singleLineMd: {},
|
|
30
|
+
collectiveMd: {}
|
|
31
|
+
};
|
|
32
|
+
var _default = MarkdownComponent;
|
|
33
|
+
exports.default = _default;
|
|
@@ -27,11 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
30
|
const Picker = _ref => {
|
|
33
|
-
var _options$find$label, _options$find;
|
|
34
|
-
|
|
35
31
|
let {
|
|
36
32
|
style,
|
|
37
33
|
options,
|
|
@@ -41,6 +37,9 @@ const Picker = _ref => {
|
|
|
41
37
|
onValueChange: onValueChangeOverride = () => {},
|
|
42
38
|
...props
|
|
43
39
|
} = _ref;
|
|
40
|
+
|
|
41
|
+
var _a, _b;
|
|
42
|
+
|
|
44
43
|
const {
|
|
45
44
|
viewStyles: {
|
|
46
45
|
borderRadius,
|
|
@@ -87,7 +86,7 @@ const Picker = _ref => {
|
|
|
87
86
|
};
|
|
88
87
|
|
|
89
88
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
90
|
-
const selectedLabel = selectedValue && ((
|
|
89
|
+
const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
|
|
91
90
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
92
91
|
disabled: disabled,
|
|
93
92
|
onPress: toggleFocus,
|
|
@@ -111,6 +110,26 @@ const Picker = _ref => {
|
|
|
111
110
|
key: o.value
|
|
112
111
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
113
112
|
pointerEvents: "none"
|
|
113
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
|
|
114
|
+
value: selectedLabel,
|
|
115
|
+
placeholder: placeholder,
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
ref: textField,
|
|
118
|
+
disabled: disabled,
|
|
119
|
+
// @ts-expect-error
|
|
120
|
+
style: stylesWithoutMargin
|
|
121
|
+
}))));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const styles = _reactNative.StyleSheet.create({
|
|
125
|
+
container: {
|
|
126
|
+
alignSelf: "stretch"
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
131
|
+
|
|
132
|
+
exports.default = _default; pointerEvents: "none"
|
|
114
133
|
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
115
134
|
value: selectedLabel,
|
|
116
135
|
placeholder: placeholder // @ts-ignore
|
|
@@ -21,26 +21,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
21
21
|
|
|
22
22
|
const SVG = _ref => {
|
|
23
23
|
let {
|
|
24
|
-
source,
|
|
24
|
+
source = _Config.default.placeholderSvgURL,
|
|
25
25
|
style
|
|
26
26
|
} = _ref;
|
|
27
|
-
let svgSource = source === null || source === undefined ? _Config.default.placeholderSvgURL : source;
|
|
28
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
29
28
|
style: style
|
|
30
29
|
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
31
30
|
width: "100%",
|
|
32
31
|
height: "100%",
|
|
33
|
-
uri:
|
|
32
|
+
uri: source
|
|
34
33
|
})), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
35
34
|
style: style
|
|
36
35
|
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
37
36
|
width: "100%",
|
|
38
37
|
height: "100%",
|
|
39
|
-
uri:
|
|
38
|
+
uri: source
|
|
40
39
|
})), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
41
40
|
style: style,
|
|
42
41
|
source: {
|
|
43
|
-
uri:
|
|
42
|
+
uri: source
|
|
44
43
|
}
|
|
45
44
|
}));
|
|
46
45
|
};
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
20
|
function ScreenContainer(_ref) {
|
|
23
21
|
let {
|
|
24
22
|
scrollable = false,
|
|
@@ -41,12 +39,13 @@ function ScreenContainer(_ref) {
|
|
|
41
39
|
edges.push("bottom");
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView,
|
|
42
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
45
43
|
edges: edges,
|
|
46
44
|
style: [styles.container, {
|
|
47
45
|
backgroundColor
|
|
48
|
-
}]
|
|
49
|
-
|
|
46
|
+
}],
|
|
47
|
+
...rest
|
|
48
|
+
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
50
49
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
51
50
|
backgroundColor
|
|
52
51
|
}, style]
|
|
@@ -69,4 +68,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
69
68
|
|
|
70
69
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
71
70
|
|
|
71
|
+
exports.default = _default;reactNative.View, {
|
|
72
|
+
style: [styles.container, {
|
|
73
|
+
backgroundColor
|
|
74
|
+
}, style]
|
|
75
|
+
}, children));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = _reactNative.StyleSheet.create({
|
|
79
|
+
container: {
|
|
80
|
+
flex: 1
|
|
81
|
+
},
|
|
82
|
+
scrollViewContainer: {
|
|
83
|
+
flexGrow: 1,
|
|
84
|
+
flex: undefined
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
89
|
+
|
|
72
90
|
exports.default = _default;
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
26
|
function maybeParseValue(value) {
|
|
29
27
|
if (value === undefined) {
|
|
30
28
|
return undefined;
|
|
@@ -91,9 +89,10 @@ function Slider(_ref) {
|
|
|
91
89
|
onValueChange(newValue);
|
|
92
90
|
};
|
|
93
91
|
|
|
94
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
95
|
-
style: [styles.container, style]
|
|
96
|
-
|
|
92
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
|
+
style: [styles.container, style],
|
|
94
|
+
...rest
|
|
95
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
97
96
|
color: leftIconThemeColor,
|
|
98
97
|
name: leftIcon,
|
|
99
98
|
size: 24
|
|
@@ -129,4 +128,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
129
128
|
|
|
130
129
|
var _default = (0, _theming.withTheme)(Slider);
|
|
131
130
|
|
|
131
|
+
exports.default = _default;: rightIconThemeColor,
|
|
132
|
+
name: rightIcon,
|
|
133
|
+
size: 24
|
|
134
|
+
}) : null);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const styles = _reactNative.StyleSheet.create({
|
|
138
|
+
container: {
|
|
139
|
+
height: 40,
|
|
140
|
+
flexDirection: "row",
|
|
141
|
+
alignItems: "center"
|
|
142
|
+
},
|
|
143
|
+
slider: {
|
|
144
|
+
flex: 1,
|
|
145
|
+
marginHorizontal: 12
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
var _default = (0, _theming.withTheme)(Slider);
|
|
150
|
+
|
|
132
151
|
exports.default = _default;
|
|
@@ -13,8 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
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
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
// @ts-nocheck
|
|
18
17
|
const STEP_STATUS = {
|
|
19
18
|
CURRENT: "current",
|
|
20
19
|
FINISHED: "finished",
|
|
@@ -25,7 +24,7 @@ class StepIndicator extends _react.Component {
|
|
|
25
24
|
constructor(props) {
|
|
26
25
|
super(props);
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
this.renderProgressBarBackground = () => {
|
|
29
28
|
const {
|
|
30
29
|
stepCount,
|
|
31
30
|
direction
|
|
@@ -70,9 +69,9 @@ class StepIndicator extends _react.Component {
|
|
|
70
69
|
},
|
|
71
70
|
style: progressBarBackgroundStyle
|
|
72
71
|
});
|
|
73
|
-
}
|
|
72
|
+
};
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
this.renderProgressBar = () => {
|
|
76
75
|
const {
|
|
77
76
|
stepCount,
|
|
78
77
|
direction
|
|
@@ -104,9 +103,9 @@ class StepIndicator extends _react.Component {
|
|
|
104
103
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
105
104
|
style: progressBarStyle
|
|
106
105
|
});
|
|
107
|
-
}
|
|
106
|
+
};
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
this.renderStepIndicator = () => {
|
|
110
109
|
let steps = [];
|
|
111
110
|
const {
|
|
112
111
|
stepCount,
|
|
@@ -139,9 +138,9 @@ class StepIndicator extends _react.Component {
|
|
|
139
138
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
140
139
|
}]
|
|
141
140
|
}, steps);
|
|
142
|
-
}
|
|
141
|
+
};
|
|
143
142
|
|
|
144
|
-
|
|
143
|
+
this.renderStepLabels = () => {
|
|
145
144
|
const {
|
|
146
145
|
labels,
|
|
147
146
|
direction,
|
|
@@ -183,9 +182,9 @@ class StepIndicator extends _react.Component {
|
|
|
183
182
|
alignItems: this.state.customStyles.labelAlign
|
|
184
183
|
}]
|
|
185
184
|
}, labelViews);
|
|
186
|
-
}
|
|
185
|
+
};
|
|
187
186
|
|
|
188
|
-
|
|
187
|
+
this.renderStep = position => {
|
|
189
188
|
const {
|
|
190
189
|
renderStepIndicator
|
|
191
190
|
} = this.props;
|
|
@@ -257,9 +256,9 @@ class StepIndicator extends _react.Component {
|
|
|
257
256
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
258
257
|
style: indicatorLabelStyle
|
|
259
258
|
}, "".concat(position + 1)));
|
|
260
|
-
}
|
|
259
|
+
};
|
|
261
260
|
|
|
262
|
-
|
|
261
|
+
this.getStepStatus = stepPosition => {
|
|
263
262
|
const {
|
|
264
263
|
currentPosition
|
|
265
264
|
} = this.props;
|
|
@@ -271,9 +270,9 @@ class StepIndicator extends _react.Component {
|
|
|
271
270
|
} else {
|
|
272
271
|
return STEP_STATUS.UNFINISHED;
|
|
273
272
|
}
|
|
274
|
-
}
|
|
273
|
+
};
|
|
275
274
|
|
|
276
|
-
|
|
275
|
+
this.onCurrentPositionChanged = position => {
|
|
277
276
|
let {
|
|
278
277
|
stepCount
|
|
279
278
|
} = this.props;
|
|
@@ -296,7 +295,7 @@ class StepIndicator extends _react.Component {
|
|
|
296
295
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
297
296
|
duration: 100
|
|
298
297
|
})])]).start();
|
|
299
|
-
}
|
|
298
|
+
};
|
|
300
299
|
|
|
301
300
|
const defaultStyles = {
|
|
302
301
|
stepIndicatorSize: 30,
|
|
@@ -411,6 +410,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
411
410
|
}
|
|
412
411
|
});
|
|
413
412
|
|
|
413
|
+
StepIndicator.defaultProps = {
|
|
414
|
+
currentPosition: 0,
|
|
415
|
+
stepCount: 5,
|
|
416
|
+
customStyles: {},
|
|
417
|
+
direction: "horizontal"
|
|
418
|
+
}; justifyContent: "center"
|
|
419
|
+
},
|
|
420
|
+
stepLabel: {
|
|
421
|
+
fontSize: 12,
|
|
422
|
+
textAlign: "center",
|
|
423
|
+
fontWeight: "500"
|
|
424
|
+
},
|
|
425
|
+
stepLabelItem: {
|
|
426
|
+
flex: 1,
|
|
427
|
+
alignItems: "center",
|
|
428
|
+
justifyContent: "center"
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
|
|
414
432
|
StepIndicator.defaultProps = {
|
|
415
433
|
currentPosition: 0,
|
|
416
434
|
stepCount: 5,
|
|
@@ -21,8 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
|
|
26
25
|
const Surface = _ref => {
|
|
27
26
|
let {
|
|
28
27
|
elevation: propElevation,
|
|
@@ -54,7 +53,19 @@ const Surface = _ref => {
|
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
55
|
|
|
57
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View,
|
|
56
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, { ...rest,
|
|
57
|
+
style: [{
|
|
58
|
+
backgroundColor: getBackgroundColor(),
|
|
59
|
+
elevation,
|
|
60
|
+
...evalationStyles,
|
|
61
|
+
...restStyle
|
|
62
|
+
}]
|
|
63
|
+
}, children);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var _default = (0, _theming.withTheme)(Surface);
|
|
67
|
+
|
|
68
|
+
exports.default = _default;, _extends({}, rest, {
|
|
58
69
|
style: [{
|
|
59
70
|
backgroundColor: getBackgroundColor(),
|
|
60
71
|
elevation,
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
26
|
function Switch(_ref) {
|
|
29
27
|
let {
|
|
30
28
|
value,
|
|
@@ -57,23 +55,24 @@ function Switch(_ref) {
|
|
|
57
55
|
setChecked(Boolean(defaultValue));
|
|
58
56
|
}
|
|
59
57
|
}, [defaultValue, previousDefaultValue]);
|
|
60
|
-
return /*#__PURE__*/React.createElement(_reactNative.Switch,
|
|
58
|
+
return /*#__PURE__*/React.createElement(_reactNative.Switch, {
|
|
61
59
|
value: checked,
|
|
62
60
|
disabled: disabled,
|
|
63
61
|
trackColor: {
|
|
64
62
|
false: inactiveTrackThemeColor,
|
|
65
63
|
true: activeTrackThemeColor
|
|
66
64
|
},
|
|
67
|
-
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
68
|
-
|
|
65
|
+
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
|
|
66
|
+
// @ts-ignore react-native-web only
|
|
69
67
|
activeThumbColor: activeThumbThemeColor,
|
|
70
68
|
ios_backgroundColor: inactiveTrackThemeColor,
|
|
71
69
|
style: style,
|
|
72
70
|
onValueChange: bool => {
|
|
73
71
|
setChecked(bool);
|
|
74
72
|
onValueChange && onValueChange(bool);
|
|
75
|
-
}
|
|
76
|
-
|
|
73
|
+
},
|
|
74
|
+
...rest
|
|
75
|
+
});
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
function Row(_ref2) {
|
|
@@ -103,7 +102,7 @@ function Row(_ref2) {
|
|
|
103
102
|
setChecked(defaultValue);
|
|
104
103
|
}
|
|
105
104
|
}, [defaultValue]);
|
|
106
|
-
return /*#__PURE__*/React.createElement(_FormRow.default,
|
|
105
|
+
return /*#__PURE__*/React.createElement(_FormRow.default, {
|
|
107
106
|
disabled: disabled,
|
|
108
107
|
onPress: () => {
|
|
109
108
|
setChecked(!checked);
|
|
@@ -111,8 +110,9 @@ function Row(_ref2) {
|
|
|
111
110
|
},
|
|
112
111
|
label: label,
|
|
113
112
|
direction: direction,
|
|
114
|
-
style: style
|
|
115
|
-
|
|
113
|
+
style: style,
|
|
114
|
+
...rest
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
116
116
|
theme: theme,
|
|
117
117
|
value: checked,
|
|
118
118
|
disabled: disabled,
|
|
@@ -129,4 +129,17 @@ exports.SwitchRow = SwitchRow;
|
|
|
129
129
|
|
|
130
130
|
var _default = (0, _theming.withTheme)(Switch);
|
|
131
131
|
|
|
132
|
+
exports.default = _default;onValueChange,
|
|
133
|
+
activeTrackColor: activeTrackColor,
|
|
134
|
+
inactiveTrackColor: inactiveTrackColor,
|
|
135
|
+
activeThumbColor: activeThumbColor,
|
|
136
|
+
inactiveThumbColor: inactiveThumbColor
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
141
|
+
exports.SwitchRow = SwitchRow;
|
|
142
|
+
|
|
143
|
+
var _default = (0, _theming.withTheme)(Switch);
|
|
144
|
+
|
|
132
145
|
exports.default = _default;
|
|
@@ -15,17 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
-
|
|
20
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
-
|
|
22
18
|
class Text extends React.Component {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_root", void 0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
19
|
setNativeProps(args) {
|
|
30
20
|
return this._root && this._root.setNativeProps(args);
|
|
31
21
|
}
|
|
@@ -36,7 +26,43 @@ class Text extends React.Component {
|
|
|
36
26
|
...rest
|
|
37
27
|
} = this.props;
|
|
38
28
|
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
39
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text,
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
|
|
30
|
+
ref: c => {
|
|
31
|
+
this._root = c;
|
|
32
|
+
},
|
|
33
|
+
style: [{
|
|
34
|
+
textAlign: "left",
|
|
35
|
+
writingDirection
|
|
36
|
+
}, style]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const BaseLink = _ref => {
|
|
43
|
+
let {
|
|
44
|
+
style,
|
|
45
|
+
theme,
|
|
46
|
+
title,
|
|
47
|
+
...props
|
|
48
|
+
} = _ref;
|
|
49
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
hitSlop: 8,
|
|
51
|
+
style: [{
|
|
52
|
+
color: theme.colors.primary
|
|
53
|
+
}, style],
|
|
54
|
+
theme: theme,
|
|
55
|
+
...props
|
|
56
|
+
}, title);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.BaseLink = BaseLink;
|
|
60
|
+
const Link = (0, _theming.withTheme)(BaseLink);
|
|
61
|
+
exports.Link = Link;
|
|
62
|
+
|
|
63
|
+
var _default = (0, _theming.withTheme)(Text);
|
|
64
|
+
|
|
65
|
+
exports.default = _default;/React.createElement(_reactNative.Text, _extends({}, rest, {
|
|
40
66
|
ref: c => {
|
|
41
67
|
this._root = c;
|
|
42
68
|
},
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
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); }
|
|
23
|
-
|
|
24
22
|
const ToggleButton = _ref => {
|
|
25
23
|
let {
|
|
26
24
|
Icon,
|
|
@@ -58,7 +56,7 @@ const ToggleButton = _ref => {
|
|
|
58
56
|
onPress(!internalValue);
|
|
59
57
|
};
|
|
60
58
|
|
|
61
|
-
return /*#__PURE__*/React.createElement(_IconButton.default,
|
|
59
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
62
60
|
Icon: Icon,
|
|
63
61
|
icon: icon,
|
|
64
62
|
size: iconSize,
|
|
@@ -70,6 +68,23 @@ const ToggleButton = _ref => {
|
|
|
70
68
|
height,
|
|
71
69
|
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
72
70
|
borderColor: colors[borderColor]
|
|
71
|
+
}, style],
|
|
72
|
+
...rest
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
mainContainer: {
|
|
78
|
+
borderWidth: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
var _default = (0, _theming.withTheme)(ToggleButton);
|
|
83
|
+
|
|
84
|
+
exports.default = _default;th,
|
|
85
|
+
height,
|
|
86
|
+
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
87
|
+
borderColor: colors[borderColor]
|
|
73
88
|
}, style]
|
|
74
89
|
}, rest));
|
|
75
90
|
};
|
|
@@ -11,8 +11,6 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
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
|
-
|
|
16
14
|
function Touchable(_ref) {
|
|
17
15
|
let {
|
|
18
16
|
children,
|
|
@@ -21,6 +19,22 @@ function Touchable(_ref) {
|
|
|
21
19
|
style,
|
|
22
20
|
...props
|
|
23
21
|
} = _ref;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
23
|
+
onPress: onPress,
|
|
24
|
+
disabled: disabled,
|
|
25
|
+
hitSlop: 8,
|
|
26
|
+
style: _ref2 => {
|
|
27
|
+
let {
|
|
28
|
+
pressed
|
|
29
|
+
} = _ref2;
|
|
30
|
+
return [{
|
|
31
|
+
opacity: pressed || disabled ? 0.75 : 1
|
|
32
|
+
}, style];
|
|
33
|
+
},
|
|
34
|
+
...props
|
|
35
|
+
}, children);
|
|
36
|
+
}rops
|
|
37
|
+
} = _ref;
|
|
24
38
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
|
|
25
39
|
onPress: onPress,
|
|
26
40
|
disabled: disabled,
|
package/lib/commonjs/index.js
CHANGED
|
@@ -213,6 +213,12 @@ Object.defineProperty(exports, "Link", {
|
|
|
213
213
|
return _Text.Link;
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
|
+
Object.defineProperty(exports, "Markdown", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _Markdown.default;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
216
222
|
Object.defineProperty(exports, "NumberInput", {
|
|
217
223
|
enumerable: true,
|
|
218
224
|
get: function () {
|
|
@@ -369,18 +375,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
369
375
|
return _Switch.SwitchRow;
|
|
370
376
|
}
|
|
371
377
|
});
|
|
372
|
-
Object.defineProperty(exports, "TabView", {
|
|
373
|
-
enumerable: true,
|
|
374
|
-
get: function () {
|
|
375
|
-
return _TabView.TabView;
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
Object.defineProperty(exports, "TabViewItem", {
|
|
379
|
-
enumerable: true,
|
|
380
|
-
get: function () {
|
|
381
|
-
return _TabView.TabViewItem;
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
378
|
Object.defineProperty(exports, "TextField", {
|
|
385
379
|
enumerable: true,
|
|
386
380
|
get: function () {
|
|
@@ -484,8 +478,6 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
484
478
|
|
|
485
479
|
var _Swiper = require("./components/Swiper");
|
|
486
480
|
|
|
487
|
-
var _TabView = require("./components/TabView");
|
|
488
|
-
|
|
489
481
|
var _Layout = require("./components/Layout");
|
|
490
482
|
|
|
491
483
|
var _index = require("./components/RadioButton/index");
|
|
@@ -526,6 +518,8 @@ var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
|
526
518
|
|
|
527
519
|
var _useAuthState = require("./components/useAuthState");
|
|
528
520
|
|
|
521
|
+
var _Markdown = _interopRequireDefault(require("./components/Markdown"));
|
|
522
|
+
|
|
529
523
|
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); }
|
|
530
524
|
|
|
531
525
|
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; }
|