diginet-core-ui 1.3.87 → 1.3.88
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/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +4 -4
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +6 -2
- package/components/accordion/group.js +9 -2
- package/components/accordion/index.js +15 -2
- package/components/accordion/summary.js +27 -4
- package/components/alert/index.js +33 -2
- package/components/alert/notify.js +22 -12
- package/components/avatar/index.js +81 -22
- package/components/badge/index.js +45 -20
- package/components/button/icon.js +56 -25
- package/components/button/index.js +65 -16
- package/components/button/more.js +35 -15
- package/components/button/ripple-effect.js +10 -0
- package/components/card/body.js +7 -2
- package/components/card/extra.js +7 -2
- package/components/card/footer.js +7 -2
- package/components/card/header.js +7 -2
- package/components/card/index.js +22 -2
- package/components/chart/Pie/Circle.js +1 -0
- package/components/chart/Pie/Sector.js +19 -2
- package/components/chart/Pie/Sectors.js +10 -0
- package/components/chart/Pie/index.js +36 -4
- package/components/chart/Pie-v2/Circle.js +1 -0
- package/components/chart/Pie-v2/Sector.js +15 -2
- package/components/chart/Pie-v2/Sectors.js +20 -0
- package/components/chart/Pie-v2/index.js +38 -11
- package/components/chart/bar/Axis.js +12 -0
- package/components/chart/bar/Bar.js +35 -13
- package/components/chart/bar/Grid.js +18 -0
- package/components/chart/bar/Labels.js +18 -0
- package/components/chart/bar/Points.js +17 -0
- package/components/chart/bar/index.js +26 -6
- package/components/chart/bar-v2/Axis.js +12 -0
- package/components/chart/bar-v2/Bar.js +36 -15
- package/components/chart/bar-v2/Grid.js +18 -0
- package/components/chart/bar-v2/Labels.js +18 -0
- package/components/chart/bar-v2/Points.js +17 -0
- package/components/chart/bar-v2/index.js +26 -6
- package/components/chart/line/Axis.js +16 -4
- package/components/chart/line/Grid.js +19 -2
- package/components/chart/line/Labels.js +18 -0
- package/components/chart/line/Path.js +33 -23
- package/components/chart/line/Point.js +40 -6
- package/components/chart/line/Title.js +3 -0
- package/components/chart/line/index.js +35 -12
- package/components/chart/line-v2/Axis.js +13 -0
- package/components/chart/line-v2/Grid.js +18 -0
- package/components/chart/line-v2/Labels.js +18 -0
- package/components/chart/line-v2/Path.js +33 -23
- package/components/chart/line-v2/Point.js +35 -6
- package/components/chart/line-v2/Title.js +3 -0
- package/components/chart/line-v2/index.js +30 -12
- package/components/check-text/index.js +8 -0
- package/components/check-text/interview-confirmation.js +7 -0
- package/components/check-text/interview-status.js +7 -0
- package/components/chip/attach.js +22 -9
- package/components/chip/index.js +33 -6
- package/components/collapse/index.js +13 -0
- package/components/divider/index.js +13 -2
- package/components/form-control/attachment/index.js +202 -41
- package/components/form-control/calendar/function.js +207 -153
- package/components/form-control/calendar/index.js +46 -21
- package/components/form-control/calendar/range.js +28 -11
- package/components/form-control/checkbox/index.js +37 -4
- package/components/form-control/control/index.js +13 -3
- package/components/form-control/date-picker/index-old.js +0 -18
- package/components/form-control/date-picker/index.js +99 -23
- package/components/form-control/date-range-picker/index.js +180 -44
- package/components/form-control/dropdown/index.js +314 -101
- package/components/form-control/dropdown-box/index.js +35 -6
- package/components/form-control/form/index.js +2 -0
- package/components/form-control/form-group/index.js +6 -1
- package/components/form-control/helper-text/index.js +9 -2
- package/components/form-control/input-base/index.js +73 -9
- package/components/form-control/label/index.js +12 -2
- package/components/form-control/money-input/index.js +143 -54
- package/components/form-control/number-input/index.js +124 -26
- package/components/form-control/number-input/index2.js +119 -78
- package/components/form-control/phone-input/index.js +85 -23
- package/components/form-control/radio/index.js +28 -9
- package/components/form-control/text-input/index.js +46 -10
- package/components/form-control/time-picker/index.js +71 -14
- package/components/form-control/time-picker/swiper.js +73 -21
- package/components/form-control/toggle/index.js +23 -8
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +14 -0
- package/components/form-view/input.js +13 -2
- package/components/form-view/label.js +2 -0
- package/components/grid/Col.js +16 -2
- package/components/grid/Container.js +21 -2
- package/components/grid/Row.js +21 -2
- package/components/grid/index.js +44 -2
- package/components/image/index.js +22 -2
- package/components/index.js +31 -62
- package/components/list/list-item-action.js +9 -0
- package/components/list/list-item-icon.js +9 -0
- package/components/list/list-item-text.js +5 -0
- package/components/list/list-item.js +11 -0
- package/components/list/list.js +13 -0
- package/components/list/sub-header.js +4 -0
- package/components/modal/body.js +6 -2
- package/components/modal/footer.js +11 -2
- package/components/modal/header.js +12 -2
- package/components/modal/index.js +10 -2
- package/components/modal/modal.js +52 -11
- package/components/others/extra/index.js +10 -3
- package/components/others/import/index.js +7 -0
- package/components/others/option-wrapper/index.js +7 -4
- package/components/others/scrollbar/index.js +3 -0
- package/components/paging/page-info.js +99 -35
- package/components/paging/page-selector.js +35 -7
- package/components/paging/page-selector2.js +74 -35
- package/components/paper/index.js +11 -0
- package/components/popover/body.js +6 -2
- package/components/popover/footer.js +11 -2
- package/components/popover/header.js +7 -2
- package/components/popover/index.js +146 -54
- package/components/popup/danger_popup.js +19 -0
- package/components/popup/index.js +48 -2
- package/components/popup/proposals_popup.js +49 -10
- package/components/popup/v2/index.js +47 -13
- package/components/progress/circular.js +48 -10
- package/components/progress/linear.js +20 -4
- package/components/rating/index.js +32 -8
- package/components/slider/slider-container.js +40 -3
- package/components/slider/slider-item.js +25 -10
- package/components/status/index.js +14 -2
- package/components/tab/tab-container.js +18 -4
- package/components/tab/tab-header.js +24 -4
- package/components/tab/tab-panel.js +16 -4
- package/components/tab/tab.js +30 -6
- package/components/tooltip/index.js +97 -12
- package/components/tooltip/portal.js +2 -0
- package/components/transfer/index.js +70 -25
- package/components/tree-view/index.js +202 -62
- package/components/typography/index.js +70 -47
- package/global/index.js +8 -0
- package/icons/basic.js +232 -0
- package/icons/effect.js +32 -15
- package/icons/general/clock/clock.js +2 -0
- package/icons/general/color-handler/background.js +2 -0
- package/icons/general/color-handler/text.js +2 -0
- package/icons/general/emoji/emoji.js +2 -0
- package/icons/general/font-properties/bold.js +2 -0
- package/icons/general/font-properties/font-family.js +2 -0
- package/icons/general/font-properties/font-size.js +2 -0
- package/icons/general/font-properties/italic.js +2 -0
- package/icons/general/font-properties/underline.js +2 -0
- package/icons/general/hyperlink/hyperlink.js +2 -0
- package/icons/general/indent/decrease.js +2 -0
- package/icons/general/indent/increase.js +2 -0
- package/icons/general/list/bullets.js +2 -0
- package/icons/general/list/numbering.js +2 -0
- package/icons/general/picture/picture.js +2 -0
- package/icons/general/steps/redo.js +2 -0
- package/icons/general/steps/undo.js +2 -0
- package/icons/general/text-align/center.js +2 -0
- package/icons/general/text-align/justify.js +2 -0
- package/icons/general/text-align/left.js +2 -0
- package/icons/general/text-align/right.js +2 -0
- package/icons/menu/dhr.js +1 -2
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +15 -2
- package/package.json +42 -42
- package/readme.md +1027 -1022
- package/styles/animation.js +58 -15
- package/styles/color-helper.js +157 -127
- package/styles/colors.js +9 -17
- package/styles/general.js +80 -18
- package/styles/typography.js +4 -4
- package/styles/utils.js +20 -19
- package/theme/createBreakpoints.js +18 -7
- package/theme/make-styles.js +5 -2
- package/theme/set-theme.js +9 -6
- package/theme/settings.js +2 -3
- package/theme/theme-provider.js +1 -0
- package/utils/array/array.js +54 -45
- package/utils/{classNames.js → classNames/index.js} +5 -0
- package/utils/console.js +6 -0
- package/utils/date.js +138 -69
- package/utils/error/error.js +11 -3
- package/utils/error/errors.js +147 -100
- package/utils/getFileType.js +9 -0
- package/utils/handleBreakpoints.js +5 -0
- package/utils/intersectionObserver.js +5 -0
- package/utils/{isMobile.js → isMobile/index.js} +0 -0
- package/utils/iterator.js +9 -0
- package/utils/map-parent.js +10 -3
- package/utils/object/extend.js +10 -0
- package/utils/object/object.js +11 -12
- package/utils/parseHTML.js +1 -0
- package/utils/promisify.js +5 -0
- package/utils/randomString.js +7 -0
- package/utils/remove-unicode.js +1 -0
- package/utils/render-portal.js +9 -1
- package/utils/renderHTML.js +6 -4
- package/utils/renderIcon.js +19 -9
- package/utils/sb-template.js +5 -6
- package/utils/string/capitalize.js +1 -0
- package/utils/string/capitalizeSentenceCase.js +2 -0
- package/utils/string/string.js +13 -0
- package/utils/type.js +21 -0
- package/utils/updatePosition.js +5 -4
- package/utils/useDelayUnmount.js +4 -0
- package/utils/useElementSize.js +3 -9
- package/utils/useEventListener.js +6 -12
- package/utils/useInput.js +6 -0
- package/utils/{useMediaQuery.js → useMediaQuery/index.js} +10 -8
- package/utils/useOnClickOutside.js +4 -2
- package/utils/usePortal.js +19 -12
- package/utils/validate.js +53 -39
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
|
|
3
|
+
/** @jsx jsx */
|
|
4
4
|
import { jsx } from '@emotion/core';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
@@ -41,10 +41,10 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
41
41
|
limit: 'DGN-UI-Calendar-Day-limit'
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* START REFERENCE
|
|
44
|
+
/**
|
|
45
|
+
* START REFERENCE
|
|
47
46
|
*/
|
|
47
|
+
|
|
48
48
|
const ref = useRef(null);
|
|
49
49
|
const tableRef = useRef(null);
|
|
50
50
|
const activeValue = useRef(null);
|
|
@@ -61,13 +61,14 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
61
61
|
};
|
|
62
62
|
const firstDayOfMax = new Date(new Date(max).setDate(1)).setHours(0, 0, 0, 0);
|
|
63
63
|
const firstDayOfMin = new Date(new Date(min).setDate(1)).setHours(0, 0, 0, 0);
|
|
64
|
-
/**
|
|
65
|
-
* END REFERENCE
|
|
64
|
+
/**
|
|
65
|
+
* END REFERENCE
|
|
66
66
|
*/
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
* START FUNCTION
|
|
68
|
+
/**
|
|
69
|
+
* START FUNCTION
|
|
70
70
|
*/
|
|
71
|
+
|
|
71
72
|
const onUpdateNavigatorValue = useCallback(value => {
|
|
72
73
|
navigatorValue.current = value;
|
|
73
74
|
setNavigatorValue();
|
|
@@ -76,15 +77,18 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
76
77
|
activeValue.current = value;
|
|
77
78
|
setActiveValue();
|
|
78
79
|
}, [activeValue]);
|
|
80
|
+
|
|
79
81
|
const onUpdate = value => {
|
|
80
82
|
const newValue = new Date(value).setHours(0, 0, 0, 0);
|
|
81
83
|
onUpdateActiveValue(newValue);
|
|
82
84
|
onUpdateCalendar(newValue, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
83
85
|
};
|
|
86
|
+
|
|
84
87
|
const getCurrentTime = () => {
|
|
85
88
|
const time = new Date(navigatorValue.current);
|
|
86
89
|
return [time.getDate(), time.getMonth(), time.getFullYear()];
|
|
87
90
|
};
|
|
91
|
+
|
|
88
92
|
const onDayClick = e => {
|
|
89
93
|
const node = e.currentTarget;
|
|
90
94
|
tableRef.current.querySelectorAll(`td.${unique.day.active}`).forEach(element => {
|
|
@@ -93,57 +97,70 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
93
97
|
node.classList.add(unique.day.active);
|
|
94
98
|
const timeStamp = Number(node.dataset.time);
|
|
95
99
|
const objNewDate = new Date(timeStamp);
|
|
100
|
+
|
|
96
101
|
const _navigatorValue = new Date(navigatorValue.current);
|
|
102
|
+
|
|
97
103
|
const objNewDateMonth = objNewDate.getMonth() + 1;
|
|
98
104
|
const objNewDateYear = objNewDate.getFullYear();
|
|
99
105
|
const navigatorMonth = _navigatorValue.getMonth() + 1;
|
|
106
|
+
|
|
100
107
|
const navigatorYear = _navigatorValue.getFullYear();
|
|
108
|
+
|
|
101
109
|
onUpdateActiveValue(objNewDate);
|
|
102
110
|
if (objNewDateMonth > navigatorMonth || objNewDateYear > navigatorYear) setNextMonth();else if (objNewDateMonth < navigatorMonth || objNewDateYear < navigatorYear) setPrevMonth();
|
|
103
111
|
!!onClick && onClick({
|
|
104
112
|
value: objNewDate
|
|
105
113
|
});
|
|
106
114
|
};
|
|
115
|
+
|
|
107
116
|
const setPrevYear = e => {
|
|
108
117
|
const time = new Date(getCurrentTime()[2] - 1, getCurrentTime()[1]);
|
|
118
|
+
|
|
109
119
|
if (min && isValidDate(min) && moment(time).diff(firstDayOfMin) < 0) {
|
|
110
120
|
e.preventDefault();
|
|
111
121
|
} else {
|
|
112
122
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
113
123
|
}
|
|
114
124
|
};
|
|
125
|
+
|
|
115
126
|
const setNextYear = e => {
|
|
116
127
|
const time = new Date(getCurrentTime()[2] + 1, getCurrentTime()[1]);
|
|
128
|
+
|
|
117
129
|
if (max && isValidDate(max) && moment(time).diff(firstDayOfMax) > 0) {
|
|
118
130
|
e.preventDefault();
|
|
119
131
|
} else {
|
|
120
132
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
121
133
|
}
|
|
122
134
|
};
|
|
135
|
+
|
|
123
136
|
const setPrevMonth = e => {
|
|
124
137
|
const time = new Date(getCurrentTime()[2], getCurrentTime()[1] - 1);
|
|
138
|
+
|
|
125
139
|
if (min && isValidDate(min) && moment(time).diff(firstDayOfMin) < 0) {
|
|
126
140
|
e.preventDefault();
|
|
127
141
|
} else {
|
|
128
142
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
129
143
|
}
|
|
130
144
|
};
|
|
145
|
+
|
|
131
146
|
const setNextMonth = e => {
|
|
132
147
|
const time = new Date(getCurrentTime()[2], getCurrentTime()[1] + 1);
|
|
148
|
+
|
|
133
149
|
if (max && isValidDate(max) && moment(time).diff(firstDayOfMax) > 0) {
|
|
134
150
|
e.preventDefault();
|
|
135
151
|
} else {
|
|
136
152
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
137
153
|
}
|
|
138
154
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
* END FUNCTION
|
|
155
|
+
/**
|
|
156
|
+
* END FUNCTION
|
|
142
157
|
*/
|
|
143
158
|
|
|
144
|
-
/**
|
|
145
|
-
* START EFFECT
|
|
159
|
+
/**
|
|
160
|
+
* START EFFECT
|
|
146
161
|
*/
|
|
162
|
+
|
|
163
|
+
|
|
147
164
|
useEffect(() => {
|
|
148
165
|
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue)) {
|
|
149
166
|
if (isBeforeLimit(min, defaultValue)) {
|
|
@@ -181,24 +198,25 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
181
198
|
onUpdate(activeValue.current);
|
|
182
199
|
}
|
|
183
200
|
}, [onClick, min, max]);
|
|
184
|
-
/**
|
|
185
|
-
* END FUNCTION
|
|
201
|
+
/**
|
|
202
|
+
* END FUNCTION
|
|
186
203
|
*/
|
|
187
204
|
|
|
188
|
-
/**
|
|
189
|
-
* START COMPONENT
|
|
205
|
+
/**
|
|
206
|
+
* START COMPONENT
|
|
190
207
|
*/
|
|
208
|
+
|
|
191
209
|
const tableMemo = jsx("div", {
|
|
192
210
|
className: unique.table.container
|
|
193
211
|
}, jsx("table", {
|
|
194
212
|
className: unique.table.table,
|
|
195
213
|
ref: tableRef
|
|
196
214
|
}, renderHeader(unique), jsx("tbody", null)));
|
|
197
|
-
/**
|
|
198
|
-
* END COMPONENT
|
|
215
|
+
/**
|
|
216
|
+
* END COMPONENT
|
|
199
217
|
*/
|
|
200
|
-
|
|
201
|
-
|
|
218
|
+
|
|
219
|
+
return jsx("div", { ...props,
|
|
202
220
|
className: [unique.container, className].join(' ').trim().replace(/\s+/g, ' '),
|
|
203
221
|
css: generateCalendarCSS(unique),
|
|
204
222
|
ref: ref
|
|
@@ -212,18 +230,25 @@ Calendar.defaultProps = {
|
|
|
212
230
|
Calendar.propTypes = {
|
|
213
231
|
/** the footer actions */
|
|
214
232
|
actions: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
|
|
233
|
+
|
|
215
234
|
/** class for calendar */
|
|
216
235
|
className: PropTypes.string,
|
|
236
|
+
|
|
217
237
|
/** the default value of the calendar */
|
|
218
238
|
defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
239
|
+
|
|
219
240
|
/** display days of previous or next month */
|
|
220
241
|
displayAnotherMonth: PropTypes.bool,
|
|
242
|
+
|
|
221
243
|
/** the last date that can be selected within the UI component. */
|
|
222
244
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
245
|
+
|
|
223
246
|
/** the minimum date that can be selected within the UI component. */
|
|
224
247
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
248
|
+
|
|
225
249
|
/** a callback function when click on a day of calendar */
|
|
226
250
|
onClick: PropTypes.func,
|
|
251
|
+
|
|
227
252
|
/** value of the calendar */
|
|
228
253
|
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array])
|
|
229
254
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
|
|
3
|
+
/** @jsx jsx */
|
|
4
4
|
import { css, jsx } from '@emotion/core';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
@@ -41,8 +41,8 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
41
41
|
const [, setActiveValueTo] = useState(Date.now());
|
|
42
42
|
const [, setNavigatorValueFr] = useState(Date.now());
|
|
43
43
|
const [, setNavigatorValueTo] = useState(Date.now());
|
|
44
|
-
const [, setValues] = useState(Date.now());
|
|
45
|
-
|
|
44
|
+
const [, setValues] = useState(Date.now()); // const [id] = useState(randomString(6, { allowSymbol: false }));
|
|
45
|
+
|
|
46
46
|
const unique = {
|
|
47
47
|
container: 'DGN-UI-Calendar-Range',
|
|
48
48
|
divider: 'DGN-UI-Calendar-Range-Divider',
|
|
@@ -145,32 +145,37 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
145
145
|
} else {
|
|
146
146
|
values.current.splice(0, 2, Date.parse(new Date(v)));
|
|
147
147
|
}
|
|
148
|
+
|
|
148
149
|
setValues();
|
|
149
150
|
}, [values]);
|
|
151
|
+
|
|
150
152
|
const onCalFrClick = e => {
|
|
151
153
|
console.log(e.currentTarget.dataset.time);
|
|
152
154
|
};
|
|
155
|
+
|
|
153
156
|
const onCalToClick = e => {
|
|
154
157
|
console.log(e.currentTarget.dataset.time);
|
|
155
158
|
};
|
|
159
|
+
|
|
156
160
|
const clearHovering = e => {
|
|
157
161
|
const arr = Array.from(e.getElementsByTagName('td'));
|
|
162
|
+
|
|
158
163
|
for (let i in arr) {
|
|
159
164
|
arr[i].classList.remove('hover-start', 'hover-between', 'hover-end');
|
|
160
165
|
}
|
|
161
166
|
};
|
|
162
|
-
|
|
163
|
-
|
|
167
|
+
|
|
168
|
+
const onDayHover = () => {// const hoverTime = parseInt(e.target.dataset.time, 10);
|
|
164
169
|
// console.log(hoverTime);
|
|
165
170
|
};
|
|
171
|
+
|
|
166
172
|
const onPickerHover = e => {
|
|
167
173
|
if (e.target.tagName && e.target.tagName.toLowerCase() === 'td') {
|
|
168
174
|
onDayHover(e);
|
|
169
175
|
} else {
|
|
170
176
|
clearHovering(e.currentTarget);
|
|
171
177
|
}
|
|
172
|
-
};
|
|
173
|
-
// const onUpdateFrom = (value) => {
|
|
178
|
+
}; // const onUpdateFrom = (value) => {
|
|
174
179
|
// const newValue = new Date(value).setHours(0, 0, 0, 0);
|
|
175
180
|
// onUpdateActiveValueFr(newValue);
|
|
176
181
|
// onUpdateCalendar(newValue, navigatorFromRefs, min, max, tableFrRef.current, [activeValueFr.current, activeValueTo.current], unique.from, displayAnotherMonth, onCalFrClick, onUpdateNavigatorValueFr);
|
|
@@ -180,9 +185,12 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
180
185
|
// onUpdateActiveValueTo(newValue);
|
|
181
186
|
// onUpdateCalendar(newValue, navigatorToRefs, min, max, tableToRef.current, [activeValueFr.current, activeValueTo.current], unique.to, displayAnotherMonth, onCalToClick, onUpdateNavigatorValueTo);
|
|
182
187
|
// };
|
|
188
|
+
|
|
189
|
+
|
|
183
190
|
const onUpdateNavigatorValue = values => {
|
|
184
191
|
const fr = new Date(values[0]);
|
|
185
192
|
const to = new Date(values[1]);
|
|
193
|
+
|
|
186
194
|
if (fr.getFullYear() === to.getFullYear() && fr.getMonth() === to.getMonth()) {
|
|
187
195
|
onUpdateNavigatorValueFr(new Date(fr.getFullYear(), fr.getMonth()));
|
|
188
196
|
onUpdateNavigatorValueTo(new Date(to.getFullYear(), to.getMonth() + 1));
|
|
@@ -191,6 +199,7 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
191
199
|
onUpdateNavigatorValueTo(new Date(to.getFullYear(), to.getMonth()));
|
|
192
200
|
}
|
|
193
201
|
};
|
|
202
|
+
|
|
194
203
|
const onUpdateActiveValue = values => {
|
|
195
204
|
if (values[1] && isValidDate(values[1])) {
|
|
196
205
|
onUpdateValues(values[0], false);
|
|
@@ -205,12 +214,14 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
205
214
|
onUpdateActiveValueTo(values[1]);
|
|
206
215
|
}
|
|
207
216
|
};
|
|
217
|
+
|
|
208
218
|
const onUpdate = array => {
|
|
209
219
|
onUpdateActiveValue(array);
|
|
210
220
|
onUpdateNavigatorValue(array);
|
|
211
221
|
onUpdateCalendar(navigatorValueFr.current, navigatorFromRefs, min, max, tableFrRef.current, values.current, unique.from, displayAnotherMonth, onCalFrClick, onUpdateNavigatorValueFr);
|
|
212
222
|
onUpdateCalendar(navigatorValueTo.current, navigatorToRefs, min, max, tableToRef.current, values.current, unique.to, displayAnotherMonth, onCalToClick, onUpdateNavigatorValueTo);
|
|
213
223
|
};
|
|
224
|
+
|
|
214
225
|
const calendarFrom = jsx("div", {
|
|
215
226
|
className: unique.from.container,
|
|
216
227
|
css: generateCalendarCSS(unique.from, false, false)
|
|
@@ -237,18 +248,18 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
237
248
|
useImperativeHandle(reference, () => {
|
|
238
249
|
const currentRef = ref.current || {};
|
|
239
250
|
const _instance = {}; // methods
|
|
251
|
+
|
|
240
252
|
_instance.__proto__ = {}; // hidden methods
|
|
253
|
+
|
|
241
254
|
currentRef.instance = _instance;
|
|
242
255
|
return currentRef;
|
|
243
256
|
});
|
|
244
|
-
return jsx("div", {
|
|
245
|
-
...props,
|
|
257
|
+
return jsx("div", { ...props,
|
|
246
258
|
className: unique.container,
|
|
247
259
|
onMouseOver: onPickerHover,
|
|
248
260
|
css: containerCSS,
|
|
249
261
|
ref: ref
|
|
250
|
-
}, calendarFrom, jsx(Divider, {
|
|
251
|
-
...dividerProps
|
|
262
|
+
}, calendarFrom, jsx(Divider, { ...dividerProps
|
|
252
263
|
}), calendarTo, actions);
|
|
253
264
|
}));
|
|
254
265
|
CalendarRange.defaultProps = {
|
|
@@ -259,16 +270,22 @@ CalendarRange.defaultProps = {
|
|
|
259
270
|
CalendarRange.propTypes = {
|
|
260
271
|
/** the footer actions */
|
|
261
272
|
actions: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
|
|
273
|
+
|
|
262
274
|
/** the default value of the calendar */
|
|
263
275
|
defaultValue: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
276
|
+
|
|
264
277
|
/** display days of previous or next month */
|
|
265
278
|
displayAnotherMonth: PropTypes.bool,
|
|
279
|
+
|
|
266
280
|
/** the last date that can be selected within the UI component. */
|
|
267
281
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
282
|
+
|
|
268
283
|
/** the minimum date that can be selected within the UI component. */
|
|
269
284
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
285
|
+
|
|
270
286
|
/** a callback function when click on a day of calendar */
|
|
271
287
|
onClick: PropTypes.func,
|
|
288
|
+
|
|
272
289
|
/** value of the calendar */
|
|
273
290
|
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array])
|
|
274
291
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { css, jsx } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -54,22 +55,29 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
54
55
|
if (!inputRef) {
|
|
55
56
|
inputRef = useRef(null);
|
|
56
57
|
}
|
|
58
|
+
|
|
57
59
|
const ref = useRef(null);
|
|
58
60
|
if (typeof width === 'number') width += 'px';
|
|
59
61
|
const [checkedState, setCheckedState] = useState(checked || defaultChecked);
|
|
62
|
+
|
|
60
63
|
if (!id) {
|
|
61
64
|
[id] = useState('DGN-UI-' + randomString(10, {
|
|
62
65
|
allowNumber: false,
|
|
63
66
|
allowSymbol: false
|
|
64
67
|
}));
|
|
65
68
|
}
|
|
69
|
+
|
|
66
70
|
const clMain = colors[color] || color;
|
|
71
|
+
|
|
67
72
|
const _CheckBoxSquareCSS = CheckBoxSquareCSS(width, clMain);
|
|
73
|
+
|
|
68
74
|
const _CheckBoxInputCSS = CheckBoxInputCSS(_CheckBoxSquareCSS.name, clMain);
|
|
75
|
+
|
|
69
76
|
const handleChange = event => {
|
|
70
77
|
stopPropagation && event.stopPropagation();
|
|
71
78
|
if (readOnly || inputProps.readOnly || disabled || inputProps.disabled) return;
|
|
72
79
|
const oldLogicChecked = inputRef.current.checked; //Use for TreeView
|
|
80
|
+
|
|
73
81
|
if (forTreeView) {
|
|
74
82
|
inputRef.current.checked = !oldLogicChecked; //Use for TreeView
|
|
75
83
|
}
|
|
@@ -83,11 +91,13 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
83
91
|
};
|
|
84
92
|
if (onChange) onChange(e, checkedState);
|
|
85
93
|
};
|
|
94
|
+
|
|
86
95
|
const setChecked = check => {
|
|
87
96
|
if (typeof check === 'boolean') {
|
|
88
97
|
setCheckedState(check);
|
|
89
98
|
}
|
|
90
99
|
};
|
|
100
|
+
|
|
91
101
|
useEffect(() => {
|
|
92
102
|
if (checked !== undefined) setCheckedState(Boolean(checked));
|
|
93
103
|
}, [checked]);
|
|
@@ -100,11 +110,15 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
100
110
|
getChecked: () => checkedState,
|
|
101
111
|
...action
|
|
102
112
|
}; // methods
|
|
113
|
+
|
|
103
114
|
_instance.__proto__ = {}; // hidden methods
|
|
115
|
+
|
|
104
116
|
currentRef.instance = _instance;
|
|
105
117
|
currentRef.determinate = determinate;
|
|
106
118
|
currentRef.setChecked = setChecked;
|
|
119
|
+
|
|
107
120
|
currentRef.getChecked = () => checkedState;
|
|
121
|
+
|
|
108
122
|
return currentRef;
|
|
109
123
|
});
|
|
110
124
|
return jsx("div", {
|
|
@@ -149,6 +163,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
149
163
|
}
|
|
150
164
|
}, "*"))))));
|
|
151
165
|
}));
|
|
166
|
+
|
|
152
167
|
const CheckBoxSquareCSS = (width, clMain) => css`
|
|
153
168
|
${flexRow};
|
|
154
169
|
${positionRelative};
|
|
@@ -207,6 +222,7 @@ const CheckBoxSquareCSS = (width, clMain) => css`
|
|
|
207
222
|
${cursorNoDrop};
|
|
208
223
|
}
|
|
209
224
|
`;
|
|
225
|
+
|
|
210
226
|
const CheckBoxInputCSS = (CheckBoxSquareCSSName, clMain) => css`
|
|
211
227
|
&:checked + label > span.css-${CheckBoxSquareCSSName} {
|
|
212
228
|
&.determinate {
|
|
@@ -244,6 +260,7 @@ const CheckBoxInputCSS = (CheckBoxSquareCSSName, clMain) => css`
|
|
|
244
260
|
}
|
|
245
261
|
}
|
|
246
262
|
`;
|
|
263
|
+
|
|
247
264
|
const CheckBoxLabelCSS = css`
|
|
248
265
|
${flexRow};
|
|
249
266
|
${positionRelative};
|
|
@@ -277,40 +294,56 @@ Checkbox.defaultProps = {
|
|
|
277
294
|
Checkbox.propTypes = {
|
|
278
295
|
/** If `true`, the component is checked. */
|
|
279
296
|
checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
297
|
+
|
|
280
298
|
/** Class for component. */
|
|
281
299
|
className: PropTypes.string,
|
|
300
|
+
|
|
282
301
|
/** The main color of the component. ['primary', 'info', 'success', 'warning', 'danger', #hex, rgb(#, #, #)] */
|
|
283
302
|
color: PropTypes.string,
|
|
303
|
+
|
|
284
304
|
/** The default checked state. Use when the component is not controlled. */
|
|
285
305
|
defaultChecked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
306
|
+
|
|
286
307
|
/** If `true` display tick or indeterminate if `false`. */
|
|
287
308
|
determinate: PropTypes.bool,
|
|
309
|
+
|
|
288
310
|
/** If `true`, the component is disabled. */
|
|
289
311
|
disabled: PropTypes.bool,
|
|
312
|
+
|
|
290
313
|
/** The id of the component. */
|
|
291
314
|
id: PropTypes.string,
|
|
315
|
+
|
|
292
316
|
/** [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. */
|
|
293
317
|
inputProps: PropTypes.object,
|
|
318
|
+
|
|
294
319
|
/** Pass a ref to the input element. */
|
|
295
320
|
inputRef: ref,
|
|
321
|
+
|
|
296
322
|
/** The name of the Radio is displayed on the interface. */
|
|
297
323
|
label: PropTypes.string,
|
|
324
|
+
|
|
298
325
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography--title) applied to the `Typography` label. */
|
|
299
326
|
labelProps: PropTypes.object,
|
|
327
|
+
|
|
300
328
|
/** The name of the Checkbox corresponds to the label displayed on the interface. */
|
|
301
329
|
name: PropTypes.string,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
*
|
|
305
|
-
*
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Callback fired when the state is changed.
|
|
333
|
+
*
|
|
334
|
+
* You can pull out the new checked state by accessing `event.value` or `event.target.checked` (boolean).
|
|
306
335
|
*/
|
|
307
336
|
onChange: PropTypes.func,
|
|
337
|
+
|
|
308
338
|
/** If `true`, the component is readonly. */
|
|
309
339
|
readOnly: PropTypes.bool,
|
|
340
|
+
|
|
310
341
|
/** If `true`, the label will indicate that the checkbox is required. */
|
|
311
342
|
required: PropTypes.bool,
|
|
343
|
+
|
|
312
344
|
/** The value of input */
|
|
313
345
|
value: PropTypes.any,
|
|
346
|
+
|
|
314
347
|
/** The width of checkbox. */
|
|
315
348
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
316
349
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
|
|
3
|
+
/** @jsx jsx */
|
|
4
4
|
import { forwardRef, memo, useImperativeHandle, useLayoutEffect, useRef } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/core';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -28,14 +28,17 @@ const Control = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
28
28
|
if (disabled) {
|
|
29
29
|
ref.current.classList.add(classes.disabled);
|
|
30
30
|
}
|
|
31
|
+
|
|
31
32
|
if (!disabled && error) {
|
|
32
33
|
ref.current.classList.add(classes.error);
|
|
33
34
|
ref.current.querySelector('div.DGN-UI-InputBase').classList.add('danger');
|
|
34
35
|
}
|
|
36
|
+
|
|
35
37
|
return () => {
|
|
36
38
|
if (disabled) {
|
|
37
39
|
ref.current.classList.remove(classes.disabled);
|
|
38
40
|
}
|
|
41
|
+
|
|
39
42
|
if (!disabled && error) {
|
|
40
43
|
ref.current.classList.remove(classes.error);
|
|
41
44
|
ref.current.querySelector('div.DGN-UI-InputBase').classList.remove('danger');
|
|
@@ -45,18 +48,20 @@ const Control = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
45
48
|
useImperativeHandle(reference, () => {
|
|
46
49
|
const currentRef = ref.current || {};
|
|
47
50
|
const _instance = {}; // methods
|
|
51
|
+
|
|
48
52
|
_instance.__proto__ = {}; // hidden methods
|
|
53
|
+
|
|
49
54
|
currentRef.instance = _instance;
|
|
50
55
|
return currentRef;
|
|
51
56
|
});
|
|
52
|
-
return jsx("div", {
|
|
53
|
-
...props,
|
|
57
|
+
return jsx("div", { ...props,
|
|
54
58
|
className: ['DGN-UI-Control', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
55
59
|
css: controlRootCSS(classes),
|
|
56
60
|
style: style,
|
|
57
61
|
ref: ref
|
|
58
62
|
}, children);
|
|
59
63
|
}));
|
|
64
|
+
|
|
60
65
|
const controlRootCSS = classes => css`
|
|
61
66
|
${displayBlock}
|
|
62
67
|
${positionRelative}
|
|
@@ -71,6 +76,7 @@ const controlRootCSS = classes => css`
|
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
78
|
`;
|
|
79
|
+
|
|
74
80
|
Control.defaultProps = {
|
|
75
81
|
className: '',
|
|
76
82
|
style: {},
|
|
@@ -80,12 +86,16 @@ Control.defaultProps = {
|
|
|
80
86
|
Control.propTypes = {
|
|
81
87
|
/** children of the form control */
|
|
82
88
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.node]).isRequired,
|
|
89
|
+
|
|
83
90
|
/** the class for the form control */
|
|
84
91
|
className: PropTypes.string,
|
|
92
|
+
|
|
85
93
|
/** prevent all event if true, hide all icon */
|
|
86
94
|
disabled: PropTypes.bool,
|
|
95
|
+
|
|
87
96
|
/** error for input */
|
|
88
97
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
98
|
+
|
|
89
99
|
/** style of the component */
|
|
90
100
|
style: PropTypes.object
|
|
91
101
|
};
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
// import { randomString, useOnClickOutside } from '../../../utils';
|
|
8
8
|
// import { blue4, blue13, brand, danger5, danger8, dark, dark4, dark6, dark8, info5, info8, success5, white } from '../../../styles/colors';
|
|
9
9
|
// // import CalendarNavigator from './calendar-navigator'
|
|
10
|
-
|
|
11
10
|
// const getElById = (id) => {
|
|
12
11
|
// return document.getElementById(id);
|
|
13
12
|
// };
|
|
@@ -36,10 +35,8 @@
|
|
|
36
35
|
// }
|
|
37
36
|
// }
|
|
38
37
|
// // if (/^(mm|MM)[\/\-](dd|DD)[\/\-]((y|Y){4})$/.test(format)) {
|
|
39
|
-
|
|
40
38
|
// // }
|
|
41
39
|
// // if (/^((y|Y){4})[\/\-](mm|MM)[\/\-](dd|DD)$/.test(format)) {
|
|
42
|
-
|
|
43
40
|
// // }
|
|
44
41
|
// };
|
|
45
42
|
// // const cutPX = (x) => {
|
|
@@ -49,7 +46,6 @@
|
|
|
49
46
|
// const weekdaysShort = ['H', 'B', 'T', 'N', 'S', 'B', 'CN'];
|
|
50
47
|
// const months = ['tháng 01', 'tháng 02', 'tháng 03', 'tháng 04', 'tháng 05', 'tháng 06', 'tháng 07', 'tháng 08', 'tháng 09', 'tháng 10', 'tháng 11', 'tháng 12'];
|
|
51
48
|
// const validateAlert = 'Invalidate value';
|
|
52
|
-
|
|
53
49
|
// const DatePicker = memo(forwardRef(({defaultValue, disabled, error, helperInvalid, helperValid, inputProps, inputRef, label, onChange, required, size, viewType, ...props}, ref) => {
|
|
54
50
|
// const Id = randomString(7, { allowSymbol: false, allowNumber: false });
|
|
55
51
|
// const IDs = {
|
|
@@ -73,7 +69,6 @@
|
|
|
73
69
|
// const inputContainerRef = useRef(null);
|
|
74
70
|
// const nowDate = !isNaN(Date.parse(defaultValue)) ? new Date(defaultValue) : new Date();
|
|
75
71
|
// useOnClickOutside(inputContainerRef, () => onClickOutside());
|
|
76
|
-
|
|
77
72
|
// const styles = {
|
|
78
73
|
// container: css`
|
|
79
74
|
// * {
|
|
@@ -525,7 +520,6 @@
|
|
|
525
520
|
// }
|
|
526
521
|
// `,
|
|
527
522
|
// };
|
|
528
|
-
|
|
529
523
|
// const getScrollParent = element => {
|
|
530
524
|
// const style = getComputedStyle (element);
|
|
531
525
|
// let scrollParent = window;
|
|
@@ -550,7 +544,6 @@
|
|
|
550
544
|
// return;
|
|
551
545
|
// }
|
|
552
546
|
// const { bottom, left, top } = target.getBoundingClientRect();
|
|
553
|
-
|
|
554
547
|
// if (top > window.innerHeight) {
|
|
555
548
|
// el.style.top = null;
|
|
556
549
|
// el.style.bottom = '5px';
|
|
@@ -620,7 +613,6 @@
|
|
|
620
613
|
// const lastDayIndex = changeDayOfWeek(lastTime);
|
|
621
614
|
// const firstDayIndex = changeDayOfWeek(date);
|
|
622
615
|
// const daysOfNextMonth = 7 - lastDayIndex;
|
|
623
|
-
|
|
624
616
|
// let days = [];
|
|
625
617
|
// let x = firstDayIndex;
|
|
626
618
|
// for (x; x > 0; x--) {
|
|
@@ -630,7 +622,6 @@
|
|
|
630
622
|
// else {
|
|
631
623
|
// days.push(`<td id='${IDs.daysOfPrevMonth + '-' + (prevLastDay - x + 1)}' class='days-of-month prev-date'>${prevLastDay - x + 1}</td>`);
|
|
632
624
|
// }
|
|
633
|
-
|
|
634
625
|
// }
|
|
635
626
|
// for (let i = 1; i <= lastDay; i++) {
|
|
636
627
|
// if (i === new Date().getDate() && date.getMonth() === new Date().getMonth() && date.getFullYear() === new Date().getFullYear()) {
|
|
@@ -645,9 +636,7 @@
|
|
|
645
636
|
// } else {
|
|
646
637
|
// days.push(`<td id='${IDs.daysOfNextMonth + '-' + j}' class='days-of-month next-date'>${j}</td>`);
|
|
647
638
|
// }
|
|
648
|
-
|
|
649
639
|
// }
|
|
650
|
-
|
|
651
640
|
// let table = '';
|
|
652
641
|
// table += '<tr>';
|
|
653
642
|
// for (let i = 0; i < weekdaysLong.length; i++){
|
|
@@ -667,7 +656,6 @@
|
|
|
667
656
|
// }
|
|
668
657
|
// monthDays.innerHTML = table;
|
|
669
658
|
// header.innerHTML = size === 'medium' ? `${months[date.getMonth()]} năm ${date.getFullYear()}` : addZeroToText(date.getMonth() + 1) + '/' + date.getFullYear();
|
|
670
|
-
|
|
671
659
|
// monthDays.querySelectorAll('.days-of-month.this-month').forEach((dc) => {
|
|
672
660
|
// dc.addEventListener('click', (e) => setActiveDay(e, date));
|
|
673
661
|
// });
|
|
@@ -829,16 +817,13 @@
|
|
|
829
817
|
// getElById(`${IDs.daysOfThisMonth + '-' + defaultTime.getDate()}`).classList.add('day-active');
|
|
830
818
|
// }
|
|
831
819
|
// };
|
|
832
|
-
|
|
833
820
|
// useEffect(() => {
|
|
834
821
|
// const input = inputRef.current;
|
|
835
822
|
// const container = ref.current;
|
|
836
823
|
// const scrollArea = getScrollParent(container);
|
|
837
|
-
|
|
838
824
|
// setPosition();
|
|
839
825
|
// renderCalendar(nowDate);
|
|
840
826
|
// checkDefaultValue(nowDate, input);
|
|
841
|
-
|
|
842
827
|
// scrollArea.addEventListener('scroll', setPosition);
|
|
843
828
|
// window.addEventListener('resize', setPosition);
|
|
844
829
|
// document.addEventListener('keydown', e => escKeyFunc(e));
|
|
@@ -858,7 +843,6 @@
|
|
|
858
843
|
// useEffect(() => {
|
|
859
844
|
// renderCalendar(nowDate)
|
|
860
845
|
// }, [size]);
|
|
861
|
-
|
|
862
846
|
// const RequireMemo = useMemo(() => ( required && <span css={styles.require}>*</span> ), [error, required]);
|
|
863
847
|
// const LabelMemo = useMemo(() => (
|
|
864
848
|
// <label css={styles.label} disabled={disabled}>
|
|
@@ -922,7 +906,6 @@
|
|
|
922
906
|
// {CalendarMemo}
|
|
923
907
|
// </div>
|
|
924
908
|
// ), [defaultValue, disabled, error, size, viewType]);
|
|
925
|
-
|
|
926
909
|
// return (
|
|
927
910
|
// <div {...props} css={styles.container} ref={ref}>
|
|
928
911
|
// {LabelMemo}
|
|
@@ -965,5 +948,4 @@
|
|
|
965
948
|
// /** view type of the form control */
|
|
966
949
|
// viewType : PropTypes.oneOf(['outlined', 'underlined']),
|
|
967
950
|
// };
|
|
968
|
-
|
|
969
951
|
// export default DatePicker;
|