@servesall/atoms 1.1.24 → 1.1.25

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 (163) hide show
  1. package/README.md +14 -2
  2. package/dist/bundle.cjs.js +253 -137
  3. package/dist/bundle.web.esm/_virtual/_rollupPluginBabelHelpers.js +167 -0
  4. package/dist/bundle.web.esm/assets/GTEestiProDisplay-Bold87131038a567e93e.ttf +0 -0
  5. package/dist/bundle.web.esm/assets/GTEestiProDisplay-Regular2b2fe0437acb6d5c.ttf +0 -0
  6. package/dist/bundle.web.esm/assets/fonts/GTEestiProDisplay-Bold.ttf.js +3 -0
  7. package/dist/bundle.web.esm/assets/fonts/GTEestiProDisplay-Regular.ttf.js +3 -0
  8. package/dist/bundle.web.esm/src/Icons/Assets/DiningTable.json.js +626 -0
  9. package/dist/bundle.web.esm/src/Icons/Assets/account.json.js +511 -0
  10. package/dist/bundle.web.esm/src/Icons/Assets/add.json.js +283 -0
  11. package/dist/bundle.web.esm/src/Icons/Assets/all.json.js +457 -0
  12. package/dist/bundle.web.esm/src/Icons/Assets/arrowDownLeft.json.js +407 -0
  13. package/dist/bundle.web.esm/src/Icons/Assets/arrowRight.json.js +437 -0
  14. package/dist/bundle.web.esm/src/Icons/Assets/back.json.js +335 -0
  15. package/dist/bundle.web.esm/src/Icons/Assets/back_fat.json.js +346 -0
  16. package/dist/bundle.web.esm/src/Icons/Assets/beachclubslidos.json.js +472 -0
  17. package/dist/bundle.web.esm/src/Icons/Assets/bell.json.js +440 -0
  18. package/dist/bundle.web.esm/src/Icons/Assets/bell_active.json.js +934 -0
  19. package/dist/bundle.web.esm/src/Icons/Assets/bell_alert.json.js +615 -0
  20. package/dist/bundle.web.esm/src/Icons/Assets/big_calendar.json.js +472 -0
  21. package/dist/bundle.web.esm/src/Icons/Assets/big_close.json.js +371 -0
  22. package/dist/bundle.web.esm/src/Icons/Assets/big_good.json.js +298 -0
  23. package/dist/bundle.web.esm/src/Icons/Assets/big_pax.json.js +369 -0
  24. package/dist/bundle.web.esm/src/Icons/Assets/big_time.json.js +441 -0
  25. package/dist/bundle.web.esm/src/Icons/Assets/boatResources.json.js +374 -0
  26. package/dist/bundle.web.esm/src/Icons/Assets/boattripsrentals.json.js +532 -0
  27. package/dist/bundle.web.esm/src/Icons/Assets/bookingPending.json.js +856 -0
  28. package/dist/bundle.web.esm/src/Icons/Assets/calendar.json.js +442 -0
  29. package/dist/bundle.web.esm/src/Icons/Assets/camera.json.js +749 -0
  30. package/dist/bundle.web.esm/src/Icons/Assets/cancelled.json.js +821 -0
  31. package/dist/bundle.web.esm/src/Icons/Assets/category.json.js +386 -0
  32. package/dist/bundle.web.esm/src/Icons/Assets/clinic.json.js +418 -0
  33. package/dist/bundle.web.esm/src/Icons/Assets/close.json.js +748 -0
  34. package/dist/bundle.web.esm/src/Icons/Assets/credit_card.json.js +548 -0
  35. package/dist/bundle.web.esm/src/Icons/Assets/date_quick_icon.json.js +3354 -0
  36. package/dist/bundle.web.esm/src/Icons/Assets/day.json.js +500 -0
  37. package/dist/bundle.web.esm/src/Icons/Assets/file.json.js +617 -0
  38. package/dist/bundle.web.esm/src/Icons/Assets/filled_add.json.js +386 -0
  39. package/dist/bundle.web.esm/src/Icons/Assets/filled_calendar.json.js +395 -0
  40. package/dist/bundle.web.esm/src/Icons/Assets/filled_closed.json.js +509 -0
  41. package/dist/bundle.web.esm/src/Icons/Assets/filled_minus.json.js +290 -0
  42. package/dist/bundle.web.esm/src/Icons/Assets/fitness.json.js +604 -0
  43. package/dist/bundle.web.esm/src/Icons/Assets/fitnessResources.json.js +440 -0
  44. package/dist/bundle.web.esm/src/Icons/Assets/good.json.js +379 -0
  45. package/dist/bundle.web.esm/src/Icons/Assets/home.json.js +287 -0
  46. package/dist/bundle.web.esm/src/Icons/Assets/house.json.js +364 -0
  47. package/dist/bundle.web.esm/src/Icons/Assets/humanResources.json.js +332 -0
  48. package/dist/bundle.web.esm/src/Icons/Assets/index.js +165 -0
  49. package/dist/bundle.web.esm/src/Icons/Assets/lidoResources.json.js +437 -0
  50. package/dist/bundle.web.esm/src/Icons/Assets/location.json.js +367 -0
  51. package/dist/bundle.web.esm/src/Icons/Assets/login.json.js +532 -0
  52. package/dist/bundle.web.esm/src/Icons/Assets/mark.json.js +910 -0
  53. package/dist/bundle.web.esm/src/Icons/Assets/marker.json.js +1261 -0
  54. package/dist/bundle.web.esm/src/Icons/Assets/massage.json.js +787 -0
  55. package/dist/bundle.web.esm/src/Icons/Assets/media.json.js +547 -0
  56. package/dist/bundle.web.esm/src/Icons/Assets/merchant_activity.json.js +445 -0
  57. package/dist/bundle.web.esm/src/Icons/Assets/merchant_date.json.js +580 -0
  58. package/dist/bundle.web.esm/src/Icons/Assets/merchant_marker.json.js +487 -0
  59. package/dist/bundle.web.esm/src/Icons/Assets/merchant_pax.json.js +412 -0
  60. package/dist/bundle.web.esm/src/Icons/Assets/merchant_submit.json.js +520 -0
  61. package/dist/bundle.web.esm/src/Icons/Assets/merchant_time.json.js +424 -0
  62. package/dist/bundle.web.esm/src/Icons/Assets/minus.json.js +221 -0
  63. package/dist/bundle.web.esm/src/Icons/Assets/name.json.js +278 -0
  64. package/dist/bundle.web.esm/src/Icons/Assets/next.json.js +335 -0
  65. package/dist/bundle.web.esm/src/Icons/Assets/non-visible.json.js +385 -0
  66. package/dist/bundle.web.esm/src/Icons/Assets/notes.json.js +496 -0
  67. package/dist/bundle.web.esm/src/Icons/Assets/pax_quick_icon.json.js +2016 -0
  68. package/dist/bundle.web.esm/src/Icons/Assets/penguin.json.js +376 -0
  69. package/dist/bundle.web.esm/src/Icons/Assets/plainDivider.json.js +290 -0
  70. package/dist/bundle.web.esm/src/Icons/Assets/plus.json.js +338 -0
  71. package/dist/bundle.web.esm/src/Icons/Assets/profile.json.js +619 -0
  72. package/dist/bundle.web.esm/src/Icons/Assets/restaurants.json.js +838 -0
  73. package/dist/bundle.web.esm/src/Icons/Assets/salons.json.js +1073 -0
  74. package/dist/bundle.web.esm/src/Icons/Assets/search.json.js +345 -0
  75. package/dist/bundle.web.esm/src/Icons/Assets/settings.json.js +644 -0
  76. package/dist/bundle.web.esm/src/Icons/Assets/signup.json.js +830 -0
  77. package/dist/bundle.web.esm/src/Icons/Assets/spaResources.json.js +710 -0
  78. package/dist/bundle.web.esm/src/Icons/Assets/spamassage.json.js +787 -0
  79. package/dist/bundle.web.esm/src/Icons/Assets/sports.json.js +801 -0
  80. package/dist/bundle.web.esm/src/Icons/Assets/sportsResources.json.js +394 -0
  81. package/dist/bundle.web.esm/src/Icons/Assets/time.json.js +295 -0
  82. package/dist/bundle.web.esm/src/Icons/Assets/time_quick_icon.json.js +2497 -0
  83. package/dist/bundle.web.esm/src/Icons/Assets/toursResources.json.js +548 -0
  84. package/dist/bundle.web.esm/src/Icons/Assets/toursadventure.json.js +572 -0
  85. package/dist/bundle.web.esm/src/Icons/Assets/video_camera.json.js +533 -0
  86. package/dist/bundle.web.esm/src/Icons/Assets/video_library.json.js +824 -0
  87. package/dist/bundle.web.esm/src/Icons/Assets/visible.json.js +307 -0
  88. package/dist/bundle.web.esm/src/Icons/Icons.style.js +13 -0
  89. package/dist/bundle.web.esm/src/Icons/Icons.style.web.js +13 -0
  90. package/dist/bundle.web.esm/src/Icons/index.web.js +67 -0
  91. package/dist/bundle.web.esm/src/Layout/Background.web.js +20 -0
  92. package/dist/bundle.web.esm/src/Layout/BorderBottom.js +13 -0
  93. package/dist/bundle.web.esm/src/Layout/BorderBox.js +13 -0
  94. package/dist/bundle.web.esm/src/Layout/BorderTop.js +13 -0
  95. package/dist/bundle.web.esm/src/Layout/Box.js +24 -0
  96. package/dist/bundle.web.esm/src/Layout/Center.js +15 -0
  97. package/dist/bundle.web.esm/src/Layout/CenterLeft.js +15 -0
  98. package/dist/bundle.web.esm/src/Layout/CenterRight.js +15 -0
  99. package/dist/bundle.web.esm/src/Layout/FullScreen.js +12 -0
  100. package/dist/bundle.web.esm/src/Layout/ImageWrapper.js +14 -0
  101. package/dist/bundle.web.esm/src/Layout/Layout.style.js +176 -0
  102. package/dist/bundle.web.esm/src/Layout/Layout.style.web.js +181 -0
  103. package/dist/bundle.web.esm/src/Layout/Margin.js +15 -0
  104. package/dist/bundle.web.esm/src/Layout/MarginBottom.js +15 -0
  105. package/dist/bundle.web.esm/src/Layout/MarginHorizontal.js +15 -0
  106. package/dist/bundle.web.esm/src/Layout/MarginLeft.js +15 -0
  107. package/dist/bundle.web.esm/src/Layout/MarginRight.js +15 -0
  108. package/dist/bundle.web.esm/src/Layout/MarginTop.js +15 -0
  109. package/dist/bundle.web.esm/src/Layout/MarginVertical.js +15 -0
  110. package/dist/bundle.web.esm/src/Layout/Padding.js +15 -0
  111. package/dist/bundle.web.esm/src/Layout/PaddingBottom.js +15 -0
  112. package/dist/bundle.web.esm/src/Layout/PaddingHorizontal.js +15 -0
  113. package/dist/bundle.web.esm/src/Layout/PaddingLeft.js +15 -0
  114. package/dist/bundle.web.esm/src/Layout/PaddingRight.js +15 -0
  115. package/dist/bundle.web.esm/src/Layout/PaddingTop.js +15 -0
  116. package/dist/bundle.web.esm/src/Layout/PaddingVertical.js +15 -0
  117. package/dist/bundle.web.esm/src/Layout/RoundedBox.js +13 -0
  118. package/dist/bundle.web.esm/src/Layout/RoundedTopBox.js +23 -0
  119. package/dist/bundle.web.esm/src/Layout/Row.js +12 -0
  120. package/dist/bundle.web.esm/src/Layout/Stretch.js +15 -0
  121. package/dist/bundle.web.esm/src/Layout/WebSmallWrapper.js +15 -0
  122. package/dist/bundle.web.esm/src/Text/H1.js +29 -0
  123. package/dist/bundle.web.esm/src/Text/H2.js +29 -0
  124. package/dist/bundle.web.esm/src/Text/H3.js +29 -0
  125. package/dist/bundle.web.esm/src/Text/H4.js +29 -0
  126. package/dist/bundle.web.esm/src/Text/H5.js +29 -0
  127. package/dist/bundle.web.esm/src/Text/P.js +29 -0
  128. package/dist/bundle.web.esm/src/Text/Span.js +29 -0
  129. package/dist/bundle.web.esm/src/Text/Text.style.web.js +97 -0
  130. package/dist/bundle.web.esm/src/Theme/colorScheme.web.js +43 -0
  131. package/dist/bundle.web.esm/src/Theme/definitions/colors.js +158 -0
  132. package/dist/bundle.web.esm/src/Theme/definitions/fonts.import.js +9 -0
  133. package/dist/bundle.web.esm/src/Theme/definitions/fonts.js +19 -0
  134. package/dist/bundle.web.esm/src/Theme/definitions/index.js +10 -0
  135. package/dist/bundle.web.esm/src/Theme/definitions/layout.js +12 -0
  136. package/dist/bundle.web.esm/src/Theme/index.web.js +31 -0
  137. package/dist/bundle.web.esm/src/index.web.js +38 -0
  138. package/package.json +20 -7
  139. package/src/BottomNavBar/index.js +2 -1
  140. package/src/Buttons/FloatingButton/index.js +2 -6
  141. package/src/Header/HeaderBar/index.js +17 -15
  142. package/src/Icons/Icons.style.web.js +9 -0
  143. package/src/Icons/index.web.js +65 -0
  144. package/src/Layout/Background.js +35 -0
  145. package/src/Layout/Background.web.js +16 -0
  146. package/src/Layout/Layout.style.js +8 -3
  147. package/src/Layout/Layout.style.web.js +197 -0
  148. package/src/Layout/RoundedBox.js +10 -0
  149. package/src/Layout/index.js +4 -0
  150. package/src/Text/Text.style.js +28 -7
  151. package/src/Text/Text.style.web.js +78 -0
  152. package/src/Theme/colorScheme.web.js +34 -0
  153. package/src/Theme/definitions/colors.js +103 -61
  154. package/src/Theme/definitions/fonts.import.js +21 -0
  155. package/src/Theme/definitions/fonts.js +4 -2
  156. package/src/Theme/definitions/index.js +12 -6
  157. package/src/Theme/definitions/layout.js +3 -0
  158. package/src/Theme/index.js +18 -14
  159. package/src/Theme/index.web.js +29 -0
  160. package/src/index.js +4 -0
  161. package/src/index.web.js +134 -0
  162. package/dist/bundle.esm.js +0 -54236
  163. package/dist/bundle.umd.js +0 -54303
