@draftbit/core 46.9.1-c1e2bf.2 → 46.9.1-e06549.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 (65) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +12 -1
  3. package/lib/commonjs/components/CircleImage.js +1 -15
  4. package/lib/commonjs/components/Container.js +15 -4
  5. package/lib/commonjs/index.js +0 -7
  6. package/lib/commonjs/mappings/ActionSheet.js +1 -1
  7. package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
  8. package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
  9. package/lib/commonjs/mappings/HtmlElements.js +160 -0
  10. package/lib/commonjs/mappings/MapCallout.js +1 -1
  11. package/lib/commonjs/mappings/MapMarker.js +1 -1
  12. package/lib/module/index.js +0 -1
  13. package/lib/module/mappings/ActionSheet.js +1 -1
  14. package/lib/module/mappings/ActionSheetCancel.js +1 -1
  15. package/lib/module/mappings/ActionSheetItem.js +1 -1
  16. package/lib/module/mappings/HtmlElements.js +153 -0
  17. package/lib/module/mappings/MapCallout.js +2 -2
  18. package/lib/module/mappings/MapMarker.js +2 -2
  19. package/lib/typescript/src/index.d.ts +0 -1
  20. package/lib/typescript/src/index.d.ts.map +1 -1
  21. package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
  22. package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
  23. package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
  24. package/lib/typescript/src/mappings/{BottomSheet.d.ts → HtmlElements.d.ts} +51 -61
  25. package/lib/typescript/src/mappings/HtmlElements.d.ts.map +1 -0
  26. package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
  27. package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
  28. package/package.json +4 -5
  29. package/src/index.js +0 -1
  30. package/src/index.tsx +0 -2
  31. package/src/mappings/ActionSheet.js +4 -1
  32. package/src/mappings/ActionSheet.ts +4 -1
  33. package/src/mappings/ActionSheetCancel.js +4 -1
  34. package/src/mappings/ActionSheetCancel.ts +4 -1
  35. package/src/mappings/ActionSheetItem.js +4 -1
  36. package/src/mappings/ActionSheetItem.ts +4 -1
  37. package/src/mappings/HtmlElements.js +180 -0
  38. package/src/mappings/HtmlElements.ts +194 -0
  39. package/src/mappings/MapCallout.js +6 -2
  40. package/src/mappings/MapCallout.ts +6 -2
  41. package/src/mappings/MapMarker.js +6 -2
  42. package/src/mappings/MapMarker.ts +6 -2
  43. package/lib/commonjs/components/BottomSheet/BottomSheet.js +0 -88
  44. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -464
  45. package/lib/commonjs/components/BottomSheet/index.js +0 -13
  46. package/lib/commonjs/mappings/BottomSheet.js +0 -74
  47. package/lib/module/components/BottomSheet/BottomSheet.js +0 -80
  48. package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -470
  49. package/lib/module/components/BottomSheet/index.js +0 -1
  50. package/lib/module/mappings/BottomSheet.js +0 -67
  51. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +0 -20
  52. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +0 -1
  53. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +0 -170
  54. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +0 -1
  55. package/lib/typescript/src/components/BottomSheet/index.d.ts +0 -2
  56. package/lib/typescript/src/components/BottomSheet/index.d.ts.map +0 -1
  57. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +0 -1
  58. package/src/components/BottomSheet/BottomSheet.js +0 -56
  59. package/src/components/BottomSheet/BottomSheet.tsx +0 -120
  60. package/src/components/BottomSheet/BottomSheetComponent.js +0 -437
  61. package/src/components/BottomSheet/BottomSheetComponent.tsx +0 -895
  62. package/src/components/BottomSheet/index.js +0 -1
  63. package/src/components/BottomSheet/index.ts +0 -1
  64. package/src/mappings/BottomSheet.js +0 -64
  65. package/src/mappings/BottomSheet.ts +0 -78
