@draftbit/core 46.8.2-feb14e.2 → 46.8.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 (186) hide show
  1. package/lib/commonjs/components/Justification.js +1 -5
  2. package/lib/commonjs/components/ResizeMode.js +1 -5
  3. package/lib/module/components/Justification.js +0 -1
  4. package/lib/module/components/ResizeMode.js +0 -1
  5. package/package.json +4 -5
  6. package/lib/commonjs/mappings/HtmlElements.js +0 -175
  7. package/lib/module/mappings/HtmlElements.js +0 -168
  8. package/lib/typescript/src/mappings/HtmlElements.d.ts +0 -73
  9. package/lib/typescript/src/mappings/HtmlElements.d.ts.map +0 -1
  10. package/src/Provider.js +0 -9
  11. package/src/components/Accordion/AccordionGroup.js +0 -44
  12. package/src/components/Accordion/AccordionItem.js +0 -32
  13. package/src/components/Accordion/index.js +0 -2
  14. package/src/components/ActionSheet/ActionSheet.js +0 -45
  15. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  16. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  17. package/src/components/ActionSheet/index.js +0 -3
  18. package/src/components/AnimatedCircularProgress.js +0 -43
  19. package/src/components/AspectRatio.js +0 -18
  20. package/src/components/AvatarEdit.js +0 -30
  21. package/src/components/Banner.js +0 -109
  22. package/src/components/Button.js +0 -114
  23. package/src/components/Card.js +0 -57
  24. package/src/components/Checkbox/Checkbox.js +0 -62
  25. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  26. package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
  27. package/src/components/Checkbox/CheckboxRow.js +0 -77
  28. package/src/components/Checkbox/context.js +0 -14
  29. package/src/components/Checkbox/index.js +0 -3
  30. package/src/components/CircleImage.js +0 -8
  31. package/src/components/CircularProgress.js +0 -81
  32. package/src/components/Config.js +0 -64
  33. package/src/components/Container.js +0 -43
  34. package/src/components/DatePicker/DatePicker.js +0 -382
  35. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  36. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  37. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  38. package/src/components/DeckSwiper/DeckSwiper.js +0 -65
  39. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  40. package/src/components/DeckSwiper/index.js +0 -2
  41. package/src/components/DeprecatedButton.js +0 -83
  42. package/src/components/DeprecatedCardWrapper.js +0 -18
  43. package/src/components/DeprecatedFAB.js +0 -114
  44. package/src/components/Divider.js +0 -13
  45. package/src/components/Elevation.js +0 -20
  46. package/src/components/FAB.js +0 -46
  47. package/src/components/FieldSearchBarFull.js +0 -53
  48. package/src/components/FormRow.js +0 -19
  49. package/src/components/IconButton.js +0 -35
  50. package/src/components/Image.js +0 -47
  51. package/src/components/Justification.js +0 -1
  52. package/src/components/Layout.js +0 -50
  53. package/src/components/NumberInput.js +0 -49
  54. package/src/components/Picker/Picker.js +0 -266
  55. package/src/components/Picker/PickerComponent.android.js +0 -69
  56. package/src/components/Picker/PickerComponent.ios.js +0 -79
  57. package/src/components/Picker/PickerComponent.web.js +0 -70
  58. package/src/components/Picker/PickerTypes.js +0 -1
  59. package/src/components/Portal/Portal.js +0 -35
  60. package/src/components/Portal/PortalConsumer.js +0 -27
  61. package/src/components/Portal/PortalHost.js +0 -107
  62. package/src/components/Portal/PortalManager.js +0 -32
  63. package/src/components/Pressable.js +0 -12
  64. package/src/components/ProgressBar.js +0 -118
  65. package/src/components/ProgressCircle.js +0 -13
  66. package/src/components/ProgressIndicator.js +0 -27
  67. package/src/components/RadioButton/RadioButton.js +0 -17
  68. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  69. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  70. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  71. package/src/components/RadioButton/context.js +0 -14
  72. package/src/components/RadioButton/index.js +0 -4
  73. package/src/components/ResizeMode.js +0 -1
  74. package/src/components/Row.js +0 -48
  75. package/src/components/RowBodyIcon.js +0 -8
  76. package/src/components/RowHeadlineImageCaption.js +0 -12
  77. package/src/components/RowHeadlineImageIcon.js +0 -14
  78. package/src/components/SVG.js +0 -13
  79. package/src/components/ScreenContainer.js +0 -35
  80. package/src/components/Slider.js +0 -63
  81. package/src/components/StarRating.js +0 -50
  82. package/src/components/StepIndicator.js +0 -346
  83. package/src/components/Stepper.js +0 -41
  84. package/src/components/Surface.js +0 -32
  85. package/src/components/Swiper/Swiper.js +0 -29
  86. package/src/components/Swiper/SwiperItem.js +0 -9
  87. package/src/components/Swiper/index.js +0 -2
  88. package/src/components/Switch.js +0 -56
  89. package/src/components/Text.js +0 -33
  90. package/src/components/TextField.js +0 -428
  91. package/src/components/ToggleButton.js +0 -39
  92. package/src/components/Touchable.js +0 -12
  93. package/src/components/Touchable.web.js +0 -2
  94. package/src/components/Typography.js +0 -36
  95. package/src/components/useAuthState.js +0 -31
  96. package/src/constants.js +0 -10
  97. package/src/hooks.js +0 -12
  98. package/src/index.js +0 -46
  99. package/src/interfaces/Icon.js +0 -8
  100. package/src/mappings/Accordion.js +0 -50
  101. package/src/mappings/AccordionItem.js +0 -17
  102. package/src/mappings/ActionSheet.js +0 -14
  103. package/src/mappings/ActionSheetCancel.js +0 -20
  104. package/src/mappings/ActionSheetItem.js +0 -24
  105. package/src/mappings/ActivityIndicator.js +0 -58
  106. package/src/mappings/AudioPlayer.js +0 -57
  107. package/src/mappings/AvatarEdit.js +0 -38
  108. package/src/mappings/Banner.js +0 -32
  109. package/src/mappings/BlurView.js +0 -42
  110. package/src/mappings/Button.js +0 -116
  111. package/src/mappings/Card.js +0 -52
  112. package/src/mappings/CardBlock.js +0 -123
  113. package/src/mappings/CardContainer.js +0 -104
  114. package/src/mappings/CardContainerRating.js +0 -126
  115. package/src/mappings/CardContainerShortImage.js +0 -120
  116. package/src/mappings/CardInline.js +0 -52
  117. package/src/mappings/Carousel.js +0 -19
  118. package/src/mappings/Checkbox.js +0 -46
  119. package/src/mappings/CheckboxGroup.js +0 -26
  120. package/src/mappings/CheckboxRow.js +0 -61
  121. package/src/mappings/CircleImage.js +0 -25
  122. package/src/mappings/Container.js +0 -30
  123. package/src/mappings/CustomCode.js +0 -8
  124. package/src/mappings/DatePicker.js +0 -182
  125. package/src/mappings/DeckSwiper.js +0 -48
  126. package/src/mappings/DeckSwiperCard.js +0 -16
  127. package/src/mappings/Divider.js +0 -27
  128. package/src/mappings/FAB.js +0 -37
  129. package/src/mappings/Fetch.js +0 -13
  130. package/src/mappings/FieldSearchBarFull.js +0 -50
  131. package/src/mappings/FlashList.js +0 -113
  132. package/src/mappings/FlatList.js +0 -51
  133. package/src/mappings/HeaderLarge.js +0 -29
  134. package/src/mappings/HeaderMedium.js +0 -55
  135. package/src/mappings/HeaderOverline.js +0 -55
  136. package/src/mappings/HtmlElements.js +0 -191
  137. package/src/mappings/HtmlElements.ts +0 -204
  138. package/src/mappings/Icon.js +0 -32
  139. package/src/mappings/IconButton.js +0 -33
  140. package/src/mappings/Image.js +0 -35
  141. package/src/mappings/ImageBackground.js +0 -29
  142. package/src/mappings/KeyboardAvoidingView.js +0 -41
  143. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  144. package/src/mappings/Layout.js +0 -200
  145. package/src/mappings/LinearGradient.js +0 -82
  146. package/src/mappings/MapCallout.js +0 -22
  147. package/src/mappings/MapMarker.js +0 -48
  148. package/src/mappings/MapView.js +0 -142
  149. package/src/mappings/Modal.js +0 -42
  150. package/src/mappings/NumberInput.js +0 -254
  151. package/src/mappings/Picker.js +0 -153
  152. package/src/mappings/ProgressBar.js +0 -101
  153. package/src/mappings/ProgressCircle.js +0 -109
  154. package/src/mappings/ProgressIndicator.js +0 -181
  155. package/src/mappings/RadioButton.js +0 -51
  156. package/src/mappings/RadioButtonGroup.js +0 -17
  157. package/src/mappings/RadioButtonRow.js +0 -42
  158. package/src/mappings/RowBodyIcon.js +0 -75
  159. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  160. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  161. package/src/mappings/SVG.js +0 -20
  162. package/src/mappings/SafeAreaView.js +0 -33
  163. package/src/mappings/ScrollView.js +0 -37
  164. package/src/mappings/Slider.js +0 -60
  165. package/src/mappings/StarRating.js +0 -43
  166. package/src/mappings/Stepper.js +0 -32
  167. package/src/mappings/Surface.js +0 -14
  168. package/src/mappings/Swiper.js +0 -71
  169. package/src/mappings/SwiperItem.js +0 -9
  170. package/src/mappings/Switch.js +0 -81
  171. package/src/mappings/Text.js +0 -251
  172. package/src/mappings/TextArea.js +0 -283
  173. package/src/mappings/TextField.js +0 -400
  174. package/src/mappings/TextInput.js +0 -402
  175. package/src/mappings/ToggleButton.js +0 -50
  176. package/src/mappings/Touchable.js +0 -67
  177. package/src/mappings/Video.js +0 -81
  178. package/src/mappings/View.js +0 -207
  179. package/src/mappings/WebView.js +0 -88
  180. package/src/styles/DarkTheme.js +0 -26
  181. package/src/styles/DefaultTheme.js +0 -111
  182. package/src/styles/fonts.js +0 -62
  183. package/src/styles/overlay.js +0 -60
  184. package/src/styles/shadow.js +0 -51
  185. package/src/theming.js +0 -3
  186. package/src/utilities.js +0 -102
