diginet-core-ui 1.3.88 → 1.3.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +4 -4
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +2 -6
- package/components/accordion/group.js +2 -9
- package/components/accordion/index.js +2 -15
- package/components/accordion/summary.js +4 -27
- package/components/alert/index.js +2 -33
- package/components/alert/notify.js +12 -22
- package/components/avatar/index.js +22 -81
- package/components/badge/index.js +20 -45
- package/components/button/icon.js +25 -56
- package/components/button/index.js +16 -65
- package/components/button/more.js +15 -35
- package/components/button/ripple-effect.js +0 -10
- package/components/card/body.js +2 -7
- package/components/card/extra.js +2 -7
- package/components/card/footer.js +2 -7
- package/components/card/header.js +2 -7
- package/components/card/index.js +2 -22
- package/components/chart/Pie/Circle.js +0 -1
- package/components/chart/Pie/Sector.js +2 -19
- package/components/chart/Pie/Sectors.js +0 -10
- package/components/chart/Pie/index.js +4 -36
- package/components/chart/Pie-v2/Circle.js +0 -1
- package/components/chart/Pie-v2/Sector.js +2 -15
- package/components/chart/Pie-v2/Sectors.js +0 -20
- package/components/chart/Pie-v2/index.js +11 -38
- package/components/chart/bar/Axis.js +0 -12
- package/components/chart/bar/Bar.js +13 -35
- package/components/chart/bar/Grid.js +0 -18
- package/components/chart/bar/Labels.js +4 -22
- package/components/chart/bar/Points.js +0 -17
- package/components/chart/bar/index.js +6 -26
- package/components/chart/bar-v2/Axis.js +0 -12
- package/components/chart/bar-v2/Bar.js +15 -36
- package/components/chart/bar-v2/Grid.js +0 -18
- package/components/chart/bar-v2/Labels.js +4 -22
- package/components/chart/bar-v2/Points.js +0 -17
- package/components/chart/bar-v2/index.js +6 -26
- package/components/chart/line/Axis.js +4 -16
- package/components/chart/line/Grid.js +2 -19
- package/components/chart/line/Labels.js +4 -22
- package/components/chart/line/Path.js +24 -34
- package/components/chart/line/Point.js +7 -41
- package/components/chart/line/Title.js +0 -3
- package/components/chart/line/index.js +12 -35
- package/components/chart/line-v2/Axis.js +0 -13
- package/components/chart/line-v2/Grid.js +0 -18
- package/components/chart/line-v2/Labels.js +4 -22
- package/components/chart/line-v2/Path.js +23 -33
- package/components/chart/line-v2/Point.js +6 -35
- package/components/chart/line-v2/Title.js +0 -3
- package/components/chart/line-v2/index.js +12 -30
- package/components/check-text/index.js +7 -15
- package/components/check-text/interview-confirmation.js +24 -31
- package/components/check-text/interview-status.js +24 -31
- package/components/chip/attach.js +9 -22
- package/components/chip/index.js +13 -38
- package/components/collapse/index.js +0 -13
- package/components/divider/index.js +2 -13
- package/components/form-control/attachment/index.js +41 -202
- package/components/form-control/calendar/function.js +154 -208
- package/components/form-control/calendar/index.js +21 -46
- package/components/form-control/calendar/range.js +11 -28
- package/components/form-control/checkbox/index.js +12 -46
- package/components/form-control/control/index.js +4 -14
- package/components/form-control/date-picker/index-old.js +18 -0
- package/components/form-control/date-picker/index.js +23 -99
- package/components/form-control/date-range-picker/index.js +44 -180
- package/components/form-control/dropdown/index.js +101 -314
- package/components/form-control/dropdown-box/index.js +7 -37
- package/components/form-control/form/index.js +0 -2
- package/components/form-control/form-group/index.js +1 -6
- package/components/form-control/helper-text/index.js +2 -9
- package/components/form-control/input-base/index.js +4 -68
- package/components/form-control/label/index.js +2 -12
- package/components/form-control/money-input/index.js +54 -143
- package/components/form-control/number-input/index.js +26 -124
- package/components/form-control/number-input/index2.js +95 -134
- package/components/form-control/phone-input/index.js +23 -85
- package/components/form-control/radio/index.js +16 -35
- package/components/form-control/text-input/index.js +10 -46
- package/components/form-control/time-picker/index.js +43 -100
- package/components/form-control/time-picker/swiper.js +21 -73
- package/components/form-control/toggle/index.js +26 -40
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +0 -14
- package/components/form-view/input.js +2 -13
- package/components/form-view/label.js +0 -2
- package/components/grid/Col.js +2 -16
- package/components/grid/Container.js +2 -21
- package/components/grid/Row.js +2 -21
- package/components/grid/index.js +2 -44
- package/components/image/index.js +2 -22
- package/components/index.js +62 -31
- package/components/list/list-item-action.js +12 -21
- package/components/list/list-item-icon.js +10 -19
- package/components/list/list-item-text.js +0 -5
- package/components/list/list-item.js +27 -38
- package/components/list/list.js +37 -50
- package/components/list/sub-header.js +13 -17
- package/components/modal/body.js +2 -6
- package/components/modal/footer.js +2 -11
- package/components/modal/header.js +2 -12
- package/components/modal/index.js +2 -10
- package/components/modal/modal.js +11 -52
- package/components/others/extra/index.js +3 -10
- package/components/others/import/index.js +0 -7
- package/components/others/option-wrapper/index.js +4 -7
- package/components/others/scrollbar/index.js +0 -3
- package/components/paging/page-info.js +35 -99
- package/components/paging/page-selector.js +10 -38
- package/components/paging/page-selector2.js +35 -74
- package/components/paper/index.js +23 -34
- package/components/popover/body.js +2 -6
- package/components/popover/footer.js +2 -11
- package/components/popover/header.js +2 -7
- package/components/popover/index.js +54 -146
- package/components/popup/danger_popup.js +0 -19
- package/components/popup/index.js +4 -50
- package/components/popup/proposals_popup.js +11 -50
- package/components/popup/v2/index.js +13 -47
- package/components/progress/circular.js +10 -48
- package/components/progress/linear.js +58 -74
- package/components/rating/index.js +10 -35
- package/components/slider/slider-container.js +4 -41
- package/components/slider/slider-item.js +10 -25
- package/components/status/index.js +2 -14
- package/components/tab/tab-container.js +4 -18
- package/components/tab/tab-header.js +4 -24
- package/components/tab/tab-panel.js +4 -16
- package/components/tab/tab.js +8 -33
- package/components/tooltip/index.js +12 -97
- package/components/tooltip/portal.js +0 -2
- package/components/transfer/index.js +28 -73
- package/components/tree-view/index.js +62 -202
- package/components/typography/index.js +14 -42
- package/global/index.js +0 -8
- package/icons/basic.js +0 -48
- package/icons/effect.js +15 -32
- package/icons/general/clock/clock.js +0 -2
- package/icons/general/color-handler/background.js +0 -2
- package/icons/general/color-handler/text.js +0 -2
- package/icons/general/emoji/emoji.js +0 -2
- package/icons/general/font-properties/bold.js +0 -2
- package/icons/general/font-properties/font-family.js +0 -2
- package/icons/general/font-properties/font-size.js +0 -2
- package/icons/general/font-properties/italic.js +0 -2
- package/icons/general/font-properties/underline.js +0 -2
- package/icons/general/hyperlink/hyperlink.js +0 -2
- package/icons/general/indent/decrease.js +0 -2
- package/icons/general/indent/increase.js +0 -2
- package/icons/general/list/bullets.js +0 -2
- package/icons/general/list/numbering.js +0 -2
- package/icons/general/picture/picture.js +0 -2
- package/icons/general/steps/redo.js +0 -2
- package/icons/general/steps/undo.js +0 -2
- package/icons/general/text-align/center.js +0 -2
- package/icons/general/text-align/justify.js +0 -2
- package/icons/general/text-align/left.js +0 -2
- package/icons/general/text-align/right.js +0 -2
- package/icons/menu/dhr.js +2 -1
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +2 -15
- package/package.json +42 -42
- package/readme.md +1034 -1027
- package/styles/animation.js +15 -58
- package/styles/color-helper.js +127 -157
- package/styles/colors.js +17 -9
- package/styles/general.js +16 -57
- package/styles/typography.js +4 -4
- package/styles/utils.js +18 -18
- package/theme/createBreakpoints.js +7 -18
- package/theme/make-styles.js +2 -5
- package/theme/set-theme.js +6 -9
- package/theme/settings.js +17 -22
- package/theme/theme-provider.js +0 -1
- package/utils/array/array.js +45 -54
- package/utils/classNames/index.js +0 -5
- package/utils/console.js +0 -6
- package/utils/date.js +69 -138
- package/utils/error/error.js +3 -11
- package/utils/error/errors.js +100 -147
- package/utils/getFileType.js +0 -9
- package/utils/handleBreakpoints.js +0 -5
- package/utils/intersectionObserver.js +0 -5
- package/utils/iterator.js +0 -9
- package/utils/map-parent.js +3 -10
- package/utils/object/extend.js +0 -10
- package/utils/object/object.js +12 -11
- package/utils/parseHTML.js +0 -1
- package/utils/promisify.js +0 -5
- package/utils/randomString.js +0 -7
- package/utils/remove-unicode.js +0 -1
- package/utils/render-portal.js +1 -9
- package/utils/renderHTML.js +4 -6
- package/utils/renderIcon.js +9 -19
- package/utils/sb-template.js +6 -5
- package/utils/string/capitalize.js +0 -1
- package/utils/string/capitalizeSentenceCase.js +0 -2
- package/utils/string/string.js +0 -13
- package/utils/type.js +0 -21
- package/utils/updatePosition.js +4 -5
- package/utils/useDelayUnmount.js +0 -4
- package/utils/useElementSize.js +9 -3
- package/utils/useEventListener.js +12 -6
- package/utils/useInput.js +0 -6
- package/utils/useMediaQuery/index.js +8 -10
- package/utils/useOnClickOutside.js +2 -4
- package/utils/usePortal.js +12 -19
- package/utils/validate.js +39 -53
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useEffect, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -47,13 +46,11 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
47
46
|
...props
|
|
48
47
|
}, reference) => {
|
|
49
48
|
const ref = useRef(null);
|
|
50
|
-
|
|
51
49
|
if (!inputRef) {
|
|
52
50
|
inputRef = useRef(null);
|
|
53
51
|
}
|
|
54
|
-
/* Start styled */
|
|
55
|
-
|
|
56
52
|
|
|
53
|
+
/* Start styled */
|
|
57
54
|
const PhoneInputRoot = css`
|
|
58
55
|
display: block;
|
|
59
56
|
position: relative;
|
|
@@ -70,167 +67,133 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
70
67
|
/* End styled */
|
|
71
68
|
|
|
72
69
|
let currentKey,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/* Start handler */
|
|
70
|
+
isUnicode = 0,
|
|
71
|
+
isFocus = false,
|
|
72
|
+
isPaste = false,
|
|
73
|
+
clipboardText = '';
|
|
78
74
|
|
|
75
|
+
/* Start handler */
|
|
79
76
|
const replaceMark = value => {
|
|
80
77
|
let result = ensigns[ensign].mark;
|
|
81
|
-
|
|
82
78
|
if (value) {
|
|
83
79
|
value = value.replaceAll(' ', '').replace(/_+$/, '');
|
|
84
80
|
const length = value.length;
|
|
85
|
-
|
|
86
81
|
if (length) {
|
|
87
82
|
for (let i = 0; i < length; i++) {
|
|
88
83
|
result = result.replace('_', value[i]);
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
86
|
}
|
|
92
|
-
|
|
93
87
|
return result;
|
|
94
88
|
};
|
|
95
|
-
|
|
96
89
|
const onFocusHandler = e => {
|
|
97
90
|
document.addEventListener('mouseup', onMouseUpHandler);
|
|
98
91
|
isFocus = true;
|
|
99
92
|
!!onFocus && onFocus(e);
|
|
100
93
|
};
|
|
101
|
-
|
|
102
94
|
const onMouseUpHandler = () => {
|
|
103
|
-
const text = window.getSelection().toString();
|
|
104
|
-
|
|
95
|
+
const text = window.getSelection().toString();
|
|
96
|
+
// Start focus and don't selection any text
|
|
105
97
|
if (!text) {
|
|
106
98
|
const value = inputRef.current.value;
|
|
107
99
|
const markFirstIndex = value.indexOf('_');
|
|
108
100
|
let cursor = inputRef.current.selectionStart;
|
|
109
|
-
|
|
110
101
|
if (isFocus) {
|
|
111
102
|
isFocus = false;
|
|
112
|
-
|
|
113
103
|
if (markFirstIndex !== -1) {
|
|
114
104
|
inputRef.current.setSelectionRange(markFirstIndex, markFirstIndex);
|
|
115
105
|
}
|
|
116
|
-
|
|
117
106
|
return;
|
|
118
107
|
}
|
|
119
|
-
|
|
120
108
|
if (value[cursor] === ' ') {
|
|
121
109
|
inputRef.current.setSelectionRange(cursor + 1, cursor + 1);
|
|
122
110
|
return;
|
|
123
111
|
}
|
|
124
|
-
|
|
125
112
|
if (markFirstIndex !== -1 && markFirstIndex < cursor) {
|
|
126
113
|
inputRef.current.setSelectionRange(markFirstIndex, markFirstIndex);
|
|
127
114
|
}
|
|
128
115
|
}
|
|
129
116
|
};
|
|
130
|
-
|
|
131
117
|
const onBlurHandler = e => {
|
|
132
118
|
document.removeEventListener('mouseup', onMouseUpHandler);
|
|
133
119
|
!!onBlur && onBlur(e);
|
|
134
120
|
};
|
|
135
|
-
|
|
136
121
|
const onKeyDownHandler = e => {
|
|
137
122
|
const key = e.key;
|
|
138
123
|
const keyCode = e.keyCode;
|
|
139
|
-
|
|
140
124
|
if (/Arrow|Home|End/.test(key) || /a|x|c|v/i.test(key) && e.ctrlKey) {
|
|
141
125
|
return;
|
|
142
126
|
}
|
|
143
|
-
|
|
144
127
|
if (keyCode === 231) {
|
|
145
128
|
isUnicode = isUnicode > 0 ? 0 : 1;
|
|
146
129
|
e.preventDefault();
|
|
147
130
|
return false;
|
|
148
131
|
}
|
|
149
|
-
|
|
150
132
|
if (keyCode === 8 && /^[12]$/.test(isUnicode)) {
|
|
151
133
|
isUnicode++;
|
|
152
134
|
e.preventDefault();
|
|
153
135
|
return false;
|
|
154
136
|
}
|
|
155
|
-
|
|
156
137
|
if (!/[0-9]|Backspace|Delete/.test(key)) {
|
|
157
138
|
isUnicode = -1;
|
|
158
139
|
currentKey = key;
|
|
159
140
|
e.preventDefault();
|
|
160
141
|
return false;
|
|
161
142
|
}
|
|
162
|
-
|
|
163
143
|
const {
|
|
164
144
|
value,
|
|
165
145
|
selectionStart: cursor
|
|
166
146
|
} = inputRef.current;
|
|
167
|
-
|
|
168
147
|
if (key === 'ArrowRight') {
|
|
169
148
|
if (value[cursor] === '_') {
|
|
170
149
|
e.preventDefault();
|
|
171
150
|
return false;
|
|
172
151
|
}
|
|
173
|
-
|
|
174
152
|
if (!value[cursor + 1].trim()) {
|
|
175
153
|
inputRef.current.setSelectionRange(cursor + 1, cursor + 1);
|
|
176
154
|
}
|
|
177
155
|
}
|
|
178
|
-
|
|
179
156
|
if (/[0-9]/.test(key) && !value[cursor]) {
|
|
180
157
|
e.preventDefault();
|
|
181
158
|
return false;
|
|
182
159
|
}
|
|
183
|
-
|
|
184
160
|
isUnicode = 0;
|
|
185
161
|
currentKey = key;
|
|
186
162
|
!!onKeyDown && onKeyDown(e);
|
|
187
163
|
};
|
|
188
|
-
|
|
189
164
|
const onPasteHandler = e => {
|
|
190
165
|
clipboardText = (e.clipboardData || window.clipboardData).getData('text');
|
|
191
|
-
|
|
192
166
|
if (!/\d+/.test(clipboardText)) {
|
|
193
167
|
e.preventDefault();
|
|
194
168
|
return;
|
|
195
169
|
}
|
|
196
|
-
|
|
197
170
|
isPaste = true;
|
|
198
171
|
};
|
|
199
|
-
|
|
200
172
|
const onChangeHandler = e => {
|
|
201
173
|
let value = e.target.value;
|
|
202
174
|
let cursor = e.target.selectionStart;
|
|
203
|
-
|
|
204
175
|
if (isPaste) {
|
|
205
176
|
isPaste = false;
|
|
206
177
|
value = value.replace(/\s/g, '');
|
|
207
178
|
const index = value.indexOf(clipboardText);
|
|
208
|
-
|
|
209
179
|
if (!index && value[0] === '0') {
|
|
210
180
|
value = value.slice(1);
|
|
211
181
|
}
|
|
212
|
-
|
|
213
182
|
const cursorOnPaste = index + clipboardText.length;
|
|
214
183
|
const mark = ensigns[ensign].mark;
|
|
215
184
|
const lengthOfMark = mark.length;
|
|
216
|
-
|
|
217
185
|
if (cursorOnPaste < lengthOfMark) {
|
|
218
186
|
let newCursor = cursorOnPaste;
|
|
219
|
-
|
|
220
187
|
while (mark.slice(0, newCursor).match(/_/g).length < cursorOnPaste && newCursor < lengthOfMark) {
|
|
221
188
|
newCursor++;
|
|
222
189
|
}
|
|
223
|
-
|
|
224
190
|
if (!mark[newCursor].trim()) {
|
|
225
191
|
newCursor++;
|
|
226
192
|
}
|
|
227
|
-
|
|
228
193
|
cursor = newCursor;
|
|
229
194
|
}
|
|
230
195
|
}
|
|
231
|
-
|
|
232
196
|
const result = replaceMark(value);
|
|
233
|
-
|
|
234
197
|
if (/\d/.test(currentKey)) {
|
|
235
198
|
if (result[cursor] && (!result[cursor].trim() || !result[cursor - 1].trim())) {
|
|
236
199
|
cursor++;
|
|
@@ -240,14 +203,14 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
240
203
|
cursor--;
|
|
241
204
|
}
|
|
242
205
|
}
|
|
243
|
-
|
|
244
206
|
e.target.value = result;
|
|
245
207
|
e.target.setSelectionRange(cursor, cursor);
|
|
246
|
-
|
|
247
208
|
if (onChange) {
|
|
248
|
-
const el = {
|
|
209
|
+
const el = {
|
|
210
|
+
...e
|
|
249
211
|
};
|
|
250
|
-
el.target = {
|
|
212
|
+
el.target = {
|
|
213
|
+
...e.targe
|
|
251
214
|
};
|
|
252
215
|
el.target.value = '(+' + ensigns[ensign].countryCode + ') ' + result.replaceAll('_', '');
|
|
253
216
|
el.value = '0' + result.replace(/\s|_/g, '');
|
|
@@ -255,14 +218,11 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
255
218
|
onChange(el);
|
|
256
219
|
}
|
|
257
220
|
};
|
|
258
|
-
|
|
259
221
|
useEffect(() => {
|
|
260
222
|
!!refs && refs(ref);
|
|
261
|
-
|
|
262
223
|
if (defaultValue !== undefined && defaultValue !== '') {
|
|
263
224
|
inputRef.current.value = replaceMark(defaultValue.replace(/^0/, ''));
|
|
264
225
|
}
|
|
265
|
-
|
|
266
226
|
if (autoFocus) {
|
|
267
227
|
inputRef.current.focus();
|
|
268
228
|
const value = inputRef.current.value;
|
|
@@ -270,7 +230,6 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
270
230
|
markIndex = markIndex !== -1 ? markIndex : ensigns[ensign].mark.length;
|
|
271
231
|
inputRef.current.setSelectionRange(markIndex, markIndex);
|
|
272
232
|
}
|
|
273
|
-
|
|
274
233
|
return () => {
|
|
275
234
|
document.removeEventListener('mouseup', onMouseUpHandler);
|
|
276
235
|
};
|
|
@@ -297,7 +256,8 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
297
256
|
marginBottom: '20px'
|
|
298
257
|
},
|
|
299
258
|
...props
|
|
300
|
-
}, jsx(Label, {
|
|
259
|
+
}, jsx(Label, {
|
|
260
|
+
...labelProps,
|
|
301
261
|
required: required,
|
|
302
262
|
disabled: disabled
|
|
303
263
|
}, label), jsx(InputBase, {
|
|
@@ -325,7 +285,8 @@ const PhoneInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
325
285
|
startIconProps: {
|
|
326
286
|
className: 'non-effect'
|
|
327
287
|
}
|
|
328
|
-
}), !!error && jsx(HelperText, {
|
|
288
|
+
}), !!error && jsx(HelperText, {
|
|
289
|
+
...helperTextProps,
|
|
329
290
|
disabled: disabled
|
|
330
291
|
}, error));
|
|
331
292
|
}));
|
|
@@ -346,80 +307,57 @@ PhoneInput.defaultProps = {
|
|
|
346
307
|
PhoneInput.propTypes = {
|
|
347
308
|
/** the type of border you want to display */
|
|
348
309
|
viewType: PropTypes.oneOf(['underlined', 'outlined']),
|
|
349
|
-
|
|
350
310
|
/** the ensign to determinate */
|
|
351
311
|
ensign: PropTypes.oneOf(['Vietnam', 'England']),
|
|
352
|
-
|
|
353
312
|
/** label for input */
|
|
354
313
|
label: PropTypes.string,
|
|
355
|
-
|
|
356
314
|
/** default value is displayed for first render */
|
|
357
315
|
defaultValue: PropTypes.string,
|
|
358
|
-
|
|
359
316
|
/** the displayed value for each change */
|
|
360
317
|
value: PropTypes.string,
|
|
361
|
-
|
|
362
318
|
/** hints for input */
|
|
363
319
|
placeholder: PropTypes.string,
|
|
364
|
-
|
|
365
320
|
/** error for input */
|
|
366
321
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
367
|
-
|
|
368
322
|
/** prevent all event if true, hide all icon */
|
|
369
323
|
disabled: PropTypes.bool,
|
|
370
|
-
|
|
371
324
|
/** hidden ensign icon if true */
|
|
372
325
|
hiddenEnsign: PropTypes.bool,
|
|
373
|
-
|
|
374
326
|
/** prevent all event if true */
|
|
375
327
|
readOnly: PropTypes.bool,
|
|
376
|
-
|
|
377
328
|
/** auto focus after first render */
|
|
378
329
|
autoFocus: PropTypes.bool,
|
|
379
|
-
|
|
380
330
|
/** At least one character is required */
|
|
381
331
|
required: PropTypes.bool,
|
|
382
|
-
|
|
383
332
|
/** props of input in PhoneInput component */
|
|
384
333
|
inputProps: PropTypes.object,
|
|
385
|
-
|
|
386
334
|
/** style inline of input in PhoneInput component */
|
|
387
335
|
inputStyle: PropTypes.object,
|
|
388
|
-
|
|
389
336
|
/** The function to get ref of Dropdown component */
|
|
390
337
|
refs: PropTypes.func,
|
|
391
|
-
|
|
392
338
|
/** on key down function */
|
|
393
339
|
onKeyDown: PropTypes.func,
|
|
394
|
-
|
|
395
340
|
/** on key up function */
|
|
396
341
|
onKeyUp: PropTypes.func,
|
|
397
|
-
|
|
398
342
|
/** on input function */
|
|
399
343
|
onInput: PropTypes.func,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
*
|
|
403
|
-
* {<br/>
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
* }
|
|
344
|
+
/**
|
|
345
|
+
* on change function. Return a object, example:<br/>
|
|
346
|
+
* {<br/>
|
|
347
|
+
* target: {value: "(+84) 123 456 789", ...}<br/>
|
|
348
|
+
* value: 0123456789<br/>
|
|
349
|
+
* countryCode: 84<br/>
|
|
350
|
+
* }
|
|
408
351
|
*/
|
|
409
352
|
onChange: PropTypes.func,
|
|
410
|
-
|
|
411
353
|
/** on blur function */
|
|
412
354
|
onBlur: PropTypes.func,
|
|
413
|
-
|
|
414
355
|
/** on focus function */
|
|
415
356
|
onFocus: PropTypes.func,
|
|
416
|
-
|
|
417
357
|
/** inputRef of PhoneInput component */
|
|
418
358
|
inputRef: PropTypes.any,
|
|
419
|
-
|
|
420
359
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/form-control-text-label) of label. */
|
|
421
360
|
labelProps: PropTypes.object,
|
|
422
|
-
|
|
423
361
|
/** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-text-helpertext) of helper text. */
|
|
424
362
|
helperTextProps: PropTypes.object
|
|
425
363
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -16,9 +15,9 @@ const {
|
|
|
16
15
|
},
|
|
17
16
|
system: {
|
|
18
17
|
active: clSystemActive,
|
|
19
|
-
rest: clSystemRest
|
|
18
|
+
rest: clSystemRest,
|
|
19
|
+
disabled: systemDisabled
|
|
20
20
|
},
|
|
21
|
-
disabled: clDisabled,
|
|
22
21
|
semantic: {
|
|
23
22
|
danger: clDanger
|
|
24
23
|
}
|
|
@@ -45,30 +44,26 @@ const Radio = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
45
44
|
if (!inputRef) {
|
|
46
45
|
inputRef = useRef(null);
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
const [unique] = useState(randomString(10, {
|
|
50
48
|
allowNumber: false,
|
|
51
49
|
allowSymbol: false
|
|
52
50
|
}));
|
|
53
51
|
const [checkedState, setCheckedState] = useState(Boolean(checked !== undefined ? checked : defaultChecked));
|
|
54
|
-
|
|
55
52
|
const _formCheckInputCSS = formCheckInputCSS(width);
|
|
56
|
-
|
|
57
53
|
const _formCheckLabelCSS = formCheckLabelCSS(width);
|
|
58
|
-
|
|
59
54
|
const handleChange = e => {
|
|
60
55
|
if (disabled || readOnly) return;
|
|
61
56
|
if (checked === undefined) setCheckedState(true);
|
|
62
57
|
e = {
|
|
63
58
|
value: value,
|
|
64
|
-
target: {
|
|
59
|
+
target: {
|
|
60
|
+
...inputRef.current,
|
|
65
61
|
checked: true,
|
|
66
62
|
value: value
|
|
67
63
|
}
|
|
68
64
|
};
|
|
69
65
|
if (onChange) onChange(e);
|
|
70
66
|
};
|
|
71
|
-
|
|
72
67
|
useEffect(() => {
|
|
73
68
|
if (checked !== undefined) setCheckedState(Boolean(checked));
|
|
74
69
|
}, [checked]);
|
|
@@ -79,7 +74,8 @@ const Radio = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
79
74
|
className: ['DGN-UI-Radio', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
80
75
|
ref: ref,
|
|
81
76
|
...props
|
|
82
|
-
}, jsx("input", {
|
|
77
|
+
}, jsx("input", {
|
|
78
|
+
...inputProps,
|
|
83
79
|
disabled: disabled,
|
|
84
80
|
ref: inputRef,
|
|
85
81
|
name: name,
|
|
@@ -95,12 +91,12 @@ const Radio = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
95
91
|
htmlFor: id || unique,
|
|
96
92
|
onClick: handleChange
|
|
97
93
|
}, jsx(Typography, {
|
|
98
|
-
color: disabled ?
|
|
94
|
+
color: disabled ? systemDisabled : '',
|
|
99
95
|
type: 'p1',
|
|
100
96
|
...labelProps
|
|
101
97
|
}, jsx(Fragment, null, label !== null && label !== void 0 ? label : value, required && jsx("span", {
|
|
102
98
|
style: {
|
|
103
|
-
color: disabled ?
|
|
99
|
+
color: disabled ? systemDisabled : clDanger
|
|
104
100
|
}
|
|
105
101
|
}, "*")))));
|
|
106
102
|
}, [disabled, onChange, readOnly, checkedState]);
|
|
@@ -109,7 +105,6 @@ const formCheckCSS = css`
|
|
|
109
105
|
${displayBlock};
|
|
110
106
|
padding: ${spacing(0.5)}px;
|
|
111
107
|
`;
|
|
112
|
-
|
|
113
108
|
const formCheckInputCSS = width => css`
|
|
114
109
|
${positionAbsolute};
|
|
115
110
|
${boxBorder};
|
|
@@ -131,7 +126,6 @@ const formCheckInputCSS = width => css`
|
|
|
131
126
|
border-color: ${clSystemActive};
|
|
132
127
|
}
|
|
133
128
|
`;
|
|
134
|
-
|
|
135
129
|
const formCheckLabelCSS = width => css`
|
|
136
130
|
${displayBlock};
|
|
137
131
|
${positionRelative};
|
|
@@ -148,12 +142,12 @@ const formCheckLabelCSS = width => css`
|
|
|
148
142
|
${cursorNoDrop};
|
|
149
143
|
}
|
|
150
144
|
&.disabled {
|
|
151
|
-
color: ${
|
|
145
|
+
color: ${systemDisabled};
|
|
152
146
|
&:after {
|
|
153
|
-
background: ${
|
|
147
|
+
background: ${systemDisabled} !important;
|
|
154
148
|
}
|
|
155
149
|
&:before {
|
|
156
|
-
border-color: ${
|
|
150
|
+
border-color: ${systemDisabled} !important;
|
|
157
151
|
}
|
|
158
152
|
}
|
|
159
153
|
&:before {
|
|
@@ -170,7 +164,6 @@ const formCheckLabelCSS = width => css`
|
|
|
170
164
|
transition: 0.28s ease;
|
|
171
165
|
}
|
|
172
166
|
`;
|
|
173
|
-
|
|
174
167
|
Radio.defaultProps = {
|
|
175
168
|
disabled: false,
|
|
176
169
|
readOnly: false,
|
|
@@ -182,45 +175,33 @@ Radio.defaultProps = {
|
|
|
182
175
|
Radio.propTypes = {
|
|
183
176
|
/** If `true`, the component is disabled. */
|
|
184
177
|
disabled: PropTypes.bool,
|
|
185
|
-
|
|
186
178
|
/** If `true`, the component is checked. */
|
|
187
179
|
checked: PropTypes.bool,
|
|
188
|
-
|
|
189
180
|
/** If `true`, the component is defaultChecked. */
|
|
190
181
|
defaultChecked: PropTypes.bool,
|
|
191
|
-
|
|
192
182
|
/** Id is randomized randomly to avoid duplication. */
|
|
193
183
|
id: PropTypes.string,
|
|
194
|
-
|
|
195
184
|
/** The id of the `input` element. */
|
|
196
185
|
name: PropTypes.string,
|
|
197
|
-
|
|
198
186
|
/** The value of the component. The DOM API casts this to a string. */
|
|
199
187
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
200
|
-
|
|
201
188
|
/** The name of the Radio is displayed on the interface */
|
|
202
189
|
label: PropTypes.string,
|
|
203
|
-
|
|
204
190
|
/** The class for Radio component */
|
|
205
191
|
className: PropTypes.string,
|
|
206
|
-
|
|
207
192
|
/** Props for input. */
|
|
208
193
|
inputProps: PropTypes.object,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* You can pull out the new
|
|
214
|
-
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
194
|
+
/** Callback fired when the state is changed.
|
|
195
|
+
*
|
|
196
|
+
* @param {object} event The event source of the callback.
|
|
197
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
198
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
215
199
|
* */
|
|
216
200
|
onChange: PropTypes.func,
|
|
217
|
-
|
|
218
201
|
/** Prevent all event if true. */
|
|
219
202
|
readOnly: PropTypes.bool,
|
|
220
|
-
|
|
221
203
|
/** Props for Typography of label. */
|
|
222
204
|
labelProps: PropTypes.object,
|
|
223
|
-
|
|
224
205
|
/** If `true`, the label will indicate that the Radio is required. */
|
|
225
206
|
required: PropTypes.bool
|
|
226
207
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import { HelperText, InputBase, Label } from "../..";
|
|
@@ -54,11 +53,9 @@ const TextInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
54
53
|
...props
|
|
55
54
|
}, reference) => {
|
|
56
55
|
const ref = useRef(null);
|
|
57
|
-
|
|
58
56
|
if (!inputRef) {
|
|
59
57
|
inputRef = useRef(null);
|
|
60
58
|
}
|
|
61
|
-
|
|
62
59
|
const [value, setValue] = useState(valueProp || defaultValue);
|
|
63
60
|
const isError = !!error;
|
|
64
61
|
useEffect(() => {
|
|
@@ -67,11 +64,10 @@ const TextInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
67
64
|
useImperativeHandle(reference, () => {
|
|
68
65
|
const currentRef = ref.current || {};
|
|
69
66
|
currentRef.element = ref.current;
|
|
70
|
-
const _instance = {
|
|
67
|
+
const _instance = {
|
|
68
|
+
...action
|
|
71
69
|
}; // methods
|
|
72
|
-
|
|
73
70
|
_instance.__proto__ = {}; // hidden methods
|
|
74
|
-
|
|
75
71
|
currentRef.instance = _instance;
|
|
76
72
|
return currentRef;
|
|
77
73
|
});
|
|
@@ -117,10 +113,12 @@ const TextInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
117
113
|
value: valueProp,
|
|
118
114
|
hoverTooltip: hoverTooltip,
|
|
119
115
|
nonStyle: nonStyle
|
|
120
|
-
}), isError && jsx(HelperText, {
|
|
116
|
+
}), isError && jsx(HelperText, {
|
|
117
|
+
...helperTextProps,
|
|
121
118
|
disabled: disabled,
|
|
122
119
|
status: status
|
|
123
|
-
}, error), !isError && validateResult && jsx(HelperText, {
|
|
120
|
+
}, error), !isError && validateResult && jsx(HelperText, {
|
|
121
|
+
...helperTextProps,
|
|
124
122
|
disabled: disabled
|
|
125
123
|
}, validateResult));
|
|
126
124
|
}));
|
|
@@ -152,110 +150,76 @@ TextInput.defaultProps = {
|
|
|
152
150
|
TextInput.propTypes = {
|
|
153
151
|
/** 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). */
|
|
154
152
|
autoComplete: PropTypes.string,
|
|
155
|
-
|
|
156
153
|
/** If `true`, the input element is focused during the first mount. */
|
|
157
154
|
autoFocus: PropTypes.bool,
|
|
158
|
-
|
|
159
155
|
/** If `true`, the width of the component will automatically be set according to the contents inside the input, don't run with multiline = true */
|
|
160
156
|
autoWidth: PropTypes.bool,
|
|
161
|
-
|
|
162
157
|
/** Class for component. */
|
|
163
158
|
className: PropTypes.string,
|
|
164
|
-
|
|
165
159
|
/** The default value. Use when the component is not controlled. */
|
|
166
160
|
defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
167
|
-
|
|
168
161
|
/** If `true`, the component is disabled.*/
|
|
169
162
|
disabled: PropTypes.bool,
|
|
170
|
-
|
|
171
163
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed to the right of input. */
|
|
172
164
|
endIcon: PropTypes.any,
|
|
173
|
-
|
|
174
165
|
/** Props of end icon in InputBase component. */
|
|
175
166
|
endIconProps: PropTypes.object,
|
|
176
|
-
|
|
177
167
|
/** Error displayed below input. */
|
|
178
168
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
179
|
-
|
|
180
169
|
/** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-text-helpertext) of helper text. */
|
|
181
170
|
helperTextProps: PropTypes.object,
|
|
182
|
-
|
|
183
171
|
/** [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes) applied to the input element. */
|
|
184
172
|
inputProps: PropTypes.object,
|
|
185
|
-
|
|
186
173
|
/** Pass a ref to the input element. */
|
|
187
174
|
inputRef: ref,
|
|
188
|
-
|
|
189
175
|
/** Style inline of input element. */
|
|
190
176
|
inputStyle: PropTypes.object,
|
|
191
|
-
|
|
192
177
|
/** The label of the component. */
|
|
193
178
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
194
|
-
|
|
195
179
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/form-control-text-label--simple) of label. */
|
|
196
180
|
labelProps: PropTypes.object,
|
|
197
|
-
|
|
198
181
|
/** Maximum number of rows to display when multiline option is set to true. */
|
|
199
182
|
maxRows: PropTypes.number,
|
|
200
|
-
|
|
201
183
|
/** If `true`, a textarea element is rendered. */
|
|
202
184
|
multiline: PropTypes.bool,
|
|
203
|
-
|
|
204
185
|
/** Callback fired when the input is blurred. */
|
|
205
186
|
onBlur: PropTypes.func,
|
|
206
|
-
|
|
207
187
|
/** Callback fired when the value is changed. */
|
|
208
188
|
onChange: PropTypes.func,
|
|
209
|
-
|
|
210
189
|
/** Callback fired when the input is focused. */
|
|
211
190
|
onFocus: PropTypes.func,
|
|
212
|
-
|
|
213
191
|
/** Callback fired when input. */
|
|
214
192
|
onInput: PropTypes.func,
|
|
215
|
-
|
|
216
193
|
/** Callback fired when pressing a key. */
|
|
217
194
|
onKeyDown: PropTypes.func,
|
|
218
|
-
|
|
219
195
|
/** Callback fired when releases a key. */
|
|
220
196
|
onKeyUp: PropTypes.func,
|
|
221
|
-
|
|
222
197
|
/** The short hint displayed in the input before the user enters a value. */
|
|
223
198
|
placeholder: PropTypes.string,
|
|
224
|
-
|
|
225
199
|
/** If `true`, the component is readOnly. */
|
|
226
200
|
readOnly: PropTypes.bool,
|
|
227
|
-
|
|
228
201
|
/** If `true`, the input element is required. */
|
|
229
202
|
required: PropTypes.bool,
|
|
230
|
-
|
|
231
203
|
/** Number of rows to display when multiline option is set to true. */
|
|
232
204
|
rows: PropTypes.number,
|
|
233
|
-
|
|
234
205
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed to the left of input. */
|
|
235
206
|
startIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
236
|
-
|
|
237
207
|
/** Props of start icon in InputBase component. */
|
|
238
208
|
startIconProps: PropTypes.object,
|
|
239
|
-
|
|
240
209
|
/** Status type to display color for input. */
|
|
241
210
|
status: PropTypes.oneOf(['default', 'warning', 'success', 'danger']),
|
|
242
|
-
|
|
243
211
|
/** Style inline of component. */
|
|
244
212
|
style: PropTypes.object,
|
|
245
|
-
|
|
246
213
|
/** 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). */
|
|
247
214
|
type: PropTypes.oneOf(['inform', 'edit', 'text', 'number', 'password']),
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
* *
|
|
251
|
-
* *
|
|
252
|
-
* * array: the validation rule list, insist object/string
|
|
215
|
+
/** Validation value, argument can:<br/>
|
|
216
|
+
* * string: the validation rule. Example required.<br/>
|
|
217
|
+
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
218
|
+
* * array: the validation rule list, insist object/string
|
|
253
219
|
*/
|
|
254
220
|
validates: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array, PropTypes.func]),
|
|
255
|
-
|
|
256
221
|
/** The value of the input element, required for a controlled component. */
|
|
257
222
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
258
|
-
|
|
259
223
|
/** The variant to use. */
|
|
260
224
|
viewType: PropTypes.oneOf(['underlined', 'outlined', 'none'])
|
|
261
225
|
};
|