@draftbit/core 46.4.4-8e5cf2.2 → 46.4.4-926784.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 (62) hide show
  1. package/lib/commonjs/components/Container.js +5 -17
  2. package/lib/commonjs/index.js +83 -37
  3. package/lib/commonjs/mappings/HtmlElements.js +125 -0
  4. package/lib/commonjs/utilities.js +2 -2
  5. package/lib/module/components/CircularProgress.js +15 -7
  6. package/lib/module/components/Justification.js +0 -1
  7. package/lib/module/components/Portal/PortalHost.js +26 -15
  8. package/lib/module/components/Text.js +35 -9
  9. package/lib/module/components/TextField.js +62 -30
  10. package/lib/module/index.js +1 -1
  11. package/lib/module/mappings/HtmlElements.js +116 -0
  12. package/lib/module/utilities.js +3 -3
  13. package/lib/typescript/src/index.d.ts +1 -1
  14. package/lib/typescript/src/mappings/HtmlElements.d.ts +49 -0
  15. package/lib/typescript/src/utilities.d.ts +3 -3
  16. package/package.json +4 -3
  17. package/src/index.js +1 -1
  18. package/src/index.tsx +1 -8
  19. package/src/mappings/HtmlElements.js +141 -0
  20. package/src/mappings/HtmlElements.ts +151 -0
  21. package/src/utilities.js +2 -5
  22. package/src/utilities.ts +2 -13
  23. package/lib/commonjs/components/Table/Table.js +0 -35
  24. package/lib/commonjs/components/Table/TableCell.js +0 -50
  25. package/lib/commonjs/components/Table/TableHeader.js +0 -41
  26. package/lib/commonjs/components/Table/TablePaginator.js +0 -17
  27. package/lib/commonjs/components/Table/TableRow.js +0 -47
  28. package/lib/commonjs/components/Table/TableTitle.js +0 -60
  29. package/lib/commonjs/components/Table/index.js +0 -55
  30. package/lib/commonjs/mappings/Table.js +0 -102
  31. package/lib/module/components/Table/Table.js +0 -23
  32. package/lib/module/components/Table/TableCell.js +0 -37
  33. package/lib/module/components/Table/TableHeader.js +0 -27
  34. package/lib/module/components/Table/TablePaginator.js +0 -6
  35. package/lib/module/components/Table/TableRow.js +0 -33
  36. package/lib/module/components/Table/TableTitle.js +0 -47
  37. package/lib/module/components/Table/index.js +0 -6
  38. package/lib/module/mappings/Table.js +0 -93
  39. package/lib/typescript/src/components/Table/Table.d.ts +0 -8
  40. package/lib/typescript/src/components/Table/TableCell.d.ts +0 -10
  41. package/lib/typescript/src/components/Table/TableHeader.d.ts +0 -12
  42. package/lib/typescript/src/components/Table/TablePaginator.d.ts +0 -3
  43. package/lib/typescript/src/components/Table/TableRow.d.ts +0 -12
  44. package/lib/typescript/src/components/Table/TableTitle.d.ts +0 -12
  45. package/lib/typescript/src/components/Table/index.d.ts +0 -6
  46. package/lib/typescript/src/mappings/Table.d.ts +0 -148
  47. package/src/components/Table/Table.js +0 -10
  48. package/src/components/Table/Table.tsx +0 -22
  49. package/src/components/Table/TableCell.js +0 -21
  50. package/src/components/Table/TableCell.tsx +0 -44
  51. package/src/components/Table/TableHeader.js +0 -11
  52. package/src/components/Table/TableHeader.tsx +0 -28
  53. package/src/components/Table/TablePaginator.js +0 -5
  54. package/src/components/Table/TablePaginator.tsx +0 -10
  55. package/src/components/Table/TableRow.js +0 -16
  56. package/src/components/Table/TableRow.tsx +0 -31
  57. package/src/components/Table/TableTitle.js +0 -28
  58. package/src/components/Table/TableTitle.tsx +0 -58
  59. package/src/components/Table/index.js +0 -6
  60. package/src/components/Table/index.tsx +0 -6
  61. package/src/mappings/Table.js +0 -136
  62. package/src/mappings/Table.ts +0 -144
