panhui 5 tahun lalu
induk
melakukan
3a53243676
80 mengubah file dengan 1992 tambahan dan 4757 penghapusan
  1. 1 6
      .expo-shared/assets.json
  2. 0 3
      App.js
  3. 43 0
      MapHtml/ChooseMap.html
  4. 11 0
      MapHtml/MapImage.html
  5. 163 0
      MapHtml/MapMarkerDetail.html
  6. 99 0
      Utils/MapUtils.js
  7. 35 1
      Utils/OrderUtils.js
  8. 4 0
      Utils/RequestUtils.js
  9. 1 1
      Utils/TotastUtils.js
  10. 2 2
      app.json
  11. 34 3
      components/HomeHeader.js
  12. 2 2
      constants/Colors.js
  13. 3 3
      constants/Layout.js
  14. 0 39
      native-base-theme/components/Badge.js
  15. 0 11
      native-base-theme/components/Body.js
  16. 0 386
      native-base-theme/components/Button.js
  17. 0 37
      native-base-theme/components/Card.js
  18. 0 198
      native-base-theme/components/CardItem.js
  19. 0 38
      native-base-theme/components/CheckBox.js
  20. 0 17
      native-base-theme/components/Container.js
  21. 0 14
      native-base-theme/components/Content.js
  22. 0 25
      native-base-theme/components/Fab.js
  23. 0 119
      native-base-theme/components/Footer.js
  24. 0 79
      native-base-theme/components/FooterTab.js
  25. 0 86
      native-base-theme/components/Form.js
  26. 0 13
      native-base-theme/components/H1.js
  27. 0 13
      native-base-theme/components/H2.js
  28. 0 13
      native-base-theme/components/H3.js
  29. 0 419
      native-base-theme/components/Header.js
  30. 0 12
      native-base-theme/components/Icon.js
  31. 0 19
      native-base-theme/components/Input.js
  32. 0 132
      native-base-theme/components/InputGroup.js
  33. 0 242
      native-base-theme/components/Item.js
  34. 0 12
      native-base-theme/components/Label.js
  35. 0 11
      native-base-theme/components/Left.js
  36. 0 446
      native-base-theme/components/ListItem.js
  37. 0 14
      native-base-theme/components/Picker.android.js
  38. 0 7
      native-base-theme/components/Picker.ios.js
  39. 0 14
      native-base-theme/components/Picker.js
  40. 0 31
      native-base-theme/components/Radio.js
  41. 0 14
      native-base-theme/components/Right.js
  42. 0 57
      native-base-theme/components/Segment.js
  43. 0 49
      native-base-theme/components/Separator.js
  44. 0 9
      native-base-theme/components/Spinner.js
  45. 0 19
      native-base-theme/components/Subtitle.js
  46. 0 46
      native-base-theme/components/SwipeRow.js
  47. 0 9
      native-base-theme/components/Switch.js
  48. 0 10
      native-base-theme/components/Tab.js
  49. 0 57
      native-base-theme/components/TabBar.js
  50. 0 26
      native-base-theme/components/TabContainer.js
  51. 0 40
      native-base-theme/components/TabHeading.js
  52. 0 17
      native-base-theme/components/Text.js
  53. 0 25
      native-base-theme/components/Textarea.js
  54. 0 40
      native-base-theme/components/Thumbnail.js
  55. 0 21
      native-base-theme/components/Title.js
  56. 0 41
      native-base-theme/components/Toast.js
  57. 0 13
      native-base-theme/components/View.js
  58. 0 249
      native-base-theme/components/index.js
  59. 0 311
      native-base-theme/variables/commonColor.js
  60. 0 304
      native-base-theme/variables/material.js
  61. 0 334
      native-base-theme/variables/platform.js
  62. 13 2
      navigation/BaseNavigator.jsx
  63. 1 1
      navigation/BottomTabNavigator.jsx
  64. 486 454
      package-lock.json
  65. 30 25
      package.json
  66. 128 0
      screens/Address/HomeAddressCom.jsx
  67. 105 0
      screens/Main/AddressScreen.jsx
  68. 90 0
      screens/Main/Home/HomeHeader.js
  69. 4 73
      screens/Main/Home/List.jsx
  70. 83 0
      screens/Main/Home/ListTop.jsx
  71. 1 1
      screens/Main/Home/MerchantCom.jsx
  72. 13 13
      screens/Main/Home/SpecialArea.jsx
  73. 21 3
      screens/Main/Home/model.js
  74. 56 22
      screens/Main/HomeScreen.jsx
  75. 126 0
      screens/Main/SearchMapScreen.jsx
  76. 89 0
      screens/Map/MapMarkImg.jsx
  77. 38 0
      screens/Map/MapMarkScreen.jsx
  78. 251 0
      screens/Map/MapScreen.jsx
  79. 45 0
      screens/Map/model.js
  80. 14 4
      screens/Order/OrderScreen.jsx

+ 1 - 6
.expo-shared/assets.json

@@ -1,6 +1 @@
-{
-  "e997a5256149a4b76e6bfd6cbf519c5e5a0f1d278a3d8fa1253022b03c90473b": true,
-  "af683c96e0ffd2cf81287651c9433fa44debc1220ca7cb431fe482747f34a505": true,
-  "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
-  "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
-}
+{}

+ 0 - 3
App.js

@@ -5,7 +5,6 @@ import {
   createStackNavigator,
   CardStyleInterpolators,
 } from '@react-navigation/stack';
-import { ScrollView } from 'react-native-gesture-handler';
 import { UseAPIProvider } from '@umijs/use-request';
 
 import { Provider as PaperProvider } from 'react-native-paper';
@@ -54,8 +53,6 @@ export default function App() {
           routes: [
             {
               name: initName,
-              // name: 'MerchantDetail',
-              // name: 'Cooperation',
             },
           ],
         })

+ 43 - 0
MapHtml/ChooseMap.html

@@ -0,0 +1,43 @@
+<html>
+
+<head lang="zh-CN">
+	<meta charset="UTF-8">
+	<meta name="viewport"
+		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+	<meta name="mobile-web-app-capable" content="yes">
+	<meta name="apple-mobile-web-app-capable" content="yes">
+	<meta name="apple-mobile-web-app-status-bar-style" content="black">
+	<meta name="format-detection" content="address=no">
+	<script type="text/javascript"
+		src="https://3gimg.qq.com/lightmap/components/locationPicker2/js/main-62c2e3b971.js"></script>
+	<title>locationPicker Components Demo - iframe</title>
+	<style>
+		* {
+			margin: 0;
+			padding: 0;
+		}
+
+		body,
+		html {
+			overflow: hidden;
+		}
+	</style>
+
+</head>
+
+<body>
+	<!-- 通过 iframe 嵌入地图选点组件 -->
+	<iframe id="iframe" style="width:100vw;height:100vh" frameborder=0 scrolling="no"
+		src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K&referer=Dingdong">
+	</iframe>
+
+	<script>
+
+		window.addEventListener('message', function (event) {
+			var loc = event.data;
+			window.ReactNativeWebView.postMessage(JSON.stringify(loc))
+		}, false);
+
+
+	</script>
+</body>

+ 11 - 0
MapHtml/MapImage.html

@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
+	<title>Document</title>
+</head>
+<body>
+	<img src="https://apis.map.qq.com/ws/staticmap/v2/?center=39.8802147,116.415794&zoom=12&size=200*200&maptype=roadmap&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K" alt="">
+</body>
+</html>

+ 163 - 0
MapHtml/MapMarkerDetail.html

@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<title>DOMOverlay</title>
+</head>
+<script charset="utf-8"
+	src="https://map.qq.com/api/gljs?libraries=tools&v=1.exp&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77"></script>
+<style type="text/css">
+	html,
+	body {
+		height: 100%;
+		margin: 0px;
+		padding: 0px;
+	}
+
+	#container {
+		width: 100%;
+		height: 100%;
+	}
+</style>
+
+<body onload="initMap()">
+	<div id="container"></div>
+	<script>
+		var SVG_NS = 'http://www.w3.org/2000/svg';
+		// 自定义环状饼图 - 继承DOMOverlay
+		function Donut(options) {
+			TMap.DOMOverlay.call(this, options);
+		}
+
+		Donut.prototype = new TMap.DOMOverlay();
+
+		// 初始化
+		Donut.prototype.onInit = function (options) {
+			this.position = options.position;
+			this.data = options.data;
+			this.minRadius = options.minRadius || 0;
+			this.maxRadius = options.maxRadius || 50;
+		};
+
+		// 销毁时需解绑事件监听
+		Donut.prototype.onDestroy = function () {
+			if (this.onClick) {
+				this.dom.removeEventListener(this.onClick);
+			}
+		};
+
+		// 创建DOM元素,返回一个DOMElement,使用this.dom可以获取到这个元素
+		Donut.prototype.createDOM = function () {
+			let svg = document.createElementNS(SVG_NS, 'svg');
+
+			svg.setAttribute('width', '64px');
+			svg.setAttribute('height', '75px');
+			svg.style.cssText = 'position:absolute;top:0px;left:0px;';
+			html = `<path fill-rule="evenodd"  opacity="0.502" fill="rgb(0, 0, 0)"
+ d="M31.000,50.787 C47.016,50.787 60.000,55.715 60.000,61.793 C60.000,67.872 47.016,72.799 31.000,72.799 C14.984,72.799 2.000,67.872 2.000,61.793 C2.000,55.715 14.984,50.787 31.000,50.787 Z"/>
+<path fill-rule="evenodd"  stroke="rgb(241, 90, 60)" stroke-width="4px" stroke-linecap="butt" stroke-linejoin="miter" fill="rgb(241, 90, 60)"
+ d="M56.154,60.538 C53.385,61.278 50.538,59.639 49.796,56.878 C49.796,56.878 47.801,55.106 45.308,52.447 L43.260,60.792 L18.805,60.792 L16.779,52.535 C14.237,55.187 12.199,56.952 12.199,56.952 C11.457,59.715 8.614,61.355 5.847,60.614 C3.080,59.874 1.438,57.034 2.180,54.271 L13.538,32.672 C13.575,32.535 13.639,32.414 13.686,32.282 C13.712,32.216 13.735,32.146 13.762,32.082 C13.974,31.558 14.254,31.084 14.606,30.670 C15.128,30.021 15.766,29.529 16.521,29.269 C17.015,29.059 17.537,28.921 18.082,28.872 C18.751,28.358 20.921,26.742 23.554,25.303 C20.647,22.983 18.781,19.423 18.781,15.425 C18.781,8.431 24.476,2.762 31.500,2.762 C38.524,2.762 44.219,8.431 44.219,15.425 C44.219,19.606 42.174,23.303 39.036,25.609 C41.333,26.910 43.200,28.280 43.903,28.812 C44.695,28.882 45.452,29.122 46.120,29.524 C46.662,29.816 47.132,30.238 47.530,30.756 C47.536,30.763 47.542,30.770 47.548,30.778 C47.736,31.024 47.904,31.294 48.057,31.582 C48.076,31.619 48.093,31.655 48.111,31.692 C48.293,32.051 48.454,32.431 48.582,32.842 L59.825,54.198 C60.567,56.959 58.924,59.798 56.154,60.538 Z"/>
+`
+			svg.innerHTML = html
+
+
+
+			// click事件监听
+			this.onClick = () => {
+				// DOMOverlay继承自EventEmitter,可以使用emit触发事件
+				this.emit('click');
+			};
+			svg.addEventListener('click', this.onClick);
+			return svg;
+		};
+
+		// 更新DOM元素,在地图移动/缩放后执行
+		Donut.prototype.updateDOM = function () {
+			if (!this.map) {
+				return;
+			}
+
+			// 经纬度坐标转容器像素坐标
+			let pixel = this.map.projectToContainer(this.position);
+
+			// 使饼图中心点对齐经纬度坐标点
+			let left = pixel.getX() - this.dom.clientWidth / 2 + 'px';
+			let top = pixel.getY() - this.dom.clientHeight / 2 + 'px';
+			this.dom.style.transform = `translate(${left}, ${top})`;
+		};
+
+		// 使用SVG创建环状饼图
+		function createDonut(data, minRadius, maxRadius) {
+			const colorList = [
+				'#7AF4FF',
+				'#67D7FF',
+				'#52B5FF',
+				'#295BFF'
+			];
+			let sum = data.reduce((prev, curr) => prev + curr, 0);
+			let angle = 0;
+
+			let group = document.createElementNS(SVG_NS, "g");
+
+
+			// 在中心创建一个圆形
+			let circleShape = document.createElementNS(SVG_NS, 'circle');
+			circleShape.setAttribute('style', 'fill: #FFFFFF');
+			circleShape.setAttribute('cx', 0);
+			circleShape.setAttribute('cy', 0);
+			circleShape.setAttribute('r', minRadius);
+			group.appendChild(circleShape);
+
+			// 绘制文字
+			let textShape = document.createElementNS(SVG_NS, 'text');
+			textShape.setAttribute('x', 0);
+			textShape.setAttribute('y', '0.3em');
+			textShape.setAttribute('text-anchor', 'middle');
+			textShape.innerHTML = sum;
+			group.appendChild(textShape);
+
+			return group;
+		}
+
+		window.Donut = Donut;
+	</script>
+	<script type="text/javascript">
+		var map;
+		function initMap() {
+			// 初始化地图
+			map = new TMap.Map("container", {
+				zoom: 12, // 设置地图缩放级别
+				center: new TMap.LatLng(39.984104, 116.307503) // 设置地图中心点坐标
+			});
+
+			let donutList = [
+				new Donut({
+					map,
+					position: new TMap.LatLng(39.96030543872138, 116.25809083213608),
+					type: 'user'
+				}),
+				new Donut({
+					map,
+					position: new TMap.LatLng(39.9986945980902, 116.33598362780685),
+					type: 'merchat'
+				}),
+				new Donut({
+					map,
+					position: new TMap.LatLng(40.02906301748584, 116.25499991104516),
+					type: 'rider'
+				})
+			];
+
+			donutList.forEach((donut, index) => {
+				donut.on('click', () => {
+					console.log(`第${index}个环形图被点击,位置为${donut.position}`);
+				});
+			});
+		}
+	</script>
+</body>
+
+</html>

+ 99 - 0
Utils/MapUtils.js

@@ -0,0 +1,99 @@
+import * as Location from 'expo-location';
+import * as Permissions from 'expo-permissions';
+import * as TaskManager from 'expo-task-manager';
+import request from './RequestUtils';
+import { alert } from './TotastUtils';
+
+const key = 'c4faf80125b298f93bbc1477db10e69c';
+const tengxunKey = 'GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K';
+
+let lat = '31.981746';
+let lng = '118.734661';
+
+async function getLocation() {
+  return Location.requestPermissionsAsync()
+    .then((res) => {
+      if (res.status === 'granted') {
+        return Location.getCurrentPositionAsync({
+          enableHighAccuracy: true,
+        });
+      } else {
+        return Promise.reject();
+      }
+    })
+    .then(({ coords }) => {
+      lat = coords.latitude;
+      lng = coords.longitude;
+
+      return request.get(
+        `https://apis.map.qq.com/ws/coord/v1/translate?locations=${lat},${lng}&type=1&key=${tengxunKey}&get_poi=1`,
+        {
+          prefix: '',
+          mode: 'no-cors',
+        }
+      );
+    })
+    .then((res) => {
+      if (res.status === 0) {
+        lat = res.locations[0].lat;
+        lng = res.locations[0].lng;
+      }
+      return request.get(
+        `https://apis.map.qq.com/ws/geocoder/v1/?location=${lat},${lng}&key=${tengxunKey}&get_poi=1`,
+        {
+          prefix: '',
+          mode: 'no-cors',
+        }
+      );
+    })
+    .then((res) => {
+      if (res.status === 0) {
+        return Promise.resolve({
+          addressName: res.result.address,
+          location: res.result.location,
+        });
+      } else {
+        return Promise.reject();
+      }
+    })
+    .catch((e) => {
+      return Promise.resolve({
+        addressName: '定位失败',
+        location: {
+          lat,
+          lng,
+        },
+      });
+    });
+}
+
+function getSearch(searchKey, boundary) {
+  return request
+    .get(
+      `https://apis.map.qq.com/ws/place/v1/search?boundary=${boundary}&keyword=${searchKey}&page_size=20&page_index=1&orderby=_distance&key=${tengxunKey}`,
+      {
+        prefix: '',
+        mode: 'no-cors',
+      }
+    )
+    .then((res) => {
+      if (res.status === 0) {
+        return Promise.resolve({
+          pois: res.data,
+        });
+      } else {
+        return Promise.reject();
+      }
+    })
+    .catch(() => {
+      return Promise.resolve({
+        pois: [],
+      });
+    });
+}
+
+function mapMarks(params) {
+  return `https://restapi.amap.com/v3/staticmap?zoom=15&size=500*500&paths=10,0x0000ff,1,,:116.31604,39.96491;116.320816,39.966606;116.321785,39.966827;116.32361,39.966957&key=${key}`;
+}
+
+export { getLocation, getSearch };

+ 35 - 1
Utils/OrderUtils.js

