@draftbit/core 48.10.2-935166.2 → 48.10.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/Pressable.js +1 -1
- package/lib/typescript/src/components/Pressable.d.ts +6 -2
- package/lib/typescript/src/components/Pressable.js +12 -2
- package/lib/typescript/src/components/Pressable.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/Pressable.js +12 -2
- package/src/components/Pressable.js.map +1 -1
- package/src/components/Pressable.tsx +22 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "48.10.2
|
|
3
|
+
"version": "48.10.2",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -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": "
|
|
44
|
+
"@draftbit/types": "48.3.0",
|
|
45
45
|
"@expo/vector-icons": "^13.0.0",
|
|
46
46
|
"@material-ui/core": "^4.11.0",
|
|
47
47
|
"@material-ui/pickers": "^3.2.10",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
],
|
|
116
116
|
"testEnvironment": "node"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "bc2be8eebd2fcd103123e126048b4e0ee9154c2a"
|
|
119
119
|
}
|
|
@@ -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 = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
|
|
3
|
+
export default function Pressable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, androidRippleColor, androidRippleBorderless, androidRippleRadius, androidRippleForeground, 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
|
{
|
|
@@ -8,6 +8,16 @@ export default function Pressable({ children, disabled, onPress, activeOpacity =
|
|
|
8
8
|
},
|
|
9
9
|
style,
|
|
10
10
|
];
|
|
11
|
-
},
|
|
11
|
+
}, android_ripple: androidRippleColor ||
|
|
12
|
+
androidRippleBorderless ||
|
|
13
|
+
androidRippleColor ||
|
|
14
|
+
androidRippleForeground
|
|
15
|
+
? {
|
|
16
|
+
radius: androidRippleRadius,
|
|
17
|
+
borderless: androidRippleBorderless,
|
|
18
|
+
color: androidRippleColor,
|
|
19
|
+
foreground: androidRippleForeground,
|
|
20
|
+
}
|
|
21
|
+
: null, ...props }, children));
|
|
12
22
|
}
|
|
13
23
|
//# sourceMappingURL=Pressable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,GAG7B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,GAG7B,MAAM,cAAc,CAAC;AAYtB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,GAAG,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,EACd,OAAO,EACP,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,EACL,GAAG,KAAK,EACF;IACN,OAAO,CACL,oBAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EACrD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;YACrB,OAAO;gBACL;oBACE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;iBAClE;gBACD,KAAK;aACN,CAAC;QACJ,CAAC,EACD,cAAc,EACZ,kBAAkB;YAClB,uBAAuB;YACvB,kBAAkB;YAClB,uBAAuB;YACrB,CAAC,CAAC;gBACE,MAAM,EAAE,mBAAmB;gBAC3B,UAAU,EAAE,uBAAuB;gBACnC,KAAK,EAAE,kBAAkB;gBACzB,UAAU,EAAE,uBAAuB;aACpC;YACH,CAAC,CAAC,IAAI,KAEN,KAAK,IAER,QAAQ,CACO,CACnB,CAAC;AACJ,CAAC"}
|
|
@@ -9,7 +9,11 @@ type Props = {
|
|
|
9
9
|
style?: ViewStyle;
|
|
10
10
|
activeOpacity?: number;
|
|
11
11
|
disabledOpacity?: number;
|
|
12
|
-
|
|
12
|
+
androidRippleColor?: string;
|
|
13
|
+
androidRippleBorderless?: boolean;
|
|
14
|
+
androidRippleRadius?: number;
|
|
15
|
+
androidRippleForeground?: boolean;
|
|
16
|
+
} & Omit<PressableProps, "android_ripple ">;
|
|
13
17
|
|
|
14
18
|
export default function Pressable({
|
|
15
19
|
children,
|
|
@@ -19,6 +23,10 @@ export default function Pressable({
|
|
|
19
23
|
disabledOpacity = 0.8,
|
|
20
24
|
delayLongPress,
|
|
21
25
|
hitSlop,
|
|
26
|
+
androidRippleColor,
|
|
27
|
+
androidRippleBorderless,
|
|
28
|
+
androidRippleRadius,
|
|
29
|
+
androidRippleForeground,
|
|
22
30
|
style,
|
|
23
31
|
...props
|
|
24
32
|
}: Props) {
|
|
@@ -36,6 +44,19 @@ export default function Pressable({
|
|
|
36
44
|
style,
|
|
37
45
|
];
|
|
38
46
|
}}
|
|
47
|
+
android_ripple={
|
|
48
|
+
androidRippleColor ||
|
|
49
|
+
androidRippleBorderless ||
|
|
50
|
+
androidRippleColor ||
|
|
51
|
+
androidRippleForeground
|
|
52
|
+
? {
|
|
53
|
+
radius: androidRippleRadius,
|
|
54
|
+
borderless: androidRippleBorderless,
|
|
55
|
+
color: androidRippleColor,
|
|
56
|
+
foreground: androidRippleForeground,
|
|
57
|
+
}
|
|
58
|
+
: null
|
|
59
|
+
}
|
|
39
60
|
{...props}
|
|
40
61
|
>
|
|
41
62
|
{children}
|