@draftbit/core 47.0.0-alpha.1 → 47.0.0-c416b1.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 (194) hide show
  1. package/lib/commonjs/components/Stepper.js +1 -0
  2. package/lib/commonjs/index.js +0 -7
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/mappings/NativeBase/Layout/AspectRatio.js +17 -0
  5. package/lib/commonjs/mappings/NativeBase/Layout/AspectRatio.js.map +1 -0
  6. package/lib/commonjs/mappings/NativeBase/Layout/Box.js +17 -0
  7. package/lib/commonjs/mappings/NativeBase/Layout/Box.js.map +1 -0
  8. package/lib/commonjs/mappings/NativeBase/Layout/Center.js +31 -0
  9. package/lib/commonjs/mappings/NativeBase/Layout/Center.js.map +1 -0
  10. package/lib/commonjs/mappings/NativeBase/Layout/Column.js +17 -0
  11. package/lib/commonjs/mappings/NativeBase/Layout/Column.js.map +1 -0
  12. package/lib/commonjs/mappings/NativeBase/Layout/Container.js +17 -0
  13. package/lib/commonjs/mappings/NativeBase/Layout/Container.js.map +1 -0
  14. package/lib/commonjs/mappings/NativeBase/Layout/Row.js +17 -0
  15. package/lib/commonjs/mappings/NativeBase/Layout/Row.js.map +1 -0
  16. package/lib/commonjs/mappings/NativeBase/Layout/Stack.js +17 -0
  17. package/lib/commonjs/mappings/NativeBase/Layout/Stack.js.map +1 -0
  18. package/lib/commonjs/mappings/NativeBase/Layout/ZStack.js +17 -0
  19. package/lib/commonjs/mappings/NativeBase/Layout/ZStack.js.map +1 -0
  20. package/lib/commonjs/mappings/View.js.map +1 -1
  21. package/lib/module/components/Stepper.js +1 -0
  22. package/lib/module/index.js +2 -0
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/mappings/NativeBase/Layout/AspectRatio.js +10 -0
  25. package/lib/module/mappings/NativeBase/Layout/AspectRatio.js.map +1 -0
  26. package/lib/module/mappings/NativeBase/Layout/Box.js +10 -0
  27. package/lib/module/mappings/NativeBase/Layout/Box.js.map +1 -0
  28. package/lib/module/mappings/NativeBase/Layout/Center.js +24 -0
  29. package/lib/module/mappings/NativeBase/Layout/Center.js.map +1 -0
  30. package/lib/module/mappings/NativeBase/Layout/Column.js +10 -0
  31. package/lib/module/mappings/NativeBase/Layout/Column.js.map +1 -0
  32. package/lib/module/mappings/NativeBase/Layout/Container.js +10 -0
  33. package/lib/module/mappings/NativeBase/Layout/Container.js.map +1 -0
  34. package/lib/module/mappings/NativeBase/Layout/Row.js +10 -0
  35. package/lib/module/mappings/NativeBase/Layout/Row.js.map +1 -0
  36. package/lib/module/mappings/NativeBase/Layout/Stack.js +10 -0
  37. package/lib/module/mappings/NativeBase/Layout/Stack.js.map +1 -0
  38. package/lib/module/mappings/NativeBase/Layout/ZStack.js +10 -0
  39. package/lib/module/mappings/NativeBase/Layout/ZStack.js.map +1 -0
  40. package/lib/typescript/src/index.d.ts +0 -1
  41. package/lib/typescript/src/index.d.ts.map +1 -1
  42. package/lib/typescript/src/mappings/NativeBase/Layout/AspectRatio.d.ts +9 -0
  43. package/lib/typescript/src/mappings/NativeBase/Layout/AspectRatio.d.ts.map +1 -0
  44. package/lib/typescript/src/mappings/NativeBase/Layout/Box.d.ts +9 -0
  45. package/lib/typescript/src/mappings/NativeBase/Layout/Box.d.ts.map +1 -0
  46. package/lib/typescript/src/mappings/NativeBase/Layout/Center.d.ts +9 -0
  47. package/lib/typescript/src/mappings/NativeBase/Layout/Center.d.ts.map +1 -0
  48. package/lib/typescript/src/mappings/NativeBase/Layout/Column.d.ts +9 -0
  49. package/lib/typescript/src/mappings/NativeBase/Layout/Column.d.ts.map +1 -0
  50. package/lib/typescript/src/mappings/NativeBase/Layout/Container.d.ts +9 -0
  51. package/lib/typescript/src/mappings/NativeBase/Layout/Container.d.ts.map +1 -0
  52. package/lib/typescript/src/mappings/NativeBase/Layout/Row.d.ts +9 -0
  53. package/lib/typescript/src/mappings/NativeBase/Layout/Row.d.ts.map +1 -0
  54. package/lib/typescript/src/mappings/NativeBase/Layout/Stack.d.ts +9 -0
  55. package/lib/typescript/src/mappings/NativeBase/Layout/Stack.d.ts.map +1 -0
  56. package/lib/typescript/src/mappings/NativeBase/Layout/ZStack.d.ts +9 -0
  57. package/lib/typescript/src/mappings/NativeBase/Layout/ZStack.d.ts.map +1 -0
  58. package/package.json +3 -3
  59. package/src/Provider.js +9 -0
  60. package/src/components/Accordion/AccordionGroup.js +44 -0
  61. package/src/components/Accordion/AccordionItem.js +32 -0
  62. package/src/components/Accordion/index.js +2 -0
  63. package/src/components/ActionSheet/ActionSheet.js +45 -0
  64. package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
  65. package/src/components/ActionSheet/ActionSheetItem.js +30 -0
  66. package/src/components/ActionSheet/index.js +3 -0
  67. package/src/components/Banner.js +109 -0
  68. package/src/components/Button.js +114 -0
  69. package/src/components/Checkbox/Checkbox.js +63 -0
  70. package/src/components/Checkbox/CheckboxGroup.js +21 -0
  71. package/src/components/Checkbox/CheckboxGroupRow.js +77 -0
  72. package/src/components/Checkbox/CheckboxRow.js +78 -0
  73. package/src/components/Checkbox/context.js +14 -0
  74. package/src/components/Checkbox/index.js +3 -0
  75. package/src/components/Config.js +64 -0
  76. package/src/components/DatePicker/DatePicker.js +368 -0
  77. package/src/components/DatePicker/DatePickerComponent.js +13 -0
  78. package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
  79. package/src/components/DatePicker/DatePickerComponentType.js +1 -0
  80. package/src/components/DeprecatedButton.js +95 -0
  81. package/src/components/Elevation.js +20 -0
  82. package/src/components/FormRow.js +19 -0
  83. package/src/components/IconButton.js +35 -0
  84. package/src/components/Layout.js +50 -0
  85. package/src/components/NumberInput.js +49 -0
  86. package/src/components/Picker/Picker.js +267 -0
  87. package/src/components/Picker/PickerComponent.android.js +69 -0
  88. package/src/components/Picker/PickerComponent.ios.js +79 -0
  89. package/src/components/Picker/PickerComponent.web.js +70 -0
  90. package/src/components/Picker/PickerTypes.js +1 -0
  91. package/src/components/Portal/Portal.js +35 -0
  92. package/src/components/Portal/PortalConsumer.js +27 -0
  93. package/src/components/Portal/PortalHost.js +107 -0
  94. package/src/components/Portal/PortalManager.js +32 -0
  95. package/src/components/RadioButton/RadioButton.js +17 -0
  96. package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
  97. package/src/components/RadioButton/RadioButtonGroup.js +43 -0
  98. package/src/components/RadioButton/RadioButtonRow.js +76 -0
  99. package/src/components/RadioButton/context.js +14 -0
  100. package/src/components/RadioButton/index.js +4 -0
  101. package/src/components/SVG.js +13 -0
  102. package/src/components/ScreenContainer.js +34 -0
  103. package/src/components/Slider.js +63 -0
  104. package/src/components/StarRating.js +50 -0
  105. package/src/components/Stepper.js +39 -0
  106. package/src/components/Surface.js +32 -0
  107. package/src/components/Swiper/Swiper.js +29 -0
  108. package/src/components/Swiper/SwiperItem.js +9 -0
  109. package/src/components/Swiper/index.js +2 -0
  110. package/src/components/Switch.js +56 -0
  111. package/src/components/Text.js +33 -0
  112. package/src/components/TextField.js +428 -0
  113. package/src/components/Touchable.js +12 -0
  114. package/src/components/Touchable.web.js +2 -0
  115. package/src/constants.js +10 -0
  116. package/src/hooks.js +12 -0
  117. package/src/index.js +37 -0
  118. package/src/index.tsx +2 -0
  119. package/src/interfaces/Icon.js +8 -0
  120. package/src/mappings/Accordion.js +41 -0
  121. package/src/mappings/AccordionItem.js +16 -0
  122. package/src/mappings/ActionSheet.js +13 -0
  123. package/src/mappings/ActionSheetCancel.js +19 -0
  124. package/src/mappings/ActionSheetItem.js +23 -0
  125. package/src/mappings/ActivityIndicator.js +58 -0
  126. package/src/mappings/AudioPlayer.js +20 -0
  127. package/src/mappings/BlurView.js +42 -0
  128. package/src/mappings/Button.js +87 -0
  129. package/src/mappings/Checkbox.js +46 -0
  130. package/src/mappings/CheckboxGroup.js +26 -0
  131. package/src/mappings/CheckboxRow.js +61 -0
  132. package/src/mappings/CustomCode.js +8 -0
  133. package/src/mappings/DatePicker.js +157 -0
  134. package/src/mappings/Fetch.js +13 -0
  135. package/src/mappings/FlashList.js +33 -0
  136. package/src/mappings/FlatList.js +24 -0
  137. package/src/mappings/Icon.js +32 -0
  138. package/src/mappings/IconButton.js +35 -0
  139. package/src/mappings/Image.js +35 -0
  140. package/src/mappings/ImageBackground.js +29 -0
  141. package/src/mappings/KeyboardAvoidingView.js +41 -0
  142. package/src/mappings/KeyboardAwareScrollView.js +50 -0
  143. package/src/mappings/Layout.js +200 -0
  144. package/src/mappings/LinearGradient.js +77 -0
  145. package/src/mappings/MapCallout.js +21 -0
  146. package/src/mappings/MapMarker.js +47 -0
  147. package/src/mappings/MapView.js +139 -0
  148. package/src/mappings/Modal.js +42 -0
  149. package/src/mappings/NativeBase/Layout/AspectRatio.js +9 -0
  150. package/src/mappings/NativeBase/Layout/AspectRatio.ts +11 -0
  151. package/src/mappings/NativeBase/Layout/Box.js +9 -0
  152. package/src/mappings/NativeBase/Layout/Box.ts +11 -0
  153. package/src/mappings/NativeBase/Layout/Center.js +27 -0
  154. package/src/mappings/NativeBase/Layout/Center.ts +28 -0
  155. package/src/mappings/NativeBase/Layout/Column.js +9 -0
  156. package/src/mappings/NativeBase/Layout/Column.ts +10 -0
  157. package/src/mappings/NativeBase/Layout/Container.js +9 -0
  158. package/src/mappings/NativeBase/Layout/Container.ts +11 -0
  159. package/src/mappings/NativeBase/Layout/Row.js +9 -0
  160. package/src/mappings/NativeBase/Layout/Row.ts +10 -0
  161. package/src/mappings/NativeBase/Layout/Stack.js +9 -0
  162. package/src/mappings/NativeBase/Layout/Stack.ts +11 -0
  163. package/src/mappings/NativeBase/Layout/ZStack.js +9 -0
  164. package/src/mappings/NativeBase/Layout/ZStack.ts +10 -0
  165. package/src/mappings/NumberInput.js +254 -0
  166. package/src/mappings/Picker.js +148 -0
  167. package/src/mappings/RadioButton.js +51 -0
  168. package/src/mappings/RadioButtonGroup.js +17 -0
  169. package/src/mappings/RadioButtonRow.js +42 -0
  170. package/src/mappings/SVG.js +20 -0
  171. package/src/mappings/SafeAreaView.js +33 -0
  172. package/src/mappings/ScrollView.js +31 -0
  173. package/src/mappings/Slider.js +60 -0
  174. package/src/mappings/StarRating.js +43 -0
  175. package/src/mappings/Stepper.js +29 -0
  176. package/src/mappings/Surface.js +14 -0
  177. package/src/mappings/Swiper.js +60 -0
  178. package/src/mappings/SwiperItem.js +8 -0
  179. package/src/mappings/Switch.js +81 -0
  180. package/src/mappings/Text.js +251 -0
  181. package/src/mappings/TextArea.js +263 -0
  182. package/src/mappings/TextField.js +381 -0
  183. package/src/mappings/TextInput.js +391 -0
  184. package/src/mappings/Touchable.js +17 -0
  185. package/src/mappings/Video.js +81 -0
  186. package/src/mappings/View.js +207 -0
  187. package/src/mappings/WebView.js +88 -0
  188. package/src/styles/DarkTheme.js +26 -0
  189. package/src/styles/DefaultTheme.js +111 -0
  190. package/src/styles/fonts.js +62 -0
  191. package/src/styles/overlay.js +60 -0
  192. package/src/styles/shadow.js +51 -0
  193. package/src/theming.js +3 -0
  194. package/src/utilities.js +102 -0
