@evlop/native-components 1.0.279 → 1.0.280
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/dist/cjs/src/Actionable.d.ts.map +1 -1
- package/dist/cjs/src/Actionable.js +2 -2
- package/dist/cjs/src/Actionable.js.map +1 -1
- package/dist/cjs/src/Button.d.ts.map +1 -1
- package/dist/cjs/src/Button.js +6 -1
- package/dist/cjs/src/Button.js.map +1 -1
- package/dist/cjs/src/hooks/useAnimatedPress.d.ts +4 -48
- package/dist/cjs/src/hooks/useAnimatedPress.d.ts.map +1 -1
- package/dist/cjs/src/hooks/useAnimatedPress.js +147 -140
- package/dist/cjs/src/hooks/useAnimatedPress.js.map +1 -1
- package/dist/types/src/Actionable.d.ts.map +1 -1
- package/dist/types/src/Button.d.ts.map +1 -1
- package/dist/types/src/hooks/useAnimatedPress.d.ts +4 -48
- package/dist/types/src/hooks/useAnimatedPress.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAA8C,cAAc,
|
|
1
|
+
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAA8C,cAAc,EAAa,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,UAAU,EAAyB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAoB,MAAM,0BAA0B,CAAC;AAIxE,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACvD,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAWD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAsBnE,CAAA;;;;;;;;;;AAED,wBAImB"}
|
|
@@ -50,7 +50,7 @@ const StyledPressable = (0, native_1.default)(AnimatedPressable)(styled_system_1
|
|
|
50
50
|
const BaseActionable = (_a) => {
|
|
51
51
|
var { action, pressEffect = 'none', hapticFeedback: hapticFeedbackType, style } = _a, props = __rest(_a, ["action", "pressEffect", "hapticFeedback", "style"]);
|
|
52
52
|
const onPress = (0, commons_1.useAction)(action);
|
|
53
|
-
const { handlePressIn, handlePressOut, animatedStyle } = (0, useAnimatedPress_1.useAnimatedPress)(pressEffect);
|
|
53
|
+
const { handlePressIn, handlePressOut, animatedStyle } = (0, useAnimatedPress_1.useAnimatedPress)(pressEffect, style);
|
|
54
54
|
const handlePress = (0, react_1.useCallback)((event) => {
|
|
55
55
|
if (hapticFeedbackType) {
|
|
56
56
|
(0, haptic_1.triggerHapticFeedback)(hapticFeedbackType);
|
|
@@ -59,7 +59,7 @@ const BaseActionable = (_a) => {
|
|
|
59
59
|
onPress === null || onPress === void 0 ? void 0 : onPress(event);
|
|
60
60
|
});
|
|
61
61
|
}, [hapticFeedbackType, onPress]);
|
|
62
|
-
return (react_1.default.createElement(StyledPressable, Object.assign({ onPress: action ? handlePress : undefined, onPressIn: handlePressIn, onPressOut: handlePressOut, style:
|
|
62
|
+
return (react_1.default.createElement(StyledPressable, Object.assign({ onPress: action ? handlePress : undefined, onPressIn: handlePressIn, onPressOut: handlePressOut, style: animatedStyle }, props)));
|
|
63
63
|
};
|
|
64
64
|
exports.BaseActionable = BaseActionable;
|
|
65
65
|
exports.default = (0, commons_1.withSettings)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.js","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAiE;AACjE,+CAA2C;AAC3C,+
|
|
1
|
+
{"version":3,"file":"Actionable.js","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAiE;AACjE,+CAA2C;AAC3C,+CAAqG;AACrG,2CAAmE;AACnE,+DAAwE;AACxE,sEAA8C;AAC9C,iDAAkE;AASlE,MAAM,iBAAiB,GAAG,uBAAQ,CAAC,uBAAuB,CAAC,wBAAS,CAAC,CAAC;AAEtE,MAAM,eAAe,GAAG,IAAA,gBAAM,EAAC,iBAAiB,CAAC,CAC7C,sBAAM,EACN,0BAAU,EACV,sBAAM,EACN,qBAAK,CACR,CAAA;AAEM,MAAM,cAAc,GAA6C,CAAC,EAAqF,EAAE,EAAE;QAAzF,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,KAAK,OAAY,EAAP,KAAK,cAAnF,oDAAqF,CAAF;IACxJ,MAAM,OAAO,GAAG,IAAA,mBAAS,EAAC,MAAM,CAAC,CAAC;IAClC,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,IAAA,mCAAgB,EAAC,WAAW,EAAE,KAAkB,CAAC,CAAC;IAE3G,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,CAAC,KAA4B,EAAE,EAAE;QAC7D,IAAI,kBAAkB,EAAE;YACpB,IAAA,8BAAqB,EAAC,kBAAkB,CAAC,CAAC;SAC7C;QACD,YAAY,CAAC,GAAG,EAAE;YACd,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,CAAC;IAElC,OAAO,CACH,8BAAC,eAAe,kBACZ,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EACzC,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,aAAa,IAChB,KAAK,EACX,CACL,CAAC;AACN,CAAC,CAAA;AAtBY,QAAA,cAAc,kBAsB1B;AAED,kBAAe,IAAA,sBAAY,EAAC;IACxB,IAAI,EAAE,YAAY;IAClB,oBAAoB,EAAE,EAAE;IACxB,YAAY,EAAE,EAAE;CACnB,CAAC,CAAC,sBAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAgC,MAAM,gBAAgB,CAAC;AAEpG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAgC,MAAM,gBAAgB,CAAC;AAEpG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsD,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9G,OAAO,EAAmB,oBAAoB,EAAU,WAAW,EAAE,aAAa,EAAE,eAAe,EAAU,WAAW,EAAS,UAAU,EAAuB,MAAM,eAAe,CAAC;AAIxL,OAAO,EAAE,UAAU,EAAoB,MAAM,0BAA0B,CAAC;AAQxE,aAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEpD,MAAM,WAAW,eAAgB,SAAQ,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC;IACtL,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,qBAAqB,GAAG,OAAO,CAAC;IACnF,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+HD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkEhD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;;;;;;uBAIV,CAAC;AAEf,eAAe,kBAAkB,CAAC"}
|
package/dist/cjs/src/Button.js
CHANGED
|
@@ -87,6 +87,11 @@ const sizeVariant = (0, styled_system_1.variant)({
|
|
|
87
87
|
},
|
|
88
88
|
});
|
|
89
89
|
const AnimatedPressable = react_native_1.Animated.createAnimatedComponent(react_native_1.Pressable);
|
|
90
|
+
const styles = react_native_1.StyleSheet.create({
|
|
91
|
+
flexFill: {
|
|
92
|
+
flex: 1,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
90
95
|
const StyledActivityIndicator = (0, native_1.default)(react_native_1.ActivityIndicator).attrs(({ color, theme }) => {
|
|
91
96
|
var _a;
|
|
92
97
|
return ({
|
|
@@ -136,7 +141,7 @@ const BaseButton = (_a) => {
|
|
|
136
141
|
// @ts-ignore
|
|
137
142
|
icon, iconPosition = 'left', iconSize, pressEffect = 'none', fontWeight, fontSize } = _a, props = __rest(_a, ["variant", "size", "loading", "disabled", "color", "textColor", "label", "textStyle", "action", "icon", "iconPosition", "iconSize", "pressEffect", "fontWeight", "fontSize"]);
|
|
138
143
|
const [isProcessing, actionHandeller] = (0, commons_1.useAsyncAction)(__action);
|
|
139
|
-
const { handlePressIn, handlePressOut, animatedStyle } = (0, useAnimatedPress_1.useAnimatedPress)(pressEffect);
|
|
144
|
+
const { handlePressIn, handlePressOut, animatedStyle } = (0, useAnimatedPress_1.useAnimatedPress)(pressEffect, styles.flexFill);
|
|
140
145
|
const textColorToUse = textColor || (variant === 'filled' ? 'white' : color);
|
|
141
146
|
const isDisabled = disabled || isProcessing;
|
|
142
147
|
const isLoading = loading || isProcessing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAoG;AACpG,uCAA0C;AAC1C,kDAA0B;AAC1B,+
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAoG;AACpG,uCAA0C;AAC1C,kDAA0B;AAC1B,+CAA8G;AAC9G,sEAA8C;AAC9C,iDAAwL;AACxL,uCAAwC;AACxC,iCAAkC;AAClC,iCAAkC;AAClC,+DAAwE;AA0BxE,MAAM,aAAa,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAsB,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAG,KAAK,CAAC,KAAI,KAAK,CAAC,CAAC,CAAC,CAAA,MAAA,KAA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C,kBAAU,CAAC,CAAC;AAEf,kBAAe,kBAAkB,CAAC"}
|
|
@@ -1,56 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
2
|
export declare type EffectType = 'none' | 'shrink' | 'dim' | 'shrink-dim' | 'push-down' | 'gentle-shrink' | 'tilt' | 'bounce' | 'squeeze' | 'pop' | 'wobble';
|
|
3
|
-
export declare const useAnimatedPress: (effect: EffectType) => {
|
|
3
|
+
export declare const useAnimatedPress: (effect: EffectType, baseStyle?: ViewStyle) => {
|
|
4
|
+
animatedStyle: ViewStyle;
|
|
4
5
|
handlePressIn?: undefined;
|
|
5
6
|
handlePressOut?: undefined;
|
|
6
|
-
animatedStyle?: undefined;
|
|
7
7
|
} | {
|
|
8
8
|
handlePressIn: () => void;
|
|
9
9
|
handlePressOut: () => void;
|
|
10
|
-
animatedStyle:
|
|
11
|
-
opacity: Animated.AnimatedInterpolation<string | number>;
|
|
12
|
-
transform?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
transform: {
|
|
15
|
-
scale: Animated.AnimatedInterpolation<string | number>;
|
|
16
|
-
}[];
|
|
17
|
-
opacity: Animated.AnimatedInterpolation<string | number>;
|
|
18
|
-
} | {
|
|
19
|
-
transform: ({
|
|
20
|
-
scale: Animated.AnimatedInterpolation<string | number>;
|
|
21
|
-
translateY?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
translateY: Animated.AnimatedInterpolation<string | number>;
|
|
24
|
-
scale?: undefined;
|
|
25
|
-
})[];
|
|
26
|
-
opacity?: undefined;
|
|
27
|
-
} | {
|
|
28
|
-
transform: ({
|
|
29
|
-
scale: Animated.AnimatedInterpolation<string | number>;
|
|
30
|
-
rotateZ?: undefined;
|
|
31
|
-
perspective?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
rotateZ: Animated.AnimatedInterpolation<string | number>;
|
|
34
|
-
scale?: undefined;
|
|
35
|
-
perspective?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
perspective: Animated.AnimatedInterpolation<string | number>;
|
|
38
|
-
scale?: undefined;
|
|
39
|
-
rotateZ?: undefined;
|
|
40
|
-
})[];
|
|
41
|
-
opacity?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
transform: ({
|
|
44
|
-
scaleX: Animated.AnimatedInterpolation<string | number>;
|
|
45
|
-
scaleY?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
scaleY: Animated.AnimatedInterpolation<string | number>;
|
|
48
|
-
scaleX?: undefined;
|
|
49
|
-
})[];
|
|
50
|
-
opacity?: undefined;
|
|
51
|
-
} | {
|
|
52
|
-
opacity?: undefined;
|
|
53
|
-
transform?: undefined;
|
|
54
|
-
};
|
|
10
|
+
animatedStyle: ViewStyle | ViewStyle[];
|
|
55
11
|
};
|
|
56
12
|
//# sourceMappingURL=useAnimatedPress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimatedPress.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAnimatedPress.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useAnimatedPress.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAnimatedPress.ts"],"names":[],"mappings":"AACA,OAAO,EAAmD,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1F,oBAAY,UAAU,GAChB,MAAM,GACN,QAAQ,GACR,KAAK,GACL,YAAY,GACZ,WAAW,GACX,eAAe,GACf,MAAM,GACN,QAAQ,GACR,SAAS,GACT,KAAK,GACL,QAAQ,CAAC;AAEf,eAAO,MAAM,gBAAgB,WAAY,UAAU,cAAc,SAAS;;;;;;;;CA6KzE,CAAC"}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useAnimatedPress = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_native_1 = require("react-native");
|
|
6
|
-
const useAnimatedPress = (effect) => {
|
|
6
|
+
const useAnimatedPress = (effect, baseStyle) => {
|
|
7
7
|
return (0, react_1.useMemo)(() => {
|
|
8
8
|
if (effect === 'none') {
|
|
9
|
-
return {};
|
|
9
|
+
return { animatedStyle: baseStyle };
|
|
10
10
|
}
|
|
11
11
|
const animatedValue = new react_native_1.Animated.Value(1);
|
|
12
12
|
const handlePressIn = () => {
|
|
@@ -25,144 +25,151 @@ const useAnimatedPress = (effect) => {
|
|
|
25
25
|
bounciness: 6,
|
|
26
26
|
}).start();
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
28
|
+
let effectStyle = {};
|
|
29
|
+
switch (effect) {
|
|
30
|
+
case 'shrink':
|
|
31
|
+
effectStyle = {
|
|
32
|
+
transform: [{
|
|
33
|
+
scale: animatedValue.interpolate({
|
|
34
|
+
inputRange: [0, 1],
|
|
35
|
+
outputRange: [0.95, 1],
|
|
36
|
+
}),
|
|
37
|
+
}],
|
|
38
|
+
};
|
|
39
|
+
break;
|
|
40
|
+
case 'dim':
|
|
41
|
+
effectStyle = {
|
|
42
|
+
opacity: animatedValue.interpolate({
|
|
43
|
+
inputRange: [0, 1],
|
|
44
|
+
outputRange: [0.7, 1],
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
break;
|
|
48
|
+
case 'shrink-dim':
|
|
49
|
+
effectStyle = {
|
|
50
|
+
transform: [{
|
|
51
|
+
scale: animatedValue.interpolate({
|
|
52
|
+
inputRange: [0, 1],
|
|
53
|
+
outputRange: [0.95, 1],
|
|
54
|
+
}),
|
|
55
|
+
}],
|
|
56
|
+
opacity: animatedValue.interpolate({
|
|
57
|
+
inputRange: [0, 1],
|
|
58
|
+
outputRange: [0.7, 1],
|
|
59
|
+
}),
|
|
60
|
+
};
|
|
61
|
+
break;
|
|
62
|
+
case 'push-down':
|
|
63
|
+
effectStyle = {
|
|
64
|
+
transform: [
|
|
65
|
+
{
|
|
66
|
+
scale: animatedValue.interpolate({
|
|
67
|
+
inputRange: [0, 1],
|
|
68
|
+
outputRange: [0.97, 1],
|
|
69
|
+
}),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
translateY: animatedValue.interpolate({
|
|
73
|
+
inputRange: [0, 1],
|
|
74
|
+
outputRange: [2, 0],
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
break;
|
|
80
|
+
case 'gentle-shrink':
|
|
81
|
+
effectStyle = {
|
|
82
|
+
transform: [{
|
|
83
|
+
scale: animatedValue.interpolate({
|
|
84
|
+
inputRange: [0, 1],
|
|
85
|
+
outputRange: [0.98, 1],
|
|
86
|
+
}),
|
|
87
|
+
}],
|
|
88
|
+
};
|
|
89
|
+
break;
|
|
90
|
+
case 'tilt':
|
|
91
|
+
effectStyle = {
|
|
92
|
+
transform: [
|
|
93
|
+
{
|
|
94
|
+
scale: animatedValue.interpolate({
|
|
95
|
+
inputRange: [0, 1],
|
|
96
|
+
outputRange: [0.97, 1],
|
|
97
|
+
}),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
rotateZ: animatedValue.interpolate({
|
|
101
|
+
inputRange: [0, 1],
|
|
102
|
+
outputRange: ['-2deg', '0deg'],
|
|
103
|
+
}),
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
perspective: animatedValue.interpolate({
|
|
107
|
+
inputRange: [0, 1],
|
|
108
|
+
outputRange: [800, 1000],
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
break;
|
|
114
|
+
case 'bounce':
|
|
115
|
+
effectStyle = {
|
|
116
|
+
transform: [{
|
|
117
|
+
scale: animatedValue.interpolate({
|
|
118
|
+
inputRange: [0, 0.5, 1],
|
|
119
|
+
outputRange: [0.9, 0.95, 1],
|
|
120
|
+
}),
|
|
121
|
+
}],
|
|
122
|
+
};
|
|
123
|
+
break;
|
|
124
|
+
case 'squeeze':
|
|
125
|
+
effectStyle = {
|
|
126
|
+
transform: [
|
|
127
|
+
{
|
|
128
|
+
scaleX: animatedValue.interpolate({
|
|
129
|
+
inputRange: [0, 1],
|
|
130
|
+
outputRange: [0.92, 1],
|
|
131
|
+
}),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
scaleY: animatedValue.interpolate({
|
|
135
|
+
inputRange: [0, 1],
|
|
136
|
+
outputRange: [1.04, 1],
|
|
137
|
+
}),
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
};
|
|
141
|
+
break;
|
|
142
|
+
case 'pop':
|
|
143
|
+
effectStyle = {
|
|
144
|
+
transform: [{
|
|
145
|
+
scale: animatedValue.interpolate({
|
|
146
|
+
inputRange: [0, 1],
|
|
147
|
+
outputRange: [1.05, 1],
|
|
148
|
+
}),
|
|
149
|
+
}],
|
|
150
|
+
};
|
|
151
|
+
break;
|
|
152
|
+
case 'wobble':
|
|
153
|
+
effectStyle = {
|
|
154
|
+
transform: [
|
|
155
|
+
{
|
|
156
|
+
scale: animatedValue.interpolate({
|
|
157
|
+
inputRange: [0, 1],
|
|
158
|
+
outputRange: [0.97, 1],
|
|
159
|
+
}),
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
rotateZ: animatedValue.interpolate({
|
|
163
|
+
inputRange: [0, 0.25, 0.5, 0.75, 1],
|
|
164
|
+
outputRange: ['0deg', '-1deg', '1deg', '-0.5deg', '0deg'],
|
|
165
|
+
}),
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
return { handlePressIn, handlePressOut, animatedStyle: baseStyle ? [baseStyle, effectStyle] : effectStyle };
|
|
172
|
+
}, [effect, baseStyle]);
|
|
166
173
|
};
|
|
167
174
|
exports.useAnimatedPress = useAnimatedPress;
|
|
168
175
|
//# sourceMappingURL=useAnimatedPress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimatedPress.js","sourceRoot":"","sources":["../../../../src/hooks/useAnimatedPress.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,+
|
|
1
|
+
{"version":3,"file":"useAnimatedPress.js","sourceRoot":"","sources":["../../../../src/hooks/useAnimatedPress.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,+CAA0F;AAenF,MAAM,gBAAgB,GAAG,CAAC,MAAkB,EAAE,SAAqB,EAAE,EAAE;IAC1E,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QAChB,IAAI,MAAM,KAAK,MAAM,EAAE;YACnB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;SACvC;QAED,MAAM,aAAa,GAAG,IAAI,uBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAE5C,MAAM,aAAa,GAAG,GAAG,EAAE;YACvB,uBAAQ,CAAC,MAAM,CAAC,aAAa,EAAE;gBAC3B,OAAO,EAAE,CAAC;gBACV,eAAe,EAAE,IAAI;gBACrB,KAAK,EAAE,EAAE;gBACT,UAAU,EAAE,CAAC;aAChB,CAAC,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC;QAEF,MAAM,cAAc,GAAG,GAAG,EAAE;YACxB,uBAAQ,CAAC,MAAM,CAAC,aAAa,EAAE;gBAC3B,OAAO,EAAE,CAAC;gBACV,eAAe,EAAE,IAAI;gBACrB,KAAK,EA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iBACJ,CAAC;gBACF,MAAM;SACb;QAED,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAChH,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC5B,CAAC,CAAC;AA7KW,QAAA,gBAAgB,oBA6K3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAA8C,cAAc,
|
|
1
|
+
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAA8C,cAAc,EAAa,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,UAAU,EAAyB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAoB,MAAM,0BAA0B,CAAC;AAIxE,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACvD,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAWD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAsBnE,CAAA;;;;;;;;;;AAED,wBAImB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button.tsx"],"names":[],"mappings":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M,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+HD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkEhD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;;;;;;uBAIV,CAAC;AAEf,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,56 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
2
|
export declare type EffectType = 'none' | 'shrink' | 'dim' | 'shrink-dim' | 'push-down' | 'gentle-shrink' | 'tilt' | 'bounce' | 'squeeze' | 'pop' | 'wobble';
|
|
3
|
-
export declare const useAnimatedPress: (effect: EffectType) => {
|
|
3
|
+
export declare const useAnimatedPress: (effect: EffectType, baseStyle?: ViewStyle) => {
|
|
4
|
+
animatedStyle: ViewStyle;
|
|
4
5
|
handlePressIn?: undefined;
|
|
5
6
|
handlePressOut?: undefined;
|
|
6
|
-
animatedStyle?: undefined;
|
|
7
7
|
} | {
|
|
8
8
|
handlePressIn: () => void;
|
|
9
9
|
handlePressOut: () => void;
|
|
10
|
-
animatedStyle:
|
|
11
|
-
opacity: Animated.AnimatedInterpolation<string | number>;
|
|
12
|
-
transform?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
transform: {
|
|
15
|
-
scale: Animated.AnimatedInterpolation<string | number>;
|
|
16
|
-
}[];
|
|
17
|
-
opacity: Animated.AnimatedInterpolation<string | number>;
|
|
18
|
-
} | {
|
|
19
|
-
transform: ({
|
|
20
|
-
scale: Animated.AnimatedInterpolation<string | number>;
|
|
21
|
-
translateY?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
translateY: Animated.AnimatedInterpolation<string | number>;
|
|
24
|
-
scale?: undefined;
|
|
25
|
-
})[];
|
|
26
|
-
opacity?: undefined;
|
|
27
|
-
} | {
|
|
28
|
-
transform: ({
|
|
29
|
-
scale: Animated.AnimatedInterpolation<string | number>;
|
|
30
|
-
rotateZ?: undefined;
|
|
31
|
-
perspective?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
rotateZ: Animated.AnimatedInterpolation<string | number>;
|
|
34
|
-
scale?: undefined;
|
|
35
|
-
perspective?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
perspective: Animated.AnimatedInterpolation<string | number>;
|
|
38
|
-
scale?: undefined;
|
|
39
|
-
rotateZ?: undefined;
|
|
40
|
-
})[];
|
|
41
|
-
opacity?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
transform: ({
|
|
44
|
-
scaleX: Animated.AnimatedInterpolation<string | number>;
|
|
45
|
-
scaleY?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
scaleY: Animated.AnimatedInterpolation<string | number>;
|
|
48
|
-
scaleX?: undefined;
|
|
49
|
-
})[];
|
|
50
|
-
opacity?: undefined;
|
|
51
|
-
} | {
|
|
52
|
-
opacity?: undefined;
|
|
53
|
-
transform?: undefined;
|
|
54
|
-
};
|
|
10
|
+
animatedStyle: ViewStyle | ViewStyle[];
|
|
55
11
|
};
|
|
56
12
|
//# sourceMappingURL=useAnimatedPress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimatedPress.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAnimatedPress.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useAnimatedPress.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAnimatedPress.ts"],"names":[],"mappings":"AACA,OAAO,EAAmD,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1F,oBAAY,UAAU,GAChB,MAAM,GACN,QAAQ,GACR,KAAK,GACL,YAAY,GACZ,WAAW,GACX,eAAe,GACf,MAAM,GACN,QAAQ,GACR,SAAS,GACT,KAAK,GACL,QAAQ,CAAC;AAEf,eAAO,MAAM,gBAAgB,WAAY,UAAU,cAAc,SAAS;;;;;;;;CA6KzE,CAAC"}
|