@@ -1,7 +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
- 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; }
4
-
5
1
  import * as React from "react";
6
2
  import { View, Animated, TextInput as NativeTextInput, StyleSheet, Text, I18nManager } from "react-native";
7
3
  import { withTheme } from "../theming";
@@ -14,8 +10,7 @@ const ICON_SIZE = 24;
14
10
  class TextField extends React.Component {
15
11
  constructor() {
16
12
  super(...arguments);
17
-
18
- _defineProperty(this, "state", {
13
+ this.state = {
19
14
  nativeProps: {},
20
15
  labeled: new Animated.Value(this.props.value || this.props.error ? 0 : 1),
21
16
  focused: false,
@@ -24,36 +19,35 @@ class TextField extends React.Component {
24
19
  measured: false,
25
20
  width: 0
26
21
  }
27
- });
28
-
29
- _defineProperty(this, "_timer", setTimeout(() => {}, 0));
22
+ };
23
+ this._timer = setTimeout(() => {}, 0);
30
24
 
31
- _defineProperty(this, "_showPlaceholder", () => {
25
+ this._showPlaceholder = () => {
32
26
  clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
33
27
  // If we show it immediately, they'll overlap and look ugly
34
28
 
35
29
  this._timer = setTimeout(() => this.setState({
36
30
  placeholder: this.props.placeholder
37
31
  }), 50);
38
- });
32
+ };
39
33
 
40
- _defineProperty(this, "_hidePlaceholder", () => this.setState({
34
+ this._hidePlaceholder = () => this.setState({
41
35
  placeholder: ""
42
- }));
36
+ });
43
37
 
44
- _defineProperty(this, "_restoreLabel", () => Animated.timing(this.state.labeled, {
38
+ this._restoreLabel = () => Animated.timing(this.state.labeled, {
45
39
  toValue: 1,
46
40
  duration: FOCUS_ANIMATION_DURATION,
47
41
  useNativeDriver: true
48
- }).start());
42
+ }).start();
49
43
 
50
- _defineProperty(this, "_minmizeLabel", () => Animated.timing(this.state.labeled, {
44
+ this._minmizeLabel = () => Animated.timing(this.state.labeled, {
51
45
  toValue: 0,
52
46
  duration: BLUR_ANIMATION_DURATION,
53
47
  useNativeDriver: true
54
- }).start());
48
+ }).start();
55
49
 
56
- _defineProperty(this, "_handleFocus", () => {
50
+ this._handleFocus = () => {
57
51
  if (this.props.disabled) {
58
52
  return;
59
53
  }
@@ -61,9 +55,9 @@ class TextField extends React.Component {
61
55
  this.setState({
62
56
  focused: true
63
57
  });
64
- });
58
+ };
65
59
 
66
- _defineProperty(this, "_handleBlur", () => {
60
+ this._handleBlur = () => {
67
61
  if (this.props.disabled) {
68
62
  return;
69
63
  }
@@ -71,9 +65,9 @@ class TextField extends React.Component {
71
65
  this.setState({
72
66
  focused: false
73
67
  });
74
- });
68
+ };
75
69
 
76
- _defineProperty(this, "_handleChangeText", value => {
70
+ this._handleChangeText = value => {
77
71
  if (this.props.disabled) {
78
72
  return;
79
73
  }
@@ -89,9 +83,9 @@ class TextField extends React.Component {
89
83
  });
90
84
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
91
85
  }
92
- });
86
+ };
93
87
 
94
- _defineProperty(this, "_root", undefined);
88
+ this._root = undefined;
95
89
  }
96
90
 
97
91
  static getDerivedStateFromProps(nextProps, prevState) {
@@ -142,10 +136,11 @@ class TextField extends React.Component {
142
136
  focused: !prevState.focused
143
137
  }));
