@servesall/atoms 1.0.57 → 1.1.1
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/bundle.cjs.js +800 -9716
- package/dist/bundle.esm.js +741 -9663
- package/dist/bundle.umd.js +803 -9720
- package/package.json +2 -5
- package/src/Buttons/FeedbackButton/FloatingButton.js +90 -0
- package/src/Buttons/FeedbackButton/FloatingButton.style.js +10 -0
- package/src/Buttons/FeedbackButton/index.js +120 -0
- package/src/Buttons/TextButton/LineAnimation/LineAnimation.style.js +3 -3
- package/src/Buttons/TextButton/TextButton.style.js +11 -4
- package/src/Buttons/TextButton/index.js +34 -26
- package/src/Buttons/index.js +9 -1
- package/src/Layout/Box.js +15 -0
- package/src/Layout/Layout.style.js +12 -0
- package/src/Layout/MarginRight.js +12 -0
- package/src/Layout/RoundedTopBox.js +21 -0
- package/src/Layout/index.js +6 -0
- package/src/Switch/index.js +11 -3
- package/src/Text/H5.js +30 -0
- package/src/Text/Text.style.js +9 -0
- package/src/Text/index.js +8 -7
- package/src/Theme/definitions/colors.js +5 -3
- package/src/Theme/definitions/fonts.js +1 -0
- package/src/index.js +10 -1
- package/src/.DS_Store +0 -0
- package/src/Error/.DS_Store +0 -0
- package/src/Icons/.DS_Store +0 -0
- package/src/Icons/Assets/.DS_Store +0 -0
- package/src/Success/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servesall/atoms",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Atoms for react-native",
|
|
5
5
|
"main": "dist/bundle.cjs.js",
|
|
6
6
|
"module": "dist/bundle.esm.js",
|
|
@@ -22,10 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/runtime": "^7.12.18",
|
|
24
24
|
"@killerwink/lottie-react-native-color": "^1.0.2",
|
|
25
|
-
"react-native-gesture-handler": "^1.10.3",
|
|
26
|
-
"react-native-reanimated": "^2.0.0",
|
|
27
25
|
"react-native-status-bar-height": "^2.6.0",
|
|
28
|
-
"react-native-web": "^0.15.0",
|
|
29
26
|
"styled-components": "^5.2.1"
|
|
30
27
|
},
|
|
31
28
|
"peerDependencies": {
|
|
@@ -33,7 +30,7 @@
|
|
|
33
30
|
"react-native": ">= 0.63.2",
|
|
34
31
|
"react-native-reanimated": ">=2.0.0-rc.3",
|
|
35
32
|
"react-native-gesture-handler": ">= 1.10.1",
|
|
36
|
-
"lottie-react-native": "
|
|
33
|
+
"lottie-react-native": ">= 4.0.2"
|
|
37
34
|
},
|
|
38
35
|
"devDependencies": {
|
|
39
36
|
"@babel/cli": "7.8.4",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import { Dimensions } from "react-native";
|
|
3
|
+
import { ButtonStyle } from "./FloatingButton.style";
|
|
4
|
+
import Animated, {
|
|
5
|
+
useAnimatedStyle,
|
|
6
|
+
useSharedValue,
|
|
7
|
+
withTiming,
|
|
8
|
+
withSequence,
|
|
9
|
+
Easing,
|
|
10
|
+
withDelay,
|
|
11
|
+
} from "react-native-reanimated";
|
|
12
|
+
|
|
13
|
+
const RoundedBtn = ({
|
|
14
|
+
children,
|
|
15
|
+
active,
|
|
16
|
+
color,
|
|
17
|
+
onClick = () => {},
|
|
18
|
+
loading,
|
|
19
|
+
LoaderElement,
|
|
20
|
+
successElement,
|
|
21
|
+
success,
|
|
22
|
+
error,
|
|
23
|
+
errorElement,
|
|
24
|
+
leftElement = false,
|
|
25
|
+
}) => {
|
|
26
|
+
const scale = useSharedValue(1);
|
|
27
|
+
const width = useSharedValue("100%");
|
|
28
|
+
|
|
29
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
30
|
+
return {
|
|
31
|
+
opacity: scale.value,
|
|
32
|
+
transform: [
|
|
33
|
+
{
|
|
34
|
+
scale: scale.value,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const animatedWidth = useAnimatedStyle(() => {
|
|
41
|
+
return {
|
|
42
|
+
width: width.value,
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (loading) {
|
|
48
|
+
width.value = withTiming(70, {
|
|
49
|
+
duration: 250,
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
width.value = withDelay(
|
|
53
|
+
800,
|
|
54
|
+
withTiming("100%", {
|
|
55
|
+
duration: 250,
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}, [loading]);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<Animated.View style={[animatedStyle, animatedWidth]}>
|
|
63
|
+
<ButtonStyle
|
|
64
|
+
active={active}
|
|
65
|
+
color={color}
|
|
66
|
+
success={success}
|
|
67
|
+
error={error}
|
|
68
|
+
onPress={() => {
|
|
69
|
+
scale.value = withSequence(
|
|
70
|
+
withTiming(0.9, {
|
|
71
|
+
duration: 80,
|
|
72
|
+
}),
|
|
73
|
+
withTiming(1, {
|
|
74
|
+
duration: 200,
|
|
75
|
+
easing: Easing.in(Easing.elastic(1.4)),
|
|
76
|
+
})
|
|
77
|
+
);
|
|
78
|
+
onClick();
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
{success && successElement}
|
|
82
|
+
{error && errorElement}
|
|
83
|
+
{!success && !error && loading && LoaderElement}
|
|
84
|
+
{!success && !error && !loading && children}
|
|
85
|
+
</ButtonStyle>
|
|
86
|
+
</Animated.View>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export default RoundedBtn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from "styled-components/native";
|
|
2
|
+
import { TouchableWithoutFeedback } from "react-native-gesture-handler";
|
|
3
|
+
|
|
4
|
+
export const ButtonStyle = styled(TouchableWithoutFeedback)`
|
|
5
|
+
min-height: 60px;
|
|
6
|
+
border-radius: ${(props) => props.theme.borderRadius};
|
|
7
|
+
background-color: ${(props) =>
|
|
8
|
+
props.success || props.error ? "transparent" : props.color};
|
|
9
|
+
opacity: ${(props) => (props.active ? 1 : 0.7)};
|
|
10
|
+
`;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import { Dimensions } from "react-native";
|
|
3
|
+
import { Center } from "../../Layout";
|
|
4
|
+
import Animated, {
|
|
5
|
+
useAnimatedStyle,
|
|
6
|
+
useSharedValue,
|
|
7
|
+
withTiming,
|
|
8
|
+
Easing,
|
|
9
|
+
} from "react-native-reanimated";
|
|
10
|
+
import FloatingButton from "./FloatingButton";
|
|
11
|
+
|
|
12
|
+
const AnimatedButton = ({
|
|
13
|
+
children,
|
|
14
|
+
active,
|
|
15
|
+
color,
|
|
16
|
+
onClick = () => {},
|
|
17
|
+
loading,
|
|
18
|
+
leftElement,
|
|
19
|
+
LoaderElement,
|
|
20
|
+
successElement,
|
|
21
|
+
success,
|
|
22
|
+
error,
|
|
23
|
+
errorElement,
|
|
24
|
+
style,
|
|
25
|
+
}) => {
|
|
26
|
+
const scale = useSharedValue(1);
|
|
27
|
+
const width = useSharedValue("100%");
|
|
28
|
+
const height = useSharedValue("100%");
|
|
29
|
+
const right = useSharedValue(0);
|
|
30
|
+
const left = useSharedValue(0);
|
|
31
|
+
|
|
32
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
33
|
+
return {
|
|
34
|
+
opacity: scale.value,
|
|
35
|
+
transform: [
|
|
36
|
+
{
|
|
37
|
+
scale: scale.value,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const animatedAbsolute = useAnimatedStyle(() => {
|
|
44
|
+
return {
|
|
45
|
+
minWidth: width.value,
|
|
46
|
+
height: height.value,
|
|
47
|
+
right: right.value,
|
|
48
|
+
left: left.value,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (loading) {
|
|
54
|
+
width.value = withTiming(Dimensions.get("window").width, {
|
|
55
|
+
duration: 250,
|
|
56
|
+
});
|
|
57
|
+
height.value = withTiming(Dimensions.get("window").height, {
|
|
58
|
+
duration: 250,
|
|
59
|
+
});
|
|
60
|
+
right.value = withTiming(0, {
|
|
61
|
+
duration: 250,
|
|
62
|
+
easing: Easing.in(Easing.elastic(2)),
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
width.value = withTiming("100%", {
|
|
67
|
+
duration: 200,
|
|
68
|
+
});
|
|
69
|
+
height.value = withTiming("100%", {
|
|
70
|
+
duration: 200,
|
|
71
|
+
});
|
|
72
|
+
right.value = withTiming(0, {
|
|
73
|
+
duration: 200,
|
|
74
|
+
easing: Easing.in(Easing.elastic(2)),
|
|
75
|
+
});
|
|
76
|
+
}, 600);
|
|
77
|
+
}
|
|
78
|
+
}, [loading]);
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<Animated.View
|
|
82
|
+
style={[
|
|
83
|
+
{
|
|
84
|
+
flex: 1,
|
|
85
|
+
position: "absolute",
|
|
86
|
+
height: "auto",
|
|
87
|
+
minWidth: 70,
|
|
88
|
+
zIndex: 11,
|
|
89
|
+
backgroundColor:
|
|
90
|
+
loading || success || error
|
|
91
|
+
? "rgba(255, 255, 255, 0.8)"
|
|
92
|
+
: "rgba(255, 255, 255, 0)",
|
|
93
|
+
},
|
|
94
|
+
animatedAbsolute,
|
|
95
|
+
]}
|
|
96
|
+
>
|
|
97
|
+
<Center>
|
|
98
|
+
<Animated.View style={[animatedStyle]}>
|
|
99
|
+
<FloatingButton
|
|
100
|
+
active={active}
|
|
101
|
+
color={color}
|
|
102
|
+
onClick={onClick}
|
|
103
|
+
loading={loading}
|
|
104
|
+
leftElement={leftElement}
|
|
105
|
+
LoaderElement={LoaderElement}
|
|
106
|
+
successElement={successElement}
|
|
107
|
+
errorElement={errorElement}
|
|
108
|
+
success={success}
|
|
109
|
+
error={error}
|
|
110
|
+
style={style}
|
|
111
|
+
>
|
|
112
|
+
{children}
|
|
113
|
+
</FloatingButton>
|
|
114
|
+
</Animated.View>
|
|
115
|
+
</Center>
|
|
116
|
+
</Animated.View>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export default AnimatedButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import styled from
|
|
1
|
+
import styled from "styled-components/native";
|
|
2
2
|
|
|
3
3
|
export const BorderIdle = styled.View`
|
|
4
|
-
height:
|
|
4
|
+
height: 18px;
|
|
5
5
|
background-color: ${(props) => props.color};
|
|
6
6
|
flex: 1;
|
|
7
7
|
position: absolute;
|
|
@@ -10,7 +10,7 @@ export const BorderIdle = styled.View`
|
|
|
10
10
|
`;
|
|
11
11
|
|
|
12
12
|
export const BorderActive = styled.View`
|
|
13
|
-
height:
|
|
13
|
+
height: 18px;
|
|
14
14
|
background-color: ${(props) => props.color};
|
|
15
15
|
z-index: 11;
|
|
16
16
|
`;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import styled from
|
|
1
|
+
import styled from "styled-components/native";
|
|
2
2
|
|
|
3
|
-
export const ButtonWrapper = styled.Pressable
|
|
4
|
-
`;
|
|
3
|
+
export const ButtonWrapper = styled.Pressable``;
|
|
5
4
|
|
|
6
5
|
export const BorderWrapper = styled.View`
|
|
7
|
-
height:
|
|
6
|
+
height: 18px;
|
|
7
|
+
position: absolute;
|
|
8
|
+
width: 100%;
|
|
9
|
+
bottom: 10;
|
|
10
|
+
z-index: 0;
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export const ChildWrapper = styled.View`
|
|
14
|
+
z-index: 2;
|
|
8
15
|
`;
|
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
import React, {useState, useEffect} from
|
|
2
|
-
import {ButtonWrapper, BorderWrapper} from
|
|
3
|
-
import LineAnimation from
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
|
2
|
+
import { ButtonWrapper, BorderWrapper, ChildWrapper } from "./TextButton.style";
|
|
3
|
+
import LineAnimation from "./LineAnimation";
|
|
4
4
|
|
|
5
|
-
const TextBtn = ({
|
|
5
|
+
const TextBtn = ({
|
|
6
|
+
children,
|
|
7
|
+
active,
|
|
8
|
+
disabled = false,
|
|
9
|
+
borderColorActive,
|
|
10
|
+
borderColorIdle,
|
|
11
|
+
onClick = () => {},
|
|
12
|
+
style,
|
|
13
|
+
}) => {
|
|
14
|
+
const [isActive, setIsActive] = useState(active);
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setIsActive(active);
|
|
18
|
+
}, [active]);
|
|
8
19
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</BorderWrapper>
|
|
28
|
-
</ButtonWrapper>
|
|
29
|
-
);
|
|
20
|
+
return (
|
|
21
|
+
<ButtonWrapper
|
|
22
|
+
disabled={disabled}
|
|
23
|
+
onPress={() => {
|
|
24
|
+
onClick();
|
|
25
|
+
active !== false && setIsActive(true);
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
<ChildWrapper>{children}</ChildWrapper>
|
|
29
|
+
<BorderWrapper>
|
|
30
|
+
<LineAnimation
|
|
31
|
+
active={isActive}
|
|
32
|
+
borderColorActive={borderColorActive}
|
|
33
|
+
borderColorIdle={borderColorIdle}
|
|
34
|
+
/>
|
|
35
|
+
</BorderWrapper>
|
|
36
|
+
</ButtonWrapper>
|
|
37
|
+
);
|
|
30
38
|
};
|
|
31
39
|
|
|
32
40
|
export default TextBtn;
|
package/src/Buttons/index.js
CHANGED
|
@@ -3,5 +3,13 @@ import RoundedBtn from "./RoundedButton";
|
|
|
3
3
|
import RoundBtn from "./RoundButton";
|
|
4
4
|
import FloatingBtn from "./FloatingButton";
|
|
5
5
|
import AnimatedButton from "./AnimatedButton";
|
|
6
|
+
import FeedbackButton from "./FeedbackButton";
|
|
6
7
|
|
|
7
|
-
export {
|
|
8
|
+
export {
|
|
9
|
+
TextBtn,
|
|
10
|
+
RoundedBtn,
|
|
11
|
+
RoundBtn,
|
|
12
|
+
FloatingBtn,
|
|
13
|
+
AnimatedButton,
|
|
14
|
+
FeedbackButton,
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BoxElement } from "./Layout.style";
|
|
3
|
+
|
|
4
|
+
const Box = ({ children, color = "", style, direction = false }) => {
|
|
5
|
+
return (
|
|
6
|
+
<BoxElement
|
|
7
|
+
style={{ backgroundColor: color, ...style }}
|
|
8
|
+
flexDirection={direction}
|
|
9
|
+
>
|
|
10
|
+
{children}
|
|
11
|
+
</BoxElement>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default Box;
|
|
@@ -69,6 +69,12 @@ export const MarginTopElement = styled.View`
|
|
|
69
69
|
${(props) => props.style};
|
|
70
70
|
`;
|
|
71
71
|
|
|
72
|
+
export const MarginRightElement = styled.View`
|
|
73
|
+
margin-right: ${(props) => props.theme.margin};
|
|
74
|
+
flex-direction: ${(props) => props.flexDirection || DEFAULT_FLEX_DIRECTION};
|
|
75
|
+
${(props) => props.style};
|
|
76
|
+
`;
|
|
77
|
+
|
|
72
78
|
export const PaddingElement = styled.View`
|
|
73
79
|
padding: ${(props) => props.theme.padding};
|
|
74
80
|
flex-direction: ${(props) => props.flexDirection || DEFAULT_FLEX_DIRECTION};
|
|
@@ -105,6 +111,12 @@ export const StretchElement = styled.View`
|
|
|
105
111
|
${(props) => props.style};
|
|
106
112
|
`;
|
|
107
113
|
|
|
114
|
+
export const BoxElement = styled.View`
|
|
115
|
+
flex: 1;
|
|
116
|
+
flex-direction: ${(props) => props.flexDirection || DEFAULT_FLEX_DIRECTION};
|
|
117
|
+
${(props) => props.style};
|
|
118
|
+
`;
|
|
119
|
+
|
|
108
120
|
export const FullScreenElement = styled.View`
|
|
109
121
|
position: absolute;
|
|
110
122
|
top: 0;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarginRightElement } from "./Layout.style";
|
|
3
|
+
|
|
4
|
+
const MarginRight = ({ children, style, direction = false }) => {
|
|
5
|
+
return (
|
|
6
|
+
<MarginRightElement style={style} flexDirection={direction}>
|
|
7
|
+
{children}
|
|
8
|
+
</MarginRightElement>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default MarginRight;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BoxElement } from "./Layout.style";
|
|
3
|
+
|
|
4
|
+
const RoundedTopBox = ({ children, color = "", style, direction = false }) => {
|
|
5
|
+
return (
|
|
6
|
+
<BoxElement
|
|
7
|
+
style={{
|
|
8
|
+
backgroundColor: color,
|
|
9
|
+
borderTopLeftRadius: 30,
|
|
10
|
+
borderTopRightRadius: 30,
|
|
11
|
+
overflow: "hidden",
|
|
12
|
+
...style,
|
|
13
|
+
}}
|
|
14
|
+
flexDirection={direction}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</BoxElement>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default RoundedTopBox;
|
package/src/Layout/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import MarginHorizontal from "./MarginHorizontal";
|
|
|
6
6
|
import MarginVertical from "./MarginVertical";
|
|
7
7
|
import MarginBottom from "./MarginBottom";
|
|
8
8
|
import MarginTop from "./MarginTop";
|
|
9
|
+
import MarginRight from "./MarginRight";
|
|
9
10
|
import Padding from "./Padding";
|
|
10
11
|
import PaddingHorizontal from "./PaddingHorizontal";
|
|
11
12
|
import PaddingVertical from "./PaddingVertical";
|
|
@@ -14,6 +15,8 @@ import Row from "./Row";
|
|
|
14
15
|
import Stretch from "./Stretch";
|
|
15
16
|
import FullScreen from "./FullScreen";
|
|
16
17
|
import WebSmallWrapper from "./WebSmallWrapper";
|
|
18
|
+
import Box from "./Box";
|
|
19
|
+
import RoundedTopBox from "./RoundedTopBox";
|
|
17
20
|
|
|
18
21
|
export {
|
|
19
22
|
Center,
|
|
@@ -24,6 +27,7 @@ export {
|
|
|
24
27
|
MarginVertical,
|
|
25
28
|
MarginBottom,
|
|
26
29
|
MarginTop,
|
|
30
|
+
MarginRight,
|
|
27
31
|
Padding,
|
|
28
32
|
PaddingHorizontal,
|
|
29
33
|
PaddingVertical,
|
|
@@ -32,4 +36,6 @@ export {
|
|
|
32
36
|
Stretch,
|
|
33
37
|
FullScreen,
|
|
34
38
|
WebSmallWrapper,
|
|
39
|
+
Box,
|
|
40
|
+
RoundedTopBox,
|
|
35
41
|
};
|
package/src/Switch/index.js
CHANGED
|
@@ -46,6 +46,8 @@ export default function Switch({
|
|
|
46
46
|
value = false,
|
|
47
47
|
onValueChange = () => {},
|
|
48
48
|
micro = false,
|
|
49
|
+
radio = false,
|
|
50
|
+
borderColor = false,
|
|
49
51
|
style,
|
|
50
52
|
}) {
|
|
51
53
|
const [isEnabled, setIsEnabled] = useState(value);
|
|
@@ -53,7 +55,7 @@ export default function Switch({
|
|
|
53
55
|
enabled &&
|
|
54
56
|
setIsEnabled((previousState) => {
|
|
55
57
|
onValueChange(!previousState);
|
|
56
|
-
return !previousState;
|
|
58
|
+
return !radio ? !previousState : true;
|
|
57
59
|
});
|
|
58
60
|
};
|
|
59
61
|
|
|
@@ -65,11 +67,17 @@ export default function Switch({
|
|
|
65
67
|
<RoundedBtn
|
|
66
68
|
style={{
|
|
67
69
|
borderWidth: 1,
|
|
68
|
-
borderColor: isEnabled
|
|
70
|
+
borderColor: isEnabled
|
|
71
|
+
? borderColor
|
|
72
|
+
? borderColor
|
|
73
|
+
: colors.color15
|
|
74
|
+
: borderColor
|
|
75
|
+
? borderColor
|
|
76
|
+
: colors.color10,
|
|
69
77
|
opacity: enabled ? 1 : 0.6,
|
|
70
78
|
...style,
|
|
71
79
|
}}
|
|
72
|
-
color=
|
|
80
|
+
color="transparent"
|
|
73
81
|
onClick={toggleSwitch}
|
|
74
82
|
>
|
|
75
83
|
<CheckMark isEnabled={isEnabled} micro={micro} />
|
package/src/Text/H5.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { H5 } from "./Text.style";
|
|
4
|
+
|
|
5
|
+
const H5Text = ({
|
|
6
|
+
children,
|
|
7
|
+
style,
|
|
8
|
+
align = "left",
|
|
9
|
+
color,
|
|
10
|
+
fontFamily,
|
|
11
|
+
...rest
|
|
12
|
+
}) => {
|
|
13
|
+
return (
|
|
14
|
+
<H5
|
|
15
|
+
{...rest}
|
|
16
|
+
style={style}
|
|
17
|
+
align={align}
|
|
18
|
+
color={color}
|
|
19
|
+
fontFamily={fontFamily}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</H5>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
H5Text.propTypes = {
|
|
27
|
+
style: PropTypes.object,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default H5Text;
|
package/src/Text/Text.style.js
CHANGED
|
@@ -36,6 +36,15 @@ export const H4 = styled.Text`
|
|
|
36
36
|
${(props) => props.style};
|
|
37
37
|
`;
|
|
38
38
|
|
|
39
|
+
export const H5 = styled.Text`
|
|
40
|
+
font-size: ${(props) => props.theme.xssmall};
|
|
41
|
+
font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
|
|
42
|
+
text-align: ${(props) => props.align};
|
|
43
|
+
color: ${(props) => props.color || props.theme.color2};
|
|
44
|
+
line-height: ${(props) => props.theme.xssmall};
|
|
45
|
+
${(props) => props.style};
|
|
46
|
+
`;
|
|
47
|
+
|
|
39
48
|
export const Span = styled.Text`
|
|
40
49
|
font-size: ${(props) => props.theme.small};
|
|
41
50
|
font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
|
package/src/Text/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import H1 from
|
|
2
|
-
import H2 from
|
|
3
|
-
import H3 from
|
|
4
|
-
import H4 from
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import H1 from "./H1";
|
|
2
|
+
import H2 from "./H2";
|
|
3
|
+
import H3 from "./H3";
|
|
4
|
+
import H4 from "./H4";
|
|
5
|
+
import H5 from "./H5";
|
|
6
|
+
import P from "./P";
|
|
7
|
+
import Span from "./Span";
|
|
7
8
|
|
|
8
|
-
export { H1, H2, H3, H4, P, Span };
|
|
9
|
+
export { H1, H2, H3, H4, H5, P, Span };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const colors = {
|
|
2
2
|
color1: "#FFFFFF",
|
|
3
|
-
color2: "#
|
|
3
|
+
color2: "#020202",
|
|
4
4
|
color3: "#74b9ff",
|
|
5
5
|
color3light: "#E1F0FF",
|
|
6
6
|
color4: "#0984e3",
|
|
@@ -12,15 +12,17 @@ const colors = {
|
|
|
12
12
|
color7: "#dfe6e9",
|
|
13
13
|
color8: "#F8F9FB",
|
|
14
14
|
color9: "#FFA15F",
|
|
15
|
-
color9light: "#
|
|
15
|
+
color9light: "#F9F0EA",
|
|
16
|
+
color9dark: "#804F2D",
|
|
16
17
|
color9border: "#DDD1C9",
|
|
17
18
|
color10: "#F2F3F7",
|
|
18
19
|
color11: "#00b894",
|
|
19
20
|
color11light: "#EEFFFC",
|
|
20
21
|
color11border: "#D2E3E0",
|
|
21
|
-
color12: "#
|
|
22
|
+
color12: "#9F8CD1",
|
|
22
23
|
color12light: "#F5F4FF",
|
|
23
24
|
color12border: "#DFDDEA",
|
|
25
|
+
color12dark: "#584E74",
|
|
24
26
|
color13: "#fab1a0",
|
|
25
27
|
color14: "#00b894",
|
|
26
28
|
color15: "#00cec9",
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeWrapper, useThemeContext } from "./Theme";
|
|
2
|
-
import { H1, H2, H3, H4, P, Span } from "./Text";
|
|
2
|
+
import { H1, H2, H3, H4, H5, P, Span } from "./Text";
|
|
3
3
|
import {
|
|
4
4
|
Center,
|
|
5
5
|
CenterLeft,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
MarginVertical,
|
|
10
10
|
MarginBottom,
|
|
11
11
|
MarginTop,
|
|
12
|
+
MarginRight,
|
|
12
13
|
Padding,
|
|
13
14
|
PaddingHorizontal,
|
|
14
15
|
PaddingVertical,
|
|
@@ -17,6 +18,8 @@ import {
|
|
|
17
18
|
Stretch,
|
|
18
19
|
FullScreen,
|
|
19
20
|
WebSmallWrapper,
|
|
21
|
+
Box,
|
|
22
|
+
RoundedTopBox,
|
|
20
23
|
} from "./Layout";
|
|
21
24
|
import { Input, AnimatedPlaceholder, InputOtp } from "./Inputs";
|
|
22
25
|
import {
|
|
@@ -25,6 +28,7 @@ import {
|
|
|
25
28
|
RoundBtn,
|
|
26
29
|
FloatingBtn,
|
|
27
30
|
AnimatedButton,
|
|
31
|
+
FeedbackButton,
|
|
28
32
|
} from "./Buttons";
|
|
29
33
|
import Loader from "./Loader";
|
|
30
34
|
import Success from "./Success";
|
|
@@ -42,6 +46,7 @@ export {
|
|
|
42
46
|
H2,
|
|
43
47
|
H3,
|
|
44
48
|
H4,
|
|
49
|
+
H5,
|
|
45
50
|
P,
|
|
46
51
|
Span,
|
|
47
52
|
Center,
|
|
@@ -52,6 +57,7 @@ export {
|
|
|
52
57
|
MarginVertical,
|
|
53
58
|
MarginBottom,
|
|
54
59
|
MarginTop,
|
|
60
|
+
MarginRight,
|
|
55
61
|
Padding,
|
|
56
62
|
PaddingHorizontal,
|
|
57
63
|
PaddingVertical,
|
|
@@ -60,6 +66,8 @@ export {
|
|
|
60
66
|
Stretch,
|
|
61
67
|
FullScreen,
|
|
62
68
|
WebSmallWrapper,
|
|
69
|
+
Box,
|
|
70
|
+
RoundedTopBox,
|
|
63
71
|
Input,
|
|
64
72
|
AnimatedPlaceholder,
|
|
65
73
|
InputOtp,
|
|
@@ -68,6 +76,7 @@ export {
|
|
|
68
76
|
RoundBtn,
|
|
69
77
|
FloatingBtn,
|
|
70
78
|
AnimatedButton,
|
|
79
|
+
FeedbackButton,
|
|
71
80
|
Loader,
|
|
72
81
|
Success,
|
|
73
82
|
Error,
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/Error/.DS_Store
DELETED
|
Binary file
|