@draftbit/core 46.9.1-fe76aa.2 → 46.9.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 (215) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/DeprecatedFAB.js +3 -21
  3. package/lib/commonjs/components/Justification.js +1 -5
  4. package/lib/commonjs/components/Picker/Picker.js +13 -3
  5. package/lib/commonjs/components/ResizeMode.js +1 -5
  6. package/lib/commonjs/mappings/ActionSheet.js +1 -1
  7. package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
  8. package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
  9. package/lib/commonjs/mappings/MapCallout.js +1 -1
  10. package/lib/commonjs/mappings/MapMarker.js +1 -1
  11. package/lib/module/components/Justification.js +0 -1
  12. package/lib/module/components/Picker/Picker.js +13 -3
  13. package/lib/module/components/ResizeMode.js +0 -1
  14. package/lib/module/mappings/ActionSheet.js +1 -1
  15. package/lib/module/mappings/ActionSheetCancel.js +1 -1
  16. package/lib/module/mappings/ActionSheetItem.js +1 -1
  17. package/lib/module/mappings/MapCallout.js +2 -2
  18. package/lib/module/mappings/MapMarker.js +2 -2
  19. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  20. package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
  21. package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
  22. package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
  23. package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
  24. package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
  25. package/package.json +3 -3
  26. package/src/components/Picker/Picker.tsx +12 -3
  27. package/src/mappings/ActionSheet.ts +1 -4
  28. package/src/mappings/ActionSheetCancel.ts +1 -4
  29. package/src/mappings/ActionSheetItem.ts +1 -4
  30. package/src/mappings/MapCallout.ts +2 -6
  31. package/src/mappings/MapMarker.ts +2 -6
  32. package/src/Provider.js +0 -9
  33. package/src/components/Accordion/AccordionGroup.js +0 -44
  34. package/src/components/Accordion/AccordionItem.js +0 -32
  35. package/src/components/Accordion/index.js +0 -2
  36. package/src/components/ActionSheet/ActionSheet.js +0 -45
  37. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  38. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  39. package/src/components/ActionSheet/index.js +0 -3
  40. package/src/components/AnimatedCircularProgress.js +0 -43
  41. package/src/components/AspectRatio.js +0 -18
  42. package/src/components/AvatarEdit.js +0 -30
  43. package/src/components/Banner.js +0 -109
  44. package/src/components/Button.js +0 -114
  45. package/src/components/Card.js +0 -57
  46. package/src/components/Checkbox/Checkbox.js +0 -62
  47. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  48. package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
  49. package/src/components/Checkbox/CheckboxRow.js +0 -77
  50. package/src/components/Checkbox/context.js +0 -14
  51. package/src/components/Checkbox/index.js +0 -3
  52. package/src/components/CircleImage.js +0 -8
  53. package/src/components/CircularProgress.js +0 -81
  54. package/src/components/Config.js +0 -64
  55. package/src/components/Container.js +0 -43
  56. package/src/components/DatePicker/DatePicker.js +0 -382
  57. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  58. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  59. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  60. package/src/components/DeckSwiper/DeckSwiper.js +0 -65
  61. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  62. package/src/components/DeckSwiper/index.js +0 -2
  63. package/src/components/DeprecatedButton.js +0 -83
  64. package/src/components/DeprecatedCardWrapper.js +0 -18
  65. package/src/components/DeprecatedFAB.js +0 -114
  66. package/src/components/Divider.js +0 -13
  67. package/src/components/Elevation.js +0 -20
  68. package/src/components/FAB.js +0 -46
  69. package/src/components/FieldSearchBarFull.js +0 -53
  70. package/src/components/FormRow.js +0 -19
  71. package/src/components/IconButton.js +0 -35
  72. package/src/components/Image.js +0 -47
  73. package/src/components/Justification.js +0 -1
  74. package/src/components/Layout.js +0 -50
  75. package/src/components/Markdown.js +0 -10
  76. package/src/components/NumberInput.js +0 -49
  77. package/src/components/Picker/Picker.js +0 -266
  78. package/src/components/Picker/PickerComponent.android.js +0 -69
  79. package/src/components/Picker/PickerComponent.ios.js +0 -79
  80. package/src/components/Picker/PickerComponent.web.js +0 -70
  81. package/src/components/Picker/PickerTypes.js +0 -1
  82. package/src/components/Portal/Portal.js +0 -35
  83. package/src/components/Portal/PortalConsumer.js +0 -27
  84. package/src/components/Portal/PortalHost.js +0 -107
  85. package/src/components/Portal/PortalManager.js +0 -32
  86. package/src/components/Pressable.js +0 -12
  87. package/src/components/ProgressBar.js +0 -118
  88. package/src/components/ProgressCircle.js +0 -13
  89. package/src/components/ProgressIndicator.js +0 -27
  90. package/src/components/RadioButton/RadioButton.js +0 -17
  91. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  92. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  93. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  94. package/src/components/RadioButton/context.js +0 -14
  95. package/src/components/RadioButton/index.js +0 -4
  96. package/src/components/ResizeMode.js +0 -1
  97. package/src/components/Row.js +0 -48
  98. package/src/components/RowBodyIcon.js +0 -8
  99. package/src/components/RowHeadlineImageCaption.js +0 -12
  100. package/src/components/RowHeadlineImageIcon.js +0 -14
  101. package/src/components/SVG.js +0 -13
  102. package/src/components/ScreenContainer.js +0 -35
  103. package/src/components/Shadow.js +0 -16
  104. package/src/components/Slider.js +0 -63
  105. package/src/components/StarRating.js +0 -50
  106. package/src/components/StepIndicator.js +0 -346
  107. package/src/components/Stepper.js +0 -41
  108. package/src/components/Surface.js +0 -32
  109. package/src/components/Swiper/Swiper.js +0 -29
  110. package/src/components/Swiper/SwiperItem.js +0 -9
  111. package/src/components/Swiper/index.js +0 -2
  112. package/src/components/Switch.js +0 -56
  113. package/src/components/TabView/TabView.js +0 -54
  114. package/src/components/TabView/TabViewItem.js +0 -11
  115. package/src/components/TabView/index.js +0 -2
  116. package/src/components/Text.js +0 -33
  117. package/src/components/TextField.js +0 -428
  118. package/src/components/ToggleButton.js +0 -39
  119. package/src/components/Touchable.js +0 -12
  120. package/src/components/Touchable.web.js +0 -2
  121. package/src/components/Typography.js +0 -36
  122. package/src/components/useAuthState.js +0 -31
  123. package/src/constants.js +0 -10
  124. package/src/hooks.js +0 -12
  125. package/src/index.js +0 -49
  126. package/src/interfaces/Icon.js +0 -8
  127. package/src/mappings/Accordion.js +0 -50
  128. package/src/mappings/AccordionItem.js +0 -17
  129. package/src/mappings/ActionSheet.js +0 -17
  130. package/src/mappings/ActionSheetCancel.js +0 -23
  131. package/src/mappings/ActionSheetItem.js +0 -27
  132. package/src/mappings/ActivityIndicator.js +0 -58
  133. package/src/mappings/AudioPlayer.js +0 -57
  134. package/src/mappings/AvatarEdit.js +0 -38
  135. package/src/mappings/Banner.js +0 -32
  136. package/src/mappings/BlurView.js +0 -42
  137. package/src/mappings/Button.js +0 -116
  138. package/src/mappings/Card.js +0 -52
  139. package/src/mappings/CardBlock.js +0 -123
  140. package/src/mappings/CardContainer.js +0 -104
  141. package/src/mappings/CardContainerRating.js +0 -126
  142. package/src/mappings/CardContainerShortImage.js +0 -120
  143. package/src/mappings/CardInline.js +0 -52
  144. package/src/mappings/Carousel.js +0 -19
  145. package/src/mappings/Checkbox.js +0 -46
  146. package/src/mappings/CheckboxGroup.js +0 -26
  147. package/src/mappings/CheckboxRow.js +0 -61
  148. package/src/mappings/CircleImage.js +0 -25
  149. package/src/mappings/Container.js +0 -30
  150. package/src/mappings/CustomCode.js +0 -8
  151. package/src/mappings/DatePicker.js +0 -182
  152. package/src/mappings/DeckSwiper.js +0 -48
  153. package/src/mappings/DeckSwiperCard.js +0 -16
  154. package/src/mappings/Divider.js +0 -27
  155. package/src/mappings/FAB.js +0 -37
  156. package/src/mappings/Fetch.js +0 -13
  157. package/src/mappings/FieldSearchBarFull.js +0 -50
  158. package/src/mappings/FlashList.js +0 -113
  159. package/src/mappings/FlatList.js +0 -51
  160. package/src/mappings/HeaderLarge.js +0 -29
  161. package/src/mappings/HeaderMedium.js +0 -55
  162. package/src/mappings/HeaderOverline.js +0 -55
  163. package/src/mappings/Icon.js +0 -32
  164. package/src/mappings/IconButton.js +0 -33
  165. package/src/mappings/Image.js +0 -35
  166. package/src/mappings/ImageBackground.js +0 -29
  167. package/src/mappings/KeyboardAvoidingView.js +0 -41
  168. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  169. package/src/mappings/Layout.js +0 -200
  170. package/src/mappings/LinearGradient.js +0 -82
  171. package/src/mappings/MapCallout.js +0 -26
  172. package/src/mappings/MapMarker.js +0 -52
  173. package/src/mappings/MapView.js +0 -142
  174. package/src/mappings/Markdown.js +0 -25
  175. package/src/mappings/Modal.js +0 -42
  176. package/src/mappings/NumberInput.js +0 -254
  177. package/src/mappings/Picker.js +0 -153
  178. package/src/mappings/ProgressBar.js +0 -101
  179. package/src/mappings/ProgressCircle.js +0 -109
  180. package/src/mappings/ProgressIndicator.js +0 -181
  181. package/src/mappings/RadioButton.js +0 -51
  182. package/src/mappings/RadioButtonGroup.js +0 -17
  183. package/src/mappings/RadioButtonRow.js +0 -42
  184. package/src/mappings/RowBodyIcon.js +0 -75
  185. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  186. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  187. package/src/mappings/SVG.js +0 -20
  188. package/src/mappings/SafeAreaView.js +0 -33
  189. package/src/mappings/ScrollView.js +0 -37
  190. package/src/mappings/Shadow.js +0 -95
  191. package/src/mappings/Slider.js +0 -60
  192. package/src/mappings/StarRating.js +0 -43
  193. package/src/mappings/Stepper.js +0 -32
  194. package/src/mappings/Surface.js +0 -14
  195. package/src/mappings/Swiper.js +0 -71
  196. package/src/mappings/SwiperItem.js +0 -9
  197. package/src/mappings/Switch.js +0 -81
  198. package/src/mappings/TabView.js +0 -75
  199. package/src/mappings/TabViewItem.js +0 -30
  200. package/src/mappings/Text.js +0 -251
  201. package/src/mappings/TextArea.js +0 -283
  202. package/src/mappings/TextField.js +0 -400
  203. package/src/mappings/TextInput.js +0 -402
  204. package/src/mappings/ToggleButton.js +0 -50
  205. package/src/mappings/Touchable.js +0 -67
  206. package/src/mappings/Video.js +0 -81
  207. package/src/mappings/View.js +0 -207
  208. package/src/mappings/WebView.js +0 -88
  209. package/src/styles/DarkTheme.js +0 -26
  210. package/src/styles/DefaultTheme.js +0 -111
  211. package/src/styles/fonts.js +0 -62
  212. package/src/styles/overlay.js +0 -60
  213. package/src/styles/shadow.js +0 -51
  214. package/src/theming.js +0 -3
  215. package/src/utilities.js +0 -102
