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,7 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
-
|
|
3
2
|
/** @jsxRuntime classic */
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { css, jsx, keyframes } from '@emotion/core';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
@@ -26,15 +24,12 @@ const {
|
|
|
26
24
|
paragraph3
|
|
27
25
|
}
|
|
28
26
|
} = useTheme();
|
|
29
|
-
|
|
30
27
|
const validatePercent = percent => {
|
|
31
28
|
let per = +percent.toString().replace('%', '');
|
|
32
29
|
return Math.max(Math.min(per, 100), 0);
|
|
33
30
|
};
|
|
34
|
-
|
|
35
31
|
const getDimensionOld = size => {
|
|
36
32
|
let width, labelStyle, rect, strokeWidth;
|
|
37
|
-
|
|
38
33
|
switch (size) {
|
|
39
34
|
case 'xl':
|
|
40
35
|
case 'extraLarge':
|
|
@@ -43,7 +38,6 @@ const getDimensionOld = size => {
|
|
|
43
38
|
rect = 120;
|
|
44
39
|
strokeWidth = 16;
|
|
45
40
|
break;
|
|
46
|
-
|
|
47
41
|
case 'lg':
|
|
48
42
|
case 'large':
|
|
49
43
|
labelStyle = heading2;
|
|
@@ -51,7 +45,6 @@ const getDimensionOld = size => {
|
|
|
51
45
|
rect = 80;
|
|
52
46
|
strokeWidth = 12;
|
|
53
47
|
break;
|
|
54
|
-
|
|
55
48
|
case 'md':
|
|
56
49
|
case 'medium':
|
|
57
50
|
labelStyle = paragraph1;
|
|
@@ -59,7 +52,6 @@ const getDimensionOld = size => {
|
|
|
59
52
|
rect = 60;
|
|
60
53
|
strokeWidth = 8;
|
|
61
54
|
break;
|
|
62
|
-
|
|
63
55
|
case 'sm':
|
|
64
56
|
case 'small':
|
|
65
57
|
labelStyle = paragraph2;
|
|
@@ -67,7 +59,6 @@ const getDimensionOld = size => {
|
|
|
67
59
|
rect = 40;
|
|
68
60
|
strokeWidth = 6;
|
|
69
61
|
break;
|
|
70
|
-
|
|
71
62
|
case 'xs':
|
|
72
63
|
case 'extraSmall':
|
|
73
64
|
labelStyle = paragraph3;
|
|
@@ -75,11 +66,9 @@ const getDimensionOld = size => {
|
|
|
75
66
|
rect = 20;
|
|
76
67
|
strokeWidth = 4;
|
|
77
68
|
break;
|
|
78
|
-
|
|
79
69
|
default:
|
|
80
70
|
return null;
|
|
81
71
|
}
|
|
82
|
-
|
|
83
72
|
return {
|
|
84
73
|
labelStyle,
|
|
85
74
|
rect,
|
|
@@ -87,7 +76,6 @@ const getDimensionOld = size => {
|
|
|
87
76
|
width
|
|
88
77
|
};
|
|
89
78
|
};
|
|
90
|
-
|
|
91
79
|
const designTemplate = [{
|
|
92
80
|
width: 16,
|
|
93
81
|
labelStyle: paragraph3,
|
|
@@ -124,30 +112,31 @@ const designTemplate = [{
|
|
|
124
112
|
rect: 120,
|
|
125
113
|
strokeWidth: 16
|
|
126
114
|
}];
|
|
127
|
-
|
|
128
115
|
const getDimension = size => {
|
|
129
116
|
const sizeObj = {
|
|
130
117
|
width: Number(size),
|
|
131
118
|
rect: size / 2
|
|
132
119
|
};
|
|
133
|
-
|
|
134
120
|
if (size <= 16) {
|
|
135
|
-
return {
|
|
121
|
+
return {
|
|
122
|
+
...designTemplate[0],
|
|
136
123
|
...sizeObj
|
|
137
124
|
};
|
|
138
125
|
} else if (size >= 240) {
|
|
139
|
-
return {
|
|
126
|
+
return {
|
|
127
|
+
...designTemplate[designTemplate.length - 1],
|
|
140
128
|
...sizeObj
|
|
141
129
|
};
|
|
142
130
|
} else {
|
|
143
|
-
const templateObj = designTemplate.reduce((acc, obj) =>
|
|
131
|
+
const templateObj = designTemplate.reduce((acc, obj) =>
|
|
132
|
+
// Math.abs(size - obj.width) < Math.abs(size - acc.width) ? obj : acc
|
|
144
133
|
size > obj.width ? obj : acc);
|
|
145
|
-
return {
|
|
134
|
+
return {
|
|
135
|
+
...templateObj,
|
|
146
136
|
...sizeObj
|
|
147
137
|
};
|
|
148
138
|
}
|
|
149
139
|
};
|
|
150
|
-
|
|
151
140
|
const directionAngleMap = new Map([['top', -90], ['bottom', 90], ['right', 0], ['left', -180]]);
|
|
152
141
|
const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
153
142
|
action = {},
|
|
@@ -178,27 +167,19 @@ const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
178
167
|
const radius = Math.max(0, (containerW - circleStrokeW) / 2);
|
|
179
168
|
const radiusX10 = radius * 10;
|
|
180
169
|
const circumference = radius * 2 * Math.PI;
|
|
181
|
-
|
|
182
170
|
const _ContainerCSS = ContainerCSS(containerW, directionAngle);
|
|
183
|
-
|
|
184
171
|
const _CircleBackgroundCSS = CircleBackgroundCSS(background, !determinate);
|
|
185
|
-
|
|
186
172
|
const _CircleMainCSS = CircleMainCSS(color);
|
|
187
|
-
|
|
188
173
|
const _CircleMainIndeterminateCSS = CircleMainIndeterminateCSS(radiusX10);
|
|
189
|
-
|
|
190
174
|
const _CircleMainDeterminateCSS = CircleMainDeterminateCSS(circumference, percent, duration);
|
|
191
|
-
|
|
192
175
|
const _TextCSS = TextCSS(percentColor, color, dimension, directionAngle);
|
|
193
|
-
|
|
194
176
|
useImperativeHandle(reference, () => {
|
|
195
177
|
const currentRef = ref.current || {};
|
|
196
178
|
currentRef.element = ref.current;
|
|
197
|
-
const _instance = {
|
|
179
|
+
const _instance = {
|
|
180
|
+
...action
|
|
198
181
|
}; // methods
|
|
199
|
-
|
|
200
182
|
_instance.__proto__ = {}; // hidden methods
|
|
201
|
-
|
|
202
183
|
currentRef.instance = _instance;
|
|
203
184
|
return currentRef;
|
|
204
185
|
});
|
|
@@ -239,7 +220,6 @@ const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
239
220
|
const keyframeRotate = keyframes`
|
|
240
221
|
100%{ transform: rotate(360deg);}
|
|
241
222
|
`;
|
|
242
|
-
|
|
243
223
|
const keyframeDash = r => keyframes`
|
|
244
224
|
0%{
|
|
245
225
|
stroke-dasharray: 1, ${r};
|
|
@@ -254,42 +234,35 @@ const keyframeDash = r => keyframes`
|
|
|
254
234
|
stroke-dashoffset: -${r * 124 / 200};
|
|
255
235
|
}
|
|
256
236
|
`;
|
|
257
|
-
|
|
258
237
|
const ContainerCSS = (containerW, directionAngle) => css`
|
|
259
238
|
${displayInlineBlock};
|
|
260
239
|
${parseWidthHeight(containerW)};
|
|
261
240
|
transform: rotate(${directionAngle}deg);
|
|
262
241
|
transform-origin: center;
|
|
263
242
|
`;
|
|
264
|
-
|
|
265
243
|
const AnimationRotateCSS = css`
|
|
266
244
|
animation: ${keyframeRotate} 2s linear infinite;
|
|
267
245
|
`;
|
|
268
|
-
|
|
269
246
|
const CircleBackgroundCSS = (background, isIndeterminate) => css`
|
|
270
247
|
fill: transparent;
|
|
271
248
|
stroke: ${background};
|
|
272
249
|
${isIndeterminate && 'stroke-linecap: round'};
|
|
273
250
|
`;
|
|
274
|
-
|
|
275
251
|
const CircleMainCSS = color => css`
|
|
276
252
|
fill: transparent;
|
|
277
253
|
stroke: ${color};
|
|
278
254
|
stroke-linecap: round;
|
|
279
255
|
`;
|
|
280
|
-
|
|
281
256
|
const CircleMainDeterminateCSS = (circumference, percent, duration) => css`
|
|
282
257
|
stroke-dasharray: ${`${circumference} ${circumference}`};
|
|
283
258
|
stroke-dashoffset: ${circumference - validatePercent(percent) / 100 * circumference};
|
|
284
259
|
transition: stroke-dashoffset ${duration}s cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
|
|
285
260
|
`;
|
|
286
|
-
|
|
287
261
|
const CircleMainIndeterminateCSS = radiusX10 => css`
|
|
288
262
|
stroke-dasharray: 10, ${radiusX10};
|
|
289
263
|
stroke-dashoffset: 0;
|
|
290
264
|
animation: ${keyframeDash(radiusX10)} 2s ease-in-out infinite;
|
|
291
265
|
`;
|
|
292
|
-
|
|
293
266
|
const TextCSS = (percentColor, color, dimension, directionAngle) => css`
|
|
294
267
|
${userSelectNone};
|
|
295
268
|
fill: ${percentColor ? percentColor : color};
|
|
@@ -298,7 +271,6 @@ const TextCSS = (percentColor, color, dimension, directionAngle) => css`
|
|
|
298
271
|
transform: rotate(${-directionAngle}deg);
|
|
299
272
|
transform-origin: center;
|
|
300
273
|
`;
|
|
301
|
-
|
|
302
274
|
CircularProgress.defaultProps = {
|
|
303
275
|
background: lineCategory,
|
|
304
276
|
className: '',
|
|
@@ -315,34 +287,24 @@ CircularProgress.defaultProps = {
|
|
|
315
287
|
CircularProgress.propTypes = {
|
|
316
288
|
/** Color for background stroke of the circular progress. */
|
|
317
289
|
background: PropTypes.string,
|
|
318
|
-
|
|
319
290
|
/** Class for component. */
|
|
320
291
|
className: PropTypes.string,
|
|
321
|
-
|
|
322
292
|
/** Color for main stroke of the circular progress. */
|
|
323
293
|
color: PropTypes.string,
|
|
324
|
-
|
|
325
294
|
/** Determinate or Indeterminate. */
|
|
326
295
|
determinate: PropTypes.bool,
|
|
327
|
-
|
|
328
296
|
/** Direction of the start point. */
|
|
329
297
|
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
330
|
-
|
|
331
298
|
/** Time to processing. */
|
|
332
299
|
duration: PropTypes.number,
|
|
333
|
-
|
|
334
300
|
/** The percent of the determinate progress. */
|
|
335
301
|
percent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
336
|
-
|
|
337
302
|
/** Color percent-label of the progress. */
|
|
338
303
|
percentColor: PropTypes.string,
|
|
339
|
-
|
|
340
304
|
/** If `true, show the percent-label. */
|
|
341
305
|
showValue: PropTypes.bool,
|
|
342
|
-
|
|
343
306
|
/** The size of the component. */
|
|
344
307
|
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.oneOf(['xl', 'lg', 'md', 'sm', 'xs', 'extraLarge', 'large', 'medium', 'small', 'extraSmall'])]),
|
|
345
|
-
|
|
346
308
|
/** Style inline of component. */
|
|
347
309
|
style: PropTypes.object
|
|
348
310
|
};
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { jsx, css, keyframes } from '@emotion/core';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import { forwardRef, memo, useEffect, useMemo, useRef } from 'react';
|
|
7
6
|
import theme from "../../theme/settings";
|
|
8
7
|
import { Typography } from "../";
|
|
9
|
-
|
|
10
8
|
const cutPX = x => {
|
|
11
9
|
return isNaN(x) ? x : x + 'px';
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
const validatePercent = p => {
|
|
15
12
|
let per = +p.toString().replace('%', '');
|
|
16
13
|
return Math.max(Math.min(per, 100), 0);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
const Indeterminate = /*#__PURE__*/forwardRef(({
|
|
20
16
|
background,
|
|
21
17
|
className,
|
|
@@ -56,36 +52,36 @@ const Indeterminate = /*#__PURE__*/forwardRef(({
|
|
|
56
52
|
`
|
|
57
53
|
};
|
|
58
54
|
const containerCSS = css`
|
|
59
|
-
animation
|
|
55
|
+
animation: ${animation.keyframeStart} 0.3s ease-in;
|
|
60
56
|
background-color: ${background};
|
|
61
|
-
border-radius
|
|
62
|
-
box-shadow
|
|
63
|
-
height
|
|
64
|
-
overflow
|
|
65
|
-
position
|
|
66
|
-
width
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
|
|
59
|
+
height: ${cutPX(height)};
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
position: relative;
|
|
62
|
+
width: ${cutPX(width)};
|
|
67
63
|
.${unique.firstBar} {
|
|
68
|
-
animation
|
|
64
|
+
animation: ${animation.keyframeMove} 3s infinite;
|
|
69
65
|
background-color: ${theme.colors[color] || color};
|
|
70
|
-
border-radius
|
|
71
|
-
bottom
|
|
72
|
-
left
|
|
73
|
-
position
|
|
74
|
-
top
|
|
75
|
-
transition
|
|
76
|
-
width
|
|
66
|
+
border-radius: 4px;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 0;
|
|
71
|
+
transition: transform 0.3s ease-in-out;
|
|
72
|
+
width: 100%;
|
|
77
73
|
}
|
|
78
74
|
.${unique.secondBar} {
|
|
79
|
-
animation-delay
|
|
80
|
-
animation
|
|
75
|
+
animation-delay: 1.5s;
|
|
76
|
+
animation: ${animation.keyframeMove} 3s infinite;
|
|
81
77
|
background-color: ${theme.colors[color] || color};
|
|
82
|
-
border-radius
|
|
83
|
-
bottom
|
|
84
|
-
left
|
|
85
|
-
position
|
|
86
|
-
top
|
|
87
|
-
transition
|
|
88
|
-
width
|
|
78
|
+
border-radius: 4px;
|
|
79
|
+
bottom: 0;
|
|
80
|
+
left: -100%;
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
transition: transform 0.3s ease-in-out;
|
|
84
|
+
width: 100%;
|
|
89
85
|
}
|
|
90
86
|
`;
|
|
91
87
|
const FirstBar = useMemo(() => jsx("div", {
|
|
@@ -96,7 +92,8 @@ const Indeterminate = /*#__PURE__*/forwardRef(({
|
|
|
96
92
|
className: unique.secondBar,
|
|
97
93
|
ref: secondBarRef
|
|
98
94
|
}), [color]);
|
|
99
|
-
return jsx("div", {
|
|
95
|
+
return jsx("div", {
|
|
96
|
+
...props,
|
|
100
97
|
className: [unique.container, className].join(' ').trimEnd(),
|
|
101
98
|
css: containerCSS,
|
|
102
99
|
ref: ref
|
|
@@ -104,7 +101,7 @@ const Indeterminate = /*#__PURE__*/forwardRef(({
|
|
|
104
101
|
});
|
|
105
102
|
Indeterminate.defaultProps = {
|
|
106
103
|
background: theme.colors.brand12,
|
|
107
|
-
color: theme.colors.info,
|
|
104
|
+
color: theme.colors.semantic.info,
|
|
108
105
|
height: 8,
|
|
109
106
|
width: '100%'
|
|
110
107
|
};
|
|
@@ -148,38 +145,36 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
148
145
|
}
|
|
149
146
|
`;
|
|
150
147
|
const containerCSS = css`
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
148
|
+
animation: ${keyframeStart} 0.3s ease-in;
|
|
149
|
+
background-color: ${background};
|
|
150
|
+
border-radius: 4px;
|
|
151
|
+
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
|
|
152
|
+
height: ${cutPX(height)};
|
|
153
|
+
position: relative;
|
|
154
|
+
width: ${cutPX(width)};
|
|
155
|
+
.${unique.bar} {
|
|
156
|
+
background-color: ${theme.colors[color] || color};
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
bottom: 0;
|
|
159
|
+
left: 0;
|
|
160
|
+
position: absolute;
|
|
161
|
+
top: 0;
|
|
162
|
+
transition: width ${duration}s cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
|
|
163
|
+
}
|
|
164
|
+
.${unique.value} {
|
|
165
|
+
color: ${percentColor ? percentColor : theme.colors[color] || color};
|
|
166
|
+
margin: 4px 0;
|
|
167
|
+
min-width: max-content;
|
|
168
|
+
position: absolute;
|
|
169
|
+
transform: translateX(-50%);
|
|
170
|
+
transition: left ${duration}s cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
|
|
171
|
+
user-select: none;
|
|
172
|
+
${valuePosition === 'bottom' ? 'top: 100%;' : 'bottom: 100%;'};
|
|
173
|
+
}
|
|
174
|
+
`;
|
|
179
175
|
const updateValuePosition = value => {
|
|
180
176
|
valueRef.current.firstChild.innerText = value + '%';
|
|
181
177
|
const valHalfWidth = valueRef.current.getBoundingClientRect().width / 2;
|
|
182
|
-
|
|
183
178
|
if (value > 90) {
|
|
184
179
|
valueRef.current.style.left = `calc(${value + '%'} - ${valHalfWidth}px)`;
|
|
185
180
|
} else if (value < 10) {
|
|
@@ -188,7 +183,6 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
188
183
|
valueRef.current.style.left = value + '%';
|
|
189
184
|
}
|
|
190
185
|
};
|
|
191
|
-
|
|
192
186
|
const Bar = useMemo(() => jsx("div", {
|
|
193
187
|
className: unique.bar,
|
|
194
188
|
ref: barRef
|
|
@@ -206,12 +200,12 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
206
200
|
useEffect(() => {
|
|
207
201
|
const value = validatePercent(percent);
|
|
208
202
|
barRef.current.style.width = value + '%';
|
|
209
|
-
|
|
210
203
|
if (showValue) {
|
|
211
204
|
updateValuePosition(value);
|
|
212
205
|
}
|
|
213
206
|
}, [percent, showValue]);
|
|
214
|
-
return jsx("div", {
|
|
207
|
+
return jsx("div", {
|
|
208
|
+
...props,
|
|
215
209
|
className: [unique.container, className].join(' ').trim(),
|
|
216
210
|
css: containerCSS,
|
|
217
211
|
ref: ref
|
|
@@ -219,7 +213,7 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
219
213
|
});
|
|
220
214
|
Determinate.defaultProps = {
|
|
221
215
|
background: theme.colors.brand12,
|
|
222
|
-
color: theme.colors.info,
|
|
216
|
+
color: theme.colors.semantic.info,
|
|
223
217
|
duration: 0.1,
|
|
224
218
|
height: 8,
|
|
225
219
|
percent: 69,
|
|
@@ -280,7 +274,7 @@ const LinearProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
280
274
|
}));
|
|
281
275
|
LinearProgress.defaultProps = {
|
|
282
276
|
background: theme.colors.brand12,
|
|
283
|
-
color: theme.colors.info,
|
|
277
|
+
color: theme.colors.semantic.info,
|
|
284
278
|
determinate: false,
|
|
285
279
|
duration: 0.1,
|
|
286
280
|
height: 8,
|
|
@@ -291,34 +285,24 @@ LinearProgress.defaultProps = {
|
|
|
291
285
|
LinearProgress.propTypes = {
|
|
292
286
|
/** Color for background stroke of the linear progress. */
|
|
293
287
|
background: PropTypes.string,
|
|
294
|
-
|
|
295
288
|
/** className use in linear progress. */
|
|
296
289
|
className: PropTypes.string,
|
|
297
|
-
|
|
298
290
|
/** color of liner progress. */
|
|
299
291
|
color: PropTypes.string,
|
|
300
|
-
|
|
301
292
|
/** Determinate or Indeterminate. */
|
|
302
293
|
determinate: PropTypes.bool,
|
|
303
|
-
|
|
304
294
|
/** Time to processing. */
|
|
305
295
|
duration: PropTypes.number,
|
|
306
|
-
|
|
307
296
|
/** Dynamic height dimensions of the container. */
|
|
308
297
|
height: PropTypes.number,
|
|
309
|
-
|
|
310
298
|
/** The percent of the determinate progress. */
|
|
311
299
|
percent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
312
|
-
|
|
313
300
|
/** Color percent-label of the progress. */
|
|
314
301
|
percentColor: PropTypes.string,
|
|
315
|
-
|
|
316
302
|
/** It's boolean to show the percent-label. */
|
|
317
303
|
showValue: PropTypes.bool,
|
|
318
|
-
|
|
319
304
|
/** Dynamic position of the progress value. */
|
|
320
305
|
valuePosition: PropTypes.oneOf(['bottom', 'top']),
|
|
321
|
-
|
|
322
306
|
/** Dynamic width dimensions of the container. */
|
|
323
307
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
324
308
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { memo, useMemo, useRef, useState, useEffect, forwardRef, Fragment, useImperativeHandle } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -7,8 +6,7 @@ import { jsx, css } from '@emotion/core';
|
|
|
7
6
|
import { StarHalf, StarOutline } from "../../icons";
|
|
8
7
|
import { randomString } from "../../utils";
|
|
9
8
|
import { hexToRGBA } from "../../styles/color-helper";
|
|
10
|
-
import {
|
|
11
|
-
import theme from "../../theme/settings";
|
|
9
|
+
import { useTheme, useColor as colors } from "../../theme";
|
|
12
10
|
import { itemsCenter, border, cursorPointer, flexRow, flexRowReverse, displayInlineFlex, outlineNone, overflowHidden, pointerEventsNone, positionAbsolute, positionRelative } from "../../styles/general";
|
|
13
11
|
const {
|
|
14
12
|
colors: {
|
|
@@ -28,7 +26,7 @@ const {
|
|
|
28
26
|
paragraph3
|
|
29
27
|
},
|
|
30
28
|
spacing
|
|
31
|
-
} =
|
|
29
|
+
} = useTheme();
|
|
32
30
|
const Rating = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
33
31
|
id,
|
|
34
32
|
disabled,
|
|
@@ -52,13 +50,9 @@ const Rating = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
52
50
|
allowNumber: false
|
|
53
51
|
}));
|
|
54
52
|
const [valueState, setValueState] = useState(value || defaultValue);
|
|
55
|
-
|
|
56
53
|
const _color = colors[color] || color;
|
|
57
|
-
|
|
58
54
|
const _RatingItemHaftCSS = RatingItemHaftCSS(_color);
|
|
59
|
-
|
|
60
55
|
const _RatingItemCSS = RatingItemCSS(_RatingItemHaftCSS.name, _color, half);
|
|
61
|
-
|
|
62
56
|
const onSelectValue = e => {
|
|
63
57
|
if (disabled || readOnly) return;
|
|
64
58
|
const newValue = +e.target.value;
|
|
@@ -66,22 +60,18 @@ const Rating = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
66
60
|
setValueState(newValue);
|
|
67
61
|
!!onRating && onRating(e, newValue);
|
|
68
62
|
};
|
|
69
|
-
|
|
70
63
|
const _onRating = (e, value, isHalf = false) => {
|
|
71
64
|
if (disabled || readOnly || half && !isHalf) return;
|
|
72
65
|
setValueState(value);
|
|
73
66
|
!!onRating && onRating(e, value);
|
|
74
67
|
};
|
|
75
|
-
|
|
76
68
|
useEffect(() => {
|
|
77
69
|
setValueState(value);
|
|
78
70
|
}, [value]);
|
|
79
71
|
useImperativeHandle(reference, () => {
|
|
80
72
|
const currentRef = ref.current || {};
|
|
81
73
|
const _instance = {}; // methods
|
|
82
|
-
|
|
83
74
|
_instance.__proto__ = {}; // hidden methods
|
|
84
|
-
|
|
85
75
|
currentRef.instance = _instance;
|
|
86
76
|
return currentRef;
|
|
87
77
|
});
|
|
@@ -167,7 +157,6 @@ const RatingSelectCSS = css`
|
|
|
167
157
|
background-color: ${white};
|
|
168
158
|
}
|
|
169
159
|
`;
|
|
170
|
-
|
|
171
160
|
const RatingItemHaftCSS = color => css`
|
|
172
161
|
${flexRow};
|
|
173
162
|
${positionAbsolute};
|
|
@@ -197,7 +186,6 @@ const RatingItemHaftCSS = color => css`
|
|
|
197
186
|
}
|
|
198
187
|
}
|
|
199
188
|
`;
|
|
200
|
-
|
|
201
189
|
const RatingItemCSS = (RatingItemHaftCSSName, color, half) => css`
|
|
202
190
|
${displayInlineFlex};
|
|
203
191
|
${positionRelative};
|
|
@@ -219,7 +207,6 @@ const RatingItemCSS = (RatingItemHaftCSSName, color, half) => css`
|
|
|
219
207
|
}
|
|
220
208
|
}
|
|
221
209
|
`;
|
|
222
|
-
|
|
223
210
|
Rating.defaultProps = {
|
|
224
211
|
disabled: false,
|
|
225
212
|
readOnly: false,
|
|
@@ -234,48 +221,36 @@ Rating.defaultProps = {
|
|
|
234
221
|
Rating.propTypes = {
|
|
235
222
|
/** If true, the component is disabled. */
|
|
236
223
|
disabled: PropTypes.bool,
|
|
237
|
-
|
|
238
224
|
/** Removes all hover effects and pointer events. */
|
|
239
225
|
readOnly: PropTypes.bool,
|
|
240
|
-
|
|
241
226
|
/** Allows rating with an odd number of stars. */
|
|
242
227
|
half: PropTypes.bool,
|
|
243
|
-
|
|
244
228
|
/** Display select box to select by number. */
|
|
245
229
|
selector: PropTypes.bool,
|
|
246
|
-
|
|
247
230
|
/** The default number of stars is selected. */
|
|
248
231
|
defaultValue: PropTypes.number,
|
|
249
|
-
|
|
250
232
|
/** The number of stars is selected. */
|
|
251
233
|
value: PropTypes.number,
|
|
252
|
-
|
|
253
234
|
/** The maximum number of stars allowed to rate. */
|
|
254
235
|
quantity: PropTypes.number,
|
|
255
|
-
|
|
256
236
|
/** Width of star icon. */
|
|
257
237
|
width: PropTypes.number,
|
|
258
|
-
|
|
259
238
|
/** Height of star icon. */
|
|
260
239
|
height: PropTypes.number,
|
|
261
|
-
|
|
262
240
|
/** Color of stars, ['primary', 'info', 'success', 'warning', 'danger', #hex, rgb(#, #, #)]. */
|
|
263
241
|
color: PropTypes.string,
|
|
264
|
-
|
|
265
242
|
/** Class for component. */
|
|
266
243
|
className: PropTypes.string,
|
|
267
|
-
|
|
268
244
|
/** Style inline of component. */
|
|
269
245
|
style: PropTypes.object,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
* value: The new value.
|
|
246
|
+
/**
|
|
247
|
+
* Callback fired when the value changes.
|
|
248
|
+
*
|
|
249
|
+
function(event: React.SyntheticEvent, value: number) => void
|
|
250
|
+
*
|
|
251
|
+
* event: The event source of the callback.
|
|
252
|
+
*
|
|
253
|
+
* value: The new value.
|
|
279
254
|
*/
|
|
280
255
|
onRating: PropTypes.func
|
|
281
256
|
};
|