@paygreen/pgui 2.1.0 → 2.1.3

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.
Files changed (53) hide show
  1. package/README.md +38 -22
  2. package/dist/cjs/index.js +50728 -2677
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/DataList/index.d.ts +8 -1
  5. package/dist/cjs/types/components/DayPicker/index.d.ts +3 -0
  6. package/dist/cjs/types/components/InputDayPicker/index.d.ts +16 -0
  7. package/dist/cjs/types/components/SearchInput/index.d.ts +11 -0
  8. package/dist/cjs/types/components/Select/index.d.ts +116 -0
  9. package/dist/cjs/types/components/index.d.ts +4 -0
  10. package/dist/cjs/types/index.d.ts +2 -0
  11. package/dist/cjs/types/layout/TopBar/index.d.ts +10 -0
  12. package/dist/cjs/types/layout/index.d.ts +1 -0
  13. package/dist/cjs/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
  14. package/dist/{esm/types/theme/components/Button.d.ts → cjs/types/theme/components/button.d.ts} +2 -7
  15. package/dist/cjs/types/theme/components/index.d.ts +4 -0
  16. package/dist/{esm/types/theme/components/Input.d.ts → cjs/types/theme/components/input.d.ts} +2 -1
  17. package/dist/{esm/types/theme/components/Tag.d.ts → cjs/types/theme/components/tag.d.ts} +2 -1
  18. package/dist/cjs/types/theme/externals/index.d.ts +1 -0
  19. package/dist/cjs/types/theme/externals/reactDayPicker.d.ts +2 -0
  20. package/dist/cjs/types/theme/externals-css.d.ts +1 -0
  21. package/dist/cjs/types/theme/foundations/colors.d.ts +1 -0
  22. package/dist/cjs/types/theme/foundations/index.d.ts +87 -0
  23. package/dist/cjs/types/theme/index.d.ts +2 -1
  24. package/dist/cjs/types/theme/styles.d.ts +2 -0
  25. package/dist/cjs/types/theme/theme.d.ts +1 -0
  26. package/dist/cjs/types/utils/date.d.ts +1 -0
  27. package/dist/esm/index.js +50699 -2679
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/types/components/DataList/index.d.ts +8 -1
  30. package/dist/esm/types/components/DayPicker/index.d.ts +3 -0
  31. package/dist/esm/types/components/InputDayPicker/index.d.ts +16 -0
  32. package/dist/esm/types/components/SearchInput/index.d.ts +11 -0
  33. package/dist/esm/types/components/Select/index.d.ts +116 -0
  34. package/dist/esm/types/components/index.d.ts +4 -0
  35. package/dist/esm/types/index.d.ts +2 -0
  36. package/dist/esm/types/layout/TopBar/index.d.ts +10 -0
  37. package/dist/esm/types/layout/index.d.ts +1 -0
  38. package/dist/esm/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
  39. package/dist/{cjs/types/theme/components/Button.d.ts → esm/types/theme/components/button.d.ts} +2 -7
  40. package/dist/esm/types/theme/components/index.d.ts +4 -0
  41. package/dist/{cjs/types/theme/components/Input.d.ts → esm/types/theme/components/input.d.ts} +2 -1
  42. package/dist/{cjs/types/theme/components/Tag.d.ts → esm/types/theme/components/tag.d.ts} +2 -1
  43. package/dist/esm/types/theme/externals/index.d.ts +1 -0
  44. package/dist/esm/types/theme/externals/reactDayPicker.d.ts +2 -0
  45. package/dist/esm/types/theme/externals-css.d.ts +1 -0
  46. package/dist/esm/types/theme/foundations/colors.d.ts +1 -0
  47. package/dist/esm/types/theme/foundations/index.d.ts +87 -0
  48. package/dist/esm/types/theme/index.d.ts +2 -1
  49. package/dist/esm/types/theme/styles.d.ts +2 -0
  50. package/dist/esm/types/theme/theme.d.ts +1 -0
  51. package/dist/esm/types/utils/date.d.ts +1 -0
  52. package/dist/index.d.ts +170 -4
  53. package/package.json +14 -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 -save-dev @paygreen/pgui
10
+ npm i @paygreen/pgui
11
11
  ```
12
12
 
13
- When this is done, you will need to link Chakra UI package library from your target project to PGUI.
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
- To do that, please change from your ```package.json``` the script link-local-lib
16
- ```json
17
- {
18
- "scripts": {
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
+ ![Screenshot](pgui-schema.png)
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 run link-local-lib
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
- Now that you linked Chakra UI library from your target project to PGUI, you will need to link PGUI to your target project.
24
+ 2. in ```/target_app/node_modules/react```, this will create 2nd symlink react
25
+ ```bash
26
+ npm link
27
+ ```
32
28
 
33
- To do that, please run this command in PGUI project
29
+ 3. in ```/pgui```, this will create 3rd symlink to pgui library
34
30
  ```bash
35
31
  npm link
36
32
  ```
37
- This will create a new symbolic link named "pgui". And you will now be able to add it on your target project by doing that command inside it
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
- It should now link your library and it should works well, you just have to link your theme with the one on PGUI on yiour ChakraProvider in your target project, and then use the components you need! 🥳
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