@draftbit/core 46.4.4-7f27fb.2 → 46.4.4-808a01.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 (71) hide show
  1. package/lib/commonjs/components/AnimatedCircularProgress.js +12 -2
  2. package/lib/commonjs/components/AspectRatio.js +19 -2
  3. package/lib/commonjs/components/AvatarEdit.js +17 -5
  4. package/lib/commonjs/components/Banner.js +24 -4
  5. package/lib/commonjs/components/Button.js +32 -11
  6. package/lib/commonjs/components/CardBlock.js +15 -5
  7. package/lib/commonjs/components/CardContainer.js +15 -5
  8. package/lib/commonjs/components/CardContainerRating.js +15 -5
  9. package/lib/commonjs/components/CardContainerShortImage.js +17 -5
  10. package/lib/commonjs/components/Carousel.js +34 -10
  11. package/lib/commonjs/components/Checkbox/CheckboxRow.js +24 -6
  12. package/lib/commonjs/components/Checkbox/context.js +1 -1
  13. package/lib/commonjs/components/CircleImage.js +16 -2
  14. package/lib/commonjs/components/CircularProgress.js +15 -7
  15. package/lib/commonjs/components/DeprecatedCardWrapper.js +17 -2
  16. package/lib/commonjs/components/DeprecatedFAB.js +22 -4
  17. package/lib/commonjs/components/Divider.js +16 -2
  18. package/lib/commonjs/components/FAB.js +20 -5
  19. package/lib/commonjs/components/FormRow.js +17 -3
  20. package/lib/commonjs/components/IconButton.js +22 -5
  21. package/lib/commonjs/components/Layout.js +40 -19
  22. package/lib/commonjs/components/NumberInput.js +13 -2
  23. package/lib/commonjs/components/Picker/PickerComponent.web.js +24 -5
  24. package/lib/commonjs/components/Portal/PortalConsumer.js +10 -8
  25. package/lib/commonjs/components/Portal/PortalHost.js +27 -15
  26. package/lib/commonjs/components/Portal/PortalManager.js +19 -11
  27. package/lib/commonjs/components/ProgressBar.js +23 -7
  28. package/lib/commonjs/components/RadioButton/RadioButton.js +14 -3
  29. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +24 -6
  30. package/lib/commonjs/components/ScreenContainer.js +23 -5
  31. package/lib/commonjs/components/Slider.js +24 -5
  32. package/lib/commonjs/components/StarRating.js +25 -5
  33. package/lib/commonjs/components/StepIndicator.js +34 -16
  34. package/lib/commonjs/components/Surface.js +14 -3
  35. package/lib/commonjs/components/Text.js +37 -11
  36. package/lib/commonjs/components/TextField.js +63 -30
  37. package/lib/commonjs/components/ToggleButton.js +18 -3
  38. package/lib/commonjs/components/Touchable.js +16 -2
  39. package/lib/commonjs/index.js +0 -14
  40. package/lib/commonjs/mappings/AudioPlayer.js +32 -2
  41. package/lib/module/components/Checkbox/context.js +1 -1
  42. package/lib/module/components/ToggleButton.js +3 -17
  43. package/lib/module/index.js +0 -1
  44. package/lib/module/mappings/AudioPlayer.js +33 -3
  45. package/lib/typescript/src/index.d.ts +0 -1
  46. package/lib/typescript/src/mappings/AudioPlayer.d.ts +62 -1
  47. package/package.json +4 -6
  48. package/src/index.js +0 -1
  49. package/src/index.tsx +0 -1
  50. package/src/mappings/AudioPlayer.js +39 -2
  51. package/src/mappings/AudioPlayer.ts +41 -1
  52. package/lib/commonjs/components/TabView/TabView.js +0 -102
  53. package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
  54. package/lib/commonjs/components/TabView/index.js +0 -23
  55. package/lib/commonjs/mappings/TabView.js +0 -79
  56. package/lib/module/components/TabView/TabView.js +0 -87
  57. package/lib/module/components/TabView/TabViewItem.js +0 -18
  58. package/lib/module/components/TabView/index.js +0 -2
  59. package/lib/module/mappings/TabView.js +0 -70
  60. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
  61. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
  62. package/lib/typescript/src/components/TabView/index.d.ts +0 -2
  63. package/lib/typescript/src/mappings/TabView.d.ts +0 -111
  64. package/src/components/TabView/TabView.js +0 -34
  65. package/src/components/TabView/TabView.tsx +0 -97
  66. package/src/components/TabView/TabViewItem.js +0 -5
  67. package/src/components/TabView/TabViewItem.tsx +0 -21
  68. package/src/components/TabView/index.js +0 -2
  69. package/src/components/TabView/index.tsx +0 -2
  70. package/src/mappings/TabView.js +0 -73
  71. package/src/mappings/TabView.ts +0 -80
