groundfloor-react-ui 0.1.20

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 (2) hide show
  1. package/README.md +87 -0
  2. package/package.json +84 -0
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # GroundFloor React UI
2
+
3
+ This repository stores the component library for GroundFloor Components.
4
+
5
+ ---
6
+ ## Code Format
7
+
8
+ - 4 spaces per tab.
9
+ - JS/TS formatting. Use default formatter by VSCode. press Ctrl+K, Ctrl+F to format higlighted code.
10
+ - It is recommended to use a syntax highlighter for styled-components. [Link here](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components)
11
+
12
+ ### Component Development Lifecycle
13
+
14
+ - For each component development, create a separate git branch and pull request.
15
+ - In `src/library/components` directory, create a folder with the respective component name, e.g 'Typography'
16
+ - Create an index.js file inside for exporting components. Follow the example in `src/Typography` or 'Button'
17
+ - Create separate JS files for each variant of the component and export in index.js.
18
+ - Default theme object can be found in `src/library/constants/defaultThemeColor.js`. Add it to component's defaultProps. You can use `withTheme` HoC or `useTheme` hook whichever is suitable to get user-defined theme colors.
19
+ - Static color information is provided in `src/library/constants/colors.js`.
20
+ - In `stories/Components` directory, create a `{your-component}.stories.jsx` file and update the story. Follow the example given in `Typography.stories.jsx`, for details check the tutorial link provided.
21
+ - Ensure that the title is `Components/{your-component}` so that is falls under the 'Components' category.
22
+
23
+ ### Adding Icons
24
+ - Paste SVG file in `src/library/assets/icons`
25
+ - Import in `src/library/components/Icon/Icon.js`
26
+ - Map the icon to an icon name. Name should be in kebab-case format
27
+
28
+ ### Git contribution
29
+ - Create a branch with the following convention: `{name}-{taskname}-{date}`.
30
+ - When the branch is ready for merging, create a Pull Request with the destination branch `master`.
31
+ - Fill the details in the template given. Do add reviewers to the Pull Request.
32
+ *Pushing directly to master branch is not recommended.*
33
+
34
+ ---
35
+
36
+ ### Deploying to NPM
37
+
38
+ Follow the semantic versioning convention. Given a version number MAJOR.MINOR.PATCH, increment the:
39
+
40
+ 1. MAJOR version when you make incompatible API changes,
41
+ 2. MINOR version when you add functionality in a backwards compatible manner, and
42
+ 3. PATCH version when you make backwards compatible bug fixes.
43
+
44
+ In `library/package.json`, update the version number. Then run `npm run npm-deploy` in project root directory.
45
+ **Remember to definitely commit/push to git after publishing a new version.**
46
+
47
+ ---
48
+
49
+ ## Tutorials / guides
50
+
51
+ - [styled-components tutorial](https://styled-components.com/docs/basics)
52
+ - [Storybook tutorial](https://storybook.js.org/docs/react/get-started/introduction)
53
+
54
+ ---
55
+
56
+ ## Available Scripts
57
+
58
+ In the project directory, you can run:
59
+
60
+ ### `npm run storybook`
61
+ Opens the Storybook app in development mode.
62
+ Open [http://localhost:6006](http://localhost:6006) to view it in your browser.
63
+
64
+ ### `npm run compile`
65
+ Cleans the 'dist' directory and builds the component library.
66
+
67
+ ### `npm run npm-deploy`
68
+ Publishes the component library to NPM.
69
+
70
+ ### `npm start`
71
+ Test your app in a default React environment.
72
+ Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
73
+
74
+ ### `npm test`
75
+ Launches the test runner in the interactive watch mode.
76
+
77
+ ### `npm run clean`
78
+ Deletes the 'dist' folder.
79
+
80
+ ### `npm build-storybook`
81
+ Bundles the Storybook app.
82
+
83
+ ### `npm run build`
84
+ This is useless. No need to use. ever.
85
+
86
+ ### `npm run eject`
87
+ **Note: Do not run this command. Once you `eject`, you can't go back!**
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "groundfloor-react-ui",
3
+ "version": "0.1.20",
4
+ "main": "./src/index.js",
5
+ "private": false,
6
+ "files": [
7
+ "dist",
8
+ "README.md"
9
+ ],
10
+ "dependencies": {
11
+ "@mdx-js/react": "^2.3.0",
12
+ "chart.js": "^4.2.1",
13
+ "dayjs": "^1.11.6",
14
+ "react": "^18.2.0",
15
+ "react-chartjs-2": "^5.2.0",
16
+ "react-data-table-component": "^7.5.3",
17
+ "react-datepicker": "^4.8.0",
18
+ "react-dom": "^18.2.0",
19
+ "react-modal": "^3.15.1",
20
+ "react-phone-input-2": "^2.15.1",
21
+ "react-popper": "^2.3.0",
22
+ "react-popper-tooltip": "^4.4.2",
23
+ "react-router": "^6.4.2",
24
+ "react-router-dom": "^6.4.2",
25
+ "react-scripts": "^5.0.1",
26
+ "react-select": "^5.4.0",
27
+ "react-signature-pad-wrapper": "3.2.3",
28
+ "react-svg": "^15.1.10",
29
+ "sass": "^1.55.0",
30
+ "styled-components": "^5.3.6",
31
+ "use-resize-observer": "^9.1.0",
32
+ "webpack": "^5.74.0"
33
+ },
34
+ "scripts": {
35
+ "start": "react-scripts start",
36
+ "build": "react-scripts build",
37
+ "test": "react-scripts test",
38
+ "eject": "react-scripts eject",
39
+ "storybook": "start-storybook -p 6006 -s public",
40
+ "build-storybook": "build-storybook -s public",
41
+ "clean": "rimraf dist",
42
+ "chromatic": "npx chromatic --project-token=7fa642391e6f"
43
+ },
44
+ "eslintConfig": {
45
+ "extends": [
46
+ "react-app",
47
+ "react-app/jest"
48
+ ],
49
+ "overrides": [
50
+ {
51
+ "files": [
52
+ "**/*.stories.*"
53
+ ],
54
+ "rules": {
55
+ "import/no-anonymous-default-export": "off"
56
+ }
57
+ }
58
+ ]
59
+ },
60
+ "browserslist": {
61
+ "production": [
62
+ ">0.2%",
63
+ "not dead",
64
+ "not op_mini all"
65
+ ],
66
+ "development": [
67
+ "last 1 chrome version",
68
+ "last 1 firefox version",
69
+ "last 1 safari version"
70
+ ]
71
+ },
72
+ "devDependencies": {
73
+ "@storybook/addon-actions": "^6.5.12",
74
+ "@storybook/addon-essentials": "^6.5.12",
75
+ "@storybook/addon-links": "^6.5.12",
76
+ "@storybook/builder-webpack5": "^6.5.12",
77
+ "@storybook/manager-webpack5": "^6.5.12",
78
+ "@storybook/node-logger": "^6.5.12",
79
+ "@storybook/preset-create-react-app": "^4.1.2",
80
+ "@storybook/react": "^6.5.12",
81
+ "chromatic": "^6.17.0",
82
+ "ncp": "^2.0.0"
83
+ }
84
+ }