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,6 +1,9 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
+
|
|
2
3
|
/* eslint-disable react/prop-types */
|
|
4
|
+
|
|
3
5
|
/** @jsxRuntime classic */
|
|
6
|
+
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
import { useEffect, useRef } from 'react';
|
|
6
9
|
import { jsx, css } from '@emotion/core';
|
|
@@ -14,27 +17,32 @@ const easing = {
|
|
|
14
17
|
return Math.pow(pos - 1, 3) - 1;
|
|
15
18
|
}
|
|
16
19
|
};
|
|
20
|
+
|
|
17
21
|
const addZero = i => {
|
|
18
22
|
if (i < 10) {
|
|
19
23
|
i = '0' + i;
|
|
20
24
|
}
|
|
25
|
+
|
|
21
26
|
return i;
|
|
22
|
-
};
|
|
27
|
+
}; //get hours of day
|
|
23
28
|
|
|
24
|
-
//get hours of day
|
|
25
29
|
|
|
26
30
|
const getHours = () => {
|
|
27
31
|
let hours = [],
|
|
28
|
-
|
|
32
|
+
i = 0;
|
|
33
|
+
|
|
29
34
|
for (i; i < 24; i++) {
|
|
30
35
|
hours.push({
|
|
31
36
|
value: i,
|
|
32
37
|
text: addZero(i)
|
|
33
38
|
});
|
|
34
39
|
}
|
|
40
|
+
|
|
35
41
|
return hours;
|
|
36
42
|
};
|
|
43
|
+
|
|
37
44
|
const gradient = 'rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0)';
|
|
45
|
+
|
|
38
46
|
const Swiper = props => {
|
|
39
47
|
//properties
|
|
40
48
|
const {
|
|
@@ -52,9 +60,8 @@ const Swiper = props => {
|
|
|
52
60
|
value,
|
|
53
61
|
width,
|
|
54
62
|
...other
|
|
55
|
-
} = props;
|
|
63
|
+
} = props; //id + class
|
|
56
64
|
|
|
57
|
-
//id + class
|
|
58
65
|
const Id = randomString({
|
|
59
66
|
allowSymbol: false,
|
|
60
67
|
allowNumber: false
|
|
@@ -66,14 +73,12 @@ const Swiper = props => {
|
|
|
66
73
|
highlightOption: 'DCUI-swiper-highlight-option' + Id,
|
|
67
74
|
mainSelector: 'DCUI-swiper-main-selector' + Id,
|
|
68
75
|
mainOption: 'DCUI-swiper-main-option' + Id
|
|
69
|
-
};
|
|
76
|
+
}; //reference
|
|
70
77
|
|
|
71
|
-
//reference
|
|
72
78
|
const containerRef = useRef(null);
|
|
73
79
|
const mainSelectorRef = useRef(null);
|
|
74
|
-
const highlightSelectorRef = useRef(null);
|
|
80
|
+
const highlightSelectorRef = useRef(null); //variables
|
|
75
81
|
|
|
76
|
-
//variables
|
|
77
82
|
const thisCount = count - count % 4;
|
|
78
83
|
const itemAngle = 360 / thisCount;
|
|
79
84
|
const itemHeight = Math.ceil(height * 3 / thisCount);
|
|
@@ -90,8 +95,8 @@ const Swiper = props => {
|
|
|
90
95
|
touchstart: null,
|
|
91
96
|
touchmove: null,
|
|
92
97
|
touchend: null
|
|
93
|
-
};
|
|
94
|
-
|
|
98
|
+
}; //style
|
|
99
|
+
|
|
95
100
|
const styles = {
|
|
96
101
|
container: css`
|
|
97
102
|
* {
|
|
@@ -173,18 +178,24 @@ const Swiper = props => {
|
|
|
173
178
|
}
|
|
174
179
|
`
|
|
175
180
|
};
|
|
181
|
+
|
|
176
182
|
const renderSwiper = data => {
|
|
177
183
|
if (!data.length) return;
|
|
184
|
+
|
|
178
185
|
if (type === 'infinite') {
|
|
179
186
|
let concatData = [].concat(data);
|
|
187
|
+
|
|
180
188
|
while (concatData.length < data) {
|
|
181
189
|
concatData = concatData.concat(data);
|
|
182
190
|
}
|
|
191
|
+
|
|
183
192
|
data = concatData;
|
|
184
193
|
}
|
|
194
|
+
|
|
185
195
|
let lengthData = data.length,
|
|
186
|
-
|
|
187
|
-
|
|
196
|
+
mainOptions = '',
|
|
197
|
+
highlightOptions = '';
|
|
198
|
+
|
|
188
199
|
for (let i in data) {
|
|
189
200
|
mainOptions += `<li
|
|
190
201
|
class="${IDs.mainOption}"
|
|
@@ -206,6 +217,7 @@ const Swiper = props => {
|
|
|
206
217
|
${data[i].text || data[i].value}
|
|
207
218
|
</li>`;
|
|
208
219
|
}
|
|
220
|
+
|
|
209
221
|
if (type === 'infinite') {
|
|
210
222
|
for (let i = 0; i < thisCount / 4; i++) {
|
|
211
223
|
mainOptions = `<li
|
|
@@ -232,6 +244,7 @@ const Swiper = props => {
|
|
|
232
244
|
data-index="${i + lengthData}">
|
|
233
245
|
${data[i].text || data[i].value}</li>`;
|
|
234
246
|
}
|
|
247
|
+
|
|
235
248
|
highlightOptions = `<li
|
|
236
249
|
class="${IDs.highlightOption}"
|
|
237
250
|
style="
|
|
@@ -247,21 +260,27 @@ const Swiper = props => {
|
|
|
247
260
|
highlightSelectorRef.current.style.top = direction === 'vertical' ? -itemHeight - 2 + 'px' : 'auto';
|
|
248
261
|
highlightSelectorRef.current.style.left = direction === 'vertical' ? 'auto' : -itemWidth - 2 + 'px';
|
|
249
262
|
}
|
|
263
|
+
|
|
250
264
|
mainSelectorRef.current.innerHTML = mainOptions;
|
|
251
265
|
highlightSelectorRef.current.innerHTML = highlightOptions;
|
|
252
266
|
};
|
|
267
|
+
|
|
253
268
|
const normalizeScroll = scroll => {
|
|
254
269
|
let normalizedScroll = scroll;
|
|
270
|
+
|
|
255
271
|
while (normalizedScroll < 0) {
|
|
256
272
|
normalizedScroll += data.length;
|
|
257
273
|
}
|
|
274
|
+
|
|
258
275
|
normalizedScroll = normalizedScroll % data.length;
|
|
259
276
|
return normalizedScroll;
|
|
260
277
|
};
|
|
278
|
+
|
|
261
279
|
const moveTo = scroll => {
|
|
262
280
|
if (type === 'infinite') {
|
|
263
281
|
scroll = normalizeScroll(scroll);
|
|
264
282
|
}
|
|
283
|
+
|
|
265
284
|
if (!mainSelectorRef.current) return;
|
|
266
285
|
mainSelectorRef.current.style.transform = `translate3d(0, 0, ${-radius}px) rotateX(${itemAngle * scroll}deg)`;
|
|
267
286
|
highlightSelectorRef.current.style.transform = `translate3d(0, ${-scroll * (direction === 'vertical' ? itemHeight : itemWidth)}px, 0)`;
|
|
@@ -275,22 +294,27 @@ const Swiper = props => {
|
|
|
275
294
|
});
|
|
276
295
|
return scroll;
|
|
277
296
|
};
|
|
297
|
+
|
|
278
298
|
const stop = () => {
|
|
279
299
|
thisMoving = false;
|
|
280
300
|
cancelAnimationFrame(thisMoveT);
|
|
281
301
|
};
|
|
302
|
+
|
|
282
303
|
const animateToScroll = (initScroll, finalScroll, t, easingName = 'easingOutCubic') => {
|
|
283
304
|
if (initScroll === finalScroll || t === 0) {
|
|
284
305
|
moveTo(initScroll);
|
|
285
306
|
return;
|
|
286
307
|
}
|
|
308
|
+
|
|
287
309
|
let start = new Date().getTime() / 1200;
|
|
288
310
|
let pass = 0;
|
|
289
311
|
let totalScrollLen = finalScroll - initScroll;
|
|
290
312
|
return new Promise(resolve => {
|
|
291
313
|
thisMoving = true;
|
|
314
|
+
|
|
292
315
|
let tick = () => {
|
|
293
316
|
pass = new Date().getTime() / 1200 - start;
|
|
317
|
+
|
|
294
318
|
if (pass < t) {
|
|
295
319
|
thisScroll = moveTo(initScroll + easing[easingName](pass / t) * totalScrollLen);
|
|
296
320
|
thisMoveT = requestAnimationFrame(tick);
|
|
@@ -300,21 +324,26 @@ const Swiper = props => {
|
|
|
300
324
|
thisScroll = moveTo(initScroll + totalScrollLen);
|
|
301
325
|
}
|
|
302
326
|
};
|
|
327
|
+
|
|
303
328
|
tick();
|
|
304
329
|
});
|
|
305
330
|
};
|
|
331
|
+
|
|
306
332
|
const selectByScroll = scroll => {
|
|
307
333
|
scroll = normalizeScroll(scroll) | 0;
|
|
334
|
+
|
|
308
335
|
if (scroll > data.length - 1) {
|
|
309
336
|
scroll = data.length - 1;
|
|
310
337
|
moveTo(scroll);
|
|
311
338
|
}
|
|
339
|
+
|
|
312
340
|
moveTo(scroll);
|
|
313
341
|
thisScroll = scroll;
|
|
314
342
|
thisSelected = data[scroll];
|
|
315
343
|
thisValue = thisSelected.value;
|
|
316
344
|
if (onChange) onChange(thisSelected);
|
|
317
345
|
};
|
|
346
|
+
|
|
318
347
|
const select = value => {
|
|
319
348
|
for (let i in data) {
|
|
320
349
|
if (data[i].value === value) {
|
|
@@ -327,8 +356,10 @@ const Swiper = props => {
|
|
|
327
356
|
return;
|
|
328
357
|
}
|
|
329
358
|
}
|
|
359
|
+
|
|
330
360
|
throw new Error(`Can not select value: ${value}, ${value} match nothing in current data`);
|
|
331
361
|
};
|
|
362
|
+
|
|
332
363
|
const animateMoveByInitV = async initV => {
|
|
333
364
|
let initScroll;
|
|
334
365
|
let finalScroll;
|
|
@@ -336,6 +367,7 @@ const Swiper = props => {
|
|
|
336
367
|
let totalScrollLen;
|
|
337
368
|
let a;
|
|
338
369
|
let t;
|
|
370
|
+
|
|
339
371
|
if (type === 'infinite') {
|
|
340
372
|
initScroll = thisScroll;
|
|
341
373
|
a = initV > 0 ? -thisA : thisA;
|
|
@@ -366,8 +398,10 @@ const Swiper = props => {
|
|
|
366
398
|
await animateToScroll(thisScroll, finalScroll, t);
|
|
367
399
|
}
|
|
368
400
|
}
|
|
401
|
+
|
|
369
402
|
selectByScroll(thisScroll);
|
|
370
403
|
};
|
|
404
|
+
|
|
371
405
|
const touchstart = (e, touchData, parent) => {
|
|
372
406
|
parent.addEventListener('touchmove', events.touchmove, {
|
|
373
407
|
passive: true
|
|
@@ -379,14 +413,18 @@ const Swiper = props => {
|
|
|
379
413
|
touchData.touchScroll = thisScroll;
|
|
380
414
|
stop();
|
|
381
415
|
};
|
|
416
|
+
|
|
382
417
|
const touchmove = (e, touchData, parent) => {
|
|
383
418
|
let event = e.clientY || e.touches[0].clientY;
|
|
384
419
|
touchData.array.push([event, new Date().getTime()]);
|
|
420
|
+
|
|
385
421
|
if (touchData.array.length > 5) {
|
|
386
422
|
touchData.array.unshift();
|
|
387
423
|
}
|
|
424
|
+
|
|
388
425
|
let scrollAdd = (touchData.start - event) / (direction === 'vertical' ? itemHeight : itemWidth);
|
|
389
426
|
let moveToScroll = scrollAdd + thisScroll;
|
|
427
|
+
|
|
390
428
|
if (type === 'infinite') {
|
|
391
429
|
moveToScroll = normalizeScroll(moveToScroll);
|
|
392
430
|
} else {
|
|
@@ -396,14 +434,17 @@ const Swiper = props => {
|
|
|
396
434
|
moveToScroll = data.length + (moveToScroll - data.length) * 0.3;
|
|
397
435
|
}
|
|
398
436
|
}
|
|
437
|
+
|
|
399
438
|
touchData.touchScroll = moveTo(moveToScroll);
|
|
400
439
|
};
|
|
440
|
+
|
|
401
441
|
const touchend = (e, touchData, parent) => {
|
|
402
442
|
parent.removeEventListener('touchmove', events.touchmove, {
|
|
403
443
|
passive: true
|
|
404
444
|
});
|
|
405
445
|
parent.removeEventListener('mousemove', events.touchmove);
|
|
406
446
|
let v;
|
|
447
|
+
|
|
407
448
|
if (touchData.array.length === 1) {
|
|
408
449
|
v = 0;
|
|
409
450
|
} else {
|
|
@@ -415,39 +456,48 @@ const Swiper = props => {
|
|
|
415
456
|
let sign = v > 0 ? 1 : -1;
|
|
416
457
|
v = Math.abs(v) > 30 ? 30 * sign : v;
|
|
417
458
|
}
|
|
459
|
+
|
|
418
460
|
thisScroll = touchData.touchScroll;
|
|
419
461
|
animateMoveByInitV(v);
|
|
420
462
|
};
|
|
463
|
+
|
|
421
464
|
const init = parent => {
|
|
422
465
|
renderSwiper(data);
|
|
423
466
|
let touchData = {
|
|
424
467
|
start: 0,
|
|
425
468
|
array: []
|
|
426
469
|
};
|
|
470
|
+
|
|
427
471
|
events.touchstart = e => {
|
|
428
472
|
if (parent.contains(e.target) || e.target === parent) {
|
|
429
473
|
e.preventDefault();
|
|
474
|
+
|
|
430
475
|
if (data.length) {
|
|
431
476
|
touchstart(e, touchData, parent);
|
|
432
477
|
}
|
|
433
478
|
}
|
|
434
479
|
};
|
|
480
|
+
|
|
435
481
|
events.touchmove = e => {
|
|
436
482
|
if (parent.contains(e.target) || e.target === parent) {
|
|
437
483
|
e.preventDefault();
|
|
484
|
+
|
|
438
485
|
if (data.length) {
|
|
439
486
|
touchmove(e, touchData, parent);
|
|
440
487
|
}
|
|
441
488
|
}
|
|
442
489
|
};
|
|
490
|
+
|
|
443
491
|
events.touchend = e => {
|
|
444
492
|
if (parent.contains(e.target) || e.target === parent) {
|
|
445
493
|
e.preventDefault();
|
|
494
|
+
|
|
446
495
|
if (data.length) {
|
|
447
496
|
touchend(e, touchData, parent);
|
|
448
497
|
}
|
|
449
498
|
}
|
|
450
499
|
};
|
|
500
|
+
|
|
451
501
|
parent.addEventListener('touchstart', events.touchstart, {
|
|
452
502
|
passive: true
|
|
453
503
|
});
|
|
@@ -456,26 +506,30 @@ const Swiper = props => {
|
|
|
456
506
|
});
|
|
457
507
|
parent.addEventListener('mousedown', events.touchstart);
|
|
458
508
|
parent.addEventListener('mouseup', events.touchend);
|
|
509
|
+
|
|
459
510
|
if (data.length) {
|
|
460
511
|
thisValue = defaultValue ? defaultValue : data[0].value;
|
|
461
512
|
select(thisValue);
|
|
462
513
|
}
|
|
463
514
|
};
|
|
515
|
+
|
|
464
516
|
const destroy = parent => {
|
|
465
517
|
stop();
|
|
518
|
+
|
|
466
519
|
for (let eventName in events) {
|
|
467
520
|
parent.removeEventListener(eventName, events[eventName]);
|
|
468
521
|
}
|
|
522
|
+
|
|
469
523
|
parent.removeEventListener('mousedown', events.touchstart);
|
|
470
524
|
parent.removeEventListener('mousemove', events.touchmove);
|
|
471
525
|
parent.removeEventListener('mouseup', events.touchend);
|
|
472
526
|
parent.innerHTML = '';
|
|
473
|
-
};
|
|
474
|
-
// useEffect(() => {
|
|
527
|
+
}; // useEffect(() => {
|
|
475
528
|
// const parent = (parentNode && parentNode.current) || (containerRef.current && containerRef.current.parentNode);
|
|
476
529
|
// init(parent);
|
|
477
530
|
// });
|
|
478
531
|
|
|
532
|
+
|
|
479
533
|
useEffect(() => {
|
|
480
534
|
const parent = parentNode && parentNode.current || containerRef.current && containerRef.current.parentNode;
|
|
481
535
|
init(parent);
|
|
@@ -488,20 +542,17 @@ const Swiper = props => {
|
|
|
488
542
|
select(value);
|
|
489
543
|
}
|
|
490
544
|
}, [value]);
|
|
491
|
-
return jsx("div", {
|
|
492
|
-
...other,
|
|
545
|
+
return jsx("div", { ...other,
|
|
493
546
|
className: IDs.container,
|
|
494
547
|
css: styles.container,
|
|
495
548
|
ref: containerRef,
|
|
496
|
-
style: {
|
|
497
|
-
...containerStyle
|
|
549
|
+
style: { ...containerStyle
|
|
498
550
|
}
|
|
499
551
|
}, jsx("ul", {
|
|
500
552
|
className: IDs.mainSelector,
|
|
501
553
|
css: styles.mainSelector,
|
|
502
554
|
ref: mainSelectorRef,
|
|
503
|
-
style: {
|
|
504
|
-
...mainSelectorStyle
|
|
555
|
+
style: { ...mainSelectorStyle
|
|
505
556
|
}
|
|
506
557
|
}), jsx("div", {
|
|
507
558
|
className: IDs.highlight,
|
|
@@ -512,6 +563,7 @@ const Swiper = props => {
|
|
|
512
563
|
ref: highlightSelectorRef
|
|
513
564
|
})));
|
|
514
565
|
};
|
|
566
|
+
|
|
515
567
|
Swiper.defaultProps = {
|
|
516
568
|
containerStyle: {},
|
|
517
569
|
count: 18,
|
|
@@ -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';
|
|
@@ -50,6 +51,7 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
50
51
|
if (!inputRef) {
|
|
51
52
|
inputRef = useRef(null);
|
|
52
53
|
}
|
|
54
|
+
|
|
53
55
|
const [checkedState, setCheckedState] = useState(Boolean(checked !== undefined ? checked : defaultChecked));
|
|
54
56
|
const padding = spacing(0.5);
|
|
55
57
|
const formCheck = css`
|
|
@@ -135,18 +137,19 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
135
137
|
allowNumber: false,
|
|
136
138
|
allowSymbol: false
|
|
137
139
|
});
|
|
140
|
+
|
|
138
141
|
const handleChange = () => {
|
|
139
142
|
if (disabled || readOnly) return;
|
|
140
143
|
setCheckedState(checked !== undefined ? Boolean(checked) : !checkedState);
|
|
141
144
|
const e = {
|
|
142
145
|
value: !checkedState,
|
|
143
|
-
target: {
|
|
144
|
-
...inputRef.current,
|
|
146
|
+
target: { ...inputRef.current,
|
|
145
147
|
checked: !checkedState
|
|
146
148
|
}
|
|
147
149
|
};
|
|
148
150
|
if (onChange) onChange(e);
|
|
149
151
|
};
|
|
152
|
+
|
|
150
153
|
useEffect(() => {
|
|
151
154
|
if (checked !== undefined) setCheckedState(Boolean(checked));
|
|
152
155
|
}, [checked]);
|
|
@@ -155,8 +158,7 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
155
158
|
css: formCheck,
|
|
156
159
|
ref: ref,
|
|
157
160
|
...props
|
|
158
|
-
}, jsx("input", {
|
|
159
|
-
...inputProps,
|
|
161
|
+
}, jsx("input", { ...inputProps,
|
|
160
162
|
ref: inputRef,
|
|
161
163
|
hidden: true,
|
|
162
164
|
name: name,
|
|
@@ -203,34 +205,47 @@ Toggle.defaultProps = {
|
|
|
203
205
|
Toggle.propTypes = {
|
|
204
206
|
/** * If `true`, the component is disabled. */
|
|
205
207
|
disabled: PropTypes.bool,
|
|
208
|
+
|
|
206
209
|
/** prevent all event if true */
|
|
207
210
|
readOnly: PropTypes.bool,
|
|
211
|
+
|
|
208
212
|
/** If `true`, the component is defaultChecked. */
|
|
209
213
|
defaultChecked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
214
|
+
|
|
210
215
|
/** If `true`, the component is checked. */
|
|
211
216
|
checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
217
|
+
|
|
212
218
|
/** Id is randomized randomly to avoid duplication. */
|
|
213
219
|
id: PropTypes.string,
|
|
220
|
+
|
|
214
221
|
/** Name attribute of the `input` element. */
|
|
215
222
|
name: PropTypes.string,
|
|
223
|
+
|
|
216
224
|
/** The name of the Radio is displayed on the interface */
|
|
217
225
|
label: PropTypes.string,
|
|
226
|
+
|
|
218
227
|
/** height is a number, height of Toggle default 20 */
|
|
219
228
|
height: PropTypes.number,
|
|
229
|
+
|
|
220
230
|
/** width is a number, width of Toggle default 40 */
|
|
221
231
|
width: PropTypes.number,
|
|
232
|
+
|
|
222
233
|
/** props for input */
|
|
223
234
|
inputProps: PropTypes.object,
|
|
235
|
+
|
|
224
236
|
/** The line-clamp property truncates text at a specific number of Label. */
|
|
225
237
|
lineClamp: PropTypes.number,
|
|
238
|
+
|
|
226
239
|
/** Shows tooltip containing Label on hover */
|
|
227
240
|
hoverTooltip: PropTypes.bool,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
*
|
|
231
|
-
*
|
|
241
|
+
|
|
242
|
+
/** * Callback fired when the state is changed.
|
|
243
|
+
*
|
|
244
|
+
* @param {object} event The event source of the callback.
|
|
245
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
232
246
|
*/
|
|
233
247
|
onChange: PropTypes.func,
|
|
248
|
+
|
|
234
249
|
/** If `true`, the label will indicate that the checkbox is required. */
|
|
235
250
|
required: PropTypes.bool
|
|
236
251
|
};
|
|
@@ -14,8 +14,7 @@ const HelperText = /*#__PURE__*/memo(({
|
|
|
14
14
|
};
|
|
15
15
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
16
16
|
type: 'p3',
|
|
17
|
-
style: {
|
|
18
|
-
...helperText,
|
|
17
|
+
style: { ...helperText,
|
|
19
18
|
...style
|
|
20
19
|
},
|
|
21
20
|
...props
|
|
@@ -27,6 +26,7 @@ HelperText.defaultProps = {
|
|
|
27
26
|
HelperText.propTypes = {
|
|
28
27
|
/** helper text for input */
|
|
29
28
|
text: PropTypes.string,
|
|
29
|
+
|
|
30
30
|
/** style inline of helper text in HelperText component */
|
|
31
31
|
style: PropTypes.object
|
|
32
32
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { jsx, css } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -6,6 +7,7 @@ import Input from "../form-view/input";
|
|
|
6
7
|
import Label from "../form-view/label";
|
|
7
8
|
import HelperText from "../form-view/helper-text";
|
|
8
9
|
import { dark4 } from "../../styles/colors";
|
|
10
|
+
|
|
9
11
|
const FormLabel = ({
|
|
10
12
|
label,
|
|
11
13
|
inputProps,
|
|
@@ -52,6 +54,7 @@ const FormLabel = ({
|
|
|
52
54
|
...helperTextProps
|
|
53
55
|
}));
|
|
54
56
|
};
|
|
57
|
+
|
|
55
58
|
FormLabel.defaultProps = {
|
|
56
59
|
label: '',
|
|
57
60
|
value: '',
|
|
@@ -66,26 +69,37 @@ FormLabel.defaultProps = {
|
|
|
66
69
|
FormLabel.propTypes = {
|
|
67
70
|
/** utc for Form label */
|
|
68
71
|
utc: PropTypes.bool,
|
|
72
|
+
|
|
69
73
|
/** thousandSeparator for Form label */
|
|
70
74
|
thousandSeparator: PropTypes.bool,
|
|
75
|
+
|
|
71
76
|
/** thousandChar for Form label */
|
|
72
77
|
thousandChar: PropTypes.string,
|
|
78
|
+
|
|
73
79
|
/** label for Form label */
|
|
74
80
|
label: PropTypes.string,
|
|
81
|
+
|
|
75
82
|
/** the displayed value for each change */
|
|
76
83
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
84
|
+
|
|
77
85
|
/** text for Form label */
|
|
78
86
|
text: PropTypes.string,
|
|
87
|
+
|
|
79
88
|
/** viewType for Form label */
|
|
80
89
|
viewType: PropTypes.string,
|
|
90
|
+
|
|
81
91
|
/** dataType for Form label */
|
|
82
92
|
dataType: PropTypes.string,
|
|
93
|
+
|
|
83
94
|
/** props of span in InputView comp** dataType for Form label */
|
|
84
95
|
format: PropTypes.string,
|
|
96
|
+
|
|
85
97
|
/** props of span in format component */
|
|
86
98
|
inputProps: PropTypes.object,
|
|
99
|
+
|
|
87
100
|
/** style inline of span in InputView component */
|
|
88
101
|
inputStyleProps: PropTypes.object,
|
|
102
|
+
|
|
89
103
|
/** props for helper text */
|
|
90
104
|
helperTextProps: PropTypes.object
|
|
91
105
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { jsx, css } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -19,6 +20,7 @@ const InputView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
19
20
|
if (!ref) {
|
|
20
21
|
ref = useRef(null);
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
const inputRef = useRef(null);
|
|
23
25
|
const TextInput = viewType !== 'outlined' ? css`
|
|
24
26
|
display: flex;
|
|
@@ -69,34 +71,41 @@ const InputView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
69
71
|
pointer-events: none;
|
|
70
72
|
}
|
|
71
73
|
`;
|
|
74
|
+
|
|
72
75
|
const numberWithFormat = (x, thousandChar) => {
|
|
73
76
|
let a = '';
|
|
77
|
+
|
|
74
78
|
switch (thousandChar) {
|
|
75
79
|
case ',':
|
|
76
80
|
a = x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
77
81
|
break;
|
|
82
|
+
|
|
78
83
|
case '.':
|
|
79
84
|
a = x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
80
85
|
break;
|
|
86
|
+
|
|
81
87
|
default:
|
|
82
88
|
a = x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
83
89
|
}
|
|
90
|
+
|
|
84
91
|
return a;
|
|
85
92
|
};
|
|
93
|
+
|
|
86
94
|
const dateWithFormat = date => {
|
|
87
95
|
value = formatDate(date, format, utc);
|
|
88
96
|
return value;
|
|
89
97
|
};
|
|
98
|
+
|
|
90
99
|
useEffect(() => {
|
|
91
100
|
if (dataType === 'integer' && format !== null) {
|
|
92
101
|
inputRef.current.innerHTML = numberWithFormat(value, thousandChar);
|
|
93
102
|
}
|
|
103
|
+
|
|
94
104
|
if (dataType === 'date' && format !== null) {
|
|
95
105
|
inputRef.current.innerHTML = dateWithFormat(value);
|
|
96
106
|
}
|
|
97
107
|
}, [value]);
|
|
98
|
-
return useMemo(() => jsx("span", {
|
|
99
|
-
...inputProps,
|
|
108
|
+
return useMemo(() => jsx("span", { ...inputProps,
|
|
100
109
|
style: inputStyleProps,
|
|
101
110
|
css: TextInput,
|
|
102
111
|
ref: inputRef
|
|
@@ -108,8 +117,10 @@ InputView.defaultProps = {
|
|
|
108
117
|
InputView.propTypes = {
|
|
109
118
|
/** the displayed value for each change */
|
|
110
119
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
120
|
+
|
|
111
121
|
/** props of span in InputView component */
|
|
112
122
|
inputProps: PropTypes.object,
|
|
123
|
+
|
|
113
124
|
/** style inline of span in InputView component */
|
|
114
125
|
inputStyleProps: PropTypes.object
|
|
115
126
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { jsx, css } from '@emotion/core';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
@@ -26,6 +27,7 @@ Label.defaultProps = {
|
|
|
26
27
|
Label.propTypes = {
|
|
27
28
|
/** label for input */
|
|
28
29
|
label: PropTypes.string,
|
|
30
|
+
|
|
29
31
|
/** style inline of label in Label component */
|
|
30
32
|
labelProps: PropTypes.object
|
|
31
33
|
};
|