@draftbit/core 44.1.13-c10e64.0 → 44.1.14

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 (228) hide show
  1. package/lib/commonjs/components/CircularProgress.js.map +1 -1
  2. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  3. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
  4. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  5. package/lib/commonjs/components/Justification.js +0 -3
  6. package/lib/commonjs/components/Picker/Picker.js +266 -27
  7. package/lib/commonjs/components/Picker/Picker.js.map +1 -1
  8. package/lib/commonjs/components/Picker/PickerComponent.android.js +34 -110
  9. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
  10. package/lib/commonjs/components/Picker/PickerComponent.ios.js +44 -113
  11. package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
  12. package/lib/commonjs/components/Picker/PickerComponent.web.js +34 -111
  13. package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
  14. package/lib/commonjs/components/ResizeMode.js +0 -3
  15. package/lib/commonjs/mappings/Picker.js +7 -1
  16. package/lib/commonjs/mappings/Picker.js.map +1 -1
  17. package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
  18. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  19. package/lib/commonjs/utilities.js +19 -0
  20. package/lib/commonjs/utilities.js.map +1 -1
  21. package/lib/module/components/Justification.js +1 -1
  22. package/lib/module/components/Picker/Picker.js +260 -28
  23. package/lib/module/components/Picker/Picker.js.map +1 -1
  24. package/lib/module/components/Picker/PickerComponent.android.js +32 -103
  25. package/lib/module/components/Picker/PickerComponent.android.js.map +1 -1
  26. package/lib/module/components/Picker/PickerComponent.ios.js +42 -108
  27. package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
  28. package/lib/module/components/Picker/PickerComponent.web.js +32 -104
  29. package/lib/module/components/Picker/PickerComponent.web.js.map +1 -1
  30. package/lib/module/components/ResizeMode.js +1 -1
  31. package/lib/module/mappings/Picker.js +8 -2
  32. package/lib/module/mappings/Picker.js.map +1 -1
  33. package/lib/module/utilities.js +12 -1
  34. package/lib/module/utilities.js.map +1 -1
  35. package/lib/typescript/src/components/Picker/Picker.d.ts +28 -4
  36. package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +12 -5
  37. package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +11 -5
  38. package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +12 -5
  39. package/lib/typescript/src/mappings/Picker.d.ts +21 -0
  40. package/lib/typescript/src/utilities.d.ts +7 -0
  41. package/package.json +2 -2
  42. package/src/components/Picker/Picker.tsx +434 -34
  43. package/src/components/Picker/PickerComponent.android.tsx +44 -101
  44. package/src/components/Picker/PickerComponent.ios.tsx +63 -116
  45. package/src/components/Picker/PickerComponent.web.tsx +44 -102
  46. package/src/mappings/Picker.ts +4 -0
  47. package/src/utilities.ts +65 -1
  48. package/lib/commonjs/components/Picker/PickerTypes.js +0 -6
  49. package/lib/commonjs/components/Picker/PickerTypes.js.map +0 -1
  50. package/lib/module/components/Picker/PickerTypes.js +0 -2
  51. package/lib/module/components/Picker/PickerTypes.js.map +0 -1
  52. package/lib/typescript/src/components/Picker/PickerTypes.d.ts +0 -18
  53. package/src/Provider.js +0 -9
  54. package/src/components/Accordion/AccordionGroup.js +0 -44
  55. package/src/components/Accordion/AccordionItem.js +0 -32
  56. package/src/components/Accordion/index.js +0 -2
  57. package/src/components/ActionSheet/ActionSheet.js +0 -45
  58. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  59. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  60. package/src/components/ActionSheet/index.js +0 -3
  61. package/src/components/AnimatedCircularProgress.js +0 -43
  62. package/src/components/AspectRatio.js +0 -18
  63. package/src/components/AvatarEdit.js +0 -30
  64. package/src/components/Banner.js +0 -109
  65. package/src/components/Button.js +0 -112
  66. package/src/components/Card.js +0 -57
  67. package/src/components/CardBlock.js +0 -54
  68. package/src/components/CardContainer.js +0 -69
  69. package/src/components/CardContainerRating.js +0 -79
  70. package/src/components/CardContainerShortImage.js +0 -33
  71. package/src/components/CardInline.js +0 -36
  72. package/src/components/Carousel.js +0 -66
  73. package/src/components/Checkbox/Checkbox.js +0 -63
  74. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  75. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  76. package/src/components/Checkbox/CheckboxRow.js +0 -78
  77. package/src/components/Checkbox/context.js +0 -14
  78. package/src/components/Checkbox/index.js +0 -3
  79. package/src/components/CircleImage.js +0 -8
  80. package/src/components/CircularProgress.js +0 -78
  81. package/src/components/Config.js +0 -63
  82. package/src/components/Container.js +0 -43
  83. package/src/components/DatePicker/DatePicker.js +0 -368
  84. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  85. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  86. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  87. package/src/components/DeprecatedButton.js +0 -95
  88. package/src/components/DeprecatedCardWrapper.js +0 -18
  89. package/src/components/DeprecatedFAB.js +0 -115
  90. package/src/components/Divider.js +0 -13
  91. package/src/components/Elevation.js +0 -20
  92. package/src/components/FAB.js +0 -46
  93. package/src/components/FieldSearchBarFull.js +0 -53
  94. package/src/components/FormRow.js +0 -19
  95. package/src/components/Header.js +0 -44
  96. package/src/components/HeaderLarge.js +0 -7
  97. package/src/components/HeaderMedium.js +0 -7
  98. package/src/components/HeaderOverline.js +0 -7
  99. package/src/components/IconButton.js +0 -35
  100. package/src/components/Image.js +0 -47
  101. package/src/components/Justification.js +0 -1
  102. package/src/components/Layout.js +0 -50
  103. package/src/components/NumberInput.js +0 -49
  104. package/src/components/Picker/Picker.js +0 -56
  105. package/src/components/Picker/PickerComponent.android.js +0 -68
  106. package/src/components/Picker/PickerComponent.ios.js +0 -78
  107. package/src/components/Picker/PickerComponent.web.js +0 -69
  108. package/src/components/Picker/PickerTypes.js +0 -1
  109. package/src/components/Picker/PickerTypes.ts +0 -18
  110. package/src/components/Portal/Portal.js +0 -35
  111. package/src/components/Portal/PortalConsumer.js +0 -28
  112. package/src/components/Portal/PortalHost.js +0 -105
  113. package/src/components/Portal/PortalManager.js +0 -29
  114. package/src/components/ProgressBar.js +0 -118
  115. package/src/components/ProgressCircle.js +0 -13
  116. package/src/components/ProgressIndicator.js +0 -27
  117. package/src/components/RadioButton/RadioButton.js +0 -17
  118. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  119. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  120. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  121. package/src/components/RadioButton/context.js +0 -14
  122. package/src/components/RadioButton/index.js +0 -4
  123. package/src/components/ResizeMode.js +0 -1
  124. package/src/components/Row.js +0 -48
  125. package/src/components/RowBodyIcon.js +0 -8
  126. package/src/components/RowHeadlineImageCaption.js +0 -12
  127. package/src/components/RowHeadlineImageIcon.js +0 -14
  128. package/src/components/ScreenContainer.js +0 -34
  129. package/src/components/Slider.js +0 -63
  130. package/src/components/StarRating.js +0 -50
  131. package/src/components/StepIndicator.js +0 -346
  132. package/src/components/Stepper.js +0 -39
  133. package/src/components/Surface.js +0 -32
  134. package/src/components/Swiper/Swiper.js +0 -29
  135. package/src/components/Swiper/SwiperItem.js +0 -9
  136. package/src/components/Swiper/index.js +0 -2
  137. package/src/components/Switch.js +0 -56
  138. package/src/components/Text.js +0 -28
  139. package/src/components/TextField.js +0 -420
  140. package/src/components/ToggleButton.js +0 -39
  141. package/src/components/Touchable.js +0 -12
  142. package/src/components/Touchable.web.js +0 -2
  143. package/src/components/Typography.js +0 -36
  144. package/src/components/useAuthState.js +0 -31
  145. package/src/constants.js +0 -10
  146. package/src/hooks.js +0 -12
  147. package/src/index.js +0 -52
  148. package/src/interfaces/Icon.js +0 -8
  149. package/src/mappings/Accordion.js +0 -41
  150. package/src/mappings/AccordionItem.js +0 -16
  151. package/src/mappings/ActionSheet.js +0 -13
  152. package/src/mappings/ActionSheetCancel.js +0 -19
  153. package/src/mappings/ActionSheetItem.js +0 -23
  154. package/src/mappings/ActivityIndicator.js +0 -53
  155. package/src/mappings/AudioPlayer.js +0 -20
  156. package/src/mappings/AvatarEdit.js +0 -37
  157. package/src/mappings/Banner.js +0 -32
  158. package/src/mappings/BlurView.js +0 -41
  159. package/src/mappings/Button.js +0 -56
  160. package/src/mappings/Card.js +0 -52
  161. package/src/mappings/CardBlock.js +0 -122
  162. package/src/mappings/CardContainer.js +0 -102
  163. package/src/mappings/CardContainerRating.js +0 -124
  164. package/src/mappings/CardContainerShortImage.js +0 -118
  165. package/src/mappings/CardInline.js +0 -51
  166. package/src/mappings/Carousel.js +0 -18
  167. package/src/mappings/Checkbox.js +0 -45
  168. package/src/mappings/CheckboxGroup.js +0 -25
  169. package/src/mappings/CheckboxRow.js +0 -56
  170. package/src/mappings/CircleImage.js +0 -24
  171. package/src/mappings/Container.js +0 -29
  172. package/src/mappings/CustomCode.js +0 -8
  173. package/src/mappings/DatePicker.js +0 -146
  174. package/src/mappings/Divider.js +0 -26
  175. package/src/mappings/FAB.js +0 -36
  176. package/src/mappings/Fetch.js +0 -12
  177. package/src/mappings/FieldSearchBarFull.js +0 -49
  178. package/src/mappings/FlatList.js +0 -19
  179. package/src/mappings/HeaderLarge.js +0 -28
  180. package/src/mappings/HeaderMedium.js +0 -54
  181. package/src/mappings/HeaderOverline.js +0 -54
  182. package/src/mappings/Icon.js +0 -25
  183. package/src/mappings/IconButton.js +0 -30
  184. package/src/mappings/Image.js +0 -15
  185. package/src/mappings/ImageBackground.js +0 -28
  186. package/src/mappings/KeyboardAvoidingView.js +0 -40
  187. package/src/mappings/KeyboardAwareScrollView.js +0 -49
  188. package/src/mappings/Layout.js +0 -195
  189. package/src/mappings/LinearGradient.js +0 -77
  190. package/src/mappings/MapCallout.js +0 -21
  191. package/src/mappings/MapMarker.js +0 -47
  192. package/src/mappings/MapView.js +0 -138
  193. package/src/mappings/Modal.js +0 -41
  194. package/src/mappings/Picker.js +0 -137
  195. package/src/mappings/ProgressBar.js +0 -100
  196. package/src/mappings/ProgressCircle.js +0 -108
  197. package/src/mappings/ProgressIndicator.js +0 -180
  198. package/src/mappings/RadioButton.js +0 -50
  199. package/src/mappings/RadioButtonGroup.js +0 -16
  200. package/src/mappings/RadioButtonRow.js +0 -37
  201. package/src/mappings/RowBodyIcon.js +0 -75
  202. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  203. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  204. package/src/mappings/SafeAreaView.js +0 -33
  205. package/src/mappings/ScrollView.js +0 -30
  206. package/src/mappings/Slider.js +0 -59
  207. package/src/mappings/StarRating.js +0 -42
  208. package/src/mappings/Stepper.js +0 -28
  209. package/src/mappings/Surface.js +0 -13
  210. package/src/mappings/Swiper.js +0 -60
  211. package/src/mappings/SwiperItem.js +0 -8
  212. package/src/mappings/Switch.js +0 -75
  213. package/src/mappings/Text.js +0 -232
  214. package/src/mappings/TextArea.js +0 -52
  215. package/src/mappings/TextField.js +0 -158
  216. package/src/mappings/TextInput.js +0 -208
  217. package/src/mappings/ToggleButton.js +0 -45
  218. package/src/mappings/Touchable.js +0 -12
  219. package/src/mappings/Video.js +0 -74
  220. package/src/mappings/View.js +0 -206
  221. package/src/mappings/WebView.js +0 -18
  222. package/src/styles/DarkTheme.js +0 -26
  223. package/src/styles/DefaultTheme.js +0 -111
  224. package/src/styles/fonts.js +0 -62
  225. package/src/styles/overlay.js +0 -60
  226. package/src/styles/shadow.js +0 -51
  227. package/src/theming.js +0 -3
  228. package/src/utilities.js +0 -54
