@draftbit/core 46.8.2-fee87c.2 → 46.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/lib/commonjs/components/Justification.js +1 -5
  2. package/lib/commonjs/components/ResizeMode.js +1 -5
  3. package/lib/commonjs/index.js +0 -13
  4. package/lib/module/components/Justification.js +0 -1
  5. package/lib/module/components/ResizeMode.js +0 -1
  6. package/lib/module/index.js +0 -1
  7. package/lib/typescript/src/index.d.ts +0 -1
  8. package/lib/typescript/src/index.d.ts.map +1 -1
  9. package/package.json +4 -6
  10. package/src/index.tsx +0 -2
  11. package/lib/commonjs/components/TabView/TabView.js +0 -100
  12. package/lib/commonjs/components/TabView/TabViewItem.js +0 -25
  13. package/lib/commonjs/components/TabView/index.js +0 -20
  14. package/lib/commonjs/mappings/TabView.js +0 -73
  15. package/lib/commonjs/mappings/TabViewItem.js +0 -35
  16. package/lib/module/components/TabView/TabView.js +0 -90
  17. package/lib/module/components/TabView/TabViewItem.js +0 -20
  18. package/lib/module/components/TabView/index.js +0 -2
  19. package/lib/module/mappings/TabView.js +0 -66
  20. package/lib/module/mappings/TabViewItem.js +0 -28
  21. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -26
  22. package/lib/typescript/src/components/TabView/TabView.d.ts.map +0 -1
  23. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -11
  24. package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +0 -1
  25. package/lib/typescript/src/components/TabView/index.d.ts +0 -3
  26. package/lib/typescript/src/components/TabView/index.d.ts.map +0 -1
  27. package/lib/typescript/src/mappings/TabView.d.ts +0 -123
  28. package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
  29. package/lib/typescript/src/mappings/TabViewItem.d.ts +0 -25
  30. package/lib/typescript/src/mappings/TabViewItem.d.ts.map +0 -1
  31. package/src/Provider.js +0 -9
  32. package/src/components/Accordion/AccordionGroup.js +0 -44
  33. package/src/components/Accordion/AccordionItem.js +0 -32
  34. package/src/components/Accordion/index.js +0 -2
  35. package/src/components/ActionSheet/ActionSheet.js +0 -45
  36. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  37. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  38. package/src/components/ActionSheet/index.js +0 -3
  39. package/src/components/AnimatedCircularProgress.js +0 -43
  40. package/src/components/AspectRatio.js +0 -18
  41. package/src/components/AvatarEdit.js +0 -30
  42. package/src/components/Banner.js +0 -109
  43. package/src/components/Button.js +0 -114
  44. package/src/components/Card.js +0 -57
  45. package/src/components/Checkbox/Checkbox.js +0 -62
  46. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  47. package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
  48. package/src/components/Checkbox/CheckboxRow.js +0 -77
  49. package/src/components/Checkbox/context.js +0 -14
  50. package/src/components/Checkbox/index.js +0 -3
  51. package/src/components/CircleImage.js +0 -8
  52. package/src/components/CircularProgress.js +0 -81
  53. package/src/components/Config.js +0 -64
  54. package/src/components/Container.js +0 -43
  55. package/src/components/DatePicker/DatePicker.js +0 -382
  56. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  57. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  58. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  59. package/src/components/DeckSwiper/DeckSwiper.js +0 -65
  60. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  61. package/src/components/DeckSwiper/index.js +0 -2
  62. package/src/components/DeprecatedButton.js +0 -83
  63. package/src/components/DeprecatedCardWrapper.js +0 -18
  64. package/src/components/DeprecatedFAB.js +0 -114
  65. package/src/components/Divider.js +0 -13
  66. package/src/components/Elevation.js +0 -20
  67. package/src/components/FAB.js +0 -46
  68. package/src/components/FieldSearchBarFull.js +0 -53
  69. package/src/components/FormRow.js +0 -19
  70. package/src/components/IconButton.js +0 -35
  71. package/src/components/Image.js +0 -47
  72. package/src/components/Justification.js +0 -1
  73. package/src/components/Layout.js +0 -50
  74. package/src/components/NumberInput.js +0 -49
  75. package/src/components/Picker/Picker.js +0 -266
  76. package/src/components/Picker/PickerComponent.android.js +0 -69
  77. package/src/components/Picker/PickerComponent.ios.js +0 -79
  78. package/src/components/Picker/PickerComponent.web.js +0 -70
  79. package/src/components/Picker/PickerTypes.js +0 -1
  80. package/src/components/Portal/Portal.js +0 -35
  81. package/src/components/Portal/PortalConsumer.js +0 -27
  82. package/src/components/Portal/PortalHost.js +0 -107
  83. package/src/components/Portal/PortalManager.js +0 -32
  84. package/src/components/Pressable.js +0 -12
  85. package/src/components/ProgressBar.js +0 -118
  86. package/src/components/ProgressCircle.js +0 -13
  87. package/src/components/ProgressIndicator.js +0 -27
  88. package/src/components/RadioButton/RadioButton.js +0 -17
  89. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  90. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  91. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  92. package/src/components/RadioButton/context.js +0 -14
  93. package/src/components/RadioButton/index.js +0 -4
  94. package/src/components/ResizeMode.js +0 -1
  95. package/src/components/Row.js +0 -48
  96. package/src/components/RowBodyIcon.js +0 -8
  97. package/src/components/RowHeadlineImageCaption.js +0 -12
  98. package/src/components/RowHeadlineImageIcon.js +0 -14
  99. package/src/components/SVG.js +0 -13
  100. package/src/components/ScreenContainer.js +0 -35
  101. package/src/components/Slider.js +0 -63
  102. package/src/components/StarRating.js +0 -50
  103. package/src/components/StepIndicator.js +0 -346
  104. package/src/components/Stepper.js +0 -41
  105. package/src/components/Surface.js +0 -32
  106. package/src/components/Swiper/Swiper.js +0 -29
  107. package/src/components/Swiper/SwiperItem.js +0 -9
  108. package/src/components/Swiper/index.js +0 -2
  109. package/src/components/Switch.js +0 -56
  110. package/src/components/TabView/TabView.js +0 -45
  111. package/src/components/TabView/TabView.tsx +0 -129
  112. package/src/components/TabView/TabViewItem.js +0 -11
  113. package/src/components/TabView/TabViewItem.tsx +0 -25
  114. package/src/components/TabView/index.js +0 -2
  115. package/src/components/TabView/index.tsx +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 -47
  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 -14
  130. package/src/mappings/ActionSheetCancel.js +0 -20
  131. package/src/mappings/ActionSheetItem.js +0 -24
  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 -22
  172. package/src/mappings/MapMarker.js +0 -48
  173. package/src/mappings/MapView.js +0 -142
  174. package/src/mappings/Modal.js +0 -42
  175. package/src/mappings/NumberInput.js +0 -254
  176. package/src/mappings/Picker.js +0 -153
  177. package/src/mappings/ProgressBar.js +0 -101
  178. package/src/mappings/ProgressCircle.js +0 -109
  179. package/src/mappings/ProgressIndicator.js +0 -181
  180. package/src/mappings/RadioButton.js +0 -51
  181. package/src/mappings/RadioButtonGroup.js +0 -17
  182. package/src/mappings/RadioButtonRow.js +0 -42
  183. package/src/mappings/RowBodyIcon.js +0 -75
  184. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  185. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  186. package/src/mappings/SVG.js +0 -20
  187. package/src/mappings/SafeAreaView.js +0 -33
  188. package/src/mappings/ScrollView.js +0 -37
  189. package/src/mappings/Slider.js +0 -60
  190. package/src/mappings/StarRating.js +0 -43
  191. package/src/mappings/Stepper.js +0 -32
  192. package/src/mappings/Surface.js +0 -14
  193. package/src/mappings/Swiper.js +0 -71
  194. package/src/mappings/SwiperItem.js +0 -9
  195. package/src/mappings/Switch.js +0 -81
  196. package/src/mappings/TabView.js +0 -69
  197. package/src/mappings/TabView.ts +0 -79
  198. package/src/mappings/TabViewItem.js +0 -28
  199. package/src/mappings/TabViewItem.ts +0 -35
  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,61 +0,0 @@
