diginet-core-ui 1.3.88 → 1.3.89
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 +2 -6
- package/components/accordion/group.js +2 -9
- package/components/accordion/index.js +2 -15
- package/components/accordion/summary.js +4 -27
- package/components/alert/index.js +2 -33
- package/components/alert/notify.js +12 -22
- package/components/avatar/index.js +22 -81
- package/components/badge/index.js +20 -45
- package/components/button/icon.js +25 -56
- package/components/button/index.js +16 -65
- package/components/button/more.js +15 -35
- package/components/button/ripple-effect.js +0 -10
- package/components/card/body.js +2 -7
- package/components/card/extra.js +2 -7
- package/components/card/footer.js +2 -7
- package/components/card/header.js +2 -7
- package/components/card/index.js +2 -22
- package/components/chart/Pie/Circle.js +0 -1
- package/components/chart/Pie/Sector.js +2 -19
- package/components/chart/Pie/Sectors.js +0 -10
- package/components/chart/Pie/index.js +4 -36
- package/components/chart/Pie-v2/Circle.js +0 -1
- package/components/chart/Pie-v2/Sector.js +2 -15
- package/components/chart/Pie-v2/Sectors.js +0 -20
- package/components/chart/Pie-v2/index.js +11 -38
- package/components/chart/bar/Axis.js +0 -12
- package/components/chart/bar/Bar.js +13 -35
- package/components/chart/bar/Grid.js +0 -18
- package/components/chart/bar/Labels.js +4 -22
- package/components/chart/bar/Points.js +0 -17
- package/components/chart/bar/index.js +6 -26
- package/components/chart/bar-v2/Axis.js +0 -12
- package/components/chart/bar-v2/Bar.js +15 -36
- package/components/chart/bar-v2/Grid.js +0 -18
- package/components/chart/bar-v2/Labels.js +4 -22
- package/components/chart/bar-v2/Points.js +0 -17
- package/components/chart/bar-v2/index.js +6 -26
- package/components/chart/line/Axis.js +4 -16
- package/components/chart/line/Grid.js +2 -19
- package/components/chart/line/Labels.js +4 -22
- package/components/chart/line/Path.js +24 -34
- package/components/chart/line/Point.js +7 -41
- package/components/chart/line/Title.js +0 -3
- package/components/chart/line/index.js +12 -35
- package/components/chart/line-v2/Axis.js +0 -13
- package/components/chart/line-v2/Grid.js +0 -18
- package/components/chart/line-v2/Labels.js +4 -22
- package/components/chart/line-v2/Path.js +23 -33
- package/components/chart/line-v2/Point.js +6 -35
- package/components/chart/line-v2/Title.js +0 -3
- package/components/chart/line-v2/index.js +12 -30
- package/components/check-text/index.js +7 -15
- package/components/check-text/interview-confirmation.js +24 -31
- package/components/check-text/interview-status.js +24 -31
- package/components/chip/attach.js +9 -22
- package/components/chip/index.js +13 -38
- package/components/collapse/index.js +0 -13
- package/components/divider/index.js +2 -13
- package/components/form-control/attachment/index.js +41 -202
- package/components/form-control/calendar/function.js +154 -208
- package/components/form-control/calendar/index.js +21 -46
- package/components/form-control/calendar/range.js +11 -28
- package/components/form-control/checkbox/index.js +12 -46
- package/components/form-control/control/index.js +4 -14
- package/components/form-control/date-picker/index-old.js +18 -0
- package/components/form-control/date-picker/index.js +23 -99
- package/components/form-control/date-range-picker/index.js +44 -180
- package/components/form-control/dropdown/index.js +101 -314
- package/components/form-control/dropdown-box/index.js +7 -37
- package/components/form-control/form/index.js +0 -2
- package/components/form-control/form-group/index.js +1 -6
- package/components/form-control/helper-text/index.js +2 -9
- package/components/form-control/input-base/index.js +4 -68
- package/components/form-control/label/index.js +2 -12
- package/components/form-control/money-input/index.js +54 -143
- package/components/form-control/number-input/index.js +26 -124
- package/components/form-control/number-input/index2.js +95 -134
- package/components/form-control/phone-input/index.js +23 -85
- package/components/form-control/radio/index.js +16 -35
- package/components/form-control/text-input/index.js +10 -46
- package/components/form-control/time-picker/index.js +43 -100
- package/components/form-control/time-picker/swiper.js +21 -73
- package/components/form-control/toggle/index.js +26 -40
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +0 -14
- package/components/form-view/input.js +2 -13
- package/components/form-view/label.js +0 -2
- package/components/grid/Col.js +2 -16
- package/components/grid/Container.js +2 -21
- package/components/grid/Row.js +2 -21
- package/components/grid/index.js +2 -44
- package/components/image/index.js +2 -22
- package/components/index.js +62 -31
- package/components/list/list-item-action.js +12 -21
- package/components/list/list-item-icon.js +10 -19
- package/components/list/list-item-text.js +0 -5
- package/components/list/list-item.js +27 -38
- package/components/list/list.js +37 -50
- package/components/list/sub-header.js +13 -17
- package/components/modal/body.js +2 -6
- package/components/modal/footer.js +2 -11
- package/components/modal/header.js +2 -12
- package/components/modal/index.js +2 -10
- package/components/modal/modal.js +11 -52
- package/components/others/extra/index.js +3 -10
- package/components/others/import/index.js +0 -7
- package/components/others/option-wrapper/index.js +4 -7
- package/components/others/scrollbar/index.js +0 -3
- package/components/paging/page-info.js +35 -99
- package/components/paging/page-selector.js +10 -38
- package/components/paging/page-selector2.js +35 -74
- package/components/paper/index.js +23 -34
- package/components/popover/body.js +2 -6
- package/components/popover/footer.js +2 -11
- package/components/popover/header.js +2 -7
- package/components/popover/index.js +54 -146
- package/components/popup/danger_popup.js +0 -19
- package/components/popup/index.js +4 -50
- package/components/popup/proposals_popup.js +11 -50
- package/components/popup/v2/index.js +13 -47
- package/components/progress/circular.js +10 -48
- package/components/progress/linear.js +58 -74
- package/components/rating/index.js +10 -35
- package/components/slider/slider-container.js +4 -41
- package/components/slider/slider-item.js +10 -25
- package/components/status/index.js +2 -14
- package/components/tab/tab-container.js +4 -18
- package/components/tab/tab-header.js +4 -24
- package/components/tab/tab-panel.js +4 -16
- package/components/tab/tab.js +8 -33
- package/components/tooltip/index.js +12 -97
- package/components/tooltip/portal.js +0 -2
- package/components/transfer/index.js +28 -73
- package/components/tree-view/index.js +62 -202
- package/components/typography/index.js +14 -42
- package/global/index.js +0 -8
- package/icons/basic.js +0 -48
- package/icons/effect.js +15 -32
- package/icons/general/clock/clock.js +0 -2
- package/icons/general/color-handler/background.js +0 -2
- package/icons/general/color-handler/text.js +0 -2
- package/icons/general/emoji/emoji.js +0 -2
- package/icons/general/font-properties/bold.js +0 -2
- package/icons/general/font-properties/font-family.js +0 -2
- package/icons/general/font-properties/font-size.js +0 -2
- package/icons/general/font-properties/italic.js +0 -2
- package/icons/general/font-properties/underline.js +0 -2
- package/icons/general/hyperlink/hyperlink.js +0 -2
- package/icons/general/indent/decrease.js +0 -2
- package/icons/general/indent/increase.js +0 -2
- package/icons/general/list/bullets.js +0 -2
- package/icons/general/list/numbering.js +0 -2
- package/icons/general/picture/picture.js +0 -2
- package/icons/general/steps/redo.js +0 -2
- package/icons/general/steps/undo.js +0 -2
- package/icons/general/text-align/center.js +0 -2
- package/icons/general/text-align/justify.js +0 -2
- package/icons/general/text-align/left.js +0 -2
- package/icons/general/text-align/right.js +0 -2
- package/icons/menu/dhr.js +2 -1
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +2 -15
- package/package.json +42 -42
- package/readme.md +1034 -1027
- package/styles/animation.js +15 -58
- package/styles/color-helper.js +127 -157
- package/styles/colors.js +17 -9
- package/styles/general.js +16 -57
- package/styles/typography.js +4 -4
- package/styles/utils.js +18 -18
- package/theme/createBreakpoints.js +7 -18
- package/theme/make-styles.js +2 -5
- package/theme/set-theme.js +6 -9
- package/theme/settings.js +17 -22
- package/theme/theme-provider.js +0 -1
- package/utils/array/array.js +45 -54
- package/utils/classNames/index.js +0 -5
- package/utils/console.js +0 -6
- package/utils/date.js +69 -138
- package/utils/error/error.js +3 -11
- package/utils/error/errors.js +100 -147
- package/utils/getFileType.js +0 -9
- package/utils/handleBreakpoints.js +0 -5
- package/utils/intersectionObserver.js +0 -5
- package/utils/iterator.js +0 -9
- package/utils/map-parent.js +3 -10
- package/utils/object/extend.js +0 -10
- package/utils/object/object.js +12 -11
- package/utils/parseHTML.js +0 -1
- package/utils/promisify.js +0 -5
- package/utils/randomString.js +0 -7
- package/utils/remove-unicode.js +0 -1
- package/utils/render-portal.js +1 -9
- package/utils/renderHTML.js +4 -6
- package/utils/renderIcon.js +9 -19
- package/utils/sb-template.js +6 -5
- package/utils/string/capitalize.js +0 -1
- package/utils/string/capitalizeSentenceCase.js +0 -2
- package/utils/string/string.js +0 -13
- package/utils/type.js +0 -21
- package/utils/updatePosition.js +4 -5
- package/utils/useDelayUnmount.js +0 -4
- package/utils/useElementSize.js +9 -3
- package/utils/useEventListener.js +12 -6
- package/utils/useInput.js +0 -6
- package/utils/useMediaQuery/index.js +8 -10
- package/utils/useOnClickOutside.js +2 -4
- package/utils/usePortal.js +12 -19
- package/utils/validate.js +39 -53
|
@@ -7,6 +7,7 @@
|
|
|
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
|
+
|
|
10
11
|
// const getElById = (id) => {
|
|
11
12
|
// return document.getElementById(id);
|
|
12
13
|
// };
|
|
@@ -35,8 +36,10 @@
|
|
|
35
36
|
// }
|
|
36
37
|
// }
|
|
37
38
|
// // if (/^(mm|MM)[\/\-](dd|DD)[\/\-]((y|Y){4})$/.test(format)) {
|
|
39
|
+
|
|
38
40
|
// // }
|
|
39
41
|
// // if (/^((y|Y){4})[\/\-](mm|MM)[\/\-](dd|DD)$/.test(format)) {
|
|
42
|
+
|
|
40
43
|
// // }
|
|
41
44
|
// };
|
|
42
45
|
// // const cutPX = (x) => {
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
// const weekdaysShort = ['H', 'B', 'T', 'N', 'S', 'B', 'CN'];
|
|
47
50
|
// 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'];
|
|
48
51
|
// const validateAlert = 'Invalidate value';
|
|
52
|
+
|
|
49
53
|
// const DatePicker = memo(forwardRef(({defaultValue, disabled, error, helperInvalid, helperValid, inputProps, inputRef, label, onChange, required, size, viewType, ...props}, ref) => {
|
|
50
54
|
// const Id = randomString(7, { allowSymbol: false, allowNumber: false });
|
|
51
55
|
// const IDs = {
|
|
@@ -69,6 +73,7 @@
|
|
|
69
73
|
// const inputContainerRef = useRef(null);
|
|
70
74
|
// const nowDate = !isNaN(Date.parse(defaultValue)) ? new Date(defaultValue) : new Date();
|
|
71
75
|
// useOnClickOutside(inputContainerRef, () => onClickOutside());
|
|
76
|
+
|
|
72
77
|
// const styles = {
|
|
73
78
|
// container: css`
|
|
74
79
|
// * {
|
|
@@ -520,6 +525,7 @@
|
|
|
520
525
|
// }
|
|
521
526
|
// `,
|
|
522
527
|
// };
|
|
528
|
+
|
|
523
529
|
// const getScrollParent = element => {
|
|
524
530
|
// const style = getComputedStyle (element);
|
|
525
531
|
// let scrollParent = window;
|
|
@@ -544,6 +550,7 @@
|
|
|
544
550
|
// return;
|
|
545
551
|
// }
|
|
546
552
|
// const { bottom, left, top } = target.getBoundingClientRect();
|
|
553
|
+
|
|
547
554
|
// if (top > window.innerHeight) {
|
|
548
555
|
// el.style.top = null;
|
|
549
556
|
// el.style.bottom = '5px';
|
|
@@ -613,6 +620,7 @@
|
|
|
613
620
|
// const lastDayIndex = changeDayOfWeek(lastTime);
|
|
614
621
|
// const firstDayIndex = changeDayOfWeek(date);
|
|
615
622
|
// const daysOfNextMonth = 7 - lastDayIndex;
|
|
623
|
+
|
|
616
624
|
// let days = [];
|
|
617
625
|
// let x = firstDayIndex;
|
|
618
626
|
// for (x; x > 0; x--) {
|
|
@@ -622,6 +630,7 @@
|
|
|
622
630
|
// else {
|
|
623
631
|
// days.push(`<td id='${IDs.daysOfPrevMonth + '-' + (prevLastDay - x + 1)}' class='days-of-month prev-date'>${prevLastDay - x + 1}</td>`);
|
|
624
632
|
// }
|
|
633
|
+
|
|
625
634
|
// }
|
|
626
635
|
// for (let i = 1; i <= lastDay; i++) {
|
|
627
636
|
// if (i === new Date().getDate() && date.getMonth() === new Date().getMonth() && date.getFullYear() === new Date().getFullYear()) {
|
|
@@ -636,7 +645,9 @@
|
|
|
636
645
|
// } else {
|
|
637
646
|
// days.push(`<td id='${IDs.daysOfNextMonth + '-' + j}' class='days-of-month next-date'>${j}</td>`);
|
|
638
647
|
// }
|
|
648
|
+
|
|
639
649
|
// }
|
|
650
|
+
|
|
640
651
|
// let table = '';
|
|
641
652
|
// table += '<tr>';
|
|
642
653
|
// for (let i = 0; i < weekdaysLong.length; i++){
|
|
@@ -656,6 +667,7 @@
|
|
|
656
667
|
// }
|
|
657
668
|
// monthDays.innerHTML = table;
|
|
658
669
|
// header.innerHTML = size === 'medium' ? `${months[date.getMonth()]} năm ${date.getFullYear()}` : addZeroToText(date.getMonth() + 1) + '/' + date.getFullYear();
|
|
670
|
+
|
|
659
671
|
// monthDays.querySelectorAll('.days-of-month.this-month').forEach((dc) => {
|
|
660
672
|
// dc.addEventListener('click', (e) => setActiveDay(e, date));
|
|
661
673
|
// });
|
|
@@ -817,13 +829,16 @@
|
|
|
817
829
|
// getElById(`${IDs.daysOfThisMonth + '-' + defaultTime.getDate()}`).classList.add('day-active');
|
|
818
830
|
// }
|
|
819
831
|
// };
|
|
832
|
+
|
|
820
833
|
// useEffect(() => {
|
|
821
834
|
// const input = inputRef.current;
|
|
822
835
|
// const container = ref.current;
|
|
823
836
|
// const scrollArea = getScrollParent(container);
|
|
837
|
+
|
|
824
838
|
// setPosition();
|
|
825
839
|
// renderCalendar(nowDate);
|
|
826
840
|
// checkDefaultValue(nowDate, input);
|
|
841
|
+
|
|
827
842
|
// scrollArea.addEventListener('scroll', setPosition);
|
|
828
843
|
// window.addEventListener('resize', setPosition);
|
|
829
844
|
// document.addEventListener('keydown', e => escKeyFunc(e));
|
|
@@ -843,6 +858,7 @@
|
|
|
843
858
|
// useEffect(() => {
|
|
844
859
|
// renderCalendar(nowDate)
|
|
845
860
|
// }, [size]);
|
|
861
|
+
|
|
846
862
|
// const RequireMemo = useMemo(() => ( required && <span css={styles.require}>*</span> ), [error, required]);
|
|
847
863
|
// const LabelMemo = useMemo(() => (
|
|
848
864
|
// <label css={styles.label} disabled={disabled}>
|
|
@@ -906,6 +922,7 @@
|
|
|
906
922
|
// {CalendarMemo}
|
|
907
923
|
// </div>
|
|
908
924
|
// ), [defaultValue, disabled, error, size, viewType]);
|
|
925
|
+
|
|
909
926
|
// return (
|
|
910
927
|
// <div {...props} css={styles.container} ref={ref}>
|
|
911
928
|
// {LabelMemo}
|
|
@@ -948,4 +965,5 @@
|
|
|
948
965
|
// /** view type of the form control */
|
|
949
966
|
// viewType : PropTypes.oneOf(['outlined', 'underlined']),
|
|
950
967
|
// };
|
|
968
|
+
|
|
951
969
|
// export default DatePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
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';
|
|
@@ -26,11 +26,9 @@ const {
|
|
|
26
26
|
} = theme;
|
|
27
27
|
const confirmText = getGlobal(['confirm']);
|
|
28
28
|
const cancelText = getGlobal(['cancel']);
|
|
29
|
-
|
|
30
29
|
const formatValue = (value, format, utc = false) => {
|
|
31
30
|
return moment(value).format(format, utc);
|
|
32
31
|
};
|
|
33
|
-
|
|
34
32
|
const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
35
33
|
actionIconAt,
|
|
36
34
|
clearAble,
|
|
@@ -60,7 +58,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
60
58
|
...props
|
|
61
59
|
}, reference) => {
|
|
62
60
|
var _ipRef$current, _ipRef$current2;
|
|
63
|
-
|
|
64
61
|
const [id] = useState(randomString(6, {
|
|
65
62
|
allowSymbol: false
|
|
66
63
|
}));
|
|
@@ -87,9 +84,7 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
87
84
|
const [, setDisplayValue] = useState(Date.now());
|
|
88
85
|
const [, setFocusedValue] = useState(Date.now());
|
|
89
86
|
const [value, setValue] = useState(valueProp || defaultValue);
|
|
90
|
-
|
|
91
87
|
const _IconAreaCSS = IconAreaCSS(unique);
|
|
92
|
-
|
|
93
88
|
const handleDisplayValue = useCallback(value => {
|
|
94
89
|
displayValue.current = new Date(value);
|
|
95
90
|
setDisplayValue();
|
|
@@ -98,14 +93,12 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
98
93
|
focusedValue.current = new Date(value);
|
|
99
94
|
setFocusedValue();
|
|
100
95
|
}, [focusedValue]);
|
|
101
|
-
|
|
102
96
|
const setButtonState = () => {
|
|
103
97
|
if (!footerRef.current || focusedValue.current === undefined || !isValidDate(focusedValue.current)) return;
|
|
104
98
|
const isEqual = focusedValue.current === null || Date.parse(new Date(focusedValue.current)) === Date.parse(new Date(displayValue.current));
|
|
105
99
|
footerRef.current.querySelector(`.${unique.cancel}`).disabled = isEqual;
|
|
106
100
|
footerRef.current.querySelector(`.${unique.confirm}`).disabled = isEqual;
|
|
107
101
|
};
|
|
108
|
-
|
|
109
102
|
const onConfirm = () => {
|
|
110
103
|
displayValue.current = focusedValue.current;
|
|
111
104
|
setButtonState();
|
|
@@ -114,35 +107,29 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
114
107
|
});
|
|
115
108
|
closePicker();
|
|
116
109
|
};
|
|
117
|
-
|
|
118
110
|
const onCancel = () => {
|
|
119
111
|
focusedValue.current = null;
|
|
120
112
|
setButtonState();
|
|
121
113
|
closePicker();
|
|
122
114
|
};
|
|
123
|
-
|
|
124
115
|
const setInputValue = e => {
|
|
125
116
|
ipRef.current.value = capitalizeSentenceCase(formatValue(e.value, displayFormat));
|
|
126
117
|
if (clearAble) onSwap(false);
|
|
127
118
|
};
|
|
128
|
-
|
|
129
119
|
const onChangeValue = e => {
|
|
130
120
|
if (valueProp) {
|
|
131
121
|
closePicker();
|
|
132
122
|
} else {
|
|
133
123
|
setValue(e.value);
|
|
134
124
|
}
|
|
135
|
-
|
|
136
125
|
!!onChange && onChange({
|
|
137
126
|
value: formatValue(e.value, returnFormat)
|
|
138
127
|
});
|
|
139
128
|
};
|
|
140
|
-
|
|
141
129
|
const onCalendarClick = e => {
|
|
142
130
|
handleFocusedValue(e.value);
|
|
143
131
|
controls ? setButtonState() : onChangeValue(e);
|
|
144
132
|
};
|
|
145
|
-
|
|
146
133
|
const getPickerStyle = () => {
|
|
147
134
|
const {
|
|
148
135
|
innerHeight,
|
|
@@ -158,16 +145,15 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
158
145
|
let style = {};
|
|
159
146
|
style.top = top + height + 4;
|
|
160
147
|
style.transformOrigin = '50% 20%';
|
|
161
|
-
|
|
162
148
|
if (style.top + pickerHeight > innerHeight) {
|
|
163
149
|
if (top - pickerHeight > 0) {
|
|
164
150
|
style.top = top - pickerHeight - 4;
|
|
165
151
|
style.transformOrigin = '50% 80%';
|
|
166
152
|
}
|
|
167
153
|
}
|
|
168
|
-
|
|
169
154
|
return PickerCSS.picker(style, left + 400 > innerWidth ? innerWidth - 400 : left, width).styles;
|
|
170
|
-
};
|
|
155
|
+
};
|
|
156
|
+
// const createPortal = () => {
|
|
171
157
|
// let portal = document.getElementById(unique.portal);
|
|
172
158
|
// if (!portal) {
|
|
173
159
|
// portal = document.createElement('div');
|
|
@@ -177,29 +163,23 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
177
163
|
// portal.style.cssText = pickerCSS.portal;
|
|
178
164
|
// return portal;
|
|
179
165
|
// };
|
|
180
|
-
|
|
181
|
-
|
|
182
166
|
const createBackground = () => {
|
|
183
167
|
let background = document.getElementById(unique.backGr);
|
|
184
|
-
|
|
185
168
|
if (!background) {
|
|
186
169
|
background = document.createElement('div');
|
|
187
170
|
background.id = unique.backGr;
|
|
188
171
|
background.classList.add(unique.portal, unique.backGr);
|
|
189
172
|
document.body.appendChild(background);
|
|
190
173
|
}
|
|
191
|
-
|
|
192
174
|
background.style.cssText = PickerCSS.backGr;
|
|
193
175
|
return background;
|
|
194
176
|
};
|
|
195
|
-
|
|
196
177
|
const createPicker = () => {
|
|
197
178
|
const picker = document.createElement('div');
|
|
198
179
|
picker.id = unique.picker;
|
|
199
180
|
picker.style.cssText = getPickerStyle();
|
|
200
181
|
return picker;
|
|
201
182
|
};
|
|
202
|
-
|
|
203
183
|
const pressESCHandler = event => {
|
|
204
184
|
if (event.key === 'Escape' || event.key === 'Tab') {
|
|
205
185
|
onClickOutside({
|
|
@@ -207,32 +187,25 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
207
187
|
});
|
|
208
188
|
}
|
|
209
189
|
};
|
|
210
|
-
|
|
211
190
|
const onScroll = () => {
|
|
212
191
|
const node = document.getElementById(unique.picker);
|
|
213
|
-
|
|
214
192
|
if (!ipConRef.current || !node) {
|
|
215
193
|
window.removeEventListener('scroll', onScroll);
|
|
216
194
|
return;
|
|
217
195
|
}
|
|
218
|
-
|
|
219
196
|
updatePosition(ipConRef.current, node, closePicker);
|
|
220
197
|
};
|
|
221
|
-
|
|
222
198
|
const onResize = () => {
|
|
223
199
|
if (!ref.current) return;
|
|
224
200
|
const {
|
|
225
201
|
width
|
|
226
202
|
} = ref.current.getBoundingClientRect();
|
|
227
203
|
const node = document.getElementById(unique.picker);
|
|
228
|
-
|
|
229
204
|
if (node) {
|
|
230
205
|
node.style.width = width + 'px';
|
|
231
206
|
}
|
|
232
|
-
|
|
233
207
|
onScroll();
|
|
234
208
|
};
|
|
235
|
-
|
|
236
209
|
const openPicker = () => {
|
|
237
210
|
const backGr = createBackground();
|
|
238
211
|
const picker = createPicker();
|
|
@@ -247,47 +220,43 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
247
220
|
onClick: onCalendarClick
|
|
248
221
|
}), backGr.appendChild(picker));
|
|
249
222
|
setTimeout(() => {
|
|
250
|
-
Object.assign(picker.style, {
|
|
223
|
+
Object.assign(picker.style, {
|
|
224
|
+
...PickerCSS.active
|
|
251
225
|
});
|
|
252
226
|
window.addEventListener('resize', onResize);
|
|
253
227
|
window.addEventListener('scroll', onScroll);
|
|
254
228
|
document.addEventListener('mousedown', onClickOutside);
|
|
255
|
-
|
|
256
229
|
if (pressESCToClose) {
|
|
257
230
|
document.addEventListener('keydown', pressESCHandler);
|
|
258
231
|
}
|
|
259
|
-
|
|
260
232
|
setButtonState();
|
|
261
233
|
});
|
|
262
234
|
};
|
|
263
|
-
|
|
264
235
|
const closePicker = () => {
|
|
265
236
|
const backGr = document.getElementById(unique.backGr);
|
|
266
237
|
if (!backGr) return;
|
|
267
238
|
const picker = backGr.querySelector(`#${unique.picker}`);
|
|
268
239
|
if (!picker) return;
|
|
269
|
-
Object.assign(picker.style, {
|
|
240
|
+
Object.assign(picker.style, {
|
|
241
|
+
...PickerCSS.remove
|
|
270
242
|
});
|
|
271
|
-
|
|
272
243
|
if (pressESCToClose) {
|
|
273
244
|
document.removeEventListener('keydown', pressESCHandler);
|
|
274
245
|
}
|
|
275
|
-
|
|
276
246
|
document.removeEventListener('mousedown', onClickOutside);
|
|
277
247
|
window.removeEventListener('scroll', onScroll);
|
|
278
248
|
window.removeEventListener('resize', onResize);
|
|
279
249
|
setTimeout(() => {
|
|
280
250
|
backGr.remove();
|
|
281
251
|
}, 200);
|
|
282
|
-
|
|
283
252
|
if (ipConRef.current) {
|
|
284
253
|
ipConRef.current.classList.remove(unique.focus);
|
|
285
254
|
ipConRef.current.style.zIndex = null;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
255
|
+
}
|
|
256
|
+
// iconRef.current && onSwap(true);
|
|
289
257
|
ipRef.current && ipRef.current.blur();
|
|
290
|
-
};
|
|
258
|
+
};
|
|
259
|
+
// const updatePicker = () => {
|
|
291
260
|
// const portal = document.body.querySelector(`#${unique.portal}`);
|
|
292
261
|
// if (!portal) return;
|
|
293
262
|
// const backGr = portal.querySelector(`#${unique.backGr}`);
|
|
@@ -307,46 +276,43 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
307
276
|
// onClick={onCalendarClick}
|
|
308
277
|
// />, node);
|
|
309
278
|
// };
|
|
310
|
-
|
|
311
|
-
|
|
312
279
|
const onSwap = open => {
|
|
313
280
|
const t = iconRef.current.childNodes[+open];
|
|
314
|
-
|
|
315
281
|
if (open) {
|
|
316
|
-
Object.assign(t.style, {
|
|
282
|
+
Object.assign(t.style, {
|
|
283
|
+
...hiddenStyle
|
|
317
284
|
});
|
|
318
|
-
Object.assign(t.previousSibling.style, {
|
|
285
|
+
Object.assign(t.previousSibling.style, {
|
|
286
|
+
...activeStyle
|
|
319
287
|
});
|
|
320
288
|
setTimeout(() => {
|
|
321
289
|
t.previousSibling.style.pointerEvents = null;
|
|
322
290
|
}, 200);
|
|
323
291
|
} else {
|
|
324
|
-
Object.assign(t.style, {
|
|
292
|
+
Object.assign(t.style, {
|
|
293
|
+
...hiddenStyle
|
|
325
294
|
});
|
|
326
|
-
Object.assign(t.nextSibling.style, {
|
|
295
|
+
Object.assign(t.nextSibling.style, {
|
|
296
|
+
...activeStyle
|
|
327
297
|
});
|
|
328
298
|
setTimeout(() => {
|
|
329
299
|
t.nextSibling.style.pointerEvents = null;
|
|
330
300
|
}, 200);
|
|
331
301
|
}
|
|
332
302
|
};
|
|
333
|
-
|
|
334
303
|
const onInputFocus = () => {
|
|
335
304
|
const el = ipConRef.current;
|
|
336
|
-
|
|
337
305
|
if (!el.classList.contains(unique.focus)) {
|
|
338
306
|
el.classList.add(unique.focus);
|
|
339
307
|
el.style.zIndex = zIndexCORE(2);
|
|
340
308
|
openPicker();
|
|
341
309
|
}
|
|
342
310
|
};
|
|
343
|
-
|
|
344
311
|
const onClickOutside = e => {
|
|
345
312
|
if (ipConRef.current && !ipConRef.current.contains(e.target) && ipRef.current && !ipRef.current.contains(e.target) && calRef.current && !calRef.current.contains(e.target)) {
|
|
346
313
|
controls ? onCancel() : closePicker();
|
|
347
314
|
}
|
|
348
315
|
};
|
|
349
|
-
|
|
350
316
|
const triggerFocus = () => {
|
|
351
317
|
if (!ipConRef.current.classList.contains(unique.focus)) {
|
|
352
318
|
ipRef.current.focus();
|
|
@@ -356,7 +322,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
356
322
|
});
|
|
357
323
|
}
|
|
358
324
|
};
|
|
359
|
-
|
|
360
325
|
const onClear = () => {
|
|
361
326
|
if (!clearAble && !ipRef.current) return;
|
|
362
327
|
ipRef.current.value = '';
|
|
@@ -368,7 +333,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
368
333
|
!!onChange && onChange(e);
|
|
369
334
|
onSwap(true);
|
|
370
335
|
};
|
|
371
|
-
|
|
372
336
|
const iconComp = jsx("div", {
|
|
373
337
|
css: _IconAreaCSS,
|
|
374
338
|
ref: iconRef
|
|
@@ -409,7 +373,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
409
373
|
value: displayValue.current
|
|
410
374
|
});
|
|
411
375
|
}
|
|
412
|
-
|
|
413
376
|
return () => {
|
|
414
377
|
closePicker();
|
|
415
378
|
};
|
|
@@ -433,11 +396,9 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
433
396
|
closePicker();
|
|
434
397
|
} else {
|
|
435
398
|
if (ipRef.current) ipRef.current.value = '';
|
|
436
|
-
|
|
437
399
|
if (clearAble) {
|
|
438
400
|
onSwap(true);
|
|
439
401
|
}
|
|
440
|
-
|
|
441
402
|
setButtonState();
|
|
442
403
|
closePicker();
|
|
443
404
|
}
|
|
@@ -449,10 +410,8 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
449
410
|
if (!readOnly) {
|
|
450
411
|
ipRef.current.addEventListener('focus', onInputFocus);
|
|
451
412
|
}
|
|
452
|
-
|
|
453
413
|
return () => {
|
|
454
414
|
if (!ipRef.current) return;
|
|
455
|
-
|
|
456
415
|
if (!readOnly) {
|
|
457
416
|
ipRef.current.removeEventListener('focus', onInputFocus);
|
|
458
417
|
}
|
|
@@ -465,7 +424,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
465
424
|
};
|
|
466
425
|
setInputValue(e, displayFormat);
|
|
467
426
|
}
|
|
468
|
-
|
|
469
427
|
if (disabled) {
|
|
470
428
|
iconRef.current.childNodes[0].style.pointerEvents = 'none';
|
|
471
429
|
closePicker();
|
|
@@ -475,10 +433,8 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
475
433
|
iconRef.current.childNodes[0].style.pointerEvents = 'none';
|
|
476
434
|
closePicker();
|
|
477
435
|
}
|
|
478
|
-
|
|
479
436
|
return () => {
|
|
480
437
|
if (!iconRef.current || !ipRef.current) return;
|
|
481
|
-
|
|
482
438
|
if (disabled) {
|
|
483
439
|
iconRef.current.childNodes[0].style.pointerEvents = null;
|
|
484
440
|
} else if (!readOnly) {
|
|
@@ -486,7 +442,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
486
442
|
} else {
|
|
487
443
|
iconRef.current.childNodes[0].style.pointerEvents = null;
|
|
488
444
|
}
|
|
489
|
-
|
|
490
445
|
closePicker();
|
|
491
446
|
};
|
|
492
447
|
}, [actionIconAt, clearAble, controls, disabled, displayFormat, displayAnotherMonth, max, min, readOnly, returnFormat, viewType]);
|
|
@@ -509,24 +464,17 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
509
464
|
return iconRef.current;
|
|
510
465
|
}
|
|
511
466
|
}; // methods
|
|
512
|
-
|
|
513
467
|
_instance.__proto__ = {}; // hidden methods
|
|
514
|
-
|
|
515
468
|
currentRef.instance = _instance;
|
|
516
|
-
|
|
517
469
|
currentRef.get = () => ref.current;
|
|
518
|
-
|
|
519
470
|
currentRef.getInputContainer = () => ipConRef.current;
|
|
520
|
-
|
|
521
471
|
currentRef.getInput = () => ipRef.current;
|
|
522
|
-
|
|
523
472
|
currentRef.getCalendar = () => calRef.current;
|
|
524
|
-
|
|
525
473
|
currentRef.getIcon = () => iconRef.current;
|
|
526
|
-
|
|
527
474
|
return currentRef;
|
|
528
475
|
});
|
|
529
|
-
return jsx(ControlComp, {
|
|
476
|
+
return jsx(ControlComp, {
|
|
477
|
+
...props,
|
|
530
478
|
disabled: disabled,
|
|
531
479
|
error: isError,
|
|
532
480
|
ref: ref,
|
|
@@ -554,7 +502,8 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
554
502
|
endIcon: endIcon,
|
|
555
503
|
onKeyDown: e => e.preventDefault(),
|
|
556
504
|
readOnly: true
|
|
557
|
-
})), isError && jsx(HelperText, {
|
|
505
|
+
})), isError && jsx(HelperText, {
|
|
506
|
+
...errorProps,
|
|
558
507
|
style: {
|
|
559
508
|
minHeight: 16,
|
|
560
509
|
position: 'absolute',
|
|
@@ -572,7 +521,6 @@ const activeStyle = {
|
|
|
572
521
|
pointerEvents: 'none',
|
|
573
522
|
display: 'block'
|
|
574
523
|
};
|
|
575
|
-
|
|
576
524
|
const IconAreaCSS = unique => css`
|
|
577
525
|
${flexRow};
|
|
578
526
|
${itemsCenter};
|
|
@@ -589,7 +537,6 @@ const IconAreaCSS = unique => css`
|
|
|
589
537
|
opacity: 1;
|
|
590
538
|
}
|
|
591
539
|
`;
|
|
592
|
-
|
|
593
540
|
const ControlContainerCSS = css`
|
|
594
541
|
${flexRow};
|
|
595
542
|
${justifyEnd};
|
|
@@ -640,73 +587,50 @@ DatePicker.defaultProps = {
|
|
|
640
587
|
DatePicker.propTypes = {
|
|
641
588
|
/** Action icons position. */
|
|
642
589
|
actionIconAt: PropTypes.oneOf(['end', 'start']),
|
|
643
|
-
|
|
644
590
|
/** Display the clear icon if true. */
|
|
645
591
|
clearAble: PropTypes.bool,
|
|
646
|
-
|
|
647
592
|
/** If `true`, the calendar will have a footer controls. */
|
|
648
593
|
controls: PropTypes.bool,
|
|
649
|
-
|
|
650
594
|
/** The default value of the component. */
|
|
651
595
|
defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.object]),
|
|
652
|
-
|
|
653
596
|
/** If `true`, the form control will be disabled. */
|
|
654
597
|
disabled: PropTypes.bool,
|
|
655
|
-
|
|
656
598
|
/** Format to display value. */
|
|
657
599
|
displayFormat: PropTypes.oneOfType([PropTypes.oneOf(['DD/MM/YYYY', 'MM/DD/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD']), PropTypes.string]),
|
|
658
|
-
|
|
659
600
|
/** View days of previous or next month. */
|
|
660
601
|
displayAnotherMonth: PropTypes.bool,
|
|
661
|
-
|
|
662
602
|
/** Error of the form control. */
|
|
663
603
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
664
|
-
|
|
665
604
|
/** InputProps are properties of the input element. */
|
|
666
605
|
inputProps: PropTypes.object,
|
|
667
|
-
|
|
668
606
|
/** InputStyle is style of input element. */
|
|
669
607
|
inputStyle: PropTypes.object,
|
|
670
|
-
|
|
671
608
|
/** Content of the label element. */
|
|
672
609
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
673
|
-
|
|
674
610
|
/** LabelProps are properties if the label element. */
|
|
675
611
|
labelProps: PropTypes.object,
|
|
676
|
-
|
|
677
612
|
/** Min value of date picker. */
|
|
678
613
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.object]),
|
|
679
|
-
|
|
680
614
|
/** Max value of date picker. */
|
|
681
615
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.object]),
|
|
682
|
-
|
|
683
616
|
/** A callback function when value input change. */
|
|
684
617
|
onChange: PropTypes.func,
|
|
685
|
-
|
|
686
618
|
/** Hints for input. */
|
|
687
619
|
placeholder: PropTypes.string,
|
|
688
|
-
|
|
689
620
|
/** Allow close Popup when press ESC. */
|
|
690
621
|
pressESCToClose: PropTypes.bool,
|
|
691
|
-
|
|
692
622
|
/** Status read only of input. */
|
|
693
623
|
readOnly: PropTypes.bool,
|
|
694
|
-
|
|
695
624
|
/** Required state of the form control. */
|
|
696
625
|
required: PropTypes.bool,
|
|
697
|
-
|
|
698
626
|
/** Format of the returned value. */
|
|
699
627
|
returnFormat: PropTypes.oneOfType([PropTypes.oneOf(['DD/MM/YYYY', 'MM/DD/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD']), PropTypes.string]),
|
|
700
|
-
|
|
701
628
|
/** Style inline of component. */
|
|
702
629
|
style: PropTypes.object,
|
|
703
|
-
|
|
704
630
|
/** Text align of the input. */
|
|
705
631
|
textAlign: PropTypes.oneOf(['center', 'end', 'start']),
|
|
706
|
-
|
|
707
632
|
/** Value of the component. */
|
|
708
633
|
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array, PropTypes.object]),
|
|
709
|
-
|
|
710
634
|
/** View type of the form control. */
|
|
711
635
|
viewType: PropTypes.oneOf(['outlined', 'underlined'])
|
|
712
636
|
};
|