@draftbit/core 46.4.4-6af1ae.2 → 46.4.4-6ea8db.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 (37) hide show
  1. package/lib/commonjs/components/DatePicker/DatePicker.js +17 -8
  2. package/lib/commonjs/components/Stepper.js +1 -0
  3. package/lib/commonjs/index.js +0 -7
  4. package/lib/commonjs/mappings/DatePicker.js +13 -0
  5. package/lib/module/components/Banner.js +4 -25
  6. package/lib/module/components/Checkbox/CheckboxRow.js +6 -24
  7. package/lib/module/components/CircleImage.js +1 -16
  8. package/lib/module/components/DatePicker/DatePicker.js +17 -8
  9. package/lib/module/components/Picker/PickerComponent.web.js +4 -19
  10. package/lib/module/components/Portal/PortalHost.js +15 -45
  11. package/lib/module/components/ScreenContainer.js +4 -21
  12. package/lib/module/components/Stepper.js +3 -2
  13. package/lib/module/components/Switch.js +10 -21
  14. package/lib/module/index.js +0 -1
  15. package/lib/module/mappings/DatePicker.js +14 -1
  16. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +4 -0
  17. package/lib/typescript/src/index.d.ts +0 -1
  18. package/lib/typescript/src/mappings/DatePicker.d.ts +42 -0
  19. package/package.json +4 -6
  20. package/src/components/DatePicker/DatePicker.js +14 -8
  21. package/src/components/DatePicker/DatePicker.tsx +23 -7
  22. package/src/components/Stepper.js +1 -0
  23. package/src/components/Stepper.tsx +1 -1
  24. package/src/index.js +0 -1
  25. package/src/index.tsx +0 -1
  26. package/src/mappings/DatePicker.js +21 -1
  27. package/src/mappings/DatePicker.ts +23 -0
  28. package/lib/commonjs/components/Youtube.js +0 -66
  29. package/lib/commonjs/mappings/Youtube.js +0 -40
  30. package/lib/module/components/Youtube.js +0 -57
  31. package/lib/module/mappings/Youtube.js +0 -33
  32. package/lib/typescript/src/components/Youtube.d.ts +0 -44
  33. package/lib/typescript/src/mappings/Youtube.d.ts +0 -36
  34. package/src/components/Youtube.js +0 -38
  35. package/src/components/Youtube.tsx +0 -66
  36. package/src/mappings/Youtube.js +0 -33
  37. package/src/mappings/Youtube.ts +0 -39
@@ -50,6 +50,5 @@ 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
 
