@draftbit/core 46.4.2-48e5c7.2 → 46.4.3-64fdb2.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/Accordion/AccordionItem.js +25 -5
  2. package/lib/commonjs/components/CardContainer.js +15 -5
  3. package/lib/commonjs/components/CircleImage.js +16 -2
  4. package/lib/commonjs/components/Container.js +17 -5
  5. package/lib/commonjs/components/DeprecatedFAB.js +22 -4
  6. package/lib/commonjs/components/Divider.js +16 -2
  7. package/lib/commonjs/components/NumberInput.js +13 -2
  8. package/lib/commonjs/components/Picker/PickerComponent.android.js +24 -5
  9. package/lib/commonjs/components/Picker/PickerComponent.ios.js +42 -13
  10. package/lib/commonjs/components/ScreenContainer.js +23 -5
  11. package/lib/commonjs/components/TextField.js +63 -30
  12. package/lib/commonjs/constants.js +1 -1
  13. package/lib/commonjs/index.js +0 -8
  14. package/lib/commonjs/mappings/Button.js +12 -1
  15. package/lib/commonjs/mappings/StarRating.js +6 -2
  16. package/lib/module/components/Portal/PortalHost.js +26 -15
  17. package/lib/module/components/RadioButton/RadioButton.js +15 -2
  18. package/lib/module/index.js +1 -2
  19. package/lib/module/mappings/Button.js +12 -1
  20. package/lib/typescript/src/index.d.ts +0 -1
  21. package/package.json +4 -6
  22. package/src/index.js +0 -1
  23. package/src/index.tsx +0 -1
  24. package/src/mappings/Button.js +22 -1
  25. package/src/mappings/Button.ts +22 -1
  26. package/lib/commonjs/components/Youtube.js +0 -73
  27. package/lib/commonjs/mappings/Youtube.js +0 -42
  28. package/lib/module/components/Youtube.js +0 -59
  29. package/lib/module/mappings/Youtube.js +0 -33
  30. package/lib/typescript/src/components/Youtube.d.ts +0 -44
  31. package/lib/typescript/src/mappings/Youtube.d.ts +0 -36
  32. package/src/components/Youtube.js +0 -38
  33. package/src/components/Youtube.tsx +0 -66
  34. package/src/mappings/Youtube.js +0 -33
  35. package/src/mappings/Youtube.ts +0 -39
@@ -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"
@@ -9,7 +9,7 @@ var _reactNative = require("react-native");
9
9
 
10
10
  // @ts-ignore
11
11
  const expo = global.__expo;
12
- const DEFAULT_STATUSBAR_HEIGHT_EXPO = expo !== null && expo !== void 0 && expo.Constants ? expo.Constants.statusBarHeight : 0;
12
+ const DEFAULT_STATUSBAR_HEIGHT_EXPO = (expo === null || expo === void 0 ? void 0 : expo.Constants) ? expo.Constants.statusBarHeight : 0;
13
13
 
14
14
  const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
15
15
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
@@ -393,12 +393,6 @@ Object.defineProperty(exports, "Touchable", {
393
393
  return _Touchable.default;
394
394
  }
395
395
  });
396
- Object.defineProperty(exports, "Youtube", {
397
- enumerable: true,
398
- get: function () {
399
- return _Youtube.default;
400
- }
401
- });
402
396
  Object.defineProperty(exports, "injectIcon", {
403
397
  enumerable: true,
404
398
  get: function () {
@@ -518,8 +512,6 @@ var _Stepper = _interopRequireDefault(require("./components/Stepper"));
518
512
 
519
513
  var _useAuthState = require("./components/useAuthState");
520
514
 
521
- var _Youtube = _interopRequireDefault(require("./components/Youtube"));
522
-
523
515
  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); }
524
516
 
525
517
  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; }
