@servesall/atoms 1.0.55 → 1.1.0

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.
@@ -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
  };
@@ -46,13 +46,16 @@ export default function Switch({
46
46
  value = false,
47
47
  onValueChange = () => {},
48
48
  micro = false,
49
+ radio = false,
50
+ borderColor = false,
51
+ style,
49
52
  }) {
50
53
  const [isEnabled, setIsEnabled] = useState(value);
51
54
  const toggleSwitch = () => {
52
55
  enabled &&
53
56
  setIsEnabled((previousState) => {
54
57
  onValueChange(!previousState);
55
- return !previousState;
58
+ return !radio ? !previousState : true;
56
59
  });
57
60
  };
58
61
 
@@ -64,10 +67,17 @@ export default function Switch({
64
67
  <RoundedBtn
65
68
  style={{
66
69
  borderWidth: 1,
67
- borderColor: isEnabled ? colors.color15 : colors.color10,
70
+ borderColor: isEnabled
71
+ ? borderColor
72
+ ? borderColor
73
+ : colors.color15
74
+ : borderColor
75
+ ? borderColor
76
+ : colors.color10,
68
77
  opacity: enabled ? 1 : 0.6,
78
+ ...style,
69
79
  }}
70
- color={colors.color1}
80
+ color="transparent"
71
81
  onClick={toggleSwitch}
72
82
  >
73
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;
@@ -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 './H1';
2
- import H2 from './H2';
3
- import H3 from './H3';
4
- import H4 from './H4';
5
- import P from './P';
6
- import Span from './Span';
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: "#000000",
3
+ color2: "#020202",
4
4
  color3: "#74b9ff",
5
5
  color3light: "#E1F0FF",
6
6
  color4: "#0984e3",
@@ -12,19 +12,22 @@ const colors = {
12
12
  color7: "#dfe6e9",
13
13
  color8: "#F8F9FB",
14
14
  color9: "#FFA15F",
15
- color9light: "#FFF0E6",
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: "#a29bfe",
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",
27
29
  color16: "#636e72",
28
30
  color17: "#6c5ce7",
31
+ color18: "#81ecec",
29
32
  };
30
33
  export default colors;
@@ -1,4 +1,5 @@
1
1
  const fonts = {
2
+ xssmall: "14px",
2
3
  xsmall: "16px",
3
4
  lhXsmall: "15px",
4
5
  small: "18px",
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
Binary file
Binary file
Binary file
Binary file