144
138
  }
145
-
146
139
  /**
147
140
  * @internal
148
141
  */
142
+
143
+
149
144
  setNativeProps(args) {
150
145
  this.setState(state => ({ ...state,
151
146
  nativeState: args || {}
@@ -190,7 +185,8 @@ class TextField extends React.Component {
190
185
  roundness,
191
186
  disabledOpacity
192
187
  },
193
- render = props => /*#__PURE__*/React.createElement(NativeTextInput, props),
188
+ render = props => /*#__PURE__*/React.createElement(NativeTextInput, { ...props
189
+ }),
194
190
  ...rest
195
191
  } = this.props;
196
192
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -342,9 +338,9 @@ class TextField extends React.Component {
342
338
  } = StyleSheet.flatten(style || {});
343
339
  return /*#__PURE__*/React.createElement(View, {
344
340
  style: [styles.container, styleProp]
345
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
341
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
346
342
  style: leftIconStyle
347
- })) : null, /*#__PURE__*/React.createElement(View, {
343
+ }) : null, /*#__PURE__*/React.createElement(View, {
348
344
  style: applyStyles([containerStyle], {
349
345
  height: style === null || style === void 0 ? void 0 : style.height,
350
346
  backgroundColor: bgColor,
@@ -411,9 +407,9 @@ class TextField extends React.Component {
411
407
  style: {
412
408
  justifyContent: type === "solid" ? "center" : undefined
413
409
  }
414
- }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
410
+ }, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
415
411
  style: leftIconStyle
416
- }))) : null, render({
412
+ })) : null, render({
417
413
  ref: c => {
418
414
  this._root = c;
419
415
  },
@@ -451,6 +447,42 @@ class TextField extends React.Component {
451
447
 
452
448
  }
453
449
 
450
+ export default withTheme(TextField);
451
+ const styles = StyleSheet.create({
452
+ container: {
453
+ alignSelf: "stretch"
454
+ },
455
+ placeholder: {
456
+ position: "absolute",
457
+ left: 0
458
+ },
459
+ underline: {
460
+ position: "absolute",
461
+ left: 0,
462
+ right: 0,
463
+ bottom: 0,
464
+ height: 2
465
+ },
466
+ input: {
467
+ flexGrow: 1,
468
+ justifyContent: "center",
469
+ textAlignVertical: "center",
470
+ margin: 0,
471
+ textAlign: I18nManager.isRTL ? "right" : "left"
472
+ }
473
+ }); "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
474
+ }
475
+ }) : null, assistiveText ? /*#__PURE__*/React.createElement(Text, {
476
+ style: [{
477
+ color: error ? colors.error : colors.light,
478
+ marginTop: 8,
479
+ marginLeft: assistiveTextLeftMargin
480
+ }]
481
+ }, assistiveText) : null);
482
+ }
483
+
484
+ }
485
+
454
486
  export default withTheme(TextField);
