@draftbit/core 46.2.4-e3db78.5 → 46.2.4-f14a39.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.
@@ -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
  function FormRow(_ref) {
25
23
  let {
26
24
  disabled,
@@ -35,11 +33,27 @@ function FormRow(_ref) {
35
33
  textStyles,
36
34
  viewStyles
37
35
  } = (0, _utilities.extractStyles)(style);
38
- return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
36
+ return /*#__PURE__*/React.createElement(_Touchable.default, {
39
37
  disabled: disabled,
40
38
  onPress: onPress,
41
39
  style: [styles.row, {
42
40
  flexDirection: direction
41
+ }, viewStyles],
42
+ ...rest
43
+ }, /*#__PURE__*/React.createElement(_reactNative.Text, {
44
+ style: textStyles
45
+ }, label), children);
46
+ }
47
+
48
+ const styles = _reactNative.StyleSheet.create({
49
+ row: {
50
+ marginLeft: 8,
51
+ marginRight: 8,
52
+ flexDirection: "row",
53
+ justifyContent: "space-between",
54
+ alignItems: "center"
55
+ }
56
+ });rection: direction
43
57
  }, viewStyles]
44
58
  }, rest), /*#__PURE__*/React.createElement(_reactNative.Text, {
45
59
  style: textStyles
@@ -9,7 +9,7 @@ var _types = require("@draftbit/types");
9
9
 
10
10
  const SEED_DATA = {
11
11
  name: "SVG",
12
- tag: "SVG",
12
+ tag: "Svg",
13
13
  description: "An SVG component",
14
14
  packageName: "@draftbit/core",
15
15
  category: _types.COMPONENT_TYPES.media,
@@ -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 { StyleSheet, View, Platform } from "react-native";
5
3
  import RadioButton from "./RadioButton";
@@ -8,7 +6,7 @@ import { useRadioButtonGroupContext } from "./context";
8
6
  import { Direction as GroupDirection } from "./context";
9
7
  import Touchable from "../Touchable";
10
8
  import { extractStyles, getValueForRadioButton } from "../../utilities";
11
- export let Direction;
9
+ export var Direction;
12
10
 
13
11
  (function (Direction) {
14
12
  Direction["Row"] = "row";
@@ -70,13 +68,14 @@ const RadioButtonRow = _ref => {
70
68
  textStyles,
71
69
  viewStyles
72
70
  } = extractStyles(style);
73
- return /*#__PURE__*/React.createElement(Touchable, _extends({
71
+ return /*#__PURE__*/React.createElement(Touchable, {
74
72
  onPress: handlePress,
75
73
  style: [styles.mainParent, {
76
74
  flexDirection: direction
77
75
  }, viewStyles],
78
- disabled: disabled
79
- }, rest), /*#__PURE__*/React.createElement(View, {
76
+ disabled: disabled,
77
+ ...rest
78
+ }, /*#__PURE__*/React.createElement(View, {
80
79
  style: [styles.label, {
81
80
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
82
81
  }, labelContainerStyle]
@@ -114,4 +113,23 @@ const styles = StyleSheet.create({
114
113
  flex: 3
115
114
  }
116
115
  });
116
+ export default RadioButtonRow;t.create({
117
+ mainParent: {
118
+ alignItems: "center",
119
+ justifyContent: "space-around",
120
+ paddingStart: 20,
121
+ minHeight: 50,
122
+ paddingEnd: 20,
123
+ display: "flex",
124
+ ...Platform.select({
125
+ web: {
126
+ cursor: "pointer",
127
+ userSelect: "none"
128
+ }
129
+ })
130
+ },
131
+ label: {
132
+ flex: 3
133
+ }
134
+ });
117
135
  export default RadioButtonRow;
@@ -1,7 +1,7 @@
1
1
  import { COMPONENT_TYPES, createSvgProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
- tag: "SVG",
4
+ tag: "Svg",
5
5
  description: "An SVG component",
6
6
  packageName: "@draftbit/core",
7
7
  category: COMPONENT_TYPES.media,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-e3db78.5+e3db789a",
3
+ "version": "46.2.4-f14a39.5+f14a3964",
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-e3db78.5+e3db789a",
44
+ "@draftbit/types": "^46.2.4-f14a39.5+f14a3964",
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": "e3db789ac42b782e3844b6d6cf60a61735f020a7"
83
+ "gitHead": "f14a3964f2b1918e34feab51bdcd74411b2c352d"
84
84
  }
@@ -1,7 +1,7 @@
1
1
  import { COMPONENT_TYPES, createSvgProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
- tag: "SVG",
4
+ tag: "Svg",
5
5
  description: "An SVG component",
6
6
  packageName: "@draftbit/core",
7
7
  category: COMPONENT_TYPES.media,
@@ -6,7 +6,7 @@ import {
6
6
 
7
7
  export const SEED_DATA = {
8
8
  name: "SVG",
9
- tag: "SVG",
9
+ tag: "Svg",
10
10
  description: "An SVG component",
11
11
  packageName: "@draftbit/core",
12
12
  category: COMPONENT_TYPES.media,