@evlop/native-components 1.0.248 → 1.0.250
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 +2 -2
- package/dist/cjs/src/Actionable.d.ts.map +1 -1
- package/dist/cjs/src/Actionable.js +175 -61
- package/dist/cjs/src/Actionable.js.map +1 -1
- package/dist/types/main.ai.d.ts +2 -2
- package/dist/types/src/Actionable.d.ts +2 -2
- package/dist/types/src/Actionable.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Action } from '@evlop/commons';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PressableProps } from 'react-native';
|
|
4
|
-
declare type EffectType = 'none' | '
|
|
4
|
+
declare type EffectType = 'none' | 'shrink' | 'dim' | 'shrink-dim' | 'push-down' | 'gentle-shrink' | 'tilt' | 'bounce' | 'squeeze' | 'pop' | 'wobble';
|
|
5
5
|
declare type FeedbackType = 'none' | 'light' | 'medium' | 'heavy' | 'success' | 'error' | 'warning';
|
|
6
6
|
export interface BaseActionableProps extends PressableProps {
|
|
7
|
-
|
|
7
|
+
pressEffect?: EffectType;
|
|
8
8
|
feedback?: FeedbackType;
|
|
9
9
|
action: Action;
|
|
10
10
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,gBAAgB,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,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAyD,cAAc,EAAE,MAAM,cAAc,CAAC;AAIrG,aAAK,UAAU,GACT,MAAM,GACN,QAAQ,GACR,KAAK,GACL,YAAY,GACZ,WAAW,GACX,eAAe,GACf,MAAM,GACN,QAAQ,GACR,SAAS,GACT,KAAK,GACL,QAAQ,CAAC;AAEf,aAAK,YAAY,GACX,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,OAAO,GACP,SAAS,CAAC;AAEhB,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACvD,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAsMD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAuBnE,CAAA;;;;;;;AAED,wBAImB"}
|
|
@@ -39,82 +39,196 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.BaseActionable = void 0;
|
|
41
41
|
const commons_1 = require("@evlop/commons");
|
|
42
|
-
const lodash_1 = require("lodash");
|
|
43
42
|
const react_1 = __importStar(require("react"));
|
|
44
43
|
const react_native_1 = require("react-native");
|
|
45
44
|
const native_1 = __importDefault(require("styled-components/native"));
|
|
46
45
|
const styled_system_1 = require("styled-system");
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
switch (effect) {
|
|
51
|
-
case 'scale':
|
|
52
|
-
return {
|
|
53
|
-
transform: [{ scale: pressed ? 0.95 : 1 }],
|
|
54
|
-
};
|
|
55
|
-
case 'opacity':
|
|
56
|
-
return {
|
|
57
|
-
opacity: pressed ? 0.7 : 1,
|
|
58
|
-
};
|
|
59
|
-
case 'both':
|
|
60
|
-
return {
|
|
61
|
-
transform: [{ scale: pressed ? 0.95 : 1 }],
|
|
62
|
-
opacity: pressed ? 0.7 : 1,
|
|
63
|
-
};
|
|
64
|
-
case 'elevation':
|
|
65
|
-
return {
|
|
66
|
-
transform: [{ scale: pressed ? 0.98 : 1 }],
|
|
67
|
-
shadowOpacity: pressed ? 0.2 : 0.5,
|
|
68
|
-
shadowRadius: pressed ? 2 : 4,
|
|
69
|
-
elevation: pressed ? 2 : 4,
|
|
70
|
-
};
|
|
71
|
-
case 'border':
|
|
72
|
-
return {
|
|
73
|
-
borderWidth: pressed ? 2 : 1,
|
|
74
|
-
borderColor: pressed ? '#007AFF' : '#E5E5EA',
|
|
75
|
-
};
|
|
76
|
-
case 'color':
|
|
77
|
-
return {
|
|
78
|
-
backgroundColor: pressed ? '#F2F2F7' : '#FFFFFF',
|
|
79
|
-
};
|
|
80
|
-
case 'ripple':
|
|
81
|
-
return {
|
|
82
|
-
transform: [{ scale: pressed ? 0.98 : 1 }],
|
|
83
|
-
backgroundColor: pressed ? 'rgba(0, 0, 0, 0.05)' : 'transparent',
|
|
84
|
-
};
|
|
85
|
-
case 'spring':
|
|
86
|
-
return {
|
|
87
|
-
transform: [
|
|
88
|
-
{ scale: pressed ? 0.97 : 1 },
|
|
89
|
-
{ translateY: pressed ? 1 : 0 }
|
|
90
|
-
],
|
|
91
|
-
};
|
|
92
|
-
default:
|
|
93
|
-
return {};
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
});
|
|
97
|
-
const getFeedbackPattern = (0, lodash_1.memoize)((type) => {
|
|
46
|
+
const AnimatedPressable = react_native_1.Animated.createAnimatedComponent(react_native_1.Pressable);
|
|
47
|
+
const StyledPressable = (0, native_1.default)(AnimatedPressable)(styled_system_1.border, styled_system_1.background, styled_system_1.layout, styled_system_1.space);
|
|
48
|
+
const getFeedbackPattern = (type) => {
|
|
98
49
|
switch (type) {
|
|
99
50
|
case 'light':
|
|
100
|
-
return 20;
|
|
51
|
+
return 20;
|
|
101
52
|
case 'medium':
|
|
102
|
-
return 50;
|
|
53
|
+
return 50;
|
|
103
54
|
case 'heavy':
|
|
104
|
-
return 100;
|
|
55
|
+
return 100;
|
|
105
56
|
case 'success':
|
|
106
|
-
return [0, 30, 50, 30];
|
|
57
|
+
return [0, 30, 50, 30];
|
|
107
58
|
case 'error':
|
|
108
|
-
return [0, 50, 50, 50];
|
|
59
|
+
return [0, 50, 50, 50];
|
|
109
60
|
case 'warning':
|
|
110
|
-
return [0, 100, 50, 100];
|
|
61
|
+
return [0, 100, 50, 100];
|
|
111
62
|
default:
|
|
112
63
|
return 0;
|
|
113
64
|
}
|
|
114
|
-
}
|
|
65
|
+
};
|
|
66
|
+
// Hook to create animated press effect
|
|
67
|
+
const useAnimatedPress = (effect) => {
|
|
68
|
+
return (0, react_1.useMemo)(() => {
|
|
69
|
+
if (effect === 'none') {
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
const animatedValue = new react_native_1.Animated.Value(1);
|
|
73
|
+
const handlePressIn = () => {
|
|
74
|
+
react_native_1.Animated.spring(animatedValue, {
|
|
75
|
+
toValue: 0,
|
|
76
|
+
useNativeDriver: true,
|
|
77
|
+
speed: 50,
|
|
78
|
+
bounciness: 4,
|
|
79
|
+
}).start();
|
|
80
|
+
};
|
|
81
|
+
const handlePressOut = () => {
|
|
82
|
+
react_native_1.Animated.spring(animatedValue, {
|
|
83
|
+
toValue: 1,
|
|
84
|
+
useNativeDriver: true,
|
|
85
|
+
speed: 20,
|
|
86
|
+
bounciness: 6,
|
|
87
|
+
}).start();
|
|
88
|
+
};
|
|
89
|
+
const getAnimatedStyle = () => {
|
|
90
|
+
switch (effect) {
|
|
91
|
+
case 'shrink':
|
|
92
|
+
return {
|
|
93
|
+
transform: [{
|
|
94
|
+
scale: animatedValue.interpolate({
|
|
95
|
+
inputRange: [0, 1],
|
|
96
|
+
outputRange: [0.95, 1],
|
|
97
|
+
}),
|
|
98
|
+
}],
|
|
99
|
+
};
|
|
100
|
+
case 'dim':
|
|
101
|
+
return {
|
|
102
|
+
opacity: animatedValue.interpolate({
|
|
103
|
+
inputRange: [0, 1],
|
|
104
|
+
outputRange: [0.7, 1],
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
case 'shrink-dim':
|
|
108
|
+
return {
|
|
109
|
+
transform: [{
|
|
110
|
+
scale: animatedValue.interpolate({
|
|
111
|
+
inputRange: [0, 1],
|
|
112
|
+
outputRange: [0.95, 1],
|
|
113
|
+
}),
|
|
114
|
+
}],
|
|
115
|
+
opacity: animatedValue.interpolate({
|
|
116
|
+
inputRange: [0, 1],
|
|
117
|
+
outputRange: [0.7, 1],
|
|
118
|
+
}),
|
|
119
|
+
};
|
|
120
|
+
case 'push-down':
|
|
121
|
+
return {
|
|
122
|
+
transform: [
|
|
123
|
+
{
|
|
124
|
+
scale: animatedValue.interpolate({
|
|
125
|
+
inputRange: [0, 1],
|
|
126
|
+
outputRange: [0.97, 1],
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
translateY: animatedValue.interpolate({
|
|
131
|
+
inputRange: [0, 1],
|
|
132
|
+
outputRange: [2, 0],
|
|
133
|
+
}),
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
};
|
|
137
|
+
case 'gentle-shrink':
|
|
138
|
+
return {
|
|
139
|
+
transform: [{
|
|
140
|
+
scale: animatedValue.interpolate({
|
|
141
|
+
inputRange: [0, 1],
|
|
142
|
+
outputRange: [0.98, 1],
|
|
143
|
+
}),
|
|
144
|
+
}],
|
|
145
|
+
};
|
|
146
|
+
case 'tilt':
|
|
147
|
+
return {
|
|
148
|
+
transform: [
|
|
149
|
+
{
|
|
150
|
+
scale: animatedValue.interpolate({
|
|
151
|
+
inputRange: [0, 1],
|
|
152
|
+
outputRange: [0.97, 1],
|
|
153
|
+
}),
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
rotateZ: animatedValue.interpolate({
|
|
157
|
+
inputRange: [0, 1],
|
|
158
|
+
outputRange: ['-2deg', '0deg'],
|
|
159
|
+
}),
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
perspective: animatedValue.interpolate({
|
|
163
|
+
inputRange: [0, 1],
|
|
164
|
+
outputRange: [800, 1000],
|
|
165
|
+
}),
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
169
|
+
case 'bounce':
|
|
170
|
+
return {
|
|
171
|
+
transform: [{
|
|
172
|
+
scale: animatedValue.interpolate({
|
|
173
|
+
inputRange: [0, 0.5, 1],
|
|
174
|
+
outputRange: [0.9, 0.95, 1],
|
|
175
|
+
}),
|
|
176
|
+
}],
|
|
177
|
+
};
|
|
178
|
+
case 'squeeze':
|
|
179
|
+
return {
|
|
180
|
+
transform: [
|
|
181
|
+
{
|
|
182
|
+
scaleX: animatedValue.interpolate({
|
|
183
|
+
inputRange: [0, 1],
|
|
184
|
+
outputRange: [0.92, 1],
|
|
185
|
+
}),
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
scaleY: animatedValue.interpolate({
|
|
189
|
+
inputRange: [0, 1],
|
|
190
|
+
outputRange: [1.04, 1],
|
|
191
|
+
}),
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
};
|
|
195
|
+
case 'pop':
|
|
196
|
+
return {
|
|
197
|
+
transform: [{
|
|
198
|
+
scale: animatedValue.interpolate({
|
|
199
|
+
inputRange: [0, 1],
|
|
200
|
+
outputRange: [1.05, 1],
|
|
201
|
+
}),
|
|
202
|
+
}],
|
|
203
|
+
};
|
|
204
|
+
case 'wobble':
|
|
205
|
+
return {
|
|
206
|
+
transform: [
|
|
207
|
+
{
|
|
208
|
+
scale: animatedValue.interpolate({
|
|
209
|
+
inputRange: [0, 1],
|
|
210
|
+
outputRange: [0.97, 1],
|
|
211
|
+
}),
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
rotateZ: animatedValue.interpolate({
|
|
215
|
+
inputRange: [0, 0.25, 0.5, 0.75, 1],
|
|
216
|
+
outputRange: ['0deg', '-1deg', '1deg', '-0.5deg', '0deg'],
|
|
217
|
+
}),
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
};
|
|
221
|
+
default:
|
|
222
|
+
return {};
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
return { handlePressIn, handlePressOut, animatedStyle: getAnimatedStyle() };
|
|
226
|
+
}, [effect]);
|
|
227
|
+
};
|
|
115
228
|
const BaseActionable = (_a) => {
|
|
116
|
-
var { action,
|
|
229
|
+
var { action, pressEffect = 'none', feedback = 'none', style } = _a, props = __rest(_a, ["action", "pressEffect", "feedback", "style"]);
|
|
117
230
|
const onPress = (0, commons_1.useAction)(action);
|
|
231
|
+
const { handlePressIn, handlePressOut, animatedStyle } = useAnimatedPress(pressEffect);
|
|
118
232
|
const handlePress = (0, react_1.useCallback)((event) => {
|
|
119
233
|
if (feedback !== 'none') {
|
|
120
234
|
const pattern = getFeedbackPattern(feedback);
|
|
@@ -124,7 +238,7 @@ const BaseActionable = (_a) => {
|
|
|
124
238
|
onPress === null || onPress === void 0 ? void 0 : onPress(event);
|
|
125
239
|
});
|
|
126
240
|
}, [feedback, onPress]);
|
|
127
|
-
return (react_1.default.createElement(StyledPressable, Object.assign({ onPress: action ? handlePress : undefined, style:
|
|
241
|
+
return (react_1.default.createElement(StyledPressable, Object.assign({ onPress: action ? handlePress : undefined, onPressIn: handlePressIn, onPressOut: handlePressOut, style: [animatedStyle, style] }, props)));
|
|
128
242
|
};
|
|
129
243
|
exports.BaseActionable = BaseActionable;
|
|
130
244
|
exports.default = (0, commons_1.withSettings)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.js","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAiE;AACjE
|
|
1
|
+
{"version":3,"file":"Actionable.js","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAiE;AACjE,+CAAoD;AACpD,+CAAqG;AACrG,s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AI,EAAE,YAAY;IAClB,oBAAoB,EAAE,EAAE;IACxB,YAAY,EAAE,EAAE;CACnB,CAAC,CAAC,sBAAc,CAAC,CAAC"}
|
package/dist/types/main.ai.d.ts
CHANGED
|
@@ -46,10 +46,10 @@ interface BaseButtonProps extends ViewProps, FontWeightProps<Theme>, FontSizePro
|
|
|
46
46
|
iconPosition?: "left" | "right";
|
|
47
47
|
}
|
|
48
48
|
declare const BaseButton: React$1.FC<BaseButtonProps>;
|
|
49
|
-
type EffectType = "none" | "
|
|
49
|
+
type EffectType = "none" | "shrink" | "dim" | "shrink-dim" | "push-down" | "gentle-shrink" | "tilt" | "bounce" | "squeeze" | "pop" | "wobble";
|
|
50
50
|
type FeedbackType = "none" | "light" | "medium" | "heavy" | "success" | "error" | "warning";
|
|
51
51
|
interface BaseActionableProps extends PressableProps {
|
|
52
|
-
|
|
52
|
+
pressEffect?: EffectType;
|
|
53
53
|
feedback?: FeedbackType;
|
|
54
54
|
action: Action;
|
|
55
55
|
[key: string]: any;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Action } from '@evlop/commons';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PressableProps } from 'react-native';
|
|
4
|
-
declare type EffectType = 'none' | '
|
|
4
|
+
declare type EffectType = 'none' | 'shrink' | 'dim' | 'shrink-dim' | 'push-down' | 'gentle-shrink' | 'tilt' | 'bounce' | 'squeeze' | 'pop' | 'wobble';
|
|
5
5
|
declare type FeedbackType = 'none' | 'light' | 'medium' | 'heavy' | 'success' | 'error' | 'warning';
|
|
6
6
|
export interface BaseActionableProps extends PressableProps {
|
|
7
|
-
|
|
7
|
+
pressEffect?: EffectType;
|
|
8
8
|
feedback?: FeedbackType;
|
|
9
9
|
action: Action;
|
|
10
10
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../../src/Actionable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,gBAAgB,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,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAyD,cAAc,EAAE,MAAM,cAAc,CAAC;AAIrG,aAAK,UAAU,GACT,MAAM,GACN,QAAQ,GACR,KAAK,GACL,YAAY,GACZ,WAAW,GACX,eAAe,GACf,MAAM,GACN,QAAQ,GACR,SAAS,GACT,KAAK,GACL,QAAQ,CAAC;AAEf,aAAK,YAAY,GACX,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,OAAO,GACP,SAAS,CAAC;AAEhB,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACvD,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAsMD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAuBnE,CAAA;;;;;;;AAED,wBAImB"}
|