455
487
  const styles = StyleSheet.create({
456
488
  container: {
@@ -31,7 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle } from "./components/Table";
34
+ export * from "@expo/html-elements";
35
35
  /* Deprecated: Fix or Delete! */
36
36
 
37
37
  export { default as CardBlock } from "./components/CardBlock";
@@ -0,0 +1,116 @@
1
+ import { COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, StylesPanelSections, Triggers } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
+ const ELEMENT_PROPS = {
4
+ category: COMPONENT_TYPES.element,
5
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
6
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
7
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
8
+ layout: {
9
+ margin: 0
10
+ },
11
+ triggers: SEED_DATA_TRIGGERS
12
+ };
13
+ const HEADING_PROPS = { ...ELEMENT_PROPS
14
+ };
15
+ export const SEED_DATA = [{
16
+ name: "H1",
17
+ tag: "H1",
18
+ ...HEADING_PROPS
19
+ }, {
20
+ name: "H2",
21
+ tag: "H2",
22
+ ...HEADING_PROPS
23
+ }, {
24
+ name: "H3",
25
+ tag: "H3",
26
+ ...HEADING_PROPS
27
+ }, {
28
+ name: "H4",
29
+ tag: "H4",
30
+ ...HEADING_PROPS
31
+ }, {
32
+ name: "H5",
33
+ tag: "H5",
34
+ ...HEADING_PROPS
35
+ }, {
36
+ name: "H6",
37
+ tag: "H6",
38
+ ...HEADING_PROPS
39
+ }, {
40
+ name: "Anchor",
41
+ tag: "A",
42
+ ...ELEMENT_PROPS,
43
+ props: {
44
+ href: createTextProp({
45
+ label: "href",
46
+ description: "Specify the URL",
47
+ defaultValue: ""
48
+ }),
49
+ target: {
50
+ group: GROUPS.basic,
51
+ label: "target",
52
+ description: "decide where link should open",
53
+ formType: FORM_TYPES.flatArray,
54
+ defaultValue: "_blank",
55
+ options: ["_blank", "_self", "_parent", "_top"]
56
+ }
57
+ }
58
+ }, {
59
+ name: "Paragraph",
60
+ tag: "P",
61
+ ...ELEMENT_PROPS,
62
+ props: {// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
63
+ // strong: createBoolProp({
64
+ // label: "Strong",
65
+ // description: "Strong",
66
+ // }),
67
+ // strike: createBoolProp({
68
+ // label: "Strike",
69
+ // description: "Strike through",
70
+ // }),
71
+ // italic: createBoolProp({
72
+ // label: "Italic",
73
+ // description: "Italic Fonts",
74
+ // }),
75
+ // bold: createBoolProp({
76
+ // label: "Bold",
77
+ // description: "Bold",
78
+ // }),
79
+ }
80
+ }, {
81
+ name: "Code",
82
+ tag: "Code",
83
+ ...ELEMENT_PROPS
84
+ }, {
85
+ name: "Pre",
86
+ tag: "Pre",
87
+ ...ELEMENT_PROPS
88
+ }, {
89
+ name: "Mark",
90
+ tag: "Mark",
91
+ ...ELEMENT_PROPS
92
+ }, {
93
+ name: "BR",
94
+ tag: "BR",
95
+ ...ELEMENT_PROPS
96
+ }, {
97
+ name: "BlockQuote",
98
+ tag: "BlockQuote",
99
+ ...ELEMENT_PROPS
100
+ }, {
101
+ name: "Time",
102
+ tag: "Time",
103
+ ...ELEMENT_PROPS
104
+ }, {
105
+ name: "UL",
106
+ tag: "UL",
107
+ ...ELEMENT_PROPS
108
+ }, {
109
+ name: "LI",
110
+ tag: "LI",
111
+ ...ELEMENT_PROPS
112
+ }, {
113
+ name: "HR",
114
+ tag: "HR",
115
+ ...ELEMENT_PROPS
116
+ }];
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { isString, isNumber, pick, pickBy, identity, omitBy, isNil } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity } from "lodash";
3
3
  export function extractStyles(style) {
4
4
  const {
5
5
  color,
@@ -29,8 +29,8 @@ export function extractStyles(style) {
29
29
  textDecorationStyle
30
30
  };
31
31
  return {
32
- viewStyles: omitBy(viewStyles, isNil),
33
- textStyles: omitBy(textStyles, isNil)
32
+ viewStyles,
33
+ textStyles
34
34
  };
35
35
  }
36
36
  export const borderStyleNames = ["borderRadius", "borderBottomColor", "borderBottomEndRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderEndColor", "borderLeftColor", "borderLeftWidth", "borderRadius", "borderRightColor", "borderRightWidth", "borderStartColor", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth"];
@@ -31,7 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
34
+ export * from "@expo/html-elements";
35
35
  export { default as CardBlock } from "./components/CardBlock";
36
36
  export { default as CardContainer } from "./components/CardContainer";
37
37
  export { default as CardContainerRating } from "./components/CardContainerRating";
@@ -0,0 +1,49 @@
1
+ export declare const SEED_DATA: ({
2
+ category: string;
3
+ doc_link: string;
4
+ code_link: string;
5
+ stylesPanelSections: string[];
6
+ layout: {
7
+ margin: number;
8
+ };
9
+ triggers: string[];
10
+ name: string;
11
+ tag: string;
12
+ } | {
13
+ props: {
14
+ href: any;
15
+ target: {
16
+ group: string;
17
+ label: string;
18
+ description: string;
19
+ formType: string;
20
+ defaultValue: string;
21
+ options: string[];
22
+ };
23
+ };
24
+ category: string;
25
+ doc_link: string;
26
+ code_link: string;
27
+ stylesPanelSections: string[];
28
+ layout: {
29
+ margin: number;
30
+ };
31
+ triggers: string[];
32
+ name: string;
33
+ tag: string;
34
+ } | {
35
+ props: {
36
+ href?: undefined;
37
+ target?: undefined;
38
+ };
39
+ category: string;
40
+ doc_link: string;
41
+ code_link: string;
42
+ stylesPanelSections: string[];
43
+ layout: {
44
+ margin: number;
45
+ };
46
+ triggers: string[];
47
+ name: string;
48
+ tag: string;
49
+ })[];
@@ -1,8 +1,8 @@
1
1
  /// <reference types="lodash" />
2
- import { StyleProp } from "react-native";
2
+ import { StyleProp, TextStyle } from "react-native";
3
3
  export declare function extractStyles(style: StyleProp<any>): {
4
- viewStyles: Partial<any>;
5
- textStyles: import("lodash").Dictionary<any>;
4
+ viewStyles: any;
5
+ textStyles: TextStyle;
6
6
  };
7
7
  export declare const borderStyleNames: string[];
8
8
  export declare const marginStyleNames: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-8e5cf2.2+8e5cf29",
3
+ "version": "46.4.4-926784.2+926784b",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,8 @@
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-8e5cf2.2+8e5cf29",
44
+ "@draftbit/types": "^46.4.4-926784.2+926784b",
45
+ "@expo/html-elements": "^0.2.0",
45
46
  "@material-ui/core": "^4.11.0",
46
47
  "@material-ui/pickers": "^3.2.10",
47
48
  "@react-native-community/slider": "4.2.3",
@@ -81,5 +82,5 @@
81
82
  ]
82
83
  ]
83
84
  },