55
54
  // a comment to fix sourcemap comment issue
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, createNumberProp, createColorProp } from "@draftbit/types";
2
2
  const SEED_DATA_PROPS = {
3
3
  label: {
4
4
  label: "Label",
@@ -10,6 +10,12 @@ const SEED_DATA_PROPS = {
10
10
  required: true,
11
11
  group: GROUPS.data
12
12
  },
13
+ labelSize: createNumberProp({
14
+ label: "Label Size"
15
+ }),
16
+ labelColor: createColorProp({
17
+ label: "Label Color"
18
+ }),
13
19
  mode: {
14
20
  label: "Mode",
15
21
  description: "Choose between date, time and datetime",
@@ -21,6 +27,12 @@ const SEED_DATA_PROPS = {
21
27
  options: ["date", "time", "datetime"],
22
28
  group: GROUPS.basic
23
29
  },
30
+ borderColor: createColorProp({
31
+ label: "Border Color"
32
+ }),
33
+ borderColorActive: createColorProp({
34
+ label: "Border Color"
35
+ }),
24
36
  format: {
25
37
  label: "Format",
26
38
  description: "Create an output format for the date.",
@@ -138,6 +150,7 @@ export const SEED_DATA = [{
138
150
  category: COMPONENT_TYPES.input,
139
151
  layout: null,
140
152
  triggers: [Triggers.OnDateChange],
153
+ StylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Size, StylesPanelSections.Typography],
141
154
  props: {
142
155
  ...SEED_DATA_PROPS,
143
156
  type: {
@@ -15,10 +15,14 @@ declare type Props = {
15
15
  mode?: "date" | "time" | "datetime";
16
16
  type?: "solid" | "underline";
17
17
  label?: string;
18
+ labelSize?: number;
19
+ labelColor: string;
18
20
  placeholder?: string;
19
21
  leftIconName?: string;
20
22
  leftIconMode?: "outset" | "inset";
21
23
  rightIconName?: string;
24
+ borderColor?: string;
25
+ borderColorActive?: string;
22
26
  } & IconSlot & TextInputProps;
23
27
  declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
24
28
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
@@ -48,4 +48,3 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
48
48
  export { default as Slider } from "./components/Slider";
49
49
  export { default as Stepper } from "./components/Stepper";
50
50
  export { useAuthState } from "./components/useAuthState";
51
- export { default as Youtube } from "./components/Youtube";
@@ -5,6 +5,7 @@ export declare const SEED_DATA: {
5
5
  category: string;
6
6
  layout: null;
7
7
  triggers: string[];
8
+ StylesPanelSections: string[];
8
9
  props: {
9
10
  type: {
10
11
  label: string;
@@ -27,6 +28,27 @@ export declare const SEED_DATA: {
27
28
  required: boolean;
28
29
  group: string;
29
30
  };
31
+ labelSize: {
32
+ label: string;
33
+ description: string;
34
+ formType: string;
35
+ propType: string;
36
+ group: string;
37
+ defaultValue: null;
38
+ editable: boolean;
39
+ required: boolean;
40
+ step: number;
41
+ };
42
+ labelColor: {
43
+ group: string;
44
+ label: string;
45
+ description: string;
46
+ editable: boolean;
47
+ required: boolean;
48
+ defaultValue: null;
49
+ formType: string;
50
+ propType: string;
51
+ };
30
52
  mode: {
31
53
  label: string;
32
54
  description: string;
@@ -38,6 +60,26 @@ export declare const SEED_DATA: {
38
60
  options: string[];
39
61
  group: string;
40
62
  };
63
+ borderColor: {
64
+ group: string;
65
+ label: string;
66
+ description: string;
67
+ editable: boolean;
68
+ required: boolean;
69
+ defaultValue: null;
70
+ formType: string;
71
+ propType: string;
72
+ };
73
+ borderColorActive: {
74
+ group: string;
75
+ label: string;
76
+ description: string;
77
+ editable: boolean;
78
+ required: boolean;
79
+ defaultValue: null;
80
+ formType: string;
81
+ propType: string;
82
+ };
41
83
  format: {
42
84
  label: string;
43
85
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-6af1ae.2+6af1aed",
3
+ "version": "46.4.4-6ea8db.2+6ea8db0",
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-6af1ae.2+6af1aed",
44
+ "@draftbit/types": "^46.4.4-6ea8db.2+6ea8db0",
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": "6af1aed228e5e0e5ae2ac88c708ea49ba5b59369"
84
+ "gitHead": "6ea8db03ed08c1609f3e2ca301aa3ad79b210d3c"
87
85
  }
@@ -6,6 +6,7 @@ import { withTheme } from "../../theming";
6
6
  import Portal from "../Portal/Portal";
7
7
  import Touchable from "../Touchable";
8
8
  import DateTimePicker from "./DatePickerComponent";
9
+ import { extractStyles } from "../../utilities";
9
10
  const AnimatedText = Animated.createAnimatedComponent(Text);
10
11
  const FOCUS_ANIMATION_DURATION = 150;
11
12
  const BLUR_ANIMATION_DURATION = 180;
@@ -24,7 +25,7 @@ const MONTHS = [
24
25
  "November",
25
26
  "December",
26
27
  ];
27
- const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disabledOpacity }, date, onDateChange = () => { }, defaultValue, disabled = false, mode = "date", format, type = "underline", leftIconName, rightIconName, leftIconMode = "inset", label, placeholder, ...props }) => {
28
+ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disabledOpacity }, date, onDateChange = () => { }, defaultValue, disabled = false, mode = "date", format, type = "underline", leftIconName, rightIconName, leftIconMode = "inset", label, labelSize, labelColor, placeholder, borderColor: inputBorderColor, borderColorActive: inputBorderColorActive, ...props }) => {
28
29
  const [value, setValue] = React.useState(date || defaultValue);
29
30
  React.useEffect(() => {
30
31
  if (defaultValue != null) {
@@ -36,6 +37,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
36
37
  const [placeholder1, setPlaceholder1] = React.useState("");
37
38
  const [focused, setFocused] = React.useState(false);
38
39
  const [labelLayout, setLabelLayout] = React.useState({ measured: false, width: 0 });
40
+ const { textStyles } = extractStyles(style);
39
41
  const getValidDate = () => {
40
42
  if (!value) {
41
43
  return new Date();
@@ -125,8 +127,10 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
125
127
  };
126
128
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
127
129
  const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
128
- const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
129
- const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
130
+ const MAXIMIZED_LABEL_FONT_SIZE = (textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontSize) || typography.subtitle1.fontSize;
131
+ const MINIMIZED_LABEL_FONT_SIZE = labelSize
132
+ ? labelSize
133
+ : typography.caption.fontSize;
130
134
  const hasActiveOutline = focused;
131
135
  let inputTextColor, activeColor, underlineColor, borderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;
132
136
  inputTextColor = colors.strong;
@@ -138,9 +142,9 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
138
142
  backgroundColor = colors.divider;
139
143
  }
140
144
  else {
141
- activeColor = colors.primary;
142
- placeholderColor = borderColor = colors.light;
143
- underlineColor = colors.light;
145
+ activeColor = inputBorderColorActive || colors.primary;
146
+ placeholderColor = borderColor = inputBorderColor || colors.light;
147
+ underlineColor = inputBorderColor || colors.light;
144
148
  backgroundColor = colors.background;
145
149
  }
146
150
  const { lineHeight, ...subtitle1 } = typography.subtitle1;
@@ -202,6 +206,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
202
206
  const labelStyle = {
203
207
  ...typography.subtitle1,
204
208
  top: type === "solid" ? 16 : 0,
209
+ fontFamily: textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontFamily,
205
210
  left: leftIconName && leftIconMode === "inset"
206
211
  ? ICON_SIZE + (type === "solid" ? 16 : 12)
207
212
  : 0,
@@ -245,6 +250,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
245
250
  styles.input,
246
251
  inputStyle,
247
252
  type === "solid" ? { marginHorizontal: 12 } : {},
253
+ textStyles,
248
254
  ];
249
255
  // const render = (props) => <NativeTextInput {...props} />;
250
256
  return (React.createElement(View, { style: [styles.container, style] },
@@ -282,7 +288,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
282
288
  type === "solid" ? { paddingHorizontal: 12 } : {},
283
289
  labelStyle,
284
290
  {
285
- color: colors.light,
291
+ color: labelColor || colors.light,
286
292
  opacity: labeled.interpolate({
287
293
  inputRange: [0, 1],
288
294
  outputRange: [hasActiveOutline ? 1 : 0, 0],
@@ -294,7 +300,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
294
300
  type === "solid" ? { paddingHorizontal: 12 } : {},
295
301
  labelStyle,
296
302
  {
297
- color: placeholderColor,
303
+ color: labelColor || placeholder,
298
304
  opacity: hasActiveOutline ? labeled : 1,
299
305
  },
300
306
  ], numberOfLines: 1 }, label))) : null,
@@ -23,6 +23,7 @@ import DateTimePicker from "./DatePickerComponent";
23
23
 
24
24
  import type { Theme } from "../../styles/DefaultTheme";
25
25
  import type { IconSlot } from "../../interfaces/Icon";
26
+ import { extractStyles } from "../../utilities";
26
27
 
27
28
  const AnimatedText = Animated.createAnimatedComponent(Text);
28
29
 
@@ -47,10 +48,14 @@ type Props = {
47
48
  mode?: "date" | "time" | "datetime";
48
49
  type?: "solid" | "underline";
49
50
  label?: string;
51
+ labelSize?: number;
52
+ labelColor: string;
50
53
  placeholder?: string;
51
54
  leftIconName?: string;
52
55
  leftIconMode?: "outset" | "inset";
53
56
  rightIconName?: string;
57
+ borderColor?: string;
58
+ borderColorActive?: string;
54
59
  } & IconSlot &
55
60
  TextInputProps;
56
61
 
@@ -84,7 +89,11 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
84
89
  rightIconName,
85
90
  leftIconMode = "inset",
86
91
  label,
92
+ labelSize,
93
+ labelColor,
87
94
  placeholder,
95
+ borderColor: inputBorderColor,
96
+ borderColorActive: inputBorderColorActive,
88
97
  ...props
89
98
  }) => {
90
99
  const [value, setValue] = React.useState<any>(date || defaultValue);
@@ -106,6 +115,8 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
106
115
  width: number;
107
116
  }>({ measured: false, width: 0 });
108
117
 
118
+ const { textStyles } = extractStyles(style);
119
+
109
120
  const getValidDate = (): Date => {
110
121
  if (!value) {
111
122
  return new Date();
@@ -211,8 +222,11 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
211
222
 
212
223
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
213
224
  const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
214
- const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
215
- const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
225
+ const MAXIMIZED_LABEL_FONT_SIZE =
226
+ textStyles?.fontSize || typography.subtitle1.fontSize;
227
+ const MINIMIZED_LABEL_FONT_SIZE = labelSize
228
+ ? labelSize
229
+ : typography.caption.fontSize;
216
230
 
217
231
  const hasActiveOutline = focused;
218
232
 
@@ -233,9 +247,9 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
233
247
  underlineColor = "transparent";
234
248
  backgroundColor = colors.divider;
235
249
  } else {
236
- activeColor = colors.primary;
237
- placeholderColor = borderColor = colors.light;
238
- underlineColor = colors.light;
250
+ activeColor = inputBorderColorActive || colors.primary;
251
+ placeholderColor = borderColor = inputBorderColor || colors.light;
252
+ underlineColor = inputBorderColor || colors.light;
239
253
  backgroundColor = colors.background;
240
254
  }
241
255
 
@@ -306,6 +320,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
306
320
  const labelStyle = {
307
321
  ...typography.subtitle1,
308
322
  top: type === "solid" ? 16 : 0,
323
+ fontFamily: textStyles?.fontFamily,
309
324
  left:
310
325
  leftIconName && leftIconMode === "inset"
311
326
  ? ICON_SIZE + (type === "solid" ? 16 : 12)
@@ -351,6 +366,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
351
366
  styles.input,
352
367
  inputStyle,
353
368
  type === "solid" ? { marginHorizontal: 12 } : {},
369
+ textStyles,
354
370
  ];
355
371
 
356
372
  // const render = (props) => <NativeTextInput {...props} />;
@@ -406,7 +422,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
406
422
  type === "solid" ? { paddingHorizontal: 12 } : {},
407
423
  labelStyle,
408
424
  {
409
- color: colors.light,
425
+ color: labelColor || colors.light,
410
426
  opacity: labeled.interpolate({
411
427
  inputRange: [0, 1],
412
428
  outputRange: [hasActiveOutline ? 1 : 0, 0],
@@ -423,7 +439,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
423
439
  type === "solid" ? { paddingHorizontal: 12 } : {},
424
440
  labelStyle,
425
441
  {
426
- color: placeholderColor,
442
+ color: labelColor || placeholder,
427
443
  opacity: hasActiveOutline ? labeled : 1,
428
444
  },
429
445
  ]}
@@ -36,4 +36,5 @@ const Stepper = ({ min = -Infinity, max = Infinity, value: valueProp, defaultVal
36
36
  ] }, value),
37
37
  React.createElement(IconButton, { Icon: Icon, icon: "MaterialIcons/add", onPress: () => handlePlusOrMinus("plus"), size: iconSize, color: iconColor, disabled: value === max, style: { opacity: value === max ? 0.5 : 1 } })));
38
38
  };
39
+ //oh hello
39
40
  export default withTheme(Stepper);
@@ -97,5 +97,5 @@ const Stepper: FC<Props> = ({
97
97
  </View>
98
98
  );
99
99
  };
100
-
100
+ //oh hello
101
101
  export default withTheme(Stepper);
package/src/index.js CHANGED
@@ -49,5 +49,4 @@ 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";
53
52
  // a comment to fix sourcemap comment issue
package/src/index.tsx CHANGED
@@ -69,6 +69,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
69
69
  export { default as Slider } from "./components/Slider";
70
70
  export { default as Stepper } from "./components/Stepper";
71
71
  export { useAuthState } from "./components/useAuthState";
72
- export { default as Youtube } from "./components/Youtube";
73
72
 
74
73
  // a comment to fix sourcemap comment issue
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, createNumberProp, createColorProp, } from "@draftbit/types";
2
2
  const SEED_DATA_PROPS = {
3
3
  label: {
4
4
  label: "Label",
@@ -10,6 +10,12 @@ const SEED_DATA_PROPS = {
10
10
  required: true,
11
11
  group: GROUPS.data,
12
12
  },
13
+ labelSize: createNumberProp({
14
+ label: "Label Size",
15
+ }),
16
+ labelColor: createColorProp({
17
+ label: "Label Color",
18
+ }),
13
19
  mode: {
14
20
  label: "Mode",
15
21
  description: "Choose between date, time and datetime",
@@ -21,6 +27,12 @@ const SEED_DATA_PROPS = {
21
27
  options: ["date", "time", "datetime"],
22
28
  group: GROUPS.basic,
23
29
  },
30
+ borderColor: createColorProp({
31
+ label: "Border Color",
32
+ }),
33
+ borderColorActive: createColorProp({
34
+ label: "Border Color",
35
+ }),
24
36
  format: {
25
37
  label: "Format",
26
38
  description: "Create an output format for the date.",
@@ -139,6 +151,14 @@ export const SEED_DATA = [
139
151
  category: COMPONENT_TYPES.input,
140
152
  layout: null,
141
153
  triggers: [Triggers.OnDateChange],
154
+ StylesPanelSections: [
155
+ StylesPanelSections.Background,
156
+ StylesPanelSections.Borders,
157
+ StylesPanelSections.MarginsAndPaddings,
158
+ StylesPanelSections.Position,
159
+ StylesPanelSections.Size,
160
+ StylesPanelSections.Typography,
161
+ ],
142
162
  props: {
143
163
  ...SEED_DATA_PROPS,
144
164
  type: {
@@ -5,6 +5,9 @@ import {
5
5
  FIELD_NAME,
6
6
  GROUPS,
7
7
  Triggers,
8
+ StylesPanelSections,
9
+ createNumberProp,
10
+ createColorProp,
8
11
  } from "@draftbit/types";
9
12
 
10
13
  const SEED_DATA_PROPS = {
@@ -18,6 +21,12 @@ const SEED_DATA_PROPS = {
18
21
  required: true,
19
22
  group: GROUPS.data,
20
23
  },
24
+ labelSize: createNumberProp({
25
+ label: "Label Size",
26
+ }),
27
+ labelColor: createColorProp({
28
+ label: "Label Color",
29
+ }),
21
30
  mode: {
22
31
  label: "Mode",
23
32
  description: "Choose between date, time and datetime",
@@ -29,6 +38,12 @@ const SEED_DATA_PROPS = {
29
38
  options: ["date", "time", "datetime"],
30
39
  group: GROUPS.basic,
31
40
  },
41
+ borderColor: createColorProp({
42
+ label: "Border Color",
43
+ }),
44
+ borderColorActive: createColorProp({
45
+ label: "Border Color",
46
+ }),
32
47
  format: {
33
48
  label: "Format",
34
49
  description: "Create an output format for the date.",
@@ -150,6 +165,14 @@ export const SEED_DATA = [
150
165
  category: COMPONENT_TYPES.input,
151
166
  layout: null,
152
167
  triggers: [Triggers.OnDateChange],
168
+ StylesPanelSections: [
169
+ StylesPanelSections.Background,
170
+ StylesPanelSections.Borders,
171
+ StylesPanelSections.MarginsAndPaddings,
172
+ StylesPanelSections.Position,
173
+ StylesPanelSections.Size,
174
+ StylesPanelSections.Typography,
175
+ ],
153
176
  props: {
154
177
  ...SEED_DATA_PROPS,
155
178
  type: {
@@ -1,66 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
10
- var _utilities = require("../utilities");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- const Youtube = _ref => {
13
- let {
14
- videoId,
15
- playlist,
16
- style,
17
- mute,
18
- autoplay
19
- } = _ref;
20
- const {
21
- viewStyles: {
22
- height,
23
- width
24
- }
25
- } = (0, _utilities.extractStyles)(style);
26
- return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
27
- height: height,
28
- width: width,
29
- play: autoplay,
30
- videoId: videoId,
31
- playList: playlist,
32
- mute: mute
33
- });
34
- };
35
- var _default = Youtube;
36
- exports.default = _default;
37
- const SEED_DATA = {
38
- name: "Youtube",
39
- tag: "Youtube",
40
- description: "Youtube Component",
41
- category: _types.COMPONENT_TYPES.media,
42
- layout: {
43
- width: "100%"
44
- },
45
- props: {
46
- videoId: (0, _types.createTextProp)({
47
- label: "VideoId",
48
- description: "Youtube Video ID"
49
- }),
50
- playlist: (0, _types.createTextProp)({
51
- label: "PlayList",
52
- description: "Playlist ID"
53
- }),
54
- mute: (0, _types.createBoolProp)({
55
- label: "Mute",
56
- description: "Whether to mute video",
57
- defaultValue: false
58
- }),
59
- autoplay: (0, _types.createBoolProp)({
60
- label: "Autoplay",
61
- description: "Whether to Autoplay video",
62
- defaultValue: false
63
- })
64
- }
65
- };
66
- exports.SEED_DATA = SEED_DATA;
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- const SEED_DATA = {
9
- name: "Youtube",
10
- tag: "Youtube",
11
- description: "Given a VideoId orPlaylist and play Youtube video",
12
- doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
13
- code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
14
- category: _types.COMPONENT_TYPES.media,
15
- stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Position],
16
- layout: {
17
- height: 250
18
- },
19
- props: {
20
- videoId: (0, _types.createTextProp)({
21
- label: "Video ID",
22
- description: "VideoId of the Youtube video.",
23
- defaultValue: "nwMUpDESXrI"
24
- }),
25
- playlist: (0, _types.createTextProp)({
26
- label: "Playlist",
27
- description: "Playlist of the Youtube videos.",
28
- defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
29
- }),
30
- mute: (0, _types.createStaticBoolProp)({
31
- label: "Mute Audio",
32
- description: "Mute the audio of the video."
33
- }),
34
- autoplay: (0, _types.createStaticBoolProp)({
35
- label: "Auto Play",
36
- description: "Autoplay the video on load."
37
- })
38
- }
39
- };
40
- exports.SEED_DATA = SEED_DATA;
@@ -1,57 +0,0 @@
1
- import { COMPONENT_TYPES, createBoolProp, createTextProp } from "@draftbit/types";
2
- import React from "react";
3
- import YoutubePlayer from "react-native-youtube-iframe";
4
- import { extractStyles } from "../utilities";
5
- const Youtube = _ref => {
6
- let {
7
- videoId,
8
- playlist,
9
- style,
10
- mute,
11
- autoplay
12
- } = _ref;
13
- const {
14
- viewStyles: {
15
- height,
16
- width
17
- }
18
- } = extractStyles(style);
19
- return /*#__PURE__*/React.createElement(YoutubePlayer, {
20
- height: height,
21
- width: width,
22
- play: autoplay,
23
- videoId: videoId,
24
- playList: playlist,
25
- mute: mute
26
- });
27
- };
28
- export default Youtube;
29
- export const SEED_DATA = {
30
- name: "Youtube",
31
- tag: "Youtube",
32
- description: "Youtube Component",
33
- category: COMPONENT_TYPES.media,
34
- layout: {
35
- width: "100%"
36
- },
37
- props: {
38
- videoId: createTextProp({
39
- label: "VideoId",
40
- description: "Youtube Video ID"
41
- }),
42
- playlist: createTextProp({
43
- label: "PlayList",
44
- description: "Playlist ID"
45
- }),
46
- mute: createBoolProp({
47
- label: "Mute",
48
- description: "Whether to mute video",
49
- defaultValue: false
50
- }),
51
- autoplay: createBoolProp({
52
- label: "Autoplay",
53
- description: "Whether to Autoplay video",
54
- defaultValue: false
55
- })
56
- }
57
- };
@@ -1,33 +0,0 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, createTextProp, StylesPanelSections } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Youtube",
4
- tag: "Youtube",
5
- description: "Given a VideoId orPlaylist and play Youtube video",
6
- doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
7
- code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
8
- category: COMPONENT_TYPES.media,
9
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
10
- layout: {
11
- height: 250
12
- },
13
- props: {
14
- videoId: createTextProp({
15
- label: "Video ID",
16
- description: "VideoId of the Youtube video.",
17
- defaultValue: "nwMUpDESXrI"
18
- }),
19
- playlist: createTextProp({
20
- label: "Playlist",
21
- description: "Playlist of the Youtube videos.",
22
- defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
23
- }),
24
- mute: createStaticBoolProp({
25
- label: "Mute Audio",
26
- description: "Mute the audio of the video."
27
- }),
28
- autoplay: createStaticBoolProp({
29
- label: "Auto Play",
30
- description: "Autoplay the video on load."
31
- })
32
- }
33
- };