diginet-core-ui 1.3.97-beta.3 → 1.3.98

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.
@@ -1299,7 +1299,6 @@ Attachment.defaultProps = {
1299
1299
  fileType: getGlobal(['errorDefault', 'fileType']),
1300
1300
  existingFile: getGlobal(['errorDefault', 'existingFile'])
1301
1301
  },
1302
- viewType: 'detail',
1303
1302
  ...getGlobal(['components', 'attachment', 'defaultProps'])
1304
1303
  };
1305
1304
  Attachment.propTypes = {
package/package.json CHANGED
@@ -1,73 +1,42 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.97-beta.3",
4
- "description": "",
3
+ "version": "1.3.98",
4
+ "description": "The DigiNet core ui",
5
+ "homepage": "https://diginet.com.vn",
5
6
  "main": "index.js",
6
- "license": "UNLICENSED",
7
7
  "scripts": {
8
- "start": "npm-run-all --parallel start-sb eslint-test",
9
- "start-sb": "start-storybook -p 9050",
10
- "build-storybook": "build-storybook -c .storybook -s src",
11
- "build": "run-script-os",
12
- "build:windows": "rimraf dist && mkdirp dist/components && npm run compile && sass --style=compressed src/scss:dist/css && xcopy src\\\\assets dist\\\\assets\\ /e /y",
13
- "build:darwin:linux:default": "rm -rf dist && npm run compile && sass --style=compressed src/scss:dist/css && cp -rf src/assets dist/assets",
14
- "compile": "babel src --out-dir dist --ignore **/*.stories.js",
15
- "pack": "npm run build && cp *.md dist/ && npm run version:bump --silent && npm run version:add --silent && cd dist && npm pack",
16
- "production-keep-version": "npm run build && cp *.md dist/ && cp package.json dist/ && cd dist && npm publish",
17
- "beta": "npm run build && cp *.md dist/ && cp package.json dist/ && cd dist && npm publish --tag beta",
18
- "production": "npm run build && cp *.md dist/ && npm run version:bump --silent && npm run version:add --silent && cd dist && npm publish",
19
- "version:add": "run-script-os",
20
- "version:add:windows": "cat package.json.tmp | sed \"s/0.0.0/%npm_package_version%/g\" > dist/package.json",
21
- "version:add:darwin:linux:default": "VERSION=$(npm run version:extract --silent) && cat package.json.tmp | sed \"s/0.0.0/${VERSION}/g\" > dist/package.json",
22
- "version:bump": "npm version patch --no-git-tag-version --silent",
23
- "version:extract": "cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]'",
24
- "test": "echo \"Error: no test specified\" && exit 1",
25
- "lint": "eslint --fix --config .eslintrc.js \"**/*.js\"",
26
- "eslint-test": "onchange \"src/**/*.{js,jsx,json}\" -- eslint . --fix",
27
- "test-storybook": "test-storybook --url http://localhost:9050"
8
+ "start-js": "react-scripts start --max_old_space_size=4096",
9
+ "start": "npx npm-run-all -p start-js",
10
+ "build": "GENERATE_SOURCEMAP=false && react-scripts build --env=production --max_old_space_size=8192",
11
+ "eject": "react-scripts eject",
12
+ "test": "echo \"Error: no test specified\" && exit 1"
28
13
  },
29
14
  "dependencies": {
30
15
  "@emotion/core": "^10.0.35",
31
- "babel-plugin-module-resolver": "^4.1.0",
32
16
  "prop-types": "^15.7.2"
33
17
  },
34
- "lint-staged": {
35
- "*/**/*.{js,jsx,json}": [
36
- "prettier --write",
37
- "git add"
38
- ]
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://diginetvn@bitbucket.org/diginetvn/diginet-core-ui.git"
39
21
  },
40
- "devDependencies": {
41
- "@babel/cli": "^7.14.3",
42
- "@babel/plugin-proposal-class-properties": "^7.13.0",
43
- "@babel/plugin-proposal-logical-assignment-operators": "^7.16.0",
44
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
45
- "@babel/plugin-proposal-optional-chaining": "^7.14.2",
46
- "@babel/plugin-proposal-private-methods": "^7.18.6",
47
- "@babel/plugin-proposal-private-property-in-object": "^7.18.6",
48
- "@babel/preset-react": "^7.13.13",
49
- "@storybook/addon-actions": "6.2.9",
50
- "@storybook/addon-essentials": "6.2.9",
51
- "@storybook/addon-links": "6.2.9",
52
- "@storybook/addon-postcss": "^2.0.0",
53
- "@storybook/react": "6.2.9",
54
- "@storybook/test-runner": "^0.7.1",
55
- "autoprefixer": "^10.3.1",
56
- "babel-loader": "^8.2.2",
57
- "eslint": "^8.4.1",
58
- "eslint-plugin-react": "^7.27.1",
59
- "eslint-plugin-regex": "^1.10.0",
60
- "husky": "^7.0.4",
61
- "jest": "^27.5.1",
62
- "lint-staged": "^12.1.2",
63
- "mkdirp": "^1.0.4",
64
- "npm-run-all": "^4.1.5",
65
- "onchange": "^7.1.0",
66
- "postcss-flexbugs-fixes": "^5.0.2",
67
- "react": "^17.0.1",
68
- "react-dom": "^17.0.1",
69
- "rimraf": "^3.0.2",
70
- "run-script-os": "^1.1.6",
71
- "sass": "1.58.3"
72
- }
22
+ "keywords": [
23
+ "core ui",
24
+ "diginet"
25
+ ],
26
+ "author": "rocachien",
27
+ "contributors": [
28
+ {
29
+ "name": "Chien Do",
30
+ "email": "rocachien@gmail.com"
31
+ },
32
+ {
33
+ "name": "Nhat Tran",
34
+ "email": "tranminhnhat1005@gmail.com"
35
+ },
36
+ {
37
+ "name": "Thuan Nguyen",
38
+ "email": "nt.thuan.hutech@gmail.com"
39
+ }
40
+ ],
41
+ "license": "MIT"
73
42
  }
