@draftbit/core 43.6.0-alpha.5 → 43.6.1-807284.0
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.
- package/lib/commonjs/components/DeprecatedButton.js +19 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Justification.js +3 -0
- package/lib/commonjs/components/ResizeMode.js +3 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/CardBlock.js.map +1 -1
- package/lib/commonjs/mappings/Icon.js.map +1 -1
- package/lib/commonjs/mappings/KeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/mappings/MapView.js +11 -4
- package/lib/commonjs/mappings/MapView.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/styles/shadow.js.map +1 -1
- package/lib/module/components/Justification.js +1 -1
- package/lib/module/components/ResizeMode.js +1 -1
- package/lib/module/mappings/MapView.js +12 -5
- package/lib/module/mappings/MapView.js.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/package.json +3 -3
- package/src/Provider.js +9 -0
- package/src/components/Accordion/AccordionGroup.js +44 -0
- package/src/components/Accordion/AccordionItem.js +32 -0
- package/src/components/Accordion/index.js +2 -0
- package/src/components/ActionSheet/ActionSheet.js +45 -0
- package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
- package/src/components/ActionSheet/ActionSheetItem.js +30 -0
- package/src/components/ActionSheet/index.js +3 -0
- package/src/components/AnimatedCircularProgress.js +43 -0
- package/src/components/AspectRatio.js +18 -0
- package/src/components/AvatarEdit.js +30 -0
- package/src/components/Banner.js +109 -0
- package/src/components/Button.js +112 -0
- package/src/components/Card.js +57 -0
- package/src/components/CardBlock.js +54 -0
- package/src/components/CardContainer.js +69 -0
- package/src/components/CardContainerRating.js +79 -0
- package/src/components/CardContainerShortImage.js +33 -0
- package/src/components/CardInline.js +36 -0
- package/src/components/Carousel.js +66 -0
- package/src/components/Checkbox/Checkbox.js +63 -0
- package/src/components/Checkbox/CheckboxGroup.js +21 -0
- package/src/components/Checkbox/CheckboxGroupRow.js +77 -0
- package/src/components/Checkbox/CheckboxRow.js +78 -0
- package/src/components/Checkbox/context.js +14 -0
- package/src/components/Checkbox/index.js +3 -0
- package/src/components/CircleImage.js +8 -0
- package/src/components/CircularProgress.js +78 -0
- package/src/components/Config.js +63 -0
- package/src/components/Container.js +44 -0
- package/src/components/DatePicker/DatePicker.js +368 -0
- package/src/components/DatePicker/DatePickerComponent.js +13 -0
- package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
- package/src/components/DatePicker/DatePickerComponentType.js +1 -0
- package/src/components/DeprecatedButton.js +95 -0
- package/src/components/DeprecatedCardWrapper.js +18 -0
- package/src/components/DeprecatedFAB.js +115 -0
- package/src/components/Divider.js +13 -0
- package/src/components/Elevation.js +20 -0
- package/src/components/FAB.js +46 -0
- package/src/components/FieldSearchBarFull.js +53 -0
- package/src/components/FormRow.js +19 -0
- package/src/components/Header.js +44 -0
- package/src/components/HeaderLarge.js +7 -0
- package/src/components/HeaderMedium.js +7 -0
- package/src/components/HeaderOverline.js +7 -0
- package/src/components/IconButton.js +35 -0
- package/src/components/Image.js +47 -0
- package/src/components/Justification.js +1 -0
- package/src/components/Layout.js +50 -0
- package/src/components/NumberInput.js +49 -0
- package/src/components/Picker/Picker.js +56 -0
- package/src/components/Picker/PickerComponent.android.js +68 -0
- package/src/components/Picker/PickerComponent.ios.js +78 -0
- package/src/components/Picker/PickerComponent.web.js +69 -0
- package/src/components/Picker/PickerTypes.js +1 -0
- package/src/components/Portal/Portal.js +35 -0
- package/src/components/Portal/PortalConsumer.js +28 -0
- package/src/components/Portal/PortalHost.js +105 -0
- package/src/components/Portal/PortalManager.js +29 -0
- package/src/components/ProgressBar.js +118 -0
- package/src/components/ProgressCircle.js +13 -0
- package/src/components/ProgressIndicator.js +27 -0
- package/src/components/RadioButton/RadioButton.js +17 -0
- package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
- package/src/components/RadioButton/RadioButtonGroup.js +43 -0
- package/src/components/RadioButton/RadioButtonRow.js +76 -0
- package/src/components/RadioButton/context.js +14 -0
- package/src/components/RadioButton/index.js +4 -0
- package/src/components/ResizeMode.js +1 -0
- package/src/components/Row.js +48 -0
- package/src/components/RowBodyIcon.js +8 -0
- package/src/components/RowHeadlineImageCaption.js +12 -0
- package/src/components/RowHeadlineImageIcon.js +14 -0
- package/src/components/ScreenContainer.js +34 -0
- package/src/components/Slider.js +63 -0
- package/src/components/StarRating.js +50 -0
- package/src/components/StepIndicator.js +346 -0
- package/src/components/Stepper.js +39 -0
- package/src/components/Surface.js +32 -0
- package/src/components/Swiper/Swiper.js +18 -0
- package/src/components/Swiper/SwiperItem.js +9 -0
- package/src/components/Swiper/index.js +2 -0
- package/src/components/Switch.js +56 -0
- package/src/components/Text.js +28 -0
- package/src/components/TextField.js +420 -0
- package/src/components/ToggleButton.js +39 -0
- package/src/components/Touchable.js +12 -0
- package/src/components/Touchable.web.js +2 -0
- package/src/components/Typography.js +36 -0
- package/src/components/useAuthState.js +31 -0
- package/src/constants.js +10 -0
- package/src/hooks.js +12 -0
- package/src/index.js +51 -0
- package/src/interfaces/Icon.js +8 -0
- package/src/mappings/Accordion.js +41 -0
- package/src/mappings/AccordionItem.js +16 -0
- package/src/mappings/ActionSheet.js +13 -0
- package/src/mappings/ActionSheetCancel.js +19 -0
- package/src/mappings/ActionSheetItem.js +22 -0
- package/src/mappings/ActivityIndicator.js +53 -0
- package/src/mappings/AudioPlayer.js +20 -0
- package/src/mappings/AvatarEdit.js +37 -0
- package/src/mappings/Banner.js +32 -0
- package/src/mappings/BlurView.js +41 -0
- package/src/mappings/Button.js +56 -0
- package/src/mappings/Card.js +52 -0
- package/src/mappings/CardBlock.js +122 -0
- package/src/mappings/CardContainer.js +102 -0
- package/src/mappings/CardContainerRating.js +124 -0
- package/src/mappings/CardContainerShortImage.js +118 -0
- package/src/mappings/CardInline.js +51 -0
- package/src/mappings/Carousel.js +18 -0
- package/src/mappings/Checkbox.js +45 -0
- package/src/mappings/CheckboxGroup.js +25 -0
- package/src/mappings/CheckboxRow.js +56 -0
- package/src/mappings/CircleImage.js +24 -0
- package/src/mappings/Container.js +29 -0
- package/src/mappings/CustomCode.js +8 -0
- package/src/mappings/DatePicker.js +146 -0
- package/src/mappings/Divider.js +26 -0
- package/src/mappings/FAB.js +36 -0
- package/src/mappings/Fetch.js +12 -0
- package/src/mappings/FieldSearchBarFull.js +49 -0
- package/src/mappings/FlatList.js +19 -0
- package/src/mappings/HeaderLarge.js +28 -0
- package/src/mappings/HeaderMedium.js +54 -0
- package/src/mappings/HeaderOverline.js +54 -0
- package/src/mappings/Icon.js +25 -0
- package/src/mappings/IconButton.js +30 -0
- package/src/mappings/Image.js +15 -0
- package/src/mappings/ImageBackground.js +28 -0
- package/src/mappings/KeyboardAvoidingView.js +40 -0
- package/src/mappings/KeyboardAwareScrollView.js +43 -0
- package/src/mappings/Layout.js +195 -0
- package/src/mappings/LinearGradient.js +77 -0
- package/src/mappings/MapCallout.js +20 -0
- package/src/mappings/MapMarker.js +47 -0
- package/src/mappings/MapView.js +132 -0
- package/src/mappings/MapView.ts +9 -1
- package/src/mappings/Modal.js +41 -0
- package/src/mappings/Picker.js +137 -0
- package/src/mappings/ProgressBar.js +100 -0
- package/src/mappings/ProgressCircle.js +108 -0
- package/src/mappings/ProgressIndicator.js +180 -0
- package/src/mappings/RadioButton.js +50 -0
- package/src/mappings/RadioButtonGroup.js +16 -0
- package/src/mappings/RadioButtonRow.js +37 -0
- package/src/mappings/RowBodyIcon.js +75 -0
- package/src/mappings/RowHeadlineImageCaption.js +167 -0
- package/src/mappings/RowHeadlineImageIcon.js +99 -0
- package/src/mappings/SafeAreaView.js +33 -0
- package/src/mappings/ScrollView.js +30 -0
- package/src/mappings/Slider.js +59 -0
- package/src/mappings/StarRating.js +42 -0
- package/src/mappings/Stepper.js +28 -0
- package/src/mappings/Surface.js +13 -0
- package/src/mappings/Swiper.js +60 -0
- package/src/mappings/SwiperItem.js +8 -0
- package/src/mappings/Switch.js +75 -0
- package/src/mappings/Text.js +227 -0
- package/src/mappings/TextArea.js +52 -0
- package/src/mappings/TextField.js +158 -0
- package/src/mappings/TextInput.js +208 -0
- package/src/mappings/ToggleButton.js +45 -0
- package/src/mappings/Touchable.js +12 -0
- package/src/mappings/Video.js +74 -0
- package/src/mappings/View.js +206 -0
- package/src/mappings/WebView.js +18 -0
- package/src/styles/DarkTheme.js +26 -0
- package/src/styles/DefaultTheme.js +111 -0
- package/src/styles/fonts.js +62 -0
- package/src/styles/overlay.js +60 -0
- package/src/styles/shadow.js +51 -0
- package/src/theming.js +3 -0
- package/src/utilities.js +54 -0
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Map Callout",
|
|
4
|
+
tag: "MapCallout",
|
|
5
|
+
packageName: "@draftbit/maps",
|
|
6
|
+
description: "An info window to display on top of a marker when it is clicked",
|
|
7
|
+
category: COMPONENT_TYPES.media,
|
|
8
|
+
layout: {},
|
|
9
|
+
props: {
|
|
10
|
+
onPress: createActionProp({
|
|
11
|
+
description: "Action to execute when the callout is pressed",
|
|
12
|
+
}),
|
|
13
|
+
showTooltip: createBoolProp({
|
|
14
|
+
label: "Show Tooltip",
|
|
15
|
+
description: 'If false, a default "tooltip" bubble window will be drawn around this callout\'s children. If true, the child views can fully customize their appearance, including any "bubble"-like styles',
|
|
16
|
+
group: GROUPS.basic,
|
|
17
|
+
defaultValue: false,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Map Marker",
|
|
4
|
+
tag: "MapMarker",
|
|
5
|
+
packageName: "@draftbit/maps",
|
|
6
|
+
description: "A marker to show inside map view",
|
|
7
|
+
category: COMPONENT_TYPES.media,
|
|
8
|
+
layout: {},
|
|
9
|
+
props: {
|
|
10
|
+
latitude: createNumberProp({
|
|
11
|
+
label: "Latitude",
|
|
12
|
+
description: "The latitude in which the marker is located",
|
|
13
|
+
required: true,
|
|
14
|
+
precision: 6,
|
|
15
|
+
min: -90,
|
|
16
|
+
max: 90,
|
|
17
|
+
}),
|
|
18
|
+
longitude: createNumberProp({
|
|
19
|
+
label: "Longitude",
|
|
20
|
+
description: "The longitude in which the marker is located",
|
|
21
|
+
required: true,
|
|
22
|
+
precision: 6,
|
|
23
|
+
min: -180,
|
|
24
|
+
max: 180,
|
|
25
|
+
}),
|
|
26
|
+
title: createTextProp({
|
|
27
|
+
label: "Title",
|
|
28
|
+
description: "Title to show along with the marker",
|
|
29
|
+
defaultValue: null,
|
|
30
|
+
}),
|
|
31
|
+
description: createTextProp({
|
|
32
|
+
label: "Description",
|
|
33
|
+
description: "Optional description for the marker",
|
|
34
|
+
defaultValue: null,
|
|
35
|
+
}),
|
|
36
|
+
flat: createBoolProp({
|
|
37
|
+
label: "Flat",
|
|
38
|
+
description: "Sets whether this marker should be flat against the map (if true) or a billboard facing the camera (if false)",
|
|
39
|
+
group: GROUPS.basic,
|
|
40
|
+
defaultValue: false,
|
|
41
|
+
}),
|
|
42
|
+
pinColor: createColorProp({
|
|
43
|
+
label: "Pin Color",
|
|
44
|
+
description: "Sets the color of the marker",
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Map View",
|
|
4
|
+
tag: "MapView",
|
|
5
|
+
packageName: "@draftbit/maps",
|
|
6
|
+
description: "A map view",
|
|
7
|
+
category: COMPONENT_TYPES.media,
|
|
8
|
+
layout: {
|
|
9
|
+
height: "100%",
|
|
10
|
+
width: "100%",
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
provider: {
|
|
14
|
+
formType: FORM_TYPES.flatArray,
|
|
15
|
+
propType: PROP_TYPES.STRING,
|
|
16
|
+
editable: true,
|
|
17
|
+
group: GROUPS.basic,
|
|
18
|
+
label: "Provider",
|
|
19
|
+
description: "The maps provider",
|
|
20
|
+
required: false,
|
|
21
|
+
defaultValue: null,
|
|
22
|
+
options: ["google"],
|
|
23
|
+
},
|
|
24
|
+
latitude: createNumberProp({
|
|
25
|
+
label: "Initial Latitude",
|
|
26
|
+
description: "The longitude for the map's initial region",
|
|
27
|
+
required: false,
|
|
28
|
+
precision: 6,
|
|
29
|
+
min: -90,
|
|
30
|
+
max: 90,
|
|
31
|
+
defaultValue: 37.40241,
|
|
32
|
+
}),
|
|
33
|
+
longitude: createNumberProp({
|
|
34
|
+
label: "Initial Longitude",
|
|
35
|
+
description: "The longitude for the map's initial region",
|
|
36
|
+
required: false,
|
|
37
|
+
precision: 6,
|
|
38
|
+
min: -180,
|
|
39
|
+
max: 180,
|
|
40
|
+
defaultValue: -122.12125,
|
|
41
|
+
}),
|
|
42
|
+
latitudeDelta: createNumberProp({
|
|
43
|
+
label: "Init Latitude Delta",
|
|
44
|
+
description: "The latitude delta for the map's initial region",
|
|
45
|
+
required: false,
|
|
46
|
+
precision: 4,
|
|
47
|
+
defaultValue: 1,
|
|
48
|
+
group: GROUPS.basic,
|
|
49
|
+
}),
|
|
50
|
+
longitudeDelta: createNumberProp({
|
|
51
|
+
label: "Init Longitude Delta",
|
|
52
|
+
description: "The longitude delta for the map's initial region",
|
|
53
|
+
required: false,
|
|
54
|
+
precision: 4,
|
|
55
|
+
defaultValue: 1,
|
|
56
|
+
group: GROUPS.basic,
|
|
57
|
+
}),
|
|
58
|
+
zoom: createNumberProp({
|
|
59
|
+
label: "Initial Zoom (Web)",
|
|
60
|
+
description: "The initial zoom of the map",
|
|
61
|
+
required: true,
|
|
62
|
+
precision: 0,
|
|
63
|
+
step: 1,
|
|
64
|
+
defaultValue: 8,
|
|
65
|
+
group: GROUPS.basic,
|
|
66
|
+
}),
|
|
67
|
+
mapType: {
|
|
68
|
+
label: "Map Type",
|
|
69
|
+
description: "The type of map to show",
|
|
70
|
+
group: GROUPS.basic,
|
|
71
|
+
formType: FORM_TYPES.flatArray,
|
|
72
|
+
propType: PROP_TYPES.STRING,
|
|
73
|
+
required: false,
|
|
74
|
+
defaultValue: null,
|
|
75
|
+
options: [
|
|
76
|
+
"standard",
|
|
77
|
+
"satellite",
|
|
78
|
+
"hybrid",
|
|
79
|
+
"terrain",
|
|
80
|
+
"none",
|
|
81
|
+
"mutedStandard",
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
zoomEnabled: createBoolProp({
|
|
85
|
+
label: "Zoom Enabled",
|
|
86
|
+
description: "Whether zooming is enabled (native only)",
|
|
87
|
+
group: GROUPS.basic,
|
|
88
|
+
required: false,
|
|
89
|
+
defaultValue: true,
|
|
90
|
+
}),
|
|
91
|
+
showsCompass: createBoolProp({
|
|
92
|
+
label: "Shows Compass",
|
|
93
|
+
description: "Whether compass is shown",
|
|
94
|
+
group: GROUPS.basic,
|
|
95
|
+
required: false,
|
|
96
|
+
defaultValue: false,
|
|
97
|
+
}),
|
|
98
|
+
rotateEnabled: createBoolProp({
|
|
99
|
+
label: "Rotate Enabled",
|
|
100
|
+
description: "Whether rotating the map is enabled",
|
|
101
|
+
group: GROUPS.basic,
|
|
102
|
+
required: false,
|
|
103
|
+
defaultValue: true,
|
|
104
|
+
}),
|
|
105
|
+
scrollEnabled: createBoolProp({
|
|
106
|
+
label: "Scroll Enabled",
|
|
107
|
+
description: "Whether scrolling the map view is enabled",
|
|
108
|
+
group: GROUPS.basic,
|
|
109
|
+
required: false,
|
|
110
|
+
defaultValue: true,
|
|
111
|
+
}),
|
|
112
|
+
loadingEnabled: createBoolProp({
|
|
113
|
+
label: "Loading Enabled",
|
|
114
|
+
description: "If true a loading indicator will show while the map is loading",
|
|
115
|
+
group: GROUPS.basic,
|
|
116
|
+
required: false,
|
|
117
|
+
defaultValue: true,
|
|
118
|
+
}),
|
|
119
|
+
loadingIndicatorColor: createColorProp({
|
|
120
|
+
label: "Loading Indicator Color",
|
|
121
|
+
description: "Color of the loading indicator",
|
|
122
|
+
}),
|
|
123
|
+
loadingBackgroundColor: createColorProp({
|
|
124
|
+
label: "Loading BG Color",
|
|
125
|
+
description: "Color of the background to show while the map is loading",
|
|
126
|
+
}),
|
|
127
|
+
apiKey: createTextProp({
|
|
128
|
+
defaultValue: process.env.GOOGLE_MAPS_API_KEY,
|
|
129
|
+
editable: false,
|
|
130
|
+
}),
|
|
131
|
+
},
|
|
132
|
+
};
|
package/src/mappings/MapView.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
createBoolProp,
|
|
4
4
|
createColorProp,
|
|
5
5
|
createNumberProp,
|
|
6
|
+
createTextProp,
|
|
6
7
|
GROUPS,
|
|
7
8
|
FORM_TYPES,
|
|
8
9
|
PROP_TYPES,
|
|
@@ -54,6 +55,7 @@ export const SEED_DATA = {
|
|
|
54
55
|
required: false,
|
|
55
56
|
precision: 4,
|
|
56
57
|
defaultValue: 1,
|
|
58
|
+
group: GROUPS.basic,
|
|
57
59
|
}),
|
|
58
60
|
longitudeDelta: createNumberProp({
|
|
59
61
|
label: "Init Longitude Delta",
|
|
@@ -61,6 +63,7 @@ export const SEED_DATA = {
|
|
|
61
63
|
required: false,
|
|
62
64
|
precision: 4,
|
|
63
65
|
defaultValue: 1,
|
|
66
|
+
group: GROUPS.basic,
|
|
64
67
|
}),
|
|
65
68
|
zoom: createNumberProp({
|
|
66
69
|
label: "Initial Zoom (Web)",
|
|
@@ -69,6 +72,7 @@ export const SEED_DATA = {
|
|
|
69
72
|
precision: 0,
|
|
70
73
|
step: 1,
|
|
71
74
|
defaultValue: 8,
|
|
75
|
+
group: GROUPS.basic,
|
|
72
76
|
}),
|
|
73
77
|
mapType: {
|
|
74
78
|
label: "Map Type",
|
|
@@ -128,8 +132,12 @@ export const SEED_DATA = {
|
|
|
128
132
|
description: "Color of the loading indicator",
|
|
129
133
|
}),
|
|
130
134
|
loadingBackgroundColor: createColorProp({
|
|
131
|
-
label: "Loading
|
|
135
|
+
label: "Loading BG Color",
|
|
132
136
|
description: "Color of the background to show while the map is loading",
|
|
133
137
|
}),
|
|
138
|
+
apiKey: createTextProp({
|
|
139
|
+
defaultValue: process.env.GOOGLE_MAPS_API_KEY,
|
|
140
|
+
editable: false,
|
|
141
|
+
}),
|
|
134
142
|
},
|
|
135
143
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createBoolProp, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Modal",
|
|
4
|
+
tag: "Modal",
|
|
5
|
+
description: "A basic Modal Component",
|
|
6
|
+
category: COMPONENT_TYPES.container,
|
|
7
|
+
props: {
|
|
8
|
+
animationType: {
|
|
9
|
+
group: GROUPS.basic,
|
|
10
|
+
label: "Animation Type",
|
|
11
|
+
description: "Animation Type",
|
|
12
|
+
options: ["slide", "fade", "none"],
|
|
13
|
+
editable: true,
|
|
14
|
+
required: false,
|
|
15
|
+
formType: FORM_TYPES.flatArray,
|
|
16
|
+
propType: PROP_TYPES.STRING,
|
|
17
|
+
defaultValue: "none",
|
|
18
|
+
},
|
|
19
|
+
transparent: createBoolProp({
|
|
20
|
+
group: GROUPS.basic,
|
|
21
|
+
label: "Transparent",
|
|
22
|
+
description: "Determines whether the modal will fill the entire view. Setting this to true will render the modal over a transparent background",
|
|
23
|
+
}),
|
|
24
|
+
visible: createBoolProp({
|
|
25
|
+
group: GROUPS.data,
|
|
26
|
+
label: "Visible",
|
|
27
|
+
description: "Determines whether the modal is visible",
|
|
28
|
+
}),
|
|
29
|
+
presentationStyle: {
|
|
30
|
+
group: GROUPS.basic,
|
|
31
|
+
label: "Presentation Style",
|
|
32
|
+
description: "Presentation Style",
|
|
33
|
+
options: ["fullScreen", "pageSheet", "formSheet", "overFullScreen"],
|
|
34
|
+
editable: true,
|
|
35
|
+
required: false,
|
|
36
|
+
formType: FORM_TYPES.flatArray,
|
|
37
|
+
propType: PROP_TYPES.STRING,
|
|
38
|
+
defaultValue: null,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, Triggers, GROUPS, FORM_TYPES, PROP_TYPES, FIELD_NAME, } from "@draftbit/types";
|
|
2
|
+
const SEED_DATA_PROPS = {
|
|
3
|
+
label: {
|
|
4
|
+
group: GROUPS.data,
|
|
5
|
+
label: "Label",
|
|
6
|
+
description: "The label to be displayed on the picker",
|
|
7
|
+
formType: FORM_TYPES.string,
|
|
8
|
+
propType: PROP_TYPES.STRING,
|
|
9
|
+
defaultValue: null,
|
|
10
|
+
editable: true,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
placeholder: {
|
|
14
|
+
group: GROUPS.basic,
|
|
15
|
+
label: "Placeholder",
|
|
16
|
+
description: "The placeholder text of the picker",
|
|
17
|
+
formType: FORM_TYPES.string,
|
|
18
|
+
propType: PROP_TYPES.STRING,
|
|
19
|
+
defaultValue: "Select an option",
|
|
20
|
+
editable: true,
|
|
21
|
+
required: false,
|
|
22
|
+
},
|
|
23
|
+
placeholderTextColor: {
|
|
24
|
+
group: GROUPS.basic,
|
|
25
|
+
label: "Placeholder Text Color",
|
|
26
|
+
description: "The color of the placeholder text.",
|
|
27
|
+
editable: true,
|
|
28
|
+
required: false,
|
|
29
|
+
defaultValue: null,
|
|
30
|
+
formType: FORM_TYPES.color,
|
|
31
|
+
propType: PROP_TYPES.STRING,
|
|
32
|
+
},
|
|
33
|
+
assistiveText: {
|
|
34
|
+
group: GROUPS.basic,
|
|
35
|
+
label: "Assistive text",
|
|
36
|
+
description: "Helper text to display below the picker",
|
|
37
|
+
formType: FORM_TYPES.string,
|
|
38
|
+
propType: PROP_TYPES.STRING,
|
|
39
|
+
defaultValue: null,
|
|
40
|
+
editable: true,
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
options: {
|
|
44
|
+
group: GROUPS.data,
|
|
45
|
+
label: "Options",
|
|
46
|
+
description: "Array of picker options. An array of objects containing a label and value.",
|
|
47
|
+
editable: true,
|
|
48
|
+
required: false,
|
|
49
|
+
formType: FORM_TYPES.array,
|
|
50
|
+
propType: PROP_TYPES.OBJECT,
|
|
51
|
+
options: [],
|
|
52
|
+
defaultValue: null,
|
|
53
|
+
},
|
|
54
|
+
disabled: {
|
|
55
|
+
group: GROUPS.basic,
|
|
56
|
+
label: "Disabled",
|
|
57
|
+
description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
58
|
+
formType: FORM_TYPES.boolean,
|
|
59
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
60
|
+
defaultValue: false,
|
|
61
|
+
editable: true,
|
|
62
|
+
required: false,
|
|
63
|
+
},
|
|
64
|
+
error: {
|
|
65
|
+
group: GROUPS.data,
|
|
66
|
+
label: "Error",
|
|
67
|
+
description: "Whether the picker should display the error state",
|
|
68
|
+
formType: FORM_TYPES.boolean,
|
|
69
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
70
|
+
defaultValue: false,
|
|
71
|
+
editable: true,
|
|
72
|
+
required: false,
|
|
73
|
+
},
|
|
74
|
+
leftIconName: {
|
|
75
|
+
group: GROUPS.basic,
|
|
76
|
+
label: "Left icon name",
|
|
77
|
+
description: "The icon to display on the left",
|
|
78
|
+
formType: FORM_TYPES.icon,
|
|
79
|
+
propType: PROP_TYPES.ASSET,
|
|
80
|
+
defaultValue: null,
|
|
81
|
+
editable: true,
|
|
82
|
+
required: false,
|
|
83
|
+
},
|
|
84
|
+
leftIconMode: {
|
|
85
|
+
group: GROUPS.basic,
|
|
86
|
+
label: "Left icon mode",
|
|
87
|
+
description: "The mode of the icon to display on the left. 'inset' or 'outset'.",
|
|
88
|
+
formType: FORM_TYPES.flatArray,
|
|
89
|
+
propType: PROP_TYPES.STRING,
|
|
90
|
+
defaultValue: "inset",
|
|
91
|
+
options: ["inset", "outset"],
|
|
92
|
+
editable: true,
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
rightIconName: {
|
|
96
|
+
group: GROUPS.basic,
|
|
97
|
+
label: "Right icon name",
|
|
98
|
+
description: "The icon to display on the right",
|
|
99
|
+
formType: FORM_TYPES.icon,
|
|
100
|
+
propType: PROP_TYPES.ASSET,
|
|
101
|
+
defaultValue: null,
|
|
102
|
+
editable: true,
|
|
103
|
+
required: false,
|
|
104
|
+
},
|
|
105
|
+
fieldName: {
|
|
106
|
+
...FIELD_NAME,
|
|
107
|
+
defaultValue: "pickerValue",
|
|
108
|
+
handlerPropName: "onValueChange",
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
|
|
112
|
+
export const SEED_DATA = [
|
|
113
|
+
{
|
|
114
|
+
name: "Picker",
|
|
115
|
+
tag: "Picker",
|
|
116
|
+
description: "A component used to pick a value from a set of options",
|
|
117
|
+
category: COMPONENT_TYPES.input,
|
|
118
|
+
preview_image_url: "{CLOUDINARY_URL}/Picker.png",
|
|
119
|
+
supports_list_render: false,
|
|
120
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
121
|
+
props: {
|
|
122
|
+
...SEED_DATA_PROPS,
|
|
123
|
+
type: {
|
|
124
|
+
label: "Appearance",
|
|
125
|
+
description: "Type of Picker",
|
|
126
|
+
formType: FORM_TYPES.flatArray,
|
|
127
|
+
propType: PROP_TYPES.STRING,
|
|
128
|
+
defaultValue: "solid",
|
|
129
|
+
options: ["solid", "underline"],
|
|
130
|
+
editable: true,
|
|
131
|
+
required: true,
|
|
132
|
+
group: GROUPS.basic,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
layout: {},
|
|
136
|
+
},
|
|
137
|
+
];
|