@draftbit/core 47.1.1-b7d86a.2 → 47.1.1-ca8570.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/Button.js +2 -2
- package/lib/commonjs/components/IconButton.js +4 -2
- package/lib/commonjs/components/Pressable.js +2 -2
- package/lib/commonjs/components/Touchable.js +2 -2
- package/lib/commonjs/mappings/Button.js +2 -2
- package/lib/commonjs/mappings/FlashList.js +20 -0
- package/lib/commonjs/mappings/FlatList.js +10 -0
- package/lib/commonjs/mappings/IconButton.js +4 -6
- package/lib/commonjs/mappings/ScrollView.js +1 -1
- package/lib/commonjs/mappings/Touchable.js +9 -2
- package/lib/module/components/Button.js +2 -2
- package/lib/module/components/IconButton.js +4 -2
- package/lib/module/components/Pressable.js +2 -2
- package/lib/module/components/Touchable.js +2 -2
- package/lib/module/mappings/Button.js +2 -2
- package/lib/module/mappings/FlashList.js +20 -0
- package/lib/module/mappings/FlatList.js +10 -0
- package/lib/module/mappings/IconButton.js +5 -7
- package/lib/module/mappings/ScrollView.js +1 -1
- package/lib/module/mappings/Touchable.js +10 -3
- package/lib/typescript/src/components/IconButton.d.ts +2 -0
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +40 -0
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +20 -0
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
- package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Button.js +1 -1
- package/src/components/Button.tsx +2 -2
- package/src/components/IconButton.js +2 -2
- package/src/components/IconButton.tsx +6 -2
- package/src/components/Pressable.js +1 -1
- package/src/components/Pressable.tsx +2 -2
- package/src/components/Touchable.js +1 -1
- package/src/components/Touchable.tsx +2 -2
- package/src/mappings/Button.js +2 -2
- package/src/mappings/Button.ts +2 -2
- package/src/mappings/FlashList.js +20 -0
- package/src/mappings/FlashList.ts +24 -0
- package/src/mappings/FlatList.js +10 -0
- package/src/mappings/FlatList.ts +12 -0
- package/src/mappings/IconButton.js +5 -7
- package/src/mappings/IconButton.ts +5 -7
- package/src/mappings/ScrollView.js +1 -1
- package/src/mappings/ScrollView.ts +1 -1
- package/src/mappings/Touchable.js +10 -3
- package/src/mappings/Touchable.ts +12 -2
|
@@ -16,11 +16,13 @@ const IconButton = _ref => {
|
|
|
16
16
|
icon,
|
|
17
17
|
color: customColor,
|
|
18
18
|
size = 32,
|
|
19
|
-
disabled
|
|
19
|
+
disabled,
|
|
20
20
|
loading = false,
|
|
21
21
|
onPress,
|
|
22
22
|
theme,
|
|
23
23
|
style,
|
|
24
|
+
activeOpacity = 0.8,
|
|
25
|
+
disabledOpacity = 0.8,
|
|
24
26
|
...props
|
|
25
27
|
} = _ref;
|
|
26
28
|
const iconColor = customColor || theme.colors.primary;
|
|
@@ -32,7 +34,7 @@ const IconButton = _ref => {
|
|
|
32
34
|
pressed
|
|
33
35
|
} = _ref2;
|
|
34
36
|
return [styles.container, {
|
|
35
|
-
opacity: pressed
|
|
37
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
36
38
|
width: size,
|
|
37
39
|
height: size,
|
|
38
40
|
alignItems: "center",
|
|
@@ -23,7 +23,7 @@ const SEED_DATA_PROPS = {
|
|
|
23
23
|
activeOpacity: (0, _types.createStaticNumberProp)({
|
|
24
24
|
label: "Active Opacity",
|
|
25
25
|
description: "Opacity of the button when active.",
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: null,
|
|
27
27
|
min: 0,
|
|
28
28
|
max: 1,
|
|
29
29
|
step: 0.01,
|
|
@@ -33,7 +33,7 @@ const SEED_DATA_PROPS = {
|
|
|
33
33
|
disabledOpacity: (0, _types.createStaticNumberProp)({
|
|
34
34
|
label: "Disabled Opacity",
|
|
35
35
|
description: "Opacity of the button when disabled.",
|
|
36
|
-
defaultValue:
|
|
36
|
+
defaultValue: null,
|
|
37
37
|
min: 0,
|
|
38
38
|
max: 1,
|
|
39
39
|
step: 0.01,
|
|
@@ -43,6 +43,16 @@ const SEED_DATA = [{
|
|
|
43
43
|
refreshColor: (0, _types.createColorProp)({
|
|
44
44
|
label: "Refreshing Color",
|
|
45
45
|
description: "Color of the refresh indicator"
|
|
46
|
+
}),
|
|
47
|
+
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
48
|
+
label: "Show Horizontal Scroll Indicator",
|
|
49
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
50
|
+
defaultValue: true
|
|
51
|
+
}),
|
|
52
|
+
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
53
|
+
label: "Show Vertical Scroll Indicator",
|
|
54
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
55
|
+
defaultValue: true
|
|
46
56
|
})
|
|
47
57
|
}
|
|
48
58
|
}, {
|
|
@@ -91,6 +101,16 @@ const SEED_DATA = [{
|
|
|
91
101
|
refreshColor: (0, _types.createColorProp)({
|
|
92
102
|
label: "Refreshing Color",
|
|
93
103
|
description: "Color of the refresh indicator"
|
|
104
|
+
}),
|
|
105
|
+
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
106
|
+
label: "Show Horizontal Scroll Indicator",
|
|
107
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
108
|
+
defaultValue: true
|
|
109
|
+
}),
|
|
110
|
+
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
111
|
+
label: "Show Vertical Scroll Indicator",
|
|
112
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
113
|
+
defaultValue: true
|
|
94
114
|
})
|
|
95
115
|
}
|
|
96
116
|
}];
|
|
@@ -42,6 +42,16 @@ const SEED_DATA = {
|
|
|
42
42
|
refreshColor: (0, _types.createColorProp)({
|
|
43
43
|
label: "Refreshing Color",
|
|
44
44
|
description: "Color of the refresh indicator"
|
|
45
|
+
}),
|
|
46
|
+
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
47
|
+
label: "Show Horizontal Scroll Indicator",
|
|
48
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
49
|
+
defaultValue: true
|
|
50
|
+
}),
|
|
51
|
+
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
52
|
+
label: "Show Vertical Scroll Indicator",
|
|
53
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
54
|
+
defaultValue: true
|
|
45
55
|
})
|
|
46
56
|
}
|
|
47
57
|
};
|
|
@@ -10,26 +10,24 @@ const SEED_DATA = {
|
|
|
10
10
|
tag: "IconButton",
|
|
11
11
|
category: _types.COMPONENT_TYPES.button,
|
|
12
12
|
layout: {},
|
|
13
|
-
triggers: [_types.Triggers.OnPress],
|
|
13
|
+
triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
|
|
14
14
|
stylesPanelSections: [_types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects, _types.StylesPanelSections.Position],
|
|
15
15
|
props: {
|
|
16
16
|
onPress: (0, _types.createActionProp)(),
|
|
17
|
+
onLongPress: (0, _types.createActionProp)(),
|
|
18
|
+
disabled: (0, _types.createDisabledProp)(),
|
|
17
19
|
icon: (0, _types.createIconProp)(),
|
|
18
20
|
color: (0, _types.createColorProp)({
|
|
19
21
|
label: "Color",
|
|
20
22
|
group: _types.GROUPS.basic
|
|
21
23
|
}),
|
|
22
|
-
disabled: (0, _types.createBoolProp)({
|
|
23
|
-
label: "Disabled",
|
|
24
|
-
group: _types.GROUPS.basic
|
|
25
|
-
}),
|
|
26
24
|
size: (0, _types.createNumberProp)({
|
|
27
25
|
group: _types.GROUPS.basic,
|
|
28
26
|
label: "Size",
|
|
29
27
|
description: "Width and height of your icon",
|
|
30
28
|
defaultValue: 32,
|
|
31
29
|
min: 16,
|
|
32
|
-
max:
|
|
30
|
+
max: 256,
|
|
33
31
|
step: 1,
|
|
34
32
|
precision: 0
|
|
35
33
|
})
|
|
@@ -23,7 +23,7 @@ const SEED_DATA = {
|
|
|
23
23
|
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
24
24
|
label: "Show Horizontal Scroll Indicator",
|
|
25
25
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: true
|
|
27
27
|
}),
|
|
28
28
|
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
29
29
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -12,10 +12,11 @@ const SEED_DATA_PROPS = {
|
|
|
12
12
|
props: {
|
|
13
13
|
onPress: (0, _types.createActionProp)(),
|
|
14
14
|
onLongPress: (0, _types.createActionProp)(),
|
|
15
|
+
disabled: (0, _types.createDisabledProp)(),
|
|
15
16
|
activeOpacity: (0, _types.createStaticNumberProp)({
|
|
16
17
|
label: "Active Opacity",
|
|
17
18
|
description: "The opacity when the button is pressed.",
|
|
18
|
-
defaultValue:
|
|
19
|
+
defaultValue: null,
|
|
19
20
|
min: 0,
|
|
20
21
|
max: 1,
|
|
21
22
|
step: 0.01,
|
|
@@ -25,7 +26,7 @@ const SEED_DATA_PROPS = {
|
|
|
25
26
|
disabledOpacity: (0, _types.createStaticNumberProp)({
|
|
26
27
|
label: "Disabled Opacity",
|
|
27
28
|
description: "The opacity when the button is disabled.",
|
|
28
|
-
defaultValue:
|
|
29
|
+
defaultValue: null,
|
|
29
30
|
min: 0,
|
|
30
31
|
max: 1,
|
|
31
32
|
step: 0.01,
|
|
@@ -41,6 +42,12 @@ const SEED_DATA_PROPS = {
|
|
|
41
42
|
label: "Hit Slop",
|
|
42
43
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
43
44
|
required: false
|
|
45
|
+
}),
|
|
46
|
+
android_disableSound: (0, _types.createStaticBoolProp)({
|
|
47
|
+
label: "Disable Sound",
|
|
48
|
+
description: "Disable the Android sound effect.",
|
|
49
|
+
defaultValue: null,
|
|
50
|
+
group: _types.GROUPS.android
|
|
44
51
|
})
|
|
45
52
|
}
|
|
46
53
|
};
|
|
@@ -8,11 +8,13 @@ const IconButton = _ref => {
|
|
|
8
8
|
icon,
|
|
9
9
|
color: customColor,
|
|
10
10
|
size = 32,
|
|
11
|
-
disabled
|
|
11
|
+
disabled,
|
|
12
12
|
loading = false,
|
|
13
13
|
onPress,
|
|
14
14
|
theme,
|
|
15
15
|
style,
|
|
16
|
+
activeOpacity = 0.8,
|
|
17
|
+
disabledOpacity = 0.8,
|
|
16
18
|
...props
|
|
17
19
|
} = _ref;
|
|
18
20
|
const iconColor = customColor || theme.colors.primary;
|
|
@@ -24,7 +26,7 @@ const IconButton = _ref => {
|
|
|
24
26
|
pressed
|
|
25
27
|
} = _ref2;
|
|
26
28
|
return [styles.container, {
|
|
27
|
-
opacity: pressed
|
|
29
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
28
30
|
width: size,
|
|
29
31
|
height: size,
|
|
30
32
|
alignItems: "center",
|
|
@@ -17,7 +17,7 @@ const SEED_DATA_PROPS = {
|
|
|
17
17
|
activeOpacity: createStaticNumberProp({
|
|
18
18
|
label: "Active Opacity",
|
|
19
19
|
description: "Opacity of the button when active.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: null,
|
|
21
21
|
min: 0,
|
|
22
22
|
max: 1,
|
|
23
23
|
step: 0.01,
|
|
@@ -27,7 +27,7 @@ const SEED_DATA_PROPS = {
|
|
|
27
27
|
disabledOpacity: createStaticNumberProp({
|
|
28
28
|
label: "Disabled Opacity",
|
|
29
29
|
description: "Opacity of the button when disabled.",
|
|
30
|
-
defaultValue:
|
|
30
|
+
defaultValue: null,
|
|
31
31
|
min: 0,
|
|
32
32
|
max: 1,
|
|
33
33
|
step: 0.01,
|
|
@@ -37,6 +37,16 @@ export const SEED_DATA = [{
|
|
|
37
37
|
refreshColor: createColorProp({
|
|
38
38
|
label: "Refreshing Color",
|
|
39
39
|
description: "Color of the refresh indicator"
|
|
40
|
+
}),
|
|
41
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
42
|
+
label: "Show Horizontal Scroll Indicator",
|
|
43
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
44
|
+
defaultValue: true
|
|
45
|
+
}),
|
|
46
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
47
|
+
label: "Show Vertical Scroll Indicator",
|
|
48
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
49
|
+
defaultValue: true
|
|
40
50
|
})
|
|
41
51
|
}
|
|
42
52
|
}, {
|
|
@@ -85,6 +95,16 @@ export const SEED_DATA = [{
|
|
|
85
95
|
refreshColor: createColorProp({
|
|
86
96
|
label: "Refreshing Color",
|
|
87
97
|
description: "Color of the refresh indicator"
|
|
98
|
+
}),
|
|
99
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
100
|
+
label: "Show Horizontal Scroll Indicator",
|
|
101
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
102
|
+
defaultValue: true
|
|
103
|
+
}),
|
|
104
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
105
|
+
label: "Show Vertical Scroll Indicator",
|
|
106
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
107
|
+
defaultValue: true
|
|
88
108
|
})
|
|
89
109
|
}
|
|
90
110
|
}];
|
|
@@ -36,6 +36,16 @@ export const SEED_DATA = {
|
|
|
36
36
|
refreshColor: createColorProp({
|
|
37
37
|
label: "Refreshing Color",
|
|
38
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
|
|
39
49
|
})
|
|
40
50
|
}
|
|
41
51
|
};
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp,
|
|
1
|
+
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createActionProp, Triggers, StylesPanelSections, createDisabledProp } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Icon Button",
|
|
4
4
|
tag: "IconButton",
|
|
5
5
|
category: COMPONENT_TYPES.button,
|
|
6
6
|
layout: {},
|
|
7
|
-
triggers: [Triggers.OnPress],
|
|
7
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
8
8
|
stylesPanelSections: [StylesPanelSections.Margins, StylesPanelSections.Effects, StylesPanelSections.Position],
|
|
9
9
|
props: {
|
|
10
10
|
onPress: createActionProp(),
|
|
11
|
+
onLongPress: createActionProp(),
|
|
12
|
+
disabled: createDisabledProp(),
|
|
11
13
|
icon: createIconProp(),
|
|
12
14
|
color: createColorProp({
|
|
13
15
|
label: "Color",
|
|
14
16
|
group: GROUPS.basic
|
|
15
17
|
}),
|
|
16
|
-
disabled: createBoolProp({
|
|
17
|
-
label: "Disabled",
|
|
18
|
-
group: GROUPS.basic
|
|
19
|
-
}),
|
|
20
18
|
size: createNumberProp({
|
|
21
19
|
group: GROUPS.basic,
|
|
22
20
|
label: "Size",
|
|
23
21
|
description: "Width and height of your icon",
|
|
24
22
|
defaultValue: 32,
|
|
25
23
|
min: 16,
|
|
26
|
-
max:
|
|
24
|
+
max: 256,
|
|
27
25
|
step: 1,
|
|
28
26
|
precision: 0
|
|
29
27
|
})
|
|
@@ -17,7 +17,7 @@ export const SEED_DATA = {
|
|
|
17
17
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
18
18
|
label: "Show Horizontal Scroll Indicator",
|
|
19
19
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: true
|
|
21
21
|
}),
|
|
22
22
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
23
23
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, createDisabledProp, GROUPS, createStaticBoolProp } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Borders],
|
|
4
4
|
layout: {},
|
|
@@ -6,10 +6,11 @@ const SEED_DATA_PROPS = {
|
|
|
6
6
|
props: {
|
|
7
7
|
onPress: createActionProp(),
|
|
8
8
|
onLongPress: createActionProp(),
|
|
9
|
+
disabled: createDisabledProp(),
|
|
9
10
|
activeOpacity: createStaticNumberProp({
|
|
10
11
|
label: "Active Opacity",
|
|
11
12
|
description: "The opacity when the button is pressed.",
|
|
12
|
-
defaultValue:
|
|
13
|
+
defaultValue: null,
|
|
13
14
|
min: 0,
|
|
14
15
|
max: 1,
|
|
15
16
|
step: 0.01,
|
|
@@ -19,7 +20,7 @@ const SEED_DATA_PROPS = {
|
|
|
19
20
|
disabledOpacity: createStaticNumberProp({
|
|
20
21
|
label: "Disabled Opacity",
|
|
21
22
|
description: "The opacity when the button is disabled.",
|
|
22
|
-
defaultValue:
|
|
23
|
+
defaultValue: null,
|
|
23
24
|
min: 0,
|
|
24
25
|
max: 1,
|
|
25
26
|
step: 0.01,
|
|
@@ -35,6 +36,12 @@ const SEED_DATA_PROPS = {
|
|
|
35
36
|
label: "Hit Slop",
|
|
36
37
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
37
38
|
required: false
|
|
39
|
+
}),
|
|
40
|
+
android_disableSound: createStaticBoolProp({
|
|
41
|
+
label: "Disable Sound",
|
|
42
|
+
description: "Disable the Android sound effect.",
|
|
43
|
+
defaultValue: null,
|
|
44
|
+
group: GROUPS.android
|
|
38
45
|
})
|
|
39
46
|
}
|
|
40
47
|
};
|
|
@@ -11,6 +11,8 @@ declare type Props = {
|
|
|
11
11
|
onPress: () => void;
|
|
12
12
|
theme: Theme;
|
|
13
13
|
style?: StyleProp<ViewStyle>;
|
|
14
|
+
activeOpacity?: number;
|
|
15
|
+
disabledOpacity?: number;
|
|
14
16
|
} & PressableProps & IconSlot;
|
|
15
17
|
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
|
|
16
18
|
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,cAAc,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,cAAc,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,GAChB,QAAQ,CAAC;;;;AA4DX,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAmB,EACnB,eAAqB,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAa,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAa,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAmB,EACnB,eAAqB,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
|
|
@@ -83,6 +83,26 @@ export declare const SEED_DATA: ({
|
|
|
83
83
|
formType: string;
|
|
84
84
|
propType: string;
|
|
85
85
|
};
|
|
86
|
+
showsHorizontalScrollIndicator: {
|
|
87
|
+
label: string;
|
|
88
|
+
description: string;
|
|
89
|
+
formType: string;
|
|
90
|
+
propType: string;
|
|
91
|
+
defaultValue: boolean;
|
|
92
|
+
editable: boolean;
|
|
93
|
+
required: boolean;
|
|
94
|
+
group: string;
|
|
95
|
+
};
|
|
96
|
+
showsVerticalScrollIndicator: {
|
|
97
|
+
label: string;
|
|
98
|
+
description: string;
|
|
99
|
+
formType: string;
|
|
100
|
+
propType: string;
|
|
101
|
+
defaultValue: boolean;
|
|
102
|
+
editable: boolean;
|
|
103
|
+
required: boolean;
|
|
104
|
+
group: string;
|
|
105
|
+
};
|
|
86
106
|
horizontal?: undefined;
|
|
87
107
|
inverted?: undefined;
|
|
88
108
|
};
|
|
@@ -191,6 +211,26 @@ export declare const SEED_DATA: ({
|
|
|
191
211
|
formType: string;
|
|
192
212
|
propType: string;
|
|
193
213
|
};
|
|
214
|
+
showsHorizontalScrollIndicator: {
|
|
215
|
+
label: string;
|
|
216
|
+
description: string;
|
|
217
|
+
formType: string;
|
|
218
|
+
propType: string;
|
|
219
|
+
defaultValue: boolean;
|
|
220
|
+
editable: boolean;
|
|
221
|
+
required: boolean;
|
|
222
|
+
group: string;
|
|
223
|
+
};
|
|
224
|
+
showsVerticalScrollIndicator: {
|
|
225
|
+
label: string;
|
|
226
|
+
description: string;
|
|
227
|
+
formType: string;
|
|
228
|
+
propType: string;
|
|
229
|
+
defaultValue: boolean;
|
|
230
|
+
editable: boolean;
|
|
231
|
+
required: boolean;
|
|
232
|
+
group: string;
|
|
233
|
+
};
|
|
194
234
|
};
|
|
195
235
|
})[];
|
|
196
236
|
//# sourceMappingURL=FlashList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
|
|
@@ -91,6 +91,26 @@ export declare const SEED_DATA: {
|
|
|
91
91
|
formType: string;
|
|
92
92
|
propType: string;
|
|
93
93
|
};
|
|
94
|
+
showsHorizontalScrollIndicator: {
|
|
95
|
+
label: string;
|
|
96
|
+
description: string;
|
|
97
|
+
formType: string;
|
|
98
|
+
propType: string;
|
|
99
|
+
defaultValue: boolean;
|
|
100
|
+
editable: boolean;
|
|
101
|
+
required: boolean;
|
|
102
|
+
group: string;
|
|
103
|
+
};
|
|
104
|
+
showsVerticalScrollIndicator: {
|
|
105
|
+
label: string;
|
|
106
|
+
description: string;
|
|
107
|
+
formType: string;
|
|
108
|
+
propType: string;
|
|
109
|
+
defaultValue: boolean;
|
|
110
|
+
editable: boolean;
|
|
111
|
+
required: boolean;
|
|
112
|
+
group: string;
|
|
113
|
+
};
|
|
94
114
|
};
|
|
95
115
|
};
|
|
96
116
|
//# sourceMappingURL=FlatList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDrB,CAAC"}
|
|
@@ -16,35 +16,45 @@ export declare const SEED_DATA: {
|
|
|
16
16
|
defaultValue: null;
|
|
17
17
|
group: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
onLongPress: {
|
|
20
20
|
label: string;
|
|
21
21
|
description: string;
|
|
22
|
+
editable: boolean;
|
|
23
|
+
required: boolean;
|
|
22
24
|
formType: string;
|
|
23
25
|
propType: string;
|
|
24
|
-
defaultValue:
|
|
25
|
-
required: boolean;
|
|
26
|
-
editable: boolean;
|
|
26
|
+
defaultValue: null;
|
|
27
27
|
group: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
group: string;
|
|
29
|
+
disabled: {
|
|
31
30
|
label: string;
|
|
32
31
|
description: string;
|
|
32
|
+
group: string;
|
|
33
33
|
editable: boolean;
|
|
34
34
|
required: boolean;
|
|
35
|
-
defaultValue: null;
|
|
36
35
|
formType: string;
|
|
37
36
|
propType: string;
|
|
37
|
+
defaultValue: null;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
icon: {
|
|
40
40
|
label: string;
|
|
41
41
|
description: string;
|
|
42
42
|
formType: string;
|
|
43
43
|
propType: string;
|
|
44
|
-
defaultValue:
|
|
45
|
-
editable: boolean;
|
|
44
|
+
defaultValue: string;
|
|
46
45
|
required: boolean;
|
|
46
|
+
editable: boolean;
|
|
47
|
+
group: string;
|
|
48
|
+
};
|
|
49
|
+
color: {
|
|
47
50
|
group: string;
|
|
51
|
+
label: string;
|
|
52
|
+
description: string;
|
|
53
|
+
editable: boolean;
|
|
54
|
+
required: boolean;
|
|
55
|
+
defaultValue: null;
|
|
56
|
+
formType: string;
|
|
57
|
+
propType: string;
|
|
48
58
|
};
|
|
49
59
|
size: {
|
|
50
60
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/mappings/IconButton.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/mappings/IconButton.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrB,CAAC"}
|
|
@@ -23,6 +23,16 @@ export declare const SEED_DATA: {
|
|
|
23
23
|
defaultValue: null;
|
|
24
24
|
group: string;
|
|
25
25
|
};
|
|
26
|
+
disabled: {
|
|
27
|
+
label: string;
|
|
28
|
+
description: string;
|
|
29
|
+
group: string;
|
|
30
|
+
editable: boolean;
|
|
31
|
+
required: boolean;
|
|
32
|
+
formType: string;
|
|
33
|
+
propType: string;
|
|
34
|
+
defaultValue: null;
|
|
35
|
+
};
|
|
26
36
|
activeOpacity: {
|
|
27
37
|
label: string;
|
|
28
38
|
description: string;
|
|
@@ -67,6 +77,16 @@ export declare const SEED_DATA: {
|
|
|
67
77
|
required: boolean;
|
|
68
78
|
step: number;
|
|
69
79
|
};
|
|
80
|
+
android_disableSound: {
|
|
81
|
+
label: string;
|
|
82
|
+
description: string;
|
|
83
|
+
formType: string;
|
|
84
|
+
propType: string;
|
|
85
|
+
defaultValue: boolean;
|
|
86
|
+
editable: boolean;
|
|
87
|
+
required: boolean;
|
|
88
|
+
group: string;
|
|
89
|
+
};
|
|
70
90
|
};
|
|
71
91
|
name: string;
|
|
72
92
|
tag: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"AAgEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAerB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "47.1.1-
|
|
3
|
+
"version": "47.1.1-ca8570.2+ca85708",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^47.1.1-
|
|
44
|
+
"@draftbit/types": "^47.1.1-ca8570.2+ca85708",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.4",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "ca857084563cd1d4242b340f362f57c112b42ee7"
|
|
95
95
|
}
|
package/src/components/Button.js
CHANGED
|
@@ -7,7 +7,7 @@ const CONSTANTS = {
|
|
|
7
7
|
padding: 8,
|
|
8
8
|
icon: 24,
|
|
9
9
|
};
|
|
10
|
-
function Base({ Icon, icon, title, loading, disabled, style, activeOpacity, disabledOpacity, ...props }) {
|
|
10
|
+
function Base({ Icon, icon, title, loading, disabled, style, activeOpacity = 0.8, disabledOpacity = 0.8, ...props }) {
|
|
11
11
|
const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});
|
|
12
12
|
const titleStyles = {
|
|
13
13
|
color,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, ActivityIndicator, Pressable, Platform, } from "react-native";
|
|
3
3
|
import { withTheme } from "../theming";
|
|
4
|
-
const IconButton = ({ Icon, icon, color: customColor, size = 32, disabled
|
|
4
|
+
const IconButton = ({ Icon, icon, color: customColor, size = 32, disabled, loading = false, onPress, theme, style, activeOpacity = 0.8, disabledOpacity = 0.8, ...props }) => {
|
|
5
5
|
const iconColor = customColor || theme.colors.primary;
|
|
6
6
|
return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {
|
|
7
7
|
return [
|
|
8
8
|
styles.container,
|
|
9
9
|
{
|
|
10
|
-
opacity: pressed
|
|
10
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
11
11
|
width: size,
|
|
12
12
|
height: size,
|
|
13
13
|
alignItems: "center",
|
|
@@ -22,6 +22,8 @@ type Props = {
|
|
|
22
22
|
onPress: () => void;
|
|
23
23
|
theme: Theme;
|
|
24
24
|
style?: StyleProp<ViewStyle>;
|
|
25
|
+
activeOpacity?: number;
|
|
26
|
+
disabledOpacity?: number;
|
|
25
27
|
} & PressableProps &
|
|
26
28
|
IconSlot;
|
|
27
29
|
|
|
@@ -30,11 +32,13 @@ const IconButton: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
30
32
|
icon,
|
|
31
33
|
color: customColor,
|
|
32
34
|
size = 32,
|
|
33
|
-
disabled
|
|
35
|
+
disabled,
|
|
34
36
|
loading = false,
|
|
35
37
|
onPress,
|
|
36
38
|
theme,
|
|
37
39
|
style,
|
|
40
|
+
activeOpacity = 0.8,
|
|
41
|
+
disabledOpacity = 0.8,
|
|
38
42
|
...props
|
|
39
43
|
}) => {
|
|
40
44
|
const iconColor = customColor || theme.colors.primary;
|
|
@@ -47,7 +51,7 @@ const IconButton: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
47
51
|
return [
|
|
48
52
|
styles.container,
|
|
49
53
|
{
|
|
50
|
-
opacity: pressed
|
|
54
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
51
55
|
width: size,
|
|
52
56
|
height: size,
|
|
53
57
|
alignItems: "center",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable as NativePressable, } from "react-native";
|
|
3
|
-
export default function Pressable({ children, disabled, onPress, activeOpacity, disabledOpacity, delayLongPress, hitSlop, style, ...props }) {
|
|
3
|
+
export default function Pressable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
|
|
4
4
|
return (React.createElement(NativePressable, { onPress: onPress, disabled: disabled, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
|
|
5
5
|
return [
|
|
6
6
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable } from "react-native";
|
|
3
|
-
export default function Touchable({ children, disabled, onPress, activeOpacity, disabledOpacity, delayLongPress, hitSlop, style, ...props }) {
|
|
3
|
+
export default function Touchable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
|
|
4
4
|
return (React.createElement(Pressable, { disabled: disabled, onPress: onPress, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
|
|
5
5
|
return [
|
|
6
6
|
{
|
package/src/mappings/Button.js
CHANGED
|
@@ -17,7 +17,7 @@ const SEED_DATA_PROPS = {
|
|
|
17
17
|
activeOpacity: createStaticNumberProp({
|
|
18
18
|
label: "Active Opacity",
|
|
19
19
|
description: "Opacity of the button when active.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: null,
|
|
21
21
|
min: 0,
|
|
22
22
|
max: 1,
|
|
23
23
|
step: 0.01,
|
|
@@ -27,7 +27,7 @@ const SEED_DATA_PROPS = {
|
|
|
27
27
|
disabledOpacity: createStaticNumberProp({
|
|
28
28
|
label: "Disabled Opacity",
|
|
29
29
|
description: "Opacity of the button when disabled.",
|
|
30
|
-
defaultValue:
|
|
30
|
+
defaultValue: null,
|
|
31
31
|
min: 0,
|
|
32
32
|
max: 1,
|
|
33
33
|
step: 0.01,
|
package/src/mappings/Button.ts
CHANGED
|
@@ -28,7 +28,7 @@ const SEED_DATA_PROPS = {
|
|
|
28
28
|
activeOpacity: createStaticNumberProp({
|
|
29
29
|
label: "Active Opacity",
|
|
30
30
|
description: "Opacity of the button when active.",
|
|
31
|
-
defaultValue:
|
|
31
|
+
defaultValue: null,
|
|
32
32
|
min: 0,
|
|
33
33
|
max: 1,
|
|
34
34
|
step: 0.01,
|
|
@@ -38,7 +38,7 @@ const SEED_DATA_PROPS = {
|
|
|
38
38
|
disabledOpacity: createStaticNumberProp({
|
|
39
39
|
label: "Disabled Opacity",
|
|
40
40
|
description: "Opacity of the button when disabled.",
|
|
41
|
-
defaultValue:
|
|
41
|
+
defaultValue: null,
|
|
42
42
|
min: 0,
|
|
43
43
|
max: 1,
|
|
44
44
|
step: 0.01,
|
|
@@ -39,6 +39,16 @@ export const SEED_DATA = [
|
|
|
39
39
|
label: "Refreshing Color",
|
|
40
40
|
description: "Color of the refresh indicator",
|
|
41
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
|
+
}),
|
|
42
52
|
},
|
|
43
53
|
},
|
|
44
54
|
{
|
|
@@ -88,6 +98,16 @@ export const SEED_DATA = [
|
|
|
88
98
|
label: "Refreshing Color",
|
|
89
99
|
description: "Color of the refresh indicator",
|
|
90
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
|
+
}),
|
|
91
111
|
},
|
|
92
112
|
},
|
|
93
113
|
];
|
|
@@ -52,6 +52,18 @@ export const SEED_DATA = [
|
|
|
52
52
|
label: "Refreshing Color",
|
|
53
53
|
description: "Color of the refresh indicator",
|
|
54
54
|
}),
|
|
55
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
56
|
+
label: "Show Horizontal Scroll Indicator",
|
|
57
|
+
description:
|
|
58
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
}),
|
|
61
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
62
|
+
label: "Show Vertical Scroll Indicator",
|
|
63
|
+
description:
|
|
64
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
65
|
+
defaultValue: true,
|
|
66
|
+
}),
|
|
55
67
|
},
|
|
56
68
|
},
|
|
57
69
|
{
|
|
@@ -102,6 +114,18 @@ export const SEED_DATA = [
|
|
|
102
114
|
label: "Refreshing Color",
|
|
103
115
|
description: "Color of the refresh indicator",
|
|
104
116
|
}),
|
|
117
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
118
|
+
label: "Show Horizontal Scroll Indicator",
|
|
119
|
+
description:
|
|
120
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
121
|
+
defaultValue: true,
|
|
122
|
+
}),
|
|
123
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
124
|
+
label: "Show Vertical Scroll Indicator",
|
|
125
|
+
description:
|
|
126
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
127
|
+
defaultValue: true,
|
|
128
|
+
}),
|
|
105
129
|
},
|
|
106
130
|
},
|
|
107
131
|
];
|
package/src/mappings/FlatList.js
CHANGED
|
@@ -37,5 +37,15 @@ export const SEED_DATA = {
|
|
|
37
37
|
label: "Refreshing Color",
|
|
38
38
|
description: "Color of the refresh indicator",
|
|
39
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
|
+
}),
|
|
40
50
|
},
|
|
41
51
|
};
|
package/src/mappings/FlatList.ts
CHANGED
|
@@ -48,5 +48,17 @@ export const SEED_DATA = {
|
|
|
48
48
|
label: "Refreshing Color",
|
|
49
49
|
description: "Color of the refresh indicator",
|
|
50
50
|
}),
|
|
51
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
52
|
+
label: "Show Horizontal Scroll Indicator",
|
|
53
|
+
description:
|
|
54
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
55
|
+
defaultValue: true,
|
|
56
|
+
}),
|
|
57
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
58
|
+
label: "Show Vertical Scroll Indicator",
|
|
59
|
+
description:
|
|
60
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
61
|
+
defaultValue: true,
|
|
62
|
+
}),
|
|
51
63
|
},
|
|
52
64
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp,
|
|
1
|
+
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createActionProp, Triggers, StylesPanelSections, createDisabledProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Icon Button",
|
|
4
4
|
tag: "IconButton",
|
|
5
5
|
category: COMPONENT_TYPES.button,
|
|
6
6
|
layout: {},
|
|
7
|
-
triggers: [Triggers.OnPress],
|
|
7
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
8
8
|
stylesPanelSections: [
|
|
9
9
|
StylesPanelSections.Margins,
|
|
10
10
|
StylesPanelSections.Effects,
|
|
@@ -12,22 +12,20 @@ export const SEED_DATA = {
|
|
|
12
12
|
],
|
|
13
13
|
props: {
|
|
14
14
|
onPress: createActionProp(),
|
|
15
|
+
onLongPress: createActionProp(),
|
|
16
|
+
disabled: createDisabledProp(),
|
|
15
17
|
icon: createIconProp(),
|
|
16
18
|
color: createColorProp({
|
|
17
19
|
label: "Color",
|
|
18
20
|
group: GROUPS.basic,
|
|
19
21
|
}),
|
|
20
|
-
disabled: createBoolProp({
|
|
21
|
-
label: "Disabled",
|
|
22
|
-
group: GROUPS.basic,
|
|
23
|
-
}),
|
|
24
22
|
size: createNumberProp({
|
|
25
23
|
group: GROUPS.basic,
|
|
26
24
|
label: "Size",
|
|
27
25
|
description: "Width and height of your icon",
|
|
28
26
|
defaultValue: 32,
|
|
29
27
|
min: 16,
|
|
30
|
-
max:
|
|
28
|
+
max: 256,
|
|
31
29
|
step: 1,
|
|
32
30
|
precision: 0,
|
|
33
31
|
}),
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
createIconProp,
|
|
5
5
|
createColorProp,
|
|
6
6
|
createNumberProp,
|
|
7
|
-
createBoolProp,
|
|
8
7
|
createActionProp,
|
|
9
8
|
Triggers,
|
|
10
9
|
StylesPanelSections,
|
|
10
|
+
createDisabledProp,
|
|
11
11
|
} from "@draftbit/types";
|
|
12
12
|
|
|
13
13
|
export const SEED_DATA = {
|
|
@@ -15,7 +15,7 @@ export const SEED_DATA = {
|
|
|
15
15
|
tag: "IconButton",
|
|
16
16
|
category: COMPONENT_TYPES.button,
|
|
17
17
|
layout: {},
|
|
18
|
-
triggers: [Triggers.OnPress],
|
|
18
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
19
19
|
stylesPanelSections: [
|
|
20
20
|
StylesPanelSections.Margins,
|
|
21
21
|
StylesPanelSections.Effects,
|
|
@@ -23,22 +23,20 @@ export const SEED_DATA = {
|
|
|
23
23
|
],
|
|
24
24
|
props: {
|
|
25
25
|
onPress: createActionProp(),
|
|
26
|
+
onLongPress: createActionProp(),
|
|
27
|
+
disabled: createDisabledProp(),
|
|
26
28
|
icon: createIconProp(),
|
|
27
29
|
color: createColorProp({
|
|
28
30
|
label: "Color",
|
|
29
31
|
group: GROUPS.basic,
|
|
30
32
|
}),
|
|
31
|
-
disabled: createBoolProp({
|
|
32
|
-
label: "Disabled",
|
|
33
|
-
group: GROUPS.basic,
|
|
34
|
-
}),
|
|
35
33
|
size: createNumberProp({
|
|
36
34
|
group: GROUPS.basic,
|
|
37
35
|
label: "Size",
|
|
38
36
|
description: "Width and height of your icon",
|
|
39
37
|
defaultValue: 32,
|
|
40
38
|
min: 16,
|
|
41
|
-
max:
|
|
39
|
+
max: 256,
|
|
42
40
|
step: 1,
|
|
43
41
|
precision: 0,
|
|
44
42
|
}),
|
|
@@ -17,7 +17,7 @@ export const SEED_DATA = {
|
|
|
17
17
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
18
18
|
label: "Show Horizontal Scroll Indicator",
|
|
19
19
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: true,
|
|
21
21
|
}),
|
|
22
22
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
23
23
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -26,7 +26,7 @@ export const SEED_DATA = {
|
|
|
26
26
|
label: "Show Horizontal Scroll Indicator",
|
|
27
27
|
description:
|
|
28
28
|
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
29
|
-
defaultValue:
|
|
29
|
+
defaultValue: true,
|
|
30
30
|
}),
|
|
31
31
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
32
32
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, createDisabledProp, GROUPS, createStaticBoolProp, } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
stylesPanelSections: [
|
|
4
4
|
StylesPanelSections.Size,
|
|
@@ -10,10 +10,11 @@ const SEED_DATA_PROPS = {
|
|
|
10
10
|
props: {
|
|
11
11
|
onPress: createActionProp(),
|
|
12
12
|
onLongPress: createActionProp(),
|
|
13
|
+
disabled: createDisabledProp(),
|
|
13
14
|
activeOpacity: createStaticNumberProp({
|
|
14
15
|
label: "Active Opacity",
|
|
15
16
|
description: "The opacity when the button is pressed.",
|
|
16
|
-
defaultValue:
|
|
17
|
+
defaultValue: null,
|
|
17
18
|
min: 0,
|
|
18
19
|
max: 1,
|
|
19
20
|
step: 0.01,
|
|
@@ -23,7 +24,7 @@ const SEED_DATA_PROPS = {
|
|
|
23
24
|
disabledOpacity: createStaticNumberProp({
|
|
24
25
|
label: "Disabled Opacity",
|
|
25
26
|
description: "The opacity when the button is disabled.",
|
|
26
|
-
defaultValue:
|
|
27
|
+
defaultValue: null,
|
|
27
28
|
min: 0,
|
|
28
29
|
max: 1,
|
|
29
30
|
step: 0.01,
|
|
@@ -40,6 +41,12 @@ const SEED_DATA_PROPS = {
|
|
|
40
41
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
41
42
|
required: false,
|
|
42
43
|
}),
|
|
44
|
+
android_disableSound: createStaticBoolProp({
|
|
45
|
+
label: "Disable Sound",
|
|
46
|
+
description: "Disable the Android sound effect.",
|
|
47
|
+
defaultValue: null,
|
|
48
|
+
group: GROUPS.android,
|
|
49
|
+
}),
|
|
43
50
|
},
|
|
44
51
|
};
|
|
45
52
|
export const SEED_DATA = [
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
Triggers,
|
|
5
5
|
createStaticNumberProp,
|
|
6
6
|
StylesPanelSections,
|
|
7
|
+
createDisabledProp,
|
|
8
|
+
GROUPS,
|
|
9
|
+
createStaticBoolProp,
|
|
7
10
|
} from "@draftbit/types";
|
|
8
11
|
|
|
9
12
|
const SEED_DATA_PROPS = {
|
|
@@ -17,10 +20,11 @@ const SEED_DATA_PROPS = {
|
|
|
17
20
|
props: {
|
|
18
21
|
onPress: createActionProp(),
|
|
19
22
|
onLongPress: createActionProp(),
|
|
23
|
+
disabled: createDisabledProp(),
|
|
20
24
|
activeOpacity: createStaticNumberProp({
|
|
21
25
|
label: "Active Opacity",
|
|
22
26
|
description: "The opacity when the button is pressed.",
|
|
23
|
-
defaultValue:
|
|
27
|
+
defaultValue: null,
|
|
24
28
|
min: 0,
|
|
25
29
|
max: 1,
|
|
26
30
|
step: 0.01,
|
|
@@ -30,7 +34,7 @@ const SEED_DATA_PROPS = {
|
|
|
30
34
|
disabledOpacity: createStaticNumberProp({
|
|
31
35
|
label: "Disabled Opacity",
|
|
32
36
|
description: "The opacity when the button is disabled.",
|
|
33
|
-
defaultValue:
|
|
37
|
+
defaultValue: null,
|
|
34
38
|
min: 0,
|
|
35
39
|
max: 1,
|
|
36
40
|
step: 0.01,
|
|
@@ -49,6 +53,12 @@ const SEED_DATA_PROPS = {
|
|
|
49
53
|
"Sets additional distance outside of element in which a press can be detected.",
|
|
50
54
|
required: false,
|
|
51
55
|
}),
|
|
56
|
+
android_disableSound: createStaticBoolProp({
|
|
57
|
+
label: "Disable Sound",
|
|
58
|
+
description: "Disable the Android sound effect.",
|
|
59
|
+
defaultValue: null,
|
|
60
|
+
group: GROUPS.android,
|
|
61
|
+
}),
|
|
52
62
|
},
|
|
53
63
|
};
|
|
54
64
|
|