@@ -40,8 +40,19 @@ const SEED_DATA = [{
40
40
  triggers: SEED_DATA_TRIGGERS,
41
41
  props: SEED_DATA_PROPS
42
42
  }, {
43
- name: "Button",
43
+ name: "Button Solid",
44
44
  tag: "ButtonSolid",
45
+ category: _types.COMPONENT_TYPES.deprecated,
46
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
47
+ layout: { ...LAYOUT,
48
+ backgroundColor: "primary",
49
+ textAlign: "center"
50
+ },
51
+ triggers: SEED_DATA_TRIGGERS,
52
+ props: SEED_DATA_PROPS
53
+ }, {
54
+ name: "Button",
55
+ tag: "Button",
45
56
  category: _types.COMPONENT_TYPES.button,
46
57
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
47
58
  layout: { ...LAYOUT,
@@ -25,9 +25,7 @@ const SEED_DATA = {
25
25
  }),
26
26
  fieldName: (0, _types.createFieldNameProp)({
27
27
  defaultValue: "ratingValue",
28
- // this is the name of the variable declared on the screen in Draftbit
29
28
  handlerPropName: "onPress",
30
- // the change handler prop in this component
31
29
  valuePropName: "rating" // the value prop in this component
32
30
 
33
31
  }),
@@ -52,4 +50,10 @@ const SEED_DATA = {
52
50
  })
53
51
  }
54
52
  };
53
+ exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
54
+ label: "Inactive Color",
55
+ defaultValue: "divider"
56
+ })
57
+ }
58
+ };
55
59
  exports.SEED_DATA = SEED_DATA;
@@ -1,5 +1,3 @@
1
- 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; }
2
-
3
1
  import * as React from "react";
4
2
  import { View, StyleSheet } from "react-native";
5
3
  import PortalManager from "./PortalManager";
@@ -33,11 +31,11 @@ export default class PortalHost extends React.Component {
33
31
  constructor() {
34
32
  super(...arguments);
35
33
 
36
- _defineProperty(this, "setManager", manager => {
34
+ this.setManager = manager => {
37
35
  this.manager = manager;
38
- });
36
+ };
39
37
 
40
- _defineProperty(this, "mount", children => {
38
+ this.mount = children => {
41
39
  const key = this.nextKey++;
42
40
 
43
41
  if (this.manager) {
@@ -51,9 +49,9 @@ export default class PortalHost extends React.Component {
51
49
  }
52
50
 
53
51
  return key;
54
- });
52
+ };
55
53
 
56
- _defineProperty(this, "update", (key, children) => {
54
+ this.update = (key, children) => {
57
55
  if (this.manager) {
58
56
  this.manager.update(key, children);
59
57
  } else {
@@ -71,9 +69,9 @@ export default class PortalHost extends React.Component {
71
69
  this.queue.push(op);
72
70
  }
73
71
  }
74
- });
72
+ };
75
73
 
76
- _defineProperty(this, "unmount", key => {
74
+ this.unmount = key => {
77
75
  if (this.manager) {
78
76
  this.manager.unmount(key);
79
77
  } else {
@@ -82,13 +80,10 @@ export default class PortalHost extends React.Component {
82
80
  key
83
81
  });
84
82
  }
85
- });
86
-
87
- _defineProperty(this, "nextKey", 0);
88
-
89
- _defineProperty(this, "queue", []);
83
+ };
90
84
 
91
- _defineProperty(this, "manager", void 0);
85
+ this.nextKey = 0;
86
+ this.queue = [];
92
87
  }
93
88
 
94
89
  componentDidMount() {
@@ -132,6 +127,22 @@ export default class PortalHost extends React.Component {
132
127
  }));
133
128
  }
134
129
 
130
+ }
131
+ PortalHost.displayName = "Portal.Host";
132
+ const styles = StyleSheet.create({
133
+ container: {
134
+ flex: 1
135
+ }
136
+ }); }
137
+ }, /*#__PURE__*/React.createElement(View, {
138
+ style: styles.container,
139
+ collapsable: false,
140
+ pointerEvents: "box-none"
141
+ }, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
142
+ ref: this.setManager
143
+ }));
144
+ }
145
+
135
146
  }
136
147
 
137
148
  _defineProperty(PortalHost, "displayName", "Portal.Host");
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import * as React from "react";
4
2
  import Config from "../Config";
5
3
  import IconButton from "../IconButton";
@@ -34,6 +32,21 @@ const RadioButton = _ref => {
34
32
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
35
33
  };
36
34
 
