@hexure/ui 1.0.0

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 +36 -0
  2. package/package.json +86 -0
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Getting Started
2
+
3
+ InsTech UI is your basic UI Component library which makes development for the UI/UX projects easy and makes the User Interface common through out multiple web applications.
4
+
5
+ 1. Installation process
6
+ a. Install nodeJS (preferably through NVS for windows and NVM for Linux/MacOS)
7
+ b. To use the UI Library in your project `npx install @hexure/ui`
8
+ Some common Commands:
9
+ `npm run rollup` to run rollup and generate a dist folder
10
+ `npm run storybook` to run storybook server and see components on storybook.
11
+ `npm run test` to run all test cases.
12
+
13
+ 2. Usage: See `https://zeroheight.com/3b34634b9/p/57050e-itds`
14
+
15
+ # Contribute
16
+
17
+ a. Pull the repo by writing `git clone https://InsuranceTechnologies@dev.azure.com/InsuranceTechnologies/Enterprise/_git/InsTech.UI.Library`
18
+ b. CD into the folder and type `npm i` in the terminal
19
+ c. VS Code is prefered but any suitable IDE can be used
20
+
21
+ Folder Structure:
22
+ Components are stored in the components folder. Each component has it's own folder, every component has it's own `index.ts` file that exports the component. There is another index.ts, inside the components folder that exports all components from the component directory to source. And there is another index.ts file inside the source directory which is the entry point and it exports all components for use.
23
+
24
+ Each component folder has 4 files.
25
+ Component Folder
26
+ |
27
+ |---> Component.tsx
28
+ |---> Component.test.tsx
29
+ |---> Component.stories.tsx
30
+ |---> index.ts
31
+
32
+ Considerations Regarding state:
33
+ Since these are visual components, the only state we define with in them is visual purpopses. We pass in the state that contains values as props.
34
+
35
+ Important Note:
36
+ It is very important for you to generate a new dist folder each time you create a new component or make changes to the existing. Since we install the library through git we should have the dist folder because the project (React application) will look inside this folder for the components and styles. Since we are not creating an npm package or registry, this step is very important and the dist folder should not be added to .gitignore file.
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@hexure/ui",
3
+ "version": "1.0.0",
4
+ "description": "A library of shared UI components used within Hexure products.",
5
+ "scripts": {
6
+ "rollup": "rollup -c",
7
+ "test": "jest",
8
+ "prettier": "prettier --write src/",
9
+ "eslint": "eslint src/",
10
+ "eslint-fix": "eslint src/ --fix",
11
+ "test:watch": "jest --watch",
12
+ "storybook": "start-storybook -p 6006",
13
+ "build-storybook": "build-storybook"
14
+ },
15
+ "keywords": [
16
+ "hexure"
17
+ ],
18
+ "author": "Hexure",
19
+ "license": "ISC",
20
+ "devDependencies": {
21
+ "@babel/core": "^7.18.13",
22
+ "@babel/preset-env": "^7.18.10",
23
+ "@babel/preset-react": "^7.18.6",
24
+ "@babel/preset-typescript": "^7.18.6",
25
+ "@rollup/plugin-babel": "^6.0.3",
26
+ "@rollup/plugin-commonjs": "^24.0.1",
27
+ "@rollup/plugin-node-resolve": "^15.0.1",
28
+ "@rollup/plugin-terser": "^0.4.0",
29
+ "@rollup/plugin-typescript": "^11.0.0",
30
+ "@storybook/addon-actions": "^6.5.16",
31
+ "@storybook/addon-controls": "^6.5.16",
32
+ "@storybook/addon-viewport": "^6.5.16",
33
+ "@storybook/builder-webpack5": "^6.5.14",
34
+ "@storybook/manager-webpack5": "^6.5.14",
35
+ "@storybook/react": "^6.5.14",
36
+ "@storybook/testing-library": "^0.0.13",
37
+ "@testing-library/jest-dom": "^5.16.5",
38
+ "@testing-library/react": "^13.3.0",
39
+ "@testing-library/user-event": "^14.4.3",
40
+ "@types/jest": "^29.0.3",
41
+ "@types/numeral": "^2.0.2",
42
+ "@types/react": "^18.0.17",
43
+ "@types/styled-components": "^5.1.26",
44
+ "@typescript-eslint/eslint-plugin": "^5.50.0",
45
+ "@typescript-eslint/parser": "^5.50.0",
46
+ "babel-jest": "^29.0.1",
47
+ "babel-loader": "^8.2.5",
48
+ "eslint": "^8.33.0",
49
+ "eslint-config-prettier": "^8.6.0",
50
+ "eslint-plugin-react": "^7.32.2",
51
+ "identity-obj-proxy": "^3.0.0",
52
+ "jest": "^29.0.1",
53
+ "jest-environment-jsdom": "^29.0.1",
54
+ "jsdom": "^20.0.0",
55
+ "prettier": "^2.8.3",
56
+ "react": "^18.2.0",
57
+ "react-dom": "^18.2.0",
58
+ "rollup": "^3.12.1",
59
+ "rollup-plugin-peer-deps-external": "^2.2.4",
60
+ "typescript": "^4.8.2"
61
+ },
62
+ "main": "dist/cjs/index.js",
63
+ "module": "dist/esm/index.js",
64
+ "files": [
65
+ "dist"
66
+ ],
67
+ "types": "dist/index.d.ts",
68
+ "dependencies": {
69
+ "@mdi/font": "^7.0.96",
70
+ "@mdi/js": "^7.1.96",
71
+ "@mdi/react": "^1.6.1",
72
+ "@storybook/client-api": "^6.5.14",
73
+ "lodash": "github:lodash/lodash",
74
+ "moment": "^2.29.4",
75
+ "numeral": "^2.0.6",
76
+ "styled-components": "^5.3.6"
77
+ },
78
+ "peerDependencies": {
79
+ "react": "^18.2.0",
80
+ "react-dom": "^18.2.0"
81
+ },
82
+ "repository": {
83
+ "type": "git",
84
+ "url": "https://InsuranceTechnologies@dev.azure.com/InsuranceTechnologies/Enterprise/_git/InsTech.UI.Library"
85
+ }
86
+ }