@draftbit/core 46.8.1-d2585a.2 → 46.8.1-da12fb.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 (103) hide show
  1. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +38 -4
  2. package/lib/commonjs/components/NumberInput.js +3 -12
  3. package/lib/commonjs/components/ScreenContainer.js +2 -1
  4. package/lib/commonjs/components/ToggleButton.js +2 -15
  5. package/lib/commonjs/constants.js +1 -1
  6. package/lib/commonjs/mappings/Accordion.js +1 -0
  7. package/lib/commonjs/mappings/AccordionItem.js +1 -0
  8. package/lib/commonjs/mappings/ActionSheet.js +1 -0
  9. package/lib/commonjs/mappings/ActionSheetCancel.js +1 -0
  10. package/lib/commonjs/mappings/ActionSheetItem.js +1 -0
  11. package/lib/commonjs/mappings/LinearGradient.js +1 -0
  12. package/lib/commonjs/mappings/MapCallout.js +1 -0
  13. package/lib/commonjs/mappings/MapMarker.js +1 -0
  14. package/lib/commonjs/mappings/MapView.js +1 -0
  15. package/lib/commonjs/mappings/Swiper.js +1 -0
  16. package/lib/commonjs/mappings/SwiperItem.js +2 -1
  17. package/lib/commonjs/mappings/TextArea.js +1 -0
  18. package/lib/commonjs/mappings/TextField.js +1 -0
  19. package/lib/module/components/DeckSwiper/DeckSwiper.js +38 -4
  20. package/lib/module/components/ScreenContainer.js +2 -1
  21. package/lib/module/mappings/Accordion.js +2 -1
  22. package/lib/module/mappings/AccordionItem.js +2 -1
  23. package/lib/module/mappings/ActionSheet.js +2 -1
  24. package/lib/module/mappings/ActionSheetCancel.js +2 -1
  25. package/lib/module/mappings/ActionSheetItem.js +2 -1
  26. package/lib/module/mappings/LinearGradient.js +2 -1
  27. package/lib/module/mappings/MapCallout.js +2 -1
  28. package/lib/module/mappings/MapMarker.js +2 -1
  29. package/lib/module/mappings/MapView.js +2 -1
  30. package/lib/module/mappings/Swiper.js +2 -1
  31. package/lib/module/mappings/SwiperItem.js +3 -2
  32. package/lib/module/mappings/TextArea.js +2 -1
  33. package/lib/module/mappings/TextField.js +1 -0
  34. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts +8 -2
  35. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts.map +1 -1
  36. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +2 -3
  37. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +1 -1
  38. package/lib/typescript/src/components/ScreenContainer.d.ts.map +1 -1
  39. package/lib/typescript/src/mappings/Accordion.d.ts +1 -0
  40. package/lib/typescript/src/mappings/Accordion.d.ts.map +1 -1
  41. package/lib/typescript/src/mappings/AccordionItem.d.ts +1 -0
  42. package/lib/typescript/src/mappings/AccordionItem.d.ts.map +1 -1
  43. package/lib/typescript/src/mappings/ActionSheet.d.ts +1 -0
  44. package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
  45. package/lib/typescript/src/mappings/ActionSheetCancel.d.ts +1 -0
  46. package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
  47. package/lib/typescript/src/mappings/ActionSheetItem.d.ts +1 -0
  48. package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
  49. package/lib/typescript/src/mappings/LinearGradient.d.ts +1 -0
  50. package/lib/typescript/src/mappings/LinearGradient.d.ts.map +1 -1
  51. package/lib/typescript/src/mappings/MapCallout.d.ts +1 -0
  52. package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
  53. package/lib/typescript/src/mappings/MapMarker.d.ts +1 -0
  54. package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
  55. package/lib/typescript/src/mappings/MapView.d.ts +1 -0
  56. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  57. package/lib/typescript/src/mappings/Swiper.d.ts +1 -0
  58. package/lib/typescript/src/mappings/Swiper.d.ts.map +1 -1
  59. package/lib/typescript/src/mappings/SwiperItem.d.ts +1 -0
  60. package/lib/typescript/src/mappings/SwiperItem.d.ts.map +1 -1
  61. package/lib/typescript/src/mappings/TextArea.d.ts +1 -0
  62. package/lib/typescript/src/mappings/TextArea.d.ts.map +1 -1
  63. package/lib/typescript/src/mappings/TextField.d.ts +1 -1
  64. package/lib/typescript/src/mappings/TextField.d.ts.map +1 -1
  65. package/package.json +3 -4
  66. package/src/components/DeckSwiper/DeckSwiper.js +33 -3
  67. package/src/components/DeckSwiper/DeckSwiper.tsx +51 -9
  68. package/src/components/DeckSwiper/DeckSwiperCard.js +1 -1
  69. package/src/components/DeckSwiper/DeckSwiperCard.tsx +3 -6
  70. package/src/components/ScreenContainer.js +2 -1
  71. package/src/components/ScreenContainer.tsx +2 -1
  72. package/src/mappings/Accordion.js +10 -1
  73. package/src/mappings/Accordion.ts +10 -0
  74. package/src/mappings/AccordionItem.js +2 -1
  75. package/src/mappings/AccordionItem.ts +2 -0
  76. package/src/mappings/ActionSheet.js +2 -1
  77. package/src/mappings/ActionSheet.ts +7 -1
  78. package/src/mappings/ActionSheetCancel.js +2 -1
  79. package/src/mappings/ActionSheetCancel.ts +2 -0
  80. package/src/mappings/ActionSheetItem.js +2 -1
  81. package/src/mappings/ActionSheetItem.ts +2 -0
  82. package/src/mappings/LinearGradient.js +6 -1
  83. package/src/mappings/LinearGradient.ts +6 -0
  84. package/src/mappings/MapCallout.js +2 -1
  85. package/src/mappings/MapCallout.ts +2 -0
  86. package/src/mappings/MapMarker.js +2 -1
  87. package/src/mappings/MapMarker.ts +2 -0
  88. package/src/mappings/MapView.js +2 -1
  89. package/src/mappings/MapView.ts +2 -0
  90. package/src/mappings/Swiper.js +10 -1
  91. package/src/mappings/Swiper.ts +10 -0
  92. package/src/mappings/SwiperItem.js +2 -1
  93. package/src/mappings/SwiperItem.ts +5 -1
  94. package/src/mappings/TextArea.js +10 -1
  95. package/src/mappings/TextArea.ts +10 -0
  96. package/src/mappings/TextField.js +9 -0
  97. package/src/mappings/TextField.ts +9 -0
  98. package/lib/commonjs/mappings/HtmlElements.js +0 -177
  99. package/lib/module/mappings/HtmlElements.js +0 -170
  100. package/lib/typescript/src/mappings/HtmlElements.d.ts +0 -77
  101. package/lib/typescript/src/mappings/HtmlElements.d.ts.map +0 -1
  102. package/src/mappings/HtmlElements.js +0 -193
  103. package/src/mappings/HtmlElements.ts +0 -207