@@ -17,10 +17,6 @@ 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
-
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
20
  const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
25
21
 
26
22
  const FOCUS_ANIMATION_DURATION = 150;
@@ -30,8 +26,7 @@ const ICON_SIZE = 24;
30
26
  class TextField extends React.Component {
31
27
  constructor() {
32
28
  super(...arguments);
33
-
34
- _defineProperty(this, "state", {
29
+ this.state = {
35
30
  labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
36
31
  focused: false,
37
32
  placeholder: this.props.error ? this.props.placeholder : "",
@@ -39,36 +34,35 @@ class TextField extends React.Component {
39
34
  measured: false,
40
35
  width: 0
41
36
  }
42
- });
43
-
44
- _defineProperty(this, "_timer", setTimeout(() => {}, 0));
37
+ };
38
+ this._timer = setTimeout(() => {}, 0);
45
39
 
46
- _defineProperty(this, "_showPlaceholder", () => {
40
+ this._showPlaceholder = () => {
47
41
  clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
48
42
  // If we show it immediately, they'll overlap and look ugly
49
43
 
50
44
  this._timer = setTimeout(() => this.setState({
51
45
  placeholder: this.props.placeholder
52
46
  }), 50);
53
- });
47
+ };
54
48
 
55
- _defineProperty(this, "_hidePlaceholder", () => this.setState({
49
+ this._hidePlaceholder = () => this.setState({
56
50
  placeholder: ""
57
- }));
51
+ });
58
52
 
59
- _defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
53
+ this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
60
54
  toValue: 1,
61
55
  duration: FOCUS_ANIMATION_DURATION,
62
56
  useNativeDriver: true
63
- }).start());
57
+ }).start();
64
58
 
65
- _defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
59
+ this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
66
60
  toValue: 0,
67
61
  duration: BLUR_ANIMATION_DURATION,
68
62
  useNativeDriver: true
69
- }).start());
63
+ }).start();
70
64
 
71
- _defineProperty(this, "_handleFocus", () => {
65
+ this._handleFocus = () => {
72
66
  if (this.props.disabled) {
73
67
  return;
74
68
  }
@@ -76,9 +70,9 @@ class TextField extends React.Component {
76
70
  this.setState({
77
71
  focused: true
78
72
  });
79
- });
73
+ };
80
74
 
81
- _defineProperty(this, "_handleBlur", () => {
75
+ this._handleBlur = () => {
82
76
  if (this.props.disabled) {
83
77
  return;
84
78
  }
@@ -86,9 +80,9 @@ class TextField extends React.Component {
86
80
  this.setState({
87
81
  focused: false
88
82
  });
89
- });
83
+ };
90
84
 
91
- _defineProperty(this, "_handleChangeText", value => {
85
+ this._handleChangeText = value => {
92
86
  if (this.props.disabled) {
93
87
  return;
94
88
  }
@@ -104,9 +98,9 @@ class TextField extends React.Component {
104
98
  });
105
99
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
106
100
  }
107
- });
101
+ };
108
102
 
109
- _defineProperty(this, "_root", undefined);
103
+ this._root = undefined;
110
104
  }
111
105
 
112
106
  static getDerivedStateFromProps(nextProps, prevState) {
@@ -157,10 +151,11 @@ class TextField extends React.Component {
157
151
  focused: !prevState.focused
158
152
  }));
159
153
  }
160
-
161
154
  /**
162
155
  * @internal
163
156
  */
157
+
158
+
164
159
  setNativeProps(args) {
165
160
  return this._root && this._root.setNativeProps(args);
166
161
  }
