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 { memo, forwardRef, useRef, useMemo, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -29,11 +28,10 @@ const AccordionDetails = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
29
28
|
useImperativeHandle(reference, () => {
|
|
30
29
|
const currentRef = ref.current || {};
|
|
31
30
|
currentRef.element = ref.current;
|
|
32
|
-
const _instance = {
|
|
31
|
+
const _instance = {
|
|
32
|
+
...action
|
|
33
33
|
}; // methods
|
|
34
|
-
|
|
35
34
|
_instance.__proto__ = {}; // hidden methods
|
|
36
|
-
|
|
37
35
|
currentRef.instance = _instance;
|
|
38
36
|
return currentRef;
|
|
39
37
|
});
|
|
@@ -74,10 +72,8 @@ AccordionDetails.defaultProps = {
|
|
|
74
72
|
AccordionDetails.propTypes = {
|
|
75
73
|
/** The content of the component. */
|
|
76
74
|
children: PropTypes.node,
|
|
77
|
-
|
|
78
75
|
/** Class for component. */
|
|
79
76
|
className: PropTypes.string,
|
|
80
|
-
|
|
81
77
|
/** Style inline of component. */
|
|
82
78
|
style: PropTypes.object
|
|
83
79
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useRef, forwardRef, Children, cloneElement, useMemo, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -18,7 +17,6 @@ const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
18
17
|
style
|
|
19
18
|
}, reference) => {
|
|
20
19
|
const ref = useRef(null);
|
|
21
|
-
|
|
22
20
|
const onCollapseOther = (e, onExpand) => {
|
|
23
21
|
if (collapseOther) {
|
|
24
22
|
const accordions = ref.current.querySelectorAll('.DGN-UI-Accordion');
|
|
@@ -31,15 +29,13 @@ const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
31
29
|
!!onExpand && onExpand(e);
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
|
-
|
|
35
32
|
useImperativeHandle(reference, () => {
|
|
36
33
|
const currentRef = ref.current || {};
|
|
37
34
|
currentRef.element = ref.current;
|
|
38
|
-
const _instance = {
|
|
35
|
+
const _instance = {
|
|
36
|
+
...action
|
|
39
37
|
}; // methods
|
|
40
|
-
|
|
41
38
|
_instance.__proto__ = {}; // hidden methods
|
|
42
|
-
|
|
43
39
|
currentRef.instance = _instance;
|
|
44
40
|
return currentRef;
|
|
45
41
|
});
|
|
@@ -123,13 +119,10 @@ AccordionGroup.defaultProps = {
|
|
|
123
119
|
AccordionGroup.propTypes = {
|
|
124
120
|
/** The content of the component. */
|
|
125
121
|
children: PropTypes.node,
|
|
126
|
-
|
|
127
122
|
/** Class for component. */
|
|
128
123
|
className: PropTypes.string,
|
|
129
|
-
|
|
130
124
|
/** If `true`, collapse other when expand */
|
|
131
125
|
collapseOther: PropTypes.bool,
|
|
132
|
-
|
|
133
126
|
/** Style inline of component. */
|
|
134
127
|
style: PropTypes.object
|
|
135
128
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useEffect, useRef, forwardRef, useState, useMemo, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -35,7 +34,6 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
35
34
|
useEffect(() => {
|
|
36
35
|
if (ref.current) {
|
|
37
36
|
const previous = ref.current.previousElementSibling;
|
|
38
|
-
|
|
39
37
|
if (previous) {
|
|
40
38
|
expandState ? previous.classList.add('previousExpanding') : previous.classList.remove('previousExpanding');
|
|
41
39
|
}
|
|
@@ -44,21 +42,18 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
44
42
|
useEffect(() => {
|
|
45
43
|
expanded !== undefined ? setExpandState(expanded) : setExpandState(expand);
|
|
46
44
|
}, [expand, expanded]);
|
|
47
|
-
|
|
48
45
|
const onClickAccordion = () => {
|
|
49
46
|
!!onClick && onClick({
|
|
50
47
|
target: ref.current
|
|
51
48
|
});
|
|
52
49
|
};
|
|
53
|
-
|
|
54
50
|
useImperativeHandle(reference, () => {
|
|
55
51
|
const currentRef = ref.current || {};
|
|
56
52
|
currentRef.element = ref.current;
|
|
57
|
-
const _instance = {
|
|
53
|
+
const _instance = {
|
|
54
|
+
...action
|
|
58
55
|
}; // methods
|
|
59
|
-
|
|
60
56
|
_instance.__proto__ = {}; // hidden methods
|
|
61
|
-
|
|
62
57
|
currentRef.instance = _instance;
|
|
63
58
|
return currentRef;
|
|
64
59
|
});
|
|
@@ -112,28 +107,20 @@ Accordion.defaultProps = {
|
|
|
112
107
|
Accordion.propTypes = {
|
|
113
108
|
/** The box-shadow of component. */
|
|
114
109
|
boxShadow: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
115
|
-
|
|
116
110
|
/** The content of the component (insist <AccordionSummary />, <AccordionDetails />). */
|
|
117
111
|
children: PropTypes.node,
|
|
118
|
-
|
|
119
112
|
/** Class for component. */
|
|
120
113
|
className: PropTypes.string,
|
|
121
|
-
|
|
122
114
|
/** If `true`, the component is disabled. */
|
|
123
115
|
disabled: PropTypes.bool,
|
|
124
|
-
|
|
125
116
|
/** If `true`, expand immediate after render (shouldn't use this). */
|
|
126
117
|
expand: PropTypes.bool,
|
|
127
|
-
|
|
128
118
|
/** Expand state of accordion (should use this). */
|
|
129
119
|
expanded: PropTypes.bool,
|
|
130
|
-
|
|
131
120
|
/** Callback fired when Accordion is collapsed. */
|
|
132
121
|
onCollapse: PropTypes.func,
|
|
133
|
-
|
|
134
122
|
/** Callback fired when Accordion is expanded. */
|
|
135
123
|
onExpand: PropTypes.func,
|
|
136
|
-
|
|
137
124
|
/** Style inline of component. */
|
|
138
125
|
style: PropTypes.object
|
|
139
126
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useEffect, useRef, useContext, forwardRef, useMemo, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -44,23 +43,18 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
44
43
|
const ref = useRef(null);
|
|
45
44
|
const expandIconRef = useRef(null);
|
|
46
45
|
const timer = useRef(null);
|
|
47
|
-
|
|
48
46
|
const _SummaryRootCSS = SummaryRootCSS(background);
|
|
49
|
-
|
|
50
47
|
const _onClick = e => {
|
|
51
48
|
if (disabled) return;
|
|
52
49
|
const target = e.target;
|
|
53
|
-
|
|
54
50
|
if (onClickAccordion) {
|
|
55
51
|
onClickAccordion();
|
|
56
52
|
return;
|
|
57
53
|
}
|
|
58
|
-
|
|
59
54
|
if (onClick && (!expandIconRef.current || !expandIconRef.current.contains(target))) {
|
|
60
55
|
onClick(e);
|
|
61
56
|
return;
|
|
62
57
|
}
|
|
63
|
-
|
|
64
58
|
if (expandState) {
|
|
65
59
|
if (expanded === undefined) setExpandState(false);
|
|
66
60
|
!!onCollapse && onCollapse(ref.current);
|
|
@@ -69,25 +63,20 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
69
63
|
!!onExpand && onExpand(ref.current);
|
|
70
64
|
}
|
|
71
65
|
};
|
|
72
|
-
|
|
73
66
|
const showHideDetailHandler = type => {
|
|
74
67
|
if (ref.current) {
|
|
75
68
|
const detailsEl = ref.current.nextElementSibling;
|
|
76
|
-
|
|
77
69
|
if (type === 'show') {
|
|
78
70
|
if (detailsEl) {
|
|
79
71
|
const scrollHeight = detailsEl.scrollHeight;
|
|
80
72
|
const duration = Math.max(Math.min(scrollHeight, 1500), 200);
|
|
81
73
|
detailsEl.style.height = scrollHeight + 'px';
|
|
82
|
-
|
|
83
74
|
if (!detailsEl.style.transitionDuration) {
|
|
84
75
|
detailsEl.style.transitionDuration = duration + 'ms';
|
|
85
76
|
}
|
|
86
|
-
|
|
87
77
|
if (timer.current) {
|
|
88
78
|
clearTimeout(timer.current);
|
|
89
79
|
}
|
|
90
|
-
|
|
91
80
|
timer.current = setTimeout(() => {
|
|
92
81
|
detailsEl.style.height = 'auto';
|
|
93
82
|
}, (detailsEl.firstChild.childNodes.length || 2.5) * 100);
|
|
@@ -95,11 +84,9 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
95
84
|
} else {
|
|
96
85
|
if (detailsEl && detailsEl.style.height) {
|
|
97
86
|
detailsEl.style.height = detailsEl.scrollHeight + 'px';
|
|
98
|
-
|
|
99
87
|
if (timer.current) {
|
|
100
88
|
clearTimeout(timer.current);
|
|
101
89
|
}
|
|
102
|
-
|
|
103
90
|
timer.current = setTimeout(() => {
|
|
104
91
|
detailsEl.style.height = null;
|
|
105
92
|
}, 10);
|
|
@@ -107,7 +94,6 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
107
94
|
}
|
|
108
95
|
}
|
|
109
96
|
};
|
|
110
|
-
|
|
111
97
|
useEffect(() => {
|
|
112
98
|
if (expandState) {
|
|
113
99
|
showHideDetailHandler('show');
|
|
@@ -118,11 +104,10 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
118
104
|
useImperativeHandle(reference, () => {
|
|
119
105
|
const currentRef = ref.current || {};
|
|
120
106
|
currentRef.element = ref.current;
|
|
121
|
-
const _instance = {
|
|
107
|
+
const _instance = {
|
|
108
|
+
...action
|
|
122
109
|
}; // methods
|
|
123
|
-
|
|
124
110
|
_instance.__proto__ = {}; // hidden methods
|
|
125
|
-
|
|
126
111
|
currentRef.instance = _instance;
|
|
127
112
|
return currentRef;
|
|
128
113
|
});
|
|
@@ -146,7 +131,8 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
146
131
|
}
|
|
147
132
|
}, title || ''), children), !!expandIcon && jsx("div", {
|
|
148
133
|
className: 'Accordion-Icon-Root'
|
|
149
|
-
}, jsx("div", {
|
|
134
|
+
}, jsx("div", {
|
|
135
|
+
...expandIconProps,
|
|
150
136
|
ref: expandIconRef,
|
|
151
137
|
className: classNames('Accordion-Icon', !collapseIcon && 'rotate-able', expandIconProps === null || expandIconProps === void 0 ? void 0 : expandIconProps.className)
|
|
152
138
|
}, typeof expandIcon === 'string' ? jsx(ButtonIcon, {
|
|
@@ -174,31 +160,22 @@ AccordionSummary.defaultProps = {
|
|
|
174
160
|
AccordionSummary.propTypes = {
|
|
175
161
|
/** Background for label summary. */
|
|
176
162
|
background: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
177
|
-
|
|
178
163
|
/** The content of the component. */
|
|
179
164
|
children: PropTypes.node,
|
|
180
|
-
|
|
181
165
|
/** Class for component. */
|
|
182
166
|
className: PropTypes.string,
|
|
183
|
-
|
|
184
167
|
/** Icon display for collapse icon. */
|
|
185
168
|
collapseIcon: PropTypes.any,
|
|
186
|
-
|
|
187
169
|
/** Icon display for expand icon. */
|
|
188
170
|
expandIcon: PropTypes.any,
|
|
189
|
-
|
|
190
171
|
/** Position to render icon. */
|
|
191
172
|
expandIconAt: PropTypes.oneOf(['start', 'end']),
|
|
192
|
-
|
|
193
173
|
/** Other props of icons. */
|
|
194
174
|
expandIconProps: PropTypes.any,
|
|
195
|
-
|
|
196
175
|
/** Callback fired when the component is clicked. */
|
|
197
176
|
onClick: PropTypes.func,
|
|
198
|
-
|
|
199
177
|
/** Style inline of component. */
|
|
200
178
|
style: PropTypes.object,
|
|
201
|
-
|
|
202
179
|
/** The title of the component. */
|
|
203
180
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
204
181
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -60,24 +59,16 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
60
59
|
const opacityColor = hexToRGBA(mainColor, 0.15);
|
|
61
60
|
const iconName = iconMap.get(type);
|
|
62
61
|
const iconSize = iconSizeMap.get(size);
|
|
63
|
-
|
|
64
62
|
const _AlertContainerCSS = AlertContainerCSS(size);
|
|
65
|
-
|
|
66
63
|
const _AlertInfoCSS = AlertInfoCSS(mainColor, opacityColor);
|
|
67
|
-
|
|
68
64
|
const _AlertTextCSS = AlertTextCSS(clearAble);
|
|
69
|
-
|
|
70
65
|
const _AlertPrimaryCSS = AlertPrimaryCSS(secondary, size);
|
|
71
|
-
|
|
72
66
|
const _AlertSecondaryCSS = AlertSecondaryCSS(size);
|
|
73
|
-
|
|
74
67
|
const _linearProgressCSS = linearProgressCSS(size);
|
|
75
|
-
|
|
76
68
|
const _onClose = () => {
|
|
77
69
|
setIsClose(true);
|
|
78
70
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
79
71
|
};
|
|
80
|
-
|
|
81
72
|
useEffect(() => {
|
|
82
73
|
setTimeout(() => {
|
|
83
74
|
setPercentState(0);
|
|
@@ -94,17 +85,15 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
94
85
|
useImperativeHandle(reference, () => {
|
|
95
86
|
const currentRef = ref.current || {};
|
|
96
87
|
currentRef.element = ref.current;
|
|
97
|
-
const _instance = {
|
|
88
|
+
const _instance = {
|
|
89
|
+
...action
|
|
98
90
|
}; // methods
|
|
99
|
-
|
|
100
91
|
_instance.__proto__ = {}; // hidden methods
|
|
101
|
-
|
|
102
92
|
currentRef.instance = _instance;
|
|
103
93
|
return currentRef;
|
|
104
94
|
});
|
|
105
95
|
const AlertView = useMemo(() => {
|
|
106
96
|
let node = children;
|
|
107
|
-
|
|
108
97
|
if (!node) {
|
|
109
98
|
node = jsx(Icon, {
|
|
110
99
|
name: iconName,
|
|
@@ -114,7 +103,6 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
114
103
|
viewBox: true
|
|
115
104
|
});
|
|
116
105
|
}
|
|
117
|
-
|
|
118
106
|
return jsx("div", {
|
|
119
107
|
css: _AlertInfoCSS,
|
|
120
108
|
className: classNames('DGN-UI-Alert', className)
|
|
@@ -166,7 +154,6 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
166
154
|
}, AlertView, LinearView) : null;
|
|
167
155
|
}));
|
|
168
156
|
const fadeIn = animations.fadeIn;
|
|
169
|
-
|
|
170
157
|
const AlertContainerCSS = size => css`
|
|
171
158
|
${positionRelative};
|
|
172
159
|
${displayBlock};
|
|
@@ -177,7 +164,6 @@ const AlertContainerCSS = size => css`
|
|
|
177
164
|
z-index: ${zIndexCORE(1)};
|
|
178
165
|
animation: ${fadeIn} ${transitionTime}ms ease;
|
|
179
166
|
`;
|
|
180
|
-
|
|
181
167
|
const AlertInfoCSS = (mainColor, opacityColor) => css`
|
|
182
168
|
${flexRow};
|
|
183
169
|
${positionRelative};
|
|
@@ -193,20 +179,17 @@ const AlertInfoCSS = (mainColor, opacityColor) => css`
|
|
|
193
179
|
padding: ${spacing([0, 1, 0, 4])};
|
|
194
180
|
opacity: 1;
|
|
195
181
|
`;
|
|
196
|
-
|
|
197
182
|
const AlertIconCSS = css`
|
|
198
183
|
display: inherit;
|
|
199
184
|
margin-right: ${spacing([2.5])};
|
|
200
185
|
padding: ${spacing([2, 0])};
|
|
201
186
|
`;
|
|
202
|
-
|
|
203
187
|
const AlertTextCSS = clearAble => css`
|
|
204
188
|
${displayBlock};
|
|
205
189
|
margin-right: ${spacing([clearAble ? 2.5 : 0])};
|
|
206
190
|
padding: ${spacing([2, 0])};
|
|
207
191
|
align-self: center;
|
|
208
192
|
`;
|
|
209
|
-
|
|
210
193
|
const AlertPrimaryCSS = (secondary, size) => css`
|
|
211
194
|
${flexRow};
|
|
212
195
|
${positionRelative};
|
|
@@ -215,24 +198,20 @@ const AlertPrimaryCSS = (secondary, size) => css`
|
|
|
215
198
|
${userSelectNone};
|
|
216
199
|
${secondary ? primaryTypoMap.get(size) : paragraph1};
|
|
217
200
|
`;
|
|
218
|
-
|
|
219
201
|
const AlertSecondaryCSS = size => css`
|
|
220
202
|
${displayBlock};
|
|
221
203
|
${userSelectNone};
|
|
222
204
|
${size === 'tiny' ? paragraph3 : paragraph2};
|
|
223
205
|
`;
|
|
224
|
-
|
|
225
206
|
const AlertClearIconCSS = css`
|
|
226
207
|
margin-left: auto;
|
|
227
208
|
`;
|
|
228
|
-
|
|
229
209
|
const linearProgressCSS = size => css`
|
|
230
210
|
${displayBlock};
|
|
231
211
|
${positionRelative};
|
|
232
212
|
margin-top: ${spacing([size === 'medium' ? 1 : 0.5])};
|
|
233
213
|
padding: ${spacing([0, 1.25])};
|
|
234
214
|
`;
|
|
235
|
-
|
|
236
215
|
Alert.defaultProps = {
|
|
237
216
|
autoDisappear: false,
|
|
238
217
|
className: '',
|
|
@@ -245,34 +224,24 @@ Alert.defaultProps = {
|
|
|
245
224
|
Alert.propTypes = {
|
|
246
225
|
/** Automatically remove the Alert component after the timer ends (milliseconds). */
|
|
247
226
|
autoDisappear: PropTypes.bool,
|
|
248
|
-
|
|
249
227
|
/** The element to display in alert like text props (priority). */
|
|
250
228
|
children: PropTypes.node,
|
|
251
|
-
|
|
252
229
|
/** Class for component. */
|
|
253
230
|
className: PropTypes.string,
|
|
254
|
-
|
|
255
231
|
/** If `true`, show clear icon to close alert. */
|
|
256
232
|
clearAble: PropTypes.bool,
|
|
257
|
-
|
|
258
233
|
/** The amount of time the alert is displayed. The unit is the milliseconds. */
|
|
259
234
|
duration: PropTypes.number,
|
|
260
|
-
|
|
261
235
|
/** Callback fired when the component closed. */
|
|
262
236
|
onClose: PropTypes.func,
|
|
263
|
-
|
|
264
237
|
/** If `true`, show linear progress in duration time.*/
|
|
265
238
|
progressing: PropTypes.bool,
|
|
266
|
-
|
|
267
239
|
/** The secondary text to show in alert (under primary). */
|
|
268
240
|
secondary: PropTypes.string,
|
|
269
|
-
|
|
270
241
|
/** The size of the component. */
|
|
271
242
|
size: PropTypes.oneOf(['tiny', 'small', 'medium']),
|
|
272
|
-
|
|
273
243
|
/** The text to show in alert. */
|
|
274
244
|
text: PropTypes.string,
|
|
275
|
-
|
|
276
245
|
/** Type of the component. */
|
|
277
246
|
type: PropTypes.oneOf(['info', 'success', 'warning', 'danger'])
|
|
278
247
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useEffect, forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
5
4
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
@@ -43,27 +42,24 @@ const Notify = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
43
42
|
const [positionState, setPositionState] = useState(position);
|
|
44
43
|
const PositionVerticalCSS = positionVerticalMap.get((positionState === null || positionState === void 0 ? void 0 : positionState.vertical) || 'bottom');
|
|
45
44
|
const PositionHorizontalCSS = positionHorizontalMap.get((positionState === null || positionState === void 0 ? void 0 : positionState.horizontal) || 'center');
|
|
46
|
-
|
|
47
45
|
const showNotify = (message, {
|
|
48
46
|
position,
|
|
49
47
|
...options
|
|
50
48
|
} = {}) => {
|
|
51
49
|
options = typeof options === 'object' ? options : {};
|
|
52
|
-
|
|
53
50
|
if (position) {
|
|
54
51
|
setPositionState(position);
|
|
55
52
|
}
|
|
56
|
-
|
|
57
53
|
const el = document.createElement('div');
|
|
58
54
|
el.className = 'DGN-UI-Notify-Alert-Item';
|
|
59
|
-
ReactDOM.render(jsx(Alert
|
|
55
|
+
ReactDOM.render(jsx(Alert
|
|
56
|
+
// onClose={() => el.remove()}
|
|
60
57
|
, {
|
|
61
58
|
secondary: message,
|
|
62
59
|
...props,
|
|
63
60
|
...options
|
|
64
61
|
}), ref.current.appendChild(el));
|
|
65
62
|
};
|
|
66
|
-
|
|
67
63
|
useEffect(() => {
|
|
68
64
|
if (getAddNotify && typeof getAddNotify === 'function') getAddNotify(showNotify);
|
|
69
65
|
}, [props]);
|
|
@@ -77,9 +73,7 @@ const Notify = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
77
73
|
show: showNotify,
|
|
78
74
|
...action
|
|
79
75
|
}; // methods
|
|
80
|
-
|
|
81
76
|
_instance.__proto__ = {}; // hidden methods
|
|
82
|
-
|
|
83
77
|
currentRef.instance = _instance;
|
|
84
78
|
currentRef.add = showNotify;
|
|
85
79
|
return currentRef;
|
|
@@ -110,29 +104,25 @@ Notify.defaultProps = {
|
|
|
110
104
|
Notify.propTypes = {
|
|
111
105
|
/** Class for component. */
|
|
112
106
|
className: PropTypes.string,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
* string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
|
|
107
|
+
/**
|
|
108
|
+
* used to set position of Alert (is a string or an object)
|
|
109
|
+
* string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
|
|
117
110
|
*/
|
|
118
111
|
position: PropTypes.oneOfType([PropTypes.oneOf(['center']), PropTypes.shape({
|
|
119
112
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
120
113
|
vertical: PropTypes.oneOf(['bottom', 'center', 'top'])
|
|
121
114
|
})]),
|
|
122
|
-
|
|
123
115
|
/** Style inline of component. */
|
|
124
116
|
style: PropTypes.object,
|
|
125
|
-
|
|
126
117
|
/** Any [props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) of Alert */
|
|
127
118
|
props: PropTypes.any,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* * @param {
|
|
134
|
-
*
|
|
135
|
-
* * {[Props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) applied to the `Alert`.}
|
|
119
|
+
/**
|
|
120
|
+
* ref methods (ref.current.instance.*method*)
|
|
121
|
+
*
|
|
122
|
+
* * show(message, option): Show notify
|
|
123
|
+
* * @param {message} - number
|
|
124
|
+
* * @param {options} - object
|
|
125
|
+
* * {[Props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) applied to the `Alert`.}
|
|
136
126
|
*/
|
|
137
127
|
reference: ref
|
|
138
128
|
};
|