atlas-design-system 1.17.4 → 1.17.5
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.
|
@@ -40,6 +40,7 @@ const hooks_1 = require("../../hooks");
|
|
|
40
40
|
const Button_1 = __importDefault(require("../Button"));
|
|
41
41
|
const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
|
|
42
42
|
const FieldError_1 = require("../FieldError/FieldError");
|
|
43
|
+
const animations_1 = require("../../constants/animations");
|
|
43
44
|
const getFormat = (mode) => {
|
|
44
45
|
switch (mode) {
|
|
45
46
|
case "date": {
|
|
@@ -78,7 +79,9 @@ const DateTimeInput = ({ value, onChange, testID, containerStyle, label, caption
|
|
|
78
79
|
const animatedLabelStyles = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
79
80
|
return {
|
|
80
81
|
transform: [
|
|
81
|
-
{
|
|
82
|
+
{
|
|
83
|
+
translateY: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, animations_1.LABEL_INTERPOLATION_OUTPUT_RANGE),
|
|
84
|
+
},
|
|
82
85
|
],
|
|
83
86
|
fontSize: (0, react_native_reanimated_1.interpolate)(animatedValue.value, [0, 1], [14, 10]),
|
|
84
87
|
};
|
|
@@ -86,7 +89,7 @@ const DateTimeInput = ({ value, onChange, testID, containerStyle, label, caption
|
|
|
86
89
|
const animatedValueStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
87
90
|
return {
|
|
88
91
|
flex: 1,
|
|
89
|
-
transform: [{ translateY: animatedValue.value *
|
|
92
|
+
transform: [{ translateY: animatedValue.value * 7 }],
|
|
90
93
|
};
|
|
91
94
|
});
|
|
92
95
|
return (<>
|
|
@@ -77,7 +77,7 @@ function SelectInput({ caption, label, options = [], onChange, error, renderOpti
|
|
|
77
77
|
return {
|
|
78
78
|
transform: [
|
|
79
79
|
{
|
|
80
|
-
translateY: (0, react_native_reanimated_1.interpolate)(animatedValue.value,
|
|
80
|
+
translateY: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, animations_1.LABEL_INTERPOLATION_OUTPUT_RANGE, react_native_reanimated_1.Extrapolation.CLAMP),
|
|
81
81
|
},
|
|
82
82
|
],
|
|
83
83
|
fontSize: (0, react_native_reanimated_1.interpolate)(animatedValue.value, [0, 1], [14, 10], react_native_reanimated_1.Extrapolation.CLAMP),
|
|
@@ -86,7 +86,7 @@ function SelectInput({ caption, label, options = [], onChange, error, renderOpti
|
|
|
86
86
|
const animatedValueStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
87
87
|
return {
|
|
88
88
|
flex: 1,
|
|
89
|
-
transform: [{ translateY: animatedValue.value *
|
|
89
|
+
transform: [{ translateY: animatedValue.value * 7 }],
|
|
90
90
|
};
|
|
91
91
|
}, [animatedValue]);
|
|
92
92
|
const handleOptionPress = (0, react_1.useCallback)((option) => {
|
|
@@ -98,7 +98,9 @@ exports.TextInput = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
98
98
|
const animatedLabelStyles = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
99
99
|
return {
|
|
100
100
|
transform: [
|
|
101
|
-
{
|
|
101
|
+
{
|
|
102
|
+
translateY: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, animations_1.LABEL_INTERPOLATION_OUTPUT_RANGE),
|
|
103
|
+
},
|
|
102
104
|
],
|
|
103
105
|
fontSize: (0, react_native_reanimated_1.interpolate)(animatedValue.value, [0, 1], [14, 10]),
|
|
104
106
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_TIMING_CONFIG = exports.DEFAULT_EASING = void 0;
|
|
3
|
+
exports.LABEL_INTERPOLATION_OUTPUT_RANGE = exports.LABEL_INTERPOLATION_RANGE = exports.DEFAULT_TIMING_CONFIG = exports.DEFAULT_EASING = void 0;
|
|
4
4
|
const react_native_reanimated_1 = require("react-native-reanimated");
|
|
5
5
|
exports.DEFAULT_EASING = react_native_reanimated_1.Easing.inOut(react_native_reanimated_1.Easing.quad);
|
|
6
6
|
exports.DEFAULT_TIMING_CONFIG = {
|
|
7
7
|
duration: 150,
|
|
8
8
|
easing: exports.DEFAULT_EASING,
|
|
9
9
|
};
|
|
10
|
+
exports.LABEL_INTERPOLATION_RANGE = [0, 1];
|
|
11
|
+
exports.LABEL_INTERPOLATION_OUTPUT_RANGE = [1, -9];
|