package/package.json CHANGED
@@ -1,13 +1,21 @@
1
1
  {
2
2
  "name": "@servesall/atoms",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "description": "Atoms for react-native",
5
- "main": "dist/bundle.cjs.js",
6
- "module": "dist/bundle.esm.js",
5
+ "main": "dist/bundle.web.esm/src/index.web.js",
6
+ "react-native": "dist/bundle.cjs.js",
7
+ "module": "dist/bundle.web.esm/src/index.web.js",
7
8
  "files": [
8
9
  "dist",
9
10
  "src"
10
11
  ],
12
+ "exports": {
13
+ ".": {
14
+ "react-native": "./dist/bundle.cjs.js",
15
+ "default": "./dist/bundle.web.esm/src/index.web.js"
16
+ },
17
+ "./*": "./dist/*"
18
+ },
11
19
  "scripts": {
12
20
  "test": "echo \"Error: no test specified\" && exit 1",
13
21
  "build": "npm i && rollup -c && npm publish"
@@ -17,15 +25,17 @@
17
25
  "url": "git+https://github.com/ServesAll/atoms.git"
18
26
  },
19
27
  "peerDependencies": {
28
+ "expo-navigation-bar": "*",
20
29
  "react": "*",
21
30
  "react-native": "*",
22
31
  "react-native-gesture-handler": "*",
23
- "react-native-reanimated": "*"
32
+ "react-native-reanimated": "*",
33
+ "react-native-safe-area-context": "*",
34
+ "styled-components": "^6.1.13"
24
35
  },
25
36
  "dependencies": {
26
37
  "@gorhom/bottom-sheet": "^5.0.5",
27
- "react-native-status-bar-height": "^2.6.0",
28
- "styled-components": "^6.1.13"
38
+ "react-native-status-bar-height": "^2.6.0"
29
39
  },
30
40
  "devDependencies": {
31
41
  "@babel/cli": "^7.17.10",
@@ -33,12 +43,15 @@
33
43
  "@babel/preset-env": "^7.17.10",
34
44
  "@babel/preset-react": "^7.16.7",
35
45
  "@babel/runtime": "^7.17.9",
46
+ "@rollup/plugin-alias": "^5.1.1",
36
47
  "@rollup/plugin-babel": "^5.3.1",
37
48
  "@rollup/plugin-image": "^2.1.1",
38
49
  "@rollup/plugin-json": "^4.1.0",
39
50
  "@rollup/plugin-node-resolve": "^13.3.0",
51
+ "@rollup/plugin-url": "^8.0.2",
40
52
  "rollup": "^2.79.1",
41
- "rollup-plugin-node-polyfills": "^0.2.1"
53
+ "rollup-plugin-node-polyfills": "^0.2.1",
54
+ "rollup-plugin-preserve-directives": "^0.4.0"
42
55
  },
43
56
  "author": "",
44
57
  "license": "ISC",
@@ -1,7 +1,8 @@
1
1
  import React, { useState, useEffect } from "react";
2
2
  import { NavContainer } from "./BottomNavBar.style";
3
3
  import BottomNavController from "./BottomNavController";
4
- import { Keyboard, SafeAreaView } from "react-native";
4
+ import { Keyboard } from "react-native";
5
+ import { SafeAreaView } from "react-native-safe-area-context";
5
6
 
6
7
  const BottomNavBar = (props) => {
7
8
  const [isFocused, setIsFocused] = useState(false);
@@ -1,10 +1,6 @@
1
1
  import React, { useEffect } from "react";
2
- import {
3
- Dimensions,
4
- KeyboardAvoidingView,
5
- Platform,
6
- SafeAreaView,
7
- } from "react-native";
2
+ import { Dimensions, KeyboardAvoidingView, Platform } from "react-native";
3
+ import { SafeAreaView } from "react-native-safe-area-context";
8
4
  import { Center } from "../../Layout";
9
5
  import Animated, {
10
6
  useAnimatedStyle,
@@ -1,20 +1,22 @@
1
- import React from 'react';
2
- import { Platform, SafeAreaView } from 'react-native';
3
- import { getStatusBarHeight } from 'react-native-status-bar-height';
4
- import { HeaderWrapper, HeaderContainer } from './HeaderBar.style';
5
- import { StatusBarComponent } from '../StatusBar';
1
+ import React from "react";
2
+ import { Platform } from "react-native";
3
+ import { SafeAreaView } from "react-native-safe-area-context";
4
+ import { getStatusBarHeight } from "react-native-status-bar-height";
5
+ import { HeaderWrapper, HeaderContainer } from "./HeaderBar.style";
6
+ import { StatusBarComponent } from "../StatusBar";
6
7
 
7
8
  const Header = ({ StatusBarOptions = {}, children, style, height }) => {
8
- return (
9
- <HeaderWrapper height={height + (Platform.OS === 'ios' ? getStatusBarHeight() : 0)} style={style}>
10
- <StatusBarComponent options={StatusBarOptions} />
11
- <SafeAreaView style={{ flex: 1 }}>
12
- <HeaderContainer>
13
- {children}
14
- </HeaderContainer>
15
- </SafeAreaView>
16
- </HeaderWrapper>
17
- );
9
+ return (
10
+ <HeaderWrapper
11
+ height={height + (Platform.OS === "ios" ? getStatusBarHeight() : 0)}
12
+ style={style}
13
+ >
14
+ <StatusBarComponent options={StatusBarOptions} />
15
+ <SafeAreaView style={{ flex: 1 }}>
16
+ <HeaderContainer>{children}</HeaderContainer>
17
+ </SafeAreaView>
18
+ </HeaderWrapper>
19
+ );
18
20
  };
19
21
 
20
22
  export default Header;
@@ -0,0 +1,9 @@
1
+ import styled from "styled-components";
2
+
3
+ export const IconWrapper = styled.div`
4
+ align-items: center;
5
+ justify-content: center;
6
+ height: ${(props) => props.theme[props.size]};
7
+ width: ${(props) => props.theme[props.size]};
8
+ ${(props) => props.style};
9
+ `;
@@ -0,0 +1,65 @@
1
+ import React from "react";
2
+ import Lottie from "lottie-react";
3
+ import allCategories from "./Assets";
4
+ import { IconWrapper } from "./Icons.style.web";
5
+
6
+ const Icon = ({
7
+ icon,
8
+ size = "small",
9
+ autoplay,
10
+ loop,
11
+ color = "#5E5E5E",
12
+ style,
13
+ }) => {
14
+ const hexToRgbArray = (hex) => {
15
+ const normalized = hex.replace("#", "");
16
+ const bigint = parseInt(normalized, 16);
17
+ const r = ((bigint >> 16) & 255) / 255;
18
+ const g = ((bigint >> 8) & 255) / 255;
19
+ const b = (bigint & 255) / 255;
20
+ return [r, g, b];
21
+ };
22
+
23
+ const recolorLottie = (json, hexColor) => {
24
+ const [r, g, b] = hexToRgbArray(hexColor);
25
+ console.log([r, g, b]);
26
+ const cloned = JSON.parse(JSON.stringify(json));
27
+
28
+ const recolorShapes = (shapes) => {
29
+ if (!shapes) return;
30
+ shapes.forEach((shape) => {
31
+ if (shape.ty === "fl" && shape.c && shape.c.k) {
32
+ shape.c.k = [r, g, b, 1];
33
+ }
34
+ // recursively handle nested groups
35
+ if (shape.it) recolorShapes(shape.it);
36
+ });
37
+ };
38
+
39
+ cloned.layers.forEach((layer) => {
40
+ if (layer.shapes) recolorShapes(layer.shapes);
41
+ });
42
+
43
+ return cloned;
44
+ };
45
+ return (
46
+ <IconWrapper size={size}>
47
+ <Lottie
48
+ style={{
49
+ width: "100%",
50
+ height: "100%",
51
+ ...style,
52
+ }}
53
+ autoPlay={autoplay}
54
+ loop={loop}
55
+ animationData={
56
+ color
57
+ ? recolorLottie(allCategories[icon], color)
58
+ : allCategories[icon]
59
+ }
60
+ />
61
+ </IconWrapper>
62
+ );
63
+ };
64
+
65
+ export default Icon;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { useThemeContext } from "../Theme";
4
+ import { StatusBar } from "react-native";
5
+ import { SafeAreaView } from "react-native-safe-area-context";
6
+ import * as NavigationBar from "expo-navigation-bar";
7
+
8
+ const Background = ({ children, style = {} }) => {
9
+ const theme = useThemeContext();
10
+ const { background, colorScheme } = theme;
11
+ const isDarkMode = colorScheme === "dark";
12
+
13
+ const statusBarStyle = isDarkMode ? "light-content" : "dark-content";
14
+
15
+ NavigationBar.setBackgroundColorAsync(background);
16
+ NavigationBar.setButtonStyleAsync(isDarkMode ? "light" : "dark");
17
+
18
+ return (
19
+ <View style={{ flex: 1, backgroundColor: background }}>
20
+ <StatusBar
21
+ translucent={true}
22
+ backgroundColor={background}
23
+ barStyle={statusBarStyle}
24
+ />
25
+ <SafeAreaView style={{ flex: 1, backgroundColor: background, ...style }}>
26
+ {children}
27
+ </SafeAreaView>
28
+ <SafeAreaView
29
+ style={{ flex: 0, backgroundColor: background, ...style }}
30
+ />
31
+ </View>
32
+ );
33
+ };
34
+
35
+ export default Background;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { useThemeContext } from "../Theme";
4
+
5
+ const Background = ({ children, style = {} }) => {
6
+ const theme = useThemeContext();
7
+ const { background } = theme;
8
+
9
+ return (
10
+ <View style={{ flex: 1, backgroundColor: background, ...style }}>
11
+ {children}
12
+ </View>
13
+ );
14
+ };
15
+
16
+ export default Background;
@@ -143,19 +143,19 @@ export const BoxElement = styled.View`
143
143
 
144
144
  export const BorderBottomElement = styled.View`
145
145
  border-bottom-width: 2px;
146
- border-color: ${(props) => props.theme.color7};
146
+ border-color: ${(props) => props.theme.border};
147
147
  ${(props) => props.style};
148
148
  `;
149
149
 
150
150
  export const BorderTopElement = styled.View`
151
151
  border-top-width: 2px;
152
- border-color: ${(props) => props.theme.color7};
152
+ border-color: ${(props) => props.theme.border};
153
153
  ${(props) => props.style};
154
154
  `;
155
155
 
156
156
  export const BorderBoxElement = styled.View`
157
157
  border-width: 2px;
158
- border-color: ${(props) => props.theme.color7};
158
+ border-color: ${(props) => props.theme.border};
159
159
  border-radius: ${(props) => props.theme.borderRadiusSmall};
160
160
  ${(props) => props.style};
161
161
  `;
@@ -183,3 +183,8 @@ export const ImageWrapperElement = styled.View`
183
183
  overflow: hidden;
184
184
  ${(props) => props.styles};
185
185
  `;
186
+
187
+ export const RoundedBoxElement = styled.View`
188
+ border-radius: ${(props) => props.theme.borderRadiusSmall};
189
+ ${(props) => props.styles};
190
+ `;
@@ -0,0 +1,197 @@
1
+ import styled from "styled-components";
2
+ import { Platform } from "react-native";
3
+
4
+ const DEFAULT_FLEX_DIRECTION = Platform.OS === "web" ? "column" : "column";
5
+
6
+ export const CenterElement = styled.div`
7
+ align-items: center;
8
+ justify-content: center;
9
+ flex: 1;
10
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
11
+ display: flex;
12
+ ${(props) => props.style};
13
+ `;
14
+
15
+ export const CenterLeftElement = styled.div`
16
+ align-items: ${(props) =>
17
+ (props.direction || DEFAULT_FLEX_DIRECTION) === "row"
18
+ ? "center"
19
+ : "flex-start"};
20
+ justify-content: ${(props) =>
21
+ (props.direction || DEFAULT_FLEX_DIRECTION) === "row"
22
+ ? "flex-start"
23
+ : "center"};
24
+ flex: 1;
25
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
26
+ ${(props) => props.style};
27
+ `;
28
+
29
+ export const CenterRightElement = styled.div`
30
+ align-items: ${(props) =>
31
+ (props.direction || DEFAULT_FLEX_DIRECTION) === "row"
32
+ ? "center"
33
+ : "flex-end"};
34
+ justify-content: ${(props) =>
35
+ (props.direction || DEFAULT_FLEX_DIRECTION) === "row"
36
+ ? "flex-end"
37
+ : "center"};
38
+ flex: 1;
39
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
40
+ ${(props) => props.style};
41
+ `;
42
+
43
+ export const MarginElement = styled.div`
44
+ margin: ${(props) => props.theme.margin};
45
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
46
+ ${(props) => props.style};
47
+ `;
48
+
49
+ export const MarginHorizontalElement = styled.div`
50
+ margin: 0 ${(props) => props.theme.margin};
51
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
52
+ ${(props) => props.style};
53
+ `;
54
+
55
+ export const MarginVerticalElement = styled.div`
56
+ margin: ${(props) => props.theme.margin} 0;
57
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
58
+ ${(props) => props.style};
59
+ `;
60
+
61
+ export const MarginBottomElement = styled.div`
62
+ margin-bottom: ${(props) => props.theme.margin};
63
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
64
+ ${(props) => props.style};
65
+ `;
66
+
67
+ export const MarginTopElement = styled.div`
68
+ margin-top: ${(props) => props.theme.margin};
69
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
70
+ ${(props) => props.style};
71
+ `;
72
+
73
+ export const MarginRightElement = styled.div`
74
+ margin-right: ${(props) => props.theme.margin};
75
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
76
+ ${(props) => props.style};
77
+ `;
78
+
79
+ export const MarginLeftElement = styled.div`
80
+ margin-left: ${(props) => props.theme.margin};
81
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
82
+ ${(props) => props.style};
83
+ `;
84
+
85
+ export const PaddingElement = styled.div`
86
+ padding: ${(props) => props.theme.padding};
87
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
88
+ ${(props) => props.style};
89
+ `;
90
+
91
+ export const PaddingHorizontalElement = styled.div`
92
+ padding: 0 ${(props) => props.theme.padding};
93
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
94
+ ${(props) => props.style};
95
+ `;
96
+
97
+ export const PaddingVerticalElement = styled.div`
98
+ padding: ${(props) => props.theme.padding} 0;
99
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
100
+ ${(props) => props.style};
101
+ `;
102
+
103
+ export const PaddingTopElement = styled.div`
104
+ padding-top: ${(props) => props.theme.padding};
105
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
106
+ ${(props) => props.style};
107
+ `;
108
+
109
+ export const PaddingBottomElement = styled.div`
110
+ padding-bottom: ${(props) => props.theme.padding};
111
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
112
+ ${(props) => props.style};
113
+ `;
114
+
115
+ export const PaddingLeftElement = styled.div`
116
+ padding-left: ${(props) => props.theme.padding};
117
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
118
+ ${(props) => props.style};
119
+ `;
120
+
121
+ export const PaddingRightElement = styled.div`
122
+ padding-right: ${(props) => props.theme.padding};
123
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
124
+ ${(props) => props.style};
125
+ `;
126
+
127
+ export const RowElement = styled.div`
128
+ flex-direction: row;
129
+ display: flex;
130
+ ${(props) => props.style};
131
+ `;
132
+
133
+ export const StretchElement = styled.div`
134
+ align-items: stretch;
135
+ align-self: stretch;
136
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
137
+ ${(props) => props.style};
138
+ `;
139
+
140
+ export const BoxElement = styled.div`
141
+ flex: 1;
142
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
143
+ ${(props) => props.style};
144
+ `;
145
+
146
+ export const BorderBottomElement = styled.div`
147
+ border-bottom-width: 2px;
148
+ border-color: ${(props) => props.theme.border};
149
+ border-style: solid;
150
+ ${(props) => props.style};
151
+ `;
152
+
153
+ export const BorderTopElement = styled.div`
154
+ border-top-width: 2px;
155
+ border-color: ${(props) => props.theme.border};
156
+ border-style: solid;
157
+ ${(props) => props.style};
158
+ `;
159
+
160
+ export const BorderBoxElement = styled.div`
161
+ border-width: 2px;
162
+ border-color: ${(props) => props.theme.border};
163
+ border-radius: ${(props) => props.theme.borderRadiusSmall};
164
+ overflow: hidden;
165
+ border-style: solid;
166
+ ${(props) => props.style};
167
+ `;
168
+
169
+ export const FullScreenElement = styled.div`
170
+ position: absolute;
171
+ top: 0;
172
+ bottom: 0;
173
+ left: 0;
174
+ right: 0;
175
+ z-index: 11;
176
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
177
+ ${(props) => props.style};
178
+ `;
179
+
180
+ export const WebSmallWrapperElement = styled.div`
181
+ flex-direction: ${(props) => props.direction || DEFAULT_FLEX_DIRECTION};
182
+ width: 500px;
183
+ ${(props) => props.style};
184
+ `;
185
+
186
+ export const ImageWrapperElement = styled.div`
187
+ border-radius: ${(props) => props.theme.borderRadiusSmall};
188
+ background-color: ${(props) => props.theme.color7};
189
+ overflow: hidden;
190
+ ${(props) => props.styles};
191
+ `;
192
+
193
+ export const RoundedBoxElement = styled.div`
194
+ border-radius: ${(props) => props.theme.borderRadiusSmall};
195
+ overflow: hidden;
196
+ ${(props) => props.styles};
197
+ `;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { RoundedBoxElement } from "./Layout.style";
3
+
4
+ const RoundedBox = ({ children, styles }) => {
5
+ return (
6
+ <RoundedBoxElement styles={{ ...styles }}>{children}</RoundedBoxElement>
7
+ );
8
+ };
9
+
10
+ export default RoundedBox;
@@ -25,6 +25,8 @@ import BorderBottom from "./BorderBottom";
25
25
  import BorderTop from "./BorderTop";
26
26
  import BorderBox from "./BorderBox";
27
27
  import ImageWrapper from "./ImageWrapper";
28
+ import Background from "./Background";
29
+ import RoundedBox from "./RoundedBox";
28
30
 
29
31
  export {
30
32
  Center,
@@ -54,4 +56,6 @@ export {
54
56
  BorderTop,
55
57
  BorderBox,
56
58
  ImageWrapper,
59
+ Background,
60
+ RoundedBox,
57
61
  };
@@ -4,7 +4,10 @@ export const H1 = styled.Text`
4
4
  font-size: ${(props) => props.theme.large};
5
5
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
6
6
  text-align: ${(props) => props.align};
7
- color: ${(props) => props.color || props.theme.color2};
7
+ color: ${(props) =>
8
+ props.color || props.secondary
9
+ ? props.theme.secondaryText
10
+ : props.theme.primaryText};
8
11
  line-height: ${(props) => props.theme.lhLarge};
9
12
  ${(props) => props.style};
10
13
  `;
@@ -13,7 +16,10 @@ export const H2 = styled.Text`
13
16
  font-size: ${(props) => props.theme.medium};
14
17
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
15
18
  text-align: ${(props) => props.align};
16
- color: ${(props) => props.color || props.theme.color2};
19
+ color: ${(props) =>
20
+ props.color || props.secondary
21
+ ? props.theme.secondaryText
22
+ : props.theme.primaryText};
17
23
  line-height: ${(props) => props.theme.lhMedium};
18
24
  ${(props) => props.style};
19
25
  `;
@@ -22,7 +28,10 @@ export const H3 = styled.Text`
22
28
  font-size: ${(props) => props.theme.small};
23
29
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
24
30
  text-align: ${(props) => props.align};
25
- color: ${(props) => props.color || props.theme.color2};
31
+ color: ${(props) =>
32
+ props.color || props.secondary
33
+ ? props.theme.secondaryText
34
+ : props.theme.primaryText};
26
35
  line-height: ${(props) => props.theme.lhSmall};
27
36
  ${(props) => props.style};
28
37
  `;
@@ -31,7 +40,10 @@ export const H4 = styled.Text`
31
40
  font-size: ${(props) => props.theme.xsmall};
32
41
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
33
42
  text-align: ${(props) => props.align};
34
- color: ${(props) => props.color || props.theme.color2};
43
+ color: ${(props) =>
44
+ props.color || props.secondary
45
+ ? props.theme.secondaryText
46
+ : props.theme.primaryText};
35
47
  line-height: ${(props) => props.theme.small};
36
48
  ${(props) => props.style};
37
49
  `;
@@ -40,7 +52,10 @@ export const H5 = styled.Text`
40
52
  font-size: ${(props) => props.theme.xssmall};
41
53
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
42
54
  text-align: ${(props) => props.align};
43
- color: ${(props) => props.color || props.theme.color2};
55
+ color: ${(props) =>
56
+ props.color || props.secondary
57
+ ? props.theme.secondaryText
58
+ : props.theme.primaryText};
44
59
  line-height: ${(props) => props.theme.xssmall};
45
60
  ${(props) => props.style};
46
61
  `;
@@ -49,7 +64,10 @@ export const Span = styled.Text`
49
64
  font-size: ${(props) => props.theme.small};
50
65
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
51
66
  text-align: ${(props) => props.align};
52
- color: ${(props) => props.color || props.theme.color2};
67
+ color: ${(props) =>
68
+ props.color || props.secondary
69
+ ? props.theme.secondaryText
70
+ : props.theme.primaryText};
53
71
  line-height: ${(props) => props.theme.lhSmall};
54
72
  ${(props) => props.style};
55
73
  `;
@@ -58,7 +76,10 @@ export const P = styled.Text`
58
76
  font-size: ${(props) => props.theme.small};
59
77
  font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
60
78
  text-align: ${(props) => props.align};
61
- color: ${(props) => props.color || props.theme.color2};
79
+ color: ${(props) =>
80
+ props.color || props.secondary
81
+ ? props.theme.secondaryText
82
+ : props.theme.primaryText};
62
83
  line-height: ${(props) => props.theme.lhSmall};
63
84
  ${(props) => props.style};
64
85
  `;
@@ -0,0 +1,78 @@
1
+ import styled from "styled-components";
2
+
3
+ export const H1 = styled.h1`
4
+ font-size: ${(props) => props.theme.large};
5
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
6
+ text-align: ${(props) => props.align};
7
+ color: ${(props) =>
8
+ props.color ||
9
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
10
+ line-height: ${(props) => props.theme.lhLarge};
11
+ ${(props) => props.style};
12
+ `;
13
+
14
+ export const H2 = styled.h2`
15
+ font-size: ${(props) => props.theme.medium};
16
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
17
+ text-align: ${(props) => props.align};
18
+ color: ${(props) =>
19
+ props.color ||
20
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
21
+ line-height: ${(props) => props.theme.lhMedium};
22
+ ${(props) => props.style};
23
+ `;
24
+
25
+ export const H3 = styled.h3`
26
+ font-size: ${(props) => props.theme.small};
27
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
28
+ text-align: ${(props) => props.align};
29
+ color: ${(props) =>
30
+ props.color ||
31
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
32
+ line-height: ${(props) => props.theme.lhSmall};
33
+ ${(props) => props.style};
34
+ `;
35
+
36
+ export const H4 = styled.h4`
37
+ font-size: ${(props) => props.theme.xsmall};
38
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
39
+ text-align: ${(props) => props.align};
40
+ color: ${(props) =>
41
+ props.color ||
42
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
43
+ line-height: ${(props) => props.theme.small};
44
+ ${(props) => props.style};
45
+ `;
46
+
47
+ export const H5 = styled.h5`
48
+ font-size: ${(props) => props.theme.xssmall};
49
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
50
+ text-align: ${(props) => props.align};
51
+ color: ${(props) =>
52
+ props.color ||
53
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
54
+ line-height: ${(props) => props.theme.xssmall};
55
+ ${(props) => props.style};
56
+ `;
57
+
58
+ export const Span = styled.span`
59
+ font-size: ${(props) => props.theme.small};
60
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
61
+ text-align: ${(props) => props.align};
62
+ color: ${(props) =>
63
+ props.color ||
64
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
65
+ line-height: ${(props) => props.theme.lhSmall};
66
+ ${(props) => props.style};
67
+ `;
68
+
69
+ export const P = styled.p`
70
+ font-size: ${(props) => props.theme.small};
71
+ font-family: ${(props) => props.fontFamily || props.theme.fontFamily1};
72
+ text-align: ${(props) => props.align};
73
+ color: ${(props) =>
74
+ props.color ||
75
+ (props.secondary ? props.theme.secondaryText : props.theme.primaryText)};
76
+ line-height: ${(props) => props.theme.lhSmall};
77
+ ${(props) => props.style};
78
+ `;