@draftbit/core 46.2.4-c963c3.4 → 46.2.4-cb2c54.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.
@@ -62,7 +62,7 @@ var _default = {
62
62
  width: size.width,
63
63
  height: size.height
64
64
  }, "image-placeholder_1"),
65
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
65
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
66
66
  squareImageUrl: buildImageUrl({
67
67
  width: 100,
68
68
  height: 100
@@ -17,6 +17,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
19
 
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+
20
22
  const {
21
23
  Provider
22
24
  } = _context.radioButtonGroupContext;
@@ -61,24 +63,9 @@ const RadioButtonGroup = _ref => {
61
63
  });
62
64
  }
63
65
 
64
- return /*#__PURE__*/React.createElement(_reactNative.View, {
66
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
65
67
  style: [{
66
68
  minHeight: 40
67
- }, style],
68
- ...rest
69
- }, /*#__PURE__*/React.createElement(Provider, {
70
- value: {
71
- value: internalValue,
72
- onValueChange: handleValueChange,
73
- direction
74
- }
75
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
76
- style: _containerStyle
77
- }, children)));
78
- };
79
-
80
- var _default = RadioButtonGroup;
81
- exports.default = _default;0
82
69
  }, style]
83
70
  }, rest), /*#__PURE__*/React.createElement(Provider, {
84
71
  value: {
@@ -21,26 +21,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
 
22
22
  const SVG = _ref => {
23
23
  let {
24
- source,
24
+ source = _Config.default.placeholderSvgURL,
25
25
  style
26
26
  } = _ref;
27
- let svgSource = source === null || source === undefined ? _Config.default.placeholderSvgURL : source;
28
27
  return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
29
28
  style: style
30
29
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
31
30
  width: "100%",
32
31
  height: "100%",
33
- uri: svgSource
32
+ uri: source
34
33
  })), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
35
34
  style: style
36
35
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
37
36
  width: "100%",
38
37
  height: "100%",
39
- uri: svgSource
38
+ uri: source
40
39
  })), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
41
40
  style: style,
42
41
  source: {
43
- uri: svgSource
42
+ uri: source
44
43
  }
45
44
  }));
46
45
  };
@@ -16,4 +16,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
16
16
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
17
17
  });
18
18
 
19
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
19
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -11,13 +11,15 @@ const SEED_DATA = {
11
11
  name: "SVG",
12
12
  tag: "SVG",
13
13
  description: "An SVG component",
14
+ packageName: "@draftbit/core",
14
15
  category: _types.COMPONENT_TYPES.media,
15
16
  layout: {
16
17
  width: 100,
17
18
  height: 100
18
19
  },
20
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
19
21
  props: {
20
- source: (0, _types.createSvgProp)()
22
+ source: (0, _types.createSVGProp)()
21
23
  }
22
24
  };
23
25
  exports.SEED_DATA = SEED_DATA;
@@ -54,7 +54,7 @@ export default {
54
54
  width: size.width,
55
55
  height: size.height
56
56
  }, "image-placeholder_1"),
