@bigbinary/neetoui-rn 0.0.13 → 0.0.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/README.md CHANGED
@@ -10,6 +10,18 @@ Native products built at [BigBinary](https://www.bigbinary.com).
10
10
  yarn add @bigbinary/neetoui-rn
11
11
  ```
12
12
 
13
+ To link the library, run:
14
+
15
+ ```sh
16
+ react-native link
17
+ ```
18
+
19
+ or
20
+
21
+ ```sh
22
+ npx react-native link
23
+ ```
24
+
13
25
  ## Development
14
26
 
15
27
  Install all the dependencies by executing following command.
Binary file
Binary file
@@ -17,7 +17,7 @@ export const Container = ({ children, ...rest }) => {
17
17
  };
18
18
 
19
19
  Container.defaultProps = {
20
- color: "background.default",
20
+ color: "background.primary",
21
21
  };
22
22
 
23
23
  Container.propTypes = {
@@ -30,7 +30,7 @@ import { Typography } from "./Typography";
30
30
 
31
31
  export const Body = ({ children, ...rest }) => {
32
32
  return (
33
- <Typography fontSize="body" fontFamily="regular" {...rest}>
33
+ <Typography fontSize="body" {...rest}>
34
34
  {children}
35
35
  </Typography>
36
36
  );
@@ -30,7 +30,7 @@ import { Typography } from "./Typography";
30
30
 
31
31
  export const Caption1 = ({ children, ...rest }) => {
32
32
  return (
33
- <Typography fontSize="caption1" fontFamily="regular" {...rest}>
33
+ <Typography fontSize="caption1" {...rest}>
34
34
  {children}
35
35
  </Typography>
36
36
  );
@@ -30,7 +30,7 @@ import { Typography } from "./Typography";
30
30
 
31
31
  export const Caption2 = ({ children, ...rest }) => {
32
32
  return (
33
- <Typography fontSize="caption2" fontFamily="regular" {...rest}>
33
+ <Typography fontSize="caption2" {...rest}>
34
34
  {children}
35
35
  </Typography>
36
36
  );
@@ -30,7 +30,7 @@ import { Typography } from "./Typography";
30
30
 
31
31
  export const LargeTitle = ({ children, ...rest }) => {
32
32
  return (
33
- <Typography fontSize="largeTitle" fontFamily="bold" {...rest}>
33
+ <Typography fontSize="largeTitle" {...rest}>
34
34
  {children}
35
35
  </Typography>
36
36
  );
@@ -30,7 +30,7 @@ import { Typography } from "./Typography";
30
30
 
31
31
  export const Title1 = ({ children, ...rest }) => {
32
32
  return (
33
- <Typography fontSize="title1" fontFamily="bold" {...rest}>
33
+ <Typography fontSize="title1" {...rest}>
34
34
  {children}
35
35
  </Typography>
36
36
  );
@@ -30,7 +30,7 @@ import { Typography } from "./Typography";
30
30
 
31
31
  export const Title2 = ({ children, ...rest }) => {
32
32
  return (
33
- <Typography fontSize="title2" fontFamily="bold" {...rest}>
33
+ <Typography fontSize="title2" {...rest}>
34
34
  {children}
35
35
  </Typography>
36
36
  );
@@ -5,9 +5,6 @@ export { Typography } from "./Typography/Typography";
5
5
  export { LargeTitle } from "./Typography/LargeTitle";
6
6
  export { Title1 } from "./Typography/Title1";
7
7
  export { Title2 } from "./Typography/Title2";
8
- export { Title3 } from "./Typography/Title3";
9
- export { Headline } from "./Typography/Headline";
10
8
  export { Body } from "./Typography/Body";
11
- export { Callout } from "./Typography/Callout";
12
9
  export { Caption1 } from "./Typography/Caption1";
13
10
  export { Caption2 } from "./Typography/Caption2";
@@ -1,59 +1,69 @@
1
- import { moderateScale } from "react-native-size-matters";
1
+ const defaultColors = {
2
+ white: "#ffffff",
3
+ black: "#000000",
4
+ base: "#2f3941",
5
+ danger: "#ff6969",
6
+ };
2
7
 
3
- const baseTheme = {
4
- colors: {
5
- font: {
6
- default: "#FFFFFF",
7
- base: "#2F3941",
8
- primary: "#1B1F23",
9
- secondary: "#676767",
10
- danger: "#FF6969",
11
- },
12
- background: {
13
- default: "#FFFFFF",
14
- base: "#2F3941",
15
- primary: "#E4E4E7",
16
- secondary: "#E9EBED",
17
- },
18
- card: {
19
- default: "#FFFFFF",
20
- base: "#2F3941",
21
- primary: "#F8F9F9",
22
- secondary: "#E9EBED",
23
- },
24
- border: {
25
- default: "#FFFFFF",
26
- base: "#2F3941",
27
- primary: "#E4E4E7",
28
- danger: "#FF6969",
29
- },
8
+ const greyVarients = {
9
+ grey: "#828282",
10
+ grey100: "#f8f9f9",
11
+ grey200: "#e9ebed",
12
+ grey300: "#d8dcde",
13
+ grey400: "#c2c8cc",
14
+ grey500: "#87929d",
15
+ grey600: "#68737d",
16
+ grey800: "#2f3941",
17
+ };
18
+
19
+ const colors = {
20
+ font: {
21
+ primary: "#1b1f23",
22
+ secondary: "#828282",
23
+ ...defaultColors,
24
+ ...greyVarients,
25
+ },
26
+ background: {
27
+ primary: "#ffffff",
28
+ secondary: "#e4e4e7",
29
+ ...defaultColors,
30
+ ...greyVarients,
31
+ },
32
+ border: {
33
+ primary: "#e4e4e7",
34
+ ...greyVarients,
35
+ ...defaultColors,
30
36
  },
37
+ };
38
+
39
+ const baseTheme = {
40
+ colors,
31
41
  fonts: {
32
42
  // We can add below commented fonts later as follows. Also add font faces in index.web.js for the web.
33
43
  // https://www.bigbinary.com/learn-react-native/adding-custom-fonats
34
44
 
35
- // thin: "Inter-Thin",
36
- // extraLight: "Inter-ExtraLight",
37
- // light: "Inter-Light",
38
- // medium: "Inter-Medium",
39
- // semiBold: "Inter-SemiBold",
40
- // extraBold: "Inter-ExtraBold",
41
- // black: "Inter-Black",
45
+ // inter100: "Inter-Thin",
46
+ // inter200: "Inter-ExtraLight",
47
+ // inter300: "Inter-Light",
48
+ // inter500: "Inter-Medium",
49
+ // inter600: "Inter-SemiBold",
50
+ // inter800: "Inter-ExtraBold",
51
+ // inter900: "Inter-Black",
42
52
 
43
- regular: "Inter-Regular",
44
- bold: "Inter-Bold",
53
+ inter400: "Inter-Regular",
54
+ inter700: "Inter-Bold",
45
55
  },
46
56
  lineHeights: [24],
47
57
  fontSizes: {
48
- largeTitle: moderateScale(32),
49
- title1: moderateScale(24),
50
- title2: moderateScale(18),
51
- title3: moderateScale(18),
52
- headline: moderateScale(14),
53
- body: moderateScale(14),
54
- callout: moderateScale(12),
55
- caption1: moderateScale(12),
56
- caption2: moderateScale(10),
58
+ largeTitle: 32,
59
+ title1: 24,
60
+ title2: 18,
61
+ title3: 18,
62
+ headline: 14,
63
+ body: 14,
64
+ callout: 12,
65
+ caption1: 12,
66
+ caption2: 10,
57
67
  },
58
68
  };
59
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neetoui-rn",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "main": "lib/index.js",
5
5
  "author": "BigBinary",
6
6
  "license": "MIT",
@@ -26,7 +26,9 @@
26
26
  "web": "yarn prestart && webpack serve --mode=development --config webpack.config.js"
27
27
  },
28
28
  "files": [
29
- "lib"
29
+ "lib",
30
+ "react-native.config.js",
31
+ "assets"
30
32
  ],
31
33
  "husky": {
32
34
  "hooks": {
@@ -43,7 +45,6 @@
43
45
  "peerDependencies": {},
44
46
  "dependencies": {
45
47
  "@styled-system/prop-types": "^5.1.5",
46
- "react-native-size-matters": "^0.4.0",
47
48
  "styled-components": "^5.3.3",
48
49
  "styled-system": "^5.1.5"
49
50
  },
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ project: {
3
+ ios: {},
4
+ android: {},
5
+ },
6
+ assets: ["./assets/fonts/"],
7
+ dependency: {
8
+ assets: ["./assets/fonts/"],
9
+ },
10
+ };
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import PropTypes from "prop-types";
3
-
4
- import { Typography } from "./Typography";
5
-
6
- // @component-group Typography Components
7
-
8
- /**
9
- * Callout component is built on top of typography component with default font family and font size.
10
- *
11
- * ## Usage
12
- * ```js
13
- * import * as React from 'react';
14
- * import { Callout, Container } from '@bigbinary/neetoui-rn';
15
- *
16
- * export default function Main() {
17
- * return (
18
- * <Container>
19
- * <Callout>
20
- * This is basic example of Callout
21
- * </Callout>
22
- * </Container>
23
- * );
24
- * }
25
- *
26
- * ```
27
- *
28
- * @extends StyledSystems props /styled-system
29
- */
30
-
31
- export const Callout = ({ children, ...rest }) => {
32
- return (
33
- <Typography fontSize="callout" fontFamily="bold" {...rest}>
34
- {children}
35
- </Typography>
36
- );
37
- };
38
-
39
- Callout.propTypes = {
40
- ...Typography.propTypes,
41
- children: PropTypes.node.isRequired,
42
- };
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import PropTypes from "prop-types";
3
-
4
- import { Typography } from "./Typography";
5
-
6
- // @component-group Typography Components
7
-
8
- /**
9
- * Headline component is built on top of typography component with default font family and font size.
10
- *
11
- * ## Usage
12
- * ```js
13
- * import * as React from 'react';
14
- * import { Headline, Container } from '@bigbinary/neetoui-rn';
15
- *
16
- * export default function Main() {
17
- * return (
18
- * <Container>
19
- * <Headline>
20
- * This is basic example of Headline
21
- * </Headline>
22
- * </Container>
23
- * );
24
- * }
25
- *
26
- * ```
27
- *
28
- * @extends StyledSystems props /styled-system
29
- */
30
-
31
- export const Headline = ({ children, ...rest }) => {
32
- return (
33
- <Typography fontSize="headline" fontFamily="bold" {...rest}>
34
- {children}
35
- </Typography>
36
- );
37
- };
38
-
39
- Headline.propTypes = {
40
- ...Typography.propTypes,
41
- children: PropTypes.node.isRequired,
42
- };
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import PropTypes from "prop-types";
3
-
4
- import { Typography } from "./Typography";
5
-
6
- // @component-group Typography Components
7
-
8
- /**
9
- * Title3 component is built on top of typography component with default font family and font size.
10
- *
11
- * ## Usage
12
- * ```js
13
- * import * as React from 'react';
14
- * import { Title3, Container } from '@bigbinary/neetoui-rn';
15
- *
16
- * export default function Main() {
17
- * return (
18
- * <Container>
19
- * <Title3>
20
- * This is basic example of Title3
21
- * </Title3>
22
- * </Container>
23
- * );
24
- * }
25
- *
26
- * ```
27
- *
28
- * @extends StyledSystems props /styled-system
29
- */
30
-
31
- export const Title3 = ({ children, ...rest }) => {
32
- return (
33
- <Typography fontSize="title3" fontFamily="regular" {...rest}>
34
- {children}
35
- </Typography>
36
- );
37
- };
38
-
39
- Title3.propTypes = {
40
- ...Typography.propTypes,
41
- children: PropTypes.node.isRequired,
42
- };