@@ -7,6 +7,7 @@ const merchantStatusMap = new Map([
       name: '待商家接单',
       sort: 0,
       type: 'merchant',
+      nowImgType: 'merchant',
     },
   ],
   [
@@ -15,6 +16,7 @@ const merchantStatusMap = new Map([
       name: '商家已接单',
       sort: 0,
       type: 'merchant',
+      nowImgType: 'merchant',
     },
   ],
   [
@@ -117,6 +119,7 @@ const RiderStatusMap = new Map([
       name: '骑手已接单',
       sort: 1,
       type: 'rider',
+      nowImgType: 'rider',
     },
   ],
   [
@@ -125,6 +128,7 @@ const RiderStatusMap = new Map([
       name: '骑手已取餐',
       sort: 1,
       type: 'rider',
+      nowImgType: 'rider',
     },
   ],
   [
@@ -133,6 +137,7 @@ const RiderStatusMap = new Map([
       name: '订单正在配送中',
       sort: 1,
       type: 'rider',
+      nowImgType: 'rider',
     },
   ],
   [
@@ -172,4 +177,33 @@ const payMap = new Map([
   ],
 ]);
 
-export { merchantStatusMap, orderStatusMap, RiderStatusMap, payMap };
+function getStatusInfo(orderInfo) {
+  const statusList = [];
+
+  if (orderInfo.status) {
+    statusList.push(orderStatusMap.get(orderInfo.status));
+  }
+  if (orderInfo.merchantStatus) {
+    statusList.push(merchantStatusMap.get(orderInfo.merchantStatus));
+  }
+  if (orderInfo.riderStatus) {
+    statusList.push(RiderStatusMap.get(orderInfo.riderStatus));
+  }
+
+  if (statusList.length > 0) {
+    return statusList.sort((a, b) => {
+      return b.sort - a.sort;
+    })[0];
+  } else {
+    return {
+      name: '订单详情',
+    };
+  }
+}
+export {
+  merchantStatusMap,
+  orderStatusMap,
+  RiderStatusMap,
+  payMap,
+  getStatusInfo,
+};

+ 4 - 0
Utils/RequestUtils.js

@@ -5,8 +5,10 @@ import { getAsyncStorage } from './AsyncStorageUtils';
 const baseUrl = 'http://dingdong.izouma.com';
 const request = extend({
   prefix: baseUrl,
+  // mode: 'no-cors',
   credentials: 'include',
   errorHandler: (error) => {
+    console.log(error);
     let errorInfo = '';
     if (error.response) {
       errorInfo = error.data;
@@ -30,6 +32,8 @@ request.interceptors.request.use(
     return getAsyncStorage('token').then((token) => {
       const headers = {
         'Access-Control-Allow-Origin': '*',
+        'Content-Type': 'application/json',
+        'X-Content-Type-Options': 'nosniff',
         ...options.headers,
       };
       if (token) {

+ 1 - 1
Utils/TotastUtils.js

@@ -3,7 +3,7 @@
 import React from 'react';
 import { Modal } from '@ant-design/react-native';
 import { Text } from 'react-native-magnus';
-import { Linking } from 'expo';
+import * as Linking from 'expo-linking';
 
 import { navigate } from '../navigation/RootNavigation';
 

+ 2 - 2
app.json

@@ -33,9 +33,9 @@
       "package": "com.izouma.dingdongClient",
       "versionCode": 1,
       "permissions": [
+        "ACCESS_COARSE_LOCATION",
+        "ACCESS_FINE_LOCATION",
         "CAMERA",
-        "READ_INTERNAL_STORAGE",
-        "WRITE_INTERNAL_STORAGE",
         "READ_EXTERNAL_STORAGE",
         "WRITE_EXTERNAL_STORAGE"
       ]

+ 34 - 3
components/HomeHeader.js

@@ -1,9 +1,9 @@
 import * as React from 'react';
-import { Platform } from 'react-native';
 import { StatusBar } from 'expo-status-bar';
-import Constants from 'expo-constants';
 import { Appbar, Menu } from 'react-native-paper';
 import { useBoolean } from '@umijs/hooks';
+import { Icon, Text, Button, Div } from 'react-native-magnus';
+
 import useModel from 'flooks';
 import words from '../flooks/Words';
 import user from '../flooks/User';
@@ -19,11 +19,21 @@ export default function Header() {
   } = useModel(words);
   const { logout } = useModel(user, []);
 
+  const [location, setLocation] = React.useState();
+  console.log(location);
+  function locationEvent() {
+    getLocation().then((res) => {
+      // console.log(res);
+      setLocation(res);
+    });
+  }
+
   return (
     <>
       <StatusBar backgroundColor="transparent" style="dark" translucent />
 
       <Appbar.Header
+        statusBarHeight={0}
         theme={{ colors: { primary: '#fff' } }}
         style={{
           elevation: 0,
@@ -32,9 +42,29 @@ export default function Header() {
             height: 0,
           },
           shadowOpacity: 0,
+          zIndex: 2,
         }}
       >
-        <Appbar.Content title={TlocationWord} titleStyle={{ fontSize: 16 }} />
+        <Button onPress={locationEvent} block bg="hiden" p={0} flex={1}>
+          <Div flex={1} row>
+            <Icon
+              name="navigation"
+              color="brand500"
+              fontFamily="Feather"
+              ml={15}
+            />
+            <Text
+              numberOfLines={2}
+              ellipsizeMode="tail"
+              fontSize="xl"
+              ml={5}
+              fontWeight="bold"
+              flex={1}
+            >
+              {location ? location.addressName : ''}
+            </Text>
+          </Div>
+        </Button>
 
         <Menu
           visible={state}
@@ -42,6 +72,7 @@ export default function Header() {
           anchor={<Appbar.Action icon="dots-vertical" onPress={setTrue} />}
         >
           <Menu.Item onPress={logout} title="退出登录" />
+        
           <Menu.Item
             onPress={() => {
               setlocal();

+ 2 - 2
constants/Colors.js

@@ -1,4 +1,4 @@
-const tintColor = '#FFC750'
+const tintColor = '#FFC750';
 
 export default {
   tintColor,
@@ -11,4 +11,4 @@ export default {
   warningText: '#FF0000',
   noticeBackground: tintColor,
   noticeText: '#fff',
-}
+};

+ 3 - 3
constants/Layout.js

@@ -1,10 +1,10 @@
-import { Dimensions } from 'react-native'
+import { Dimensions } from 'react-native';
 
-const { height, width } = Dimensions.get('window')
+const { height, width } = Dimensions.get('window');
 export default {
   window: {
     width,
     height,
   },
   isSmallDevice: width < 375,
-}
+};

+ 0 - 39
native-base-theme/components/Badge.js

@@ -1,39 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const badgeTheme = {
-    '.primary': {
-      backgroundColor: variables.buttonPrimaryBg
-    },
-    '.warning': {
-      backgroundColor: variables.buttonWarningBg
-    },
-    '.info': {
-      backgroundColor: variables.buttonInfoBg
-    },
-    '.success': {
-      backgroundColor: variables.buttonSuccessBg
-    },
-    '.danger': {
-      backgroundColor: variables.buttonDangerBg
-    },
-    'NativeBase.Text': {
-      color: variables.badgeColor,
-      fontSize: variables.fontSizeBase,
-      lineHeight: variables.lineHeight - 1,
-      textAlign: 'center',
-      paddingHorizontal: 3
-    },
-    backgroundColor: variables.badgeBg,
-    padding: variables.badgePadding,
-    paddingHorizontal: 6,
-    alignSelf: 'flex-start',
-    justifyContent: variables.platform === PLATFORM.IOS ? 'center' : undefined,
-    borderRadius: 13.5,
-    height: 27
-  };
-  return badgeTheme;
-};

+ 0 - 11
native-base-theme/components/Body.js

@@ -1,11 +0,0 @@
-// @flow
-
-export default () => {
-  const bodyTheme = {
-    flex: 1,
-    alignItems: 'center',
-    alignSelf: 'center'
-  };
-
-  return bodyTheme;
-};

+ 0 - 386
native-base-theme/components/Button.js

@@ -1,386 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platformStyle = variables.platformStyle;
-  const platform = variables.platform;
-  const darkCommon = {
-    'NativeBase.Text': {
-      color: variables.brandDark
-    },
-    'NativeBase.Icon': {
-      color: variables.brandDark
-    },
-    'NativeBase.IconNB': {
-      color: variables.brandDark
-    }
-  };
-  const lightCommon = {
-    'NativeBase.Text': {
-      color: variables.brandLight
-    },
-    'NativeBase.Icon': {
-      color: variables.brandLight
-    },
-    'NativeBase.IconNB': {
-      color: variables.brandLight
-    }
-  };
-  const primaryCommon = {
-    'NativeBase.Text': {
-      color: variables.buttonPrimaryBg
-    },
-    'NativeBase.Icon': {
-      color: variables.buttonPrimaryBg
-    },
-    'NativeBase.IconNB': {
-      color: variables.buttonPrimaryBg
-    }
-  };
-  const successCommon = {
-    'NativeBase.Text': {
-      color: variables.buttonSuccessBg
-    },
-    'NativeBase.Icon': {
-      color: variables.buttonSuccessBg
-    },
-    'NativeBase.IconNB': {
-      color: variables.buttonSuccessBg
-    }
-  };
-  const infoCommon = {
-    'NativeBase.Text': {
-      color: variables.buttonInfoBg
-    },
-    'NativeBase.Icon': {
-      color: variables.buttonInfoBg
-    },
-    'NativeBase.IconNB': {
-      color: variables.buttonInfoBg
-    }
-  };
-  const warningCommon = {
-    'NativeBase.Text': {
-      color: variables.buttonWarningBg
-    },
-    'NativeBase.Icon': {
-      color: variables.buttonWarningBg
-    },
-    'NativeBase.IconNB': {
-      color: variables.buttonWarningBg
-    }
-  };
-  const dangerCommon = {
-    'NativeBase.Text': {
-      color: variables.buttonDangerBg
-    },
-    'NativeBase.Icon': {
-      color: variables.buttonDangerBg
-    },
-    'NativeBase.IconNB': {
-      color: variables.buttonDangerBg
-    }
-  };
-  const buttonTheme = {
-    '.disabled': {
-      '.transparent': {
-        backgroundColor: 'transparent',
-        'NativeBase.Text': {
-          color: variables.buttonDisabledBg
-        },
-        'NativeBase.Icon': {
-          color: variables.buttonDisabledBg
-        },
-        'NativeBase.IconNB': {
-          color: variables.buttonDisabledBg
-        }
-      },
-      'NativeBase.Icon': {
-        color: variables.brandLight
-      },
-      'NativeBase.IconNB': {
-        color: variables.brandLight
-      },
-      backgroundColor: variables.buttonDisabledBg
-    },
-    '.bordered': {
-      '.dark': {
-        ...darkCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.brandDark,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.light': {
-        ...lightCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.brandLight,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.primary': {
-        ...primaryCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonPrimaryBg,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.success': {
-        ...successCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonSuccessBg,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.info': {
-        ...infoCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonInfoBg,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.warning': {
-        ...warningCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonWarningBg,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.danger': {
-        ...dangerCommon,
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonDangerBg,
-        borderWidth: variables.borderWidth * 2
-      },
-      '.disabled': {
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonDisabledBg,
-        borderWidth: variables.borderWidth * 2,
-        'NativeBase.Text': {
-          color: variables.buttonDisabledBg
-        }
-      },
-      ...primaryCommon,
-      borderWidth: variables.borderWidth * 2,
-      elevation: null,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowOpacity: null,
-      shadowRadius: null,
-      backgroundColor: 'transparent'
-    },
-
-    '.dark': {
-      '.bordered': {
-        ...darkCommon
-      },
-      backgroundColor: variables.brandDark
-    },
-    '.light': {
-      '.transparent': {
-        ...lightCommon,
-        backgroundColor: 'transparent'
-      },
-      '.bordered': {
-        ...lightCommon
-      },
-      ...darkCommon,
-      backgroundColor: variables.brandLight
-    },
-
-    '.primary': {
-      '.bordered': {
-        ...primaryCommon
-      },
-      backgroundColor: variables.buttonPrimaryBg
-    },
-
-    '.success': {
-      '.bordered': {
-        ...successCommon
-      },
-      backgroundColor: variables.buttonSuccessBg
-    },
-
-    '.info': {
-      '.bordered': {
-        ...infoCommon
-      },
-      backgroundColor: variables.buttonInfoBg
-    },
-
-    '.warning': {
-      '.bordered': {
-        ...warningCommon
-      },
-      backgroundColor: variables.buttonWarningBg
-    },
-
-    '.danger': {
-      '.bordered': {
-        ...dangerCommon
-      },
-      backgroundColor: variables.buttonDangerBg
-    },
-
-    '.block': {
-      justifyContent: 'center',
-      alignSelf: 'stretch'
-    },
-
-    '.full': {
-      justifyContent: 'center',
-      alignSelf: 'stretch',
-      borderRadius: 0
-    },
-
-    '.rounded': {
-      borderRadius: variables.borderRadiusLarge
-    },
-
-    '.transparent': {
-      backgroundColor: 'transparent',
-      elevation: 0,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowRadius: null,
-      shadowOpacity: null,
-      ...primaryCommon,
-      '.dark': {
-        ...darkCommon,
-      },
-      '.danger': {
-        ...dangerCommon,
-      },
-      '.warning': {
-        ...warningCommon,
-      },
-      '.info': {
-        ...infoCommon,
-      },
-      '.primary': {
-        ...primaryCommon,
-      },
-      '.success': {
-        ...successCommon,
-      },
-      '.light': {
-        ...lightCommon,
-      },
-      '.disabled': {
-        backgroundColor: 'transparent',
-        borderColor: variables.buttonDisabledBg,
-        borderWidth: variables.borderWidth * 2,
-        'NativeBase.Text': {
-          color: variables.buttonDisabledBg
-        },
-        'NativeBase.Icon': {
-          color: variables.buttonDisabledBg
-        },
-        'NativeBase.IconNB': {
-          color: variables.buttonDisabledBg
-        }
-      }
-    },
-
-    '.small': {
-      height: 30,
-      'NativeBase.Text': {
-        fontSize: 14
-      },
-      'NativeBase.Icon': {
-        fontSize: 20,
-        paddingTop: 0
-      },
-      'NativeBase.IconNB': {
-        fontSize: 20,
-        paddingTop: 0
-      }
-    },
-
-    '.large': {
-      height: 60,
-      'NativeBase.Text': {
-        fontSize: 22
-      }
-    },
-
-    '.capitalize': {},
-
-    '.vertical': {
-      flexDirection: 'column',
-      height: null
-    },
-
-    'NativeBase.Text': {
-      fontFamily: variables.buttonFontFamily,
-      marginLeft: 0,
-      marginRight: 0,
-      color: variables.inverseTextColor,
-      fontSize: variables.buttonTextSize,
-      paddingHorizontal: 16,
-      backgroundColor: 'transparent'
-    },
-
-    'NativeBase.Icon': {
-      color: variables.inverseTextColor,
-      fontSize: 24,
-      marginHorizontal: 16,
-      paddingTop: platform === PLATFORM.IOS ? 2 : undefined
-    },
-    'NativeBase.IconNB': {
-      color: variables.inverseTextColor,
-      fontSize: 24,
-      marginHorizontal: 16,
-      paddingTop: platform === PLATFORM.IOS ? 2 : undefined
-    },
-
-    '.iconLeft': {
-      'NativeBase.Text': {
-        marginLeft: 0
-      },
-      'NativeBase.IconNB': {
-        marginRight: 0,
-        marginLeft: 16
-      },
-      'NativeBase.Icon': {
-        marginRight: 0,
-        marginLeft: 16
-      }
-    },
-    '.iconRight': {
-      'NativeBase.Text': {
-        marginRight: 0
-      },
-      'NativeBase.IconNB': {
-        marginLeft: 0,
-        marginRight: 16
-      },
-      'NativeBase.Icon': {
-        marginLeft: 0,
-        marginRight: 16
-      }
-    },
-    '.picker': {
-      'NativeBase.Text': {
-        '.note': {
-          fontSize: 16,
-          lineHeight: null
-        }
-      }
-    },
-    paddingVertical: variables.buttonPadding,
-    backgroundColor: variables.buttonPrimaryBg,
-    borderRadius: variables.borderRadiusBase,
-    borderColor: variables.buttonPrimaryBg,
-    borderWidth: null,
-    height: 45,
-    flexDirection: 'row',
-    elevation: 2,
-    shadowColor:
-      platformStyle === PLATFORM.MATERIAL ? variables.brandDark : undefined,
-    shadowOffset:
-      platformStyle === PLATFORM.MATERIAL ? { width: 0, height: 2 } : undefined,
-    shadowOpacity: platformStyle === PLATFORM.MATERIAL ? 0.2 : undefined,
-    shadowRadius: platformStyle === PLATFORM.MATERIAL ? 1.2 : undefined,
-    alignItems: 'center',
-    justifyContent: 'space-between'
-  };
-  return buttonTheme;
-};

+ 0 - 37
native-base-theme/components/Card.js

@@ -1,37 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const cardTheme = {
-    '.transparent': {
-      shadowColor: null,
-      shadowOffset: null,
-      shadowOpacity: null,
-      shadowRadius: null,
-      elevation: null,
-      backgroundColor: 'transparent',
-      borderWidth: 0
-    },
-    '.noShadow': {
-      shadowColor: null,
-      shadowOffset: null,
-      shadowOpacity: null,
-      elevation: null
-    },
-    marginVertical: 5,
-    marginHorizontal: 2,
-    borderWidth: variables.borderWidth,
-    borderRadius: variables.cardBorderRadius,
-    borderColor: variables.cardBorderColor,
-    flexWrap: 'nowrap',
-    backgroundColor: variables.cardDefaultBg,
-    shadowColor: '#000',
-    shadowOffset: { width: 0, height: 2 },
-    shadowOpacity: 0.1,
-    shadowRadius: 1.5,
-    elevation: 3
-  };
-
-  return cardTheme;
-};

+ 0 - 198
native-base-theme/components/CardItem.js

@@ -1,198 +0,0 @@
-// @flow
-
-import { StyleSheet } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platform = variables.platform;
-  const transparentBtnCommon = {
-    'NativeBase.Text': {
-      fontSize: variables.DefaultFontSize - 3,
-      color: variables.sTabBarActiveTextColor
-    },
-    'NativeBase.Icon': {
-      fontSize: variables.iconFontSize - 10,
-      color: variables.sTabBarActiveTextColor,
-      marginHorizontal: null
-    },
-    'NativeBase.IconNB': {
-      fontSize: variables.iconFontSize - 10,
-      color: variables.sTabBarActiveTextColor
-    },
-    paddingVertical: null,
-    paddingHorizontal: null
-  };
-
-  const cardItemTheme = {
-    'NativeBase.Left': {
-      'NativeBase.Body': {
-        'NativeBase.Text': {
-          '.note': {
-            color: variables.listNoteColor,
-            fontWeight: '400',
-            marginRight: 20
-          }
-        },
-        flex: 1,
-        marginLeft: 10,
-        alignItems: null
-      },
-      'NativeBase.Icon': {
-        fontSize: variables.iconFontSize
-      },
-      'NativeBase.IconNB': {
-        fontSize: variables.iconFontSize
-      },
-      'NativeBase.Text': {
-        marginLeft: 10,
-        alignSelf: 'center'
-      },
-      'NativeBase.Button': {
-        '.transparent': {
-          ...transparentBtnCommon,
-          paddingRight: variables.cardItemPadding + 5
-        }
-      },
-      flex: 1,
-      flexDirection: 'row',
-      alignItems: 'center'
-    },
-    '.content': {
-      'NativeBase.Text': {
-        color: platform === PLATFORM.IOS ? '#555' : '#222',
-        fontSize: variables.DefaultFontSize - 2
-      }
-    },
-    '.cardBody': {
-      padding: -5,
-      'NativeBase.Text': {
-        marginTop: 5
-      }
-    },
-    'NativeBase.Body': {
-      'NativeBase.Text': {
-        '.note': {
-          color: variables.listNoteColor,
-          fontWeight: '200',
-          marginRight: 20
-        }
-      },
-      'NativeBase.Button': {
-        '.transparent': {
-          ...transparentBtnCommon,
-          paddingRight: variables.cardItemPadding + 5,
-          alignSelf: 'stretch'
-        }
-      },
-      flex: 1,
-      alignSelf: 'stretch',
-      alignItems: 'flex-start'
-    },
-    'NativeBase.Right': {
-      'NativeBase.Badge': {
-        alignSelf: null
-      },
-      'NativeBase.Button': {
-        '.transparent': {
-          ...transparentBtnCommon
-        },
-        alignSelf: null
-      },
-      'NativeBase.Icon': {
-        alignSelf: null,
-        fontSize: variables.iconFontSize - 8,
-        color: variables.cardBorderColor
-      },
-      'NativeBase.IconNB': {
-        alignSelf: null,
-        fontSize: variables.iconFontSize - 8,
-        color: variables.cardBorderColor
-      },
-      'NativeBase.Text': {
-        fontSize: variables.DefaultFontSize - 1,
-        alignSelf: null
-      },
-      'NativeBase.Thumbnail': {
-        alignSelf: null
-      },
-      'NativeBase.Image': {
-        alignSelf: null
-      },
-      'NativeBase.Radio': {
-        alignSelf: null
-      },
-      'NativeBase.Checkbox': {
-        alignSelf: null
-      },
-      'NativeBase.Switch': {
-        alignSelf: null
-      },
-      flex: 0.8
-    },
-    '.header': {
-      'NativeBase.Text': {
-        fontSize: 16,
-        fontWeight: platform === PLATFORM.IOS ? '600' : '500'
-      },
-      '.bordered': {
-        'NativeBase.Text': {
-          color: variables.brandPrimary,
-          fontWeight: platform === PLATFORM.IOS ? '600' : '500'
-        },
-        borderBottomWidth: variables.borderWidth
-      },
-      borderBottomWidth: null,
-      paddingVertical: variables.cardItemPadding + 5
-    },
-    '.footer': {
-      'NativeBase.Text': {
-        fontSize: 16,
-        fontWeight: platform === PLATFORM.IOS ? '600' : '500'
-      },
-      '.bordered': {
-        'NativeBase.Text': {
-          color: variables.brandPrimary,
-          fontWeight: platform === PLATFORM.IOS ? '600' : '500'
-        },
-        borderTopWidth: variables.borderWidth
-      },
-      borderBottomWidth: null
-    },
-    'NativeBase.Text': {
-      '.note': {
-        color: variables.listNoteColor,
-        fontWeight: '200'
-      }
-    },
-    'NativeBase.Icon': {
-      width: variables.iconFontSize + 5,
-      fontSize: variables.iconFontSize - 2
-    },
-    'NativeBase.IconNB': {
-      width: variables.iconFontSize + 5,
-      fontSize: variables.iconFontSize - 2
-    },
-    '.bordered': {
-      borderBottomWidth: StyleSheet.hairlineWidth,
-      borderColor: variables.cardBorderColor
-    },
-    '.first': {
-      borderTopLeftRadius: variables.cardBorderRadius,
-      borderTopRightRadius: variables.cardBorderRadius
-    },
-    '.last': {
-      borderBottomLeftRadius: variables.cardBorderRadius,
-      borderBottomRightRadius: variables.cardBorderRadius
-    },
-    flexDirection: 'row',
-    alignItems: 'center',
-    borderRadius: variables.cardBorderRadius,
-    padding: variables.cardItemPadding + 5,
-    paddingVertical: variables.cardItemPadding,
-    backgroundColor: variables.cardDefaultBg
-  };
-
-  return cardItemTheme;
-};

+ 0 - 38
native-base-theme/components/CheckBox.js

@@ -1,38 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const checkBoxTheme = {
-    '.checked': {
-      'NativeBase.Icon': {
-        color: variables.checkboxTickColor
-      },
-      'NativeBase.IconNB': {
-        color: variables.checkboxTickColor
-      }
-    },
-    'NativeBase.Icon': {
-      color: 'transparent',
-      lineHeight: variables.CheckboxIconSize,
-      marginTop: variables.CheckboxIconMarginTop,
-      fontSize: variables.CheckboxFontSize
-    },
-    'NativeBase.IconNB': {
-      color: 'transparent',
-      lineHeight: variables.CheckboxIconSize,
-      marginTop: variables.CheckboxIconMarginTop,
-      fontSize: variables.CheckboxFontSize
-    },
-    borderRadius: variables.CheckboxRadius,
-    overflow: 'hidden',
-    width: variables.checkboxSize,
-    height: variables.checkboxSize,
-    borderWidth: variables.CheckboxBorderWidth,
-    paddingLeft: variables.CheckboxPaddingLeft - 1,
-    paddingBottom: variables.CheckboxPaddingBottom,
-    left: 10
-  };
-
-  return checkBoxTheme;
-};

+ 0 - 17
native-base-theme/components/Container.js

@@ -1,17 +0,0 @@
-// @flow
-
-import { Platform, Dimensions } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-const deviceHeight = Dimensions.get('window').height;
-export default (variables /* : * */ = variable) => {
-  const theme = {
-    flex: 1,
-    height: Platform.OS === PLATFORM.IOS ? deviceHeight : deviceHeight - 20,
-    backgroundColor: variables.containerBgColor
-  };
-
-  return theme;
-};

+ 0 - 14
native-base-theme/components/Content.js

@@ -1,14 +0,0 @@
-// @flow
-
-export default () => {
-  const contentTheme = {
-    flex: 1,
-    backgroundColor: 'transparent',
-    'NativeBase.Segment': {
-      borderWidth: 0,
-      backgroundColor: 'transparent'
-    }
-  };
-
-  return contentTheme;
-};

+ 0 - 25
native-base-theme/components/Fab.js

@@ -1,25 +0,0 @@
-// @flow
-
-export default () => {
-  const fabTheme = {
-    'NativeBase.Button': {
-      alignItems: 'center',
-      padding: null,
-      justifyContent: 'center',
-      'NativeBase.Icon': {
-        alignSelf: 'center',
-        fontSize: 20,
-        marginLeft: 0,
-        marginRight: 0
-      },
-      'NativeBase.IconNB': {
-        alignSelf: 'center',
-        fontSize: 20,
-        marginLeft: 0,
-        marginRight: 0
-      }
-    }
-  };
-
-  return fabTheme;
-};

+ 0 - 119
native-base-theme/components/Footer.js

@@ -1,119 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platformStyle = variables.platformStyle;
-  const platform = variables.platform;
-
-  const iconCommon = {
-    'NativeBase.Icon': {
-      color: variables.tabBarActiveTextColor
-    }
-  };
-  const iconNBCommon = {
-    'NativeBase.IconNB': {
-      color: variables.tabBarActiveTextColor
-    }
-  };
-  const textCommon = {
-    'NativeBase.Text': {
-      color: variables.tabBarActiveTextColor
-    }
-  };
-  const footerTheme = {
-    'NativeBase.Left': {
-      'NativeBase.Button': {
-        '.transparent': {
-          backgroundColor: 'transparent',
-          borderColor: null,
-          elevation: 0,
-          shadowColor: null,
-          shadowOffset: null,
-          shadowRadius: null,
-          shadowOpacity: null,
-          ...iconCommon,
-          ...iconNBCommon,
-          ...textCommon
-        },
-        alignSelf: null,
-        ...iconCommon,
-        ...iconNBCommon
-        // ...textCommon
-      },
-      flex: 1,
-      alignSelf: 'center',
-      alignItems: 'flex-start'
-    },
-    'NativeBase.Body': {
-      flex: 1,
-      alignItems: 'center',
-      alignSelf: 'center',
-      flexDirection: 'row',
-      'NativeBase.Button': {
-        alignSelf: 'center',
-        '.transparent': {
-          backgroundColor: 'transparent',
-          borderColor: null,
-          elevation: 0,
-          shadowColor: null,
-          shadowOffset: null,
-          shadowRadius: null,
-          shadowOpacity: null,
-          ...iconCommon,
-          ...iconNBCommon,
-          ...textCommon
-        },
-        '.full': {
-          height: variables.footerHeight,
-          paddingBottom: variables.footerPaddingBottom,
-          flex: 1
-        },
-        ...iconCommon,
-        ...iconNBCommon
-        // ...textCommon
-      }
-    },
-    'NativeBase.Right': {
-      'NativeBase.Button': {
-        '.transparent': {
-          backgroundColor: 'transparent',
-          borderColor: null,
-          elevation: 0,
-          shadowColor: null,
-          shadowOffset: null,
-          shadowRadius: null,
-          shadowOpacity: null,
-          ...iconCommon,
-          ...iconNBCommon,
-          ...textCommon
-        },
-        alignSelf: null,
-        ...iconCommon,
-        ...iconNBCommon
-        // ...textCommon
-      },
-      flex: 1,
-      alignSelf: 'center',
-      alignItems: 'flex-end'
-    },
-    backgroundColor: variables.footerDefaultBg,
-    flexDirection: 'row',
-    justifyContent: 'center',
-    borderTopWidth:
-      platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-        ? variables.borderWidth
-        : undefined,
-    borderColor:
-      platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-        ? '#cbcbcb'
-        : undefined,
-    height: variables.footerHeight,
-    paddingBottom: variables.footerPaddingBottom,
-    elevation: 3,
-    left: 0,
-    right: 0
-  };
-  return footerTheme;
-};

+ 0 - 79
native-base-theme/components/FooterTab.js

@@ -1,79 +0,0 @@
-// @flow
-
-import { Platform } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platform = variables.platform;
-
-  const footerTabTheme = {
-    'NativeBase.Button': {
-      '.active': {
-        'NativeBase.Text': {
-          color: variables.tabBarActiveTextColor,
-          fontSize: variables.tabBarTextSize,
-          lineHeight: 16
-        },
-        'NativeBase.Icon': {
-          color: variables.tabBarActiveTextColor
-        },
-        'NativeBase.IconNB': {
-          color: variables.tabBarActiveTextColor
-        },
-        backgroundColor: variables.tabActiveBgColor
-      },
-      flexDirection: null,
-      backgroundColor: 'transparent',
-      borderColor: null,
-      elevation: 0,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowRadius: null,
-      shadowOpacity: null,
-      alignSelf: 'center',
-      flex: 1,
-      height: variables.footerHeight,
-      justifyContent: 'center',
-      '.badge': {
-        'NativeBase.Badge': {
-          'NativeBase.Text': {
-            fontSize: 11,
-            fontWeight: platform === PLATFORM.IOS ? '600' : undefined,
-            lineHeight: 14
-          },
-          top: -3,
-          alignSelf: 'center',
-          left: 10,
-          zIndex: 99,
-          height: 18,
-          padding: 1.7,
-          paddingHorizontal: 3
-        },
-        'NativeBase.Icon': {
-          marginTop: -18
-        }
-      },
-      'NativeBase.Icon': {
-        color: variables.tabBarTextColor
-      },
-      'NativeBase.IconNB': {
-        color: variables.tabBarTextColor
-      },
-      'NativeBase.Text': {
-        color: variables.tabBarTextColor,
-        fontSize: variables.tabBarTextSize,
-        lineHeight: 16
-      }
-    },
-    backgroundColor:
-      Platform.OS === PLATFORM.ANDROID ? variables.footerDefaultBg : undefined,
-    flexDirection: 'row',
-    justifyContent: 'space-between',
-    flex: 1,
-    alignSelf: 'stretch'
-  };
-
-  return footerTabTheme;
-};

+ 0 - 86
native-base-theme/components/Form.js

@@ -1,86 +0,0 @@
-// @flow
-
-export default () => {
-  const theme = {
-    'NativeBase.Item': {
-      '.fixedLabel': {
-        'NativeBase.Label': {
-          paddingLeft: null
-        },
-        marginLeft: 15
-      },
-      '.inlineLabel': {
-        'NativeBase.Label': {
-          paddingLeft: null
-        },
-        marginLeft: 15
-      },
-      '.placeholderLabel': {
-        'NativeBase.Input': {}
-      },
-      '.stackedLabel': {
-        'NativeBase.Label': {
-          top: 5,
-          paddingLeft: null
-        },
-        'NativeBase.Input': {
-          paddingLeft: null,
-          marginLeft: null
-        },
-        'NativeBase.Icon': {
-          marginTop: 36
-        },
-        marginLeft: 15
-      },
-      '.floatingLabel': {
-        'NativeBase.Input': {
-          paddingLeft: null,
-          top: 10,
-          marginLeft: null
-        },
-        'NativeBase.Label': {
-          left: 0,
-          top: 6
-        },
-        'NativeBase.Icon': {
-          top: 6
-        },
-        marginTop: 15,
-        marginLeft: 15
-      },
-      '.regular': {
-        'NativeBase.Label': {
-          left: 0
-        },
-        marginLeft: 0
-      },
-      '.rounded': {
-        'NativeBase.Label': {
-          left: 0
-        },
-        marginLeft: 0
-      },
-      '.underline': {
-        'NativeBase.Label': {
-          left: 0,
-          top: 0,
-          position: 'relative'
-        },
-        'NativeBase.Input': {
-          left: -15
-        },
-        marginLeft: 15
-      },
-      '.last': {
-        marginLeft: 0,
-        paddingLeft: 15
-      },
-      'NativeBase.Label': {
-        paddingRight: 5
-      },
-      marginLeft: 15
-    }
-  };
-
-  return theme;
-};

+ 0 - 13
native-base-theme/components/H1.js

@@ -1,13 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const h1Theme = {
-    color: variables.textColor,
-    fontSize: variables.fontSizeH1,
-    lineHeight: variables.lineHeightH1
-  };
-
-  return h1Theme;
-};

+ 0 - 13
native-base-theme/components/H2.js

@@ -1,13 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const h2Theme = {
-    color: variables.textColor,
-    fontSize: variables.fontSizeH2,
-    lineHeight: variables.lineHeightH2
-  };
-
-  return h2Theme;
-};

+ 0 - 13
native-base-theme/components/H3.js

@@ -1,13 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const h3Theme = {
-    color: variables.textColor,
-    fontSize: variables.fontSizeH3,
-    lineHeight: variables.lineHeightH3
-  };
-
-  return h3Theme;
-};

+ 0 - 419
native-base-theme/components/Header.js

@@ -1,419 +0,0 @@
-// @flow
-
-import { PixelRatio, StatusBar } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platformStyle = variables.platformStyle;
-  const platform = variables.platform;
-
-  const headerTheme = {
-    '.span': {
-      height: 128,
-      'NativeBase.Left': {
-        alignSelf: 'flex-start'
-      },
-      'NativeBase.Body': {
-        alignSelf: 'flex-end',
-        alignItems: 'flex-start',
-        justifyContent: 'center',
-        paddingBottom: 26
-      },
-      'NativeBase.Right': {
-        alignSelf: 'flex-start'
-      }
-    },
-    '.hasSubtitle': {
-      'NativeBase.Body': {
-        'NativeBase.Title': {
-          fontSize: variables.titleFontSize - 2,
-          fontFamily: variables.titleFontfamily,
-          textAlign: 'center',
-          fontWeight: '500',
-          paddingBottom: 3
-        },
-        'NativeBase.Subtitle': {
-          fontSize: variables.subTitleFontSize,
-          fontFamily: variables.titleFontfamily,
-          color: variables.subtitleColor,
-          textAlign: 'center'
-        }
-      }
-    },
-    '.transparent': {
-      backgroundColor: 'transparent',
-      borderBottomColor: 'transparent',
-      elevation: 0,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowRadius: null,
-      shadowOpacity: null,
-      paddingTop:
-        platform === PLATFORM.ANDROID ? StatusBar.currentHeight : undefined,
-      height:
-        platform === PLATFORM.ANDROID
-          ? variables.toolbarHeight + StatusBar.currentHeight
-          : variables.toolbarHeight
-    },
-    '.noShadow': {
-      elevation: 0,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowRadius: null,
-      shadowOpacity: null
-    },
-    '.hasTabs': {
-      elevation: 0,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowRadius: null,
-      shadowOpacity: null,
-      borderBottomWidth: null
-    },
-    '.hasSegment': {
-      elevation: 0,
-      shadowColor: null,
-      shadowOffset: null,
-      shadowRadius: null,
-      shadowOpacity: null,
-      borderBottomWidth: null,
-      'NativeBase.Left': {
-        flex: 0.3
-      },
-      'NativeBase.Right': {
-        flex: 0.3
-      },
-      'NativeBase.Body': {
-        flex: 1,
-        'NativeBase.Segment': {
-          marginRight: 0,
-          alignSelf: 'center',
-          'NativeBase.Button': {
-            paddingLeft: 0,
-            paddingRight: 0
-          }
-        }
-      }
-    },
-    '.noLeft': {
-      'NativeBase.Left': {
-        width: platform === PLATFORM.IOS ? undefined : 0,
-        flex: platform === PLATFORM.IOS ? 1 : 0
-      },
-      'NativeBase.Body': {
-        'NativeBase.Title': {
-          paddingLeft: platform === PLATFORM.IOS ? undefined : 10
-        },
-        'NativeBase.Subtitle': {
-          paddingLeft: platform === PLATFORM.IOS ? undefined : 10
-        }
-      }
-    },
-    'NativeBase.Button': {
-      justifyContent: 'center',
-      alignSelf: 'center',
-      alignItems: 'center',
-      '.transparent': {
-        'NativeBase.Text': {
-          color: variables.toolbarBtnTextColor,
-          fontWeight: '600'
-        },
-        'NativeBase.Icon': {
-          color: variables.toolbarBtnColor
-        },
-        'NativeBase.IconNB': {
-          color: variables.toolbarBtnColor
-        },
-        paddingHorizontal: variables.buttonPadding
-      },
-      paddingHorizontal: 15
-    },
-    '.searchBar': {
-      'NativeBase.Item': {
-        'NativeBase.Icon': {
-          backgroundColor: 'transparent',
-          color: variables.dropdownLinkColor,
-          fontSize: variables.toolbarSearchIconSize,
-          alignItems: 'center',
-          marginTop: 2,
-          paddingRight: 10,
-          paddingLeft: 10
-        },
-        'NativeBase.IconNB': {
-          backgroundColor: 'transparent',
-          color: null,
-          alignSelf: 'center'
-        },
-        'NativeBase.Input': {
-          alignSelf: 'center',
-          lineHeight: null,
-          height: variables.searchBarInputHeight
-        },
-        alignSelf: 'center',
-        alignItems: 'center',
-        justifyContent: 'flex-start',
-        flex: 1,
-        height: variables.searchBarHeight,
-        borderColor: 'transparent',
-        backgroundColor: variables.toolbarInputColor
-      },
-      'NativeBase.Button': {
-        '.transparent': {
-          'NativeBase.Text': {
-            fontWeight: '500'
-          },
-          paddingHorizontal: null,
-          paddingLeft: platform === PLATFORM.IOS ? 10 : null
-        },
-        paddingHorizontal: platform === PLATFORM.IOS ? undefined : null,
-        width: platform === PLATFORM.IOS ? undefined : 0,
-        height: platform === PLATFORM.IOS ? undefined : 0
-      }
-    },
-    '.rounded': {
-      'NativeBase.Item': {
-        borderRadius:
-          platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-            ? 25
-            : 3
-      }
-    },
-    'NativeBase.Left': {
-      'NativeBase.Button': {
-        '.hasText': {
-          marginLeft: -10,
-          height: 30,
-          'NativeBase.Icon': {
-            color: variables.toolbarBtnColor,
-            fontSize: variables.iconHeaderSize,
-            marginTop: 2,
-            marginRight: 5,
-            marginLeft: 2
-          },
-          'NativeBase.Text': {
-            color: variables.toolbarBtnTextColor,
-            fontSize: platform === PLATFORM.IOS ? 17 : 0,
-            marginLeft: 7,
-            lineHeight: 19.5
-          },
-          'NativeBase.IconNB': {
-            color: variables.toolbarBtnColor,
-            fontSize: variables.iconHeaderSize,
-            marginTop: 2,
-            marginRight: 5,
-            marginLeft: 2
-          }
-        },
-        '.transparent': {
-          marginLeft:
-            platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-              ? -3
-              : 0,
-          'NativeBase.Icon': {
-            color: variables.toolbarBtnColor,
-            fontSize:
-              platform === PLATFORM.IOS &&
-              variables.platformStyle !== PLATFORM.MATERIAL
-                ? variables.iconHeaderSize + 1
-                : variables.iconHeaderSize,
-            marginTop: 0,
-            marginRight: 2,
-            marginLeft: 1,
-            paddingTop: 1
-          },
-          'NativeBase.IconNB': {
-            color: variables.toolbarBtnColor,
-            fontSize:
-              platform === PLATFORM.IOS &&
-              variables.platformStyle !== PLATFORM.MATERIAL
-                ? variables.iconHeaderSize + 1
-                : variables.iconHeaderSize - 2,
-            marginTop: 0,
-            marginRight: 2,
-            marginLeft: 1,
-            paddingTop: 1
-          },
-          'NativeBase.Text': {
-            color: variables.toolbarBtnTextColor,
-            fontSize: platform === PLATFORM.IOS ? 17 : 0,
-            top: platform === PLATFORM.IOS ? 1 : -1.5,
-            paddingLeft:
-              platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-                ? 2
-                : 5,
-            paddingRight:
-              platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-                ? undefined
-                : 10
-          },
-          backgroundColor: 'transparent',
-          borderColor: null,
-          elevation: 0,
-          shadowColor: null,
-          shadowOffset: null,
-          shadowRadius: null,
-          shadowOpacity: null
-        },
-        'NativeBase.Icon': {
-          color: variables.toolbarBtnColor
-        },
-        'NativeBase.IconNB': {
-          color: variables.toolbarBtnColor
-        },
-        alignSelf: null,
-        paddingRight: variables.buttonPadding,
-        paddingLeft:
-          platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-            ? 4
-            : 8
-      },
-      flex:
-        platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-          ? 1
-          : 0.4,
-      alignSelf: 'center',
-      alignItems: 'flex-start'
-    },
-    'NativeBase.Body': {
-      flex: 1,
-      alignItems:
-        platform === PLATFORM.IOS && platformStyle !== PLATFORM.MATERIAL
-          ? 'center'
-          : 'flex-start',
-      alignSelf: 'center',
-      'NativeBase.Segment': {
-        borderWidth: 0,
-        alignSelf: 'flex-end',
-        marginRight: platform === PLATFORM.IOS ? -40 : -55
-      },
-      'NativeBase.Button': {
-        alignSelf: 'center',
-        '.transparent': {
-          backgroundColor: 'transparent'
-        },
-        'NativeBase.Icon': {
-          color: variables.toolbarBtnColor
-        },
-        'NativeBase.IconNB': {
-          color: variables.toolbarBtnColor
-        },
-        'NativeBase.Text': {
-          color: variables.inverseTextColor,
-          backgroundColor: 'transparent'
-        }
-      }
-    },
-    'NativeBase.Right': {
-      'NativeBase.Button': {
-        '.hasText': {
-          height: 30,
-          'NativeBase.Icon': {
-            color: variables.toolbarBtnColor,
-            fontSize: variables.iconHeaderSize - 2,
-            marginTop: 2,
-            marginRight: 2,
-            marginLeft: 5
-          },
-          'NativeBase.Text': {
-            color: variables.toolbarBtnTextColor,
-            fontSize: platform === PLATFORM.IOS ? 17 : 14,
-            lineHeight: 19.5
-          },
-          'NativeBase.IconNB': {
-            color: variables.toolbarBtnColor,
-            fontSize: variables.iconHeaderSize - 2,
-            marginTop: 2,
-            marginRight: 2,
-            marginLeft: 5
-          }
-        },
-        '.transparent': {
-          marginRight: platform === PLATFORM.IOS ? -9 : -5,
-          paddingLeft: 15,
-          paddingRight: 12,
-          paddingHorizontal: 15,
-          borderRadius: 50,
-          'NativeBase.Icon': {
-            color: variables.toolbarBtnColor,
-            fontSize: variables.iconHeaderSize - 2,
-            marginTop: 0,
-            marginLeft: 2,
-            marginRight: 0
-            // paddingTop: 0
-          },
-          'NativeBase.IconNB': {
-            color: variables.toolbarBtnColor,
-            fontSize: variables.iconHeaderSize - 2,
-            marginTop: 0,
-            marginLeft: 2,
-            marginRight: 0
-            // paddingTop: 0
-          },
-          'NativeBase.Text': {
-            color: variables.toolbarBtnTextColor,
-            fontSize: platform === PLATFORM.IOS ? 17 : 14,
-            top: platform === PLATFORM.IOS ? 1 : -1.5,
-            paddingRight:
-              platform === PLATFORM.IOS &&
-              variables.platformStyle !== PLATFORM.MATERIAL
-                ? 0
-                : undefined
-          },
-          backgroundColor: 'transparent',
-          borderColor: null,
-          elevation: 0,
-          shadowColor: null,
-          shadowOffset: null,
-          shadowRadius: null,
-          shadowOpacity: null
-        },
-        'NativeBase.Icon': {
-          color: variables.toolbarBtnColor
-        },
-        'NativeBase.IconNB': {
-          color: variables.toolbarBtnColor
-        },
-        alignSelf: null,
-        paddingHorizontal: variables.buttonPadding
-      },
-      flex: 1,
-      alignSelf: 'center',
-      alignItems: 'flex-end',
-      flexDirection: 'row',
-      justifyContent: 'flex-end'
-    },
-    backgroundColor: variables.toolbarDefaultBg,
-    flexDirection: 'row',
-    // paddingHorizontal: 10,
-    paddingLeft:
-      platform === PLATFORM.IOS && variables.platformStyle !== PLATFORM.MATERIAL
-        ? 6
-        : 10,
-    paddingRight: 10,
-    justifyContent: 'center',
-    paddingTop: platform === PLATFORM.IOS ? 18 : 0,
-    borderBottomWidth:
-      platform === PLATFORM.IOS
-        ? 1 / PixelRatio.getPixelSizeForLayoutSize(1)
-        : 0,
-    borderBottomColor: variables.toolbarDefaultBorder,
-    height:
-      variables.platform === PLATFORM.IOS &&
-      variables.platformStyle === PLATFORM.MATERIAL
-        ? variables.toolbarHeight + 10
-        : variables.toolbarHeight,
-    elevation: 3,
-    shadowColor: platformStyle === PLATFORM.MATERIAL ? '#000' : undefined,
-    shadowOffset:
-      platformStyle === PLATFORM.MATERIAL ? { width: 0, height: 2 } : undefined,
-    shadowOpacity: platformStyle === PLATFORM.MATERIAL ? 0.2 : undefined,
-    shadowRadius: platformStyle === PLATFORM.MATERIAL ? 1.2 : undefined,
-    top: 0,
-    left: 0,
-    right: 0
-  };
-
-  return headerTheme;
-};

+ 0 - 12
native-base-theme/components/Icon.js

@@ -1,12 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const iconTheme = {
-    fontSize: variables.iconFontSize,
-    color: variables.textColor
-  };
-
-  return iconTheme;
-};

+ 0 - 19
native-base-theme/components/Input.js

@@ -1,19 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const inputTheme = {
-    '.multiline': {
-      height: null
-    },
-    height: variables.inputHeightBase,
-    color: variables.inputColor,
-    paddingLeft: 5,
-    paddingRight: 5,
-    flex: 1,
-    fontSize: variables.inputFontSize
-  };
-
-  return inputTheme;
-};

+ 0 - 132
native-base-theme/components/InputGroup.js

@@ -1,132 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const inputGroupTheme = {
-    'NativeBase.Icon': {
-      fontSize: 24,
-      color: variables.sTabBarActiveTextColor,
-      paddingHorizontal: 5
-    },
-    'NativeBase.IconNB': {
-      fontSize: 24,
-      color: variables.sTabBarActiveTextColor,
-      paddingHorizontal: 5
-    },
-    'NativeBase.Input': {
-      height: variables.inputHeightBase,
-      color: variables.inputColor,
-      paddingLeft: 5,
-      paddingRight: 5,
-      flex: 1,
-      fontSize: variables.inputFontSize,
-      lineHeight: variables.inputLineHeight
-    },
-    '.underline': {
-      '.success': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.error': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      paddingLeft: 5,
-      borderWidth: variables.borderWidth,
-      borderTopWidth: 0,
-      borderRightWidth: 0,
-      borderLeftWidth: 0,
-      borderColor: variables.inputBorderColor
-    },
-    '.regular': {
-      '.success': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.error': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      paddingLeft: 5,
-      borderWidth: variables.borderWidth,
-      borderColor: variables.inputBorderColor
-    },
-    '.rounded': {
-      '.success': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.error': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      paddingLeft: 5,
-      borderWidth: variables.borderWidth,
-      borderRadius: variables.inputGroupRoundedBorderRadius,
-      borderColor: variables.inputBorderColor
-    },
-
-    '.success': {
-      'NativeBase.Icon': {
-        color: variables.inputSuccessBorderColor
-      },
-      'NativeBase.IconNB': {
-        color: variables.inputSuccessBorderColor
-      },
-      '.rounded': {
-        borderRadius: 30,
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.regular': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.underline': {
-        borderWidth: variables.borderWidth,
-        borderTopWidth: 0,
-        borderRightWidth: 0,
-        borderLeftWidth: 0,
-        borderColor: variables.inputSuccessBorderColor
-      },
-      borderColor: variables.inputSuccessBorderColor
-    },
-
-    '.error': {
-      'NativeBase.Icon': {
-        color: variables.inputErrorBorderColor
-      },
-      'NativeBase.IconNB': {
-        color: variables.inputErrorBorderColor
-      },
-      '.rounded': {
-        borderRadius: 30,
-        borderColor: variables.inputErrorBorderColor
-      },
-      '.regular': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      '.underline': {
-        borderWidth: variables.borderWidth,
-        borderTopWidth: 0,
-        borderRightWidth: 0,
-        borderLeftWidth: 0,
-        borderColor: variables.inputErrorBorderColor
-      },
-      borderColor: variables.inputErrorBorderColor
-    },
-    '.disabled': {
-      'NativeBase.Icon': {
-        color: '#384850'
-      },
-      'NativeBase.IconNB': {
-        color: '#384850'
-      }
-    },
-
-    paddingLeft: 5,
-    borderWidth: variables.borderWidth,
-    borderTopWidth: 0,
-    borderRightWidth: 0,
-    borderLeftWidth: 0,
-    borderColor: variables.inputBorderColor,
-    backgroundColor: 'transparent',
-    flexDirection: 'row',
-    alignItems: 'center'
-  };
-
-  return inputGroupTheme;
-};

+ 0 - 242
native-base-theme/components/Item.js

@@ -1,242 +0,0 @@
-// @flow
-
-import { Platform } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const itemTheme = {
-    '.floatingLabel': {
-      'NativeBase.Input': {
-        height: 50,
-        top: 8,
-        paddingTop: 3,
-        paddingBottom: 7,
-        '.multiline': {
-          minHeight: variables.inputHeightBase,
-          paddingTop: Platform.OS === PLATFORM.IOS ? 10 : 3,
-          paddingBottom: Platform.OS === PLATFORM.IOS ? 14 : 10
-        }
-      },
-      'NativeBase.Label': {
-        paddingTop: 5
-      },
-      'NativeBase.Icon': {
-        top: 6,
-        paddingTop: 8
-      },
-      'NativeBase.IconNB': {
-        top: 6,
-        paddingTop: 8
-      }
-    },
-    '.fixedLabel': {
-      'NativeBase.Label': {
-        position: null,
-        top: null,
-        left: null,
-        right: null,
-        flex: 1,
-        height: null,
-        width: null,
-        fontSize: variables.inputFontSize
-      },
-      'NativeBase.Input': {
-        flex: 2,
-        fontSize: variables.inputFontSize
-      }
-    },
-    '.stackedLabel': {
-      'NativeBase.Label': {
-        position: null,
-        top: null,
-        left: null,
-        right: null,
-        paddingTop: 5,
-        alignSelf: 'flex-start',
-        fontSize: variables.inputFontSize - 2
-      },
-      'NativeBase.Icon': {
-        marginTop: 36
-      },
-      'NativeBase.Input': {
-        // alignSelf: Platform.OS === PLATFORM.IOS ? 'stretch' : 'flex-start',
-        alignSelf: 'stretch',
-        flex: 1,
-        // width: Platform.OS === PLATFORM.IOS ? null : variables.deviceWidth - 25,
-        fontSize: variables.inputFontSize,
-        lineHeight: variables.inputLineHeight - 6,
-        '.secureTextEntry': {
-          fontSize: variables.inputFontSize
-        },
-        '.multiline': {
-          paddingTop: Platform.OS === PLATFORM.IOS ? 9 : undefined,
-          paddingBottom: Platform.OS === PLATFORM.IOS ? 9 : undefined
-        }
-      },
-      flexDirection: null,
-      minHeight: variables.inputHeightBase + 15
-    },
-    '.inlineLabel': {
-      'NativeBase.Label': {
-        position: null,
-        top: null,
-        left: null,
-        right: null,
-        paddingRight: 20,
-        height: null,
-        width: null,
-        fontSize: variables.inputFontSize
-      },
-      'NativeBase.Input': {
-        paddingLeft: 5,
-        fontSize: variables.inputFontSize
-      },
-      flexDirection: 'row'
-    },
-    'NativeBase.Label': {
-      fontSize: variables.inputFontSize,
-      color: variables.inputColorPlaceholder,
-      paddingRight: 5
-    },
-    'NativeBase.Icon': {
-      fontSize: 24,
-      paddingRight: 8
-    },
-    'NativeBase.IconNB': {
-      fontSize: 24,
-      paddingRight: 8
-    },
-    'NativeBase.Input': {
-      '.multiline': {
-        height: null
-      },
-      height: variables.inputHeightBase,
-      color: variables.inputColor,
-      flex: 1,
-      top: Platform.OS === PLATFORM.IOS ? 1.5 : undefined,
-      fontSize: variables.inputFontSize
-    },
-    '.underline': {
-      'NativeBase.Input': {
-        paddingLeft: 15
-      },
-      '.success': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.error': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      borderWidth: variables.borderWidth * 2,
-      borderTopWidth: 0,
-      borderRightWidth: 0,
-      borderLeftWidth: 0,
-      borderColor: variables.inputBorderColor
-    },
-    '.regular': {
-      'NativeBase.Input': {
-        paddingLeft: 8
-      },
-      'NativeBase.Icon': {
-        paddingLeft: 10
-      },
-      '.success': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.error': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      borderWidth: variables.borderWidth * 2,
-      borderColor: variables.inputBorderColor
-    },
-    '.rounded': {
-      'NativeBase.Input': {
-        paddingLeft: 8
-      },
-      'NativeBase.Icon': {
-        paddingLeft: 10
-      },
-      '.success': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.error': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      borderWidth: variables.borderWidth * 2,
-      borderRadius: 30,
-      borderColor: variables.inputBorderColor
-    },
-
-    '.success': {
-      'NativeBase.Icon': {
-        color: variables.inputSuccessBorderColor
-      },
-      'NativeBase.IconNB': {
-        color: variables.inputSuccessBorderColor
-      },
-      '.rounded': {
-        borderRadius: 30,
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.regular': {
-        borderColor: variables.inputSuccessBorderColor
-      },
-      '.underline': {
-        borderWidth: variables.borderWidth * 2,
-        borderTopWidth: 0,
-        borderRightWidth: 0,
-        borderLeftWidth: 0,
-        borderColor: variables.inputSuccessBorderColor
-      },
-      borderColor: variables.inputSuccessBorderColor
-    },
-
-    '.error': {
-      'NativeBase.Icon': {
-        color: variables.inputErrorBorderColor
-      },
-      'NativeBase.IconNB': {
-        color: variables.inputErrorBorderColor
-      },
-      '.rounded': {
-        borderRadius: 30,
-        borderColor: variables.inputErrorBorderColor
-      },
-      '.regular': {
-        borderColor: variables.inputErrorBorderColor
-      },
-      '.underline': {
-        borderWidth: variables.borderWidth * 2,
-        borderTopWidth: 0,
-        borderRightWidth: 0,
-        borderLeftWidth: 0,
-        borderColor: variables.inputErrorBorderColor
-      },
-      borderColor: variables.inputErrorBorderColor
-    },
-    '.disabled': {
-      'NativeBase.Icon': {
-        color: '#384850'
-      },
-      'NativeBase.IconNB': {
-        color: '#384850'
-      }
-    },
-    '.picker': {
-      marginLeft: 0
-    },
-
-    borderWidth: variables.borderWidth * 2,
-    borderTopWidth: 0,
-    borderRightWidth: 0,
-    borderLeftWidth: 0,
-    borderColor: variables.inputBorderColor,
-    backgroundColor: 'transparent',
-    flexDirection: 'row',
-    alignItems: 'center',
-    marginLeft: 2
-  };
-
-  return itemTheme;
-};

+ 0 - 12
native-base-theme/components/Label.js

@@ -1,12 +0,0 @@
-// @flow
-
-export default () => {
-  const labelTheme = {
-    '.focused': {
-      width: 0
-    },
-    fontSize: 17
-  };
-
-  return labelTheme;
-};

+ 0 - 11
native-base-theme/components/Left.js

@@ -1,11 +0,0 @@
-// @flow
-
-export default () => {
-  const leftTheme = {
-    flex: 1,
-    alignSelf: 'center',
-    alignItems: 'flex-start'
-  };
-
-  return leftTheme;
-};

+ 0 - 446
native-base-theme/components/ListItem.js

@@ -1,446 +0,0 @@
-// @flow
-
-import { Platform, PixelRatio } from 'react-native';
-
-import pickerTheme from './Picker';
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platform = variables.platform;
-  const selectedStyle = {
-    'NativeBase.Text': {
-      color: variables.listItemSelected
-    },
-    'NativeBase.Icon': {
-      color: variables.listItemSelected
-    }
-  };
-
-  const listItemTheme = {
-    'NativeBase.InputGroup': {
-      'NativeBase.Icon': {
-        paddingRight: 5
-      },
-      'NativeBase.IconNB': {
-        paddingRight: 5
-      },
-      'NativeBase.Input': {
-        paddingHorizontal: 5
-      },
-      flex: 1,
-      borderWidth: null,
-      margin: -10,
-      borderBottomColor: 'transparent'
-    },
-    '.searchBar': {
-      'NativeBase.Item': {
-        'NativeBase.Icon': {
-          backgroundColor: 'transparent',
-          color: variables.dropdownLinkColor,
-          fontSize:
-            platform === PLATFORM.IOS
-              ? variables.iconFontSize - 10
-              : variables.iconFontSize - 5,
-          alignItems: 'center',
-          marginTop: 2,
-          paddingRight: 8
-        },
-        'NativeBase.IconNB': {
-          backgroundColor: 'transparent',
-          color: null,
-          alignSelf: 'center'
-        },
-        'NativeBase.Input': {
-          alignSelf: 'center'
-        },
-        alignSelf: 'center',
-        alignItems: 'center',
-        justifyContent: 'flex-start',
-        flex: 1,
-        height: platform === PLATFORM.IOS ? 30 : 40,
-        borderColor: 'transparent',
-        backgroundColor: '#fff',
-        borderRadius: 5
-      },
-      'NativeBase.Button': {
-        '.transparent': {
-          'NativeBase.Text': {
-            fontWeight: '500'
-          },
-          paddingHorizontal: null,
-          paddingLeft: platform === PLATFORM.IOS ? 10 : null
-        },
-        paddingHorizontal: platform === PLATFORM.IOS ? undefined : null,
-        width: platform === PLATFORM.IOS ? undefined : 0,
-        height: platform === PLATFORM.IOS ? undefined : 0
-      },
-      backgroundColor: variables.toolbarInputColor,
-      padding: 10,
-      marginLeft: null
-    },
-    'NativeBase.CheckBox': {
-      marginLeft: -10,
-      marginRight: 10
-    },
-    '.first': {
-      '.itemHeader': {
-        paddingTop: variables.listItemPadding + 3
-      }
-    },
-    '.itemHeader': {
-      '.first': {
-        paddingTop: variables.listItemPadding + 3
-      },
-      borderBottomWidth:
-        platform === PLATFORM.IOS ? variables.borderWidth : null,
-      marginLeft: null,
-      padding: variables.listItemPadding,
-      paddingLeft: variables.listItemPadding + 5,
-      paddingTop:
-        platform === PLATFORM.IOS ? variables.listItemPadding + 25 : undefined,
-      paddingBottom:
-        platform === PLATFORM.ANDROID ? variables.listItemPadding + 20 : undefined,
-      flexDirection: 'row',
-      borderColor: variables.listBorderColor,
-      'NativeBase.Text': {
-        fontSize: 14,
-        color: platform === PLATFORM.IOS ? undefined : variables.listNoteColor
-      }
-    },
-    '.itemDivider': {
-      borderBottomWidth: null,
-      marginLeft: null,
-      padding: variables.listItemPadding,
-      paddingLeft: variables.listItemPadding + 5,
-      backgroundColor: variables.listDividerBg,
-      flexDirection: 'row',
-      borderColor: variables.listBorderColor
-    },
-    '.selected': {
-      'NativeBase.Left': {
-        ...selectedStyle
-      },
-      'NativeBase.Body': {
-        ...selectedStyle
-      },
-      'NativeBase.Right': {
-        ...selectedStyle
-      },
-      ...selectedStyle
-    },
-    'NativeBase.Left': {
-      'NativeBase.Body': {
-        'NativeBase.Text': {
-          '.note': {
-            color: variables.listNoteColor,
-            fontWeight: '200'
-          },
-          fontWeight: '600'
-        },
-        marginLeft: 10,
-        alignItems: null,
-        alignSelf: null
-      },
-      'NativeBase.Icon': {
-        width: variables.iconFontSize - 10,
-        fontSize: variables.iconFontSize - 10
-      },
-      'NativeBase.IconNB': {
-        width: variables.iconFontSize - 10,
-        fontSize: variables.iconFontSize - 10
-      },
-      'NativeBase.Text': {
-        alignSelf: 'center'
-      },
-      flexDirection: 'row'
-    },
-    'NativeBase.Body': {
-      'NativeBase.Text': {
-        marginHorizontal: variables.listItemPadding,
-        '.note': {
-          color: variables.listNoteColor,
-          fontWeight: '200'
-        }
-      },
-      alignSelf: null,
-      alignItems: null
-    },
-    'NativeBase.Right': {
-      'NativeBase.Badge': {
-        alignSelf: null
-      },
-      'NativeBase.PickerNB': {
-        'NativeBase.Button': {
-          marginRight: -15,
-          'NativeBase.Text': {
-            color: variables.topTabBarActiveTextColor
-          }
-        }
-      },
-      'NativeBase.Button': {
-        alignSelf: null,
-        '.transparent': {
-          'NativeBase.Text': {
-            color: variables.topTabBarActiveTextColor
-          }
-        }
-      },
-      'NativeBase.Icon': {
-        alignSelf: null,
-        fontSize: variables.iconFontSize - 8,
-        color: '#c9c8cd'
-      },
-      'NativeBase.IconNB': {
-        alignSelf: null,
-        fontSize: variables.iconFontSize - 8,
-        color: '#c9c8cd'
-      },
-      'NativeBase.Text': {
-        '.note': {
-          color: variables.listNoteColor,
-          fontWeight: '200'
-        },
-        alignSelf: null
-      },
-      'NativeBase.Thumbnail': {
-        alignSelf: null
-      },
-      'NativeBase.Image': {
-        alignSelf: null
-      },
-      'NativeBase.Radio': {
-        alignSelf: null
-      },
-      'NativeBase.Checkbox': {
-        alignSelf: null
-      },
-      'NativeBase.Switch': {
-        alignSelf: null
-      },
-      padding: null,
-      flex: 0.28
-    },
-    'NativeBase.Text': {
-      '.note': {
-        color: variables.listNoteColor,
-        fontWeight: '200'
-      },
-      alignSelf: 'center'
-    },
-    '.last': {
-      marginLeft: -(variables.listItemPadding + 5),
-      paddingLeft: (variables.listItemPadding + 5) * 2,
-      top: 1
-    },
-    '.avatar': {
-      'NativeBase.Left': {
-        flex: 0,
-        alignSelf: 'flex-start',
-        paddingTop: 14
-      },
-      'NativeBase.Body': {
-        'NativeBase.Text': {
-          marginLeft: null
-        },
-        flex: 1,
-        paddingVertical: variables.listItemPadding,
-        borderBottomWidth: variables.borderWidth,
-        borderColor: variables.listBorderColor,
-        marginLeft: variables.listItemPadding + 5
-      },
-      'NativeBase.Right': {
-        'NativeBase.Text': {
-          '.note': {
-            fontSize: variables.noteFontSize - 2
-          }
-        },
-        flex: 0,
-        paddingRight: variables.listItemPadding + 5,
-        alignSelf: 'stretch',
-        paddingVertical: variables.listItemPadding,
-        borderBottomWidth: variables.borderWidth,
-        borderColor: variables.listBorderColor
-      },
-      '.noBorder': {
-        'NativeBase.Body': {
-          borderBottomWidth: null
-        },
-        'NativeBase.Right': {
-          borderBottomWidth: null
-        }
-      },
-      borderBottomWidth: null,
-      paddingVertical: null,
-      paddingRight: null
-    },
-    '.thumbnail': {
-      'NativeBase.Left': {
-        flex: 0
-      },
-      'NativeBase.Body': {
-        'NativeBase.Text': {
-          marginLeft: null
-        },
-        flex: 1,
-        paddingVertical: variables.listItemPadding + 8,
-        borderBottomWidth: variables.borderWidth,
-        borderColor: variables.listBorderColor,
-        marginLeft: variables.listItemPadding + 5
-      },
-      'NativeBase.Right': {
-        'NativeBase.Button': {
-          '.transparent': {
-            'NativeBase.Text': {
-              fontSize: variables.listNoteSize,
-              color: variables.sTabBarActiveTextColor
-            }
-          },
-          height: null
-        },
-        flex: 0,
-        justifyContent: 'center',
-        alignSelf: 'stretch',
-        paddingRight: variables.listItemPadding + 5,
-        paddingVertical: variables.listItemPadding + 5,
-        borderBottomWidth: variables.borderWidth,
-        borderColor: variables.listBorderColor
-      },
-      '.noBorder': {
-        'NativeBase.Body': {
-          borderBottomWidth: null
-        },
-        'NativeBase.Right': {
-          borderBottomWidth: null
-        }
-      },
-      borderBottomWidth: null,
-      paddingVertical: null,
-      paddingRight: null
-    },
-    '.icon': {
-      '.last': {
-        'NativeBase.Body': {
-          borderBottomWidth: null
-        },
-        'NativeBase.Right': {
-          borderBottomWidth: null
-        },
-        borderBottomWidth: variables.borderWidth,
-        borderColor: variables.listBorderColor
-      },
-      'NativeBase.Left': {
-        'NativeBase.Button': {
-          'NativeBase.IconNB': {
-            marginHorizontal: null,
-            fontSize: variables.iconFontSize - 5
-          },
-          'NativeBase.Icon': {
-            marginHorizontal: null,
-            fontSize: variables.iconFontSize - 8
-          },
-          alignSelf: 'center',
-          height: 29,
-          width: 29,
-          borderRadius: 6,
-          paddingVertical: null,
-          paddingHorizontal: null,
-          alignItems: 'center',
-          justifyContent: 'center'
-        },
-        'NativeBase.Icon': {
-          width: variables.iconFontSize - 5,
-          fontSize: variables.iconFontSize - 2
-        },
-        'NativeBase.IconNB': {
-          width: variables.iconFontSize - 5,
-          fontSize: variables.iconFontSize - 2
-        },
-        paddingRight: variables.listItemPadding + 5,
-        flex: 0,
-        height: 44,
-        justifyContent: 'center',
-        alignItems: 'center'
-      },
-      'NativeBase.Body': {
-        'NativeBase.Text': {
-          marginLeft: null,
-          fontSize: 17
-        },
-        flex: 1,
-        height: 44,
-        justifyContent: 'center',
-        borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
-        borderColor: variables.listBorderColor
-      },
-      'NativeBase.Right': {
-        'NativeBase.Text': {
-          textAlign: 'center',
-          color: '#8F8E95',
-          fontSize: 17
-        },
-        'NativeBase.IconNB': {
-          color: '#C8C7CC',
-          fontSize: variables.iconFontSize - 10,
-          alignSelf: 'center',
-          paddingLeft: 10,
-          paddingTop: 3
-        },
-        'NativeBase.Icon': {
-          color: '#C8C7CC',
-          fontSize: variables.iconFontSize - 10,
-          alignSelf: 'center',
-          paddingLeft: 10,
-          paddingTop: 3
-        },
-        'NativeBase.Switch': {
-          marginRight: Platform.OS === PLATFORM.IOS ? undefined : -5,
-          alignSelf: null
-        },
-        'NativeBase.PickerNB': {
-          ...pickerTheme()
-        },
-        flexDirection: 'row',
-        alignItems: 'center',
-        flex: 0,
-        alignSelf: 'stretch',
-        height: 44,
-        justifyContent: 'flex-end',
-        borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
-        borderColor: variables.listBorderColor,
-        paddingRight: variables.listItemPadding + 5
-      },
-      '.noBorder': {
-        'NativeBase.Body': {
-          borderBottomWidth: null
-        },
-        'NativeBase.Right': {
-          borderBottomWidth: null
-        }
-      },
-      borderBottomWidth: null,
-      paddingVertical: null,
-      paddingRight: null,
-      height: 44,
-      justifyContent: 'center'
-    },
-    '.noBorder': {
-      borderBottomWidth: null
-    },
-    '.noIndent': {
-      marginLeft: null,
-      padding: variables.listItemPadding,
-      paddingLeft: variables.listItemPadding + 6
-    },
-    alignItems: 'center',
-    flexDirection: 'row',
-    paddingRight: variables.listItemPadding + 6,
-    paddingVertical: variables.listItemPadding + 3,
-    marginLeft: variables.listItemPadding + 6,
-    borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
-    backgroundColor: variables.listBg,
-    borderColor: variables.listBorderColor
-  };
-
-  return listItemTheme;
-};

