@draftbit/core 46.2.4-023e4d.5 → 46.2.4-02fd06.5
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 +25 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Portal/Portal.js +3 -5
- package/lib/commonjs/components/{Svg.js → SVG.js} +2 -2
- package/lib/commonjs/index.js +7 -7
- package/lib/commonjs/mappings/{Svg.js → SVG.js} +0 -0
- package/lib/module/components/{Svg.js → SVG.js} +2 -2
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/{Svg.js → SVG.js} +0 -0
- package/lib/typescript/src/components/{Svg.d.ts → SVG.d.ts} +2 -2
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/{Svg.d.ts → SVG.d.ts} +0 -0
- package/package.json +3 -3
- package/src/components/{Svg.js → SVG.js} +2 -2
- package/src/components/{Svg.tsx → SVG.tsx} +2 -2
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- /package/src/mappings/{Svg.js → SVG.js} +0 -0
- /package/src/mappings/{Svg.ts → SVG.ts} +0 -0
|
@@ -21,8 +21,6 @@ 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
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
padding: 8
|
|
79
|
+
},
|
|
80
|
+
row: {
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
item: {
|
|
86
|
+
marginVertical: 6,
|
|
87
|
+
paddingLeft: 8
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
justifyContent: "center"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
96
|
+
|
|
77
97
|
exports.default = _default;
|
|
@@ -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 screenWidth = _reactNative.Dimensions.get("window").width;
|
|
25
23
|
|
|
26
24
|
function Pager(_ref) {
|
|
@@ -50,8 +48,6 @@ function Pager(_ref) {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
function Carousel(_ref2) {
|
|
53
|
-
var _data$length;
|
|
54
|
-
|
|
55
51
|
let {
|
|
56
52
|
data,
|
|
57
53
|
children,
|
|
@@ -59,9 +55,12 @@ function Carousel(_ref2) {
|
|
|
59
55
|
style,
|
|
60
56
|
...rest
|
|
61
57
|
} = _ref2;
|
|
58
|
+
|
|
59
|
+
var _a;
|
|
60
|
+
|
|
62
61
|
const [index, setIndex] = React.useState(0);
|
|
63
62
|
const length = React.Children.count(children);
|
|
64
|
-
const itemsLength = ((
|
|
63
|
+
const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
|
|
65
64
|
const slides = Array.isArray(data) ? data : [];
|
|
66
65
|
|
|
67
66
|
const {
|
|
@@ -71,9 +70,10 @@ function Carousel(_ref2) {
|
|
|
71
70
|
|
|
72
71
|
const slideWidth = width || screenWidth;
|
|
73
72
|
const slideHeight = height || 250;
|
|
74
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
75
|
-
style: [styles.container, style]
|
|
76
|
-
|
|
73
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
74
|
+
style: [styles.container, style],
|
|
75
|
+
...rest
|
|
76
|
+
}, /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
77
77
|
pagingEnabled: true,
|
|
78
78
|
horizontal: true,
|
|
79
79
|
decelerationRate: "fast",
|
|
@@ -101,9 +101,9 @@ function Carousel(_ref2) {
|
|
|
101
101
|
}]
|
|
102
102
|
});
|
|
103
103
|
}) : null, React.Children.map(children, child => {
|
|
104
|
-
var
|
|
104
|
+
var _a;
|
|
105
105
|
|
|
106
|
-
const s = (child === null || child === void 0 ? void 0 :
|
|
106
|
+
const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
|
|
107
107
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
108
108
|
style: {
|
|
109
109
|
width: slideWidth
|
|
@@ -144,4 +144,28 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
144
144
|
|
|
145
145
|
var _default = (0, _theming.withTheme)(Carousel);
|
|
146
146
|
|
|
147
|
+
exports.default = _default;e({
|
|
148
|
+
container: {
|
|
149
|
+
backgroundColor: "#eee"
|
|
150
|
+
},
|
|
151
|
+
pager: {
|
|
152
|
+
position: "absolute",
|
|
153
|
+
bottom: 12,
|
|
154
|
+
left: 0,
|
|
155
|
+
right: 0,
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
justifyContent: "center",
|
|
158
|
+
alignItems: "center"
|
|
159
|
+
},
|
|
160
|
+
bullet: {
|
|
161
|
+
marginHorizontal: 2,
|
|
162
|
+
width: 10,
|
|
163
|
+
height: 10,
|
|
164
|
+
borderRadius: 20,
|
|
165
|
+
backgroundColor: "#000"
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
var _default = (0, _theming.withTheme)(Carousel);
|
|
170
|
+
|
|
147
171
|
exports.default = _default;
|
|
@@ -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 _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; }
|
|
23
|
-
|
|
24
22
|
/**
|
|
25
23
|
* Portal allows to render a component at a different place in the parent tree.
|
|
26
24
|
* You can use it to render content which should appear above other elements, similar to `Modal`.
|
|
@@ -43,7 +41,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
43
41
|
* ```
|
|
44
42
|
*/
|
|
45
43
|
class Portal extends React.Component {
|
|
46
|
-
// @component ./PortalHost.tsx
|
|
47
44
|
render() {
|
|
48
45
|
const {
|
|
49
46
|
children,
|
|
@@ -56,9 +53,10 @@ class Portal extends React.Component {
|
|
|
56
53
|
}, children)));
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
}
|
|
56
|
+
} // @component ./PortalHost.tsx
|
|
57
|
+
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
Portal.Host = _PortalHost.default;
|
|
62
60
|
|
|
63
61
|
var _default = (0, _theming.withTheme)(Portal);
|
|
64
62
|
|
|
@@ -19,7 +19,7 @@ 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
|
-
const
|
|
22
|
+
const SVG = _ref => {
|
|
23
23
|
let {
|
|
24
24
|
source = _Config.default.placeholderSvgURL,
|
|
25
25
|
style
|
|
@@ -44,5 +44,5 @@ const Svg = _ref => {
|
|
|
44
44
|
}));
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
var _default =
|
|
47
|
+
var _default = SVG;
|
|
48
48
|
exports.default = _default;
|
package/lib/commonjs/index.js
CHANGED
|
@@ -291,6 +291,12 @@ Object.defineProperty(exports, "RowHeadlineImageIcon", {
|
|
|
291
291
|
return _RowHeadlineImageIcon.default;
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
+
Object.defineProperty(exports, "SVG", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
get: function () {
|
|
297
|
+
return _SVG.default;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
294
300
|
Object.defineProperty(exports, "ScreenContainer", {
|
|
295
301
|
enumerable: true,
|
|
296
302
|
get: function () {
|
|
@@ -339,12 +345,6 @@ Object.defineProperty(exports, "Surface", {
|
|
|
339
345
|
return _Surface.default;
|
|
340
346
|
}
|
|
341
347
|
});
|
|
342
|
-
Object.defineProperty(exports, "Svg", {
|
|
343
|
-
enumerable: true,
|
|
344
|
-
get: function () {
|
|
345
|
-
return _Svg.default;
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
348
|
Object.defineProperty(exports, "Swiper", {
|
|
349
349
|
enumerable: true,
|
|
350
350
|
get: function () {
|
|
@@ -448,7 +448,7 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton"));
|
|
|
448
448
|
|
|
449
449
|
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
450
450
|
|
|
451
|
-
var
|
|
451
|
+
var _SVG = _interopRequireDefault(require("./components/SVG"));
|
|
452
452
|
|
|
453
453
|
var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
|
|
454
454
|
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import { View, Platform, Image } from "react-native";
|
|
|
3
3
|
import { SvgUri } from "react-native-svg";
|
|
4
4
|
import Config from "./Config";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const SVG = _ref => {
|
|
7
7
|
let {
|
|
8
8
|
source = Config.placeholderSvgURL,
|
|
9
9
|
style
|
|
@@ -28,4 +28,4 @@ const Svg = _ref => {
|
|
|
28
28
|
}));
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export default
|
|
31
|
+
export default SVG;
|
package/lib/module/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
|
File without changes
|
|
@@ -4,5 +4,5 @@ declare type SvgComponentProps = {
|
|
|
4
4
|
source: string;
|
|
5
5
|
style?: StyleProp<ImageStyle>;
|
|
6
6
|
};
|
|
7
|
-
declare const
|
|
8
|
-
export default
|
|
7
|
+
declare const SVG: React.FC<React.PropsWithChildren<SvgComponentProps>>;
|
|
8
|
+
export default SVG;
|
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.2.4-
|
|
3
|
+
"version": "46.2.4-02fd06.5+02fd060d",
|
|
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.2.4-
|
|
44
|
+
"@draftbit/types": "^46.2.4-02fd06.5+02fd060d",
|
|
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",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "02fd060d9521225b3e9b452e8e3de7fea3890765"
|
|
84
84
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { View, Platform, Image } from "react-native";
|
|
3
3
|
import { SvgUri } from "react-native-svg";
|
|
4
4
|
import Config from "./Config";
|
|
5
|
-
const
|
|
5
|
+
const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
|
|
6
6
|
return (React.createElement(React.Fragment, null,
|
|
7
7
|
Platform.OS === "ios" && (React.createElement(View, { style: style },
|
|
8
8
|
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
|
|
@@ -10,4 +10,4 @@ const Svg = ({ source = Config.placeholderSvgURL, style, }) => {
|
|
|
10
10
|
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
|
|
11
11
|
Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
|
|
12
12
|
};
|
|
13
|
-
export default
|
|
13
|
+
export default SVG;
|
|
@@ -9,7 +9,7 @@ type SvgComponentProps = {
|
|
|
9
9
|
style?: StyleProp<ImageStyle>;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const SVG: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
|
|
13
13
|
source = Config.placeholderSvgURL,
|
|
14
14
|
style,
|
|
15
15
|
}) => {
|
|
@@ -32,4 +32,4 @@ const Svg: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
|
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export default
|
|
35
|
+
export default SVG;
|
package/src/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
package/src/index.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
18
18
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
19
19
|
export { default as IconButton } from "./components/IconButton";
|
|
20
20
|
export { default as Image } from "./components/Image";
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as SVG } from "./components/SVG";
|
|
22
22
|
export { default as NumberInput } from "./components/NumberInput";
|
|
23
23
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
24
24
|
export { default as StarRating } from "./components/StarRating";
|
|
File without changes
|
|
File without changes
|