@@ -1,10 +1,11 @@
1
- import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Map Marker",
4
4
  tag: "MapMarker",
5
5
  packageName: "@draftbit/maps",
6
6
  description: "A marker to show inside map view",
7
7
  category: COMPONENT_TYPES.map,
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
9
  layout: {},
9
10
  props: {
10
11
  latitude: createNumberProp({
@@ -5,6 +5,7 @@ import {
5
5
  createNumberProp,
6
6
  createTextProp,
7
7
  GROUPS,
8
+ CONTAINER_COMPONENT_STYLES_SECTIONS,
8
9
  } from "@draftbit/types";
9
10
 
10
11
  export const SEED_DATA = {
@@ -13,6 +14,7 @@ export const SEED_DATA = {
13
14
  packageName: "@draftbit/maps",
14
15
  description: "A marker to show inside map view",
15
16
  category: COMPONENT_TYPES.map,
17
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
16
18
  layout: {},
17
19
  props: {
18
20
  latitude: createNumberProp({
@@ -1,10 +1,11 @@
1
- import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, FORM_TYPES, PROP_TYPES, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Map View",
4
4
  tag: "MapView",
5
5
  packageName: "@draftbit/maps",
6
6
  description: "A map view",
7
7
  category: COMPONENT_TYPES.map,
8
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
8
9
  layout: {
9
10
  flex: 1,
10
11
  width: "100%",
@@ -7,6 +7,7 @@ import {
7
7
  GROUPS,
8
8
  FORM_TYPES,
9
9
  PROP_TYPES,
10
+ StylesPanelSections,
10
11
  } from "@draftbit/types";
11
12
 
12
13
  export const SEED_DATA = {
@@ -15,6 +16,7 @@ export const SEED_DATA = {
15
16
  packageName: "@draftbit/maps",
16
17
  description: "A map view",
17
18
  category: COMPONENT_TYPES.map,
19
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins],
18
20
  layout: {
19
21
  flex: 1,
20
22
  width: "100%",
@@ -1,9 +1,18 @@
1
- import { COMPONENT_TYPES, createBoolProp, createNumberProp, createTextProp, createColorProp, GROUPS, Triggers, createActionProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, createNumberProp, createTextProp, createColorProp, GROUPS, Triggers, createActionProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Swiper",
4
4
  tag: "Swiper",
5
5
  description: "Swiper container",
6
6
  category: COMPONENT_TYPES.swiper,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.LayoutSelectedItem,
9
+ StylesPanelSections.Background,
10
+ StylesPanelSections.Size,
11
+ StylesPanelSections.MarginsAndPaddings,
12
+ StylesPanelSections.Position,
13
+ StylesPanelSections.Borders,
14
+ StylesPanelSections.Effects,
15
+ ],
7
16
  layout: {
8
17
  height: 300,
9
18
  width: "100%",
@@ -7,6 +7,7 @@ import {
7
7
  GROUPS,
8
8
  Triggers,
9
9
  createActionProp,
10
+ StylesPanelSections,
10
11
  } from "@draftbit/types";
11
12
 
12
13
  export const SEED_DATA = {
@@ -14,6 +15,15 @@ export const SEED_DATA = {
14
15
  tag: "Swiper",
15
16
  description: "Swiper container",
16
17
  category: COMPONENT_TYPES.swiper,
18
+ stylesPanelSections: [
19
+ StylesPanelSections.LayoutSelectedItem,
20
+ StylesPanelSections.Background,
21
+ StylesPanelSections.Size,
22
+ StylesPanelSections.MarginsAndPaddings,
23
+ StylesPanelSections.Position,
24
+ StylesPanelSections.Borders,
25
+ StylesPanelSections.Effects,
26
+ ],
17
27
  layout: {
18
28
  height: 300,
19
29
  width: "100%",
@@ -1,8 +1,9 @@
1
- import { COMPONENT_TYPES } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Swiper Item",
4
4
  tag: "SwiperItem",
5
5
  description: "Swiper item",
6
6
  category: COMPONENT_TYPES.swiper,
7
7
  props: {},
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
9
  };
@@ -1,4 +1,7 @@
1
- import { COMPONENT_TYPES } from "@draftbit/types";
1
+ import {
2
+ COMPONENT_TYPES,
3
+ CONTAINER_COMPONENT_STYLES_SECTIONS,
4
+ } from "@draftbit/types";
2
5
 
3
6
  export const SEED_DATA = {
4
7
  name: "Swiper Item",
@@ -6,4 +9,5 @@ export const SEED_DATA = {
6
9
  description: "Swiper item",
7
10
  category: COMPONENT_TYPES.swiper,
8
11
  props: {},
12
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
13
  };
@@ -1,9 +1,18 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Text Area",
4
4
  tag: "TextInput",
5
5
  description: "An input field that allows for multiple lines.",
6
6
  category: COMPONENT_TYPES.input,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Typography,
9
+ StylesPanelSections.Background,
10
+ StylesPanelSections.Size,
11
+ StylesPanelSections.MarginsAndPaddings,
12
+ StylesPanelSections.Position,
13
+ StylesPanelSections.Borders,
14
+ StylesPanelSections.Effects,
15
+ ],
7
16
  layout: {
8
17
  borderLeftWidth: 1,
9
18
  borderRightWidth: 1,
@@ -6,6 +6,7 @@ import {
6
6
  FIELD_NAME,
7
7
  Triggers,
8
8
  createDisabledProp,
9
+ StylesPanelSections,
9
10
  } from "@draftbit/types";
10
11
 
11
12
  export const SEED_DATA = {
@@ -13,6 +14,15 @@ export const SEED_DATA = {
13
14
  tag: "TextInput",
14
15
  description: "An input field that allows for multiple lines.",
15
16
  category: COMPONENT_TYPES.input,
17
+ stylesPanelSections: [
18
+ StylesPanelSections.Typography,
19
+ StylesPanelSections.Background,
20
+ StylesPanelSections.Size,
21
+ StylesPanelSections.MarginsAndPaddings,
22
+ StylesPanelSections.Position,
23
+ StylesPanelSections.Borders,
24
+ StylesPanelSections.Effects,
25
+ ],
16
26
  layout: {
17
27
  borderLeftWidth: 1,
18
28
  borderRightWidth: 1,
@@ -302,6 +302,15 @@ export const SEED_DATA = [
302
302
  preview_image_url: "{CLOUDINARY_URL}/Textfield.png",
303
303
  supports_list_render: false,
304
304
  triggers: SEED_DATA_TRIGGERS,
305
+ stylesPanelSections: [
306
+ StylesPanelSections.Typography,
307
+ StylesPanelSections.Background,
308
+ StylesPanelSections.Size,
309
+ StylesPanelSections.MarginsAndPaddings,
310
+ StylesPanelSections.Position,
311
+ StylesPanelSections.Borders,
312
+ StylesPanelSections.Effects,
313
+ ],
305
314
  props: {
306
315
  ...SEED_DATA_PROPS,
307
316
  type: {
@@ -324,6 +324,15 @@ export const SEED_DATA = [
324
324
  preview_image_url: "{CLOUDINARY_URL}/Textfield.png",
325
325
  supports_list_render: false,
326
326
  triggers: SEED_DATA_TRIGGERS,
327
+ stylesPanelSections: [
328
+ StylesPanelSections.Typography,
329
+ StylesPanelSections.Background,
330
+ StylesPanelSections.Size,
331
+ StylesPanelSections.MarginsAndPaddings,
332
+ StylesPanelSections.Position,
333
+ StylesPanelSections.Borders,
334
+ StylesPanelSections.Effects,
335
+ ],
327
336
  props: {
328
337
  ...SEED_DATA_PROPS,
329
338
  type: {
@@ -1,177 +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_TRIGGERS = [_types.Triggers.OnValueChange];
9
- const ELEMENT_SEED_DATA = {
10
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
11
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
12
- packageName: "@expo/html-elements",
13
- stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Effects],
14
- layout: {
15
- margin: 0
16
- },
17
- triggers: SEED_DATA_TRIGGERS,
18
- category: _types.COMPONENT_TYPES.webelement
19
- };
20
- const HEADING_SEED_DATA = {
21
- ...ELEMENT_SEED_DATA,
22
- category: _types.COMPONENT_TYPES.text,
23
- props: {
24
- accessibilityLabel: {
25
- group: _types.GROUPS.accessibility,
26
- name: "accessibilityLabel",
27
- label: "accessibilityLabel",
28
- 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.",
29
- editable: true,
30
- required: false,
31
- formType: _types.FORM_TYPES.string,
32
- propType: _types.PROP_TYPES.STRING,
33
- defaultValue: null
34
- },
35
- selectable: {
36
- group: _types.GROUPS.advanced,
37
- name: "selectable",
38
- label: "selectable",
39
- description: "Lets the user select text, to use the native copy and paste functionality.",
40
- editable: true,
41
- required: false,
42
- formType: _types.FORM_TYPES.boolean,
43
- propType: _types.PROP_TYPES.BOOLEAN,
44
- defaultValue: null
45
- },
46
- children: {
47
- group: _types.GROUPS.data,
48
- label: "Text",
49
- description: "Text",
50
- editable: true,
51
- required: true,
52
- formType: _types.FORM_TYPES.string,
53
- propType: _types.PROP_TYPES.STRING,
54
- defaultValue: "Your Headline Here"
55
- }
56
- }
57
- };
58
- const TEXT_SEED_DATA = {
59
- ...ELEMENT_SEED_DATA,
60
- category: _types.COMPONENT_TYPES.text,
61
- props: {
62
- children: {
63
- group: _types.GROUPS.data,
64
- label: "Text",
65
- description: "Text",
66
- defaultValue: "Your Text Here",
67
- editable: true,
68
- required: true,
69
- formType: _types.FORM_TYPES.string,
70
- propType: _types.PROP_TYPES.STRING
71
- }
72
- }
73
- };
74
- const SEED_DATA = [{
75
- name: "H1",
76
- tag: "H1",
77
- ...HEADING_SEED_DATA
78
- }, {
79
- name: "H2",
80
- tag: "H2",
81
- ...HEADING_SEED_DATA
82
- }, {
83
- name: "H3",
84
- tag: "H3",
85
- ...HEADING_SEED_DATA
86
- }, {
87
- name: "H4",
88
- tag: "H4",
89
- ...HEADING_SEED_DATA
90
- }, {
91
- name: "H5",
92
- tag: "H5",
93
- ...HEADING_SEED_DATA
94
- }, {
95
- name: "H6",
96
- tag: "H6",
97
- ...HEADING_SEED_DATA
98
- }, {
99
- name: "Anchor",
100
- tag: "A",
101
- ...TEXT_SEED_DATA,
102
- props: {
103
- href: (0, _types.createTextProp)({
104
- label: "href",
105
- description: "Specify the URL",
106
- defaultValue: ""
107
- }),
108
- target: {
109
- group: _types.GROUPS.basic,
110
- label: "target",
111
- description: "decide where link should open",
112
- formType: _types.FORM_TYPES.flatArray,
113
- defaultValue: "_blank",
114
- options: ["_blank", "_self", "_parent", "_top"]
115
- }
116
- }
117
- }, {
118
- name: "Paragraph",
119
- tag: "P",
120
- ...TEXT_SEED_DATA,
121
- props: {
122
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
123
- // strong: createBoolProp({
124
- // label: "Strong",
125
- // description: "Strong",
126
- // }),
127
- // strike: createBoolProp({
128
- // label: "Strike",
129
- // description: "Strike through",
130
- // }),
131
- // italic: createBoolProp({
132
- // label: "Italic",
133
- // description: "Italic Fonts",
134
- // }),
135
- // bold: createBoolProp({
136
- // label: "Bold",
137
- // description: "Bold",
138
- // }),
139
- }
140
- }, {
141
- name: "Code",
142
- tag: "Code",
143
- ...TEXT_SEED_DATA
144
- }, {
145
- name: "Pre",
146
- tag: "Pre",
147
- ...TEXT_SEED_DATA
148
- }, {
149
- name: "Mark",
150
- tag: "Mark",
151
- ...TEXT_SEED_DATA
152
- }, {
153
- name: "BR",
154
- tag: "BR",
155
- ...TEXT_SEED_DATA
156
- }, {
157
- name: "BlockQuote",
158
- tag: "BlockQuote",
159
- ...TEXT_SEED_DATA
160
- }, {
161
- name: "HR",
162
- tag: "HR",
163
- ...TEXT_SEED_DATA
164
- }, {
165
- name: "Time",
166
- tag: "Time",
167
- ...ELEMENT_SEED_DATA
168
- }, {
169
- name: "UL",
170
- tag: "UL",
171
- ...ELEMENT_SEED_DATA
172
- }, {
173
- name: "LI",
174
- tag: "LI",
175
- ...ELEMENT_SEED_DATA
176
- }];
177
- exports.SEED_DATA = SEED_DATA;
@@ -1,170 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp, FORM_TYPES, PROP_TYPES, GROUPS, StylesPanelSections, Triggers } from "@draftbit/types";
2
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
- const ELEMENT_SEED_DATA = {
4
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
5
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
6
- packageName: "@expo/html-elements",
7
- stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
8
- layout: {
9
- margin: 0
10
- },
11
- triggers: SEED_DATA_TRIGGERS,
12
- category: COMPONENT_TYPES.webelement
13
- };
14
- const HEADING_SEED_DATA = {
15
- ...ELEMENT_SEED_DATA,
16
- category: COMPONENT_TYPES.text,
17
- props: {
18
- accessibilityLabel: {
19
- group: GROUPS.accessibility,
20
- name: "accessibilityLabel",
21
- label: "accessibilityLabel",
22
- 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.",
23
- editable: true,
24
- required: false,
25
- formType: FORM_TYPES.string,
26
- propType: PROP_TYPES.STRING,
27
- defaultValue: null
28
- },
29
- selectable: {
30
- group: GROUPS.advanced,
31
- name: "selectable",
32
- label: "selectable",
33
- description: "Lets the user select text, to use the native copy and paste functionality.",
34
- editable: true,
35
- required: false,
36
- formType: FORM_TYPES.boolean,
37
- propType: PROP_TYPES.BOOLEAN,
38
- defaultValue: null
39
- },
40
- children: {
41
- group: GROUPS.data,
42
- label: "Text",
43
- description: "Text",
44
- editable: true,
45
- required: true,
46
- formType: FORM_TYPES.string,
47
- propType: PROP_TYPES.STRING,
48
- defaultValue: "Your Headline Here"
49
- }
50
- }
51
- };
52
- const TEXT_SEED_DATA = {
53
- ...ELEMENT_SEED_DATA,
54
- category: COMPONENT_TYPES.text,
55
- props: {
56
- children: {
57
- group: GROUPS.data,
58
- label: "Text",
59
- description: "Text",
60
- defaultValue: "Your Text Here",
61
- editable: true,
62
- required: true,
63
- formType: FORM_TYPES.string,
64
- propType: PROP_TYPES.STRING
65
- }
66
- }
67
- };
68
- export const SEED_DATA = [{
69
- name: "H1",
70
- tag: "H1",
71
- ...HEADING_SEED_DATA
72
- }, {
73
- name: "H2",
74
- tag: "H2",
75
- ...HEADING_SEED_DATA
76
- }, {
77
- name: "H3",
78
- tag: "H3",
79
- ...HEADING_SEED_DATA
80
- }, {
81
- name: "H4",
82
- tag: "H4",
83
- ...HEADING_SEED_DATA
84
- }, {
85
- name: "H5",
86
- tag: "H5",
87
- ...HEADING_SEED_DATA
88
- }, {
89
- name: "H6",
90
- tag: "H6",
91
- ...HEADING_SEED_DATA
92
- }, {
93
- name: "Anchor",
94
- tag: "A",
95
- ...TEXT_SEED_DATA,
96
- props: {
97
- href: createTextProp({
98
- label: "href",
99
- description: "Specify the URL",
100
- defaultValue: ""
101
- }),
102
- target: {
103
- group: GROUPS.basic,
104
- label: "target",
105
- description: "decide where link should open",
106
- formType: FORM_TYPES.flatArray,
107
- defaultValue: "_blank",
108
- options: ["_blank", "_self", "_parent", "_top"]
109
- }
110
- }
111
- }, {
112
- name: "Paragraph",
113
- tag: "P",
114
- ...TEXT_SEED_DATA,
115
- props: {
116
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
117
- // strong: createBoolProp({
118
- // label: "Strong",
119
- // description: "Strong",
120
- // }),
121
- // strike: createBoolProp({
122
- // label: "Strike",
123
- // description: "Strike through",
124
- // }),
125
- // italic: createBoolProp({
126
- // label: "Italic",
127
- // description: "Italic Fonts",
128
- // }),
129
- // bold: createBoolProp({
130
- // label: "Bold",
131
- // description: "Bold",
132
- // }),
133
- }
134
- }, {
135
- name: "Code",
136
- tag: "Code",
137
- ...TEXT_SEED_DATA
138
- }, {
139
- name: "Pre",
140
- tag: "Pre",
141
- ...TEXT_SEED_DATA
142
- }, {
143
- name: "Mark",
144
- tag: "Mark",
145
- ...TEXT_SEED_DATA
146
- }, {
147
- name: "BR",
148
- tag: "BR",
149
- ...TEXT_SEED_DATA
150
- }, {
151
- name: "BlockQuote",
152
- tag: "BlockQuote",
153
- ...TEXT_SEED_DATA
154
- }, {
155
- name: "HR",
156
- tag: "HR",
157
- ...TEXT_SEED_DATA
158
- }, {
159
- name: "Time",
160
- tag: "Time",
161
- ...ELEMENT_SEED_DATA
162
- }, {
163
- name: "UL",
164
- tag: "UL",
165
- ...ELEMENT_SEED_DATA
166
- }, {
167
- name: "LI",
168
- tag: "LI",
169
- ...ELEMENT_SEED_DATA
170
- }];
@@ -1,77 +0,0 @@
1
- export declare const SEED_DATA: ({
2
- props: {
3
- href: any;
4
- target: {
5
- group: string;
6
- label: string;
7
- description: string;
8
- formType: string;
9
- defaultValue: string;
10
- options: string[];
11
- };
12
- };
13
- category: string;
14
- doc_link: string;
15
- code_link: string;
16
- packageName: string;
17
- stylesPanelSections: string[];
18
- layout: {
19
- margin: number;
20
- };
21
- triggers: string[];
22
- name: string;
23
- tag: string;
24
- } | {
25
- props: {
26
- href?: undefined;
27
- target?: undefined;
28
- };
29
- category: string;
30
- doc_link: string;
31
- code_link: string;
32
- packageName: string;
33
- stylesPanelSections: string[];
34
- layout: {
35
- margin: number;
36
- };
37
- triggers: string[];
38
- name: string;
39
- tag: string;
40
- } | {
41
- category: string;
42
- props: {
43
- children: {
44
- group: string;
45
- label: string;
46
- description: string;
47
- defaultValue: string;
48
- editable: boolean;
49
- required: boolean;
50
- formType: string;
51
- propType: string;
52
- };
53
- };
54
- doc_link: string;
55
- code_link: string;
56
- packageName: string;
57
- stylesPanelSections: string[];
58
- layout: {
59
- margin: number;
60
- };
61
- triggers: string[];
62
- name: string;
63
- tag: string;
64
- } | {
65
- doc_link: string;
66
- code_link: string;
67
- packageName: string;
68
- stylesPanelSections: string[];
69
- layout: {
70
- margin: number;
71
- };
72
- triggers: string[];
73
- category: string;
74
- name: string;
75
- tag: string;
76
- })[];
77
- //# sourceMappingURL=HtmlElements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HtmlElements.d.ts","sourceRoot":"","sources":["../../../../src/mappings/HtmlElements.ts"],"names":[],"mappings":"AAsFA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwHrB,CAAC"}