@draftbit/core 46.9.1-2ce152.2 → 46.9.1-328e35.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.
Files changed (35) hide show
  1. package/lib/commonjs/components/Elevation.js +14 -2
  2. package/lib/commonjs/components/TextField.js +76 -28
  3. package/lib/commonjs/mappings/ActionSheet.js +1 -1
  4. package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
  5. package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
  6. package/lib/commonjs/mappings/BottomSheet.js +2 -6
  7. package/lib/commonjs/mappings/MapCallout.js +1 -1
  8. package/lib/commonjs/mappings/MapMarker.js +1 -1
  9. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +1 -10
  10. package/lib/module/mappings/ActionSheet.js +1 -1
  11. package/lib/module/mappings/ActionSheetCancel.js +1 -1
  12. package/lib/module/mappings/ActionSheetItem.js +1 -1
  13. package/lib/module/mappings/BottomSheet.js +3 -7
  14. package/lib/module/mappings/MapCallout.js +2 -2
  15. package/lib/module/mappings/MapMarker.js +2 -2
  16. package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
  17. package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
  18. package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
  19. package/lib/typescript/src/mappings/BottomSheet.d.ts +0 -4
  20. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
  21. package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
  22. package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
  23. package/package.json +5 -5
  24. package/src/mappings/ActionSheet.js +4 -1
  25. package/src/mappings/ActionSheet.ts +4 -1
  26. package/src/mappings/ActionSheetCancel.js +4 -1
  27. package/src/mappings/ActionSheetCancel.ts +4 -1
  28. package/src/mappings/ActionSheetItem.js +4 -1
  29. package/src/mappings/ActionSheetItem.ts +4 -1
  30. package/src/mappings/BottomSheet.js +3 -4
  31. package/src/mappings/BottomSheet.ts +3 -4
  32. package/src/mappings/MapCallout.js +6 -2
  33. package/src/mappings/MapCallout.ts +6 -2
  34. package/src/mappings/MapMarker.js +6 -2
  35. package/src/mappings/MapMarker.ts +6 -2
@@ -11,7 +11,6 @@ var _theming = require("../theming");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  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); }
13
13
  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; }
14
- 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); }
15
14
  /* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
16
15
  const Elevation = _ref => {
17
16
  let {
@@ -28,11 +27,24 @@ const Elevation = _ref => {
28
27
  colors
29
28
  } = theme;
30
29
  const borderRadius = radius;
31
- return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
30
+ return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
31
+ ...rest,
32
32
  style: [{
33
33
  borderRadius,
34
34
  backgroundColor: colors.surface
35
35
  }, elevation ? (0, _shadow.default)(elevation) : null, style]
36
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
37
+ style: {
38
+ overflow: "hidden",
39
+ borderRadius
40
+ }
41
+ }, children));
42
+ };
43
+ var _default = (0, _theming.withTheme)(Elevation);
44
+ exports.default = _default;
45
+ borderRadius,
46
+ backgroundColor: colors.surface
47
+ }, elevation ? (0, _shadow.default)(elevation) : null, style]
36
48
  }), /*#__PURE__*/React.createElement(_reactNative.View, {
37
49
  style: {
38
50
  overflow: "hidden",
@@ -10,10 +10,6 @@ var _theming = require("../theming");
10
10
  var _utilities = require("../utilities");
11
11
  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); }
12
12
  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; }
13
- 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
- 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; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- 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); }
17
13
  const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
18
14
  const FOCUS_ANIMATION_DURATION = 150;
19
15
  const BLUR_ANIMATION_DURATION = 180;
