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, useEffect, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -46,11 +47,13 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
46
47
|
...props
|
|
47
48
|
}, reference) => {
|
|
48
49
|
const ref = useRef(null);
|
|
50
|
+
|
|
49
51
|
if (!inputRef) {
|
|
50
52
|
inputRef = useRef(null);
|
|
51
53
|
}
|
|
52
|
-
|
|
53
54
|
/* Start styled */
|
|
55
|
+
|
|
56
|
+
|
|
54
57
|
const PhoneInputRoot = css`
|
|
55
58
|
display: block;
|
|
56
59
|
position: relative;
|
|
@@ -67,133 +70,167 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
67
70
|
/* End styled */
|
|
68
71
|
|
|
69
72
|
let currentKey,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
isUnicode = 0,
|
|
74
|
+
isFocus = false,
|
|
75
|
+
isPaste = false,
|
|
76
|
+
clipboardText = '';
|
|
75
77
|
/* Start handler */
|
|
78
|
+
|
|
76
79
|
const replaceMark = value => {
|
|
77
80
|
let result = ensigns[ensign].mark;
|
|
81
|
+
|
|
78
82
|
if (value) {
|
|
79
83
|
value = value.replaceAll(' ', '').replace(/_+$/, '');
|
|
80
84
|
const length = value.length;
|
|
85
|
+
|
|
81
86
|
if (length) {
|
|
82
87
|
for (let i = 0; i < length; i++) {
|
|
83
88
|
result = result.replace('_', value[i]);
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
}
|
|
92
|
+
|
|
87
93
|
return result;
|
|
88
94
|
};
|
|
95
|
+
|
|
89
96
|
const onFocusHandler = e => {
|
|
90
97
|
document.addEventListener('mouseup', onMouseUpHandler);
|
|
91
98
|
isFocus = true;
|
|
92
99
|
!!onFocus && onFocus(e);
|
|
93
100
|
};
|
|
101
|
+
|
|
94
102
|
const onMouseUpHandler = () => {
|
|
95
|
-
const text = window.getSelection().toString();
|
|
96
|
-
|
|
103
|
+
const text = window.getSelection().toString(); // Start focus and don't selection any text
|
|
104
|
+
|
|
97
105
|
if (!text) {
|
|
98
106
|
const value = inputRef.current.value;
|
|
99
107
|
const markFirstIndex = value.indexOf('_');
|
|
100
108
|
let cursor = inputRef.current.selectionStart;
|
|
109
|
+
|
|
101
110
|
if (isFocus) {
|
|
102
111
|
isFocus = false;
|
|
112
|
+
|
|
103
113
|
if (markFirstIndex !== -1) {
|
|
104
114
|
inputRef.current.setSelectionRange(markFirstIndex, markFirstIndex);
|
|
105
115
|
}
|
|
116
|
+
|
|
106
117
|
return;
|
|
107
118
|
}
|
|
119
|
+
|
|
108
120
|
if (value[cursor] === ' ') {
|
|
109
121
|
inputRef.current.setSelectionRange(cursor + 1, cursor + 1);
|
|
110
122
|
return;
|
|
111
123
|
}
|
|
124
|
+
|
|
112
125
|
if (markFirstIndex !== -1 && markFirstIndex < cursor) {
|
|
113
126
|
inputRef.current.setSelectionRange(markFirstIndex, markFirstIndex);
|
|
114
127
|
}
|
|
115
128
|
}
|
|
116
129
|
};
|
|
130
|
+
|
|
117
131
|
const onBlurHandler = e => {
|
|
118
132
|
document.removeEventListener('mouseup', onMouseUpHandler);
|
|
119
133
|
!!onBlur && onBlur(e);
|
|
120
134
|
};
|
|
135
|
+
|
|
121
136
|
const onKeyDownHandler = e => {
|
|
122
137
|
const key = e.key;
|
|
123
138
|
const keyCode = e.keyCode;
|
|
139
|
+
|
|
124
140
|
if (/Arrow|Home|End/.test(key) || /a|x|c|v/i.test(key) && e.ctrlKey) {
|
|
125
141
|
return;
|
|
126
142
|
}
|
|
143
|
+
|
|
127
144
|
if (keyCode === 231) {
|
|
128
145
|
isUnicode = isUnicode > 0 ? 0 : 1;
|
|
129
146
|
e.preventDefault();
|
|
130
147
|
return false;
|
|
131
148
|
}
|
|
149
|
+
|
|
132
150
|
if (keyCode === 8 && /^[12]$/.test(isUnicode)) {
|
|
133
151
|
isUnicode++;
|
|
134
152
|
e.preventDefault();
|
|
135
153
|
return false;
|
|
136
154
|
}
|
|
155
|
+
|
|
137
156
|
if (!/[0-9]|Backspace|Delete/.test(key)) {
|
|
138
157
|
isUnicode = -1;
|
|
139
158
|
currentKey = key;
|
|
140
159
|
e.preventDefault();
|
|
141
160
|
return false;
|
|
142
161
|
}
|
|
162
|
+
|
|
143
163
|
const {
|
|
144
164
|
value,
|
|
145
165
|
selectionStart: cursor
|
|
146
166
|
} = inputRef.current;
|
|
167
|
+
|
|
147
168
|
if (key === 'ArrowRight') {
|
|
148
169
|
if (value[cursor] === '_') {
|
|
149
170
|
e.preventDefault();
|
|
150
171
|
return false;
|
|
151
172
|
}
|
|
173
|
+
|
|
152
174
|
if (!value[cursor + 1].trim()) {
|
|
153
175
|
inputRef.current.setSelectionRange(cursor + 1, cursor + 1);
|
|
154
176
|
}
|
|
155
177
|
}
|
|
178
|
+
|
|
156
179
|
if (/[0-9]/.test(key) && !value[cursor]) {
|
|
157
180
|
e.preventDefault();
|
|
158
181
|
return false;
|
|
159
182
|
}
|
|
183
|
+
|
|
160
184
|
isUnicode = 0;
|
|
161
185
|
currentKey = key;
|
|
162
186
|
!!onKeyDown && onKeyDown(e);
|
|
163
187
|
};
|
|
188
|
+
|
|
164
189
|
const onPasteHandler = e => {
|
|
165
190
|
clipboardText = (e.clipboardData || window.clipboardData).getData('text');
|
|
191
|
+
|
|
166
192
|
if (!/\d+/.test(clipboardText)) {
|
|
167
193
|
e.preventDefault();
|
|
168
194
|
return;
|
|
169
195
|
}
|
|
196
|
+
|
|
170
197
|
isPaste = true;
|
|
171
198
|
};
|
|
199
|
+
|
|
172
200
|
const onChangeHandler = e => {
|
|
173
201
|
let value = e.target.value;
|
|
174
202
|
let cursor = e.target.selectionStart;
|
|
203
|
+
|
|
175
204
|
if (isPaste) {
|
|
176
205
|
isPaste = false;
|
|
177
206
|
value = value.replace(/\s/g, '');
|
|
178
207
|
const index = value.indexOf(clipboardText);
|
|
208
|
+
|
|
179
209
|
if (!index && value[0] === '0') {
|
|
180
210
|
value = value.slice(1);
|
|
181
211
|
}
|
|
212
|
+
|
|
182
213
|
const cursorOnPaste = index + clipboardText.length;
|
|
183
214
|
const mark = ensigns[ensign].mark;
|
|
184
215
|
const lengthOfMark = mark.length;
|
|
216
|
+
|
|
185
217
|
if (cursorOnPaste < lengthOfMark) {
|
|
186
218
|
let newCursor = cursorOnPaste;
|
|
219
|
+
|
|
187
220
|
while (mark.slice(0, newCursor).match(/_/g).length < cursorOnPaste && newCursor < lengthOfMark) {
|
|
188
221
|
newCursor++;
|
|
189
222
|
}
|
|
223
|
+
|
|
190
224
|
if (!mark[newCursor].trim()) {
|
|
191
225
|
newCursor++;
|
|
192
226
|
}
|
|
227
|
+
|
|
193
228
|
cursor = newCursor;
|
|
194
229
|
}
|
|
195
230
|
}
|
|
231
|
+
|
|
196
232
|
const result = replaceMark(value);
|
|
233
|
+
|
|
197
234
|
if (/\d/.test(currentKey)) {
|
|
198
235
|
if (result[cursor] && (!result[cursor].trim() || !result[cursor - 1].trim())) {
|
|
199
236
|
cursor++;
|
|
@@ -203,14 +240,14 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
203
240
|
cursor--;
|
|
204
241
|
}
|
|
205
242
|
}
|
|
243
|
+
|
|
206
244
|
e.target.value = result;
|
|
207
245
|
e.target.setSelectionRange(cursor, cursor);
|
|
246
|
+
|
|
208
247
|
if (onChange) {
|
|
209
|
-
const el = {
|
|
210
|
-
...e
|
|
248
|
+
const el = { ...e
|
|
211
249
|
};
|
|
212
|
-
el.target = {
|
|
213
|
-
...e.targe
|
|
250
|
+
el.target = { ...e.targe
|
|
214
251
|
};
|
|
215
252
|
el.target.value = '(+' + ensigns[ensign].countryCode + ') ' + result.replaceAll('_', '');
|
|
216
253
|
el.value = '0' + result.replace(/\s|_/g, '');
|
|
@@ -218,11 +255,14 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
218
255
|
onChange(el);
|
|
219
256
|
}
|
|
220
257
|
};
|
|
258
|
+
|
|
221
259
|
useEffect(() => {
|
|
222
260
|
!!refs && refs(ref);
|
|
261
|
+
|
|
223
262
|
if (defaultValue !== undefined && defaultValue !== '') {
|
|
224
263
|
inputRef.current.value = replaceMark(defaultValue.replace(/^0/, ''));
|
|
225
264
|
}
|
|
265
|
+
|
|
226
266
|
if (autoFocus) {
|
|
227
267
|
inputRef.current.focus();
|
|
228
268
|
const value = inputRef.current.value;
|
|
@@ -230,6 +270,7 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
230
270
|
markIndex = markIndex !== -1 ? markIndex : ensigns[ensign].mark.length;
|
|
231
271
|
inputRef.current.setSelectionRange(markIndex, markIndex);
|
|
232
272
|
}
|
|
273
|
+
|
|
233
274
|
return () => {
|
|
234
275
|
document.removeEventListener('mouseup', onMouseUpHandler);
|
|
235
276
|
};
|
|
@@ -256,8 +297,7 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
256
297
|
marginBottom: '20px'
|
|
257
298
|
},
|
|
258
299
|
...props
|
|
259
|
-
}, jsx(Label, {
|
|
260
|
-
...labelProps,
|
|
300
|
+
}, jsx(Label, { ...labelProps,
|
|
261
301
|
required: required,
|
|
262
302
|
disabled: disabled
|
|
263
303
|
}, label), jsx(InputBase, {
|
|
@@ -285,8 +325,7 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
285
325
|
startIconProps: {
|
|
286
326
|
className: 'non-effect'
|
|
287
327
|
}
|
|
288
|
-
}), !!error && jsx(HelperText, {
|
|
289
|
-
...helperTextProps,
|
|
328
|
+
}), !!error && jsx(HelperText, { ...helperTextProps,
|
|
290
329
|
disabled: disabled
|
|
291
330
|
}, error));
|
|
292
331
|
}));
|
|
@@ -307,57 +346,80 @@ PhoneInput.defaultProps = {
|
|
|
307
346
|
PhoneInput.propTypes = {
|
|
308
347
|
/** the type of border you want to display */
|
|
309
348
|
viewType: PropTypes.oneOf(['underlined', 'outlined']),
|
|
349
|
+
|
|
310
350
|
/** the ensign to determinate */
|
|
311
351
|
ensign: PropTypes.oneOf(['Vietnam', 'England']),
|
|
352
|
+
|
|
312
353
|
/** label for input */
|
|
313
354
|
label: PropTypes.string,
|
|
355
|
+
|
|
314
356
|
/** default value is displayed for first render */
|
|
315
357
|
defaultValue: PropTypes.string,
|
|
358
|
+
|
|
316
359
|
/** the displayed value for each change */
|
|
317
360
|
value: PropTypes.string,
|
|
361
|
+
|
|
318
362
|
/** hints for input */
|
|
319
363
|
placeholder: PropTypes.string,
|
|
364
|
+
|
|
320
365
|
/** error for input */
|
|
321
366
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
367
|
+
|
|
322
368
|
/** prevent all event if true, hide all icon */
|
|
323
369
|
disabled: PropTypes.bool,
|
|
370
|
+
|
|
324
371
|
/** hidden ensign icon if true */
|
|
325
372
|
hiddenEnsign: PropTypes.bool,
|
|
373
|
+
|
|
326
374
|
/** prevent all event if true */
|
|
327
375
|
readOnly: PropTypes.bool,
|
|
376
|
+
|
|
328
377
|
/** auto focus after first render */
|
|
329
378
|
autoFocus: PropTypes.bool,
|
|
379
|
+
|
|
330
380
|
/** At least one character is required */
|
|
331
381
|
required: PropTypes.bool,
|
|
382
|
+
|
|
332
383
|
/** props of input in PhoneInput component */
|
|
333
384
|
inputProps: PropTypes.object,
|
|
385
|
+
|
|
334
386
|
/** style inline of input in PhoneInput component */
|
|
335
387
|
inputStyle: PropTypes.object,
|
|
388
|
+
|
|
336
389
|
/** The function to get ref of Dropdown component */
|
|
337
390
|
refs: PropTypes.func,
|
|
391
|
+
|
|
338
392
|
/** on key down function */
|
|
339
393
|
onKeyDown: PropTypes.func,
|
|
394
|
+
|
|
340
395
|
/** on key up function */
|
|
341
396
|
onKeyUp: PropTypes.func,
|
|
397
|
+
|
|
342
398
|
/** on input function */
|
|
343
399
|
onInput: PropTypes.func,
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
* value:
|
|
349
|
-
*
|
|
350
|
-
*
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* on change function. Return a object, example:<br/>
|
|
403
|
+
* {<br/>
|
|
404
|
+
* target: {value: "(+84) 123 456 789", ...}<br/>
|
|
405
|
+
* value: 0123456789<br/>
|
|
406
|
+
* countryCode: 84<br/>
|
|
407
|
+
* }
|
|
351
408
|
*/
|
|
352
409
|
onChange: PropTypes.func,
|
|
410
|
+
|
|
353
411
|
/** on blur function */
|
|
354
412
|
onBlur: PropTypes.func,
|
|
413
|
+
|
|
355
414
|
/** on focus function */
|
|
356
415
|
onFocus: PropTypes.func,
|
|
416
|
+
|
|
357
417
|
/** inputRef of PhoneInput component */
|
|
358
418
|
inputRef: PropTypes.any,
|
|
419
|
+
|
|
359
420
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/form-control-text-label) of label. */
|
|
360
421
|
labelProps: PropTypes.object,
|
|
422
|
+
|
|
361
423
|
/** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-text-helpertext) of helper text. */
|
|
362
424
|
helperTextProps: PropTypes.object
|
|
363
425
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { css, jsx } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -44,26 +45,30 @@ const Radio = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
44
45
|
if (!inputRef) {
|
|
45
46
|
inputRef = useRef(null);
|
|
46
47
|
}
|
|
48
|
+
|
|
47
49
|
const [unique] = useState(randomString(10, {
|
|
48
50
|
allowNumber: false,
|
|
49
51
|
allowSymbol: false
|
|
50
52
|
}));
|
|
51
53
|
const [checkedState, setCheckedState] = useState(Boolean(checked !== undefined ? checked : defaultChecked));
|
|
54
|
+
|
|
52
55
|
const _formCheckInputCSS = formCheckInputCSS(width);
|
|
56
|
+
|
|
53
57
|
const _formCheckLabelCSS = formCheckLabelCSS(width);
|
|
58
|
+
|
|
54
59
|
const handleChange = e => {
|
|
55
60
|
if (disabled || readOnly) return;
|
|
56
61
|
if (checked === undefined) setCheckedState(true);
|
|
57
62
|
e = {
|
|
58
63
|
value: value,
|
|
59
|
-
target: {
|
|
60
|
-
...inputRef.current,
|
|
64
|
+
target: { ...inputRef.current,
|
|
61
65
|
checked: true,
|
|
62
66
|
value: value
|
|
63
67
|
}
|
|
64
68
|
};
|
|
65
69
|
if (onChange) onChange(e);
|
|
66
70
|
};
|
|
71
|
+
|
|
67
72
|
useEffect(() => {
|
|
68
73
|
if (checked !== undefined) setCheckedState(Boolean(checked));
|
|
69
74
|
}, [checked]);
|
|
@@ -74,8 +79,7 @@ const Radio = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
74
79
|
className: ['DGN-UI-Radio', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
75
80
|
ref: ref,
|
|
76
81
|
...props
|
|
77
|
-
}, jsx("input", {
|
|
78
|
-
...inputProps,
|
|
82
|
+
}, jsx("input", { ...inputProps,
|
|
79
83
|
disabled: disabled,
|
|
80
84
|
ref: inputRef,
|
|
81
85
|
name: name,
|
|
@@ -105,6 +109,7 @@ const formCheckCSS = css`
|
|
|
105
109
|
${displayBlock};
|
|
106
110
|
padding: ${spacing(0.5)}px;
|
|
107
111
|
`;
|
|
112
|
+
|
|
108
113
|
const formCheckInputCSS = width => css`
|
|
109
114
|
${positionAbsolute};
|
|
110
115
|
${boxBorder};
|
|
@@ -126,6 +131,7 @@ const formCheckInputCSS = width => css`
|
|
|
126
131
|
border-color: ${clSystemActive};
|
|
127
132
|
}
|
|
128
133
|
`;
|
|
134
|
+
|
|
129
135
|
const formCheckLabelCSS = width => css`
|
|
130
136
|
${displayBlock};
|
|
131
137
|
${positionRelative};
|
|
@@ -164,6 +170,7 @@ const formCheckLabelCSS = width => css`
|
|
|
164
170
|
transition: 0.28s ease;
|
|
165
171
|
}
|
|
166
172
|
`;
|
|
173
|
+
|
|
167
174
|
Radio.defaultProps = {
|
|
168
175
|
disabled: false,
|
|
169
176
|
readOnly: false,
|
|
@@ -175,33 +182,45 @@ Radio.defaultProps = {
|
|
|
175
182
|
Radio.propTypes = {
|
|
176
183
|
/** If `true`, the component is disabled. */
|
|
177
184
|
disabled: PropTypes.bool,
|
|
185
|
+
|
|
178
186
|
/** If `true`, the component is checked. */
|
|
179
187
|
checked: PropTypes.bool,
|
|
188
|
+
|
|
180
189
|
/** If `true`, the component is defaultChecked. */
|
|
181
190
|
defaultChecked: PropTypes.bool,
|
|
191
|
+
|
|
182
192
|
/** Id is randomized randomly to avoid duplication. */
|
|
183
193
|
id: PropTypes.string,
|
|
194
|
+
|
|
184
195
|
/** The id of the `input` element. */
|
|
185
196
|
name: PropTypes.string,
|
|
197
|
+
|
|
186
198
|
/** The value of the component. The DOM API casts this to a string. */
|
|
187
199
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
200
|
+
|
|
188
201
|
/** The name of the Radio is displayed on the interface */
|
|
189
202
|
label: PropTypes.string,
|
|
203
|
+
|
|
190
204
|
/** The class for Radio component */
|
|
191
205
|
className: PropTypes.string,
|
|
206
|
+
|
|
192
207
|
/** Props for input. */
|
|
193
208
|
inputProps: PropTypes.object,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* You can pull out the new
|
|
209
|
+
|
|
210
|
+
/** Callback fired when the state is changed.
|
|
211
|
+
*
|
|
212
|
+
* @param {object} event The event source of the callback.
|
|
213
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
214
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
199
215
|
* */
|
|
200
216
|
onChange: PropTypes.func,
|
|
217
|
+
|
|
201
218
|
/** Prevent all event if true. */
|
|
202
219
|
readOnly: PropTypes.bool,
|
|
220
|
+
|
|
203
221
|
/** Props for Typography of label. */
|
|
204
222
|
labelProps: PropTypes.object,
|
|
223
|
+
|
|
205
224
|
/** If `true`, the label will indicate that the Radio is required. */
|
|
206
225
|
required: PropTypes.bool
|
|
207
226
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { css, jsx } from '@emotion/core';
|
|
4
5
|
import { HelperText, InputBase, Label } from "../..";
|
|
@@ -53,9 +54,11 @@ const TextInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
53
54
|
...props
|
|
54
55
|
}, reference) => {
|
|
55
56
|
const ref = useRef(null);
|
|
57
|
+
|
|
56
58
|
if (!inputRef) {
|
|
57
59
|
inputRef = useRef(null);
|
|
58
60
|
}
|
|
61
|
+
|
|
59
62
|
const [value, setValue] = useState(valueProp || defaultValue);
|
|
60
63
|
const isError = !!error;
|
|
61
64
|
useEffect(() => {
|
|
@@ -64,10 +67,11 @@ const TextInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
64
67
|
useImperativeHandle(reference, () => {
|
|
65
68
|
const currentRef = ref.current || {};
|
|
66
69
|
currentRef.element = ref.current;
|
|
67
|
-
const _instance = {
|
|
68
|
-
...action
|
|
70
|
+
const _instance = { ...action
|
|
69
71
|
}; // methods
|
|
72
|
+
|
|
70
73
|
_instance.__proto__ = {}; // hidden methods
|
|
74
|
+
|
|
71
75
|
currentRef.instance = _instance;
|
|
72
76
|
return currentRef;
|
|
73
77
|
});
|
|
@@ -113,12 +117,10 @@ const TextInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
113
117
|
value: valueProp,
|
|
114
118
|
hoverTooltip: hoverTooltip,
|
|
115
119
|
nonStyle: nonStyle
|
|
116
|
-
}), isError && jsx(HelperText, {
|
|
117
|
-
...helperTextProps,
|
|
120
|
+
}), isError && jsx(HelperText, { ...helperTextProps,
|
|
118
121
|
disabled: disabled,
|
|
119
122
|
status: status
|
|
120
|
-
}, error), !isError && validateResult && jsx(HelperText, {
|
|
121
|
-
...helperTextProps,
|
|
123
|
+
}, error), !isError && validateResult && jsx(HelperText, { ...helperTextProps,
|
|
122
124
|
disabled: disabled
|
|
123
125
|
}, validateResult));
|
|
124
126
|
}));
|
|
@@ -150,76 +152,110 @@ TextInput.defaultProps = {
|
|
|
150
152
|
TextInput.propTypes = {
|
|
151
153
|
/** This prop helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill). */
|
|
152
154
|
autoComplete: PropTypes.string,
|
|
155
|
+
|
|
153
156
|
/** If `true`, the input element is focused during the first mount. */
|
|
154
157
|
autoFocus: PropTypes.bool,
|
|
158
|
+
|
|
155
159
|
/** If `true`, the width of the component will automatically be set according to the contents inside the input, don't run with multiline = true */
|
|
156
160
|
autoWidth: PropTypes.bool,
|
|
161
|
+
|
|
157
162
|
/** Class for component. */
|
|
158
163
|
className: PropTypes.string,
|
|
164
|
+
|
|
159
165
|
/** The default value. Use when the component is not controlled. */
|
|
160
166
|
defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
167
|
+
|
|
161
168
|
/** If `true`, the component is disabled.*/
|
|
162
169
|
disabled: PropTypes.bool,
|
|
170
|
+
|
|
163
171
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed to the right of input. */
|
|
164
172
|
endIcon: PropTypes.any,
|
|
173
|
+
|
|
165
174
|
/** Props of end icon in InputBase component. */
|
|
166
175
|
endIconProps: PropTypes.object,
|
|
176
|
+
|
|
167
177
|
/** Error displayed below input. */
|
|
168
178
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
179
|
+
|
|
169
180
|
/** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-text-helpertext) of helper text. */
|
|
170
181
|
helperTextProps: PropTypes.object,
|
|
182
|
+
|
|
171
183
|
/** [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes) applied to the input element. */
|
|
172
184
|
inputProps: PropTypes.object,
|
|
185
|
+
|
|
173
186
|
/** Pass a ref to the input element. */
|
|
174
187
|
inputRef: ref,
|
|
188
|
+
|
|
175
189
|
/** Style inline of input element. */
|
|
176
190
|
inputStyle: PropTypes.object,
|
|
191
|
+
|
|
177
192
|
/** The label of the component. */
|
|
178
193
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
194
|
+
|
|
179
195
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/form-control-text-label--simple) of label. */
|
|
180
196
|
labelProps: PropTypes.object,
|
|
197
|
+
|
|
181
198
|
/** Maximum number of rows to display when multiline option is set to true. */
|
|
182
199
|
maxRows: PropTypes.number,
|
|
200
|
+
|
|
183
201
|
/** If `true`, a textarea element is rendered. */
|
|
184
202
|
multiline: PropTypes.bool,
|
|
203
|
+
|
|
185
204
|
/** Callback fired when the input is blurred. */
|
|
186
205
|
onBlur: PropTypes.func,
|
|
206
|
+
|
|
187
207
|
/** Callback fired when the value is changed. */
|
|
188
208
|
onChange: PropTypes.func,
|
|
209
|
+
|
|
189
210
|
/** Callback fired when the input is focused. */
|
|
190
211
|
onFocus: PropTypes.func,
|
|
212
|
+
|
|
191
213
|
/** Callback fired when input. */
|
|
192
214
|
onInput: PropTypes.func,
|
|
215
|
+
|
|
193
216
|
/** Callback fired when pressing a key. */
|
|
194
217
|
onKeyDown: PropTypes.func,
|
|
218
|
+
|
|
195
219
|
/** Callback fired when releases a key. */
|
|
196
220
|
onKeyUp: PropTypes.func,
|
|
221
|
+
|
|
197
222
|
/** The short hint displayed in the input before the user enters a value. */
|
|
198
223
|
placeholder: PropTypes.string,
|
|
224
|
+
|
|
199
225
|
/** If `true`, the component is readOnly. */
|
|
200
226
|
readOnly: PropTypes.bool,
|
|
227
|
+
|
|
201
228
|
/** If `true`, the input element is required. */
|
|
202
229
|
required: PropTypes.bool,
|
|
230
|
+
|
|
203
231
|
/** Number of rows to display when multiline option is set to true. */
|
|
204
232
|
rows: PropTypes.number,
|
|
233
|
+
|
|
205
234
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed to the left of input. */
|
|
206
235
|
startIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
236
|
+
|
|
207
237
|
/** Props of start icon in InputBase component. */
|
|
208
238
|
startIconProps: PropTypes.object,
|
|
239
|
+
|
|
209
240
|
/** Status type to display color for input. */
|
|
210
241
|
status: PropTypes.oneOf(['default', 'warning', 'success', 'danger']),
|
|
242
|
+
|
|
211
243
|
/** Style inline of component. */
|
|
212
244
|
style: PropTypes.object,
|
|
245
|
+
|
|
213
246
|
/** Type of the input element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types). */
|
|
214
247
|
type: PropTypes.oneOf(['inform', 'edit', 'text', 'number', 'password']),
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* *
|
|
218
|
-
* *
|
|
248
|
+
|
|
249
|
+
/** Validation value, argument can:<br/>
|
|
250
|
+
* * string: the validation rule. Example required.<br/>
|
|
251
|
+
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
252
|
+
* * array: the validation rule list, insist object/string
|
|
219
253
|
*/
|
|
220
254
|
validates: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array, PropTypes.func]),
|
|
255
|
+
|
|
221
256
|
/** The value of the input element, required for a controlled component. */
|
|
222
257
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
258
|
+
|
|
223
259
|
/** The variant to use. */
|
|
224
260
|
viewType: PropTypes.oneOf(['underlined', 'outlined', 'none'])
|
|
225
261
|
};
|