@@ -203,7 +198,8 @@ class TextField extends React.Component {
203
198
  roundness,
204
199
  disabledOpacity
205
200
  },
206
- render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
201
+ render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, { ...props
202
+ }),
207
203
  ...rest
208
204
  } = this.props;
209
205
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -357,9 +353,9 @@ class TextField extends React.Component {
357
353
 
358
354
  return /*#__PURE__*/React.createElement(_reactNative.View, {
359
355
  style: [styles.container, styleProp]
360
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
356
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
361
357
  style: leftIconStyle
362
- })) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
358
+ }) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
363
359
  style: (0, _utilities.applyStyles)([containerStyle], {
364
360
  height: style === null || style === void 0 ? void 0 : style.height,
365
361
  backgroundColor: bgColor,
@@ -426,9 +422,9 @@ class TextField extends React.Component {
426
422
  style: {
427
423
  justifyContent: type === "solid" ? "center" : undefined
428
424
  }
429
- }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
425
+ }, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
430
426
  style: leftIconStyle
431
- }))) : null, render({
427
+ })) : null, render({
432
428
  ref: c => {
433
429
  this._root = c;
434
430
  },
@@ -469,6 +465,43 @@ var _default = (0, _theming.withTheme)(TextField);
469
465
 
470
466
  exports.default = _default;
471
467
 
468
+ const styles = _reactNative.StyleSheet.create({
469
+ container: {
470
+ alignSelf: "stretch"
471
+ },
472
+ placeholder: {
473
+ position: "absolute",
474
+ left: 0
475
+ },
476
+ underline: {
477
+ position: "absolute",
478
+ left: 0,
479
+ right: 0,
480
+ bottom: 0,
481
+ height: 2
482
+ },
483
+ input: {
484
+ flexGrow: 1,
485
+ justifyContent: "center",
486
+ textAlignVertical: "center",
487
+ margin: 0,
488
+ textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
489
+ }
490
+ });? /*#__PURE__*/React.createElement(_reactNative.Text, {
491
+ style: [{
492
+ color: error ? colors.error : colors.light,
493
+ marginTop: 8,
494
+ marginLeft: assistiveTextLeftMargin
495
+ }]
496
+ }, assistiveText) : null);
497
+ }
498
+
499
+ }
500
+
501
+ var _default = (0, _theming.withTheme)(TextField);
502
+
503
+ exports.default = _default;
504
+
472
505
  const styles = _reactNative.StyleSheet.create({
473
506
  container: {
474
507
  alignSelf: "stretch"
@@ -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 ToggleButton = _ref => {
25
23
  let {
26
24
  Icon,
@@ -58,7 +56,7 @@ const ToggleButton = _ref => {
58
56
  onPress(!internalValue);
59
57
  };
60
58
 
61
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
59
+ return /*#__PURE__*/React.createElement(_IconButton.default, {
62
60
  Icon: Icon,
63
61
  icon: icon,
64
62
  size: iconSize,
@@ -70,6 +68,23 @@ const ToggleButton = _ref => {
70
68
  height,
71
69
  backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
72
70
  borderColor: colors[borderColor]
71
+ }, style],
72
+ ...rest
73
+ });
74
+ };
75
+
76
+ const styles = _reactNative.StyleSheet.create({
77
+ mainContainer: {
78
+ borderWidth: 1
79
+ }
80
+ });
81
+
82
+ var _default = (0, _theming.withTheme)(ToggleButton);
83
+
84
+ exports.default = _default;th,
85
+ height,
86
+ backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
87
+ borderColor: colors[borderColor]
73
88
  }, style]
74
89
  }, rest));
75
90
  };
@@ -11,8 +11,6 @@ var _reactNative = require("react-native");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
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
-
16
14
  function Touchable(_ref) {
17
15
  let {
18
16
  children,
@@ -21,6 +19,22 @@ function Touchable(_ref) {
21
19
  style,
22
20
  ...props
23
21
  } = _ref;
22
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
23
+ onPress: onPress,
24
+ disabled: disabled,
25
+ hitSlop: 8,
26
+ style: _ref2 => {
27
+ let {
28
+ pressed
29
+ } = _ref2;
30
+ return [{
31
+ opacity: pressed || disabled ? 0.75 : 1
32
+ }, style];
33
+ },
34
+ ...props
35
+ }, children);
36
+ }rops
37
+ } = _ref;
24
38
  return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
