react-native-boxes 1.2.12 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -23,15 +23,14 @@
23
23
  "url": "https://github.com/shiveshnavin/react-native-boxes/issues"
24
24
  },
25
25
  "homepage": "https://github.com/shiveshnavin/react-native-boxes#readme",
26
- "dependencies": {},
27
26
  "devDependencies": {
28
27
  "@expo/vector-icons": "^13.0.0",
29
- "react": "^18.2.0",
30
- "react-native": "^0.73.6",
31
- "react-native-safe-area-context": "^4.9.0",
32
28
  "@tsconfig/react-native": "^3.0.4",
33
29
  "@types/jest": "^29.5.12",
34
30
  "@types/react": "^18.2.71",
31
+ "react": "^18.2.0",
32
+ "react-native": "^0.73.6",
33
+ "react-native-safe-area-context": "^4.9.0",
35
34
  "typescript": "^5.4.3"
36
35
  }
37
36
  }
@@ -0,0 +1,24 @@
1
+ import { StatusBar } from 'expo-status-bar';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+ import { DemoScreen, Theme, ThemeContext } from './react-native-boxes'
4
+ import { SafeAreaProvider } from 'react-native-safe-area-context';
5
+ 2
6
+ export default function App() {
7
+ const theme = new Theme()
8
+ return (
9
+ <ThemeContext.Provider value={theme}>
10
+ <SafeAreaProvider>
11
+ <DemoScreen />
12
+ </SafeAreaProvider>
13
+ </ThemeContext.Provider>
14
+ );
15
+ }
16
+
17
+ const styles = StyleSheet.create({
18
+ container: {
19
+ flex: 1,
20
+ backgroundColor: '#fff',
21
+ alignItems: 'center',
22
+ justifyContent: 'center',
23
+ },
24
+ });
@@ -0,0 +1,127 @@
1
+ import { StyleSheet } from "react-native";
2
+
3
+ export const Dimens = {
4
+ space: {
5
+ xs: 1,
6
+ sm: 5,
7
+ md: 10,
8
+ lg: 20,
9
+ xl: 50,
10
+ },
11
+ font: {
12
+ sm: 12,
13
+ md: 14,
14
+ lg: 16,
15
+ xl: 24,
16
+ },
17
+ icon: {
18
+ sm: 12,
19
+ md: 20,
20
+ lg: 30,
21
+ xl: 50,
22
+ xxl: 80,
23
+ }
24
+ }
25
+
26
+ export const Fonts = {
27
+ Regular: 'Regular',
28
+ Bold: 'Bold',
29
+ Styled: 'Styled',
30
+ }
31
+
32
+ export const Colors = {
33
+ accent: '#1976D2',
34
+ accentLight: '#2196F3',
35
+ text: '#444444',
36
+ caption: '#A9A9A9',
37
+ heading: '#222222',
38
+ background: '#E6E6E6',
39
+ forground: '#fff',
40
+ transparent: 'transparent',
41
+ semitransparent: '#111a1a1c',
42
+ info: '#2196F3',
43
+ success: '#4CAF50',
44
+ warning: '#FFA726',
45
+ critical: '#F44336',
46
+ invert: {
47
+ text: '#fff',
48
+ caption: '#fff',
49
+ heading: '#fff',
50
+ background: '#1a1a1c'
51
+ }
52
+ }
53
+
54
+ export const LightColors = Colors
55
+
56
+ export const DarkColors = {
57
+ accent: '#1976D2',
58
+ accentLight: '#2196F3',
59
+ text: '#f2f2f2',
60
+ caption: '#565656',
61
+ heading: '#dddddd',
62
+ background: '#212121',
63
+ forground: '#191919',
64
+ transparent: 'transparent',
65
+ semitransparent: '#111a1a1c',
66
+ info: '#2196F3',
67
+ success: '#4CAF50',
68
+ warning: '#FFA726',
69
+ critical: '#F44336',
70
+ invert: {
71
+ text: '#fff',
72
+ caption: '#fff',
73
+ heading: '#fff',
74
+ background: '#E6E6E6'
75
+ }
76
+ }
77
+
78
+ export function extendValues(
79
+ dimens: typeof Dimens,
80
+ colors: typeof Colors,
81
+ fonts: typeof Fonts): {
82
+ dimens: typeof Dimens,
83
+ colors: typeof Colors,
84
+ fonts: typeof Fonts
85
+ } {
86
+ return {
87
+ dimens: Object.assign(dimens || {}, Dimens),
88
+ colors: Object.assign(colors || {}, Colors),
89
+ fonts: Object.assign(fonts || {}, Fonts),
90
+ }
91
+ }
92
+
93
+ export function createStyle(
94
+ dimens: typeof Dimens,
95
+ colors: typeof Colors,
96
+ fonts: typeof Fonts) {
97
+
98
+ const Styles = StyleSheet.create({
99
+ safeAreaInset: {
100
+ top: dimens.space.md,
101
+ left: 0,
102
+ right: 0,
103
+ bottom: dimens.space.md,
104
+ },
105
+ full: {
106
+ height: '100%',
107
+ width: '100%'
108
+ },
109
+ container: {
110
+ marginTop: dimens.space.xl,
111
+ backgroundColor: colors.background,
112
+ },
113
+ center: {
114
+ alignContent: 'center',
115
+ justifyContent: 'center'
116
+ },
117
+ textHead: {
118
+ color: colors.text,
119
+ fontSize: dimens.font.xl,
120
+ },
121
+ text: {
122
+ fontFamily: fonts.Regular,
123
+ fontSize: dimens.font.md,
124
+ }
125
+ });
126
+ return Styles
127
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "expo": {
3
+ "name": "sample-app",
4
+ "slug": "sample-app",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "icon": "./assets/icon.png",
8
+ "userInterfaceStyle": "light",
9
+ "splash": {
10
+ "image": "./assets/splash.png",
11
+ "resizeMode": "contain",
12
+ "backgroundColor": "#ffffff"
13
+ },
14
+ "assetBundlePatterns": [
15
+ "**/*"
16
+ ],
17
+ "ios": {
18
+ "supportsTablet": true
19
+ },
20
+ "android": {
21
+ "adaptiveIcon": {
22
+ "foregroundImage": "./assets/adaptive-icon.png",
23
+ "backgroundColor": "#ffffff"
24
+ }
25
+ },
26
+ "web": {
27
+ "favicon": "./assets/favicon.png"
28
+ }
29
+ }
30
+ }
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ module.exports = function(api) {
2
+ api.cache(true);
3
+ return {
4
+ presets: ['babel-preset-expo'],
5
+ };
6
+ };
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "sample-app",
3
+ "version": "1.0.0",
4
+ "main": "node_modules/expo/AppEntry.js",
5
+ "scripts": {
6
+ "start": "expo start",
7
+ "android": "expo start --android",
8
+ "ios": "expo start --ios",
9
+ "web": "expo start --web"
10
+ },
11
+ "dependencies": {
12
+ "@expo/metro-runtime": "~3.1.3",
13
+ "@expo/vector-icons": "^13.0.0",
14
+ "expo": "~50.0.14",
15
+ "expo-status-bar": "~1.11.1",
16
+ "react": "18.2.0",
17
+ "react-dom": "18.2.0",
18
+ "react-native": "0.73.6",
19
+ "react-native-safe-area-context": "^4.9.0",
20
+ "react-native-web": "~0.19.6"
21
+ },
22
+ "devDependencies": {
23
+ "@babel/core": "^7.20.0",
24
+ "@types/react": "~18.2.45",
25
+ "typescript": "^5.1.3"
26
+ },
27
+ "private": true
28
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "strict": true
5
+ }
6
+ }