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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { jsx, css } from '@emotion/core';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -14,16 +13,13 @@ import { useTheme } from "../../../theme";
|
|
|
14
13
|
const {
|
|
15
14
|
zIndex
|
|
16
15
|
} = useTheme();
|
|
17
|
-
|
|
18
16
|
const formatDimension = x => {
|
|
19
17
|
const regexPercent = /^\d+%$/;
|
|
20
18
|
const regexPixel = /^\d+px$/;
|
|
21
|
-
|
|
22
19
|
if (isNaN(x)) {
|
|
23
20
|
if (regexPercent.test(x)) {
|
|
24
21
|
return x;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
if (regexPixel.test(x)) {
|
|
28
24
|
return +x.split('px')[0];
|
|
29
25
|
}
|
|
@@ -31,7 +27,6 @@ const formatDimension = x => {
|
|
|
31
27
|
return x;
|
|
32
28
|
}
|
|
33
29
|
};
|
|
34
|
-
|
|
35
30
|
const addZero = i => {
|
|
36
31
|
if (isNaN(i) && +i < 10) {
|
|
37
32
|
return `0${parseInt(i, 10)}`;
|
|
@@ -40,45 +35,36 @@ const addZero = i => {
|
|
|
40
35
|
} else {
|
|
41
36
|
return i;
|
|
42
37
|
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
};
|
|
39
|
+
//array data
|
|
46
40
|
const getHours = () => {
|
|
47
41
|
let hours = [],
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
i = 0;
|
|
50
43
|
for (i; i < 24; i++) {
|
|
51
44
|
hours.push({
|
|
52
45
|
value: i,
|
|
53
46
|
text: i
|
|
54
47
|
});
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
return hours;
|
|
58
50
|
};
|
|
59
|
-
|
|
60
51
|
const getMinutes = () => {
|
|
61
52
|
let minutes = [],
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
i = 0;
|
|
64
54
|
for (i; i < 60; i++) {
|
|
65
55
|
minutes.push({
|
|
66
56
|
value: i,
|
|
67
57
|
text: i
|
|
68
58
|
});
|
|
69
59
|
}
|
|
70
|
-
|
|
71
60
|
return minutes;
|
|
72
61
|
};
|
|
73
|
-
|
|
74
62
|
const checkValue = value => {
|
|
75
63
|
if (!isNaN(Date.parse(value))) {
|
|
76
64
|
return true;
|
|
77
65
|
}
|
|
78
|
-
|
|
79
66
|
return false;
|
|
80
67
|
};
|
|
81
|
-
|
|
82
68
|
const getValue = value => {
|
|
83
69
|
if (typeof value === 'string') {
|
|
84
70
|
const date = new Date();
|
|
@@ -87,14 +73,11 @@ const getValue = value => {
|
|
|
87
73
|
date.setHours(...value);
|
|
88
74
|
value = date;
|
|
89
75
|
}
|
|
90
|
-
|
|
91
76
|
if (checkValue(value)) {
|
|
92
77
|
return new Date(value);
|
|
93
78
|
}
|
|
94
|
-
|
|
95
79
|
return new Date();
|
|
96
80
|
};
|
|
97
|
-
|
|
98
81
|
const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
99
82
|
activeHeight,
|
|
100
83
|
activeWidth,
|
|
@@ -124,15 +107,12 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
124
107
|
main: 'DCUI-time-picker-main' + Id,
|
|
125
108
|
label: 'DCUI-time-picker-label' + Id
|
|
126
109
|
};
|
|
127
|
-
|
|
128
110
|
if (!ref) {
|
|
129
111
|
ref = useRef(null);
|
|
130
112
|
}
|
|
131
|
-
|
|
132
113
|
if (!inputRef) {
|
|
133
114
|
inputRef = useRef(null);
|
|
134
115
|
}
|
|
135
|
-
|
|
136
116
|
const mainRef = useRef(null);
|
|
137
117
|
const clockContainerRef = useRef(null);
|
|
138
118
|
const swiperWrapperHoursRef = useRef(null);
|
|
@@ -149,7 +129,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
149
129
|
padding: 0;
|
|
150
130
|
&.disabled {
|
|
151
131
|
.${IDs.label} {
|
|
152
|
-
color: ${theme.colors.disabled} !important;
|
|
132
|
+
color: ${theme.colors.text.disabled} !important;
|
|
153
133
|
pointer-events: none;
|
|
154
134
|
user-select: none;
|
|
155
135
|
}
|
|
@@ -157,11 +137,11 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
157
137
|
pointer-events: none;
|
|
158
138
|
user-select: none;
|
|
159
139
|
::placeholder {
|
|
160
|
-
color: ${theme.colors.
|
|
140
|
+
color: ${theme.colors.text.main};
|
|
161
141
|
}
|
|
162
142
|
}
|
|
163
143
|
.${IDs.icon}.svg-default {
|
|
164
|
-
color: ${theme.colors.disabled} !important;
|
|
144
|
+
color: ${theme.colors.text.disabled} !important;
|
|
165
145
|
pointer-events: none;
|
|
166
146
|
user-select: none;
|
|
167
147
|
}
|
|
@@ -169,7 +149,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
169
149
|
background-color: ${theme.colors.dark12};
|
|
170
150
|
pointer-events: none;
|
|
171
151
|
::before {
|
|
172
|
-
border-color: ${theme.colors.disabled} !important;
|
|
152
|
+
border-color: ${theme.colors.system.disabled} !important;
|
|
173
153
|
}
|
|
174
154
|
}
|
|
175
155
|
}
|
|
@@ -182,7 +162,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
182
162
|
padding: 0;
|
|
183
163
|
&.disabled {
|
|
184
164
|
.${IDs.label} {
|
|
185
|
-
color: ${theme.colors.disabled} !important;
|
|
165
|
+
color: ${theme.colors.text.disabled} !important;
|
|
186
166
|
pointer-events: none;
|
|
187
167
|
user-select: none;
|
|
188
168
|
}
|
|
@@ -190,11 +170,11 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
190
170
|
pointer-events: none;
|
|
191
171
|
user-select: none;
|
|
192
172
|
::placeholder {
|
|
193
|
-
color: ${theme.colors.
|
|
173
|
+
color: ${theme.colors.text.main};
|
|
194
174
|
}
|
|
195
175
|
}
|
|
196
176
|
.${IDs.icon}.svg-default {
|
|
197
|
-
color: ${theme.colors.disabled} !important;
|
|
177
|
+
color: ${theme.colors.text.disabled} !important;
|
|
198
178
|
pointer-events: none;
|
|
199
179
|
user-select: none;
|
|
200
180
|
}
|
|
@@ -202,7 +182,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
202
182
|
pointer-events: none;
|
|
203
183
|
::after,
|
|
204
184
|
::before {
|
|
205
|
-
border-color: ${theme.colors.disabled} !important;
|
|
185
|
+
border-color: ${theme.colors.line.disabled} !important;
|
|
206
186
|
}
|
|
207
187
|
}
|
|
208
188
|
}
|
|
@@ -213,14 +193,14 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
213
193
|
display: flex;
|
|
214
194
|
margin-bottom: 4px;
|
|
215
195
|
label {
|
|
216
|
-
color: ${theme.colors.
|
|
196
|
+
color: ${theme.colors.text.normal_label};
|
|
217
197
|
${typography.heading6};
|
|
218
198
|
pointer-events: initial;
|
|
219
199
|
user-select: initial;
|
|
220
200
|
}
|
|
221
201
|
`,
|
|
222
202
|
required: css`
|
|
223
|
-
color: ${theme.colors.danger};
|
|
203
|
+
color: ${theme.colors.semantic.danger};
|
|
224
204
|
${typography.heading6};
|
|
225
205
|
`
|
|
226
206
|
},
|
|
@@ -237,7 +217,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
237
217
|
::before {
|
|
238
218
|
background-color: transparent;
|
|
239
219
|
border-radius: 4px;
|
|
240
|
-
border: solid 1px ${theme.colors.
|
|
220
|
+
border: solid 1px ${theme.colors.system.rest};
|
|
241
221
|
bottom: 0;
|
|
242
222
|
content: '\\00a0';
|
|
243
223
|
left: 0;
|
|
@@ -249,19 +229,19 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
249
229
|
user-select: none;
|
|
250
230
|
}
|
|
251
231
|
:hover:not(.focused):not(.error) {
|
|
252
|
-
background-color: ${theme.colors.hover};
|
|
232
|
+
background-color: ${theme.colors.fill.hover};
|
|
253
233
|
::before {
|
|
254
|
-
border-color: ${theme.colors.
|
|
234
|
+
border-color: ${theme.colors.system.active};
|
|
255
235
|
}
|
|
256
236
|
input::placeholder,
|
|
257
237
|
.${IDs.icon}.svg-default {
|
|
258
|
-
color: ${theme.colors.
|
|
238
|
+
color: ${theme.colors.system.active};
|
|
259
239
|
}
|
|
260
240
|
}
|
|
261
241
|
|
|
262
242
|
&.focused {
|
|
263
243
|
::before {
|
|
264
|
-
border: 2px solid ${theme.colors.info};
|
|
244
|
+
border: 2px solid ${theme.colors.semantic.info};
|
|
265
245
|
}
|
|
266
246
|
.${IDs.icon}.svg-default {
|
|
267
247
|
opacity: 0;
|
|
@@ -278,10 +258,10 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
278
258
|
}
|
|
279
259
|
&.error {
|
|
280
260
|
::before {
|
|
281
|
-
border-color: ${theme.colors.danger};
|
|
261
|
+
border-color: ${theme.colors.semantic.danger};
|
|
282
262
|
}
|
|
283
263
|
.${IDs.icon}.svg-default {
|
|
284
|
-
color: ${theme.colors.danger};
|
|
264
|
+
color: ${theme.colors.semantic.danger};
|
|
285
265
|
}
|
|
286
266
|
}
|
|
287
267
|
`,
|
|
@@ -294,7 +274,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
294
274
|
width: 100%;
|
|
295
275
|
:after {
|
|
296
276
|
background-color: transparent;
|
|
297
|
-
border-bottom: 2px solid ${theme.colors.info};
|
|
277
|
+
border-bottom: 2px solid ${theme.colors.semantic.info};
|
|
298
278
|
bottom: 0;
|
|
299
279
|
content: '';
|
|
300
280
|
left: 0;
|
|
@@ -308,7 +288,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
308
288
|
}
|
|
309
289
|
::before {
|
|
310
290
|
background-color: transparent;
|
|
311
|
-
border-bottom: solid 1px ${theme.colors.
|
|
291
|
+
border-bottom: solid 1px ${theme.colors.system.rest};
|
|
312
292
|
bottom: 0;
|
|
313
293
|
content: '\\00a0';
|
|
314
294
|
left: 0;
|
|
@@ -321,11 +301,11 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
321
301
|
}
|
|
322
302
|
:hover:not(.focused):not(.error) {
|
|
323
303
|
::before {
|
|
324
|
-
border-color: ${theme.colors.
|
|
304
|
+
border-color: ${theme.colors.system.active};
|
|
325
305
|
}
|
|
326
306
|
input::placeholder,
|
|
327
307
|
.${IDs.icon}.svg-default {
|
|
328
|
-
color: ${theme.colors.
|
|
308
|
+
color: ${theme.colors.system.active};
|
|
329
309
|
}
|
|
330
310
|
}
|
|
331
311
|
|
|
@@ -349,10 +329,10 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
349
329
|
&.error {
|
|
350
330
|
::after,
|
|
351
331
|
::before {
|
|
352
|
-
border-color: ${theme.colors.danger};
|
|
332
|
+
border-color: ${theme.colors.semantic.danger};
|
|
353
333
|
}
|
|
354
334
|
.${IDs.icon}.svg-default {
|
|
355
|
-
color: ${theme.colors.danger};
|
|
335
|
+
color: ${theme.colors.semantic.danger};
|
|
356
336
|
}
|
|
357
337
|
}
|
|
358
338
|
`
|
|
@@ -368,7 +348,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
368
348
|
position: relative;
|
|
369
349
|
width: 100%;
|
|
370
350
|
&::placeholder {
|
|
371
|
-
color: ${theme.colors.
|
|
351
|
+
color: ${theme.colors.text.sub};
|
|
372
352
|
letter-spacing: 0.0675em;
|
|
373
353
|
transition: color 0.2s cubic-bezier(0.075, 0.82, 0.165, 1) 0ms;
|
|
374
354
|
}
|
|
@@ -383,7 +363,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
383
363
|
position: relative;
|
|
384
364
|
width: 100%;
|
|
385
365
|
&::placeholder {
|
|
386
|
-
color: ${theme.colors.
|
|
366
|
+
color: ${theme.colors.text.sub};
|
|
387
367
|
letter-spacing: 0.0675em;
|
|
388
368
|
transition: color 0.2s cubic-bezier(0.075, 0.82, 0.165, 1) 0ms;
|
|
389
369
|
}
|
|
@@ -392,7 +372,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
392
372
|
icon: {
|
|
393
373
|
outlined: css`
|
|
394
374
|
align-items: center;
|
|
395
|
-
color: ${theme.colors.
|
|
375
|
+
color: ${theme.colors.system.rest};
|
|
396
376
|
cursor: pointer;
|
|
397
377
|
display: flex;
|
|
398
378
|
height: 24px;
|
|
@@ -407,13 +387,13 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
407
387
|
opacity: 0;
|
|
408
388
|
visibility: hidden;
|
|
409
389
|
:hover {
|
|
410
|
-
color: ${theme.colors.
|
|
390
|
+
color: ${theme.colors.system.active};
|
|
411
391
|
}
|
|
412
392
|
}
|
|
413
393
|
`,
|
|
414
394
|
underlined: css`
|
|
415
395
|
align-items: center;
|
|
416
|
-
color: ${theme.colors.
|
|
396
|
+
color: ${theme.colors.system.rest};
|
|
417
397
|
cursor: pointer;
|
|
418
398
|
display: flex;
|
|
419
399
|
height: 24px;
|
|
@@ -428,7 +408,7 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
428
408
|
opacity: 0;
|
|
429
409
|
visibility: hidden;
|
|
430
410
|
:hover {
|
|
431
|
-
color: ${theme.colors.
|
|
411
|
+
color: ${theme.colors.system.active};
|
|
432
412
|
}
|
|
433
413
|
}
|
|
434
414
|
`
|
|
@@ -459,13 +439,11 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
459
439
|
`
|
|
460
440
|
}
|
|
461
441
|
};
|
|
462
|
-
|
|
463
442
|
const updateValue = value => {
|
|
464
443
|
const time = getValue(value);
|
|
465
444
|
values = [addZero(time.getHours()), addZero(time.getMinutes()), addZero(time.getSeconds())];
|
|
466
445
|
setInputValue(values);
|
|
467
446
|
};
|
|
468
|
-
|
|
469
447
|
const getDefaultValue = () => {
|
|
470
448
|
if (value && checkValue(value)) {
|
|
471
449
|
return new Date(value);
|
|
@@ -475,26 +453,21 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
475
453
|
return null;
|
|
476
454
|
}
|
|
477
455
|
};
|
|
478
|
-
|
|
479
456
|
const escKeyFunc = ev => {
|
|
480
457
|
//call the useOnClickOutside when press esc key
|
|
481
458
|
if (ev.keyCode === 27) {
|
|
482
|
-
onBlur();
|
|
483
|
-
|
|
459
|
+
onBlur();
|
|
460
|
+
// eslint-disable-next-line no-undef
|
|
484
461
|
inputContainerRef.current.childNodes[0].blur();
|
|
485
462
|
}
|
|
486
463
|
};
|
|
487
|
-
|
|
488
464
|
const getScrollParent = element => {
|
|
489
465
|
const style = getComputedStyle(element);
|
|
490
466
|
let scrollParent = window;
|
|
491
|
-
|
|
492
467
|
if (style.position !== 'fixed') {
|
|
493
468
|
let parent = element.parentElement;
|
|
494
|
-
|
|
495
469
|
while (parent) {
|
|
496
470
|
const parentStyle = getComputedStyle(parent);
|
|
497
|
-
|
|
498
471
|
if (/(auto|scroll)/.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {
|
|
499
472
|
scrollParent = parent;
|
|
500
473
|
parent = undefined;
|
|
@@ -503,24 +476,19 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
503
476
|
}
|
|
504
477
|
}
|
|
505
478
|
}
|
|
506
|
-
|
|
507
479
|
return scrollParent;
|
|
508
480
|
};
|
|
509
|
-
|
|
510
481
|
const setPositionClock = () => {
|
|
511
482
|
const clock = clockContainerRef.current;
|
|
512
483
|
const container = ref.current;
|
|
513
|
-
|
|
514
484
|
if (!clock || !container) {
|
|
515
485
|
return;
|
|
516
486
|
}
|
|
517
|
-
|
|
518
487
|
const {
|
|
519
488
|
bottom,
|
|
520
489
|
left,
|
|
521
490
|
top
|
|
522
491
|
} = container.getBoundingClientRect();
|
|
523
|
-
|
|
524
492
|
if (top > window.innerHeight) {
|
|
525
493
|
clock.style.top = 'auto';
|
|
526
494
|
clock.style.bottom = '5px';
|
|
@@ -546,7 +514,6 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
546
514
|
clock.style.transformOrigin = 'top left';
|
|
547
515
|
}
|
|
548
516
|
}
|
|
549
|
-
|
|
550
517
|
if (left < 0) {
|
|
551
518
|
clock.style.left = '5px';
|
|
552
519
|
} else if (left + activeWidth > window.innerWidth) {
|
|
@@ -555,84 +522,71 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
555
522
|
clock.style.left = left + 'px';
|
|
556
523
|
}
|
|
557
524
|
};
|
|
558
|
-
|
|
559
525
|
const setInputValue = values => {
|
|
560
526
|
if (!inputRef.current) return;
|
|
561
527
|
const input = inputRef.current;
|
|
562
|
-
|
|
563
528
|
if (allowSeconds) {
|
|
564
529
|
input.value = values[0] + ':' + values[1] + ':' + values[2];
|
|
565
530
|
} else {
|
|
566
531
|
input.value = values[0] + ':' + values[1] + ':00';
|
|
567
532
|
}
|
|
568
|
-
|
|
569
533
|
if (onChange) onChange(input);
|
|
570
534
|
};
|
|
571
|
-
|
|
572
535
|
const onFocus = () => {
|
|
573
536
|
document.body.style.overflow = 'hidden';
|
|
574
537
|
mainRef.current.classList.add('focused');
|
|
575
538
|
setPositionClock();
|
|
576
539
|
};
|
|
577
|
-
|
|
578
540
|
const onBlur = () => {
|
|
579
541
|
mainRef.current.classList.remove('focused');
|
|
580
542
|
inputRef.current.blur();
|
|
581
543
|
document.body.style.overflow = null;
|
|
582
544
|
};
|
|
583
|
-
|
|
584
545
|
const onOpen = () => {
|
|
585
546
|
inputRef.current.focus();
|
|
586
547
|
};
|
|
587
|
-
|
|
588
548
|
const onClose = () => onBlur();
|
|
549
|
+
useOnClickOutside(ref, onBlur);
|
|
589
550
|
|
|
590
|
-
|
|
551
|
+
// const validateValue = (text) => {
|
|
591
552
|
// const timeRegex = /^(0?[0-9]|1[0-9]|2[0-3])(:(0?[0-9]|[1-5][0-9]))?(:(0?[0-9]|[1-5][0-9]))$/;
|
|
592
553
|
// if (timeRegex.test(text)) return true;
|
|
593
554
|
// return false;
|
|
594
555
|
// };
|
|
595
|
-
|
|
596
556
|
const validateKeyboard = e => {
|
|
597
557
|
if (!/[0-9:]/.test(e.key)) {
|
|
598
558
|
e.preventDefault();
|
|
599
559
|
}
|
|
600
560
|
};
|
|
601
|
-
|
|
602
561
|
const setInputHour = e => {
|
|
603
562
|
if (!inputRef.current) return;
|
|
604
563
|
values = inputRef.current.value.split(':');
|
|
605
564
|
values.splice(0, 1, addZero(e.text));
|
|
606
565
|
setInputValue(values);
|
|
607
566
|
};
|
|
608
|
-
|
|
609
567
|
const setInputMinute = e => {
|
|
610
568
|
if (!inputRef.current) return;
|
|
611
569
|
values = inputRef.current.value.split(':');
|
|
612
570
|
values.splice(1, 1, addZero(e.text));
|
|
613
571
|
setInputValue(values);
|
|
614
572
|
};
|
|
615
|
-
|
|
616
573
|
const setInputSecond = e => {
|
|
617
574
|
if (!inputRef.current) return;
|
|
618
575
|
values = inputRef.current.value.split(':');
|
|
619
576
|
values.splice(2, 1, addZero(e.text));
|
|
620
577
|
setInputValue(values);
|
|
621
578
|
};
|
|
622
|
-
|
|
623
579
|
useEffect(() => {
|
|
624
580
|
const parent = ref.current;
|
|
625
581
|
const scrollParent = getScrollParent(parent);
|
|
626
|
-
|
|
627
582
|
if (defaultValue) {
|
|
628
583
|
updateValue(defaultValue);
|
|
629
584
|
} else {
|
|
630
585
|
inputRef.current.value = '';
|
|
631
|
-
}
|
|
586
|
+
}
|
|
587
|
+
// if (value) {
|
|
632
588
|
// updateValue(value);
|
|
633
589
|
// }
|
|
634
|
-
|
|
635
|
-
|
|
636
590
|
window.addEventListener('resize', setPositionClock);
|
|
637
591
|
document.addEventListener('keydown', e => escKeyFunc(e));
|
|
638
592
|
scrollParent.addEventListener('scroll', setPositionClock);
|
|
@@ -657,7 +611,6 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
657
611
|
ref.current.disabled = true;
|
|
658
612
|
ref.current.classList.add('disabled');
|
|
659
613
|
}
|
|
660
|
-
|
|
661
614
|
return () => {
|
|
662
615
|
if (ref.current) {
|
|
663
616
|
ref.current.disabled = false;
|
|
@@ -669,7 +622,6 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
669
622
|
if (error && error !== '') {
|
|
670
623
|
mainRef.current.classList.add('error');
|
|
671
624
|
}
|
|
672
|
-
|
|
673
625
|
return () => {
|
|
674
626
|
!!mainRef.current && mainRef.current.classList.remove('error');
|
|
675
627
|
};
|
|
@@ -684,7 +636,8 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
684
636
|
id: IDs.label,
|
|
685
637
|
htmlFor: IDs.inputTypeText
|
|
686
638
|
}, label), RequireMemo), [label, required, error, disabled]);
|
|
687
|
-
const InputMemo = useMemo(() => jsx("input", {
|
|
639
|
+
const InputMemo = useMemo(() => jsx("input", {
|
|
640
|
+
...inputProps,
|
|
688
641
|
css: styles.input[viewType],
|
|
689
642
|
disabled: disabled,
|
|
690
643
|
id: IDs.inputTypeText,
|
|
@@ -762,7 +715,8 @@ const TimePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
762
715
|
css: styles.main[viewType],
|
|
763
716
|
ref: mainRef
|
|
764
717
|
}, InputMemo, IconMemo, ErrorMemo), [activeHeight, activeWidth, allowSeconds, defaultValue, disabled, error, value, viewType]);
|
|
765
|
-
return jsx("div", {
|
|
718
|
+
return jsx("div", {
|
|
719
|
+
...props,
|
|
766
720
|
css: styles.container[viewType],
|
|
767
721
|
ref: ref
|
|
768
722
|
}, LabelMemo, MainMemo, ClockMemo);
|
|
@@ -778,37 +732,26 @@ TimePicker.defaultProps = {
|
|
|
778
732
|
TimePicker.propTypes = {
|
|
779
733
|
/** height of the clock when display */
|
|
780
734
|
activeHeight: PropTypes.number,
|
|
781
|
-
|
|
782
735
|
/** width of the clock when display */
|
|
783
736
|
activeWidth: PropTypes.number,
|
|
784
|
-
|
|
785
737
|
/** allow second field on clock */
|
|
786
738
|
allowSeconds: PropTypes.bool,
|
|
787
|
-
|
|
788
739
|
/** the default value when the clock is open */
|
|
789
740
|
defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
790
|
-
|
|
791
741
|
/** if 'true' the form control will be disabled */
|
|
792
742
|
disabled: PropTypes.bool,
|
|
793
|
-
|
|
794
743
|
/** error of the form control */
|
|
795
744
|
error: PropTypes.string,
|
|
796
|
-
|
|
797
745
|
/** label of the form control */
|
|
798
746
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
799
|
-
|
|
800
747
|
/** properties of the input element */
|
|
801
748
|
inputProps: PropTypes.object,
|
|
802
|
-
|
|
803
749
|
/** a callback function when value input change */
|
|
804
750
|
onChange: PropTypes.func,
|
|
805
|
-
|
|
806
751
|
/** required state of the form control */
|
|
807
752
|
required: PropTypes.bool,
|
|
808
|
-
|
|
809
753
|
/** the default value when the clock is open */
|
|
810
754
|
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
811
|
-
|
|
812
755
|
/** view type of the form control */
|
|
813
756
|
viewType: PropTypes.oneOf(['outlined', 'underlined'])
|
|
814
757
|
};
|