@@ -1,55 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Header Overline",
5
- tag: "HeaderOverline",
6
- description: "A small header with an optional touchable right aligned text and icon.",
7
- category: COMPONENT_TYPES.header,
8
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
- preview_image_url: "{CLOUDINARY_URL}/Header_OverlineIconText.png",
10
- supports_list_render: false,
11
- props: {
12
- title: {
13
- group: GROUPS.data,
14
- label: "Title",
15
- description: "Text to display",
16
- formType: FORM_TYPES.string,
17
- propType: PROP_TYPES.STRING,
18
- defaultValue: "Title",
19
- editable: true,
20
- required: false,
21
- },
22
- buttonText: {
23
- group: GROUPS.data,
24
- label: "Button text",
25
- description: "Right aligned button text to display",
26
- formType: FORM_TYPES.string,
27
- propType: PROP_TYPES.STRING,
28
- defaultValue: "See All",
29
- editable: true,
30
- required: false,
31
- },
32
- icon: {
33
- group: GROUPS.basic,
34
- label: "Icon",
35
- description: "Name of icon to display",
36
- formType: FORM_TYPES.icon,
37
- propType: PROP_TYPES.ASSET,
38
- defaultValue: null,
39
- editable: true,
40
- required: false,
41
- },
42
- onPress: {
43
- group: GROUPS.basic,
44
- label: "Action",
45
- description: "Action to execute when button pressed",
46
- editable: true,
47
- required: false,
48
- formType: FORM_TYPES.action,
49
- propType: PROP_TYPES.STRING,
50
- defaultValue: null,
51
- },
52
- },
53
- layout: {},
54
- },
55
- ];
@@ -1,191 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp, FORM_TYPES, PROP_TYPES, GROUPS, StylesPanelSections, } 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: [
7
- StylesPanelSections.Typography,
8
- StylesPanelSections.LayoutSelectedItem,
9
- StylesPanelSections.MarginsAndPaddings,
10
- StylesPanelSections.Effects,
11
- ],
12
- layout: {
13
- margin: 0,
14
- },
15
- category: COMPONENT_TYPES.webelement,
16
- };
17
- const HEADING_SEED_DATA = {
18
- ...ELEMENT_SEED_DATA,
19
- category: COMPONENT_TYPES.text,
20
- props: {
21
- accessibilityLabel: {
22
- group: GROUPS.accessibility,
23
- name: "accessibilityLabel",
24
- label: "accessibilityLabel",
25
- 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.",
26
- editable: true,
27
- required: false,
28
- formType: FORM_TYPES.string,
29
- propType: PROP_TYPES.STRING,
30
- defaultValue: null,
31
- },
32
- selectable: {
33
- group: GROUPS.advanced,
34
- name: "selectable",
35
- label: "selectable",
36
- description: "Lets the user select text, to use the native copy and paste functionality.",
37
- editable: true,
38
- required: false,
39
- formType: FORM_TYPES.boolean,
40
- propType: PROP_TYPES.BOOLEAN,
41
- defaultValue: null,
42
- },
43
- children: {
44
- group: GROUPS.data,
45
- label: "Text",
46
- description: "Text",
47
- editable: true,
48
- required: true,
49
- formType: FORM_TYPES.string,
50
- propType: PROP_TYPES.STRING,
51
- defaultValue: "Your Headline Here",
52
- },
53
- },
54
- };
55
- const TEXT_SEED_DATA = {
56
- ...ELEMENT_SEED_DATA,
57
- category: COMPONENT_TYPES.text,
58
- props: {
59
- children: {
60
- group: GROUPS.data,
61
- label: "Text",
62
- description: "Text",
63
- defaultValue: "Your Text Here",
64
- editable: true,
65
- required: true,
66
- formType: FORM_TYPES.string,
67
- propType: PROP_TYPES.STRING,
68
- },
69
- },
70
- };
71
- export const SEED_DATA = [
72
- {
73
- name: "H1",
74
- tag: "H1",
75
- ...HEADING_SEED_DATA,
76
- },
77
- {
78
- name: "H2",
79
- tag: "H2",
80
- ...HEADING_SEED_DATA,
81
- },
82
- {
83
- name: "H3",
84
- tag: "H3",
85
- ...HEADING_SEED_DATA,
86
- },
87
- {
88
- name: "H4",
89
- tag: "H4",
90
- ...HEADING_SEED_DATA,
91
- },
92
- {
93
- name: "H5",
94
- tag: "H5",
95
- ...HEADING_SEED_DATA,
96
- },
97
- {
98
- name: "H6",
99
- tag: "H6",
100
- ...HEADING_SEED_DATA,
101
- },
102
- {
103
- name: "Anchor",
104
- tag: "A",
105
- ...TEXT_SEED_DATA,
106
- props: {
107
- href: createTextProp({
108
- label: "href",
109
- description: "Specify the URL",
110
- defaultValue: "",
111
- }),
112
- target: {
113
- group: GROUPS.basic,
114
- label: "target",
115
- description: "decide where link should open",
116
- formType: FORM_TYPES.flatArray,
117
- defaultValue: "_blank",
118
- options: ["_blank", "_self", "_parent", "_top"],
119
- },
120
- },
121
- },
122
- {
123
- name: "Paragraph",
124
- tag: "P",
125
- ...TEXT_SEED_DATA,
126
- props: {
127
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
128
- // strong: createBoolProp({
129
- // label: "Strong",
130
- // description: "Strong",
131
- // }),
132
- // strike: createBoolProp({
133
- // label: "Strike",
134
- // description: "Strike through",
135
- // }),
136
- // italic: createBoolProp({
137
- // label: "Italic",
138
- // description: "Italic Fonts",
139
- // }),
140
- // bold: createBoolProp({
141
- // label: "Bold",
142
- // description: "Bold",
143
- // }),
144
- },
145
- },
146
- {
147
- name: "Code",
148
- tag: "Code",
149
- ...TEXT_SEED_DATA,
150
- },
151
- {
152
- name: "Pre",
153
- tag: "Pre",
154
- ...TEXT_SEED_DATA,
155
- },
156
- {
157
- name: "Mark",
158
- tag: "Mark",
159
- ...TEXT_SEED_DATA,
160
- },
161
- {
162
- name: "BR",
163
- tag: "BR",
164
- ...TEXT_SEED_DATA,
165
- },
166
- {
167
- name: "BlockQuote",
168
- tag: "BlockQuote",
169
- ...TEXT_SEED_DATA,
170
- },
171
- {
172
- name: "HR",
173
- tag: "HR",
174
- ...TEXT_SEED_DATA,
175
- },
176
- {
177
- name: "Time",
178
- tag: "Time",
179
- ...ELEMENT_SEED_DATA,
180
- },
181
- {
182
- name: "UL",
183
- tag: "UL",
184
- ...ELEMENT_SEED_DATA,
185
- },
186
- {
187
- name: "LI",
188
- tag: "LI",
189
- ...ELEMENT_SEED_DATA,
190
- },
191
- ];
@@ -1,204 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createTextProp,
4
- FORM_TYPES,
5
- PROP_TYPES,
6
- GROUPS,
7
- StylesPanelSections,
8
- } from "@draftbit/types";
9
-
10
- const ELEMENT_SEED_DATA = {
11
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
12
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
13
- packageName: "@expo/html-elements",
14
- stylesPanelSections: [
15
- StylesPanelSections.Typography,
16
- StylesPanelSections.LayoutSelectedItem,
17
- StylesPanelSections.MarginsAndPaddings,
18
- StylesPanelSections.Effects,
19
- ],
20
- layout: {
21
- margin: 0,
22
- },
23
- category: COMPONENT_TYPES.webelement,
24
- };
25
-
26
- const HEADING_SEED_DATA = {
27
- ...ELEMENT_SEED_DATA,
28
- category: COMPONENT_TYPES.text,
29
- props: {
30
- accessibilityLabel: {
31
- group: GROUPS.accessibility,
32
- name: "accessibilityLabel",
33
- label: "accessibilityLabel",
34
- description:
35
- "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.",
36
- editable: true,
37
- required: false,
38
- formType: FORM_TYPES.string,
39
- propType: PROP_TYPES.STRING,
40
- defaultValue: null,
41
- },
42
- selectable: {
43
- group: GROUPS.advanced,
44
- name: "selectable",
45
- label: "selectable",
46
- description:
47
- "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: null,
53
- },
54
- children: {
55
- group: GROUPS.data,
56
- label: "Text",
57
- description: "Text",
58
- editable: true,
59
- required: true,
60
- formType: FORM_TYPES.string,
61
- propType: PROP_TYPES.STRING,
62
- defaultValue: "Your Headline Here",
63
- },
64
- },
65
- };
66
-
67
- const TEXT_SEED_DATA = {
68
- ...ELEMENT_SEED_DATA,
69
- category: COMPONENT_TYPES.text,
70
- props: {
71
- children: {
72
- group: GROUPS.data,
73
- label: "Text",
74
- description: "Text",
75
- defaultValue: "Your Text Here",
76
- editable: true,
77
- required: true,
78
- formType: FORM_TYPES.string,
79
- propType: PROP_TYPES.STRING,
80
- },
81
- },
82
- };
83
-
84
- export const SEED_DATA = [
85
- {
86
- name: "H1",
87
- tag: "H1",
88
- ...HEADING_SEED_DATA,
89
- },
90
- {
91
- name: "H2",
92
- tag: "H2",
93
- ...HEADING_SEED_DATA,
94
- },
95
- {
96
- name: "H3",
97
- tag: "H3",
98
- ...HEADING_SEED_DATA,
99
- },
100
- {
101
- name: "H4",
102
- tag: "H4",
103
- ...HEADING_SEED_DATA,
104
- },
105
- {
106
- name: "H5",
107
- tag: "H5",
108
- ...HEADING_SEED_DATA,
109
- },
110
- {
111
- name: "H6",
112
- tag: "H6",
113
- ...HEADING_SEED_DATA,
114
- },
115
- {
116
- name: "Anchor",
117
- tag: "A",
118
- ...TEXT_SEED_DATA,
119
- props: {
120
- href: createTextProp({
121
- label: "href",
122
- description: "Specify the URL",
123
- defaultValue: "",
124
- }),
125
- target: {
126
- group: GROUPS.basic,
127
- label: "target",
128
- description: "decide where link should open",
129
- formType: FORM_TYPES.flatArray,
130
- defaultValue: "_blank",
131
- options: ["_blank", "_self", "_parent", "_top"],
132
- },
133
- },
134
- },
135
- {
136
- name: "Paragraph",
137
- tag: "P",
138
- ...TEXT_SEED_DATA,
139
- props: {
140
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
141
- // strong: createBoolProp({
142
- // label: "Strong",
143
- // description: "Strong",
144
- // }),
145
- // strike: createBoolProp({
146
- // label: "Strike",
147
- // description: "Strike through",
148
- // }),
149
- // italic: createBoolProp({
150
- // label: "Italic",
151
- // description: "Italic Fonts",
152
- // }),
153
- // bold: createBoolProp({
154
- // label: "Bold",
155
- // description: "Bold",
156
- // }),
157
- },
158
- },
159
- {
160
- name: "Code",
161
- tag: "Code",
162
- ...TEXT_SEED_DATA,
163
- },
164
- {
165
- name: "Pre",
166
- tag: "Pre",
167
- ...TEXT_SEED_DATA,
168
- },
169
- {
170
- name: "Mark",
171
- tag: "Mark",
172
- ...TEXT_SEED_DATA,
173
- },
174
- {
175
- name: "BR",
176
- tag: "BR",
177
- ...TEXT_SEED_DATA,
178
- },
179
- {
180
- name: "BlockQuote",
181
- tag: "BlockQuote",
182
- ...TEXT_SEED_DATA,
183
- },
184
- {
185
- name: "HR",
186
- tag: "HR",
187
- ...TEXT_SEED_DATA,
188
- },
189
- {
190
- name: "Time",
191
- tag: "Time",
192
- ...ELEMENT_SEED_DATA,
193
- },
194
- {
195
- name: "UL",
196
- tag: "UL",
197
- ...ELEMENT_SEED_DATA,
198
- },
199
- {
200
- name: "LI",
201
- tag: "LI",
202
- ...ELEMENT_SEED_DATA,
203
- },
204
- ];
@@ -1,32 +0,0 @@
1
- import { COMPONENT_TYPES, GROUPS, createNumberProp, createColorProp, createIconProp, StylesPanelSections, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Icon",
4
- tag: "Icon",
5
- description: "An icon",
6
- category: COMPONENT_TYPES.basic,
7
- stylesPanelSections: [
8
- StylesPanelSections.Size,
9
- StylesPanelSections.Margins,
10
- StylesPanelSections.Background,
11
- StylesPanelSections.Position,
12
- StylesPanelSections.Effects,
13
- ],
14
- layout: {},
15
- props: {
16
- name: {
17
- ...createIconProp(),
18
- group: GROUPS.data,
19
- },
20
- color: createColorProp(),
21
- size: createNumberProp({
22
- group: GROUPS.basic,
23
- label: "Size",
24
- description: "Width and height of your icon",
25
- defaultValue: 24,
26
- min: 1,
27
- max: 128,
28
- step: 1,
29
- precision: 0,
30
- }),
31
- },
32
- };
@@ -1,33 +0,0 @@
1
- import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createActionProp, Triggers, StylesPanelSections, createDisabledProp, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Icon Button",
4
- tag: "IconButton",
5
- category: COMPONENT_TYPES.button,
6
- layout: {},
7
- triggers: [Triggers.OnPress, Triggers.OnLongPress],
8
- stylesPanelSections: [
9
- StylesPanelSections.Margins,
10
- StylesPanelSections.Effects,
11
- StylesPanelSections.Position,
12
- ],
13
- props: {
14
- onPress: createActionProp(),
15
- onLongPress: createActionProp(),
16
- disabled: createDisabledProp(),
17
- icon: createIconProp(),
18
- color: createColorProp({
19
- label: "Color",
20
- group: GROUPS.basic,
21
- }),
22
- size: createNumberProp({
23
- group: GROUPS.basic,
24
- label: "Size",
25
- description: "Width and height of your icon",
26
- defaultValue: 32,
27
- min: 16,
28
- max: 256,
29
- step: 1,
30
- precision: 0,
31
- }),
32
- },
33
- };
@@ -1,35 +0,0 @@
1
- import { COMPONENT_TYPES, createImageProp, createResizeModeProp, StylesPanelSections, FORM_TYPES, PROP_TYPES, GROUPS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Image",
4
- tag: "Image",
5
- description: "A basic Image Component",
6
- category: COMPONENT_TYPES.media,
7
- stylesPanelSections: [
8
- StylesPanelSections.Size,
9
- StylesPanelSections.Margins,
10
- StylesPanelSections.Position,
11
- StylesPanelSections.Effects,
12
- StylesPanelSections.Borders,
13
- ],
14
- layout: {
15
- width: 100,
16
- height: 100,
17
- },
18
- props: {
19
- source: createImageProp(),
20
- resizeMode: createResizeModeProp(),
21
- blurRadius: {
22
- group: GROUPS.basic,
23
- name: "blurRadius",
24
- label: "Blur Radius",
25
- defaultValue: null,
26
- description: "The blur radius of the blur filter added to the image.",
27
- editable: true,
28
- required: false,
29
- formType: FORM_TYPES.number,
30
- propType: PROP_TYPES.NUMBER,
31
- step: 5,
32
- precision: 1,
33
- },
34
- },
35
- };
@@ -1,29 +0,0 @@
1
- import { COMPONENT_TYPES, createImageProp, createResizeModeProp, createTextEnumProp, createColorProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Image Background",
4
- tag: "ImageBackground",
5
- doc_link: "https://docs.expo.io/versions/latest/react-native/imagebackground/",
6
- code_link: "https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageBackground.js",
7
- description: "A very simple drop-in replacement for Image that allows you to use an Image as a background.",
8
- category: COMPONENT_TYPES.media,
9
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
10
- layout: {
11
- width: "100%",
12
- height: "100%",
13
- },
14
- props: {
15
- source: createImageProp({
16
- defaultValue: "https://static.draftbit.com/images/placeholder-image-background.png",
17
- }),
18
- resizeMode: createResizeModeProp(),
19
- backgroundColor: createColorProp({
20
- label: "Background Color",
21
- description: "If no image is chosen render a colored background.",
22
- }),
23
- backfaceVisibility: createTextEnumProp({
24
- label: "Backface Visibility",
25
- description: "When animating a card, show the back face of it",
26
- options: ["visible", "hidden"],
27
- }),
28
- },
29
- };
@@ -1,41 +0,0 @@
1
- import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, GROUPS, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Keyboard Avoiding View",
4
- tag: "KeyboardAvoidingView",
5
- description: "View that moves out of the way of the virtual keyboard. ",
6
- category: COMPONENT_TYPES.view,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- props: {
9
- enabled: {
10
- label: "Enabled",
11
- description: "Enable the keyboard avoiding view",
12
- editable: true,
13
- required: true,
14
- defaultValue: true,
15
- formType: FORM_TYPES.boolean,
16
- propType: PROP_TYPES.BOOLEAN,
17
- group: GROUPS.basic,
18
- },
19
- behavior: {
20
- label: "Resizing Behavior",
21
- description: "The behavior for how the keyboard resizing interacts with the rest of the screen. (Default: padding).",
22
- editable: true,
23
- required: true,
24
- defaultValue: "padding",
25
- options: ["padding", "position", "height"],
26
- formType: FORM_TYPES.flatArray,
27
- propType: PROP_TYPES.STRING,
28
- group: GROUPS.basic,
29
- },
30
- keyboardVerticalOffset: {
31
- label: "Keyboard Vertical Offset",
32
- description: "The distance between the bottom of the view and the keyboard",
33
- editable: true,
34
- required: false,
35
- defaultValue: 0,
36
- formType: FORM_TYPES.number,
37
- propType: PROP_TYPES.NUMBER,
38
- group: GROUPS.basic,
39
- },
40
- },
41
- };
@@ -1,50 +0,0 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, createStaticNumberProp, createTextEnumProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Keyboard Aware Scroll View",
4
- tag: "KeyboardAwareScrollView",
5
- description: "View that moves pushes the content when virtual keyboard is open.",
6
- category: COMPONENT_TYPES.view,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {},
9
- props: {
10
- viewIsInsideTabBar: createStaticBoolProp({
11
- label: "View Is Inside TabBar",
12
- description: "Adds an extra offset that represents the TabBarIOS height.",
13
- }),
14
- enableAutomaticScroll: createStaticBoolProp({
15
- label: "Enable Automatic Scroll",
16
- description: "When focus in TextInput will scroll the position, default is enabled",
17
- }),
18
- extraHeight: createStaticNumberProp({
19
- label: "Extra Height",
20
- description: "Adds an extra offset when focusing the TextInputs",
21
- }),
22
- extraScrollHeight: createStaticNumberProp({
23
- label: "Extra Scroll Height",
24
- description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard",
25
- }),
26
- enableResetScrollToCoords: createStaticBoolProp({
27
- label: "Enable Reset Scroll To Coordinates",
28
- description: "Lets the user enable or disable automatic resetScrollToCoords",
29
- }),
30
- keyboardOpeningTime: createStaticNumberProp({
31
- label: "Opening Time",
32
- description: "Sets the delay time before scrolling to new position after keyboard opening, default is 250",
33
- }),
34
- enableOnAndroid: createStaticBoolProp({
35
- label: "Enable On Android",
36
- description: "Enable Android Support",
37
- }),
38
- showsVerticalScrollIndicator: createStaticBoolProp({
39
- label: "Shows Vertical Scroll Indicator",
40
- description: "Show or hide the vertical scroll indicator",
41
- defaultValue: true,
42
- }),
43
- keyboardShouldPersistTaps: createTextEnumProp({
44
- label: "Allow Touch Events",
45
- description: "Allows touch events on visible components to be processed while the keyboard is open",
46
- defaultValue: "never",
47
- options: ["never", "always"],
48
- }),
49
- },
50
- };