@draftbit/core 46.10.3-399330.2 → 46.10.3-3aae02.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.
@@ -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 Divider = _ref => {
13
14
  let {
14
15
  style,
@@ -18,20 +19,6 @@ const Divider = _ref => {
18
19
  },
19
20
  ...rest
20
21
  } = _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;
35
22
  return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
36
23
  style: [{
37
24
  backgroundColor: color || colors.divider,
@@ -9,8 +9,7 @@ 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
- /* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
13
-
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); }
14
13
  const generateDimensions = _ref => {
15
14
  let {
16
15
  aspectRatio,
@@ -63,27 +62,13 @@ const Image = _ref2 => {
63
62
  height,
64
63
  aspectRatio
65
64
  }]
66
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
67
- ...props,
65
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({}, props, {
68
66
  source: imageSource,
69
67
  resizeMode: resizeMode,
70
68
  style: [style, {
71
69
  height: "100%",
72
70
  width: "100%"
73
71
  }]
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
- }]
87
72
  })));
88
73
  }
89
74
  return /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({}, props, {
@@ -13,6 +13,7 @@ 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); }
16
17
  function Center(_ref) {
17
18
  let {
18
19
  width = 240,
@@ -22,16 +23,15 @@ function Center(_ref) {
22
23
  style,
23
24
  ...rest
24
25
  } = _ref;
25
- return /*#__PURE__*/React.createElement(_reactNative.View, {
26
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
26
27
  style: [{
27
28
  justifyContent: "center",
28
29
  alignItems: "center",
29
30
  width,
30
31
  height,
31
32
  backgroundColor: bgColor
32
- }, style],
33
- ...rest
34
- }, children);
33
+ }, style]
34
+ }, rest), 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, _extends({
46
46
  width: size,
47
47
  height: size,
48
48
  bgColor: bgColor,
@@ -50,9 +50,8 @@ function Circle(_ref2) {
50
50
  backgroundColor: bgColor,
51
51
  borderRadius,
52
52
  overflow: "hidden"
53
- }],
54
- ...rest
55
- }, children);
53
+ }]
54
+ }, rest), children);
56
55
  }
57
56
  function Square(_ref3) {
58
57
  let {
@@ -62,13 +61,12 @@ function Square(_ref3) {
62
61
  style,
63
62
  ...rest
64
63
  } = _ref3;
65
- return /*#__PURE__*/React.createElement(Center, {
64
+ return /*#__PURE__*/React.createElement(Center, _extends({
66
65
  style: style,
67
66
  width: size,
68
67
  height: size,
69
- bgColor: bgColor,
70
- ...rest
71
- }, children);
68
+ bgColor: bgColor
69
+ }, rest), children);
72
70
  }
73
71
  function Row(_ref4) {
74
72
  let {
@@ -78,14 +76,15 @@ function Row(_ref4) {
78
76
  style,
79
77
  ...rest
80
78
  } = _ref4;
81
- return /*#__PURE__*/React.createElement(_reactNative.View, {
82
- style: [style, {
79
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
80
+ style: [style,
81
+ // style goes first b/c we can't override these
82
+ {
83
83
  alignItems,
84
84
  flexDirection: "row",
85
85
  justifyContent: justifyContent
86
- }],
87
- ...rest
88
- }, children);
86
+ }]
87
+ }, rest), children);
89
88
  }
90
89
  function Spacer(_ref5) {
91
90
  let {
@@ -97,36 +96,16 @@ function Spacer(_ref5) {
97
96
  style,
98
97
  ...rest
99
98
  } = _ref5;
100
- return /*#__PURE__*/React.createElement(_reactNative.View, {
99
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
101
100
  style: [style, {
102
101
  paddingRight: right,
103
102
  paddingTop: top,
104
103
  paddingLeft: left,
105
104
  paddingBottom: bottom
106
- }],
107
- ...rest
108
- }, children);
105
+ }]
106
+ }, rest), children);
109
107
  }