package/readme.md CHANGED
@@ -38,6 +38,16 @@ npm test
38
38
  ```
39
39
 
40
40
  ## Changelog
41
+ ## 1.3.98
42
+ - \[Changed\]: Image – Change default image
43
+ - \[Changed\]: Icon – Update Image, Another, Compressed, Presentation, Sheet, Word, PDF
44
+ - \[Fixed\]: Breadcrumbs – Fix bug onClick not working
45
+ - \[Fixed\]: Typography – Fix empty children show null
46
+ - \[Fixed\]: Popover – Fix conflict overflow hidden on document body
47
+ - \[Fixed\]: Modal – Fix conflict overflow hidden on document body
48
+ - \[Fixed\]: DateRangePicker – Fix bug display value scroll when ellipsis
49
+ - \[Fixed\]: DateRangePicker – Fix UI width
50
+
41
51
  ## 1.3.97
42
52
  - \[Added\]: Icon – Add Car
43
53
  - \[Fixed\]: Attachment – Fix bug remove file
@@ -13,11 +13,8 @@ const fontNormal = css`
13
13
  const fontWeightBold = css`
14
14
  font-weight: 700;
15
15
  `;
16
- const fontWeightMedium = css`
17
- font-weight: 500;
18
- `;
19
16
  const fontWeightRegular = css`
20
- font-weight: 400;
17
+ font-weight: 500;
21
18
  `;
22
19
  const fontWeightNormal = css`
23
20
  font-weight: normal;
@@ -31,7 +28,7 @@ const getFontSize = size => css`
31
28
  const title1 = css`
32
29
  ${fontNormal};
33
30
  ${fontWeightBold};
34
- ${getFontSize(parseInt(fontSize) + 12)}; //28
31
+ ${getFontSize(parseInt(fontSize) + 16)}; //32
35
32
  `;
36
33
  const title2 = css`
37
34
  ${fontNormal};
@@ -75,52 +72,22 @@ const heading5 = css`
75
72
  `;
76
73
  const heading6 = css`
