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,6 +1,6 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
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
|
-
* START REFERENCE
|
|
46
|
-
*/
|
|
47
44
|
|
|
45
|
+
/**
|
|
46
|
+
* START REFERENCE
|
|
47
|
+
*/
|
|
48
48
|
const ref = useRef(null);
|
|
49
49
|
const tableRef = useRef(null);
|
|
50
50
|
const activeValue = useRef(null);
|
|
@@ -61,14 +61,13 @@ 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
|
-
|
|
72
71
|
const onUpdateNavigatorValue = useCallback(value => {
|
|
73
72
|
navigatorValue.current = value;
|
|
74
73
|
setNavigatorValue();
|
|
@@ -77,18 +76,15 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
77
76
|
activeValue.current = value;
|
|
78
77
|
setActiveValue();
|
|
79
78
|
}, [activeValue]);
|
|
80
|
-
|
|
81
79
|
const onUpdate = value => {
|
|
82
80
|
const newValue = new Date(value).setHours(0, 0, 0, 0);
|
|
83
81
|
onUpdateActiveValue(newValue);
|
|
84
82
|
onUpdateCalendar(newValue, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
85
83
|
};
|
|
86
|
-
|
|
87
84
|
const getCurrentTime = () => {
|
|
88
85
|
const time = new Date(navigatorValue.current);
|
|
89
86
|
return [time.getDate(), time.getMonth(), time.getFullYear()];
|
|
90
87
|
};
|
|
91
|
-
|
|
92
88
|
const onDayClick = e => {
|
|
93
89
|
const node = e.currentTarget;
|
|
94
90
|
tableRef.current.querySelectorAll(`td.${unique.day.active}`).forEach(element => {
|
|
@@ -97,70 +93,57 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
97
93
|
node.classList.add(unique.day.active);
|
|
98
94
|
const timeStamp = Number(node.dataset.time);
|
|
99
95
|
const objNewDate = new Date(timeStamp);
|
|
100
|
-
|
|
101
96
|
const _navigatorValue = new Date(navigatorValue.current);
|
|
102
|
-
|
|
103
97
|
const objNewDateMonth = objNewDate.getMonth() + 1;
|
|
104
98
|
const objNewDateYear = objNewDate.getFullYear();
|
|
105
99
|
const navigatorMonth = _navigatorValue.getMonth() + 1;
|
|
106
|
-
|
|
107
100
|
const navigatorYear = _navigatorValue.getFullYear();
|
|
108
|
-
|
|
109
101
|
onUpdateActiveValue(objNewDate);
|
|
110
102
|
if (objNewDateMonth > navigatorMonth || objNewDateYear > navigatorYear) setNextMonth();else if (objNewDateMonth < navigatorMonth || objNewDateYear < navigatorYear) setPrevMonth();
|
|
111
103
|
!!onClick && onClick({
|
|
112
104
|
value: objNewDate
|
|
113
105
|
});
|
|
114
106
|
};
|
|
115
|
-
|
|
116
107
|
const setPrevYear = e => {
|
|
117
108
|
const time = new Date(getCurrentTime()[2] - 1, getCurrentTime()[1]);
|
|
118
|
-
|
|
119
109
|
if (min && isValidDate(min) && moment(time).diff(firstDayOfMin) < 0) {
|
|
120
110
|
e.preventDefault();
|
|
121
111
|
} else {
|
|
122
112
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
123
113
|
}
|
|
124
114
|
};
|
|
125
|
-
|
|
126
115
|
const setNextYear = e => {
|
|
127
116
|
const time = new Date(getCurrentTime()[2] + 1, getCurrentTime()[1]);
|
|
128
|
-
|
|
129
117
|
if (max && isValidDate(max) && moment(time).diff(firstDayOfMax) > 0) {
|
|
130
118
|
e.preventDefault();
|
|
131
119
|
} else {
|
|
132
120
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
133
121
|
}
|
|
134
122
|
};
|
|
135
|
-
|
|
136
123
|
const setPrevMonth = e => {
|
|
137
124
|
const time = new Date(getCurrentTime()[2], getCurrentTime()[1] - 1);
|
|
138
|
-
|
|
139
125
|
if (min && isValidDate(min) && moment(time).diff(firstDayOfMin) < 0) {
|
|
140
126
|
e.preventDefault();
|
|
141
127
|
} else {
|
|
142
128
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
143
129
|
}
|
|
144
130
|
};
|
|
145
|
-
|
|
146
131
|
const setNextMonth = e => {
|
|
147
132
|
const time = new Date(getCurrentTime()[2], getCurrentTime()[1] + 1);
|
|
148
|
-
|
|
149
133
|
if (max && isValidDate(max) && moment(time).diff(firstDayOfMax) > 0) {
|
|
150
134
|
e.preventDefault();
|
|
151
135
|
} else {
|
|
152
136
|
onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
|
|
153
137
|
}
|
|
154
138
|
};
|
|
155
|
-
/**
|
|
156
|
-
* END FUNCTION
|
|
157
|
-
*/
|
|
158
139
|
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
140
|
+
/**
|
|
141
|
+
* END FUNCTION
|
|
161
142
|
*/
|
|
162
143
|
|
|
163
|
-
|
|
144
|
+
/**
|
|
145
|
+
* START EFFECT
|
|
146
|
+
*/
|
|
164
147
|
useEffect(() => {
|
|
165
148
|
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue)) {
|
|
166
149
|
if (isBeforeLimit(min, defaultValue)) {
|
|
@@ -198,25 +181,24 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
198
181
|
onUpdate(activeValue.current);
|
|
199
182
|
}
|
|
200
183
|
}, [onClick, min, max]);
|
|
201
|
-
/**
|
|
202
|
-
* END FUNCTION
|
|
184
|
+
/**
|
|
185
|
+
* END FUNCTION
|
|
203
186
|
*/
|
|
204
187
|
|
|
205
|
-
/**
|
|
206
|
-
* START COMPONENT
|
|
188
|
+
/**
|
|
189
|
+
* START COMPONENT
|
|
207
190
|
*/
|
|
208
|
-
|
|
209
191
|
const tableMemo = jsx("div", {
|
|
210
192
|
className: unique.table.container
|
|
211
193
|
}, jsx("table", {
|
|
212
194
|
className: unique.table.table,
|
|
213
195
|
ref: tableRef
|
|
214
196
|
}, renderHeader(unique), jsx("tbody", null)));
|
|
215
|
-
/**
|
|
216
|
-
* END COMPONENT
|
|
197
|
+
/**
|
|
198
|
+
* END COMPONENT
|
|
217
199
|
*/
|
|
218
|
-
|
|
219
|
-
|
|
200
|
+
return jsx("div", {
|
|
201
|
+
...props,
|
|
220
202
|
className: [unique.container, className].join(' ').trim().replace(/\s+/g, ' '),
|
|
221
203
|
css: generateCalendarCSS(unique),
|
|
222
204
|
ref: ref
|
|
@@ -230,25 +212,18 @@ Calendar.defaultProps = {
|
|
|
230
212
|
Calendar.propTypes = {
|
|
231
213
|
/** the footer actions */
|
|
232
214
|
actions: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
|
|
233
|
-
|
|
234
215
|
/** class for calendar */
|
|
235
216
|
className: PropTypes.string,
|
|
236
|
-
|
|
237
217
|
/** the default value of the calendar */
|
|
238
218
|
defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
239
|
-
|
|
240
219
|
/** display days of previous or next month */
|
|
241
220
|
displayAnotherMonth: PropTypes.bool,
|
|
242
|
-
|
|
243
221
|
/** the last date that can be selected within the UI component. */
|
|
244
222
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
245
|
-
|
|
246
223
|
/** the minimum date that can be selected within the UI component. */
|
|
247
224
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
248
|
-
|
|
249
225
|
/** a callback function when click on a day of calendar */
|
|
250
226
|
onClick: PropTypes.func,
|
|
251
|
-
|
|
252
227
|
/** value of the calendar */
|
|
253
228
|
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array])
|
|
254
229
|
};
|
|
@@ -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';
|
|
@@ -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());
|
|
45
|
+
// const [id] = useState(randomString(6, { allowSymbol: false }));
|
|
46
46
|
const unique = {
|
|
47
47
|
container: 'DGN-UI-Calendar-Range',
|
|
48
48
|
divider: 'DGN-UI-Calendar-Range-Divider',
|
|
@@ -145,37 +145,32 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
145
145
|
} else {
|
|
146
146
|
values.current.splice(0, 2, Date.parse(new Date(v)));
|
|
147
147
|
}
|
|
148
|
-
|
|
149
148
|
setValues();
|
|
150
149
|
}, [values]);
|
|
151
|
-
|
|
152
150
|
const onCalFrClick = e => {
|
|
153
151
|
console.log(e.currentTarget.dataset.time);
|
|
154
152
|
};
|
|
155
|
-
|
|
156
153
|
const onCalToClick = e => {
|
|
157
154
|
console.log(e.currentTarget.dataset.time);
|
|
158
155
|
};
|
|
159
|
-
|
|
160
156
|
const clearHovering = e => {
|
|
161
157
|
const arr = Array.from(e.getElementsByTagName('td'));
|
|
162
|
-
|
|
163
158
|
for (let i in arr) {
|
|
164
159
|
arr[i].classList.remove('hover-start', 'hover-between', 'hover-end');
|
|
165
160
|
}
|
|
166
161
|
};
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
const onDayHover = () => {
|
|
163
|
+
// const hoverTime = parseInt(e.target.dataset.time, 10);
|
|
169
164
|
// console.log(hoverTime);
|
|
170
165
|
};
|
|
171
|
-
|
|
172
166
|
const onPickerHover = e => {
|
|
173
167
|
if (e.target.tagName && e.target.tagName.toLowerCase() === 'td') {
|
|
174
168
|
onDayHover(e);
|
|
175
169
|
} else {
|
|
176
170
|
clearHovering(e.currentTarget);
|
|
177
171
|
}
|
|
178
|
-
};
|
|
172
|
+
};
|
|
173
|
+
// const onUpdateFrom = (value) => {
|
|
179
174
|
// const newValue = new Date(value).setHours(0, 0, 0, 0);
|
|
180
175
|
// onUpdateActiveValueFr(newValue);
|
|
181
176
|
// onUpdateCalendar(newValue, navigatorFromRefs, min, max, tableFrRef.current, [activeValueFr.current, activeValueTo.current], unique.from, displayAnotherMonth, onCalFrClick, onUpdateNavigatorValueFr);
|
|
@@ -185,12 +180,9 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
185
180
|
// onUpdateActiveValueTo(newValue);
|
|
186
181
|
// onUpdateCalendar(newValue, navigatorToRefs, min, max, tableToRef.current, [activeValueFr.current, activeValueTo.current], unique.to, displayAnotherMonth, onCalToClick, onUpdateNavigatorValueTo);
|
|
187
182
|
// };
|
|
188
|
-
|
|
189
|
-
|
|
190
183
|
const onUpdateNavigatorValue = values => {
|
|
191
184
|
const fr = new Date(values[0]);
|
|
192
185
|
const to = new Date(values[1]);
|
|
193
|
-
|
|
194
186
|
if (fr.getFullYear() === to.getFullYear() && fr.getMonth() === to.getMonth()) {
|
|
195
187
|
onUpdateNavigatorValueFr(new Date(fr.getFullYear(), fr.getMonth()));
|
|
196
188
|
onUpdateNavigatorValueTo(new Date(to.getFullYear(), to.getMonth() + 1));
|
|
@@ -199,7 +191,6 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
199
191
|
onUpdateNavigatorValueTo(new Date(to.getFullYear(), to.getMonth()));
|
|
200
192
|
}
|
|
201
193
|
};
|
|
202
|
-
|
|
203
194
|
const onUpdateActiveValue = values => {
|
|
204
195
|
if (values[1] && isValidDate(values[1])) {
|
|
205
196
|
onUpdateValues(values[0], false);
|
|
@@ -214,14 +205,12 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
214
205
|
onUpdateActiveValueTo(values[1]);
|
|
215
206
|
}
|
|
216
207
|
};
|
|
217
|
-
|
|
218
208
|
const onUpdate = array => {
|
|
219
209
|
onUpdateActiveValue(array);
|
|
220
210
|
onUpdateNavigatorValue(array);
|
|
221
211
|
onUpdateCalendar(navigatorValueFr.current, navigatorFromRefs, min, max, tableFrRef.current, values.current, unique.from, displayAnotherMonth, onCalFrClick, onUpdateNavigatorValueFr);
|
|
222
212
|
onUpdateCalendar(navigatorValueTo.current, navigatorToRefs, min, max, tableToRef.current, values.current, unique.to, displayAnotherMonth, onCalToClick, onUpdateNavigatorValueTo);
|
|
223
213
|
};
|
|
224
|
-
|
|
225
214
|
const calendarFrom = jsx("div", {
|
|
226
215
|
className: unique.from.container,
|
|
227
216
|
css: generateCalendarCSS(unique.from, false, false)
|
|
@@ -248,18 +237,18 @@ const CalendarRange = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
248
237
|
useImperativeHandle(reference, () => {
|
|
249
238
|
const currentRef = ref.current || {};
|
|
250
239
|
const _instance = {}; // methods
|
|
251
|
-
|
|
252
240
|
_instance.__proto__ = {}; // hidden methods
|
|
253
|
-
|
|
254
241
|
currentRef.instance = _instance;
|
|
255
242
|
return currentRef;
|
|
256
243
|
});
|
|
257
|
-
return jsx("div", {
|
|
244
|
+
return jsx("div", {
|
|
245
|
+
...props,
|
|
258
246
|
className: unique.container,
|
|
259
247
|
onMouseOver: onPickerHover,
|
|
260
248
|
css: containerCSS,
|
|
261
249
|
ref: ref
|
|
262
|
-
}, calendarFrom, jsx(Divider, {
|
|
250
|
+
}, calendarFrom, jsx(Divider, {
|
|
251
|
+
...dividerProps
|
|
263
252
|
}), calendarTo, actions);
|
|
264
253
|
}));
|
|
265
254
|
CalendarRange.defaultProps = {
|
|
@@ -270,22 +259,16 @@ CalendarRange.defaultProps = {
|
|
|
270
259
|
CalendarRange.propTypes = {
|
|
271
260
|
/** the footer actions */
|
|
272
261
|
actions: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
|
|
273
|
-
|
|
274
262
|
/** the default value of the calendar */
|
|
275
263
|
defaultValue: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
276
|
-
|
|
277
264
|
/** display days of previous or next month */
|
|
278
265
|
displayAnotherMonth: PropTypes.bool,
|
|
279
|
-
|
|
280
266
|
/** the last date that can be selected within the UI component. */
|
|
281
267
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
282
|
-
|
|
283
268
|
/** the minimum date that can be selected within the UI component. */
|
|
284
269
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
285
|
-
|
|
286
270
|
/** a callback function when click on a day of calendar */
|
|
287
271
|
onClick: PropTypes.func,
|
|
288
|
-
|
|
289
272
|
/** value of the calendar */
|
|
290
273
|
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array])
|
|
291
274
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -7,26 +6,25 @@ import { forwardRef, memo, useEffect, useRef, useState, useImperativeHandle, Fra
|
|
|
7
6
|
import { Typography } from "../..";
|
|
8
7
|
import { itemsCenter, itemsStart, boxBorder, cursorPointer, displayBlock, flexRow, positionAbsolute, positionRelative, cursorNoDrop, parseWidthHeight, border } from "../../../styles/general";
|
|
9
8
|
import { classNames, randomString, refType as ref } from "../../../utils";
|
|
10
|
-
import {
|
|
11
|
-
import theme from "../../../theme/settings";
|
|
9
|
+
import { useTheme, useColor as colors } from "../../../theme";
|
|
12
10
|
const {
|
|
13
11
|
colors: {
|
|
14
12
|
system: {
|
|
15
13
|
rest,
|
|
16
|
-
white
|
|
14
|
+
white,
|
|
15
|
+
disabled: systemDisabled
|
|
17
16
|
},
|
|
18
17
|
fill: {
|
|
19
18
|
hover: clFillHover,
|
|
20
19
|
pressed: clFillPressed
|
|
21
20
|
},
|
|
22
|
-
disabled: clDisabled,
|
|
23
21
|
formal2: clFormal2,
|
|
24
22
|
semantic: {
|
|
25
23
|
danger: clDanger
|
|
26
24
|
}
|
|
27
25
|
},
|
|
28
26
|
spacing
|
|
29
|
-
} =
|
|
27
|
+
} = useTheme();
|
|
30
28
|
const padding = spacing(0.75);
|
|
31
29
|
const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
32
30
|
action = {},
|
|
@@ -55,29 +53,22 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
55
53
|
if (!inputRef) {
|
|
56
54
|
inputRef = useRef(null);
|
|
57
55
|
}
|
|
58
|
-
|
|
59
56
|
const ref = useRef(null);
|
|
60
57
|
if (typeof width === 'number') width += 'px';
|
|
61
58
|
const [checkedState, setCheckedState] = useState(checked || defaultChecked);
|
|
62
|
-
|
|
63
59
|
if (!id) {
|
|
64
60
|
[id] = useState('DGN-UI-' + randomString(10, {
|
|
65
61
|
allowNumber: false,
|
|
66
62
|
allowSymbol: false
|
|
67
63
|
}));
|
|
68
64
|
}
|
|
69
|
-
|
|
70
65
|
const clMain = colors[color] || color;
|
|
71
|
-
|
|
72
66
|
const _CheckBoxSquareCSS = CheckBoxSquareCSS(width, clMain);
|
|
73
|
-
|
|
74
67
|
const _CheckBoxInputCSS = CheckBoxInputCSS(_CheckBoxSquareCSS.name, clMain);
|
|
75
|
-
|
|
76
68
|
const handleChange = event => {
|
|
77
69
|
stopPropagation && event.stopPropagation();
|
|
78
70
|
if (readOnly || inputProps.readOnly || disabled || inputProps.disabled) return;
|
|
79
71
|
const oldLogicChecked = inputRef.current.checked; //Use for TreeView
|
|
80
|
-
|
|
81
72
|
if (forTreeView) {
|
|
82
73
|
inputRef.current.checked = !oldLogicChecked; //Use for TreeView
|
|
83
74
|
}
|
|
@@ -91,13 +82,11 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
91
82
|
};
|
|
92
83
|
if (onChange) onChange(e, checkedState);
|
|
93
84
|
};
|
|
94
|
-
|
|
95
85
|
const setChecked = check => {
|
|
96
86
|
if (typeof check === 'boolean') {
|
|
97
87
|
setCheckedState(check);
|
|
98
88
|
}
|
|
99
89
|
};
|
|
100
|
-
|
|
101
90
|
useEffect(() => {
|
|
102
91
|
if (checked !== undefined) setCheckedState(Boolean(checked));
|
|
103
92
|
}, [checked]);
|
|
@@ -110,15 +99,11 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
110
99
|
getChecked: () => checkedState,
|
|
111
100
|
...action
|
|
112
101
|
}; // methods
|
|
113
|
-
|
|
114
102
|
_instance.__proto__ = {}; // hidden methods
|
|
115
|
-
|
|
116
103
|
currentRef.instance = _instance;
|
|
117
104
|
currentRef.determinate = determinate;
|
|
118
105
|
currentRef.setChecked = setChecked;
|
|
119
|
-
|
|
120
106
|
currentRef.getChecked = () => checkedState;
|
|
121
|
-
|
|
122
107
|
return currentRef;
|
|
123
108
|
});
|
|
124
109
|
return jsx("div", {
|
|
@@ -155,15 +140,14 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
155
140
|
style: {
|
|
156
141
|
marginLeft: spacing(1)
|
|
157
142
|
},
|
|
158
|
-
color: disabled ?
|
|
143
|
+
color: disabled ? systemDisabled : '',
|
|
159
144
|
...labelProps
|
|
160
145
|
}, jsx(Fragment, null, children || label, required && jsx("span", {
|
|
161
146
|
style: {
|
|
162
|
-
color: disabled ?
|
|
147
|
+
color: disabled ? systemDisabled : clDanger
|
|
163
148
|
}
|
|
164
149
|
}, "*"))))));
|
|
165
150
|
}));
|
|
166
|
-
|
|
167
151
|
const CheckBoxSquareCSS = (width, clMain) => css`
|
|
168
152
|
${flexRow};
|
|
169
153
|
${positionRelative};
|
|
@@ -222,7 +206,6 @@ const CheckBoxSquareCSS = (width, clMain) => css`
|
|
|
222
206
|
${cursorNoDrop};
|
|
223
207
|
}
|
|
224
208
|
`;
|
|
225
|
-
|
|
226
209
|
const CheckBoxInputCSS = (CheckBoxSquareCSSName, clMain) => css`
|
|
227
210
|
&:checked + label > span.css-${CheckBoxSquareCSSName} {
|
|
228
211
|
&.determinate {
|
|
@@ -246,7 +229,7 @@ const CheckBoxInputCSS = (CheckBoxSquareCSSName, clMain) => css`
|
|
|
246
229
|
&:checked:disabled {
|
|
247
230
|
& + label > span.css-${CheckBoxSquareCSSName} {
|
|
248
231
|
&:not(.indeterminate) {
|
|
249
|
-
background-color: ${
|
|
232
|
+
background-color: ${systemDisabled} !important;
|
|
250
233
|
}
|
|
251
234
|
&.indeterminate {
|
|
252
235
|
background-color: ${clFormal2} !important;
|
|
@@ -256,11 +239,10 @@ const CheckBoxInputCSS = (CheckBoxSquareCSSName, clMain) => css`
|
|
|
256
239
|
}
|
|
257
240
|
&:disabled {
|
|
258
241
|
& + label > span.css-${CheckBoxSquareCSSName} {
|
|
259
|
-
border-color: ${
|
|
242
|
+
border-color: ${systemDisabled};
|
|
260
243
|
}
|
|
261
244
|
}
|
|
262
245
|
`;
|
|
263
|
-
|
|
264
246
|
const CheckBoxLabelCSS = css`
|
|
265
247
|
${flexRow};
|
|
266
248
|
${positionRelative};
|
|
@@ -294,56 +276,40 @@ Checkbox.defaultProps = {
|
|
|
294
276
|
Checkbox.propTypes = {
|
|
295
277
|
/** If `true`, the component is checked. */
|
|
296
278
|
checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
297
|
-
|
|
298
279
|
/** Class for component. */
|
|
299
280
|
className: PropTypes.string,
|
|
300
|
-
|
|
301
281
|
/** The main color of the component. ['primary', 'info', 'success', 'warning', 'danger', #hex, rgb(#, #, #)] */
|
|
302
282
|
color: PropTypes.string,
|
|
303
|
-
|
|
304
283
|
/** The default checked state. Use when the component is not controlled. */
|
|
305
284
|
defaultChecked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
306
|
-
|
|
307
285
|
/** If `true` display tick or indeterminate if `false`. */
|
|
308
286
|
determinate: PropTypes.bool,
|
|
309
|
-
|
|
310
287
|
/** If `true`, the component is disabled. */
|
|
311
288
|
disabled: PropTypes.bool,
|
|
312
|
-
|
|
313
289
|
/** The id of the component. */
|
|
314
290
|
id: PropTypes.string,
|
|
315
|
-
|
|
316
291
|
/** [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. */
|
|
317
292
|
inputProps: PropTypes.object,
|
|
318
|
-
|
|
319
293
|
/** Pass a ref to the input element. */
|
|
320
294
|
inputRef: ref,
|
|
321
|
-
|
|
322
295
|
/** The name of the Radio is displayed on the interface. */
|
|
323
296
|
label: PropTypes.string,
|
|
324
|
-
|
|
325
297
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography--title) applied to the `Typography` label. */
|
|
326
298
|
labelProps: PropTypes.object,
|
|
327
|
-
|
|
328
299
|
/** The name of the Checkbox corresponds to the label displayed on the interface. */
|
|
329
300
|
name: PropTypes.string,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* You can pull out the new checked state by accessing `event.value` or `event.target.checked` (boolean).
|
|
301
|
+
/**
|
|
302
|
+
* Callback fired when the state is changed.
|
|
303
|
+
*
|
|
304
|
+
* You can pull out the new checked state by accessing `event.value` or `event.target.checked` (boolean).
|
|
335
305
|
*/
|
|
336
306
|
onChange: PropTypes.func,
|
|
337
|
-
|
|
338
307
|
/** If `true`, the component is readonly. */
|
|
339
308
|
readOnly: PropTypes.bool,
|
|
340
|
-
|
|
341
309
|
/** If `true`, the label will indicate that the checkbox is required. */
|
|
342
310
|
required: PropTypes.bool,
|
|
343
|
-
|
|
344
311
|
/** The value of input */
|
|
345
312
|
value: PropTypes.any,
|
|
346
|
-
|
|
347
313
|
/** The width of checkbox. */
|
|
348
314
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
349
315
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
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';
|
|
7
7
|
import { displayBlock, pointerEventsNone, positionRelative, userSelectNone } from "../../../styles/general";
|
|
8
|
-
import {
|
|
8
|
+
import { useColor as colors } from "../../../theme";
|
|
9
9
|
const {
|
|
10
10
|
semantic: {
|
|
11
11
|
danger
|
|
@@ -28,17 +28,14 @@ const Control = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
28
28
|
if (disabled) {
|
|
29
29
|
ref.current.classList.add(classes.disabled);
|
|
30
30
|
}
|
|
31
|
-
|
|
32
31
|
if (!disabled && error) {
|
|
33
32
|
ref.current.classList.add(classes.error);
|
|
34
33
|
ref.current.querySelector('div.DGN-UI-InputBase').classList.add('danger');
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
return () => {
|
|
38
36
|
if (disabled) {
|
|
39
37
|
ref.current.classList.remove(classes.disabled);
|
|
40
38
|
}
|
|
41
|
-
|
|
42
39
|
if (!disabled && error) {
|
|
43
40
|
ref.current.classList.remove(classes.error);
|
|
44
41
|
ref.current.querySelector('div.DGN-UI-InputBase').classList.remove('danger');
|
|
@@ -48,20 +45,18 @@ const Control = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
48
45
|
useImperativeHandle(reference, () => {
|
|
49
46
|
const currentRef = ref.current || {};
|
|
50
47
|
const _instance = {}; // methods
|
|
51
|
-
|
|
52
48
|
_instance.__proto__ = {}; // hidden methods
|
|
53
|
-
|
|
54
49
|
currentRef.instance = _instance;
|
|
55
50
|
return currentRef;
|
|
56
51
|
});
|
|
57
|
-
return jsx("div", {
|
|
52
|
+
return jsx("div", {
|
|
53
|
+
...props,
|
|
58
54
|
className: ['DGN-UI-Control', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
59
55
|
css: controlRootCSS(classes),
|
|
60
56
|
style: style,
|
|
61
57
|
ref: ref
|
|
62
58
|
}, children);
|
|
63
59
|
}));
|
|
64
|
-
|
|
65
60
|
const controlRootCSS = classes => css`
|
|
66
61
|
${displayBlock}
|
|
67
62
|
${positionRelative}
|
|
@@ -76,7 +71,6 @@ const controlRootCSS = classes => css`
|
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
73
|
`;
|
|
79
|
-
|
|
80
74
|
Control.defaultProps = {
|
|
81
75
|
className: '',
|
|
82
76
|
style: {},
|
|
@@ -86,16 +80,12 @@ Control.defaultProps = {
|
|
|
86
80
|
Control.propTypes = {
|
|
87
81
|
/** children of the form control */
|
|
88
82
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.node]).isRequired,
|
|
89
|
-
|
|
90
83
|
/** the class for the form control */
|
|
91
84
|
className: PropTypes.string,
|
|
92
|
-
|
|
93
85
|
/** prevent all event if true, hide all icon */
|
|
94
86
|
disabled: PropTypes.bool,
|
|
95
|
-
|
|
96
87
|
/** error for input */
|
|
97
88
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
98
|
-
|
|
99
89
|
/** style of the component */
|
|
100
90
|
style: PropTypes.object
|
|
101
91
|
};
|