1
- import { createBoolProp, createTextProp, createTextStyle, createRowDirectionProp, createFieldNameProp, createIconProp, createStaticNumberProp, COMPONENT_TYPES, Triggers, createColorProp, StylesPanelSections, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Checkbox Row",
4
- tag: "CheckboxRow",
5
- category: COMPONENT_TYPES.control,
6
- stylesPanelSections: [
7
- StylesPanelSections.Typography,
8
- StylesPanelSections.Margins,
9
- StylesPanelSections.Effects,
10
- ],
11
- layout: {
12
- minHeight: 50,
13
- },
14
- triggers: [Triggers.OnPress, Triggers.OnCheck, Triggers.OnUncheck],
15
- props: {
16
- fieldName: createFieldNameProp({
17
- defaultValue: "checkboxRowValue",
18
- valuePropName: "value",
19
- handlerPropName: "onPress",
20
- }),
21
- label: createTextProp({
22
- label: "Label",
23
- description: "Label to show with the checkbox",
24
- required: true,
25
- defaultValue: "First Option",
26
- }),
27
- labelStyle: createTextStyle({
28
- label: "Label Style",
29
- description: "Change the styles of the label",
30
- required: false,
31
- editable: false,
32
- }),
33
- direction: createRowDirectionProp(),
34
- color: createColorProp({
35
- description: "Color for the button (used when the checkbox is checked)",
36
- }),
37
- uncheckedColor: createColorProp({
38
- label: "Unselected Color",
39
- description: "Color for the button when the checkbox is unchecked",
40
- }),
41
- disabled: createBoolProp({
42
- label: "Disabled",
43
- description: "Whether the checkbox is disabled",
44
- }),
45
- size: createStaticNumberProp({
46
- label: "Size",
47
- description: "Specifies the size of the icon",
48
- defaultValue: null,
49
- }),
50
- checkedIcon: createIconProp({
51
- label: "Checked Icon",
52
- description: 'Icon to show when the checkbox status is "checked"',
53
- defaultValue: null,
54
- }),
55
- uncheckedIcon: createIconProp({
56
- label: "Unchecked Icon",
57
- description: 'Icon to show when the checkbox status is "unchecked"',
58
- defaultValue: null,
59
- }),
60
- },
61
- };
@@ -1,25 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createImageProp, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Circle Image",
4
- tag: "CircleImage",
5
- description: "A circle image",
6
- category: COMPONENT_TYPES.deprecated,
7
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
- props: {
9
- source: createImageProp(),
10
- size: {
11
- group: GROUPS.basic,
12
- label: "Size",
13
- description: "Size of your circle image",
14
- editable: true,
15
- required: false,
16
- formType: FORM_TYPES.number,
17
- propType: PROP_TYPES.NUMBER,
18
- min: 0,
19
- max: 300,
20
- precision: 0,
21
- step: 1,
22
- defaultValue: 60,
23
- },
24
- },
25
- };
@@ -1,30 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, createImageProp, createResizeModeProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Container",
4
- tag: "Container",
5
- description: "A container component with gutter padding",
6
- category: COMPONENT_TYPES.deprecated,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {
9
- height: 250,
10
- },
11
- props: {
12
- useThemeGutterPadding: {
13
- group: GROUPS.basic,
14
- label: "Use gutter padding",
15
- description: "When true, uses the theme gutter spacing as the container's horizontal padding",
16
- formType: FORM_TYPES.boolean,
17
- propType: PROP_TYPES.BOOLEAN,
18
- defaultValue: false,
19
- editable: false,
20
- required: true,
21
- },
22
- backgroundImage: createImageProp({
23
- label: "Background Image",
24
- description: "Apply a custom background image",
25
- defaultValue: null,
26
- }),
27
- backgroundImageResizeMode: createResizeModeProp(),
28
- elevation: createElevationType(0),
29
- },
30
- };
@@ -1,8 +0,0 @@
1
- import { COMPONENT_TYPES } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Custom Code",
4
- tag: "CustomCode",
5
- description: "A component that allows usage of custom code",
6
- category: COMPONENT_TYPES.utility,
7
- props: {},
8
- };
@@ -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, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } 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: CONTAINER_COMPONENT_STYLES_SECTIONS,
10
- layout: {
11
- flex: 1,
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: CONTAINER_COMPONENT_STYLES_SECTIONS,
61
- layout: {
62
- flex: 1,
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
- };