@draftbit/core 46.10.3-0bad1e.2 → 46.10.3-399330.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/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Divider.js +14 -1
- package/lib/commonjs/components/FAB.js +4 -18
- package/lib/commonjs/components/Image.js +17 -2
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
- package/lib/commonjs/components/Pressable.js +15 -2
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/Slider.js +21 -4
- package/lib/commonjs/components/StarRating.js +23 -4
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout.js +19 -3
- package/lib/module/components/DeprecatedFAB.js +23 -3
- package/lib/module/mappings/NativeBase/Layout.js +20 -4
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +37 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/mappings/NativeBase/Layout.js +18 -1
- package/src/mappings/NativeBase/Layout.ts +23 -0
- package/lib/commonjs/mappings/Container.js +0 -37
- package/lib/module/mappings/Container.js +0 -30
- package/lib/typescript/src/mappings/Container.d.ts +0 -55
- package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
- package/src/mappings/Container.js +0 -30
- package/src/mappings/Container.ts +0 -41
|
@@ -14,7 +14,8 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
|
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";
|
|
@@ -57,6 +58,7 @@ const CheckboxRow = _ref => {
|
|
|
57
58
|
setInternalValue(status);
|
|
58
59
|
}
|
|
59
60
|
}, [status]);
|
|
61
|
+
|
|
60
62
|
// This special logic is to handle weird APIs like Airtable that return
|
|
61
63
|
// true or undefined for a boolean
|
|
62
64
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -80,14 +82,13 @@ const CheckboxRow = _ref => {
|
|
|
80
82
|
textStyles,
|
|
81
83
|
viewStyles
|
|
82
84
|
} = (0, _utilities.extractStyles)(style);
|
|
83
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
85
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
84
86
|
onPress: handlePress,
|
|
85
87
|
style: [viewStyles, styles.mainParent, {
|
|
86
88
|
flexDirection: direction
|
|
87
89
|
}],
|
|
88
|
-
disabled: disabled
|
|
89
|
-
|
|
90
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
90
|
+
disabled: disabled
|
|
91
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
91
92
|
style: [styles.label, {
|
|
92
93
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
93
94
|
}, labelContainerStyle]
|
|
@@ -124,22 +125,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
var _default = CheckboxRow;
|
|
127
|
-
exports.default = _default;ems: "center",
|
|
128
|
-
justifyContent: "space-around",
|
|
129
|
-
paddingStart: 20,
|
|
130
|
-
minHeight: 50,
|
|
131
|
-
paddingEnd: 20,
|
|
132
|
-
display: "flex",
|
|
133
|
-
..._reactNative.Platform.select({
|
|
134
|
-
web: {
|
|
135
|
-
cursor: "pointer",
|
|
136
|
-
userSelect: "none"
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
},
|
|
140
|
-
label: {
|
|
141
|
-
flex: 3
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
var _default = CheckboxRow;
|
|
145
128
|
exports.default = _default;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.checkboxGroupContext = exports.Direction = void 0;
|
|
7
7
|
exports.useCheckboxGroupContext = useCheckboxGroupContext;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
|
|
9
|
+
var Direction;
|
|
10
10
|
exports.Direction = Direction;
|
|
11
11
|
(function (Direction) {
|
|
12
12
|
Direction["Horizontal"] = "horizontal";
|
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _theming = require("../theming");
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
12
|
const Divider = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
style,
|
|
@@ -19,6 +18,20 @@ const Divider = _ref => {
|
|
|
19
18
|
},
|
|
20
19
|
...rest
|
|
21
20
|
} = _ref;
|
|
21
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
22
|
+
style: [{
|
|
23
|
+
backgroundColor: color || colors.divider,
|
|
24
|
+
height: _reactNative.StyleSheet.hairlineWidth
|
|
25
|
+
}, style],
|
|
26
|
+
...rest
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var _default = (0, _theming.withTheme)(Divider);
|
|
30
|
+
exports.default = _default;eme: {
|
|
31
|
+
colors
|
|
32
|
+
},
|
|
33
|
+
...rest
|
|
34
|
+
} = _ref;
|
|
22
35
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
23
36
|
style: [{
|
|
24
37
|
backgroundColor: color || colors.divider,
|
|
@@ -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 FAB = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
onPress,
|
|
@@ -32,7 +33,7 @@ const FAB = _ref => {
|
|
|
32
33
|
borderRadius: size / 2,
|
|
33
34
|
overflow: "hidden"
|
|
34
35
|
}, style]
|
|
35
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
36
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
36
37
|
onPress: onPress,
|
|
37
38
|
disabled: loading || disabled,
|
|
38
39
|
android_ripple: {
|
|
@@ -50,9 +51,8 @@ const FAB = _ref => {
|
|
|
50
51
|
borderRadius: size / 2,
|
|
51
52
|
backgroundColor
|
|
52
53
|
}];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
54
|
+
}
|
|
55
|
+
}, props), /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
56
56
|
style: size > 50 ? {
|
|
57
57
|
marginTop: 2,
|
|
58
58
|
marginLeft: 2
|
|
@@ -79,18 +79,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
var _default = (0, _theming.withTheme)(FAB);
|
|
82
|
-
exports.default = _default; styles = _reactNative.StyleSheet.create({
|
|
83
|
-
button: {
|
|
84
|
-
backgroundColor: "#5a45ff",
|
|
85
|
-
justifyContent: "center",
|
|
86
|
-
alignItems: "center",
|
|
87
|
-
..._reactNative.Platform.select({
|
|
88
|
-
web: {
|
|
89
|
-
cursor: "pointer",
|
|
90
|
-
userSelect: "none"
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
var _default = (0, _theming.withTheme)(FAB);
|
|
96
82
|
exports.default = _default;
|
|
@@ -9,7 +9,8 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _Config = _interopRequireDefault(require("./Config"));
|
|
10
10
|
var _AspectRatio = _interopRequireDefault(require("./AspectRatio"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
12
|
+
/* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
|
|
13
|
+
|
|
13
14
|
const generateDimensions = _ref => {
|
|
14
15
|
let {
|
|
15
16
|
aspectRatio,
|
|
@@ -62,13 +63,27 @@ const Image = _ref2 => {
|
|
|
62
63
|
height,
|
|
63
64
|
aspectRatio
|
|
64
65
|
}]
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image,
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
67
|
+
...props,
|
|
66
68
|
source: imageSource,
|
|
67
69
|
resizeMode: resizeMode,
|
|
68
70
|
style: [style, {
|
|
69
71
|
height: "100%",
|
|
70
72
|
width: "100%"
|
|
71
73
|
}]
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
77
|
+
...props,
|
|
78
|
+
source: source,
|
|
79
|
+
resizeMode: resizeMode,
|
|
80
|
+
style: style
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
var _default = Image;
|
|
84
|
+
exports.default = _default; "100%",
|
|
85
|
+
width: "100%"
|
|
86
|
+
}]
|
|
72
87
|
})));
|
|
73
88
|
}
|
|
74
89
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({}, props, {
|
|
@@ -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",
|
|
@@ -7,16 +7,31 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
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); }
|
|
9
9
|
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; }
|
|
10
|
-
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; }
|
|
11
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
-
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
10
|
class PortalConsumer extends React.Component {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
_defineProperty(this, "key", void 0);
|
|
17
|
-
}
|
|
18
11
|
async componentDidMount() {
|
|
19
12
|
this.checkManager();
|
|
13
|
+
// Delay updating to prevent React from going to infinite loop
|
|
14
|
+
await Promise.resolve();
|
|
15
|
+
this.key = this.props.manager.mount(this.props.children);
|
|
16
|
+
}
|
|
17
|
+
componentDidUpdate() {
|
|
18
|
+
this.checkManager();
|
|
19
|
+
this.props.manager.update(this.key, this.props.children);
|
|
20
|
+
}
|
|
21
|
+
componentWillUnmount() {
|
|
22
|
+
this.checkManager();
|
|
23
|
+
this.props.manager.unmount(this.key);
|
|
24
|
+
}
|
|
25
|
+
checkManager() {
|
|
26
|
+
if (!this.props.manager) {
|
|
27
|
+
throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = PortalConsumer;s.checkManager();
|
|
20
35
|
|
|
21
36
|
// Delay updating to prevent React from going to infinite loop
|
|
22
37
|
await Promise.resolve();
|
|
@@ -7,7 +7,6 @@ exports.default = Pressable;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
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); }
|
|
11
10
|
function Pressable(_ref) {
|
|
12
11
|
let {
|
|
13
12
|
children,
|
|
@@ -20,8 +19,22 @@ function Pressable(_ref) {
|
|
|
20
19
|
style,
|
|
21
20
|
...props
|
|
22
21
|
} = _ref;
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable,
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
24
23
|
onPress: onPress,
|
|
24
|
+
disabled: disabled,
|
|
25
|
+
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
26
|
+
hitSlop: hitSlop ? hitSlop : 8,
|
|
27
|
+
style: _ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
pressed
|
|
30
|
+
} = _ref2;
|
|
31
|
+
return [{
|
|
32
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
33
|
+
}, style];
|
|
34
|
+
},
|
|
35
|
+
...props
|
|
36
|
+
}, children);
|
|
37
|
+
} onPress: onPress,
|
|
25
38
|
disabled: disabled,
|
|
26
39
|
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
27
40
|
hitSlop: hitSlop ? hitSlop : 8,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.radioButtonGroupContext = exports.Direction = void 0;
|
|
7
7
|
exports.useRadioButtonGroupContext = useRadioButtonGroupContext;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
|
|
9
|
+
var Direction;
|
|
10
10
|
exports.Direction = Direction;
|
|
11
11
|
(function (Direction) {
|
|
12
12
|
Direction["Horizontal"] = "horizontal";
|
|
@@ -13,7 +13,6 @@ var _theming = require("../theming");
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
16
|
function maybeParseValue(value) {
|
|
18
17
|
if (value === undefined) {
|
|
19
18
|
return undefined;
|
|
@@ -73,9 +72,10 @@ function Slider(_ref) {
|
|
|
73
72
|
setInternalValue(newValue);
|
|
74
73
|
onValueChange(newValue);
|
|
75
74
|
};
|
|
76
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
77
|
-
style: [styles.container, style]
|
|
78
|
-
|
|
75
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
76
|
+
style: [styles.container, style],
|
|
77
|
+
...rest
|
|
78
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
79
79
|
color: leftIconThemeColor,
|
|
80
80
|
name: leftIcon,
|
|
81
81
|
size: 24
|
|
@@ -108,4 +108,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
var _default = (0, _theming.withTheme)(Slider);
|
|
111
|
+
exports.default = _default;or: rightIconThemeColor,
|
|
112
|
+
name: rightIcon,
|
|
113
|
+
size: 24
|
|
114
|
+
}) : null);
|
|
115
|
+
}
|
|
116
|
+
const styles = _reactNative.StyleSheet.create({
|
|
117
|
+
container: {
|
|
118
|
+
height: 40,
|
|
119
|
+
flexDirection: "row",
|
|
120
|
+
alignItems: "center"
|
|
121
|
+
},
|
|
122
|
+
slider: {
|
|
123
|
+
flex: 1,
|
|
124
|
+
marginHorizontal: 12
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
var _default = (0, _theming.withTheme)(Slider);
|
|
111
128
|
exports.default = _default;
|
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _theming = require("../theming");
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
12
|
const StarRating = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
Icon,
|
|
@@ -40,9 +39,10 @@ const StarRating = _ref => {
|
|
|
40
39
|
!!onPress && onPress(r);
|
|
41
40
|
}, [onPress]);
|
|
42
41
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
43
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
44
|
-
style: [styles.container, style]
|
|
45
|
-
|
|
42
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
|
+
style: [styles.container, style],
|
|
44
|
+
...rest
|
|
45
|
+
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
46
46
|
key: i,
|
|
47
47
|
style: {
|
|
48
48
|
display: "flex"
|
|
@@ -83,4 +83,23 @@ 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);
|
|
86
105
|
exports.default = _default;
|
|
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
12
12
|
android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
|
|
13
13
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
14
14
|
});
|
|
15
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
15
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
@@ -10,6 +10,7 @@ const SHARED_SEED_DATA = {
|
|
|
10
10
|
packageName: "native-base",
|
|
11
11
|
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
12
12
|
};
|
|
13
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = _types.CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== _types.StylesPanelSections.LayoutFlexItems && item !== _types.StylesPanelSections.LayoutContent);
|
|
13
14
|
const SEED_DATA = [{
|
|
14
15
|
name: "Aspect Ratio",
|
|
15
16
|
tag: "AspectRatio",
|
|
@@ -31,32 +32,47 @@ const SEED_DATA = [{
|
|
|
31
32
|
name: "Center",
|
|
32
33
|
tag: "Center",
|
|
33
34
|
description: "Center aligns its contents to the center within itself",
|
|
34
|
-
...SHARED_SEED_DATA
|
|
35
|
+
...SHARED_SEED_DATA,
|
|
36
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
35
37
|
}, {
|
|
36
38
|
name: "Circle",
|
|
37
39
|
tag: "Circle",
|
|
38
40
|
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
39
|
-
...SHARED_SEED_DATA
|
|
41
|
+
...SHARED_SEED_DATA,
|
|
42
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
40
43
|
}, {
|
|
41
44
|
name: "Container",
|
|
42
45
|
tag: "Container",
|
|
43
46
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
47
|
+
props: {
|
|
48
|
+
centerContent: (0, _types.createBoolProp)({
|
|
49
|
+
label: "Center content",
|
|
50
|
+
description: "Center child elements based on their content width"
|
|
51
|
+
})
|
|
52
|
+
},
|
|
44
53
|
...SHARED_SEED_DATA
|
|
45
54
|
}, {
|
|
46
55
|
name: "Column",
|
|
47
56
|
tag: "Column",
|
|
48
57
|
description: "Column aligns items vertically",
|
|
58
|
+
layout: {
|
|
59
|
+
flexDirection: "column"
|
|
60
|
+
},
|
|
49
61
|
...SHARED_SEED_DATA
|
|
50
62
|
}, {
|
|
51
63
|
name: "Row",
|
|
52
64
|
tag: "Row",
|
|
53
65
|
description: "Column aligns items horizontally",
|
|
66
|
+
layout: {
|
|
67
|
+
flexDirection: "row"
|
|
68
|
+
},
|
|
54
69
|
...SHARED_SEED_DATA
|
|
55
70
|
}, {
|
|
56
71
|
name: "Spacer",
|
|
57
72
|
tag: "Spacer",
|
|
58
73
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
59
|
-
...SHARED_SEED_DATA
|
|
74
|
+
...SHARED_SEED_DATA,
|
|
75
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
60
76
|
}, {
|
|
61
77
|
name: "Stack",
|
|
62
78
|
tag: "Stack",
|
|
@@ -1,4 +1,3 @@
|
|
|
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { ActivityIndicator, View, StyleSheet, Pressable } from "react-native";
|
|
4
3
|
import color from "color";
|
|
@@ -97,7 +96,8 @@ const FAB = _ref => {
|
|
|
97
96
|
style: [{
|
|
98
97
|
elevation
|
|
99
98
|
}, style]
|
|
100
|
-
}, /*#__PURE__*/React.createElement(Pressable,
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
100
|
+
...rest,
|
|
101
101
|
onPress: onPress,
|
|
102
102
|
accessibilityState: {
|
|
103
103
|
disabled
|
|
@@ -105,7 +105,7 @@ const FAB = _ref => {
|
|
|
105
105
|
accessibilityRole: "button",
|
|
106
106
|
disabled: disabled || loading,
|
|
107
107
|
style: buttonStyles
|
|
108
|
-
}
|
|
108
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
109
109
|
style: styles.content
|
|
110
110
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
|
|
111
111
|
style: iconStyle
|
|
@@ -144,4 +144,24 @@ const styles = StyleSheet.create({
|
|
|
144
144
|
borderRadius: 0
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
|
+
export default withTheme(FAB);le: "solid"
|
|
148
|
+
},
|
|
149
|
+
content: {
|
|
150
|
+
flexDirection: "row",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center"
|
|
153
|
+
},
|
|
154
|
+
icon: {
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
justifyContent: "center",
|
|
157
|
+
width: Config.buttonIconSize
|
|
158
|
+
},
|
|
159
|
+
fixed: {
|
|
160
|
+
left: 0,
|
|
161
|
+
right: 0,
|
|
162
|
+
bottom: 0,
|
|
163
|
+
height: 64,
|
|
164
|
+
borderRadius: 0
|
|
165
|
+
}
|
|
166
|
+
});
|
|
147
167
|
export default withTheme(FAB);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
5
5
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
6
6
|
};
|
|
7
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.LayoutFlexItems && item !== StylesPanelSections.LayoutContent);
|
|
7
8
|
export const SEED_DATA = [{
|
|
8
9
|
name: "Aspect Ratio",
|
|
9
10
|
tag: "AspectRatio",
|
|
@@ -25,32 +26,47 @@ export const SEED_DATA = [{
|
|
|
25
26
|
name: "Center",
|
|
26
27
|
tag: "Center",
|
|
27
28
|
description: "Center aligns its contents to the center within itself",
|
|
28
|
-
...SHARED_SEED_DATA
|
|
29
|
+
...SHARED_SEED_DATA,
|
|
30
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
29
31
|
}, {
|
|
30
32
|
name: "Circle",
|
|
31
33
|
tag: "Circle",
|
|
32
34
|
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
33
|
-
...SHARED_SEED_DATA
|
|
35
|
+
...SHARED_SEED_DATA,
|
|
36
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
34
37
|
}, {
|
|
35
38
|
name: "Container",
|
|
36
39
|
tag: "Container",
|
|
37
40
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
41
|
+
props: {
|
|
42
|
+
centerContent: createBoolProp({
|
|
43
|
+
label: "Center content",
|
|
44
|
+
description: "Center child elements based on their content width"
|
|
45
|
+
})
|
|
46
|
+
},
|
|
38
47
|
...SHARED_SEED_DATA
|
|
39
48
|
}, {
|
|
40
49
|
name: "Column",
|
|
41
50
|
tag: "Column",
|
|
42
51
|
description: "Column aligns items vertically",
|
|
52
|
+
layout: {
|
|
53
|
+
flexDirection: "column"
|
|
54
|
+
},
|
|
43
55
|
...SHARED_SEED_DATA
|
|
44
56
|
}, {
|
|
45
57
|
name: "Row",
|
|
46
58
|
tag: "Row",
|
|
47
59
|
description: "Column aligns items horizontally",
|
|
60
|
+
layout: {
|
|
61
|
+
flexDirection: "row"
|
|
62
|
+
},
|
|
48
63
|
...SHARED_SEED_DATA
|
|
49
64
|
}, {
|
|
50
65
|
name: "Spacer",
|
|
51
66
|
tag: "Spacer",
|
|
52
67
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
53
|
-
...SHARED_SEED_DATA
|
|
68
|
+
...SHARED_SEED_DATA,
|
|
69
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
54
70
|
}, {
|
|
55
71
|
name: "Stack",
|
|
56
72
|
tag: "Stack",
|
|
@@ -11,6 +11,7 @@ export declare const SEED_DATA: ({
|
|
|
11
11
|
required: boolean;
|
|
12
12
|
step: number;
|
|
13
13
|
};
|
|
14
|
+
centerContent?: undefined;
|
|
14
15
|
direction?: undefined;
|
|
15
16
|
reversed?: undefined;
|
|
16
17
|
isDisabled?: undefined;
|
|
@@ -29,6 +30,40 @@ export declare const SEED_DATA: ({
|
|
|
29
30
|
name: string;
|
|
30
31
|
tag: string;
|
|
31
32
|
description: string;
|
|
33
|
+
} | {
|
|
34
|
+
category: string;
|
|
35
|
+
packageName: string;
|
|
36
|
+
stylesPanelSections: string[];
|
|
37
|
+
name: string;
|
|
38
|
+
tag: string;
|
|
39
|
+
description: string;
|
|
40
|
+
props: {
|
|
41
|
+
centerContent: {
|
|
42
|
+
label: string;
|
|
43
|
+
description: string;
|
|
44
|
+
formType: string;
|
|
45
|
+
propType: string;
|
|
46
|
+
defaultValue: boolean;
|
|
47
|
+
editable: boolean;
|
|
48
|
+
required: boolean;
|
|
49
|
+
group: string;
|
|
50
|
+
};
|
|
51
|
+
ratio?: undefined;
|
|
52
|
+
direction?: undefined;
|
|
53
|
+
reversed?: undefined;
|
|
54
|
+
isDisabled?: undefined;
|
|
55
|
+
isInvalid?: undefined;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
category: string;
|
|
59
|
+
packageName: string;
|
|
60
|
+
stylesPanelSections: string[];
|
|
61
|
+
name: string;
|
|
62
|
+
tag: string;
|
|
63
|
+
description: string;
|
|
64
|
+
layout: {
|
|
65
|
+
flexDirection: string;
|
|
66
|
+
};
|
|
32
67
|
} | {
|
|
33
68
|
props: {
|
|
34
69
|
direction: {
|
|
@@ -73,6 +108,7 @@ export declare const SEED_DATA: ({
|
|
|
73
108
|
group: string;
|
|
74
109
|
};
|
|
75
110
|
ratio?: undefined;
|
|
111
|
+
centerContent?: undefined;
|
|
76
112
|
};
|
|
77
113
|
category: string;
|
|
78
114
|
packageName: string;
|
|
@@ -93,6 +129,7 @@ export declare const SEED_DATA: ({
|
|
|
93
129
|
group: string;
|
|
94
130
|
};
|
|
95
131
|
ratio?: undefined;
|
|
132
|
+
centerContent?: undefined;
|
|
96
133
|
direction?: undefined;
|
|
97
134
|
isDisabled?: undefined;
|
|
98
135
|
isInvalid?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoHrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.10.3-
|
|
3
|
+
"version": "46.10.3-399330.2+3993301",
|
|
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.10.3-
|
|
44
|
+
"@draftbit/types": "^46.10.3-399330.2+3993301",
|
|
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",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
]
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "39933013e1d3b848fb7d16d8cfc94a7adc51b19a"
|
|
104
104
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
5
5
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
6
|
};
|
|
7
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter((item) => item !== StylesPanelSections.LayoutFlexItems &&
|
|
8
|
+
item !== StylesPanelSections.LayoutContent);
|
|
7
9
|
export const SEED_DATA = [
|
|
8
10
|
{
|
|
9
11
|
name: "Aspect Ratio",
|
|
@@ -29,29 +31,43 @@ export const SEED_DATA = [
|
|
|
29
31
|
tag: "Center",
|
|
30
32
|
description: "Center aligns its contents to the center within itself",
|
|
31
33
|
...SHARED_SEED_DATA,
|
|
34
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
32
35
|
},
|
|
33
36
|
{
|
|
34
37
|
name: "Circle",
|
|
35
38
|
tag: "Circle",
|
|
36
39
|
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
37
40
|
...SHARED_SEED_DATA,
|
|
41
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
38
42
|
},
|
|
39
43
|
{
|
|
40
44
|
name: "Container",
|
|
41
45
|
tag: "Container",
|
|
42
46
|
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
47
|
+
props: {
|
|
48
|
+
centerContent: createBoolProp({
|
|
49
|
+
label: "Center content",
|
|
50
|
+
description: "Center child elements based on their content width",
|
|
51
|
+
}),
|
|
52
|
+
},
|
|
43
53
|
...SHARED_SEED_DATA,
|
|
44
54
|
},
|
|
45
55
|
{
|
|
46
56
|
name: "Column",
|
|
47
57
|
tag: "Column",
|
|
48
58
|
description: "Column aligns items vertically",
|
|
59
|
+
layout: {
|
|
60
|
+
flexDirection: "column",
|
|
61
|
+
},
|
|
49
62
|
...SHARED_SEED_DATA,
|
|
50
63
|
},
|
|
51
64
|
{
|
|
52
65
|
name: "Row",
|
|
53
66
|
tag: "Row",
|
|
54
67
|
description: "Column aligns items horizontally",
|
|
68
|
+
layout: {
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
},
|
|
55
71
|
...SHARED_SEED_DATA,
|
|
56
72
|
},
|
|
57
73
|
{
|
|
@@ -59,6 +75,7 @@ export const SEED_DATA = [
|
|
|
59
75
|
tag: "Spacer",
|
|
60
76
|
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
61
77
|
...SHARED_SEED_DATA,
|
|
78
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
62
79
|
},
|
|
63
80
|
{
|
|
64
81
|
name: "Stack",
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
createBoolProp,
|
|
5
5
|
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
6
|
createStaticNumberProp,
|
|
7
|
+
StylesPanelSections,
|
|
7
8
|
} from "@draftbit/types";
|
|
8
9
|
|
|
9
10
|
const SHARED_SEED_DATA = {
|
|
@@ -12,6 +13,13 @@ const SHARED_SEED_DATA = {
|
|
|
12
13
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
13
14
|
};
|
|
14
15
|
|
|
16
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX =
|
|
17
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS.filter(
|
|
18
|
+
(item) =>
|
|
19
|
+
item !== StylesPanelSections.LayoutFlexItems &&
|
|
20
|
+
item !== StylesPanelSections.LayoutContent
|
|
21
|
+
);
|
|
22
|
+
|
|
15
23
|
export const SEED_DATA = [
|
|
16
24
|
{
|
|
17
25
|
name: "Aspect Ratio",
|
|
@@ -40,6 +48,7 @@ export const SEED_DATA = [
|
|
|
40
48
|
tag: "Center",
|
|
41
49
|
description: "Center aligns its contents to the center within itself",
|
|
42
50
|
...SHARED_SEED_DATA,
|
|
51
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
43
52
|
},
|
|
44
53
|
{
|
|
45
54
|
name: "Circle",
|
|
@@ -47,24 +56,37 @@ export const SEED_DATA = [
|
|
|
47
56
|
description:
|
|
48
57
|
"Center aligns its contents to the center within itself with a round border radius",
|
|
49
58
|
...SHARED_SEED_DATA,
|
|
59
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
50
60
|
},
|
|
51
61
|
{
|
|
52
62
|
name: "Container",
|
|
53
63
|
tag: "Container",
|
|
54
64
|
description:
|
|
55
65
|
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
66
|
+
props: {
|
|
67
|
+
centerContent: createBoolProp({
|
|
68
|
+
label: "Center content",
|
|
69
|
+
description: "Center child elements based on their content width",
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
56
72
|
...SHARED_SEED_DATA,
|
|
57
73
|
},
|
|
58
74
|
{
|
|
59
75
|
name: "Column",
|
|
60
76
|
tag: "Column",
|
|
61
77
|
description: "Column aligns items vertically",
|
|
78
|
+
layout: {
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
},
|
|
62
81
|
...SHARED_SEED_DATA,
|
|
63
82
|
},
|
|
64
83
|
{
|
|
65
84
|
name: "Row",
|
|
66
85
|
tag: "Row",
|
|
67
86
|
description: "Column aligns items horizontally",
|
|
87
|
+
layout: {
|
|
88
|
+
flexDirection: "row",
|
|
89
|
+
},
|
|
68
90
|
...SHARED_SEED_DATA,
|
|
69
91
|
},
|
|
70
92
|
{
|
|
@@ -73,6 +95,7 @@ export const SEED_DATA = [
|
|
|
73
95
|
description:
|
|
74
96
|
"An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
75
97
|
...SHARED_SEED_DATA,
|
|
98
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
76
99
|
},
|
|
77
100
|
{
|
|
78
101
|
name: "Stack",
|
|
@@ -1,37 +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: "Container",
|
|
10
|
-
tag: "Container",
|
|
11
|
-
description: "A container component with gutter padding",
|
|
12
|
-
category: _types.COMPONENT_TYPES.deprecated,
|
|
13
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
-
layout: {
|
|
15
|
-
height: 250
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
useThemeGutterPadding: {
|
|
19
|
-
group: _types.GROUPS.basic,
|
|
20
|
-
label: "Use gutter padding",
|
|
21
|
-
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
22
|
-
formType: _types.FORM_TYPES.boolean,
|
|
23
|
-
propType: _types.PROP_TYPES.BOOLEAN,
|
|
24
|
-
defaultValue: false,
|
|
25
|
-
editable: false,
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
backgroundImage: (0, _types.createImageProp)({
|
|
29
|
-
label: "Background Image",
|
|
30
|
-
description: "Apply a custom background image",
|
|
31
|
-
defaultValue: null
|
|
32
|
-
}),
|
|
33
|
-
backgroundImageResizeMode: (0, _types.createResizeModeProp)(),
|
|
34
|
-
elevation: (0, _types.createElevationType)(0)
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, createImageProp, createResizeModeProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Container",
|
|
4
|
-
tag: "Container",
|
|
5
|
-
description: "A container component with gutter padding",
|
|
6
|
-
category: COMPONENT_TYPES.deprecated,
|
|
7
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
-
layout: {
|
|
9
|
-
height: 250
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
useThemeGutterPadding: {
|
|
13
|
-
group: GROUPS.basic,
|
|
14
|
-
label: "Use gutter padding",
|
|
15
|
-
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
16
|
-
formType: FORM_TYPES.boolean,
|
|
17
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
18
|
-
defaultValue: false,
|
|
19
|
-
editable: false,
|
|
20
|
-
required: true
|
|
21
|
-
},
|
|
22
|
-
backgroundImage: createImageProp({
|
|
23
|
-
label: "Background Image",
|
|
24
|
-
description: "Apply a custom background image",
|
|
25
|
-
defaultValue: null
|
|
26
|
-
}),
|
|
27
|
-
backgroundImageResizeMode: createResizeModeProp(),
|
|
28
|
-
elevation: createElevationType(0)
|
|
29
|
-
}
|
|
30
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: {
|
|
2
|
-
name: string;
|
|
3
|
-
tag: string;
|
|
4
|
-
description: string;
|
|
5
|
-
category: string;
|
|
6
|
-
stylesPanelSections: string[];
|
|
7
|
-
layout: {
|
|
8
|
-
height: number;
|
|
9
|
-
};
|
|
10
|
-
props: {
|
|
11
|
-
useThemeGutterPadding: {
|
|
12
|
-
group: string;
|
|
13
|
-
label: string;
|
|
14
|
-
description: string;
|
|
15
|
-
formType: string;
|
|
16
|
-
propType: string;
|
|
17
|
-
defaultValue: boolean;
|
|
18
|
-
editable: boolean;
|
|
19
|
-
required: boolean;
|
|
20
|
-
};
|
|
21
|
-
backgroundImage: {
|
|
22
|
-
label: string;
|
|
23
|
-
description: string;
|
|
24
|
-
group: string;
|
|
25
|
-
formType: string;
|
|
26
|
-
propType: string;
|
|
27
|
-
defaultValue: string;
|
|
28
|
-
editable: boolean;
|
|
29
|
-
required: boolean;
|
|
30
|
-
};
|
|
31
|
-
backgroundImageResizeMode: {
|
|
32
|
-
group: string;
|
|
33
|
-
label: string;
|
|
34
|
-
description: string;
|
|
35
|
-
editable: boolean;
|
|
36
|
-
required: boolean;
|
|
37
|
-
defaultValue: string;
|
|
38
|
-
formType: string;
|
|
39
|
-
propType: string;
|
|
40
|
-
options: string[];
|
|
41
|
-
};
|
|
42
|
-
elevation: {
|
|
43
|
-
defaultValue: any;
|
|
44
|
-
label: string;
|
|
45
|
-
description: string;
|
|
46
|
-
formType: string;
|
|
47
|
-
propType: string;
|
|
48
|
-
options: number[];
|
|
49
|
-
editable: boolean;
|
|
50
|
-
required: boolean;
|
|
51
|
-
group: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Container.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, createImageProp, createResizeModeProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Container",
|
|
4
|
-
tag: "Container",
|
|
5
|
-
description: "A container component with gutter padding",
|
|
6
|
-
category: COMPONENT_TYPES.deprecated,
|
|
7
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
-
layout: {
|
|
9
|
-
height: 250,
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
useThemeGutterPadding: {
|
|
13
|
-
group: GROUPS.basic,
|
|
14
|
-
label: "Use gutter padding",
|
|
15
|
-
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
16
|
-
formType: FORM_TYPES.boolean,
|
|
17
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
18
|
-
defaultValue: false,
|
|
19
|
-
editable: false,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
backgroundImage: createImageProp({
|
|
23
|
-
label: "Background Image",
|
|
24
|
-
description: "Apply a custom background image",
|
|
25
|
-
defaultValue: null,
|
|
26
|
-
}),
|
|
27
|
-
backgroundImageResizeMode: createResizeModeProp(),
|
|
28
|
-
elevation: createElevationType(0),
|
|
29
|
-
},
|
|
30
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GROUPS,
|
|
3
|
-
COMPONENT_TYPES,
|
|
4
|
-
FORM_TYPES,
|
|
5
|
-
PROP_TYPES,
|
|
6
|
-
createElevationType,
|
|
7
|
-
createImageProp,
|
|
8
|
-
createResizeModeProp,
|
|
9
|
-
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
10
|
-
} from "@draftbit/types";
|
|
11
|
-
|
|
12
|
-
export const SEED_DATA = {
|
|
13
|
-
name: "Container",
|
|
14
|
-
tag: "Container",
|
|
15
|
-
description: "A container component with gutter padding",
|
|
16
|
-
category: COMPONENT_TYPES.deprecated,
|
|
17
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
18
|
-
layout: {
|
|
19
|
-
height: 250,
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
useThemeGutterPadding: {
|
|
23
|
-
group: GROUPS.basic,
|
|
24
|
-
label: "Use gutter padding",
|
|
25
|
-
description:
|
|
26
|
-
"When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
27
|
-
formType: FORM_TYPES.boolean,
|
|
28
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
29
|
-
defaultValue: false,
|
|
30
|
-
editable: false,
|
|
31
|
-
required: true,
|
|
32
|
-
},
|
|
33
|
-
backgroundImage: createImageProp({
|
|
34
|
-
label: "Background Image",
|
|
35
|
-
description: "Apply a custom background image",
|
|
36
|
-
defaultValue: null,
|
|
37
|
-
}),
|
|
38
|
-
backgroundImageResizeMode: createResizeModeProp(),
|
|
39
|
-
elevation: createElevationType(0),
|
|
40
|
-
},
|
|
41
|
-
};
|