@draftbit/core 47.0.1-cc5ccc.2 → 47.0.1-df014a.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 +15 -27
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
- package/lib/commonjs/components/DeprecatedButton.js +151 -0
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
- package/lib/commonjs/components/DeprecatedFAB.js +2 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -3
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
- package/lib/commonjs/components/Touchable.js +11 -27
- package/lib/commonjs/components/Touchable.web.js +9 -0
- package/lib/commonjs/mappings/Button.js +10 -13
- package/lib/commonjs/mappings/DatePickerModal.js +74 -0
- package/lib/commonjs/mappings/Touchable.js +20 -0
- package/lib/module/components/AvatarEdit.js +15 -4
- package/lib/module/components/Button.js +9 -21
- package/lib/module/components/CardBlock.js +14 -4
- package/lib/module/components/Checkbox/Checkbox.js +3 -2
- package/lib/module/components/CircleImage.js +16 -1
- package/lib/module/components/DeprecatedButton.js +141 -0
- package/lib/module/components/DeprecatedCardWrapper.js +20 -3
- package/lib/module/components/DeprecatedFAB.js +3 -2
- package/lib/module/components/FAB.js +22 -4
- package/lib/module/components/Picker/Picker.js +4 -3
- package/lib/module/components/Picker/PickerComponent.ios.js +37 -12
- package/lib/module/components/Picker/PickerComponent.web.js +21 -3
- package/lib/module/components/Switch.js +21 -10
- package/lib/module/components/TextField.js +78 -28
- package/lib/module/components/Touchable.js +28 -26
- package/lib/module/components/Touchable.web.js +2 -0
- package/lib/module/mappings/Button.js +11 -14
- package/lib/module/mappings/DatePickerModal.js +65 -0
- package/lib/module/mappings/Touchable.js +13 -0
- package/lib/typescript/src/components/Button.d.ts +0 -2
- 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/DeprecatedButton.d.ts +54 -0
- package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.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/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts +2 -9
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
- package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
- package/lib/typescript/src/mappings/Button.d.ts +4 -113
- package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
- package/lib/typescript/src/mappings/DatePickerModal.d.ts +153 -0
- package/lib/typescript/src/mappings/DatePickerModal.d.ts.map +1 -0
- package/lib/typescript/src/mappings/Touchable.d.ts +22 -0
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Button.js +11 -18
- package/src/components/Button.tsx +11 -45
- package/src/components/Checkbox/Checkbox.js +3 -2
- package/src/components/Checkbox/Checkbox.tsx +7 -5
- package/src/components/DeprecatedButton.js +95 -0
- package/src/components/DeprecatedButton.tsx +214 -0
- package/src/components/DeprecatedCardWrapper.js +2 -2
- package/src/components/DeprecatedCardWrapper.tsx +4 -3
- package/src/components/DeprecatedFAB.js +3 -2
- package/src/components/DeprecatedFAB.tsx +5 -5
- package/src/components/Picker/Picker.js +4 -3
- package/src/components/Picker/Picker.tsx +4 -4
- package/src/components/Picker/PickerComponent.ios.js +1 -1
- package/src/components/Picker/PickerComponent.ios.tsx +1 -1
- package/src/components/Touchable.js +11 -16
- package/src/components/Touchable.tsx +11 -42
- package/src/components/Touchable.web.js +2 -0
- package/src/components/Touchable.web.tsx +3 -0
- package/src/mappings/Button.js +10 -13
- package/src/mappings/Button.ts +10 -13
- package/src/mappings/DatePickerModal.js +73 -0
- package/src/mappings/DatePickerModal.ts +91 -0
- package/src/mappings/Touchable.js +17 -0
- package/src/mappings/Touchable.ts +23 -0
- package/lib/commonjs/components/Pressable.js +0 -48
- package/lib/commonjs/mappings/Pressable.js +0 -52
- package/lib/module/components/Pressable.js +0 -40
- package/lib/module/mappings/Pressable.js +0 -45
- package/lib/typescript/src/components/Pressable.d.ts +0 -18
- package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Pressable.d.ts +0 -76
- package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
- package/src/components/Pressable.js +0 -17
- package/src/components/Pressable.tsx +0 -67
- package/src/mappings/Pressable.js +0 -52
- package/src/mappings/Pressable.ts +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
createActionProp,
|
|
4
|
-
Triggers,
|
|
5
|
-
createNumberProp,
|
|
6
|
-
StylesPanelSections,
|
|
7
|
-
GROUPS,
|
|
8
|
-
} from "@draftbit/types";
|
|
9
|
-
|
|
10
|
-
const SEED_DATA_PROPS = {
|
|
11
|
-
stylesPanelSections: [
|
|
12
|
-
StylesPanelSections.Size,
|
|
13
|
-
StylesPanelSections.Margins,
|
|
14
|
-
StylesPanelSections.Borders,
|
|
15
|
-
],
|
|
16
|
-
layout: {},
|
|
17
|
-
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
18
|
-
props: {
|
|
19
|
-
onPress: createActionProp(),
|
|
20
|
-
onLongPress: createActionProp(),
|
|
21
|
-
activeOpacity: createNumberProp({
|
|
22
|
-
label: "Active Opacity",
|
|
23
|
-
description: "The opacity when the button is pressed.",
|
|
24
|
-
defaultValue: 0.8,
|
|
25
|
-
group: GROUPS.basic,
|
|
26
|
-
}),
|
|
27
|
-
disabledOpacity: createNumberProp({
|
|
28
|
-
label: "Disabled Opacity",
|
|
29
|
-
description: "The opacity when the button is disabled.",
|
|
30
|
-
defaultValue: 0.8,
|
|
31
|
-
group: GROUPS.basic,
|
|
32
|
-
}),
|
|
33
|
-
delayLongPress: createNumberProp({
|
|
34
|
-
label: "Delay Long Press",
|
|
35
|
-
description:
|
|
36
|
-
"Duration (in milliseconds) from onPressIn before onLongPress is called.",
|
|
37
|
-
group: GROUPS.basic,
|
|
38
|
-
}),
|
|
39
|
-
hitSlop: createNumberProp({
|
|
40
|
-
label: "Hit Slop",
|
|
41
|
-
description:
|
|
42
|
-
"Sets additional distance outside of element in which a press can be detected.",
|
|
43
|
-
group: GROUPS.basic,
|
|
44
|
-
}),
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const SEED_DATA = [
|
|
49
|
-
{
|
|
50
|
-
name: "Touchable",
|
|
51
|
-
tag: "Touchable",
|
|
52
|
-
description: "An interactive view with no styles",
|
|
53
|
-
category: COMPONENT_TYPES.button,
|
|
54
|
-
...SEED_DATA_PROPS,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "Pressable",
|
|
58
|
-
tag: "Pressable",
|
|
59
|
-
description: "An interactive view with no styles",
|
|
60
|
-
category: COMPONENT_TYPES.deprecated,
|
|
61
|
-
...SEED_DATA_PROPS,
|
|
62
|
-
},
|
|
63
|
-
];
|