@draftbit/core 47.1.1-cbba04.2 → 47.1.1-ee131b.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/Portal/PortalConsumer.js +22 -7
- 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 +3 -3
- package/lib/commonjs/mappings/FlatList.js +2 -2
- package/lib/commonjs/mappings/IconButton.js +4 -6
- package/lib/commonjs/mappings/MapView.js +3 -1
- package/lib/commonjs/mappings/ScrollView.js +1 -1
- package/lib/commonjs/mappings/Touchable.js +9 -2
- package/lib/module/components/Banner.js +4 -25
- package/lib/module/components/Button.js +2 -2
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/DeprecatedButton.js +3 -21
- package/lib/module/components/DeprecatedCardWrapper.js +1 -18
- package/lib/module/components/IconButton.js +4 -2
- package/lib/module/components/Layout.js +21 -42
- package/lib/module/components/Pressable.js +4 -17
- package/lib/module/components/ProgressBar.js +7 -39
- package/lib/module/components/StarRating.js +4 -24
- package/lib/module/components/StepIndicator.js +18 -58
- package/lib/module/components/Touchable.js +2 -2
- package/lib/module/mappings/Button.js +2 -2
- package/lib/module/mappings/FlashList.js +3 -3
- package/lib/module/mappings/FlatList.js +2 -2
- package/lib/module/mappings/IconButton.js +5 -7
- package/lib/module/mappings/MapView.js +3 -1
- 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/IconButton.d.ts +20 -10
- package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +2 -0
- package/lib/typescript/src/mappings/MapView.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 +3 -3
- package/src/mappings/FlashList.ts +3 -3
- package/src/mappings/FlatList.js +2 -2
- package/src/mappings/FlatList.ts +2 -2
- package/src/mappings/IconButton.js +5 -7
- package/src/mappings/IconButton.ts +5 -7
- package/src/mappings/MapView.js +2 -0
- package/src/mappings/MapView.ts +2 -0
- 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
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,
|
|
@@ -41,8 +41,8 @@ export const SEED_DATA = [
|
|
|
41
41
|
}),
|
|
42
42
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
43
43
|
label: "Show Horizontal Scroll Indicator",
|
|
44
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
45
|
-
defaultValue:
|
|
44
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
45
|
+
defaultValue: true,
|
|
46
46
|
}),
|
|
47
47
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
48
48
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -101,7 +101,7 @@ export const SEED_DATA = [
|
|
|
101
101
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
102
102
|
label: "Show Horizontal Scroll Indicator",
|
|
103
103
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
104
|
-
defaultValue:
|
|
104
|
+
defaultValue: true,
|
|
105
105
|
}),
|
|
106
106
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
107
107
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -55,8 +55,8 @@ export const SEED_DATA = [
|
|
|
55
55
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
56
56
|
label: "Show Horizontal Scroll Indicator",
|
|
57
57
|
description:
|
|
58
|
-
"When true, shows a horizontal scroll indicator. The default value is
|
|
59
|
-
defaultValue:
|
|
58
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
59
|
+
defaultValue: true,
|
|
60
60
|
}),
|
|
61
61
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
62
62
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -118,7 +118,7 @@ export const SEED_DATA = [
|
|
|
118
118
|
label: "Show Horizontal Scroll Indicator",
|
|
119
119
|
description:
|
|
120
120
|
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
121
|
-
defaultValue:
|
|
121
|
+
defaultValue: true,
|
|
122
122
|
}),
|
|
123
123
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
124
124
|
label: "Show Vertical Scroll Indicator",
|
package/src/mappings/FlatList.js
CHANGED
|
@@ -39,8 +39,8 @@ export const SEED_DATA = {
|
|
|
39
39
|
}),
|
|
40
40
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
41
41
|
label: "Show Horizontal Scroll Indicator",
|
|
42
|
-
description: "When true, shows a horizontal scroll indicator. The default value is
|
|
43
|
-
defaultValue:
|
|
42
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
43
|
+
defaultValue: true,
|
|
44
44
|
}),
|
|
45
45
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
46
46
|
label: "Show Vertical Scroll Indicator",
|
package/src/mappings/FlatList.ts
CHANGED
|
@@ -51,8 +51,8 @@ export const SEED_DATA = {
|
|
|
51
51
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
52
52
|
label: "Show Horizontal Scroll Indicator",
|
|
53
53
|
description:
|
|
54
|
-
"When true, shows a horizontal scroll indicator. The default value is
|
|
55
|
-
defaultValue:
|
|
54
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
55
|
+
defaultValue: true,
|
|
56
56
|
}),
|
|
57
57
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
58
58
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -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
|
}),
|
package/src/mappings/MapView.js
CHANGED
package/src/mappings/MapView.ts
CHANGED
|
@@ -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
|
|