diginet-core-ui 1.4.21 → 1.4.23-beta.1
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/assets/images/menu/dhr/MHRP39N0020.svg +9 -0
- package/assets/images/menu/dhr/MHRP39N0021.svg +7 -0
- package/assets/images/menu/eo/WEO76LIS0005.svg +6 -0
- package/assets/images/menu/eo/WEO76LIS0006.svg +14 -0
- package/assets/images/menu/eo/WEO76LIS0007.svg +19 -0
- package/assets/images/menu/eo/WEO76REQ0003.svg +15 -0
- package/components/accordion/details.js +12 -14
- package/components/accordion/group.js +12 -14
- package/components/accordion/index.js +36 -38
- package/components/accordion/summary.js +50 -51
- package/components/chip/index.js +61 -69
- package/components/form-control/calendar/function.js +1 -1
- package/components/form-control/date-input/DateField.js +189 -0
- package/components/form-control/date-input/index.js +301 -0
- package/components/form-control/date-input/useControlled.js +14 -0
- package/components/form-control/date-input/useDateInputState.js +132 -0
- package/components/form-control/date-input/useIsFocused.js +20 -0
- package/components/form-control/date-input/useKeyboardInputEvent.js +41 -0
- package/components/form-control/date-input/utils.js +286 -0
- package/components/form-control/date-picker/index.js +143 -422
- package/components/form-control/dropdown/index.js +259 -602
- package/components/form-control/input-base/UncontrolledInputBase.js +451 -0
- package/components/form-control/number-input/index2.js +4 -1
- package/components/form-control/time-picker/v2/index.js +792 -0
- package/components/image/index.js +22 -24
- package/components/index.js +2 -1
- package/components/modal/body.js +9 -11
- package/components/modal/footer.js +8 -10
- package/components/modal/header.js +27 -25
- package/components/modal/modal.js +33 -32
- package/components/tab/tab-container.js +57 -49
- package/components/tab/tab-header.js +72 -65
- package/components/tab/tab-panel.js +38 -32
- package/components/tab/tab.js +69 -61
- package/global/index.js +4 -0
- package/icons/effect.js +63 -58
- package/package.json +65 -33
- package/readme.md +17 -4
- package/theme/settings.js +78 -0
package/package.json
CHANGED
|
@@ -1,44 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "diginet-core-ui",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "
|
|
5
|
-
"homepage": "https://diginet.com.vn",
|
|
3
|
+
"version": "1.4.23-beta.1",
|
|
4
|
+
"description": "",
|
|
6
5
|
"main": "index.js",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start
|
|
9
|
-
"start": "
|
|
10
|
-
"build": "
|
|
11
|
-
"
|
|
12
|
-
"
|
|
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"
|
|
13
28
|
},
|
|
14
29
|
"dependencies": {
|
|
15
30
|
"@emotion/core": "^10.0.35",
|
|
16
|
-
"prop-types": "^15.7.2",
|
|
17
31
|
"@emotion/css": "^11.11.0",
|
|
18
|
-
"@emotion/react": "^11.10.6"
|
|
32
|
+
"@emotion/react": "^11.10.6",
|
|
33
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
34
|
+
"date-fns": "^2.30.0",
|
|
35
|
+
"prop-types": "^15.7.2"
|
|
19
36
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
37
|
+
"lint-staged": {
|
|
38
|
+
"*/**/*.{js,jsx,json}": [
|
|
39
|
+
"prettier --write",
|
|
40
|
+
"git add"
|
|
41
|
+
]
|
|
23
42
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/cli": "^7.14.3",
|
|
45
|
+
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
46
|
+
"@babel/plugin-proposal-logical-assignment-operators": "^7.16.0",
|
|
47
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
48
|
+
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
|
|
49
|
+
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
|
50
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
|
51
|
+
"@babel/preset-react": "^7.13.13",
|
|
52
|
+
"@storybook/addon-actions": "6.2.9",
|
|
53
|
+
"@storybook/addon-essentials": "6.2.9",
|
|
54
|
+
"@storybook/addon-links": "6.2.9",
|
|
55
|
+
"@storybook/addon-postcss": "^2.0.0",
|
|
56
|
+
"@storybook/react": "6.2.9",
|
|
57
|
+
"@storybook/test-runner": "^0.7.1",
|
|
58
|
+
"autoprefixer": "^10.3.1",
|
|
59
|
+
"babel-loader": "^8.2.2",
|
|
60
|
+
"eslint": "^8.4.1",
|
|
61
|
+
"eslint-plugin-react": "^7.27.1",
|
|
62
|
+
"eslint-plugin-regex": "^1.10.0",
|
|
63
|
+
"husky": "^7.0.4",
|
|
64
|
+
"jest": "^27.5.1",
|
|
65
|
+
"lint-staged": "^12.1.2",
|
|
66
|
+
"mkdirp": "^1.0.4",
|
|
67
|
+
"npm-run-all": "^4.1.5",
|
|
68
|
+
"onchange": "^7.1.0",
|
|
69
|
+
"postcss-flexbugs-fixes": "^5.0.2",
|
|
70
|
+
"react": "^17.0.1",
|
|
71
|
+
"react-dom": "^17.0.1",
|
|
72
|
+
"rimraf": "^3.0.2",
|
|
73
|
+
"run-script-os": "^1.1.6",
|
|
74
|
+
"sass": "1.58.3"
|
|
75
|
+
}
|
|
44
76
|
}
|
package/readme.md
CHANGED
|
@@ -42,6 +42,19 @@ npm test
|
|
|
42
42
|
|
|
43
43
|
## Changelog
|
|
44
44
|
|
|
45
|
+
## 1.4.22
|
|
46
|
+
|
|
47
|
+
- \[Changed\]: TabHeader – Add full width
|
|
48
|
+
|
|
49
|
+
## 1.4.22
|
|
50
|
+
|
|
51
|
+
- \[Added\]: IconMenu – Add MHRP39N0020, MHRP39N0021
|
|
52
|
+
- \[Changed\]: Tab – Add prop onChange in TabContainer
|
|
53
|
+
- \[Changed\]: Accordion – Update AccordionSummary propTypes
|
|
54
|
+
- \[Fixed\]: TimePicker – Fix cannot select time by arrow keys
|
|
55
|
+
- \[Fixed\]: Modal – Fix warning call Hooks inside useMemo
|
|
56
|
+
- \[Fixed\]: Image – Fix render img tag when src empty
|
|
57
|
+
|
|
45
58
|
## 1.4.21
|
|
46
59
|
|
|
47
60
|
- \[Changed\]: Theme – Setup switch theme Dark Light
|
|
@@ -65,7 +78,7 @@ npm test
|
|
|
65
78
|
|
|
66
79
|
## 1.4.16
|
|
67
80
|
|
|
68
|
-
- \[
|
|
81
|
+
- \[Added\]: IconMenu – Add MHRM15N0001
|
|
69
82
|
- \[Changed\]: Dropdown – Return recent search in onClosed callback
|
|
70
83
|
|
|
71
84
|
## 1.4.15
|
|
@@ -88,7 +101,7 @@ npm test
|
|
|
88
101
|
|
|
89
102
|
## 1.4.12
|
|
90
103
|
|
|
91
|
-
- \[
|
|
104
|
+
- \[Added\]: IconMenu – Add, Update icon for DIGINET EO
|
|
92
105
|
- \[Changed\]: Attachment – Add viewType Picture
|
|
93
106
|
- \[Changed\]: Calendar – Update design
|
|
94
107
|
- \[Changed\]: DatePicker – Add picker month, year, quarter
|
|
@@ -114,7 +127,7 @@ npm test
|
|
|
114
127
|
|
|
115
128
|
## 1.4.9
|
|
116
129
|
|
|
117
|
-
- \[
|
|
130
|
+
- \[Added\]: IconMenu – Add 16 icon menu of HR Mobile App
|
|
118
131
|
- \[Fixed\]: Chip – Fix width of TabHeader
|
|
119
132
|
|
|
120
133
|
## 1.4.8
|
|
@@ -284,7 +297,7 @@ npm test
|
|
|
284
297
|
|
|
285
298
|
## 1.3.83
|
|
286
299
|
|
|
287
|
-
- \[
|
|
300
|
+
- \[Added\]: IconMenu – Add prop className, style
|
|
288
301
|
- \[Changed\]: Grid – Add prop verticalAlign
|
|
289
302
|
- \[Changed\]: Label– Add lineClamp auto
|
|
290
303
|
- \[Fixed\]: Popover – Fix bug not save last position of anchor
|
package/theme/settings.js
CHANGED
|
@@ -351,6 +351,19 @@ const settings = {
|
|
|
351
351
|
zeroMinWidth: false
|
|
352
352
|
}
|
|
353
353
|
},
|
|
354
|
+
DateInput: {
|
|
355
|
+
defaultProps: {
|
|
356
|
+
className: '',
|
|
357
|
+
disabled: false,
|
|
358
|
+
error: '',
|
|
359
|
+
format: locale.get() === 'vi' ? 'DD/MM/YYYY' : 'DD/MM/YYYY',
|
|
360
|
+
label: '',
|
|
361
|
+
readOnly: false,
|
|
362
|
+
required: false,
|
|
363
|
+
style: {},
|
|
364
|
+
viewType: 'underlined'
|
|
365
|
+
}
|
|
366
|
+
},
|
|
354
367
|
DatePicker: {
|
|
355
368
|
defaultProps: {
|
|
356
369
|
actionIconAt: 'end',
|
|
@@ -364,6 +377,7 @@ const settings = {
|
|
|
364
377
|
required: false,
|
|
365
378
|
returnFormat: 'YYYY-MM-DD',
|
|
366
379
|
textAlign: 'start',
|
|
380
|
+
useDateInput: false,
|
|
367
381
|
viewType: 'underlined'
|
|
368
382
|
}
|
|
369
383
|
},
|
|
@@ -463,6 +477,16 @@ const settings = {
|
|
|
463
477
|
children: ''
|
|
464
478
|
}
|
|
465
479
|
},
|
|
480
|
+
Icon: {
|
|
481
|
+
defaultProps: {
|
|
482
|
+
className: '',
|
|
483
|
+
color: 'system/rest',
|
|
484
|
+
height: 24,
|
|
485
|
+
style: {},
|
|
486
|
+
viewBox: true,
|
|
487
|
+
width: 24
|
|
488
|
+
}
|
|
489
|
+
},
|
|
466
490
|
Image: {
|
|
467
491
|
defaultProps: {
|
|
468
492
|
circular: false,
|
|
@@ -680,6 +704,41 @@ const settings = {
|
|
|
680
704
|
zeroMinWidth: false
|
|
681
705
|
}
|
|
682
706
|
},
|
|
707
|
+
TabContainer: {
|
|
708
|
+
defaultProps: {
|
|
709
|
+
className: '',
|
|
710
|
+
direction: 'horizontal',
|
|
711
|
+
level: 'level1',
|
|
712
|
+
style: {},
|
|
713
|
+
tabIndex: 0,
|
|
714
|
+
width: '100%'
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
TabHeader: {
|
|
718
|
+
defaultProps: {
|
|
719
|
+
centered: false,
|
|
720
|
+
className: '',
|
|
721
|
+
scrollButtons: false,
|
|
722
|
+
style: {},
|
|
723
|
+
width: '100%'
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
TabPanel: {
|
|
727
|
+
defaultProps: {
|
|
728
|
+
className: '',
|
|
729
|
+
lazyLoading: false,
|
|
730
|
+
style: {}
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
TabItem: {
|
|
734
|
+
defaultProps: {
|
|
735
|
+
className: '',
|
|
736
|
+
color: 'system/rest',
|
|
737
|
+
disabled: false,
|
|
738
|
+
label: '',
|
|
739
|
+
style: {}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
683
742
|
TextInput: {
|
|
684
743
|
defaultProps: {
|
|
685
744
|
autoComplete: 'off',
|
|
@@ -699,6 +758,25 @@ const settings = {
|
|
|
699
758
|
viewType: 'underlined'
|
|
700
759
|
}
|
|
701
760
|
},
|
|
761
|
+
TimePicker: {
|
|
762
|
+
defaultProps: {
|
|
763
|
+
actionIconAt: 'end',
|
|
764
|
+
className: '',
|
|
765
|
+
disabled: false,
|
|
766
|
+
displayFormat: 'HH:mm:ss',
|
|
767
|
+
mode12h: false,
|
|
768
|
+
readOnly: false,
|
|
769
|
+
required: false,
|
|
770
|
+
returnFormat: 'HH:mm:ss',
|
|
771
|
+
error: '',
|
|
772
|
+
minuteStep: 1,
|
|
773
|
+
min: '',
|
|
774
|
+
max: '',
|
|
775
|
+
label: '',
|
|
776
|
+
value: '',
|
|
777
|
+
viewType: 'underlined'
|
|
778
|
+
}
|
|
779
|
+
},
|
|
702
780
|
Toggle: {
|
|
703
781
|
defaultProps: {
|
|
704
782
|
disabled: false,
|