57
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
57
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
58
58
  squareImageUrl: buildImageUrl({
59
59
  width: 100,
60
60
  height: 100
@@ -5,26 +5,25 @@ import Config from "./Config";
5
5
 
6
6
  const SVG = _ref => {
7
7
  let {
8
- source,
8
+ source = Config.placeholderSvgURL,
9
9
  style
10
10
  } = _ref;
11
- let svgSource = source === null || source === undefined ? Config.placeholderSvgURL : source;
12
11
  return /*#__PURE__*/React.createElement(React.Fragment, null, Platform.OS === "ios" && /*#__PURE__*/React.createElement(View, {
13
12
  style: style
14
13
  }, /*#__PURE__*/React.createElement(SvgUri, {
15
14
  width: "100%",
16
15
  height: "100%",
17
- uri: svgSource
16
+ uri: source
18
17
  })), Platform.OS === "android" && /*#__PURE__*/React.createElement(View, {
19
18
  style: style
20
19
  }, /*#__PURE__*/React.createElement(SvgUri, {
21
20
  width: "100%",
22
21
  height: "100%",
23
- uri: svgSource
22
+ uri: source
24
23
  })), Platform.OS === "web" && /*#__PURE__*/React.createElement(Image, {
25
24
  style: style,
26
25
  source: {
27
- uri: svgSource
26
+ uri: source
28
27
  }
29
28
  }));
30
29
  };
@@ -1,5 +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
-
3
1
  import * as React from "react";
4
2
  import { View, StyleSheet, Pressable } from "react-native";
5
3
  import { withTheme } from "../theming";
@@ -34,9 +32,10 @@ const StarRating = _ref => {
34
32
  !!onPress && onPress(r);
35
33
  }, [onPress]);
36
34
  const ratingRounded = Math.round(localRating * 2) / 2;
37
- return /*#__PURE__*/React.createElement(View, _extends({
38
- style: [styles.container, style]
39
- }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
35
+ return /*#__PURE__*/React.createElement(View, {
36
+ style: [styles.container, style],
37
+ ...rest
38
+ }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
40
39
  key: i,
41
40
  style: {
42
41
  display: "flex"
@@ -77,4 +76,24 @@ const styles = StyleSheet.create({
77
76
  width: "50%"
78
77
  }
79
78
  });
79
+ export default withTheme(StarRating);ontainer: {
80
+ flexDirection: "row",
81
+ alignItems: "center"
82
+ },
83
+ touchContainer: {
84
+ display: "flex",
85
+ flexDirection: "row",
86
+ position: "absolute",
87
+ top: 0,
88
+ right: 0,
89
+ left: 0,
90
+ bottom: 0,
91
+ zIndex: 1
92
+ },
93
+ pressable: {
94
+ flex: 1,
95
+ height: "100%",
96
+ width: "50%"
97
+ }
98
+ });
80
99
  export default withTheme(StarRating);
@@ -1,14 +1,16 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
+ packageName: "@draftbit/core",
6
7
  category: COMPONENT_TYPES.media,
7
8
  layout: {
8
9
  width: 100,
9
10
  height: 100
10
11
  },
12
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
11
13
  props: {
12
- source: createSvgProp()
14
+ source: createSVGProp()
13
15
  }
14
16
  };
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import { StyleProp, ImageStyle } from "react-native";
3
3
  declare type SVGComponentProps = {
4
4
  source: string;
5
5
  style?: StyleProp<ImageStyle>;
6
6
  };
7
- declare const SVG: ({ source, style }: SVGComponentProps) => JSX.Element;
7
+ declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
8
8
  export default SVG;
@@ -2,11 +2,13 @@ export declare const SEED_DATA: {
2
2
  name: string;
3
3
  tag: string;
4
4
  description: string;
5
+ packageName: string;
5
6
  category: string;
6
7
  layout: {
7
8
  width: number;
8
9
  height: number;
9
10
  };
11
+ stylesPanelSections: string[];
10
12
  props: {
11
13
  source: {
12
14
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-c963c3.4+c963c352",
3
+ "version": "46.2.4-cb2c54.5+cb2c5435",
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-cb2c54.5+cb2c5435",
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": "c963c352589ec3b359bd3b4eaa360a444e8b9ff0"
83
+ "gitHead": "cb2c543552734b1e7d7056d04da2430dd5a6e4b5"
84
84
  }
@@ -42,7 +42,7 @@ export default {
42
42
  cardIconElevation: 1,
43
43
  placeholderImageURL: "https://static.draftbit.com/images/placeholder-image" + getExtension(),
44
44
  getPlaceholderImageUrl: (size) => buildImageUrl({ width: size.width, height: size.height }, "image-placeholder_1"),
45
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
45
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
46
46
  squareImageUrl: buildImageUrl({ width: 100, height: 100 }, "Avatar"),
47
47
  FABSize: 40,
48
48
  FABBorderRadius: 20,
@@ -60,7 +60,7 @@ export default {
60
60
  { width: size.width, height: size.height },
61
61
  "image-placeholder_1"
62
62
  ),
63
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
63
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
64
64
  squareImageUrl: buildImageUrl({ width: 100, height: 100 }, "Avatar"),
65
65
  FABSize: 40,
66
66
  FABBorderRadius: 20,
@@ -2,13 +2,12 @@ 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 SVG = ({ source, style }) => {
6
- let svgSource = source === null || source === undefined ? Config.placeholderSvgURL : source;
5
+ const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
7
6
  return (React.createElement(React.Fragment, null,
8
7
  Platform.OS === "ios" && (React.createElement(View, { style: style },
9
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: svgSource }))),
8
+ React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
10
9
  Platform.OS === "android" && (React.createElement(View, { style: style },
11
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: svgSource }))),
12
- Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: svgSource } }))));
10
+ React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
11
+ Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
13
12
  };