@@ -0,0 +1,17 @@
1
+ import { COMPONENT_TYPES, createFieldNameProp, createDirectionProp, Triggers, StylesPanelSections, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Radio Button Group",
4
+ tag: "RadioButtonGroup",
5
+ category: COMPONENT_TYPES.control,
6
+ stylesPanelSections: [StylesPanelSections.Margins],
7
+ layout: {},
8
+ triggers: [Triggers.OnValueChange],
9
+ props: {
10
+ direction: createDirectionProp(),
11
+ fieldName: createFieldNameProp({
12
+ handlerPropName: "onValueChange",
13
+ valuePropName: "value",
14
+ defaultValue: "radioButtonGroupValue",
15
+ }),
16
+ },
17
+ };
@@ -0,0 +1,42 @@
1
+ import { createTextProp, createTextEnumProp, COMPONENT_TYPES, createColorProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Radio Button Row",
4
+ tag: "RadioButtonRow",
5
+ category: COMPONENT_TYPES.control,
6
+ stylesPanelSections: [
7
+ StylesPanelSections.Typography,
8
+ StylesPanelSections.Margins,
9
+ StylesPanelSections.Effects,
10
+ ],
11
+ layout: {},
12
+ props: {
13
+ label: createTextProp({
14
+ label: "Label",
15
+ description: "Label to show with the radio button",
16
+ required: true,
17
+ defaultValue: "First Option",
18
+ }),
19
+ direction: createTextEnumProp({
20
+ label: "Direction",
21
+ description: "Whether the checkbox will appear on the left or on the right",
22
+ options: ["row", "row-reverse"],
23
+ }),
24
+ value: createTextProp({
25
+ label: "Value",
26
+ description: "Value of the radio button",
27
+ defaultValue: null,
28
+ required: true,
29
+ }),
30
+ color: createColorProp({
31
+ group: GROUPS.basic,
32
+ description: "Color for the button",
33
+ defaultValue: "primary",
34
+ }),
35
+ unselectedColor: createColorProp({
36
+ group: GROUPS.basic,
37
+ label: "Unselected Color",
38
+ description: "Unselected Color for the button",
39
+ defaultValue: "primary",
40
+ }),
41
+ },
42
+ };
@@ -0,0 +1,20 @@
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "SVG",
4
+ tag: "SVG",
5
+ description: "An SVG component",
6
+ category: COMPONENT_TYPES.media,
7
+ layout: {
8
+ width: 100,
9
+ height: 100,
10
+ },
11
+ stylesPanelSections: [
12
+ StylesPanelSections.Size,
13
+ StylesPanelSections.Margins,
14
+ StylesPanelSections.Position,
15
+ StylesPanelSections.Effects,
16
+ ],
17
+ props: {
18
+ source: createSVGProp(),
19
+ },
20
+ };
@@ -0,0 +1,33 @@
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "SafeAreaView",
4
+ tag: "SafeAreaView",
5
+ description: "A basic View that handles safe area",
6
+ category: COMPONENT_TYPES.deprecated,
7
+ props: {
8
+ edges: {
9
+ group: GROUPS.basic,
10
+ name: "edges",
11
+ label: "edges",
12
+ description: "Provides edges to be used by safe area view",
13
+ editable: true,
14
+ required: false,
15
+ formType: FORM_TYPES.flatArray,
16
+ propType: PROP_TYPES.STRING,
17
+ options: ["right", "bottom", "left", "top"],
18
+ defaultValue: ["right", "bottom", "left", "top"],
19
+ },
20
+ mode: {
21
+ group: GROUPS.basic,
22
+ name: "mode",
23
+ label: "mode",
24
+ description: "Mode used by safe area view",
25
+ editable: true,
26
+ required: false,
27
+ options: ["padding", "margin"],
28
+ formType: FORM_TYPES.flatArray,
29
+ propType: PROP_TYPES.STRING,
30
+ defaultValue: "padding",
31
+ },
32
+ },
33
+ };
@@ -0,0 +1,31 @@
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Scroll View",
4
+ tag: "ScrollView",
5
+ description: "A basic ScrollView component",
6
+ category: COMPONENT_TYPES.view,
7
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ layout: {},
9
+ props: {
10
+ horizontal: createStaticBoolProp({
11
+ label: "Horizontal",
12
+ description: "Render your list horizontally",
13
+ defaultValue: false,
14
+ }),
15
+ showsHorizontalScrollIndicator: createStaticBoolProp({
16
+ label: "Show Horizontal Scroll Indicator",
17
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
18
+ defaultValue: false,
19
+ }),
20
+ showsVerticalScrollIndicator: createStaticBoolProp({
21
+ label: "Show Vertical Scroll Indicator",
22
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
23
+ defaultValue: true,
24
+ }),
25
+ bounces: createStaticBoolProp({
26
+ label: "Bounce",
27
+ description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
28
+ defaultValue: true,
29
+ }),
30
+ },
31
+ };
@@ -0,0 +1,60 @@
1
+ import { COMPONENT_TYPES, GROUPS, createNumberProp, createColorProp, createFieldNameProp, createIconProp, Triggers, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Slider",
4
+ tag: "Slider",
5
+ description: "A component used to set a value in a range",
6
+ category: COMPONENT_TYPES.control,
7
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
+ layout: {
9
+ marginLeft: 12,
10
+ marginRight: 12,
11
+ },
12
+ triggers: [Triggers.OnValueChange],
13
+ props: {
14
+ fieldName: createFieldNameProp({
15
+ defaultValue: "sliderValue",
16
+ handlerPropName: "onValueChange",
17
+ valuePropName: "value",
18
+ }),
19
+ minimumValue: createNumberProp({
20
+ group: GROUPS.basic,
21
+ label: "Min Value",
22
+ min: 0,
23
+ max: 1000,
24
+ }),
25
+ maximumValue: createNumberProp({
26
+ group: GROUPS.basic,
27
+ label: "Max Value",
28
+ min: 1,
29
+ max: 10000,
30
+ }),
31
+ step: createNumberProp({
32
+ group: GROUPS.basic,
33
+ label: "Step",
34
+ min: 0,
35
+ max: 100,
36
+ step: 0.01,
37
+ precision: 2,
38
+ }),
39
+ leftIcon: createIconProp({
40
+ label: "Left Icon",
41
+ defaultValue: null,
42
+ }),
43
+ rightIcon: createIconProp({
44
+ label: "Right Icon",
45
+ defaultValue: null,
46
+ }),
47
+ minimumTrackTintColor: createColorProp({
48
+ label: "Min Track Color",
49
+ defaultValue: null,
50
+ }),
51
+ maximumTrackTintColor: createColorProp({
52
+ label: "Max Track Color",
53
+ defaultValue: null,
54
+ }),
55
+ thumbTintColor: createColorProp({
56
+ label: "Thumb Color",
57
+ defaultValue: null,
58
+ }),
59
+ },
60
+ };
@@ -0,0 +1,43 @@
1
+ import { COMPONENT_TYPES, createStaticNumberProp, createFieldNameProp, createStaticBoolProp, Triggers, createColorProp, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Star Rating",
4
+ tag: "StarRating",
5
+ description: "A star rating component",
6
+ category: COMPONENT_TYPES.control,
7
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
+ triggers: [Triggers.OnPress],
9
+ props: {
10
+ starSize: createStaticNumberProp({
11
+ label: "Star size",
12
+ description: "Size of each individual star",
13
+ defaultValue: 16,
14
+ min: 8,
15
+ max: 36,
16
+ step: 1,
17
+ }),
18
+ fieldName: createFieldNameProp({
19
+ defaultValue: "ratingValue",
20
+ handlerPropName: "onPress",
21
+ valuePropName: "rating", // the value prop in this component
22
+ }),
23
+ maxStars: createStaticNumberProp({
24
+ label: "Max stars",
25
+ description: "The max number of stars",
26
+ defaultValue: 5,
27
+ min: 0,
28
+ max: 10,
29
+ step: 1,
30
+ }),
31
+ isEditable: createStaticBoolProp({
32
+ label: "Editable",
33
+ }),
34
+ activeColor: createColorProp({
35
+ label: "Active Color",
36
+ defaultValue: "primary",
37
+ }),
38
+ inactiveColor: createColorProp({
39
+ label: "Inactive Color",
40
+ defaultValue: "divider",
41
+ }),
42
+ },
43
+ };
@@ -0,0 +1,29 @@
1
+ import { COMPONENT_TYPES, createIconSizeProp, createColorProp, createFieldNameProp, createStaticNumberProp, Triggers, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
+ export const SEED_DATA = [
3
+ {
4
+ name: "Stepper",
5
+ tag: "Stepper",
6
+ description: "A component used to control the quantity of something",
7
+ category: COMPONENT_TYPES.control,
8
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
+ layout: {},
10
+ triggers: [Triggers.OnChange],
11
+ props: {
12
+ fieldName: createFieldNameProp({
13
+ defaultValue: "stepperValue",
14
+ handlerPropName: "onChange",
15
+ valuePropName: "value",
16
+ }),
17
+ iconSize: createIconSizeProp({ defaultValue: 24 }),
18
+ iconColor: createColorProp({ defaultValue: "strong" }),
19
+ min: createStaticNumberProp({
20
+ label: "Minimum",
21
+ description: "Minimum Number",
22
+ }),
23
+ max: createStaticNumberProp({
24
+ label: "Maximum",
25
+ description: "Maximum Number",
26
+ }),
27
+ },
28
+ },
29
+ ];
@@ -0,0 +1,14 @@
1
+ import { COMPONENT_TYPES, createElevationType, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Surface",
4
+ tag: "Surface",
5
+ description: "An elevated container",
6
+ category: COMPONENT_TYPES.container,
7
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ layout: {
9
+ minHeight: 40,
10
+ },
11
+ props: {
12
+ elevation: createElevationType(0),
13
+ },
14
+ };
@@ -0,0 +1,60 @@
1
+ import { COMPONENT_TYPES, createBoolProp, createNumberProp, createTextProp, createColorProp, GROUPS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Swiper",
4
+ tag: "Swiper",
5
+ description: "Swiper container",
6
+ category: COMPONENT_TYPES.swiper,
7
+ layout: {
8
+ height: 300,
9
+ width: "100%",
10
+ },
11
+ props: {
12
+ from: createNumberProp({
13
+ group: GROUPS.basic,
14
+ label: "Initial Slide",
15
+ }),
16
+ loop: createBoolProp({
17
+ group: GROUPS.basic,
18
+ label: "Loop",
19
+ }),
20
+ timeout: createNumberProp({
21
+ group: GROUPS.basic,
22
+ label: "Timeout",
23
+ defaultValue: 0,
24
+ }),
25
+ vertical: createBoolProp({
26
+ group: GROUPS.basic,
27
+ label: "Vertical",
28
+ defaultValue: false,
29
+ }),
30
+ prevTitle: createTextProp({
31
+ group: GROUPS.basic,
32
+ label: "Previous Title",
33
+ defaultValue: "",
34
+ }),
35
+ nextTitle: createTextProp({
36
+ group: GROUPS.basic,
37
+ label: "Next Title",
38
+ defaultValue: "",
39
+ }),
40
+ prevTitleColor: createColorProp({
41
+ label: "Previous Title Color",
42
+ }),
43
+ nextTitleColor: createColorProp({
44
+ label: "Next Title Color",
45
+ }),
46
+ dotColor: createColorProp({
47
+ label: "Dot Color",
48
+ defaultValue: "light",
49
+ }),
50
+ dotActiveColor: createColorProp({
51
+ label: "Dot Active Color",
52
+ defaultValue: "primary",
53
+ }),
54
+ dotsTouchable: createBoolProp({
55
+ group: GROUPS.basic,
56
+ label: "Dots Touchable",
57
+ defaultValue: true,
58
+ }),
59
+ },
60
+ };
@@ -0,0 +1,8 @@
1
+ import { COMPONENT_TYPES } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Swiper Item",
4
+ tag: "SwiperItem",
5
+ description: "Swiper item",
6
+ category: COMPONENT_TYPES.swiper,
7
+ props: {},
8
+ };
@@ -0,0 +1,81 @@
1
+ import { COMPONENT_TYPES, GROUPS, createBoolProp, createColorProp, createFieldNameProp, createTextProp, createRowDirectionProp, Triggers, StylesPanelSections, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
+ export const SEED_DATA = [
4
+ {
5
+ name: "Switch",
6
+ tag: "Switch",
7
+ category: COMPONENT_TYPES.control,
8
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
+ layout: {},
10
+ triggers: SEED_DATA_TRIGGERS,
11
+ props: {
12
+ disabled: createBoolProp({
13
+ label: "Disabled",
14
+ description: "Boolean to handle disabling the switch",
15
+ }),
16
+ fieldName: createFieldNameProp({
17
+ handlerPropName: "onValueChange",
18
+ valuePropName: "value",
19
+ defaultValue: "switchValue",
20
+ }),
21
+ activeTrackColor: createColorProp({
22
+ label: "Active Track Color",
23
+ }),
24
+ inactiveTrackColor: createColorProp({
25
+ label: "Inactive Track Color",
26
+ }),
27
+ activeThumbColor: createColorProp({
28
+ label: "Active Thumb Color",
29
+ }),
30
+ inactiveThumbColor: createColorProp({
31
+ label: "Inactive Thumb Color",
32
+ }),
33
+ },
34
+ },
35
+ {
36
+ name: "Switch Row",
37
+ tag: "SwitchRow",
38
+ category: COMPONENT_TYPES.control,
39
+ stylesPanelSections: [
40
+ StylesPanelSections.Typography,
41
+ StylesPanelSections.Margins,
42
+ StylesPanelSections.Effects,
43
+ ],
44
+ layout: {
45
+ marginLeft: 0,
46
+ marginRight: 0,
47
+ },
48
+ triggers: SEED_DATA_TRIGGERS,
49
+ props: {
50
+ label: createTextProp({
51
+ label: "Label",
52
+ description: "Label to show with the checkbox",
53
+ required: true,
54
+ defaultValue: "First Option",
55
+ }),
56
+ direction: createRowDirectionProp(),
57
+ disabled: createBoolProp({
58
+ label: "Disabled",
59
+ description: "Boolean to handle disabling the switch",
60
+ group: GROUPS.data,
61
+ }),
62
+ fieldName: createFieldNameProp({
63
+ handlerPropName: "onValueChange",
64
+ valuePropName: "value",
65
+ defaultValue: "switchValue",
66
+ }),
67
+ activeTrackColor: createColorProp({
68
+ label: "Active Track Color",
69
+ }),
70
+ inactiveTrackColor: createColorProp({
71
+ label: "Inactive Track Color",
72
+ }),
73
+ activeThumbColor: createColorProp({
74
+ label: "Active Thumb Color",
75
+ }),
76
+ inactiveThumbColor: createColorProp({
77
+ label: "Inactive Thumb Color",
78
+ }),
79
+ },
80
+ },
81
+ ];