@draftbit/core 46.4.4-cc754a.2 → 46.4.4-cd0423.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.
- package/lib/commonjs/components/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/DatePicker/DatePicker.js +25 -15
- package/lib/commonjs/components/DatePicker/{DatePickerComponent.web.js → DatePickerComponent.__web.js} +3 -0
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js +2 -0
- package/lib/commonjs/mappings/DatePicker.js +20 -3
- package/lib/commonjs/mappings/TextArea.js +14 -3
- package/lib/commonjs/mappings/TextField.js +14 -4
- package/lib/commonjs/mappings/TextInput.js +14 -3
- package/lib/module/components/DatePicker/DatePicker.js +24 -15
- package/lib/module/components/DatePicker/{DatePickerComponent.web.js → DatePickerComponent.__web.js} +3 -0
- package/lib/module/components/DatePicker/DatePickerComponent.js +2 -0
- package/lib/module/constants.js +1 -0
- package/lib/module/mappings/DatePicker.js +21 -4
- package/lib/module/mappings/TextArea.js +15 -4
- package/lib/module/mappings/TextField.js +14 -4
- package/lib/module/mappings/TextInput.js +15 -4
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +4 -0
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/typescript/src/components/DatePicker/{DatePickerComponent.web.d.ts → DatePickerComponent.__web.d.ts} +1 -1
- package/lib/typescript/src/components/DatePicker/{DatePickerComponent.web.d.ts.map → DatePickerComponent.__web.d.ts.map} +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts +1 -0
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts.map +1 -1
- package/lib/typescript/src/mappings/DatePicker.d.ts +42 -0
- package/lib/typescript/src/mappings/DatePicker.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextArea.d.ts +21 -1
- package/lib/typescript/src/mappings/TextArea.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextField.d.ts +22 -2
- package/lib/typescript/src/mappings/TextField.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextInput.d.ts +21 -1
- package/lib/typescript/src/mappings/TextInput.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/DatePicker/DatePicker.js +20 -13
- package/src/components/DatePicker/DatePicker.tsx +29 -13
- package/src/components/DatePicker/{DatePickerComponent.web.js → DatePickerComponent.__web.js} +2 -2
- package/src/components/DatePicker/{DatePickerComponent.web.tsx → DatePickerComponent.__web.tsx} +3 -0
- package/src/components/DatePicker/DatePickerComponent.js +2 -2
- package/src/components/DatePicker/DatePickerComponent.tsx +2 -0
- package/src/components/DatePicker/DatePickerComponentType.ts +1 -0
- package/src/mappings/DatePicker.js +28 -4
- package/src/mappings/DatePicker.ts +30 -3
- package/src/mappings/TextArea.js +15 -4
- package/src/mappings/TextArea.ts +15 -3
- package/src/mappings/TextField.js +14 -4
- package/src/mappings/TextField.ts +14 -4
- package/src/mappings/TextInput.js +15 -4
- package/src/mappings/TextInput.ts +15 -3
package/src/components/DatePicker/{DatePickerComponent.web.js → DatePickerComponent.__web.js}
RENAMED
|
@@ -4,7 +4,7 @@ import { MuiPickersUtilsProvider, DatePicker, TimePicker, DateTimePicker, } from
|
|
|
4
4
|
import { createMuiTheme, ThemeProvider } from "@material-ui/core/styles";
|
|
5
5
|
import { withTheme } from "../../theming";
|
|
6
6
|
import Theme from "../../styles/DefaultTheme";
|
|
7
|
-
const DatePickerComponent = ({ value, onChange, mode, toggleVisibility, isVisible, theme, }) => {
|
|
7
|
+
const DatePickerComponent = ({ value, onChange, mode, style, toggleVisibility, isVisible, theme, }) => {
|
|
8
8
|
const internalTheme = createMuiTheme({
|
|
9
9
|
palette: {
|
|
10
10
|
primary: {
|
|
@@ -25,6 +25,6 @@ const DatePickerComponent = ({ value, onChange, mode, toggleVisibility, isVisibl
|
|
|
25
25
|
React.createElement(Picker, { value: value, open: isVisible, onChange: (d) => {
|
|
26
26
|
toggleVisibility();
|
|
27
27
|
onChange(null, d);
|
|
28
|
-
}, onClose: () => toggleVisibility(), variant: "dialog", TextFieldComponent: () => null }))));
|
|
28
|
+
}, onClose: () => toggleVisibility(), variant: "dialog", inputVariant: "outlined", style: style, TextFieldComponent: () => null }))));
|
|
29
29
|
};
|
|
30
30
|
export default withTheme(DatePickerComponent);
|
package/src/components/DatePicker/{DatePickerComponent.web.tsx → DatePickerComponent.__web.tsx}
RENAMED
|
@@ -15,6 +15,7 @@ const DatePickerComponent: React.FC<Props & { theme: typeof Theme }> = ({
|
|
|
15
15
|
value,
|
|
16
16
|
onChange,
|
|
17
17
|
mode,
|
|
18
|
+
style,
|
|
18
19
|
toggleVisibility,
|
|
19
20
|
isVisible,
|
|
20
21
|
theme,
|
|
@@ -49,6 +50,8 @@ const DatePickerComponent: React.FC<Props & { theme: typeof Theme }> = ({
|
|
|
49
50
|
}}
|
|
50
51
|
onClose={() => toggleVisibility()}
|
|
51
52
|
variant="dialog"
|
|
53
|
+
inputVariant="outlined"
|
|
54
|
+
style={style}
|
|
52
55
|
TextFieldComponent={() => null}
|
|
53
56
|
/>
|
|
54
57
|
</ThemeProvider>
|
|
@@ -2,12 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
3
|
import DateTimePicker from "@react-native-community/datetimepicker";
|
|
4
4
|
import DateTimePickerModal from "react-native-modal-datetime-picker";
|
|
5
|
-
const DatePickerComponent = ({ value, onChange, mode, toggleVisibility, }) => {
|
|
5
|
+
const DatePickerComponent = ({ value, onChange, style, mode, toggleVisibility, }) => {
|
|
6
6
|
return Platform.OS === "ios" || Platform.OS === "android" ? (React.createElement(DateTimePickerModal, { date: value, mode: mode, isVisible: true, display: Platform.OS === "ios" ? "spinner" : "default", onCancel: () => {
|
|
7
7
|
console.log("Picker cancelled before selecting anything.");
|
|
8
8
|
toggleVisibility();
|
|
9
9
|
}, onConfirm: (data) => {
|
|
10
10
|
onChange(null, data);
|
|
11
|
-
} })) : (React.createElement(DateTimePicker, { value: value, mode: mode, onChange: onChange, display: "default" }));
|
|
11
|
+
} })) : (React.createElement(DateTimePicker, { style: style, value: value, mode: mode, onChange: onChange, display: "default" }));
|
|
12
12
|
};
|
|
13
13
|
export default DatePickerComponent;
|
|
@@ -7,6 +7,7 @@ import { DatePickerComponentProps as Props } from "./DatePickerComponentType";
|
|
|
7
7
|
const DatePickerComponent: React.FC<React.PropsWithChildren<Props>> = ({
|
|
8
8
|
value,
|
|
9
9
|
onChange,
|
|
10
|
+
style,
|
|
10
11
|
mode,
|
|
11
12
|
toggleVisibility,
|
|
12
13
|
}) => {
|
|
@@ -26,6 +27,7 @@ const DatePickerComponent: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
26
27
|
/>
|
|
27
28
|
) : (
|
|
28
29
|
<DateTimePicker
|
|
30
|
+
style={style}
|
|
29
31
|
value={value}
|
|
30
32
|
mode={mode}
|
|
31
33
|
onChange={onChange}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, createNumberProp, createColorProp, } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
label: {
|
|
4
4
|
label: "Label",
|
|
@@ -10,6 +10,16 @@ const SEED_DATA_PROPS = {
|
|
|
10
10
|
required: true,
|
|
11
11
|
group: GROUPS.data,
|
|
12
12
|
},
|
|
13
|
+
labelSize: createNumberProp({
|
|
14
|
+
label: "Label Font Size",
|
|
15
|
+
group: GROUPS.basic,
|
|
16
|
+
description: "Label font size",
|
|
17
|
+
editable: true,
|
|
18
|
+
defaultValue: null,
|
|
19
|
+
}),
|
|
20
|
+
labelColor: createColorProp({
|
|
21
|
+
label: "Label Color",
|
|
22
|
+
}),
|
|
13
23
|
mode: {
|
|
14
24
|
label: "Mode",
|
|
15
25
|
description: "Choose between date, time and datetime",
|
|
@@ -21,6 +31,12 @@ const SEED_DATA_PROPS = {
|
|
|
21
31
|
options: ["date", "time", "datetime"],
|
|
22
32
|
group: GROUPS.basic,
|
|
23
33
|
},
|
|
34
|
+
borderColor: createColorProp({
|
|
35
|
+
label: "Default Border Color",
|
|
36
|
+
}),
|
|
37
|
+
borderColorActive: createColorProp({
|
|
38
|
+
label: "Active Border Color",
|
|
39
|
+
}),
|
|
24
40
|
format: {
|
|
25
41
|
label: "Format",
|
|
26
42
|
description: "Create an output format for the date.",
|
|
@@ -29,7 +45,7 @@ const SEED_DATA_PROPS = {
|
|
|
29
45
|
formType: FORM_TYPES.string,
|
|
30
46
|
propType: PROP_TYPES.STRING,
|
|
31
47
|
defaultValue: null,
|
|
32
|
-
group: GROUPS.
|
|
48
|
+
group: GROUPS.data,
|
|
33
49
|
},
|
|
34
50
|
assistiveText: {
|
|
35
51
|
label: "Assistive text",
|
|
@@ -39,7 +55,7 @@ const SEED_DATA_PROPS = {
|
|
|
39
55
|
defaultValue: null,
|
|
40
56
|
editable: true,
|
|
41
57
|
required: false,
|
|
42
|
-
group: GROUPS.
|
|
58
|
+
group: GROUPS.data,
|
|
43
59
|
},
|
|
44
60
|
// locale: {
|
|
45
61
|
// label: "Locale",
|
|
@@ -81,7 +97,7 @@ const SEED_DATA_PROPS = {
|
|
|
81
97
|
defaultValue: false,
|
|
82
98
|
editable: true,
|
|
83
99
|
required: false,
|
|
84
|
-
group: GROUPS.
|
|
100
|
+
group: GROUPS.data,
|
|
85
101
|
},
|
|
86
102
|
// error: {
|
|
87
103
|
// label: "Error",
|
|
@@ -139,6 +155,14 @@ export const SEED_DATA = [
|
|
|
139
155
|
category: COMPONENT_TYPES.input,
|
|
140
156
|
layout: null,
|
|
141
157
|
triggers: [Triggers.OnDateChange],
|
|
158
|
+
StylesPanelSections: [
|
|
159
|
+
StylesPanelSections.Typography,
|
|
160
|
+
StylesPanelSections.Background,
|
|
161
|
+
StylesPanelSections.Borders,
|
|
162
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
163
|
+
StylesPanelSections.Position,
|
|
164
|
+
StylesPanelSections.Size,
|
|
165
|
+
],
|
|
142
166
|
props: {
|
|
143
167
|
...SEED_DATA_PROPS,
|
|
144
168
|
type: {
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
FIELD_NAME,
|
|
6
6
|
GROUPS,
|
|
7
7
|
Triggers,
|
|
8
|
+
StylesPanelSections,
|
|
9
|
+
createNumberProp,
|
|
10
|
+
createColorProp,
|
|
8
11
|
} from "@draftbit/types";
|
|
9
12
|
|
|
10
13
|
const SEED_DATA_PROPS = {
|
|
@@ -18,6 +21,16 @@ const SEED_DATA_PROPS = {
|
|
|
18
21
|
required: true,
|
|
19
22
|
group: GROUPS.data,
|
|
20
23
|
},
|
|
24
|
+
labelSize: createNumberProp({
|
|
25
|
+
label: "Label Font Size",
|
|
26
|
+
group: GROUPS.basic,
|
|
27
|
+
description: "Label font size",
|
|
28
|
+
editable: true,
|
|
29
|
+
defaultValue: null,
|
|
30
|
+
}),
|
|
31
|
+
labelColor: createColorProp({
|
|
32
|
+
label: "Label Color",
|
|
33
|
+
}),
|
|
21
34
|
mode: {
|
|
22
35
|
label: "Mode",
|
|
23
36
|
description: "Choose between date, time and datetime",
|
|
@@ -29,6 +42,12 @@ const SEED_DATA_PROPS = {
|
|
|
29
42
|
options: ["date", "time", "datetime"],
|
|
30
43
|
group: GROUPS.basic,
|
|
31
44
|
},
|
|
45
|
+
borderColor: createColorProp({
|
|
46
|
+
label: "Default Border Color",
|
|
47
|
+
}),
|
|
48
|
+
borderColorActive: createColorProp({
|
|
49
|
+
label: "Active Border Color",
|
|
50
|
+
}),
|
|
32
51
|
format: {
|
|
33
52
|
label: "Format",
|
|
34
53
|
description: "Create an output format for the date.",
|
|
@@ -37,7 +56,7 @@ const SEED_DATA_PROPS = {
|
|
|
37
56
|
formType: FORM_TYPES.string,
|
|
38
57
|
propType: PROP_TYPES.STRING,
|
|
39
58
|
defaultValue: null,
|
|
40
|
-
group: GROUPS.
|
|
59
|
+
group: GROUPS.data,
|
|
41
60
|
},
|
|
42
61
|
assistiveText: {
|
|
43
62
|
label: "Assistive text",
|
|
@@ -47,7 +66,7 @@ const SEED_DATA_PROPS = {
|
|
|
47
66
|
defaultValue: null,
|
|
48
67
|
editable: true,
|
|
49
68
|
required: false,
|
|
50
|
-
group: GROUPS.
|
|
69
|
+
group: GROUPS.data,
|
|
51
70
|
},
|
|
52
71
|
// locale: {
|
|
53
72
|
// label: "Locale",
|
|
@@ -90,7 +109,7 @@ const SEED_DATA_PROPS = {
|
|
|
90
109
|
defaultValue: false,
|
|
91
110
|
editable: true,
|
|
92
111
|
required: false,
|
|
93
|
-
group: GROUPS.
|
|
112
|
+
group: GROUPS.data,
|
|
94
113
|
},
|
|
95
114
|
// error: {
|
|
96
115
|
// label: "Error",
|
|
@@ -150,6 +169,14 @@ export const SEED_DATA = [
|
|
|
150
169
|
category: COMPONENT_TYPES.input,
|
|
151
170
|
layout: null,
|
|
152
171
|
triggers: [Triggers.OnDateChange],
|
|
172
|
+
StylesPanelSections: [
|
|
173
|
+
StylesPanelSections.Typography,
|
|
174
|
+
StylesPanelSections.Background,
|
|
175
|
+
StylesPanelSections.Borders,
|
|
176
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
177
|
+
StylesPanelSections.Position,
|
|
178
|
+
StylesPanelSections.Size,
|
|
179
|
+
],
|
|
153
180
|
props: {
|
|
154
181
|
...SEED_DATA_PROPS,
|
|
155
182
|
type: {
|
package/src/mappings/TextArea.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Text Area",
|
|
4
4
|
tag: "TextInput",
|
|
@@ -59,6 +59,17 @@ export const SEED_DATA = {
|
|
|
59
59
|
formType: FORM_TYPES.boolean,
|
|
60
60
|
propType: PROP_TYPES.BOOLEAN,
|
|
61
61
|
},
|
|
62
|
+
blurOnSubmit: {
|
|
63
|
+
group: GROUPS.advanced,
|
|
64
|
+
label: "Blur On Submit",
|
|
65
|
+
description: "If true, the text field will blur when submitted. ",
|
|
66
|
+
editable: true,
|
|
67
|
+
required: false,
|
|
68
|
+
defaultValue: null,
|
|
69
|
+
formType: FORM_TYPES.boolean,
|
|
70
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
71
|
+
},
|
|
72
|
+
disabled: createDisabledProp(),
|
|
62
73
|
caretHidden: {
|
|
63
74
|
group: GROUPS.advanced,
|
|
64
75
|
label: "Hide Caret",
|
|
@@ -80,12 +91,12 @@ export const SEED_DATA = {
|
|
|
80
91
|
propType: PROP_TYPES.BOOLEAN,
|
|
81
92
|
},
|
|
82
93
|
editable: {
|
|
83
|
-
group: GROUPS.
|
|
84
|
-
label: "Editable",
|
|
94
|
+
group: GROUPS.data,
|
|
95
|
+
label: "Editable?",
|
|
85
96
|
description: "If false, the text is not editable",
|
|
86
97
|
editable: true,
|
|
87
98
|
required: false,
|
|
88
|
-
defaultValue:
|
|
99
|
+
defaultValue: null,
|
|
89
100
|
formType: FORM_TYPES.boolean,
|
|
90
101
|
propType: PROP_TYPES.BOOLEAN,
|
|
91
102
|
},
|
package/src/mappings/TextArea.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
PROP_TYPES,
|
|
6
6
|
FIELD_NAME,
|
|
7
7
|
Triggers,
|
|
8
|
+
createDisabledProp,
|
|
8
9
|
} from "@draftbit/types";
|
|
9
10
|
|
|
10
11
|
export const SEED_DATA = {
|
|
@@ -69,6 +70,17 @@ export const SEED_DATA = {
|
|
|
69
70
|
formType: FORM_TYPES.boolean,
|
|
70
71
|
propType: PROP_TYPES.BOOLEAN,
|
|
71
72
|
},
|
|
73
|
+
blurOnSubmit: {
|
|
74
|
+
group: GROUPS.advanced,
|
|
75
|
+
label: "Blur On Submit",
|
|
76
|
+
description: "If true, the text field will blur when submitted. ",
|
|
77
|
+
editable: true,
|
|
78
|
+
required: false,
|
|
79
|
+
defaultValue: null,
|
|
80
|
+
formType: FORM_TYPES.boolean,
|
|
81
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
82
|
+
},
|
|
83
|
+
disabled: createDisabledProp(),
|
|
72
84
|
caretHidden: {
|
|
73
85
|
group: GROUPS.advanced,
|
|
74
86
|
label: "Hide Caret",
|
|
@@ -91,12 +103,12 @@ export const SEED_DATA = {
|
|
|
91
103
|
propType: PROP_TYPES.BOOLEAN,
|
|
92
104
|
},
|
|
93
105
|
editable: {
|
|
94
|
-
group: GROUPS.
|
|
95
|
-
label: "Editable",
|
|
106
|
+
group: GROUPS.data,
|
|
107
|
+
label: "Editable?",
|
|
96
108
|
description: "If false, the text is not editable",
|
|
97
109
|
editable: true,
|
|
98
110
|
required: false,
|
|
99
|
-
defaultValue:
|
|
111
|
+
defaultValue: null,
|
|
100
112
|
formType: FORM_TYPES.boolean,
|
|
101
113
|
propType: PROP_TYPES.BOOLEAN,
|
|
102
114
|
},
|
|
@@ -62,7 +62,7 @@ const SEED_DATA_PROPS = {
|
|
|
62
62
|
propType: PROP_TYPES.BOOLEAN,
|
|
63
63
|
},
|
|
64
64
|
disabled: {
|
|
65
|
-
group: GROUPS.
|
|
65
|
+
group: GROUPS.data,
|
|
66
66
|
label: "Disabled",
|
|
67
67
|
description: "Whether the input should be disabled. Will prevent input and show a greyed out state.",
|
|
68
68
|
formType: FORM_TYPES.boolean,
|
|
@@ -72,12 +72,22 @@ const SEED_DATA_PROPS = {
|
|
|
72
72
|
required: false,
|
|
73
73
|
},
|
|
74
74
|
editable: {
|
|
75
|
-
group: GROUPS.
|
|
76
|
-
label: "Editable",
|
|
75
|
+
group: GROUPS.data,
|
|
76
|
+
label: "Editable?",
|
|
77
77
|
description: "If false, the text is not editable",
|
|
78
78
|
editable: true,
|
|
79
79
|
required: false,
|
|
80
|
-
defaultValue:
|
|
80
|
+
defaultValue: null,
|
|
81
|
+
formType: FORM_TYPES.boolean,
|
|
82
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
83
|
+
},
|
|
84
|
+
blurOnSubmit: {
|
|
85
|
+
group: GROUPS.advanced,
|
|
86
|
+
label: "Blur On Submit",
|
|
87
|
+
description: "If true, the text field will blur when submitted. ",
|
|
88
|
+
editable: true,
|
|
89
|
+
required: false,
|
|
90
|
+
defaultValue: null,
|
|
81
91
|
formType: FORM_TYPES.boolean,
|
|
82
92
|
propType: PROP_TYPES.BOOLEAN,
|
|
83
93
|
},
|
|
@@ -77,7 +77,7 @@ const SEED_DATA_PROPS = {
|
|
|
77
77
|
propType: PROP_TYPES.BOOLEAN,
|
|
78
78
|
},
|
|
79
79
|
disabled: {
|
|
80
|
-
group: GROUPS.
|
|
80
|
+
group: GROUPS.data,
|
|
81
81
|
label: "Disabled",
|
|
82
82
|
description:
|
|
83
83
|
"Whether the input should be disabled. Will prevent input and show a greyed out state.",
|
|
@@ -88,12 +88,22 @@ const SEED_DATA_PROPS = {
|
|
|
88
88
|
required: false,
|
|
89
89
|
},
|
|
90
90
|
editable: {
|
|
91
|
-
group: GROUPS.
|
|
92
|
-
label: "Editable",
|
|
91
|
+
group: GROUPS.data,
|
|
92
|
+
label: "Editable?",
|
|
93
93
|
description: "If false, the text is not editable",
|
|
94
94
|
editable: true,
|
|
95
95
|
required: false,
|
|
96
|
-
defaultValue:
|
|
96
|
+
defaultValue: null,
|
|
97
|
+
formType: FORM_TYPES.boolean,
|
|
98
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
99
|
+
},
|
|
100
|
+
blurOnSubmit: {
|
|
101
|
+
group: GROUPS.advanced,
|
|
102
|
+
label: "Blur On Submit",
|
|
103
|
+
description: "If true, the text field will blur when submitted. ",
|
|
104
|
+
editable: true,
|
|
105
|
+
required: false,
|
|
106
|
+
defaultValue: null,
|
|
97
107
|
formType: FORM_TYPES.boolean,
|
|
98
108
|
propType: PROP_TYPES.BOOLEAN,
|
|
99
109
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, createDisabledProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA_PROPS = {
|
|
3
3
|
style: {
|
|
4
4
|
group: GROUPS.basic,
|
|
@@ -150,12 +150,12 @@ export const SEED_DATA = [
|
|
|
150
150
|
propType: PROP_TYPES.BOOLEAN,
|
|
151
151
|
},
|
|
152
152
|
editable: {
|
|
153
|
-
group: GROUPS.
|
|
154
|
-
label: "Editable",
|
|
153
|
+
group: GROUPS.data,
|
|
154
|
+
label: "Editable?",
|
|
155
155
|
description: "If false, the text is not editable",
|
|
156
156
|
editable: true,
|
|
157
157
|
required: false,
|
|
158
|
-
defaultValue:
|
|
158
|
+
defaultValue: null,
|
|
159
159
|
formType: FORM_TYPES.boolean,
|
|
160
160
|
propType: PROP_TYPES.BOOLEAN,
|
|
161
161
|
},
|
|
@@ -238,6 +238,16 @@ export const SEED_DATA = [
|
|
|
238
238
|
formType: FORM_TYPES.string,
|
|
239
239
|
propType: PROP_TYPES.STRING,
|
|
240
240
|
},
|
|
241
|
+
blurOnSubmit: {
|
|
242
|
+
group: GROUPS.advanced,
|
|
243
|
+
label: "Blur On Submit",
|
|
244
|
+
description: "If true, the text field will blur when submitted. ",
|
|
245
|
+
editable: true,
|
|
246
|
+
required: false,
|
|
247
|
+
defaultValue: null,
|
|
248
|
+
formType: FORM_TYPES.boolean,
|
|
249
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
250
|
+
},
|
|
241
251
|
returnKeyType: {
|
|
242
252
|
group: GROUPS.advanced,
|
|
243
253
|
label: "Return Key Type",
|
|
@@ -317,6 +327,7 @@ export const SEED_DATA = [
|
|
|
317
327
|
formType: FORM_TYPES.number,
|
|
318
328
|
propType: PROP_TYPES.NUMBER,
|
|
319
329
|
},
|
|
330
|
+
disabled: createDisabledProp(),
|
|
320
331
|
scrollEnabled: {
|
|
321
332
|
group: GROUPS.basic,
|
|
322
333
|
label: "Scroll Enabled",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
FIELD_NAME,
|
|
7
7
|
Triggers,
|
|
8
8
|
StylesPanelSections,
|
|
9
|
+
createDisabledProp,
|
|
9
10
|
} from "@draftbit/types";
|
|
10
11
|
|
|
11
12
|
export const SEED_DATA_PROPS = {
|
|
@@ -168,12 +169,12 @@ export const SEED_DATA = [
|
|
|
168
169
|
propType: PROP_TYPES.BOOLEAN,
|
|
169
170
|
},
|
|
170
171
|
editable: {
|
|
171
|
-
group: GROUPS.
|
|
172
|
-
label: "Editable",
|
|
172
|
+
group: GROUPS.data,
|
|
173
|
+
label: "Editable?",
|
|
173
174
|
description: "If false, the text is not editable",
|
|
174
175
|
editable: true,
|
|
175
176
|
required: false,
|
|
176
|
-
defaultValue:
|
|
177
|
+
defaultValue: null,
|
|
177
178
|
formType: FORM_TYPES.boolean,
|
|
178
179
|
propType: PROP_TYPES.BOOLEAN,
|
|
179
180
|
},
|
|
@@ -258,6 +259,16 @@ export const SEED_DATA = [
|
|
|
258
259
|
formType: FORM_TYPES.string,
|
|
259
260
|
propType: PROP_TYPES.STRING,
|
|
260
261
|
},
|
|
262
|
+
blurOnSubmit: {
|
|
263
|
+
group: GROUPS.advanced,
|
|
264
|
+
label: "Blur On Submit",
|
|
265
|
+
description: "If true, the text field will blur when submitted. ",
|
|
266
|
+
editable: true,
|
|
267
|
+
required: false,
|
|
268
|
+
defaultValue: null,
|
|
269
|
+
formType: FORM_TYPES.boolean,
|
|
270
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
271
|
+
},
|
|
261
272
|
returnKeyType: {
|
|
262
273
|
group: GROUPS.advanced,
|
|
263
274
|
label: "Return Key Type",
|
|
@@ -341,6 +352,7 @@ export const SEED_DATA = [
|
|
|
341
352
|
formType: FORM_TYPES.number,
|
|
342
353
|
propType: PROP_TYPES.NUMBER,
|
|
343
354
|
},
|
|
355
|
+
disabled: createDisabledProp(),
|
|
344
356
|
scrollEnabled: {
|
|
345
357
|
group: GROUPS.basic,
|
|
346
358
|
label: "Scroll Enabled",
|