@@ -1,119 +1,109 @@
1
- export declare const SEED_DATA: {
2
- name: string;
3
- tag: string;
4
- description: string;
1
+ export declare const SEED_DATA: ({
5
2
  category: string;
6
3
  stylesPanelSections: string[];
7
4
  layout: {
8
- paddingHorizontal: number;
9
- paddingVertical: number;
5
+ color: string;
10
6
  };
11
- triggers: string[];
12
7
  props: {
13
- onSettle: {
8
+ children: {
9
+ group: string;
14
10
  label: string;
15
11
  description: string;
12
+ defaultValue: string;
16
13
  editable: boolean;
17
14
  required: boolean;
18
15
  formType: string;
19
16
  propType: string;
20
- defaultValue: null;
21
- group: string;
22
17
  };
23
- snapPoints: {
18
+ accessibilityLabel: {
24
19
  group: string;
20
+ name: string;
25
21
  label: string;
26
22
  description: string;
27
23
  editable: boolean;
28
24
  required: boolean;
29
25
  formType: string;
30
26
  propType: string;
31
- options: never[];
32
27
  defaultValue: null;
33
28
  };
34
- initialSnapIndex: {
29
+ selectable: {
30
+ group: string;
31
+ name: string;
35
32
  label: string;
36
33
  description: string;
37
- formType: string;
38
- propType: string;
39
- group: string;
40
- defaultValue: null;
41
34
  editable: boolean;
42
35
  required: boolean;
43
- step: number;
44
- };
45
- showHandle: {
46
- label: string;
47
- description: string;
48
36
  formType: string;
49
37
  propType: string;
50
38
  defaultValue: boolean;
51
- editable: boolean;
52
- required: boolean;
53
- group: string;
54
39
  };
55
- handleColor: {
40
+ };
41
+ doc_link: string;
42
+ code_link: string;
43
+ packageName: string;
44
+ name: string;
45
+ tag: string;
46
+ } | {
47
+ doc_link: string;
48
+ code_link: string;
49
+ packageName: string;
50
+ stylesPanelSections: string[];
51
+ category: string;
52
+ name: string;
53
+ tag: string;
54
+ } | {
55
+ props: {
56
+ href: any;
57
+ target: {
56
58
  group: string;
57
59
  label: string;
58
60
  description: string;
59
- editable: boolean;
60
- required: boolean;
61
- defaultValue: null;
62
61
  formType: string;
63
- propType: string;
62
+ defaultValue: string;
63
+ options: string[];
64
64
  };
65
- topBorderRadius: {
65
+ children: {
66
+ group: string;
66
67
  label: string;
67
68
  description: string;
68
- formType: string;
69
- propType: string;
70
- group: string;
71
- defaultValue: null;
69
+ defaultValue: string;
72
70
  editable: boolean;
73
71
  required: boolean;
74
- step: number;
75
- };
76
- borderWidth: {
77
- label: string;
78
- description: string;
79
72
  formType: string;
80
73
  propType: string;
81
- group: string;
82
- defaultValue: null;
83
- editable: boolean;
84
- required: boolean;
85
- step: number;
86
74
  };
87
- borderColor: {
75
+ accessibilityLabel: {
88
76
  group: string;
77
+ name: string;
89
78
  label: string;
90
79
  description: string;
91
80
  editable: boolean;
92
81
  required: boolean;
93
- defaultValue: null;
94
82
  formType: string;
95
83
  propType: string;
84
+ defaultValue: null;
96
85
  };
97
- showsVerticalScrollIndicator: {
86
+ selectable: {
87
+ group: string;
88
+ name: string;
98
89
  label: string;
99
90
  description: string;
100
- formType: string;
101
- propType: string;
102
- defaultValue: boolean;
103
91
  editable: boolean;
104
92
  required: boolean;
105
- group: string;
106
- };
107
- bounces: {
108
- label: string;
109
- description: string;
110
93
  formType: string;
111
94
  propType: string;
112
95
  defaultValue: boolean;
113
- editable: boolean;
114
- required: boolean;
115
- group: string;
116
96
  };
117
97
  };
118
- };
119
- //# sourceMappingURL=BottomSheet.d.ts.map
98
+ category: string;
99
+ stylesPanelSections: string[];
100
+ layout: {
101
+ color: string;
102
+ };
103
+ doc_link: string;
104
+ code_link: string;
105
+ packageName: string;
106
+ name: string;
107
+ tag: string;
108
+ })[];
109
+ //# sourceMappingURL=HtmlElements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlElements.d.ts","sourceRoot":"","sources":["../../../../src/mappings/HtmlElements.ts"],"names":[],"mappings":"AAoEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6HrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MapCallout.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapCallout.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBrB,CAAC"}
1
+ {"version":3,"file":"MapCallout.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapCallout.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MapMarker.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapMarker.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CrB,CAAC"}
1
+ {"version":3,"file":"MapMarker.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapMarker.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.9.1-c1e2bf.2+c1e2bf4",
3
+ "version": "46.9.1-e06549.2+e065491",
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.9.1-c1e2bf.2+c1e2bf4",
44
+ "@draftbit/types": "^46.9.1-e06549.2+e065491",
45
+ "@expo/html-elements": "^0.3.1",
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",
@@ -54,11 +55,9 @@
54
55
  "lodash.omit": "^4.5.0",
55
56
  "lodash.tonumber": "^4.0.3",
56
57
  "react-native-deck-swiper": "^2.0.12",
57
- "react-native-gesture-handler": "~2.5.0",
58
58
  "react-native-markdown-display": "^7.0.0-alpha.2",
59
59
  "react-native-modal-datetime-picker": "^13.0.0",
60
60
  "react-native-pager-view": "5.4.24",
61
- "react-native-reanimated": "~2.9.1",
62
61
  "react-native-shadow-2": "^7.0.6",
63
62
  "react-native-svg": "12.3.0",
64
63
  "react-native-tab-view": "^3.4.0",
@@ -98,5 +97,5 @@
98
97
  ]
99
98
  ]
100
99
  },
101
- "gitHead": "c1e2bf40e776e51766fe51fe6790bf7c86334a8b"
100
+ "gitHead": "e0654918cd0648f300038c6fc444c7955b49cac1"
102
101
  }
package/src/index.js CHANGED
@@ -35,7 +35,6 @@ export { default as Shadow } from "./components/Shadow";
35
35
  export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
36
36
  export { TabView, TabViewItem } from "./components/TabView";
37
37
  export { default as Markdown } from "./components/Markdown";
38
- export { BottomSheet } from "./components/BottomSheet";
39
38
  /* Deprecated: Fix or Delete! */
40
39
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
41
40
  export { default as Picker } from "./components/Picker/Picker";
package/src/index.tsx CHANGED
@@ -58,8 +58,6 @@ export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
58
58
  export { TabView, TabViewItem } from "./components/TabView";
59
59
  export { default as Markdown } from "./components/Markdown";
60
60
 
61
- export { BottomSheet } from "./components/BottomSheet";
62
-
63
61
  /* Deprecated: Fix or Delete! */
64
62
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
65
63
  export { default as Picker } from "./components/Picker/Picker";
@@ -4,7 +4,10 @@ export const SEED_DATA = {
4
4
  tag: "ActionSheet",
5
5
  description: "Action Sheet container",
6
6
  category: COMPONENT_TYPES.actionsheet,
7
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Margins,
9
+ StylesPanelSections.Effects,
10
+ ],
8
11
  props: {
9
12
  visible: createStaticBoolProp({
10
13
  group: GROUPS.data,
@@ -10,7 +10,10 @@ export const SEED_DATA = {
10
10
  tag: "ActionSheet",
11
11
  description: "Action Sheet container",
12
12
  category: COMPONENT_TYPES.actionsheet,
13
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
13
+ stylesPanelSections: [
14
+ StylesPanelSections.Margins,
15
+ StylesPanelSections.Effects,
16
+ ],
14
17
  props: {
15
18
  visible: createStaticBoolProp({
16
19
  group: GROUPS.data,
@@ -3,7 +3,10 @@ export const SEED_DATA = {
3
3
  name: "Action Sheet Cancel",
4
4
  tag: "ActionSheetCancel",
5
5
  description: "Action Sheet cancel",
6
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
6
+ stylesPanelSections: [
7
+ StylesPanelSections.Margins,
8
+ StylesPanelSections.Effects,
9
+ ],
7
10
  category: COMPONENT_TYPES.actionsheet,
8
11
  triggers: [Triggers.OnPress],
9
12
  props: {
@@ -12,7 +12,10 @@ export const SEED_DATA = {
12
12
  name: "Action Sheet Cancel",
13
13
  tag: "ActionSheetCancel",
14
14
  description: "Action Sheet cancel",
15
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
15
+ stylesPanelSections: [
16
+ StylesPanelSections.Margins,
17
+ StylesPanelSections.Effects,
18
+ ],
16
19
  category: COMPONENT_TYPES.actionsheet,
17
20
  triggers: [Triggers.OnPress],
18
21
  props: {
@@ -4,7 +4,10 @@ export const SEED_DATA = {
4
4
  tag: "ActionSheetItem",
5
5
  description: "Action Sheet item",
6
6
  category: COMPONENT_TYPES.actionsheet,
7
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Margins,
9
+ StylesPanelSections.Effects,
10
+ ],
8
11
  triggers: [Triggers.OnPress],
9
12
  layout: {
10
13
  textAlign: "center",
@@ -13,7 +13,10 @@ export const SEED_DATA = {
13
13
  tag: "ActionSheetItem",
14
14
  description: "Action Sheet item",
15
15
  category: COMPONENT_TYPES.actionsheet,
16
- stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
16
+ stylesPanelSections: [
17
+ StylesPanelSections.Margins,
18
+ StylesPanelSections.Effects,
19
+ ],
17
20
  triggers: [Triggers.OnPress],
18
21
  layout: {
19
22
  textAlign: "center",
@@ -0,0 +1,180 @@
1
+ import { COMPONENT_TYPES, createTextProp, FORM_TYPES, PROP_TYPES, GROUPS, StylesPanelSections, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
+ const ELEMENT_SEED_DATA = {
3
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
4
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
5
+ packageName: "@expo/html-elements",
6
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
7
+ category: COMPONENT_TYPES.webelement,
8
+ };
9
+ const TEXT_SEED_DATA = {
10
+ ...ELEMENT_SEED_DATA,
11
+ category: COMPONENT_TYPES.text,
12
+ stylesPanelSections: [
13
+ StylesPanelSections.Typography,
14
+ StylesPanelSections.LayoutSelectedItem,
15
+ StylesPanelSections.MarginsAndPaddings,
16
+ StylesPanelSections.Effects,
17
+ ],
18
+ layout: {
19
+ color: "strong",
20
+ },
21
+ props: {
22
+ children: {
23
+ group: GROUPS.data,
24
+ label: "Text",
25
+ description: "Text",
26
+ defaultValue: "Double click me to edit 👀",
27
+ editable: true,
28
+ required: true,
29
+ formType: FORM_TYPES.string,
30
+ propType: PROP_TYPES.STRING,
31
+ },
32
+ accessibilityLabel: {
33
+ group: GROUPS.accessibility,
34
+ name: "accessibilityLabel",
35
+ label: "accessibilityLabel",
36
+ description: "Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
37
+ editable: true,
38
+ required: false,
39
+ formType: FORM_TYPES.string,
40
+ propType: PROP_TYPES.STRING,
41
+ defaultValue: null,
42
+ },
43
+ selectable: {
44
+ group: GROUPS.advanced,
45
+ name: "selectable",
46
+ label: "selectable",
47
+ description: "Lets the user select text, to use the native copy and paste functionality.",
48
+ editable: true,
49
+ required: false,
50
+ formType: FORM_TYPES.boolean,
51
+ propType: PROP_TYPES.BOOLEAN,
52
+ defaultValue: true,
53
+ },
54
+ },
55
+ };
56
+ export const SEED_DATA = [
57
+ {
58
+ name: "Heading 1",
59
+ tag: "H1",
60
+ ...TEXT_SEED_DATA,
61
+ },
62
+ {
63
+ name: "Heading 2",
64
+ tag: "H2",
65
+ ...TEXT_SEED_DATA,
66
+ },
67
+ {
68
+ name: "Heading 3",
69
+ tag: "H3",
70
+ ...TEXT_SEED_DATA,
71
+ },
72
+ {
73
+ name: "Heading 4",
74
+ tag: "H4",
75
+ ...TEXT_SEED_DATA,
76
+ },
77
+ {
78
+ name: "Heading 5",
79
+ tag: "H5",
80
+ ...TEXT_SEED_DATA,
81
+ },
82
+ {
83
+ name: "Heading 6",
84
+ tag: "H6",
85
+ ...TEXT_SEED_DATA,
86
+ },
87
+ {
88
+ name: "Paragraph",
89
+ tag: "P",
90
+ ...TEXT_SEED_DATA,
91
+ },
92
+ {
93
+ name: "Bold",
94
+ tag: "B",
95
+ ...TEXT_SEED_DATA,
96
+ },
97
+ {
98
+ name: "Strikethrough",
99
+ tag: "S",
100
+ ...TEXT_SEED_DATA,
101
+ },
102
+ {
103
+ name: "Italic",
104
+ tag: "I",
105
+ ...TEXT_SEED_DATA,
106
+ },
107
+ {
108
+ name: "Code",
109
+ tag: "Code",
110
+ ...TEXT_SEED_DATA,
111
+ },
112
+ {
113
+ name: "Preformatted",
114
+ tag: "Pre",
115
+ ...TEXT_SEED_DATA,
116
+ },
117
+ {
118
+ name: "Mark",
119
+ tag: "Mark",
120
+ ...TEXT_SEED_DATA,
121
+ },
122
+ {
123
+ name: "Block Quote",
124
+ tag: "BlockQuote",
125
+ ...TEXT_SEED_DATA,
126
+ },
127
+ {
128
+ name: "Quoted",
129
+ tag: "Q",
130
+ ...TEXT_SEED_DATA,
131
+ },
132
+ {
133
+ name: "Time",
134
+ tag: "Time",
135
+ ...TEXT_SEED_DATA,
136
+ },
137
+ {
138
+ name: "Unordered List",
139
+ tag: "UL",
140
+ ...ELEMENT_SEED_DATA,
141
+ },
142
+ {
143
+ name: "List Item",
144
+ tag: "LI",
145
+ ...TEXT_SEED_DATA,
146
+ category: COMPONENT_TYPES.webelement,
147
+ },
148
+ {
149
+ name: "Line Break",
150
+ tag: "BR",
151
+ ...ELEMENT_SEED_DATA,
152
+ },
153
+ {
154
+ name: "Horizontal Rule",
155
+ tag: "HR",
156
+ ...ELEMENT_SEED_DATA,
157
+ },
158
+ {
159
+ name: "Anchor",
160
+ tag: "A",
161
+ ...TEXT_SEED_DATA,
162
+ props: {
163
+ ...TEXT_SEED_DATA.props,
164
+ href: createTextProp({
165
+ label: "href",
166
+ description: "Specify the URL",
167
+ defaultValue: "",
168
+ }),
169
+ target: {
170
+ group: GROUPS.basic,
171
+ label: "target",
172
+ description: "decide where link should open",
173
+ formType: FORM_TYPES.flatArray,
174
+ defaultValue: "_blank",
175
+ options: ["_blank", "_self", "_parent", "_top"],
176
+ },
177
+ },
178
+ category: COMPONENT_TYPES.webelement,
179
+ },
180
+ ];
@@ -0,0 +1,194 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createTextProp,
4
+ FORM_TYPES,
5
+ PROP_TYPES,
6
+ GROUPS,
7
+ StylesPanelSections,
8
+ BLOCK_STYLES_SECTIONS,
9
+ } from "@draftbit/types";
10
+
11
+ const ELEMENT_SEED_DATA = {
12
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
13
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
14
+ packageName: "@expo/html-elements",
15
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
16
+ category: COMPONENT_TYPES.webelement,
17
+ };
18
+
19
+ const TEXT_SEED_DATA = {
20
+ ...ELEMENT_SEED_DATA,
21
+ category: COMPONENT_TYPES.text,
22
+ stylesPanelSections: [
23
+ StylesPanelSections.Typography,
24
+ StylesPanelSections.LayoutSelectedItem,
25
+ StylesPanelSections.MarginsAndPaddings,
26
+ StylesPanelSections.Effects,
27
+ ],
28
+ layout: {
29
+ color: "strong",
30
+ },
31
+ props: {
32
+ children: {
33
+ group: GROUPS.data,
34
+ label: "Text",
35
+ description: "Text",
36
+ defaultValue: "Double click me to edit 👀",
37
+ editable: true,
38
+ required: true,
39
+ formType: FORM_TYPES.string,
40
+ propType: PROP_TYPES.STRING,
41
+ },
42
+ accessibilityLabel: {
43
+ group: GROUPS.accessibility,
44
+ name: "accessibilityLabel",
45
+ label: "accessibilityLabel",
46
+ description:
47
+ "Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
48
+ editable: true,
49
+ required: false,
50
+ formType: FORM_TYPES.string,
51
+ propType: PROP_TYPES.STRING,
52
+ defaultValue: null,
53
+ },
54
+ selectable: {
55
+ group: GROUPS.advanced,
56
+ name: "selectable",
57
+ label: "selectable",
58
+ description:
59
+ "Lets the user select text, to use the native copy and paste functionality.",
60
+ editable: true,
61
+ required: false,
62
+ formType: FORM_TYPES.boolean,
63
+ propType: PROP_TYPES.BOOLEAN,
64
+ defaultValue: true,
65
+ },
66
+ },
67
+ };
68
+
69
+ export const SEED_DATA = [
70
+ {
71
+ name: "Heading 1",
72
+ tag: "H1",
73
+ ...TEXT_SEED_DATA,
74
+ },
75
+ {
76
+ name: "Heading 2",
77
+ tag: "H2",
78
+ ...TEXT_SEED_DATA,
79
+ },
80
+ {
81
+ name: "Heading 3",
82
+ tag: "H3",
83
+ ...TEXT_SEED_DATA,
84
+ },
85
+ {
86
+ name: "Heading 4",
87
+ tag: "H4",
88
+ ...TEXT_SEED_DATA,
89
+ },
90
+ {
91
+ name: "Heading 5",
92
+ tag: "H5",
93
+ ...TEXT_SEED_DATA,
94
+ },
95
+ {
96
+ name: "Heading 6",
97
+ tag: "H6",
98
+ ...TEXT_SEED_DATA,
99
+ },
100
+ {
101
+ name: "Paragraph",
102
+ tag: "P",
103
+ ...TEXT_SEED_DATA,
104
+ },
105
+ {
106
+ name: "Bold",
107
+ tag: "B",
108
+ ...TEXT_SEED_DATA,
109
+ },
110
+ {
111
+ name: "Strikethrough",
112
+ tag: "S",
113
+ ...TEXT_SEED_DATA,
114
+ },
115
+ {
116
+ name: "Italic",
117
+ tag: "I",
118
+ ...TEXT_SEED_DATA,
119
+ },
120
+ {
121
+ name: "Code",
122
+ tag: "Code",
123
+ ...TEXT_SEED_DATA,
124
+ },
125
+ {
126
+ name: "Preformatted",
127
+ tag: "Pre",
128
+ ...TEXT_SEED_DATA,
129
+ },
130
+ {
131
+ name: "Mark",
132
+ tag: "Mark",
133
+ ...TEXT_SEED_DATA,
134
+ },
135
+ {
136
+ name: "Block Quote",
137
+ tag: "BlockQuote",
138
+ ...TEXT_SEED_DATA,
139
+ },
140
+ {
141
+ name: "Quoted",
142
+ tag: "Q",
143
+ ...TEXT_SEED_DATA,
144
+ },
145
+
146
+ {
147
+ name: "Time",
148
+ tag: "Time",
149
+ ...TEXT_SEED_DATA,
150
+ },
151
+ {
152
+ name: "Unordered List",
153
+ tag: "UL",
154
+ ...ELEMENT_SEED_DATA,
155
+ },
156
+ {
157
+ name: "List Item",
158
+ tag: "LI",
159
+ ...TEXT_SEED_DATA,
160
+ category: COMPONENT_TYPES.webelement,
161
+ },
162
+ {
163
+ name: "Line Break",
164
+ tag: "BR",
165
+ ...ELEMENT_SEED_DATA,
166
+ },
167
+ {
168
+ name: "Horizontal Rule",
169
+ tag: "HR",
170
+ ...ELEMENT_SEED_DATA,
171
+ },
172
+ {
173
+ name: "Anchor",
174
+ tag: "A",
175
+ ...TEXT_SEED_DATA,
176
+ props: {
177
+ ...TEXT_SEED_DATA.props,
178
+ href: createTextProp({
179
+ label: "href",
180
+ description: "Specify the URL",
181
+ defaultValue: "",
182
+ }),
183
+ target: {
184
+ group: GROUPS.basic,
185
+ label: "target",
186
+ description: "decide where link should open",
187
+ formType: FORM_TYPES.flatArray,
188
+ defaultValue: "_blank",
189
+ options: ["_blank", "_self", "_parent", "_top"],
190
+ },
191
+ },
192
+ category: COMPONENT_TYPES.webelement,
193
+ },
194
+ ];