+ 0 - 14
native-base-theme/components/Picker.android.js

@@ -1,14 +0,0 @@
-// @flow
-
-export default () => {
-  const pickerTheme = {
-    '.note': {
-      color: '#8F8E95'
-    },
-    // width: 90,
-    marginRight: -4,
-    flexGrow: 1
-  };
-
-  return pickerTheme;
-};

+ 0 - 7
native-base-theme/components/Picker.ios.js

@@ -1,7 +0,0 @@
-// @flow
-
-export default () => {
-  const pickerTheme = {};
-
-  return pickerTheme;
-};

+ 0 - 14
native-base-theme/components/Picker.js

@@ -1,14 +0,0 @@
-// @flow
-
-export default () => {
-  const pickerTheme = {
-    '.note': {
-      color: '#8F8E95'
-    },
-    // width: 90,
-    marginRight: -4,
-    flexGrow: 1
-  };
-
-  return pickerTheme;
-};

+ 0 - 31
native-base-theme/components/Radio.js

@@ -1,31 +0,0 @@
-// @flow
-
-import { Platform } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const radioTheme = {
-    '.selected': {
-      'NativeBase.IconNB': {
-        color:
-          Platform.OS === PLATFORM.IOS
-            ? variables.radioColor
-            : variables.radioSelectedColorAndroid,
-        lineHeight:
-          Platform.OS === PLATFORM.IOS ? 25 : variables.radioBtnLineHeight,
-        height: Platform.OS === PLATFORM.IOS ? 20 : undefined
-      }
-    },
-    'NativeBase.IconNB': {
-      color: Platform.OS === PLATFORM.IOS ? 'transparent' : undefined,
-      lineHeight:
-        Platform.OS === PLATFORM.IOS ? undefined : variables.radioBtnLineHeight,
-      fontSize:
-        Platform.OS === PLATFORM.IOS ? undefined : variables.radioBtnSize
-    }
-  };
-
-  return radioTheme;
-};

