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,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-redeclare */
|
|
2
|
+
|
|
2
3
|
/** @jsxRuntime classic */
|
|
4
|
+
|
|
3
5
|
/** @jsx jsx */
|
|
4
6
|
import { memo, useEffect, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
@@ -9,68 +11,84 @@ import { InputBase, Label, HelperText } from "../../";
|
|
|
9
11
|
import { onValidate } from "../../../utils";
|
|
10
12
|
import { displayBlock, positionRelative } from "../../../styles/general";
|
|
11
13
|
import { getGlobal } from "../../../global";
|
|
14
|
+
|
|
12
15
|
const num2WordsVi = function () {
|
|
13
16
|
let t = ['không', 'một', 'hai', 'ba', 'bốn', 'năm', 'sáu', 'bảy', 'tám', 'chín'],
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
r = function (r, n) {
|
|
18
|
+
let o = '',
|
|
16
19
|
a = Math.floor(r / 10),
|
|
17
20
|
e = r % 10;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var a = '',
|
|
21
|
+
return a > 1 ? (o = ' ' + t[a] + ' mươi', 1 === e && (o += ' mốt')) : 1 === a ? (o = ' mười', 1 === e && (o += ' một')) : n && e > 0 && (o = ' lẻ'), 5 === e && a >= 1 ? o += ' lăm' : // : 4 === e && a >= 1
|
|
22
|
+
// ? (o += ' tư')
|
|
23
|
+
(e > 1 || 1 === e && 0 === a) && (o += ' ' + t[e]), o;
|
|
24
|
+
},
|
|
25
|
+
n = function (n, o) {
|
|
26
|
+
var a = '',
|
|
25
27
|
e = Math.floor(n / 100),
|
|
26
28
|
n = n % 100;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return o || e > 0 ? (a = ' ' + t[e] + ' trăm', a += r(n, !0)) : a = r(n, !1), a;
|
|
30
|
+
},
|
|
31
|
+
o = function (t, r) {
|
|
32
|
+
var o = '',
|
|
31
33
|
a = Math.floor(t / 1e6),
|
|
32
34
|
t = t % 1e6;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
a > 0 && (o = n(a, r) + ' triệu', r = !0);
|
|
36
|
+
var e = Math.floor(t / 1e3),
|
|
35
37
|
t = t % 1e3;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
return e > 0 && (o += n(e, r) + ' ngàn', r = !0), t > 0 && (o += n(t, r)), o;
|
|
39
|
+
};
|
|
40
|
+
|
|
38
41
|
return {
|
|
39
42
|
convert: function (r) {
|
|
40
43
|
let ty;
|
|
41
44
|
if (0 === r) return t[0];
|
|
42
45
|
let n = '',
|
|
43
|
-
|
|
46
|
+
a = '';
|
|
47
|
+
|
|
44
48
|
do ty = r % 1e9, r = Math.floor(r / 1e9), n = r > 0 ? o(ty, !0) + a + n : o(ty, !1) + a + n, a = ' tỷ'; while (r > 0);
|
|
49
|
+
|
|
45
50
|
return n.trim();
|
|
46
51
|
}
|
|
47
52
|
};
|
|
48
53
|
}();
|
|
54
|
+
|
|
49
55
|
const num2WordsEn = n => {
|
|
50
56
|
const arr = x => Array.from(x);
|
|
57
|
+
|
|
51
58
|
const num = x => Number(x) || 0;
|
|
59
|
+
|
|
52
60
|
const isEmpty = xs => xs.length === 0;
|
|
61
|
+
|
|
53
62
|
const take = n => xs => xs.slice(0, n);
|
|
63
|
+
|
|
54
64
|
const drop = n => xs => xs.slice(n);
|
|
65
|
+
|
|
55
66
|
const reverse = xs => xs.slice(0).reverse();
|
|
67
|
+
|
|
56
68
|
const comp = f => g => x => f(g(x));
|
|
69
|
+
|
|
57
70
|
const not = x => !x;
|
|
71
|
+
|
|
58
72
|
const chunk = n => xs => isEmpty(xs) ? [] : [take(n)(xs), ...chunk(n)(drop(n)(xs))];
|
|
73
|
+
|
|
59
74
|
let a = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
|
|
60
75
|
let b = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
|
|
61
|
-
let g = ['', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion'];
|
|
62
|
-
// this part is really nasty still
|
|
76
|
+
let g = ['', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion']; // this part is really nasty still
|
|
63
77
|
// it might edit this again later to show how Monoids could fix this up
|
|
78
|
+
|
|
64
79
|
let makeGroup = ([ones, tens, huns]) => {
|
|
65
80
|
return [num(huns) === 0 ? '' : a[huns] + ' hundred ', num(ones) === 0 ? b[tens] : b[tens] && b[tens] + '-' || '', a[tens + ones] || a[ones]].join('');
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// execute !
|
|
81
|
+
}; // "thousands" constructor; no real good names for this, I guess
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
let thousand = (group, i) => group === '' ? group : `${group} ${g[i]}`; // execute !
|
|
85
|
+
|
|
86
|
+
|
|
70
87
|
if (typeof n === 'number') return num2WordsEn(String(n));
|
|
71
88
|
if (n === '0') return 'zero';
|
|
72
89
|
return comp(chunk(3))(reverse)(arr(n)).map(makeGroup).map(thousand).filter(comp(not)(isEmpty)).reverse().join(' ');
|
|
73
90
|
};
|
|
91
|
+
|
|
74
92
|
const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
75
93
|
viewType,
|
|
76
94
|
valueTypeReturn,
|
|
@@ -116,26 +134,30 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
116
134
|
isPaste: false,
|
|
117
135
|
clipboardText: ''
|
|
118
136
|
});
|
|
137
|
+
|
|
119
138
|
if (!inputRef) {
|
|
120
139
|
inputRef = useRef(null);
|
|
121
140
|
}
|
|
141
|
+
|
|
122
142
|
const separatorSymbol = typeof thousandSeparator === 'string' ? thousandSeparator : locale.get() === 'vi' ? '.' : ',';
|
|
123
143
|
const decimalSymbol = separatorSymbol === '.' ? ',' : '.';
|
|
124
144
|
const thousandSeparatorPattern = new RegExp(`[0-9]|Backspace|Delete|Arrow|Home|End|Tab${decimalDigit === 0 ? '' : '|\\' + decimalSymbol}${disabledNegative ? '' : '|-'}`);
|
|
125
145
|
const isError = !!error && !value && value !== 0;
|
|
126
|
-
|
|
127
146
|
/* Start handler */
|
|
147
|
+
|
|
128
148
|
const getThousandSeparator = number => {
|
|
129
149
|
let decimal;
|
|
130
150
|
[number, decimal = ''] = number.split(decimalSymbol);
|
|
131
|
-
if (!number || String(+number) === 'NaN') return number;
|
|
132
|
-
// number = +number;
|
|
151
|
+
if (!number || String(+number) === 'NaN') return number; // number = +number;
|
|
133
152
|
// return number.toLocaleString(separatorSymbol === '.' ? 'vi' : 'en');
|
|
153
|
+
|
|
134
154
|
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, separatorSymbol) + (decimal ? decimalSymbol + decimal : '');
|
|
135
155
|
};
|
|
156
|
+
|
|
136
157
|
const getValueWithDecimal = v => {
|
|
137
158
|
if (v && typeof decimalDigit === 'number') {
|
|
138
159
|
let [number, decimal] = v.split(decimalSymbol);
|
|
160
|
+
|
|
139
161
|
if (decimal && decimal.length > decimalDigit) {
|
|
140
162
|
if (decimalDigit) {
|
|
141
163
|
decimal = decimal.slice(0, decimalDigit);
|
|
@@ -145,38 +167,48 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
145
167
|
}
|
|
146
168
|
}
|
|
147
169
|
}
|
|
170
|
+
|
|
148
171
|
return v;
|
|
149
172
|
};
|
|
173
|
+
|
|
150
174
|
const isDeleteSymbol = v => {
|
|
151
175
|
const valueArr = v.split(separatorSymbol);
|
|
176
|
+
|
|
152
177
|
for (let i = 0; i < valueArr.length; i++) {
|
|
153
178
|
if (valueArr[i].length > 3) {
|
|
154
179
|
return true;
|
|
155
180
|
}
|
|
156
181
|
}
|
|
182
|
+
|
|
157
183
|
return false;
|
|
158
184
|
};
|
|
185
|
+
|
|
159
186
|
const onKeyDownHandler = e => {
|
|
160
187
|
e.stopPropagation();
|
|
161
188
|
const key = e.key;
|
|
162
189
|
const keyCode = e.keyCode;
|
|
163
190
|
const value = inputRef.current.value;
|
|
164
191
|
let cursor = inputRef.current.selectionStart;
|
|
192
|
+
|
|
165
193
|
if (key.charCodeAt(0) > 127) {
|
|
166
194
|
local.current.isSpecialSymbol = true;
|
|
195
|
+
|
|
167
196
|
if (local.current.currentKeyCode === 8) {
|
|
168
197
|
local.current.currentKeyCode = null;
|
|
169
198
|
inputRef.current.value = local.current.currentValue;
|
|
170
199
|
}
|
|
200
|
+
|
|
171
201
|
e.preventDefault();
|
|
172
202
|
return false;
|
|
173
203
|
}
|
|
204
|
+
|
|
174
205
|
if (!thousandSeparatorPattern.test(key) && !(/a|x|c|v/i.test(key) && e.ctrlKey)) {
|
|
175
206
|
local.current.currentKey = key;
|
|
176
207
|
local.current.currentKeyCode = keyCode;
|
|
177
208
|
e.preventDefault();
|
|
178
209
|
return false;
|
|
179
210
|
}
|
|
211
|
+
|
|
180
212
|
if (keyCode === 8) {
|
|
181
213
|
if (local.current.currentKeyCode === 231 || local.current.isSpecialSymbol) {
|
|
182
214
|
setTimeout(() => {
|
|
@@ -185,84 +217,101 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
185
217
|
e.preventDefault();
|
|
186
218
|
return false;
|
|
187
219
|
}
|
|
220
|
+
|
|
188
221
|
local.current.currentKeyCode = 8;
|
|
189
222
|
local.current.currentValue = value;
|
|
190
223
|
}
|
|
224
|
+
|
|
191
225
|
if (value.includes('-') && cursor === 0 && /[1-9]/.test(key)) {
|
|
192
226
|
inputRef.current.value = value.replace('-', `-${key}`);
|
|
193
227
|
inputRef.current.setSelectionRange(2, 2);
|
|
194
228
|
e.preventDefault();
|
|
195
229
|
return false;
|
|
196
230
|
}
|
|
231
|
+
|
|
197
232
|
if (key === '-' && (cursor !== 0 || value[0] === '-') || key === decimalSymbol && value.includes(key) || key === '0' && !allowZero && (cursor === 0 || cursor === 1 && value.includes('-'))) {
|
|
198
233
|
e.preventDefault();
|
|
199
234
|
return false;
|
|
200
235
|
}
|
|
236
|
+
|
|
201
237
|
if (/x/i.test(key)) {
|
|
202
238
|
local.current.clipboardText = window.getSelection().toString();
|
|
203
239
|
}
|
|
240
|
+
|
|
204
241
|
local.current.isSpecialSymbol = false;
|
|
205
242
|
local.current.isDeleteDecimalSymbol = key === 'Backspace' && value[cursor - 1] === decimalSymbol;
|
|
206
243
|
local.current.currentKey = key;
|
|
207
244
|
!!onKeyDown && onKeyDown(e);
|
|
208
245
|
};
|
|
246
|
+
|
|
209
247
|
const parseValueWithFix = value => {
|
|
210
248
|
if (!value) return value;
|
|
211
249
|
if (!prefix && !suffix) return value;
|
|
212
250
|
return `${prefix ? prefix + ' ' : ''}${value}${suffix ? ' ' + suffix : ''}`;
|
|
213
251
|
};
|
|
252
|
+
|
|
214
253
|
const onPasteHandler = e => {
|
|
215
254
|
var _local$current$clipbo;
|
|
255
|
+
|
|
216
256
|
const value = e.target.value;
|
|
217
257
|
const existMinus = value.includes('-');
|
|
218
258
|
const pattern = new RegExp(`^${disabledNegative || existMinus ? '' : '-?'}(?:\\d{1,3}(?:,\\d{3})*|\\d+)(?:\\${decimalSymbol}\\d+)?$`, 'g');
|
|
219
259
|
local.current.clipboardText = (e.clipboardData || window.clipboardData).getData('text');
|
|
220
260
|
const decimalSymbolDigit = (_local$current$clipbo = local.current.clipboardText.match(new RegExp(decimalSymbol, 'g'))) === null || _local$current$clipbo === void 0 ? void 0 : _local$current$clipbo.length;
|
|
221
|
-
const selectionText = window.getSelection().toString();
|
|
222
|
-
|
|
223
|
-
if (!pattern.test(local.current.clipboardText) ||
|
|
224
|
-
// Only one decimalSymbol
|
|
261
|
+
const selectionText = window.getSelection().toString(); // Only includes number and decimalSymbol
|
|
262
|
+
|
|
263
|
+
if (!pattern.test(local.current.clipboardText) || // Only one decimalSymbol
|
|
225
264
|
decimalSymbolDigit && value.includes(decimalSymbol) && !selectionText.includes(decimalSymbol)) {
|
|
226
265
|
e.preventDefault();
|
|
227
266
|
return;
|
|
228
267
|
}
|
|
268
|
+
|
|
229
269
|
local.current.isPaste = true;
|
|
230
270
|
};
|
|
271
|
+
|
|
231
272
|
const onChangeHandler = e => {
|
|
232
273
|
const value = e.target.value;
|
|
274
|
+
|
|
233
275
|
if (/[a-z]/i.test(value)) {
|
|
234
276
|
const length = value.match(/[a-z]/gi).length;
|
|
235
277
|
e.target.value = value.replace(/[a-z]/gi, '');
|
|
278
|
+
|
|
236
279
|
if (length === 1) {
|
|
237
280
|
const index = value.match(/[a-z]/i).index;
|
|
238
281
|
e.target.setSelectionRange(index, index);
|
|
239
282
|
}
|
|
283
|
+
|
|
240
284
|
return;
|
|
241
285
|
}
|
|
286
|
+
|
|
242
287
|
if (!value) {
|
|
243
288
|
e.value = null;
|
|
244
289
|
!!onChange && onChange(e);
|
|
245
290
|
e.value = undefined;
|
|
246
291
|
return;
|
|
247
292
|
}
|
|
293
|
+
|
|
248
294
|
let result = value;
|
|
249
295
|
let cursor = e.target.selectionStart;
|
|
250
|
-
const el = {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
// el.target = {...e.target}
|
|
296
|
+
const el = { ...e
|
|
297
|
+
}; // el.target = {...e.target}
|
|
298
|
+
|
|
254
299
|
const hasDecimal = result.includes(decimalSymbol);
|
|
255
300
|
let [number, decimal = ''] = result.split(decimalSymbol);
|
|
301
|
+
|
|
256
302
|
if (hasDecimal) {
|
|
257
303
|
if (typeof decimalDigit === 'number') {
|
|
258
304
|
decimal = decimal.replaceAll(separatorSymbol, '').substr(0, decimalDigit);
|
|
259
305
|
}
|
|
306
|
+
|
|
260
307
|
decimal = (hasDecimal ? decimalSymbol : '') + decimal;
|
|
261
308
|
result = number + decimal;
|
|
262
309
|
}
|
|
310
|
+
|
|
263
311
|
if (thousandSeparator && (thousandSeparatorPattern.test(local.current.currentKey) || local.current.isPaste || /x/i.test(local.current.currentKey))) {
|
|
264
312
|
const decimalSymbolIndex = result.indexOf(decimalSymbol);
|
|
265
313
|
number = number.replaceAll(separatorSymbol, '');
|
|
314
|
+
|
|
266
315
|
if (local.current.currentKey === decimalSymbol) {
|
|
267
316
|
cursor = number.length + Math.ceil(number.length / 3);
|
|
268
317
|
} else if (!isNaN(local.current.currentKey)) {
|
|
@@ -283,6 +332,7 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
283
332
|
}
|
|
284
333
|
} else if (local.current.isPaste) {
|
|
285
334
|
var _result$slice$match, _local$current$clipbo2;
|
|
335
|
+
|
|
286
336
|
const simpleNumber = number + decimal;
|
|
287
337
|
const cursorBefore = cursor - local.current.clipboardText.length;
|
|
288
338
|
const cursorAfter = cursorBefore - (((_result$slice$match = result.slice(0, cursorBefore).match(new RegExp(`\\${separatorSymbol}`, 'g'))) === null || _result$slice$match === void 0 ? void 0 : _result$slice$match.length) || 0) + local.current.clipboardText.length;
|
|
@@ -294,6 +344,7 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
294
344
|
} else if (/x/i.test(local.current.currentKey)) {
|
|
295
345
|
cursor = cursor - +(Math.ceil(number.length / 3) !== Math.ceil((number.length + local.current.clipboardText.length) / 3));
|
|
296
346
|
}
|
|
347
|
+
|
|
297
348
|
result = number + decimal;
|
|
298
349
|
cursor = Math.max(0, cursor);
|
|
299
350
|
e.target.value = getThousandSeparator(number) + decimal;
|
|
@@ -301,15 +352,18 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
301
352
|
} else {
|
|
302
353
|
e.target.value = result;
|
|
303
354
|
e.target.setSelectionRange(cursor, cursor);
|
|
304
|
-
}
|
|
305
|
-
|
|
355
|
+
} // el.target.value = result;
|
|
356
|
+
|
|
357
|
+
|
|
306
358
|
if (valueTypeReturn === 'string') {
|
|
307
359
|
el.value = result;
|
|
308
360
|
} else {
|
|
309
361
|
el.value = String(+result.replace(',', '.')) !== 'NaN' ? +result.replace(',', '.') : result;
|
|
310
362
|
}
|
|
363
|
+
|
|
311
364
|
!!onChange && onChange(el);
|
|
312
365
|
};
|
|
366
|
+
|
|
313
367
|
useEffect(() => {
|
|
314
368
|
if (defaultValue !== undefined && defaultValue !== '') {
|
|
315
369
|
const v = getValueWithDecimal(defaultValue.toString().replace('.', decimalSymbol));
|
|
@@ -327,11 +381,14 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
327
381
|
inputRef.current.value = '';
|
|
328
382
|
} else {
|
|
329
383
|
const v = getValueWithDecimal(value.toString().replace('.', decimalSymbol));
|
|
384
|
+
|
|
330
385
|
if (convertToWords && !decimalDigit && (disabled || readOnly)) {
|
|
331
386
|
let valueConverted = getGlobal('helperInvalid');
|
|
387
|
+
|
|
332
388
|
if (Number.isInteger(value)) {
|
|
333
389
|
valueConverted = locale.get() === 'vi' ? num2WordsVi.convert(value) : num2WordsEn(value);
|
|
334
390
|
}
|
|
391
|
+
|
|
335
392
|
inputRef.current.value = parseValueWithFix(valueConverted);
|
|
336
393
|
} else {
|
|
337
394
|
inputRef.current.value = parseValueWithFix(thousandSeparator ? getThousandSeparator(v) : v);
|
|
@@ -350,7 +407,9 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
350
407
|
const _instance = {
|
|
351
408
|
getThousandSeparator: getThousandSeparator
|
|
352
409
|
}; // methods
|
|
410
|
+
|
|
353
411
|
_instance.__proto__ = {}; // hidden methods
|
|
412
|
+
|
|
354
413
|
currentRef.instance = _instance;
|
|
355
414
|
currentRef.getThousandSeparator = getThousandSeparator;
|
|
356
415
|
return currentRef;
|
|
@@ -361,8 +420,7 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
361
420
|
css: MoneyInputRoot,
|
|
362
421
|
className: ['DGN-UI-Money-Input', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
363
422
|
...props
|
|
364
|
-
}, !!label && jsx(Label, {
|
|
365
|
-
...labelProps,
|
|
423
|
+
}, !!label && jsx(Label, { ...labelProps,
|
|
366
424
|
required: required,
|
|
367
425
|
disabled: disabled
|
|
368
426
|
}, label), jsx(InputBase, {
|
|
@@ -388,11 +446,9 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
388
446
|
onKeyDown: onKeyDownHandler,
|
|
389
447
|
onKeyUp: onKeyUp,
|
|
390
448
|
onPaste: onPasteHandler
|
|
391
|
-
}), isError && jsx(HelperText, {
|
|
392
|
-
...helperTextProps,
|
|
449
|
+
}), isError && jsx(HelperText, { ...helperTextProps,
|
|
393
450
|
disabled: disabled
|
|
394
|
-
}, error), !isError && validateResult && jsx(HelperText, {
|
|
395
|
-
...helperTextProps,
|
|
451
|
+
}, error), !isError && validateResult && jsx(HelperText, { ...helperTextProps,
|
|
396
452
|
disabled: disabled
|
|
397
453
|
}, validateResult));
|
|
398
454
|
}));
|
|
@@ -424,81 +480,114 @@ MoneyInput.defaultProps = {
|
|
|
424
480
|
MoneyInput.propTypes = {
|
|
425
481
|
/** the type of border you want to display */
|
|
426
482
|
viewType: PropTypes.oneOf(['underlined', 'outlined']),
|
|
483
|
+
|
|
427
484
|
/** the type of value which you want to return */
|
|
428
485
|
valueTypeReturn: PropTypes.oneOf(['number', 'string']),
|
|
486
|
+
|
|
429
487
|
/** label for input */
|
|
430
488
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
489
|
+
|
|
431
490
|
/** default value is displayed for first render */
|
|
432
491
|
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
492
|
+
|
|
433
493
|
/** the displayed value for each change */
|
|
434
494
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
495
|
+
|
|
435
496
|
/** number of decimal places allowed */
|
|
436
497
|
decimalDigit: PropTypes.number,
|
|
498
|
+
|
|
437
499
|
/** hints for input */
|
|
438
500
|
placeholder: PropTypes.string,
|
|
501
|
+
|
|
439
502
|
/** class of input */
|
|
440
503
|
className: PropTypes.string,
|
|
504
|
+
|
|
441
505
|
/** error for input */
|
|
442
506
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
507
|
+
|
|
443
508
|
/** icon at start */
|
|
444
509
|
startIcon: PropTypes.any,
|
|
510
|
+
|
|
445
511
|
/** icon at end */
|
|
446
512
|
endIcon: PropTypes.any,
|
|
513
|
+
|
|
447
514
|
/** prevent all event if true, hide all icon */
|
|
448
515
|
disabled: PropTypes.bool,
|
|
516
|
+
|
|
449
517
|
/** transparent border color if true */
|
|
450
518
|
nonStyle: PropTypes.bool,
|
|
519
|
+
|
|
451
520
|
/** prevent all event if true */
|
|
452
521
|
readOnly: PropTypes.bool,
|
|
522
|
+
|
|
453
523
|
/** auto focus after first render */
|
|
454
524
|
autoFocus: PropTypes.bool,
|
|
525
|
+
|
|
455
526
|
/** allow enter number 0 */
|
|
456
527
|
allowZero: PropTypes.bool,
|
|
528
|
+
|
|
457
529
|
/** negative numbers are not allowed if true */
|
|
458
530
|
disabledNegative: PropTypes.bool,
|
|
531
|
+
|
|
459
532
|
/** allow thousand separator for number */
|
|
460
533
|
thousandSeparator: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
534
|
+
|
|
461
535
|
/** At least one character is required */
|
|
462
536
|
required: PropTypes.bool,
|
|
537
|
+
|
|
463
538
|
/** Convert money from number to words when readOnly || disabled */
|
|
464
539
|
convertToWords: PropTypes.bool,
|
|
540
|
+
|
|
465
541
|
/** Add a string to first of value when convertToWords. */
|
|
466
542
|
prefix: PropTypes.string,
|
|
543
|
+
|
|
467
544
|
/** Add a string to last of value when convertToWords. */
|
|
468
545
|
suffix: PropTypes.string,
|
|
546
|
+
|
|
469
547
|
/** props of input in MoneyInput component */
|
|
470
548
|
inputProps: PropTypes.object,
|
|
549
|
+
|
|
471
550
|
/** style inline of input in MoneyInput component */
|
|
472
551
|
inputStyle: PropTypes.object,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
* *
|
|
476
|
-
* *
|
|
552
|
+
|
|
553
|
+
/** validation value, argument can:<br/>
|
|
554
|
+
* * string: the validation rule. Example required.<br/>
|
|
555
|
+
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
556
|
+
* * array: the validation rule list, insist object/string
|
|
477
557
|
*/
|
|
478
558
|
validates: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array, PropTypes.func]),
|
|
559
|
+
|
|
479
560
|
/** on key down function */
|
|
480
561
|
onKeyDown: PropTypes.func,
|
|
562
|
+
|
|
481
563
|
/** on key up function */
|
|
482
564
|
onKeyUp: PropTypes.func,
|
|
565
|
+
|
|
483
566
|
/** on input function */
|
|
484
567
|
onInput: PropTypes.func,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*  
|
|
491
|
-
*
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* on change function, return an object:<br/>
|
|
571
|
+
* {<br/>
|
|
572
|
+
* value: is a number or null value<br/>
|
|
573
|
+
* target.value: value of input<br/>
|
|
574
|
+
* ...element<br/>
|
|
575
|
+
* }
|
|
492
576
|
*/
|
|
493
577
|
onChange: PropTypes.func,
|
|
578
|
+
|
|
494
579
|
/** on blur function */
|
|
495
580
|
onBlur: PropTypes.func,
|
|
581
|
+
|
|
496
582
|
/** on focus function */
|
|
497
583
|
onFocus: PropTypes.func,
|
|
584
|
+
|
|
498
585
|
/** inputRef of MoneyInput component */
|
|
499
586
|
inputRef: PropTypes.any,
|
|
587
|
+
|
|
500
588
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/form-control-text-label) of label. */
|
|
501
589
|
labelProps: PropTypes.object,
|
|
590
|
+
|
|
502
591
|
/** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-text-helpertext) of helper text. */
|
|
503
592
|
helperTextProps: PropTypes.object
|
|
504
593
|
};
|