@draftbit/core 47.0.1-54c307.2 → 47.0.1-9e8c6d.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 +3 -3
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -3
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +1 -2
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -2
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +3 -27
- package/lib/commonjs/components/DeprecatedFAB.js +1 -2
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
- package/lib/commonjs/components/Pressable.js +37 -0
- package/lib/commonjs/components/ProgressBar.js +37 -7
- package/lib/commonjs/components/Swiper/Swiper.js +2 -0
- package/lib/commonjs/components/Touchable.js +8 -3
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/mappings/Button.js +39 -10
- package/lib/commonjs/mappings/FlashList.js +45 -2
- package/lib/commonjs/mappings/FlatList.js +12 -0
- package/lib/commonjs/mappings/Swiper.js +2 -0
- package/lib/commonjs/mappings/Touchable.js +47 -7
- package/lib/module/components/Button.js +3 -3
- package/lib/module/components/Checkbox/Checkbox.js +2 -3
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +2 -3
- package/lib/module/components/Checkbox/CheckboxRow.js +2 -3
- package/lib/module/components/DatePicker/DatePicker.js +1 -1
- package/lib/module/components/DeprecatedButton.js +4 -28
- package/lib/module/components/DeprecatedFAB.js +2 -3
- package/lib/module/components/Pressable.js +30 -0
- package/lib/module/components/Swiper/Swiper.js +2 -0
- package/lib/module/components/Touchable.js +8 -3
- package/lib/module/constants.js +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/Button.js +40 -11
- package/lib/module/mappings/FlashList.js +46 -3
- package/lib/module/mappings/FlatList.js +13 -1
- package/lib/module/mappings/Swiper.js +3 -1
- package/lib/module/mappings/Touchable.js +49 -9
- package/lib/typescript/src/components/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
- package/lib/typescript/src/components/Pressable.d.ts +10 -0
- package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts +5 -6
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Button.d.ts +113 -4
- package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Swiper.d.ts +11 -0
- package/lib/typescript/src/mappings/Swiper.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +59 -5
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Button.js +3 -3
- package/src/components/Button.tsx +14 -4
- package/src/components/Checkbox/Checkbox.js +2 -3
- package/src/components/Checkbox/Checkbox.tsx +5 -7
- package/src/components/Checkbox/CheckboxGroupRow.js +2 -3
- package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
- package/src/components/Checkbox/CheckboxRow.js +2 -3
- package/src/components/Checkbox/CheckboxRow.tsx +3 -3
- package/src/components/DatePicker/DatePicker.js +1 -1
- package/src/components/DatePicker/DatePicker.tsx +1 -1
- package/src/components/DeprecatedButton.js +4 -16
- package/src/components/DeprecatedButton.tsx +7 -31
- package/src/components/DeprecatedFAB.js +2 -3
- package/src/components/DeprecatedFAB.tsx +5 -5
- package/src/components/Pressable.js +12 -0
- package/src/components/Pressable.tsx +44 -0
- package/src/components/Swiper/Swiper.js +2 -2
- package/src/components/Swiper/Swiper.tsx +3 -0
- package/src/components/Touchable.js +3 -3
- package/src/components/Touchable.tsx +11 -7
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Button.js +39 -10
- package/src/mappings/Button.ts +41 -10
- package/src/mappings/FlashList.js +77 -31
- package/src/mappings/FlashList.ts +82 -30
- package/src/mappings/FlatList.js +13 -1
- package/src/mappings/FlatList.ts +16 -0
- package/src/mappings/Swiper.js +3 -1
- package/src/mappings/Swiper.ts +4 -0
- package/src/mappings/Touchable.js +50 -7
- package/src/mappings/Touchable.ts +53 -6
|
@@ -2,22 +2,69 @@ import {
|
|
|
2
2
|
COMPONENT_TYPES,
|
|
3
3
|
createActionProp,
|
|
4
4
|
Triggers,
|
|
5
|
+
createStaticNumberProp,
|
|
5
6
|
StylesPanelSections,
|
|
6
7
|
} from "@draftbit/types";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
name: "Touchable",
|
|
10
|
-
tag: "Touchable",
|
|
11
|
-
description: "Simple button with no styles",
|
|
12
|
-
category: COMPONENT_TYPES.button,
|
|
9
|
+
const SEED_DATA_PROPS = {
|
|
13
10
|
stylesPanelSections: [
|
|
14
11
|
StylesPanelSections.Size,
|
|
15
12
|
StylesPanelSections.Margins,
|
|
16
13
|
StylesPanelSections.Borders,
|
|
17
14
|
],
|
|
18
15
|
layout: {},
|
|
19
|
-
triggers: [Triggers.OnPress],
|
|
16
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
20
17
|
props: {
|
|
21
18
|
onPress: createActionProp(),
|
|
19
|
+
onLongPress: createActionProp(),
|
|
20
|
+
activeOpacity: createStaticNumberProp({
|
|
21
|
+
label: "Active Opacity",
|
|
22
|
+
description: "The opacity when the button is pressed.",
|
|
23
|
+
defaultValue: 0.8,
|
|
24
|
+
min: 0,
|
|
25
|
+
max: 1,
|
|
26
|
+
step: 0.01,
|
|
27
|
+
precision: 2,
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
disabledOpacity: createStaticNumberProp({
|
|
31
|
+
label: "Disabled Opacity",
|
|
32
|
+
description: "The opacity when the button is disabled.",
|
|
33
|
+
defaultValue: 0.8,
|
|
34
|
+
min: 0,
|
|
35
|
+
max: 1,
|
|
36
|
+
step: 0.01,
|
|
37
|
+
precision: 2,
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
delayLongPress: createStaticNumberProp({
|
|
41
|
+
label: "Delay Long Press",
|
|
42
|
+
description:
|
|
43
|
+
"Duration (in milliseconds) from onPressIn before onLongPress is called.",
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
hitSlop: createStaticNumberProp({
|
|
47
|
+
label: "Hit Slop",
|
|
48
|
+
description:
|
|
49
|
+
"Sets additional distance outside of element in which a press can be detected.",
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
22
52
|
},
|
|
23
53
|
};
|
|
54
|
+
|
|
55
|
+
export const SEED_DATA = [
|
|
56
|
+
{
|
|
57
|
+
name: "Touchable",
|
|
58
|
+
tag: "Touchable",
|
|
59
|
+
description: "An interactive view with no styles",
|
|
60
|
+
category: COMPONENT_TYPES.button,
|
|
61
|
+
...SEED_DATA_PROPS,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "Pressable",
|
|
65
|
+
tag: "Pressable",
|
|
66
|
+
description: "An interactive view with no styles",
|
|
67
|
+
category: COMPONENT_TYPES.button,
|
|
68
|
+
...SEED_DATA_PROPS,
|
|
69
|
+
},
|
|
70
|
+
];
|