@draftbit/core 46.8.1-e9e820.2 → 46.8.1-fdeb41.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/Layout.js +40 -19
- package/lib/commonjs/components/ScreenContainer.js +2 -1
- package/lib/commonjs/index.js +0 -13
- package/lib/module/components/Accordion/AccordionItem.js +4 -25
- package/lib/module/components/ScreenContainer.js +2 -1
- package/lib/module/constants.js +0 -1
- package/lib/module/index.js +0 -1
- package/lib/typescript/src/components/ScreenContainer.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +3 -5
- package/src/components/ScreenContainer.js +2 -1
- package/src/components/ScreenContainer.tsx +2 -1
- package/src/index.js +0 -1
- package/src/index.tsx +0 -2
- package/lib/commonjs/components/TabView/TabView.js +0 -100
- 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 -73
- package/lib/commonjs/mappings/TabViewItem.js +0 -35
- package/lib/module/components/TabView/TabView.js +0 -90
- 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 -66
- package/lib/module/mappings/TabViewItem.js +0 -28
- 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 -123
- package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TabViewItem.d.ts +0 -25
- package/lib/typescript/src/mappings/TabViewItem.d.ts.map +0 -1
- package/src/components/TabView/TabView.js +0 -45
- package/src/components/TabView/TabView.tsx +0 -129
- 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 -69
- package/src/mappings/TabView.ts +0 -79
- package/src/mappings/TabViewItem.js +0 -28
- package/src/mappings/TabViewItem.ts +0 -35
|
@@ -12,6 +12,7 @@ var _theming = require("../../theming");
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
16
|
const AccordionItem = _ref => {
|
|
16
17
|
let {
|
|
17
18
|
Icon,
|
|
@@ -26,10 +27,9 @@ const AccordionItem = _ref => {
|
|
|
26
27
|
textStyles,
|
|
27
28
|
viewStyles
|
|
28
29
|
} = (0, _utilities.extractStyles)(style);
|
|
29
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
30
|
-
style: [styles.container, viewStyles]
|
|
31
|
-
|
|
32
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
30
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
31
|
+
style: [styles.container, viewStyles]
|
|
32
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
33
33
|
style: styles.row
|
|
34
34
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
35
35
|
name: icon,
|
|
@@ -61,23 +61,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
64
|
-
exports.default = _default;.StyleSheet.create({
|
|
65
|
-
container: {
|
|
66
|
-
padding: 8
|
|
67
|
-
},
|
|
68
|
-
row: {
|
|
69
|
-
flexDirection: "row",
|
|
70
|
-
alignItems: "center",
|
|
71
|
-
paddingLeft: 8
|
|
72
|
-
},
|
|
73
|
-
item: {
|
|
74
|
-
marginVertical: 6,
|
|
75
|
-
paddingLeft: 8
|
|
76
|
-
},
|
|
77
|
-
content: {
|
|
78
|
-
flex: 1,
|
|
79
|
-
justifyContent: "center"
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
83
64
|
exports.default = _default;
|
|
@@ -13,7 +13,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactNative = require("react-native");
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
16
|
function Center(_ref) {
|
|
18
17
|
let {
|
|
19
18
|
width = 240,
|
|
@@ -23,15 +22,16 @@ function Center(_ref) {
|
|
|
23
22
|
style,
|
|
24
23
|
...rest
|
|
25
24
|
} = _ref;
|
|
26
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
25
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
27
26
|
style: [{
|
|
28
27
|
justifyContent: "center",
|
|
29
28
|
alignItems: "center",
|
|
30
29
|
width,
|
|
31
30
|
height,
|
|
32
31
|
backgroundColor: bgColor
|
|
33
|
-
}, style]
|
|
34
|
-
|
|
32
|
+
}, style],
|
|
33
|
+
...rest
|
|
34
|
+
}, children);
|
|
35
35
|
}
|
|
36
36
|
function Circle(_ref2) {
|
|
37
37
|
let {
|
|
@@ -42,7 +42,7 @@ function Circle(_ref2) {
|
|
|
42
42
|
...rest
|
|
43
43
|
} = _ref2;
|
|
44
44
|
const borderRadius = 1000;
|
|
45
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
45
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
46
46
|
width: size,
|
|
47
47
|
height: size,
|
|
48
48
|
bgColor: bgColor,
|
|
@@ -50,8 +50,9 @@ function Circle(_ref2) {
|
|
|
50
50
|
backgroundColor: bgColor,
|
|
51
51
|
borderRadius,
|
|
52
52
|
overflow: "hidden"
|
|
53
|
-
}]
|
|
54
|
-
|
|
53
|
+
}],
|
|
54
|
+
...rest
|
|
55
|
+
}, children);
|
|
55
56
|
}
|
|
56
57
|
function Square(_ref3) {
|
|
57
58
|
let {
|
|
@@ -61,12 +62,13 @@ function Square(_ref3) {
|
|
|
61
62
|
style,
|
|
62
63
|
...rest
|
|
63
64
|
} = _ref3;
|
|
64
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
65
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
65
66
|
style: style,
|
|
66
67
|
width: size,
|
|
67
68
|
height: size,
|
|
68
|
-
bgColor: bgColor
|
|
69
|
-
|
|
69
|
+
bgColor: bgColor,
|
|
70
|
+
...rest
|
|
71
|
+
}, children);
|
|
70
72
|
}
|
|
71
73
|
function Row(_ref4) {
|
|
72
74
|
let {
|
|
@@ -76,15 +78,14 @@ function Row(_ref4) {
|
|
|
76
78
|
style,
|
|
77
79
|
...rest
|
|
78
80
|
} = _ref4;
|
|
79
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
80
|
-
style: [style,
|
|
81
|
-
// style goes first b/c we can't override these
|
|
82
|
-
{
|
|
81
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
82
|
+
style: [style, {
|
|
83
83
|
alignItems,
|
|
84
84
|
flexDirection: "row",
|
|
85
85
|
justifyContent: justifyContent
|
|
86
|
-
}]
|
|
87
|
-
|
|
86
|
+
}],
|
|
87
|
+
...rest
|
|
88
|
+
}, children);
|
|
88
89
|
}
|
|
89
90
|
function Spacer(_ref5) {
|
|
90
91
|
let {
|
|
@@ -96,16 +97,36 @@ function Spacer(_ref5) {
|
|
|
96
97
|
style,
|
|
97
98
|
...rest
|
|
98
99
|
} = _ref5;
|
|
99
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
100
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
101
|
style: [style, {
|
|
101
102
|
paddingRight: right,
|
|
102
103
|
paddingTop: top,
|
|
103
104
|
paddingLeft: left,
|
|
104
105
|
paddingBottom: bottom
|
|
105
|
-
}]
|
|
106
|
-
|
|
106
|
+
}],
|
|
107
|
+
...rest
|
|
108
|
+
}, children);
|
|
107
109
|
}
|
|
108
110
|
function Stack(_ref6) {
|
|
111
|
+
let {
|
|
112
|
+
children,
|
|
113
|
+
justifyContent = "flex-start",
|
|
114
|
+
alignItems = "flex-start",
|
|
115
|
+
style,
|
|
116
|
+
...rest
|
|
117
|
+
} = _ref6;
|
|
118
|
+
return (
|
|
119
|
+
/*#__PURE__*/
|
|
120
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
121
|
+
React.createElement(_reactNative.View, {
|
|
122
|
+
style: [style, {
|
|
123
|
+
justifyContent,
|
|
124
|
+
alignItems
|
|
125
|
+
}],
|
|
126
|
+
...rest
|
|
127
|
+
}, children)
|
|
128
|
+
);
|
|
129
|
+
}Stack(_ref6) {
|
|
109
130
|
let {
|
|
110
131
|
children,
|
|
111
132
|
justifyContent = "flex-start",
|
|
@@ -12,6 +12,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
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
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
14
|
function ScreenContainer(_ref) {
|
|
15
|
+
var _StyleSheet$flatten;
|
|
15
16
|
let {
|
|
16
17
|
scrollable = false,
|
|
17
18
|
hasSafeArea = false,
|
|
@@ -22,7 +23,7 @@ function ScreenContainer(_ref) {
|
|
|
22
23
|
children,
|
|
23
24
|
...rest
|
|
24
25
|
} = _ref;
|
|
25
|
-
const 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");
|
package/lib/commonjs/index.js
CHANGED
|
@@ -339,18 +339,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
339
339
|
return _Switch.SwitchRow;
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
|
-
Object.defineProperty(exports, "TabView", {
|
|
343
|
-
enumerable: true,
|
|
344
|
-
get: function () {
|
|
345
|
-
return _TabView.TabView;
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
Object.defineProperty(exports, "TabViewItem", {
|
|
349
|
-
enumerable: true,
|
|
350
|
-
get: function () {
|
|
351
|
-
return _TabView.TabViewItem;
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
342
|
Object.defineProperty(exports, "TextField", {
|
|
355
343
|
enumerable: true,
|
|
356
344
|
get: function () {
|
|
@@ -426,7 +414,6 @@ var _Swiper = require("./components/Swiper");
|
|
|
426
414
|
var _Layout = require("./components/Layout");
|
|
427
415
|
var _index = require("./components/RadioButton/index");
|
|
428
416
|
var _DeckSwiper = require("./components/DeckSwiper");
|
|
429
|
-
var _TabView = require("./components/TabView");
|
|
430
417
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
431
418
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
432
419
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
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); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
3
4
|
import Text from "../Text";
|
|
@@ -17,10 +18,9 @@ const AccordionItem = _ref => {
|
|
|
17
18
|
textStyles,
|
|
18
19
|
viewStyles
|
|
19
20
|
} = extractStyles(style);
|
|
20
|
-
return /*#__PURE__*/React.createElement(Pressable, {
|
|
21
|
-
style: [styles.container, viewStyles]
|
|
22
|
-
|
|
23
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
22
|
+
style: [styles.container, viewStyles]
|
|
23
|
+
}, rest), /*#__PURE__*/React.createElement(View, {
|
|
24
24
|
style: styles.row
|
|
25
25
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
26
26
|
name: icon,
|
|
@@ -51,25 +51,4 @@ const styles = StyleSheet.create({
|
|
|
51
51
|
justifyContent: "center"
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
export default withTheme(AccordionItem);xtStyles
|
|
55
|
-
}, label))));
|
|
56
|
-
};
|
|
57
|
-
const styles = StyleSheet.create({
|
|
58
|
-
container: {
|
|
59
|
-
padding: 8
|
|
60
|
-
},
|
|
61
|
-
row: {
|
|
62
|
-
flexDirection: "row",
|
|
63
|
-
alignItems: "center",
|
|
64
|
-
paddingLeft: 8
|
|
65
|
-
},
|
|
66
|
-
item: {
|
|
67
|
-
marginVertical: 6,
|
|
68
|
-
paddingLeft: 8
|
|
69
|
-
},
|
|
70
|
-
content: {
|
|
71
|
-
flex: 1,
|
|
72
|
-
justifyContent: "center"
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
54
|
export default withTheme(AccordionItem);
|
|
@@ -4,6 +4,7 @@ import { StyleSheet, ScrollView, View } from "react-native";
|
|
|
4
4
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
5
5
|
import { withTheme } from "../theming";
|
|
6
6
|
function ScreenContainer(_ref) {
|
|
7
|
+
var _StyleSheet$flatten;
|
|
7
8
|
let {
|
|
8
9
|
scrollable = false,
|
|
9
10
|
hasSafeArea = false,
|
|
@@ -14,7 +15,7 @@ function ScreenContainer(_ref) {
|
|
|
14
15
|
children,
|
|
15
16
|
...rest
|
|
16
17
|
} = _ref;
|
|
17
|
-
const backgroundColor = theme.colors.background;
|
|
18
|
+
const backgroundColor = ((_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.backgroundColor) || theme.colors.background;
|
|
18
19
|
const edges = ["left", "right"];
|
|
19
20
|
if (hasSafeArea || hasTopSafeArea) {
|
|
20
21
|
edges.push("top");
|
package/lib/module/constants.js
CHANGED
package/lib/module/index.js
CHANGED
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
34
34
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
36
35
|
|
|
37
36
|
/* Deprecated: Fix or Delete! */
|
|
38
37
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ScreenContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD,aAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,UAAkB,EAClB,WAAmB,EACnB,iBAAyB,EACzB,cAAsB,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ScreenContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ScreenContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD,aAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,UAAkB,EAClB,WAAmB,EACnB,iBAAyB,EACzB,cAAsB,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,oBAAoB,eAyCtB;;;;AAYD,wBAA0C"}
|
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
34
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
36
35
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
37
36
|
export { default as Picker } from "./components/Picker/Picker";
|
|
38
37
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAA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CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.8.1-
|
|
3
|
+
"version": "46.8.1-fdeb41.2+fdeb419",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.8.1-
|
|
44
|
+
"@draftbit/types": "^46.8.1-fdeb41.2+fdeb419",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -55,9 +55,7 @@
|
|
|
55
55
|
"lodash.tonumber": "^4.0.3",
|
|
56
56
|
"react-native-deck-swiper": "^2.0.12",
|
|
57
57
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
58
|
-
"react-native-pager-view": "5.4.24",
|
|
59
58
|
"react-native-svg": "12.3.0",
|
|
60
|
-
"react-native-tab-view": "^3.4.0",
|
|
61
59
|
"react-native-typography": "^1.4.1",
|
|
62
60
|
"react-native-web-swiper": "^2.2.3"
|
|
63
61
|
},
|
|
@@ -94,5 +92,5 @@
|
|
|
94
92
|
]
|
|
95
93
|
]
|
|
96
94
|
},
|
|
97
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "fdeb419346326ed23ffa03113b5313beda578a50"
|
|
98
96
|
}
|
|
@@ -3,7 +3,8 @@ import { StyleSheet, ScrollView, View, } from "react-native";
|
|
|
3
3
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
4
4
|
import { withTheme } from "../theming";
|
|
5
5
|
function ScreenContainer({ scrollable = false, hasSafeArea = false, hasBottomSafeArea = false, hasTopSafeArea = false, theme, style, children, ...rest }) {
|
|
6
|
-
|
|
6
|
+
var _a;
|
|
7
|
+
const backgroundColor = ((_a = StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background;
|
|
7
8
|
const edges = ["left", "right"];
|
|
8
9
|
if (hasSafeArea || hasTopSafeArea) {
|
|
9
10
|
edges.push("top");
|
|
@@ -31,7 +31,8 @@ function ScreenContainer({
|
|
|
31
31
|
children,
|
|
32
32
|
...rest
|
|
33
33
|
}: ScreenContainerProps) {
|
|
34
|
-
const backgroundColor =
|
|
34
|
+
const backgroundColor =
|
|
35
|
+
StyleSheet.flatten(style)?.backgroundColor || theme.colors.background;
|
|
35
36
|
|
|
36
37
|
const edges: Edge[] = ["left", "right"];
|
|
37
38
|
if (hasSafeArea || hasTopSafeArea) {
|
package/src/index.js
CHANGED
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
34
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
36
35
|
/* Deprecated: Fix or Delete! */
|
|
37
36
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
38
37
|
export { default as Picker } from "./components/Picker/Picker";
|
package/src/index.tsx
CHANGED
|
@@ -53,8 +53,6 @@ export {
|
|
|
53
53
|
|
|
54
54
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
55
55
|
|
|
56
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
57
|
-
|
|
58
56
|
/* Deprecated: Fix or Delete! */
|
|
59
57
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
60
58
|
export { default as Picker } from "./components/Picker/Picker";
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNativeTabView = require("react-native-tab-view");
|
|
9
|
-
var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
|
|
10
|
-
var _theming = require("../../theming");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
-
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
|
-
const TabViewComponent = _ref => {
|
|
16
|
-
let {
|
|
17
|
-
Icon,
|
|
18
|
-
onIndexChanged,
|
|
19
|
-
onEndReached,
|
|
20
|
-
tabBarPosition,
|
|
21
|
-
keyboardDismissMode,
|
|
22
|
-
swipeEnabled,
|
|
23
|
-
scrollEnabled,
|
|
24
|
-
activeColor,
|
|
25
|
-
inactiveColor,
|
|
26
|
-
pressColor,
|
|
27
|
-
indicatorColor,
|
|
28
|
-
tabsBackgroundColor,
|
|
29
|
-
style,
|
|
30
|
-
theme,
|
|
31
|
-
children
|
|
32
|
-
} = _ref;
|
|
33
|
-
const [index, setIndex] = React.useState(0);
|
|
34
|
-
const [routes, setRoutes] = React.useState([]);
|
|
35
|
-
const [tabScenes, setTabScenes] = React.useState({});
|
|
36
|
-
|
|
37
|
-
//Populate routes and scenes based on children
|
|
38
|
-
React.useEffect(() => {
|
|
39
|
-
const newRoutes = [];
|
|
40
|
-
const scenes = {};
|
|
41
|
-
React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child) && child.type === _TabViewItem.default).forEach((item, idx) => {
|
|
42
|
-
const child = item;
|
|
43
|
-
newRoutes.push({
|
|
44
|
-
key: idx.toString(),
|
|
45
|
-
title: child.props.title,
|
|
46
|
-
icon: child.props.icon,
|
|
47
|
-
accessibilityLabel: child.props.accessibilityLabel
|
|
48
|
-
});
|
|
49
|
-
scenes[idx] = () => child;
|
|
50
|
-
});
|
|
51
|
-
setRoutes(newRoutes);
|
|
52
|
-
setTabScenes(scenes);
|
|
53
|
-
}, [children]);
|
|
54
|
-
const indexChangeHandler = i => {
|
|
55
|
-
setIndex(i);
|
|
56
|
-
onIndexChanged === null || onIndexChanged === void 0 ? void 0 : onIndexChanged(i);
|
|
57
|
-
if (i === routes.length) {
|
|
58
|
-
onEndReached === null || onEndReached === void 0 ? void 0 : onEndReached();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const renderTabBar = props => {
|
|
62
|
-
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
|
|
63
|
-
activeColor: activeColor || theme.colors.primary,
|
|
64
|
-
inactiveColor: inactiveColor || theme.colors.divider,
|
|
65
|
-
pressColor: pressColor || theme.colors.primary,
|
|
66
|
-
scrollEnabled: scrollEnabled,
|
|
67
|
-
indicatorStyle: {
|
|
68
|
-
backgroundColor: indicatorColor || theme.colors.primary
|
|
69
|
-
},
|
|
70
|
-
renderIcon: _ref2 => {
|
|
71
|
-
let {
|
|
72
|
-
route,
|
|
73
|
-
color
|
|
74
|
-
} = _ref2;
|
|
75
|
-
return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
76
|
-
name: route.icon,
|
|
77
|
-
color: color,
|
|
78
|
-
size: 36
|
|
79
|
-
}) : null;
|
|
80
|
-
},
|
|
81
|
-
style: [{
|
|
82
|
-
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
83
|
-
}, style]
|
|
84
|
-
}));
|
|
85
|
-
};
|
|
86
|
-
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabView, {
|
|
87
|
-
navigationState: {
|
|
88
|
-
index,
|
|
89
|
-
routes
|
|
90
|
-
},
|
|
91
|
-
renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
|
|
92
|
-
renderTabBar: renderTabBar,
|
|
93
|
-
onIndexChange: indexChangeHandler,
|
|
94
|
-
tabBarPosition: tabBarPosition,
|
|
95
|
-
keyboardDismissMode: keyboardDismissMode,
|
|
96
|
-
swipeEnabled: swipeEnabled
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
var _default = (0, _theming.withTheme)(TabViewComponent);
|
|
100
|
-
exports.default = _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const TabViewItem = _ref => {
|
|
11
|
-
let {
|
|
12
|
-
style,
|
|
13
|
-
children
|
|
14
|
-
} = _ref;
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
16
|
-
style: [styles.parentContainer, style]
|
|
17
|
-
}, children);
|
|
18
|
-
};
|
|
19
|
-
const styles = _reactNative.StyleSheet.create({
|
|
20
|
-
parentContainer: {
|
|
21
|
-
flex: 1
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _default = TabViewItem;
|
|
25
|
-
exports.default = _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "TabView", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _TabView.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "TabViewItem", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _TabViewItem.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _TabView = _interopRequireDefault(require("./TabView"));
|
|
19
|
-
var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA = {
|
|
9
|
-
name: "Tab View",
|
|
10
|
-
tag: "TabView",
|
|
11
|
-
description: "Tab view container",
|
|
12
|
-
category: _types.COMPONENT_TYPES.swiper,
|
|
13
|
-
stylesPanelSections: [..._types.BLOCK_STYLES_SECTIONS, _types.StylesPanelSections.Background],
|
|
14
|
-
triggers: [_types.Triggers.OnIndexChanged, _types.Triggers.OnEndReached],
|
|
15
|
-
props: {
|
|
16
|
-
onIndexChanged: (0, _types.createActionProp)({
|
|
17
|
-
label: "On index changed",
|
|
18
|
-
description: "Action to execute when swipe to new index"
|
|
19
|
-
}),
|
|
20
|
-
onEndReached: (0, _types.createActionProp)({
|
|
21
|
-
label: "On end reached",
|
|
22
|
-
description: "Action to execute when end of swiping reached"
|
|
23
|
-
}),
|
|
24
|
-
tabBarPosition: (0, _types.createTextEnumProp)({
|
|
25
|
-
label: "Tab Bar Position",
|
|
26
|
-
description: "Position of tab bar",
|
|
27
|
-
options: ["top", "bottom"],
|
|
28
|
-
defaultValue: "top"
|
|
29
|
-
}),
|
|
30
|
-
keyboardDismissMode: (0, _types.createTextEnumProp)({
|
|
31
|
-
label: "Keyboard Dismiss Mode",
|
|
32
|
-
description: "Keyboard Dismiss Mode",
|
|
33
|
-
options: ["auto", "on-drag", "none"],
|
|
34
|
-
defaultValue: "auto"
|
|
35
|
-
}),
|
|
36
|
-
swipeEnabled: (0, _types.createStaticBoolProp)({
|
|
37
|
-
label: "Swipe Enabled",
|
|
38
|
-
description: "Whether swiping is enabled or not",
|
|
39
|
-
defaultValue: true
|
|
40
|
-
}),
|
|
41
|
-
scrollEnabled: (0, _types.createStaticBoolProp)({
|
|
42
|
-
label: "Scroll Enabled",
|
|
43
|
-
description: "Whether scrolling of tabs is enabled or not",
|
|
44
|
-
defaultValue: true
|
|
45
|
-
}),
|
|
46
|
-
activeColor: (0, _types.createColorProp)({
|
|
47
|
-
label: "Active Color",
|
|
48
|
-
description: "Color of icon and text of active tab",
|
|
49
|
-
defaultValue: "primary"
|
|
50
|
-
}),
|
|
51
|
-
inactiveColor: (0, _types.createColorProp)({
|
|
52
|
-
label: "Inactive Color",
|
|
53
|
-
description: "Color of icon and text of inactive tab(s)",
|
|
54
|
-
defaultValue: null
|
|
55
|
-
}),
|
|
56
|
-
pressColor: (0, _types.createColorProp)({
|
|
57
|
-
label: "Press Color",
|
|
58
|
-
description: "Color of ripple when pressed (android only)",
|
|
59
|
-
defaultValue: "primary"
|
|
60
|
-
}),
|
|
61
|
-
indicatorColor: (0, _types.createColorProp)({
|
|
62
|
-
label: "Indicator Color",
|
|
63
|
-
description: "Color of indicator",
|
|
64
|
-
defaultValue: "primary"
|
|
65
|
-
}),
|
|
66
|
-
tabsBackgroundColor: (0, _types.createColorProp)({
|
|
67
|
-
label: "Tabs Background Color",
|
|
68
|
-
description: "Background color of tabs container",
|
|
69
|
-
defaultValue: "background"
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA = {
|
|
9
|
-
name: "Tab View Item",
|
|
10
|
-
tag: "TabViewItem",
|
|
11
|
-
description: "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
|
|
12
|
-
category: _types.COMPONENT_TYPES.swiper,
|
|
13
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
-
layout: {
|
|
15
|
-
flex: 1
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
title: (0, _types.createTextProp)({
|
|
19
|
-
label: "Title",
|
|
20
|
-
description: "Title of tab item",
|
|
21
|
-
defaultValue: null,
|
|
22
|
-
required: true
|
|
23
|
-
}),
|
|
24
|
-
icon: (0, _types.createIconProp)({
|
|
25
|
-
defaultValue: null,
|
|
26
|
-
required: false
|
|
27
|
-
}),
|
|
28
|
-
accessibilityLabel: (0, _types.createTextProp)({
|
|
29
|
-
label: "Accessibility Label",
|
|
30
|
-
description: "Accessibility Label",
|
|
31
|
-
defaultValue: null
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.SEED_DATA = SEED_DATA;
|