diginet-core-ui 1.3.87 → 1.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +4 -4
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +6 -2
- package/components/accordion/group.js +9 -2
- package/components/accordion/index.js +15 -2
- package/components/accordion/summary.js +27 -4
- package/components/alert/index.js +33 -2
- package/components/alert/notify.js +22 -12
- package/components/avatar/index.js +81 -22
- package/components/badge/index.js +45 -20
- package/components/button/icon.js +56 -25
- package/components/button/index.js +65 -16
- package/components/button/more.js +35 -15
- package/components/button/ripple-effect.js +10 -0
- package/components/card/body.js +7 -2
- package/components/card/extra.js +7 -2
- package/components/card/footer.js +7 -2
- package/components/card/header.js +7 -2
- package/components/card/index.js +22 -2
- package/components/chart/Pie/Circle.js +1 -0
- package/components/chart/Pie/Sector.js +19 -2
- package/components/chart/Pie/Sectors.js +10 -0
- package/components/chart/Pie/index.js +36 -4
- package/components/chart/Pie-v2/Circle.js +1 -0
- package/components/chart/Pie-v2/Sector.js +15 -2
- package/components/chart/Pie-v2/Sectors.js +20 -0
- package/components/chart/Pie-v2/index.js +38 -11
- package/components/chart/bar/Axis.js +12 -0
- package/components/chart/bar/Bar.js +35 -13
- package/components/chart/bar/Grid.js +18 -0
- package/components/chart/bar/Labels.js +18 -0
- package/components/chart/bar/Points.js +17 -0
- package/components/chart/bar/index.js +26 -6
- package/components/chart/bar-v2/Axis.js +12 -0
- package/components/chart/bar-v2/Bar.js +36 -15
- package/components/chart/bar-v2/Grid.js +18 -0
- package/components/chart/bar-v2/Labels.js +18 -0
- package/components/chart/bar-v2/Points.js +17 -0
- package/components/chart/bar-v2/index.js +26 -6
- package/components/chart/line/Axis.js +16 -4
- package/components/chart/line/Grid.js +19 -2
- package/components/chart/line/Labels.js +18 -0
- package/components/chart/line/Path.js +33 -23
- package/components/chart/line/Point.js +40 -6
- package/components/chart/line/Title.js +3 -0
- package/components/chart/line/index.js +35 -12
- package/components/chart/line-v2/Axis.js +13 -0
- package/components/chart/line-v2/Grid.js +18 -0
- package/components/chart/line-v2/Labels.js +18 -0
- package/components/chart/line-v2/Path.js +33 -23
- package/components/chart/line-v2/Point.js +35 -6
- package/components/chart/line-v2/Title.js +3 -0
- package/components/chart/line-v2/index.js +30 -12
- package/components/check-text/index.js +8 -0
- package/components/check-text/interview-confirmation.js +7 -0
- package/components/check-text/interview-status.js +7 -0
- package/components/chip/attach.js +22 -9
- package/components/chip/index.js +33 -6
- package/components/collapse/index.js +13 -0
- package/components/divider/index.js +13 -2
- package/components/form-control/attachment/index.js +202 -41
- package/components/form-control/calendar/function.js +207 -153
- package/components/form-control/calendar/index.js +46 -21
- package/components/form-control/calendar/range.js +28 -11
- package/components/form-control/checkbox/index.js +37 -4
- package/components/form-control/control/index.js +13 -3
- package/components/form-control/date-picker/index-old.js +0 -18
- package/components/form-control/date-picker/index.js +99 -23
- package/components/form-control/date-range-picker/index.js +180 -44
- package/components/form-control/dropdown/index.js +314 -101
- package/components/form-control/dropdown-box/index.js +35 -6
- package/components/form-control/form/index.js +2 -0
- package/components/form-control/form-group/index.js +6 -1
- package/components/form-control/helper-text/index.js +9 -2
- package/components/form-control/input-base/index.js +73 -9
- package/components/form-control/label/index.js +12 -2
- package/components/form-control/money-input/index.js +143 -54
- package/components/form-control/number-input/index.js +124 -26
- package/components/form-control/number-input/index2.js +119 -78
- package/components/form-control/phone-input/index.js +85 -23
- package/components/form-control/radio/index.js +28 -9
- package/components/form-control/text-input/index.js +46 -10
- package/components/form-control/time-picker/index.js +71 -14
- package/components/form-control/time-picker/swiper.js +73 -21
- package/components/form-control/toggle/index.js +23 -8
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +14 -0
- package/components/form-view/input.js +13 -2
- package/components/form-view/label.js +2 -0
- package/components/grid/Col.js +16 -2
- package/components/grid/Container.js +21 -2
- package/components/grid/Row.js +21 -2
- package/components/grid/index.js +44 -2
- package/components/image/index.js +22 -2
- package/components/index.js +31 -62
- package/components/list/list-item-action.js +9 -0
- package/components/list/list-item-icon.js +9 -0
- package/components/list/list-item-text.js +5 -0
- package/components/list/list-item.js +11 -0
- package/components/list/list.js +13 -0
- package/components/list/sub-header.js +4 -0
- package/components/modal/body.js +6 -2
- package/components/modal/footer.js +11 -2
- package/components/modal/header.js +12 -2
- package/components/modal/index.js +10 -2
- package/components/modal/modal.js +52 -11
- package/components/others/extra/index.js +10 -3
- package/components/others/import/index.js +7 -0
- package/components/others/option-wrapper/index.js +7 -4
- package/components/others/scrollbar/index.js +3 -0
- package/components/paging/page-info.js +99 -35
- package/components/paging/page-selector.js +35 -7
- package/components/paging/page-selector2.js +74 -35
- package/components/paper/index.js +11 -0
- package/components/popover/body.js +6 -2
- package/components/popover/footer.js +11 -2
- package/components/popover/header.js +7 -2
- package/components/popover/index.js +146 -54
- package/components/popup/danger_popup.js +19 -0
- package/components/popup/index.js +48 -2
- package/components/popup/proposals_popup.js +49 -10
- package/components/popup/v2/index.js +47 -13
- package/components/progress/circular.js +48 -10
- package/components/progress/linear.js +20 -4
- package/components/rating/index.js +32 -8
- package/components/slider/slider-container.js +40 -3
- package/components/slider/slider-item.js +25 -10
- package/components/status/index.js +14 -2
- package/components/tab/tab-container.js +18 -4
- package/components/tab/tab-header.js +24 -4
- package/components/tab/tab-panel.js +16 -4
- package/components/tab/tab.js +30 -6
- package/components/tooltip/index.js +97 -12
- package/components/tooltip/portal.js +2 -0
- package/components/transfer/index.js +70 -25
- package/components/tree-view/index.js +202 -62
- package/components/typography/index.js +70 -47
- package/global/index.js +8 -0
- package/icons/basic.js +232 -0
- package/icons/effect.js +32 -15
- package/icons/general/clock/clock.js +2 -0
- package/icons/general/color-handler/background.js +2 -0
- package/icons/general/color-handler/text.js +2 -0
- package/icons/general/emoji/emoji.js +2 -0
- package/icons/general/font-properties/bold.js +2 -0
- package/icons/general/font-properties/font-family.js +2 -0
- package/icons/general/font-properties/font-size.js +2 -0
- package/icons/general/font-properties/italic.js +2 -0
- package/icons/general/font-properties/underline.js +2 -0
- package/icons/general/hyperlink/hyperlink.js +2 -0
- package/icons/general/indent/decrease.js +2 -0
- package/icons/general/indent/increase.js +2 -0
- package/icons/general/list/bullets.js +2 -0
- package/icons/general/list/numbering.js +2 -0
- package/icons/general/picture/picture.js +2 -0
- package/icons/general/steps/redo.js +2 -0
- package/icons/general/steps/undo.js +2 -0
- package/icons/general/text-align/center.js +2 -0
- package/icons/general/text-align/justify.js +2 -0
- package/icons/general/text-align/left.js +2 -0
- package/icons/general/text-align/right.js +2 -0
- package/icons/menu/dhr.js +1 -2
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +15 -2
- package/package.json +42 -42
- package/readme.md +1027 -1022
- package/styles/animation.js +58 -15
- package/styles/color-helper.js +157 -127
- package/styles/colors.js +9 -17
- package/styles/general.js +80 -18
- package/styles/typography.js +4 -4
- package/styles/utils.js +20 -19
- package/theme/createBreakpoints.js +18 -7
- package/theme/make-styles.js +5 -2
- package/theme/set-theme.js +9 -6
- package/theme/settings.js +2 -3
- package/theme/theme-provider.js +1 -0
- package/utils/array/array.js +54 -45
- package/utils/{classNames.js → classNames/index.js} +5 -0
- package/utils/console.js +6 -0
- package/utils/date.js +138 -69
- package/utils/error/error.js +11 -3
- package/utils/error/errors.js +147 -100
- package/utils/getFileType.js +9 -0
- package/utils/handleBreakpoints.js +5 -0
- package/utils/intersectionObserver.js +5 -0
- package/utils/{isMobile.js → isMobile/index.js} +0 -0
- package/utils/iterator.js +9 -0
- package/utils/map-parent.js +10 -3
- package/utils/object/extend.js +10 -0
- package/utils/object/object.js +11 -12
- package/utils/parseHTML.js +1 -0
- package/utils/promisify.js +5 -0
- package/utils/randomString.js +7 -0
- package/utils/remove-unicode.js +1 -0
- package/utils/render-portal.js +9 -1
- package/utils/renderHTML.js +6 -4
- package/utils/renderIcon.js +19 -9
- package/utils/sb-template.js +5 -6
- package/utils/string/capitalize.js +1 -0
- package/utils/string/capitalizeSentenceCase.js +2 -0
- package/utils/string/string.js +13 -0
- package/utils/type.js +21 -0
- package/utils/updatePosition.js +5 -4
- package/utils/useDelayUnmount.js +4 -0
- package/utils/useElementSize.js +3 -9
- package/utils/useEventListener.js +6 -12
- package/utils/useInput.js +6 -0
- package/utils/{useMediaQuery.js → useMediaQuery/index.js} +10 -8
- package/utils/useOnClickOutside.js +4 -2
- package/utils/usePortal.js +19 -12
- package/utils/validate.js +53 -39
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, forwardRef, useRef, useMemo, useImperativeHandle } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -28,10 +29,11 @@ const AccordionDetails = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
28
29
|
useImperativeHandle(reference, () => {
|
|
29
30
|
const currentRef = ref.current || {};
|
|
30
31
|
currentRef.element = ref.current;
|
|
31
|
-
const _instance = {
|
|
32
|
-
...action
|
|
32
|
+
const _instance = { ...action
|
|
33
33
|
}; // methods
|
|
34
|
+
|
|
34
35
|
_instance.__proto__ = {}; // hidden methods
|
|
36
|
+
|
|
35
37
|
currentRef.instance = _instance;
|
|
36
38
|
return currentRef;
|
|
37
39
|
});
|
|
@@ -72,8 +74,10 @@ AccordionDetails.defaultProps = {
|
|
|
72
74
|
AccordionDetails.propTypes = {
|
|
73
75
|
/** The content of the component. */
|
|
74
76
|
children: PropTypes.node,
|
|
77
|
+
|
|
75
78
|
/** Class for component. */
|
|
76
79
|
className: PropTypes.string,
|
|
80
|
+
|
|
77
81
|
/** Style inline of component. */
|
|
78
82
|
style: PropTypes.object
|
|
79
83
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, useRef, forwardRef, Children, cloneElement, useMemo, useImperativeHandle } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -17,6 +18,7 @@ const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
17
18
|
style
|
|
18
19
|
}, reference) => {
|
|
19
20
|
const ref = useRef(null);
|
|
21
|
+
|
|
20
22
|
const onCollapseOther = (e, onExpand) => {
|
|
21
23
|
if (collapseOther) {
|
|
22
24
|
const accordions = ref.current.querySelectorAll('.DGN-UI-Accordion');
|
|
@@ -29,13 +31,15 @@ const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
29
31
|
!!onExpand && onExpand(e);
|
|
30
32
|
}
|
|
31
33
|
};
|
|
34
|
+
|
|
32
35
|
useImperativeHandle(reference, () => {
|
|
33
36
|
const currentRef = ref.current || {};
|
|
34
37
|
currentRef.element = ref.current;
|
|
35
|
-
const _instance = {
|
|
36
|
-
...action
|
|
38
|
+
const _instance = { ...action
|
|
37
39
|
}; // methods
|
|
40
|
+
|
|
38
41
|
_instance.__proto__ = {}; // hidden methods
|
|
42
|
+
|
|
39
43
|
currentRef.instance = _instance;
|
|
40
44
|
return currentRef;
|
|
41
45
|
});
|
|
@@ -119,10 +123,13 @@ AccordionGroup.defaultProps = {
|
|
|
119
123
|
AccordionGroup.propTypes = {
|
|
120
124
|
/** The content of the component. */
|
|
121
125
|
children: PropTypes.node,
|
|
126
|
+
|
|
122
127
|
/** Class for component. */
|
|
123
128
|
className: PropTypes.string,
|
|
129
|
+
|
|
124
130
|
/** If `true`, collapse other when expand */
|
|
125
131
|
collapseOther: PropTypes.bool,
|
|
132
|
+
|
|
126
133
|
/** Style inline of component. */
|
|
127
134
|
style: PropTypes.object
|
|
128
135
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, useEffect, useRef, forwardRef, useState, useMemo, useImperativeHandle } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -34,6 +35,7 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
34
35
|
useEffect(() => {
|
|
35
36
|
if (ref.current) {
|
|
36
37
|
const previous = ref.current.previousElementSibling;
|
|
38
|
+
|
|
37
39
|
if (previous) {
|
|
38
40
|
expandState ? previous.classList.add('previousExpanding') : previous.classList.remove('previousExpanding');
|
|
39
41
|
}
|
|
@@ -42,18 +44,21 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
42
44
|
useEffect(() => {
|
|
43
45
|
expanded !== undefined ? setExpandState(expanded) : setExpandState(expand);
|
|
44
46
|
}, [expand, expanded]);
|
|
47
|
+
|
|
45
48
|
const onClickAccordion = () => {
|
|
46
49
|
!!onClick && onClick({
|
|
47
50
|
target: ref.current
|
|
48
51
|
});
|
|
49
52
|
};
|
|
53
|
+
|
|
50
54
|
useImperativeHandle(reference, () => {
|
|
51
55
|
const currentRef = ref.current || {};
|
|
52
56
|
currentRef.element = ref.current;
|
|
53
|
-
const _instance = {
|
|
54
|
-
...action
|
|
57
|
+
const _instance = { ...action
|
|
55
58
|
}; // methods
|
|
59
|
+
|
|
56
60
|
_instance.__proto__ = {}; // hidden methods
|
|
61
|
+
|
|
57
62
|
currentRef.instance = _instance;
|
|
58
63
|
return currentRef;
|
|
59
64
|
});
|
|
@@ -107,20 +112,28 @@ Accordion.defaultProps = {
|
|
|
107
112
|
Accordion.propTypes = {
|
|
108
113
|
/** The box-shadow of component. */
|
|
109
114
|
boxShadow: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
115
|
+
|
|
110
116
|
/** The content of the component (insist <AccordionSummary />, <AccordionDetails />). */
|
|
111
117
|
children: PropTypes.node,
|
|
118
|
+
|
|
112
119
|
/** Class for component. */
|
|
113
120
|
className: PropTypes.string,
|
|
121
|
+
|
|
114
122
|
/** If `true`, the component is disabled. */
|
|
115
123
|
disabled: PropTypes.bool,
|
|
124
|
+
|
|
116
125
|
/** If `true`, expand immediate after render (shouldn't use this). */
|
|
117
126
|
expand: PropTypes.bool,
|
|
127
|
+
|
|
118
128
|
/** Expand state of accordion (should use this). */
|
|
119
129
|
expanded: PropTypes.bool,
|
|
130
|
+
|
|
120
131
|
/** Callback fired when Accordion is collapsed. */
|
|
121
132
|
onCollapse: PropTypes.func,
|
|
133
|
+
|
|
122
134
|
/** Callback fired when Accordion is expanded. */
|
|
123
135
|
onExpand: PropTypes.func,
|
|
136
|
+
|
|
124
137
|
/** Style inline of component. */
|
|
125
138
|
style: PropTypes.object
|
|
126
139
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, useEffect, useRef, useContext, forwardRef, useMemo, useImperativeHandle } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -43,18 +44,23 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
43
44
|
const ref = useRef(null);
|
|
44
45
|
const expandIconRef = useRef(null);
|
|
45
46
|
const timer = useRef(null);
|
|
47
|
+
|
|
46
48
|
const _SummaryRootCSS = SummaryRootCSS(background);
|
|
49
|
+
|
|
47
50
|
const _onClick = e => {
|
|
48
51
|
if (disabled) return;
|
|
49
52
|
const target = e.target;
|
|
53
|
+
|
|
50
54
|
if (onClickAccordion) {
|
|
51
55
|
onClickAccordion();
|
|
52
56
|
return;
|
|
53
57
|
}
|
|
58
|
+
|
|
54
59
|
if (onClick && (!expandIconRef.current || !expandIconRef.current.contains(target))) {
|
|
55
60
|
onClick(e);
|
|
56
61
|
return;
|
|
57
62
|
}
|
|
63
|
+
|
|
58
64
|
if (expandState) {
|
|
59
65
|
if (expanded === undefined) setExpandState(false);
|
|
60
66
|
!!onCollapse && onCollapse(ref.current);
|
|
@@ -63,20 +69,25 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
63
69
|
!!onExpand && onExpand(ref.current);
|
|
64
70
|
}
|
|
65
71
|
};
|
|
72
|
+
|
|
66
73
|
const showHideDetailHandler = type => {
|
|
67
74
|
if (ref.current) {
|
|
68
75
|
const detailsEl = ref.current.nextElementSibling;
|
|
76
|
+
|
|
69
77
|
if (type === 'show') {
|
|
70
78
|
if (detailsEl) {
|
|
71
79
|
const scrollHeight = detailsEl.scrollHeight;
|
|
72
80
|
const duration = Math.max(Math.min(scrollHeight, 1500), 200);
|
|
73
81
|
detailsEl.style.height = scrollHeight + 'px';
|
|
82
|
+
|
|
74
83
|
if (!detailsEl.style.transitionDuration) {
|
|
75
84
|
detailsEl.style.transitionDuration = duration + 'ms';
|
|
76
85
|
}
|
|
86
|
+
|
|
77
87
|
if (timer.current) {
|
|
78
88
|
clearTimeout(timer.current);
|
|
79
89
|
}
|
|
90
|
+
|
|
80
91
|
timer.current = setTimeout(() => {
|
|
81
92
|
detailsEl.style.height = 'auto';
|
|
82
93
|
}, (detailsEl.firstChild.childNodes.length || 2.5) * 100);
|
|
@@ -84,9 +95,11 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
84
95
|
} else {
|
|
85
96
|
if (detailsEl && detailsEl.style.height) {
|
|
86
97
|
detailsEl.style.height = detailsEl.scrollHeight + 'px';
|
|
98
|
+
|
|
87
99
|
if (timer.current) {
|
|
88
100
|
clearTimeout(timer.current);
|
|
89
101
|
}
|
|
102
|
+
|
|
90
103
|
timer.current = setTimeout(() => {
|
|
91
104
|
detailsEl.style.height = null;
|
|
92
105
|
}, 10);
|
|
@@ -94,6 +107,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
94
107
|
}
|
|
95
108
|
}
|
|
96
109
|
};
|
|
110
|
+
|
|
97
111
|
useEffect(() => {
|
|
98
112
|
if (expandState) {
|
|
99
113
|
showHideDetailHandler('show');
|
|
@@ -104,10 +118,11 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
104
118
|
useImperativeHandle(reference, () => {
|
|
105
119
|
const currentRef = ref.current || {};
|
|
106
120
|
currentRef.element = ref.current;
|
|
107
|
-
const _instance = {
|
|
108
|
-
...action
|
|
121
|
+
const _instance = { ...action
|
|
109
122
|
}; // methods
|
|
123
|
+
|
|
110
124
|
_instance.__proto__ = {}; // hidden methods
|
|
125
|
+
|
|
111
126
|
currentRef.instance = _instance;
|
|
112
127
|
return currentRef;
|
|
113
128
|
});
|
|
@@ -131,8 +146,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
131
146
|
}
|
|
132
147
|
}, title || ''), children), !!expandIcon && jsx("div", {
|
|
133
148
|
className: 'Accordion-Icon-Root'
|
|
134
|
-
}, jsx("div", {
|
|
135
|
-
...expandIconProps,
|
|
149
|
+
}, jsx("div", { ...expandIconProps,
|
|
136
150
|
ref: expandIconRef,
|
|
137
151
|
className: classNames('Accordion-Icon', !collapseIcon && 'rotate-able', expandIconProps === null || expandIconProps === void 0 ? void 0 : expandIconProps.className)
|
|
138
152
|
}, typeof expandIcon === 'string' ? jsx(ButtonIcon, {
|
|
@@ -160,22 +174,31 @@ AccordionSummary.defaultProps = {
|
|
|
160
174
|
AccordionSummary.propTypes = {
|
|
161
175
|
/** Background for label summary. */
|
|
162
176
|
background: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
177
|
+
|
|
163
178
|
/** The content of the component. */
|
|
164
179
|
children: PropTypes.node,
|
|
180
|
+
|
|
165
181
|
/** Class for component. */
|
|
166
182
|
className: PropTypes.string,
|
|
183
|
+
|
|
167
184
|
/** Icon display for collapse icon. */
|
|
168
185
|
collapseIcon: PropTypes.any,
|
|
186
|
+
|
|
169
187
|
/** Icon display for expand icon. */
|
|
170
188
|
expandIcon: PropTypes.any,
|
|
189
|
+
|
|
171
190
|
/** Position to render icon. */
|
|
172
191
|
expandIconAt: PropTypes.oneOf(['start', 'end']),
|
|
192
|
+
|
|
173
193
|
/** Other props of icons. */
|
|
174
194
|
expandIconProps: PropTypes.any,
|
|
195
|
+
|
|
175
196
|
/** Callback fired when the component is clicked. */
|
|
176
197
|
onClick: PropTypes.func,
|
|
198
|
+
|
|
177
199
|
/** Style inline of component. */
|
|
178
200
|
style: PropTypes.object,
|
|
201
|
+
|
|
179
202
|
/** The title of the component. */
|
|
180
203
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
181
204
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -59,16 +60,24 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
59
60
|
const opacityColor = hexToRGBA(mainColor, 0.15);
|
|
60
61
|
const iconName = iconMap.get(type);
|
|
61
62
|
const iconSize = iconSizeMap.get(size);
|
|
63
|
+
|
|
62
64
|
const _AlertContainerCSS = AlertContainerCSS(size);
|
|
65
|
+
|
|
63
66
|
const _AlertInfoCSS = AlertInfoCSS(mainColor, opacityColor);
|
|
67
|
+
|
|
64
68
|
const _AlertTextCSS = AlertTextCSS(clearAble);
|
|
69
|
+
|
|
65
70
|
const _AlertPrimaryCSS = AlertPrimaryCSS(secondary, size);
|
|
71
|
+
|
|
66
72
|
const _AlertSecondaryCSS = AlertSecondaryCSS(size);
|
|
73
|
+
|
|
67
74
|
const _linearProgressCSS = linearProgressCSS(size);
|
|
75
|
+
|
|
68
76
|
const _onClose = () => {
|
|
69
77
|
setIsClose(true);
|
|
70
78
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
71
79
|
};
|
|
80
|
+
|
|
72
81
|
useEffect(() => {
|
|
73
82
|
setTimeout(() => {
|
|
74
83
|
setPercentState(0);
|
|
@@ -85,15 +94,17 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
85
94
|
useImperativeHandle(reference, () => {
|
|
86
95
|
const currentRef = ref.current || {};
|
|
87
96
|
currentRef.element = ref.current;
|
|
88
|
-
const _instance = {
|
|
89
|
-
...action
|
|
97
|
+
const _instance = { ...action
|
|
90
98
|
}; // methods
|
|
99
|
+
|
|
91
100
|
_instance.__proto__ = {}; // hidden methods
|
|
101
|
+
|
|
92
102
|
currentRef.instance = _instance;
|
|
93
103
|
return currentRef;
|
|
94
104
|
});
|
|
95
105
|
const AlertView = useMemo(() => {
|
|
96
106
|
let node = children;
|
|
107
|
+
|
|
97
108
|
if (!node) {
|
|
98
109
|
node = jsx(Icon, {
|
|
99
110
|
name: iconName,
|
|
@@ -103,6 +114,7 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
103
114
|
viewBox: true
|
|
104
115
|
});
|
|
105
116
|
}
|
|
117
|
+
|
|
106
118
|
return jsx("div", {
|
|
107
119
|
css: _AlertInfoCSS,
|
|
108
120
|
className: classNames('DGN-UI-Alert', className)
|
|
@@ -154,6 +166,7 @@ const Alert = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
154
166
|
}, AlertView, LinearView) : null;
|
|
155
167
|
}));
|
|
156
168
|
const fadeIn = animations.fadeIn;
|
|
169
|
+
|
|
157
170
|
const AlertContainerCSS = size => css`
|
|
158
171
|
${positionRelative};
|
|
159
172
|
${displayBlock};
|
|
@@ -164,6 +177,7 @@ const AlertContainerCSS = size => css`
|
|
|
164
177
|
z-index: ${zIndexCORE(1)};
|
|
165
178
|
animation: ${fadeIn} ${transitionTime}ms ease;
|
|
166
179
|
`;
|
|
180
|
+
|
|
167
181
|
const AlertInfoCSS = (mainColor, opacityColor) => css`
|
|
168
182
|
${flexRow};
|
|
169
183
|
${positionRelative};
|
|
@@ -179,17 +193,20 @@ const AlertInfoCSS = (mainColor, opacityColor) => css`
|
|
|
179
193
|
padding: ${spacing([0, 1, 0, 4])};
|
|
180
194
|
opacity: 1;
|
|
181
195
|
`;
|
|
196
|
+
|
|
182
197
|
const AlertIconCSS = css`
|
|
183
198
|
display: inherit;
|
|
184
199
|
margin-right: ${spacing([2.5])};
|
|
185
200
|
padding: ${spacing([2, 0])};
|
|
186
201
|
`;
|
|
202
|
+
|
|
187
203
|
const AlertTextCSS = clearAble => css`
|
|
188
204
|
${displayBlock};
|
|
189
205
|
margin-right: ${spacing([clearAble ? 2.5 : 0])};
|
|
190
206
|
padding: ${spacing([2, 0])};
|
|
191
207
|
align-self: center;
|
|
192
208
|
`;
|
|
209
|
+
|
|
193
210
|
const AlertPrimaryCSS = (secondary, size) => css`
|
|
194
211
|
${flexRow};
|
|
195
212
|
${positionRelative};
|
|
@@ -198,20 +215,24 @@ const AlertPrimaryCSS = (secondary, size) => css`
|
|
|
198
215
|
${userSelectNone};
|
|
199
216
|
${secondary ? primaryTypoMap.get(size) : paragraph1};
|
|
200
217
|
`;
|
|
218
|
+
|
|
201
219
|
const AlertSecondaryCSS = size => css`
|
|
202
220
|
${displayBlock};
|
|
203
221
|
${userSelectNone};
|
|
204
222
|
${size === 'tiny' ? paragraph3 : paragraph2};
|
|
205
223
|
`;
|
|
224
|
+
|
|
206
225
|
const AlertClearIconCSS = css`
|
|
207
226
|
margin-left: auto;
|
|
208
227
|
`;
|
|
228
|
+
|
|
209
229
|
const linearProgressCSS = size => css`
|
|
210
230
|
${displayBlock};
|
|
211
231
|
${positionRelative};
|
|
212
232
|
margin-top: ${spacing([size === 'medium' ? 1 : 0.5])};
|
|
213
233
|
padding: ${spacing([0, 1.25])};
|
|
214
234
|
`;
|
|
235
|
+
|
|
215
236
|
Alert.defaultProps = {
|
|
216
237
|
autoDisappear: false,
|
|
217
238
|
className: '',
|
|
@@ -224,24 +245,34 @@ Alert.defaultProps = {
|
|
|
224
245
|
Alert.propTypes = {
|
|
225
246
|
/** Automatically remove the Alert component after the timer ends (milliseconds). */
|
|
226
247
|
autoDisappear: PropTypes.bool,
|
|
248
|
+
|
|
227
249
|
/** The element to display in alert like text props (priority). */
|
|
228
250
|
children: PropTypes.node,
|
|
251
|
+
|
|
229
252
|
/** Class for component. */
|
|
230
253
|
className: PropTypes.string,
|
|
254
|
+
|
|
231
255
|
/** If `true`, show clear icon to close alert. */
|
|
232
256
|
clearAble: PropTypes.bool,
|
|
257
|
+
|
|
233
258
|
/** The amount of time the alert is displayed. The unit is the milliseconds. */
|
|
234
259
|
duration: PropTypes.number,
|
|
260
|
+
|
|
235
261
|
/** Callback fired when the component closed. */
|
|
236
262
|
onClose: PropTypes.func,
|
|
263
|
+
|
|
237
264
|
/** If `true`, show linear progress in duration time.*/
|
|
238
265
|
progressing: PropTypes.bool,
|
|
266
|
+
|
|
239
267
|
/** The secondary text to show in alert (under primary). */
|
|
240
268
|
secondary: PropTypes.string,
|
|
269
|
+
|
|
241
270
|
/** The size of the component. */
|
|
242
271
|
size: PropTypes.oneOf(['tiny', 'small', 'medium']),
|
|
272
|
+
|
|
243
273
|
/** The text to show in alert. */
|
|
244
274
|
text: PropTypes.string,
|
|
275
|
+
|
|
245
276
|
/** Type of the component. */
|
|
246
277
|
type: PropTypes.oneOf(['info', 'success', 'warning', 'danger'])
|
|
247
278
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, useEffect, forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
4
5
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
@@ -42,24 +43,27 @@ const Notify = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
42
43
|
const [positionState, setPositionState] = useState(position);
|
|
43
44
|
const PositionVerticalCSS = positionVerticalMap.get((positionState === null || positionState === void 0 ? void 0 : positionState.vertical) || 'bottom');
|
|
44
45
|
const PositionHorizontalCSS = positionHorizontalMap.get((positionState === null || positionState === void 0 ? void 0 : positionState.horizontal) || 'center');
|
|
46
|
+
|
|
45
47
|
const showNotify = (message, {
|
|
46
48
|
position,
|
|
47
49
|
...options
|
|
48
50
|
} = {}) => {
|
|
49
51
|
options = typeof options === 'object' ? options : {};
|
|
52
|
+
|
|
50
53
|
if (position) {
|
|
51
54
|
setPositionState(position);
|
|
52
55
|
}
|
|
56
|
+
|
|
53
57
|
const el = document.createElement('div');
|
|
54
58
|
el.className = 'DGN-UI-Notify-Alert-Item';
|
|
55
|
-
ReactDOM.render(jsx(Alert
|
|
56
|
-
// onClose={() => el.remove()}
|
|
59
|
+
ReactDOM.render(jsx(Alert // onClose={() => el.remove()}
|
|
57
60
|
, {
|
|
58
61
|
secondary: message,
|
|
59
62
|
...props,
|
|
60
63
|
...options
|
|
61
64
|
}), ref.current.appendChild(el));
|
|
62
65
|
};
|
|
66
|
+
|
|
63
67
|
useEffect(() => {
|
|
64
68
|
if (getAddNotify && typeof getAddNotify === 'function') getAddNotify(showNotify);
|
|
65
69
|
}, [props]);
|
|
@@ -73,7 +77,9 @@ const Notify = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
73
77
|
show: showNotify,
|
|
74
78
|
...action
|
|
75
79
|
}; // methods
|
|
80
|
+
|
|
76
81
|
_instance.__proto__ = {}; // hidden methods
|
|
82
|
+
|
|
77
83
|
currentRef.instance = _instance;
|
|
78
84
|
currentRef.add = showNotify;
|
|
79
85
|
return currentRef;
|
|
@@ -104,25 +110,29 @@ Notify.defaultProps = {
|
|
|
104
110
|
Notify.propTypes = {
|
|
105
111
|
/** Class for component. */
|
|
106
112
|
className: PropTypes.string,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
*
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* used to set position of Alert (is a string or an object)
|
|
116
|
+
* string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
|
|
110
117
|
*/
|
|
111
118
|
position: PropTypes.oneOfType([PropTypes.oneOf(['center']), PropTypes.shape({
|
|
112
119
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
113
120
|
vertical: PropTypes.oneOf(['bottom', 'center', 'top'])
|
|
114
121
|
})]),
|
|
122
|
+
|
|
115
123
|
/** Style inline of component. */
|
|
116
124
|
style: PropTypes.object,
|
|
125
|
+
|
|
117
126
|
/** Any [props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) of Alert */
|
|
118
127
|
props: PropTypes.any,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* * @param {
|
|
125
|
-
*
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* ref methods (ref.current.instance.*method*)
|
|
131
|
+
*
|
|
132
|
+
* * show(message, option): Show notify
|
|
133
|
+
* * @param {message} - number
|
|
134
|
+
* * @param {options} - object
|
|
135
|
+
* * {[Props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) applied to the `Alert`.}
|
|
126
136
|
*/
|
|
127
137
|
reference: ref
|
|
128
138
|
};
|