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, useState, useEffect, useRef, useImperativeHandle, forwardRef, Fragment } from 'react';
|
|
5
4
|
import { createPortal } from 'react-dom';
|
|
@@ -7,10 +6,9 @@ import PropTypes from 'prop-types';
|
|
|
7
6
|
import { jsx, css } from '@emotion/core';
|
|
8
7
|
import { ButtonIcon, InputBase, Label } from "../../";
|
|
9
8
|
import { randomString } from "../../../utils";
|
|
10
|
-
import { color as colors } from "../../../styles/colors";
|
|
11
9
|
import { typography } from "../../../styles/typography";
|
|
12
10
|
import { boxBorder, borderRadius4px, displayBlock, positionFixed, positionRelative } from "../../../styles/general";
|
|
13
|
-
import { useTheme } from "../../../theme";
|
|
11
|
+
import { useTheme, useColor as colors } from "../../../theme";
|
|
14
12
|
const {
|
|
15
13
|
paragraph1
|
|
16
14
|
} = typography;
|
|
@@ -59,8 +57,8 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
59
57
|
allowSymbol: false
|
|
60
58
|
}));
|
|
61
59
|
const [open, setOpen] = useState(false);
|
|
62
|
-
/* Start handler */
|
|
63
60
|
|
|
61
|
+
/* Start handler */
|
|
64
62
|
const onTriggerDropdown = e => {
|
|
65
63
|
if (!open) {
|
|
66
64
|
openDropdownBox();
|
|
@@ -69,19 +67,16 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
69
67
|
e.currentTarget.blur();
|
|
70
68
|
}
|
|
71
69
|
};
|
|
72
|
-
|
|
73
70
|
const onClickOutsideOfInput = event => {
|
|
74
71
|
if (ref.current && !ref.current.contains(event.target) && dropdownBoxRef.current && !dropdownBoxRef.current.contains(event.target)) {
|
|
75
72
|
closeDropdownBox();
|
|
76
73
|
}
|
|
77
74
|
};
|
|
78
|
-
|
|
79
75
|
const pressESCHandler = event => {
|
|
80
76
|
if (event.key === 'Escape') {
|
|
81
77
|
closeDropdownBox();
|
|
82
78
|
}
|
|
83
79
|
};
|
|
84
|
-
|
|
85
80
|
const openDropdownBox = () => {
|
|
86
81
|
setOpen(true);
|
|
87
82
|
setTimeout(() => {
|
|
@@ -99,16 +94,12 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
99
94
|
!!onOpened && onOpened(ref.current);
|
|
100
95
|
}, 10);
|
|
101
96
|
};
|
|
102
|
-
|
|
103
97
|
const closeDropdownBox = certain => {
|
|
104
98
|
var _Array$from, _Array$from$classList;
|
|
105
|
-
|
|
106
99
|
const portals = document.querySelectorAll('.DGN-UI-Portal');
|
|
107
|
-
|
|
108
100
|
if (!certain && portals && portals.length > 1 && Array.from(portals)[portals.length - 1] && !Array.from(portals)[portals.length - 1].contains(ref.current) && !((_Array$from = Array.from(portals)[portals.length - 1]) !== null && _Array$from !== void 0 && (_Array$from$classList = _Array$from.classList) !== null && _Array$from$classList !== void 0 && _Array$from$classList.contains('DGN-UI-Modal'))) {
|
|
109
101
|
return;
|
|
110
102
|
}
|
|
111
|
-
|
|
112
103
|
if (dropdownBoxRef.current) {
|
|
113
104
|
dropdownBoxRef.current.style.pointerEvents = `none`;
|
|
114
105
|
dropdownBoxRef.current.style.opacity = 0;
|
|
@@ -121,7 +112,6 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
121
112
|
}, 300);
|
|
122
113
|
}
|
|
123
114
|
};
|
|
124
|
-
|
|
125
115
|
useEffect(() => {
|
|
126
116
|
return () => {
|
|
127
117
|
closeDropdownBox();
|
|
@@ -137,7 +127,6 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
137
127
|
closeDropdownBox(true);
|
|
138
128
|
}
|
|
139
129
|
}));
|
|
140
|
-
|
|
141
130
|
const renderEndIcon = () => {
|
|
142
131
|
return endIcon && jsx(ButtonIcon, {
|
|
143
132
|
viewType: 'ghost',
|
|
@@ -145,14 +134,15 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
145
134
|
onClick: openOnClickAt === 'icon' ? onTriggerDropdown : null
|
|
146
135
|
});
|
|
147
136
|
};
|
|
148
|
-
|
|
149
137
|
return jsx(Fragment, null, jsx("div", {
|
|
150
138
|
ref: ref,
|
|
151
139
|
css: DropdownBoxRootCSS(bgColor),
|
|
152
140
|
className: ['DGN-UI-Dropdown-Box', open && 'dropdown-showing', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
153
141
|
style: style
|
|
154
|
-
}, label ? jsx(Label, {
|
|
155
|
-
|
|
142
|
+
}, label ? jsx(Label, {
|
|
143
|
+
...labelProps
|
|
144
|
+
}, label) : null, jsx(InputBase, {
|
|
145
|
+
...inputProps,
|
|
156
146
|
className: open ? 'dropdown-focus' : '',
|
|
157
147
|
style: inputStyle,
|
|
158
148
|
viewType: viewType,
|
|
@@ -170,8 +160,8 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
170
160
|
css: DropdownBoxCSS(zIndex)
|
|
171
161
|
}, children), document.body));
|
|
172
162
|
}));
|
|
173
|
-
/* Start styled */
|
|
174
163
|
|
|
164
|
+
/* Start styled */
|
|
175
165
|
const DropdownBoxRootCSS = bgColor => css`
|
|
176
166
|
&.DGN-UI-Dropdown-Box {
|
|
177
167
|
${displayBlock}
|
|
@@ -201,7 +191,6 @@ const DropdownBoxRootCSS = bgColor => css`
|
|
|
201
191
|
}
|
|
202
192
|
}
|
|
203
193
|
`;
|
|
204
|
-
|
|
205
194
|
const DropdownBoxCSS = zIndex => css`
|
|
206
195
|
${displayBlock};
|
|
207
196
|
${paragraph1};
|
|
@@ -235,7 +224,6 @@ const DropdownBoxCSS = zIndex => css`
|
|
|
235
224
|
`;
|
|
236
225
|
/* End styled */
|
|
237
226
|
|
|
238
|
-
|
|
239
227
|
DropdownBox.defaultProps = {
|
|
240
228
|
className: '',
|
|
241
229
|
label: '',
|
|
@@ -251,58 +239,40 @@ DropdownBox.defaultProps = {
|
|
|
251
239
|
DropdownBox.propTypes = {
|
|
252
240
|
/** class for dropdown */
|
|
253
241
|
className: PropTypes.string,
|
|
254
|
-
|
|
255
242
|
/** label for input */
|
|
256
243
|
label: PropTypes.string,
|
|
257
|
-
|
|
258
244
|
/** hints for input */
|
|
259
245
|
placeholder: PropTypes.string,
|
|
260
|
-
|
|
261
246
|
/** the content to display in input */
|
|
262
247
|
value: PropTypes.string,
|
|
263
|
-
|
|
264
248
|
/** icon at start */
|
|
265
249
|
startIcon: PropTypes.string,
|
|
266
|
-
|
|
267
250
|
/** icon at end */
|
|
268
251
|
endIcon: PropTypes.string,
|
|
269
|
-
|
|
270
252
|
/** background color of DropdownBox input */
|
|
271
253
|
bgColor: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
272
|
-
|
|
273
254
|
/** viewType of InputBase */
|
|
274
255
|
viewType: PropTypes.oneOf(['underlined', 'outlined']),
|
|
275
|
-
|
|
276
256
|
/** viewType of InputBase */
|
|
277
257
|
openOnClickAt: PropTypes.oneOf(['full', 'icon']),
|
|
278
|
-
|
|
279
258
|
/** style inline for dropdown */
|
|
280
259
|
style: PropTypes.object,
|
|
281
|
-
|
|
282
260
|
/** props of input in DropdownBox component */
|
|
283
261
|
inputProps: PropTypes.object,
|
|
284
|
-
|
|
285
262
|
/** style inline of input in DropdownBox component */
|
|
286
263
|
inputStyle: PropTypes.object,
|
|
287
|
-
|
|
288
264
|
/** the function will run when entering input */
|
|
289
265
|
onChangeInput: PropTypes.func,
|
|
290
|
-
|
|
291
266
|
/** delay time on input */
|
|
292
267
|
delayOnInput: PropTypes.number,
|
|
293
|
-
|
|
294
268
|
/** style inline of label in DropdownBox component */
|
|
295
269
|
labelProps: PropTypes.object,
|
|
296
|
-
|
|
297
270
|
/** z-index for DropdownBox component */
|
|
298
271
|
zIndex: PropTypes.number,
|
|
299
|
-
|
|
300
272
|
/** the contents in DropdownBox box (Exp: TreeView) */
|
|
301
273
|
children: PropTypes.node.isRequired,
|
|
302
|
-
|
|
303
274
|
/** the function will run after open */
|
|
304
275
|
onOpened: PropTypes.func,
|
|
305
|
-
|
|
306
276
|
/** the function will run after close */
|
|
307
277
|
onClosed: PropTypes.func
|
|
308
278
|
};
|
|
@@ -13,13 +13,11 @@ const Form = /*#__PURE__*/forwardRef(({
|
|
|
13
13
|
if (!ref) {
|
|
14
14
|
ref = useRef(null);
|
|
15
15
|
}
|
|
16
|
-
|
|
17
16
|
const submitHandler = e => {
|
|
18
17
|
e.preventDefault();
|
|
19
18
|
!!onValidate && onValidate();
|
|
20
19
|
!!onSubmit && onSubmit(e);
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
useEffect(() => {
|
|
24
22
|
!!onLoaded && onLoaded(ref.current);
|
|
25
23
|
}, []);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useRef, useEffect, forwardRef, Children, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -18,8 +17,8 @@ const FormGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
18
17
|
}, reference) => {
|
|
19
18
|
const ref = useRef(null);
|
|
20
19
|
const previousError = useRef(false);
|
|
21
|
-
/* Start styled */
|
|
22
20
|
|
|
21
|
+
/* Start styled */
|
|
23
22
|
const FormGroupRoot = css`
|
|
24
23
|
position: relative;
|
|
25
24
|
align-items: flex-end;
|
|
@@ -59,11 +58,9 @@ const FormGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
59
58
|
/* End styled */
|
|
60
59
|
|
|
61
60
|
/* Start handler */
|
|
62
|
-
|
|
63
61
|
const resetLabelPosition = () => {
|
|
64
62
|
const allUnderlined = ref.current.querySelectorAll('.DGN-UI-InputBase.underlined');
|
|
65
63
|
const outlined = ref.current.querySelector('.DGN-UI-InputBase.outlined');
|
|
66
|
-
|
|
67
64
|
if (allUnderlined.length && outlined) {
|
|
68
65
|
allUnderlined.forEach(input => {
|
|
69
66
|
if (input.previousElementSibling) {
|
|
@@ -72,7 +69,6 @@ const FormGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
72
69
|
});
|
|
73
70
|
}
|
|
74
71
|
};
|
|
75
|
-
|
|
76
72
|
useEffect(() => {
|
|
77
73
|
if (ref.current) {
|
|
78
74
|
resetLabelPosition();
|
|
@@ -86,7 +82,6 @@ const FormGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
86
82
|
isError = true;
|
|
87
83
|
}
|
|
88
84
|
});
|
|
89
|
-
|
|
90
85
|
if (previousError.current !== isError) {
|
|
91
86
|
previousError.current = isError;
|
|
92
87
|
ref.current.querySelectorAll('.DGN-UI-TextInput, .DGN-UI-Dropdown, .DGN-UI-InputBase').forEach(node => {
|
|
@@ -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';
|
|
@@ -38,11 +37,10 @@ const HelperText = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
38
37
|
useImperativeHandle(reference, () => {
|
|
39
38
|
const currentRef = ref.current || {};
|
|
40
39
|
currentRef.element = ref.current;
|
|
41
|
-
const _instance = {
|
|
40
|
+
const _instance = {
|
|
41
|
+
...action
|
|
42
42
|
}; // methods
|
|
43
|
-
|
|
44
43
|
_instance.__proto__ = {}; // hidden methods
|
|
45
|
-
|
|
46
44
|
currentRef.instance = _instance;
|
|
47
45
|
return currentRef;
|
|
48
46
|
});
|
|
@@ -72,19 +70,14 @@ HelperText.defaultProps = {
|
|
|
72
70
|
HelperText.propTypes = {
|
|
73
71
|
/** If true, the component is disabled. */
|
|
74
72
|
disabled: PropTypes.bool,
|
|
75
|
-
|
|
76
73
|
/** status type to display color for input (only available for type is inform) */
|
|
77
74
|
status: PropTypes.oneOf(['default', 'warning', 'success', 'danger', 'info']),
|
|
78
|
-
|
|
79
75
|
/** Class for component. */
|
|
80
76
|
className: PropTypes.string,
|
|
81
|
-
|
|
82
77
|
/** Style inline of component. */
|
|
83
78
|
style: PropTypes.object,
|
|
84
|
-
|
|
85
79
|
/** Content to display in component. */
|
|
86
80
|
children: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
87
|
-
|
|
88
81
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography) of Typography */
|
|
89
82
|
props: PropTypes.any
|
|
90
83
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import { Icon, Typography } from "../..";
|
|
@@ -77,12 +76,10 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
77
76
|
}, reference) => {
|
|
78
77
|
if (!reference) reference = useRef(null);
|
|
79
78
|
if (!autoWidth && inputProps !== null && inputProps !== void 0 && inputProps.autoWidth) autoWidth = inputProps.autoWidth;
|
|
80
|
-
|
|
81
79
|
const _onChange = e => {
|
|
82
80
|
onChange && onChange(e);
|
|
83
81
|
dynamicWidth(e);
|
|
84
82
|
};
|
|
85
|
-
|
|
86
83
|
const {
|
|
87
84
|
bind,
|
|
88
85
|
value
|
|
@@ -95,28 +92,19 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
95
92
|
const styleInputBase = useRef(null);
|
|
96
93
|
const widthInit = useRef(null);
|
|
97
94
|
const isEnabled = !readOnly && !disabled;
|
|
98
|
-
|
|
99
95
|
const _InputBaseCSS = InputBaseCSS(readOnly, status);
|
|
100
|
-
|
|
101
96
|
const _SingleLineCSS = SingleLineCSS(autoWidth, readOnly);
|
|
102
|
-
|
|
103
97
|
const _InputCSS = InputCSS(autoWidth, isEnabled, hoverTooltip);
|
|
104
|
-
|
|
105
98
|
const _TypoCSS = TypoCSS(disabled);
|
|
106
|
-
|
|
107
99
|
const _TextAreaCSS = TextAreaCSS(resize, readOnly);
|
|
108
|
-
|
|
109
100
|
const _MultilineCSS = MultilineCSS(_TextAreaCSS.name, rows, maxRows);
|
|
110
|
-
|
|
111
101
|
const _InputBaseIconCSS = InputBaseIconCSS(multiline);
|
|
112
|
-
/* Start handler */
|
|
113
|
-
|
|
114
102
|
|
|
103
|
+
/* Start handler */
|
|
115
104
|
const onInputTextArea = e => {
|
|
116
105
|
if (!/\d+/.test(rows)) {
|
|
117
106
|
const el = e.target;
|
|
118
107
|
const defaultHeight = 24;
|
|
119
|
-
|
|
120
108
|
if (el.value) {
|
|
121
109
|
el.style.height = 0;
|
|
122
110
|
el.style.height = Math.max(defaultHeight, el.scrollHeight) + 'px';
|
|
@@ -124,10 +112,8 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
124
112
|
el.style.height = defaultHeight + 'px';
|
|
125
113
|
}
|
|
126
114
|
}
|
|
127
|
-
|
|
128
115
|
!!onInput && onInput(e);
|
|
129
116
|
};
|
|
130
|
-
|
|
131
117
|
useEffect(() => {
|
|
132
118
|
if (defaultValue !== undefined && defaultValue !== '') {
|
|
133
119
|
if (multiline && !/\d+/.test(rows) && inputRef.current) {
|
|
@@ -140,18 +126,15 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
140
126
|
if (multiline && !/\d+/.test(rows) && inputRef.current && !(inputRef.current.value || inputRef.current.value === 0)) {
|
|
141
127
|
inputRef.current.style.height = '24px';
|
|
142
128
|
}
|
|
143
|
-
|
|
144
129
|
if (autoFocus) {
|
|
145
130
|
inputRef.current.focus();
|
|
146
131
|
}
|
|
147
132
|
}, [multiline]);
|
|
148
133
|
useEffect(() => {
|
|
149
134
|
const defaultHeight = 24;
|
|
150
|
-
|
|
151
135
|
if (valueProp !== undefined) {
|
|
152
136
|
valueArray.current.push(valueProp);
|
|
153
137
|
inputRef.current.value = valueProp;
|
|
154
|
-
|
|
155
138
|
if (multiline && !/\d+/.test(rows)) {
|
|
156
139
|
inputRef.current.style.height = 0;
|
|
157
140
|
inputRef.current.style.height = Math.max(defaultHeight, inputRef.current.scrollHeight) + 'px';
|
|
@@ -163,7 +146,6 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
163
146
|
});
|
|
164
147
|
}
|
|
165
148
|
}
|
|
166
|
-
|
|
167
149
|
return () => {
|
|
168
150
|
if (valueProp !== undefined && multiline && !/\d+/.test(rows) && inputRef.current) {
|
|
169
151
|
inputRef.current.style.height = defaultHeight + 'px';
|
|
@@ -174,22 +156,19 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
174
156
|
|
|
175
157
|
useImperativeHandle(reference, () => {
|
|
176
158
|
const currentRef = inputRef.current || {};
|
|
177
|
-
const _instance = {
|
|
159
|
+
const _instance = {
|
|
160
|
+
...action
|
|
178
161
|
}; // methods
|
|
179
|
-
|
|
180
162
|
_instance.__proto__ = {}; // hidden methods
|
|
181
|
-
|
|
182
163
|
currentRef.instance = _instance;
|
|
183
164
|
return currentRef;
|
|
184
165
|
});
|
|
185
|
-
|
|
186
166
|
const saveInitInfo = refs => {
|
|
187
167
|
if (!autoWidth) return;
|
|
188
168
|
const style = window.getComputedStyle(refs) || refs.currentStyle;
|
|
189
169
|
if (!widthInit.current) widthInit.current = parseInt(style.width);
|
|
190
170
|
styleInputBase.current = style;
|
|
191
171
|
};
|
|
192
|
-
|
|
193
172
|
const dynamicWidth = e => {
|
|
194
173
|
if (!autoWidth || !inputRef.current) return;
|
|
195
174
|
if (!canvas || !styleInputBase.current || !inputRef.current) return;
|
|
@@ -200,13 +179,11 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
200
179
|
} = context.measureText(e.target.value);
|
|
201
180
|
inputRef.current.style.width = `${Math.max(width, widthInit.current)}px`;
|
|
202
181
|
};
|
|
203
|
-
/* Start component */
|
|
204
|
-
|
|
205
182
|
|
|
183
|
+
/* Start component */
|
|
206
184
|
const newClass = viewType + (viewType === 'none' || nonStyle ? ' non-style' : '');
|
|
207
185
|
const StartIcon = useMemo(() => {
|
|
208
186
|
let node = startIcon;
|
|
209
|
-
|
|
210
187
|
if (typeof node === 'string') {
|
|
211
188
|
node = jsx(Icon, {
|
|
212
189
|
name: startIcon,
|
|
@@ -214,7 +191,6 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
214
191
|
...startIconProps
|
|
215
192
|
});
|
|
216
193
|
}
|
|
217
|
-
|
|
218
194
|
return jsx("div", {
|
|
219
195
|
css: _InputBaseIconCSS,
|
|
220
196
|
className: classNames('DGN-UI-InputBase-Start-Icon', startIconProps.className),
|
|
@@ -223,7 +199,6 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
223
199
|
}, [startIcon, startIconProps]);
|
|
224
200
|
const EndIcon = useMemo(() => {
|
|
225
201
|
let node = endIcon;
|
|
226
|
-
|
|
227
202
|
if (typeof node === 'string') {
|
|
228
203
|
node = jsx(Icon, {
|
|
229
204
|
name: endIcon,
|
|
@@ -231,7 +206,6 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
231
206
|
...endIconProps
|
|
232
207
|
});
|
|
233
208
|
}
|
|
234
|
-
|
|
235
209
|
return jsx("div", {
|
|
236
210
|
css: _InputBaseIconCSS,
|
|
237
211
|
className: classNames('DGN-UI-InputBase-End-Icon', endIconProps.className),
|
|
@@ -307,7 +281,6 @@ const InputBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
307
281
|
|
|
308
282
|
return multiline ? MultipleInputComp : InputComp;
|
|
309
283
|
}));
|
|
310
|
-
|
|
311
284
|
const InputBaseCSS = (readOnly, status) => css`
|
|
312
285
|
${flexRow};
|
|
313
286
|
${positionRelative};
|
|
@@ -438,7 +411,6 @@ const InputBaseCSS = (readOnly, status) => css`
|
|
|
438
411
|
top: 100%;
|
|
439
412
|
}
|
|
440
413
|
`;
|
|
441
|
-
|
|
442
414
|
const SingleLineCSS = (autoWidth, readOnly) => css`
|
|
443
415
|
${parseWidthHeight(autoWidth ? 'max-content' : 'auto', 'max-content')}
|
|
444
416
|
${itemsCenter};
|
|
@@ -457,7 +429,6 @@ const SingleLineCSS = (autoWidth, readOnly) => css`
|
|
|
457
429
|
${bgColor(systemWhite)};
|
|
458
430
|
}
|
|
459
431
|
`;
|
|
460
|
-
|
|
461
432
|
const InputCSS = (autoWidth, isEnabled, hoverTooltip) => css`
|
|
462
433
|
${parseWidthHeight(autoWidth ? '10px' : '100%', 24)};
|
|
463
434
|
${borderNone};
|
|
@@ -487,7 +458,6 @@ const InputCSS = (autoWidth, isEnabled, hoverTooltip) => css`
|
|
|
487
458
|
}
|
|
488
459
|
${!isEnabled && hoverTooltip && displayNone};
|
|
489
460
|
`;
|
|
490
|
-
|
|
491
461
|
const TypoCSS = disabled => css`
|
|
492
462
|
${parseHeight(24)};
|
|
493
463
|
&:focus {
|
|
@@ -499,7 +469,6 @@ const TypoCSS = disabled => css`
|
|
|
499
469
|
}
|
|
500
470
|
${disabled && userSelectNone};
|
|
501
471
|
`;
|
|
502
|
-
|
|
503
472
|
const MultilineCSS = (TextAreaCSSName, rows, maxRows) => css`
|
|
504
473
|
${parseWidthHeight('100%', 'max-content')};
|
|
505
474
|
&.outlined {
|
|
@@ -517,7 +486,6 @@ const MultilineCSS = (TextAreaCSSName, rows, maxRows) => css`
|
|
|
517
486
|
}
|
|
518
487
|
}
|
|
519
488
|
`;
|
|
520
|
-
|
|
521
489
|
const TextAreaCSS = (resize, readOnly) => css`
|
|
522
490
|
${displayBlock};
|
|
523
491
|
${paragraph1};
|
|
@@ -556,7 +524,6 @@ const TextAreaCSS = (resize, readOnly) => css`
|
|
|
556
524
|
background-clip: content-box;
|
|
557
525
|
}
|
|
558
526
|
`;
|
|
559
|
-
|
|
560
527
|
const InputBaseIconCSS = multiple => css`
|
|
561
528
|
${flexRow};
|
|
562
529
|
${multiple && selfEnd};
|
|
@@ -571,7 +538,6 @@ const InputBaseIconCSS = multiple => css`
|
|
|
571
538
|
${mgl([1])};
|
|
572
539
|
}
|
|
573
540
|
`;
|
|
574
|
-
|
|
575
541
|
InputBase.defaultProps = {
|
|
576
542
|
autoComplete: 'off',
|
|
577
543
|
autoFocus: false,
|
|
@@ -597,94 +563,64 @@ InputBase.defaultProps = {
|
|
|
597
563
|
InputBase.propTypes = {
|
|
598
564
|
/** 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). */
|
|
599
565
|
autoComplete: PropTypes.string,
|
|
600
|
-
|
|
601
566
|
/** If `true`, the input element is focused during the first mount. */
|
|
602
567
|
autoFocus: PropTypes.bool,
|
|
603
|
-
|
|
604
568
|
/** If `true`, the width of the component will automatically be set according to the contents inside the input, don't run with multiline = true */
|
|
605
569
|
autoWidth: PropTypes.bool,
|
|
606
|
-
|
|
607
570
|
/** Class for component. */
|
|
608
571
|
className: PropTypes.string,
|
|
609
|
-
|
|
610
572
|
/** The default value. Use when the component is not controlled. */
|
|
611
573
|
defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
612
|
-
|
|
613
574
|
/** The number of milliseconds to wait before call onChange. */
|
|
614
575
|
delayOnChange: PropTypes.number,
|
|
615
|
-
|
|
616
576
|
/** If `true`, the component is disabled.*/
|
|
617
577
|
disabled: PropTypes.bool,
|
|
618
|
-
|
|
619
578
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed to the right of input. */
|
|
620
579
|
endIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
621
|
-
|
|
622
580
|
/** Props of end icon. */
|
|
623
581
|
endIconProps: PropTypes.object,
|
|
624
|
-
|
|
625
582
|
/** Style inline of icon. */
|
|
626
583
|
iconStyle: PropTypes.object,
|
|
627
|
-
|
|
628
584
|
/** [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes) applied to the input element. */
|
|
629
585
|
inputProps: PropTypes.object,
|
|
630
|
-
|
|
631
586
|
/** Pass a ref to the input element. */
|
|
632
587
|
inputRef: ref,
|
|
633
|
-
|
|
634
588
|
/** Style inline of input element. */
|
|
635
589
|
inputStyle: PropTypes.object,
|
|
636
|
-
|
|
637
590
|
/** Maximum number of rows to display when multiline option is set to true. */
|
|
638
591
|
maxRows: PropTypes.number,
|
|
639
|
-
|
|
640
592
|
/** If `true`, a textarea element is rendered. */
|
|
641
593
|
multiline: PropTypes.bool,
|
|
642
|
-
|
|
643
594
|
/** Callback fired when the input is blurred. */
|
|
644
595
|
onBlur: PropTypes.func,
|
|
645
|
-
|
|
646
596
|
/** Callback fired when the value is changed. */
|
|
647
597
|
onChange: PropTypes.func,
|
|
648
|
-
|
|
649
598
|
/** Callback fired when the input is focused. */
|
|
650
599
|
onFocus: PropTypes.func,
|
|
651
|
-
|
|
652
600
|
/** Callback fired when input. */
|
|
653
601
|
onInput: PropTypes.func,
|
|
654
|
-
|
|
655
602
|
/** Callback fired when pressing a key. */
|
|
656
603
|
onKeyDown: PropTypes.func,
|
|
657
|
-
|
|
658
604
|
/** Callback fired when releases a key. */
|
|
659
605
|
onKeyUp: PropTypes.func,
|
|
660
|
-
|
|
661
606
|
/** The short hint displayed in the input before the user enters a value. */
|
|
662
607
|
placeholder: PropTypes.string,
|
|
663
|
-
|
|
664
608
|
/** If `true`, the component is readonly. */
|
|
665
609
|
readOnly: PropTypes.bool,
|
|
666
|
-
|
|
667
610
|
/** If `true`, the input element is required. */
|
|
668
611
|
required: PropTypes.bool,
|
|
669
|
-
|
|
670
612
|
/** allow resize multiline input (resize css style) */
|
|
671
613
|
resize: PropTypes.string,
|
|
672
|
-
|
|
673
614
|
/** Number of rows to display when multiline option is set to true. */
|
|
674
615
|
rows: PropTypes.number,
|
|
675
|
-
|
|
676
616
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed to the left of input. */
|
|
677
617
|
startIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
678
|
-
|
|
679
618
|
/** Props of start icon. */
|
|
680
619
|
startIconProps: PropTypes.object,
|
|
681
|
-
|
|
682
620
|
/** Status type to display color for input. */
|
|
683
621
|
status: PropTypes.oneOf(['default', 'warning', 'success', 'danger', 'info']),
|
|
684
|
-
|
|
685
622
|
/** The value of the input element, required for a controlled component. */
|
|
686
623
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
687
|
-
|
|
688
624
|
/** The variant to use. */
|
|
689
625
|
viewType: PropTypes.oneOf(['underlined', 'outlined', 'none'])
|
|
690
626
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import { Typography } from "../..";
|
|
@@ -39,11 +38,10 @@ const Label = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
39
38
|
useImperativeHandle(reference, () => {
|
|
40
39
|
const currentRef = ref.current || {};
|
|
41
40
|
currentRef.element = ref.current;
|
|
42
|
-
const _instance = {
|
|
41
|
+
const _instance = {
|
|
42
|
+
...action
|
|
43
43
|
}; // methods
|
|
44
|
-
|
|
45
44
|
_instance.__proto__ = {}; // hidden methods
|
|
46
|
-
|
|
47
45
|
currentRef.instance = _instance;
|
|
48
46
|
return currentRef;
|
|
49
47
|
});
|
|
@@ -91,28 +89,20 @@ Label.defaultProps = {
|
|
|
91
89
|
Label.propTypes = {
|
|
92
90
|
/** The content of the component. */
|
|
93
91
|
children: PropTypes.node,
|
|
94
|
-
|
|
95
92
|
/** Class for component. */
|
|
96
93
|
className: PropTypes.string,
|
|
97
|
-
|
|
98
94
|
/** If `true`, the component is disabled. */
|
|
99
95
|
disabled: PropTypes.bool,
|
|
100
|
-
|
|
101
96
|
/** If `true`, the component is readonly. */
|
|
102
97
|
readOnly: PropTypes.bool,
|
|
103
|
-
|
|
104
98
|
/** If `true`, the label will indicate that the input is required. */
|
|
105
99
|
required: PropTypes.bool,
|
|
106
|
-
|
|
107
100
|
/** Consult [Typography's](https://core.diginet.com.vn/ui/?path=/docs/typography) documents. */
|
|
108
101
|
color: PropTypes.string,
|
|
109
|
-
|
|
110
102
|
/** Consult [Typography's](https://core.diginet.com.vn/ui/?path=/docs/typography) documents. */
|
|
111
103
|
lineClamp: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]),
|
|
112
|
-
|
|
113
104
|
/** Consult [Typography's](https://core.diginet.com.vn/ui/?path=/docs/typography) documents. */
|
|
114
105
|
hoverTooltip: PropTypes.bool,
|
|
115
|
-
|
|
116
106
|
/** Consult [Typography's](https://core.diginet.com.vn/ui/?path=/docs/typography) documents. */
|
|
117
107
|
type: PropTypes.oneOf(typographyTypes)
|
|
118
108
|
};
|