diginet-core-ui 1.3.87 → 1.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +4 -4
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +6 -2
- package/components/accordion/group.js +9 -2
- package/components/accordion/index.js +15 -2
- package/components/accordion/summary.js +27 -4
- package/components/alert/index.js +33 -2
- package/components/alert/notify.js +22 -12
- package/components/avatar/index.js +81 -22
- package/components/badge/index.js +45 -20
- package/components/button/icon.js +56 -25
- package/components/button/index.js +65 -16
- package/components/button/more.js +35 -15
- package/components/button/ripple-effect.js +10 -0
- package/components/card/body.js +7 -2
- package/components/card/extra.js +7 -2
- package/components/card/footer.js +7 -2
- package/components/card/header.js +7 -2
- package/components/card/index.js +22 -2
- package/components/chart/Pie/Circle.js +1 -0
- package/components/chart/Pie/Sector.js +19 -2
- package/components/chart/Pie/Sectors.js +10 -0
- package/components/chart/Pie/index.js +36 -4
- package/components/chart/Pie-v2/Circle.js +1 -0
- package/components/chart/Pie-v2/Sector.js +15 -2
- package/components/chart/Pie-v2/Sectors.js +20 -0
- package/components/chart/Pie-v2/index.js +38 -11
- package/components/chart/bar/Axis.js +12 -0
- package/components/chart/bar/Bar.js +35 -13
- package/components/chart/bar/Grid.js +18 -0
- package/components/chart/bar/Labels.js +18 -0
- package/components/chart/bar/Points.js +17 -0
- package/components/chart/bar/index.js +26 -6
- package/components/chart/bar-v2/Axis.js +12 -0
- package/components/chart/bar-v2/Bar.js +36 -15
- package/components/chart/bar-v2/Grid.js +18 -0
- package/components/chart/bar-v2/Labels.js +18 -0
- package/components/chart/bar-v2/Points.js +17 -0
- package/components/chart/bar-v2/index.js +26 -6
- package/components/chart/line/Axis.js +16 -4
- package/components/chart/line/Grid.js +19 -2
- package/components/chart/line/Labels.js +18 -0
- package/components/chart/line/Path.js +33 -23
- package/components/chart/line/Point.js +40 -6
- package/components/chart/line/Title.js +3 -0
- package/components/chart/line/index.js +35 -12
- package/components/chart/line-v2/Axis.js +13 -0
- package/components/chart/line-v2/Grid.js +18 -0
- package/components/chart/line-v2/Labels.js +18 -0
- package/components/chart/line-v2/Path.js +33 -23
- package/components/chart/line-v2/Point.js +35 -6
- package/components/chart/line-v2/Title.js +3 -0
- package/components/chart/line-v2/index.js +30 -12
- package/components/check-text/index.js +8 -0
- package/components/check-text/interview-confirmation.js +7 -0
- package/components/check-text/interview-status.js +7 -0
- package/components/chip/attach.js +22 -9
- package/components/chip/index.js +33 -6
- package/components/collapse/index.js +13 -0
- package/components/divider/index.js +13 -2
- package/components/form-control/attachment/index.js +202 -41
- package/components/form-control/calendar/function.js +207 -153
- package/components/form-control/calendar/index.js +46 -21
- package/components/form-control/calendar/range.js +28 -11
- package/components/form-control/checkbox/index.js +37 -4
- package/components/form-control/control/index.js +13 -3
- package/components/form-control/date-picker/index-old.js +0 -18
- package/components/form-control/date-picker/index.js +99 -23
- package/components/form-control/date-range-picker/index.js +180 -44
- package/components/form-control/dropdown/index.js +314 -101
- package/components/form-control/dropdown-box/index.js +35 -6
- package/components/form-control/form/index.js +2 -0
- package/components/form-control/form-group/index.js +6 -1
- package/components/form-control/helper-text/index.js +9 -2
- package/components/form-control/input-base/index.js +73 -9
- package/components/form-control/label/index.js +12 -2
- package/components/form-control/money-input/index.js +143 -54
- package/components/form-control/number-input/index.js +124 -26
- package/components/form-control/number-input/index2.js +119 -78
- package/components/form-control/phone-input/index.js +85 -23
- package/components/form-control/radio/index.js +28 -9
- package/components/form-control/text-input/index.js +46 -10
- package/components/form-control/time-picker/index.js +71 -14
- package/components/form-control/time-picker/swiper.js +73 -21
- package/components/form-control/toggle/index.js +23 -8
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +14 -0
- package/components/form-view/input.js +13 -2
- package/components/form-view/label.js +2 -0
- package/components/grid/Col.js +16 -2
- package/components/grid/Container.js +21 -2
- package/components/grid/Row.js +21 -2
- package/components/grid/index.js +44 -2
- package/components/image/index.js +22 -2
- package/components/index.js +31 -62
- package/components/list/list-item-action.js +9 -0
- package/components/list/list-item-icon.js +9 -0
- package/components/list/list-item-text.js +5 -0
- package/components/list/list-item.js +11 -0
- package/components/list/list.js +13 -0
- package/components/list/sub-header.js +4 -0
- package/components/modal/body.js +6 -2
- package/components/modal/footer.js +11 -2
- package/components/modal/header.js +12 -2
- package/components/modal/index.js +10 -2
- package/components/modal/modal.js +52 -11
- package/components/others/extra/index.js +10 -3
- package/components/others/import/index.js +7 -0
- package/components/others/option-wrapper/index.js +7 -4
- package/components/others/scrollbar/index.js +3 -0
- package/components/paging/page-info.js +99 -35
- package/components/paging/page-selector.js +35 -7
- package/components/paging/page-selector2.js +74 -35
- package/components/paper/index.js +11 -0
- package/components/popover/body.js +6 -2
- package/components/popover/footer.js +11 -2
- package/components/popover/header.js +7 -2
- package/components/popover/index.js +146 -54
- package/components/popup/danger_popup.js +19 -0
- package/components/popup/index.js +48 -2
- package/components/popup/proposals_popup.js +49 -10
- package/components/popup/v2/index.js +47 -13
- package/components/progress/circular.js +48 -10
- package/components/progress/linear.js +20 -4
- package/components/rating/index.js +32 -8
- package/components/slider/slider-container.js +40 -3
- package/components/slider/slider-item.js +25 -10
- package/components/status/index.js +14 -2
- package/components/tab/tab-container.js +18 -4
- package/components/tab/tab-header.js +24 -4
- package/components/tab/tab-panel.js +16 -4
- package/components/tab/tab.js +30 -6
- package/components/tooltip/index.js +97 -12
- package/components/tooltip/portal.js +2 -0
- package/components/transfer/index.js +70 -25
- package/components/tree-view/index.js +202 -62
- package/components/typography/index.js +70 -47
- package/global/index.js +8 -0
- package/icons/basic.js +232 -0
- package/icons/effect.js +32 -15
- package/icons/general/clock/clock.js +2 -0
- package/icons/general/color-handler/background.js +2 -0
- package/icons/general/color-handler/text.js +2 -0
- package/icons/general/emoji/emoji.js +2 -0
- package/icons/general/font-properties/bold.js +2 -0
- package/icons/general/font-properties/font-family.js +2 -0
- package/icons/general/font-properties/font-size.js +2 -0
- package/icons/general/font-properties/italic.js +2 -0
- package/icons/general/font-properties/underline.js +2 -0
- package/icons/general/hyperlink/hyperlink.js +2 -0
- package/icons/general/indent/decrease.js +2 -0
- package/icons/general/indent/increase.js +2 -0
- package/icons/general/list/bullets.js +2 -0
- package/icons/general/list/numbering.js +2 -0
- package/icons/general/picture/picture.js +2 -0
- package/icons/general/steps/redo.js +2 -0
- package/icons/general/steps/undo.js +2 -0
- package/icons/general/text-align/center.js +2 -0
- package/icons/general/text-align/justify.js +2 -0
- package/icons/general/text-align/left.js +2 -0
- package/icons/general/text-align/right.js +2 -0
- package/icons/menu/dhr.js +1 -2
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +15 -2
- package/package.json +42 -42
- package/readme.md +1027 -1022
- package/styles/animation.js +58 -15
- package/styles/color-helper.js +157 -127
- package/styles/colors.js +9 -17
- package/styles/general.js +80 -18
- package/styles/typography.js +4 -4
- package/styles/utils.js +20 -19
- package/theme/createBreakpoints.js +18 -7
- package/theme/make-styles.js +5 -2
- package/theme/set-theme.js +9 -6
- package/theme/settings.js +2 -3
- package/theme/theme-provider.js +1 -0
- package/utils/array/array.js +54 -45
- package/utils/{classNames.js → classNames/index.js} +5 -0
- package/utils/console.js +6 -0
- package/utils/date.js +138 -69
- package/utils/error/error.js +11 -3
- package/utils/error/errors.js +147 -100
- package/utils/getFileType.js +9 -0
- package/utils/handleBreakpoints.js +5 -0
- package/utils/intersectionObserver.js +5 -0
- package/utils/{isMobile.js → isMobile/index.js} +0 -0
- package/utils/iterator.js +9 -0
- package/utils/map-parent.js +10 -3
- package/utils/object/extend.js +10 -0
- package/utils/object/object.js +11 -12
- package/utils/parseHTML.js +1 -0
- package/utils/promisify.js +5 -0
- package/utils/randomString.js +7 -0
- package/utils/remove-unicode.js +1 -0
- package/utils/render-portal.js +9 -1
- package/utils/renderHTML.js +6 -4
- package/utils/renderIcon.js +19 -9
- package/utils/sb-template.js +5 -6
- package/utils/string/capitalize.js +1 -0
- package/utils/string/capitalizeSentenceCase.js +2 -0
- package/utils/string/string.js +13 -0
- package/utils/type.js +21 -0
- package/utils/updatePosition.js +5 -4
- package/utils/useDelayUnmount.js +4 -0
- package/utils/useElementSize.js +3 -9
- package/utils/useEventListener.js +6 -12
- package/utils/useInput.js +6 -0
- package/utils/{useMediaQuery.js → useMediaQuery/index.js} +10 -8
- package/utils/useOnClickOutside.js +4 -2
- package/utils/usePortal.js +19 -12
- package/utils/validate.js +53 -39
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { forwardRef, memo, useEffect, useState, useRef, useImperativeHandle } from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
@@ -11,19 +12,24 @@ const fadeIn = animations.fadeIn;
|
|
|
11
12
|
const regex = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g;
|
|
12
13
|
const googleDriveRegex = /(http(s)?:\/\/.)?(drive\.google\.com\/file\/d\/)/;
|
|
13
14
|
const googleDocsRegex = /(http(s)?:\/\/.)?(docs\.google\.com\/fileview\?)/;
|
|
15
|
+
|
|
14
16
|
const checkURL = link => {
|
|
15
17
|
const res = regex.test(link);
|
|
18
|
+
|
|
16
19
|
if (res) {
|
|
17
20
|
if (googleDriveRegex.test(link)) {
|
|
18
21
|
const id = link.split('/')[0] === 'drive.google.com' ? link.split('/')[3] : link.split('/')[5];
|
|
19
22
|
return `https://docs.google.com/viewer?srcid=${id}&pid=explorer&efh=false&a=v&chrome=false&embedded=true`;
|
|
20
23
|
}
|
|
24
|
+
|
|
21
25
|
if (googleDocsRegex.test(link)) {
|
|
22
26
|
return `https://docs.google.com/viewer?srcid=${link.split('=')[1]}&pid=explorer&efh=false&a=v&chrome=false&embedded=true`;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
29
|
+
|
|
25
30
|
return link;
|
|
26
31
|
};
|
|
32
|
+
|
|
27
33
|
const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
28
34
|
active,
|
|
29
35
|
animation,
|
|
@@ -44,23 +50,23 @@ const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
44
50
|
const ref = useRef(null);
|
|
45
51
|
const iframeRef = useRef(null);
|
|
46
52
|
const [iframeTimeoutId, setIframeTimeoutId] = useState(null);
|
|
53
|
+
|
|
47
54
|
const getViewer = (filePath, fileType) => {
|
|
48
55
|
switch (fileType) {
|
|
49
56
|
case 'image':
|
|
50
57
|
{
|
|
51
|
-
return jsx("img", {
|
|
52
|
-
...props,
|
|
58
|
+
return jsx("img", { ...props,
|
|
53
59
|
className: IDs.image,
|
|
54
60
|
css: imageCSS,
|
|
55
61
|
src: filePath,
|
|
56
62
|
alt: ''
|
|
57
63
|
});
|
|
58
64
|
}
|
|
65
|
+
|
|
59
66
|
case 'word':
|
|
60
67
|
case 'sheet':
|
|
61
68
|
{
|
|
62
|
-
return jsx("iframe", {
|
|
63
|
-
...props,
|
|
69
|
+
return jsx("iframe", { ...props,
|
|
64
70
|
className: IDs.frame,
|
|
65
71
|
css: frameCSS,
|
|
66
72
|
frameBorder: 0,
|
|
@@ -68,10 +74,10 @@ const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
68
74
|
title: fileName
|
|
69
75
|
});
|
|
70
76
|
}
|
|
77
|
+
|
|
71
78
|
case 'pdf':
|
|
72
79
|
{
|
|
73
|
-
return jsx("iframe", {
|
|
74
|
-
...props,
|
|
80
|
+
return jsx("iframe", { ...props,
|
|
75
81
|
ref: iframeRef,
|
|
76
82
|
className: IDs.frame,
|
|
77
83
|
css: frameCSS,
|
|
@@ -82,6 +88,7 @@ const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
82
88
|
onError: updateIframeSrc
|
|
83
89
|
});
|
|
84
90
|
}
|
|
91
|
+
|
|
85
92
|
case 'mp4':
|
|
86
93
|
{
|
|
87
94
|
return jsx("video", {
|
|
@@ -95,10 +102,10 @@ const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
95
102
|
type: "video/mp4"
|
|
96
103
|
}));
|
|
97
104
|
}
|
|
105
|
+
|
|
98
106
|
case 'another':
|
|
99
107
|
{
|
|
100
|
-
return jsx("iframe", {
|
|
101
|
-
...props,
|
|
108
|
+
return jsx("iframe", { ...props,
|
|
102
109
|
className: IDs.frame,
|
|
103
110
|
css: frameCSS,
|
|
104
111
|
frameBorder: 0,
|
|
@@ -106,10 +113,10 @@ const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
106
113
|
title: fileName
|
|
107
114
|
});
|
|
108
115
|
}
|
|
116
|
+
|
|
109
117
|
default:
|
|
110
118
|
{
|
|
111
|
-
return jsx("iframe", {
|
|
112
|
-
...props,
|
|
119
|
+
return jsx("iframe", { ...props,
|
|
113
120
|
className: IDs.frame,
|
|
114
121
|
css: frameCSS,
|
|
115
122
|
frameBorder: 0,
|
|
@@ -119,29 +126,37 @@ const SliderItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
119
126
|
}
|
|
120
127
|
}
|
|
121
128
|
};
|
|
129
|
+
|
|
122
130
|
useEffect(() => {
|
|
123
131
|
const fileType = getFileType(url, undefined, false);
|
|
132
|
+
|
|
124
133
|
if (fileType === 'pdf') {
|
|
125
134
|
const intervalId = setInterval(updateIframeSrc, 2000);
|
|
126
135
|
setIframeTimeoutId(intervalId);
|
|
127
136
|
}
|
|
128
137
|
}, []);
|
|
138
|
+
|
|
129
139
|
const iframeLoaded = () => {
|
|
130
140
|
clearInterval(iframeTimeoutId);
|
|
131
141
|
setIframeTimeoutId(null);
|
|
132
142
|
};
|
|
143
|
+
|
|
133
144
|
const getIframeLink = () => {
|
|
134
145
|
return `https://docs.google.com/gview?url=${url}&embedded=true`;
|
|
135
146
|
};
|
|
147
|
+
|
|
136
148
|
const updateIframeSrc = () => {
|
|
137
149
|
if (iframeRef.current) {
|
|
138
150
|
iframeRef.current.src = getIframeLink();
|
|
139
151
|
}
|
|
140
152
|
};
|
|
153
|
+
|
|
141
154
|
useImperativeHandle(reference, () => {
|
|
142
155
|
const currentRef = ref.current || {};
|
|
143
156
|
const _instance = {}; // methods
|
|
157
|
+
|
|
144
158
|
_instance.__proto__ = {}; // hidden methods
|
|
159
|
+
|
|
145
160
|
currentRef.instance = _instance;
|
|
146
161
|
return currentRef;
|
|
147
162
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { css, jsx } from '@emotion/core';
|
|
4
5
|
import { Icon, Typography } from "./..";
|
|
@@ -40,14 +41,17 @@ const Status = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
40
41
|
const color = colorMap.get(colorProp) || colors[colorProp] || colorProp || systemRest;
|
|
41
42
|
const iconSize = iconSizeMap.get(size);
|
|
42
43
|
const typographySize = typographySizeMap.get(size);
|
|
44
|
+
|
|
43
45
|
const _StatusRootCSS = StatusRootCSS(iconSize, color, size, outlinedPaddingSize);
|
|
46
|
+
|
|
44
47
|
useImperativeHandle(reference, () => {
|
|
45
48
|
const currentRef = ref.current || {};
|
|
46
49
|
currentRef.element = ref.current;
|
|
47
|
-
const _instance = {
|
|
48
|
-
...action
|
|
50
|
+
const _instance = { ...action
|
|
49
51
|
}; // methods
|
|
52
|
+
|
|
50
53
|
_instance.__proto__ = {}; // hidden methods
|
|
54
|
+
|
|
51
55
|
currentRef.instance = _instance;
|
|
52
56
|
return currentRef;
|
|
53
57
|
});
|
|
@@ -73,6 +77,7 @@ const Status = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
73
77
|
}, StatusIconView, StatusTextView);
|
|
74
78
|
}, [className, colorProp, icon, id, size, style, text, viewType]);
|
|
75
79
|
}));
|
|
80
|
+
|
|
76
81
|
const StatusRootCSS = (iconSize, color, size, outlinedPaddingSize) => css`
|
|
77
82
|
${flexRow};
|
|
78
83
|
${itemsCenter};
|
|
@@ -91,6 +96,7 @@ const StatusRootCSS = (iconSize, color, size, outlinedPaddingSize) => css`
|
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
`;
|
|
99
|
+
|
|
94
100
|
const TextCSS = css`
|
|
95
101
|
white-space: nowrap;
|
|
96
102
|
`;
|
|
@@ -105,16 +111,22 @@ Status.defaultProps = {
|
|
|
105
111
|
Status.propTypes = {
|
|
106
112
|
/** Class for component. */
|
|
107
113
|
className: PropTypes.string,
|
|
114
|
+
|
|
108
115
|
/** The color of the component. */
|
|
109
116
|
color: PropTypes.string,
|
|
117
|
+
|
|
110
118
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed before the content. */
|
|
111
119
|
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
120
|
+
|
|
112
121
|
/** The size of the component. */
|
|
113
122
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
123
|
+
|
|
114
124
|
/** Style inline of component. */
|
|
115
125
|
style: PropTypes.object,
|
|
126
|
+
|
|
116
127
|
/** The content of the component. */
|
|
117
128
|
text: PropTypes.string,
|
|
129
|
+
|
|
118
130
|
/** The variant to use. */
|
|
119
131
|
viewType: PropTypes.oneOf(['filled', 'ghost'])
|
|
120
132
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import React, { forwardRef, useState, memo, useEffect, useRef, useImperativeHandle, useMemo } from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
@@ -29,17 +30,20 @@ const TabContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
29
30
|
}));
|
|
30
31
|
if (level === 'level1') level = 'h3';
|
|
31
32
|
if (level === 'level2') level = 'p1';
|
|
33
|
+
|
|
32
34
|
const _TabContainerCSS = TabContainerCSS(direction, width);
|
|
35
|
+
|
|
33
36
|
useEffect(() => {
|
|
34
37
|
if (isNumeric(value)) setTabIndexState(value);else setTabIndexState(tabIndex);
|
|
35
38
|
}, [value, tabIndex]);
|
|
36
39
|
useImperativeHandle(reference, () => {
|
|
37
40
|
const currentRef = ref.current || {};
|
|
38
41
|
currentRef.element = ref.current;
|
|
39
|
-
const _instance = {
|
|
40
|
-
...action
|
|
42
|
+
const _instance = { ...action
|
|
41
43
|
}; // methods
|
|
44
|
+
|
|
42
45
|
_instance.__proto__ = {}; // hidden methods
|
|
46
|
+
|
|
43
47
|
currentRef.instance = _instance;
|
|
44
48
|
return currentRef;
|
|
45
49
|
});
|
|
@@ -62,11 +66,13 @@ const TabContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
62
66
|
}))));
|
|
63
67
|
}, [children, className, direction, level, props, style, tabIndex, width, tabIndexState, value]);
|
|
64
68
|
}));
|
|
69
|
+
|
|
65
70
|
const TabContainerCSS = (direction, width) => css`
|
|
66
71
|
${direction === 'vertical' ? flexRow : flexCol};
|
|
67
72
|
${positionRelative};
|
|
68
73
|
${parseWidth(width)};
|
|
69
74
|
`;
|
|
75
|
+
|
|
70
76
|
TabContainer.defaultProps = {
|
|
71
77
|
className: '',
|
|
72
78
|
direction: 'horizontal',
|
|
@@ -78,22 +84,30 @@ TabContainer.defaultProps = {
|
|
|
78
84
|
TabContainer.propTypes = {
|
|
79
85
|
/** The content of the component. */
|
|
80
86
|
children: PropTypes.node,
|
|
87
|
+
|
|
81
88
|
/** Class for component */
|
|
82
89
|
className: PropTypes.string,
|
|
90
|
+
|
|
83
91
|
/** Direction change the position of Tabs. */
|
|
84
92
|
direction: PropTypes.oneOf(['vertical', 'horizontal']),
|
|
93
|
+
|
|
85
94
|
/** Direction change the size typography of Tab (typesTypography is types of Typography - exp: h1, h2, h3, p1 ...). */
|
|
86
95
|
level: PropTypes.oneOfType([PropTypes.oneOf(['level1', 'level2', ...typographyTypes])]),
|
|
96
|
+
|
|
87
97
|
/** Style inline of component. */
|
|
88
98
|
style: PropTypes.object,
|
|
99
|
+
|
|
89
100
|
/** The value of the currently selected Tab. */
|
|
90
101
|
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
102
|
+
|
|
91
103
|
/** Width of component. */
|
|
92
104
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
105
|
+
|
|
93
106
|
/** Any props else. */
|
|
94
107
|
props: PropTypes.any,
|
|
95
|
-
|
|
96
|
-
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Ref methods.
|
|
97
111
|
*/
|
|
98
112
|
reference: ref
|
|
99
113
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import React, { memo, forwardRef, useContext, useRef, useState, useImperativeHandle, useMemo } from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
@@ -23,6 +24,7 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
23
24
|
...props
|
|
24
25
|
}, reference) => {
|
|
25
26
|
var _ref$current, _ref$current2;
|
|
27
|
+
|
|
26
28
|
const {
|
|
27
29
|
direction
|
|
28
30
|
} = useContext(TabContext);
|
|
@@ -31,22 +33,28 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
31
33
|
const isVertical = direction === 'vertical';
|
|
32
34
|
let showScrollLeftButton = !isVertical && scrollLeft > 0;
|
|
33
35
|
let showScrollRightButton = !isVertical && (ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.offsetWidth) + scrollLeft < (ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.scrollWidth);
|
|
36
|
+
|
|
34
37
|
const _ContainerCSS = ContainerCSS(centered, isVertical, width);
|
|
38
|
+
|
|
35
39
|
const _TabHeaderCSS = TabHeaderCSS(isVertical, width);
|
|
40
|
+
|
|
36
41
|
const scrollLeftButtonCSS = scrollButtonCSS(true, showScrollLeftButton, showScrollRightButton);
|
|
37
42
|
const scrollRightButtonCSS = scrollButtonCSS(false, showScrollLeftButton, showScrollRightButton);
|
|
43
|
+
|
|
38
44
|
const _onClickScrollButton = scrollPrevious => {
|
|
39
45
|
let scrollValue = scrollPrevious ? ref.current.scrollLeft - (ref.current.offsetWidth + 30) : ref.current.scrollLeft + (ref.current.offsetWidth + 30);
|
|
40
46
|
ref.current.scrollLeft = scrollValue;
|
|
41
47
|
setScrollLeft(scrollValue);
|
|
42
48
|
};
|
|
49
|
+
|
|
43
50
|
useImperativeHandle(reference, () => {
|
|
44
51
|
const currentRef = ref.current || {};
|
|
45
52
|
currentRef.element = ref.current;
|
|
46
|
-
const _instance = {
|
|
47
|
-
...action
|
|
53
|
+
const _instance = { ...action
|
|
48
54
|
}; // methods
|
|
55
|
+
|
|
49
56
|
_instance.__proto__ = {}; // hidden methods
|
|
57
|
+
|
|
50
58
|
currentRef.instance = _instance;
|
|
51
59
|
return currentRef;
|
|
52
60
|
});
|
|
@@ -71,6 +79,7 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
71
79
|
ref: ref,
|
|
72
80
|
onScroll: e => {
|
|
73
81
|
var _e$target;
|
|
82
|
+
|
|
74
83
|
return scrollButtons && setScrollLeft((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.scrollLeft) || 0);
|
|
75
84
|
}
|
|
76
85
|
}, React.Children.map(children, child => child && /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -86,6 +95,7 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
86
95
|
}));
|
|
87
96
|
}, [centered, children, className, level, props, scrollButtons, style, width, direction, isVertical, scrollLeft]);
|
|
88
97
|
}));
|
|
98
|
+
|
|
89
99
|
const ContainerCSS = (centered, isVertical, width) => css`
|
|
90
100
|
${flexRow};
|
|
91
101
|
${overflowHidden};
|
|
@@ -97,6 +107,7 @@ const ContainerCSS = (centered, isVertical, width) => css`
|
|
|
97
107
|
max-width: ${isVertical ? 'max-content' : '100%'};
|
|
98
108
|
padding: 0;
|
|
99
109
|
`;
|
|
110
|
+
|
|
100
111
|
const TabHeaderCSS = (isVertical, width) => isVertical ? css`
|
|
101
112
|
${flexCol};
|
|
102
113
|
${parseWidth(width)};
|
|
@@ -115,6 +126,7 @@ const TabHeaderCSS = (isVertical, width) => isVertical ? css`
|
|
|
115
126
|
${displayNone};
|
|
116
127
|
}
|
|
117
128
|
`;
|
|
129
|
+
|
|
118
130
|
const scrollButtonCSS = (scrollPrevious, showScrollLeftButton, showScrollRightButton) => css`
|
|
119
131
|
${parseWidthHeight(24, 24)};
|
|
120
132
|
overflow: initial;
|
|
@@ -127,6 +139,7 @@ const scrollButtonCSS = (scrollPrevious, showScrollLeftButton, showScrollRightBu
|
|
|
127
139
|
}
|
|
128
140
|
}
|
|
129
141
|
`;
|
|
142
|
+
|
|
130
143
|
TabHeader.defaultProps = {
|
|
131
144
|
centered: false,
|
|
132
145
|
className: '',
|
|
@@ -137,20 +150,27 @@ TabHeader.defaultProps = {
|
|
|
137
150
|
TabHeader.propTypes = {
|
|
138
151
|
/** If true, the tabs are centered. */
|
|
139
152
|
centered: PropTypes.bool,
|
|
153
|
+
|
|
140
154
|
/** Element to display in Tab header. */
|
|
141
155
|
children: PropTypes.array,
|
|
156
|
+
|
|
142
157
|
/** Class for component. */
|
|
143
158
|
className: PropTypes.string,
|
|
159
|
+
|
|
144
160
|
/** If true, show scroll buttons. */
|
|
145
161
|
scrollButtons: PropTypes.bool,
|
|
162
|
+
|
|
146
163
|
/** Style inline of component. */
|
|
147
164
|
style: PropTypes.object,
|
|
165
|
+
|
|
148
166
|
/** Width of component. */
|
|
149
167
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
168
|
+
|
|
150
169
|
/** Any props else. */
|
|
151
170
|
props: PropTypes.any,
|
|
152
|
-
|
|
153
|
-
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Ref methods.
|
|
154
174
|
*/
|
|
155
175
|
reference: ref
|
|
156
176
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, forwardRef, useContext, useRef, useEffect, useState, useImperativeHandle, useMemo } from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
@@ -32,17 +33,20 @@ const TabPanel = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
32
33
|
const ref = useRef(null);
|
|
33
34
|
const isVertical = direction === 'vertical';
|
|
34
35
|
const isActive = index === tabIndexState;
|
|
36
|
+
|
|
35
37
|
const _TabPanelCSS = TabPanelCSS(isVertical, isActive);
|
|
38
|
+
|
|
36
39
|
useEffect(() => {
|
|
37
40
|
if (isRendered) return;else if (index === tabIndexState) setIsRendered(true);
|
|
38
41
|
}, [tabIndexState]);
|
|
39
42
|
useImperativeHandle(reference, () => {
|
|
40
43
|
const currentRef = ref.current || {};
|
|
41
44
|
currentRef.element = ref.current;
|
|
42
|
-
const _instance = {
|
|
43
|
-
...action
|
|
45
|
+
const _instance = { ...action
|
|
44
46
|
}; // methods
|
|
47
|
+
|
|
45
48
|
_instance.__proto__ = {}; // hidden methods
|
|
49
|
+
|
|
46
50
|
currentRef.instance = _instance;
|
|
47
51
|
return currentRef;
|
|
48
52
|
});
|
|
@@ -59,6 +63,7 @@ const TabPanel = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
59
63
|
}, isActive || !lazyLoading || isRendered ? children : null);
|
|
60
64
|
}, [children, className, index, lazyLoading, props, style, isActive, isRendered, tabIndexState]);
|
|
61
65
|
}));
|
|
66
|
+
|
|
62
67
|
const TabPanelCSS = (isVertical, isActive) => css`
|
|
63
68
|
${flexCol};
|
|
64
69
|
${boxBorder};
|
|
@@ -68,6 +73,7 @@ const TabPanelCSS = (isVertical, isActive) => css`
|
|
|
68
73
|
color: ${main};
|
|
69
74
|
padding: ${spacing([0, isVertical ? 3 : 2.5])};
|
|
70
75
|
`;
|
|
76
|
+
|
|
71
77
|
TabPanel.defaultProps = {
|
|
72
78
|
className: '',
|
|
73
79
|
lazyLoading: false,
|
|
@@ -76,18 +82,24 @@ TabPanel.defaultProps = {
|
|
|
76
82
|
TabPanel.propTypes = {
|
|
77
83
|
/** The content of the component. */
|
|
78
84
|
children: PropTypes.node,
|
|
85
|
+
|
|
79
86
|
/** Class for component. */
|
|
80
87
|
className: PropTypes.string,
|
|
88
|
+
|
|
81
89
|
/** Index received in position of TabHeaderButton. */
|
|
82
90
|
index: PropTypes.number,
|
|
91
|
+
|
|
83
92
|
/** Lazy loading mode. */
|
|
84
93
|
lazyLoading: PropTypes.bool,
|
|
94
|
+
|
|
85
95
|
/** Style inline of component. */
|
|
86
96
|
style: PropTypes.object,
|
|
97
|
+
|
|
87
98
|
/** Any props else. */
|
|
88
99
|
props: PropTypes.any,
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Ref methods.
|
|
91
103
|
*/
|
|
92
104
|
reference: ref
|
|
93
105
|
};
|
package/components/tab/tab.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { forwardRef, memo, useMemo, useContext, useRef, useImperativeHandle } from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
@@ -45,42 +46,51 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
45
46
|
} = useContext(TabContext);
|
|
46
47
|
const ref = useRef(null);
|
|
47
48
|
const isVertical = direction === 'vertical';
|
|
49
|
+
|
|
48
50
|
const _TabButtonCSS = TabButtonCSS(color, isVertical);
|
|
51
|
+
|
|
49
52
|
const _IndicatorCSS = IndicatorCSS(isVertical);
|
|
53
|
+
|
|
50
54
|
const _onClick = event => {
|
|
51
55
|
if (disabled) return;
|
|
52
56
|
onClick ? onClick(event, index) : setTabIndexState(index);
|
|
53
57
|
};
|
|
58
|
+
|
|
54
59
|
useImperativeHandle(reference, () => {
|
|
55
60
|
const currentRef = ref.current || {};
|
|
56
61
|
currentRef.element = ref.current;
|
|
57
|
-
const _instance = {
|
|
58
|
-
...action
|
|
62
|
+
const _instance = { ...action
|
|
59
63
|
}; // methods
|
|
64
|
+
|
|
60
65
|
_instance.__proto__ = {}; // hidden methods
|
|
66
|
+
|
|
61
67
|
currentRef.instance = _instance;
|
|
62
68
|
return currentRef;
|
|
63
69
|
});
|
|
64
70
|
const StartIcon = useMemo(() => {
|
|
65
71
|
let node = startIcon;
|
|
72
|
+
|
|
66
73
|
if (typeof node === 'string') {
|
|
67
74
|
node = jsx(Icon, {
|
|
68
75
|
color: 'currentColor',
|
|
69
76
|
name: startIcon
|
|
70
77
|
});
|
|
71
78
|
}
|
|
79
|
+
|
|
72
80
|
return jsx("span", {
|
|
73
81
|
css: ButtonIconCSS
|
|
74
82
|
}, " ", node, " ");
|
|
75
83
|
}, [startIcon]);
|
|
76
84
|
const EndIcon = useMemo(() => {
|
|
77
85
|
let node = endIcon;
|
|
86
|
+
|
|
78
87
|
if (typeof node === 'string') {
|
|
79
88
|
node = jsx(Icon, {
|
|
80
89
|
color: 'currentColor',
|
|
81
90
|
name: endIcon
|
|
82
91
|
});
|
|
83
92
|
}
|
|
93
|
+
|
|
84
94
|
return jsx("span", {
|
|
85
95
|
css: ButtonIconCSS,
|
|
86
96
|
className: 'end-icon'
|
|
@@ -94,8 +104,7 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
94
104
|
style: style,
|
|
95
105
|
onClick: _onClick,
|
|
96
106
|
...props
|
|
97
|
-
}, startIcon && StartIcon, jsx(Typography, {
|
|
98
|
-
...labelProps,
|
|
107
|
+
}, startIcon && StartIcon, jsx(Typography, { ...labelProps,
|
|
99
108
|
type: level,
|
|
100
109
|
color: 'inherit'
|
|
101
110
|
}, label), children, endIcon && EndIcon, jsx(Ripple, null), jsx("span", {
|
|
@@ -104,6 +113,7 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
104
113
|
}));
|
|
105
114
|
}, [children, className, color, disabled, endIcon, index, label, level, onClick, props, startIcon, style, isVertical, tabIndexState]);
|
|
106
115
|
}));
|
|
116
|
+
|
|
107
117
|
const TabButtonCSS = (color, isVertical) => css`
|
|
108
118
|
${flexRow};
|
|
109
119
|
${overflowHidden};
|
|
@@ -150,6 +160,7 @@ const TabButtonCSS = (color, isVertical) => css`
|
|
|
150
160
|
}
|
|
151
161
|
}
|
|
152
162
|
`;
|
|
163
|
+
|
|
153
164
|
const IndicatorCSS = isVertical => css`
|
|
154
165
|
${positionAbsolute};
|
|
155
166
|
height: ${isVertical ? '100%' : '4px'};
|
|
@@ -160,6 +171,7 @@ const IndicatorCSS = isVertical => css`
|
|
|
160
171
|
transition: transform 0.2s ease-in-out;
|
|
161
172
|
border-radius: 1px;
|
|
162
173
|
`;
|
|
174
|
+
|
|
163
175
|
const ButtonIconCSS = css`
|
|
164
176
|
${flexRow};
|
|
165
177
|
${itemsCenter};
|
|
@@ -183,30 +195,42 @@ TabItem.defaultProps = {
|
|
|
183
195
|
TabItem.propTypes = {
|
|
184
196
|
/** Element to display in Tabs (like label). */
|
|
185
197
|
children: PropTypes.node,
|
|
198
|
+
|
|
186
199
|
/** Class for component. */
|
|
187
200
|
className: PropTypes.string,
|
|
201
|
+
|
|
188
202
|
/** Color for Tabs. */
|
|
189
203
|
color: PropTypes.string,
|
|
204
|
+
|
|
190
205
|
/** If true, the component is disabled. */
|
|
191
206
|
disabled: PropTypes.bool,
|
|
207
|
+
|
|
192
208
|
/** Icon to the right of the button. */
|
|
193
209
|
endIcon: PropTypes.node,
|
|
210
|
+
|
|
194
211
|
/** Index received in position of TabHeaderButton. */
|
|
195
212
|
index: PropTypes.number,
|
|
213
|
+
|
|
196
214
|
/** Data string, if any. */
|
|
197
215
|
label: PropTypes.string,
|
|
216
|
+
|
|
198
217
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography--title) applied to the `Typography` label. */
|
|
199
218
|
labelProps: PropTypes.object,
|
|
219
|
+
|
|
200
220
|
/** Callback fired when a "click" event is detected. */
|
|
201
221
|
onClick: PropTypes.func,
|
|
222
|
+
|
|
202
223
|
/** Icon to the left of the button. */
|
|
203
224
|
startIcon: PropTypes.node,
|
|
225
|
+
|
|
204
226
|
/** Style inline of component. */
|
|
205
227
|
style: PropTypes.object,
|
|
228
|
+
|
|
206
229
|
/** Any props else. */
|
|
207
230
|
props: PropTypes.any,
|
|
208
|
-
|
|
209
|
-
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Ref methods.
|
|
210
234
|
*/
|
|
211
235
|
reference: ref
|
|
212
236
|
};
|