@@ -1,36 +0,0 @@
1
- import { COMPONENT_TYPES, createIconProp, createColorProp, GROUPS, createBoolProp, createIconSizeProp, createActionProp, Triggers, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "FAB",
4
- tag: "FAB",
5
- category: COMPONENT_TYPES.button,
6
- description: "A mini round icon FAB",
7
- layout: {},
8
- triggers: [Triggers.OnPress],
9
- props: {
10
- onPress: createActionProp(),
11
- disabled: createBoolProp({
12
- label: "Disabled",
13
- group: GROUPS.basic,
14
- }),
15
- loading: createBoolProp({
16
- label: "Loading",
17
- group: GROUPS.basic,
18
- }),
19
- iconName: createIconProp({
20
- label: "Icon",
21
- defaultValue: null,
22
- group: GROUPS.basic,
23
- }),
24
- iconColor: createColorProp({
25
- label: "Icon color",
26
- defaultValue: null,
27
- group: GROUPS.basic,
28
- }),
29
- bgColor: createColorProp({
30
- label: "Background color",
31
- defaultValue: null,
32
- group: GROUPS.basic,
33
- }),
34
- size: createIconSizeProp(),
35
- },
36
- };
@@ -1,12 +0,0 @@
1
- import { COMPONENT_TYPES } from "@draftbit/types";
2
- /* TODO remove, still used inside the builder in a weird way */
3
- export const SEED_DATA = {
4
- name: "Fetch",
5
- tag: "Fetch",
6
- description: "Rest API Declarative Fetch component. Uses react-request internally",
7
- category: COMPONENT_TYPES.data,
8
- layout: {
9
- minHeight: 40,
10
- },
11
- props: {},
12
- };
@@ -1,49 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Search Bar",
5
- tag: "FieldSearchBarFull",
6
- description: "A search bar with accompanying search icon and clear button.",
7
- category: COMPONENT_TYPES.input,
8
- preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
9
- supports_list_render: false,
10
- triggers: [Triggers.OnChange],
11
- props: {
12
- icon: {
13
- group: GROUPS.basic,
14
- label: "Icon",
15
- description: "Left icon to display",
16
- formType: FORM_TYPES.icon,
17
- propType: PROP_TYPES.ASSET,
18
- defaultValue: null,
19
- editable: true,
20
- required: false,
21
- },
22
- placeholder: {
23
- group: GROUPS.basic,
24
- label: "Placeholder",
25
- description: "Input placeholder text",
26
- formType: FORM_TYPES.string,
27
- propType: PROP_TYPES.STRING,
28
- defaultValue: "Search for...",
29
- editable: true,
30
- required: false,
31
- },
32
- onSubmit: {
33
- group: GROUPS.basic,
34
- label: "Submit action",
35
- description: "Action to execute on submission",
36
- editable: true,
37
- required: false,
38
- formType: FORM_TYPES.action,
39
- propType: PROP_TYPES.STRING,
40
- defaultValue: null,
41
- },
42
- fieldName: {
43
- ...FIELD_NAME,
44
- defaultValue: "searchBarValue",
45
- },
46
- },
47
- layout: {},
48
- },
49
- ];
@@ -1,19 +0,0 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "List",
4
- tag: "FlatList",
5
- description: "A basic List component",
6
- category: COMPONENT_TYPES.data,
7
- layout: {
8
- flex: 1,
9
- },
10
- props: {
11
- horizontal: createStaticBoolProp({
12
- label: "Horizontal",
13
- description: "Render list horizontally",
14
- }),
15
- numColumns: createNumColumnsType({
16
- editable: true,
17
- }),
18
- },
19
- };
@@ -1,28 +0,0 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createActionProp, Triggers, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Header Large",
5
- tag: "HeaderLarge",
6
- description: "A large header with an optional touchable right aligned text and icon.",
7
- category: COMPONENT_TYPES.header,
8
- layout: {},
9
- triggers: [Triggers.OnPress],
10
- props: {
11
- onPress: createActionProp(),
12
- title: createTextProp({
13
- label: "Title",
14
- description: "Text to display",
15
- defaultValue: "Title",
16
- }),
17
- buttonText: createTextProp({
18
- label: "Button text",
19
- description: "Right aligned button text to display",
20
- defaultValue: "See All",
21
- }),
22
- icon: createIconProp({
23
- defaultValue: null,
24
- required: false,
25
- }),
26
- },
27
- },
28
- ];
@@ -1,54 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Header Medium",
5
- tag: "HeaderMedium",
6
- description: "A medium header with an optional touchable right aligned text and icon.",
7
- category: COMPONENT_TYPES.header,
8
- preview_image_url: "{CLOUDINARY_URL}/Header_HeadlineMediumIconText.png",
9
- supports_list_render: false,
10
- props: {
11
- title: {
12
- group: GROUPS.data,
13
- label: "Title",
14
- description: "Text to display",
15
- formType: FORM_TYPES.string,
16
- propType: PROP_TYPES.STRING,
17
- defaultValue: "Title",
18
- editable: true,
19
- required: false,
20
- },
21
- buttonText: {
22
- group: GROUPS.data,
23
- label: "Button text",
24
- description: "Right aligned button text to display",
25
- formType: FORM_TYPES.string,
26
- propType: PROP_TYPES.STRING,
27
- defaultValue: "See All",
28
- editable: true,
29
- required: false,
30
- },
31
- icon: {
32
- group: GROUPS.basic,
33
- label: "Icon",
34
- description: "Name of icon to display",
35
- formType: FORM_TYPES.icon,
36
- propType: PROP_TYPES.ASSET,
37
- defaultValue: null,
38
- editable: true,
39
- required: false,
40
- },
41
- onPress: {
42
- group: GROUPS.basic,
43
- label: "Action",
44
- description: "Action to execute when button pressed",
45
- editable: true,
46
- required: false,
47
- formType: FORM_TYPES.action,
48
- propType: PROP_TYPES.STRING,
49
- defaultValue: null,
50
- },
51
- },
52
- layout: {},
53
- },
54
- ];
@@ -1,54 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } 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
- preview_image_url: "{CLOUDINARY_URL}/Header_OverlineIconText.png",
9
- supports_list_render: false,
10
- props: {
11
- title: {
12
- group: GROUPS.data,
13
- label: "Title",
14
- description: "Text to display",
15
- formType: FORM_TYPES.string,
16
- propType: PROP_TYPES.STRING,
17
- defaultValue: "Title",
18
- editable: true,
19
- required: false,
20
- },
21
- buttonText: {
22
- group: GROUPS.data,
23
- label: "Button text",
24
- description: "Right aligned button text to display",
25
- formType: FORM_TYPES.string,
26
- propType: PROP_TYPES.STRING,
27
- defaultValue: "See All",
28
- editable: true,
29
- required: false,
30
- },
31
- icon: {
32
- group: GROUPS.basic,
33
- label: "Icon",
34
- description: "Name of icon to display",
35
- formType: FORM_TYPES.icon,
36
- propType: PROP_TYPES.ASSET,
37
- defaultValue: null,
38
- editable: true,
39
- required: false,
40
- },
41
- onPress: {
42
- group: GROUPS.basic,
43
- label: "Action",
44
- description: "Action to execute when button pressed",
45
- editable: true,
46
- required: false,
47
- formType: FORM_TYPES.action,
48
- propType: PROP_TYPES.STRING,
49
- defaultValue: null,
50
- },
51
- },
52
- layout: {},
53
- },
54
- ];
@@ -1,25 +0,0 @@
1
- import { COMPONENT_TYPES, GROUPS, createNumberProp, createColorProp, createIconProp, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Icon",
4
- tag: "Icon",
5
- description: "An icon",
6
- category: COMPONENT_TYPES.basic,
7
- layout: {},
8
- props: {
9
- name: {
10
- ...createIconProp(),
11
- group: GROUPS.data,
12
- },
13
- color: createColorProp(),
14
- size: createNumberProp({
15
- group: GROUPS.basic,
16
- label: "Size",
17
- description: "Width and height of your icon",
18
- defaultValue: 24,
19
- min: 1,
20
- max: 128,
21
- step: 1,
22
- precision: 0,
23
- }),
24
- },
25
- };
@@ -1,30 +0,0 @@
1
- import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createBoolProp, createActionProp, Triggers, } 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],
8
- props: {
9
- onPress: createActionProp(),
10
- icon: createIconProp(),
11
- color: createColorProp({
12
- label: "Color",
13
- group: GROUPS.basic,
14
- }),
15
- disabled: createBoolProp({
16
- label: "Disabled",
17
- group: GROUPS.basic,
18
- }),
19
- size: createNumberProp({
20
- group: GROUPS.basic,
21
- label: "Size",
22
- description: "Width and height of your icon",
23
- defaultValue: 32,
24
- min: 16,
25
- max: 128,
26
- step: 1,
27
- precision: 0,
28
- }),
29
- },
30
- };
@@ -1,15 +0,0 @@
1
- import { COMPONENT_TYPES, createImageProp, createResizeModeProp, } 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
- layout: {
8
- width: 250,
9
- height: 250,
10
- },
11
- props: {
12
- source: createImageProp(),
13
- resizeMode: createResizeModeProp(),
14
- },
15
- };
@@ -1,28 +0,0 @@
1
- import { COMPONENT_TYPES, createImageProp, createResizeModeProp, createTextEnumProp, createColorProp, } 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
- layout: {
10
- width: "100%",
11
- height: "100%",
12
- },
13
- props: {
14
- source: createImageProp({
15
- defaultValue: "https://static.draftbit.com/images/placeholder-image-background.png",
16
- }),
17
- resizeMode: createResizeModeProp(),
18
- backgroundColor: createColorProp({
19
- label: "Background Color",
20
- description: "If no image is chosen render a colored background.",
21
- }),
22
- backfaceVisibility: createTextEnumProp({
23
- label: "Backface Visibility",
24
- description: "When animating a card, show the back face of it",
25
- options: ["visible", "hidden"],
26
- }),
27
- },
28
- };
@@ -1,40 +0,0 @@
1
- import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, GROUPS, } 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.deprecated,
7
- props: {
8
- enabled: {
9
- label: "Enable",
10
- description: "Enable the keyboard avoiding view",
11
- editable: true,
12
- required: true,
13
- defaultValue: true,
14
- formType: FORM_TYPES.boolean,
15
- propType: PROP_TYPES.BOOLEAN,
16
- group: GROUPS.basic,
17
- },
18
- behavior: {
19
- label: "Resizing Behavior",
20
- description: "The behavior for how the keyboard resizing interacts with the rest of the screen. (Default: padding).",
21
- editable: true,
22
- required: true,
23
- defaultValue: "padding",
24
- options: ["padding", "position", "height"],
25
- formType: FORM_TYPES.flatArray,
26
- propType: PROP_TYPES.STRING,
27
- group: GROUPS.basic,
28
- },
29
- keyboardVerticalOffset: {
30
- label: "Keyboard Vertical Offset",
31
- description: "The distance between the bottom of the view and the keyboard",
32
- editable: true,
33
- required: false,
34
- defaultValue: 0,
35
- formType: FORM_TYPES.number,
36
- propType: PROP_TYPES.NUMBER,
37
- group: GROUPS.basic,
38
- },
39
- },
40
- };
@@ -1,49 +0,0 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, createStaticNumberProp, createTextEnumProp, } 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.layout,
7
- layout: {},
8
- props: {
9
- viewIsInsideTabBar: createStaticBoolProp({
10
- label: "View Is Inside TabBar",
11
- description: "Adds an extra offset that represents the TabBarIOS height.",
12
- }),
13
- enableAutomaticScroll: createStaticBoolProp({
14
- label: "Enable Automatic Scroll",
15
- description: "When focus in TextInput will scroll the position, default is enabled",
16
- }),
17
- extraHeight: createStaticNumberProp({
18
- label: "Extra Height",
19
- description: "Adds an extra offset when focusing the TextInputs",
20
- }),
21
- extraScrollHeight: createStaticNumberProp({
22
- label: "Extra Scroll Height",
23
- description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard",
24
- }),
25
- enableResetScrollToCoords: createStaticBoolProp({
26
- label: "Enable Reset Scroll To Coordinates",
27
- description: "Lets the user enable or disable automatic resetScrollToCoords",
28
- }),
29
- keyboardOpeningTime: createStaticNumberProp({
30
- label: "Opening Time",
31
- description: "Sets the delay time before scrolling to new position after keyboard opening, default is 250",
32
- }),
33
- enableOnAndroid: createStaticBoolProp({
34
- label: "Enable On Android",
35
- description: "Enable Android Support",
36
- }),
37
- showsVerticalScrollIndicator: createStaticBoolProp({
38
- label: "Shows Vertical Scroll Indicator",
39
- description: "Show or hide the vertical scroll indicator",
40
- defaultValue: true,
41
- }),
42
- keyboardShouldPersistTaps: createTextEnumProp({
43
- label: "Allow Touch Events",
44
- description: "Allows touch events on visible components to be processed while the keyboard is open",
45
- defaultValue: "never",
46
- options: ["never", "always"],
47
- }),
48
- },
49
- };
@@ -1,195 +0,0 @@
1
- import { GROUPS, FORM_TYPES, PROP_TYPES, COMPONENT_TYPES, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Row",
5
- tag: "Row",
6
- category: COMPONENT_TYPES.layout,
7
- props: {
8
- justifyContent: {
9
- label: "Align Horizontally",
10
- group: GROUPS.style,
11
- description: "Align Items Horizontally (on the X Axis)",
12
- formType: FORM_TYPES.string,
13
- propType: PROP_TYPES.STRING,
14
- defaultValue: "flex-start",
15
- editable: true,
16
- required: false,
17
- },
18
- alignItems: {
19
- label: "Align Vertically",
20
- group: GROUPS.style,
21
- description: "Align Items Vertically (on the Y Axis)",
22
- formType: FORM_TYPES.string,
23
- propType: PROP_TYPES.STRING,
24
- defaultValue: "flex-start",
25
- editable: true,
26
- required: false,
27
- },
28
- },
29
- },
30
- {
31
- name: "Spacer",
32
- tag: "Spacer",
33
- category: COMPONENT_TYPES.layout,
34
- props: {
35
- top: {
36
- label: "Top",
37
- description: "Top",
38
- formType: FORM_TYPES.number,
39
- propType: PROP_TYPES.NUMBER,
40
- group: GROUPS.style,
41
- defaultValue: 8,
42
- editable: true,
43
- required: false,
44
- },
45
- right: {
46
- label: "Right",
47
- description: "Right",
48
- formType: FORM_TYPES.number,
49
- propType: PROP_TYPES.NUMBER,
50
- group: GROUPS.style,
51
- defaultValue: 8,
52
- editable: true,
53
- required: false,
54
- },
55
- bottom: {
56
- label: "Bottom",
57
- description: "Bottom",
58
- formType: FORM_TYPES.number,
59
- propType: PROP_TYPES.NUMBER,
60
- group: GROUPS.style,
61
- defaultValue: 8,
62
- editable: true,
63
- required: false,
64
- },
65
- left: {
66
- label: "Left",
67
- description: "Left",
68
- formType: FORM_TYPES.number,
69
- propType: PROP_TYPES.NUMBER,
70
- group: GROUPS.style,
71
- defaultValue: 8,
72
- editable: true,
73
- required: false,
74
- },
75
- },
76
- },
77
- {
78
- name: "Stack",
79
- tag: "Stack",
80
- category: COMPONENT_TYPES.layout,
81
- props: {
82
- justifyContent: {
83
- group: GROUPS.style,
84
- label: "Justify",
85
- description: "Justify horizontally",
86
- formType: FORM_TYPES.string,
87
- propType: PROP_TYPES.STRING,
88
- defaultValue: "flex-start",
89
- editable: true,
90
- required: false,
91
- },
92
- alignItems: {
93
- group: GROUPS.style,
94
- label: "Align",
95
- description: "Vertical align",
96
- formType: FORM_TYPES.string,
97
- propType: PROP_TYPES.STRING,
98
- defaultValue: "flex-start",
99
- editable: true,
100
- required: false,
101
- },
102
- },
103
- },
104
- {
105
- name: "Center",
106
- tag: "Center",
107
- category: COMPONENT_TYPES.layout,
108
- props: {
109
- width: {
110
- label: "Width",
111
- description: "Width",
112
- formType: FORM_TYPES.number,
113
- propType: PROP_TYPES.NUMBER,
114
- group: GROUPS.style,
115
- defaultValue: 240,
116
- editable: true,
117
- required: false,
118
- },
119
- height: {
120
- label: "Height",
121
- description: "Height",
122
- formType: FORM_TYPES.number,
123
- propType: PROP_TYPES.NUMBER,
124
- group: GROUPS.style,
125
- defaultValue: 200,
126
- editable: true,
127
- required: false,
128
- },
129
- bgColor: {
130
- label: "Background Color",
131
- description: "Background color",
132
- formType: FORM_TYPES.color,
133
- propType: PROP_TYPES.THEME,
134
- editable: true,
135
- required: false,
136
- defaultValue: "light",
137
- group: GROUPS.style,
138
- },
139
- },
140
- },
141
- {
142
- name: "Circle",
143
- tag: "Circle",
144
- category: COMPONENT_TYPES.layout,
145
- props: {
146
- size: {
147
- label: "Size",
148
- description: "Size",
149
- formType: FORM_TYPES.number,
150
- propType: PROP_TYPES.NUMBER,
151
- group: GROUPS.style,
152
- defaultValue: 50,
153
- editable: true,
154
- required: false,
155
- },
156
- bgColor: {
157
- label: "Background Color",
158
- description: "Background color",
159
- formType: FORM_TYPES.color,
160
- propType: PROP_TYPES.THEME,
161
- editable: true,
162
- required: false,
163
- defaultValue: "light",
164
- group: GROUPS.style,
165
- },
166
- },
167
- },
168
- {
169
- name: "Square",
170
- tag: "Square",
171
- category: COMPONENT_TYPES.layout,
172
- props: {
173
- size: {
174
- label: "Size",
175
- description: "Size",
176
- formType: FORM_TYPES.number,
177
- propType: PROP_TYPES.NUMBER,
178
- group: GROUPS.style,
179
- defaultValue: 50,
180
- editable: true,
181
- required: false,
182
- },
183
- bgColor: {
184
- label: "Background Color",
185
- description: "Background color",
186
- formType: FORM_TYPES.color,
187
- propType: PROP_TYPES.THEME,
188
- editable: true,
189
- required: false,
190
- defaultValue: "light",
191
- group: GROUPS.style,
192
- },
193
- },
194
- },
195
- ];