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, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -58,13 +57,12 @@ const alphaArr = {
|
|
|
58
57
|
focus: 0.2,
|
|
59
58
|
active: 0.3
|
|
60
59
|
};
|
|
61
|
-
const alphaLoading = 0.2;
|
|
60
|
+
const alphaLoading = 0.2;
|
|
61
|
+
// customIconSize calculated based on design size
|
|
62
62
|
// Button size <= 24 => icon size = Button size - 8
|
|
63
63
|
// Button size > 24 && <= 32 => icon size = Button size - 12
|
|
64
64
|
// Button size > 32 => icon size = Button size - 16
|
|
65
|
-
|
|
66
65
|
const customIconSize = width => width <= 24 ? width - 8 : width <= 32 ? width - 12 : width - 16;
|
|
67
|
-
|
|
68
66
|
const IconLoadingView = iconSize => {
|
|
69
67
|
return jsx(CircularProgress, {
|
|
70
68
|
size: 'extraSmall',
|
|
@@ -74,7 +72,6 @@ const IconLoadingView = iconSize => {
|
|
|
74
72
|
width: parseInt(iconSize)
|
|
75
73
|
});
|
|
76
74
|
};
|
|
77
|
-
|
|
78
75
|
const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
79
76
|
action = {},
|
|
80
77
|
children,
|
|
@@ -95,7 +92,6 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
95
92
|
width
|
|
96
93
|
}, reference) => {
|
|
97
94
|
var _sizeMap$get, _sizeMap$get2;
|
|
98
|
-
|
|
99
95
|
const ref = useRef(null);
|
|
100
96
|
const rippleRef = useRef(null);
|
|
101
97
|
const buttonSize = ((_sizeMap$get = sizeMap.get(size)) === null || _sizeMap$get === void 0 ? void 0 : _sizeMap$get.buttonSize) || '40px';
|
|
@@ -103,25 +99,19 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
103
99
|
const isViewTypeGhost = viewType === 'ghost';
|
|
104
100
|
const color = colors[colorProp] || colorProp;
|
|
105
101
|
colorHover = colors[colorHover] || colorHover;
|
|
106
|
-
|
|
107
102
|
const _ButtonRootCSS = ButtonRootCSS(circular, colorHover, color, name);
|
|
108
|
-
|
|
109
103
|
const _ButtonSizeCSS = ButtonSizeCSS(width, height, buttonSize, iconSize);
|
|
110
|
-
|
|
111
104
|
const _ButtonIconCSS = ButtonIconCSS(iconSize);
|
|
112
|
-
|
|
113
105
|
useImperativeHandle(reference, () => {
|
|
114
106
|
const currentRef = ref.current || {};
|
|
115
107
|
currentRef.element = ref.current;
|
|
116
|
-
const _instance = {
|
|
108
|
+
const _instance = {
|
|
109
|
+
...action
|
|
117
110
|
}; // methods
|
|
118
|
-
|
|
119
111
|
_instance.__proto__ = {}; // hidden methods
|
|
120
|
-
|
|
121
112
|
currentRef.instance = _instance;
|
|
122
113
|
return currentRef;
|
|
123
114
|
});
|
|
124
|
-
|
|
125
115
|
const _onClick = event => {
|
|
126
116
|
event.persist();
|
|
127
117
|
onClick && event.stopPropagation();
|
|
@@ -129,7 +119,6 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
129
119
|
if (!isViewTypeGhost) rippleRef.current.start(event);
|
|
130
120
|
onClick && onClick(event);
|
|
131
121
|
};
|
|
132
|
-
|
|
133
122
|
return useMemo(() => {
|
|
134
123
|
return jsx("button", {
|
|
135
124
|
css: [_ButtonRootCSS, _ButtonSizeCSS, disabled && ButtonDisabledCSS],
|
|
@@ -154,7 +143,6 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
154
143
|
}));
|
|
155
144
|
}, [children, circular, className, colorProp, colorHover, disabled, height, id, loading, name, onClick, size, style, viewBox, viewType, width]);
|
|
156
145
|
}));
|
|
157
|
-
|
|
158
146
|
const ButtonIconCSS = iconSize => css`
|
|
159
147
|
${flexRow};
|
|
160
148
|
${positionRelative};
|
|
@@ -164,7 +152,6 @@ const ButtonIconCSS = iconSize => css`
|
|
|
164
152
|
${parseWidthHeight(iconSize)};
|
|
165
153
|
${parseMinWidthHeight(iconSize)};
|
|
166
154
|
`;
|
|
167
|
-
|
|
168
155
|
const ButtonDisabledCSS = `
|
|
169
156
|
cursor: not-allowed !important;
|
|
170
157
|
color: ${systemDisabled} !important;
|
|
@@ -180,7 +167,6 @@ const ButtonDisabledCSS = `
|
|
|
180
167
|
background-color: transparent !important;
|
|
181
168
|
}
|
|
182
169
|
`;
|
|
183
|
-
|
|
184
170
|
const ButtonSizeCSS = (width, height, buttonSize, iconSize) => css`
|
|
185
171
|
${parseWidthHeight(width || buttonSize, height || buttonSize)};
|
|
186
172
|
${parseMinWidthHeight(width || buttonSize, height || buttonSize)};
|
|
@@ -189,7 +175,6 @@ const ButtonSizeCSS = (width, height, buttonSize, iconSize) => css`
|
|
|
189
175
|
${parseMinWidthHeight(width || iconSize, height || iconSize)};
|
|
190
176
|
}
|
|
191
177
|
`;
|
|
192
|
-
|
|
193
178
|
const ButtonRootCSS = (circular, colorHover, color, name) => css`
|
|
194
179
|
${displayInlineFlex};
|
|
195
180
|
${positionRelative};
|
|
@@ -304,7 +289,6 @@ const ButtonRootCSS = (circular, colorHover, color, name) => css`
|
|
|
304
289
|
}
|
|
305
290
|
}
|
|
306
291
|
`;
|
|
307
|
-
|
|
308
292
|
ButtonIcon.defaultProps = {
|
|
309
293
|
circular: false,
|
|
310
294
|
className: '',
|
|
@@ -318,70 +302,55 @@ ButtonIcon.defaultProps = {
|
|
|
318
302
|
ButtonIcon.propTypes = {
|
|
319
303
|
/** The content of the component. */
|
|
320
304
|
children: PropTypes.node,
|
|
321
|
-
|
|
322
305
|
/** If `true`, component is circular. */
|
|
323
306
|
circular: PropTypes.bool,
|
|
324
|
-
|
|
325
307
|
/** Class for component. */
|
|
326
308
|
className: PropTypes.string,
|
|
327
|
-
|
|
328
309
|
/** The color of the component. */
|
|
329
310
|
color: PropTypes.string,
|
|
330
|
-
|
|
331
311
|
/** Custom hover color for button with color 'default'. */
|
|
332
312
|
colorHover: PropTypes.string,
|
|
333
|
-
|
|
334
313
|
/** If `true`, the component is disabled. */
|
|
335
314
|
disabled: PropTypes.bool,
|
|
336
|
-
|
|
337
315
|
/** Height oof the component. */
|
|
338
316
|
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
339
|
-
|
|
340
317
|
/** If `true`, the loading indicator is shown. */
|
|
341
318
|
loading: PropTypes.bool,
|
|
342
|
-
|
|
343
319
|
/** Callback fired when the component is clicked. */
|
|
344
320
|
onClick: PropTypes.func,
|
|
345
|
-
|
|
346
321
|
/** Name of [icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic). */
|
|
347
322
|
name: PropTypes.string,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* *
|
|
353
|
-
* *
|
|
354
|
-
* *
|
|
355
|
-
* *
|
|
356
|
-
* * giant (button 56px, icon 40px)
|
|
323
|
+
/**
|
|
324
|
+
* The size of the component.
|
|
325
|
+
*
|
|
326
|
+
* * tiny (button 24px, icon 16px)
|
|
327
|
+
* * small (button 32px, icon 20px)
|
|
328
|
+
* * medium (button 40px, icon 24px)
|
|
329
|
+
* * large (button 48px, icon 32px)
|
|
330
|
+
* * giant (button 56px, icon 40px)
|
|
357
331
|
* */
|
|
358
332
|
size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant', 'extraGiant']),
|
|
359
|
-
|
|
360
333
|
/** Style inline of component. */
|
|
361
334
|
style: PropTypes.object,
|
|
362
|
-
|
|
363
335
|
/** If `true`, icon has view box. */
|
|
364
336
|
viewBox: PropTypes.bool,
|
|
365
|
-
|
|
366
337
|
/** The variant to use. */
|
|
367
338
|
viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'ghost']),
|
|
368
|
-
|
|
369
339
|
/** Width of the component. */
|
|
370
340
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* *
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
* * @param {
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
* * @param {options} - object
|
|
341
|
+
/**
|
|
342
|
+
* ref methods (ref.current.instance.*method*)
|
|
343
|
+
*
|
|
344
|
+
* * option(): Gets all UI component properties
|
|
345
|
+
* * Returns value - object
|
|
346
|
+
* * option(optionName): Gets the value of a single property
|
|
347
|
+
* * @param {optionName} - string
|
|
348
|
+
* * Returns value - any
|
|
349
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
350
|
+
* * @param {optionName} - string
|
|
351
|
+
* * @param {optionValue} - any
|
|
352
|
+
* * option(options): Updates the values of several properties
|
|
353
|
+
* * @param {options} - object
|
|
385
354
|
*/
|
|
386
355
|
reference: ref
|
|
387
356
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import { CircularProgress, Icon, Typography } from "./..";
|
|
@@ -36,42 +35,31 @@ export const getRippleColor = (color, viewType, colors) => {
|
|
|
36
35
|
if (!isColor(color) && !isColorName(color)) {
|
|
37
36
|
let level = 3;
|
|
38
37
|
let name = color;
|
|
39
|
-
|
|
40
38
|
if (name === 'primary') {
|
|
41
39
|
name = 'formal';
|
|
42
40
|
}
|
|
43
|
-
|
|
44
41
|
const isSystemColor = colors[name + level];
|
|
45
|
-
|
|
46
42
|
if (isSystemColor) {
|
|
47
43
|
if (viewType === 'filled') {
|
|
48
44
|
level = 7;
|
|
49
45
|
}
|
|
50
|
-
|
|
51
46
|
return colors[name + level];
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
|
-
|
|
55
49
|
if (isColorName(color)) {
|
|
56
50
|
return fade(isColorName(color), 0.5);
|
|
57
51
|
}
|
|
58
|
-
|
|
59
52
|
const colorType = detectColor(color);
|
|
60
|
-
|
|
61
53
|
switch (colorType) {
|
|
62
54
|
case 'hex':
|
|
63
55
|
case 'hexa':
|
|
64
56
|
return rgbaToHexA(fade(color, 0.5));
|
|
65
|
-
|
|
66
57
|
case 'rgb':
|
|
67
58
|
return rgbToHex(fade(color, 0.5));
|
|
68
|
-
|
|
69
59
|
case 'rgba':
|
|
70
60
|
return rgbaToHexA(fade(color, 0.5));
|
|
71
|
-
|
|
72
61
|
case 'hsl':
|
|
73
62
|
return rgbToHex(hslToRgb(fade(color, 0.5)));
|
|
74
|
-
|
|
75
63
|
case 'hsla':
|
|
76
64
|
return rgbaToHexA(hslToRgb(fade(color, 0.5)));
|
|
77
65
|
}
|
|
@@ -128,24 +116,17 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
128
116
|
const color = colors[colorProp] || colorProp;
|
|
129
117
|
const isViewTypeLink = viewType === 'link';
|
|
130
118
|
const TagName = href ? 'a' : 'button';
|
|
131
|
-
|
|
132
119
|
const _ButtonRootCSS = ButtonRootCSS(color);
|
|
133
|
-
|
|
134
120
|
const _ButtonIcon = ButtonIconCSS(endIcon, label, startIcon, iconMarginSize, iconSize);
|
|
135
|
-
|
|
136
121
|
const _ButtonTextCSS = ButtonTextCSS(loading, iconMarginSize);
|
|
137
|
-
|
|
138
122
|
const _ButtonSizeCSS = ButtonSizeCSS(paddingSize, minHeightSize, minHeightSizeLink, outlinedPaddingSize, iconSize);
|
|
139
|
-
|
|
140
123
|
const _onClick = e => {
|
|
141
124
|
if (href) e.preventDefault(); //Prevent open link when click
|
|
142
|
-
|
|
143
125
|
onClick && stopPropagation && e.stopPropagation();
|
|
144
126
|
if (disabled || loading) return;
|
|
145
127
|
if (!isViewTypeLink) rippleRef.current.start(e);
|
|
146
128
|
onClick && onClick(e);
|
|
147
129
|
};
|
|
148
|
-
|
|
149
130
|
useEffect(() => {
|
|
150
131
|
if (href) {
|
|
151
132
|
const qs = urlParams ? '?' + new URLSearchParams(urlParams).toString() : '';
|
|
@@ -156,17 +137,15 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
156
137
|
useImperativeHandle(reference, () => {
|
|
157
138
|
const currentRef = ref.current || {};
|
|
158
139
|
currentRef.element = ref.current;
|
|
159
|
-
const _instance = {
|
|
140
|
+
const _instance = {
|
|
141
|
+
...action
|
|
160
142
|
}; // methods
|
|
161
|
-
|
|
162
143
|
_instance.__proto__ = {}; // hidden methods
|
|
163
|
-
|
|
164
144
|
currentRef.instance = _instance;
|
|
165
145
|
return currentRef;
|
|
166
146
|
});
|
|
167
147
|
const StartIcon = useMemo(() => {
|
|
168
148
|
let node = startIcon;
|
|
169
|
-
|
|
170
149
|
if (typeof node === 'string') {
|
|
171
150
|
node = jsx(Icon, {
|
|
172
151
|
name: node,
|
|
@@ -180,7 +159,6 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
180
159
|
className: 'DGN-UI-Button-Start-Icon'
|
|
181
160
|
}, node);
|
|
182
161
|
}
|
|
183
|
-
|
|
184
162
|
return jsx("span", {
|
|
185
163
|
css: _ButtonIcon,
|
|
186
164
|
className: 'DGN-UI-Button-Custom-Start-Icon'
|
|
@@ -188,7 +166,6 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
188
166
|
}, [startIcon, size]);
|
|
189
167
|
const EndIcon = useMemo(() => {
|
|
190
168
|
let node = endIcon;
|
|
191
|
-
|
|
192
169
|
if (typeof node === 'string') {
|
|
193
170
|
node = jsx(Icon, {
|
|
194
171
|
name: node,
|
|
@@ -202,13 +179,11 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
202
179
|
className: 'DGN-UI-Button-End-Icon'
|
|
203
180
|
}, node);
|
|
204
181
|
}
|
|
205
|
-
|
|
206
182
|
return jsx("span", {
|
|
207
183
|
css: _ButtonIcon,
|
|
208
184
|
className: 'DGN-UI-Button-Custom-End-Icon'
|
|
209
185
|
}, node);
|
|
210
186
|
}, [endIcon, size]);
|
|
211
|
-
|
|
212
187
|
const iconLoading = () => {
|
|
213
188
|
return jsx(CircularProgress, {
|
|
214
189
|
className: 'DGN-UI-Button-Loading',
|
|
@@ -217,29 +192,25 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
217
192
|
size: parseInt(iconSize)
|
|
218
193
|
});
|
|
219
194
|
};
|
|
220
|
-
|
|
221
195
|
return useMemo(() => {
|
|
222
196
|
// 1. Có StartIcon => thay StartIcon
|
|
223
197
|
// 2. Có EndIcon => thay EndIcon
|
|
224
198
|
// 3. Có StartIcon + EndIcon => thay StartIcon
|
|
225
199
|
// 4. Không có Icon => hiện thêm icon loading ở đầu
|
|
200
|
+
|
|
226
201
|
let start = startIcon ? StartIcon : jsx("span", {
|
|
227
202
|
className: 'no-icon'
|
|
228
203
|
});
|
|
229
204
|
let end = endIcon ? EndIcon : null;
|
|
230
|
-
|
|
231
205
|
if (loading) {
|
|
232
206
|
if (startIcon) start = iconLoading();
|
|
233
207
|
if (endIcon) end = iconLoading();
|
|
234
|
-
|
|
235
208
|
if (startIcon && endIcon) {
|
|
236
209
|
start = iconLoading();
|
|
237
210
|
end = EndIcon;
|
|
238
211
|
}
|
|
239
|
-
|
|
240
212
|
if (!startIcon && !endIcon) start = iconLoading();
|
|
241
213
|
}
|
|
242
|
-
|
|
243
214
|
return jsx(TagName, {
|
|
244
215
|
css: [_ButtonRootCSS, _ButtonSizeCSS, disabled && ButtonDisabledCSS],
|
|
245
216
|
ref: ref,
|
|
@@ -261,7 +232,6 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
261
232
|
}) : null);
|
|
262
233
|
}, [children, className, colorProp, disabled, endIcon, href, id, label, loading, onClick, size, startIcon, stopPropagation, type, urlParams, viewType, urlState]);
|
|
263
234
|
}));
|
|
264
|
-
|
|
265
235
|
const ButtonIconCSS = (endIcon, label, startIcon, iconMarginSize, iconSize) => css`
|
|
266
236
|
${flexRow};
|
|
267
237
|
${itemsCenter};
|
|
@@ -279,13 +249,11 @@ const ButtonIconCSS = (endIcon, label, startIcon, iconMarginSize, iconSize) => c
|
|
|
279
249
|
${parseWidthHeight(iconSize)};
|
|
280
250
|
}
|
|
281
251
|
`;
|
|
282
|
-
|
|
283
252
|
const ButtonTextCSS = (loading, iconMarginSize) => css`
|
|
284
253
|
white-space: nowrap;
|
|
285
254
|
color: inherit;
|
|
286
255
|
margin: 0 ${loading ? iconMarginSize : 0};
|
|
287
256
|
`;
|
|
288
|
-
|
|
289
257
|
const ButtonDisabledCSS = css`
|
|
290
258
|
cursor: not-allowed !important;
|
|
291
259
|
color: ${systemDisabled} !important;
|
|
@@ -301,7 +269,6 @@ const ButtonDisabledCSS = css`
|
|
|
301
269
|
background-color: transparent !important;
|
|
302
270
|
}
|
|
303
271
|
`;
|
|
304
|
-
|
|
305
272
|
const ButtonSizeCSS = (paddingSize, minHeightSize, minHeightSizeLink, outlinedPaddingSize, iconSize) => css`
|
|
306
273
|
padding: ${paddingSize};
|
|
307
274
|
${parseMinWidthHeight('max-content', minHeightSize)};
|
|
@@ -317,7 +284,6 @@ const ButtonSizeCSS = (paddingSize, minHeightSize, minHeightSizeLink, outlinedPa
|
|
|
317
284
|
${parseMinWidth(0)};
|
|
318
285
|
}
|
|
319
286
|
`;
|
|
320
|
-
|
|
321
287
|
const ButtonRootCSS = color => css`
|
|
322
288
|
${displayInlineFlex};
|
|
323
289
|
${itemsCenter};
|
|
@@ -433,7 +399,6 @@ const ButtonRootCSS = color => css`
|
|
|
433
399
|
}
|
|
434
400
|
}
|
|
435
401
|
`;
|
|
436
|
-
|
|
437
402
|
Button.defaultProps = {
|
|
438
403
|
className: '',
|
|
439
404
|
color: 'default',
|
|
@@ -447,59 +412,45 @@ Button.defaultProps = {
|
|
|
447
412
|
Button.propTypes = {
|
|
448
413
|
/** The content of the component. */
|
|
449
414
|
children: PropTypes.node,
|
|
450
|
-
|
|
451
415
|
/** Class for component. */
|
|
452
416
|
className: PropTypes.string,
|
|
453
|
-
|
|
454
417
|
/** The color of the component. */
|
|
455
418
|
color: PropTypes.string,
|
|
456
|
-
|
|
457
419
|
/** If `true`, the component is disabled. */
|
|
458
420
|
disabled: PropTypes.bool,
|
|
459
|
-
|
|
460
421
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed after the children. */
|
|
461
422
|
endIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
462
|
-
|
|
463
423
|
/** The URL to link to when the button is clicked. If defined, an `a` element will be used as the root node. */
|
|
464
424
|
href: PropTypes.string,
|
|
465
|
-
|
|
466
425
|
/** The content of the component. */
|
|
467
426
|
label: PropTypes.string,
|
|
468
|
-
|
|
469
427
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography--title) applied to the `Typography` label. */
|
|
470
428
|
labelProps: PropTypes.object,
|
|
471
|
-
|
|
472
429
|
/** If `true`, the loading indicator is shown. */
|
|
473
430
|
loading: PropTypes.bool,
|
|
474
|
-
|
|
475
431
|
/** Callback fired when the component is clicked. */
|
|
476
432
|
onClick: PropTypes.func,
|
|
477
|
-
|
|
478
433
|
/** The size of the component. */
|
|
479
434
|
size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
|
|
480
|
-
|
|
481
435
|
/** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed before the children. */
|
|
482
436
|
startIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
483
|
-
|
|
484
437
|
/** Query params pass to url. */
|
|
485
438
|
urlParams: PropTypes.object,
|
|
486
|
-
|
|
487
439
|
/** The variant to use. */
|
|
488
440
|
viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'link']),
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
* *
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* * @param {
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
* * @param {options} - object
|
|
441
|
+
/**
|
|
442
|
+
* ref methods (ref.current.instance.*method*)
|
|
443
|
+
*
|
|
444
|
+
* * option(): Gets all UI component properties
|
|
445
|
+
* * Returns value - object
|
|
446
|
+
* * option(optionName): Gets the value of a single property
|
|
447
|
+
* * @param {optionName} - string
|
|
448
|
+
* * Returns value - any
|
|
449
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
450
|
+
* * @param {optionName} - string
|
|
451
|
+
* * @param {optionValue} - any
|
|
452
|
+
* * option(options): Updates the values of several properties
|
|
453
|
+
* * @param {options} - object
|
|
503
454
|
*/
|
|
504
455
|
reference: ref
|
|
505
456
|
};
|
|
@@ -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,40 +37,32 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
38
37
|
const ref = useRef(null);
|
|
39
38
|
const [openState, setOpenState] = useState(false);
|
|
40
39
|
const [iconState, setIconState] = useState(false);
|
|
41
|
-
|
|
42
40
|
const _PopoverCSS = PopoverCSS(isOptionFull);
|
|
43
|
-
|
|
44
41
|
const openPopover = () => {
|
|
45
42
|
setOpenState(true);
|
|
46
43
|
};
|
|
47
|
-
|
|
48
44
|
const closePopover = () => {
|
|
49
45
|
setOpenState(false);
|
|
50
46
|
};
|
|
51
|
-
|
|
52
47
|
useImperativeHandle(reference, () => {
|
|
53
48
|
const currentRef = ref.current || {};
|
|
54
49
|
currentRef.element = ref.current;
|
|
55
|
-
const _instance = {
|
|
50
|
+
const _instance = {
|
|
51
|
+
...action
|
|
56
52
|
}; // methods
|
|
57
|
-
|
|
58
53
|
_instance.__proto__ = {}; // hidden methods
|
|
59
|
-
|
|
60
54
|
currentRef.instance = _instance;
|
|
61
55
|
return currentRef;
|
|
62
56
|
});
|
|
63
|
-
|
|
64
57
|
const renderOptions = () => {
|
|
65
58
|
return options.map((item, idx) => {
|
|
66
59
|
if ( /*#__PURE__*/isValidElement(item)) return item;else {
|
|
67
60
|
const icon = item === null || item === void 0 ? void 0 : item.icon;
|
|
68
61
|
const label = item === null || item === void 0 ? void 0 : item.label;
|
|
69
|
-
|
|
70
62
|
const action = () => {
|
|
71
63
|
closePopover();
|
|
72
64
|
if (typeof (item === null || item === void 0 ? void 0 : item.action) === 'function') item === null || item === void 0 ? void 0 : item.action();
|
|
73
65
|
};
|
|
74
|
-
|
|
75
66
|
if (icon && !iconState) setIconState(true);
|
|
76
67
|
return isOptionFull ? jsx("button", {
|
|
77
68
|
key: idx,
|
|
@@ -99,7 +90,6 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
99
90
|
}
|
|
100
91
|
});
|
|
101
92
|
};
|
|
102
|
-
|
|
103
93
|
return useMemo(() => {
|
|
104
94
|
return jsx(Popover, {
|
|
105
95
|
css: _PopoverCSS,
|
|
@@ -129,12 +119,10 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
129
119
|
}, renderOptions());
|
|
130
120
|
}, [buttonProps, className, disabled, id, options, optionType, popoverProp, style, iconState, openState]);
|
|
131
121
|
}));
|
|
132
|
-
|
|
133
122
|
const PopoverCSS = isOptionFull => css`
|
|
134
123
|
${isOptionFull ? flexCol : flexRow};
|
|
135
124
|
padding: ${isOptionFull ? spacing([1, 0]) : spacing([0, 2])};
|
|
136
125
|
`;
|
|
137
|
-
|
|
138
126
|
const OptionFullCSS = css`
|
|
139
127
|
${flexRow};
|
|
140
128
|
${itemsCenter};
|
|
@@ -168,45 +156,37 @@ ButtonMore.defaultProps = {
|
|
|
168
156
|
ButtonMore.propTypes = {
|
|
169
157
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/buttonicon) applied to the main `ButtonIcon`. */
|
|
170
158
|
buttonProps: PropTypes.object,
|
|
171
|
-
|
|
172
159
|
/** Class for component. */
|
|
173
160
|
className: PropTypes.string,
|
|
174
|
-
|
|
175
161
|
/** If `true`, the component is disabled. */
|
|
176
162
|
disabled: PropTypes.bool,
|
|
177
|
-
|
|
178
163
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography) applied to the `Typography` label. */
|
|
179
164
|
labelProp: PropTypes.object,
|
|
180
|
-
|
|
181
165
|
/** Option(s) in popover. */
|
|
182
166
|
option: PropTypes.arrayOf(PropTypes.shape({
|
|
183
167
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
184
168
|
icon: PropTypes.string,
|
|
185
169
|
action: PropTypes.func
|
|
186
170
|
})),
|
|
187
|
-
|
|
188
171
|
/** The variant of option's type. */
|
|
189
172
|
optionType: PropTypes.oneOf(['full', 'icon']),
|
|
190
|
-
|
|
191
173
|
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/overplay-popover) applied to the main `Popover`. */
|
|
192
174
|
popoverProp: PropTypes.object,
|
|
193
|
-
|
|
194
175
|
/** Style inline of component. */
|
|
195
176
|
style: PropTypes.object,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* *
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* * @param {
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* * @param {options} - object
|
|
177
|
+
/**
|
|
178
|
+
* ref methods (ref.current.instance.*method*)
|
|
179
|
+
*
|
|
180
|
+
* * option(): Gets all UI component properties
|
|
181
|
+
* * Returns value - object
|
|
182
|
+
* * option(optionName): Gets the value of a single property
|
|
183
|
+
* * @param {optionName} - string
|
|
184
|
+
* * Returns value - any
|
|
185
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
186
|
+
* * @param {optionName} - string
|
|
187
|
+
* * @param {optionValue} - any
|
|
188
|
+
* * option(options): Updates the values of several properties
|
|
189
|
+
* * @param {options} - object
|
|
210
190
|
*/
|
|
211
191
|
reference: ref
|
|
212
192
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
-
|
|
3
2
|
/** @jsxRuntime classic */
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { css, jsx, keyframes } from '@emotion/core';
|
|
7
5
|
import { forwardRef, memo, useImperativeHandle, useLayoutEffect, useState } from 'react';
|
|
@@ -14,18 +12,15 @@ const {
|
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
} = useTheme();
|
|
17
|
-
|
|
18
15
|
const useDebouncedRippleCleanUp = (rippleCount, duration, cleanUpFunction) => {
|
|
19
16
|
useLayoutEffect(() => {
|
|
20
17
|
if (rippleCount > 0) {
|
|
21
18
|
const bounce = setTimeout(() => cleanUpFunction(), duration);
|
|
22
19
|
return () => clearTimeout(bounce);
|
|
23
20
|
}
|
|
24
|
-
|
|
25
21
|
return undefined;
|
|
26
22
|
}, [rippleCount, duration, cleanUpFunction]);
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
const Ripple = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
30
25
|
duration = 850,
|
|
31
26
|
color = systemWhite,
|
|
@@ -36,9 +31,7 @@ const Ripple = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
36
31
|
useDebouncedRippleCleanUp(rippleArray.length, duration, () => {
|
|
37
32
|
setRippleArray([]);
|
|
38
33
|
});
|
|
39
|
-
|
|
40
34
|
const _RippleChildCSS = RippleChildCSS(circular, color, duration);
|
|
41
|
-
|
|
42
35
|
const addRipple = event => {
|
|
43
36
|
const rippleContainer = event.currentTarget.getBoundingClientRect();
|
|
44
37
|
const size = rippleContainer.width > rippleContainer.height ? rippleContainer.width : rippleContainer.height;
|
|
@@ -51,7 +44,6 @@ const Ripple = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
51
44
|
};
|
|
52
45
|
setRippleArray(prevState => [...prevState, newRippleArray]);
|
|
53
46
|
};
|
|
54
|
-
|
|
55
47
|
useImperativeHandle(ref, () => ({
|
|
56
48
|
start: addRipple
|
|
57
49
|
}));
|
|
@@ -86,7 +78,6 @@ const RippleContainerCSS = css`
|
|
|
86
78
|
inset: 0px;
|
|
87
79
|
border-radius: inherit;
|
|
88
80
|
`;
|
|
89
|
-
|
|
90
81
|
const RippleChildCSS = (circular, color, duration) => css`
|
|
91
82
|
${positionAbsolute};
|
|
92
83
|
${circular ? borderRadius50 : borderRadius100};
|
|
@@ -95,5 +86,4 @@ const RippleChildCSS = (circular, color, duration) => css`
|
|
|
95
86
|
background-color: ${color};
|
|
96
87
|
animation: ${rippleKeyframes} ${duration}ms;
|
|
97
88
|
`;
|
|
98
|
-
|
|
99
89
|
export default Ripple;
|
package/components/card/body.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -18,11 +17,10 @@ const CardBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
18
17
|
useImperativeHandle(reference, () => {
|
|
19
18
|
const currentRef = ref.current || {};
|
|
20
19
|
currentRef.element = ref.current;
|
|
21
|
-
const _instance = {
|
|
20
|
+
const _instance = {
|
|
21
|
+
...action
|
|
22
22
|
}; // methods
|
|
23
|
-
|
|
24
23
|
_instance.__proto__ = {}; // hidden methods
|
|
25
|
-
|
|
26
24
|
currentRef.instance = _instance;
|
|
27
25
|
return currentRef;
|
|
28
26
|
});
|
|
@@ -42,13 +40,10 @@ CardBody.defaultProps = {
|
|
|
42
40
|
CardBody.propTypes = {
|
|
43
41
|
/** The content of the component. */
|
|
44
42
|
children: PropTypes.node,
|
|
45
|
-
|
|
46
43
|
/** Class for component. ({container: '', header: '', body: '', footer: ''}) */
|
|
47
44
|
className: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
48
|
-
|
|
49
45
|
/** If `true`, will have divider between body and footer. */
|
|
50
46
|
style: PropTypes.object,
|
|
51
|
-
|
|
52
47
|
/** The title of the component's header. */
|
|
53
48
|
title: PropTypes.string
|
|
54
49
|
};
|