77
74
  ${fontNormal};
78
- ${fontWeightMedium};
75
+ ${fontWeightRegular}
79
76
  ${getFontSize(parseInt(fontSize) - 4)}; //12
80
77
  `;
81
- const body1 = css`
82
- ${fontNormal};
83
- ${fontWeightRegular};
84
- ${getFontSize(parseInt(fontSize) + 12)}; //28
85
- `;
86
- const body2 = css`
87
- ${fontNormal};
88
- ${fontWeightRegular};
89
- ${getFontSize(parseInt(fontSize) + 10)}; //26
90
- `;
91
- const body3 = css`
92
- ${fontNormal};
93
- ${fontWeightRegular};
94
- ${getFontSize(parseInt(fontSize) + 8)}; //24
95
- `;
96
- const body4 = css`
97
- ${fontNormal};
98
- ${fontWeightRegular};
99
- ${getFontSize(parseInt(fontSize) + 6)}; //22
100
- `;
101
- const body5 = css`
102
- ${fontNormal};
103
- ${fontWeightRegular};
104
- ${getFontSize(parseInt(fontSize) + 4)}; //20
105
- `;
106
- const body6 = css`
107
- ${fontNormal};
108
- ${fontWeightRegular};
109
- ${getFontSize(parseInt(fontSize) + 2)}; //18
110
- `;
111
78
  const paragraph1 = css`
112
79
  ${fontNormal};
113
- ${fontWeightRegular};
80
+ ${fontWeightNormal};
114
81
  ${getFontSize(parseInt(fontSize))}; //16
115
82
  `;
116
83
  const paragraph2 = css`
117
84
  ${fontNormal};
118
- ${fontWeightRegular};
85
+ ${fontWeightNormal};
119
86
  ${getFontSize(parseInt(fontSize) - 2)}; //14
120
87
  `;
121
88
  const paragraph3 = css`
122
89
  ${fontNormal};
123
- ${fontWeightRegular};
90
+ ${fontWeightNormal};
124
91
  ${getFontSize(parseInt(fontSize) - 4)}; //12
125
92
  `;
126
93
  const uppercase = css`
@@ -134,7 +101,7 @@ const helperText = css`
134
101
  font-size: ${parseInt(fontSize) - 4}px; //12
135
102
  ${fontWeightNormal}
136
103
  `;
137
- export const typography = [[title1, ['title1', 't1']], [title2, ['title2', 't2']], [title3, ['title3', 't3']], [title4, ['title4', 't4']], [heading1, ['heading1', 'h1']], [heading2, ['heading2', 'h2']], [heading3, ['heading3', 'h3']], [heading4, ['heading4', 'h4']], [heading5, ['heading5', 'h5']], [heading6, ['heading6', 'h6']], [body1, ['body1', 'b1']], [body2, ['body2', 'b2']], [body3, ['body3', 'b3']], [body4, ['body4', 'b4']], [body5, ['body5', 'b5']], [body6, ['body6', 'b6']], [paragraph1, ['paragraph1', 'p1']], [paragraph2, ['paragraph2', 'p2']], [paragraph3, ['paragraph3', 'p3']], [uppercase, ['uppercase']], [label, ['label']], [helperText, ['helperText']]].reduce((obj, [value, keys]) => {
104
+ export const typography = [[title1, ['title1', 't1']], [title2, ['title2', 't2']], [title3, ['title3', 't3']], [title4, ['title4', 't4']], [heading1, ['heading1', 'h1']], [heading2, ['heading2', 'h2']], [heading3, ['heading3', 'h3']], [heading4, ['heading4', 'h4']], [heading5, ['heading5', 'h5']], [heading6, ['heading6', 'h6']], [paragraph1, ['paragraph1', 'p1']], [paragraph2, ['paragraph2', 'p2']], [paragraph3, ['paragraph3', 'p3']], [uppercase, ['uppercase']], [label, ['label']], [helperText, ['helperText']]].reduce((obj, [value, keys]) => {
138
105
  for (const key of keys) {
139
106
  obj = {
140
107
  ...obj,