diginet-core-ui 1.3.87 → 1.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +4 -4
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +6 -2
- package/components/accordion/group.js +9 -2
- package/components/accordion/index.js +15 -2
- package/components/accordion/summary.js +27 -4
- package/components/alert/index.js +33 -2
- package/components/alert/notify.js +22 -12
- package/components/avatar/index.js +81 -22
- package/components/badge/index.js +45 -20
- package/components/button/icon.js +56 -25
- package/components/button/index.js +65 -16
- package/components/button/more.js +35 -15
- package/components/button/ripple-effect.js +10 -0
- package/components/card/body.js +7 -2
- package/components/card/extra.js +7 -2
- package/components/card/footer.js +7 -2
- package/components/card/header.js +7 -2
- package/components/card/index.js +22 -2
- package/components/chart/Pie/Circle.js +1 -0
- package/components/chart/Pie/Sector.js +19 -2
- package/components/chart/Pie/Sectors.js +10 -0
- package/components/chart/Pie/index.js +36 -4
- package/components/chart/Pie-v2/Circle.js +1 -0
- package/components/chart/Pie-v2/Sector.js +15 -2
- package/components/chart/Pie-v2/Sectors.js +20 -0
- package/components/chart/Pie-v2/index.js +38 -11
- package/components/chart/bar/Axis.js +12 -0
- package/components/chart/bar/Bar.js +35 -13
- package/components/chart/bar/Grid.js +18 -0
- package/components/chart/bar/Labels.js +18 -0
- package/components/chart/bar/Points.js +17 -0
- package/components/chart/bar/index.js +26 -6
- package/components/chart/bar-v2/Axis.js +12 -0
- package/components/chart/bar-v2/Bar.js +36 -15
- package/components/chart/bar-v2/Grid.js +18 -0
- package/components/chart/bar-v2/Labels.js +18 -0
- package/components/chart/bar-v2/Points.js +17 -0
- package/components/chart/bar-v2/index.js +26 -6
- package/components/chart/line/Axis.js +16 -4
- package/components/chart/line/Grid.js +19 -2
- package/components/chart/line/Labels.js +18 -0
- package/components/chart/line/Path.js +33 -23
- package/components/chart/line/Point.js +40 -6
- package/components/chart/line/Title.js +3 -0
- package/components/chart/line/index.js +35 -12
- package/components/chart/line-v2/Axis.js +13 -0
- package/components/chart/line-v2/Grid.js +18 -0
- package/components/chart/line-v2/Labels.js +18 -0
- package/components/chart/line-v2/Path.js +33 -23
- package/components/chart/line-v2/Point.js +35 -6
- package/components/chart/line-v2/Title.js +3 -0
- package/components/chart/line-v2/index.js +30 -12
- package/components/check-text/index.js +8 -0
- package/components/check-text/interview-confirmation.js +7 -0
- package/components/check-text/interview-status.js +7 -0
- package/components/chip/attach.js +22 -9
- package/components/chip/index.js +33 -6
- package/components/collapse/index.js +13 -0
- package/components/divider/index.js +13 -2
- package/components/form-control/attachment/index.js +202 -41
- package/components/form-control/calendar/function.js +207 -153
- package/components/form-control/calendar/index.js +46 -21
- package/components/form-control/calendar/range.js +28 -11
- package/components/form-control/checkbox/index.js +37 -4
- package/components/form-control/control/index.js +13 -3
- package/components/form-control/date-picker/index-old.js +0 -18
- package/components/form-control/date-picker/index.js +99 -23
- package/components/form-control/date-range-picker/index.js +180 -44
- package/components/form-control/dropdown/index.js +314 -101
- package/components/form-control/dropdown-box/index.js +35 -6
- package/components/form-control/form/index.js +2 -0
- package/components/form-control/form-group/index.js +6 -1
- package/components/form-control/helper-text/index.js +9 -2
- package/components/form-control/input-base/index.js +73 -9
- package/components/form-control/label/index.js +12 -2
- package/components/form-control/money-input/index.js +143 -54
- package/components/form-control/number-input/index.js +124 -26
- package/components/form-control/number-input/index2.js +119 -78
- package/components/form-control/phone-input/index.js +85 -23
- package/components/form-control/radio/index.js +28 -9
- package/components/form-control/text-input/index.js +46 -10
- package/components/form-control/time-picker/index.js +71 -14
- package/components/form-control/time-picker/swiper.js +73 -21
- package/components/form-control/toggle/index.js +23 -8
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +14 -0
- package/components/form-view/input.js +13 -2
- package/components/form-view/label.js +2 -0
- package/components/grid/Col.js +16 -2
- package/components/grid/Container.js +21 -2
- package/components/grid/Row.js +21 -2
- package/components/grid/index.js +44 -2
- package/components/image/index.js +22 -2
- package/components/index.js +31 -62
- package/components/list/list-item-action.js +9 -0
- package/components/list/list-item-icon.js +9 -0
- package/components/list/list-item-text.js +5 -0
- package/components/list/list-item.js +11 -0
- package/components/list/list.js +13 -0
- package/components/list/sub-header.js +4 -0
- package/components/modal/body.js +6 -2
- package/components/modal/footer.js +11 -2
- package/components/modal/header.js +12 -2
- package/components/modal/index.js +10 -2
- package/components/modal/modal.js +52 -11
- package/components/others/extra/index.js +10 -3
- package/components/others/import/index.js +7 -0
- package/components/others/option-wrapper/index.js +7 -4
- package/components/others/scrollbar/index.js +3 -0
- package/components/paging/page-info.js +99 -35
- package/components/paging/page-selector.js +35 -7
- package/components/paging/page-selector2.js +74 -35
- package/components/paper/index.js +11 -0
- package/components/popover/body.js +6 -2
- package/components/popover/footer.js +11 -2
- package/components/popover/header.js +7 -2
- package/components/popover/index.js +146 -54
- package/components/popup/danger_popup.js +19 -0
- package/components/popup/index.js +48 -2
- package/components/popup/proposals_popup.js +49 -10
- package/components/popup/v2/index.js +47 -13
- package/components/progress/circular.js +48 -10
- package/components/progress/linear.js +20 -4
- package/components/rating/index.js +32 -8
- package/components/slider/slider-container.js +40 -3
- package/components/slider/slider-item.js +25 -10
- package/components/status/index.js +14 -2
- package/components/tab/tab-container.js +18 -4
- package/components/tab/tab-header.js +24 -4
- package/components/tab/tab-panel.js +16 -4
- package/components/tab/tab.js +30 -6
- package/components/tooltip/index.js +97 -12
- package/components/tooltip/portal.js +2 -0
- package/components/transfer/index.js +70 -25
- package/components/tree-view/index.js +202 -62
- package/components/typography/index.js +70 -47
- package/global/index.js +8 -0
- package/icons/basic.js +232 -0
- package/icons/effect.js +32 -15
- package/icons/general/clock/clock.js +2 -0
- package/icons/general/color-handler/background.js +2 -0
- package/icons/general/color-handler/text.js +2 -0
- package/icons/general/emoji/emoji.js +2 -0
- package/icons/general/font-properties/bold.js +2 -0
- package/icons/general/font-properties/font-family.js +2 -0
- package/icons/general/font-properties/font-size.js +2 -0
- package/icons/general/font-properties/italic.js +2 -0
- package/icons/general/font-properties/underline.js +2 -0
- package/icons/general/hyperlink/hyperlink.js +2 -0
- package/icons/general/indent/decrease.js +2 -0
- package/icons/general/indent/increase.js +2 -0
- package/icons/general/list/bullets.js +2 -0
- package/icons/general/list/numbering.js +2 -0
- package/icons/general/picture/picture.js +2 -0
- package/icons/general/steps/redo.js +2 -0
- package/icons/general/steps/undo.js +2 -0
- package/icons/general/text-align/center.js +2 -0
- package/icons/general/text-align/justify.js +2 -0
- package/icons/general/text-align/left.js +2 -0
- package/icons/general/text-align/right.js +2 -0
- package/icons/menu/dhr.js +1 -2
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +15 -2
- package/package.json +42 -42
- package/readme.md +1027 -1022
- package/styles/animation.js +58 -15
- package/styles/color-helper.js +157 -127
- package/styles/colors.js +9 -17
- package/styles/general.js +80 -18
- package/styles/typography.js +4 -4
- package/styles/utils.js +20 -19
- package/theme/createBreakpoints.js +18 -7
- package/theme/make-styles.js +5 -2
- package/theme/set-theme.js +9 -6
- package/theme/settings.js +2 -3
- package/theme/theme-provider.js +1 -0
- package/utils/array/array.js +54 -45
- package/utils/{classNames.js → classNames/index.js} +5 -0
- package/utils/console.js +6 -0
- package/utils/date.js +138 -69
- package/utils/error/error.js +11 -3
- package/utils/error/errors.js +147 -100
- package/utils/getFileType.js +9 -0
- package/utils/handleBreakpoints.js +5 -0
- package/utils/intersectionObserver.js +5 -0
- package/utils/{isMobile.js → isMobile/index.js} +0 -0
- package/utils/iterator.js +9 -0
- package/utils/map-parent.js +10 -3
- package/utils/object/extend.js +10 -0
- package/utils/object/object.js +11 -12
- package/utils/parseHTML.js +1 -0
- package/utils/promisify.js +5 -0
- package/utils/randomString.js +7 -0
- package/utils/remove-unicode.js +1 -0
- package/utils/render-portal.js +9 -1
- package/utils/renderHTML.js +6 -4
- package/utils/renderIcon.js +19 -9
- package/utils/sb-template.js +5 -6
- package/utils/string/capitalize.js +1 -0
- package/utils/string/capitalizeSentenceCase.js +2 -0
- package/utils/string/string.js +13 -0
- package/utils/type.js +21 -0
- package/utils/updatePosition.js +5 -4
- package/utils/useDelayUnmount.js +4 -0
- package/utils/useElementSize.js +3 -9
- package/utils/useEventListener.js +6 -12
- package/utils/useInput.js +6 -0
- package/utils/{useMediaQuery.js → useMediaQuery/index.js} +10 -8
- package/utils/useOnClickOutside.js +4 -2
- package/utils/usePortal.js +19 -12
- package/utils/validate.js +53 -39
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
+
|
|
2
3
|
/** @jsxRuntime classic */
|
|
4
|
+
|
|
3
5
|
/** @jsx jsx */
|
|
4
6
|
import { css, jsx, keyframes } from '@emotion/core';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
@@ -24,12 +26,15 @@ const {
|
|
|
24
26
|
paragraph3
|
|
25
27
|
}
|
|
26
28
|
} = useTheme();
|
|
29
|
+
|
|
27
30
|
const validatePercent = percent => {
|
|
28
31
|
let per = +percent.toString().replace('%', '');
|
|
29
32
|
return Math.max(Math.min(per, 100), 0);
|
|
30
33
|
};
|
|
34
|
+
|
|
31
35
|
const getDimensionOld = size => {
|
|
32
36
|
let width, labelStyle, rect, strokeWidth;
|
|
37
|
+
|
|
33
38
|
switch (size) {
|
|
34
39
|
case 'xl':
|
|
35
40
|
case 'extraLarge':
|
|
@@ -38,6 +43,7 @@ const getDimensionOld = size => {
|
|
|
38
43
|
rect = 120;
|
|
39
44
|
strokeWidth = 16;
|
|
40
45
|
break;
|
|
46
|
+
|
|
41
47
|
case 'lg':
|
|
42
48
|
case 'large':
|
|
43
49
|
labelStyle = heading2;
|
|
@@ -45,6 +51,7 @@ const getDimensionOld = size => {
|
|
|
45
51
|
rect = 80;
|
|
46
52
|
strokeWidth = 12;
|
|
47
53
|
break;
|
|
54
|
+
|
|
48
55
|
case 'md':
|
|
49
56
|
case 'medium':
|
|
50
57
|
labelStyle = paragraph1;
|
|
@@ -52,6 +59,7 @@ const getDimensionOld = size => {
|
|
|
52
59
|
rect = 60;
|
|
53
60
|
strokeWidth = 8;
|
|
54
61
|
break;
|
|
62
|
+
|
|
55
63
|
case 'sm':
|
|
56
64
|
case 'small':
|
|
57
65
|
labelStyle = paragraph2;
|
|
@@ -59,6 +67,7 @@ const getDimensionOld = size => {
|
|
|
59
67
|
rect = 40;
|
|
60
68
|
strokeWidth = 6;
|
|
61
69
|
break;
|
|
70
|
+
|
|
62
71
|
case 'xs':
|
|
63
72
|
case 'extraSmall':
|
|
64
73
|
labelStyle = paragraph3;
|
|
@@ -66,9 +75,11 @@ const getDimensionOld = size => {
|
|
|
66
75
|
rect = 20;
|
|
67
76
|
strokeWidth = 4;
|
|
68
77
|
break;
|
|
78
|
+
|
|
69
79
|
default:
|
|
70
80
|
return null;
|
|
71
81
|
}
|
|
82
|
+
|
|
72
83
|
return {
|
|
73
84
|
labelStyle,
|
|
74
85
|
rect,
|
|
@@ -76,6 +87,7 @@ const getDimensionOld = size => {
|
|
|
76
87
|
width
|
|
77
88
|
};
|
|
78
89
|
};
|
|
90
|
+
|
|
79
91
|
const designTemplate = [{
|
|
80
92
|
width: 16,
|
|
81
93
|
labelStyle: paragraph3,
|
|
@@ -112,31 +124,30 @@ const designTemplate = [{
|
|
|
112
124
|
rect: 120,
|
|
113
125
|
strokeWidth: 16
|
|
114
126
|
}];
|
|
127
|
+
|
|
115
128
|
const getDimension = size => {
|
|
116
129
|
const sizeObj = {
|
|
117
130
|
width: Number(size),
|
|
118
131
|
rect: size / 2
|
|
119
132
|
};
|
|
133
|
+
|
|
120
134
|
if (size <= 16) {
|
|
121
|
-
return {
|
|
122
|
-
...designTemplate[0],
|
|
135
|
+
return { ...designTemplate[0],
|
|
123
136
|
...sizeObj
|
|
124
137
|
};
|
|
125
138
|
} else if (size >= 240) {
|
|
126
|
-
return {
|
|
127
|
-
...designTemplate[designTemplate.length - 1],
|
|
139
|
+
return { ...designTemplate[designTemplate.length - 1],
|
|
128
140
|
...sizeObj
|
|
129
141
|
};
|
|
130
142
|
} else {
|
|
131
|
-
const templateObj = designTemplate.reduce((acc, obj) =>
|
|
132
|
-
// Math.abs(size - obj.width) < Math.abs(size - acc.width) ? obj : acc
|
|
143
|
+
const templateObj = designTemplate.reduce((acc, obj) => // Math.abs(size - obj.width) < Math.abs(size - acc.width) ? obj : acc
|
|
133
144
|
size > obj.width ? obj : acc);
|
|
134
|
-
return {
|
|
135
|
-
...templateObj,
|
|
145
|
+
return { ...templateObj,
|
|
136
146
|
...sizeObj
|
|
137
147
|
};
|
|
138
148
|
}
|
|
139
149
|
};
|
|
150
|
+
|
|
140
151
|
const directionAngleMap = new Map([['top', -90], ['bottom', 90], ['right', 0], ['left', -180]]);
|
|
141
152
|
const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
142
153
|
action = {},
|
|
@@ -167,19 +178,27 @@ const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
167
178
|
const radius = Math.max(0, (containerW - circleStrokeW) / 2);
|
|
168
179
|
const radiusX10 = radius * 10;
|
|
169
180
|
const circumference = radius * 2 * Math.PI;
|
|
181
|
+
|
|
170
182
|
const _ContainerCSS = ContainerCSS(containerW, directionAngle);
|
|
183
|
+
|
|
171
184
|
const _CircleBackgroundCSS = CircleBackgroundCSS(background, !determinate);
|
|
185
|
+
|
|
172
186
|
const _CircleMainCSS = CircleMainCSS(color);
|
|
187
|
+
|
|
173
188
|
const _CircleMainIndeterminateCSS = CircleMainIndeterminateCSS(radiusX10);
|
|
189
|
+
|
|
174
190
|
const _CircleMainDeterminateCSS = CircleMainDeterminateCSS(circumference, percent, duration);
|
|
191
|
+
|
|
175
192
|
const _TextCSS = TextCSS(percentColor, color, dimension, directionAngle);
|
|
193
|
+
|
|
176
194
|
useImperativeHandle(reference, () => {
|
|
177
195
|
const currentRef = ref.current || {};
|
|
178
196
|
currentRef.element = ref.current;
|
|
179
|
-
const _instance = {
|
|
180
|
-
...action
|
|
197
|
+
const _instance = { ...action
|
|
181
198
|
}; // methods
|
|
199
|
+
|
|
182
200
|
_instance.__proto__ = {}; // hidden methods
|
|
201
|
+
|
|
183
202
|
currentRef.instance = _instance;
|
|
184
203
|
return currentRef;
|
|
185
204
|
});
|
|
@@ -220,6 +239,7 @@ const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
220
239
|
const keyframeRotate = keyframes`
|
|
221
240
|
100%{ transform: rotate(360deg);}
|
|
222
241
|
`;
|
|
242
|
+
|
|
223
243
|
const keyframeDash = r => keyframes`
|
|
224
244
|
0%{
|
|
225
245
|
stroke-dasharray: 1, ${r};
|
|
@@ -234,35 +254,42 @@ const keyframeDash = r => keyframes`
|
|
|
234
254
|
stroke-dashoffset: -${r * 124 / 200};
|
|
235
255
|
}
|
|
236
256
|
`;
|
|
257
|
+
|
|
237
258
|
const ContainerCSS = (containerW, directionAngle) => css`
|
|
238
259
|
${displayInlineBlock};
|
|
239
260
|
${parseWidthHeight(containerW)};
|
|
240
261
|
transform: rotate(${directionAngle}deg);
|
|
241
262
|
transform-origin: center;
|
|
242
263
|
`;
|
|
264
|
+
|
|
243
265
|
const AnimationRotateCSS = css`
|
|
244
266
|
animation: ${keyframeRotate} 2s linear infinite;
|
|
245
267
|
`;
|
|
268
|
+
|
|
246
269
|
const CircleBackgroundCSS = (background, isIndeterminate) => css`
|
|
247
270
|
fill: transparent;
|
|
248
271
|
stroke: ${background};
|
|
249
272
|
${isIndeterminate && 'stroke-linecap: round'};
|
|
250
273
|
`;
|
|
274
|
+
|
|
251
275
|
const CircleMainCSS = color => css`
|
|
252
276
|
fill: transparent;
|
|
253
277
|
stroke: ${color};
|
|
254
278
|
stroke-linecap: round;
|
|
255
279
|
`;
|
|
280
|
+
|
|
256
281
|
const CircleMainDeterminateCSS = (circumference, percent, duration) => css`
|
|
257
282
|
stroke-dasharray: ${`${circumference} ${circumference}`};
|
|
258
283
|
stroke-dashoffset: ${circumference - validatePercent(percent) / 100 * circumference};
|
|
259
284
|
transition: stroke-dashoffset ${duration}s cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
|
|
260
285
|
`;
|
|
286
|
+
|
|
261
287
|
const CircleMainIndeterminateCSS = radiusX10 => css`
|
|
262
288
|
stroke-dasharray: 10, ${radiusX10};
|
|
263
289
|
stroke-dashoffset: 0;
|
|
264
290
|
animation: ${keyframeDash(radiusX10)} 2s ease-in-out infinite;
|
|
265
291
|
`;
|
|
292
|
+
|
|
266
293
|
const TextCSS = (percentColor, color, dimension, directionAngle) => css`
|
|
267
294
|
${userSelectNone};
|
|
268
295
|
fill: ${percentColor ? percentColor : color};
|
|
@@ -271,6 +298,7 @@ const TextCSS = (percentColor, color, dimension, directionAngle) => css`
|
|
|
271
298
|
transform: rotate(${-directionAngle}deg);
|
|
272
299
|
transform-origin: center;
|
|
273
300
|
`;
|
|
301
|
+
|
|
274
302
|
CircularProgress.defaultProps = {
|
|
275
303
|
background: lineCategory,
|
|
276
304
|
className: '',
|
|
@@ -287,24 +315,34 @@ CircularProgress.defaultProps = {
|
|
|
287
315
|
CircularProgress.propTypes = {
|
|
288
316
|
/** Color for background stroke of the circular progress. */
|
|
289
317
|
background: PropTypes.string,
|
|
318
|
+
|
|
290
319
|
/** Class for component. */
|
|
291
320
|
className: PropTypes.string,
|
|
321
|
+
|
|
292
322
|
/** Color for main stroke of the circular progress. */
|
|
293
323
|
color: PropTypes.string,
|
|
324
|
+
|
|
294
325
|
/** Determinate or Indeterminate. */
|
|
295
326
|
determinate: PropTypes.bool,
|
|
327
|
+
|
|
296
328
|
/** Direction of the start point. */
|
|
297
329
|
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
330
|
+
|
|
298
331
|
/** Time to processing. */
|
|
299
332
|
duration: PropTypes.number,
|
|
333
|
+
|
|
300
334
|
/** The percent of the determinate progress. */
|
|
301
335
|
percent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
336
|
+
|
|
302
337
|
/** Color percent-label of the progress. */
|
|
303
338
|
percentColor: PropTypes.string,
|
|
339
|
+
|
|
304
340
|
/** If `true, show the percent-label. */
|
|
305
341
|
showValue: PropTypes.bool,
|
|
342
|
+
|
|
306
343
|
/** The size of the component. */
|
|
307
344
|
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.oneOf(['xl', 'lg', 'md', 'sm', 'xs', 'extraLarge', 'large', 'medium', 'small', 'extraSmall'])]),
|
|
345
|
+
|
|
308
346
|
/** Style inline of component. */
|
|
309
347
|
style: PropTypes.object
|
|
310
348
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { jsx, css, keyframes } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import { forwardRef, memo, useEffect, useMemo, useRef } from 'react';
|
|
6
7
|
import theme from "../../theme/settings";
|
|
7
8
|
import { Typography } from "../";
|
|
9
|
+
|
|
8
10
|
const cutPX = x => {
|
|
9
11
|
return isNaN(x) ? x : x + 'px';
|
|
10
12
|
};
|
|
13
|
+
|
|
11
14
|
const validatePercent = p => {
|
|
12
15
|
let per = +p.toString().replace('%', '');
|
|
13
16
|
return Math.max(Math.min(per, 100), 0);
|
|
14
17
|
};
|
|
18
|
+
|
|
15
19
|
const Indeterminate = /*#__PURE__*/forwardRef(({
|
|
16
20
|
background,
|
|
17
21
|
className,
|
|
@@ -92,8 +96,7 @@ const Indeterminate = /*#__PURE__*/forwardRef(({
|
|
|
92
96
|
className: unique.secondBar,
|
|
93
97
|
ref: secondBarRef
|
|
94
98
|
}), [color]);
|
|
95
|
-
return jsx("div", {
|
|
96
|
-
...props,
|
|
99
|
+
return jsx("div", { ...props,
|
|
97
100
|
className: [unique.container, className].join(' ').trimEnd(),
|
|
98
101
|
css: containerCSS,
|
|
99
102
|
ref: ref
|
|
@@ -172,9 +175,11 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
172
175
|
${valuePosition === 'bottom' ? 'top: 100%;' : 'bottom: 100%;'};
|
|
173
176
|
}
|
|
174
177
|
`;
|
|
178
|
+
|
|
175
179
|
const updateValuePosition = value => {
|
|
176
180
|
valueRef.current.firstChild.innerText = value + '%';
|
|
177
181
|
const valHalfWidth = valueRef.current.getBoundingClientRect().width / 2;
|
|
182
|
+
|
|
178
183
|
if (value > 90) {
|
|
179
184
|
valueRef.current.style.left = `calc(${value + '%'} - ${valHalfWidth}px)`;
|
|
180
185
|
} else if (value < 10) {
|
|
@@ -183,6 +188,7 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
183
188
|
valueRef.current.style.left = value + '%';
|
|
184
189
|
}
|
|
185
190
|
};
|
|
191
|
+
|
|
186
192
|
const Bar = useMemo(() => jsx("div", {
|
|
187
193
|
className: unique.bar,
|
|
188
194
|
ref: barRef
|
|
@@ -200,12 +206,12 @@ const Determinate = /*#__PURE__*/forwardRef(({
|
|
|
200
206
|
useEffect(() => {
|
|
201
207
|
const value = validatePercent(percent);
|
|
202
208
|
barRef.current.style.width = value + '%';
|
|
209
|
+
|
|
203
210
|
if (showValue) {
|
|
204
211
|
updateValuePosition(value);
|
|
205
212
|
}
|
|
206
213
|
}, [percent, showValue]);
|
|
207
|
-
return jsx("div", {
|
|
208
|
-
...props,
|
|
214
|
+
return jsx("div", { ...props,
|
|
209
215
|
className: [unique.container, className].join(' ').trim(),
|
|
210
216
|
css: containerCSS,
|
|
211
217
|
ref: ref
|
|
@@ -285,24 +291,34 @@ LinearProgress.defaultProps = {
|
|
|
285
291
|
LinearProgress.propTypes = {
|
|
286
292
|
/** Color for background stroke of the linear progress. */
|
|
287
293
|
background: PropTypes.string,
|
|
294
|
+
|
|
288
295
|
/** className use in linear progress. */
|
|
289
296
|
className: PropTypes.string,
|
|
297
|
+
|
|
290
298
|
/** color of liner progress. */
|
|
291
299
|
color: PropTypes.string,
|
|
300
|
+
|
|
292
301
|
/** Determinate or Indeterminate. */
|
|
293
302
|
determinate: PropTypes.bool,
|
|
303
|
+
|
|
294
304
|
/** Time to processing. */
|
|
295
305
|
duration: PropTypes.number,
|
|
306
|
+
|
|
296
307
|
/** Dynamic height dimensions of the container. */
|
|
297
308
|
height: PropTypes.number,
|
|
309
|
+
|
|
298
310
|
/** The percent of the determinate progress. */
|
|
299
311
|
percent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
312
|
+
|
|
300
313
|
/** Color percent-label of the progress. */
|
|
301
314
|
percentColor: PropTypes.string,
|
|
315
|
+
|
|
302
316
|
/** It's boolean to show the percent-label. */
|
|
303
317
|
showValue: PropTypes.bool,
|
|
318
|
+
|
|
304
319
|
/** Dynamic position of the progress value. */
|
|
305
320
|
valuePosition: PropTypes.oneOf(['bottom', 'top']),
|
|
321
|
+
|
|
306
322
|
/** Dynamic width dimensions of the container. */
|
|
307
323
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
308
324
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, useMemo, useRef, useState, useEffect, forwardRef, Fragment, useImperativeHandle } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -51,9 +52,13 @@ const Rating = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
51
52
|
allowNumber: false
|
|
52
53
|
}));
|
|
53
54
|
const [valueState, setValueState] = useState(value || defaultValue);
|
|
55
|
+
|
|
54
56
|
const _color = colors[color] || color;
|
|
57
|
+
|
|
55
58
|
const _RatingItemHaftCSS = RatingItemHaftCSS(_color);
|
|
59
|
+
|
|
56
60
|
const _RatingItemCSS = RatingItemCSS(_RatingItemHaftCSS.name, _color, half);
|
|
61
|
+
|
|
57
62
|
const onSelectValue = e => {
|
|
58
63
|
if (disabled || readOnly) return;
|
|
59
64
|
const newValue = +e.target.value;
|
|
@@ -61,18 +66,22 @@ const Rating = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
61
66
|
setValueState(newValue);
|
|
62
67
|
!!onRating && onRating(e, newValue);
|
|
63
68
|
};
|
|
69
|
+
|
|
64
70
|
const _onRating = (e, value, isHalf = false) => {
|
|
65
71
|
if (disabled || readOnly || half && !isHalf) return;
|
|
66
72
|
setValueState(value);
|
|
67
73
|
!!onRating && onRating(e, value);
|
|
68
74
|
};
|
|
75
|
+
|
|
69
76
|
useEffect(() => {
|
|
70
77
|
setValueState(value);
|
|
71
78
|
}, [value]);
|
|
72
79
|
useImperativeHandle(reference, () => {
|
|
73
80
|
const currentRef = ref.current || {};
|
|
74
81
|
const _instance = {}; // methods
|
|
82
|
+
|
|
75
83
|
_instance.__proto__ = {}; // hidden methods
|
|
84
|
+
|
|
76
85
|
currentRef.instance = _instance;
|
|
77
86
|
return currentRef;
|
|
78
87
|
});
|
|
@@ -158,6 +167,7 @@ const RatingSelectCSS = css`
|
|
|
158
167
|
background-color: ${white};
|
|
159
168
|
}
|
|
160
169
|
`;
|
|
170
|
+
|
|
161
171
|
const RatingItemHaftCSS = color => css`
|
|
162
172
|
${flexRow};
|
|
163
173
|
${positionAbsolute};
|
|
@@ -187,6 +197,7 @@ const RatingItemHaftCSS = color => css`
|
|
|
187
197
|
}
|
|
188
198
|
}
|
|
189
199
|
`;
|
|
200
|
+
|
|
190
201
|
const RatingItemCSS = (RatingItemHaftCSSName, color, half) => css`
|
|
191
202
|
${displayInlineFlex};
|
|
192
203
|
${positionRelative};
|
|
@@ -208,6 +219,7 @@ const RatingItemCSS = (RatingItemHaftCSSName, color, half) => css`
|
|
|
208
219
|
}
|
|
209
220
|
}
|
|
210
221
|
`;
|
|
222
|
+
|
|
211
223
|
Rating.defaultProps = {
|
|
212
224
|
disabled: false,
|
|
213
225
|
readOnly: false,
|
|
@@ -222,36 +234,48 @@ Rating.defaultProps = {
|
|
|
222
234
|
Rating.propTypes = {
|
|
223
235
|
/** If true, the component is disabled. */
|
|
224
236
|
disabled: PropTypes.bool,
|
|
237
|
+
|
|
225
238
|
/** Removes all hover effects and pointer events. */
|
|
226
239
|
readOnly: PropTypes.bool,
|
|
240
|
+
|
|
227
241
|
/** Allows rating with an odd number of stars. */
|
|
228
242
|
half: PropTypes.bool,
|
|
243
|
+
|
|
229
244
|
/** Display select box to select by number. */
|
|
230
245
|
selector: PropTypes.bool,
|
|
246
|
+
|
|
231
247
|
/** The default number of stars is selected. */
|
|
232
248
|
defaultValue: PropTypes.number,
|
|
249
|
+
|
|
233
250
|
/** The number of stars is selected. */
|
|
234
251
|
value: PropTypes.number,
|
|
252
|
+
|
|
235
253
|
/** The maximum number of stars allowed to rate. */
|
|
236
254
|
quantity: PropTypes.number,
|
|
255
|
+
|
|
237
256
|
/** Width of star icon. */
|
|
238
257
|
width: PropTypes.number,
|
|
258
|
+
|
|
239
259
|
/** Height of star icon. */
|
|
240
260
|
height: PropTypes.number,
|
|
261
|
+
|
|
241
262
|
/** Color of stars, ['primary', 'info', 'success', 'warning', 'danger', #hex, rgb(#, #, #)]. */
|
|
242
263
|
color: PropTypes.string,
|
|
264
|
+
|
|
243
265
|
/** Class for component. */
|
|
244
266
|
className: PropTypes.string,
|
|
267
|
+
|
|
245
268
|
/** Style inline of component. */
|
|
246
269
|
style: PropTypes.object,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Callback fired when the value changes.
|
|
273
|
+
*
|
|
274
|
+
function(event: React.SyntheticEvent, value: number) => void
|
|
275
|
+
*
|
|
276
|
+
* event: The event source of the callback.
|
|
277
|
+
*
|
|
278
|
+
* value: The new value.
|
|
255
279
|
*/
|
|
256
280
|
onRating: PropTypes.func
|
|
257
281
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { css, jsx } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -64,14 +65,18 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
64
65
|
const navigationListRef = useRef(null);
|
|
65
66
|
const iconLeftRef = useRef(null);
|
|
66
67
|
const iconRightRef = useRef(null);
|
|
68
|
+
|
|
67
69
|
const _containerCSS = containerCSS(IDs);
|
|
70
|
+
|
|
68
71
|
const _navigationListCSS = navigationListCSS(IDs);
|
|
72
|
+
|
|
69
73
|
const removeClass = (className, selector) => {
|
|
70
74
|
const array = document.querySelectorAll(`.${selector}`) || document.querySelectorAll(selector);
|
|
71
75
|
array.forEach(a => {
|
|
72
76
|
a.classList.remove(className);
|
|
73
77
|
});
|
|
74
78
|
};
|
|
79
|
+
|
|
75
80
|
const onChangeActiveItem = (childNodeList, e, i) => {
|
|
76
81
|
removeClass('item-focused', IDs.navigationItem);
|
|
77
82
|
e.classList.add('item-focused');
|
|
@@ -81,34 +86,43 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
81
86
|
childNodeList[i].style.display = 'block';
|
|
82
87
|
currentItemIndex = i;
|
|
83
88
|
};
|
|
89
|
+
|
|
84
90
|
const onNextItem = childNodeList => {
|
|
85
91
|
if (childNodeList.length > 1 && autoChangeTime && autoChangeTime > 0) {
|
|
86
92
|
clearInterval(autoChange);
|
|
87
93
|
autoChange = setInterval(() => onNextItem(childNodeList), autoChangeTime * 1000);
|
|
88
94
|
}
|
|
95
|
+
|
|
89
96
|
childNodeList[currentItemIndex].style.display = 'none';
|
|
97
|
+
|
|
90
98
|
if (currentItemIndex === childNodeList.length - 1) {
|
|
91
99
|
currentItemIndex = 0;
|
|
92
100
|
} else {
|
|
93
101
|
currentItemIndex += 1;
|
|
94
102
|
}
|
|
103
|
+
|
|
95
104
|
childNodeList[currentItemIndex].style.display = 'block';
|
|
96
105
|
onChangeActiveItem(childNodeList, navigationListRef.current.childNodes[currentItemIndex], currentItemIndex);
|
|
97
106
|
};
|
|
107
|
+
|
|
98
108
|
const onPrevItem = childNodeList => {
|
|
99
109
|
if (childNodeList.length > 1 && autoChangeTime && autoChangeTime > 0) {
|
|
100
110
|
clearInterval(autoChange);
|
|
101
111
|
autoChange = setInterval(() => onNextItem(childNodeList), autoChangeTime * 1000);
|
|
102
112
|
}
|
|
113
|
+
|
|
103
114
|
childNodeList[currentItemIndex].style.display = 'none';
|
|
115
|
+
|
|
104
116
|
if (currentItemIndex === 0) {
|
|
105
117
|
currentItemIndex = childNodeList.length - 1;
|
|
106
118
|
} else {
|
|
107
119
|
currentItemIndex -= 1;
|
|
108
120
|
}
|
|
121
|
+
|
|
109
122
|
childNodeList[currentItemIndex].style.display = 'block';
|
|
110
123
|
onChangeActiveItem(childNodeList, navigationListRef.current.childNodes[currentItemIndex], currentItemIndex);
|
|
111
124
|
};
|
|
125
|
+
|
|
112
126
|
const findActiveItem = childNodeList => {
|
|
113
127
|
for (let i = 0; i < childNodeList.length; i++) {
|
|
114
128
|
if (childNodeList[i].classList.contains('active')) {
|
|
@@ -117,17 +131,21 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
117
131
|
return i;
|
|
118
132
|
}
|
|
119
133
|
}
|
|
134
|
+
|
|
120
135
|
childNodeList[0].style.display = 'block';
|
|
121
136
|
currentItemIndex = 0;
|
|
122
137
|
return 0;
|
|
123
138
|
};
|
|
139
|
+
|
|
124
140
|
const renderNavigationItem = childNodeList => {
|
|
125
141
|
const list = navigationListRef.current;
|
|
126
142
|
const activeItem = findActiveItem(childNodeList);
|
|
127
143
|
let items = '';
|
|
144
|
+
|
|
128
145
|
for (let i = 0; i < childNodeList.length; i++) {
|
|
129
146
|
items += `<span class='${i === activeItem ? IDs.navigationItem + ' ' + 'item-focused' : IDs.navigationItem}' id='${IDs.navigationItem}-${i}'></span>`;
|
|
130
147
|
}
|
|
148
|
+
|
|
131
149
|
list.innerHTML = items;
|
|
132
150
|
navigationListRef.current.querySelectorAll(`.${IDs.navigationItem}`).forEach((item, i) => {
|
|
133
151
|
item.addEventListener('click', e => {
|
|
@@ -135,13 +153,15 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
135
153
|
});
|
|
136
154
|
});
|
|
137
155
|
};
|
|
156
|
+
|
|
138
157
|
useEffect(() => {
|
|
139
158
|
if (!slideContainerRef.current || !navigationRef.current || !iconLeftRef.current || !iconRightRef.current) return;
|
|
140
159
|
const childNodeList = slideContainerRef.current.childNodes,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
160
|
+
navigation = navigationRef.current,
|
|
161
|
+
iconLeft = iconLeftRef.current,
|
|
162
|
+
iconRight = iconRightRef.current;
|
|
144
163
|
renderNavigationItem(childNodeList);
|
|
164
|
+
|
|
145
165
|
if (childNodeList.length > 1) {
|
|
146
166
|
navigation.style.display = onShowNavigation ? 'block' : 'none';
|
|
147
167
|
iconLeft.style.display = 'block';
|
|
@@ -153,10 +173,12 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
153
173
|
iconLeft.style.display = 'none';
|
|
154
174
|
iconRight.style.display = 'none';
|
|
155
175
|
}
|
|
176
|
+
|
|
156
177
|
return () => {
|
|
157
178
|
childNodeList.forEach(node => {
|
|
158
179
|
node.style.display = 'none';
|
|
159
180
|
});
|
|
181
|
+
|
|
160
182
|
if (childNodeList.length > 1) {
|
|
161
183
|
iconRight.removeEventListener('click', () => onNextItem(childNodeList));
|
|
162
184
|
iconLeft.removeEventListener('click', () => onPrevItem(childNodeList));
|
|
@@ -166,9 +188,11 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
166
188
|
useEffect(() => {
|
|
167
189
|
if (!slideContainerRef.current) return;
|
|
168
190
|
const childNodeList = slideContainerRef.current.childNodes;
|
|
191
|
+
|
|
169
192
|
if (childNodeList.length > 1 && autoChangeTime && autoChangeTime > 0) {
|
|
170
193
|
autoChange = setInterval(() => onNextItem(childNodeList), autoChangeTime * 1000);
|
|
171
194
|
}
|
|
195
|
+
|
|
172
196
|
return () => {
|
|
173
197
|
if (childNodeList.length > 1 && autoChangeTime && autoChangeTime > 0) {
|
|
174
198
|
clearInterval(autoChange);
|
|
@@ -178,7 +202,9 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
178
202
|
useImperativeHandle(reference, () => {
|
|
179
203
|
const currentRef = ref.current || {};
|
|
180
204
|
const _instance = {}; // methods
|
|
205
|
+
|
|
181
206
|
_instance.__proto__ = {}; // hidden methods
|
|
207
|
+
|
|
182
208
|
currentRef.instance = _instance;
|
|
183
209
|
return currentRef;
|
|
184
210
|
});
|
|
@@ -236,6 +262,7 @@ const SliderContainer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
236
262
|
ref: ref
|
|
237
263
|
}, Slider, IconLeft, IconRight, Navigation);
|
|
238
264
|
}));
|
|
265
|
+
|
|
239
266
|
const containerCSS = IDs => css`
|
|
240
267
|
* {
|
|
241
268
|
${boxBorder};
|
|
@@ -286,6 +313,7 @@ const containerCSS = IDs => css`
|
|
|
286
313
|
}
|
|
287
314
|
}
|
|
288
315
|
`;
|
|
316
|
+
|
|
289
317
|
const navigationCSS = css`
|
|
290
318
|
${displayNone};
|
|
291
319
|
${positionRelative};
|
|
@@ -296,6 +324,7 @@ const navigationCSS = css`
|
|
|
296
324
|
${displayNone};
|
|
297
325
|
}
|
|
298
326
|
`;
|
|
327
|
+
|
|
299
328
|
const navigationListCSS = IDs => css`
|
|
300
329
|
${flexRow};
|
|
301
330
|
${positionAbsolute};
|
|
@@ -318,6 +347,7 @@ const navigationListCSS = IDs => css`
|
|
|
318
347
|
}
|
|
319
348
|
}
|
|
320
349
|
`;
|
|
350
|
+
|
|
321
351
|
SliderContainer.defaultProps = {
|
|
322
352
|
animation: true,
|
|
323
353
|
autoChangeTime: 0,
|
|
@@ -330,18 +360,25 @@ SliderContainer.defaultProps = {
|
|
|
330
360
|
SliderContainer.propTypes = {
|
|
331
361
|
/** Index of the active item. */
|
|
332
362
|
active: PropTypes.number,
|
|
363
|
+
|
|
333
364
|
/** Enable/disable the animation when change active item. */
|
|
334
365
|
animation: PropTypes.bool,
|
|
366
|
+
|
|
335
367
|
/** Time to slider auto change (s). */
|
|
336
368
|
autoChangeTime: PropTypes.number,
|
|
369
|
+
|
|
337
370
|
/** Element or node to display on slider without data. */
|
|
338
371
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
|
|
372
|
+
|
|
339
373
|
/** Class for component. */
|
|
340
374
|
className: PropTypes.string,
|
|
375
|
+
|
|
341
376
|
/** Data to display on slider. */
|
|
342
377
|
data: PropTypes.array,
|
|
378
|
+
|
|
343
379
|
/** Show/hide the navigation bar. */
|
|
344
380
|
onShowNavigation: PropTypes.bool,
|
|
381
|
+
|
|
345
382
|
/** Style inline of component. */
|
|
346
383
|
style: PropTypes.object
|
|
347
384
|
};
|