@servesall/atoms 1.0.50 → 1.0.55

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.
Files changed (42) hide show
  1. package/dist/bundle.cjs.js +9541 -280
  2. package/dist/bundle.esm.js +9540 -281
  3. package/dist/bundle.umd.js +9541 -280
  4. package/package.json +1 -1
  5. package/src/.DS_Store +0 -0
  6. package/src/Buttons/AnimatedButton/FloatingButton.js +20 -8
  7. package/src/Buttons/AnimatedButton/index.js +14 -5
  8. package/src/Buttons/RoundButton/RoundButton.style.js +4 -4
  9. package/src/Buttons/RoundButton/index.js +3 -0
  10. package/src/Icons/.DS_Store +0 -0
  11. package/src/Icons/Assets/.DS_Store +0 -0
  12. package/src/Icons/Assets/arrowRight.json +1 -0
  13. package/src/Icons/Assets/back.json +125 -1
  14. package/src/Icons/Assets/boatResources.json +162 -0
  15. package/src/Icons/Assets/calendar.json +1 -0
  16. package/src/Icons/Assets/category.json +143 -0
  17. package/src/Icons/Assets/day.json +1 -0
  18. package/src/Icons/Assets/diningTable.json +293 -0
  19. package/src/Icons/Assets/fitnessResources.json +156 -0
  20. package/src/Icons/Assets/house.json +1 -0
  21. package/src/Icons/Assets/humanResources.json +129 -0
  22. package/src/Icons/Assets/index.js +40 -0
  23. package/src/Icons/Assets/lidoResources.json +189 -0
  24. package/src/Icons/Assets/location.json +1 -0
  25. package/src/Icons/Assets/media.json +251 -0
  26. package/src/Icons/Assets/minus.json +1 -0
  27. package/src/Icons/Assets/name.json +116 -0
  28. package/src/Icons/Assets/plus.json +1 -0
  29. package/src/Icons/Assets/settings.json +207 -0
  30. package/src/Icons/Assets/spaResources.json +278 -0
  31. package/src/Icons/Assets/sportsResources.json +156 -0
  32. package/src/Icons/Assets/time.json +1 -0
  33. package/src/Icons/Assets/toursResources.json +228 -0
  34. package/src/Layout/Layout.style.js +6 -0
  35. package/src/Layout/PaddingTop.js +12 -0
  36. package/src/Layout/index.js +2 -0
  37. package/src/Switch/index.js +77 -0
  38. package/src/Switch/switch.json +1 -0
  39. package/src/Theme/definitions/colors.js +14 -3
  40. package/src/Theme/definitions/fonts.js +1 -1
  41. package/src/Theme/definitions/layout.js +4 -4
  42. package/src/index.js +4 -0
