@draftbit/core 46.1.4-e6469c.0 → 46.1.4
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/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -20
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Justification.js +0 -3
- package/lib/commonjs/components/Picker/PickerComponent.android.js +135 -0
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +161 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js +136 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerTypes.js +6 -0
- package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -0
- package/lib/commonjs/components/ResizeMode.js +0 -3
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/module/components/Justification.js +1 -1
- package/lib/module/components/Picker/PickerComponent.android.js +112 -0
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.ios.js +135 -0
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.web.js +113 -0
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/module/components/Picker/PickerTypes.js +2 -0
- package/lib/module/components/Picker/PickerTypes.js.map +1 -0
- package/lib/module/components/ResizeMode.js +1 -1
- package/lib/module/components/Touchable.js +2 -16
- package/lib/module/components/Touchable.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +7 -0
- package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerTypes.d.ts +18 -0
- package/package.json +3 -3
- package/src/components/Picker/PickerComponent.android.tsx +116 -0
- package/src/components/Picker/PickerComponent.ios.tsx +142 -0
- package/src/components/Picker/PickerComponent.web.tsx +117 -0
- package/src/components/Picker/PickerTypes.ts +18 -0
- package/src/Provider.js +0 -9
- package/src/components/Accordion/AccordionGroup.js +0 -44
- package/src/components/Accordion/AccordionItem.js +0 -32
- package/src/components/Accordion/index.js +0 -2
- package/src/components/ActionSheet/ActionSheet.js +0 -45
- package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
- package/src/components/ActionSheet/ActionSheetItem.js +0 -30
- package/src/components/ActionSheet/index.js +0 -3
- package/src/components/AnimatedCircularProgress.js +0 -43
- package/src/components/AspectRatio.js +0 -18
- package/src/components/AvatarEdit.js +0 -30
- package/src/components/Banner.js +0 -109
- package/src/components/Button.js +0 -112
- package/src/components/Card.js +0 -57
- package/src/components/CardBlock.js +0 -54
- package/src/components/CardContainer.js +0 -69
- package/src/components/CardContainerRating.js +0 -79
- package/src/components/CardContainerShortImage.js +0 -33
- package/src/components/CardInline.js +0 -36
- package/src/components/Carousel.js +0 -66
- package/src/components/Checkbox/Checkbox.js +0 -63
- package/src/components/Checkbox/CheckboxGroup.js +0 -21
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
- package/src/components/Checkbox/CheckboxRow.js +0 -78
- package/src/components/Checkbox/context.js +0 -14
- package/src/components/Checkbox/index.js +0 -3
- package/src/components/CircleImage.js +0 -8
- package/src/components/CircularProgress.js +0 -78
- package/src/components/Config.js +0 -63
- package/src/components/Container.js +0 -43
- package/src/components/DatePicker/DatePicker.js +0 -368
- package/src/components/DatePicker/DatePickerComponent.js +0 -13
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
- package/src/components/DatePicker/DatePickerComponentType.js +0 -1
- package/src/components/DeprecatedButton.js +0 -95
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedFAB.js +0 -115
- package/src/components/Divider.js +0 -13
- package/src/components/Elevation.js +0 -20
- package/src/components/FAB.js +0 -46
- package/src/components/FieldSearchBarFull.js +0 -53
- package/src/components/FormRow.js +0 -19
- package/src/components/Header.js +0 -44
- package/src/components/HeaderLarge.js +0 -7
- package/src/components/HeaderMedium.js +0 -7
- package/src/components/HeaderOverline.js +0 -7
- package/src/components/IconButton.js +0 -35
- package/src/components/Image.js +0 -47
- package/src/components/Justification.js +0 -1
- package/src/components/Layout.js +0 -50
- package/src/components/NumberInput.js +0 -49
- package/src/components/Picker/Picker.js +0 -267
- package/src/components/Portal/Portal.js +0 -35
- package/src/components/Portal/PortalConsumer.js +0 -28
- package/src/components/Portal/PortalHost.js +0 -105
- package/src/components/Portal/PortalManager.js +0 -29
- package/src/components/ProgressBar.js +0 -118
- package/src/components/ProgressCircle.js +0 -13
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/RadioButton/RadioButton.js +0 -17
- package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
- package/src/components/RadioButton/RadioButtonGroup.js +0 -43
- package/src/components/RadioButton/RadioButtonRow.js +0 -76
- package/src/components/RadioButton/context.js +0 -14
- package/src/components/RadioButton/index.js +0 -4
- package/src/components/ResizeMode.js +0 -1
- package/src/components/Row.js +0 -48
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/ScreenContainer.js +0 -34
- package/src/components/Slider.js +0 -63
- package/src/components/StarRating.js +0 -50
- package/src/components/StepIndicator.js +0 -346
- package/src/components/Stepper.js +0 -39
- package/src/components/Surface.js +0 -32
- package/src/components/Swiper/Swiper.js +0 -29
- package/src/components/Swiper/SwiperItem.js +0 -9
- package/src/components/Swiper/index.js +0 -2
- package/src/components/Switch.js +0 -56
- package/src/components/Text.js +0 -28
- package/src/components/TextField.js +0 -420
- package/src/components/ToggleButton.js +0 -39
- package/src/components/Touchable.js +0 -12
- package/src/components/Touchable.web.js +0 -2
- package/src/components/Typography.js +0 -36
- package/src/components/useAuthState.js +0 -31
- package/src/constants.js +0 -10
- package/src/hooks.js +0 -12
- package/src/index.js +0 -52
- package/src/interfaces/Icon.js +0 -8
- package/src/mappings/Accordion.js +0 -41
- package/src/mappings/AccordionItem.js +0 -16
- package/src/mappings/ActionSheet.js +0 -13
- package/src/mappings/ActionSheetCancel.js +0 -19
- package/src/mappings/ActionSheetItem.js +0 -23
- package/src/mappings/ActivityIndicator.js +0 -53
- package/src/mappings/AudioPlayer.js +0 -20
- package/src/mappings/AvatarEdit.js +0 -37
- package/src/mappings/Banner.js +0 -32
- package/src/mappings/BlurView.js +0 -41
- package/src/mappings/Button.js +0 -56
- package/src/mappings/Card.js +0 -52
- package/src/mappings/CardBlock.js +0 -122
- package/src/mappings/CardContainer.js +0 -102
- package/src/mappings/CardContainerRating.js +0 -124
- package/src/mappings/CardContainerShortImage.js +0 -118
- package/src/mappings/CardInline.js +0 -51
- package/src/mappings/Carousel.js +0 -18
- package/src/mappings/Checkbox.js +0 -45
- package/src/mappings/CheckboxGroup.js +0 -25
- package/src/mappings/CheckboxRow.js +0 -56
- package/src/mappings/CircleImage.js +0 -24
- package/src/mappings/Container.js +0 -29
- package/src/mappings/CustomCode.js +0 -8
- package/src/mappings/DatePicker.js +0 -147
- package/src/mappings/Divider.js +0 -26
- package/src/mappings/FAB.js +0 -36
- package/src/mappings/Fetch.js +0 -12
- package/src/mappings/FieldSearchBarFull.js +0 -49
- package/src/mappings/FlatList.js +0 -19
- package/src/mappings/HeaderLarge.js +0 -28
- package/src/mappings/HeaderMedium.js +0 -54
- package/src/mappings/HeaderOverline.js +0 -54
- package/src/mappings/Icon.js +0 -25
- package/src/mappings/IconButton.js +0 -30
- package/src/mappings/Image.js +0 -15
- package/src/mappings/ImageBackground.js +0 -28
- package/src/mappings/KeyboardAvoidingView.js +0 -40
- package/src/mappings/KeyboardAwareScrollView.js +0 -49
- package/src/mappings/Layout.js +0 -195
- package/src/mappings/LinearGradient.js +0 -77
- package/src/mappings/MapCallout.js +0 -21
- package/src/mappings/MapMarker.js +0 -47
- package/src/mappings/MapView.js +0 -138
- package/src/mappings/Modal.js +0 -41
- package/src/mappings/Picker.js +0 -139
- package/src/mappings/ProgressBar.js +0 -100
- package/src/mappings/ProgressCircle.js +0 -108
- package/src/mappings/ProgressIndicator.js +0 -180
- package/src/mappings/RadioButton.js +0 -50
- package/src/mappings/RadioButtonGroup.js +0 -16
- package/src/mappings/RadioButtonRow.js +0 -37
- package/src/mappings/RowBodyIcon.js +0 -75
- package/src/mappings/RowHeadlineImageCaption.js +0 -167
- package/src/mappings/RowHeadlineImageIcon.js +0 -99
- package/src/mappings/SafeAreaView.js +0 -33
- package/src/mappings/ScrollView.js +0 -30
- package/src/mappings/Slider.js +0 -59
- package/src/mappings/StarRating.js +0 -42
- package/src/mappings/Stepper.js +0 -28
- package/src/mappings/Surface.js +0 -13
- package/src/mappings/Swiper.js +0 -60
- package/src/mappings/SwiperItem.js +0 -8
- package/src/mappings/Switch.js +0 -75
- package/src/mappings/Text.js +0 -232
- package/src/mappings/TextArea.js +0 -52
- package/src/mappings/TextField.js +0 -158
- package/src/mappings/TextInput.js +0 -208
- package/src/mappings/ToggleButton.js +0 -45
- package/src/mappings/Touchable.js +0 -12
- package/src/mappings/Video.js +0 -74
- package/src/mappings/View.js +0 -206
- package/src/mappings/WebView.js +0 -18
- package/src/styles/DarkTheme.js +0 -26
- package/src/styles/DefaultTheme.js +0 -111
- package/src/styles/fonts.js +0 -62
- package/src/styles/overlay.js +0 -60
- package/src/styles/shadow.js +0 -51
- package/src/theming.js +0 -3
- package/src/utilities.js +0 -102
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, TEXT_INPUT_PROPS, Triggers, createColorProp, createNumberProp, createFieldNameProp, } from "@draftbit/types";
|
|
2
|
-
const SEED_DATA_PROPS = {
|
|
3
|
-
...TEXT_INPUT_PROPS,
|
|
4
|
-
label: {
|
|
5
|
-
group: GROUPS.data,
|
|
6
|
-
label: "Label",
|
|
7
|
-
description: "The label to be displayed on the text field",
|
|
8
|
-
formType: FORM_TYPES.string,
|
|
9
|
-
propType: PROP_TYPES.STRING,
|
|
10
|
-
defaultValue: null,
|
|
11
|
-
editable: true,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
assistiveText: {
|
|
15
|
-
group: GROUPS.basic,
|
|
16
|
-
label: "Assistive text",
|
|
17
|
-
description: "Helper text to display below the input",
|
|
18
|
-
formType: FORM_TYPES.string,
|
|
19
|
-
propType: PROP_TYPES.STRING,
|
|
20
|
-
defaultValue: null,
|
|
21
|
-
editable: true,
|
|
22
|
-
required: false,
|
|
23
|
-
},
|
|
24
|
-
error: {
|
|
25
|
-
group: GROUPS.data,
|
|
26
|
-
label: "Error",
|
|
27
|
-
description: "Whether the input should display the error state",
|
|
28
|
-
formType: FORM_TYPES.boolean,
|
|
29
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
30
|
-
defaultValue: null,
|
|
31
|
-
editable: true,
|
|
32
|
-
required: false,
|
|
33
|
-
},
|
|
34
|
-
leftIconName: {
|
|
35
|
-
group: GROUPS.basic,
|
|
36
|
-
label: "Left icon name",
|
|
37
|
-
description: "The icon to display on the left",
|
|
38
|
-
formType: FORM_TYPES.icon,
|
|
39
|
-
propType: PROP_TYPES.ASSET,
|
|
40
|
-
defaultValue: null,
|
|
41
|
-
editable: true,
|
|
42
|
-
required: false,
|
|
43
|
-
},
|
|
44
|
-
leftIconMode: {
|
|
45
|
-
group: GROUPS.basic,
|
|
46
|
-
label: "Left icon mode",
|
|
47
|
-
description: "The mode of the icon to display on the left. 'inset' or 'outset'.",
|
|
48
|
-
formType: FORM_TYPES.flatArray,
|
|
49
|
-
propType: PROP_TYPES.STRING,
|
|
50
|
-
defaultValue: null /* inset */,
|
|
51
|
-
options: ["inset", "outset"],
|
|
52
|
-
editable: true,
|
|
53
|
-
required: true,
|
|
54
|
-
},
|
|
55
|
-
rightIconName: {
|
|
56
|
-
group: GROUPS.basic,
|
|
57
|
-
label: "Right icon name",
|
|
58
|
-
description: "The icon to display on the right",
|
|
59
|
-
formType: FORM_TYPES.icon,
|
|
60
|
-
propType: PROP_TYPES.ASSET,
|
|
61
|
-
defaultValue: null,
|
|
62
|
-
editable: true,
|
|
63
|
-
required: false,
|
|
64
|
-
},
|
|
65
|
-
fieldName: {
|
|
66
|
-
...FIELD_NAME,
|
|
67
|
-
handlerPropName: "onChangeText",
|
|
68
|
-
defaultValue: "textFieldValue",
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnChangeText];
|
|
72
|
-
export const SEED_DATA = [
|
|
73
|
-
{
|
|
74
|
-
name: "Styled Text Field",
|
|
75
|
-
tag: "TextField",
|
|
76
|
-
description: "A text input with a solid border or underline",
|
|
77
|
-
category: COMPONENT_TYPES.input,
|
|
78
|
-
preview_image_url: "{CLOUDINARY_URL}/Textfield.png",
|
|
79
|
-
supports_list_render: false,
|
|
80
|
-
triggers: SEED_DATA_TRIGGERS,
|
|
81
|
-
props: {
|
|
82
|
-
...SEED_DATA_PROPS,
|
|
83
|
-
type: {
|
|
84
|
-
label: "Appearance",
|
|
85
|
-
description: "Type of Datepicker",
|
|
86
|
-
formType: FORM_TYPES.flatArray,
|
|
87
|
-
propType: PROP_TYPES.STRING,
|
|
88
|
-
defaultValue: "solid",
|
|
89
|
-
options: ["solid", "underline"],
|
|
90
|
-
editable: true,
|
|
91
|
-
required: true,
|
|
92
|
-
group: GROUPS.basic,
|
|
93
|
-
},
|
|
94
|
-
underlineColor: createColorProp({
|
|
95
|
-
label: "Underline Color",
|
|
96
|
-
defaultValue: "light",
|
|
97
|
-
}),
|
|
98
|
-
secureTextEntry: {
|
|
99
|
-
group: GROUPS.basic,
|
|
100
|
-
label: "Password field",
|
|
101
|
-
description: "If true, this turns the field into a password field, hiding the text",
|
|
102
|
-
formType: FORM_TYPES.boolean,
|
|
103
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
104
|
-
defaultValue: null,
|
|
105
|
-
editable: true,
|
|
106
|
-
required: false,
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
layout: {},
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: "Styled Text Area",
|
|
113
|
-
tag: "TextField",
|
|
114
|
-
description: "A text area with a solid border or underline",
|
|
115
|
-
category: COMPONENT_TYPES.input,
|
|
116
|
-
preview_image_url: "{CLOUDINARY_URL}/TextArea.png",
|
|
117
|
-
supports_list_render: false,
|
|
118
|
-
triggers: SEED_DATA_TRIGGERS,
|
|
119
|
-
props: {
|
|
120
|
-
...SEED_DATA_PROPS,
|
|
121
|
-
placeholder: {
|
|
122
|
-
...TEXT_INPUT_PROPS.placeholder,
|
|
123
|
-
defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
|
|
124
|
-
},
|
|
125
|
-
type: {
|
|
126
|
-
label: "Appearance",
|
|
127
|
-
description: "Type of Datepicker",
|
|
128
|
-
formType: FORM_TYPES.flatArray,
|
|
129
|
-
propType: PROP_TYPES.STRING,
|
|
130
|
-
defaultValue: "solid",
|
|
131
|
-
options: ["solid", "underline"],
|
|
132
|
-
editable: true,
|
|
133
|
-
required: true,
|
|
134
|
-
group: GROUPS.basic,
|
|
135
|
-
},
|
|
136
|
-
multiline: {
|
|
137
|
-
label: "Multiline",
|
|
138
|
-
description: "Multiline",
|
|
139
|
-
group: GROUPS.uncategorized,
|
|
140
|
-
formType: FORM_TYPES.boolean,
|
|
141
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
142
|
-
defaultValue: true,
|
|
143
|
-
editable: false,
|
|
144
|
-
required: false,
|
|
145
|
-
},
|
|
146
|
-
numberOfLines: createNumberProp({
|
|
147
|
-
label: "Number of Lines",
|
|
148
|
-
description: "Number of Lines for Multiline Field",
|
|
149
|
-
defaultValue: 4,
|
|
150
|
-
group: GROUPS.basic,
|
|
151
|
-
}),
|
|
152
|
-
fieldName: createFieldNameProp({
|
|
153
|
-
defaultValue: "textAreaValue",
|
|
154
|
-
}),
|
|
155
|
-
},
|
|
156
|
-
layout: {},
|
|
157
|
-
},
|
|
158
|
-
];
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, TEXT_INPUT_PROPS, NUMBER_INPUT_PROPS, Triggers, createFieldNameProp, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA_PROPS = {
|
|
3
|
-
style: {
|
|
4
|
-
group: GROUPS.basic,
|
|
5
|
-
label: "Style",
|
|
6
|
-
description: "Text Style",
|
|
7
|
-
editable: false,
|
|
8
|
-
required: false,
|
|
9
|
-
formType: FORM_TYPES.typeStyle,
|
|
10
|
-
propType: PROP_TYPES.THEME,
|
|
11
|
-
defaultValue: null,
|
|
12
|
-
},
|
|
13
|
-
clearButtonMode: {
|
|
14
|
-
group: GROUPS.basic,
|
|
15
|
-
label: "Clear Button Mode",
|
|
16
|
-
description: "Enables a button within the textInput to clear the data entered",
|
|
17
|
-
editable: true,
|
|
18
|
-
required: false,
|
|
19
|
-
options: ["never", "while-editing", "unless-editing", "always"],
|
|
20
|
-
defaultValue: null,
|
|
21
|
-
formType: FORM_TYPES.flatArray,
|
|
22
|
-
propType: PROP_TYPES.STRING,
|
|
23
|
-
},
|
|
24
|
-
clearTextOnFocus: {
|
|
25
|
-
group: GROUPS.basic,
|
|
26
|
-
label: "Clear Text on Focus",
|
|
27
|
-
description: "If true, clears the text field automatically when its focused.",
|
|
28
|
-
editable: true,
|
|
29
|
-
required: false,
|
|
30
|
-
defaultValue: null,
|
|
31
|
-
formType: FORM_TYPES.boolean,
|
|
32
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
33
|
-
},
|
|
34
|
-
enablesReturnKeyAutomatically: {
|
|
35
|
-
group: GROUPS.basic,
|
|
36
|
-
label: "Enables Return Key Automatically",
|
|
37
|
-
description: "If true, the keyboard disables the return key when there is no text and automatically enables it when there is (Default: false)",
|
|
38
|
-
editable: true,
|
|
39
|
-
required: false,
|
|
40
|
-
defaultValue: null,
|
|
41
|
-
formType: FORM_TYPES.boolean,
|
|
42
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
43
|
-
},
|
|
44
|
-
underlineColorAndroid: {
|
|
45
|
-
group: GROUPS.basic,
|
|
46
|
-
label: "Underline color",
|
|
47
|
-
description: "(Android Only) The color of the underline(the line underneath the text when finished typing.",
|
|
48
|
-
editable: true,
|
|
49
|
-
required: false,
|
|
50
|
-
defaultValue: null,
|
|
51
|
-
formType: FORM_TYPES.color,
|
|
52
|
-
propType: PROP_TYPES.THEME,
|
|
53
|
-
},
|
|
54
|
-
fieldName: {
|
|
55
|
-
...FIELD_NAME,
|
|
56
|
-
defaultValue: "textInputValue",
|
|
57
|
-
handlerPropName: "onChangeText",
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
export const SEED_DATA = [
|
|
61
|
-
{
|
|
62
|
-
name: "Text Input",
|
|
63
|
-
tag: "TextInput",
|
|
64
|
-
description: "An input field that allows users to type in data.",
|
|
65
|
-
category: COMPONENT_TYPES.input,
|
|
66
|
-
preview_image_url: "https://res.cloudinary.com/altos/image/upload/draftbit/Jigsaw/TextInput.png",
|
|
67
|
-
supports_list_render: false,
|
|
68
|
-
layout: {
|
|
69
|
-
borderLeftWidth: 1,
|
|
70
|
-
borderRightWidth: 1,
|
|
71
|
-
borderTopWidth: 1,
|
|
72
|
-
borderBottomWidth: 1,
|
|
73
|
-
borderColor: "divider",
|
|
74
|
-
paddingLeft: 8,
|
|
75
|
-
paddingRight: 8,
|
|
76
|
-
paddingTop: 8,
|
|
77
|
-
paddingBottom: 8,
|
|
78
|
-
borderRadius: 8,
|
|
79
|
-
},
|
|
80
|
-
triggers: [Triggers.OnChangeText],
|
|
81
|
-
props: {
|
|
82
|
-
...TEXT_INPUT_PROPS,
|
|
83
|
-
...SEED_DATA_PROPS,
|
|
84
|
-
multiline: {
|
|
85
|
-
group: GROUPS.basic,
|
|
86
|
-
label: "Multiple Lines",
|
|
87
|
-
description: "Allows multiple lines of input, useful for situations where the user may be typing in a lot of data.",
|
|
88
|
-
editable: true,
|
|
89
|
-
required: false,
|
|
90
|
-
defaultValue: null,
|
|
91
|
-
formType: FORM_TYPES.boolean,
|
|
92
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
93
|
-
},
|
|
94
|
-
numberOfLines: {
|
|
95
|
-
group: GROUPS.basic,
|
|
96
|
-
label: "Number of Lines",
|
|
97
|
-
description: "Sets the number of lines for the input (Multiple Lines needs to be true)",
|
|
98
|
-
editable: true,
|
|
99
|
-
required: false,
|
|
100
|
-
defaultValue: null,
|
|
101
|
-
min: 0,
|
|
102
|
-
step: 1,
|
|
103
|
-
precision: 0,
|
|
104
|
-
formType: FORM_TYPES.number,
|
|
105
|
-
propType: PROP_TYPES.NUMBER,
|
|
106
|
-
},
|
|
107
|
-
scrollEnabled: {
|
|
108
|
-
group: GROUPS.basic,
|
|
109
|
-
label: "Scroll Enabled",
|
|
110
|
-
description: "If false, scrolling of the input will be disabled. Only works when Multiple Lines is true",
|
|
111
|
-
editable: true,
|
|
112
|
-
required: false,
|
|
113
|
-
defaultValue: null,
|
|
114
|
-
formType: FORM_TYPES.boolean,
|
|
115
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
116
|
-
},
|
|
117
|
-
spellcheck: {
|
|
118
|
-
group: GROUPS.basic,
|
|
119
|
-
label: "Disable Spell Check",
|
|
120
|
-
description: "If false, disables spell-check style (red underlines). Default comes from Auto Correct",
|
|
121
|
-
editable: true,
|
|
122
|
-
required: false,
|
|
123
|
-
defaultValue: null,
|
|
124
|
-
formType: FORM_TYPES.boolean,
|
|
125
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
126
|
-
},
|
|
127
|
-
textContentType: {
|
|
128
|
-
group: GROUPS.advanced,
|
|
129
|
-
label: "Text Content Type",
|
|
130
|
-
description: "Give the keyboard and system about what it should do with the input. For example, if its an address, autofill from address book",
|
|
131
|
-
editable: true,
|
|
132
|
-
required: false,
|
|
133
|
-
defaultValue: null,
|
|
134
|
-
options: [
|
|
135
|
-
"none",
|
|
136
|
-
"URL",
|
|
137
|
-
"addressCity",
|
|
138
|
-
"addressCityAndState",
|
|
139
|
-
"addressState",
|
|
140
|
-
"countryName",
|
|
141
|
-
"creditCardNumber",
|
|
142
|
-
"emailAddress",
|
|
143
|
-
"familyName",
|
|
144
|
-
"fullStreetAddress",
|
|
145
|
-
"givenName",
|
|
146
|
-
"jobTitle",
|
|
147
|
-
"location",
|
|
148
|
-
"middleName",
|
|
149
|
-
"name",
|
|
150
|
-
"namePrefix",
|
|
151
|
-
"nameSuffix",
|
|
152
|
-
"nickname",
|
|
153
|
-
"organizationName",
|
|
154
|
-
"postalCode",
|
|
155
|
-
"streetAddressLine1",
|
|
156
|
-
"streetAddressLine2",
|
|
157
|
-
"sublocality",
|
|
158
|
-
"telephoneNumber",
|
|
159
|
-
"username",
|
|
160
|
-
"password",
|
|
161
|
-
],
|
|
162
|
-
formType: FORM_TYPES.flatArray,
|
|
163
|
-
propType: PROP_TYPES.STRING,
|
|
164
|
-
},
|
|
165
|
-
textBreakStrategy: {
|
|
166
|
-
group: GROUPS.advanced,
|
|
167
|
-
label: "Text Break Strategy",
|
|
168
|
-
description: "(Android Only) Set the text break strategy. (Default: simple)",
|
|
169
|
-
editable: true,
|
|
170
|
-
required: false,
|
|
171
|
-
defaultValue: null,
|
|
172
|
-
options: ["simple", "highQuality", "balanced"],
|
|
173
|
-
formType: FORM_TYPES.flatArray,
|
|
174
|
-
propType: PROP_TYPES.STRING,
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: "Number Input",
|
|
180
|
-
tag: "NumberInput",
|
|
181
|
-
description: "An input field that allows users to type in data.",
|
|
182
|
-
category: COMPONENT_TYPES.input,
|
|
183
|
-
preview_image_url: "https://res.cloudinary.com/altos/image/upload/draftbit/Jigsaw/TextInput.png",
|
|
184
|
-
supports_list_render: false,
|
|
185
|
-
layout: {
|
|
186
|
-
borderLeftWidth: 1,
|
|
187
|
-
borderRightWidth: 1,
|
|
188
|
-
borderTopWidth: 1,
|
|
189
|
-
borderBottomWidth: 1,
|
|
190
|
-
borderColor: "divider",
|
|
191
|
-
paddingLeft: 8,
|
|
192
|
-
paddingRight: 8,
|
|
193
|
-
paddingTop: 8,
|
|
194
|
-
paddingBottom: 8,
|
|
195
|
-
borderRadius: 8,
|
|
196
|
-
},
|
|
197
|
-
triggers: [Triggers.OnChangeText],
|
|
198
|
-
props: {
|
|
199
|
-
...SEED_DATA_PROPS,
|
|
200
|
-
...NUMBER_INPUT_PROPS,
|
|
201
|
-
fieldName: createFieldNameProp({
|
|
202
|
-
defaultValue: "numberInputValue",
|
|
203
|
-
valuePropName: "value",
|
|
204
|
-
handlerPropName: "onChangeText",
|
|
205
|
-
}),
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, createIconProp, createBoolProp, createColorProp, createStaticNumberProp, createFieldNameProp, createIconSizeProp, createActionProp, Triggers, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Toggle Button",
|
|
4
|
-
tag: "ToggleButton",
|
|
5
|
-
category: COMPONENT_TYPES.deprecated,
|
|
6
|
-
layout: {},
|
|
7
|
-
triggers: [Triggers.OnPress],
|
|
8
|
-
props: {
|
|
9
|
-
onPress: createActionProp(),
|
|
10
|
-
icon: createIconProp({
|
|
11
|
-
required: true,
|
|
12
|
-
}),
|
|
13
|
-
iconSize: createIconSizeProp(),
|
|
14
|
-
fieldName: createFieldNameProp({
|
|
15
|
-
defaultValue: false,
|
|
16
|
-
valuePropName: "toggled",
|
|
17
|
-
}),
|
|
18
|
-
disabled: createBoolProp({
|
|
19
|
-
label: "Disabled",
|
|
20
|
-
description: "Whether the button should be disabled",
|
|
21
|
-
group: GROUPS.basic,
|
|
22
|
-
}),
|
|
23
|
-
color: createColorProp({
|
|
24
|
-
group: GROUPS.basic,
|
|
25
|
-
}),
|
|
26
|
-
colorSecondary: createColorProp({
|
|
27
|
-
label: "Secondary Color",
|
|
28
|
-
group: GROUPS.basic,
|
|
29
|
-
}),
|
|
30
|
-
borderColor: createColorProp({
|
|
31
|
-
label: "Border Color",
|
|
32
|
-
group: GROUPS.basic,
|
|
33
|
-
}),
|
|
34
|
-
width: createStaticNumberProp({
|
|
35
|
-
label: "Width",
|
|
36
|
-
description: "Width",
|
|
37
|
-
defaultValue: 50,
|
|
38
|
-
}),
|
|
39
|
-
height: createStaticNumberProp({
|
|
40
|
-
label: "Height",
|
|
41
|
-
description: "Height",
|
|
42
|
-
defaultValue: 50,
|
|
43
|
-
}),
|
|
44
|
-
},
|
|
45
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Touchable",
|
|
4
|
-
tag: "Touchable",
|
|
5
|
-
description: "Simple button with no styles",
|
|
6
|
-
category: COMPONENT_TYPES.button,
|
|
7
|
-
layout: {},
|
|
8
|
-
triggers: [Triggers.OnPress],
|
|
9
|
-
props: {
|
|
10
|
-
onPress: createActionProp(),
|
|
11
|
-
},
|
|
12
|
-
};
|
package/src/mappings/Video.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createStaticBoolProp, createSourceProp, createResizeModeProp, createNumberProp, GROUPS, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Video",
|
|
4
|
-
tag: "Video",
|
|
5
|
-
description: "Given a URL, display a video",
|
|
6
|
-
doc_link: "https://docs.expo.io/versions/latest/sdk/video/",
|
|
7
|
-
code_link: "https://github.com/expo/expo/blob/master/packages/expo-av/src/Video.tsx",
|
|
8
|
-
category: COMPONENT_TYPES.media,
|
|
9
|
-
layout: {
|
|
10
|
-
height: 215,
|
|
11
|
-
},
|
|
12
|
-
props: {
|
|
13
|
-
source: createSourceProp({
|
|
14
|
-
label: "Source",
|
|
15
|
-
description: "The source of the video data to display.",
|
|
16
|
-
defaultValue: "http://static.draftbit.com/videos/intro-to-draftbit.mp4",
|
|
17
|
-
}),
|
|
18
|
-
usePoster: createStaticBoolProp({
|
|
19
|
-
label: "Use Thumbnail",
|
|
20
|
-
description: "Show a thumbnail before the video starts.",
|
|
21
|
-
defaultValue: false,
|
|
22
|
-
}),
|
|
23
|
-
posterSource: createSourceProp({
|
|
24
|
-
label: "Thumbnail Source",
|
|
25
|
-
description: "The optional image to display over the video while it is loading.",
|
|
26
|
-
defaultValue: null,
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
resizeMode: createResizeModeProp(),
|
|
30
|
-
isMuted: createStaticBoolProp({
|
|
31
|
-
label: "Mute Audio",
|
|
32
|
-
description: "Mute the audio of the video.",
|
|
33
|
-
}),
|
|
34
|
-
useNativeControls: createStaticBoolProp({
|
|
35
|
-
label: "Use Native Controls",
|
|
36
|
-
description: "Display the playback controls, allowing users to play or pause the video.",
|
|
37
|
-
defaultValue: true,
|
|
38
|
-
}),
|
|
39
|
-
shouldPlay: createStaticBoolProp({
|
|
40
|
-
label: "Play Automatically",
|
|
41
|
-
description: "Start playing the video after loading is finished.",
|
|
42
|
-
}),
|
|
43
|
-
isLooping: createStaticBoolProp({
|
|
44
|
-
label: "Loop Video",
|
|
45
|
-
description: "Automatically replay the video.",
|
|
46
|
-
}),
|
|
47
|
-
positionMillis: createNumberProp({
|
|
48
|
-
label: "Starting Point",
|
|
49
|
-
description: "Set a certian starting point of the video",
|
|
50
|
-
min: 0,
|
|
51
|
-
step: 0.01,
|
|
52
|
-
precision: 2,
|
|
53
|
-
group: GROUPS.basic,
|
|
54
|
-
}),
|
|
55
|
-
rate: createNumberProp({
|
|
56
|
-
label: "Playback Rate",
|
|
57
|
-
description: "The playback rate of the media. This value must be between 0.0 and 32.0 (Default: 1)",
|
|
58
|
-
min: 0,
|
|
59
|
-
max: 32,
|
|
60
|
-
step: 0.25,
|
|
61
|
-
precision: 2,
|
|
62
|
-
group: GROUPS.basic,
|
|
63
|
-
}),
|
|
64
|
-
volume: createNumberProp({
|
|
65
|
-
label: "Volume",
|
|
66
|
-
description: "The volume of the audio for this media. This value must be between 0.0 (silence) and 1.0 (maximum volume). (Default: .5)",
|
|
67
|
-
min: 0,
|
|
68
|
-
max: 1,
|
|
69
|
-
step: 0.1,
|
|
70
|
-
precision: 1,
|
|
71
|
-
group: GROUPS.basic,
|
|
72
|
-
}),
|
|
73
|
-
},
|
|
74
|
-
};
|