+ 0 - 14
native-base-theme/components/Right.js

@@ -1,14 +0,0 @@
-// @flow
-
-export default () => {
-  const rightTheme = {
-    'NativeBase.Button': {
-      alignSelf: null
-    },
-    flex: 1,
-    alignSelf: 'center',
-    alignItems: 'flex-end'
-  };
-
-  return rightTheme;
-};

+ 0 - 57
native-base-theme/components/Segment.js

@@ -1,57 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platform = variables.platform;
-
-  const segmentTheme = {
-    height: 45,
-    borderColor: variables.segmentBorderColorMain,
-    flexDirection: 'row',
-    justifyContent: 'center',
-    backgroundColor: variables.segmentBackgroundColor,
-    'NativeBase.Button': {
-      alignSelf: 'center',
-      borderRadius: 0,
-      paddingTop: 3,
-      paddingBottom: 3,
-      height: 30,
-      backgroundColor: 'transparent',
-      borderWidth: 1,
-      borderLeftWidth: 0,
-      borderColor: variables.segmentBorderColor,
-      elevation: 0,
-      '.active': {
-        backgroundColor: variables.segmentActiveBackgroundColor,
-        'NativeBase.Text': {
-          color: variables.segmentActiveTextColor
-        },
-        'NativeBase.Icon': {
-          color: variables.segmentActiveTextColor
-        }
-      },
-      '.first': {
-        borderTopLeftRadius: platform === PLATFORM.IOS ? 5 : undefined,
-        borderBottomLeftRadius: platform === PLATFORM.IOS ? 5 : undefined,
-        borderLeftWidth: 1
-      },
-      '.last': {
-        borderTopRightRadius: platform === PLATFORM.IOS ? 5 : undefined,
-        borderBottomRightRadius: platform === PLATFORM.IOS ? 5 : undefined
-      },
-      'NativeBase.Text': {
-        color: variables.segmentTextColor,
-        fontSize: 14
-      },
-      'NativeBase.Icon': {
-        fontSize: 22,
-        paddingTop: 0,
-        color: variables.segmentTextColor
-      }
-    }
-  };
-
-  return segmentTheme;
-};

+ 0 - 49
native-base-theme/components/Separator.js

@@ -1,49 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const theme = {
-    '.group': {
-      height: 50,
-      paddingVertical: variables.listItemPadding - 8,
-      paddingTop: variables.listItemPadding + 12,
-      '.bordered': {
-        height: 50,
-        paddingVertical: variables.listItemPadding - 8,
-        paddingTop: variables.listItemPadding + 12
-      }
-    },
-    '.bordered': {
-      '.noTopBorder': {
-        borderTopWidth: 0
-      },
-      '.noBottomBorder': {
-        borderBottomWidth: 0
-      },
-      height: 35,
-      paddingTop: variables.listItemPadding + 2,
-      paddingBottom: variables.listItemPadding,
-      borderBottomWidth: variables.borderWidth,
-      borderTopWidth: variables.borderWidth,
-      borderColor: variables.listBorderColor
-    },
-    'NativeBase.Text': {
-      fontSize: variables.tabBarTextSize - 2,
-      color: '#777'
-    },
-    '.noTopBorder': {
-      borderTopWidth: 0
-    },
-    '.noBottomBorder': {
-      borderBottomWidth: 0
-    },
-    height: 38,
-    backgroundColor: '#F0EFF5',
-    flex: 1,
-    justifyContent: 'center',
-    paddingLeft: variables.listItemPadding + 5
-  };
-
-  return theme;
-};

+ 0 - 9
native-base-theme/components/Spinner.js

@@ -1,9 +0,0 @@
-// @flow
-
-export default () => {
-  const spinnerTheme = {
-    height: 80
-  };
-
-  return spinnerTheme;
-};

+ 0 - 19
native-base-theme/components/Subtitle.js

@@ -1,19 +0,0 @@
-// @flow
-
-import { Platform } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const subtitleTheme = {
-    fontSize: variables.subTitleFontSize,
-    fontFamily: variables.titleFontfamily,
-    color: variables.subtitleColor,
-    textAlign:  Platform.OS === PLATFORM.IOS ? 'center' : 'left',
-    paddingLeft: Platform.OS === PLATFORM.IOS ? 4 : 0,
-    marginLeft: Platform.OS === PLATFORM.IOS ? undefined : -3
-  };
-
-  return subtitleTheme;
-};

+ 0 - 46
native-base-theme/components/SwipeRow.js

@@ -1,46 +0,0 @@
-// @flow
-
-export default () => {
-  const swipeRowTheme = {
-    'NativeBase.ListItem': {
-      '.list': {
-        backgroundColor: '#FFF'
-      },
-      marginLeft: 0
-    },
-    'NativeBase.Left': {
-      flex: 0,
-      alignSelf: null,
-      alignItems: null,
-      'NativeBase.Button': {
-        flex: 1,
-        alignItems: 'center',
-        justifyContent: 'center',
-        alignSelf: 'stretch',
-        borderRadius: 0
-      }
-    },
-    'NativeBase.Right': {
-      flex: 0,
-      alignSelf: null,
-      alignItems: null,
-      'NativeBase.Button': {
-        flex: 1,
-        alignItems: 'center',
-        justifyContent: 'center',
-        alignSelf: 'stretch',
-        borderRadius: 0
-      }
-    },
-    'NativeBase.Button': {
-      flex: 1,
-      height: null,
-      alignItems: 'center',
-      justifyContent: 'center',
-      alignSelf: 'stretch',
-      borderRadius: 0
-    }
-  };
-
-  return swipeRowTheme;
-};

+ 0 - 9
native-base-theme/components/Switch.js

@@ -1,9 +0,0 @@
-// @flow
-
-export default () => {
-  const switchTheme = {
-    marginVertical: -5
-  };
-
-  return switchTheme;
-};