@@ -0,0 +1,228 @@
1
+ {
2
+ "ip": 0,
3
+ "fr": 60,
4
+ "v": "5.1.20",
5
+ "assets": [],
6
+ "layers": [
7
+ {
8
+ "ty": 4,
9
+ "nm": "toursResources",
10
+ "ip": 0,
11
+ "st": 0,
12
+ "ind": 1,
13
+ "hix": 1,
14
+ "ks": {
15
+ "o": { "a": 0, "k": 100 },
16
+ "or": { "a": 0, "k": [0, 0, 0] },
17
+ "a": { "a": 0, "k": [13, 9, 0] },
18
+ "p": {
19
+ "s": true,
20
+ "x": { "a": 0, "k": 13.621 },
21
+ "y": { "a": 0, "k": 12.04 }
22
+ },
23
+ "rx": { "a": 0, "k": 0 },
24
+ "ry": { "a": 0, "k": 0 },
25
+ "rz": { "a": 0, "k": 0 },
26
+ "s": { "a": 0, "k": [100, 100, 100] }
27
+ },
28
+ "shapes": [
29
+ {
30
+ "ty": "gr",
31
+ "nm": "toursResources shape group",
32
+ "it": [
33
+ {
34
+ "ty": "sh",
35
+ "ks": {
36
+ "a": 0,
37
+ "k": {
38
+ "c": false,
39
+ "v": [
40
+ [6.20812066, 22.4253184],
41
+ [9.14678701, 24.2866516],
42
+ [12.0907873, 22.4133174]
43
+ ],
44
+ "i": [
45
+ [0, 0],
46
+ [-1.2986666400000004, 0],
47
+ [-0.5186667000000007, 1.1066666000000005]
48
+ ],
49
+ "o": [
50
+ [0.5199999800000006, 1.1000000000000014],
51
+ [1.3026666899999988, 0],
52
+ [0, 0]
53
+ ]
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "ty": "sh",
59
+ "ks": {
60
+ "a": 0,
61
+ "k": {
62
+ "c": true,
63
+ "v": [
64
+ [28.2907867, 21.0373179],
65
+ [25.041453, 17.7879842],
66
+ [21.7921206, 21.0373179],
67
+ [25.041453, 24.2866516]
68
+ ],
69
+ "i": [
70
+ [0, 1.7945572999999975],
71
+ [1.794557300000001, 0],
72
+ [0, -1.7945571999999999],
73
+ [-1.7945571999999999, 0]
74
+ ],
75
+ "o": [
76
+ [0, -1.7945571999999999],
77
+ [-1.7945571999999999, 0],
78
+ [0, 1.7945572999999975],
79
+ [1.794557300000001, 0]
80
+ ]
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "ty": "sh",
86
+ "ks": {
87
+ "a": 0,
88
+ "k": {
89
+ "c": false,
90
+ "v": [
91
+ [22.2654533, 15.0493177],
92
+ [19.708121, 7.71331787],
93
+ [16.1534538, 7.71331787]
94
+ ],
95
+ "i": [
96
+ [0, 0],
97
+ [0, 0],
98
+ [0, 0]
99
+ ],
100
+ "o": [
101
+ [0, 0],
102
+ [0, 0],
103
+ [0, 0]
104
+ ]
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "ty": "sh",
110
+ "ks": {
111
+ "a": 0,
112
+ "k": {
113
+ "c": false,
114
+ "v": [
115
+ [11.5601203, 10.597318],
116
+ [8.48812071, 10.597318],
117
+ [5.54412047, 9.3053182],
118
+ [4.90012042, 8.60531807]
119
+ ],
120
+ "i": [
121
+ [0, 0],
122
+ [0, 0],
123
+ [0.7573333599999996, 0.8239999999999998],
124
+ [0, 0]
125
+ ],
126
+ "o": [
127
+ [0, 0],
128
+ [-1.1186666400000007, 0],
129
+ [0, 0],
130
+ [0, 0]
131
+ ]
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "ty": "sh",
137
+ "ks": {
138
+ "a": 0,
139
+ "k": {
140
+ "c": false,
141
+ "v": [
142
+ [25.041453, 14.4373182],
143
+ [18.5867869, 19.6506513],
144
+ [18.5894547, 19.6506513],
145
+ [14.5841204, 19.6506513],
146
+ [9.14545441, 14.2119853],
147
+ [3.70678711, 19.6506513],
148
+ [14.5841204, 19.6506513]
149
+ ],
150
+ "i": [
151
+ [0, 0],
152
+ [0.6373333000000017, -2.9786666000000004],
153
+ [0, 0],
154
+ [0, 0],
155
+ [3.0039999900000005, 0],
156
+ [0, -3.0040000000000013],
157
+ [0, 0]
158
+ ],
159
+ "o": [
160
+ [-3.1693333999999993, 0],
161
+ [0, 0],
162
+ [0, 0],
163
+ [0, -3.0040000000000013],
164
+ [-3.0040000299999994, 0],
165
+ [0, 0],
166
+ [0, 0]
167
+ ]
168
+ }
169
+ }
170
+ },
171
+ {
172
+ "ty": "sh",
173
+ "ks": {
174
+ "a": 0,
175
+ "k": {
176
+ "c": false,
177
+ "v": [
178
+ [24.296121, 10.597318],
179
+ [24.296121, 8.60531807]
180
+ ],
181
+ "i": [
182
+ [0, 0],
183
+ [0, 0]
184
+ ],
185
+ "o": [
186
+ [0, 0],
187
+ [0, 0]
188
+ ]
189
+ }
190
+ }
191
+ },
192
+ {
193
+ "ty": "st",
194
+ "o": { "a": 0, "k": 100 },
195
+ "c": { "a": 0, "k": [0, 0, 0, 1] },
196
+ "lc": 2,
197
+ "lj": 2,
198
+ "ml": 1,
199
+ "w": { "a": 0, "k": 1 },
200
+ "d": [
201
+ { "n": "d", "v": { "a": 0, "k": 0 }, "nm": "0" },
202
+ { "n": "g", "v": { "a": 0, "k": 0 }, "nm": "1" }
203
+ ]
204
+ },
205
+ {
206
+ "ty": "fl",
207
+ "o": { "a": 0, "k": 0 },
208
+ "c": { "a": 0, "k": [0, 0, 0, 0] },
209
+ "r": 1
210
+ },
211
+ {
212
+ "ty": "tr",
213
+ "o": { "a": 0, "k": 100 },
214
+ "a": { "a": 0, "k": [0, 0] },
215
+ "s": { "a": 0, "k": [100, 100] },
216
+ "p": { "a": 0, "k": [-3, -7] },
217
+ "r": { "a": 0, "k": 0 }
218
+ }
219
+ ]
220
+ }
221
+ ],
222
+ "op": 1
223
+ }
224
+ ],
225
+ "op": 1,
226
+ "w": 28,
227
+ "h": 25
228
+ }
@@ -87,6 +87,12 @@ export const PaddingVerticalElement = styled.View`
87
87
  ${(props) => props.style};
88
88
  `;
89
89
 
90
+ export const PaddingTopElement = styled.View`
91
+ padding-top: ${(props) => props.theme.padding};
92
+ flex-direction: ${(props) => props.flexDirection || DEFAULT_FLEX_DIRECTION};
93
+ ${(props) => props.style};
94
+ `;
95
+
90
96
  export const RowElement = styled.View`
91
97
  flex-direction: row;
92
98
  ${(props) => props.style};
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { PaddingTopElement } from "./Layout.style";
3
+
4
+ const PaddingTop = ({ children, style, direction = false }) => {
5
+ return (
6
+ <PaddingTopElement style={style} flexDirection={direction}>
7
+ {children}
8
+ </PaddingTopElement>
9
+ );
10
+ };
11
+
12
+ export default PaddingTop;
@@ -9,6 +9,7 @@ import MarginTop from "./MarginTop";
9
9
  import Padding from "./Padding";
10
10
  import PaddingHorizontal from "./PaddingHorizontal";
11
11
  import PaddingVertical from "./PaddingVertical";
12
+ import PaddingTop from "./PaddingTop";
12
13
  import Row from "./Row";
13
14
  import Stretch from "./Stretch";
14
15
  import FullScreen from "./FullScreen";
@@ -26,6 +27,7 @@ export {
26
27
  Padding,
27
28
  PaddingHorizontal,
28
29
  PaddingVertical,
30
+ PaddingTop,
29
31
  Row,
30
32
  Stretch,
31
33
  FullScreen,
@@ -0,0 +1,77 @@
1
+ import React, { useState, useEffect, useRef } from "react";
2
+ import { View } from "react-native";
3
+ import LottieView from "lottie-react-native";
4
+ import switchIcon from "./switch.json";
5
+ import { RoundedBtn } from "../Buttons";
6
+ import colors from "../Theme/definitions/colors";
7
+ import { Center } from "../Layout";
8
+
9
+ const CheckMark = ({ isEnabled, micro }) => {
10
+ const loadingRef = useRef();
11
+ return (
12
+ <View
13
+ style={{
14
+ position: "absolute",
15
+ top: micro ? -7 : 10,
16
+ right: micro ? -7 : 10,
17
+ width: 30,
18
+ height: 30,
19
+ borderRadius: 15,
20
+ borderWidth: 1,
21
+ borderColor: isEnabled ? colors.color1 : colors.color10,
22
+ backgroundColor: colors.color1,
23
+ }}
24
+ >
25
+ <Center>
26
+ {isEnabled && (
27
+ <LottieView
28
+ ref={loadingRef}
29
+ style={{
30
+ height: 30,
31
+ width: 30,
32
+ }}
33
+ autoPlay={true}
34
+ loop={false}
35
+ source={switchIcon}
36
+ />
37
+ )}
38
+ </Center>
39
+ </View>
40
+ );
41
+ };
42
+
43
+ export default function Switch({
44
+ children,
45
+ enabled = true,
46
+ value = false,
47
+ onValueChange = () => {},
48
+ micro = false,
49
+ }) {
50
+ const [isEnabled, setIsEnabled] = useState(value);
51
+ const toggleSwitch = () => {
52
+ enabled &&
53
+ setIsEnabled((previousState) => {
54
+ onValueChange(!previousState);
55
+ return !previousState;
56
+ });
57
+ };
58
+
59
+ useEffect(() => {
60
+ setIsEnabled(value);
61
+ }, [value]);
62
+
63
+ return (
64
+ <RoundedBtn
65
+ style={{
66
+ borderWidth: 1,
67
+ borderColor: isEnabled ? colors.color15 : colors.color10,
68
+ opacity: enabled ? 1 : 0.6,
69
+ }}
70
+ color={colors.color1}
71
+ onClick={toggleSwitch}
72
+ >
73
+ <CheckMark isEnabled={isEnabled} micro={micro} />
74
+ {children}
75
+ </RoundedBtn>
76
+ );
77
+ }
@@ -0,0 +1 @@
1
+ {"ip":0,"fr":60,"v":"5.1.20","assets":[],"layers":[{"ty":4,"nm":"success","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":[75,75,0]},"p":{"s":true,"x":{"a":1,"k":[{"t":0,"s":[50],"e":[50.05400195600987],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":12}]},"y":{"a":1,"k":[{"t":0,"s":[50],"e":[49.946001956009866],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":12}]}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":1,"k":[{"t":0,"s":[11,11],"e":[66.7,66.7],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":12}]}},"shapes":[{"ty":"gr","nm":"success shape group","it":[{"ty":"rc","s":{"a":0,"k":[69,15]},"r":{"a":0,"k":7},"p":{"a":0,"k":[85.2835427,75.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":[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":[-28.156,92.301]},"r":{"a":0,"k":310.02746294528845}}]},{"ty":"gr","nm":"success shape group","it":[{"ty":"rc","s":{"a":0,"k":[43,15]},"r":{"a":0,"k":7},"p":{"a":0,"k":[58.5,85.6007333]}},{"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":[85.687,-14.236]},"r":{"a":0,"k":50.019215514920866}}]},{"ty":"gr","nm":"success shape group","it":[{"ty":"el","p":{"a":0,"k":[75,75]},"s":{"a":0,"k":[150,150]}},{"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.3333333333333333,0.9372549019607843,0.7686274509803922,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.784,0]},"r":{"a":0,"k":0}}]}],"op":12}],"op":12,"w":100,"h":100}
@@ -1,19 +1,30 @@
1
1
  const colors = {
2
2
  color1: "#FFFFFF",
3
- color2: "#2d3436",
3
+ color2: "#000000",
4
4
  color3: "#74b9ff",
5
+ color3light: "#E1F0FF",
5
6
  color4: "#0984e3",
6
7
  color5: "#ffeaa7",
8
+ color5light: "#FFF9E5",
9
+ color5border: "#E4E0D2",
7
10
  color6: "#ff7675",
11
+ color6light: "#FFDCDB",
8
12
  color7: "#dfe6e9",
9
- color8: "#fafafa",
13
+ color8: "#F8F9FB",
10
14
  color9: "#FFA15F",
11
- color10: "#f6f7fb",
15
+ color9light: "#FFF0E6",
16
+ color9border: "#DDD1C9",
17
+ color10: "#F2F3F7",
12
18
  color11: "#00b894",
19
+ color11light: "#EEFFFC",
20
+ color11border: "#D2E3E0",
13
21
  color12: "#a29bfe",
22
+ color12light: "#F5F4FF",
23
+ color12border: "#DFDDEA",
14
24
  color13: "#fab1a0",
15
25
  color14: "#00b894",
16
26
  color15: "#00cec9",
17
27
  color16: "#636e72",
28
+ color17: "#6c5ce7",
18
29
  };
19
30
  export default colors;
@@ -1,5 +1,5 @@
1
1
  const fonts = {
2
- xsmall: "12px",
2
+ xsmall: "16px",
3
3
  lhXsmall: "15px",
4
4
  small: "18px",
5
5
  lhSmall: "21px",
@@ -1,7 +1,7 @@
1
1
  const layout = {
2
- margin: '20px',
3
- padding: '10px',
4
- borderRadius: '8px',
5
- borderRadiusSmall: '8px'
2
+ margin: "16px",
3
+ padding: "10px",
4
+ borderRadius: "8px",
5
+ borderRadiusSmall: "8px",
6
6
  };
7
7
  export default layout;
package/src/index.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  Padding,
13
13
  PaddingHorizontal,
14
14
  PaddingVertical,
15
+ PaddingTop,
15
16
  Row,
16
17
  Stretch,
17
18
  FullScreen,
@@ -32,6 +33,7 @@ import Icon from "./Icons";
32
33
  import FlatList from "./FlatList";
33
34
  import Header from "./Header";
34
35
  import BottomNavBar from "./BottomNavBar";
36
+ import Switch from "./Switch";
35
37
 
36
38
  export {
37
39
  ThemeWrapper,
@@ -53,6 +55,7 @@ export {
53
55
  Padding,
54
56
  PaddingHorizontal,
55
57
  PaddingVertical,
58
+ PaddingTop,
56
59
  Row,
57
60
  Stretch,
58
61
  FullScreen,
@@ -72,4 +75,5 @@ export {
72
75
  FlatList,
73
76
  Header,
74
77
  BottomNavBar,
78
+ Switch,
75
79
  };