@kdcloudjs/kdesign 1.0.2 → 1.1.0
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/LICENSE +104 -105
- package/dist/default-theme.js +17 -12
- package/dist/kdesign-complete.less +3334 -1374
- package/dist/kdesign.css +2565 -1931
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +783 -112
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +4 -4
- package/dist/kdesign.min.js +6 -6
- package/dist/kdesign.min.js.map +1 -1
- package/es/alert/style/index.css +32 -30
- package/es/alert/style/index.less +36 -37
- package/es/alert/style/token.less +29 -0
- package/es/anchor/style/index.css +48 -34
- package/es/anchor/style/index.less +19 -16
- package/es/anchor/style/mixin.less +1 -0
- package/es/anchor/style/token.less +33 -0
- package/es/avatar/style/index.css +18 -18
- package/es/avatar/style/index.less +4 -25
- package/es/avatar/style/mixin.less +21 -4
- package/es/avatar/style/token.less +20 -0
- package/es/badge/style/index.css +38 -29
- package/es/badge/style/index.less +28 -30
- package/es/badge/style/mixin.less +1 -5
- package/es/badge/style/token.less +23 -0
- package/es/base-data/style/index.css +25 -16
- package/es/base-data/style/index.less +17 -17
- package/es/base-data/style/token.less +27 -0
- package/es/button/button.d.ts +1 -3
- package/es/button/button.js +3 -15
- package/es/button/style/index.css +80 -81
- package/es/button/style/index.less +43 -51
- package/es/button/style/mixin.less +6 -4
- package/es/button/style/token.less +88 -0
- package/es/card/card.d.ts +1 -0
- package/es/card/card.js +4 -1
- package/es/card/style/index.css +48 -23
- package/es/card/style/index.less +43 -23
- package/es/card/style/token.less +28 -0
- package/es/carousel/style/index.css +36 -30
- package/es/carousel/style/index.less +14 -6
- package/es/carousel/style/mixin.less +1 -4
- package/es/carousel/style/token.less +20 -0
- package/es/cascader/cascader.js +1 -1
- package/es/cascader/style/index.css +35 -26
- package/es/cascader/style/index.less +24 -23
- package/es/cascader/style/token.less +28 -0
- package/es/checkbox/style/index.css +86 -80
- package/es/checkbox/style/index.less +26 -27
- package/es/checkbox/style/token.less +48 -0
- package/es/city-picker/style/index.css +24 -14
- package/es/city-picker/style/index.less +16 -16
- package/es/city-picker/style/token.less +25 -0
- package/es/collapse/style/index.css +37 -26
- package/es/collapse/style/index.less +7 -5
- package/es/collapse/style/mixin.less +1 -5
- package/es/collapse/style/token.less +26 -0
- package/es/config-provider/compDefaultProps.d.ts +4 -1
- package/es/config-provider/compDefaultProps.js +5 -2
- package/es/date-picker/style/index.css +81 -72
- package/es/date-picker/style/index.less +36 -36
- package/es/date-picker/style/mixin.less +20 -18
- package/es/date-picker/style/token.less +71 -0
- package/es/drawer/drawer.d.ts +0 -1
- package/es/drawer/drawer.js +6 -26
- package/es/drawer/style/index.css +37 -31
- package/es/drawer/style/index.less +24 -39
- package/es/drawer/style/token.less +23 -0
- package/es/dropdown/dropdown.d.ts +1 -0
- package/es/dropdown/dropdown.js +13 -8
- package/es/dropdown/menu.d.ts +1 -1
- package/es/dropdown/menu.js +3 -3
- package/es/dropdown/style/index.css +57 -48
- package/es/dropdown/style/index.less +27 -24
- package/es/dropdown/style/token.less +26 -0
- package/es/empty/defaultEmptyImg.d.ts +2 -0
- package/es/empty/defaultEmptyImg.js +92 -0
- package/es/empty/empty.d.ts +5 -1
- package/es/empty/empty.js +10 -9
- package/es/empty/illustrationEmptyImg.d.ts +2 -0
- package/es/empty/illustrationEmptyImg.js +439 -0
- package/es/empty/style/index.css +12 -3
- package/es/empty/style/index.less +1 -1
- package/es/empty/style/token.less +12 -0
- package/es/filter/style/index.css +44 -32
- package/es/filter/style/index.less +34 -32
- package/es/filter/style/token.less +28 -0
- package/es/form/style/index.css +19 -10
- package/es/form/style/index.less +9 -6
- package/es/form/style/token.less +27 -0
- package/es/grid/style/index.css +9 -0
- package/es/image/style/index.css +32 -23
- package/es/image/style/index.less +23 -22
- package/es/image/style/token.less +45 -0
- package/es/image-cropper/style/index.css +9 -0
- package/es/image-cropper/style/index.less +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/input/style/index.css +97 -88
- package/es/input/style/index.less +34 -31
- package/es/input/style/mixin.less +54 -47
- package/es/input/style/token.less +46 -0
- package/es/input-number/style/css.js +1 -0
- package/es/input-number/style/index.css +25 -16
- package/es/input-number/style/index.d.ts +1 -0
- package/es/input-number/style/index.js +1 -0
- package/es/input-number/style/index.less +12 -12
- package/es/input-number/style/mixin.less +4 -2
- package/es/input-number/style/token.less +20 -0
- package/es/layout/style/index.css +41 -32
- package/es/layout/style/index.less +9 -8
- package/es/layout/style/token.less +30 -0
- package/es/link/index.d.ts +3 -0
- package/es/link/index.js +3 -0
- package/es/link/link.d.ts +18 -0
- package/es/link/link.js +89 -0
- package/es/link/style/css.js +2 -0
- package/es/link/style/index.css +155 -0
- package/es/link/style/index.d.ts +2 -0
- package/es/link/style/index.js +2 -0
- package/es/link/style/index.less +61 -0
- package/es/link/style/mixin.less +7 -0
- package/es/link/style/token.less +24 -0
- package/es/menu/menuItem.js +1 -2
- package/es/menu/style/index.css +89 -80
- package/es/menu/style/index.less +51 -26
- package/es/menu/style/mixin.less +16 -19
- package/es/menu/style/token.less +32 -0
- package/es/message/style/index.css +23 -13
- package/es/message/style/index.less +15 -13
- package/es/message/style/token.less +21 -0
- package/es/modal/style/index.css +37 -28
- package/es/modal/style/index.less +16 -26
- package/es/modal/style/mixin.less +2 -0
- package/es/modal/style/token.less +46 -0
- package/es/notification/content.js +1 -1
- package/es/notification/style/index.css +34 -25
- package/es/notification/style/index.less +21 -20
- package/es/notification/style/token.less +28 -0
- package/es/pagination/pagination.js +2 -2
- package/es/pagination/style/index.css +159 -159
- package/es/pagination/style/index.less +104 -113
- package/es/pagination/style/token.less +28 -0
- package/es/popconfirm/style/index.css +54 -33
- package/es/popconfirm/style/index.less +41 -20
- package/es/popconfirm/style/token.less +28 -0
- package/es/progress/style/index.css +41 -27
- package/es/progress/style/index.less +24 -8
- package/es/progress/style/mixin.less +2 -1
- package/es/progress/style/token.less +40 -0
- package/es/radio/style/index.css +91 -76
- package/es/radio/style/index.less +76 -64
- package/es/radio/style/token.less +47 -0
- package/es/rate/style/index.css +26 -17
- package/es/rate/style/index.less +4 -3
- package/es/rate/style/token.less +18 -0
- package/es/search/style/index.css +103 -82
- package/es/search/style/index.less +49 -35
- package/es/search/style/mixin.less +4 -2
- package/es/search/style/token.less +60 -0
- package/es/select/select.js +3 -14
- package/es/select/style/index.css +46 -37
- package/es/select/style/index.less +10 -10
- package/es/select/style/mixin.less +4 -7
- package/es/select/style/token.less +43 -0
- package/es/slider/slider.js +5 -13
- package/es/slider/sliderTooltip.js +0 -1
- package/es/slider/style/index.css +21 -12
- package/es/slider/style/index.less +10 -10
- package/es/slider/style/mixin.less +3 -1
- package/es/slider/style/token.less +17 -0
- package/es/space/style/index.css +9 -0
- package/es/spin/style/index.css +23 -14
- package/es/spin/style/index.less +3 -2
- package/es/spin/style/mixin.less +1 -0
- package/es/spin/style/token.less +15 -0
- package/es/split-panel/style/index.css +35 -44
- package/es/split-panel/style/index.less +16 -34
- package/es/split-panel/style/token.less +23 -0
- package/es/stepper/style/index.css +50 -25
- package/es/stepper/style/index.less +45 -11
- package/es/stepper/style/mixin.less +7 -5
- package/es/stepper/style/token.less +28 -0
- package/es/steps/Steps.js +4 -1
- package/es/steps/style/index.css +74 -37
- package/es/steps/style/index.less +281 -189
- package/es/steps/style/token.less +31 -0
- package/es/style/mixins/index.less +10 -9
- package/es/style/mixins/overlay.less +2 -2
- package/es/style/themes/default.less +22 -12
- package/es/style/themes/token.less +128 -0
- package/es/switch/style/index.css +38 -29
- package/es/switch/style/index.less +17 -6
- package/es/switch/style/mixin.less +6 -5
- package/es/switch/style/token.less +45 -0
- package/es/tabs/style/index.css +59 -50
- package/es/tabs/style/index.less +3 -3
- package/es/tabs/style/mixin.less +2 -0
- package/es/tabs/style/token.less +32 -0
- package/es/tabs/tabs.js +3 -1
- package/es/tag/style/index.css +122 -113
- package/es/tag/style/index.less +19 -19
- package/es/tag/style/mixin.less +2 -1
- package/es/tag/style/token.less +42 -0
- package/es/timeline/style/index.css +40 -30
- package/es/timeline/style/index.less +33 -30
- package/es/timeline/style/token.less +45 -0
- package/es/tooltip/style/index.css +26 -17
- package/es/tooltip/style/index.less +6 -5
- package/es/tooltip/style/token.less +20 -0
- package/es/transfer/operation.js +2 -2
- package/es/transfer/style/index.css +37 -24
- package/es/transfer/style/index.less +4 -0
- package/es/transfer/style/mixins.less +2 -0
- package/es/transfer/style/token.less +29 -0
- package/es/tree/style/index.css +37 -37
- package/es/tree/style/index.less +8 -20
- package/es/tree/style/mixin.less +1 -5
- package/es/tree/style/token.less +27 -0
- package/es/typography/style/index.css +46 -53
- package/es/typography/style/index.less +15 -15
- package/es/typography/style/mixin.less +9 -11
- package/es/typography/style/token.less +38 -0
- package/es/upload/style/index.css +41 -31
- package/es/upload/style/index.less +27 -25
- package/es/upload/style/token.less +28 -0
- package/lib/alert/style/index.css +32 -30
- package/lib/alert/style/index.less +36 -37
- package/lib/alert/style/token.less +29 -0
- package/lib/anchor/style/index.css +48 -34
- package/lib/anchor/style/index.less +19 -16
- package/lib/anchor/style/mixin.less +1 -0
- package/lib/anchor/style/token.less +33 -0
- package/lib/avatar/style/index.css +18 -18
- package/lib/avatar/style/index.less +4 -25
- package/lib/avatar/style/mixin.less +21 -4
- package/lib/avatar/style/token.less +20 -0
- package/lib/badge/style/index.css +38 -29
- package/lib/badge/style/index.less +28 -30
- package/lib/badge/style/mixin.less +1 -5
- package/lib/badge/style/token.less +23 -0
- package/lib/base-data/style/index.css +25 -16
- package/lib/base-data/style/index.less +17 -17
- package/lib/base-data/style/token.less +27 -0
- package/lib/button/button.d.ts +1 -3
- package/lib/button/button.js +3 -15
- package/lib/button/style/index.css +80 -81
- package/lib/button/style/index.less +43 -51
- package/lib/button/style/mixin.less +6 -4
- package/lib/button/style/token.less +88 -0
- package/lib/card/card.d.ts +1 -0
- package/lib/card/card.js +4 -1
- package/lib/card/style/index.css +48 -23
- package/lib/card/style/index.less +43 -23
- package/lib/card/style/token.less +28 -0
- package/lib/carousel/style/index.css +36 -30
- package/lib/carousel/style/index.less +14 -6
- package/lib/carousel/style/mixin.less +1 -4
- package/lib/carousel/style/token.less +20 -0
- package/lib/cascader/cascader.js +1 -1
- package/lib/cascader/style/index.css +35 -26
- package/lib/cascader/style/index.less +24 -23
- package/lib/cascader/style/token.less +28 -0
- package/lib/checkbox/style/index.css +86 -80
- package/lib/checkbox/style/index.less +26 -27
- package/lib/checkbox/style/token.less +48 -0
- package/lib/city-picker/style/index.css +24 -14
- package/lib/city-picker/style/index.less +16 -16
- package/lib/city-picker/style/token.less +25 -0
- package/lib/collapse/style/index.css +37 -26
- package/lib/collapse/style/index.less +7 -5
- package/lib/collapse/style/mixin.less +1 -5
- package/lib/collapse/style/token.less +26 -0
- package/lib/config-provider/compDefaultProps.d.ts +4 -1
- package/lib/config-provider/compDefaultProps.js +5 -2
- package/lib/date-picker/style/index.css +81 -72
- package/lib/date-picker/style/index.less +36 -36
- package/lib/date-picker/style/mixin.less +20 -18
- package/lib/date-picker/style/token.less +71 -0
- package/lib/drawer/drawer.d.ts +0 -1
- package/lib/drawer/drawer.js +6 -26
- package/lib/drawer/style/index.css +37 -31
- package/lib/drawer/style/index.less +24 -39
- package/lib/drawer/style/token.less +23 -0
- package/lib/dropdown/dropdown.d.ts +1 -0
- package/lib/dropdown/dropdown.js +13 -8
- package/lib/dropdown/menu.d.ts +1 -1
- package/lib/dropdown/menu.js +3 -3
- package/lib/dropdown/style/index.css +57 -48
- package/lib/dropdown/style/index.less +27 -24
- package/lib/dropdown/style/token.less +26 -0
- package/lib/empty/defaultEmptyImg.d.ts +2 -0
- package/lib/empty/defaultEmptyImg.js +113 -0
- package/lib/empty/empty.d.ts +5 -1
- package/lib/empty/empty.js +13 -9
- package/lib/empty/illustrationEmptyImg.d.ts +2 -0
- package/lib/empty/illustrationEmptyImg.js +460 -0
- package/lib/empty/style/index.css +12 -3
- package/lib/empty/style/index.less +1 -1
- package/lib/empty/style/token.less +12 -0
- package/lib/filter/style/index.css +44 -32
- package/lib/filter/style/index.less +34 -32
- package/lib/filter/style/token.less +28 -0
- package/lib/form/style/index.css +19 -10
- package/lib/form/style/index.less +9 -6
- package/lib/form/style/token.less +27 -0
- package/lib/grid/style/index.css +9 -0
- package/lib/image/style/index.css +32 -23
- package/lib/image/style/index.less +23 -22
- package/lib/image/style/token.less +45 -0
- package/lib/image-cropper/style/index.css +9 -0
- package/lib/image-cropper/style/index.less +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -0
- package/lib/input/style/index.css +97 -88
- package/lib/input/style/index.less +34 -31
- package/lib/input/style/mixin.less +54 -47
- package/lib/input/style/token.less +46 -0
- package/lib/input-number/style/css.js +2 -0
- package/lib/input-number/style/index.css +25 -16
- package/lib/input-number/style/index.d.ts +1 -0
- package/lib/input-number/style/index.js +2 -0
- package/lib/input-number/style/index.less +12 -12
- package/lib/input-number/style/mixin.less +4 -2
- package/lib/input-number/style/token.less +20 -0
- package/lib/layout/style/index.css +41 -32
- package/lib/layout/style/index.less +9 -8
- package/lib/layout/style/token.less +30 -0
- package/lib/link/index.d.ts +3 -0
- package/lib/link/index.js +36 -0
- package/lib/link/link.d.ts +18 -0
- package/lib/link/link.js +120 -0
- package/lib/link/style/css.js +5 -0
- package/lib/link/style/index.css +155 -0
- package/lib/link/style/index.d.ts +2 -0
- package/lib/link/style/index.js +5 -0
- package/lib/link/style/index.less +61 -0
- package/lib/link/style/mixin.less +7 -0
- package/lib/link/style/token.less +24 -0
- package/lib/menu/menuItem.js +1 -2
- package/lib/menu/style/index.css +89 -80
- package/lib/menu/style/index.less +51 -26
- package/lib/menu/style/mixin.less +16 -19
- package/lib/menu/style/token.less +32 -0
- package/lib/message/style/index.css +23 -13
- package/lib/message/style/index.less +15 -13
- package/lib/message/style/token.less +21 -0
- package/lib/modal/style/index.css +37 -28
- package/lib/modal/style/index.less +16 -26
- package/lib/modal/style/mixin.less +2 -0
- package/lib/modal/style/token.less +46 -0
- package/lib/notification/content.js +1 -1
- package/lib/notification/style/index.css +34 -25
- package/lib/notification/style/index.less +21 -20
- package/lib/notification/style/token.less +28 -0
- package/lib/pagination/pagination.js +2 -2
- package/lib/pagination/style/index.css +159 -159
- package/lib/pagination/style/index.less +104 -113
- package/lib/pagination/style/token.less +28 -0
- package/lib/popconfirm/style/index.css +54 -33
- package/lib/popconfirm/style/index.less +41 -20
- package/lib/popconfirm/style/token.less +28 -0
- package/lib/progress/style/index.css +41 -27
- package/lib/progress/style/index.less +24 -8
- package/lib/progress/style/mixin.less +2 -1
- package/lib/progress/style/token.less +40 -0
- package/lib/radio/style/index.css +91 -76
- package/lib/radio/style/index.less +76 -64
- package/lib/radio/style/token.less +47 -0
- package/lib/rate/style/index.css +26 -17
- package/lib/rate/style/index.less +4 -3
- package/lib/rate/style/token.less +18 -0
- package/lib/search/style/index.css +103 -82
- package/lib/search/style/index.less +49 -35
- package/lib/search/style/mixin.less +4 -2
- package/lib/search/style/token.less +60 -0
- package/lib/select/select.js +3 -14
- package/lib/select/style/index.css +46 -37
- package/lib/select/style/index.less +10 -10
- package/lib/select/style/mixin.less +4 -7
- package/lib/select/style/token.less +43 -0
- package/lib/slider/slider.js +5 -13
- package/lib/slider/sliderTooltip.js +0 -1
- package/lib/slider/style/index.css +21 -12
- package/lib/slider/style/index.less +10 -10
- package/lib/slider/style/mixin.less +3 -1
- package/lib/slider/style/token.less +17 -0
- package/lib/space/style/index.css +9 -0
- package/lib/spin/style/index.css +23 -14
- package/lib/spin/style/index.less +3 -2
- package/lib/spin/style/mixin.less +1 -0
- package/lib/spin/style/token.less +15 -0
- package/lib/split-panel/style/index.css +35 -44
- package/lib/split-panel/style/index.less +16 -34
- package/lib/split-panel/style/token.less +23 -0
- package/lib/stepper/style/index.css +50 -25
- package/lib/stepper/style/index.less +45 -11
- package/lib/stepper/style/mixin.less +7 -5
- package/lib/stepper/style/token.less +28 -0
- package/lib/steps/Steps.js +4 -1
- package/lib/steps/style/index.css +74 -37
- package/lib/steps/style/index.less +281 -189
- package/lib/steps/style/token.less +31 -0
- package/lib/style/components.less +1 -0
- package/lib/style/mixins/index.less +10 -9
- package/lib/style/mixins/overlay.less +2 -2
- package/lib/style/themes/default.less +22 -12
- package/lib/style/themes/token.less +128 -0
- package/lib/switch/style/index.css +38 -29
- package/lib/switch/style/index.less +17 -6
- package/lib/switch/style/mixin.less +6 -5
- package/lib/switch/style/token.less +45 -0
- package/lib/tabs/style/index.css +59 -50
- package/lib/tabs/style/index.less +3 -3
- package/lib/tabs/style/mixin.less +2 -0
- package/lib/tabs/style/token.less +32 -0
- package/lib/tabs/tabs.js +3 -1
- package/lib/tag/style/index.css +122 -113
- package/lib/tag/style/index.less +19 -19
- package/lib/tag/style/mixin.less +2 -1
- package/lib/tag/style/token.less +42 -0
- package/lib/timeline/style/index.css +40 -30
- package/lib/timeline/style/index.less +33 -30
- package/lib/timeline/style/token.less +45 -0
- package/lib/tooltip/style/index.css +26 -17
- package/lib/tooltip/style/index.less +6 -5
- package/lib/tooltip/style/token.less +20 -0
- package/lib/transfer/operation.js +2 -2
- package/lib/transfer/style/index.css +37 -24
- package/lib/transfer/style/index.less +4 -0
- package/lib/transfer/style/mixins.less +2 -0
- package/lib/transfer/style/token.less +29 -0
- package/lib/tree/style/index.css +37 -37
- package/lib/tree/style/index.less +8 -20
- package/lib/tree/style/mixin.less +1 -5
- package/lib/tree/style/token.less +27 -0
- package/lib/typography/style/index.css +46 -53
- package/lib/typography/style/index.less +15 -15
- package/lib/typography/style/mixin.less +9 -11
- package/lib/typography/style/token.less +38 -0
- package/lib/upload/style/index.css +41 -31
- package/lib/upload/style/index.less +27 -25
- package/lib/upload/style/token.less +28 -0
- package/package.json +5 -4
- package/es/base-data/style/mixin.less +0 -5
- package/es/empty/style/mixin.less +0 -5
- package/es/form/style/mixin.less +0 -5
- package/es/steps/style/mixin.less +0 -41
- package/lib/base-data/style/mixin.less +0 -5
- package/lib/empty/style/mixin.less +0 -5
- package/lib/form/style/mixin.less +0 -5
- package/lib/steps/style/mixin.less +0 -41
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
2
|
+
|
|
3
|
+
@steps-prefix: '--@{kd-prefix}-c-steps';
|
|
4
|
+
|
|
5
|
+
@steps-duration-promptly: var(~'@{steps-prefix}-duration-promptly', @duration-promptly);
|
|
6
|
+
@steps-transition-fn: cubic-bezier(0.48, 0.04, 0.52, 0.96);
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// color
|
|
11
|
+
@steps-color-completed: var(~'@{steps-prefix}-color-completed', @color-theme);//已经完成
|
|
12
|
+
@steps-color-error: var(~'@{steps-prefix}-color-error', @color-error);
|
|
13
|
+
@steps-color-wait: var(~'@{steps-prefix}-color-wait', @color-text-secondary);//未开始 等待
|
|
14
|
+
@steps-color-white: var(~'@{steps-prefix}-color-white',@color-white);
|
|
15
|
+
@steps-color-background-process-icon: var(~'@{steps-prefix}-icon-color-background', @color-theme);//图标的颜色
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// font
|
|
19
|
+
@steps-font-size: var(~'@{steps-prefix}-font-size', @font-size-small); // 文字大小
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// sizing
|
|
23
|
+
@steps-icon-sizing-width: var(~'@{steps-prefix}-icon-sizing-width', 28px);//图标的大小
|
|
24
|
+
@steps-line-sizing-height: var(~'@{steps-prefix}-line-sizing-height', 4px);//连接线高度
|
|
25
|
+
@steps-horizontal-description-sizing-height: var(~'@{steps-prefix}-horizontal-description-sizing-height', 60px);//内容部分高度 横向
|
|
26
|
+
@steps-vertical-description-sizing-width: var(~'@{steps-prefix}-vertical-description-sizing-width', 200px);//内容部分宽度 纵向
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Mixins
|
|
2
2
|
//----------------------------------------
|
|
3
3
|
@import 'reset';
|
|
4
|
+
@import '../themes/token.less';
|
|
4
5
|
|
|
5
6
|
/* 多行显示省略号 */
|
|
6
|
-
.multipleEllipsis(@n
|
|
7
|
+
.multipleEllipsis(@n) {
|
|
7
8
|
overflow: hidden;
|
|
8
9
|
text-overflow: ellipsis;
|
|
9
10
|
display: -webkit-box;
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/** 浮层箭头样式 **/
|
|
22
|
-
.popperArrow(@popperBg
|
|
23
|
+
.popperArrow(@popperBg, @offset, @blur,) {
|
|
23
24
|
&.arrow {
|
|
24
25
|
&::before {
|
|
25
26
|
position: absolute;
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
left: 0;
|
|
41
42
|
content: '';
|
|
42
43
|
background: @popperBg;
|
|
43
|
-
border-radius: @radius-
|
|
44
|
+
border-radius: @radius-border;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
&.bottomLeft,
|
|
@@ -49,8 +50,8 @@
|
|
|
49
50
|
&::before {
|
|
50
51
|
left: var(--arrowLeft);
|
|
51
52
|
top: var(--arrowSpill);
|
|
52
|
-
box-shadow: -2px -2px @blur - 1px rgba(0, 0, 0, 0.1);
|
|
53
|
-
border-color: @white transparent transparent @white;
|
|
53
|
+
box-shadow: -2px -2px calc(@blur - 1px) rgba(0, 0, 0, 0.1);
|
|
54
|
+
border-color: @color-white transparent transparent @color-white;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -60,8 +61,8 @@
|
|
|
60
61
|
&::before {
|
|
61
62
|
left: var(--arrowLeft);
|
|
62
63
|
bottom: var(--arrowSpill);
|
|
63
|
-
box-shadow: 3px 3px @blur + 1px rgba(0, 0, 0, 0.15);
|
|
64
|
-
border-color: transparent @white @white transparent;
|
|
64
|
+
box-shadow: 3px 3px calc(@blur + 1px) rgba(0, 0, 0, 0.15);
|
|
65
|
+
border-color: transparent @color-white @color-white transparent;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
top: var(--arrowTop);
|
|
73
74
|
right: var(--arrowSpill);
|
|
74
75
|
box-shadow: 3px 0 @blur rgba(0, 0, 0, 0.12), 0 -2px @blur rgba(204, 149, 149, 0.12);
|
|
75
|
-
border-color: @white @white transparent transparent;
|
|
76
|
+
border-color: @color-white @color-white transparent transparent;
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
top: var(--arrowTop);
|
|
84
85
|
left: var(--arrowSpill);
|
|
85
86
|
box-shadow: 0 3px @blur rgba(0, 0, 0, 0.1), -2px 0 @blur rgba(0, 0, 0, 0.1);
|
|
86
|
-
border-color: transparent transparent @white @white;
|
|
87
|
+
border-color: transparent transparent @color-white @color-white;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.overlay(@bgcolor, @isUseMaskZindex) {
|
|
4
4
|
position: fixed;
|
|
5
5
|
background-color: @bgcolor;
|
|
6
|
-
z-index: if(boolean(@isUseMaskZindex), @
|
|
6
|
+
z-index: if(boolean(@isUseMaskZindex), @z-index-masker, auto);
|
|
7
7
|
.overall-postion()
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 100%;
|
|
20
20
|
background-color: @bgcolor;
|
|
21
|
-
z-index: if(boolean(@isUseMaskZindex), @
|
|
21
|
+
z-index: if(boolean(@isUseMaskZindex), @z-index-masker, auto);
|
|
22
22
|
}
|
|
@@ -45,22 +45,27 @@
|
|
|
45
45
|
@primary-text-color2: rgba(255, 255, 255, 1); // 一级文本
|
|
46
46
|
@secondary-text-color: #666; // 二级文本
|
|
47
47
|
@secondary-text-color2: rgba(255, 255, 255, 0.65); // 二级文本
|
|
48
|
+
@secondary-text-color3: rgba(102, 102, 102, 0.65); // 二级文本
|
|
48
49
|
@third-text-color: #999; // 三级文本
|
|
49
50
|
@third-text-color2: rgba(255, 255, 255, 0.4); // 三级文本
|
|
50
51
|
@placeholder-text-color: #ccc; // 占位符文本
|
|
51
52
|
@placeholder-text-color2: rgba(255, 255, 255, 0.3); // 占位符文本
|
|
52
53
|
@bg: #fff; // 底色白背景
|
|
53
54
|
@bg2: #f2f2f2; // 底色灰背景
|
|
55
|
+
@bg3: rgba(255, 255, 255, 0.65); // 次级底色背景
|
|
54
56
|
@contain-bg: #fafafa; // 容器内的灰背景
|
|
55
57
|
@radius-size: 2px; // 圆角值
|
|
56
58
|
@input-color: #999; // 线型录入的默认态
|
|
57
59
|
@strong-border-color: #d9d9d9; // 强线条 --带操作
|
|
58
60
|
@strong-border-color-1: #d9d9d9; // 强线条 --分割内容/容器包裹线
|
|
61
|
+
@strong-border-color-2: rgba(217, 217, 217, 0.65); // 次级边框
|
|
59
62
|
@weak-border-color: #e5e5e5; // 弱线条 -- 需要多层级时
|
|
63
|
+
@logo-color-1: #2386ee;
|
|
64
|
+
@logo-color-2: #00ccfe;
|
|
65
|
+
@logo-color-3: #05c8c8;
|
|
66
|
+
@logo-color-4: #a06eff;
|
|
60
67
|
// @shadow-on-hover: ; // 悬停时阴影
|
|
61
68
|
@white: #fff;
|
|
62
|
-
@dirList: left, top, bottom, right;
|
|
63
|
-
@line-height-base: 1.5715;
|
|
64
69
|
/* ----------- color ——————---- end */
|
|
65
70
|
|
|
66
71
|
/* ----------- motion ——————---- start */
|
|
@@ -70,7 +75,9 @@
|
|
|
70
75
|
/* ----------- motion ——————---- end */
|
|
71
76
|
|
|
72
77
|
/* ----------- transition ——————---- start */
|
|
78
|
+
@transition-duration-slowly: 0.4s;
|
|
73
79
|
@transition-duration: 0.3s;
|
|
80
|
+
@transition-duration-quickly: 0.2s;
|
|
74
81
|
/* ----------- transition ——————---- end */
|
|
75
82
|
|
|
76
83
|
/* ----------- font ——————---- start */
|
|
@@ -97,6 +104,7 @@
|
|
|
97
104
|
/* ----------- zIndex ——————---- end */
|
|
98
105
|
|
|
99
106
|
/* ----------- Button ——————---- start */
|
|
107
|
+
|
|
100
108
|
@btn-border-width: 1px;
|
|
101
109
|
@btn-border-style: solid;
|
|
102
110
|
@btn-primary-font-color: @white; // 基础文字颜色
|
|
@@ -107,9 +115,9 @@
|
|
|
107
115
|
@btn-ghost-background-color: transparent; // 幽灵背景颜色
|
|
108
116
|
@btn-ghost-border-color: @strong-border-color; //幽灵边框颜色
|
|
109
117
|
|
|
110
|
-
@btn-second-font-color:
|
|
111
|
-
@btn-second-background-color:
|
|
112
|
-
@btn-second-border-color:
|
|
118
|
+
@btn-second-font-color: @secondary-text-color3; // 次要文字颜色
|
|
119
|
+
@btn-second-background-color: @bg3; // 次要背景颜色
|
|
120
|
+
@btn-second-border-color: @strong-border-color-2; // 次要边框颜色
|
|
113
121
|
|
|
114
122
|
@btn-link-font-color: @link-color; // 链接文字颜色
|
|
115
123
|
|
|
@@ -293,6 +301,7 @@
|
|
|
293
301
|
@popconfirm-max-width: 500px;
|
|
294
302
|
@popconfirm-min-height: 98px;
|
|
295
303
|
@popconfirm-max-height: 400px;
|
|
304
|
+
|
|
296
305
|
@popconfirm-title-line-height: 21px;
|
|
297
306
|
@popconfirm-color: @primary-text-color;
|
|
298
307
|
@popconfirm-font-size: @small-font-size;
|
|
@@ -305,6 +314,7 @@
|
|
|
305
314
|
/* ----------- Popconfirm ——————---- end */
|
|
306
315
|
|
|
307
316
|
/* ----------- Progress ——————---- start */
|
|
317
|
+
|
|
308
318
|
@progress-remaining-color: #e5e5e5;
|
|
309
319
|
@progress-default-color: @ongoing-color;
|
|
310
320
|
@progress-success-color: @success-color;
|
|
@@ -313,7 +323,6 @@
|
|
|
313
323
|
@progress-line-stroke-width: 8px;
|
|
314
324
|
@progress-line-icon-font-size: 16px;
|
|
315
325
|
@progress-line-text-font-size: 16px;
|
|
316
|
-
@progress-line-text-width: 3 * @progress-line-text-font-size;
|
|
317
326
|
@progress-line-special-text-font-size: 16px;
|
|
318
327
|
@progress-line-text-margin-left: 8px;
|
|
319
328
|
@progress-circle-stroke-width: 4px;
|
|
@@ -340,6 +349,7 @@
|
|
|
340
349
|
/* ----------- Pagination ——————---- end */
|
|
341
350
|
|
|
342
351
|
/* ----------- Timeline ——————---- start */
|
|
352
|
+
|
|
343
353
|
@timeline-gap: 8px;
|
|
344
354
|
@timeline-width: 1px;
|
|
345
355
|
@timeline-dot-size: 9px;
|
|
@@ -434,7 +444,7 @@
|
|
|
434
444
|
@transfer-padding-base: 14px;
|
|
435
445
|
@transfer-font-size-base: 12px;
|
|
436
446
|
@transfer-list-item-height: 32px;
|
|
437
|
-
@transfer-list-content-height: @transfer-list-item-height * 10;
|
|
447
|
+
// @transfer-list-content-height: @transfer-list-item-height * 10;
|
|
438
448
|
@transfer-list-item-hover-bg: @hover-color;
|
|
439
449
|
@transfer-list-item-checked: @theme-color;
|
|
440
450
|
@transfer-list-item-disabled: @disabled-color;
|
|
@@ -452,7 +462,7 @@
|
|
|
452
462
|
@date-font-color: @secondary-text-color;
|
|
453
463
|
@date-focus-color: @primary-text-color;
|
|
454
464
|
@date-background-color: @white;
|
|
455
|
-
@date-border
|
|
465
|
+
@date-sizing-border: 1px;
|
|
456
466
|
@date-width: 230px;
|
|
457
467
|
@date-padding-suffix: 10px;
|
|
458
468
|
@date-panel-header-height: 36px;
|
|
@@ -568,10 +578,10 @@
|
|
|
568
578
|
/* ----------- Spin ——————---- start */
|
|
569
579
|
@spin-page-size: 15px;
|
|
570
580
|
@spin-container-size: 5px;
|
|
571
|
-
@spin-dot-color-first:
|
|
572
|
-
@spin-dot-color-second:
|
|
573
|
-
@spin-dot-color-third:
|
|
574
|
-
@spin-dot-color-fourth:
|
|
581
|
+
@spin-dot-color-first: @logo-color-1;
|
|
582
|
+
@spin-dot-color-second: @logo-color-2;
|
|
583
|
+
@spin-dot-color-third: @logo-color-3;
|
|
584
|
+
@spin-dot-color-fourth: @logo-color-4;
|
|
575
585
|
/* ----------- Spin ——————---- end */
|
|
576
586
|
|
|
577
587
|
/* ----------- Spin ——————---- start */
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@global-custom-prefix: '--@{kd-prefix}-g';
|
|
2
|
+
|
|
3
|
+
@color-theme: var(~'@{global-custom-prefix}-color-theme', @theme-color);
|
|
4
|
+
@color-theme-1: var(~'@{global-custom-prefix}-color-theme-1', @theme-color-level1);
|
|
5
|
+
@color-theme-2: var(~'@{global-custom-prefix}-color-theme-2', @theme-color-level2);
|
|
6
|
+
@color-theme-3: var(~'@{global-custom-prefix}-color-theme-3', @theme-color-level3);
|
|
7
|
+
@color-theme-4: var(~'@{global-custom-prefix}-color-theme-4', @theme-color-level4);
|
|
8
|
+
@color-theme-5: var(~'@{global-custom-prefix}-color-theme-5', @theme-color-level5);
|
|
9
|
+
@color-theme-6: var(~'@{global-custom-prefix}-color-theme-6', @theme-color-level6);
|
|
10
|
+
@color-theme-7: var(~'@{global-custom-prefix}-color-theme-7', @theme-color-level7);
|
|
11
|
+
@color-theme-8: var(~'@{global-custom-prefix}-color-theme-8', @theme-color-level8);
|
|
12
|
+
@color-theme-9: var(~'@{global-custom-prefix}-color-theme-9', @theme-color-level9);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@color-theme-disabled: @color-theme-3;
|
|
16
|
+
@color-theme-hover: @color-theme-5;
|
|
17
|
+
@color-theme-click: @color-theme-7;// 点击色
|
|
18
|
+
@color-theme-light-active: @color-theme-1; // 浅色选中
|
|
19
|
+
@color-theme-dark-active: @color-theme; // 深色选中
|
|
20
|
+
|
|
21
|
+
// hover
|
|
22
|
+
@color-hover: var(~'@{global-custom-prefix}-color-hover', @hover-color);
|
|
23
|
+
@color-background-contain-disabled: var(~'@{global-custom-prefix}-color-background-contain-disabled', @disabled-contain-bg); // 有疑问 contain
|
|
24
|
+
|
|
25
|
+
// success
|
|
26
|
+
@color-success: var(~'@{global-custom-prefix}-color-success', @success-color);
|
|
27
|
+
@color-background-success: var(~'@{global-custom-prefix}-color-background-success', @success-bg-color);
|
|
28
|
+
@color-border-success: var(~'@{global-custom-prefix}-color-border-success', @success-border-color);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// warning
|
|
32
|
+
@color-warning: var(~'@{global-custom-prefix}-color-warning', @warning-color);
|
|
33
|
+
@color-background-warning: var(~'@{global-custom-prefix}-color-background-warning', @warning-bg-color);
|
|
34
|
+
@color-border-warning: var(~'@{global-custom-prefix}-color-border-warning', @warning-border-color);
|
|
35
|
+
|
|
36
|
+
// error
|
|
37
|
+
@color-error: var(~'@{global-custom-prefix}-color-error', @error-color);
|
|
38
|
+
@color-background-error: var(~'@{global-custom-prefix}-color-background-error', @error-bg-color);
|
|
39
|
+
@color-border-error: var(~'@{global-custom-prefix}-color-border-error', @error-border-color);
|
|
40
|
+
|
|
41
|
+
// ongoing
|
|
42
|
+
@color-ongoing: var(~'@{global-custom-prefix}-color-ongoing', @ongoing-color);
|
|
43
|
+
@color-background-ongoing: var(~'@{global-custom-prefix}-color-background-ongoing', @ongoing-bg-color);
|
|
44
|
+
@color-border-ongoing: var(~'@{global-custom-prefix}-color-border-ongoing', @ongoing-border-color);
|
|
45
|
+
|
|
46
|
+
// disabled
|
|
47
|
+
@color-disabled: var(~'@{global-custom-prefix}-color-disabled', @disabled-color);
|
|
48
|
+
@color-border-disabled: var(~'@{global-custom-prefix}-color-border-disabled', @disabled-border-color);
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@color-end: var(~'@{global-custom-prefix}-color-end', @end-color);
|
|
52
|
+
|
|
53
|
+
// color text-link
|
|
54
|
+
@color-text-link: var(~'@{global-custom-prefix}-color-text-link', @link-color);
|
|
55
|
+
@color-text-link-hover: var(~'@{global-custom-prefix}-color-text-link-hover', @link-color-hover);
|
|
56
|
+
@color-text-link-active: var(~'@{global-custom-prefix}-color-text-link-active', @link-color-active);
|
|
57
|
+
|
|
58
|
+
// color-text
|
|
59
|
+
@color-text-primary: var(~'@{global-custom-prefix}-color-text-primary', @primary-text-color);
|
|
60
|
+
@color-text-primary-2: var(~'@{global-custom-prefix}-color-text-primary-2', @primary-text-color2);
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@color-text-secondary: var(~'@{global-custom-prefix}-color-text-secondary', @secondary-text-color);
|
|
64
|
+
@color-text-secondary-2: var(~'@{global-custom-prefix}-color-text-secondary-2', @secondary-text-color2);
|
|
65
|
+
@color-text-secondary-3: var(~'@{global-custom-prefix}-color-text-secondary-3', @secondary-text-color3);
|
|
66
|
+
|
|
67
|
+
@color-text-third: var(~'@{global-custom-prefix}-color-text-third', @third-text-color);
|
|
68
|
+
@color-text-third-2: var(~'@{global-custom-prefix}-color-text-third-2', @third-text-color2);
|
|
69
|
+
|
|
70
|
+
// placeholder 占位符文本
|
|
71
|
+
@color-text-placeholder: var(~'@{global-custom-prefix}-color-text-placeholder', @placeholder-text-color);
|
|
72
|
+
@color-text-placeholder-2: var(~'@{global-custom-prefix}-color-text-placeholder-2', @placeholder-text-color2);
|
|
73
|
+
|
|
74
|
+
//bg -----------------
|
|
75
|
+
@color-background: var(~'@{global-custom-prefix}-color-background', @bg);
|
|
76
|
+
@color-background-2: var(~'@{global-custom-prefix}-color-background-2', @bg2);
|
|
77
|
+
@color-background-3: var(~'@{global-custom-prefix}-color-background-3', @bg3);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@color-background-contain: var(~'@{global-custom-prefix}-color-background-contain', @contain-bg); // 容器内的灰背景
|
|
81
|
+
@color-input: var(~'@{global-custom-prefix}-color-input', @input-color); // 线型录入的默认态
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@color-border-strong: var(~'@{global-custom-prefix}-color-border-strong', @strong-border-color);
|
|
85
|
+
@color-border-strong-2: var(~'@{global-custom-prefix}-color-border-strong-2', @strong-border-color-1);
|
|
86
|
+
@color-border-strong-3: var(~'@{global-custom-prefix}-color-border-strong-3', @strong-border-color-2);
|
|
87
|
+
@color-border-weak: var(~'@{global-custom-prefix}-color-border-weak', @weak-border-color);
|
|
88
|
+
|
|
89
|
+
@color-white: var(~'@{global-custom-prefix}-color-white', @white);
|
|
90
|
+
|
|
91
|
+
// logo 颜色值
|
|
92
|
+
@color-logo-1: var(~'@{global-custom-prefix}-color-logo-1', @logo-color-1);
|
|
93
|
+
@color-logo-2: var(~'@{global-custom-prefix}-color-logo-2', @logo-color-2);
|
|
94
|
+
@color-logo-3: var(~'@{global-custom-prefix}-color-logo-3', @logo-color-3);
|
|
95
|
+
@color-logo-4: var(~'@{global-custom-prefix}-color-logo-4', @logo-color-4);
|
|
96
|
+
/* ----------- motion ——————---- start */
|
|
97
|
+
@motion-ease-out: var(~'@{global-custom-prefix}-ease-out', @ease-out);
|
|
98
|
+
@motion-ease-in: var(~'@{global-custom-prefix}-ease-in', @ease-in);
|
|
99
|
+
@motion-ease: var(~'@{global-custom-prefix}-ease', @ease);
|
|
100
|
+
/* ----------- motion ——————---- end */
|
|
101
|
+
|
|
102
|
+
/* ----------- transition ——————---- start */
|
|
103
|
+
@duration-slowly: var(~'@{global-custom-prefix}-duration-slowly', @transition-duration-slowly);
|
|
104
|
+
@duration-promptly: var(~'@{global-custom-prefix}-duration', @transition-duration);
|
|
105
|
+
@duration-quickly: var(~'@{global-custom-prefix}-duration-quickly', @transition-duration-quickly);
|
|
106
|
+
/* ----------- transition ——————---- end */
|
|
107
|
+
|
|
108
|
+
// font
|
|
109
|
+
// font-size 与 font-weight 变量名重复 去除了@font-size定义 font-weight变为font-weight-light
|
|
110
|
+
@font-weight-light: var(~'@{global-custom-prefix}-font-weight', @font-weight);
|
|
111
|
+
@font-size-small: var(~'@{global-custom-prefix}-font-size-small', @small-font-size);
|
|
112
|
+
@font-size-middle: var(~'@{global-custom-prefix}-font-size-middle', @middle-font-size);
|
|
113
|
+
@font-size-large: var(~'@{global-custom-prefix}-font-size-large', @large-font-size);
|
|
114
|
+
@font-size-x-large: var(~'@{global-custom-prefix}-font-size-x-large', @xlarge-font-size);
|
|
115
|
+
@font-size-xx-large: var(~'@{global-custom-prefix}-font-size-xx-large', @xxlarge-font-size);
|
|
116
|
+
|
|
117
|
+
@radius-border: var(~'@{global-custom-prefix}-radius-border', @radius-size); // 圆角值
|
|
118
|
+
|
|
119
|
+
/* ----------- zIndex ——————---- start */
|
|
120
|
+
/*
|
|
121
|
+
普通组件内部自身层级应设置在0-100间
|
|
122
|
+
*/
|
|
123
|
+
@z-index-below: var(~'@{global-custom-prefix}-z-index-below', @zIndex-below); // 置于下层
|
|
124
|
+
@z-index-popper: var(~'@{global-custom-prefix}-z-index-popper', @zIndex-popper); // 弹出层
|
|
125
|
+
@z-index-dialog: var(~'@{global-custom-prefix}-z-index-dialog', @zIndex-dialog); // 对话框
|
|
126
|
+
@z-index-masker: var(~'@{global-custom-prefix}-z-index-masker', @zIndex-masker); // 遮罩层 (loading等)
|
|
127
|
+
@z-index-apex: var(~'@{global-custom-prefix}-z-index-apex', @zIndex-apex); // 顶层 (notify)
|
|
128
|
+
/* ----------- zIndex ——————---- end */
|
|
@@ -92,13 +92,22 @@
|
|
|
92
92
|
/* ----------- Avatar ——————---- end */
|
|
93
93
|
/* ----------- AdvancedSelector ——————---- start */
|
|
94
94
|
/* ----------- AdvancedSelector ——————---- end */
|
|
95
|
+
/* ----------- motion ——————---- start */
|
|
96
|
+
/* ----------- motion ——————---- end */
|
|
97
|
+
/* ----------- transition ——————---- start */
|
|
98
|
+
/* ----------- transition ——————---- end */
|
|
99
|
+
/* ----------- zIndex ——————---- start */
|
|
100
|
+
/*
|
|
101
|
+
普通组件内部自身层级应设置在0-100间
|
|
102
|
+
*/
|
|
103
|
+
/* ----------- zIndex ——————---- end */
|
|
95
104
|
.kd-switch {
|
|
96
105
|
padding: 0;
|
|
97
106
|
position: relative;
|
|
98
107
|
display: inline-block;
|
|
99
108
|
-webkit-box-sizing: border-box;
|
|
100
109
|
box-sizing: border-box;
|
|
101
|
-
background-color: #999;
|
|
110
|
+
background-color: var(--kd-c-switch-color-off, #999);
|
|
102
111
|
cursor: pointer;
|
|
103
112
|
-webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
104
113
|
transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
@@ -114,9 +123,9 @@
|
|
|
114
123
|
transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
115
124
|
}
|
|
116
125
|
.kd-switch .kd-switch-inner {
|
|
117
|
-
color: #fff;
|
|
118
|
-
font-size: 12px;
|
|
119
|
-
margin: 0 5px 0 17px;
|
|
126
|
+
color: var(--kd-c-switch-color-font, var(--kd-g-color-white, #fff));
|
|
127
|
+
font-size: var(--kd-c-switch-inner-font-size-small, var(--kd-g-font-size-small, 12px));
|
|
128
|
+
margin: var(--kd-c-switch-inner-spacing-margin, 0 5px 0 17px);
|
|
120
129
|
-webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
121
130
|
transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
122
131
|
-webkit-user-select: none;
|
|
@@ -141,16 +150,16 @@
|
|
|
141
150
|
animation: loadingcircle 1s infinite;
|
|
142
151
|
-webkit-animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
|
|
143
152
|
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
|
|
144
|
-
font-size: 12px;
|
|
153
|
+
font-size: var(--kd-c-switch-small-font-size, var(--kd-g-font-size-small, 12px));
|
|
145
154
|
line-height: 1;
|
|
146
155
|
vertical-align: baseline;
|
|
147
156
|
}
|
|
148
157
|
.kd-switch-disabled {
|
|
149
|
-
background-color: #b2b2b2;
|
|
158
|
+
background-color: var(--kd-c-switch-color-background-disabled, var(--kd-g-color-disabled, #b2b2b2));
|
|
150
159
|
cursor: not-allowed;
|
|
151
160
|
}
|
|
152
161
|
.kd-switch-checked {
|
|
153
|
-
background-color: #5582f3;
|
|
162
|
+
background-color: var(--kd-c-switch-color-on, var(--kd-g-color-theme, #5582f3));
|
|
154
163
|
text-align: right;
|
|
155
164
|
}
|
|
156
165
|
.kd-switch-checked::after {
|
|
@@ -162,47 +171,47 @@
|
|
|
162
171
|
.kd-switch-checked .kd-switch-loading-icon {
|
|
163
172
|
left: unset;
|
|
164
173
|
right: 1px;
|
|
165
|
-
color: #276ff5;
|
|
174
|
+
color: var(--kd-c-switch-color-loading, var(--kd-g-color-ongoing, #276ff5));
|
|
166
175
|
}
|
|
167
176
|
.kd-switch-checked.kd-switch-disabled {
|
|
168
177
|
opacity: 0.5;
|
|
169
178
|
}
|
|
170
179
|
.kd-switch-checked .kd-switch-inner {
|
|
171
|
-
margin: 0 17px 0 5px;
|
|
180
|
+
margin: var(--kd-c-switch-inner-spacing-margin-checked, 0 17px 0 5px);
|
|
172
181
|
}
|
|
173
182
|
.kd-switch-checked.kd-switch-size-large .kd-switch-inner {
|
|
174
|
-
margin: 0 21px 0 5px;
|
|
183
|
+
margin: var(--kd-c-switch-inner-spacing-margin-large-checked, 0 21px 0 5px);
|
|
175
184
|
}
|
|
176
185
|
.kd-switch-size-small {
|
|
177
|
-
height: 14px;
|
|
178
|
-
min-width: 28px;
|
|
179
|
-
line-height: 14px;
|
|
180
|
-
font-size: 12px;
|
|
181
|
-
border-radius: 7px;
|
|
186
|
+
height: var(--kd-c-switch-small-sizing-height, 14px);
|
|
187
|
+
min-width: var(--kd-c-switch-small-sizing-width, 28px);
|
|
188
|
+
line-height: var(--kd-c-switch-small-line-height, 14px);
|
|
189
|
+
font-size: var(--kd-c-switch-small-font-size, var(--kd-g-font-size-small, 12px));
|
|
190
|
+
border-radius: var(--kd-c-switch-small-radius-border, 7px);
|
|
182
191
|
}
|
|
183
192
|
.kd-switch-size-small::after {
|
|
184
|
-
width:
|
|
185
|
-
height:
|
|
193
|
+
width: calc(var(--kd-c-switch-small-sizing-height, 14px) - 2px);
|
|
194
|
+
height: calc(var(--kd-c-switch-small-sizing-height, 14px) - 2px);
|
|
186
195
|
}
|
|
187
196
|
.kd-switch-size-small .kd-switch-loading-icon {
|
|
188
|
-
width:
|
|
189
|
-
height:
|
|
197
|
+
width: calc(var(--kd-c-switch-small-sizing-height, 14px) - 2px);
|
|
198
|
+
height: calc(var(--kd-c-switch-small-sizing-height, 14px) - 2px);
|
|
190
199
|
}
|
|
191
200
|
.kd-switch-size-large {
|
|
192
|
-
height: 20px;
|
|
193
|
-
min-width: 40px;
|
|
194
|
-
line-height: 20px;
|
|
195
|
-
font-size: 12px;
|
|
196
|
-
border-radius: 10px;
|
|
201
|
+
height: var(--kd-c-switch-large-sizing-height, 20px);
|
|
202
|
+
min-width: var(--kd-c-switch-large-sizing-width, 40px);
|
|
203
|
+
line-height: var(--kd-c-switch-large-line-height, 20px);
|
|
204
|
+
font-size: var(--kd-c-switch-large-font-size, var(--kd-g-font-size-small, 12px));
|
|
205
|
+
border-radius: var(--kd-c-switch-large-sizing-border-radius, 10px);
|
|
197
206
|
}
|
|
198
207
|
.kd-switch-size-large::after {
|
|
199
|
-
width:
|
|
200
|
-
height:
|
|
208
|
+
width: calc(var(--kd-c-switch-large-sizing-height, 20px) - 2px);
|
|
209
|
+
height: calc(var(--kd-c-switch-large-sizing-height, 20px) - 2px);
|
|
201
210
|
}
|
|
202
211
|
.kd-switch-size-large .kd-switch-loading-icon {
|
|
203
|
-
width:
|
|
204
|
-
height:
|
|
212
|
+
width: calc(var(--kd-c-switch-large-sizing-height, 20px) - 2px);
|
|
213
|
+
height: calc(var(--kd-c-switch-large-sizing-height, 20px) - 2px);
|
|
205
214
|
}
|
|
206
215
|
.kd-switch-size-large .kd-switch-inner {
|
|
207
|
-
margin: 0 5px 0 21px;
|
|
216
|
+
margin: var(--kd-c-switch-inner-spacing-margin-large, 0 5px 0 21px);
|
|
208
217
|
}
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
.@{switch-prefix-cls} {
|
|
8
8
|
.switch;
|
|
9
|
+
|
|
9
10
|
.@{switch-prefix-cls}-inner {
|
|
10
11
|
.switch-inner;
|
|
11
|
-
|
|
12
|
+
user-select: none;
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
.@{switch-prefix-cls}-loading-icon {
|
|
14
|
-
color:
|
|
16
|
+
color: @disabled-color;
|
|
15
17
|
position: absolute;
|
|
16
18
|
box-sizing: border-box;
|
|
17
19
|
display: inline-block;
|
|
@@ -19,7 +21,8 @@
|
|
|
19
21
|
top: 50%;
|
|
20
22
|
transform: translateY(-50%);
|
|
21
23
|
z-index: 10;
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
.kdicon-loadding-circle {
|
|
23
26
|
animation: loadingcircle 1s infinite;
|
|
24
27
|
animation-timing-function: cubic-bezier(0.42, 0.00, 0.58, 1.00);
|
|
25
28
|
font-size: @switch-small-font-size;
|
|
@@ -27,44 +30,52 @@
|
|
|
27
30
|
vertical-align: baseline;
|
|
28
31
|
}
|
|
29
32
|
}
|
|
33
|
+
|
|
30
34
|
&-disabled {
|
|
31
35
|
background-color: @switch-disabled-bg;
|
|
32
36
|
cursor: not-allowed;
|
|
33
37
|
}
|
|
38
|
+
|
|
34
39
|
&-checked {
|
|
35
40
|
background-color: @switch-on-color;
|
|
36
41
|
text-align: right;
|
|
42
|
+
|
|
37
43
|
&::after {
|
|
38
44
|
left: 100%;
|
|
39
45
|
margin-left: -1px;
|
|
40
46
|
transform: translateX(-100%);
|
|
41
47
|
}
|
|
48
|
+
|
|
42
49
|
.@{switch-prefix-cls}-loading-icon {
|
|
43
50
|
left: unset;
|
|
44
51
|
right: 1px;
|
|
45
52
|
color: @switch-loading-color;
|
|
46
53
|
}
|
|
54
|
+
|
|
47
55
|
&.@{switch-prefix-cls}-disabled {
|
|
48
56
|
opacity: 0.5;
|
|
49
57
|
}
|
|
58
|
+
|
|
50
59
|
.@{switch-prefix-cls}-inner {
|
|
51
60
|
margin: @switch-inner-checked-margin;
|
|
52
61
|
}
|
|
62
|
+
|
|
53
63
|
&.@{switch-prefix-cls}-size-large {
|
|
54
64
|
.@{switch-prefix-cls}-inner {
|
|
55
65
|
margin: @switch-inner-large-checked-margin;
|
|
56
66
|
}
|
|
57
67
|
}
|
|
58
68
|
}
|
|
69
|
+
|
|
59
70
|
&-size-small {
|
|
60
|
-
|
|
71
|
+
.switch-size(@switch-small-height, @switch-small-line-height, @switch-small-font-size, @switch-small-min-width, @switch-small-border-radius);
|
|
61
72
|
}
|
|
73
|
+
|
|
62
74
|
&-size-large {
|
|
63
75
|
.switch-size(@switch-large-height, @switch-large-line-height, @switch-large-font-size, @switch-large-min-width, @switch-large-border-radius);
|
|
76
|
+
|
|
64
77
|
.@{switch-prefix-cls}-inner {
|
|
65
78
|
margin: @switch-inner-large-margin;
|
|
66
79
|
}
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
|
-
|
|
70
|
-
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import './token.less';
|
|
1
2
|
.switch() {
|
|
2
3
|
padding: 0;
|
|
3
4
|
position: relative;
|
|
@@ -29,11 +30,11 @@
|
|
|
29
30
|
font-size: @font-size;
|
|
30
31
|
border-radius: @border-radius;
|
|
31
32
|
&::after {
|
|
32
|
-
width: @height - 2px;
|
|
33
|
-
height: @height - 2px;
|
|
33
|
+
width: calc( @height - 2px);
|
|
34
|
+
height:calc( @height - 2px);
|
|
34
35
|
}
|
|
35
36
|
.@{switch-prefix-cls}-loading-icon {
|
|
36
|
-
width: @height - 2px;
|
|
37
|
-
height: @height - 2px;
|
|
37
|
+
width: calc( @height - 2px);
|
|
38
|
+
height: calc( @height - 2px);
|
|
38
39
|
}
|
|
39
|
-
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
2
|
+
|
|
3
|
+
@switch-prefix: '--@{kd-prefix}-c-switch';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// color
|
|
13
|
+
@switch-on-color: var(~'@{switch-prefix}-color-on', @color-theme);
|
|
14
|
+
@switch-off-color: var(~'@{switch-prefix}-color-off', #999);
|
|
15
|
+
@switch-disabled-bg: var(~'@{switch-prefix}-color-background-disabled', @color-disabled);
|
|
16
|
+
@switch-loading-color: var(~'@{switch-prefix}-color-loading', @color-ongoing);
|
|
17
|
+
@switch-font-color: var(~'@{switch-prefix}-color-font', @color-white);
|
|
18
|
+
|
|
19
|
+
// font
|
|
20
|
+
@switch-small-font-size: var(~'@{switch-prefix}-small-font-size', @font-size-small);
|
|
21
|
+
@switch-large-font-size: var(~'@{switch-prefix}-large-font-size', @font-size-small);
|
|
22
|
+
@switch-inner-small-font-size: var(~'@{switch-prefix}-inner-font-size-small', @font-size-small);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
// line-height
|
|
26
|
+
@switch-large-line-height: var(~'@{switch-prefix}-large-line-height', 20px);
|
|
27
|
+
@switch-small-line-height: var(~'@{switch-prefix}-small-line-height', 14px);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
//radius
|
|
31
|
+
@switch-small-border-radius: var(~'@{switch-prefix}-small-radius-border', 7px);
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// sizing
|
|
35
|
+
@switch-small-height: var(~'@{switch-prefix}-small-sizing-height', 14px);
|
|
36
|
+
@switch-small-min-width: var(~'@{switch-prefix}-small-sizing-width', 28px);
|
|
37
|
+
@switch-large-height: var(~'@{switch-prefix}-large-sizing-height', 20px);
|
|
38
|
+
@switch-large-min-width: var(~'@{switch-prefix}-large-sizing-width', 40px);
|
|
39
|
+
@switch-large-border-radius: var(~'@{switch-prefix}-large-sizing-border-radius', 10px);
|
|
40
|
+
|
|
41
|
+
// spacing
|
|
42
|
+
@switch-inner-margin: var(~'@{switch-prefix}-inner-spacing-margin', 0 5px 0 17px);
|
|
43
|
+
@switch-inner-checked-margin: var(~'@{switch-prefix}-inner-spacing-margin-checked', 0 17px 0 5px);
|
|
44
|
+
@switch-inner-large-margin: var(~'@{switch-prefix}-inner-spacing-margin-large', 0 5px 0 21px);
|
|
45
|
+
@switch-inner-large-checked-margin: var(~'@{switch-prefix}-inner-spacing-margin-large-checked', 0 21px 0 5px);
|