diginet-core-ui 1.3.88 → 1.3.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +4 -4
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +2 -6
- package/components/accordion/group.js +2 -9
- package/components/accordion/index.js +2 -15
- package/components/accordion/summary.js +4 -27
- package/components/alert/index.js +2 -33
- package/components/alert/notify.js +12 -22
- package/components/avatar/index.js +22 -81
- package/components/badge/index.js +20 -45
- package/components/button/icon.js +25 -56
- package/components/button/index.js +16 -65
- package/components/button/more.js +15 -35
- package/components/button/ripple-effect.js +0 -10
- package/components/card/body.js +2 -7
- package/components/card/extra.js +2 -7
- package/components/card/footer.js +2 -7
- package/components/card/header.js +2 -7
- package/components/card/index.js +2 -22
- package/components/chart/Pie/Circle.js +0 -1
- package/components/chart/Pie/Sector.js +2 -19
- package/components/chart/Pie/Sectors.js +0 -10
- package/components/chart/Pie/index.js +4 -36
- package/components/chart/Pie-v2/Circle.js +0 -1
- package/components/chart/Pie-v2/Sector.js +2 -15
- package/components/chart/Pie-v2/Sectors.js +0 -20
- package/components/chart/Pie-v2/index.js +11 -38
- package/components/chart/bar/Axis.js +0 -12
- package/components/chart/bar/Bar.js +13 -35
- package/components/chart/bar/Grid.js +0 -18
- package/components/chart/bar/Labels.js +4 -22
- package/components/chart/bar/Points.js +0 -17
- package/components/chart/bar/index.js +6 -26
- package/components/chart/bar-v2/Axis.js +0 -12
- package/components/chart/bar-v2/Bar.js +15 -36
- package/components/chart/bar-v2/Grid.js +0 -18
- package/components/chart/bar-v2/Labels.js +4 -22
- package/components/chart/bar-v2/Points.js +0 -17
- package/components/chart/bar-v2/index.js +6 -26
- package/components/chart/line/Axis.js +4 -16
- package/components/chart/line/Grid.js +2 -19
- package/components/chart/line/Labels.js +4 -22
- package/components/chart/line/Path.js +24 -34
- package/components/chart/line/Point.js +7 -41
- package/components/chart/line/Title.js +0 -3
- package/components/chart/line/index.js +12 -35
- package/components/chart/line-v2/Axis.js +0 -13
- package/components/chart/line-v2/Grid.js +0 -18
- package/components/chart/line-v2/Labels.js +4 -22
- package/components/chart/line-v2/Path.js +23 -33
- package/components/chart/line-v2/Point.js +6 -35
- package/components/chart/line-v2/Title.js +0 -3
- package/components/chart/line-v2/index.js +12 -30
- package/components/check-text/index.js +7 -15
- package/components/check-text/interview-confirmation.js +24 -31
- package/components/check-text/interview-status.js +24 -31
- package/components/chip/attach.js +9 -22
- package/components/chip/index.js +13 -38
- package/components/collapse/index.js +0 -13
- package/components/divider/index.js +2 -13
- package/components/form-control/attachment/index.js +41 -202
- package/components/form-control/calendar/function.js +154 -208
- package/components/form-control/calendar/index.js +21 -46
- package/components/form-control/calendar/range.js +11 -28
- package/components/form-control/checkbox/index.js +12 -46
- package/components/form-control/control/index.js +4 -14
- package/components/form-control/date-picker/index-old.js +18 -0
- package/components/form-control/date-picker/index.js +23 -99
- package/components/form-control/date-range-picker/index.js +44 -180
- package/components/form-control/dropdown/index.js +101 -314
- package/components/form-control/dropdown-box/index.js +7 -37
- package/components/form-control/form/index.js +0 -2
- package/components/form-control/form-group/index.js +1 -6
- package/components/form-control/helper-text/index.js +2 -9
- package/components/form-control/input-base/index.js +4 -68
- package/components/form-control/label/index.js +2 -12
- package/components/form-control/money-input/index.js +54 -143
- package/components/form-control/number-input/index.js +26 -124
- package/components/form-control/number-input/index2.js +95 -134
- package/components/form-control/phone-input/index.js +23 -85
- package/components/form-control/radio/index.js +16 -35
- package/components/form-control/text-input/index.js +10 -46
- package/components/form-control/time-picker/index.js +43 -100
- package/components/form-control/time-picker/swiper.js +21 -73
- package/components/form-control/toggle/index.js +26 -40
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +0 -14
- package/components/form-view/input.js +2 -13
- package/components/form-view/label.js +0 -2
- package/components/grid/Col.js +2 -16
- package/components/grid/Container.js +2 -21
- package/components/grid/Row.js +2 -21
- package/components/grid/index.js +2 -44
- package/components/image/index.js +2 -22
- package/components/index.js +62 -31
- package/components/list/list-item-action.js +12 -21
- package/components/list/list-item-icon.js +10 -19
- package/components/list/list-item-text.js +0 -5
- package/components/list/list-item.js +27 -38
- package/components/list/list.js +37 -50
- package/components/list/sub-header.js +13 -17
- package/components/modal/body.js +2 -6
- package/components/modal/footer.js +2 -11
- package/components/modal/header.js +2 -12
- package/components/modal/index.js +2 -10
- package/components/modal/modal.js +11 -52
- package/components/others/extra/index.js +3 -10
- package/components/others/import/index.js +0 -7
- package/components/others/option-wrapper/index.js +4 -7
- package/components/others/scrollbar/index.js +0 -3
- package/components/paging/page-info.js +35 -99
- package/components/paging/page-selector.js +10 -38
- package/components/paging/page-selector2.js +35 -74
- package/components/paper/index.js +23 -34
- package/components/popover/body.js +2 -6
- package/components/popover/footer.js +2 -11
- package/components/popover/header.js +2 -7
- package/components/popover/index.js +54 -146
- package/components/popup/danger_popup.js +0 -19
- package/components/popup/index.js +4 -50
- package/components/popup/proposals_popup.js +11 -50
- package/components/popup/v2/index.js +13 -47
- package/components/progress/circular.js +10 -48
- package/components/progress/linear.js +58 -74
- package/components/rating/index.js +10 -35
- package/components/slider/slider-container.js +4 -41
- package/components/slider/slider-item.js +10 -25
- package/components/status/index.js +2 -14
- package/components/tab/tab-container.js +4 -18
- package/components/tab/tab-header.js +4 -24
- package/components/tab/tab-panel.js +4 -16
- package/components/tab/tab.js +8 -33
- package/components/tooltip/index.js +12 -97
- package/components/tooltip/portal.js +0 -2
- package/components/transfer/index.js +28 -73
- package/components/tree-view/index.js +62 -202
- package/components/typography/index.js +14 -42
- package/global/index.js +0 -8
- package/icons/basic.js +0 -48
- package/icons/effect.js +15 -32
- package/icons/general/clock/clock.js +0 -2
- package/icons/general/color-handler/background.js +0 -2
- package/icons/general/color-handler/text.js +0 -2
- package/icons/general/emoji/emoji.js +0 -2
- package/icons/general/font-properties/bold.js +0 -2
- package/icons/general/font-properties/font-family.js +0 -2
- package/icons/general/font-properties/font-size.js +0 -2
- package/icons/general/font-properties/italic.js +0 -2
- package/icons/general/font-properties/underline.js +0 -2
- package/icons/general/hyperlink/hyperlink.js +0 -2
- package/icons/general/indent/decrease.js +0 -2
- package/icons/general/indent/increase.js +0 -2
- package/icons/general/list/bullets.js +0 -2
- package/icons/general/list/numbering.js +0 -2
- package/icons/general/picture/picture.js +0 -2
- package/icons/general/steps/redo.js +0 -2
- package/icons/general/steps/undo.js +0 -2
- package/icons/general/text-align/center.js +0 -2
- package/icons/general/text-align/justify.js +0 -2
- package/icons/general/text-align/left.js +0 -2
- package/icons/general/text-align/right.js +0 -2
- package/icons/menu/dhr.js +2 -1
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +2 -15
- package/package.json +42 -42
- package/readme.md +1034 -1027
- package/styles/animation.js +15 -58
- package/styles/color-helper.js +127 -157
- package/styles/colors.js +17 -9
- package/styles/general.js +16 -57
- package/styles/typography.js +4 -4
- package/styles/utils.js +18 -18
- package/theme/createBreakpoints.js +7 -18
- package/theme/make-styles.js +2 -5
- package/theme/set-theme.js +6 -9
- package/theme/settings.js +17 -22
- package/theme/theme-provider.js +0 -1
- package/utils/array/array.js +45 -54
- package/utils/classNames/index.js +0 -5
- package/utils/console.js +0 -6
- package/utils/date.js +69 -138
- package/utils/error/error.js +3 -11
- package/utils/error/errors.js +100 -147
- package/utils/getFileType.js +0 -9
- package/utils/handleBreakpoints.js +0 -5
- package/utils/intersectionObserver.js +0 -5
- package/utils/iterator.js +0 -9
- package/utils/map-parent.js +3 -10
- package/utils/object/extend.js +0 -10
- package/utils/object/object.js +12 -11
- package/utils/parseHTML.js +0 -1
- package/utils/promisify.js +0 -5
- package/utils/randomString.js +0 -7
- package/utils/remove-unicode.js +0 -1
- package/utils/render-portal.js +1 -9
- package/utils/renderHTML.js +4 -6
- package/utils/renderIcon.js +9 -19
- package/utils/sb-template.js +6 -5
- package/utils/string/capitalize.js +0 -1
- package/utils/string/capitalizeSentenceCase.js +0 -2
- package/utils/string/string.js +0 -13
- package/utils/type.js +0 -21
- package/utils/updatePosition.js +4 -5
- package/utils/useDelayUnmount.js +0 -4
- package/utils/useElementSize.js +9 -3
- package/utils/useEventListener.js +12 -6
- package/utils/useInput.js +0 -6
- package/utils/useMediaQuery/index.js +8 -10
- package/utils/useOnClickOutside.js +2 -4
- package/utils/usePortal.js +12 -19
- package/utils/validate.js +39 -53
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
|
-
|
|
3
2
|
/* eslint-disable react/prop-types */
|
|
4
|
-
|
|
5
3
|
/** @jsxRuntime classic */
|
|
6
|
-
|
|
7
4
|
/** @jsx jsx */
|
|
8
5
|
import { useEffect, useRef } from 'react';
|
|
9
6
|
import { jsx, css } from '@emotion/core';
|
|
@@ -17,32 +14,27 @@ const easing = {
|
|
|
17
14
|
return Math.pow(pos - 1, 3) - 1;
|
|
18
15
|
}
|
|
19
16
|
};
|
|
20
|
-
|
|
21
17
|
const addZero = i => {
|
|
22
18
|
if (i < 10) {
|
|
23
19
|
i = '0' + i;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
return i;
|
|
27
|
-
};
|
|
22
|
+
};
|
|
28
23
|
|
|
24
|
+
//get hours of day
|
|
29
25
|
|
|
30
26
|
const getHours = () => {
|
|
31
27
|
let hours = [],
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
i = 0;
|
|
34
29
|
for (i; i < 24; i++) {
|
|
35
30
|
hours.push({
|
|
36
31
|
value: i,
|
|
37
32
|
text: addZero(i)
|
|
38
33
|
});
|
|
39
34
|
}
|
|
40
|
-
|
|
41
35
|
return hours;
|
|
42
36
|
};
|
|
43
|
-
|
|
44
37
|
const gradient = 'rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0)';
|
|
45
|
-
|
|
46
38
|
const Swiper = props => {
|
|
47
39
|
//properties
|
|
48
40
|
const {
|
|
@@ -60,8 +52,9 @@ const Swiper = props => {
|
|
|
60
52
|
value,
|
|
61
53
|
width,
|
|
62
54
|
...other
|
|
63
|
-
} = props;
|
|
55
|
+
} = props;
|
|
64
56
|
|
|
57
|
+
//id + class
|
|
65
58
|
const Id = randomString({
|
|
66
59
|
allowSymbol: false,
|
|
67
60
|
allowNumber: false
|
|
@@ -73,12 +66,14 @@ const Swiper = props => {
|
|
|
73
66
|
highlightOption: 'DCUI-swiper-highlight-option' + Id,
|
|
74
67
|
mainSelector: 'DCUI-swiper-main-selector' + Id,
|
|
75
68
|
mainOption: 'DCUI-swiper-main-option' + Id
|
|
76
|
-
};
|
|
69
|
+
};
|
|
77
70
|
|
|
71
|
+
//reference
|
|
78
72
|
const containerRef = useRef(null);
|
|
79
73
|
const mainSelectorRef = useRef(null);
|
|
80
|
-
const highlightSelectorRef = useRef(null);
|
|
74
|
+
const highlightSelectorRef = useRef(null);
|
|
81
75
|
|
|
76
|
+
//variables
|
|
82
77
|
const thisCount = count - count % 4;
|
|
83
78
|
const itemAngle = 360 / thisCount;
|
|
84
79
|
const itemHeight = Math.ceil(height * 3 / thisCount);
|
|
@@ -95,8 +90,8 @@ const Swiper = props => {
|
|
|
95
90
|
touchstart: null,
|
|
96
91
|
touchmove: null,
|
|
97
92
|
touchend: null
|
|
98
|
-
};
|
|
99
|
-
|
|
93
|
+
};
|
|
94
|
+
//style
|
|
100
95
|
const styles = {
|
|
101
96
|
container: css`
|
|
102
97
|
* {
|
|
@@ -178,24 +173,18 @@ const Swiper = props => {
|
|
|
178
173
|
}
|
|
179
174
|
`
|
|
180
175
|
};
|
|
181
|
-
|
|
182
176
|
const renderSwiper = data => {
|
|
183
177
|
if (!data.length) return;
|
|
184
|
-
|
|
185
178
|
if (type === 'infinite') {
|
|
186
179
|
let concatData = [].concat(data);
|
|
187
|
-
|
|
188
180
|
while (concatData.length < data) {
|
|
189
181
|
concatData = concatData.concat(data);
|
|
190
182
|
}
|
|
191
|
-
|
|
192
183
|
data = concatData;
|
|
193
184
|
}
|
|
194
|
-
|
|
195
185
|
let lengthData = data.length,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
186
|
+
mainOptions = '',
|
|
187
|
+
highlightOptions = '';
|
|
199
188
|
for (let i in data) {
|
|
200
189
|
mainOptions += `<li
|
|
201
190
|
class="${IDs.mainOption}"
|
|
@@ -217,7 +206,6 @@ const Swiper = props => {
|
|
|
217
206
|
${data[i].text || data[i].value}
|
|
218
207
|
</li>`;
|
|
219
208
|
}
|
|
220
|
-
|
|
221
209
|
if (type === 'infinite') {
|
|
222
210
|
for (let i = 0; i < thisCount / 4; i++) {
|
|
223
211
|
mainOptions = `<li
|
|
@@ -244,7 +232,6 @@ const Swiper = props => {
|
|
|
244
232
|
data-index="${i + lengthData}">
|
|
245
233
|
${data[i].text || data[i].value}</li>`;
|
|
246
234
|
}
|
|
247
|
-
|
|
248
235
|
highlightOptions = `<li
|
|
249
236
|
class="${IDs.highlightOption}"
|
|
250
237
|
style="
|
|
@@ -260,27 +247,21 @@ const Swiper = props => {
|
|
|
260
247
|
highlightSelectorRef.current.style.top = direction === 'vertical' ? -itemHeight - 2 + 'px' : 'auto';
|
|
261
248
|
highlightSelectorRef.current.style.left = direction === 'vertical' ? 'auto' : -itemWidth - 2 + 'px';
|
|
262
249
|
}
|
|
263
|
-
|
|
264
250
|
mainSelectorRef.current.innerHTML = mainOptions;
|
|
265
251
|
highlightSelectorRef.current.innerHTML = highlightOptions;
|
|
266
252
|
};
|
|
267
|
-
|
|
268
253
|
const normalizeScroll = scroll => {
|
|
269
254
|
let normalizedScroll = scroll;
|
|
270
|
-
|
|
271
255
|
while (normalizedScroll < 0) {
|
|
272
256
|
normalizedScroll += data.length;
|
|
273
257
|
}
|
|
274
|
-
|
|
275
258
|
normalizedScroll = normalizedScroll % data.length;
|
|
276
259
|
return normalizedScroll;
|
|
277
260
|
};
|
|
278
|
-
|
|
279
261
|
const moveTo = scroll => {
|
|
280
262
|
if (type === 'infinite') {
|
|
281
263
|
scroll = normalizeScroll(scroll);
|
|
282
264
|
}
|
|
283
|
-
|
|
284
265
|
if (!mainSelectorRef.current) return;
|
|
285
266
|
mainSelectorRef.current.style.transform = `translate3d(0, 0, ${-radius}px) rotateX(${itemAngle * scroll}deg)`;
|
|
286
267
|
highlightSelectorRef.current.style.transform = `translate3d(0, ${-scroll * (direction === 'vertical' ? itemHeight : itemWidth)}px, 0)`;
|
|
@@ -294,27 +275,22 @@ const Swiper = props => {
|
|
|
294
275
|
});
|
|
295
276
|
return scroll;
|
|
296
277
|
};
|
|
297
|
-
|
|
298
278
|
const stop = () => {
|
|
299
279
|
thisMoving = false;
|
|
300
280
|
cancelAnimationFrame(thisMoveT);
|
|
301
281
|
};
|
|
302
|
-
|
|
303
282
|
const animateToScroll = (initScroll, finalScroll, t, easingName = 'easingOutCubic') => {
|
|
304
283
|
if (initScroll === finalScroll || t === 0) {
|
|
305
284
|
moveTo(initScroll);
|
|
306
285
|
return;
|
|
307
286
|
}
|
|
308
|
-
|
|
309
287
|
let start = new Date().getTime() / 1200;
|
|
310
288
|
let pass = 0;
|
|
311
289
|
let totalScrollLen = finalScroll - initScroll;
|
|
312
290
|
return new Promise(resolve => {
|
|
313
291
|
thisMoving = true;
|
|
314
|
-
|
|
315
292
|
let tick = () => {
|
|
316
293
|
pass = new Date().getTime() / 1200 - start;
|
|
317
|
-
|
|
318
294
|
if (pass < t) {
|
|
319
295
|
thisScroll = moveTo(initScroll + easing[easingName](pass / t) * totalScrollLen);
|
|
320
296
|
thisMoveT = requestAnimationFrame(tick);
|
|
@@ -324,26 +300,21 @@ const Swiper = props => {
|
|
|
324
300
|
thisScroll = moveTo(initScroll + totalScrollLen);
|
|
325
301
|
}
|
|
326
302
|
};
|
|
327
|
-
|
|
328
303
|
tick();
|
|
329
304
|
});
|
|
330
305
|
};
|
|
331
|
-
|
|
332
306
|
const selectByScroll = scroll => {
|
|
333
307
|
scroll = normalizeScroll(scroll) | 0;
|
|
334
|
-
|
|
335
308
|
if (scroll > data.length - 1) {
|
|
336
309
|
scroll = data.length - 1;
|
|
337
310
|
moveTo(scroll);
|
|
338
311
|
}
|
|
339
|
-
|
|
340
312
|
moveTo(scroll);
|
|
341
313
|
thisScroll = scroll;
|
|
342
314
|
thisSelected = data[scroll];
|
|
343
315
|
thisValue = thisSelected.value;
|
|
344
316
|
if (onChange) onChange(thisSelected);
|
|
345
317
|
};
|
|
346
|
-
|
|
347
318
|
const select = value => {
|
|
348
319
|
for (let i in data) {
|
|
349
320
|
if (data[i].value === value) {
|
|
@@ -356,10 +327,8 @@ const Swiper = props => {
|
|
|
356
327
|
return;
|
|
357
328
|
}
|
|
358
329
|
}
|
|
359
|
-
|
|
360
330
|
throw new Error(`Can not select value: ${value}, ${value} match nothing in current data`);
|
|
361
331
|
};
|
|
362
|
-
|
|
363
332
|
const animateMoveByInitV = async initV => {
|
|
364
333
|
let initScroll;
|
|
365
334
|
let finalScroll;
|
|
@@ -367,7 +336,6 @@ const Swiper = props => {
|
|
|
367
336
|
let totalScrollLen;
|
|
368
337
|
let a;
|
|
369
338
|
let t;
|
|
370
|
-
|
|
371
339
|
if (type === 'infinite') {
|
|
372
340
|
initScroll = thisScroll;
|
|
373
341
|
a = initV > 0 ? -thisA : thisA;
|
|
@@ -398,10 +366,8 @@ const Swiper = props => {
|
|
|
398
366
|
await animateToScroll(thisScroll, finalScroll, t);
|
|
399
367
|
}
|
|
400
368
|
}
|
|
401
|
-
|
|
402
369
|
selectByScroll(thisScroll);
|
|
403
370
|
};
|
|
404
|
-
|
|
405
371
|
const touchstart = (e, touchData, parent) => {
|
|
406
372
|
parent.addEventListener('touchmove', events.touchmove, {
|
|
407
373
|
passive: true
|
|
@@ -413,18 +379,14 @@ const Swiper = props => {
|
|
|
413
379
|
touchData.touchScroll = thisScroll;
|
|
414
380
|
stop();
|
|
415
381
|
};
|
|
416
|
-
|
|
417
382
|
const touchmove = (e, touchData, parent) => {
|
|
418
383
|
let event = e.clientY || e.touches[0].clientY;
|
|
419
384
|
touchData.array.push([event, new Date().getTime()]);
|
|
420
|
-
|
|
421
385
|
if (touchData.array.length > 5) {
|
|
422
386
|
touchData.array.unshift();
|
|
423
387
|
}
|
|
424
|
-
|
|
425
388
|
let scrollAdd = (touchData.start - event) / (direction === 'vertical' ? itemHeight : itemWidth);
|
|
426
389
|
let moveToScroll = scrollAdd + thisScroll;
|
|
427
|
-
|
|
428
390
|
if (type === 'infinite') {
|
|
429
391
|
moveToScroll = normalizeScroll(moveToScroll);
|
|
430
392
|
} else {
|
|
@@ -434,17 +396,14 @@ const Swiper = props => {
|
|
|
434
396
|
moveToScroll = data.length + (moveToScroll - data.length) * 0.3;
|
|
435
397
|
}
|
|
436
398
|
}
|
|
437
|
-
|
|
438
399
|
touchData.touchScroll = moveTo(moveToScroll);
|
|
439
400
|
};
|
|
440
|
-
|
|
441
401
|
const touchend = (e, touchData, parent) => {
|
|
442
402
|
parent.removeEventListener('touchmove', events.touchmove, {
|
|
443
403
|
passive: true
|
|
444
404
|
});
|
|
445
405
|
parent.removeEventListener('mousemove', events.touchmove);
|
|
446
406
|
let v;
|
|
447
|
-
|
|
448
407
|
if (touchData.array.length === 1) {
|
|
449
408
|
v = 0;
|
|
450
409
|
} else {
|
|
@@ -456,48 +415,39 @@ const Swiper = props => {
|
|
|
456
415
|
let sign = v > 0 ? 1 : -1;
|
|
457
416
|
v = Math.abs(v) > 30 ? 30 * sign : v;
|
|
458
417
|
}
|
|
459
|
-
|
|
460
418
|
thisScroll = touchData.touchScroll;
|
|
461
419
|
animateMoveByInitV(v);
|
|
462
420
|
};
|
|
463
|
-
|
|
464
421
|
const init = parent => {
|
|
465
422
|
renderSwiper(data);
|
|
466
423
|
let touchData = {
|
|
467
424
|
start: 0,
|
|
468
425
|
array: []
|
|
469
426
|
};
|
|
470
|
-
|
|
471
427
|
events.touchstart = e => {
|
|
472
428
|
if (parent.contains(e.target) || e.target === parent) {
|
|
473
429
|
e.preventDefault();
|
|
474
|
-
|
|
475
430
|
if (data.length) {
|
|
476
431
|
touchstart(e, touchData, parent);
|
|
477
432
|
}
|
|
478
433
|
}
|
|
479
434
|
};
|
|
480
|
-
|
|
481
435
|
events.touchmove = e => {
|
|
482
436
|
if (parent.contains(e.target) || e.target === parent) {
|
|
483
437
|
e.preventDefault();
|
|
484
|
-
|
|
485
438
|
if (data.length) {
|
|
486
439
|
touchmove(e, touchData, parent);
|
|
487
440
|
}
|
|
488
441
|
}
|
|
489
442
|
};
|
|
490
|
-
|
|
491
443
|
events.touchend = e => {
|
|
492
444
|
if (parent.contains(e.target) || e.target === parent) {
|
|
493
445
|
e.preventDefault();
|
|
494
|
-
|
|
495
446
|
if (data.length) {
|
|
496
447
|
touchend(e, touchData, parent);
|
|
497
448
|
}
|
|
498
449
|
}
|
|
499
450
|
};
|
|
500
|
-
|
|
501
451
|
parent.addEventListener('touchstart', events.touchstart, {
|
|
502
452
|
passive: true
|
|
503
453
|
});
|
|
@@ -506,30 +456,26 @@ const Swiper = props => {
|
|
|
506
456
|
});
|
|
507
457
|
parent.addEventListener('mousedown', events.touchstart);
|
|
508
458
|
parent.addEventListener('mouseup', events.touchend);
|
|
509
|
-
|
|
510
459
|
if (data.length) {
|
|
511
460
|
thisValue = defaultValue ? defaultValue : data[0].value;
|
|
512
461
|
select(thisValue);
|
|
513
462
|
}
|
|
514
463
|
};
|
|
515
|
-
|
|
516
464
|
const destroy = parent => {
|
|
517
465
|
stop();
|
|
518
|
-
|
|
519
466
|
for (let eventName in events) {
|
|
520
467
|
parent.removeEventListener(eventName, events[eventName]);
|
|
521
468
|
}
|
|
522
|
-
|
|
523
469
|
parent.removeEventListener('mousedown', events.touchstart);
|
|
524
470
|
parent.removeEventListener('mousemove', events.touchmove);
|
|
525
471
|
parent.removeEventListener('mouseup', events.touchend);
|
|
526
472
|
parent.innerHTML = '';
|
|
527
|
-
};
|
|
473
|
+
};
|
|
474
|
+
// useEffect(() => {
|
|
528
475
|
// const parent = (parentNode && parentNode.current) || (containerRef.current && containerRef.current.parentNode);
|
|
529
476
|
// init(parent);
|
|
530
477
|
// });
|
|
531
478
|
|
|
532
|
-
|
|
533
479
|
useEffect(() => {
|
|
534
480
|
const parent = parentNode && parentNode.current || containerRef.current && containerRef.current.parentNode;
|
|
535
481
|
init(parent);
|
|
@@ -542,17 +488,20 @@ const Swiper = props => {
|
|
|
542
488
|
select(value);
|
|
543
489
|
}
|
|
544
490
|
}, [value]);
|
|
545
|
-
return jsx("div", {
|
|
491
|
+
return jsx("div", {
|
|
492
|
+
...other,
|
|
546
493
|
className: IDs.container,
|
|
547
494
|
css: styles.container,
|
|
548
495
|
ref: containerRef,
|
|
549
|
-
style: {
|
|
496
|
+
style: {
|
|
497
|
+
...containerStyle
|
|
550
498
|
}
|
|
551
499
|
}, jsx("ul", {
|
|
552
500
|
className: IDs.mainSelector,
|
|
553
501
|
css: styles.mainSelector,
|
|
554
502
|
ref: mainSelectorRef,
|
|
555
|
-
style: {
|
|
503
|
+
style: {
|
|
504
|
+
...mainSelectorStyle
|
|
556
505
|
}
|
|
557
506
|
}), jsx("div", {
|
|
558
507
|
className: IDs.highlight,
|
|
@@ -563,7 +512,6 @@ const Swiper = props => {
|
|
|
563
512
|
ref: highlightSelectorRef
|
|
564
513
|
})));
|
|
565
514
|
};
|
|
566
|
-
|
|
567
515
|
Swiper.defaultProps = {
|
|
568
516
|
containerStyle: {},
|
|
569
517
|
count: 18,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { css, jsx } from '@emotion/core';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -12,17 +11,17 @@ const {
|
|
|
12
11
|
colors: {
|
|
13
12
|
system: {
|
|
14
13
|
rest: clRest,
|
|
15
|
-
active: clActive
|
|
14
|
+
active: clActive,
|
|
15
|
+
disabled: systemDisabled,
|
|
16
|
+
active: systemActive
|
|
16
17
|
},
|
|
17
18
|
text: {
|
|
18
19
|
main: clTextMain
|
|
19
20
|
},
|
|
20
21
|
fill: {
|
|
21
|
-
focus: clFillFocus
|
|
22
|
+
focus: clFillFocus,
|
|
23
|
+
hover: fillHover
|
|
22
24
|
},
|
|
23
|
-
primary: clPrimary,
|
|
24
|
-
hover: clHover,
|
|
25
|
-
disabled: clDisabled,
|
|
26
25
|
white: clWhite,
|
|
27
26
|
semantic: {
|
|
28
27
|
danger: clDanger
|
|
@@ -51,7 +50,6 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
51
50
|
if (!inputRef) {
|
|
52
51
|
inputRef = useRef(null);
|
|
53
52
|
}
|
|
54
|
-
|
|
55
53
|
const [checkedState, setCheckedState] = useState(Boolean(checked !== undefined ? checked : defaultChecked));
|
|
56
54
|
const padding = spacing(0.5);
|
|
57
55
|
const formCheck = css`
|
|
@@ -76,9 +74,10 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
76
74
|
background: ${clWhite};
|
|
77
75
|
outline: 1px solid ${clRest};
|
|
78
76
|
&.disabled {
|
|
79
|
-
outline: 1px solid ${
|
|
77
|
+
outline: 1px solid ${systemDisabled} !important;
|
|
80
78
|
}
|
|
81
|
-
&.disabled,
|
|
79
|
+
&.disabled,
|
|
80
|
+
&.read-only {
|
|
82
81
|
${cursorNoDrop};
|
|
83
82
|
}
|
|
84
83
|
&::after {
|
|
@@ -91,7 +90,7 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
91
90
|
left: 2px;
|
|
92
91
|
border-radius: 100%;
|
|
93
92
|
transition: 0.3s ease-in-out;
|
|
94
|
-
margin: 0px auto;
|
|
93
|
+
margin: 0px auto;
|
|
95
94
|
}
|
|
96
95
|
&:not(.disabled):not(.read-only) {
|
|
97
96
|
&:active,
|
|
@@ -103,22 +102,22 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
103
102
|
const checkbox = css`
|
|
104
103
|
left: 0;
|
|
105
104
|
&:checked + label > span.css-${slider.name} {
|
|
106
|
-
background: ${
|
|
107
|
-
outline-color: ${
|
|
105
|
+
background: ${systemActive};
|
|
106
|
+
outline-color: ${systemActive};
|
|
108
107
|
&::after {
|
|
109
108
|
background: ${clWhite};
|
|
110
109
|
left: ${width - height}px;
|
|
111
110
|
}
|
|
112
111
|
&.disabled {
|
|
113
|
-
background: ${
|
|
112
|
+
background: ${systemDisabled} !important;
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
&:not(:checked) + label > span.css-${slider.name} {
|
|
117
116
|
&:not(.disabled):not(.read-only) {
|
|
118
117
|
&:hover {
|
|
119
|
-
box-shadow: 0 0 0 2px ${
|
|
120
|
-
outline-color: ${
|
|
121
|
-
background-color: ${
|
|
118
|
+
box-shadow: 0 0 0 2px ${fillHover};
|
|
119
|
+
outline-color: ${systemActive};
|
|
120
|
+
background-color: ${fillHover};
|
|
122
121
|
}
|
|
123
122
|
&:hover:after {
|
|
124
123
|
background-color: ${clActive};
|
|
@@ -129,7 +128,7 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
&.disabled:after {
|
|
132
|
-
background: ${
|
|
131
|
+
background: ${systemDisabled} !important;
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
`;
|
|
@@ -137,19 +136,18 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
137
136
|
allowNumber: false,
|
|
138
137
|
allowSymbol: false
|
|
139
138
|
});
|
|
140
|
-
|
|
141
139
|
const handleChange = () => {
|
|
142
140
|
if (disabled || readOnly) return;
|
|
143
141
|
setCheckedState(checked !== undefined ? Boolean(checked) : !checkedState);
|
|
144
142
|
const e = {
|
|
145
143
|
value: !checkedState,
|
|
146
|
-
target: {
|
|
144
|
+
target: {
|
|
145
|
+
...inputRef.current,
|
|
147
146
|
checked: !checkedState
|
|
148
147
|
}
|
|
149
148
|
};
|
|
150
149
|
if (onChange) onChange(e);
|
|
151
150
|
};
|
|
152
|
-
|
|
153
151
|
useEffect(() => {
|
|
154
152
|
if (checked !== undefined) setCheckedState(Boolean(checked));
|
|
155
153
|
}, [checked]);
|
|
@@ -158,7 +156,8 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
158
156
|
css: formCheck,
|
|
159
157
|
ref: ref,
|
|
160
158
|
...props
|
|
161
|
-
}, jsx("input", {
|
|
159
|
+
}, jsx("input", {
|
|
160
|
+
...inputProps,
|
|
162
161
|
ref: inputRef,
|
|
163
162
|
hidden: true,
|
|
164
163
|
name: name,
|
|
@@ -177,7 +176,7 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
177
176
|
}), label !== undefined && jsx(Typography, {
|
|
178
177
|
type: 'p1',
|
|
179
178
|
style: {
|
|
180
|
-
color: disabled ?
|
|
179
|
+
color: disabled ? systemDisabled : clTextMain,
|
|
181
180
|
marginBottom: 0,
|
|
182
181
|
marginLeft: spacing(2.5)
|
|
183
182
|
},
|
|
@@ -186,7 +185,7 @@ const Toggle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
186
185
|
mapping: 'label'
|
|
187
186
|
}, jsx(Fragment, null, label, required && jsx("span", {
|
|
188
187
|
style: {
|
|
189
|
-
color: disabled ?
|
|
188
|
+
color: disabled ? systemDisabled : clDanger
|
|
190
189
|
}
|
|
191
190
|
}, "*"))))), [disabled, onChange, checkedState, readOnly]);
|
|
192
191
|
}));
|
|
@@ -205,47 +204,34 @@ Toggle.defaultProps = {
|
|
|
205
204
|
Toggle.propTypes = {
|
|
206
205
|
/** * If `true`, the component is disabled. */
|
|
207
206
|
disabled: PropTypes.bool,
|
|
208
|
-
|
|
209
207
|
/** prevent all event if true */
|
|
210
208
|
readOnly: PropTypes.bool,
|
|
211
|
-
|
|
212
209
|
/** If `true`, the component is defaultChecked. */
|
|
213
210
|
defaultChecked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
214
|
-
|
|
215
211
|
/** If `true`, the component is checked. */
|
|
216
212
|
checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf([0, 1])]),
|
|
217
|
-
|
|
218
213
|
/** Id is randomized randomly to avoid duplication. */
|
|
219
214
|
id: PropTypes.string,
|
|
220
|
-
|
|
221
215
|
/** Name attribute of the `input` element. */
|
|
222
216
|
name: PropTypes.string,
|
|
223
|
-
|
|
224
217
|
/** The name of the Radio is displayed on the interface */
|
|
225
218
|
label: PropTypes.string,
|
|
226
|
-
|
|
227
219
|
/** height is a number, height of Toggle default 20 */
|
|
228
220
|
height: PropTypes.number,
|
|
229
|
-
|
|
230
221
|
/** width is a number, width of Toggle default 40 */
|
|
231
222
|
width: PropTypes.number,
|
|
232
|
-
|
|
233
223
|
/** props for input */
|
|
234
224
|
inputProps: PropTypes.object,
|
|
235
|
-
|
|
236
225
|
/** The line-clamp property truncates text at a specific number of Label. */
|
|
237
226
|
lineClamp: PropTypes.number,
|
|
238
|
-
|
|
239
227
|
/** Shows tooltip containing Label on hover */
|
|
240
228
|
hoverTooltip: PropTypes.bool,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
229
|
+
/** * Callback fired when the state is changed.
|
|
230
|
+
*
|
|
231
|
+
* @param {object} event The event source of the callback.
|
|
232
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
246
233
|
*/
|
|
247
234
|
onChange: PropTypes.func,
|
|
248
|
-
|
|
249
235
|
/** If `true`, the label will indicate that the checkbox is required. */
|
|
250
236
|
required: PropTypes.bool
|
|
251
237
|
};
|
|
@@ -14,7 +14,8 @@ const HelperText = /*#__PURE__*/memo(({
|
|
|
14
14
|
};
|
|
15
15
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
16
16
|
type: 'p3',
|
|
17
|
-
style: {
|
|
17
|
+
style: {
|
|
18
|
+
...helperText,
|
|
18
19
|
...style
|
|
19
20
|
},
|
|
20
21
|
...props
|
|
@@ -26,7 +27,6 @@ HelperText.defaultProps = {
|
|
|
26
27
|
HelperText.propTypes = {
|
|
27
28
|
/** helper text for input */
|
|
28
29
|
text: PropTypes.string,
|
|
29
|
-
|
|
30
30
|
/** style inline of helper text in HelperText component */
|
|
31
31
|
style: PropTypes.object
|
|
32
32
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { jsx, css } from '@emotion/core';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -7,7 +6,6 @@ import Input from "../form-view/input";
|
|
|
7
6
|
import Label from "../form-view/label";
|
|
8
7
|
import HelperText from "../form-view/helper-text";
|
|
9
8
|
import { dark4 } from "../../styles/colors";
|
|
10
|
-
|
|
11
9
|
const FormLabel = ({
|
|
12
10
|
label,
|
|
13
11
|
inputProps,
|
|
@@ -54,7 +52,6 @@ const FormLabel = ({
|
|
|
54
52
|
...helperTextProps
|
|
55
53
|
}));
|
|
56
54
|
};
|
|
57
|
-
|
|
58
55
|
FormLabel.defaultProps = {
|
|
59
56
|
label: '',
|
|
60
57
|
value: '',
|
|
@@ -69,37 +66,26 @@ FormLabel.defaultProps = {
|
|
|
69
66
|
FormLabel.propTypes = {
|
|
70
67
|
/** utc for Form label */
|
|
71
68
|
utc: PropTypes.bool,
|
|
72
|
-
|
|
73
69
|
/** thousandSeparator for Form label */
|
|
74
70
|
thousandSeparator: PropTypes.bool,
|
|
75
|
-
|
|
76
71
|
/** thousandChar for Form label */
|
|
77
72
|
thousandChar: PropTypes.string,
|
|
78
|
-
|
|
79
73
|
/** label for Form label */
|
|
80
74
|
label: PropTypes.string,
|
|
81
|
-
|
|
82
75
|
/** the displayed value for each change */
|
|
83
76
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
84
|
-
|
|
85
77
|
/** text for Form label */
|
|
86
78
|
text: PropTypes.string,
|
|
87
|
-
|
|
88
79
|
/** viewType for Form label */
|
|
89
80
|
viewType: PropTypes.string,
|
|
90
|
-
|
|
91
81
|
/** dataType for Form label */
|
|
92
82
|
dataType: PropTypes.string,
|
|
93
|
-
|
|
94
83
|
/** props of span in InputView comp** dataType for Form label */
|
|
95
84
|
format: PropTypes.string,
|
|
96
|
-
|
|
97
85
|
/** props of span in format component */
|
|
98
86
|
inputProps: PropTypes.object,
|
|
99
|
-
|
|
100
87
|
/** style inline of span in InputView component */
|
|
101
88
|
inputStyleProps: PropTypes.object,
|
|
102
|
-
|
|
103
89
|
/** props for helper text */
|
|
104
90
|
helperTextProps: PropTypes.object
|
|
105
91
|
};
|