110
108
  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) {
130
109
  let {
131
110
  children,
132
111
  justifyContent = "flex-start",
@@ -7,31 +7,16 @@ 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); }
10
13
  class PortalConsumer extends React.Component {
11
- async componentDidMount() {
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);
14
+ constructor() {
15
+ super(...arguments);
16
+ _defineProperty(this, "key", void 0);
16
17
  }
17
- componentDidUpdate() {
18
- this.checkManager();
19
- this.props.manager.update(this.key, this.props.children);
20
- }
21
- componentWillUnmount() {
18
+ async componentDidMount() {
22
19
  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();
35
20
 
36
21
  // Delay updating to prevent React from going to infinite loop
37
22
  await Promise.resolve();
@@ -7,6 +7,7 @@ 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); }
10
11
  function Pressable(_ref) {
11
12
  let {
12
13
  children,
@@ -19,22 +20,8 @@ function Pressable(_ref) {
19
20
  style,
20
21
  ...props
21
22
  } = _ref;
22
- return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
23
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
23
24
  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,
38
25
  disabled: disabled,
39
26
  delayLongPress: delayLongPress ? delayLongPress : 500,
40
27
  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
- var Direction;
9
+ let Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -13,6 +13,7 @@ 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); }
16
17
  function maybeParseValue(value) {
17
18
  if (value === undefined) {
18
19
  return undefined;
@@ -72,10 +73,9 @@ function Slider(_ref) {
72
73
  setInternalValue(newValue);
73
74
  onValueChange(newValue);
74
75
  };
75
- return /*#__PURE__*/React.createElement(_reactNative.View, {
76
- style: [styles.container, style],
77
- ...rest
78
- }, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
76
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
77
+ style: [styles.container, style]
78
+ }, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
79
79
  color: leftIconThemeColor,
80
80
  name: leftIcon,
81
81
  size: 24
@@ -108,21 +108,4 @@ 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);
128
111
  exports.default = _default;
@@ -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 StarRating = _ref => {
13
14
  let {
14
15
  Icon,
@@ -39,10 +40,9 @@ const StarRating = _ref => {
39
40
  !!onPress && onPress(r);
40
41
  }, [onPress]);
41
42
  const ratingRounded = Math.round(localRating * 2) / 2;
42
- return /*#__PURE__*/React.createElement(_reactNative.View, {
43
- style: [styles.container, style],
44
- ...rest
45
- }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
43
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
44
+ style: [styles.container, style]
45
+ }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
46
46
  key: i,
47
47
  style: {
48
48
  display: "flex"
@@ -83,23 +83,4 @@ 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);
105
86
  exports.default = _default;
@@ -45,9 +45,10 @@ const SEED_DATA = [{
45
45
  tag: "Container",
46
46
  description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
47
47
  props: {
48
- centerContent: (0, _types.createBoolProp)({
48
+ centerContent: (0, _types.createStaticBoolProp)({
49
49
  label: "Center content",
50
- description: "Center child elements based on their content width"
50
+ description: "Center child elements based on their content width",
51
+ defaultValue: true
51
52
  })
52
53
  },
53
54
  ...SHARED_SEED_DATA
@@ -71,24 +72,17 @@ const SEED_DATA = [{
71
72
  name: "Spacer",
72
73
  tag: "Spacer",
73
74
  description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
75
+ layout: {
76
+ flex: 1
77
+ },
74
78
  ...SHARED_SEED_DATA,
75
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
79
+ stylesPanelSections: [_types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Margins]
76
80
  }, {
77
81
  name: "Stack",
78
82
  tag: "Stack",
79
83
  description: "Stack aligns items vertically or horizontally based on the direction prop",
80
84
  ...SHARED_SEED_DATA,
81
85
  props: {
82
- direction: (0, _types.createTextEnumProp)({
83
- label: "Direction",
84
- description: "The direction of the Stack",
85
- options: ["row", "column"],
86
- defaultValue: "column"
87
- }),
88
- reversed: (0, _types.createBoolProp)({
89
- label: "Reversed",
90
- description: "Determines whether to reverse the direction of items"
91
- }),
92
86
  isDisabled: (0, _types.createBoolProp)({
93
87
  label: "Disabled",
94
88
  description: "If true, the Stack will be disabled"
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { ActivityIndicator, View, StyleSheet, Pressable } from "react-native";
3
4
  import color from "color";
@@ -96,8 +97,7 @@ const FAB = _ref => {
96
97
  style: [{
97
98
  elevation
98
99
  }, style]
99
- }, /*#__PURE__*/React.createElement(Pressable, {
100
- ...rest,
100
+ }, /*#__PURE__*/React.createElement(Pressable, _extends({}, 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
- }, /*#__PURE__*/React.createElement(View, {
108
+ }), /*#__PURE__*/React.createElement(View, {
109
109
  style: styles.content
110
110
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
111
111
  style: iconStyle
@@ -144,24 +144,4 @@ 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
- });
167
147
  export default withTheme(FAB);
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp } from "@draftbit/types";
2
2
  const SHARED_SEED_DATA = {
3
3
  category: COMPONENT_TYPES.layout,
4
4
  packageName: "native-base",
@@ -39,9 +39,10 @@ export const SEED_DATA = [{
39
39
  tag: "Container",
40
40
  description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
41
41
  props: {
42
- centerContent: createBoolProp({
42
+ centerContent: createStaticBoolProp({
43
43
  label: "Center content",
44
- description: "Center child elements based on their content width"
44
+ description: "Center child elements based on their content width",
45
+ defaultValue: true
45
46
  })
46
47
  },
47
48
  ...SHARED_SEED_DATA
@@ -65,24 +66,17 @@ export const SEED_DATA = [{
65
66
  name: "Spacer",
66
67
  tag: "Spacer",
67
68
  description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
69
+ layout: {
70
+ flex: 1
71
+ },
68
72
  ...SHARED_SEED_DATA,
69
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
73
+ stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
70
74
  }, {
71
75
  name: "Stack",
72
76
  tag: "Stack",
73
77
  description: "Stack aligns items vertically or horizontally based on the direction prop",
74
78
  ...SHARED_SEED_DATA,
75
79
  props: {
76
- direction: createTextEnumProp({
77
- label: "Direction",
78
- description: "The direction of the Stack",
79
- options: ["row", "column"],
80
- defaultValue: "column"
81
- }),
82
- reversed: createBoolProp({
83
- label: "Reversed",
84
- description: "Determines whether to reverse the direction of items"
85
- }),
86
80
  isDisabled: createBoolProp({
87
81
  label: "Disabled",
88
82
  description: "If true, the Stack will be disabled"
@@ -12,10 +12,9 @@ export declare const SEED_DATA: ({
12
12
  step: number;
13
13
  };
14
14
  centerContent?: undefined;
15
- direction?: undefined;
16
- reversed?: undefined;
17
15
  isDisabled?: undefined;
18
16
  isInvalid?: undefined;
17
+ reversed?: undefined;
19
18
  };
20
19
  category: string;
21
20
  packageName: string;
@@ -49,10 +48,9 @@ export declare const SEED_DATA: ({
49
48
  group: string;
50
49
  };
51
50
  ratio?: undefined;
52
- direction?: undefined;
53
- reversed?: undefined;
54
51
  isDisabled?: undefined;
55
52
  isInvalid?: undefined;
53
+ reversed?: undefined;
56
54
  };
57
55
  } | {
58
56
  category: string;
@@ -63,30 +61,21 @@ export declare const SEED_DATA: ({
63
61
  description: string;
64
62
  layout: {
65
63
  flexDirection: string;
64
+ flex?: undefined;
65
+ };
66
+ } | {
67
+ stylesPanelSections: string[];
68
+ category: string;
69
+ packageName: string;
70
+ name: string;
71
+ tag: string;
72
+ description: string;
73
+ layout: {
74
+ flex: number;
75
+ flexDirection?: undefined;
66
76
  };
67
77
  } | {
68
78
  props: {
69
- direction: {
70
- group: string;
71
- label: string;
72
- description: string;
73
- editable: boolean;
74
- required: boolean;
75
- formType: string;
76
- propType: string;
77
- defaultValue: null;
78
- options: never[];
79
- };
80
- reversed: {
81
- label: string;
82
- description: string;
83
- formType: string;
84
- propType: string;
85
- defaultValue: boolean;
86
- editable: boolean;
87
- required: boolean;
88
- group: string;
89
- };
90
79
  isDisabled: {
91
80
  label: string;
92
81
  description: string;
@@ -109,6 +98,7 @@ export declare const SEED_DATA: ({
109
98
  };
110
99
  ratio?: undefined;
111
100
  centerContent?: undefined;
101
+ reversed?: undefined;
112
102
  };
113
103
  category: string;
114
104
  packageName: string;
@@ -130,7 +120,6 @@ export declare const SEED_DATA: ({
130
120
  };
131
121
  ratio?: undefined;
132
122
  centerContent?: undefined;
133
- direction?: undefined;
134
123
  isDisabled?: undefined;
135
124
  isInvalid?: undefined;
136
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoHrB,CAAC"}
1
+ {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkHrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.10.3-399330.2+3993301",
3
+ "version": "46.10.3-3aae02.2+3aae02c",
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-399330.2+3993301",
44
+ "@draftbit/types": "^46.10.3-3aae02.2+3aae02c",
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": "39933013e1d3b848fb7d16d8cfc94a7adc51b19a"
103
+ "gitHead": "3aae02cccac71c7081c63ab1b10da34c8262cadf"
104
104
  }
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp, } from "@draftbit/types";
2
2
  const SHARED_SEED_DATA = {
3
3
  category: COMPONENT_TYPES.layout,
4
4
  packageName: "native-base",
@@ -45,9 +45,10 @@ export const SEED_DATA = [
45
45
  tag: "Container",
46
46
  description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
47
47
  props: {
48
- centerContent: createBoolProp({
48
+ centerContent: createStaticBoolProp({
49
49
  label: "Center content",
50
50
  description: "Center child elements based on their content width",
51
+ defaultValue: true,
51
52
  }),
52
53
  },
53
54
  ...SHARED_SEED_DATA,
@@ -74,8 +75,15 @@ export const SEED_DATA = [
74
75
  name: "Spacer",
75
76
  tag: "Spacer",
76
77
  description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
78
+ layout: {
79
+ flex: 1,
80
+ },
77
81
  ...SHARED_SEED_DATA,
78
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
82
+ stylesPanelSections: [
83
+ StylesPanelSections.LayoutSelectedItem,
84
+ StylesPanelSections.Background,
85
+ StylesPanelSections.Margins,
86
+ ],
79
87
  },
80
88
  {
81
89
  name: "Stack",
@@ -83,16 +91,6 @@ export const SEED_DATA = [
83
91
  description: "Stack aligns items vertically or horizontally based on the direction prop",
84
92
  ...SHARED_SEED_DATA,
85
93
  props: {
86
- direction: createTextEnumProp({
87
- label: "Direction",
88
- description: "The direction of the Stack",
89
- options: ["row", "column"],
90
- defaultValue: "column",
91
- }),
92
- reversed: createBoolProp({
93
- label: "Reversed",
94
- description: "Determines whether to reverse the direction of items",
95
- }),
96
94
  isDisabled: createBoolProp({
97
95
  label: "Disabled",
98
96
  description: "If true, the Stack will be disabled",
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  COMPONENT_TYPES,
3
- createTextEnumProp,
4
3
  createBoolProp,
5
4
  CONTAINER_COMPONENT_STYLES_SECTIONS,
6
5
  createStaticNumberProp,
7
6
  StylesPanelSections,
7
+ createStaticBoolProp,
8
8
  } from "@draftbit/types";
9
9
 
10
10
  const SHARED_SEED_DATA = {
@@ -64,9 +64,10 @@ export const SEED_DATA = [
64
64
  description:
65
65
  "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
66
66
  props: {
67
- centerContent: createBoolProp({
67
+ centerContent: createStaticBoolProp({
68
68
  label: "Center content",
69
69
  description: "Center child elements based on their content width",
70
+ defaultValue: true,
70
71
  }),
71
72
  },
72
73
  ...SHARED_SEED_DATA,
@@ -94,8 +95,15 @@ export const SEED_DATA = [
94
95
  tag: "Spacer",
95
96
  description:
96
97
  "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
98
+ layout: {
99
+ flex: 1,
100
+ },
97
101
  ...SHARED_SEED_DATA,
98
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
102
+ stylesPanelSections: [
103
+ StylesPanelSections.LayoutSelectedItem,
104
+ StylesPanelSections.Background,
105
+ StylesPanelSections.Margins,
106
+ ],
99
107
  },
100
108
  {
101
109
  name: "Stack",
@@ -104,16 +112,6 @@ export const SEED_DATA = [
104
112
  "Stack aligns items vertically or horizontally based on the direction prop",
105
113
  ...SHARED_SEED_DATA,
106
114
  props: {
107
- direction: createTextEnumProp({
108
- label: "Direction",
109
- description: "The direction of the Stack",
110
- options: ["row", "column"],
111
- defaultValue: "column",
112
- }),
113
- reversed: createBoolProp({
114
- label: "Reversed",
115
- description: "Determines whether to reverse the direction of items",
116
- }),
117
115
  isDisabled: createBoolProp({
118
116
  label: "Disabled",
119
117
  description: "If true, the Stack will be disabled",