@paygreen/pgui 2.1.1 → 2.1.2
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 +38 -22
- package/dist/cjs/index.js +42232 -2669
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/FormGroup/index.d.ts +1 -1
- package/dist/cjs/types/components/SearchInput/index.d.ts +11 -0
- package/dist/cjs/types/components/Select/index.d.ts +114 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
- package/dist/{esm/types/theme/components/Button.d.ts → cjs/types/theme/components/button.d.ts} +2 -1
- package/dist/cjs/types/theme/components/index.d.ts +4 -0
- package/dist/{esm/types/theme/components/Input.d.ts → cjs/types/theme/components/input.d.ts} +2 -1
- package/dist/{esm/types/theme/components/Tag.d.ts → cjs/types/theme/components/tag.d.ts} +2 -1
- package/dist/cjs/types/theme/foundations/index.d.ts +86 -0
- package/dist/cjs/types/theme/index.d.ts +1 -1
- package/dist/cjs/types/theme/theme.d.ts +1 -0
- package/dist/esm/index.js +42209 -2671
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/FormGroup/index.d.ts +1 -1
- package/dist/esm/types/components/SearchInput/index.d.ts +11 -0
- package/dist/esm/types/components/Select/index.d.ts +114 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
- package/dist/{cjs/types/theme/components/Button.d.ts → esm/types/theme/components/button.d.ts} +2 -1
- package/dist/esm/types/theme/components/index.d.ts +4 -0
- package/dist/{cjs/types/theme/components/Input.d.ts → esm/types/theme/components/input.d.ts} +2 -1
- package/dist/{cjs/types/theme/components/Tag.d.ts → esm/types/theme/components/tag.d.ts} +2 -1
- package/dist/esm/types/theme/foundations/index.d.ts +86 -0
- package/dist/esm/types/theme/index.d.ts +1 -1
- package/dist/esm/types/theme/theme.d.ts +1 -0
- package/dist/index.d.ts +134 -3
- package/package.json +13 -8
package/README.md
CHANGED
|
@@ -7,39 +7,55 @@ ___
|
|
|
7
7
|
To setup PGUI in a local environment, please install the package in your target project.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm i
|
|
10
|
+
npm i @paygreen/pgui
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
When this is done, you will need to link Chakra UI
|
|
13
|
+
When this is done, you will need to link Chakra UI and React packages from your target project to PGUI and then link PGUI to your target project as the schema explains here.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"link-local-lib": "npm link {path_from_your_app/node_modules/@chakra-ui/react}",
|
|
21
|
-
...
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
And then run
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
To do that please follow these steps
|
|
18
|
+
|
|
19
|
+
1. in ```/target_app/node_modules/@chakra-ui/react```, this will create 1st symlink to @chakra-ui/react
|
|
26
20
|
```bash
|
|
27
|
-
npm
|
|
21
|
+
npm link
|
|
28
22
|
```
|
|
29
|
-
Don't forget to do this command every time you install or remove a package or your node_modules.
|
|
30
23
|
|
|
31
|
-
|
|
24
|
+
2. in ```/target_app/node_modules/react```, this will create 2nd symlink react
|
|
25
|
+
```bash
|
|
26
|
+
npm link
|
|
27
|
+
```
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
3. in ```/pgui```, this will create 3rd symlink to pgui library
|
|
34
30
|
```bash
|
|
35
31
|
npm link
|
|
36
32
|
```
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
4. in ```/pgui```, this will link your local packages @chakra-ui/react and react
|
|
35
|
+
```bash
|
|
36
|
+
npm run link-local-package
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
5. in ```/pgui```, this will build your project
|
|
40
|
+
```bash
|
|
41
|
+
npm run build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
6. in ```/target_app```, this will link pgui to your local app directory
|
|
38
45
|
```bash
|
|
39
|
-
npm link pgui
|
|
46
|
+
npm link @paygreen/pgui
|
|
40
47
|
```
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
7. it should works well, you just now have to link your theme with the one on PGUI on yiour ChakraProvider in your target project, and then use the components you need! 🥳
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
import { ChakraProvider } from '@chakra-ui/react';
|
|
53
|
+
import { theme } from '@paygreen/pgui',
|
|
54
|
+
|
|
55
|
+
<ChakraProvider theme={theme}>
|
|
56
|
+
{Your App}
|
|
57
|
+
</ChakraProvider>
|
|
58
|
+
```
|
|
43
59
|
___
|
|
44
60
|
## Develop a new component
|
|
45
61
|
|
|
@@ -72,12 +88,12 @@ ___
|
|
|
72
88
|
## Troubleshooting
|
|
73
89
|
|
|
74
90
|
### React Invalid Hook Call Warning
|
|
75
|
-
If you have an error based on [React Invalid Hook Call Warning](https://reactjs.org/warnings/invalid-hook-call-warning.html), this is because you're trying to use the local project without npm link (on chakra-ui/react). Please use the command to normally solve it
|
|
91
|
+
If you have an error based on [React Invalid Hook Call Warning](https://reactjs.org/warnings/invalid-hook-call-warning.html), this is because you're trying to use the local project without npm link (on chakra-ui/react or react). Please use the command to normally solve it
|
|
76
92
|
```bash
|
|
77
93
|
npm run link-local-lib
|
|
78
94
|
```
|
|
79
95
|
|
|
80
|
-
If it doesn't work, please refer to Getting Started.
|
|
96
|
+
If it doesn't work, please refer to Getting Started guide to check the npm link process.
|
|
81
97
|
|
|
82
98
|
### Error on storybook build
|
|
83
99
|
|