@@ -1,182 +0,0 @@
1
- import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, createNumberProp, createColorProp, createStaticBoolProp, } from "@draftbit/types";
2
- const SEED_DATA_PROPS = {
3
- mode: {
4
- label: "Mode",
5
- description: "Choose between date, time and datetime",
6
- defaultValue: "date",
7
- editable: true,
8
- required: true,
9
- formType: FORM_TYPES.flatArray,
10
- propType: PROP_TYPES.STRING,
11
- options: ["date", "time", "datetime"],
12
- group: GROUPS.basic,
13
- },
14
- label: {
15
- label: "Label",
16
- description: "The label to be displayed on the picker",
17
- formType: FORM_TYPES.string,
18
- propType: PROP_TYPES.STRING,
19
- defaultValue: "Date",
20
- editable: true,
21
- required: true,
22
- group: GROUPS.data,
23
- },
24
- labelSize: createNumberProp({
25
- label: "Label Size",
26
- }),
27
- labelColor: createColorProp({
28
- label: "Label Color",
29
- }),
30
- borderColor: createColorProp({
31
- label: "Border Color",
32
- }),
33
- borderColorActive: createColorProp({
34
- label: "Active Border Color",
35
- description: "Color of border when date picker is active",
36
- }),
37
- format: {
38
- label: "Format",
39
- description: "Create an output format for the date.",
40
- editable: true,
41
- required: false,
42
- formType: FORM_TYPES.string,
43
- propType: PROP_TYPES.STRING,
44
- defaultValue: null,
45
- group: GROUPS.basic,
46
- },
47
- assistiveText: {
48
- label: "Assistive text",
49
- description: "Helper text to display below the picker",
50
- formType: FORM_TYPES.string,
51
- propType: PROP_TYPES.STRING,
52
- defaultValue: null,
53
- editable: true,
54
- required: false,
55
- group: GROUPS.basic,
56
- },
57
- // locale: {
58
- // label: "Locale",
59
- // description: "Locale for the datepicker. Must be a valid Locale",
60
- // formType: FORM_TYPES.string,
61
- // propType: PROP_TYPES.STRING,
62
- // defaultValue: null,
63
- // editable: true,
64
- // required: false,
65
- // group: GROUPS.basic,
66
- // },
67
- // minuteInterval: {
68
- // label: "Minute Interval",
69
- // description: "The interval at which minutes can be selected",
70
- // formType: FORM_TYPES.flatArray,
71
- // propType: PROP_TYPES.NUMBER,
72
- // options: [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30],
73
- // defaultValue: null,
74
- // editable: true,
75
- // required: false,
76
- // group: GROUPS.basic,
77
- // },
78
- // timeZoneOffsetInMinutes: {
79
- // label: "Time zone offset",
80
- // description:
81
- // "By default, the datepicker uses the device's timezone. This will allow you to offset it",
82
- // formType: FORM_TYPES.number,
83
- // propType: PROP_TYPES.NUMBER,
84
- // defaultValue: null,
85
- // editable: true,
86
- // required: false,
87
- // group: GROUPS.basic,
88
- // },
89
- disabled: {
90
- label: "Disabled",
91
- description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
92
- formType: FORM_TYPES.boolean,
93
- propType: PROP_TYPES.BOOLEAN,
94
- defaultValue: false,
95
- editable: true,
96
- required: false,
97
- group: GROUPS.basic,
98
- },
99
- // error: {
100
- // label: "Error",
101
- // description: "Whether the picker should display the error state",
102
- // formType: FORM_TYPES.boolean,
103
- // propType: PROP_TYPES.BOOLEAN,
104
- // defaultValue: false,
105
- // editable: true,
106
- // required: false,
107
- // group: GROUPS.data,
108
- // },
109
- leftIconName: {
110
- label: "Left icon name",
111
- description: "The icon to display on the left",
112
- formType: FORM_TYPES.icon,
113
- propType: PROP_TYPES.STRING,
114
- defaultValue: null,
115
- editable: true,
116
- required: false,
117
- group: GROUPS.basic,
118
- },
119
- leftIconMode: {
120
- label: "Left icon mode",
121
- description: "The mode of the icon to display on the left. 'inset' or 'outset'.",
122
- formType: FORM_TYPES.flatArray,
123
- propType: PROP_TYPES.STRING,
124
- defaultValue: "inset",
125
- options: ["inset", "outset"],
126
- editable: true,
127
- required: true,
128
- group: GROUPS.basic,
129
- },
130
- rightIconName: {
131
- label: "Right icon name",
132
- description: "The icon to display on the right",
133
- formType: FORM_TYPES.icon,
134
- propType: PROP_TYPES.STRING,
135
- defaultValue: null,
136
- editable: true,
137
- required: false,
138
- group: GROUPS.basic,
139
- },
140
- fieldName: {
141
- ...FIELD_NAME,
142
- handlerPropName: "onDateChange",
143
- valuePropName: "date",
144
- defaultValue: "date",
145
- },
146
- };
147
- export const SEED_DATA = [
148
- {
149
- name: "Date Picker",
150
- tag: "DatePicker",
151
- description: "A component used to select a date from a visual calendar",
152
- category: COMPONENT_TYPES.input,
153
- layout: null,
154
- triggers: [Triggers.OnDateChange],
155
- stylesPanelSections: [
156
- StylesPanelSections.Typography,
157
- StylesPanelSections.Background,
158
- StylesPanelSections.Size,
159
- StylesPanelSections.MarginsAndPaddings,
160
- StylesPanelSections.Position,
161
- ],
162
- props: {
163
- ...SEED_DATA_PROPS,
164
- type: {
165
- label: "Appearance",
166
- description: "Type of Datepicker",
167
- formType: FORM_TYPES.flatArray,
168
- propType: PROP_TYPES.STRING,
169
- defaultValue: "solid",
170
- options: ["solid", "underline"],
171
- editable: true,
172
- required: true,
173
- group: GROUPS.basic,
174
- },
175
- autoDismissKeyboard: createStaticBoolProp({
176
- label: "Auto dismiss keyboard",
177
- description: "Automatically dismiss keyboard when DatePicker is opened",
178
- defaultValue: true,
179
- }),
180
- },
181
- },
182
- ];
@@ -1,48 +0,0 @@
1
- import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Deck Swiper",
4
- tag: "DeckSwiper",
5
- description: "Deck swiper container",
6
- category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
- layout: {
9
- width: "100%",
10
- },
11
- triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
12
- props: {
13
- onIndexChanged: createActionProp({
14
- label: "On index changed",
15
- description: "Action to execute when swipe to new index",
16
- }),
17
- onEndReached: createActionProp({
18
- label: "On end reached",
19
- description: "Action to execute when end of swiping reached",
20
- }),
21
- startCardIndex: createStaticNumberProp({
22
- label: "Start card index",
23
- description: "Index of card to start swiping from",
24
- defaultValue: 0,
25
- }),
26
- infiniteSwiping: createStaticBoolProp({
27
- label: "Infinite swiping",
28
- description: "Whether to infinitley loop through cards or not",
29
- }),
30
- verticalEnabled: createStaticBoolProp({
31
- label: "Vertical swipe enabled",
32
- description: "Whether cards should be swipeable vertically or not",
33
- defaultValue: true,
34
- }),
35
- horizontalEnabled: createStaticBoolProp({
36
- label: "Horizontal swipe enabled",
37
- description: "Whether cards should be swipeable horizontally or not",
38
- defaultValue: true,
39
- }),
40
- visibleCardCount: createStaticNumberProp({
41
- label: "Visible card count",
42
- description: "Number of cards visible behind (and including) the current card",
43
- defaultValue: 1,
44
- min: 1,
45
- step: 1,
46
- }),
47
- },
48
- };
@@ -1,16 +0,0 @@
1
- import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Deck Swiper Card",
4
- tag: "DeckSwiperCard",
5
- description: "Single Deck Swiper Card item to be used in DeckSwiper",
6
- category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {
9
- flex: 1,
10
- alignItems: "center",
11
- justifyContent: "center",
12
- padding: 20,
13
- borderWidth: 2,
14
- },
15
- props: {},
16
- };
@@ -1,27 +0,0 @@
1
- import { GROUPS, FORM_TYPES, PROP_TYPES, COMPONENT_TYPES, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Divider",
5
- tag: "Divider",
6
- category: COMPONENT_TYPES.layout,
7
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
- description: "A horizontal line used to divide content",
9
- preview_image_url: "{CLOUDINARY_URL}/Divider.png",
10
- supports_list_render: false,
11
- props: {
12
- color: {
13
- group: GROUPS.basic,
14
- label: "Color",
15
- description: "The color of the divider",
16
- editable: true,
17
- required: false,
18
- defaultValue: "divider",
19
- formType: FORM_TYPES.color,
20
- propType: PROP_TYPES.THEME,
21
- },
22
- },
23
- layout: {
24
- height: 1,
25
- },
26
- },
27
- ];
@@ -1,37 +0,0 @@
1
- import { COMPONENT_TYPES, createIconProp, createColorProp, GROUPS, createBoolProp, createIconSizeProp, createActionProp, Triggers, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "FAB",
4
- tag: "FAB",
5
- category: COMPONENT_TYPES.deprecated,
6
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
7
- description: "A mini round icon FAB",
8
- layout: {},
9
- triggers: [Triggers.OnPress],
10
- props: {
11
- onPress: createActionProp(),
12
- disabled: createBoolProp({
13
- label: "Disabled",
14
- group: GROUPS.basic,
15
- }),
16
- loading: createBoolProp({
17
- label: "Loading",
18
- group: GROUPS.basic,
19
- }),
20
- iconName: createIconProp({
21
- label: "Icon",
22
- defaultValue: null,
23
- group: GROUPS.basic,
24
- }),
25
- iconColor: createColorProp({
26
- label: "Icon color",
27
- defaultValue: null,
28
- group: GROUPS.basic,
29
- }),
30
- bgColor: createColorProp({
31
- label: "Background color",
32
- defaultValue: null,
33
- group: GROUPS.basic,
34
- }),
35
- size: createIconSizeProp(),
36
- },
37
- };
@@ -1,13 +0,0 @@
1
- import { COMPONENT_TYPES, StylesPanelSections } 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
- stylesPanelSections: [StylesPanelSections.NoStyles],
9
- layout: {
10
- minHeight: 40,
11
- },
12
- props: {},
13
- };
@@ -1,50 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, BLOCK_STYLES_SECTIONS, } 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.deprecated,
8
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
- preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
10
- supports_list_render: false,
11
- triggers: [Triggers.OnChange],
12
- props: {
13
- icon: {
14
- group: GROUPS.basic,
15
- label: "Icon",
16
- description: "Left icon to display",
17
- formType: FORM_TYPES.icon,
18
- propType: PROP_TYPES.ASSET,
19
- defaultValue: null,
20
- editable: true,
21
- required: false,
22
- },
23
- placeholder: {
24
- group: GROUPS.basic,
25
- label: "Placeholder",
26
- description: "Input placeholder text",
27
- formType: FORM_TYPES.string,
28
- propType: PROP_TYPES.STRING,
29
- defaultValue: "Search for...",
30
- editable: true,
31
- required: false,
32
- },
33
- onSubmit: {
34
- group: GROUPS.basic,
35
- label: "Submit action",
36
- description: "Action to execute on submission",
37
- editable: true,
38
- required: false,
39
- formType: FORM_TYPES.action,
40
- propType: PROP_TYPES.STRING,
41
- defaultValue: null,
42
- },
43
- fieldName: {
44
- ...FIELD_NAME,
45
- defaultValue: "searchBarValue",
46
- },
47
- },
48
- layout: {},
49
- },
50
- ];
@@ -1,113 +0,0 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Masonry List",
5
- tag: "MasonryFlashList",
6
- description: "Masonry Flashlist by Shopify",
7
- packageName: "@shopify/flash-list",
8
- category: COMPONENT_TYPES.data,
9
- stylesPanelSections: [
10
- StylesPanelSections.Background,
11
- StylesPanelSections.MarginsAndPaddings,
12
- ],
13
- triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
14
- props: {
15
- onRefresh: createActionProp(),
16
- onEndReached: createActionProp(),
17
- numColumns: createNumColumnsType({
18
- editable: true,
19
- }),
20
- estimatedItemSize: createNumberProp({
21
- group: GROUPS.basic,
22
- label: "Est. Item Size",
23
- description: "Approximate size of the items before rendering.",
24
- defaultValue: 50,
25
- step: 1,
26
- precision: 0,
27
- }),
28
- initialNumToRender: createStaticNumberProp({
29
- label: "Initial Num To Render",
30
- description: "How many items to render in the initial batch",
31
- defaultValue: null,
32
- }),
33
- onEndReachedThreshold: createStaticNumberProp({
34
- label: "End Reached Threshold",
35
- description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
36
- defaultValue: 0.5,
37
- }),
38
- refreshColor: createColorProp({
39
- label: "Refreshing Color",
40
- description: "Color of the refresh indicator",
41
- }),
42
- showsHorizontalScrollIndicator: createStaticBoolProp({
43
- label: "Show Horizontal Scroll Indicator",
44
- description: "When true, shows a horizontal scroll indicator. The default value is true.",
45
- defaultValue: true,
46
- }),
47
- showsVerticalScrollIndicator: createStaticBoolProp({
48
- label: "Show Vertical Scroll Indicator",
49
- description: "When true, shows a vertical scroll indicator. The default value is true.",
50
- defaultValue: true,
51
- }),
52
- },
53
- },
54
- {
55
- name: "FlashList",
56
- tag: "FlashList",
57
- description: "Flashlist by Shopify",
58
- packageName: "@shopify/flash-list",
59
- category: COMPONENT_TYPES.data,
60
- stylesPanelSections: [
61
- StylesPanelSections.Background,
62
- StylesPanelSections.MarginsAndPaddings,
63
- ],
64
- triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
65
- props: {
66
- onRefresh: createActionProp(),
67
- onEndReached: createActionProp(),
68
- estimatedItemSize: createNumberProp({
69
- group: GROUPS.basic,
70
- label: "Est. Item Size",
71
- description: "Approximate size of the items before rendering.",
72
- defaultValue: 50,
73
- step: 1,
74
- precision: 0,
75
- }),
76
- horizontal: createStaticBoolProp({
77
- label: "Horizontal",
78
- description: "Render list horizontally",
79
- }),
80
- inverted: createStaticBoolProp({
81
- label: "Inverted",
82
- description: "If true, reverses the direction.",
83
- }),
84
- numColumns: createNumColumnsType({
85
- editable: true,
86
- }),
87
- initialNumToRender: createStaticNumberProp({
88
- label: "Initial Num To Render",
89
- description: "How many items to render in the initial batch",
90
- defaultValue: null,
91
- }),
92
- onEndReachedThreshold: createStaticNumberProp({
93
- label: "End Reached Threshold",
94
- description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
95
- defaultValue: 0.5,
96
- }),
97
- refreshColor: createColorProp({
98
- label: "Refreshing Color",
99
- description: "Color of the refresh indicator",
100
- }),
101
- showsHorizontalScrollIndicator: createStaticBoolProp({
102
- label: "Show Horizontal Scroll Indicator",
103
- description: "When true, shows a horizontal scroll indicator. The default value is true.",
104
- defaultValue: true,
105
- }),
106
- showsVerticalScrollIndicator: createStaticBoolProp({
107
- label: "Show Vertical Scroll Indicator",
108
- description: "When true, shows a vertical scroll indicator. The default value is true.",
109
- defaultValue: true,
110
- }),
111
- },
112
- },
113
- ];
@@ -1,51 +0,0 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } 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
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {
9
- flex: 1,
10
- },
11
- triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
12
- props: {
13
- onRefresh: createActionProp(),
14
- onEndReached: createActionProp(),
15
- horizontal: createStaticBoolProp({
16
- label: "Horizontal",
17
- description: "Render list horizontally",
18
- }),
19
- inverted: createStaticBoolProp({
20
- label: "Inverted",
21
- description: "If true, reverses the direction.",
22
- }),
23
- numColumns: createNumColumnsType({
24
- editable: true,
25
- }),
26
- initialNumToRender: createStaticNumberProp({
27
- label: "Initial Num To Render",
28
- description: "How many items to render in the initial batch",
29
- defaultValue: null,
30
- }),
31
- onEndReachedThreshold: createStaticNumberProp({
32
- label: "End Reached Threshold",
33
- description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
34
- defaultValue: 0.5,
35
- }),
36
- refreshColor: createColorProp({
37
- label: "Refreshing Color",
38
- description: "Color of the refresh indicator",
39
- }),
40
- showsHorizontalScrollIndicator: createStaticBoolProp({
41
- label: "Show Horizontal Scroll Indicator",
42
- description: "When true, shows a horizontal scroll indicator. The default value is true.",
43
- defaultValue: true,
44
- }),
45
- showsVerticalScrollIndicator: createStaticBoolProp({
46
- label: "Show Vertical Scroll Indicator",
47
- description: "When true, shows a vertical scroll indicator. The default value is true.",
48
- defaultValue: true,
49
- }),
50
- },
51
- };
@@ -1,29 +0,0 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createActionProp, Triggers, BLOCK_STYLES_SECTIONS, } 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
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
- layout: {},
10
- triggers: [Triggers.OnPress],
11
- props: {
12
- onPress: createActionProp(),
13
- title: createTextProp({
14
- label: "Title",
15
- description: "Text to display",
16
- defaultValue: "Title",
17
- }),
18
- buttonText: createTextProp({
19
- label: "Button text",
20
- description: "Right aligned button text to display",
21
- defaultValue: "See All",
22
- }),
23
- icon: createIconProp({
24
- defaultValue: null,
25
- required: false,
26
- }),
27
- },
28
- },
29
- ];
@@ -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 Medium",
5
- tag: "HeaderMedium",
6
- description: "A medium 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_HeadlineMediumIconText.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
- ];