25
39
  onPress: onPress,
26
40
  disabled: disabled,
@@ -369,18 +369,6 @@ Object.defineProperty(exports, "SwitchRow", {
369
369
  return _Switch.SwitchRow;
370
370
  }
371
371
  });
372
- Object.defineProperty(exports, "TabView", {
373
- enumerable: true,
374
- get: function () {
375
- return _TabView.TabView;
376
- }
377
- });
378
- Object.defineProperty(exports, "TabViewItem", {
379
- enumerable: true,
380
- get: function () {
381
- return _TabView.TabViewItem;
382
- }
383
- });
384
372
  Object.defineProperty(exports, "TextField", {
385
373
  enumerable: true,
386
374
  get: function () {
@@ -484,8 +472,6 @@ var _ActionSheet = require("./components/ActionSheet");
484
472
 
485
473
  var _Swiper = require("./components/Swiper");
486
474
 
487
- var _TabView = require("./components/TabView");
488
-
489
475
  var _Layout = require("./components/Layout");
490
476
 
491
477
  var _index = require("./components/RadioButton/index");
@@ -12,7 +12,17 @@ const SEED_DATA = {
12
12
  tag: "AudioPlayer",
13
13
  description: "Given a source URL, plays sounds & audio!",
14
14
  category: _types.COMPONENT_TYPES.media,
15
- layout: {},
15
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
16
+ layout: {
17
+ backgroundColor: "#eee",
18
+ paddingLeft: 16,
19
+ paddingRight: 16,
20
+ paddingTop: 8,
21
+ paddingBottom: 8,
22
+ borderRadius: 24,
23
+ flexDirection: "row",
24
+ alignItems: "center"
25
+ },
16
26
  props: {
17
27
  source: {
18
28
  group: _types.GROUPS.data,
@@ -23,7 +33,27 @@ const SEED_DATA = {
23
33
  defaultValue: "https://static.draftbit.com/audio/intro-to-draftbit-audio.mp3",
24
34
  formType: _types.FORM_TYPES.sourceUrl,
25
35
  propType: _types.PROP_TYPES.OBJECT
26
- }
36
+ },
37
+ sliderColor: (0, _types.createColorProp)({
38
+ label: "Thumb Color",
39
+ defaultValue: "black"
40
+ }),
41
+ completedTrackColor: (0, _types.createColorProp)({
42
+ label: "Completed Track",
43
+ defaultValue: "white"
44
+ }),
45
+ remainingTrackColor: (0, _types.createColorProp)({
46
+ label: "Remaining Track",
47
+ defaultValue: "#333333"
48
+ }),
49
+ trackThumbSize: (0, _types.createNumberProp)({
50
+ label: "Thumb Size",
51
+ defaultValue: 24
52
+ }),
53
+ playIconColor: (0, _types.createColorProp)({
54
+ label: "Play Icon",
55
+ defaultValue: "black"
56
+ })
27
57
  }
28
58
  };
29
59
  exports.SEED_DATA = SEED_DATA;
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- export let Direction;
2
+ export var Direction;
3
3
 
4
4
  (function (Direction) {
5
5
  Direction["Horizontal"] = "horizontal";
@@ -1,3 +1,5 @@
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
+
1
3
  import * as React from "react";
2
4
  import { withTheme } from "../theming";
3
5
  import { StyleSheet } from "react-native";
@@ -40,29 +42,13 @@ const ToggleButton = _ref => {
40
42
  onPress(!internalValue);
41
43
  };
42
44
 
43
- return /*#__PURE__*/React.createElement(IconButton, {
45
+ return /*#__PURE__*/React.createElement(IconButton, _extends({
44
46
  Icon: Icon,
45
47
  icon: icon,
46
48
  size: iconSize,
47
49
  color: internalValue ? colors[color] : colors[colorSecondary],
48
50
  onPress: handlePress,
49
51
  disabled: disabled,
50
- style: [styles.mainContainer, {
51
- width,
52
- height,
53
- backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
54
- borderColor: colors[borderColor]
55
- }, style],
56
- ...rest
57
- });
58
- };
59
-
60
- const styles = StyleSheet.create({
61
- mainContainer: {
62
- borderWidth: 1
63
- }
64
- });
65
- export default withTheme(ToggleButton);: disabled,
66
52
  style: [styles.mainContainer, {
67
53
  width,
68
54
  height,
@@ -29,7 +29,6 @@ export { default as Touchable } from "./components/Touchable";
29
29
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
30
30
  export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
- export { TabView, TabViewItem } from "./components/TabView";
33
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
34
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
35
34
  /* Deprecated: Fix or Delete! */
@@ -1,10 +1,20 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, StylesPanelSections, createColorProp, createNumberProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Audio Player",
4
4
  tag: "AudioPlayer",
5
5
  description: "Given a source URL, plays sounds & audio!",
6
6
  category: COMPONENT_TYPES.media,
7
- layout: {},
7
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
8
+ layout: {
9
+ backgroundColor: "#eee",
10
+ paddingLeft: 16,
11
+ paddingRight: 16,
12
+ paddingTop: 8,
13
+ paddingBottom: 8,
14
+ borderRadius: 24,
15
+ flexDirection: "row",
16
+ alignItems: "center"
17
+ },
8
18
  props: {
9
19
  source: {
10
20
  group: GROUPS.data,
@@ -15,6 +25,26 @@ export const SEED_DATA = {
15
25
  defaultValue: "https://static.draftbit.com/audio/intro-to-draftbit-audio.mp3",
16
26
  formType: FORM_TYPES.sourceUrl,
17
27
  propType: PROP_TYPES.OBJECT
18
- }
28
+ },
29
+ sliderColor: createColorProp({
30
+ label: "Thumb Color",
31
+ defaultValue: "black"
32
+ }),
33
+ completedTrackColor: createColorProp({
34
+ label: "Completed Track",
35
+ defaultValue: "white"
36
+ }),
37
+ remainingTrackColor: createColorProp({
38
+ label: "Remaining Track",
39
+ defaultValue: "#333333"
40
+ }),
41
+ trackThumbSize: createNumberProp({
42
+ label: "Thumb Size",
43
+ defaultValue: 24
44
+ }),
45
+ playIconColor: createColorProp({
46
+ label: "Play Icon",
47
+ defaultValue: "black"
48
+ })
19
49
  }
20
50
  };
@@ -29,7 +29,6 @@ export { default as Touchable } from "./components/Touchable";
29
29
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
30
30
  export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
- export { TabView, TabViewItem } from "./components/TabView";
33
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
34
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
35
34
  export { default as CardBlock } from "./components/CardBlock";
@@ -3,7 +3,17 @@ export declare const SEED_DATA: {
3
3
  tag: string;
4
4
  description: string;
5
5
  category: string;
6
- layout: {};
6
+ stylesPanelSections: string[];
7
+ layout: {
8
+ backgroundColor: string;
9
+ paddingLeft: number;
10
+ paddingRight: number;
11
+ paddingTop: number;
12
+ paddingBottom: number;
13
+ borderRadius: number;
14
+ flexDirection: string;
15
+ alignItems: string;
16
+ };
7
17
  props: {
8
18
  source: {
9
19
  group: string;
@@ -15,5 +25,56 @@ export declare const SEED_DATA: {
15
25
  formType: string;
16
26
  propType: string;
17
27
  };
28
+ sliderColor: {
29
+ group: string;
30
+ label: string;
31
+ description: string;
32
+ editable: boolean;
33
+ required: boolean;
34
+ defaultValue: null;
35
+ formType: string;
36
+ propType: string;
37
+ };
38
+ completedTrackColor: {
39
+ group: string;
40
+ label: string;
41
+ description: string;
42
+ editable: boolean;
43
+ required: boolean;
44
+ defaultValue: null;
45
+ formType: string;
46
+ propType: string;
47
+ };
48
+ remainingTrackColor: {
49
+ group: string;
50
+ label: string;
51
+ description: string;
52
+ editable: boolean;
53
+ required: boolean;
54
+ defaultValue: null;
55
+ formType: string;
56
+ propType: string;
57
+ };
58
+ trackThumbSize: {
59
+ label: string;
60
+ description: string;
61
+ formType: string;
62
+ propType: string;
63
+ group: string;
64
+ defaultValue: null;
65
+ editable: boolean;
66
+ required: boolean;
67
+ step: number;
68
+ };
69
+ playIconColor: {
70
+ group: string;
71
+ label: string;
72
+ description: string;
73
+ editable: boolean;
74
+ required: boolean;
75
+ defaultValue: null;
76
+ formType: string;
77
+ propType: string;
78
+ };
18
79
  };
19
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-7f27fb.2+7f27fbc",
3
+ "version": "46.4.4-808a01.2+808a01f",
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.4.4-7f27fb.2+7f27fbc",
44
+ "@draftbit/types": "^46.4.4-808a01.2+808a01f",
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,9 +54,7 @@
54
54
  "lodash.omit": "^4.5.0",
55
55
  "lodash.tonumber": "^4.0.3",
56
56
  "react-native-modal-datetime-picker": "^13.0.0",
57
- "react-native-pager-view": "5.4.24",
58
- "react-native-svg": "^12.3.0",
59
- "react-native-tab-view": "^3.0.0",
57
+ "react-native-svg": "12.3.0",
60
58
  "react-native-typography": "^1.4.1",
61
59
  "react-native-web-swiper": "^2.2.3"
62
60
  },
@@ -83,5 +81,5 @@
83
81
  ]
84
82
  ]
85
83
  },
86
- "gitHead": "7f27fbcfba08665618ffd741070ea655167cfafa"
84
+ "gitHead": "808a01f4217781b64477c695613005de9f9e4f2f"
87
85
  }
package/src/index.js CHANGED
@@ -29,7 +29,6 @@ export { default as Touchable } from "./components/Touchable";
29
29
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
30
30
  export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
- export { TabView, TabViewItem } from "./components/TabView";
33
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
34
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
35
34
  /* Deprecated: Fix or Delete! */
package/src/index.tsx CHANGED
@@ -34,7 +34,6 @@ export {
34
34
  ActionSheetCancel,
35
35
  } from "./components/ActionSheet";
36
36
  export { Swiper, SwiperItem } from "./components/Swiper";
37
- export { TabView, TabViewItem } from "./components/TabView";
38
37
 
39
38
  export {
40
39
  Center,
@@ -1,10 +1,27 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, StylesPanelSections, createColorProp, createNumberProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Audio Player",
4
4
  tag: "AudioPlayer",
5
5
  description: "Given a source URL, plays sounds & audio!",
6
6
  category: COMPONENT_TYPES.media,
7
- layout: {},
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Typography,
9
+ StylesPanelSections.Background,
10
+ StylesPanelSections.Borders,
11
+ StylesPanelSections.Size,
12
+ StylesPanelSections.MarginsAndPaddings,
13
+ StylesPanelSections.Position,
14
+ ],
15
+ layout: {
16
+ backgroundColor: "#eee",
17
+ paddingLeft: 16,
18
+ paddingRight: 16,
19
+ paddingTop: 8,
20
+ paddingBottom: 8,
21
+ borderRadius: 24,
22
+ flexDirection: "row",
23
+ alignItems: "center",
24
+ },
8
25
  props: {
9
26
  source: {
10
27
  group: GROUPS.data,
@@ -16,5 +33,25 @@ export const SEED_DATA = {
16
33
  formType: FORM_TYPES.sourceUrl,
17
34
  propType: PROP_TYPES.OBJECT,
18
35
  },
36
+ sliderColor: createColorProp({
37
+ label: "Thumb Color",
38
+ defaultValue: "black",
39
+ }),
40
+ completedTrackColor: createColorProp({
41
+ label: "Completed Track",
42
+ defaultValue: "white",
43
+ }),
44
+ remainingTrackColor: createColorProp({
45
+ label: "Remaining Track",
46
+ defaultValue: "#333333",
47
+ }),
48
+ trackThumbSize: createNumberProp({
49
+ label: "Thumb Size",
50
+ defaultValue: 24,
51
+ }),
52
+ playIconColor: createColorProp({
53
+ label: "Play Icon",
54
+ defaultValue: "black",
55
+ }),
19
56
  },
20
57
  };