@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
package/lib/button/button.js
CHANGED
|
@@ -52,7 +52,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
52
52
|
return t;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
var ButtonTypes = (0, _type.tuple)('second', 'primary', 'ghost', '
|
|
55
|
+
var ButtonTypes = (0, _type.tuple)('second', 'primary', 'ghost', 'text');
|
|
56
56
|
exports.ButtonTypes = ButtonTypes;
|
|
57
57
|
var ButtonSizes = (0, _type.tuple)('large', 'middle', 'small');
|
|
58
58
|
exports.ButtonSizes = ButtonSizes;
|
|
@@ -78,8 +78,6 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
78
78
|
children = buttonProps.children,
|
|
79
79
|
className = buttonProps.className,
|
|
80
80
|
customPrefixcls = buttonProps.prefixCls,
|
|
81
|
-
target = buttonProps.target,
|
|
82
|
-
href = buttonProps.href,
|
|
83
81
|
size = buttonProps.size,
|
|
84
82
|
loading = buttonProps.loading,
|
|
85
83
|
shape = buttonProps.shape,
|
|
@@ -91,7 +89,7 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
91
89
|
disabled = buttonProps.disabled,
|
|
92
90
|
_buttonProps$htmlType = buttonProps.htmlType,
|
|
93
91
|
htmlType = _buttonProps$htmlType === void 0 ? 'button' : _buttonProps$htmlType,
|
|
94
|
-
others = __rest(buttonProps, ["type", "iconPlace", "children", "className", "prefixCls", "
|
|
92
|
+
others = __rest(buttonProps, ["type", "iconPlace", "children", "className", "prefixCls", "size", "loading", "shape", "bordered", "onClick", "icon", "ghost", "block", "disabled", "htmlType"]);
|
|
95
93
|
|
|
96
94
|
(0, _devwarning.default)(ButtonTypes.indexOf(type) === -1, 'button', "cannot found button type '".concat(type, "'"));
|
|
97
95
|
var btnPrefixCls = getPrefixCls(prefixCls, 'btn', customPrefixcls); // 按钮样式前缀
|
|
@@ -142,7 +140,7 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
142
140
|
return child;
|
|
143
141
|
};
|
|
144
142
|
|
|
145
|
-
var isTextBtn = type === '
|
|
143
|
+
var isTextBtn = type === 'text'; // 判断按钮是否文本类型。这些类型下有部分样式不适用
|
|
146
144
|
|
|
147
145
|
var btnClasses = (0, _classnames.default)(btnPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(btnPrefixCls, "-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(btnPrefixCls, "-size-")).call(_context2, size), size), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(btnPrefixCls, "-shape-")).call(_context3, shape), shape && !isTextBtn), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-no-border"), !bordered), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-background-ghost"), ghost && !disabled), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-loading"), loading && !isTextBtn), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-block"), block && !shape), _classNames));
|
|
148
146
|
var iconWrapperClassName = (0, _concat.default)(_context4 = "".concat(btnPrefixCls, "-iconWrapper-")).call(_context4, iconPlace === 'left' ? 'left' : 'right');
|
|
@@ -158,16 +156,6 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
158
156
|
var btnChild = handleChild(children);
|
|
159
157
|
|
|
160
158
|
switch (type) {
|
|
161
|
-
case 'link':
|
|
162
|
-
return /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({
|
|
163
|
-
ref: buttonRef,
|
|
164
|
-
target: target,
|
|
165
|
-
href: href,
|
|
166
|
-
className: btnClasses,
|
|
167
|
-
disabled: disabled,
|
|
168
|
-
onClick: handleClick
|
|
169
|
-
}, others), children);
|
|
170
|
-
|
|
171
159
|
case 'text':
|
|
172
160
|
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
|
|
173
161
|
ref: buttonRef,
|
|
@@ -92,6 +92,15 @@
|
|
|
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-btn {
|
|
96
105
|
padding: 0;
|
|
97
106
|
position: relative;
|
|
@@ -99,13 +108,13 @@
|
|
|
99
108
|
vertical-align: middle;
|
|
100
109
|
-webkit-box-sizing: border-box;
|
|
101
110
|
box-sizing: border-box;
|
|
102
|
-
font-weight: 400;
|
|
103
|
-
border: 1px solid transparent;
|
|
111
|
+
font-weight: var(--kd-c-button-font-weight, var(--kd-g-font-weight, 400));
|
|
112
|
+
border: var(--kd-c-button-sizing-border, 1px) solid transparent;
|
|
104
113
|
-webkit-user-select: none;
|
|
105
114
|
-moz-user-select: none;
|
|
106
115
|
-ms-user-select: none;
|
|
107
116
|
user-select: none;
|
|
108
|
-
border-radius: 2px;
|
|
117
|
+
border-radius: var(--kd-c-button-radius-border, var(--kd-g-radius-border, 2px));
|
|
109
118
|
text-align: center;
|
|
110
119
|
background-color: transparent;
|
|
111
120
|
cursor: pointer;
|
|
@@ -117,74 +126,78 @@
|
|
|
117
126
|
.kd-btn:focus {
|
|
118
127
|
outline: 0;
|
|
119
128
|
}
|
|
120
|
-
.kd-btn:not(.kd-btn-
|
|
129
|
+
.kd-btn:not(.kd-btn-text)::after {
|
|
121
130
|
position: absolute;
|
|
122
131
|
top: 0;
|
|
123
132
|
right: 0;
|
|
124
133
|
bottom: 0;
|
|
125
134
|
left: 0;
|
|
126
135
|
border-radius: inherit;
|
|
127
|
-
-webkit-box-shadow: 0 0 0 0 #5582f3;
|
|
128
|
-
box-shadow: 0 0 0 0 #5582f3;
|
|
136
|
+
-webkit-box-shadow: 0 0 0 0 var(--kd-g-color-theme, #5582f3);
|
|
137
|
+
box-shadow: 0 0 0 0 var(--kd-g-color-theme, #5582f3);
|
|
129
138
|
opacity: 0.2;
|
|
130
139
|
content: '';
|
|
131
140
|
pointer-events: none;
|
|
132
141
|
clear: both;
|
|
133
142
|
}
|
|
134
|
-
.kd-btn:not(.kd-btn-
|
|
135
|
-
-webkit-animation: fadeEffect
|
|
136
|
-
animation: fadeEffect
|
|
143
|
+
.kd-btn:not(.kd-btn-text)[click-animating-wave='true']::after {
|
|
144
|
+
-webkit-animation: fadeEffect var(--kd-c-button-motion-duration-fade, var(--kd-g-duration-slowly, 0.4s)) cubic-bezier(0, 0.4, 0.4, 1) forwards, waveEffect var(--kd-c-button-motion-duration-wave, var(--kd-g-duration-quickly, 0.2s)) cubic-bezier(0, 0.4, 0.4, 1) forwards;
|
|
145
|
+
animation: fadeEffect var(--kd-c-button-motion-duration-fade, var(--kd-g-duration-slowly, 0.4s)) cubic-bezier(0, 0.4, 0.4, 1) forwards, waveEffect var(--kd-c-button-motion-duration-wave, var(--kd-g-duration-quickly, 0.2s)) cubic-bezier(0, 0.4, 0.4, 1) forwards;
|
|
137
146
|
}
|
|
138
147
|
.kd-btn-second {
|
|
139
|
-
border-color: rgba(217, 217, 217, 0.65);
|
|
140
|
-
background-color: rgba(255, 255, 255, 0.65);
|
|
141
|
-
color: rgba(102, 102, 102, 0.65);
|
|
148
|
+
border-color: var(--kd-c-button-second-color-border, var(--kd-g-color-border-strong-3, rgba(217, 217, 217, 0.65)));
|
|
149
|
+
background-color: var(--kd-c-button-second-color-background, var(--kd-g-color-background-3, rgba(255, 255, 255, 0.65)));
|
|
150
|
+
color: var(--kd-c-button-second-color-text, var(--kd-g-color-text-secondary-3, rgba(102, 102, 102, 0.65)));
|
|
151
|
+
}
|
|
152
|
+
.kd-btn-second:hover:not(.kd-btn-loading) {
|
|
153
|
+
background-color: var(--kd-c-button-second-color-background-hover, var(--kd-g-color-white, #fff));
|
|
154
|
+
border-color: var(--kd-c-button-second-color-border-hover, var(--kd-g-color-border-strong, #d9d9d9));
|
|
155
|
+
color: var(--kd-c-button-second-color-text-hover, var(--kd-g-color-text-secondary, #666));
|
|
142
156
|
}
|
|
143
|
-
.kd-btn-second:hover:not(.kd-btn-loading),
|
|
144
157
|
.kd-btn-second:active:not(.kd-btn-loading) {
|
|
145
|
-
background-color: #fff;
|
|
146
|
-
border-color: #d9d9d9;
|
|
147
|
-
color: #666;
|
|
158
|
+
background-color: var(--kd-c-button-second-color-background-active, var(--kd-g-color-white, #fff));
|
|
159
|
+
border-color: var(--kd-c-button-second-color-border-active, var(--kd-g-color-border-strong, #d9d9d9));
|
|
160
|
+
color: var(--kd-c-button-second-color-text-active, var(--kd-g-color-text-secondary, #666));
|
|
148
161
|
}
|
|
149
162
|
.kd-btn-second:disabled {
|
|
150
|
-
border-color: rgba(
|
|
151
|
-
background-color: rgba(255, 255, 255, 0.65) !important;
|
|
152
|
-
color: rgba(102, 102, 102, 0.65) !important;
|
|
163
|
+
border-color: var(--kd-c-button-second-color-border-disabled, var(--kd-g-color-text-secondary-3, rgba(102, 102, 102, 0.65))) !important;
|
|
164
|
+
background-color: var(--kd-c-button-second-color-background-disabled, var(--kd-g-color-background-3, rgba(255, 255, 255, 0.65))) !important;
|
|
165
|
+
color: var(--kd-c-button-second-color-text-disabled, var(--kd-g-color-text-secondary-3, rgba(102, 102, 102, 0.65))) !important;
|
|
153
166
|
}
|
|
154
167
|
.kd-btn-primary {
|
|
155
|
-
border-color: #5582f3;
|
|
156
|
-
background-color: #5582f3;
|
|
157
|
-
color: #fff;
|
|
168
|
+
border-color: var(--kd-c-button-primary-color-border, var(--kd-g-color-theme, #5582f3));
|
|
169
|
+
background-color: var(--kd-c-button-primary-color-background, var(--kd-g-color-theme, #5582f3));
|
|
170
|
+
color: var(--kd-c-button-primary-color-text, var(--kd-g-color-white, #fff));
|
|
158
171
|
}
|
|
159
172
|
.kd-btn-primary:hover:not(.kd-btn-loading) {
|
|
160
|
-
background-color: #87adff;
|
|
161
|
-
border-color: #87adff;
|
|
173
|
+
background-color: var(--kd-c-button-primary-color-background-hover, var(--kd-g-color-theme-5, #87adff));
|
|
174
|
+
border-color: var(--kd-c-button-primary-color-border-hover, var(--kd-g-color-theme-5, #87adff));
|
|
162
175
|
}
|
|
163
176
|
.kd-btn-primary:active:not(.kd-btn-loading) {
|
|
164
|
-
border-color: #
|
|
165
|
-
background-color: #375cca;
|
|
177
|
+
border-color: var(--kd-c-button-primary-color-border-active, var(--kd-g-color-theme, #5582f3));
|
|
178
|
+
background-color: var(--kd-c-button-primary-color-background-active, var(--kd-g-color-theme-7, #375cca));
|
|
166
179
|
}
|
|
167
180
|
.kd-btn-primary:disabled {
|
|
168
|
-
background-color: #e3eeff !important;
|
|
169
|
-
border-color: #e3eeff !important;
|
|
181
|
+
background-color: var(--kd-c-button-primary-color-background-disabled, var(--kd-g-color-theme-3, #e3eeff)) !important;
|
|
182
|
+
border-color: var(--kd-c-button-primary-color-border-disabled, var(--kd-g-color-theme-3, #e3eeff)) !important;
|
|
170
183
|
}
|
|
171
184
|
.kd-btn-ghost {
|
|
172
|
-
border-color: #d9d9d9;
|
|
173
|
-
background-color: transparent;
|
|
174
|
-
color: #666;
|
|
185
|
+
border-color: var(--kd-c-button-ghost-color-border, var(--kd-g-color-border-strong, #d9d9d9));
|
|
186
|
+
background-color: var(--kd-c-button-ghost-color-background, transparent);
|
|
187
|
+
color: var(--kd-c-button-ghost-color-text, var(--kd-g-color-text-secondary, #666));
|
|
175
188
|
}
|
|
176
189
|
.kd-btn-ghost:hover:not(.kd-btn-loading) {
|
|
177
|
-
border-color: #5582f3;
|
|
178
|
-
color: #5582f3;
|
|
190
|
+
border-color: var(--kd-c-button-ghost-color-border-hover, var(--kd-g-color-theme, #5582f3));
|
|
191
|
+
color: var(--kd-c-button-ghost-color-text-hover, var(--kd-g-color-theme, #5582f3));
|
|
179
192
|
}
|
|
180
193
|
.kd-btn-ghost:active:not(.kd-btn-loading) {
|
|
181
|
-
border-color: #
|
|
182
|
-
color: #375cca;
|
|
194
|
+
border-color: var(--kd-c-button-ghost-color-border-hover, var(--kd-g-color-theme, #5582f3));
|
|
195
|
+
color: var(--kd-c-button-ghost-color-text-active, var(--kd-g-color-theme-7, #375cca));
|
|
183
196
|
}
|
|
184
197
|
.kd-btn-ghost:disabled {
|
|
185
|
-
background-color: #f5f5f5 !important;
|
|
186
|
-
border-color: #b2b2b2 !important;
|
|
187
|
-
color: #b2b2b2 !important;
|
|
198
|
+
background-color: var(--kd-c-button-ghost-color-background-disabled, var(--kd-g-color-background-contain-disabled, #f5f5f5)) !important;
|
|
199
|
+
border-color: var(--kd-c-button-ghost-color-border-disabled, var(--kd-g-color-disabled, #b2b2b2)) !important;
|
|
200
|
+
color: var(--kd-c-button-ghost-color-border-disabled, var(--kd-g-color-disabled, #b2b2b2)) !important;
|
|
188
201
|
}
|
|
189
202
|
.kd-btn-iconWrapper-left {
|
|
190
203
|
display: -webkit-box;
|
|
@@ -211,86 +224,72 @@
|
|
|
211
224
|
float: right;
|
|
212
225
|
}
|
|
213
226
|
.kd-btn-loadingIcon {
|
|
214
|
-
color: #5582f3;
|
|
227
|
+
color: var(--kd-c-button-text-color-loading, var(--kd-g-color-theme, #5582f3));
|
|
215
228
|
}
|
|
216
229
|
.kd-btn-primary-loadingIcon {
|
|
217
|
-
color: #fff;
|
|
230
|
+
color: var(--kd-c-button-primary-color-text-loading, var(--kd-g-color-white, #fff));
|
|
218
231
|
}
|
|
219
232
|
.kd-btn-size-small {
|
|
220
|
-
height: 24px;
|
|
221
|
-
min-width: 60px;
|
|
222
|
-
line-height:
|
|
223
|
-
font-size: 12px;
|
|
224
|
-
padding: 3px 8px;
|
|
233
|
+
height: var(--kd-c-button-sizing-height-small, 24px);
|
|
234
|
+
min-width: var(--kd-c-button-sizing-min-width-small, 60px);
|
|
235
|
+
line-height: calc(var(--kd-c-button-sizing-height-small, 24px) - (var(--kd-c-button-spacing-padding-vertical-small, 3px) * 2) - (var(--kd-c-button-sizing-border, 1px) * 2));
|
|
236
|
+
font-size: var(--kd-c-button-font-size-small, var(--kd-g-font-size-small, 12px));
|
|
237
|
+
padding: var(--kd-c-button-spacing-padding-vertical-small, 3px) var(--kd-c-button-spacing-padding-horizontal-small, 8px);
|
|
225
238
|
}
|
|
226
239
|
.kd-btn-size-middle {
|
|
227
|
-
height: 28px;
|
|
228
|
-
min-width: 60px;
|
|
229
|
-
line-height:
|
|
230
|
-
font-size: 12px;
|
|
231
|
-
padding: 5px 8px;
|
|
240
|
+
height: var(--kd-c-button-sizing-height-middle, 28px);
|
|
241
|
+
min-width: var(--kd-c-button-sizing-min-width-middle, 60px);
|
|
242
|
+
line-height: calc(var(--kd-c-button-sizing-height-middle, 28px) - (var(--kd-c-button-spacing-padding-vertical-middle, 5px) * 2) - (var(--kd-c-button-sizing-border, 1px) * 2));
|
|
243
|
+
font-size: var(--kd-c-button-font-size-middle, var(--kd-g-font-size-small, 12px));
|
|
244
|
+
padding: var(--kd-c-button-spacing-padding-vertical-middle, 5px) var(--kd-c-button-spacing-padding-horizontal-middle, 8px);
|
|
232
245
|
}
|
|
233
246
|
.kd-btn-size-large {
|
|
234
|
-
height: 32px;
|
|
235
|
-
min-width: 80px;
|
|
236
|
-
line-height:
|
|
237
|
-
font-size: 16px;
|
|
238
|
-
padding: 6px 8px;
|
|
247
|
+
height: var(--kd-c-button-sizing-height-large, 32px);
|
|
248
|
+
min-width: var(--kd-c-button-sizing-min-width-large, 80px);
|
|
249
|
+
line-height: calc(var(--kd-c-button-sizing-height-large, 32px) - (var(--kd-c-button-spacing-padding-vertical-large, 6px) * 2) - (var(--kd-c-button-sizing-border, 1px) * 2));
|
|
250
|
+
font-size: var(--kd-c-button-font-size-large, var(--kd-g-font-size-large, 16px));
|
|
251
|
+
padding: var(--kd-c-button-spacing-padding-vertical-large, 6px) var(--kd-c-button-spacing-padding-horizontal-large, 8px);
|
|
239
252
|
}
|
|
240
253
|
.kd-btn-shape-circle {
|
|
241
254
|
border-radius: 50%;
|
|
242
255
|
min-width: auto;
|
|
243
256
|
}
|
|
244
257
|
.kd-btn-shape-circle.kd-btn-size-small {
|
|
245
|
-
width: 24px;
|
|
258
|
+
width: var(--kd-c-button-sizing-height-small, 24px);
|
|
246
259
|
padding: 0;
|
|
247
260
|
}
|
|
248
261
|
.kd-btn-shape-circle.kd-btn-size-middle {
|
|
249
|
-
width: 28px;
|
|
262
|
+
width: var(--kd-c-button-sizing-height-middle, 28px);
|
|
250
263
|
padding: 0;
|
|
251
264
|
}
|
|
252
265
|
.kd-btn-shape-circle.kd-btn-size-large {
|
|
253
|
-
width: 32px;
|
|
266
|
+
width: var(--kd-c-button-sizing-height-large, 32px);
|
|
254
267
|
padding: 0;
|
|
255
268
|
}
|
|
256
269
|
.kd-btn-shape-round.kd-btn-size-small {
|
|
257
|
-
border-radius: 24px;
|
|
270
|
+
border-radius: var(--kd-c-button-sizing-height-small, 24px);
|
|
258
271
|
}
|
|
259
272
|
.kd-btn-shape-round.kd-btn-size-middle {
|
|
260
|
-
border-radius: 28px;
|
|
273
|
+
border-radius: var(--kd-c-button-sizing-height-middle, 28px);
|
|
261
274
|
}
|
|
262
275
|
.kd-btn-shape-round.kd-btn-size-large {
|
|
263
|
-
border-radius: 32px;
|
|
276
|
+
border-radius: var(--kd-c-button-sizing-height-large, 32px);
|
|
264
277
|
}
|
|
265
278
|
.kd-btn-text {
|
|
266
279
|
height: auto;
|
|
267
280
|
width: auto;
|
|
268
|
-
color: #
|
|
281
|
+
color: var(--kd-c-button-text-color-text, var(--kd-g-color-theme, #5582f3));
|
|
269
282
|
padding: 0;
|
|
270
283
|
min-width: auto;
|
|
271
284
|
}
|
|
272
285
|
.kd-btn-text:hover {
|
|
273
|
-
color: #
|
|
286
|
+
color: var(--kd-c-button-text-color-text-hover, var(--kd-g-color-theme-5, #87adff));
|
|
274
287
|
}
|
|
275
288
|
.kd-btn-text:active {
|
|
276
|
-
color: #375cca;
|
|
289
|
+
color: var(--kd-c-button-text-color-text-active, var(--kd-g-color-theme-7, #375cca));
|
|
277
290
|
}
|
|
278
291
|
.kd-btn-text[disabled] {
|
|
279
|
-
color: #b2b2b2 !important;
|
|
280
|
-
}
|
|
281
|
-
.kd-btn-link {
|
|
282
|
-
height: auto;
|
|
283
|
-
width: auto;
|
|
284
|
-
text-decoration: none;
|
|
285
|
-
color: #0e5fd8;
|
|
286
|
-
padding: 0;
|
|
287
|
-
min-width: auto;
|
|
288
|
-
}
|
|
289
|
-
.kd-btn-link:hover {
|
|
290
|
-
color: #3987ed;
|
|
291
|
-
}
|
|
292
|
-
.kd-btn-link:active {
|
|
293
|
-
color: #0041b0;
|
|
292
|
+
color: var(--kd-c-button-text-color-text-disabled, var(--kd-g-color-disabled, #b2b2b2)) !important;
|
|
294
293
|
}
|
|
295
294
|
.kd-btn-no-border {
|
|
296
295
|
border: none;
|
|
@@ -305,10 +304,10 @@
|
|
|
305
304
|
background-color: transparent;
|
|
306
305
|
}
|
|
307
306
|
.kd-btn-background-ghost.kd-btn-primary {
|
|
308
|
-
color: #5582f3;
|
|
307
|
+
color: var(--kd-c-button-background-ghost-color-text, var(--kd-g-color-theme, #5582f3));
|
|
309
308
|
}
|
|
310
309
|
.kd-btn-background-ghost.kd-btn-primary:hover {
|
|
311
|
-
color: #fff;
|
|
310
|
+
color: var(--kd-c-button-background-ghost-color-text-hover, var(--kd-g-color-white, #fff));
|
|
312
311
|
}
|
|
313
312
|
.kd-btn-loading {
|
|
314
313
|
cursor: default;
|
|
@@ -6,71 +6,78 @@
|
|
|
6
6
|
|
|
7
7
|
// 按钮wave动效
|
|
8
8
|
transition: color @transition-duration, background-color @transition-duration, border-color @transition-duration;
|
|
9
|
-
&:not(&-
|
|
9
|
+
&:not(&-text)::after{
|
|
10
10
|
position: absolute;
|
|
11
11
|
top: 0;
|
|
12
12
|
right: 0;
|
|
13
13
|
bottom: 0;
|
|
14
14
|
left: 0;
|
|
15
15
|
border-radius: inherit;
|
|
16
|
-
box-shadow: 0 0 0 0 @theme
|
|
16
|
+
box-shadow: 0 0 0 0 @color-theme;
|
|
17
17
|
opacity: 0.2;
|
|
18
18
|
content: '';
|
|
19
19
|
pointer-events: none;
|
|
20
20
|
clear: both;
|
|
21
21
|
}
|
|
22
|
-
&:not(&-
|
|
23
|
-
animation: fadeEffect
|
|
24
|
-
waveEffect
|
|
22
|
+
&:not(&-text)[click-animating-wave='true']::after {
|
|
23
|
+
animation: fadeEffect @btn-duration-fade @ease-out forwards,
|
|
24
|
+
waveEffect @btn-duration-wave @ease-out forwards;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// 次要按钮
|
|
28
28
|
&-second {
|
|
29
29
|
.btn-type(@btn-second-border-color, @btn-second-background-color, @btn-second-font-color);
|
|
30
|
-
&:hover
|
|
30
|
+
&:hover {
|
|
31
|
+
&:not(.@{btn-prefix-cls}-loading) {
|
|
32
|
+
background-color: @btn-second-background-color-hover;
|
|
33
|
+
border-color: @btn-second-border-color-hover;
|
|
34
|
+
color: @btn-second-font-color-hover;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&:active {
|
|
31
38
|
&:not(.@{btn-prefix-cls}-loading) {
|
|
32
|
-
background-color: @
|
|
33
|
-
border-color: @
|
|
34
|
-
color: @
|
|
39
|
+
background-color: @btn-second-background-color-active;
|
|
40
|
+
border-color: @btn-second-border-color-active;
|
|
41
|
+
color: @btn-second-font-color-active;
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
&:disabled {
|
|
38
|
-
border-color: @btn-second-border-color !important;
|
|
39
|
-
background-color: @btn-second-background-color !important;
|
|
40
|
-
color: @btn-second-font-color !important;
|
|
45
|
+
border-color: @btn-second-border-color-disabled !important;
|
|
46
|
+
background-color: @btn-second-background-color-disabled !important;
|
|
47
|
+
color: @btn-second-font-color-disabled !important;
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
50
|
// 主要按钮
|
|
44
51
|
&-primary {
|
|
45
52
|
.btn-type(@btn-primary-border-color, @btn-primary-background-color, @btn-primary-font-color);
|
|
46
53
|
&:hover:not(.@{btn-prefix-cls}-loading) {
|
|
47
|
-
background-color: @
|
|
48
|
-
border-color: @
|
|
54
|
+
background-color: @btn-primary-background-color-hover;
|
|
55
|
+
border-color: @btn-primary-border-color-hover;
|
|
49
56
|
}
|
|
50
57
|
&:active:not(.@{btn-prefix-cls}-loading) {
|
|
51
|
-
border-color: @
|
|
52
|
-
background-color: @
|
|
58
|
+
border-color: @btn-primary-border-color-active;
|
|
59
|
+
background-color: @btn-primary-background-color-active;
|
|
53
60
|
}
|
|
54
61
|
&:disabled {
|
|
55
|
-
background-color: @
|
|
56
|
-
border-color: @
|
|
62
|
+
background-color: @btn-primary-background-color-disabled !important;
|
|
63
|
+
border-color: @btn-primary-border-color-disabled !important;
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
66
|
// 幽灵按钮
|
|
60
67
|
&-ghost {
|
|
61
68
|
.btn-type(@btn-ghost-border-color, @btn-ghost-background-color, @btn-ghost-font-color);
|
|
62
69
|
&:hover:not(.@{btn-prefix-cls}-loading) {
|
|
63
|
-
border-color: @
|
|
64
|
-
color: @
|
|
70
|
+
border-color: @btn-ghost-border-color-hover;
|
|
71
|
+
color: @btn-ghost-font-color-hover;
|
|
65
72
|
}
|
|
66
73
|
&:active:not(.@{btn-prefix-cls}-loading) {
|
|
67
|
-
border-color: @
|
|
68
|
-
color: @
|
|
74
|
+
border-color: @btn-ghost-border-color-hover;
|
|
75
|
+
color: @btn-ghost-font-color-active;
|
|
69
76
|
}
|
|
70
77
|
&:disabled {
|
|
71
|
-
background-color: @
|
|
72
|
-
border-color: @
|
|
73
|
-
color: @
|
|
78
|
+
background-color: @btn-ghost-background-color-disabled !important;
|
|
79
|
+
border-color: @btn-ghost-border-color-disabled !important;
|
|
80
|
+
color: @btn-ghost-border-color-disabled !important;
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
83
|
&-iconWrapper-left {
|
|
@@ -86,10 +93,10 @@
|
|
|
86
93
|
float: right;
|
|
87
94
|
}
|
|
88
95
|
&-loadingIcon {
|
|
89
|
-
color: @
|
|
96
|
+
color: @btn-g-text-color-loading;
|
|
90
97
|
}
|
|
91
98
|
&-primary-loadingIcon {
|
|
92
|
-
color: @
|
|
99
|
+
color: @btn-primary-g-text-color-loading;
|
|
93
100
|
}
|
|
94
101
|
// 小号尺寸按钮
|
|
95
102
|
&-size-small {
|
|
@@ -140,40 +147,25 @@
|
|
|
140
147
|
&-text {
|
|
141
148
|
height: auto;
|
|
142
149
|
width: auto;
|
|
143
|
-
color: @
|
|
150
|
+
color: @btn-text-g-text-color;
|
|
144
151
|
padding: 0;
|
|
145
152
|
min-width: auto;
|
|
146
153
|
&:hover {
|
|
147
|
-
color: @
|
|
154
|
+
color: @btn-text-g-text-color-hover;
|
|
148
155
|
}
|
|
149
156
|
&:active {
|
|
150
|
-
color: @
|
|
157
|
+
color: @btn-text-g-text-color-active;
|
|
151
158
|
}
|
|
152
159
|
&[disabled] {
|
|
153
|
-
color: @
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
// 链接类型按钮
|
|
157
|
-
&-link {
|
|
158
|
-
height: auto;
|
|
159
|
-
width: auto;
|
|
160
|
-
text-decoration: none;
|
|
161
|
-
color: @link-color;
|
|
162
|
-
padding: 0;
|
|
163
|
-
min-width: auto;
|
|
164
|
-
&:hover {
|
|
165
|
-
color: @link-color-hover;
|
|
166
|
-
}
|
|
167
|
-
&:active {
|
|
168
|
-
color: @link-color-active;
|
|
160
|
+
color: @btn-text-g-text-color-disabled !important;
|
|
169
161
|
}
|
|
170
162
|
}
|
|
171
|
-
|
|
163
|
+
|
|
172
164
|
// 按钮不带边框
|
|
173
165
|
&-no-border {
|
|
174
166
|
border: none;
|
|
175
167
|
}
|
|
176
|
-
|
|
168
|
+
|
|
177
169
|
// 不可用按钮部分样式
|
|
178
170
|
&:disabled, &[disabled] {
|
|
179
171
|
cursor: not-allowed;
|
|
@@ -184,9 +176,9 @@
|
|
|
184
176
|
background-color: transparent;
|
|
185
177
|
}
|
|
186
178
|
&.@{btn-prefix-cls}-primary {
|
|
187
|
-
color: @
|
|
179
|
+
color: @btn-background-ghost-g-text-color;
|
|
188
180
|
&:hover {
|
|
189
|
-
color: @
|
|
181
|
+
color: @btn-background-ghost-g-text-color-hover;
|
|
190
182
|
}
|
|
191
183
|
}
|
|
192
184
|
}
|
|
@@ -202,4 +194,4 @@
|
|
|
202
194
|
.btn-space {
|
|
203
195
|
margin-left: 5px;
|
|
204
196
|
}
|
|
205
|
-
}
|
|
197
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import './token.less';
|
|
2
|
+
|
|
1
3
|
// 按钮默认样式Mixins
|
|
2
4
|
.btn() {
|
|
3
5
|
padding: 0;
|
|
@@ -5,10 +7,10 @@
|
|
|
5
7
|
display: inline-block;
|
|
6
8
|
vertical-align: middle;
|
|
7
9
|
box-sizing: border-box;
|
|
8
|
-
font-weight: @font-weight;
|
|
9
|
-
border: @btn-border-width
|
|
10
|
+
font-weight: @btn-g-font-weight;
|
|
11
|
+
border: @btn-border-width solid transparent;
|
|
10
12
|
user-select: none;
|
|
11
|
-
border-radius: @radius-
|
|
13
|
+
border-radius: @btn-g-radius-border;
|
|
12
14
|
text-align: center;
|
|
13
15
|
background-color: transparent;
|
|
14
16
|
cursor: pointer;
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
.btn-size(@height, @font-size, @padding-vertical, @padding-horizontal, @min-width) {
|
|
29
31
|
height: @height;
|
|
30
32
|
min-width: @min-width;
|
|
31
|
-
line-height: @height - (@padding-vertical * 2) - (@btn-border-width * 2);
|
|
33
|
+
line-height: calc(@height - (@padding-vertical * 2) - (@btn-border-width * 2));
|
|
32
34
|
font-size: @font-size;
|
|
33
35
|
padding: @padding-vertical @padding-horizontal;
|
|
34
36
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
2
|
+
|
|
3
|
+
@button-custom-prefix: ~'--@{kd-prefix}-c-button';
|
|
4
|
+
|
|
5
|
+
// color
|
|
6
|
+
@btn-primary-background-color: var(~'@{button-custom-prefix}-primary-color-background', @color-theme); // 基础背景颜色
|
|
7
|
+
@btn-primary-border-color: var(~'@{button-custom-prefix}-primary-color-border', @color-theme); // 基础边框颜色
|
|
8
|
+
@btn-primary-font-color: var(~'@{button-custom-prefix}-primary-color-text', @color-white); // 基础文字颜色
|
|
9
|
+
@btn-primary-background-color-hover: var(~'@{button-custom-prefix}-primary-color-background-hover', @color-theme-hover); // 基础hover背景颜色
|
|
10
|
+
@btn-primary-border-color-hover: var(~'@{button-custom-prefix}-primary-color-border-hover', @color-theme-hover); // 基础hover边框颜色
|
|
11
|
+
@btn-primary-background-color-active: var(~'@{button-custom-prefix}-primary-color-background-active', @color-theme-click); // 基础active背景颜色
|
|
12
|
+
@btn-primary-border-color-active: var(~'@{button-custom-prefix}-primary-color-border-active', @color-theme); // 基础active边框颜色
|
|
13
|
+
@btn-primary-background-color-disabled: var(~'@{button-custom-prefix}-primary-color-background-disabled', @color-theme-disabled); // 基础disabled背景颜色 禁用状态
|
|
14
|
+
@btn-primary-border-color-disabled: var(~'@{button-custom-prefix}-primary-color-border-disabled', @color-theme-disabled); // 基础disabled边框颜色
|
|
15
|
+
|
|
16
|
+
@btn-ghost-background-color: var(~'@{button-custom-prefix}-ghost-color-background', transparent); // 幽灵背景颜色
|
|
17
|
+
@btn-ghost-border-color: var(~'@{button-custom-prefix}-ghost-color-border', @color-border-strong); //幽灵边框颜色
|
|
18
|
+
@btn-ghost-font-color: var(~'@{button-custom-prefix}-ghost-color-text', @color-text-secondary); // 幽灵按钮文字颜色
|
|
19
|
+
@btn-ghost-border-color-hover: var(~'@{button-custom-prefix}-ghost-color-border-hover', @color-theme); //幽灵hover边框颜色
|
|
20
|
+
@btn-ghost-font-color-hover: var(~'@{button-custom-prefix}-ghost-color-text-hover', @color-theme); // 幽灵hover按钮文字颜色
|
|
21
|
+
@btn-ghost-border-color-active: var(~'@{button-custom-prefix}-ghost-color-border-active', @color-theme-click); //幽灵active边框颜色
|
|
22
|
+
@btn-ghost-background-color-disabled: var(~'@{button-custom-prefix}-ghost-color-background-disabled', @color-background-contain-disabled); // 幽灵disabled背景颜色
|
|
23
|
+
@btn-ghost-font-color-active: var(~'@{button-custom-prefix}-ghost-color-text-active', @color-theme-click); // 幽灵active按钮文字颜色
|
|
24
|
+
@btn-ghost-border-color-disabled: var(~'@{button-custom-prefix}-ghost-color-border-disabled', @color-disabled); //幽灵disabled边框颜色
|
|
25
|
+
@btn-ghost-font-color-disabled: var(~'@{button-custom-prefix}-ghost-color-text-disabled', @color-disabled); // 幽灵disabled按钮文字颜色
|
|
26
|
+
|
|
27
|
+
@btn-second-background-color: var(~'@{button-custom-prefix}-second-color-background', @color-background-3); // 次要背景颜色
|
|
28
|
+
@btn-second-border-color: var(~'@{button-custom-prefix}-second-color-border', @color-border-strong-3); // 次要边框颜色
|
|
29
|
+
@btn-second-font-color: var(~'@{button-custom-prefix}-second-color-text', @color-text-secondary-3); // 次要文字颜色
|
|
30
|
+
@btn-second-background-color-hover: var(~'@{button-custom-prefix}-second-color-background-hover', @color-white); // 次要hover背景颜色
|
|
31
|
+
@btn-second-border-color-hover: var(~'@{button-custom-prefix}-second-color-border-hover', @color-border-strong); // 次要hover边框颜色
|
|
32
|
+
@btn-second-font-color-hover: var(~'@{button-custom-prefix}-second-color-text-hover', @color-text-secondary); // 次要hover文字颜色
|
|
33
|
+
@btn-second-background-color-active: var(~'@{button-custom-prefix}-second-color-background-active', @color-white); // 次要active背景颜色
|
|
34
|
+
@btn-second-border-color-active: var(~'@{button-custom-prefix}-second-color-border-active', @color-border-strong); // 次要active边框颜色
|
|
35
|
+
@btn-second-font-color-active: var(~'@{button-custom-prefix}-second-color-text-active', @color-text-secondary); // 次要active文字颜色
|
|
36
|
+
@btn-second-background-color-disabled: var(~'@{button-custom-prefix}-second-color-background-disabled', @color-background-3); // 次要disabled背景颜色
|
|
37
|
+
@btn-second-border-color-disabled: var(~'@{button-custom-prefix}-second-color-border-disabled', @color-text-secondary-3); // 次要disabled边框颜色
|
|
38
|
+
@btn-second-font-color-disabled: var(~'@{button-custom-prefix}-second-color-text-disabled', @color-text-secondary-3); // 次要disabled文字颜色
|
|
39
|
+
|
|
40
|
+
@btn-text-g-text-color: var(~'@{button-custom-prefix}-text-color-text', @color-theme);
|
|
41
|
+
@btn-text-g-text-color-hover: var(~'@{button-custom-prefix}-text-color-text-hover', @color-theme-hover);
|
|
42
|
+
@btn-text-g-text-color-active: var(~'@{button-custom-prefix}-text-color-text-active', @color-theme-click);
|
|
43
|
+
@btn-text-g-text-color-disabled: var(~'@{button-custom-prefix}-text-color-text-disabled', @color-disabled);
|
|
44
|
+
|
|
45
|
+
@btn-disabled-background-color: var(~'@{button-custom-prefix}-color-background-disabled', @color-background-contain-disabled); // 禁用状态 背景颜色
|
|
46
|
+
@btn-disabled-border-color: var(~'@{button-custom-prefix}-color-border-disabled', @color-border-strong); // 禁用状态 边框颜色
|
|
47
|
+
@btn-disabled-font-color: var(~'@{button-custom-prefix}-text-color-disabled', @color-white); // 禁用状态 文字颜色
|
|
48
|
+
|
|
49
|
+
@btn-danger-background-color: var(~'@{button-custom-prefix}-danger-color-background', @color-error); // 危险状态 背景颜色
|
|
50
|
+
@btn-danger-border-color: var(~'@{button-custom-prefix}-danger-color-border', @color-error); // 危险状态 边框颜色
|
|
51
|
+
@btn-danger-font-color: var(~'@{button-custom-prefix}-danger-color-text', @color-white); // 危险状态 文字颜色
|
|
52
|
+
|
|
53
|
+
@btn-g-text-color-loading: var(~'@{button-custom-prefix}-text-color-loading', @color-theme);
|
|
54
|
+
@btn-primary-g-text-color-loading: var(~'@{button-custom-prefix}-primary-color-text-loading', @color-white);
|
|
55
|
+
|
|
56
|
+
@btn-background-ghost-g-text-color: var(~'@{button-custom-prefix}-background-ghost-color-text', @color-theme);
|
|
57
|
+
@btn-background-ghost-g-text-color-hover: var(~'@{button-custom-prefix}-background-ghost-color-text-hover', @color-white);
|
|
58
|
+
|
|
59
|
+
// duration
|
|
60
|
+
@btn-transition-fn: var(~'@{button-custom-prefix}-motion-timing-function', cubic-bezier(0.075, 0.82, 0.165, 1));
|
|
61
|
+
@btn-duration-fade: var(~'@{button-custom-prefix}-motion-duration-fade', @duration-slowly);
|
|
62
|
+
@btn-duration-wave: var(~'@{button-custom-prefix}-motion-duration-wave', @duration-quickly);
|
|
63
|
+
|
|
64
|
+
// font
|
|
65
|
+
@btn-g-font-weight: var(~'@{button-custom-prefix}-font-weight', @font-weight-light);
|
|
66
|
+
@btn-small-font-size: var(~'@{button-custom-prefix}-font-size-small', @font-size-small); // 小号 文字大小
|
|
67
|
+
@btn-middle-font-size: var(~'@{button-custom-prefix}-font-size-middle', @font-size-small); // 中号 文字大小
|
|
68
|
+
@btn-large-font-size: var(~'@{button-custom-prefix}-font-size-large', @font-size-large); // 大号 文字大小
|
|
69
|
+
|
|
70
|
+
// radius
|
|
71
|
+
@btn-g-radius-border: var(~'@{button-custom-prefix}-radius-border', @radius-border); //圆角
|
|
72
|
+
|
|
73
|
+
// sizing
|
|
74
|
+
@btn-border-width: var(~'@{button-custom-prefix}-sizing-border', 1px);
|
|
75
|
+
@btn-small-height: var(~'@{button-custom-prefix}-sizing-height-small', 24px); // 小号 高度
|
|
76
|
+
@btn-small-min-width: var(~'@{button-custom-prefix}-sizing-min-width-small', 60px); // 小号 最小宽度
|
|
77
|
+
@btn-middle-height: var(~'@{button-custom-prefix}-sizing-height-middle', 28px); // 中号 高度 高度配置
|
|
78
|
+
@btn-middle-min-width: var(~'@{button-custom-prefix}-sizing-min-width-middle', 60px); // 中号 最小宽度
|
|
79
|
+
@btn-large-height: var(~'@{button-custom-prefix}-sizing-height-large', 32px); // 大号 高度
|
|
80
|
+
@btn-large-min-width: var(~'@{button-custom-prefix}-sizing-min-width-large', 80px); // 大号 最小宽度
|
|
81
|
+
|
|
82
|
+
// spacing
|
|
83
|
+
@btn-small-padding-vertical: var(~'@{button-custom-prefix}-spacing-padding-vertical-small', 3px); // 小号 内间距 纵向
|
|
84
|
+
@btn-small-padding-horizontal: var(~'@{button-custom-prefix}-spacing-padding-horizontal-small', 8px); // 小号 内间距 横向
|
|
85
|
+
@btn-middle-padding-vertical: var(~'@{button-custom-prefix}-spacing-padding-vertical-middle', 5px); // 中号 内间距 纵向
|
|
86
|
+
@btn-middle-padding-horizontal: var(~'@{button-custom-prefix}-spacing-padding-horizontal-middle', 8px); // 中号 内间距 纵向 宽度配置
|
|
87
|
+
@btn-large-padding-vertical: var(~'@{button-custom-prefix}-spacing-padding-vertical-large', 6px); // 大号 内间距 纵向
|
|
88
|
+
@btn-large-padding-horizontal: var(~'@{button-custom-prefix}-spacing-padding-horizontal-large', 8px); // 大号 内间距 横向
|
package/lib/card/card.d.ts
CHANGED
package/lib/card/card.js
CHANGED
|
@@ -42,6 +42,7 @@ var Card = function Card(props) {
|
|
|
42
42
|
title = _getCompProps.title,
|
|
43
43
|
avatar = _getCompProps.avatar,
|
|
44
44
|
actions = _getCompProps.actions,
|
|
45
|
+
extra = _getCompProps.extra,
|
|
45
46
|
children = _getCompProps.children,
|
|
46
47
|
className = _getCompProps.className,
|
|
47
48
|
hoverable = _getCompProps.hoverable,
|
|
@@ -81,7 +82,9 @@ var Card = function Card(props) {
|
|
|
81
82
|
style: bodyStyle
|
|
82
83
|
}, children), actions && /*#__PURE__*/React.createElement("div", {
|
|
83
84
|
className: "".concat(prefixCls, "-actions")
|
|
84
|
-
}, actions)
|
|
85
|
+
}, actions), extra && /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: "".concat(prefixCls, "-extra")
|
|
87
|
+
}, extra));
|
|
85
88
|
};
|
|
86
89
|
|
|
87
90
|
Card.displayName = 'Card';
|