+ 0 - 10
native-base-theme/components/Tab.js

@@ -1,10 +0,0 @@
-// @flow
-
-export default () => {
-  const tabTheme = {
-    flex: 1,
-    backgroundColor: '#FFF'
-  };
-
-  return tabTheme;
-};

+ 0 - 57
native-base-theme/components/TabBar.js

@@ -1,57 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const tabBarTheme = {
-    '.tabIcon': {
-      height: undefined
-    },
-    '.vertical': {
-      height: 60
-    },
-    'NativeBase.Button': {
-      '.transparent': {
-        'NativeBase.Text': {
-          fontSize: variables.tabFontSize,
-          color: variables.sTabBarActiveTextColor,
-          fontWeight: '400'
-        },
-        'NativeBase.IconNB': {
-          color: variables.sTabBarActiveTextColor
-        }
-      },
-      'NativeBase.IconNB': {
-        color: variables.sTabBarActiveTextColor
-      },
-      'NativeBase.Text': {
-        fontSize: variables.tabFontSize,
-        color: variables.sTabBarActiveTextColor,
-        fontWeight: '400'
-      },
-      '.isTabActive': {
-        'NativeBase.Text': {
-          fontWeight: '900'
-        }
-      },
-      flex: 1,
-      alignSelf: 'stretch',
-      alignItems: 'center',
-      justifyContent: 'center',
-      borderRadius: null,
-      borderBottomColor: 'transparent',
-      backgroundColor: variables.tabBgColor
-    },
-    height: 45,
-    flexDirection: 'row',
-    justifyContent: 'space-around',
-    borderWidth: 1,
-    borderTopWidth: 0,
-    borderLeftWidth: 0,
-    borderRightWidth: 0,
-    borderBottomColor: '#ccc',
-    backgroundColor: variables.tabBgColor
-  };
-
-  return tabBarTheme;
-};

+ 0 - 26
native-base-theme/components/TabContainer.js

@@ -1,26 +0,0 @@
-// @flow
-
-import { Platform } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platformStyle = variables.platformStyle;
-
-  const tabContainerTheme = {
-    elevation: 3,
-    height: 50,
-    flexDirection: 'row',
-    shadowColor: platformStyle === PLATFORM.MATERIAL ? '#000' : undefined,
-    shadowOffset:
-      platformStyle === PLATFORM.MATERIAL ? { width: 0, height: 2 } : undefined,
-    shadowOpacity: platformStyle === PLATFORM.MATERIAL ? 0.2 : undefined,
-    shadowRadius: platformStyle === PLATFORM.MATERIAL ? 1.2 : undefined,
-    justifyContent: 'space-around',
-    borderBottomWidth: Platform.OS === PLATFORM.IOS ? variables.borderWidth : 0,
-    borderColor: variables.topTabBarBorderColor
-  };
-
-  return tabContainerTheme;
-};

+ 0 - 40
native-base-theme/components/TabHeading.js

@@ -1,40 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platform = variables.platform;
-
-  const tabHeadingTheme = {
-    flexDirection: 'row',
-    backgroundColor: variables.tabDefaultBg,
-    flex: 1,
-    alignItems: 'center',
-    justifyContent: 'center',
-    '.scrollable': {
-      paddingHorizontal: 20,
-      flex: platform === PLATFORM.ANDROID ? 0 : 1,
-      minWidth: platform === PLATFORM.ANDROID ? undefined : 60
-    },
-    'NativeBase.Text': {
-      color: variables.topTabBarTextColor,
-      marginHorizontal: 7
-    },
-    'NativeBase.Icon': {
-      color: variables.topTabBarTextColor,
-      fontSize: platform === PLATFORM.IOS ? 26 : undefined
-    },
-    '.active': {
-      'NativeBase.Text': {
-        color: variables.topTabBarActiveTextColor,
-        fontWeight: '600'
-      },
-      'NativeBase.Icon': {
-        color: variables.topTabBarActiveTextColor
-      }
-    }
-  };
-
-  return tabHeadingTheme;
-};

+ 0 - 17
native-base-theme/components/Text.js

@@ -1,17 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const textTheme = {
-    fontSize: variables.DefaultFontSize,
-    fontFamily: variables.fontFamily,
-    color: variables.textColor,
-    '.note': {
-      color: '#a7a7a7',
-      fontSize: variables.noteFontSize
-    }
-  };
-
-  return textTheme;
-};

+ 0 - 25
native-base-theme/components/Textarea.js

@@ -1,25 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const textAreaTheme = {
-    '.underline': {
-      borderBottomWidth: variables.borderWidth,
-      marginTop: 5,
-      borderColor: variables.inputBorderColor
-    },
-    '.bordered': {
-      borderWidth: 1,
-      marginTop: 5,
-      borderColor: variables.inputBorderColor
-    },
-    color: variables.textColor,
-    paddingLeft: 10,
-    paddingRight: 5,
-    fontSize: 15,
-    textAlignVertical: 'top'
-  };
-
-  return textAreaTheme;
-};

+ 0 - 40
native-base-theme/components/Thumbnail.js

@@ -1,40 +0,0 @@
-// @flow
-
-export default () => {
-  const thumbnailTheme = {
-    '.square': {
-      borderRadius: 0,
-      '.small': {
-        width: 36,
-        height: 36,
-        borderRadius: 0
-      },
-      '.large': {
-        width: 80,
-        height: 80,
-        borderRadius: 0
-      }
-    },
-    '.small': {
-      width: 36,
-      height: 36,
-      borderRadius: 18,
-      '.square': {
-        borderRadius: 0
-      }
-    },
-    '.large': {
-      width: 80,
-      height: 80,
-      borderRadius: 40,
-      '.square': {
-        borderRadius: 0
-      }
-    },
-    width: 56,
-    height: 56,
-    borderRadius: 28
-  };
-
-  return thumbnailTheme;
-};

+ 0 - 21
native-base-theme/components/Title.js

@@ -1,21 +0,0 @@
-// @flow
-
-import { Platform } from 'react-native';
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const titleTheme = {
-    fontSize: variables.titleFontSize,
-    fontFamily: variables.titleFontfamily,
-    color: variables.titleFontColor,
-    fontWeight: Platform.OS === PLATFORM.IOS ? '700' : undefined,
-    textAlign:  Platform.OS === PLATFORM.IOS ? 'center' : 'left',
-    paddingLeft: Platform.OS === PLATFORM.IOS ? 4 : 0,
-    marginLeft: Platform.OS === PLATFORM.IOS ? undefined : -3,
-    paddingTop: 1
-  };
-
-  return titleTheme;
-};

+ 0 - 41
native-base-theme/components/Toast.js

@@ -1,41 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-import { PLATFORM } from './../variables/commonColor';
-
-export default (variables /* : * */ = variable) => {
-  const platform = variables.platform;
-
-  const toastTheme = {
-    '.danger': {
-      backgroundColor: variables.brandDanger
-    },
-    '.warning': {
-      backgroundColor: variables.brandWarning
-    },
-    '.success': {
-      backgroundColor: variables.brandSuccess
-    },
-    backgroundColor: 'rgba(0,0,0,0.8)',
-    borderRadius: platform === PLATFORM.IOS ? 5 : 0,
-    flexDirection: 'row',
-    justifyContent: 'space-between',
-    alignItems: 'center',
-    padding: 10,
-    minHeight: 50,
-    'NativeBase.Text': {
-      color: '#fff',
-      flex: 1
-    },
-    'NativeBase.Button': {
-      backgroundColor: 'transparent',
-      height: 30,
-      elevation: 0,
-      'NativeBase.Text': {
-        fontSize: 14
-      }
-    }
-  };
-
-  return toastTheme;
-};

+ 0 - 13
native-base-theme/components/View.js

@@ -1,13 +0,0 @@
-// @flow
-
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const viewTheme = {
-    '.padder': {
-      padding: variables.contentPadding
-    }
-  };
-
-  return viewTheme;
-};

+ 0 - 249
native-base-theme/components/index.js

@@ -1,249 +0,0 @@
-/* eslint-disable no-param-reassign */
-// @flow
-
-import _ from 'lodash';
-
-import bodyTheme from './Body';
-import leftTheme from './Left';
-import rightTheme from './Right';
-import headerTheme from './Header';
-import switchTheme from './Switch';
-import thumbnailTheme from './Thumbnail';
-import containerTheme from './Container';
-import contentTheme from './Content';
-import buttonTheme from './Button';
-import titleTheme from './Title';
-import subtitleTheme from './Subtitle';
-import inputGroupTheme from './InputGroup';
-import badgeTheme from './Badge';
-import checkBoxTheme from './CheckBox';
-import cardTheme from './Card';
-import radioTheme from './Radio';
-import h3Theme from './H3';
-import h2Theme from './H2';
-import h1Theme from './H1';
-import footerTheme from './Footer';
-import footerTabTheme from './FooterTab';
-import fabTheme from './Fab';
-import itemTheme from './Item';
-import labelTheme from './Label';
-import textAreaTheme from './Textarea';
-import textTheme from './Text';
-import toastTheme from './Toast';
-import tabTheme from './Tab';
-import tabBarTheme from './TabBar';
-import tabContainerTheme from './TabContainer';
-import viewTheme from './View';
-import tabHeadingTheme from './TabHeading';
-import iconTheme from './Icon';
-import inputTheme from './Input';
-import swipeRowTheme from './SwipeRow';
-import segmentTheme from './Segment';
-import spinnerTheme from './Spinner';
-import cardItemTheme from './CardItem';
-import listItemTheme from './ListItem';
-import formTheme from './Form';
-import separatorTheme from './Separator';
-import pickerTheme from './Picker';
-import variable from './../variables/platform';
-
-export default (variables /* : * */ = variable) => {
-  const theme = {
-    variables,
-    'NativeBase.Left': {
-      ...leftTheme(variables)
-    },
-    'NativeBase.Right': {
-      ...rightTheme(variables)
-    },
-    'NativeBase.Body': {
-      ...bodyTheme(variables)
-    },
-
-    'NativeBase.Header': {
-      ...headerTheme(variables)
-    },
-
-    'NativeBase.Button': {
-      ...buttonTheme(variables)
-    },
-
-    'NativeBase.Title': {
-      ...titleTheme(variables)
-    },
-    'NativeBase.Subtitle': {
-      ...subtitleTheme(variables)
-    },
-
-    'NativeBase.InputGroup': {
-      ...inputGroupTheme(variables)
-    },
-
-    'NativeBase.Input': {
-      ...inputTheme(variables)
-    },
-
-    'NativeBase.Badge': {
-      ...badgeTheme(variables)
-    },
-
-    'NativeBase.CheckBox': {
-      ...checkBoxTheme(variables)
-    },
-
-    'NativeBase.Radio': {
-      ...radioTheme(variables)
-    },
-
-    'NativeBase.Card': {
-      ...cardTheme(variables)
-    },
-
-    'NativeBase.CardItem': {
-      ...cardItemTheme(variables)
-    },
-
-    'NativeBase.Toast': {
-      ...toastTheme(variables)
-    },
-
-    'NativeBase.H1': {
-      ...h1Theme(variables)
-    },
-    'NativeBase.H2': {
-      ...h2Theme(variables)
-    },
-    'NativeBase.H3': {
-      ...h3Theme(variables)
-    },
-    'NativeBase.Form': {
-      ...formTheme(variables)
-    },
-
-    'NativeBase.Container': {
-      ...containerTheme(variables)
-    },
-    'NativeBase.Content': {
-      ...contentTheme(variables)
-    },
-
-    'NativeBase.Footer': {
-      ...footerTheme(variables)
-    },
-
-    'NativeBase.Tabs': {
-      flex: 1
-    },
-
-    'NativeBase.FooterTab': {
-      ...footerTabTheme(variables)
-    },
-
-    'NativeBase.ListItem': {
-      ...listItemTheme(variables)
-    },
-
-    'NativeBase.ListItem1': {
-      ...listItemTheme(variables)
-    },
-
-    'NativeBase.Icon': {
-      ...iconTheme(variables)
-    },
-    'NativeBase.IconNB': {
-      ...iconTheme(variables)
-    },
-    'NativeBase.Text': {
-      ...textTheme(variables)
-    },
-    'NativeBase.Spinner': {
-      ...spinnerTheme(variables)
-    },
-
-    'NativeBase.Fab': {
-      ...fabTheme(variables)
-    },
-
-    'NativeBase.Item': {
-      ...itemTheme(variables)
-    },
-
-    'NativeBase.Label': {
-      ...labelTheme(variables)
-    },
-
-    'NativeBase.Textarea': {
-      ...textAreaTheme(variables)
-    },
-
-    'NativeBase.PickerNB': {
-      ...pickerTheme(variables),
-      'NativeBase.Button': {
-        'NativeBase.Text': {}
-      }
-    },
-
-    'NativeBase.Tab': {
-      ...tabTheme(variables)
-    },
-
-    'NativeBase.Segment': {
-      ...segmentTheme(variables)
-    },
-
-    'NativeBase.TabBar': {
-      ...tabBarTheme(variables)
-    },
-    'NativeBase.ViewNB': {
-      ...viewTheme(variables)
-    },
-    'NativeBase.TabHeading': {
-      ...tabHeadingTheme(variables)
-    },
-    'NativeBase.TabContainer': {
-      ...tabContainerTheme(variables)
-    },
-    'NativeBase.Switch': {
-      ...switchTheme(variables)
-    },
-    'NativeBase.Separator': {
-      ...separatorTheme(variables)
-    },
-    'NativeBase.SwipeRow': {
-      ...swipeRowTheme(variables)
-    },
-    'NativeBase.Thumbnail': {
-      ...thumbnailTheme(variables)
-    }
-  };
-
-  const cssifyTheme = (grandparent, parent, parentKey) => {
-    _.forEach(parent, (style, styleName) => {
-      if (
-        styleName.indexOf('.') === 0 &&
-        parentKey &&
-        parentKey.indexOf('.') === 0
-      ) {
-        if (grandparent) {
-          if (!grandparent[styleName]) {
-            grandparent[styleName] = {};
-          } else {
-            grandparent[styleName][parentKey] = style;
-          }
-        }
-      }
-      if (
-        style &&
-        typeof style === 'object' &&
-        styleName !== 'fontVariant' &&
-        styleName !== 'transform'
-      ) {
-        cssifyTheme(parent, style, styleName);
-      }
-    });
-  };
-
-  cssifyTheme(null, theme, null);
-
-  return theme;
-};

+ 0 - 311
native-base-theme/variables/commonColor.js

@@ -1,311 +0,0 @@
-// @flow
-
-import color from 'color';
-import { Platform, Dimensions, PixelRatio } from 'react-native';
-
-export const PLATFORM = {
-  ANDROID: 'android',
-  IOS: 'ios',
-  MATERIAL: 'material',
-  WEB: 'web'
-};
-
-const deviceHeight = Dimensions.get('window').height;
-const deviceWidth = Dimensions.get('window').width;
-const platform = Platform.OS;
-const platformStyle = undefined;
-const isIphoneX =
-  platform === PLATFORM.IOS &&
-  (deviceHeight === 812 ||
-    deviceWidth === 812 ||
-    deviceHeight === 896 ||
-    deviceWidth === 896);
-
-export default {
-  platformStyle,
-  platform,
-
-  // Accordion
-  headerStyle: '#edebed',
-  iconStyle: '#000',
-  contentStyle: '#f5f4f5',
-  expandedIconStyle: '#000',
-  accordionBorderColor: '#d3d3d3',
-
-  // ActionSheet
-  elevation: 4,
-  containerTouchableBackgroundColor: 'rgba(0,0,0,0.4)',
-  innerTouchableBackgroundColor: '#fff',
-  listItemHeight: 50,
-  listItemBorderColor: 'transparent',
-  marginHorizontal: -15,
-  marginLeft: 14,
-  marginTop: 15,
-  minHeight: 56,
-  padding: 15,
-  touchableTextColor: '#757575',
-
-  // Android
-  androidRipple: true,
-  androidRippleColor: 'rgba(256, 256, 256, 0.3)',
-  androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',
-  buttonUppercaseAndroidText: true,
-
-  // Badge
-  badgeBg: '#ED1727',
-  badgeColor: '#fff',
-  badgePadding: platform === PLATFORM.IOS ? 3 : 0,
-
-  // Button
-  buttonFontFamily: platform === PLATFORM.IOS ? 'System' : 'Roboto_medium',
-  buttonDisabledBg: '#b5b5b5',
-  buttonPadding: 6,
-  get buttonPrimaryBg() {
-    return this.brandPrimary;
-  },
-  get buttonPrimaryColor() {
-    return this.inverseTextColor;
-  },
-  get buttonInfoBg() {
-    return this.brandInfo;
-  },
-  get buttonInfoColor() {
-    return this.inverseTextColor;
-  },
-  get buttonSuccessBg() {
-    return this.brandSuccess;
-  },
-  get buttonSuccessColor() {
-    return this.inverseTextColor;
-  },
-  get buttonDangerBg() {
-    return this.brandDanger;
-  },
-  get buttonDangerColor() {
-    return this.inverseTextColor;
-  },
-  get buttonWarningBg() {
-    return this.brandWarning;
-  },
-  get buttonWarningColor() {
-    return this.inverseTextColor;
-  },
-  get buttonTextSize() {
-    return platform === PLATFORM.IOS
-      ? this.fontSizeBase * 1.1
-      : this.fontSizeBase - 1;
-  },
-  get buttonTextSizeLarge() {
-    return this.fontSizeBase * 1.5;
-  },
-  get buttonTextSizeSmall() {
-    return this.fontSizeBase * 0.8;
-  },
-  get borderRadiusLarge() {
-    return this.fontSizeBase * 3.8;
-  },
-  get iconSizeLarge() {
-    return this.iconFontSize * 1.5;
-  },
-  get iconSizeSmall() {
-    return this.iconFontSize * 0.6;
-  },
-
-  // Card
-  cardDefaultBg: '#fff',
-  cardBorderColor: '#ccc',
-  cardBorderRadius: 2,
-  cardItemPadding: platform === PLATFORM.IOS ? 10 : 12,
-
-  // CheckBox
-  CheckboxRadius: platform === PLATFORM.IOS ? 13 : 0,
-  CheckboxBorderWidth: platform === PLATFORM.IOS ? 1 : 2,
-  CheckboxPaddingLeft: platform === PLATFORM.IOS ? 4 : 2,
-  CheckboxPaddingBottom: platform === PLATFORM.IOS ? 0 : 5,
-  CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16,
-  CheckboxIconMarginTop: platform === PLATFORM.IOS ? undefined : 1,
-  CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17,
-  checkboxBgColor: '#039BE5',
-  checkboxSize: 20,
-  checkboxTickColor: '#fff',
-
-  // Color
-  brandPrimary: platform === PLATFORM.IOS ? '#007aff' : '#3F51B5',
-  brandInfo: '#62B1F6',
-  brandSuccess: '#5cb85c',
-  brandDanger: '#d9534f',
-  brandWarning: '#f0ad4e',
-  brandDark: '#000',
-  brandLight: '#a9a9a9',
-
-  // Container
-  containerBgColor: '#fff',
-
-  // Date Picker
-  datePickerTextColor: '#000',
-  datePickerBg: 'transparent',
-
-  // FAB
-  fabWidth: 56,
-
-  // Font
-  DefaultFontSize: 16,
-  fontFamily: platform === PLATFORM.IOS ? 'System' : 'Roboto',
-  fontSizeBase: 15,
-  get fontSizeH1() {
-    return this.fontSizeBase * 1.8;
-  },
-  get fontSizeH2() {
-    return this.fontSizeBase * 1.6;
-  },
-  get fontSizeH3() {
-    return this.fontSizeBase * 1.4;
-  },
-
-  // Footer
-  footerHeight: 55,
-  footerDefaultBg: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  footerPaddingBottom: 0,
-
-  // FooterTab
-  tabBarTextColor: platform === PLATFORM.IOS ? '#737373' : '#bfc6ea',
-  tabBarTextSize: platform === PLATFORM.IOS ? 14 : 11,
-  activeTab: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  sTabBarActiveTextColor: '#007aff',
-  tabBarActiveTextColor: platform === PLATFORM.IOS ? '#2874F0' : '#fff',
-  tabActiveBgColor: platform === PLATFORM.IOS ? '#cde1f9' : '#3F51B5',
-
-  // Header
-  toolbarBtnColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  toolbarDefaultBg: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  toolbarHeight: platform === PLATFORM.IOS ? 64 : 56,
-  toolbarSearchIconSize: platform === PLATFORM.IOS ? 20 : 23,
-  toolbarInputColor: platform === PLATFORM.IOS ? '#CECDD2' : '#fff',
-  searchBarHeight: platform === PLATFORM.IOS ? 30 : 40,
-  searchBarInputHeight: platform === PLATFORM.IOS ? 30 : 50,
-  toolbarBtnTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  iosStatusbar: 'dark-content',
-  toolbarDefaultBorder: platform === PLATFORM.IOS ? '#a7a6ab' : '#3F51B5',
-  get statusBarColor() {
-    return color(this.toolbarDefaultBg)
-      .darken(0.2)
-      .hex();
-  },
-  get darkenHeader() {
-    return color(this.tabBgColor)
-      .darken(0.03)
-      .hex();
-  },
-
-  // Icon
-  iconFamily: 'Ionicons',
-  iconFontSize: platform === PLATFORM.IOS ? 30 : 28,
-  iconHeaderSize: platform === PLATFORM.IOS ? 33 : 24,
-
-  // InputGroup
-  inputFontSize: 17,
-  inputBorderColor: '#D9D5DC',
-  inputSuccessBorderColor: '#2b8339',
-  inputErrorBorderColor: '#ed2f2f',
-  inputHeightBase: 50,
-  get inputColor() {
-    return this.textColor;
-  },
-  get inputColorPlaceholder() {
-    return '#575757';
-  },
-
-  // Line Height
-  buttonLineHeight: 19,
-  lineHeightH1: 32,
-  lineHeightH2: 27,
-  lineHeightH3: 25,
-  lineHeight: platform === PLATFORM.IOS ? 20 : 24,
-
-  // List
-  listBg: 'transparent',
-  listBorderColor: '#c9c9c9',
-  listDividerBg: '#f4f4f4',
-  listBtnUnderlayColor: '#DDD',
-  listItemPadding: platform === PLATFORM.IOS ? 10 : 12,
-  listNoteColor: '#808080',
-  listNoteSize: 13,
-  listItemSelected: platform === PLATFORM.IOS ? '#007aff' : '#3F51B5',
-
-  // Progress Bar
-  defaultProgressColor: '#E4202D',
-  inverseProgressColor: '#1A191B',
-
-  // Radio Button
-  radioBtnSize: platform === PLATFORM.IOS ? 25 : 23,
-  radioSelectedColorAndroid: '#3F51B5',
-  radioBtnLineHeight: platform === PLATFORM.IOS ? 29 : 24,
-  get radioColor() {
-    return this.brandPrimary;
-  },
-
-  // Segment
-  segmentBackgroundColor: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  segmentActiveBackgroundColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  segmentTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  segmentActiveTextColor: platform === PLATFORM.IOS ? '#fff' : '#3F51B5',
-  segmentBorderColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  segmentBorderColorMain: platform === PLATFORM.IOS ? '#a7a6ab' : '#3F51B5',
-
-  // Spinner
-  defaultSpinnerColor: '#45D56E',
-  inverseSpinnerColor: '#1A191B',
-
-  // Tab
-  tabDefaultBg: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  topTabBarTextColor: platform === PLATFORM.IOS ? '#6b6b6b' : '#b3c7f9',
-  topTabBarActiveTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  topTabBarBorderColor: platform === PLATFORM.IOS ? '#a7a6ab' : '#fff',
-  topTabBarActiveBorderColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-
-  // Tabs
-  tabBgColor: '#F8F8F8',
-  tabFontSize: 15,
-
-  // Text
-  textColor: '#000',
-  inverseTextColor: '#fff',
-  noteFontSize: 14,
-  get defaultTextColor() {
-    return this.textColor;
-  },
-
-  // Title
-  titleFontfamily: platform === PLATFORM.IOS ? 'System' : 'Roboto_medium',
-  titleFontSize: platform === PLATFORM.IOS ? 17 : 19,
-  subTitleFontSize: platform === PLATFORM.IOS ? 11 : 14,
-  subtitleColor: platform === PLATFORM.IOS ? '#000' : '#fff',
-  titleFontColor: platform === PLATFORM.IOS ? '#000' : '#fff',
-
-  // Other
-  borderRadiusBase: platform === PLATFORM.IOS ? 5 : 2,
-  borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
-  contentPadding: 10,
-  dropdownLinkColor: '#414142',
-  inputLineHeight: 24,
-  deviceWidth,
-  deviceHeight,
-  isIphoneX,
-  inputGroupRoundedBorderRadius: 30,
-
-  // iPhoneX SafeArea
-  Inset: {
-    portrait: {
-      topInset: 24,
-      leftInset: 0,
-      rightInset: 0,
-      bottomInset: 34
-    },
-    landscape: {
-      topInset: 0,
-      leftInset: 44,
-      rightInset: 44,
-      bottomInset: 21
-    }
-  }
-};

