@servesall/atoms 1.1.10 → 1.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servesall/atoms",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "Atoms for react-native",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -1 +1 @@
1
- {"ip":0,"fr":60,"v":"5.1.20","assets":[],"layers":[{"ty":4,"nm":"close","ip":0,"st":0,"ind":2,"hix":1,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[9,9.5,0]},"p":{"s":true,"x":{"a":0,"k":23.4385},"y":{"a":0,"k":23.720500000000005}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":44.69070802020421},"s":{"a":0,"k":[201.29999999999998,201.29999999999998]}},"shapes":[{"ty":"gr","nm":"close shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[8,3],[8,1],[10,-1],[12,1],[12,3],[12,18],[12,20],[10,22],[8,20]],"i":[[0,0],[0,0],[-1.3333333300000003,0],[0,-1.3333333330000001],[0,0],[0,0],[0,0],[1.3333332999999996,0],[0,1.3333332999999996]],"o":[[0,0],[0,-1.3333333330000001],[1.3333332999999996,0],[0,0],[0,0],[0,0],[0,1.3333332999999996],[-1.3333333300000003,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":2,"c":{"a":0,"k":[0.12156862745098039,0.17647058823529413,0.20784313725490197,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,-100]},"p":{"a":0,"k":[23.496,9.146]},"r":{"a":0,"k":225.0005261478743}}]},{"ty":"gr","nm":"close shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[8,3],[8,1],[10,-1],[12,1],[12,3],[12,18],[12,20],[10,22],[8,20]],"i":[[0,0],[0,0],[-1.3333333300000003,0],[0,-1.3333333330000001],[0,0],[0,0],[0,0],[1.3333332999999996,0],[0,1.3333332999999996]],"o":[[0,0],[0,-1.3333333330000001],[1.3333332999999996,0],[0,0],[0,0],[0,0],[0,1.3333332999999996],[-1.3333333300000003,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":2,"c":{"a":0,"k":[0.12156862745098039,0.17647058823529413,0.20784313725490197,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[-5.496,9.146]},"r":{"a":0,"k":315.0121957629266}}]}],"op":1},{"ty":4,"nm":"Group 3","ip":0,"st":0,"ind":1,"hix":2,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[12,11.5,0]},"p":{"s":true,"x":{"a":0,"k":453.4845},"y":{"a":0,"k":349.9054999999998}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":0,"k":[152.7,152.7]}},"shapes":[{"ty":"gr","nm":"Group 3 shape group","it":[{"ty":"rc","s":{"a":0,"k":[30,5]},"r":{"a":0,"k":2},"p":{"a":0,"k":[13,12.5]}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":2,"c":{"a":0,"k":[0.12156862745098039,0.17647058823529413,0.20784313725490197,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,-100]},"p":{"a":0,"k":[12.354,-6.531]},"r":{"a":0,"k":134.98885653282196}}]},{"ty":"gr","nm":"Group 3 shape group","it":[{"ty":"rc","s":{"a":0,"k":[30,5]},"r":{"a":0,"k":2},"p":{"a":0,"k":[13,12.5]}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":2,"c":{"a":0,"k":[0.12156862745098039,0.17647058823529413,0.20784313725490197,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[11.646,-6.531]},"r":{"a":0,"k":44.97718691776963}}]}],"op":1}],"op":1,"w":47,"h":48}
1
+ {"ip":0,"fr":60,"v":"5.1.20","assets":[],"layers":[{"ty":4,"nm":"add","ip":0,"st":0,"ind":1,"hix":1,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[119,119,0]},"p":{"s":true,"x":{"a":0,"k":200},"y":{"a":0,"k":200}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":0,"k":[161.8,161.8]}},"shapes":[{"ty":"gr","nm":"add shape group","it":[{"ty":"rc","s":{"a":0,"k":[40,238]},"r":{"a":0,"k":20},"p":{"a":0,"k":[119,119]}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":2,"c":{"a":0,"k":[1,1,1,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[238,0]},"r":{"a":0,"k":90.01166961505233}}]},{"ty":"gr","nm":"add shape group","it":[{"ty":"rc","s":{"a":0,"k":[40,238]},"r":{"a":0,"k":20},"p":{"a":0,"k":[119,119]}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":2,"c":{"a":0,"k":[1,1,1,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]}],"op":1}],"op":1,"w":400,"h":400}
@@ -75,6 +75,12 @@ export const MarginRightElement = styled.View`
75
75
  ${(props) => props.style};
76
76
  `;
77
77
 
78
+ export const MarginLeftElement = styled.View`
79
+ margin-left: ${(props) => props.theme.margin};
80
+ flex-direction: ${(props) => props.flexDirection || DEFAULT_FLEX_DIRECTION};
81
+ ${(props) => props.style};
82
+ `;
83
+
78
84
  export const PaddingElement = styled.View`
79
85
  padding: ${(props) => props.theme.padding};
80
86
  flex-direction: ${(props) => props.flexDirection || DEFAULT_FLEX_DIRECTION};
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { MarginLeftElement } from "./Layout.style";
3
+
4
+ const MarginLeft = ({ children, style, direction = false }) => {
5
+ return (
6
+ <MarginLeftElement style={style} flexDirection={direction}>
7
+ {children}
8
+ </MarginLeftElement>
9
+ );
10
+ };
11
+
12
+ export default MarginLeft;
@@ -7,6 +7,7 @@ import MarginVertical from "./MarginVertical";
7
7
  import MarginBottom from "./MarginBottom";
8
8
  import MarginTop from "./MarginTop";
9
9
  import MarginRight from "./MarginRight";
10
+ import MarginLeft from "./MarginLeft";
10
11
  import Padding from "./Padding";
11
12
  import PaddingHorizontal from "./PaddingHorizontal";
12
13
  import PaddingVertical from "./PaddingVertical";
@@ -31,6 +32,7 @@ export {
31
32
  MarginBottom,
32
33
  MarginTop,
33
34
  MarginRight,
35
+ MarginLeft,
34
36
  Padding,
35
37
  PaddingHorizontal,
36
38
  PaddingVertical,
@@ -6,14 +6,20 @@ import { RoundedBtn } from "../Buttons";
6
6
  import colors from "../Theme/definitions/colors";
7
7
  import { Center } from "../Layout";
8
8
 
9
- const CheckMark = ({ fat, isEnabled, micro }) => {
9
+ const CheckMark = ({ fat, isEnabled, micro, mini }) => {
10
+ const size = () => {
11
+ if (micro) return -7;
12
+ if (mini) return -30;
13
+ return 10;
14
+ };
15
+
10
16
  const loadingRef = useRef();
11
17
  return (
12
18
  <View
13
19
  style={{
14
20
  position: "absolute",
15
- top: micro ? -7 : 10,
16
- right: micro ? -7 : 10,
21
+ top: size(),
22
+ right: size(),
17
23
  width: 30,
18
24
  height: 30,
19
25
  borderRadius: 15,
@@ -46,6 +52,7 @@ export default function Switch({
46
52
  value = false,
47
53
  onValueChange = () => {},
48
54
  micro = false,
55
+ mini = false,
49
56
  fat = false,
50
57
  radio = false,
51
58
  borderColor = false,
@@ -82,7 +89,7 @@ export default function Switch({
82
89
  onClick={toggleSwitch}
83
90
  >
84
91
  {children}
85
- <CheckMark fat={fat} isEnabled={isEnabled} micro={micro} />
92
+ <CheckMark fat={fat} isEnabled={isEnabled} micro={micro} mini={mini} />
86
93
  </RoundedBtn>
87
94
  );
88
95
  }
package/src/index.js CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  MarginBottom,
11
11
  MarginTop,
12
12
  MarginRight,
13
+ MarginLeft,
13
14
  Padding,
14
15
  PaddingHorizontal,
15
16
  PaddingVertical,
@@ -71,6 +72,7 @@ export {
71
72
  MarginBottom,
72
73
  MarginTop,
73
74
  MarginRight,
75
+ MarginLeft,
74
76
  Padding,
75
77
  PaddingHorizontal,
76
78
  PaddingVertical,