14
13
  export default SVG;
@@ -9,24 +9,24 @@ type SVGComponentProps = {
9
9
  style?: StyleProp<ImageStyle>;
10
10
  };
11
11
 
12
- const SVG = ({ source, style }: SVGComponentProps) => {
13
- let svgSource =
14
- source === null || source === undefined ? Config.placeholderSvgURL : source;
15
-
12
+ const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
13
+ source = Config.placeholderSvgURL,
14
+ style,
15
+ }) => {
16
16
  return (
17
17
  <>
18
18
  {Platform.OS === "ios" && (
19
19
  <View style={style}>
20
- <SvgUri width="100%" height="100%" uri={svgSource} />
20
+ <SvgUri width="100%" height="100%" uri={source} />
21
21
  </View>
22
22
  )}
23
23
  {Platform.OS === "android" && (
24
24
  <View style={style}>
25
- <SvgUri width="100%" height="100%" uri={svgSource} />
25
+ <SvgUri width="100%" height="100%" uri={source} />
26
26
  </View>
27
27
  )}
28
28
  {Platform.OS === "web" && (
29
- <Image style={style} source={{ uri: svgSource }} />
29
+ <Image style={style} source={{ uri: source }} />
30
30
  )}
31
31
  </>
32
32
  );
@@ -1,14 +1,21 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
+ packageName: "@draftbit/core",
6
7
  category: COMPONENT_TYPES.media,
7
8
  layout: {
8
9
  width: 100,
9
10
  height: 100,
10
11
  },
12
+ stylesPanelSections: [
13
+ StylesPanelSections.Size,
14
+ StylesPanelSections.Margins,
15
+ StylesPanelSections.Position,
16
+ StylesPanelSections.Effects,
17
+ ],
11
18
  props: {
12
- source: createSvgProp(),
19
+ source: createSVGProp(),
13
20
  },
14
21
  };
@@ -1,15 +1,26 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createSVGProp,
4
+ StylesPanelSections,
5
+ } from "@draftbit/types";
2
6
 
3
7
  export const SEED_DATA = {
4
8
  name: "SVG",
5
9
  tag: "SVG",
6
10
  description: "An SVG component",
11
+ packageName: "@draftbit/core",
7
12
  category: COMPONENT_TYPES.media,
8
13
  layout: {
9
14
  width: 100,
10
15
  height: 100,
11
16
  },
17
+ stylesPanelSections: [
18
+ StylesPanelSections.Size,
19
+ StylesPanelSections.Margins,
20
+ StylesPanelSections.Position,
21
+ StylesPanelSections.Effects,
22
+ ],
12
23
  props: {
13
- source: createSvgProp(),
24
+ source: createSVGProp(),
14
25
  },
15
26
  };