+ 0 - 304
native-base-theme/variables/material.js

@@ -1,304 +0,0 @@
-// @flow
-
-import color from 'color';
-import { Platform, Dimensions, PixelRatio } from 'react-native';
-
-import { PLATFORM } from './commonColor';
-
-const deviceHeight = Dimensions.get('window').height;
-const deviceWidth = Dimensions.get('window').width;
-const platform = Platform.OS;
-const platformStyle = PLATFORM.MATERIAL;
-const isIphoneX =
-  platform === PLATFORM.IOS &&
-  (deviceHeight === 812 ||
-    deviceWidth === 812 ||
-    deviceHeight === 896 ||
-    deviceWidth === 896);
-
-export default {
-  platformStyle,
-  platform,
-
-  // Accordion
-  headerStyle: '#edebed',
-  iconStyle: '#000',
-  contentStyle: '#f5f4f5',
-  expandedIconStyle: '#000',
-  accordionBorderColor: '#d3d3d3',
-
-  // ActionSheet
-  elevation: 4,
-  containerTouchableBackgroundColor: 'rgba(0,0,0,0.4)',
-  innerTouchableBackgroundColor: '#fff',
-  listItemHeight: 50,
-  listItemBorderColor: 'transparent',
-  marginHorizontal: -15,
-  marginLeft: 14,
-  marginTop: 15,
-  minHeight: 56,
-  padding: 15,
-  touchableTextColor: '#757575',
-
-  // Android
-  androidRipple: true,
-  androidRippleColor: 'rgba(256, 256, 256, 0.3)',
-  androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',
-  buttonUppercaseAndroidText: true,
-
-  // Badge
-  badgeBg: '#ED1727',
-  badgeColor: '#fff',
-  badgePadding: 0,
-
-  // Button
-  buttonFontFamily: 'Roboto',
-  buttonDisabledBg: '#b5b5b5',
-  buttonPadding: 6,
-  get buttonPrimaryBg() {
-    return this.brandPrimary;
-  },
-  get buttonPrimaryColor() {
-    return this.inverseTextColor;
-  },
-  get buttonInfoBg() {
-    return this.brandInfo;
-  },
-  get buttonInfoColor() {
-    return this.inverseTextColor;
-  },
-  get buttonSuccessBg() {
-    return this.brandSuccess;
-  },
-  get buttonSuccessColor() {
-    return this.inverseTextColor;
-  },
-  get buttonDangerBg() {
-    return this.brandDanger;
-  },
-  get buttonDangerColor() {
-    return this.inverseTextColor;
-  },
-  get buttonWarningBg() {
-    return this.brandWarning;
-  },
-  get buttonWarningColor() {
-    return this.inverseTextColor;
-  },
-  get buttonTextSize() {
-    return this.fontSizeBase - 1;
-  },
-  get buttonTextSizeLarge() {
-    return this.fontSizeBase * 1.5;
-  },
-  get buttonTextSizeSmall() {
-    return this.fontSizeBase * 0.8;
-  },
-  get borderRadiusLarge() {
-    return this.fontSizeBase * 3.8;
-  },
-  get iconSizeLarge() {
-    return this.iconFontSize * 1.5;
-  },
-  get iconSizeSmall() {
-    return this.iconFontSize * 0.6;
-  },
-
-  // Card
-  cardDefaultBg: '#fff',
-  cardBorderColor: '#ccc',
-  cardBorderRadius: 2,
-  cardItemPadding: platform === PLATFORM.IOS ? 10 : 12,
-
-  // CheckBox
-  CheckboxRadius: 0,
-  CheckboxBorderWidth: 2,
-  CheckboxPaddingLeft: 2,
-  CheckboxPaddingBottom: 5,
-  CheckboxIconSize: 16,
-  CheckboxIconMarginTop: 1,
-  CheckboxFontSize: 17,
-  checkboxBgColor: '#039BE5',
-  checkboxSize: 20,
-  checkboxTickColor: '#fff',
-
-  // Color
-  brandPrimary: '#3F51B5',
-  brandInfo: '#62B1F6',
-  brandSuccess: '#5cb85c',
-  brandDanger: '#d9534f',
-  brandWarning: '#f0ad4e',
-  brandDark: '#000',
-  brandLight: '#a9a9a9',
-
-  // Container
-  containerBgColor: '#fff',
-
-  // Date Picker
-  datePickerTextColor: '#000',
-  datePickerBg: 'transparent',
-
-  // FAB
-  fabWidth: 56,
-
-  // Font
-  DefaultFontSize: 16,
-  fontFamily: 'Roboto',
-  fontSizeBase: 15,
-  get fontSizeH1() {
-    return this.fontSizeBase * 1.8;
-  },
-  get fontSizeH2() {
-    return this.fontSizeBase * 1.6;
-  },
-  get fontSizeH3() {
-    return this.fontSizeBase * 1.4;
-  },
-
-  // Footer
-  footerHeight: 55,
-  footerDefaultBg: '#3F51B5',
-  footerPaddingBottom: 0,
-
-  // FooterTab
-  tabBarTextColor: '#bfc6ea',
-  tabBarTextSize: 11,
-  activeTab: '#fff',
-  sTabBarActiveTextColor: '#007aff',
-  tabBarActiveTextColor: '#fff',
-  tabActiveBgColor: '#3F51B5',
-
-  // Header
-  toolbarBtnColor: '#fff',
-  toolbarDefaultBg: '#3F51B5',
-  toolbarHeight: 56,
-  toolbarSearchIconSize: 23,
-  toolbarInputColor: '#fff',
-  searchBarHeight: platform === PLATFORM.IOS ? 30 : 40,
-  searchBarInputHeight: platform === PLATFORM.IOS ? 40 : 50,
-  toolbarBtnTextColor: '#fff',
-  toolbarDefaultBorder: '#3F51B5',
-  iosStatusbar: 'light-content',
-  get statusBarColor() {
-    return color(this.toolbarDefaultBg)
-      .darken(0.2)
-      .hex();
-  },
-  get darkenHeader() {
-    return color(this.tabBgColor)
-      .darken(0.03)
-      .hex();
-  },
-
-  // Icon
-  iconFamily: 'Ionicons',
-  iconFontSize: 28,
-  iconHeaderSize: 24,
-
-  // InputGroup
-  inputFontSize: 17,
-  inputBorderColor: '#D9D5DC',
-  inputSuccessBorderColor: '#2b8339',
-  inputErrorBorderColor: '#ed2f2f',
-  inputHeightBase: 50,
-  get inputColor() {
-    return this.textColor;
-  },
-  get inputColorPlaceholder() {
-    return '#575757';
-  },
-
-  // Line Height
-  buttonLineHeight: 19,
-  lineHeightH1: 32,
-  lineHeightH2: 27,
-  lineHeightH3: 25,
-  lineHeight: 24,
-
-  // List
-  listBg: 'transparent',
-  listBorderColor: '#c9c9c9',
-  listDividerBg: '#f4f4f4',
-  listBtnUnderlayColor: '#DDD',
-  listItemPadding: 12,
-  listNoteColor: '#808080',
-  listNoteSize: 13,
-  listItemSelected: '#3F51B5',
-
-  // Progress Bar
-  defaultProgressColor: '#E4202D',
-  inverseProgressColor: '#1A191B',
-
-  // Radio Button
-  radioBtnSize: 23,
-  radioSelectedColorAndroid: '#3F51B5',
-  radioBtnLineHeight: 24,
-  get radioColor() {
-    return this.brandPrimary;
-  },
-
-  // Segment
-  segmentBackgroundColor: '#3F51B5',
-  segmentActiveBackgroundColor: '#fff',
-  segmentTextColor: '#fff',
-  segmentActiveTextColor: '#3F51B5',
-  segmentBorderColor: '#fff',
-  segmentBorderColorMain: '#3F51B5',
-
-  // Spinner
-  defaultSpinnerColor: '#45D56E',
-  inverseSpinnerColor: '#1A191B',
-
-  // Tab
-  tabDefaultBg: '#3F51B5',
-  topTabBarTextColor: '#b3c7f9',
-  topTabBarActiveTextColor: '#fff',
-  topTabBarBorderColor: '#fff',
-  topTabBarActiveBorderColor: '#fff',
-
-  // Tabs
-  tabBgColor: '#F8F8F8',
-  tabFontSize: 15,
-
-  // Text
-  textColor: '#000',
-  inverseTextColor: '#fff',
-  noteFontSize: 14,
-  get defaultTextColor() {
-    return this.textColor;
-  },
-
-  // Title
-  titleFontfamily: 'Roboto',
-  titleFontSize: 19,
-  subTitleFontSize: 14,
-  subtitleColor: '#FFF',
-  titleFontColor: '#FFF',
-
-  // Other
-  borderRadiusBase: 2,
-  borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
-  contentPadding: 10,
-  dropdownLinkColor: '#414142',
-  inputLineHeight: 24,
-  deviceWidth,
-  deviceHeight,
-  isIphoneX,
-  inputGroupRoundedBorderRadius: 30,
-
-  // iPhoneX SafeArea
-  Inset: {
-    portrait: {
-      topInset: 24,
-      leftInset: 0,
-      rightInset: 0,
-      bottomInset: 34
-    },
-    landscape: {
-      topInset: 0,
-      leftInset: 44,
-      rightInset: 44,
-      bottomInset: 21
-    }
-  }
-};

+ 0 - 334
native-base-theme/variables/platform.js

@@ -1,334 +0,0 @@
-// @flow
-
-import color from 'color';
-import { Platform, Dimensions, PixelRatio } from 'react-native';
-
-import { PLATFORM } from './commonColor';
-
-const deviceHeight = Dimensions.get('window').height;
-const deviceWidth = Dimensions.get('window').width;
-const platform = Platform.OS;
-const platformStyle = undefined;
-const isIphoneX =
-  platform === PLATFORM.IOS &&
-  (deviceHeight === 812 ||
-    deviceWidth === 812 ||
-    deviceHeight === 896 ||
-    deviceWidth === 896);
-
-export default {
-  platformStyle,
-  platform,
-
-  // Accordion
-  accordionBorderColor: '#d3d3d3',
-  accordionContentPadding: 10,
-  accordionIconFontSize: 18,
-  contentStyle: '#f5f4f5',
-  expandedIconStyle: '#000',
-  headerStyle: '#edebed',
-  iconStyle: '#000',
-
-  // ActionSheet
-  elevation: 4,
-  containerTouchableBackgroundColor: 'rgba(0,0,0,0.4)',
-  innerTouchableBackgroundColor: '#fff',
-  listItemHeight: 50,
-  listItemBorderColor: 'transparent',
-  marginHorizontal: -15,
-  marginLeft: 14,
-  marginTop: 15,
-  minHeight: 56,
-  padding: 15,
-  touchableTextColor: '#757575',
-
-  // Android
-  androidRipple: true,
-  androidRippleColor: 'rgba(256, 256, 256, 0.3)',
-  androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',
-  buttonUppercaseAndroidText: true,
-
-  // Badge
-  badgeBg: '#ED1727',
-  badgeColor: '#fff',
-  badgePadding: platform === PLATFORM.IOS ? 3 : 0,
-
-  // Button
-  buttonFontFamily: platform === PLATFORM.IOS ? 'System' : 'Roboto_medium',
-  buttonDisabledBg: '#b5b5b5',
-  buttonPadding: 6,
-  buttonDefaultActiveOpacity: 0.5,
-  buttonDefaultFlex: 1,
-  buttonDefaultBorderRadius: 2,
-  buttonDefaultBorderWidth: 1,
-  get buttonPrimaryBg() {
-    return this.brandPrimary;
-  },
-  get buttonPrimaryColor() {
-    return this.inverseTextColor;
-  },
-  get buttonInfoBg() {
-    return this.brandInfo;
-  },
-  get buttonInfoColor() {
-    return this.inverseTextColor;
-  },
-  get buttonSuccessBg() {
-    return this.brandSuccess;
-  },
-  get buttonSuccessColor() {
-    return this.inverseTextColor;
-  },
-  get buttonDangerBg() {
-    return this.brandDanger;
-  },
-  get buttonDangerColor() {
-    return this.inverseTextColor;
-  },
-  get buttonWarningBg() {
-    return this.brandWarning;
-  },
-  get buttonWarningColor() {
-    return this.inverseTextColor;
-  },
-  get buttonTextSize() {
-    return platform === PLATFORM.IOS
-      ? this.fontSizeBase * 1.1
-      : this.fontSizeBase - 1;
-  },
-  get buttonTextSizeLarge() {
-    return this.fontSizeBase * 1.5;
-  },
-  get buttonTextSizeSmall() {
-    return this.fontSizeBase * 0.8;
-  },
-  get borderRadiusLarge() {
-    return this.fontSizeBase * 3.8;
-  },
-  get iconSizeLarge() {
-    return this.iconFontSize * 1.5;
-  },
-  get iconSizeSmall() {
-    return this.iconFontSize * 0.6;
-  },
-
-  // Card
-  cardDefaultBg: '#fff',
-  cardBorderColor: '#ccc',
-  cardBorderRadius: 2,
-  cardItemPadding: platform === PLATFORM.IOS ? 10 : 12,
-
-  // CheckBox
-  CheckboxRadius: platform === PLATFORM.IOS ? 13 : 0,
-  CheckboxBorderWidth: platform === PLATFORM.IOS ? 1 : 2,
-  CheckboxPaddingLeft: platform === PLATFORM.IOS ? 4 : 2,
-  CheckboxPaddingBottom: platform === PLATFORM.IOS ? 0 : 5,
-  CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16,
-  CheckboxIconMarginTop: platform === PLATFORM.IOS ? undefined : 1,
-  CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17,
-  checkboxBgColor: '#039BE5',
-  checkboxSize: 20,
-  checkboxTickColor: '#fff',
-  checkboxDefaultColor: 'transparent',
-  checkboxTextShadowRadius: 0,
-
-  // Color
-  brandPrimary: platform === PLATFORM.IOS ? '#007aff' : '#3F51B5',
-  brandInfo: '#62B1F6',
-  brandSuccess: '#5cb85c',
-  brandDanger: '#d9534f',
-  brandWarning: '#f0ad4e',
-  brandDark: '#000',
-  brandLight: '#a9a9a9',
-
-  // Container
-  containerBgColor: '#fff',
-
-  // Date Picker
-  datePickerFlex: 1,
-  datePickerPadding: 10,
-  datePickerTextColor: '#000',
-  datePickerBg: 'transparent',
-
-  // FAB
-  fabBackgroundColor: 'blue',
-  fabBorderRadius: 28,
-  fabBottom: 0,
-  fabButtonBorderRadius: 20,
-  fabButtonHeight: 40,
-  fabButtonLeft: 7,
-  fabButtonMarginBottom: 10,
-  fabContainerBottom: 20,
-  fabDefaultPosition: 20,
-  fabElevation: 4,
-  fabIconColor: '#fff',
-  fabIconSize: 24,
-  fabShadowColor: '#000',
-  fabShadowOffsetHeight: 2,
-  fabShadowOffsetWidth: 0,
-  fabShadowOpacity: 0.4,
-  fabShadowRadius: 2,
-  fabWidth: 56,
-
-  // Font
-  DefaultFontSize: 16,
-  fontFamily: platform === PLATFORM.IOS ? 'System' : 'Roboto',
-  fontSizeBase: 15,
-  get fontSizeH1() {
-    return this.fontSizeBase * 1.8;
-  },
-  get fontSizeH2() {
-    return this.fontSizeBase * 1.6;
-  },
-  get fontSizeH3() {
-    return this.fontSizeBase * 1.4;
-  },
-
-  // Footer
-  footerHeight: 55,
-  footerDefaultBg: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  footerPaddingBottom: 0,
-
-  // FooterTab
-  tabBarTextColor: platform === PLATFORM.IOS ? '#6b6b6b' : '#b3c7f9',
-  tabBarTextSize: platform === PLATFORM.IOS ? 14 : 11,
-  activeTab: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  sTabBarActiveTextColor: '#007aff',
-  tabBarActiveTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  tabActiveBgColor: platform === PLATFORM.IOS ? '#cde1f9' : '#3F51B5',
-
-  // Header
-  toolbarBtnColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  toolbarDefaultBg: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  toolbarHeight: platform === PLATFORM.IOS ? 64 : 56,
-  toolbarSearchIconSize: platform === PLATFORM.IOS ? 20 : 23,
-  toolbarInputColor: platform === PLATFORM.IOS ? '#CECDD2' : '#fff',
-  searchBarHeight: platform === PLATFORM.IOS ? 30 : 40,
-  searchBarInputHeight: platform === PLATFORM.IOS ? 30 : 50,
-  toolbarBtnTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  toolbarDefaultBorder: platform === PLATFORM.IOS ? '#a7a6ab' : '#3F51B5',
-  iosStatusbar: platform === PLATFORM.IOS ? 'dark-content' : 'light-content',
-  get statusBarColor() {
-    return color(this.toolbarDefaultBg)
-      .darken(0.2)
-      .hex();
-  },
-  get darkenHeader() {
-    return color(this.tabBgColor)
-      .darken(0.03)
-      .hex();
-  },
-
-  // Icon
-  iconFamily: 'Ionicons',
-  iconFontSize: platform === PLATFORM.IOS ? 30 : 28,
-  iconHeaderSize: platform === PLATFORM.IOS ? 33 : 24,
-
-  // InputGroup
-  inputFontSize: 17,
-  inputBorderColor: '#D9D5DC',
-  inputSuccessBorderColor: '#2b8339',
-  inputErrorBorderColor: '#ed2f2f',
-  inputHeightBase: 50,
-  get inputColor() {
-    return this.textColor;
-  },
-  get inputColorPlaceholder() {
-    return '#575757';
-  },
-
-  // Line Height
-  buttonLineHeight: 19,
-  lineHeightH1: 32,
-  lineHeightH2: 27,
-  lineHeightH3: 25,
-  lineHeight: platform === PLATFORM.IOS ? 20 : 24,
-  listItemSelected: platform === PLATFORM.IOS ? '#007aff' : '#3F51B5',
-
-  // List
-  listBg: 'transparent',
-  listBorderColor: '#c9c9c9',
-  listDividerBg: '#f4f4f4',
-  listBtnUnderlayColor: '#DDD',
-  listItemPadding: platform === PLATFORM.IOS ? 10 : 12,
-  listNoteColor: '#808080',
-  listNoteSize: 13,
-
-  // Progress Bar
-  defaultProgressColor: '#E4202D',
-  inverseProgressColor: '#1A191B',
-
-  // Radio Button
-  radioBtnSize: platform === PLATFORM.IOS ? 25 : 23,
-  radioSelectedColorAndroid: '#3F51B5',
-  radioBtnLineHeight: platform === PLATFORM.IOS ? 29 : 24,
-  get radioColor() {
-    return this.brandPrimary;
-  },
-
-  // Segment
-  segmentBackgroundColor: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  segmentActiveBackgroundColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  segmentTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  segmentActiveTextColor: platform === PLATFORM.IOS ? '#fff' : '#3F51B5',
-  segmentBorderColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  segmentBorderColorMain: platform === PLATFORM.IOS ? '#a7a6ab' : '#3F51B5',
-
-  // Spinner
-  defaultSpinnerColor: '#45D56E',
-  inverseSpinnerColor: '#1A191B',
-
-  // Tab
-  tabBarDisabledTextColor: '#BDBDBD',
-  tabDefaultBg: platform === PLATFORM.IOS ? '#F8F8F8' : '#3F51B5',
-  topTabBarTextColor: platform === PLATFORM.IOS ? '#6b6b6b' : '#b3c7f9',
-  topTabBarActiveTextColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-  topTabBarBorderColor: platform === PLATFORM.IOS ? '#a7a6ab' : '#fff',
-  topTabBarActiveBorderColor: platform === PLATFORM.IOS ? '#007aff' : '#fff',
-
-  // Tabs
-  tabBgColor: '#F8F8F8',
-  tabFontSize: 15,
-
-  // Text
-  textColor: '#000',
-  inverseTextColor: '#fff',
-  noteFontSize: 14,
-  get defaultTextColor() {
-    return this.textColor;
-  },
-
-  // Title
-  titleFontfamily: platform === PLATFORM.IOS ? 'System' : 'Roboto_medium',
-  titleFontSize: platform === PLATFORM.IOS ? 17 : 19,
-  subTitleFontSize: platform === PLATFORM.IOS ? 11 : 14,
-  subtitleColor: platform === PLATFORM.IOS ? '#8e8e93' : '#FFF',
-  titleFontColor: platform === PLATFORM.IOS ? '#000' : '#FFF',
-
-  // Other
-  borderRadiusBase: platform === PLATFORM.IOS ? 5 : 2,
-  borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
-  contentPadding: 10,
-  dropdownLinkColor: '#414142',
-  inputLineHeight: 24,
-  deviceWidth,
-  deviceHeight,
-  isIphoneX,
-  inputGroupRoundedBorderRadius: 30,
-
-  // iPhoneX SafeArea
-  Inset: {
-    portrait: {
-      topInset: 24,
-      leftInset: 0,
-      rightInset: 0,
-      bottomInset: 34
-    },
-    landscape: {
-      topInset: 0,
-      leftInset: 44,
-      rightInset: 44,
-      bottomInset: 21
-    }
-  }
-};

+ 13 - 2
navigation/BaseNavigator.jsx

@@ -33,6 +33,15 @@ import Rule from '../screens/User/RuleScreen';
 import EditAddress from '../screens/Address/EditAddressScreen';
 import AddressScreen from '../screens/Address/AddressScreen';
 