@@ -21,7 +17,7 @@ const ICON_SIZE = 24;
21
17
  class TextField extends React.Component {
22
18
  constructor() {
23
19
  super(...arguments);
24
- _defineProperty(this, "state", {
20
+ this.state = {
25
21
  nativeProps: {},
26
22
  labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
27
23
  focused: false,
@@ -30,47 +26,46 @@ class TextField extends React.Component {
30
26
  measured: false,
31
27
  width: 0
32
28
  }
33
- });
34
- _defineProperty(this, "_timer", setTimeout(() => {}, 0));
35
- _defineProperty(this, "_showPlaceholder", () => {
29
+ };
30
+ this._timer = setTimeout(() => {}, 0);
31
+ this._showPlaceholder = () => {
36
32
  clearTimeout(this._timer);
37
-
38
33
  // Set the placeholder in a delay to offset the label animation
39
34
  // If we show it immediately, they'll overlap and look ugly
40
35
  this._timer = setTimeout(() => this.setState({
41
36
  placeholder: this.props.placeholder
42
37
  }), 50);
43
- });
44
- _defineProperty(this, "_hidePlaceholder", () => this.setState({
38
+ };
39
+ this._hidePlaceholder = () => this.setState({
45
40
  placeholder: ""
46
- }));
47
- _defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
41
+ });
42
+ this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
48
43
  toValue: 1,
49
44
  duration: FOCUS_ANIMATION_DURATION,
50
45
  useNativeDriver: true
51
- }).start());
52
- _defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
46
+ }).start();
47
+ this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
53
48
  toValue: 0,
54
49
  duration: BLUR_ANIMATION_DURATION,
55
50
  useNativeDriver: true
56
- }).start());
57
- _defineProperty(this, "_handleFocus", () => {
51
+ }).start();
52
+ this._handleFocus = () => {
58
53
  if (this.props.disabled) {
59
54
  return;
60
55
  }
61
56
  this.setState({
62
57
  focused: true
63
58
  });
64
- });
65
- _defineProperty(this, "_handleBlur", () => {
59
+ };
60
+ this._handleBlur = () => {
66
61
  if (this.props.disabled) {
67
62
  return;
68
63
  }
69
64
  this.setState({
70
65
  focused: false
71
66
  });
72
- });
73
- _defineProperty(this, "_handleChangeText", value => {
67
+ };
68
+ this._handleChangeText = value => {
74
69
  if (this.props.disabled) {
75
70
  return;
76
71
  }
@@ -85,8 +80,8 @@ class TextField extends React.Component {
85
80
  });
86
81
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
87
82
  }
88
- });
89
- _defineProperty(this, "_root", undefined);
83
+ };
84
+ this._root = undefined;
90
85
  }
91
86
  static getDerivedStateFromProps(nextProps, prevState) {
92
87
  return {
@@ -173,7 +168,9 @@ class TextField extends React.Component {
173
168
  roundness,
174
169
  disabledOpacity
175
170
  },
176
- render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
171
+ render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, {
172
+ ...props
173
+ }),
177
174
  ...rest
178
175
  } = this.props;
179
176
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -313,9 +310,10 @@ class TextField extends React.Component {
313
310
  } = _reactNative.StyleSheet.flatten(style || {});