35
+ return /*#__PURE__*/React.createElement(IconButton, {
36
+ Icon: Icon,
37
+ icon: isSelected ? selectedIcon : unselectedIcon,
38
+ color: isSelected ? color : unselectedColor,
39
+ disabled: disabled,
40
+ onPress: handlePress,
41
+ size: size,
42
+ style: style,
43
+ ...rest
44
+ });
45
+ };
46
+
47
+ export default RadioButton; onValueChange(realValue);
48
+ };
49
+
37
50
  return /*#__PURE__*/React.createElement(IconButton, _extends({
38
51
  Icon: Icon,
39
52
  icon: isSelected ? selectedIcon : unselectedIcon,
@@ -50,5 +50,4 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
50
50
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
51
51
  export { default as Slider } from "./components/Slider";
52
52
  export { default as Stepper } from "./components/Stepper";
53
- export { useAuthState } from "./components/useAuthState";
54
- export { default as Youtube } from "./components/Youtube"; // a comment to fix sourcemap comment issue
53
+ export { useAuthState } from "./components/useAuthState"; // a comment to fix sourcemap comment issue
@@ -32,8 +32,19 @@ export const SEED_DATA = [{
32
32
  triggers: SEED_DATA_TRIGGERS,
33
33
  props: SEED_DATA_PROPS
34
34
  }, {
35
- name: "Button",
35
+ name: "Button Solid",
36
36
  tag: "ButtonSolid",
37
+ category: COMPONENT_TYPES.deprecated,
38
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
39
+ layout: { ...LAYOUT,
40
+ backgroundColor: "primary",
41
+ textAlign: "center"
42
+ },
43
+ triggers: SEED_DATA_TRIGGERS,
44
+ props: SEED_DATA_PROPS
45
+ }, {
46
+ name: "Button",
47
+ tag: "Button",
37
48
  category: COMPONENT_TYPES.button,
38
49
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
39
50
  layout: { ...LAYOUT,
@@ -49,4 +49,3 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
49
49
  export { default as Slider } from "./components/Slider";
50
50
  export { default as Stepper } from "./components/Stepper";
51
51
  export { useAuthState } from "./components/useAuthState";
52
- export { default as Youtube } from "./components/Youtube";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.2-48e5c7.2+48e5c7e",
3
+ "version": "46.4.3-64fdb2.2+64fdb2e",
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.2-48e5c7.2+48e5c7e",
44
+ "@draftbit/types": "^46.4.3-64fdb2.2+64fdb2e",
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",
@@ -56,9 +56,7 @@
56
56
  "react-native-modal-datetime-picker": "^13.0.0",
57
57
  "react-native-svg": "12.3.0",
58
58
  "react-native-typography": "^1.4.1",
59
- "react-native-web-swiper": "^2.2.3",
60
- "react-native-web-webview": "^1.0.2",
61
- "react-native-youtube-iframe": "^2.2.2"
59
+ "react-native-web-swiper": "^2.2.3"
62
60
  },
63
61
  "devDependencies": {
64
62
  "@types/color": "^3.0.1",
@@ -83,5 +81,5 @@
83
81
  ]
84
82
  ]
85
83
  },
86
- "gitHead": "48e5c7eca62e2bdd56ee2cb7a45187c855bc95d0"
84
+ "gitHead": "64fdb2e228cbed7083c1259c136f2fc9484b489e"
87
85
  }
package/src/index.js CHANGED
@@ -50,5 +50,4 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
50
50
  export { default as Slider } from "./components/Slider";
51
51
  export { default as Stepper } from "./components/Stepper";
52
52
  export { useAuthState } from "./components/useAuthState";
53
- export { default as Youtube } from "./components/Youtube";
54
53
  // a comment to fix sourcemap comment issue
package/src/index.tsx CHANGED
@@ -70,6 +70,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
70
70
  export { default as Slider } from "./components/Slider";
71
71
  export { default as Stepper } from "./components/Stepper";
72
72
  export { useAuthState } from "./components/useAuthState";
73
- export { default as Youtube } from "./components/Youtube";
74
73
 
75
74
  // a comment to fix sourcemap comment issue
@@ -43,8 +43,29 @@ export const SEED_DATA = [
43
43
  props: SEED_DATA_PROPS,
44
44
  },
45
45
  {
46
- name: "Button",
46
+ name: "Button Solid",
47
47
  tag: "ButtonSolid",
48
+ category: COMPONENT_TYPES.deprecated,
49
+ stylesPanelSections: [
50
+ StylesPanelSections.Typography,
51
+ StylesPanelSections.Background,
52
+ StylesPanelSections.Borders,
53
+ StylesPanelSections.Size,
54
+ StylesPanelSections.MarginsAndPaddings,
55
+ StylesPanelSections.Position,
56
+ StylesPanelSections.Effects,
57
+ ],
58
+ layout: {
59
+ ...LAYOUT,
60
+ backgroundColor: "primary",
61
+ textAlign: "center",
62
+ },
63
+ triggers: SEED_DATA_TRIGGERS,
64
+ props: SEED_DATA_PROPS,
65
+ },
66
+ {
67
+ name: "Button",
68
+ tag: "Button",
48
69
  category: COMPONENT_TYPES.button,
49
70
  stylesPanelSections: [
50
71
  StylesPanelSections.Typography,
@@ -55,8 +55,29 @@ export const SEED_DATA = [
55
55
  props: SEED_DATA_PROPS,
56
56
  },
57
57
  {
58
- name: "Button",
58
+ name: "Button Solid",
59
59
  tag: "ButtonSolid",
60
+ category: COMPONENT_TYPES.deprecated,
61
+ stylesPanelSections: [
62
+ StylesPanelSections.Typography,
63
+ StylesPanelSections.Background,
64
+ StylesPanelSections.Borders,
65
+ StylesPanelSections.Size,
66
+ StylesPanelSections.MarginsAndPaddings,
67
+ StylesPanelSections.Position,
68
+ StylesPanelSections.Effects,
69
+ ],
70
+ layout: {
71
+ ...LAYOUT,
72
+ backgroundColor: "primary",
73
+ textAlign: "center",
74
+ },
75
+ triggers: SEED_DATA_TRIGGERS,
76
+ props: SEED_DATA_PROPS,
77
+ },
78
+ {
79
+ name: "Button",
80
+ tag: "Button",
60
81
  category: COMPONENT_TYPES.button,
61
82
  stylesPanelSections: [
62
83
  StylesPanelSections.Typography,
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
13
-
14
- var _utilities = require("../utilities");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- const Youtube = _ref => {
19
- let {
20
- videoId,
21
- playlist,
22
- style,
23
- mute,
24
- autoplay
25
- } = _ref;
26
- const {
27
- viewStyles: {
28
- height,
29
- width
30
- }
31
- } = (0, _utilities.extractStyles)(style);
32
- return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
33
- height: height,
34
- width: width,
35
- play: autoplay,
36
- videoId: videoId,
37
- playList: playlist,
38
- mute: mute
39
- });
40
- };
41
-
42
- var _default = Youtube;
43
- exports.default = _default;
44
- const SEED_DATA = {
45
- name: "Youtube",
46
- tag: "Youtube",
47
- description: "Youtube Component",
48
- category: _types.COMPONENT_TYPES.media,
49
- layout: {
50
- width: "100%"
51
- },
52
- props: {
53
- videoId: (0, _types.createTextProp)({
54
- label: "VideoId",
55
- description: "Youtube Video ID"
56
- }),
57
- playlist: (0, _types.createTextProp)({
58
- label: "PlayList",
59
- description: "Playlist ID"
60
- }),
61
- mute: (0, _types.createBoolProp)({
62
- label: "Mute",
63
- description: "Whether to mute video",
64
- defaultValue: false
65
- }),
66
- autoplay: (0, _types.createBoolProp)({
67
- label: "Autoplay",
68
- description: "Whether to Autoplay video",
69
- defaultValue: false
70
- })
71
- }
72
- };
73
- exports.SEED_DATA = SEED_DATA;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = {
11
- name: "Youtube",
12
- tag: "Youtube",
13
- description: "Given a VideoId orPlaylist and play Youtube video",
14
- doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
15
- code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
16
- category: _types.COMPONENT_TYPES.media,
17
- stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Position],
18
- layout: {
19
- height: 250
20
- },
21
- props: {
22
- videoId: (0, _types.createTextProp)({
23
- label: "Video ID",
24
- description: "VideoId of the Youtube video.",
25
- defaultValue: "nwMUpDESXrI"
26
- }),
27
- playlist: (0, _types.createTextProp)({
28
- label: "Playlist",
29
- description: "Playlist of the Youtube videos.",
30
- defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
31
- }),
32
- mute: (0, _types.createStaticBoolProp)({
33
- label: "Mute Audio",
34
- description: "Mute the audio of the video."
35
- }),
36
- autoplay: (0, _types.createStaticBoolProp)({
37
- label: "Auto Play",
38
- description: "Autoplay the video on load."
39
- })
40
- }
41
- };
42
- exports.SEED_DATA = SEED_DATA;