diff --git a/.DS_Store b/.DS_Store index e80d157a..bb3702d5 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/mobile-ui/App.js b/mobile-ui/App.js new file mode 100644 index 00000000..25c82a31 --- /dev/null +++ b/mobile-ui/App.js @@ -0,0 +1,123 @@ +import React, {useState} from "react"; +import { Image } from "react-native"; +import AppLoading from "expo-app-loading"; +import { useFonts } from '@use-expo/font'; +import { Asset } from "expo-asset"; +import { Block, GalioProvider } from "galio-framework"; +import { NavigationContainer } from "@react-navigation/native"; + +// Before rendering any navigation stack +import { enableScreens } from "react-native-screens"; +enableScreens(); + +import Screens from "./navigation/Screens"; +import { Images, articles, argonTheme } from "./constants"; + +// cache app images +const assetImages = [ + Images.Onboarding, + Images.LogoOnboarding, + Images.Logo, + Images.Pro, + Images.ArgonLogo, + Images.iOSLogo, + Images.androidLogo +]; + +// cache product images +articles.map(article => assetImages.push(article.image)); + +function cacheImages(images) { + return images.map(image => { + if (typeof image === "string") { + return Image.prefetch(image); + } else { + return Asset.fromModule(image).downloadAsync(); + } + }); +} + +export default props => { + const [isLoadingComplete, setLoading] = useState(false); + let [fontsLoaded] = useFonts({ + 'ArgonExtra': require('./assets/font/argon.ttf'), + }); + + function _loadResourcesAsync() { + return Promise.all([...cacheImages(assetImages)]); + } + + function _handleLoadingError(error) { + // In this case, you might want to report the error to your error + // reporting service, for example Sentry + console.warn(error); + }; + + function _handleFinishLoading() { + setLoading(true); + }; + + if(!fontsLoaded && !isLoadingComplete) { + return ( + + ); + } else if(fontsLoaded) { + return ( + + + + + + + + ); + } else { + return null + } +} + +// export default class App extends React.Component { +// state = { +// isLoadingComplete: false +// }; + +// render() { +// if (!this.state.isLoadingComplete) { +// return ( +// +// ); +// } else { +// return ( +// +// +// +// +// +// +// +// ); +// } +// } + +// _loadResourcesAsync = async () => { +// return Promise.all([...cacheImages(assetImages)]); +// }; + +// _handleLoadingError = error => { +// // In this case, you might want to report the error to your error +// // reporting service, for example Sentry +// console.warn(error); +// }; + +// _handleFinishLoading = () => { +// this.setState({ isLoadingComplete: true }); +// }; +// } diff --git a/mobile-ui/App.tsx b/mobile-ui/App.tsx index 0329d0c9..5155ebe9 100644 --- a/mobile-ui/App.tsx +++ b/mobile-ui/App.tsx @@ -1,9 +1,14 @@ import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View } from 'react-native'; +//import { NavigationContainer } from "@react-navigation/native"; +import { Button } from './components'; + export default function App() { return ( + + Open up App.tsx to start working on your app! diff --git a/mobile-ui/app.json b/mobile-ui/app.json index 05a32d4a..b1702aa3 100644 --- a/mobile-ui/app.json +++ b/mobile-ui/app.json @@ -1,14 +1,18 @@ { "expo": { - "name": "mobile-ui", - "slug": "mobile-ui", - "version": "1.0.0", + "name": "Argon FREE React Native", + "slug": "argon-free-react-native", + "privacy": "public", + "platforms": [ + "ios", + "android" + ], + "version": "1.7.1", "orientation": "portrait", "icon": "./assets/icon.png", - "userInterfaceStyle": "light", "splash": { "image": "./assets/splash.png", - "resizeMode": "contain", + "resizeMode": "cover", "backgroundColor": "#ffffff" }, "updates": { @@ -20,14 +24,6 @@ "ios": { "supportsTablet": true }, - "android": { - "adaptiveIcon": { - "foregroundImage": "./assets/adaptive-icon.png", - "backgroundColor": "#FFFFFF" - } - }, - "web": { - "favicon": "./assets/favicon.png" - } + "description": "Argon React Native, based on Argon Design System. Coded by Creative Tim" } } diff --git a/mobile-ui/assets/adaptive-icon.png b/mobile-ui/assets/adaptive-icon.png deleted file mode 100644 index 03d6f6b6..00000000 Binary files a/mobile-ui/assets/adaptive-icon.png and /dev/null differ diff --git a/mobile-ui/assets/config/argon.json b/mobile-ui/assets/config/argon.json new file mode 100755 index 00000000..716c8ba3 --- /dev/null +++ b/mobile-ui/assets/config/argon.json @@ -0,0 +1 @@ +{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M675.84 0l-512 512 512 512 179.2-179.2-332.8-332.8 332.8-332.8-179.2-179.2z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["nav-left"]},"attrs":[{}],"properties":{"order":50,"id":22,"name":"nav-left","prevSize":32,"code":59670},"setIdx":0,"setId":3,"iconIdx":0},{"icon":{"paths":["M853.333 0h-682.667c-72.533 0-128 55.467-128 128v853.333c0 25.6 17.067 42.667 42.667 42.667h853.333c25.6 0 42.667-17.067 42.667-42.667v-853.333c0-72.533-55.467-128-128-128zM512 682.667c-140.8 0-256-115.2-256-256 0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667c0 93.867 76.8 170.667 170.667 170.667s170.667-76.8 170.667-170.667c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667c0 140.8-115.2 256-256 256zM853.333 170.667h-682.667c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h682.667c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["bag-17"]},"attrs":[{}],"properties":{"order":28,"id":21,"name":"bag-17","prevSize":32,"code":59648},"setIdx":0,"setId":3,"iconIdx":1},{"icon":{"paths":["M85.333 896c0 70.692 57.308 128 128 128v0h597.333c70.692 0 128-57.308 128-128v0-298.667h-853.333z","M839.509 341.333l-142.251-284.587c-10.815-20.917-32.285-34.968-57.036-34.968-35.346 0-64 28.654-64 64 0 10.245 2.407 19.927 6.687 28.513l-0.167-0.371 113.749 227.413h-368.981l113.749-227.413c4.112-8.214 6.519-17.897 6.519-28.141 0-35.346-28.654-64-64-64-24.752 0-46.222 14.051-56.868 34.612l-0.168 0.357-142.251 284.587h-184.491v170.667h1024v-170.667z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["basket"]},"attrs":[{},{}],"properties":{"order":29,"id":20,"name":"basket","prevSize":32,"code":59649},"setIdx":0,"setId":3,"iconIdx":2},{"icon":{"paths":["M853.333 426.667v-85.333c0-188.513-152.82-341.333-341.333-341.333s-341.333 152.82-341.333 341.333v0 85.333c-2.264 54.579-27.284 102.899-65.757 136.026l-0.248 0.209c-34.496 29.523-57.513 71.592-61.941 119.058l-0.053 0.708c0 106.667 175.445 170.667 469.333 170.667s469.333-64 469.333-170.667c-4.482-48.174-27.498-90.242-61.752-119.562l-0.243-0.203c-38.722-33.335-63.741-81.655-65.993-135.855l-0.013-0.38z","M390.187 934.4c16.761 52.286 64.945 89.472 121.813 89.472s105.053-37.186 121.563-88.568l0.251-0.904c-38.144 2.816-78.677 4.267-121.813 4.267s-83.669-1.365-121.813-4.267z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["bell"]},"attrs":[{},{}],"properties":{"order":30,"id":19,"name":"bell","prevSize":32,"code":59650},"setIdx":0,"setId":3,"iconIdx":3},{"icon":{"paths":["M170.667 426.667h170.667v128h-170.667v-128z","M426.667 426.667h170.667v128h-170.667v-128z","M170.667 640h170.667v128h-170.667v-128z","M426.667 640h170.667v128h-170.667v-128z","M682.667 426.667h170.667v128h-170.667v-128z","M981.333 128h-213.333v-85.333c0-23.564-19.103-42.667-42.667-42.667s-42.667 19.103-42.667 42.667v0 85.333h-341.333v-85.333c0-23.564-19.103-42.667-42.667-42.667s-42.667 19.103-42.667 42.667v0 85.333h-213.333c-23.564 0-42.667 19.103-42.667 42.667v0 768c0 23.564 19.103 42.667 42.667 42.667v0h938.667c23.564 0 42.667-19.103 42.667-42.667v0-768c0-23.564-19.103-42.667-42.667-42.667v0zM938.667 896h-853.333v-597.333h853.333z"],"attrs":[{},{},{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["calendar-date"]},"attrs":[{},{},{},{},{},{}],"properties":{"order":31,"id":18,"name":"calendar-date","prevSize":32,"code":59651},"setIdx":0,"setId":3,"iconIdx":4},{"icon":{"paths":["M554.667 469.333h467.157c-20.608-248.277-218.88-446.549-467.157-467.157v467.157z","M529.664 554.667l-347.947 347.947c89.259 75.563 204.459 121.387 330.283 121.387 267.904 0 488.021-206.976 509.824-469.333h-492.16z","M469.333 494.336v-492.16c-262.357 21.803-469.333 241.92-469.333 509.824 0 125.824 45.824 241.024 121.387 330.283l347.947-347.947z"],"attrs":[{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["chart-pie-35"]},"attrs":[{},{},{}],"properties":{"order":32,"id":17,"name":"chart-pie-35","prevSize":32,"code":59652},"setIdx":0,"setId":3,"iconIdx":5},{"icon":{"paths":["M800.768 58.027c-8.107-9.728-20.096-15.36-32.768-15.36h-512c-12.672 0-24.661 5.632-32.768 15.36l-213.333 256c-12.544 15.061-13.227 36.736-1.664 52.523l469.333 640c8.064 10.965 20.864 17.451 34.432 17.451s26.368-6.485 34.432-17.451l469.333-640c11.563-15.829 10.923-37.461-1.664-52.523l-213.333-256zM810.667 384h-597.333v-85.333h597.333v85.333z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["diamond"]},"attrs":[{}],"properties":{"order":33,"id":16,"name":"diamond","prevSize":32,"code":59653},"setIdx":0,"setId":3,"iconIdx":6},{"icon":{"paths":["M512 960c-247.418-0.008-447.986-200.581-447.986-448 0-132.464 57.49-251.501 148.881-333.52l0.417-0.368 85.376 95.36c-65.605 58.85-106.688 143.894-106.688 238.533 0 176.731 143.269 320 320 320s320-143.269 320-320c0-94.639-41.083-179.683-106.389-238.269l-0.299-0.264 85.312-95.36c91.808 82.388 149.298 201.424 149.298 333.888 0 247.396-200.532 447.956-447.918 448l-0.004 0z","M448 0h128v448h-128v-448z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["engine-start"]},"attrs":[{},{}],"properties":{"order":34,"id":15,"name":"engine-start","prevSize":32,"code":59654},"setIdx":0,"setId":3,"iconIdx":7},{"icon":{"paths":["M1024 230.4l-51.2-102.4c-441.6 128-665.6 409.6-665.6 409.6l-204.8-153.6-102.4 102.4 307.2 409.6c236.8-441.6 716.8-665.6 716.8-665.6z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["g-check"]},"attrs":[{}],"properties":{"order":35,"id":14,"name":"g-check","prevSize":32,"code":59655},"setIdx":0,"setId":3,"iconIdx":8},{"icon":{"paths":["M938.667 469.333h85.333v256h-85.333v-256z","M564.949 671.147c-16.811 7.68-34.603 11.52-52.949 11.52s-36.139-3.84-52.907-11.477l-288.427-131.115v227.925c0 112.043 171.691 170.667 341.333 170.667s341.333-58.624 341.333-170.667v-227.883l-288.384 131.029z","M998.997 302.507l-469.333-213.333c-11.221-5.077-24.064-5.077-35.285 0l-469.333 213.333c-15.275 6.912-25.045 22.059-25.045 38.827s9.771 31.915 25.003 38.827l469.333 213.333c5.632 2.56 11.648 3.84 17.664 3.84s12.032-1.28 17.664-3.84l469.333-213.333c15.232-6.912 25.003-22.059 25.003-38.827s-9.771-31.915-25.003-38.827z"],"attrs":[{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["hat-3"]},"attrs":[{},{},{}],"properties":{"order":36,"id":13,"name":"hat-3","prevSize":32,"code":59656},"setIdx":0,"setId":3,"iconIdx":9},{"icon":{"paths":["M853.333 170.667h-682.667c-46.933 0-84.907 38.4-84.907 85.333l-0.427 512c0 46.933 38.4 85.333 85.333 85.333h682.667c46.933 0 85.333-38.4 85.333-85.333v-512c0-46.933-38.4-85.333-85.333-85.333zM853.333 341.333l-341.333 213.333-341.333-213.333v-85.333l341.333 213.333 341.333-213.333v85.333z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["ic_mail_24px"]},"attrs":[{}],"properties":{"order":46,"id":12,"name":"ic_mail_24px","prevSize":32,"code":59657},"setIdx":0,"setId":3,"iconIdx":10},{"icon":{"paths":["M725.333 58.965l-170.667 85.333v820.736l170.667-85.333z","M469.333 144.299l-170.667-85.333v820.736l170.667 85.333z","M213.333 61.184l-192.64 115.584c-12.8 7.68-20.693 21.547-20.693 36.565v810.667l213.333-137.984v-824.832z","M1003.307 176.768l-192.64-115.584v824.832l213.333 137.984v-810.667c0-15.019-7.893-28.885-20.693-36.565z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["map-big"]},"attrs":[{},{},{},{}],"properties":{"order":47,"id":11,"name":"map-big","prevSize":32,"code":59658},"setIdx":0,"setId":3,"iconIdx":11},{"icon":{"paths":["M938.667 768h-853.333c-47.128 0-85.333 38.205-85.333 85.333s38.205 85.333 85.333 85.333v0h853.333c47.128 0 85.333-38.205 85.333-85.333s-38.205-85.333-85.333-85.333v0z","M938.667 85.333h-853.333c-47.128 0-85.333 38.205-85.333 85.333s38.205 85.333 85.333 85.333v0h853.333c47.128 0 85.333-38.205 85.333-85.333s-38.205-85.333-85.333-85.333v0z","M938.667 426.667h-853.333c-47.128 0-85.333 38.205-85.333 85.333s38.205 85.333 85.333 85.333v0h853.333c47.128 0 85.333-38.205 85.333-85.333s-38.205-85.333-85.333-85.333v0z"],"attrs":[{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["menu-8"]},"attrs":[{},{},{}],"properties":{"order":48,"id":10,"name":"menu-8","prevSize":32,"code":59659},"setIdx":0,"setId":3,"iconIdx":12},{"icon":{"paths":["M512 501.931l-328.704-328.704-176.981 176.981 505.685 505.685 505.685-505.685-176.981-176.981-328.704 328.704z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["nav-down"]},"attrs":[{}],"properties":{"order":49,"id":9,"name":"nav-down","prevSize":32,"code":59660},"setIdx":0,"setId":3,"iconIdx":13},{"icon":{"paths":["M168.96 179.2l332.8 332.8-332.8 332.8 179.2 179.2 512-512-512-512-179.2 179.2z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["nav-right"]},"attrs":[{}],"properties":{"order":37,"id":8,"name":"nav-right","prevSize":32,"code":59661},"setIdx":0,"setId":3,"iconIdx":14},{"icon":{"paths":["M512 128c38.4 0 70.4 12.8 96 44.8l44.8 44.8 96-83.2-44.8-51.2c-51.2-51.2-121.6-83.2-192-83.2-140.8 0-256 115.2-256 256v96c-76.8 70.4-128 172.8-128 288 0 211.2 172.8 384 384 384s384-172.8 384-384-172.8-384-384-384c-44.8 0-89.6 6.4-128 25.6v-25.6c0-70.4 57.6-128 128-128zM512 448c70.4 0 128 57.6 128 128 0 44.8-25.6 89.6-64 108.8v147.2h-128v-147.2c-38.4-19.2-64-64-64-108.8 0-70.4 57.6-128 128-128z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["padlock-unlocked"]},"attrs":[{}],"properties":{"order":38,"id":7,"name":"padlock-unlocked","prevSize":32,"code":59662},"setIdx":0,"setId":3,"iconIdx":15},{"icon":{"paths":["M870.4 260.267c-46.933-21.333-93.867-34.133-145.067-34.133-68.267 0-128 21.333-183.467 38.4-34.133 12.8-68.267 21.333-93.867 21.333-17.067 0-25.6-4.267-29.867-12.8 0-4.267 4.267-25.6 8.533-38.4 12.8-38.4 25.6-85.333-8.533-132.267-21.333-25.6-55.467-42.667-93.867-42.667s-72.533 12.8-106.667 34.133c-136.533 93.867-217.6 251.733-217.6 418.133 0 281.6 230.4 512 512 512 226.133 0 430.933-153.6 494.933-375.467 4.267-25.6 64-290.133-136.533-388.267zM128 512c0-46.933 38.4-85.333 85.333-85.333s85.333 38.4 85.333 85.333-38.4 85.333-85.333 85.333-85.333-38.4-85.333-85.333zM320 810.667c-46.933 0-85.333-38.4-85.333-85.333s38.4-85.333 85.333-85.333 85.333 38.4 85.333 85.333-38.4 85.333-85.333 85.333zM554.667 896c-46.933 0-85.333-38.4-85.333-85.333s38.4-85.333 85.333-85.333 85.333 38.4 85.333 85.333-38.4 85.333-85.333 85.333zM725.333 640c-72.533 0-128-55.467-128-128s55.467-128 128-128 128 55.467 128 128-55.467 128-128 128z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["palette"]},"attrs":[{}],"properties":{"order":39,"id":6,"name":"palette","prevSize":32,"code":59663},"setIdx":0,"setId":3,"iconIdx":16},{"icon":{"paths":["M640 512h-128v128h-128v-128h-128v-128h128v-128h128v128h128v128z","M448 896c-247.040 0-448-200.96-448-448s200.96-448 448-448 448 200.96 448 448-200.96 448-448 448zM448 128c-176.448 0-320 143.552-320 320s143.552 320 320 320 320-143.552 320-320-143.552-320-320-320z","M1005.248 914.752l-153.152-153.152c-26.304 33.856-56.64 64.192-90.496 90.496l153.152 153.152c12.48 12.48 28.864 18.752 45.248 18.752s32.768-6.272 45.248-18.752c25.024-25.024 25.024-65.472 0-90.496z"],"attrs":[{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["search-zoom-in"]},"attrs":[{},{},{}],"properties":{"order":40,"id":5,"name":"search-zoom-in","prevSize":32,"code":59664},"setIdx":0,"setId":3,"iconIdx":17},{"icon":{"paths":["M889.6 32c-12.8-19.2-32-32-57.6-32h-640c-25.6 0-44.8 12.8-57.6 32-134.4 256-134.4 268.8-134.4 288 0 70.4 57.6 128 128 128v512c0 38.4 25.6 64 64 64h640c38.4 0 64-25.6 64-64v-512c70.4 0 128-57.6 128-128 0-19.2 0-32-134.4-288zM640 896v-256h-256v256h-128v-467.2c19.2 12.8 38.4 19.2 64 19.2 38.4 0 70.4-19.2 96-44.8 25.6 25.6 57.6 44.8 96 44.8s70.4-19.2 96-44.8c25.6 25.6 57.6 44.8 96 44.8 25.6 0 44.8-6.4 64-19.2v467.2h-128z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["shop"]},"attrs":[{}],"properties":{"order":41,"id":4,"name":"shop","prevSize":32,"code":59665},"setIdx":0,"setId":3,"iconIdx":18},{"icon":{"paths":["M1006.080 18.091c-7.731-7.783-18.44-12.601-30.273-12.601-0.772 0-1.54 0.021-2.302 0.061l0.106-0.005c-598.528 31.232-819.627 564.395-821.76 569.771-1.953 4.716-3.087 10.192-3.087 15.933 0 11.77 4.766 22.428 12.474 30.147l-0.001-0.001 241.365 241.365c7.719 7.708 18.376 12.474 30.147 12.474 5.822 0 11.371-1.166 16.428-3.277l-0.282 0.104c5.333-2.176 535.637-225.749 569.515-821.461 0.044-0.729 0.070-1.581 0.070-2.439 0-11.734-4.737-22.362-12.403-30.075l0.002 0.002zM657.664 486.997c-15.443 15.448-36.78 25.003-60.349 25.003-47.128 0-85.333-38.205-85.333-85.333s38.205-85.333 85.333-85.333c23.569 0 44.906 9.555 60.349 25.002l0 0c15.437 15.441 24.984 36.771 24.984 60.331s-9.548 44.889-24.985 60.331l0-0z","M47.488 804.011c21.988-22.134 52.442-35.834 86.095-35.834 67.016 0 121.344 54.328 121.344 121.344 0 33.654-13.7 64.107-35.827 86.089l-0.007 0.007c-47.403 47.403-219.093 48.384-219.093 48.384s0-172.629 47.488-219.989z","M441.899 99.883c-19.601-3.582-42.158-5.631-65.193-5.631-105.117 0-200.271 42.659-269.094 111.609l-0.006 0.006c-22.251 22.451-41.797 47.646-58.068 75.015l-0.983 1.785c-3.709 6.195-5.902 13.667-5.902 21.652 0 11.791 4.783 22.465 12.515 30.188l0 0 84.864 84.907c80.614-126.65 181.178-232.842 298.486-317.218l3.381-2.313z","M924.117 582.101c3.582 19.601 5.631 42.158 5.631 65.193 0 105.117-42.659 200.271-111.609 269.094l-0.006 0.006c-22.451 22.251-47.646 41.797-75.015 58.068l-1.785 0.983c-6.195 3.709-13.667 5.902-21.652 5.902-11.791 0-22.465-4.783-30.188-12.515l-0-0-84.907-84.864c126.65-80.614 232.842-181.178 317.218-298.486l2.313-3.381z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["spaceship"]},"attrs":[{},{},{},{}],"properties":{"order":42,"id":3,"name":"spaceship","prevSize":32,"code":59666},"setIdx":0,"setId":3,"iconIdx":19},{"icon":{"paths":["M512 0c-281.6 0-512 230.4-512 512s230.4 512 512 512 512-230.4 512-512c0-281.6-230.4-512-512-512zM512 640c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128c0 70.4-57.6 128-128 128zM512 128c57.6 0 115.2 12.8 166.4 38.4l-99.584 99.584c-48.704-13.248-84.928-13.248-133.696 0l-99.52-99.584c51.2-25.6 108.8-38.4 166.4-38.4zM128 512c0-57.6 12.8-115.2 38.4-166.4l99.584 99.584c-13.248 48.704-13.248 84.928 0 133.696l-99.584 99.52c-25.6-51.2-38.4-108.8-38.4-166.4zM512 896c-57.6 0-115.2-12.8-166.4-38.4l99.584-99.584c48.704 13.248 84.928 13.248 133.696 0l99.52 99.584c-51.2 25.6-108.8 38.4-166.4 38.4zM857.6 678.4l-99.584-99.584c13.248-48.704 13.248-84.928 0-133.696l99.584-99.52c25.6 51.2 38.4 108.8 38.4 166.4s-12.8 115.2-38.4 166.4z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["support"]},"attrs":[{}],"properties":{"order":43,"id":2,"name":"support","prevSize":32,"code":59667},"setIdx":0,"setId":3,"iconIdx":20},{"icon":{"paths":["M277.333 469.333h469.333c128 0 234.667-106.667 234.667-234.667s-106.667-234.667-234.667-234.667h-469.333c-128 0-234.667 106.667-234.667 234.667s106.667 234.667 234.667 234.667zM277.333 85.333c81.067 0 149.333 68.267 149.333 149.333s-68.267 149.333-149.333 149.333-149.333-68.267-149.333-149.333 68.267-149.333 149.333-149.333z","M746.667 554.667h-469.333c-128 0-234.667 106.667-234.667 234.667s106.667 234.667 234.667 234.667h469.333c128 0 234.667-106.667 234.667-234.667s-106.667-234.667-234.667-234.667zM746.667 938.667c-81.067 0-149.333-68.267-149.333-149.333s68.267-149.333 149.333-149.333 149.333 68.267 149.333 149.333-68.267 149.333-149.333 149.333z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["switches"]},"attrs":[{},{}],"properties":{"order":44,"id":1,"name":"switches","prevSize":32,"code":59668},"setIdx":0,"setId":3,"iconIdx":21},{"icon":{"paths":["M704 768h-640c-35.392 0-64-28.608-64-64v-640c0-35.328 28.608-64 64-64h640c35.392 0 64 28.672 64 64v640c0 35.392-28.608 64-64 64z","M960 1024h-704v-128h640v-640h128v704c0 35.392-28.608 64-64 64z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["ungroup"]},"attrs":[{},{}],"properties":{"order":45,"id":0,"name":"ungroup","prevSize":32,"code":59669},"setIdx":0,"setId":3,"iconIdx":22}],"height":1024,"metadata":{"name":"argon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"argon","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"embed":false,"showMetadata":false,"showVersion":false,"showMetrics":false,"showSelector":false},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":0,"bgColor":16777215,"classSelector":".icon"},"historySize":50,"showCodes":false,"gridSize":16,"showLiga":false}} \ No newline at end of file diff --git a/mobile-ui/assets/favicon.png b/mobile-ui/assets/favicon.png deleted file mode 100644 index e75f697b..00000000 Binary files a/mobile-ui/assets/favicon.png and /dev/null differ diff --git a/mobile-ui/assets/font/argon.ttf b/mobile-ui/assets/font/argon.ttf new file mode 100755 index 00000000..4240bc99 Binary files /dev/null and b/mobile-ui/assets/font/argon.ttf differ diff --git a/mobile-ui/assets/icon.png b/mobile-ui/assets/icon.png index a0b1526f..834c14fa 100644 Binary files a/mobile-ui/assets/icon.png and b/mobile-ui/assets/icon.png differ diff --git a/mobile-ui/assets/imgs/android.png b/mobile-ui/assets/imgs/android.png new file mode 100755 index 00000000..fec1051c Binary files /dev/null and b/mobile-ui/assets/imgs/android.png differ diff --git a/mobile-ui/assets/imgs/argon-logo-onboarding.png b/mobile-ui/assets/imgs/argon-logo-onboarding.png new file mode 100644 index 00000000..4350b4e5 Binary files /dev/null and b/mobile-ui/assets/imgs/argon-logo-onboarding.png differ diff --git a/mobile-ui/assets/imgs/argon-logo-onboarding@2x.png b/mobile-ui/assets/imgs/argon-logo-onboarding@2x.png new file mode 100644 index 00000000..a59cc29e Binary files /dev/null and b/mobile-ui/assets/imgs/argon-logo-onboarding@2x.png differ diff --git a/mobile-ui/assets/imgs/argon-logo.png b/mobile-ui/assets/imgs/argon-logo.png new file mode 100644 index 00000000..2ca2750a Binary files /dev/null and b/mobile-ui/assets/imgs/argon-logo.png differ diff --git a/mobile-ui/assets/imgs/argon-logo@2x.png b/mobile-ui/assets/imgs/argon-logo@2x.png new file mode 100644 index 00000000..82e3fa8c Binary files /dev/null and b/mobile-ui/assets/imgs/argon-logo@2x.png differ diff --git a/mobile-ui/assets/imgs/argonlogo.png b/mobile-ui/assets/imgs/argonlogo.png new file mode 100644 index 00000000..c06b6ffe Binary files /dev/null and b/mobile-ui/assets/imgs/argonlogo.png differ diff --git a/mobile-ui/assets/imgs/bg.png b/mobile-ui/assets/imgs/bg.png new file mode 100644 index 00000000..14840c49 Binary files /dev/null and b/mobile-ui/assets/imgs/bg.png differ diff --git a/mobile-ui/assets/imgs/getPro-bg.png b/mobile-ui/assets/imgs/getPro-bg.png new file mode 100644 index 00000000..526045e8 Binary files /dev/null and b/mobile-ui/assets/imgs/getPro-bg.png differ diff --git a/mobile-ui/assets/imgs/getPro-bg@2x.png b/mobile-ui/assets/imgs/getPro-bg@2x.png new file mode 100644 index 00000000..6abab087 Binary files /dev/null and b/mobile-ui/assets/imgs/getPro-bg@2x.png differ diff --git a/mobile-ui/assets/imgs/icon.png b/mobile-ui/assets/imgs/icon.png new file mode 100644 index 00000000..3f5bbc0c Binary files /dev/null and b/mobile-ui/assets/imgs/icon.png differ diff --git a/mobile-ui/assets/imgs/ios.png b/mobile-ui/assets/imgs/ios.png new file mode 100755 index 00000000..e2863ef1 Binary files /dev/null and b/mobile-ui/assets/imgs/ios.png differ diff --git a/mobile-ui/assets/imgs/profile-screen-bg.png b/mobile-ui/assets/imgs/profile-screen-bg.png new file mode 100644 index 00000000..ee37fb0c Binary files /dev/null and b/mobile-ui/assets/imgs/profile-screen-bg.png differ diff --git a/mobile-ui/assets/imgs/register-bg.png b/mobile-ui/assets/imgs/register-bg.png new file mode 100644 index 00000000..9c39f15a Binary files /dev/null and b/mobile-ui/assets/imgs/register-bg.png differ diff --git a/mobile-ui/assets/imgs/splash.png b/mobile-ui/assets/imgs/splash.png new file mode 100644 index 00000000..4f9ade69 Binary files /dev/null and b/mobile-ui/assets/imgs/splash.png differ diff --git a/mobile-ui/assets/nucleo icons/svg/bag-17.svg b/mobile-ui/assets/nucleo icons/svg/bag-17.svg new file mode 100644 index 00000000..e73d2397 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/bag-17.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/basket.svg b/mobile-ui/assets/nucleo icons/svg/basket.svg new file mode 100644 index 00000000..f9f2584b --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/basket.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/bell.svg b/mobile-ui/assets/nucleo icons/svg/bell.svg new file mode 100644 index 00000000..5e610ee3 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/calendar-date.svg b/mobile-ui/assets/nucleo icons/svg/calendar-date.svg new file mode 100644 index 00000000..f7dff8b3 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/calendar-date.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/chart-pie-35.svg b/mobile-ui/assets/nucleo icons/svg/chart-pie-35.svg new file mode 100644 index 00000000..d588eeb9 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/chart-pie-35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/diamond.svg b/mobile-ui/assets/nucleo icons/svg/diamond.svg new file mode 100644 index 00000000..18cd5289 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/diamond.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/engine-start.svg b/mobile-ui/assets/nucleo icons/svg/engine-start.svg new file mode 100644 index 00000000..e5b3325b --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/engine-start.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/g-check.svg b/mobile-ui/assets/nucleo icons/svg/g-check.svg new file mode 100644 index 00000000..7a91e1da --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/g-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/hat-3.svg b/mobile-ui/assets/nucleo icons/svg/hat-3.svg new file mode 100644 index 00000000..3e3fe000 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/hat-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/ic_mail_24px.svg b/mobile-ui/assets/nucleo icons/svg/ic_mail_24px.svg new file mode 100644 index 00000000..c0576203 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/ic_mail_24px.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/map-big.svg b/mobile-ui/assets/nucleo icons/svg/map-big.svg new file mode 100644 index 00000000..4b6b1a12 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/map-big.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/menu-8.svg b/mobile-ui/assets/nucleo icons/svg/menu-8.svg new file mode 100644 index 00000000..8c6ff8ac --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/menu-8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/nav-down.svg b/mobile-ui/assets/nucleo icons/svg/nav-down.svg new file mode 100644 index 00000000..54a4f3ef --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/nav-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/nav-left.svg b/mobile-ui/assets/nucleo icons/svg/nav-left.svg new file mode 100644 index 00000000..547e5097 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/nav-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/nav-right.svg b/mobile-ui/assets/nucleo icons/svg/nav-right.svg new file mode 100644 index 00000000..c8af571d --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/nav-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/padlock-unlocked.svg b/mobile-ui/assets/nucleo icons/svg/padlock-unlocked.svg new file mode 100644 index 00000000..931d6ff8 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/padlock-unlocked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/palette.svg b/mobile-ui/assets/nucleo icons/svg/palette.svg new file mode 100644 index 00000000..a92049ea --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/palette.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/search-zoom-in.svg b/mobile-ui/assets/nucleo icons/svg/search-zoom-in.svg new file mode 100644 index 00000000..3f9f9098 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/search-zoom-in.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/shop.svg b/mobile-ui/assets/nucleo icons/svg/shop.svg new file mode 100644 index 00000000..9aa03426 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/shop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/spaceship.svg b/mobile-ui/assets/nucleo icons/svg/spaceship.svg new file mode 100644 index 00000000..e5dfd4d0 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/spaceship.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/support.svg b/mobile-ui/assets/nucleo icons/svg/support.svg new file mode 100644 index 00000000..7b2fa589 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/support.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/switches.svg b/mobile-ui/assets/nucleo icons/svg/switches.svg new file mode 100644 index 00000000..e26bf6e4 --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/switches.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/nucleo icons/svg/ungroup.svg b/mobile-ui/assets/nucleo icons/svg/ungroup.svg new file mode 100644 index 00000000..447cce6f --- /dev/null +++ b/mobile-ui/assets/nucleo icons/svg/ungroup.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile-ui/assets/splash.png b/mobile-ui/assets/splash.png index 0e89705a..89a8eaf0 100644 Binary files a/mobile-ui/assets/splash.png and b/mobile-ui/assets/splash.png differ diff --git a/mobile-ui/components/Button.js b/mobile-ui/components/Button.js new file mode 100644 index 00000000..9f39f8be --- /dev/null +++ b/mobile-ui/components/Button.js @@ -0,0 +1,57 @@ +import React from "react"; +import { StyleSheet } from "react-native"; +import PropTypes from 'prop-types'; +import { Button } from "galio-framework"; + +import argonTheme from "../constants/Theme"; + +class ArButton extends React.Component { + render() { + const { small, shadowless, children, color, style, ...props } = this.props; + + const colorStyle = color && argonTheme.COLORS[color.toUpperCase()]; + + const buttonStyles = [ + small && styles.smallButton, + color && { backgroundColor: colorStyle }, + !shadowless && styles.shadow, + {...style} + ]; + + return ( + + ); + } +} + +ArButton.propTypes = { + small: PropTypes.bool, + shadowless: PropTypes.bool, + color: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.oneOf(['default', 'primary', 'secondary', 'info', 'error', 'success', 'warning']) + ]) +} + +const styles = StyleSheet.create({ + smallButton: { + width: 75, + height: 28 + }, + shadow: { + shadowColor: 'black', + shadowOffset: { width: 0, height: 4 }, + shadowRadius: 4, + shadowOpacity: 0.1, + elevation: 2, + }, +}); + +export default ArButton; diff --git a/mobile-ui/components/Card.js b/mobile-ui/components/Card.js new file mode 100644 index 00000000..6b7bc89d --- /dev/null +++ b/mobile-ui/components/Card.js @@ -0,0 +1,98 @@ +import React from 'react'; +import { withNavigation } from '@react-navigation/compat'; +import PropTypes from 'prop-types'; +import { StyleSheet, Dimensions, Image, TouchableWithoutFeedback } from 'react-native'; +import { Block, Text, theme } from 'galio-framework'; + +import { argonTheme } from '../constants'; + + +class Card extends React.Component { + render() { + const { navigation, item, horizontal, full, style, ctaColor, imageStyle } = this.props; + + const imageStyles = [ + full ? styles.fullImage : styles.horizontalImage, + imageStyle + ]; + const cardContainer = [styles.card, styles.shadow, style]; + const imgContainer = [styles.imageContainer, + horizontal ? styles.horizontalStyles : styles.verticalStyles, + styles.shadow + ]; + + return ( + + navigation.navigate('Pro')}> + + + + + navigation.navigate('Pro')}> + + {item.title} + {item.cta} + + + + ); + } +} + +Card.propTypes = { + item: PropTypes.object, + horizontal: PropTypes.bool, + full: PropTypes.bool, + ctaColor: PropTypes.string, + imageStyle: PropTypes.any, +} + +const styles = StyleSheet.create({ + card: { + backgroundColor: theme.COLORS.WHITE, + marginVertical: theme.SIZES.BASE, + borderWidth: 0, + minHeight: 114, + marginBottom: 16 + }, + cardTitle: { + flex: 1, + flexWrap: 'wrap', + paddingBottom: 6 + }, + cardDescription: { + padding: theme.SIZES.BASE / 2 + }, + imageContainer: { + borderRadius: 3, + elevation: 1, + overflow: 'hidden', + }, + image: { + // borderRadius: 3, + }, + horizontalImage: { + height: 122, + width: 'auto', + }, + horizontalStyles: { + borderTopRightRadius: 0, + borderBottomRightRadius: 0, + }, + verticalStyles: { + borderBottomRightRadius: 0, + borderBottomLeftRadius: 0 + }, + fullImage: { + height: 215 + }, + shadow: { + shadowColor: theme.COLORS.BLACK, + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 4, + shadowOpacity: 0.1, + elevation: 2, + }, +}); + +export default withNavigation(Card); \ No newline at end of file diff --git a/mobile-ui/components/DrawerItem.js b/mobile-ui/components/DrawerItem.js new file mode 100644 index 00000000..36ba6989 --- /dev/null +++ b/mobile-ui/components/DrawerItem.js @@ -0,0 +1,130 @@ +import React from "react"; +import { StyleSheet, TouchableOpacity, Linking } from "react-native"; +import { Block, Text, theme } from "galio-framework"; + +import Icon from "./Icon"; +import argonTheme from "../constants/Theme"; + +class DrawerItem extends React.Component { + renderIcon = () => { + const { title, focused } = this.props; + + switch (title) { + case "Home": + return ( + + ); + case "Elements": + return ( + + ); + case "Articles": + return ( + + ); + case "Profile": + return ( + + ); + case "Account": + return ( + + ); + case "Getting Started": + return (); + case "Log out": + return ; + default: + return null; + } + }; + + render() { + const { focused, title, navigation } = this.props; + + const containerStyles = [ + styles.defaultStyle, + focused ? [styles.activeStyle, styles.shadow] : null + ]; + + return ( + + title == "Getting Started" + ? Linking.openURL( + "https://demos.creative-tim.com/argon-pro-react-native/docs/" + ).catch(err => console.error("An error occurred", err)) + : navigation.navigate(title) + } + > + + + {this.renderIcon()} + + + + {title} + + + + + ); + } +} + +const styles = StyleSheet.create({ + defaultStyle: { + paddingVertical: 16, + paddingHorizontal: 16 + }, + activeStyle: { + backgroundColor: argonTheme.COLORS.ACTIVE, + borderRadius: 4 + }, + shadow: { + shadowColor: theme.COLORS.BLACK, + shadowOffset: { + width: 0, + height: 2 + }, + shadowRadius: 8, + shadowOpacity: 0.1 + } +}); + +export default DrawerItem; diff --git a/mobile-ui/components/Header.js b/mobile-ui/components/Header.js new file mode 100644 index 00000000..207c7e84 --- /dev/null +++ b/mobile-ui/components/Header.js @@ -0,0 +1,281 @@ +import React from 'react'; +import { withNavigation } from '@react-navigation/compat'; +import { TouchableOpacity, StyleSheet, Platform, Dimensions } from 'react-native'; +import { Button, Block, NavBar, Text, theme } from 'galio-framework'; + +import Icon from './Icon'; +import Input from './Input'; +import Tabs from './Tabs'; +import argonTheme from '../constants/Theme'; + +const { height, width } = Dimensions.get('window'); +const iPhoneX = () => Platform.OS === 'ios' && (height === 812 || width === 812 || height === 896 || width === 896); + +const BellButton = ({isWhite, style, navigation}) => ( + navigation.navigate('Pro')}> + + + +); + +const BasketButton = ({isWhite, style, navigation}) => ( + navigation.navigate('Pro')}> + + +); + +const SearchButton = ({isWhite, style, navigation}) => ( + navigation.navigate('Pro')}> + + +); + +class Header extends React.Component { + handleLeftPress = () => { + const { back, navigation } = this.props; + return (back ? navigation.goBack() : navigation.openDrawer()); + } + renderRight = () => { + const { white, title, navigation } = this.props; + + if (title === 'Title') { + return [ + , + + ] + } + + switch (title) { + case 'Home': + return ([ + , + + ]); + case 'Deals': + return ([ + , + + ]); + case 'Categories': + return ([ + , + + ]); + case 'Category': + return ([ + , + + ]); + case 'Profile': + return ([ + , + + ]); + case 'Product': + return ([ + , + + ]); + case 'Search': + return ([ + , + + ]); + case 'Settings': + return ([ + , + + ]); + default: + break; + } + } + renderSearch = () => { + const { navigation } = this.props; + return ( + navigation.navigate('Pro')} + iconContent={} + /> + ); + } + renderOptions = () => { + const { navigation, optionLeft, optionRight } = this.props; + + return ( + + + + + ); + } + renderTabs = () => { + const { tabs, tabIndex, navigation } = this.props; + const defaultTab = tabs && tabs[0] && tabs[0].id; + + if (!tabs) return null; + + return ( + navigation.setParams({ tabId: id })} /> + ) + } + renderHeader = () => { + const { search, options, tabs } = this.props; + if (search || tabs || options) { + return ( + + {search ? this.renderSearch() : null} + {options ? this.renderOptions() : null} + {tabs ? this.renderTabs() : null} + + ); + } + } + render() { + const { back, title, white, transparent, bgColor, iconColor, titleColor, navigation, ...props } = this.props; + + const noShadow = ['Search', 'Categories', 'Deals', 'Pro', 'Profile'].includes(title); + const headerStyles = [ + !noShadow ? styles.shadow : null, + transparent ? { backgroundColor: 'rgba(0,0,0,0)' } : null, + ]; + + const navbarStyles = [ + styles.navbar, + bgColor && { backgroundColor: bgColor } + ]; + + return ( + + + + } + leftStyle={{ paddingVertical: 12, flex: 0.2 }} + titleStyle={[ + styles.title, + { color: argonTheme.COLORS[white ? 'WHITE' : 'HEADER'] }, + titleColor && { color: titleColor } + ]} + {...props} + /> + {this.renderHeader()} + + ); + } +} + +const styles = StyleSheet.create({ + button: { + padding: 12, + position: 'relative', + }, + title: { + width: '100%', + fontSize: 16, + fontWeight: 'bold', + }, + navbar: { + paddingVertical: 0, + paddingBottom: theme.SIZES.BASE * 1.5, + paddingTop: iPhoneX ? theme.SIZES.BASE * 4 : theme.SIZES.BASE, + zIndex: 5, + }, + shadow: { + backgroundColor: theme.COLORS.WHITE, + shadowColor: 'black', + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 6, + shadowOpacity: 0.2, + elevation: 3, + }, + notify: { + backgroundColor: argonTheme.COLORS.LABEL, + borderRadius: 4, + height: theme.SIZES.BASE / 2, + width: theme.SIZES.BASE / 2, + position: 'absolute', + top: 9, + right: 12, + }, + header: { + backgroundColor: theme.COLORS.WHITE, + }, + divider: { + borderRightWidth: 0.3, + borderRightColor: theme.COLORS.ICON, + }, + search: { + height: 48, + width: width - 32, + marginHorizontal: 16, + borderWidth: 1, + borderRadius: 3, + borderColor: argonTheme.COLORS.BORDER + }, + options: { + marginBottom: 24, + marginTop: 10, + elevation: 4, + }, + tab: { + backgroundColor: theme.COLORS.TRANSPARENT, + width: width * 0.35, + borderRadius: 0, + borderWidth: 0, + height: 24, + elevation: 0, + }, + tabTitle: { + lineHeight: 19, + fontWeight: '400', + color: argonTheme.COLORS.HEADER + }, +}); + +export default withNavigation(Header); diff --git a/mobile-ui/components/Icon.js b/mobile-ui/components/Icon.js new file mode 100644 index 00000000..075515c8 --- /dev/null +++ b/mobile-ui/components/Icon.js @@ -0,0 +1,34 @@ +import React from 'react'; +import * as Font from 'expo-font'; +import { createIconSetFromIcoMoon } from '@expo/vector-icons'; +import { Icon } from 'galio-framework'; + +import argonConfig from '../assets/config/argon.json'; +const ArgonExtra = require('../assets/font/argon.ttf'); +const IconArgonExtra = createIconSetFromIcoMoon(argonConfig, 'ArgonExtra'); + +class IconExtra extends React.Component { + state = { + fontLoaded: false, + } + + async componentDidMount() { + await Font.loadAsync({ ArgonExtra: ArgonExtra }); + this.setState({ fontLoaded: true }); + } + + render() { + const { name, family, ...rest } = this.props; + + if (name && family && this.state.fontLoaded) { + if (family === 'ArgonExtra') { + return ; + } + return ; + } + + return null; + } +} + +export default IconExtra; diff --git a/mobile-ui/components/Input.js b/mobile-ui/components/Input.js new file mode 100644 index 00000000..ee890229 --- /dev/null +++ b/mobile-ui/components/Input.js @@ -0,0 +1,76 @@ +import React from "react"; +import { StyleSheet } from "react-native"; +import PropTypes from 'prop-types'; + +import { Input } from "galio-framework"; + +import Icon from './Icon'; +import { argonTheme } from "../constants"; + +class ArInput extends React.Component { + render() { + const { shadowless, success, error } = this.props; + + const inputStyles = [ + styles.input, + !shadowless && styles.shadow, + success && styles.success, + error && styles.error, + {...this.props.style} + ]; + + return ( + + } + {...this.props} + /> + ); + } +} + +ArInput.defaultProps = { + shadowless: false, + success: false, + error: false +}; + +ArInput.propTypes = { + shadowless: PropTypes.bool, + success: PropTypes.bool, + error: PropTypes.bool +} + +const styles = StyleSheet.create({ + input: { + borderRadius: 4, + borderColor: argonTheme.COLORS.BORDER, + height: 44, + backgroundColor: '#FFFFFF' + }, + success: { + borderColor: argonTheme.COLORS.INPUT_SUCCESS, + }, + error: { + borderColor: argonTheme.COLORS.INPUT_ERROR, + }, + shadow: { + shadowColor: argonTheme.COLORS.BLACK, + shadowOffset: { width: 0, height: 1 }, + shadowRadius: 2, + shadowOpacity: 0.05, + elevation: 2, + } +}); + +export default ArInput; diff --git a/mobile-ui/components/Select.js b/mobile-ui/components/Select.js new file mode 100644 index 00000000..f18b3f8d --- /dev/null +++ b/mobile-ui/components/Select.js @@ -0,0 +1,85 @@ +import React from 'react'; +import { StyleSheet } from 'react-native'; +import PropTypes from 'prop-types'; +import ModalDropdown from 'react-native-modal-dropdown'; +import { Block, Text } from 'galio-framework'; + +import Icon from './Icon'; +import { argonTheme } from '../constants'; + +class DropDown extends React.Component { + state = { + value: 1, + } + + handleOnSelect = (index, value) => { + const { onSelect } = this.props; + + this.setState({ value: value }); + onSelect && onSelect(index, value); + } + + render() { + const { onSelect, iconName, iconFamily, iconSize, iconColor, color, textStyle, style, ...props } = this.props; + + const modalStyles = [ + styles.qty, + color && { backgroundColor: color }, + style + ]; + + const textStyles = [ + styles.text, + textStyle + ]; + + return ( + + + {this.state.value} + + + + ) + } +} + +DropDown.propTypes = { + onSelect: PropTypes.func, + iconName: PropTypes.string, + iconFamily: PropTypes.string, + iconSize: PropTypes.number, + color: PropTypes.string, + textStyle: PropTypes.any, +}; + +const styles = StyleSheet.create({ + qty: { + width: 100, + backgroundColor: argonTheme.COLORS.DEFAULT, + paddingHorizontal: 16, + paddingTop: 10, + paddingBottom:9.5, + borderRadius: 4, + shadowColor: "rgba(0, 0, 0, 0.1)", + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 4, + shadowOpacity: 1, + }, + text: { + color: argonTheme.COLORS.WHITE, + fontWeight: '600' + }, + dropdown: { + marginTop: 8, + marginLeft: -16, + width: 100, + }, +}); + +export default DropDown; diff --git a/mobile-ui/components/Switch.js b/mobile-ui/components/Switch.js new file mode 100644 index 00000000..53146832 --- /dev/null +++ b/mobile-ui/components/Switch.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { Switch, Platform } from 'react-native'; + +import argonTheme from '../constants/Theme'; + +class MkSwitch extends React.Component { + render() { + const { value, ...props } = this.props; + const thumbColor = Platform.OS === 'ios' ? null : + Platform.OS === 'android' && value ? argonTheme.COLORS.SWITCH_ON : argonTheme.COLORS.SWITCH_OFF; + + return ( + + ); + } +} + +export default MkSwitch; \ No newline at end of file diff --git a/mobile-ui/components/Tabs.js b/mobile-ui/components/Tabs.js new file mode 100644 index 00000000..bcf28621 --- /dev/null +++ b/mobile-ui/components/Tabs.js @@ -0,0 +1,159 @@ +import React from 'react'; +import { StyleSheet, Dimensions, FlatList, Animated } from 'react-native'; +import { Block, theme } from 'galio-framework'; + +const { width } = Dimensions.get('screen'); +import argonTheme from '../constants/Theme'; + +const defaultMenu = [ + { id: 'popular', title: 'Popular', }, + { id: 'beauty', title: 'Beauty', }, + { id: 'cars', title: 'Cars', }, + { id: 'motocycles', title: 'Motocycles', }, +]; + +export default class Tabs extends React.Component { + static defaultProps = { + data: defaultMenu, + initialIndex: null, + } + + state = { + active: null, + } + + componentDidMount() { + const { initialIndex } = this.props; + initialIndex && this.selectMenu(initialIndex); + } + + animatedValue = new Animated.Value(1); + + animate() { + this.animatedValue.setValue(0); + + Animated.timing(this.animatedValue, { + toValue: 1, + duration: 300, + useNativeDriver: false, // color not supported + }).start() + } + + menuRef = React.createRef(); + + onScrollToIndexFailed = () => { + this.menuRef.current.scrollToIndex({ + index: 0, + viewPosition: 0.5 + }); + } + + selectMenu = (id) => { + this.setState({ active: id }); + + this.menuRef.current.scrollToIndex({ + index: this.props.data.findIndex(item => item.id === id), + viewPosition: 0.5 + }); + + this.animate(); + this.props.onChange && this.props.onChange(id); + } + + renderItem = (item) => { + const isActive = this.state.active === item.id; + + const textColor = this.animatedValue.interpolate({ + inputRange: [0, 1], + outputRange: [argonTheme.COLORS.BLACK, isActive ? argonTheme.COLORS.WHITE : argonTheme.COLORS.BLACK], + extrapolate: 'clamp', + }); + + const containerStyles = [ + styles.titleContainer, + !isActive && { backgroundColor: argonTheme.COLORS.SECONDARY }, + isActive && styles.containerShadow + ]; + + return ( + + this.selectMenu(item.id)}> + {item.title} + + + ) + } + + renderMenu = () => { + const { data, ...props } = this.props; + + return ( + item.id} + showsHorizontalScrollIndicator={false} + onScrollToIndexFailed={this.onScrollToIndexFailed} + renderItem={({ item }) => this.renderItem(item)} + contentContainerStyle={styles.menu} + /> + ) + } + + render() { + return ( + + {this.renderMenu()} + + ) + } +} + +const styles = StyleSheet.create({ + container: { + width: width, + backgroundColor: theme.COLORS.WHITE, + zIndex: 2, + }, + shadow: { + shadowColor: theme.COLORS.BLACK, + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 8, + shadowOpacity: 0.2, + elevation: 4, + }, + menu: { + paddingHorizontal: theme.SIZES.BASE * 2.5, + paddingTop: 8, + paddingBottom: 16, + }, + titleContainer: { + alignItems: 'center', + backgroundColor: argonTheme.COLORS.ACTIVE, + borderRadius: 4, + marginRight: 9 + }, + containerShadow: { + shadowColor: 'black', + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 4, + shadowOpacity: 0.1, + elevation: 1, + }, + menuTitle: { + fontWeight: '600', + fontSize: 14, + // lineHeight: 28, + paddingVertical: 10, + paddingHorizontal: 16, + color: argonTheme.COLORS.MUTED + }, +}); diff --git a/mobile-ui/components/index.js b/mobile-ui/components/index.js new file mode 100644 index 00000000..d9410658 --- /dev/null +++ b/mobile-ui/components/index.js @@ -0,0 +1,19 @@ +import Button from './Button'; +import Card from './Card'; +import DrawerItem from './DrawerItem'; +import Icon from './Icon'; +import Header from './Header'; +import Input from './Input'; +import Switch from './Switch'; +import Select from './Select'; + +export { + Button, + Card, + DrawerItem, + Icon, + Input, + Header, + Switch, + Select +}; \ No newline at end of file diff --git a/mobile-ui/constants/Images.js b/mobile-ui/constants/Images.js new file mode 100644 index 00000000..0e9b5121 --- /dev/null +++ b/mobile-ui/constants/Images.js @@ -0,0 +1,41 @@ +// local imgs +const Onboarding = require("../assets/imgs/bg.png"); +const Logo = require("../assets/imgs/argon-logo.png"); +const LogoOnboarding = require("../assets/imgs/argon-logo-onboarding.png"); +const ProfileBackground = require("../assets/imgs/profile-screen-bg.png"); +const RegisterBackground = require("../assets/imgs/register-bg.png"); +const Pro = require("../assets/imgs/getPro-bg.png"); +const ArgonLogo = require("../assets/imgs/argonlogo.png"); +const iOSLogo = require("../assets/imgs/ios.png"); +const androidLogo = require("../assets/imgs/android.png"); +// internet imgs + +const ProfilePicture = 'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?fit=crop&w=1650&q=80'; + +const Viewed = [ + 'https://images.unsplash.com/photo-1501601983405-7c7cabaa1581?fit=crop&w=240&q=80', + 'https://images.unsplash.com/photo-1543747579-795b9c2c3ada?fit=crop&w=240&q=80', + 'https://images.unsplash.com/photo-1551798507-629020c81463?fit=crop&w=240&q=80', + 'https://images.unsplash.com/photo-1470225620780-dba8ba36b745?fit=crop&w=240&q=80', + 'https://images.unsplash.com/photo-1503642551022-c011aafb3c88?fit=crop&w=240&q=80', + 'https://images.unsplash.com/photo-1482686115713-0fbcaced6e28?fit=crop&w=240&q=80', +]; + +const Products = { + 'View article': 'https://images.unsplash.com/photo-1501601983405-7c7cabaa1581?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=840&q=840', +}; + +export default { + Onboarding, + Logo, + LogoOnboarding, + ProfileBackground, + ProfilePicture, + RegisterBackground, + Viewed, + Products, + Pro, + ArgonLogo, + iOSLogo, + androidLogo +}; \ No newline at end of file diff --git a/mobile-ui/constants/Theme.js b/mobile-ui/constants/Theme.js new file mode 100644 index 00000000..d22100d9 --- /dev/null +++ b/mobile-ui/constants/Theme.js @@ -0,0 +1,32 @@ +export default { + COLORS: { + DEFAULT: '#172B4D', + PRIMARY: '#5E72E4', + SECONDARY: '#F7FAFC', + LABEL: '#FE2472', + INFO: '#11CDEF', + ERROR: '#F5365C', + SUCCESS: '#2DCE89', + WARNING: '#FB6340', + /*not yet changed */ + MUTED: '#ADB5BD', + INPUT: '#DCDCDC', + INPUT_SUCCESS: '#7BDEB2', + INPUT_ERROR: '#FCB3A4', + ACTIVE: '#5E72E4', //same as primary + BUTTON_COLOR: '#9C26B0', //wtf + PLACEHOLDER: '#9FA5AA', + SWITCH_ON: '#5E72E4', + SWITCH_OFF: '#D4D9DD', + GRADIENT_START: '#6B24AA', + GRADIENT_END: '#AC2688', + PRICE_COLOR: '#EAD5FB', + BORDER_COLOR: '#E7E7E7', + BLOCK: '#E7E7E7', + ICON: '#172B4D', + HEADER: '#525F7F', + BORDER: '#CAD1D7', + WHITE: '#FFFFFF', + BLACK: '#000000' + } +}; \ No newline at end of file diff --git a/mobile-ui/constants/articles.js b/mobile-ui/constants/articles.js new file mode 100644 index 00000000..91861946 --- /dev/null +++ b/mobile-ui/constants/articles.js @@ -0,0 +1,29 @@ +export default [ + { + title: 'Ice cream is made with carrageenan …', + image: 'https://images.unsplash.com/photo-1516559828984-fb3b99548b21?ixlib=rb-1.2.1&auto=format&fit=crop&w=2100&q=80', + cta: 'View article', + horizontal: true + }, + { + title: 'Is makeup one of your daily esse …', + image: 'https://images.unsplash.com/photo-1519368358672-25b03afee3bf?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2004&q=80', + cta: 'View article' + }, + { + title: 'Coffee is more than just a drink: It’s …', + image: 'https://images.unsplash.com/photo-1500522144261-ea64433bbe27?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2102&q=80', + cta: 'View article' + }, + { + title: 'Fashion is a popular style, especially in …', + image: 'https://images.unsplash.com/photo-1487222477894-8943e31ef7b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1326&q=80', + cta: 'View article' + }, + { + title: 'Argon is a great free UI packag …', + image: 'https://images.unsplash.com/photo-1482686115713-0fbcaced6e28?fit=crop&w=1947&q=80', + cta: 'View article', + horizontal: true + }, +]; \ No newline at end of file diff --git a/mobile-ui/constants/index.js b/mobile-ui/constants/index.js new file mode 100644 index 00000000..1a834fc8 --- /dev/null +++ b/mobile-ui/constants/index.js @@ -0,0 +1,11 @@ +import argonTheme from './Theme'; +import articles from './articles'; +import Images from './Images'; +import tabs from './tabs'; + +export { + articles, + argonTheme, + Images, + tabs +}; \ No newline at end of file diff --git a/mobile-ui/constants/tabs.js b/mobile-ui/constants/tabs.js new file mode 100644 index 00000000..149657f4 --- /dev/null +++ b/mobile-ui/constants/tabs.js @@ -0,0 +1,8 @@ +export default tabs = { + categories: [ + { id: 'popular', title: 'Popular' }, + { id: 'beauty', title: 'Beauty' }, + { id: 'fashion', title: 'Fashion' }, + { id: 'car_motorcycle', title: 'Car & Motorcycle' }, + ], +} \ No newline at end of file diff --git a/mobile-ui/constants/utils.js b/mobile-ui/constants/utils.js new file mode 100644 index 00000000..561e5cfc --- /dev/null +++ b/mobile-ui/constants/utils.js @@ -0,0 +1,6 @@ +import { Platform, StatusBar } from 'react-native'; +import { theme } from 'galio-framework'; + +export const StatusHeight = StatusBar.currentHeight; +export const HeaderHeight = (theme.SIZES.BASE * 3.5 + (StatusHeight || 0)); +export const iPhoneX = () => Platform.OS === 'ios' && (height === 812 || width === 812); \ No newline at end of file diff --git a/mobile-ui/navigation/Menu.js b/mobile-ui/navigation/Menu.js new file mode 100644 index 00000000..fda94f77 --- /dev/null +++ b/mobile-ui/navigation/Menu.js @@ -0,0 +1,71 @@ +import { Block, Text, theme } from "galio-framework"; +import { Image, ScrollView, StyleSheet } from "react-native"; + +import { DrawerItem as DrawerCustomItem } from "../components"; +import Images from "../constants/Images"; +import React from "react"; + +function CustomDrawerContent({ + drawerPosition, + navigation, + profile, + focused, + state, + ...rest +}) { + const screens = ["Home", "Profile", "Account", "Elements", "Articles"]; + return ( + + + + + + + {screens.map((item, index) => { + return ( + + ); + })} + + + + DOCUMENTATION + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + }, + header: { + paddingHorizontal: 28, + paddingBottom: theme.SIZES.BASE, + paddingTop: theme.SIZES.BASE * 3, + justifyContent: "center", + }, +}); + +export default CustomDrawerContent; diff --git a/mobile-ui/navigation/Screens.js b/mobile-ui/navigation/Screens.js new file mode 100644 index 00000000..804a0ba7 --- /dev/null +++ b/mobile-ui/navigation/Screens.js @@ -0,0 +1,256 @@ +import { Animated, Dimensions, Easing } from "react-native"; +// header for screens +import { Header, Icon } from "../components"; +import { argonTheme, tabs } from "../constants"; + +import Articles from "../screens/Articles"; +import { Block } from "galio-framework"; +// drawer +import CustomDrawerContent from "./Menu"; +import Elements from "../screens/Elements"; +// screens +import Home from "../screens/Home"; +import Onboarding from "../screens/Onboarding"; +import Pro from "../screens/Pro"; +import Profile from "../screens/Profile"; +import React from "react"; +import Register from "../screens/Register"; +import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; +import { createDrawerNavigator } from "@react-navigation/drawer"; +import { createStackNavigator } from "@react-navigation/stack"; + +const { width } = Dimensions.get("screen"); + +const Stack = createStackNavigator(); +const Drawer = createDrawerNavigator(); +const Tab = createBottomTabNavigator(); + +function ElementsStack(props) { + return ( + + ( +
+ ), + cardStyle: { backgroundColor: "#F8F9FE" }, + }} + /> + ( +
+ ), + headerTransparent: true, + }} + /> + + ); +} + +function ArticlesStack(props) { + return ( + + ( +
+ ), + cardStyle: { backgroundColor: "#F8F9FE" }, + }} + /> + ( +
+ ), + headerTransparent: true, + }} + /> + + ); +} + +function ProfileStack(props) { + return ( + + ( +
+ ), + cardStyle: { backgroundColor: "#FFFFFF" }, + headerTransparent: true, + }} + /> + ( +
+ ), + headerTransparent: true, + }} + /> + + ); +} + +function HomeStack(props) { + return ( + + ( +
+ ), + cardStyle: { backgroundColor: "#F8F9FE" }, + }} + /> + ( +
+ ), + headerTransparent: true, + }} + /> + + ); +} + +export default function OnboardingStack(props) { + return ( + + + + + ); +} + +function AppStack(props) { + return ( + } + drawerStyle={{ + backgroundColor: "white", + width: width * 0.8, + }} + drawerContentOptions={{ + activeTintcolor: "white", + inactiveTintColor: "#000", + activeBackgroundColor: "transparent", + itemStyle: { + width: width * 0.75, + backgroundColor: "transparent", + paddingVertical: 16, + paddingHorizonal: 12, + justifyContent: "center", + alignContent: "center", + alignItems: "center", + overflow: "hidden", + }, + labelStyle: { + fontSize: 18, + marginLeft: 12, + fontWeight: "normal", + }, + }} + initialRouteName="Home" + > + + + + + + + ); +} diff --git a/mobile-ui/screens/Articles.js b/mobile-ui/screens/Articles.js new file mode 100644 index 00000000..ecb6d417 --- /dev/null +++ b/mobile-ui/screens/Articles.js @@ -0,0 +1,252 @@ +//galio +import { Block, Text, theme } from "galio-framework"; +import { + Dimensions, + Image, + ImageBackground, + ScrollView, + StyleSheet, + TouchableWithoutFeedback, +} from "react-native"; +//argon +import { Images, argonTheme, articles } from "../constants/"; + +import { Card } from "../components/"; +import React from "react"; + +const { width } = Dimensions.get("screen"); + +const thumbMeasure = (width - 48 - 32) / 3; +const cardWidth = width - theme.SIZES.BASE * 2; +const categories = [ + { + title: "Music Album", + description: + "Rock music is a genre of popular music. It developed during and after the 1960s in the United Kingdom.", + image: + "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?fit=crop&w=840&q=80", + price: "$125", + }, + { + title: "Events", + description: + "Rock music is a genre of popular music. It developed during and after the 1960s in the United Kingdom.", + image: + "https://images.unsplash.com/photo-1543747579-795b9c2c3ada?fit=crop&w=840&q=80", + price: "$35", + }, +]; + +class Articles extends React.Component { + renderProduct = (item, index) => { + const { navigation } = this.props; + + return ( + navigation.navigate("Pro", { product: item })} + > + + + + + {item.price} + + + {item.title} + + + {item.description} + + + + + ); + }; + + renderCards = () => { + return ( + + + Cards + + + + + + + + + + + + + + View article + + + + + + + + {categories && + categories.map((item, index) => + this.renderProduct(item, index) + )} + + + + + ); + }; + + renderAlbum = () => { + const { navigation } = this.props; + + return ( + + + Album + + + + navigation.navigate("Home")} + > + View All + + + + {Images.Viewed.map((img, index) => ( + + + + ))} + + + + ); + }; + + render() { + return ( + + + {this.renderCards()} + {this.renderAlbum()} + + + ); + } +} + +const styles = StyleSheet.create({ + title: { + paddingBottom: theme.SIZES.BASE, + paddingHorizontal: theme.SIZES.BASE * 2, + marginTop: 22, + color: argonTheme.COLORS.HEADER, + }, + group: { + paddingTop: theme.SIZES.BASE, + }, + albumThumb: { + borderRadius: 4, + marginVertical: 4, + alignSelf: "center", + width: thumbMeasure, + height: thumbMeasure, + }, + category: { + backgroundColor: theme.COLORS.WHITE, + marginVertical: theme.SIZES.BASE / 2, + borderWidth: 0, + }, + categoryTitle: { + height: "100%", + paddingHorizontal: theme.SIZES.BASE, + backgroundColor: "rgba(0, 0, 0, 0.5)", + justifyContent: "center", + alignItems: "center", + }, + imageBlock: { + overflow: "hidden", + borderRadius: 4, + }, + productItem: { + width: cardWidth - theme.SIZES.BASE * 2, + marginHorizontal: theme.SIZES.BASE, + shadowColor: "black", + shadowOffset: { width: 0, height: 7 }, + shadowRadius: 10, + shadowOpacity: 0.2, + }, + productImage: { + width: cardWidth - theme.SIZES.BASE, + height: cardWidth - theme.SIZES.BASE, + borderRadius: 3, + }, + productPrice: { + paddingTop: theme.SIZES.BASE, + paddingBottom: theme.SIZES.BASE / 2, + }, + productDescription: { + paddingTop: theme.SIZES.BASE, + // paddingBottom: theme.SIZES.BASE * 2, + }, +}); + +export default Articles; diff --git a/mobile-ui/screens/Elements.js b/mobile-ui/screens/Elements.js new file mode 100644 index 00000000..7a73d80e --- /dev/null +++ b/mobile-ui/screens/Elements.js @@ -0,0 +1,487 @@ +// Galio components +import { Block, Button as GaButton, Text, theme } from "galio-framework"; +import { Button, Header, Icon, Input, Select, Switch } from "../components/"; +import { + Dimensions, + ScrollView, + StyleSheet, + TouchableOpacity, +} from "react-native"; +// Argon themed components +import { argonTheme, tabs } from "../constants/"; + +import React from "react"; + +const { width } = Dimensions.get("screen"); + +class Elements extends React.Component { + state = { + "switch-1": true, + "switch-2": false, + }; + + toggleSwitch = (switchId) => + this.setState({ [switchId]: !this.state[switchId] }); + + renderButtons = () => { + return ( + + + Buttons + + + + + + + + + + + + + + + + + + + + + + + + + + } /> + + + } + /> + + + + } + /> + + + + } + /> + + + + + + } + /> + + + + + + } + /> + + + ); + }; + + renderSwitches = () => { + return ( + + + Switches + + + + Switch is ON + this.toggleSwitch("switch-1")} + /> + + + Switch is OFF + this.toggleSwitch("switch-2")} + /> + + + + ); + }; + + renderTableCell = () => { + const { navigation } = this.props; + return ( + + + Table Cell + + + + navigation.navigate("Pro")}> + + Manage Options + + + + + + + ); + }; + + renderSocial = () => { + return ( + + + Social + + + + + + + + + + + + + + + + ); + }; + + renderNavigation = () => { + return ( + + + Navigation + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + + ); + }; + + render() { + return ( + + + {this.renderButtons()} + {this.renderText()} + {this.renderInputs()} + {this.renderSocial()} + {this.renderSwitches()} + {this.renderNavigation()} + {this.renderTableCell()} + + + ); + } +} + +const styles = StyleSheet.create({ + title: { + paddingBottom: theme.SIZES.BASE, + paddingHorizontal: theme.SIZES.BASE * 2, + marginTop: 44, + color: argonTheme.COLORS.HEADER, + }, + group: { + paddingTop: theme.SIZES.BASE * 2, + }, + shadow: { + shadowColor: "black", + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 4, + shadowOpacity: 0.2, + elevation: 2, + }, + button: { + marginBottom: theme.SIZES.BASE, + width: width - theme.SIZES.BASE * 2, + }, + optionsButton: { + width: "auto", + height: 34, + paddingHorizontal: theme.SIZES.BASE, + paddingVertical: 10, + }, + input: { + borderBottomWidth: 1, + }, + inputDefault: { + borderBottomColor: argonTheme.COLORS.PLACEHOLDER, + }, + inputTheme: { + borderBottomColor: argonTheme.COLORS.PRIMARY, + }, + inputInfo: { + borderBottomColor: argonTheme.COLORS.INFO, + }, + inputSuccess: { + borderBottomColor: argonTheme.COLORS.SUCCESS, + }, + inputWarning: { + borderBottomColor: argonTheme.COLORS.WARNING, + }, + inputDanger: { + borderBottomColor: argonTheme.COLORS.ERROR, + }, + social: { + width: theme.SIZES.BASE * 3.5, + height: theme.SIZES.BASE * 3.5, + borderRadius: theme.SIZES.BASE * 1.75, + justifyContent: "center", + }, +}); + +export default Elements; diff --git a/mobile-ui/screens/Home.js b/mobile-ui/screens/Home.js new file mode 100644 index 00000000..36a699e0 --- /dev/null +++ b/mobile-ui/screens/Home.js @@ -0,0 +1,47 @@ +import React from 'react'; +import { StyleSheet, Dimensions, ScrollView } from 'react-native'; +import { Block, theme } from 'galio-framework'; + +import { Card } from '../components'; +import articles from '../constants/articles'; +const { width } = Dimensions.get('screen'); + +class Home extends React.Component { + renderArticles = () => { + return ( + + + + + + + + + + + + ) + } + + render() { + return ( + + {this.renderArticles()} + + ); + } +} + +const styles = StyleSheet.create({ + home: { + width: width, + }, + articles: { + width: width - theme.SIZES.BASE * 2, + paddingVertical: theme.SIZES.BASE, + }, +}); + +export default Home; diff --git a/mobile-ui/screens/Onboarding.js b/mobile-ui/screens/Onboarding.js new file mode 100644 index 00000000..983d550b --- /dev/null +++ b/mobile-ui/screens/Onboarding.js @@ -0,0 +1,99 @@ +import React from "react"; +import { + ImageBackground, + Image, + StyleSheet, + StatusBar, + Dimensions +} from "react-native"; +import { Block, Button, Text, theme } from "galio-framework"; + +const { height, width } = Dimensions.get("screen"); + +import argonTheme from "../constants/Theme"; +import Images from "../constants/Images"; + +class Onboarding extends React.Component { + render() { + const { navigation } = this.props; + + return ( + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + backgroundColor: theme.COLORS.BLACK + }, + padded: { + paddingHorizontal: theme.SIZES.BASE * 2, + position: "relative", + bottom: theme.SIZES.BASE, + zIndex: 2, + }, + button: { + width: width - theme.SIZES.BASE * 4, + height: theme.SIZES.BASE * 3, + shadowRadius: 0, + shadowOpacity: 0 + }, + logo: { + width: 200, + height: 60, + zIndex: 2, + position: 'relative', + marginTop: '-50%' + }, + title: { + marginTop:'-5%' + }, + subTitle: { + marginTop: 20 + } +}); + +export default Onboarding; diff --git a/mobile-ui/screens/Pro.js b/mobile-ui/screens/Pro.js new file mode 100644 index 00000000..ef914e7c --- /dev/null +++ b/mobile-ui/screens/Pro.js @@ -0,0 +1,100 @@ +import React from 'react'; +import { ImageBackground, Image, StyleSheet, StatusBar, Dimensions, Platform, Linking } from 'react-native'; +import { Block, Button, Text, theme } from 'galio-framework'; + +const { height, width } = Dimensions.get('screen'); +import { Images, argonTheme } from '../constants/'; +import { HeaderHeight } from "../constants/utils"; + +export default class Pro extends React.Component { + render() { + const { navigation } = this.props; + + return ( + + + + + + + + + + + + Argon + + + Design + + + System + + PRO + + + + + Take advantage of all the features and screens made upon Galio Design System, coded on React Native for both. + + + + + + + + + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + backgroundColor: theme.COLORS.BLACK, + marginTop: Platform.OS === 'android' ? -HeaderHeight : 0, + }, + padded: { + paddingHorizontal: theme.SIZES.BASE * 2, + zIndex: 3, + position: 'absolute', + bottom: Platform.OS === 'android' ? theme.SIZES.BASE * 2 : theme.SIZES.BASE * 3, + }, + button: { + width: width - theme.SIZES.BASE * 4, + height: theme.SIZES.BASE * 3, + shadowRadius: 0, + shadowOpacity: 0, + }, + pro: { + backgroundColor: argonTheme.COLORS.INFO, + paddingHorizontal: 8, + marginLeft: 3, + borderRadius: 4, + height: 22, + marginTop: 15 + }, + gradient: { + zIndex: 1, + position: 'absolute', + bottom: 0, + left: 0, + right: 0, + height: 66, + }, +}); diff --git a/mobile-ui/screens/Profile.js b/mobile-ui/screens/Profile.js new file mode 100644 index 00000000..e70150fa --- /dev/null +++ b/mobile-ui/screens/Profile.js @@ -0,0 +1,342 @@ +import React from "react"; +import { + StyleSheet, + Dimensions, + ScrollView, + Image, + ImageBackground, + Platform +} from "react-native"; +import { Block, Text, theme } from "galio-framework"; + +import { Button } from "../components"; +import { Images, argonTheme } from "../constants"; +import { HeaderHeight } from "../constants/utils"; + +const { width, height } = Dimensions.get("screen"); + +const thumbMeasure = (width - 48 - 32) / 3; + +class Profile extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + 2K + + Orders + + + + 10 + + Photos + + + + 89 + + Comments + + + + + + + Jessica Jones, 27 + + + San Francisco, USA + + + + + + + + An artist of considerable range, Jessica name taken by + Melbourne … + + + + + + Album + + + + + + {Images.Viewed.map((img, imgIndex) => ( + + ))} + + + + + + + + {/* + + + + + + + + + + + + + + 2K + + Orders + + + + 10 + + Photos + + + + 89 + + Comments + + + + + + + Jessica Jones, 27 + + + San Francisco, USA + + + + + + + + An artist of considerable range, Jessica name taken by + Melbourne … + + + + + + Album + + + + + + + + {Images.Viewed.map((img, imgIndex) => ( + + ))} + + + + + */} + + ); + } +} + +const styles = StyleSheet.create({ + profile: { + marginTop: Platform.OS === "android" ? -HeaderHeight : 0, + // marginBottom: -HeaderHeight * 2, + flex: 1 + }, + profileContainer: { + width: width, + height: height, + padding: 0, + zIndex: 1 + }, + profileBackground: { + width: width, + height: height / 2 + }, + profileCard: { + // position: "relative", + padding: theme.SIZES.BASE, + marginHorizontal: theme.SIZES.BASE, + marginTop: 65, + borderTopLeftRadius: 6, + borderTopRightRadius: 6, + backgroundColor: theme.COLORS.WHITE, + shadowColor: "black", + shadowOffset: { width: 0, height: 0 }, + shadowRadius: 8, + shadowOpacity: 0.2, + zIndex: 2 + }, + info: { + paddingHorizontal: 40 + }, + avatarContainer: { + position: "relative", + marginTop: -80 + }, + avatar: { + width: 124, + height: 124, + borderRadius: 62, + borderWidth: 0 + }, + nameInfo: { + marginTop: 35 + }, + divider: { + width: "90%", + borderWidth: 1, + borderColor: "#E9ECEF" + }, + thumb: { + borderRadius: 4, + marginVertical: 4, + alignSelf: "center", + width: thumbMeasure, + height: thumbMeasure + } +}); + +export default Profile; diff --git a/mobile-ui/screens/Register.js b/mobile-ui/screens/Register.js new file mode 100644 index 00000000..c6e8f7ed --- /dev/null +++ b/mobile-ui/screens/Register.js @@ -0,0 +1,215 @@ +import React from "react"; +import { + StyleSheet, + ImageBackground, + Dimensions, + StatusBar, + KeyboardAvoidingView +} from "react-native"; +import { Block, Checkbox, Text, theme } from "galio-framework"; + +import { Button, Icon, Input } from "../components"; +import { Images, argonTheme } from "../constants"; + +const { width, height } = Dimensions.get("screen"); + +class Register extends React.Component { + render() { + return ( + + + ); + } +} + +const styles = StyleSheet.create({ + registerContainer: { + width: width * 0.9, + height: height * 0.875, + backgroundColor: "#F4F5F7", + borderRadius: 4, + shadowColor: argonTheme.COLORS.BLACK, + shadowOffset: { + width: 0, + height: 4 + }, + shadowRadius: 8, + shadowOpacity: 0.1, + elevation: 1, + overflow: "hidden" + }, + socialConnect: { + backgroundColor: argonTheme.COLORS.WHITE, + borderBottomWidth: StyleSheet.hairlineWidth, + borderColor: "#8898AA" + }, + socialButtons: { + width: 120, + height: 40, + backgroundColor: "#fff", + shadowColor: argonTheme.COLORS.BLACK, + shadowOffset: { + width: 0, + height: 4 + }, + shadowRadius: 8, + shadowOpacity: 0.1, + elevation: 1 + }, + socialTextButtons: { + color: argonTheme.COLORS.PRIMARY, + fontWeight: "800", + fontSize: 14 + }, + inputIcons: { + marginRight: 12 + }, + passwordCheck: { + paddingLeft: 15, + paddingTop: 13, + paddingBottom: 30 + }, + createButton: { + width: width * 0.5, + marginTop: 25 + } +}); + +export default Register; diff --git a/web-ui/.DS_Store b/web-ui/.DS_Store index 9cb9d1f0..d3460a56 100644 Binary files a/web-ui/.DS_Store and b/web-ui/.DS_Store differ diff --git a/web-ui/web-react/src/components/LogIn.js b/web-ui/web-react/src/components/LogIn.js index 7416381b..2afab231 100644 --- a/web-ui/web-react/src/components/LogIn.js +++ b/web-ui/web-react/src/components/LogIn.js @@ -1,15 +1,19 @@ import React from 'react'; +import { InputText } from 'primereact/inputtext'; const LogIn = () => { return(
- {/* - setFloatValue(e.target.value)} /> + + + - */} +
) + + //value={floatValue} onChange={(e) => setFloatValue(e.target.value)} } export default LogIn \ No newline at end of file