84
- "gitHead": "8e5cf29f14b735059ccd00fe971e5f2c389e1500"
85
+ "gitHead": "926784bdbe341dc24314d214e2ae1a8c2f233a68"
85
86
  }
package/src/index.js CHANGED
@@ -31,7 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
34
+ export * from "@expo/html-elements";
35
35
  /* Deprecated: Fix or Delete! */
36
36
  export { default as CardBlock } from "./components/CardBlock";
37
37
  export { default as CardContainer } from "./components/CardContainer";
package/src/index.tsx CHANGED
@@ -51,14 +51,7 @@ export {
51
51
  RadioButtonFieldGroup,
52
52
  } from "./components/RadioButton/index";
53
53
 
54
- export {
55
- Table,
56
- TableRow,
57
- TablePaginator,
58
- TableHeader,
59
- TableCell,
60
- TableTitle,
61
- } from "./components/Table";
54
+ export * from "@expo/html-elements";
62
55
 
63
56
  /* Deprecated: Fix or Delete! */
64
57
  export { default as CardBlock } from "./components/CardBlock";
@@ -0,0 +1,141 @@
1
+ import { COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, StylesPanelSections, Triggers, } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
+ const ELEMENT_PROPS = {
4
+ category: COMPONENT_TYPES.element,
5
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
6
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Typography,
9
+ StylesPanelSections.LayoutSelectedItem,
10
+ StylesPanelSections.MarginsAndPaddings,
11
+ StylesPanelSections.Effects,
12
+ ],
13
+ layout: {
14
+ margin: 0,
15
+ },
16
+ triggers: SEED_DATA_TRIGGERS,
17
+ };
18
+ const HEADING_PROPS = {
19
+ ...ELEMENT_PROPS,
20
+ };
21
+ export const SEED_DATA = [
22
+ {
23
+ name: "H1",
24
+ tag: "H1",
25
+ ...HEADING_PROPS,
26
+ },
27
+ {
28
+ name: "H2",
29
+ tag: "H2",
30
+ ...HEADING_PROPS,
31
+ },
32
+ {
33
+ name: "H3",
34
+ tag: "H3",
35
+ ...HEADING_PROPS,
36
+ },
37
+ {
38
+ name: "H4",
39
+ tag: "H4",
40
+ ...HEADING_PROPS,
41
+ },
42
+ {
43
+ name: "H5",
44
+ tag: "H5",
45
+ ...HEADING_PROPS,
46
+ },
47
+ {
48
+ name: "H6",
49
+ tag: "H6",
50
+ ...HEADING_PROPS,
51
+ },
52
+ {
53
+ name: "Anchor",
54
+ tag: "A",
55
+ ...ELEMENT_PROPS,
56
+ props: {
57
+ href: createTextProp({
58
+ label: "href",
59
+ description: "Specify the URL",
60
+ defaultValue: "",
61
+ }),
62
+ target: {
63
+ group: GROUPS.basic,
64
+ label: "target",
65
+ description: "decide where link should open",
66
+ formType: FORM_TYPES.flatArray,
67
+ defaultValue: "_blank",
68
+ options: ["_blank", "_self", "_parent", "_top"],
69
+ },
70
+ },
71
+ },
72
+ {
73
+ name: "Paragraph",
74
+ tag: "P",
75
+ ...ELEMENT_PROPS,
76
+ props: {
77
+ // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
78
+ // strong: createBoolProp({
79
+ // label: "Strong",
80
+ // description: "Strong",
81
+ // }),
82
+ // strike: createBoolProp({
83
+ // label: "Strike",
84
+ // description: "Strike through",
85
+ // }),
86
+ // italic: createBoolProp({
87
+ // label: "Italic",
88
+ // description: "Italic Fonts",
89
+ // }),
90
+ // bold: createBoolProp({
91
+ // label: "Bold",
92
+ // description: "Bold",
93
+ // }),
94
+ },
95
+ },
96
+ {
97
+ name: "Code",
98
+ tag: "Code",
99
+ ...ELEMENT_PROPS,
100
+ },
101
+ {
102
+ name: "Pre",
103
+ tag: "Pre",
104
+ ...ELEMENT_PROPS,
105
+ },
106
+ {
107
+ name: "Mark",
108
+ tag: "Mark",
109
+ ...ELEMENT_PROPS,
110
+ },
111
+ {
112
+ name: "BR",
113
+ tag: "BR",
114
+ ...ELEMENT_PROPS,
115
+ },
116
+ {
117
+ name: "BlockQuote",
118
+ tag: "BlockQuote",
119
+ ...ELEMENT_PROPS,
120
+ },
121
+ {
122
+ name: "Time",
123
+ tag: "Time",
124
+ ...ELEMENT_PROPS,
125
+ },
126
+ {
127
+ name: "UL",
128
+ tag: "UL",
129
+ ...ELEMENT_PROPS,
130
+ },
131
+ {
132
+ name: "LI",
133
+ tag: "LI",
134
+ ...ELEMENT_PROPS,
135
+ },
136
+ {
137
+ name: "HR",
138
+ tag: "HR",
139
+ ...ELEMENT_PROPS,
140
+ },
141
+ ];