314
311
  return /*#__PURE__*/React.createElement(_reactNative.View, {
315
312
  style: [styles.container, styleProp]
316
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
313
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
314
+ ...leftIconProps,
317
315
  style: leftIconStyle
318
- })) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
316
+ }) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
319
317
  style: (0, _utilities.applyStyles)([containerStyle], {
320
318
  height: style === null || style === void 0 ? void 0 : style.height,
321
319
  backgroundColor: bgColor,
@@ -383,9 +381,10 @@ class TextField extends React.Component {
383
381
  style: {
384
382
  justifyContent: type === "solid" ? "center" : undefined
385
383
  }
386
- }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
384
+ }, /*#__PURE__*/React.createElement(Icon, {
385
+ ...leftIconProps,
387
386
  style: leftIconStyle
388
- }))) : null, render({
387
+ })) : null, render({
389
388
  ref: c => {
390
389
  this._root = c;
391
390
  },
@@ -423,6 +422,55 @@ class TextField extends React.Component {
423
422
  }
424
423
  var _default = (0, _theming.withTheme)(TextField);
425
424
  exports.default = _default;
425
+ const styles = _reactNative.StyleSheet.create({
426
+ container: {
427
+ alignSelf: "stretch"
428
+ },
429
+ placeholder: {
430
+ position: "absolute",
431
+ left: 0
432
+ },
433
+ underline: {
434
+ position: "absolute",
435
+ left: 0,
436
+ right: 0,
437
+ bottom: 0,
438
+ height: 2
439
+ },
440
+ input: {
441
+ flexGrow: 1,
442
+ justifyContent: "center",
443
+ textAlignVertical: "center",
444
+ margin: 0,
445
+ textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
446
+ }
447
+ });_handleFocus,
448
+ onBlur: this._handleBlur,
449
+ underlineColorAndroid: "transparent",
450
+ style: inputStyles,
451
+ ...rest,
452
+ ...this.state.nativeProps,
453
+ value: this.state.value
454
+ })), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
455
+ name: rightIconName,
456
+ size: ICON_SIZE,
457
+ color: colors.light,
458
+ style: {
459
+ position: "absolute",
460
+ right: 16,
461
+ marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
462
+ }
463
+ }) : null, assistiveText ? /*#__PURE__*/React.createElement(_reactNative.Text, {
464
+ style: [{
465
+ color: error ? colors.error : colors.light,
466
+ marginTop: 8,
467
+ marginLeft: assistiveTextLeftMargin
468
+ }]
469
+ }, assistiveText) : null);
470
+ }
471
+ }
472
+ var _default = (0, _theming.withTheme)(TextField);
473
+ exports.default = _default;
426
474
  const styles = _reactNative.StyleSheet.create({
427
475
  container: {
428
476
  alignSelf: "stretch"
@@ -10,7 +10,7 @@ const SEED_DATA = {
10
10
  tag: "ActionSheet",
11
11
  description: "Action Sheet container",
12
12
  category: _types.COMPONENT_TYPES.actionsheet,
13
- stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins],
13
+ stylesPanelSections: [_types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects],
14
14
  props: {
15
15
  visible: (0, _types.createStaticBoolProp)({
16
16
  group: _types.GROUPS.data,
@@ -9,7 +9,7 @@ const SEED_DATA = {
9
9
  name: "Action Sheet Cancel",
10
10
  tag: "ActionSheetCancel",
11
11
  description: "Action Sheet cancel",
12
- stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins],
12
+ stylesPanelSections: [_types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects],
13
13
  category: _types.COMPONENT_TYPES.actionsheet,
14
14
  triggers: [_types.Triggers.OnPress],
15
15
  props: {
@@ -10,7 +10,7 @@ const SEED_DATA = {
10
10
  tag: "ActionSheetItem",
11
11
  description: "Action Sheet item",
12
12
  category: _types.COMPONENT_TYPES.actionsheet,
13
- stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins],
13
+ stylesPanelSections: [_types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects],
14
14
  triggers: [_types.Triggers.OnPress],
15
15
  layout: {
16
16
  textAlign: "center"
@@ -11,17 +11,13 @@ const SEED_DATA = {
11
11
  description: "A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
12
12
  category: _types.COMPONENT_TYPES.bottomsheet,
13
13
  stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
- layout: {
15
- paddingHorizontal: 16,
16
- paddingVertical: 10
17
- },
18
14
  triggers: [_types.Triggers.OnSettle],
19
15
  props: {
20
16
  onSettle: (0, _types.createActionProp)({
21
17
  label: "On settle",
22
18
  description: "Action to execute when sheet settles on a snap point"
23
19
  }),
24
- snapPoints: (0, _types.createStaticArrayProp)({
20
+ snapPoints: (0, _types.createArrayProp)({
25
21
  label: "Snap points",
26
22
  description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
27
23
  defaultValue: ["10%", "50%", "80%"]
@@ -34,7 +30,7 @@ const SEED_DATA = {
34
30
  }),
35
31
  showHandle: (0, _types.createStaticBoolProp)({
36
32
  label: "Show handle",
37
- description: "Whether to show the top handle or not",
33
+ description: "Whether to show the top sheet handle or not",
38
34
  defaultValue: true
39
35
  }),
40
36
  handleColor: (0, _types.createColorProp)({
@@ -9,7 +9,7 @@ const SEED_DATA = {
9
9
  name: "Map Callout",
10
10
  tag: "MapCallout",
11
11
  packageName: "@draftbit/maps",
12
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
12
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects],
13
13
  description: "An info window to display on top of a marker when it is clicked",
14
14
  category: _types.COMPONENT_TYPES.map,
15
15
  triggers: [_types.Triggers.OnPress],
@@ -11,7 +11,7 @@ const SEED_DATA = {
11
11
  packageName: "@draftbit/maps",
12
12
  description: "A marker to show inside map view",
13
13
  category: _types.COMPONENT_TYPES.map,
14
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects],
15
15
  layout: {},
16
16
  props: {
17
17
  latitude: (0, _types.createNumberProp)({
@@ -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 React from "react";
2
3
  import { View } from "react-native";
3
4
  import Text from "../Text";
@@ -19,16 +20,6 @@ const RadioButtonFieldGroup = _ref => {
19
20
  fontSize: theme.typography.headline4.fontSize,
20
21
  color: theme.typography.headline4.color
21
22
  }, labelStyle]
22
- }, label), /*#__PURE__*/React.createElement(RadioButtonGroup, {
23
- theme: theme,
24
- ...rest
25
- }, children));
26
- };
27
- export default withTheme(RadioButtonFieldGroup);}, /*#__PURE__*/React.createElement(Text, {
28
- style: [{
29
- fontSize: theme.typography.headline4.fontSize,
30
- color: theme.typography.headline4.color
31
- }, labelStyle]
32
23
  }, label), /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({
33
24
  theme: theme
34
25
  }, rest), children));
@@ -4,7 +4,7 @@ export const SEED_DATA = {
4
4
  tag: "ActionSheet",
5
5
  description: "Action Sheet container",
6
6
  category: COMPONENT_TYPES.actionsheet,
7
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
7
+ stylesPanelSections: [StylesPanelSections.Margins, StylesPanelSections.Effects],
8
8
  props: {
9
9
  visible: createStaticBoolProp({
10
10
  group: GROUPS.data,
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Action Sheet Cancel",
4
4
  tag: "ActionSheetCancel",
5
5
  description: "Action Sheet cancel",
6
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
6
+ stylesPanelSections: [StylesPanelSections.Margins, StylesPanelSections.Effects],
7
7
  category: COMPONENT_TYPES.actionsheet,
8
8
  triggers: [Triggers.OnPress],
9
9
  props: {
@@ -4,7 +4,7 @@ export const SEED_DATA = {
4
4
  tag: "ActionSheetItem",
5
5
  description: "Action Sheet item",
6
6
  category: COMPONENT_TYPES.actionsheet,
7
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
7
+ stylesPanelSections: [StylesPanelSections.Margins, StylesPanelSections.Effects],
8
8
  triggers: [Triggers.OnPress],
9
9
  layout: {
10
10
  textAlign: "center"
@@ -1,21 +1,17 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticArrayProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Bottom Sheet",
4
4
  tag: "BottomSheet",
5
5
  description: "A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
6
6
  category: COMPONENT_TYPES.bottomsheet,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {
9
- paddingHorizontal: 16,
10
- paddingVertical: 10
11
- },
12
8
  triggers: [Triggers.OnSettle],
13
9
  props: {
14
10
  onSettle: createActionProp({
15
11
  label: "On settle",
16
12
  description: "Action to execute when sheet settles on a snap point"
17
13
  }),
18
- snapPoints: createStaticArrayProp({
14
+ snapPoints: createArrayProp({
19
15
  label: "Snap points",
20
16
  description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
21
17
  defaultValue: ["10%", "50%", "80%"]
@@ -28,7 +24,7 @@ export const SEED_DATA = {
28
24
  }),
29
25
  showHandle: createStaticBoolProp({
30
26
  label: "Show handle",
31
- description: "Whether to show the top handle or not",
27
+ description: "Whether to show the top sheet handle or not",
32
28
  defaultValue: true
33
29
  }),
34
30
  handleColor: createColorProp({
@@ -1,9 +1,9 @@
1
- import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, Triggers, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, Triggers, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Map Callout",
4
4
  tag: "MapCallout",
5
5
  packageName: "@draftbit/maps",
6
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
6
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Effects],
7
7
  description: "An info window to display on top of a marker when it is clicked",
8
8
  category: COMPONENT_TYPES.map,
9
9
  triggers: [Triggers.OnPress],
@@ -1,11 +1,11 @@
1
- import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Map Marker",
4
4
  tag: "MapMarker",
5
5
  packageName: "@draftbit/maps",
6
6
  description: "A marker to show inside map view",
7
7
  category: COMPONENT_TYPES.map,
8
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Effects],
9
9
  layout: {},
10
10
  props: {
11
11
  latitude: createNumberProp({
@@ -1 +1 @@
1
- {"version":3,"file":"ActionSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ActionSheet.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAYrB,CAAC"}
1
+ {"version":3,"file":"ActionSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ActionSheet.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAerB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionSheetCancel.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ActionSheetCancel.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBrB,CAAC"}
1
+ {"version":3,"file":"ActionSheetCancel.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ActionSheetCancel.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionSheetItem.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ActionSheetItem.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBrB,CAAC"}
1
+ {"version":3,"file":"ActionSheetItem.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ActionSheetItem.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBrB,CAAC"}
@@ -4,10 +4,6 @@ export declare const SEED_DATA: {
4
4
  description: string;
5
5
  category: string;
6
6
  stylesPanelSections: string[];
7
- layout: {
8
- paddingHorizontal: number;
9
- paddingVertical: number;
10
- };
11
7
  triggers: string[];
12
8
  props: {
13
9
  onSettle: {
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/BottomSheet.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkErB,CAAC"}
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/BottomSheet.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MapCallout.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapCallout.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBrB,CAAC"}
1
+ {"version":3,"file":"MapCallout.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapCallout.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MapMarker.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapMarker.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CrB,CAAC"}
1
+ {"version":3,"file":"MapMarker.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapMarker.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.9.1-2ce152.2+2ce1524",
3
+ "version": "46.9.1-328e35.2+328e35b",
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.9.1-2ce152.2+2ce1524",
44
+ "@draftbit/types": "^46.9.1-328e35.2+328e35b",
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",
@@ -54,11 +54,11 @@
54
54
  "lodash.omit": "^4.5.0",
55
55
  "lodash.tonumber": "^4.0.3",
56
56
  "react-native-deck-swiper": "^2.0.12",
57
- "react-native-gesture-handler": "^2.9.0",
57
+ "react-native-gesture-handler": "~2.5.0",
58
58
  "react-native-markdown-display": "^7.0.0-alpha.2",
59
59
  "react-native-modal-datetime-picker": "^13.0.0",
60
60
  "react-native-pager-view": "5.4.24",
61
- "react-native-reanimated": "^2.14.4",
61
+ "react-native-reanimated": "~2.9.1",
62
62
  "react-native-shadow-2": "^7.0.6",
63
63
  "react-native-svg": "12.3.0",
64
64
  "react-native-tab-view": "^3.4.0",
@@ -98,5 +98,5 @@
98
98
  ]
99
99
  ]
100
100
  },
101
- "gitHead": "2ce15244c2e4b0cc69a31f3e370812a188816566"
101
+ "gitHead": "328e35ba4ee3fa30ed3d415bf1d5826b7e8b1624"
102
102
  }
@@ -4,7 +4,10 @@ export const SEED_DATA = {
4
4
  tag: "ActionSheet",
5
5
  description: "Action Sheet container",
6
6
  category: COMPONENT_TYPES.actionsheet,
7
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Margins,
9
+ StylesPanelSections.Effects,
10
+ ],
8
11
  props: {
9
12
  visible: createStaticBoolProp({
10
13
  group: GROUPS.data,
@@ -10,7 +10,10 @@ export const SEED_DATA = {
10
10
  tag: "ActionSheet",
11
11
  description: "Action Sheet container",
12
12
  category: COMPONENT_TYPES.actionsheet,
13
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
13
+ stylesPanelSections: [
14
+ StylesPanelSections.Margins,
15
+ StylesPanelSections.Effects,
16
+ ],
14
17
  props: {
15
18
  visible: createStaticBoolProp({
16
19
  group: GROUPS.data,
@@ -3,7 +3,10 @@ export const SEED_DATA = {
3
3
  name: "Action Sheet Cancel",
4
4
  tag: "ActionSheetCancel",
5
5
  description: "Action Sheet cancel",
6
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
6
+ stylesPanelSections: [
7
+ StylesPanelSections.Margins,
8
+ StylesPanelSections.Effects,
9
+ ],
7
10
  category: COMPONENT_TYPES.actionsheet,
8
11
  triggers: [Triggers.OnPress],
9
12
  props: {
@@ -12,7 +12,10 @@ export const SEED_DATA = {
12
12
  name: "Action Sheet Cancel",
13
13
  tag: "ActionSheetCancel",
14
14
  description: "Action Sheet cancel",
15
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
15
+ stylesPanelSections: [
16
+ StylesPanelSections.Margins,
17
+ StylesPanelSections.Effects,
18
+ ],
16
19
  category: COMPONENT_TYPES.actionsheet,
17
20
  triggers: [Triggers.OnPress],
18
21
  props: {
@@ -4,7 +4,10 @@ export const SEED_DATA = {
4
4
  tag: "ActionSheetItem",
5
5
  description: "Action Sheet item",
6
6
  category: COMPONENT_TYPES.actionsheet,
7
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Margins,
9
+ StylesPanelSections.Effects,
10
+ ],
8
11
  triggers: [Triggers.OnPress],
9
12
  layout: {
10
13
  textAlign: "center",
@@ -13,7 +13,10 @@ export const SEED_DATA = {
13
13
  tag: "ActionSheetItem",
14
14
  description: "Action Sheet item",
15
15
  category: COMPONENT_TYPES.actionsheet,
16
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
16
+ stylesPanelSections: [
17
+ StylesPanelSections.Margins,
18
+ StylesPanelSections.Effects,
19
+ ],
17
20
  triggers: [Triggers.OnPress],
18
21
  layout: {
19
22
  textAlign: "center",
@@ -1,18 +1,17 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticArrayProp, createStaticNumberProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Bottom Sheet",
4
4
  tag: "BottomSheet",
5
5
  description: "A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
6
6
  category: COMPONENT_TYPES.bottomsheet,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: { paddingHorizontal: 16, paddingVertical: 10 },
9
8
  triggers: [Triggers.OnSettle],
10
9
  props: {
11
10
  onSettle: createActionProp({
12
11
  label: "On settle",
13
12
  description: "Action to execute when sheet settles on a snap point",
14
13
  }),
15
- snapPoints: createStaticArrayProp({
14
+ snapPoints: createArrayProp({
16
15
  label: "Snap points",
17
16
  description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
18
17
  defaultValue: ["10%", "50%", "80%"],
@@ -25,7 +24,7 @@ export const SEED_DATA = {
25
24
  }),
26
25
  showHandle: createStaticBoolProp({
27
26
  label: "Show handle",
28
- description: "Whether to show the top handle or not",
27
+ description: "Whether to show the top sheet handle or not",
29
28
  defaultValue: true,
30
29
  }),
31
30
  handleColor: createColorProp({
@@ -5,8 +5,8 @@ import {
5
5
  Triggers,
6
6
  createActionProp,
7
7
  createColorProp,
8
- createStaticArrayProp,
9
8
  createStaticNumberProp,
9
+ createArrayProp,
10
10
  } from "@draftbit/types";
11
11
 
12
12
  export const SEED_DATA = {
@@ -16,14 +16,13 @@ export const SEED_DATA = {
16
16
  "A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
17
17
  category: COMPONENT_TYPES.bottomsheet,
18
18
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
19
- layout: { paddingHorizontal: 16, paddingVertical: 10 },
20
19
  triggers: [Triggers.OnSettle],
21
20
  props: {
22
21
  onSettle: createActionProp({
23
22
  label: "On settle",
24
23
  description: "Action to execute when sheet settles on a snap point",
25
24
  }),
26
- snapPoints: createStaticArrayProp({
25
+ snapPoints: createArrayProp({
27
26
  label: "Snap points",
28
27
  description:
29
28
  "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
@@ -37,7 +36,7 @@ export const SEED_DATA = {
37
36
  }),
38
37
  showHandle: createStaticBoolProp({
39
38
  label: "Show handle",
40
- description: "Whether to show the top handle or not",
39
+ description: "Whether to show the top sheet handle or not",
41
40
  defaultValue: true,
42
41
  }),
43
42
  handleColor: createColorProp({
@@ -1,9 +1,13 @@
1
- import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, Triggers, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, Triggers, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Map Callout",
4
4
  tag: "MapCallout",
5
5
  packageName: "@draftbit/maps",
6
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
6
+ stylesPanelSections: [
7
+ StylesPanelSections.Size,
8
+ StylesPanelSections.Margins,
9
+ StylesPanelSections.Effects,
10
+ ],
7
11
  description: "An info window to display on top of a marker when it is clicked",
8
12
  category: COMPONENT_TYPES.map,
9
13
  triggers: [Triggers.OnPress],
@@ -4,14 +4,18 @@ import {
4
4
  createBoolProp,
5
5
  GROUPS,
6
6
  Triggers,
7
- CONTAINER_COMPONENT_STYLES_SECTIONS,
7
+ StylesPanelSections,
8
8
  } from "@draftbit/types";
9
9
 
10
10
  export const SEED_DATA = {
11
11
  name: "Map Callout",
12
12
  tag: "MapCallout",
13
13
  packageName: "@draftbit/maps",
14
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ stylesPanelSections: [
15
+ StylesPanelSections.Size,
16
+ StylesPanelSections.Margins,
17
+ StylesPanelSections.Effects,
18
+ ],
15
19
  description:
16
20
  "An info window to display on top of a marker when it is clicked",
17
21
  category: COMPONENT_TYPES.map,
@@ -1,11 +1,15 @@
1
- import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Map Marker",
4
4
  tag: "MapMarker",
5
5
  packageName: "@draftbit/maps",
6
6
  description: "A marker to show inside map view",
7
7
  category: COMPONENT_TYPES.map,
8
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ stylesPanelSections: [
9
+ StylesPanelSections.Size,
10
+ StylesPanelSections.Margins,
11
+ StylesPanelSections.Effects,
12
+ ],
9
13
  layout: {},
10
14
  props: {
11
15
  latitude: createNumberProp({
@@ -5,7 +5,7 @@ import {
5
5
  createNumberProp,
6
6
  createTextProp,
7
7
  GROUPS,
8
- CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ StylesPanelSections,
9
9
  } from "@draftbit/types";
10
10
 
11
11
  export const SEED_DATA = {
@@ -14,7 +14,11 @@ export const SEED_DATA = {
14
14
  packageName: "@draftbit/maps",
15
15
  description: "A marker to show inside map view",
16
16
  category: COMPONENT_TYPES.map,
17
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
17
+ stylesPanelSections: [
18
+ StylesPanelSections.Size,
19
+ StylesPanelSections.Margins,
20
+ StylesPanelSections.Effects,
21
+ ],
18
22
  layout: {},
19
23
  props: {
20
24
  latitude: createNumberProp({