+// 首页选地址
+import HomeAddress from '../screens/Main/AddressScreen';
+// 搜索地图
+import SearchMap from '../screens/Main/SearchMapScreen';
+// 搜索地图
+import MapScreen from '../screens/Map/MapScreen';
+// 搜索地图
+import MapMarkScreen from '../screens/Map/MapMarkScreen';
+
 export default function BasicScreens(Screen) {
   return (
     <>
@@ -62,7 +71,6 @@ export default function BasicScreens(Screen) {
       <Screen name="OrderCoupon" component={OrderCoupon} />
       {/* 订单备注 */}
       <Screen name="OrderMessage" component={OrderMessage} />
-
       {/* ****************************订单******************************** */}
       {/* 订单详情 */}
       <Screen
@@ -99,10 +107,13 @@ export default function BasicScreens(Screen) {
       <Screen name="AppSetting" component={AppSetting} />
       {/* 隐私政策 */}
       <Screen name="Rule" component={Rule} />
-
       <Screen name="Address" component={AddressScreen} />
       {/* 编辑address */}
       <Screen name="EditAddress" component={EditAddress} />
+      <Screen name="HomeAddress" component={HomeAddress} />
+      <Screen name="SearchMap" component={SearchMap} />
+      <Screen name="MapScreen" component={MapScreen} />
+      <Screen name="MapMarkScreen" component={MapMarkScreen} />
     </>
   );
 }

+ 1 - 1
navigation/BottomTabNavigator.jsx

@@ -10,7 +10,7 @@ const BottomTab = createBottomTabNavigator();
 
 export default function BottomTabNavigator() {
   return (
-    <BottomTab.Navigator initialRouteName="Home">
+    <BottomTab.Navigator initialRouteName="Order">
       <BottomTab.Screen
         name="Home"
         component={HomeScreen}

File diff ditekan karena terlalu besar
+ 486 - 454
package-lock.json


+ 30 - 25
package.json

@@ -17,9 +17,9 @@
     "@babel/polyfill": "^7.10.1",
     "@expo/vector-icons": "^10.0.0",
     "@react-native-community/blur": "^3.6.0",
-    "@react-native-community/datetimepicker": "2.2.2",
-    "@react-native-community/masked-view": "0.1.6",
-    "@react-native-community/netinfo": "5.5.1",
+    "@react-native-community/datetimepicker": "2.4.0",
+    "@react-native-community/masked-view": "0.1.10",
+    "@react-native-community/netinfo": "5.9.2",
     "@react-navigation/bottom-tabs": "^5.3.1",
     "@react-navigation/material-top-tabs": "^5.2.9",
     "@react-navigation/native": "^5.2.1",
@@ -29,43 +29,48 @@
     "acorn": "^7.2.0",
     "axios": "^0.19.2",
     "color": "^3.1.2",
-    "expo": "^37.0.0",
-    "expo-asset": "~8.1.5",
-    "expo-constants": "~9.0.0",
-    "expo-file-system": "~8.1.0",
-    "expo-font": "~8.1.0",
-    "expo-image-picker": "~8.1.0",
-    "expo-linking": "~1.0.1",
-    "expo-localization": "~8.1.0",
-    "expo-splash-screen": "^0.2.3",
+    "core-js": "^3.6.5",
+    "expo": "^38.0.8",
+    "expo-application": "~2.2.1",
+    "expo-asset": "~8.1.7",
+    "expo-constants": "~9.1.1",
+    "expo-file-system": "~9.0.1",
+    "expo-font": "~8.2.1",
+    "expo-image-picker": "~8.3.0",
+    "expo-linking": "^1.0.3",
+    "expo-localization": "~8.2.1",
+    "expo-location": "~8.2.1",
+    "expo-permissions": "~9.0.1",
+    "expo-splash-screen": "^0.3.1",
     "expo-status-bar": "^1.0.0",
-    "expo-web-browser": "~8.2.1",
+    "expo-task-manager": "~8.3.0",
+    "expo-web-browser": "~8.3.1",
     "flooks": "^3.0.0",
     "i18n-js": "^3.7.0",
     "mockjs": "^1.1.0",
     "moment": "^2.26.0",
     "native-base": "^2.13.12",
     "qs": "^6.9.4",
-    "react": "16.9.0",
-    "react-dom": "16.9.0",
-    "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
+    "react": "16.11.0",
+    "react-dom": "16.11.0",
+    "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
     "react-native-animatable": "^1.3.3",
     "react-native-animation-hooks": "^1.0.1",
     "react-native-gesture-handler": "~1.6.0",
     "react-native-magnus": "^1.0.39",
     "react-native-modal": "^11.5.6",
     "react-native-paper": "^3.10.1",
-    "react-native-reanimated": "~1.7.0",
-    "react-native-safe-area-context": "0.7.3",
-    "react-native-screens": "~2.2.0",
+    "react-native-reanimated": "~1.9.0",
+    "react-native-safe-area-context": "~3.0.7",
+    "react-native-screens": "~2.9.0",
     "react-native-sticky-parallax-header": "^0.2.1",
-    "react-native-svg": "11.0.1",
+    "react-native-svg": "12.1.0",
     "react-native-tab-view": "^2.14.2",
     "react-native-ui-lib": "^5.8.1",
     "react-native-vector-icons": "^6.6.0",
-    "react-native-web": "^0.11.7",
-    "umi-request": "^1.3.3",
-    "expo-application": "~2.1.0"
+    "react-native-web": "~0.11.7",
+    "umi-request": "^1.3.5",
+    "react-native-webview": "9.4.0"
   },
   "devDependencies": {
     "@babel/cli": "^7.10.1",
@@ -76,7 +81,7 @@
     "babel-eslint": "^10.1.0",
     "babel-loader": "^8.1.0",
     "babel-plugin-import": "^1.13.0",
-    "babel-preset-expo": "^8.1.0",
+    "babel-preset-expo": "^8.2.3",
     "eslint": "^6.8.0",
     "eslint-config-airbnb": "^18.1.0",
     "eslint-config-prettier": "^6.11.0",
@@ -87,7 +92,7 @@
     "eslint-plugin-react": "^7.20.0",
     "eslint-plugin-react-hooks": "^2.5.1",
     "eslint-plugin-react-native": "^3.8.1",
-    "jest-expo": "^37.0.0",
+    "jest-expo": "^38.0.0",
     "metro-react-native-babel-preset": "^0.59.0",
     "prettier": "2.0.5"
   },

+ 128 - 0
screens/Address/HomeAddressCom.jsx

@@ -0,0 +1,128 @@
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { StyleSheet, View } from 'react-native';
+import { Div, Button, Select, Image, Text, Avatar } from 'react-native-magnus';
+import { ScrollView } from 'react-native-gesture-handler';
+import { Modal, Portal, TouchableRipple, Badge } from 'react-native-paper';
+import Icon from 'react-native-vector-icons/FontAwesome';
+
+import { useRequest, useCreation, useUnmount } from '@umijs/hooks';
+import { useNavigation, useFocusEffect } from '@react-navigation/native';
+import useModel from 'flooks';
+import AddressModel from './model'; // detail模块通用方法
+
+const AddressItem = ({ info, editEvent, isChoose, leftEvent }) => {
+  return (
+    <>
+      <Div row alignItems="center" py={15}>
+        <Div flex={1} mx={15}>
+          <Text fontSize="sm" textAlign="left">
+            {info.addressName}
+          </Text>
+          <Text fontSize="sm" color="gray300" textAlign="left">
+            {info.number}
+          </Text>
+          <Div row>
+            <Text fontSize="sm" color="gray300" textAlign="left">
+              {info.name}
+            </Text>
+            <Text fontSize="sm" color="gray300" textAlign="left">
+              ({info.sex})
+            </Text>
+            <Text ml={15} fontSize="sm" color="gray300" textAlign="left">
+              {info.phone}
+            </Text>
+          </Div>
+        </Div>
+      </Div>
+
+      <Div h={1} bg="gray200" />
+    </>
+  );
+};
+
+export default function HomeAddressCom() {
+  const {
+    addressList,
+    getAddressList,
+    goEdit,
+    setShow,
+    chooseAddressId,
+    setChoose,
+  } = useModel(AddressModel, ['addressList', 'goEdit', 'chooseAddressId']);
+
+  useRequest(getAddressList);
+
+  const navigation = useNavigation();
+
+  useUnmount(() => {
+    setShow(false);
+  });
+
+  const chooseaddressInfo = useCreation(() => {
+    if (chooseAddressId) {
+      return addressList.find((item) => {
+        return item.id === chooseAddressId;
+      });
+    } else {
+      return {};
+    }
+  }, [chooseAddressId, addressList]);
+
+  return (
+    <>
+      <Div bg="white" px={15} pb={15}>
+        <Div h={1} bg="gray200" />
+        <Text py={12} fontSize="sm" color="gray500">
+          收货地址
+        </Text>
+        <Div h={1} bg="gray200" />
+        {addressList.map((item) => {
+          return (
+            <AddressItem
+              key={item.id}
+              info={item}
+              isChoose={chooseAddressId === item.id}
+              leftEvent={() => {
+                setChoose(item.id);
+                setvisible(false);
+                setShow(false);
+              }}
+              editEvent={() => {
+                setvisible(false);
+                navigation.navigate('EditAddress', { id: item.id });
+                setShow(true);
+              }}
+            />
+          );
+        })}
+
+        {addressList.length === 0 && (
+          <>
+            <Div p={20}>
+              <Text color="gray300" textAlign="center">
+                当前暂无地址
+              </Text>
+            </Div>
+            <Div h={1} bg="gray200" />
+          </>
+        )}
+
+        <Button
+          block
+          textAlign="left"
+          px={0}
+          bg="hide"
+          py={15}
+          onPress={() => {
+            navigation.navigate('EditAddress');
+          }}
+        >
+          <Text flex={1} color="brand500">
+            新增地址
+          </Text>
+        </Button>
+      </Div>
+    </>
+  );
+}

+ 105 - 0
screens/Main/AddressScreen.jsx

@@ -0,0 +1,105 @@
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { StatusBar } from 'expo-status-bar';
+import { Div, Button, Image, Text, Avatar, Icon } from 'react-native-magnus';
+import { Appbar } from 'react-native-paper';
+import { ScrollView } from 'react-native-gesture-handler';
+
+import useModel from 'flooks';
+import HomeModel from './Home/model';
+import HomeAddressCom from '../Address/HomeAddressCom';
+
+export default function AddressScreen({ navigation }) {
+  const { addressName, locationEvent, changeChooseMap } = useModel(HomeModel);
+
+  return (
+    <>
+      <Div bg="white" pb={10} borderBottomWidth={1} borderColor="gray200">
+        <StatusBar backgroundColor="#fff" style="dark" translucent />
+
+        <Appbar.Header
+          theme={{ colors: { primary: '#fff' } }}
+          style={{
+            elevation: 0,
+            shadowOffset: {
+              width: 0,
+              height: 0,
+            },
+            shadowOpacity: 0,
+            zIndex: 2,
+          }}
+        >
+          <Appbar.BackAction onPress={navigation.goBack} />
+          <Appbar.Content
+            title="选择收货地址"
+            titleStyle={{ textAlign: 'center', fontSize: 16 }}
+          />
+          <Button alignSelf="center" bg="hide" color="brand500" px={20}>
+            管理
+          </Button>
+        </Appbar.Header>
+
+        <Button
+          rounded="circle"
+          block
+          bg="gray200"
+          mx={15}
+          mt={10}
+          onPress={() => navigation.navigate('SearchMap')}
+        >
+          <Div row alignItems="center">
+            <Icon name="search1" color="gray500" />
+            <Text color="gray500" fontSize="xs">
+              小区/写字楼/学校 等
+            </Text>
+          </Div>
+        </Button>
+      </Div>
+      <ScrollView
+        contentContainerStyle={{
+          flexGrow: 1,
+          backgroundColor: '#fff',
+        }}
+      >
+        <Div px={15} py={10}>
+          <Text color="gray500" fontSize="sm">
+            当前定位
+          </Text>
+          <Div row>
+            <Button
+              onPress={() => {
+                navigation.navigate('Home');
+                changeChooseMap('location');
+              }}
+              block
+              bg="hiden"
+              p={0}
+              flex={1}
+            >
+              <Div flex={1} row>
+                <Icon name="navigation" color="brand500" fontFamily="Feather" />
+                <Text
+                  numberOfLines={1}
+                  ellipsizeMode="tail"
+                  fontSize="xl"
+                  ml={5}
+                  fontWeight="bold"
+                  flex={1}
+                >
+                  {locationEvent.loading
+                    ? '加载中...'
+                    : addressName || '定位失败'}
+                </Text>
+              </Div>
+            </Button>
+            <Button onPress={locationEvent} bg="hiden" color="brand500">
+              重新定位
+            </Button>
+          </Div>
+        </Div>
+
+        <HomeAddressCom />
+      </ScrollView>
+    </>
+  );
+}

+ 90 - 0
screens/Main/Home/HomeHeader.js

@@ -0,0 +1,90 @@
+import * as React from 'react';
+import { StatusBar } from 'expo-status-bar';
+import { Appbar, Menu } from 'react-native-paper';
+import { useBoolean } from '@umijs/hooks';
+import { Icon, Text, Button, Div } from 'react-native-magnus';
+
+import useModel from 'flooks';
+import { useNavigation } from '@react-navigation/native';
+import words from '../../../flooks/Words';
+import user from '../../../flooks/User';
+import HomeModel from './model';
+
+export default function Header() {
+  const { state, setTrue, setFalse } = useBoolean(false);
+  const { setlocal, TchangeToth, TchangeToChinese, local } = useModel(words);
+
+  const { logout } = useModel(user, []);
+  const { addressName, locationEvent } = useModel(HomeModel);
+
+  const navigation = useNavigation();
+
+  return (
+    <>
+      <StatusBar backgroundColor="transparent" style="dark" translucent />
+
+      <Appbar.Header
+        statusBarHeight={0}
+        theme={{ colors: { primary: '#fff' } }}
+        style={{
+          elevation: 0,
+          shadowOffset: {
+            width: 0,
+            height: 0,
+          },
+          shadowOpacity: 0,
+          zIndex: 2,
+        }}
+      >
+        <Button
+          onPress={() => navigation.navigate('HomeAddress')}
+          block
+          bg="hiden"
+          p={0}
+          flex={1}
+        >
+          <Div flex={1} row>
+            <Icon
+              name="navigation"
+              color="brand500"
+              fontFamily="Feather"
+              ml={15}
+            />
+            <Text
+              numberOfLines={2}
+              ellipsizeMode="tail"
+              fontSize="xl"
+              ml={5}
+              fontWeight="bold"
+              flex={1}
+            >
+              {locationEvent.loading ? '加载中...' : addressName}
+            </Text>
+          </Div>
+        </Button>
+
+        <Menu
+          visible={state}
+          onDismiss={setFalse}
+          anchor={<Appbar.Action icon="dots-vertical" onPress={setTrue} />}
+        >
+          <Menu.Item
+            onPress={() => {
+              setFalse();
+              navigation.navigate('MapScreen');
+            }}
+            title="地图选点测试"
+          />
+          <Menu.Item onPress={logout} title="退出登录" />
+          <Menu.Item
+            onPress={() => {
+              setlocal();
+            }}
+            title={local ? TchangeToChinese : TchangeToth}
+          />
+          <Menu.Item onPress={() => {}} title="版本06.28.1" />
+        </Menu>
+      </Appbar.Header>
+    </>
+  );
+}

+ 4 - 73
screens/Main/Home/List.jsx

@@ -2,23 +2,13 @@ import * as WebBrowser from 'expo-web-browser';
 import * as React from 'react';
 import { StyleSheet, View } from 'react-native';
 import { WingBlank, Flex } from '@ant-design/react-native';
+import { Div, Button } from 'react-native-magnus';
 import { Menu } from 'react-native-paper';
 import { useBoolean } from '@umijs/hooks';
 import useModel from 'flooks';
-import Button from '../../../components/Button';
 import MerchantCom from './MerchantCom';
 import HomeModel from './model';
 
-const firstMenus = new Map([
-  ['综合排序', { id: 1 }],
-  ['好评优先', { id: 2 }],
-  ['起送价最低', { id: 3 }],
-  ['配送最快', { id: 4 }],
-  ['配送费最低', { id: 5 }],
-  ['人均从低到高', { id: 6 }],
-  ['人均从高到低', { id: 7 }],
-  ['通用排序', { id: 8 }],
-]);
 export default function List() {
   const firstSortMenu = useBoolean(false);
   const { list, page, size, finish, loading, getData } = useModel(HomeModel);
@@ -47,67 +37,8 @@ export default function List() {
   };
 
   return (
-    <WingBlank>
-      <Flex>
-        <Button text size="large" left onPress={() => {}}>
-          推荐商家
-        </Button>
-        {/* <View style={{ width: 33 }} /> */}
-        <Button text size="large" fontColor="#000" left onPress={() => {}}>
-          发现美食
-        </Button>
-      </Flex>
-
-      <Flex>
-        <Menu
-          visible={firstSortMenu.state}
-          onDismiss={firstSortMenu.setFalse}
-          anchor={
-            <Button
-              text
-              size="small"
-              fontColor="#000"
-              left
-              onPress={firstSortMenu.setTrue}
-            >
-              综合排序
-            </Button>
-          }
-        >
-          {menuMap(firstMenus)}
-        </Menu>
-        <Button
-          text
-          size="small"
-          fontColor="#000"
-          left
-          onPress={firstSortMenu.setTrue}
-        >
-          距离
-        </Button>
-        <Button
-          text
-          size="small"
-          fontColor="#000"
-          left
-          onPress={firstSortMenu.setTrue}
-        >
-          销量
-        </Button>
-        <Button
-          text
-          size="small"
-          fontColor="#000"
-          left
-          onPress={firstSortMenu.setTrue}
-        >
-          筛选
-        </Button>
-      </Flex>
-
-      <View>{MerchantComList(list)}</View>
-    </WingBlank>
+    <Div py={15} zIndex={1}>
+      {MerchantComList(list)}
+    </Div>
   );
 }
-
-const styles = StyleSheet.create({});

+ 83 - 0
screens/Main/Home/ListTop.jsx

@@ -0,0 +1,83 @@
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { StyleSheet, Animated, UIManager, findNodeHandle } from 'react-native';
+import Constants from 'expo-constants';
+import { Div, Button } from 'react-native-magnus';
+import { Menu } from 'react-native-paper';
+import { useBoolean, useDebounceFn } from '@umijs/hooks';
+import useModel from 'flooks';
+import MerchantCom from './MerchantCom';
+import HomeModel from './model';
+
+const firstMenus = new Map([
+  ['综合排序', { id: 1 }],
+  ['好评优先', { id: 2 }],
+  ['起送价最低', { id: 3 }],
+  ['配送最快', { id: 4 }],
+  ['配送费最低', { id: 5 }],
+  ['人均从低到高', { id: 6 }],
+  ['人均从高到低', { id: 7 }],
+  ['通用排序', { id: 8 }],
+]);
+export default function List({ animatedScrollYValue, tabBox }) {
+  const firstSortMenu = useBoolean(false);
+  const {
+    list,
+    page,
+    size,
+    finish,
+    loading,
+    getData,
+    loadingTop,
+  } = useModel(HomeModel, ['loadingTop']);
+  const [top, setTop] = React.useState(200);
+  const translateY = animatedScrollYValue.interpolate({
+    inputRange: [-1, 0, top, top + 1],
+    outputRange: [0, 0, 0, 1],
+  });
+
+  const { run } = useDebounceFn(() => {
+    UIManager.measure(
+      findNodeHandle(tabBox.current),
+      (x, y, width, height, pageX, pageY) => {
+        let scrollTop = pageY - 48 - Constants.statusBarHeight;
+        setTop(scrollTop);
+      }
+    );
+  }, 500);
+
+  React.useEffect(() => {
+    if (tabBox.current) {
+      run();
+    } else {
+      setTop(200);
+    }
+  }, [tabBox, loadingTop]);
+
+  return (
+    <Animated.View style={{ zIndex: 100, transform: [{ translateY }] }}>
+      <Div row bg="white">
+        <Button
+          bg="hide"
+          fontSize="xl"
+          px={10}
+          color="brand500"
+          onPress={() => {}}
+        >
+          推荐商家
+        </Button>
+        {/* <View style={{ width: 33 }} /> */}
+        <Button
+          bg="hide"
+          fontSize="xl"
+          color="gray600"
+          px={10}
+          mx={10}
+          onPress={() => {}}
+        >
+          发现美食
+        </Button>
+      </Div>
+    </Animated.View>
+  );
+}

+ 1 - 1
screens/Main/Home/MerchantCom.jsx

@@ -72,7 +72,7 @@ export default function MerchantCom(props) {
             h={67}
             bg="gray200"
             rounded="sm"
-            source={{ uri: logo }}
+            source={{ uri: logo || '' }}
           />
           <Div
             flex={1}

+ 13 - 13
screens/Main/Home/SpecialArea.jsx

@@ -2,11 +2,11 @@ import * as WebBrowser from 'expo-web-browser';
 import * as React from 'react';
 import { StyleSheet } from 'react-native';
 import { Flex, WingBlank } from '@ant-design/react-native';
+import { Div, Button, Text } from 'react-native-magnus';
 import { useNavigation } from '@react-navigation/native';
 import { Card } from 'react-native-paper';
 import useModel from 'flooks';
 import HomeModel from './model';
-import Text from '../../../components/Text';
 import CountDown from '../../../components/CountDown ';
 
 // 优惠专区
@@ -18,8 +18,9 @@ export default function SpecialArea() {
     return list.map((item) => {
       const merchant = item.merchant || {};
       return (
-        <Flex.Item key={item.id} style={{ paddingHorizontal: 1.5 }}>
+        <Div key={item.id} flex={1} mx={1.5} maxW="50%">
           <Card
+            key={item.id}
             onPress={() => {
               navigation.navigate('MerchantDetail', {
                 merchantId: item.merchantId,
@@ -45,7 +46,7 @@ export default function SpecialArea() {
               </Text>
             </Card.Content>
           </Card>
-        </Flex.Item>
+        </Div>
       );
     });
   };
@@ -54,7 +55,7 @@ export default function SpecialArea() {
     return list.map((item) => {
       const merchant = item.merchant || {};
       return (
-        <Flex.Item key={item.id} style={{ paddingHorizontal: 1.5 }}>
+        <Div key={item.id} flex={1} mx={1.5} maxW="25%">
           <Card
             onPress={() => {
               navigation.navigate('MerchantDetail', {
@@ -71,21 +72,20 @@ export default function SpecialArea() {
               <Text size="c2">{merchant.name}</Text>
             </Card.Content>
           </Card>
-        </Flex.Item>
+        </Div>
       );
     });
   };
   return (
     <>
-      <WingBlank style={{ marginTop: 10, marginBottom: 5 }}>
-        <Text size="s1" bold>
+      <Div bg="white" px={15}>
+        <Text fontSize="xl" fontWeight="bold" py={5}>
           优惠专区
         </Text>
-        <Flex style={styles.content}>{promote1Card(promote1)}</Flex>
-        <Flex style={styles.content2}>{promote2Card(promote2)}</Flex>
-      </WingBlank>
-      <WingBlank style={{ marginTop: 15, marginBottom: 5 }}>
-        <Text size="s1" bold>
+        <Div row>{promote1Card(promote1)}</Div>
+        <Div row>{promote2Card(promote2)}</Div>
+
+        <Text fontSize="xl" fontWeight="bold" py={5}>
           优惠专区
         </Text>
 
@@ -94,7 +94,7 @@ export default function SpecialArea() {
           resizeMode="cover"
           source={{ uri: timeTag.icon }}
         />
-      </WingBlank>
+      </Div>
     </>
   );
 }

+ 21 - 3
screens/Main/Home/model.js

@@ -1,5 +1,6 @@
 import request from '../../../Utils/RequestUtils';
 import Toast from '../../../flooks/Toast';
+import { getLocation } from '../../../Utils/MapUtils';
 
 const HomeModel = (now) => ({
   bannerList: [],
@@ -13,6 +14,9 @@ const HomeModel = (now) => ({
   size: 20,
   finish: false,
   loading: false,
+  location: {},
+  addressName: '',
+  loadingTop: true,
   initHome() {
     now({
       bannerList: [],
@@ -21,10 +25,14 @@ const HomeModel = (now) => ({
       promote1: [],
       promote2: [],
       timeTag: {},
+      loadingTop: true,
     });
-    return request
-      .get('/merchant/index', {
-        params: { latitude: '1', longitude: '1' },
+    const { locationEvent } = now();
+    locationEvent()
+      .then((res) => {
+        return request.get('/merchant/index', {
+          params: { latitude: res.lat, longitude: res.lng },
+        });
       })
       .then((res) => {
         now({
@@ -34,9 +42,16 @@ const HomeModel = (now) => ({
           promote1: res.promote1.slice(0, 2),
           promote2: res.promote2.slice(0, 4),
           timeTag: res.timeTag,
+          loadingTop: false,
         });
       });
   },
+  locationEvent() {
+    return getLocation().then((res) => {
+      now({ location: res, addressName: res.addressName });
+      return Promise.resolve(res);
+    });
+  },
   getData() {
     const { page, size, list } = now();
     now({
@@ -69,6 +84,9 @@ const HomeModel = (now) => ({
         warnning(e.error);
       });
   },
+  changeChooseMap(info) {
+    console.log(info);
+  },
 });
 
 export default HomeModel;

+ 56 - 22
screens/Main/HomeScreen.jsx

@@ -1,50 +1,84 @@
+/* eslint-disable react/style-prop-object */
 import * as WebBrowser from 'expo-web-browser';
 import * as React from 'react';
-import { StyleSheet, View } from 'react-native';
+import { StyleSheet, View, Animated } from 'react-native';
 import { ScrollView } from 'react-native-gesture-handler';
-import { StatusBar } from 'expo-status-bar';
-import { WingBlank } from '@ant-design/react-native';
-import { Div } from 'react-native-magnus';
+import { Div, Button } from 'react-native-magnus';
 import { FAB } from 'react-native-paper';
+import Constants from 'expo-constants';
 import useModel from 'flooks';
-import { useMount, useToggle } from '@umijs/hooks';
-import Button from '../../components/Button';
-import Header from '../../components/HomeHeader';
-import Text from '../../components/Text';
+import { useMount } from '@umijs/hooks';
+import { useAnimation } from 'react-native-animation-hooks';
+
+import Header from './Home/HomeHeader';
 import Banner from './Home/Banner';
 import MenuCom from './Home/Menu';
 import List from './Home/List';
+import ListTop from './Home/ListTop';
 import RecommendStore from './Home/RecommendStore';
 import SpecialArea from './Home/SpecialArea';
 import HomeModel from './Home/model';
 import Icon from '../../components/SvgIcon';
 
-export default function HomeScreen() {
-  const { initHome } = useModel(HomeModel, []);
+export default function HomeScreen({ navigation }) {
+  const { initHome } = useModel(HomeModel);
 
+  const animatedScrollYValue = React.useRef(new Animated.Value(0)).current;
   useMount(() => {
     initHome();
   });
 
+
+  const tabBox = React.createRef();
+
   return (
     <>
-      <StatusBar backgroundColor="transparent" style="dark" translucent />
-      <ScrollView contentContainerStyle={styles.container}>
+      <Div h={Constants.statusBarHeight} bg="white" />
+
+      <Animated.ScrollView
+        contentContainerStyle={styles.container}
+        scrollEventThrottle={16}
+        onScroll={
+          Animated.event(
+            [
+              {
+                nativeEvent: {
+                  contentOffset: { y: animatedScrollYValue },
+                }, // 记录滑动距离
+              },
+            ],
+            { useNativeDriver: true }
+          ) // 使用原生动画驱动}
+        }
+        stickyHeaderIndices={[1]}
+      >
         <Header />
-        <WingBlank>
-          <Button block size="small" type="info" onPress={() => {}}>
+
+        <Div bg="white">
+          <Button
+            bg="gray200"
+            color="gray500"
+            block
+            fontSize="xs"
+            mx={15}
+            my={10}
+            onPress={() => navigation.navigate('HomeAddress')}
+          >
             搜索
           </Button>
-        </WingBlank>
-
-        <View style={styles.main}>
-          <Banner />
-          <MenuCom />
-          <SpecialArea />
-          <RecommendStore />
+        </Div>
+        <Banner />
+        <MenuCom />
+        <SpecialArea />
+        <RecommendStore />
+        <View style={{ zIndex: 100 }} ref={tabBox}>
+          <ListTop
+            animatedScrollYValue={animatedScrollYValue}
+            tabBox={tabBox}
+          />
         </View>
         <List />
-      </ScrollView>
+      </Animated.ScrollView>
       <FAB
         style={styles.fab}
         icon={({ size }) => (

+ 126 - 0
screens/Main/SearchMapScreen.jsx

@@ -0,0 +1,126 @@
+/* eslint-disable no-underscore-dangle */
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { StatusBar } from 'expo-status-bar';
+import {
+  Div,
+  Button,
+  Image,
+  Text,
+  Avatar,
+  Icon,
+  Input,
+} from 'react-native-magnus';
+import { Appbar } from 'react-native-paper';
+import { ScrollView } from 'react-native-gesture-handler';
+
+import useModel from 'flooks';
+import HomeModel from './Home/model';
+import { getSearch } from '../../Utils/MapUtils';
+
+export default function SearchMapScreen({ navigation }) {
+  const { changeChooseMap } = useModel(HomeModel, []);
+
+  const [points, setPoints] = React.useState([]);
+
+  return (
+    <>
+      <Div bg="white" pb={10} borderBottomWidth={1} borderColor="gray200">
+        <StatusBar backgroundColor="#fff" style="dark" translucent />
+
+        <Appbar.Header
+          theme={{ colors: { primary: '#fff' } }}
+          style={{
+            elevation: 0,
+            shadowOffset: {
+              width: 0,
+              height: 0,
+            },
+            shadowOpacity: 0,
+            zIndex: 2,
+          }}
+        >
+          <Appbar.BackAction onPress={navigation.goBack} />
+          <Appbar.Content
+            title="选择收货地址"
+            titleStyle={{ textAlign: 'center', fontSize: 16 }}
+          />
+          <Div w={56} h={56} />
+        </Appbar.Header>
+
+        <Div
+          row
+          rounded="circle"
+          block
+          bg="gray200"
+          mx={15}
+          mt={10}
+          alignItems="center"
+          px={10}
+        >
+          <Text>南京市</Text>
+          <Input
+            placeholder="小区/写字楼/学校 等"
+            p={10}
+            focusBorderColor="gray200"
+            bg="gray200"
+            fontSize="xs"
+            prefix={<Icon name="search" color="gray300" fontFamily="Feather" />}
+            onChangeText={(val) => {
+              getSearch(val, 'nearby(31.983908,118.730357,10000)').then(
+                (res) => {
+                  setPoints(res.pois);
+                }
+              );
+            }}
+          />
+        </Div>
+      </Div>
+      <ScrollView
+        contentContainerStyle={{
+          flexGrow: 1,
+          backgroundColor: '#fff',
+        }}
+      >
+        <Div px={15}>
+          {points.map((item) => {
+            return (
+              <AddressItem
+                info={item}
+                key={item.id}
+                onPress={() => {
+                  navigation.navigate('Home');
+                  changeChooseMap(item);
+                }}
+              />
+            );
+          })}
+        </Div>
+      </ScrollView>
+    </>
+  );
+}
+
+function AddressItem({ info, onPress }) {
+  const distance =
+    info._distance > 1000
+      ? `${(info._distance / 1000).toFixed(2)}km`
+      : `${info._distance}m`;
+  return (
+    <Button bg="hide" block p={0} onPress={onPress}>
+      <Div borderBottomWidth={1} borderColor="gray200" py={5} flex={1}>
+        <Div row alignItems="center">
+          <Text fontSize="xl" flex={1} fontWeight="bold">
+            {info.title}
+          </Text>
+          <Text fontSize="sm" color="gray300">
+            {distance}
+          </Text>
+        </Div>
+        <Text fontSize="sm" color="gray300" mt={5}>
+          {info.address}
+        </Text>
+      </Div>
+    </Button>
+  );
+}

+ 89 - 0
screens/Map/MapMarkImg.jsx

@@ -0,0 +1,89 @@
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { Div, Image, Text } from 'react-native-magnus';
+import useModel from 'flooks';
+import { useRequest, useCreation } from '@umijs/hooks';
+import MapModel from './model'; // detail模块通用方法
+
+export default function MapMarkImg({ imgType, info, label }) {
+  const { personImg, merchatImg, riderImg } = useModel(MapModel, []);
+  const { merchant } = info;
+  const persoMark = `markers=icon:${personImg}%7C31.982155,118.734716`;
+  const merchatMark = `markers=icon:${merchatImg}%7C${merchant.latitude},${merchant.longitude}`;
+  const riderMark = `markers=icon:${riderImg}%7C31.981746,118.734661`;
+
+  const markers = useCreation(() => {
+    const str = '';
+    let list = [];
+    switch (imgType) {
+      case 'rider':
+        list.push(riderMark);
+        list.push(merchatMark);
+        list.push(persoMark);
+        break;
+      case 'merchant':
+        list.push(merchatMark);
+        list.push(riderMark);
+        list.push(persoMark);
+        break;
+      default:
+        list.push(persoMark);
+        list.push(riderMark);
+        list.push(merchatMark);
+        break;
+    }
+    list = list.filter((item) => {
+      return !!item;
+    });
+
+    return list.length > 0 ? `&${list.join('&')}` : str;
+  }, [persoMark, merchatMark, riderMark, info, imgType]);
+
+  const center = useCreation(() => {
+    let str = '';
+    switch (imgType) {
+      case 'rider':
+        str = '31.982155,118.734716';
+        break;
+      case 'merchant':
+        str = `${merchant.latitude},${merchant.longitude}`;
+        break;
+      default:
+        str = `${merchant.latitude},${merchant.longitude}`;
+        break;
+    }
+
+    return str;
+  }, [persoMark, merchatMark, riderMark, info, imgType]);
+
+  return (
+    <>
+      <Div>
+        {imgType != null && (
+          <>
+            <Div
+              position="absolute"
+              left={0}
+              right={0}
+              top={10}
+              zIndex={2}
+              row
+              justifyContent="center"
+            >
+              <Text bg="brand500" color="white" px={10} py={5} rounded="sm">
+                {label}
+              </Text>
+            </Div>
+            <Image
+              zIndex={1}
+              h={200}
+              source={{
+                uri: `https://apis.map.qq.com/ws/staticmap/v2/?center=${center}&zoom=18&size=939*600&maptype=roadmap${markers}&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K`,
+              }}
+            />
+          </>
+        )}
+      </Div>
+    </>
+  );
+}

+ 38 - 0
screens/Map/MapMarkScreen.jsx

@@ -0,0 +1,38 @@
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { StatusBar } from 'expo-status-bar';
+import {
+  Div,
+  Button,
+  Image,
+  Text,
+  Avatar,
+  Icon,
+  Input,
+} from 'react-native-magnus';
+import { Appbar } from 'react-native-paper';
+import { ScrollView } from 'react-native-gesture-handler';
+import { WebView } from 'react-native-webview';
+
+import useModel from 'flooks';
+import MapModel from './model'; // detail模块通用方法
+
+import Header from '../../components/Header';
+
+import { alert } from '../../Utils/TotastUtils';
+
+export default function MapMarkScreen() {
+  const { personImg, merchatImg, riderImg } = useModel(MapModel, []);
+  return (
+    <>
+      <Div bg="white">
+        <Image
+          h={200}
+          source={{
+            uri: `https://apis.map.qq.com/ws/staticmap/v2/?center=31.981746,118.734661&zoom=18&size=939*600&maptype=roadmap&markers=icon:${personImg}%7C31.981746,118.734661&markers=icon:${merchatImg}%7C31.982155,118.734716&markers=icon:${riderImg}%7C31.981746,118.734661&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K`,
+          }}
+        />
+      </Div>
+    </>
+  );
+}

+ 251 - 0
screens/Map/MapScreen.jsx

@@ -0,0 +1,251 @@
+import * as WebBrowser from 'expo-web-browser';
+import * as React from 'react';
+import { StatusBar } from 'expo-status-bar';
+import {
+  Div,
+  Button,
+  Image,
+  Text,
+  Avatar,
+  Icon,
+  Input,
+} from 'react-native-magnus';
+import { Appbar } from 'react-native-paper';
+import { ScrollView } from 'react-native-gesture-handler';
+import { WebView } from 'react-native-webview';
+
+import useModel from 'flooks';
+import User from '../../flooks/User'; // detail模块通用方法
+
+import Header from '../../components/Header';
+
+import { alert } from '../../Utils/TotastUtils';
+
+export default function MapScreen({ navigation }) {
+  const key = 'c4faf80125b298f93bbc1477db10e69c';
+  const html = `
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<title>DOMOverlay</title>
+</head>
+<script charset="utf-8"
+	src="https://map.qq.com/api/gljs?libraries=tools&v=1.exp&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K"></script>
+<style type="text/css">
+	html,
+	body {
+		height: 100%;
+		margin: 0px;
+		padding: 0px;
+	}
+
+	#container {
+		width: 100%;
+		height: 100%;
+	}
+</style>
+
+<body onload="initMap()">
+	<div id="container"></div>
+	<script>
+		var SVG_NS = 'http://www.w3.org/2000/svg';
+		// 自定义环状饼图 - 继承DOMOverlay
+		function Donut(options) {
+			TMap.DOMOverlay.call(this, options);
+		}
+
+		Donut.prototype = new TMap.DOMOverlay();
+
+		// 初始化
+		Donut.prototype.onInit = function (options) {
+			this.position = options.position;
+			this.data = options.data;
+			this.minRadius = options.minRadius || 0;
+			this.maxRadius = options.maxRadius || 50;
+		};
+
+		// 销毁时需解绑事件监听
+		Donut.prototype.onDestroy = function () {
+			if (this.onClick) {
+				this.dom.removeEventListener(this.onClick);
+			}
+		};
+
+		// 创建DOM元素,返回一个DOMElement,使用this.dom可以获取到这个元素
+		Donut.prototype.createDOM = function () {
+			let svg = document.createElementNS(SVG_NS, 'svg');
+			svg.setAttribute('version', '1.1');
+			svg.setAttribute('baseProfile', 'full');
+
+			let r = this.maxRadius;
+			svg.setAttribute('viewBox', [-r, -r, r * 2, r * 2].join(' '));
+			svg.setAttribute('width', r * 2);
+			svg.setAttribute('height', r * 2);
+			svg.style.cssText = 'position:absolute;top:0px;left:0px;';
+
+			let donut = createDonut(this.data, this.minRadius, this.maxRadius);
+			svg.appendChild(donut);
+
+			// click事件监听
+			this.onClick = () => {
+				// DOMOverlay继承自EventEmitter,可以使用emit触发事件
+				this.emit('click');
+			};
+			svg.addEventListener('click', this.onClick);
+			return svg;
+		};
+
+		// 更新DOM元素,在地图移动/缩放后执行
+		Donut.prototype.updateDOM = function () {
+			if (!this.map) {
+				return;
+			}
+
+			// 经纬度坐标转容器像素坐标
+			let pixel = this.map.projectToContainer(this.position);
+
+			// 使饼图中心点对齐经纬度坐标点
+			let left = pixel.getX() - this.dom.clientWidth / 2 + 'px';
+			let top = pixel.getY() - this.dom.clientHeight / 2 + 'px';
+			this.dom.style.transform = 'translate('+left+', '+top+')';
+		};
+
+		// 使用SVG创建环状饼图
+		function createDonut(data, minRadius, maxRadius) {
+			const colorList = [
+				'#7AF4FF',
+				'#67D7FF',
+				'#52B5FF',
+				'#295BFF'
+			];
+			let sum = data.reduce((prev, curr) => prev + curr, 0);
+			let angle = 0;
+
+			let group = document.createElementNS(SVG_NS, "g");
+			data.forEach((d, i) => {
+				let delta = d / sum * Math.PI * 2;
+				color = colorList[i],
+					r = maxRadius,
+					startAngle = angle,
+					endAngle = angle + delta;
+				angle += delta;
+
+				// 对每个数据创建一个扇形
+				let fanShape = document.createElementNS(SVG_NS, 'path');
+				fanShape.setAttribute('style', 'fill: '+ color+';');
+				fanShape.setAttribute('d', [
+					'M0 0',
+					'L'+(r * Math.sin(startAngle))+(-r * Math.cos(startAngle)),
+					'A'+r+' '+r+' 0 '+(delta > Math.PI ? 1 : 0)+' 1 '+(r * Math.sin(endAngle))+' '+(-r * Math.cos(endAngle)),
+				].join(' ') + ' z');
+				group.appendChild(fanShape);
+			});
+
+			// 在中心创建一个圆形
+			let circleShape = document.createElementNS(SVG_NS, 'circle');
+			circleShape.setAttribute('style', 'fill: #FFFFFF');
+			circleShape.setAttribute('cx', 0);
+			circleShape.setAttribute('cy', 0);
+			circleShape.setAttribute('r', minRadius);
+			group.appendChild(circleShape);
+
+			// 绘制文字
+			let textShape = document.createElementNS(SVG_NS, 'text');
+			textShape.setAttribute('x', 0);
+			textShape.setAttribute('y', '0.3em');
+			textShape.setAttribute('text-anchor', 'middle');
+			textShape.innerHTML = sum;
+			group.appendChild(textShape);
+
+			return group;
+		}
+
+		window.Donut = Donut;
+	</script>
+	<script type="text/javascript">
+		var map;
+		function initMap() {
+			// 初始化地图
+			map = new TMap.Map("container", {
+				zoom: 12, // 设置地图缩放级别
+				center: new TMap.LatLng(39.984104, 116.307503) // 设置地图中心点坐标
+			});
+
+			let donutList = [
+				new Donut({
+					map,
+					position: new TMap.LatLng(39.96030543872138, 116.25809083213608),
+					data: [12, 24],
+					minRadius: 13,
+					maxRadius: 20
+				}),
+				new Donut({
+					map,
+					position: new TMap.LatLng(39.9986945980902, 116.33598362780685),
+					data: [23, 99, 101, 400],
+					minRadius: 25,
+					maxRadius: 35
+				}),
+				new Donut({
+					map,
+					position: new TMap.LatLng(40.02906301748584, 116.25499991104516),
+					data: [18, 41, 50],
+					minRadius: 20,
+					maxRadius: 28
+				})
+			];
+
+			donutList.forEach((donut, index) => {
+				donut.on('click', () => {
+					console.log('第'+index+'个环形图被点击,位置为'+donut.position);
+				});
+			});
+		}
+	</script>
+</body>
+
+</html>
+	`;
+  return (
+    <>
+      <StatusBar backgroundColor="#fff" style="dark" translucent />
+
+      <Appbar.Header
+        theme={{ colors: { primary: '#fff' } }}
+        style={{
+          elevation: 0,
+          shadowOffset: {
+            width: 0,
+            height: 0,
+          },
+          shadowOpacity: 0,
+          zIndex: 2,
+        }}
+      >
+        <Appbar.BackAction onPress={navigation.goBack} />
+        <Appbar.Content
+          title="选择收货地址"
+          titleStyle={{ textAlign: 'center', fontSize: 16 }}
+        />
+        <Div w={56} h={56} />
+      </Appbar.Header>
+      <WebView
+        source={{
+          html,
+        }}
+        style={{ flexGrow: 1, width: '100%' }}
+        onMessage={({ nativeEvent }) => {
+          const info = JSON.parse(nativeEvent.data);
+          console.log(info);
+          alert('', `您当前选择的是:${info.poiaddress}`, () => {
+            navigation.goBack();
+          });
+        }}
+      />
+    </>
+  );
+}

+ 45 - 0
screens/Map/model.js

@@ -0,0 +1,45 @@
+import request from '../../Utils/RequestUtils';
+import Toast from '../../flooks/Toast';
+import { getLocation, getSearch } from '../../Utils/MapUtils';
+
+const MapModel = (now) => ({
+  locationInfo: {}, // 当前定位信息
+  chooseInfo: null, // 当前选点信息,
+  city: '南京', // 选择城市
+  personImg:
+    'https%3a%2f%2fidingdong.oss-cn-hangzhou.aliyuncs.com%2fimage%2f2020-07-03-16-19-50ghUJhqpC.png',
+  merchatImg:
+    'https%3a%2f%2fidingdong.oss-cn-hangzhou.aliyuncs.com%2fimage%2f2020-07-03-16-18-00PhLyNwTp.png',
+  riderImg:
+    'https%3a%2f%2fidingdong.oss-cn-hangzhou.aliyuncs.com%2fimage%2f2020-07-03-16-50-16UqCgAfFD.png',
+  // 获取当前定位
+  getNowLocation() {
+    return getLocation().then((res) => {
+      now({ locationInfo: res });
+      return Promise.reslove(res);
+    });
+  },
+  searchInfo(searchKey, type, callBack) {
+    const { city, chooseInfo, getChooseInfo, searchInfo } = now();
+    let boundary = '';
+    if (type === 'city') {
+      boundary = `region(${city}, 0)`;
+    } else if (!chooseInfo) {
+      getChooseInfo().then(() => {
+        searchInfo(searchKey, type, callBack);
+      });
+      return;
+    } else {
+      boundary = `nearby(31.983908,118.730357,100000)`;
+    }
+    getSearch(searchKey, boundary).then(({ pois }) => callBack(pois));
+  },
+  getChooseInfo() {
+    const { getNowLocation } = now();
+    return getNowLocation().then((res) => {
+      now({ chooseInfo: res });
+    });
+  },
+});
+
+export default MapModel;

+ 14 - 4
screens/Order/OrderScreen.jsx

@@ -10,6 +10,8 @@ import { useFocusEffect } from '@react-navigation/native';
 import Header from './Header'; // 头部
 
 import Time from '../../Utils/TimeUtils';
+import MapMarkImg from '../Map/MapMarkImg';
+import { getStatusInfo } from '../../Utils/OrderUtils';
 
 export default function OrderScreen({ navigation }) {
   const [orderList, setorderList] = React.useState();
@@ -36,7 +38,7 @@ export default function OrderScreen({ navigation }) {
         refreshing={orderRequest.loading}
         contentContainerStyle={styles.list}
         data={orderList}
-        renderItem={({ item }) => (
+        renderItem={({ item, index }) => (
           <Item
             merchant={item.merchant}
             info={item}
@@ -46,6 +48,7 @@ export default function OrderScreen({ navigation }) {
                 orderId: item.id,
               });
             }}
+            index={index}
           />
         )}
         keyExtractor={(item) => item.id.toString()}
@@ -58,8 +61,10 @@ export default function OrderScreen({ navigation }) {
 function Item({ merchant, info, goNext, orderGoodsSpecs }) {
   const orderInfo =
     orderGoodsSpecs.length > 0 ? orderGoodsSpecs[0].goods.name : '';
+
+  const statusInfo = getStatusInfo(info);
   return (
-    <TouchableRipple style={{ marginBottom: 10 }} onPress={goNext}>
+    <Button bg="hide" block p={0} mt={10} onPress={goNext}>
       <View style={styles.item}>
         <Div row>
           <Image w={53} h={53} source={{ uri: merchant.logo }} />
@@ -92,7 +97,11 @@ function Item({ merchant, info, goNext, orderGoodsSpecs }) {
             </Div>
           </Div>
         </Div>
-        <Image h={200} source={{ uri: 'https://picsum.photos/700' }} />
+        <MapMarkImg
+          imgType={statusInfo.nowImgType}
+          label={statusInfo.name}
+          info={info}
+        />
         <Flex justify="end" style={styles.btns}>
           <Button
             w={100}
@@ -107,7 +116,7 @@ function Item({ merchant, info, goNext, orderGoodsSpecs }) {
           </Button>
         </Flex>
       </View>
-    </TouchableRipple>
+    </Button>
   );
 }
 
@@ -117,6 +126,7 @@ const styles = StyleSheet.create({
     paddingHorizontal: 10,
     backgroundColor: '#fff',
     borderRadius: 3,
+    flex: 1,
   },
   list: {
     padding: 15,

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini