@draftbit/core 43.4.10 → 43.4.11-143169.1

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 (195) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +21 -5
  2. package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
  3. package/lib/commonjs/components/AvatarEdit.js +17 -5
  4. package/lib/commonjs/components/AvatarEdit.js.map +1 -1
  5. package/lib/commonjs/components/FAB.js +19 -5
  6. package/lib/commonjs/components/FAB.js.map +1 -1
  7. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  8. package/lib/commonjs/components/Justification.js +3 -0
  9. package/lib/commonjs/components/NumberInput.js +15 -17
  10. package/lib/commonjs/components/NumberInput.js.map +1 -1
  11. package/lib/commonjs/components/ResizeMode.js +3 -0
  12. package/lib/commonjs/mappings/Icon.js +3 -1
  13. package/lib/commonjs/mappings/Icon.js.map +1 -1
  14. package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -1
  15. package/lib/commonjs/mappings/RowHeadlineImageIcon.js.map +1 -1
  16. package/lib/module/components/Justification.js +1 -1
  17. package/lib/module/components/NumberInput.js +15 -17
  18. package/lib/module/components/NumberInput.js.map +1 -1
  19. package/lib/module/components/ResizeMode.js +1 -1
  20. package/lib/module/mappings/Icon.js +3 -1
  21. package/lib/module/mappings/Icon.js.map +1 -1
  22. package/lib/typescript/src/mappings/Icon.d.ts +1 -1
  23. package/package.json +2 -2
  24. package/src/Provider.js +9 -0
  25. package/src/components/Accordion/AccordionGroup.js +44 -0
  26. package/src/components/Accordion/AccordionItem.js +32 -0
  27. package/src/components/Accordion/index.js +2 -0
  28. package/src/components/ActionSheet/ActionSheet.js +45 -0
  29. package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
  30. package/src/components/ActionSheet/ActionSheetItem.js +30 -0
  31. package/src/components/ActionSheet/index.js +3 -0
  32. package/src/components/AnimatedCircularProgress.js +43 -0
  33. package/src/components/AspectRatio.js +18 -0
  34. package/src/components/AvatarEdit.js +30 -0
  35. package/src/components/Button.js +112 -0
  36. package/src/components/Card.js +57 -0
  37. package/src/components/CardBlock.js +54 -0
  38. package/src/components/CardContainer.js +69 -0
  39. package/src/components/CardContainerRating.js +79 -0
  40. package/src/components/CardContainerShortImage.js +33 -0
  41. package/src/components/CardInline.js +36 -0
  42. package/src/components/Carousel.js +66 -0
  43. package/src/components/Checkbox/Checkbox.js +63 -0
  44. package/src/components/Checkbox/CheckboxGroup.js +21 -0
  45. package/src/components/Checkbox/CheckboxRow.js +77 -0
  46. package/src/components/Checkbox/context.js +14 -0
  47. package/src/components/Checkbox/index.js +3 -0
  48. package/src/components/CircleImage.js +8 -0
  49. package/src/components/CircularProgress.js +78 -0
  50. package/src/components/Config.js +63 -0
  51. package/src/components/Container.js +44 -0
  52. package/src/components/DatePicker/DatePicker.js +370 -0
  53. package/src/components/DatePicker/DatePickerComponent.js +13 -0
  54. package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
  55. package/src/components/DatePicker/DatePickerComponentType.js +1 -0
  56. package/src/components/DeprecatedButton.js +95 -0
  57. package/src/components/DeprecatedCardWrapper.js +18 -0
  58. package/src/components/DeprecatedFAB.js +115 -0
  59. package/src/components/Divider.js +13 -0
  60. package/src/components/Elevation.js +20 -0
  61. package/src/components/FAB.js +46 -0
  62. package/src/components/FieldSearchBarFull.js +53 -0
  63. package/src/components/FormRow.js +19 -0
  64. package/src/components/Header.js +44 -0
  65. package/src/components/HeaderLarge.js +7 -0
  66. package/src/components/HeaderMedium.js +7 -0
  67. package/src/components/HeaderOverline.js +7 -0
  68. package/src/components/IconButton.js +35 -0
  69. package/src/components/Image.js +47 -0
  70. package/src/components/Justification.js +1 -0
  71. package/src/components/Layout.js +50 -0
  72. package/src/components/NumberInput.js +49 -0
  73. package/src/components/NumberInput.tsx +16 -31
  74. package/src/components/Picker/Picker.js +56 -0
  75. package/src/components/Picker/PickerComponent.android.js +68 -0
  76. package/src/components/Picker/PickerComponent.ios.js +78 -0
  77. package/src/components/Picker/PickerComponent.web.js +69 -0
  78. package/src/components/Picker/PickerTypes.js +1 -0
  79. package/src/components/Portal/Portal.js +35 -0
  80. package/src/components/Portal/PortalConsumer.js +28 -0
  81. package/src/components/Portal/PortalHost.js +105 -0
  82. package/src/components/Portal/PortalManager.js +29 -0
  83. package/src/components/ProgressBar.js +118 -0
  84. package/src/components/ProgressCircle.js +13 -0
  85. package/src/components/ProgressIndicator.js +27 -0
  86. package/src/components/RadioButton/RadioButton.js +17 -0
  87. package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
  88. package/src/components/RadioButton/RadioButtonGroup.js +39 -0
  89. package/src/components/RadioButton/RadioButtonRow.js +76 -0
  90. package/src/components/RadioButton/context.js +14 -0
  91. package/src/components/RadioButton/index.js +4 -0
  92. package/src/components/ResizeMode.js +1 -0
  93. package/src/components/Row.js +48 -0
  94. package/src/components/RowBodyIcon.js +8 -0
  95. package/src/components/RowHeadlineImageCaption.js +12 -0
  96. package/src/components/RowHeadlineImageIcon.js +14 -0
  97. package/src/components/ScreenContainer.js +35 -0
  98. package/src/components/Slider.js +63 -0
  99. package/src/components/StarRating.js +50 -0
  100. package/src/components/StepIndicator.js +346 -0
  101. package/src/components/Stepper.js +53 -0
  102. package/src/components/Surface.js +23 -0
  103. package/src/components/Swiper/Swiper.js +18 -0
  104. package/src/components/Swiper/SwiperItem.js +9 -0
  105. package/src/components/Swiper/index.js +2 -0
  106. package/src/components/Switch.js +56 -0
  107. package/src/components/Text.js +28 -0
  108. package/src/components/TextField.js +419 -0
  109. package/src/components/ToggleButton.js +39 -0
  110. package/src/components/Touchable.js +12 -0
  111. package/src/components/Touchable.web.js +2 -0
  112. package/src/components/Typography.js +36 -0
  113. package/src/components/useAuthState.js +31 -0
  114. package/src/constants.js +10 -0
  115. package/src/hooks.js +12 -0
  116. package/src/index.js +50 -0
  117. package/src/interfaces/Icon.js +8 -0
  118. package/src/mappings/Accordion.js +37 -0
  119. package/src/mappings/AccordionItem.js +16 -0
  120. package/src/mappings/ActionSheet.js +13 -0
  121. package/src/mappings/ActionSheetCancel.js +19 -0
  122. package/src/mappings/ActionSheetItem.js +22 -0
  123. package/src/mappings/ActivityIndicator.js +53 -0
  124. package/src/mappings/AudioPlayer.js +20 -0
  125. package/src/mappings/AvatarEdit.js +37 -0
  126. package/src/mappings/BlurView.js +41 -0
  127. package/src/mappings/Button.js +56 -0
  128. package/src/mappings/Card.js +52 -0
  129. package/src/mappings/CardBlock.js +122 -0
  130. package/src/mappings/CardContainer.js +102 -0
  131. package/src/mappings/CardContainerRating.js +124 -0
  132. package/src/mappings/CardContainerShortImage.js +118 -0
  133. package/src/mappings/CardInline.js +51 -0
  134. package/src/mappings/Carousel.js +18 -0
  135. package/src/mappings/Checkbox.js +45 -0
  136. package/src/mappings/CheckboxGroup.js +25 -0
  137. package/src/mappings/CheckboxRow.js +37 -0
  138. package/src/mappings/CircleImage.js +24 -0
  139. package/src/mappings/Container.js +29 -0
  140. package/src/mappings/CustomCode.js +8 -0
  141. package/src/mappings/DatePicker.js +146 -0
  142. package/src/mappings/Divider.js +26 -0
  143. package/src/mappings/FAB.js +36 -0
  144. package/src/mappings/Fetch.js +12 -0
  145. package/src/mappings/FieldSearchBarFull.js +49 -0
  146. package/src/mappings/FlatList.js +19 -0
  147. package/src/mappings/HeaderLarge.js +28 -0
  148. package/src/mappings/HeaderMedium.js +54 -0
  149. package/src/mappings/HeaderOverline.js +54 -0
  150. package/src/mappings/Icon.js +25 -0
  151. package/src/mappings/Icon.ts +4 -1
  152. package/src/mappings/IconButton.js +30 -0
  153. package/src/mappings/Image.js +15 -0
  154. package/src/mappings/ImageBackground.js +28 -0
  155. package/src/mappings/KeyboardAvoidingView.js +40 -0
  156. package/src/mappings/Layout.js +195 -0
  157. package/src/mappings/LinearGradient.js +77 -0
  158. package/src/mappings/MapCallout.js +19 -0
  159. package/src/mappings/MapMarker.js +46 -0
  160. package/src/mappings/Modal.js +41 -0
  161. package/src/mappings/Picker.js +137 -0
  162. package/src/mappings/ProgressBar.js +100 -0
  163. package/src/mappings/ProgressCircle.js +108 -0
  164. package/src/mappings/ProgressIndicator.js +180 -0
  165. package/src/mappings/RadioButton.js +50 -0
  166. package/src/mappings/RadioButtonGroup.js +16 -0
  167. package/src/mappings/RadioButtonRow.js +37 -0
  168. package/src/mappings/RowBodyIcon.js +75 -0
  169. package/src/mappings/RowHeadlineImageCaption.js +167 -0
  170. package/src/mappings/RowHeadlineImageIcon.js +99 -0
  171. package/src/mappings/SafeAreaView.js +33 -0
  172. package/src/mappings/ScrollView.js +30 -0
  173. package/src/mappings/Slider.js +59 -0
  174. package/src/mappings/StarRating.js +46 -0
  175. package/src/mappings/Stepper.js +28 -0
  176. package/src/mappings/Surface.js +13 -0
  177. package/src/mappings/Swiper.js +60 -0
  178. package/src/mappings/SwiperItem.js +8 -0
  179. package/src/mappings/Switch.js +75 -0
  180. package/src/mappings/Text.js +227 -0
  181. package/src/mappings/TextArea.js +52 -0
  182. package/src/mappings/TextField.js +158 -0
  183. package/src/mappings/TextInput.js +208 -0
  184. package/src/mappings/ToggleButton.js +50 -0
  185. package/src/mappings/Touchable.js +12 -0
  186. package/src/mappings/Video.js +74 -0
  187. package/src/mappings/View.js +206 -0
  188. package/src/mappings/WebView.js +13 -0
  189. package/src/styles/DarkTheme.js +26 -0
  190. package/src/styles/DefaultTheme.js +111 -0
  191. package/src/styles/fonts.js +62 -0
  192. package/src/styles/overlay.js +60 -0
  193. package/src/styles/shadow.js +51 -0
  194. package/src/theming.js +3 -0
  195. package/src/utilities.js +54 -0
@@ -0,0 +1,36 @@
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
+ };
@@ -0,0 +1,12 @@
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
+ };
@@ -0,0 +1,49 @@
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
+ ];
@@ -0,0 +1,19 @@
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
+ };
@@ -0,0 +1,28 @@
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
+ ];
@@ -0,0 +1,54 @@
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
+ ];
@@ -0,0 +1,54 @@
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
+ ];
@@ -0,0 +1,25 @@
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: 16,
20
+ max: 128,
21
+ step: 1,
22
+ precision: 0,
23
+ }),
24
+ },
25
+ };
@@ -13,7 +13,10 @@ export const SEED_DATA = {
13
13
  category: COMPONENT_TYPES.basic,
14
14
  layout: {},
15
15
  props: {
16
- name: createIconProp(),
16
+ name: {
17
+ ...createIconProp(),
18
+ group: GROUPS.data,
19
+ },
17
20
  color: createColorProp(),
18
21
  size: createNumberProp({
19
22
  group: GROUPS.basic,
@@ -0,0 +1,30 @@
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
+ };
@@ -0,0 +1,15 @@
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
+ };
@@ -0,0 +1,28 @@
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
+ };
@@ -0,0 +1,40 @@
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.layout,
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
+ };
@@ -0,0 +1,195 @@
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
+ ];
@@ -0,0 +1,77 @@
1
+ import { createColorProp, FORM_TYPES, GROUPS, PROP_TYPES, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Linear Gradient",
4
+ tag: "LinearGradient",
5
+ description: "Linear Gradient Component",
6
+ layout: { width: "100%", height: "100%" },
7
+ props: {
8
+ endY: {
9
+ group: GROUPS.basic,
10
+ label: "End Y",
11
+ description: "End position from Bottom",
12
+ editable: true,
13
+ required: false,
14
+ defaultValue: 100,
15
+ min: 0,
16
+ max: 100,
17
+ step: 1,
18
+ precision: 0,
19
+ formType: FORM_TYPES.number,
20
+ propType: PROP_TYPES.NUMBER,
21
+ },
22
+ endX: {
23
+ group: GROUPS.basic,
24
+ label: "End X",
25
+ description: "End position from Right",
26
+ editable: true,
27
+ required: false,
28
+ defaultValue: 100,
29
+ min: 0,
30
+ max: 100,
31
+ step: 1,
32
+ precision: 0,
33
+ formType: FORM_TYPES.number,
34
+ propType: PROP_TYPES.NUMBER,
35
+ },
36
+ startY: {
37
+ group: GROUPS.basic,
38
+ label: "Start Y",
39
+ description: "Start position from Top",
40
+ editable: true,
41
+ required: false,
42
+ defaultValue: 0,
43
+ min: 0,
44
+ max: 100,
45
+ step: 1,
46
+ precision: 0,
47
+ formType: FORM_TYPES.number,
48
+ propType: PROP_TYPES.NUMBER,
49
+ },
50
+ startX: {
51
+ group: GROUPS.basic,
52
+ label: "Start X",
53
+ description: "Start position from Left",
54
+ editable: true,
55
+ required: false,
56
+ defaultValue: 0,
57
+ min: 0,
58
+ max: 100,
59
+ step: 1,
60
+ precision: 0,
61
+ formType: FORM_TYPES.number,
62
+ propType: PROP_TYPES.NUMBER,
63
+ },
64
+ color3: createColorProp({
65
+ label: "Color 3",
66
+ defaultValue: undefined,
67
+ }),
68
+ color2: createColorProp({
69
+ label: "Color 2",
70
+ defaultValue: "secondary",
71
+ }),
72
+ color1: createColorProp({
73
+ label: "Color 1",
74
+ defaultValue: "primary",
75
+ }),
76
+ },
77
+ };