@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
|
@@ -92,26 +92,35 @@
|
|
|
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
|
/* 多行显示省略号 */
|
|
96
105
|
/* 单行显示省略号 */
|
|
97
106
|
/** 浮层箭头样式 **/
|
|
98
107
|
.kd-dropdown-link {
|
|
99
|
-
color: #5582f3;
|
|
108
|
+
color: var(--kd-g-color-theme, #5582f3);
|
|
100
109
|
text-decoration: none;
|
|
101
110
|
background-color: transparent;
|
|
102
111
|
outline: noned;
|
|
103
112
|
cursor: pointer;
|
|
104
|
-
-webkit-transition: color 0.3s, background-color 0.3s;
|
|
105
|
-
transition: color 0.3s, background-color 0.3s;
|
|
113
|
+
-webkit-transition: color var(--kd-g-duration, 0.3s), background-color var(--kd-g-duration, 0.3s);
|
|
114
|
+
transition: color var(--kd-g-duration, 0.3s), background-color var(--kd-g-duration, 0.3s);
|
|
106
115
|
-webkit-text-decoration-skip: objects;
|
|
107
116
|
}
|
|
108
117
|
.kd-dropdown-link.disabled,
|
|
109
118
|
.kd-dropdown-link.disabled:hover {
|
|
110
119
|
cursor: default;
|
|
111
|
-
color: #b2b2b2;
|
|
120
|
+
color: var(--kd-g-color-disabled, #b2b2b2);
|
|
112
121
|
}
|
|
113
122
|
.kd-dropdown-link:hover {
|
|
114
|
-
color: #87adff;
|
|
123
|
+
color: var(--kd-g-color-theme-5, #87adff);
|
|
115
124
|
}
|
|
116
125
|
.kd-dropdown-trigger {
|
|
117
126
|
outline: none;
|
|
@@ -127,11 +136,11 @@
|
|
|
127
136
|
font-feature-settings: 'tnum';
|
|
128
137
|
opacity: 1;
|
|
129
138
|
visibility: visible;
|
|
130
|
-
z-index: 1050;
|
|
131
|
-
background-color: #fff;
|
|
132
|
-
border-radius: 2px;
|
|
133
|
-
min-width: 136px;
|
|
134
|
-
max-width: 320px;
|
|
139
|
+
z-index: var(--kd-g-z-index-popper, 1050);
|
|
140
|
+
background-color: var(--kd-g-color-background, #fff);
|
|
141
|
+
border-radius: var(--kd-g-radius-border, 2px);
|
|
142
|
+
min-width: var(--kd-c-dropdown-menu-sizing-min-width, 136px);
|
|
143
|
+
max-width: var(--kd-c-dropdown-menu-sizing-max-width, 320px);
|
|
135
144
|
-webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
136
145
|
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
137
146
|
}
|
|
@@ -157,26 +166,26 @@
|
|
|
157
166
|
bottom: 0;
|
|
158
167
|
left: 0;
|
|
159
168
|
content: '';
|
|
160
|
-
background: #fff;
|
|
161
|
-
border-radius: 2px;
|
|
169
|
+
background: var(--kd-g-color-background, #fff);
|
|
170
|
+
border-radius: var(--kd-g-radius-border, 2px);
|
|
162
171
|
}
|
|
163
172
|
.kd-dropdown.arrow.bottomLeft::before,
|
|
164
173
|
.kd-dropdown.arrow.bottom::before,
|
|
165
174
|
.kd-dropdown.arrow.bottomRight::before {
|
|
166
175
|
left: var(--arrowLeft);
|
|
167
176
|
top: var(--arrowSpill);
|
|
168
|
-
-webkit-box-shadow: -2px -2px
|
|
169
|
-
box-shadow: -2px -2px
|
|
170
|
-
border-color: #fff transparent transparent #fff;
|
|
177
|
+
-webkit-box-shadow: -2px -2px calc(10px - 1px) rgba(0, 0, 0, 0.1);
|
|
178
|
+
box-shadow: -2px -2px calc(10px - 1px) rgba(0, 0, 0, 0.1);
|
|
179
|
+
border-color: var(--kd-g-color-white, #fff) transparent transparent var(--kd-g-color-white, #fff);
|
|
171
180
|
}
|
|
172
181
|
.kd-dropdown.arrow.topLeft::before,
|
|
173
182
|
.kd-dropdown.arrow.top::before,
|
|
174
183
|
.kd-dropdown.arrow.topRight::before {
|
|
175
184
|
left: var(--arrowLeft);
|
|
176
185
|
bottom: var(--arrowSpill);
|
|
177
|
-
-webkit-box-shadow: 3px 3px
|
|
178
|
-
box-shadow: 3px 3px
|
|
179
|
-
border-color: transparent #fff #fff transparent;
|
|
186
|
+
-webkit-box-shadow: 3px 3px calc(10px + 1px) rgba(0, 0, 0, 0.15);
|
|
187
|
+
box-shadow: 3px 3px calc(10px + 1px) rgba(0, 0, 0, 0.15);
|
|
188
|
+
border-color: transparent var(--kd-g-color-white, #fff) var(--kd-g-color-white, #fff) transparent;
|
|
180
189
|
}
|
|
181
190
|
.kd-dropdown.arrow.leftTop::before,
|
|
182
191
|
.kd-dropdown.arrow.left::before,
|
|
@@ -185,7 +194,7 @@
|
|
|
185
194
|
right: var(--arrowSpill);
|
|
186
195
|
-webkit-box-shadow: 3px 0 10px rgba(0, 0, 0, 0.12), 0 -2px 10px rgba(204, 149, 149, 0.12);
|
|
187
196
|
box-shadow: 3px 0 10px rgba(0, 0, 0, 0.12), 0 -2px 10px rgba(204, 149, 149, 0.12);
|
|
188
|
-
border-color: #fff #fff transparent transparent;
|
|
197
|
+
border-color: var(--kd-g-color-white, #fff) var(--kd-g-color-white, #fff) transparent transparent;
|
|
189
198
|
}
|
|
190
199
|
.kd-dropdown.arrow.rightTop::before,
|
|
191
200
|
.kd-dropdown.arrow.right::before,
|
|
@@ -194,73 +203,73 @@
|
|
|
194
203
|
left: var(--arrowSpill);
|
|
195
204
|
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), -2px 0 10px rgba(0, 0, 0, 0.1);
|
|
196
205
|
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), -2px 0 10px rgba(0, 0, 0, 0.1);
|
|
197
|
-
border-color: transparent transparent #fff #fff;
|
|
206
|
+
border-color: transparent transparent var(--kd-g-color-white, #fff) var(--kd-g-color-white, #fff);
|
|
198
207
|
}
|
|
199
208
|
.kd-dropdown-menu {
|
|
200
|
-
max-height: 336px;
|
|
201
|
-
padding: 8px 0;
|
|
209
|
+
max-height: var(--kd-c-dropdown-menu-sizing-max-height, 336px);
|
|
210
|
+
padding: var(--kd-c-dropdown-menu-spacing-padding-vertical, 8px) 0;
|
|
202
211
|
overflow-y: auto;
|
|
203
212
|
}
|
|
204
213
|
.kd-dropdown-menu-item {
|
|
205
214
|
position: relative;
|
|
206
|
-
padding: 7px 12px;
|
|
207
|
-
color: #212121;
|
|
208
|
-
font-size: 12px;
|
|
215
|
+
padding: var(--kd-c-dropdown-item-spacing-padding-vertical, 7px) var(--kd-c-dropdown-item-spacing-padding-horizontal, 12px);
|
|
216
|
+
color: var(--kd-c-dropdown-menu-item-color-text, var(--kd-g-color-text-primary, #212121));
|
|
217
|
+
font-size: var(--kd-c-dropdown-font-size, var(--kd-g-font-size-small, 12px));
|
|
209
218
|
line-height: 18px;
|
|
210
219
|
overflow: hidden;
|
|
211
220
|
cursor: pointer;
|
|
212
|
-
-webkit-transition: background-color 0.3s;
|
|
213
|
-
transition: background-color 0.3s;
|
|
221
|
+
-webkit-transition: background-color var(--kd-g-duration, 0.3s);
|
|
222
|
+
transition: background-color var(--kd-g-duration, 0.3s);
|
|
214
223
|
}
|
|
215
224
|
.kd-dropdown-menu-item.disabled,
|
|
216
225
|
.kd-dropdown-menu-item.disabled > a {
|
|
217
|
-
color: #b2b2b2;
|
|
226
|
+
color: var(--kd-c-dropdown-item-color-text-disabled, var(--kd-g-color-disabled, #b2b2b2));
|
|
218
227
|
cursor: not-allowed;
|
|
219
228
|
}
|
|
220
229
|
.kd-dropdown-menu-item:not(.disabled):hover {
|
|
221
|
-
background-color: #f5f5f5;
|
|
230
|
+
background-color: var(--kd-c-dropdown-item-color-background-hover, var(--kd-g-color-hover, #f5f5f5));
|
|
222
231
|
}
|
|
223
232
|
.kd-dropdown-menu-item:not(.disabled):active,
|
|
224
233
|
.kd-dropdown-menu-item:not(.disabled).selected {
|
|
225
|
-
color: #5582f3;
|
|
226
|
-
background-color: #f2f8ff;
|
|
234
|
+
color: var(--kd-g-color-theme, #5582f3);
|
|
235
|
+
background-color: var(--kd-c-dropdown-item-color-background-active, var(--kd-g-color-theme-1, #f2f8ff));
|
|
227
236
|
}
|
|
228
237
|
.kd-dropdown-menu-item:not(.disabled):active > a,
|
|
229
238
|
.kd-dropdown-menu-item:not(.disabled).selected > a {
|
|
230
|
-
color: #5582f3;
|
|
239
|
+
color: var(--kd-g-color-theme, #5582f3);
|
|
231
240
|
}
|
|
232
241
|
.kd-dropdown-menu-item.divided::before {
|
|
233
242
|
content: '';
|
|
234
243
|
position: absolute;
|
|
235
244
|
top: 0;
|
|
236
|
-
left: 12px;
|
|
237
|
-
right: 12px;
|
|
238
|
-
height: 1px;
|
|
239
|
-
background-color: #e5e5e5;
|
|
245
|
+
left: var(--kd-c-dropdown-item-spacing-padding-horizontal, 12px);
|
|
246
|
+
right: var(--kd-c-dropdown-item-spacing-padding-horizontal, 12px);
|
|
247
|
+
height: var(--kd-c-dropdown-divided-sizing-height, 1px);
|
|
248
|
+
background-color: var(--kd-c-dropdown-divided-color-background, var(--kd-g-color-border-weak, #e5e5e5));
|
|
240
249
|
}
|
|
241
250
|
.kd-dropdown-menu-item.danger,
|
|
242
251
|
.kd-dropdown-menu-item.danger > a {
|
|
243
|
-
color: #fb2323;
|
|
244
|
-
-webkit-transition: color 0.3s, background-color 0.3s;
|
|
245
|
-
transition: color 0.3s, background-color 0.3s;
|
|
252
|
+
color: var(--kd-c-dropdown-item-color-text-danger, var(--kd-g-color-error, #fb2323));
|
|
253
|
+
-webkit-transition: color var(--kd-g-duration, 0.3s), background-color var(--kd-g-duration, 0.3s);
|
|
254
|
+
transition: color var(--kd-g-duration, 0.3s), background-color var(--kd-g-duration, 0.3s);
|
|
246
255
|
}
|
|
247
256
|
.kd-dropdown-menu-item.danger:hover,
|
|
248
257
|
.kd-dropdown-menu-item.danger > a:hover {
|
|
249
|
-
color: #fff;
|
|
250
|
-
background-color: #fb2323;
|
|
258
|
+
color: var(--kd-g-color-white, #fff);
|
|
259
|
+
background-color: var(--kd-c-dropdown-item-color-background-danger-hover, var(--kd-g-color-error, #fb2323));
|
|
251
260
|
}
|
|
252
261
|
.kd-dropdown-menu-item > a {
|
|
253
262
|
display: block;
|
|
254
|
-
margin: -7px -12px;
|
|
255
|
-
padding: 7px 12px;
|
|
256
|
-
color: #212121;
|
|
257
|
-
font-size: 12px;
|
|
263
|
+
margin: calc(-1 * var(--kd-c-dropdown-item-spacing-padding-vertical, 7px)) calc(-1 * var(--kd-c-dropdown-item-spacing-padding-horizontal, 12px));
|
|
264
|
+
padding: var(--kd-c-dropdown-item-spacing-padding-vertical, 7px) var(--kd-c-dropdown-item-spacing-padding-horizontal, 12px);
|
|
265
|
+
color: var(--kd-c-dropdown-menu-item-color-text, var(--kd-g-color-text-primary, #212121));
|
|
266
|
+
font-size: var(--kd-c-dropdown-font-size, var(--kd-g-font-size-small, 12px));
|
|
258
267
|
line-height: 18px;
|
|
259
|
-
-webkit-transition: color 0.3s;
|
|
260
|
-
transition: color 0.3s;
|
|
268
|
+
-webkit-transition: color var(--kd-g-duration, 0.3s);
|
|
269
|
+
transition: color var(--kd-g-duration, 0.3s);
|
|
261
270
|
}
|
|
262
271
|
.kd-dropdown-menu-item > a:hover {
|
|
263
|
-
color: #212121;
|
|
272
|
+
color: var(--kd-c-dropdown-menu-item-color-text, var(--kd-g-color-text-primary, #212121));
|
|
264
273
|
}
|
|
265
274
|
.kd-dropdown-menu-item span {
|
|
266
275
|
overflow: hidden;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
@import '../../style/themes/index';
|
|
2
2
|
@import '../../style/mixins/index';
|
|
3
|
+
@import './token.less';
|
|
3
4
|
|
|
4
5
|
@dropdown-prefix-cls: ~'@{kd-prefix}-dropdown';
|
|
5
6
|
@dropdown-trigger-prefix-cls: ~'@{dropdown-prefix-cls}-trigger';
|
|
6
7
|
@dropdown-link-prefix-cls: ~'@{dropdown-prefix-cls}-link';
|
|
7
8
|
|
|
9
|
+
@dropdown-line-height: 18px;
|
|
10
|
+
|
|
8
11
|
.@{dropdown-link-prefix-cls} {
|
|
9
|
-
color: @theme
|
|
12
|
+
color: @color-theme;
|
|
10
13
|
text-decoration: none;
|
|
11
14
|
background-color: transparent;
|
|
12
15
|
outline: noned;
|
|
13
16
|
cursor: pointer;
|
|
14
|
-
transition: color @
|
|
17
|
+
transition: color @duration-promptly, background-color @duration-promptly;
|
|
15
18
|
-webkit-text-decoration-skip: objects;
|
|
16
19
|
|
|
17
20
|
&.disabled,
|
|
18
21
|
&.disabled:hover {
|
|
19
22
|
cursor: default;
|
|
20
|
-
color: @disabled
|
|
23
|
+
color: @color-disabled;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
&:hover {
|
|
24
|
-
color: @theme-
|
|
27
|
+
color: @color-theme-hover;
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
|
|
@@ -33,12 +36,12 @@
|
|
|
33
36
|
.reset-component;
|
|
34
37
|
opacity: 1;
|
|
35
38
|
visibility: visible;
|
|
36
|
-
z-index: @
|
|
37
|
-
background-color: @
|
|
38
|
-
border-radius: @radius-
|
|
39
|
+
z-index: @z-index-popper;
|
|
40
|
+
background-color: @color-background;
|
|
41
|
+
border-radius: @radius-border;
|
|
39
42
|
min-width: @dropdown-menu-min-width;
|
|
40
43
|
max-width: @dropdown-menu-max-width;
|
|
41
|
-
box-shadow: 0 4px
|
|
44
|
+
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
42
45
|
|
|
43
46
|
&.hidden {
|
|
44
47
|
opacity: 0;
|
|
@@ -46,11 +49,11 @@
|
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
// 箭头样式
|
|
49
|
-
.popperArrow(@
|
|
52
|
+
.popperArrow(@color-background, @dropdown-item-horizontal-gap, @dropdown-box-shadow-blur);
|
|
50
53
|
|
|
51
54
|
&-menu {
|
|
52
55
|
max-height: @dropdown-menu-max-height;
|
|
53
|
-
padding: @dropdown-menu-
|
|
56
|
+
padding: @dropdown-menu-padding-vertical 0;
|
|
54
57
|
overflow-y: auto;
|
|
55
58
|
&-item {
|
|
56
59
|
position: relative;
|
|
@@ -63,21 +66,21 @@
|
|
|
63
66
|
|
|
64
67
|
&.disabled,
|
|
65
68
|
&.disabled > a {
|
|
66
|
-
color: @
|
|
69
|
+
color: @dropdown-item-color-disabled;
|
|
67
70
|
cursor: not-allowed;
|
|
68
71
|
}
|
|
69
|
-
transition: background-color @
|
|
72
|
+
transition: background-color @duration-promptly;
|
|
70
73
|
&:not(.disabled):hover {
|
|
71
|
-
background-color: @dropdown-hover-bg-color;
|
|
74
|
+
background-color: @dropdown-item-hover-bg-color;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
&:not(.disabled):active,
|
|
75
78
|
&:not(.disabled).selected {
|
|
76
|
-
color: @theme
|
|
77
|
-
background-color: @dropdown-active-bg-color;
|
|
79
|
+
color: @color-theme;
|
|
80
|
+
background-color: @dropdown-item-active-bg-color;
|
|
78
81
|
|
|
79
82
|
> a {
|
|
80
|
-
color: @theme
|
|
83
|
+
color: @color-theme;
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
|
|
@@ -87,29 +90,29 @@
|
|
|
87
90
|
top: 0;
|
|
88
91
|
left: @dropdown-item-horizontal-gap;
|
|
89
92
|
right: @dropdown-item-horizontal-gap;
|
|
90
|
-
height:
|
|
91
|
-
background-color: @dropdown-divided-color;
|
|
93
|
+
height: @dropdown-divided-height;
|
|
94
|
+
background-color: @dropdown-divided-color-bg;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
&.danger,
|
|
95
98
|
&.danger > a {
|
|
96
|
-
color: @
|
|
99
|
+
color: @dropdown-item-color-text-danger;
|
|
97
100
|
|
|
98
|
-
transition: color @
|
|
101
|
+
transition: color @duration-promptly, background-color @duration-promptly;
|
|
99
102
|
&:hover {
|
|
100
|
-
color: @white;
|
|
101
|
-
background-color: @
|
|
103
|
+
color: @color-white;
|
|
104
|
+
background-color: @dropdown-item-color-background-danger-hover;
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
> a {
|
|
106
109
|
display: block;
|
|
107
|
-
margin: -1 * @dropdown-item-vertical-gap -1 * @dropdown-item-horizontal-gap;
|
|
110
|
+
margin: calc(-1 * @dropdown-item-vertical-gap) calc(-1 * @dropdown-item-horizontal-gap);
|
|
108
111
|
padding: @dropdown-item-vertical-gap @dropdown-item-horizontal-gap;
|
|
109
112
|
color: @dropdown-color;
|
|
110
113
|
font-size: @dropdown-font-size;
|
|
111
114
|
line-height: @dropdown-line-height;
|
|
112
|
-
transition: color @
|
|
115
|
+
transition: color @duration-promptly;
|
|
113
116
|
|
|
114
117
|
&:hover {
|
|
115
118
|
color: @dropdown-color;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
2
|
+
|
|
3
|
+
@dropdown-custom-prefix: ~'--@{kd-prefix}-c-dropdown';
|
|
4
|
+
|
|
5
|
+
// color
|
|
6
|
+
@dropdown-item-hover-bg-color: var(~'@{dropdown-custom-prefix}-item-color-background-hover', @color-hover);
|
|
7
|
+
@dropdown-item-active-bg-color: var(~'@{dropdown-custom-prefix}-item-color-background-active', @color-theme-light-active);
|
|
8
|
+
@dropdown-item-color-disabled: var(~'@{dropdown-custom-prefix}-item-color-text-disabled', @color-disabled);
|
|
9
|
+
@dropdown-item-color-text-danger: var(~'@{dropdown-custom-prefix}-item-color-text-danger', @color-error);
|
|
10
|
+
@dropdown-item-color-background-danger-hover: var(~'@{dropdown-custom-prefix}-item-color-background-danger-hover', @color-error);
|
|
11
|
+
@dropdown-divided-color-bg: var(~'@{dropdown-custom-prefix}-divided-color-background', @color-border-weak);
|
|
12
|
+
@dropdown-color: var(~'@{dropdown-custom-prefix}-menu-item-color-text', @color-text-primary);
|
|
13
|
+
|
|
14
|
+
// sizing
|
|
15
|
+
@dropdown-menu-min-width: var(~'@{dropdown-custom-prefix}-menu-sizing-min-width', 136px);
|
|
16
|
+
@dropdown-menu-max-width: var(~'@{dropdown-custom-prefix}-menu-sizing-max-width', 320px);
|
|
17
|
+
@dropdown-menu-max-height: var(~'@{dropdown-custom-prefix}-menu-sizing-max-height', 336px);
|
|
18
|
+
@dropdown-divided-height: var(~'@{dropdown-custom-prefix}-divided-sizing-height', 1px);
|
|
19
|
+
|
|
20
|
+
// spacing
|
|
21
|
+
@dropdown-menu-padding-vertical: var(~'@{dropdown-custom-prefix}-menu-spacing-padding-vertical', 8px);
|
|
22
|
+
@dropdown-item-vertical-gap: var(~'@{dropdown-custom-prefix}-item-spacing-padding-vertical', 7px);
|
|
23
|
+
@dropdown-item-horizontal-gap: var(~'@{dropdown-custom-prefix}-item-spacing-padding-horizontal', 12px);
|
|
24
|
+
|
|
25
|
+
// font
|
|
26
|
+
@dropdown-font-size: var(~'@{dropdown-custom-prefix}-font-size', @font-size-small);
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
6
|
+
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
8
|
+
|
|
9
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.default = void 0;
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _ConfigContext = _interopRequireDefault(require("../config-provider/ConfigContext"));
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function DefaultEmptyImg() {
|
|
25
|
+
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
26
|
+
getPrefixCls = _useContext.getPrefixCls,
|
|
27
|
+
prefixCls = _useContext.prefixCls;
|
|
28
|
+
|
|
29
|
+
var emptyPrefixCls = getPrefixCls(prefixCls, 'empty');
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
31
|
+
className: "".concat(emptyPrefixCls, "-image"),
|
|
32
|
+
width: "168px",
|
|
33
|
+
height: "96px",
|
|
34
|
+
viewBox: "0 0 168 96",
|
|
35
|
+
version: "1.1",
|
|
36
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement("title", null, "\u7F16\u7EC4"), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
38
|
+
x1: "50%",
|
|
39
|
+
y1: "0%",
|
|
40
|
+
x2: "50%",
|
|
41
|
+
y2: "100%",
|
|
42
|
+
id: "linearGradient-1"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
44
|
+
stopColor: "#D6DCE7",
|
|
45
|
+
offset: "0%"
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement("stop", {
|
|
47
|
+
stopColor: "#D6DCE7",
|
|
48
|
+
stopOpacity: "0",
|
|
49
|
+
offset: "100%"
|
|
50
|
+
}))), /*#__PURE__*/_react.default.createElement("g", {
|
|
51
|
+
id: "\u9875\u9762-1",
|
|
52
|
+
stroke: "none",
|
|
53
|
+
strokeWidth: "1",
|
|
54
|
+
fill: "none",
|
|
55
|
+
fillRule: "evenodd"
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
57
|
+
id: "\u7F16\u7EC4"
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
59
|
+
transform: "translate(36.000000, 0.000000)",
|
|
60
|
+
id: "\u7F16\u7EC4"
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
62
|
+
d: "M63,9 L63,24 L78,24 L78,84 C78,85.6568542 76.6568542,87 75,87 L21,87 C19.3431458,87 18,85.6568542 18,84 L18,12 C18,10.3431458 19.3431458,9 21,9 L63,9 Z",
|
|
63
|
+
id: "\u8DEF\u5F84",
|
|
64
|
+
fill: "#E2E8F3"
|
|
65
|
+
}), /*#__PURE__*/_react.default.createElement("rect", {
|
|
66
|
+
id: "\u77E9\u5F62",
|
|
67
|
+
fill: "#CAD0DB",
|
|
68
|
+
x: "24",
|
|
69
|
+
y: "24",
|
|
70
|
+
width: "9",
|
|
71
|
+
height: "9"
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement("polygon", {
|
|
73
|
+
id: "\u77E9\u5F62",
|
|
74
|
+
fill: "#EEF4FF",
|
|
75
|
+
points: "63 9 78 24 63 24"
|
|
76
|
+
}), /*#__PURE__*/_react.default.createElement("rect", {
|
|
77
|
+
id: "\u77E9\u5F62",
|
|
78
|
+
fill: "#CAD0DB",
|
|
79
|
+
x: "24",
|
|
80
|
+
y: "39",
|
|
81
|
+
width: "48",
|
|
82
|
+
height: "6"
|
|
83
|
+
}), /*#__PURE__*/_react.default.createElement("rect", {
|
|
84
|
+
id: "\u77E9\u5F62",
|
|
85
|
+
fill: "#CAD0DB",
|
|
86
|
+
x: "24",
|
|
87
|
+
y: "51",
|
|
88
|
+
width: "24",
|
|
89
|
+
height: "6"
|
|
90
|
+
})), /*#__PURE__*/_react.default.createElement("g", {
|
|
91
|
+
transform: "translate(108.000000, 40.000000)",
|
|
92
|
+
fill: "url(#linearGradient-1)",
|
|
93
|
+
id: "\u80CC\u666F/\u4E91",
|
|
94
|
+
opacity: "0.300000012"
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
96
|
+
id: "\u5F62\u72B6\u7ED3\u5408"
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
98
|
+
d: "M3,39 L3,24 C3,15.7157288 9.71572875,9 18,9 C25.4616776,9 31.6508469,14.4482558 32.8063948,21.5836543 C33.797875,21.2064779 34.8748247,21 36,21 C40.9705627,21 45,25.0294373 45,30 L45,39 L3,39 Z"
|
|
99
|
+
}))), /*#__PURE__*/_react.default.createElement("g", {
|
|
100
|
+
transform: "translate(12.000000, 32.000000)",
|
|
101
|
+
fill: "url(#linearGradient-1)",
|
|
102
|
+
id: "\u80CC\u666F/\u4E91",
|
|
103
|
+
opacity: "0.300000012"
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
105
|
+
transform: "translate(24.000000, 24.000000) scale(-1, 1) translate(-24.000000, -24.000000) ",
|
|
106
|
+
id: "\u5F62\u72B6\u7ED3\u5408"
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
108
|
+
d: "M3,39 L3,24 C3,15.7157288 9.71572875,9 18,9 C25.4616776,9 31.6508469,14.4482558 32.8063948,21.5836543 C33.797875,21.2064779 34.8748247,21 36,21 C40.9705627,21 45,25.0294373 45,30 L45,39 L3,39 Z"
|
|
109
|
+
}))))));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
var _default = DefaultEmptyImg;
|
|
113
|
+
exports.default = _default;
|
package/lib/empty/empty.d.ts
CHANGED
|
@@ -6,5 +6,9 @@ export interface IEmptyProps {
|
|
|
6
6
|
imageStyle?: React.CSSProperties;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface IEmptyType extends React.ForwardRefExoticComponent<IEmptyProps & React.RefAttributes<any>> {
|
|
10
|
+
DEFAULT_IMG?: React.ReactNode;
|
|
11
|
+
ILLUSTRATION_IMG?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const Empty: IEmptyType;
|
|
10
14
|
export default Empty;
|
package/lib/empty/empty.js
CHANGED
|
@@ -25,7 +25,9 @@ var _ConfigContext = _interopRequireDefault(require("../config-provider/ConfigCo
|
|
|
25
25
|
|
|
26
26
|
var _utils = require("../_utils");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _defaultEmptyImg = _interopRequireDefault(require("./defaultEmptyImg"));
|
|
29
|
+
|
|
30
|
+
var _illustrationEmptyImg = _interopRequireDefault(require("./illustrationEmptyImg"));
|
|
29
31
|
|
|
30
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
33
|
|
|
@@ -44,6 +46,10 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
44
46
|
return t;
|
|
45
47
|
};
|
|
46
48
|
|
|
49
|
+
var defaultEmptyImg = /*#__PURE__*/_react.default.createElement(_defaultEmptyImg.default, null);
|
|
50
|
+
|
|
51
|
+
var illustrationEmptyImg = /*#__PURE__*/_react.default.createElement(_illustrationEmptyImg.default, null);
|
|
52
|
+
|
|
47
53
|
var InteranalEmpty = function InteranalEmpty(props, ref) {
|
|
48
54
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
49
55
|
getPrefixCls = _useContext.getPrefixCls,
|
|
@@ -55,7 +61,8 @@ var InteranalEmpty = function InteranalEmpty(props, ref) {
|
|
|
55
61
|
|
|
56
62
|
var className = emptyProps.className,
|
|
57
63
|
description = emptyProps.description,
|
|
58
|
-
image = emptyProps.image,
|
|
64
|
+
_emptyProps$image = emptyProps.image,
|
|
65
|
+
image = _emptyProps$image === void 0 ? defaultEmptyImg : _emptyProps$image,
|
|
59
66
|
imageStyle = emptyProps.imageStyle,
|
|
60
67
|
style = emptyProps.style,
|
|
61
68
|
customPrefixcls = emptyProps.prefixCls,
|
|
@@ -70,17 +77,12 @@ var InteranalEmpty = function InteranalEmpty(props, ref) {
|
|
|
70
77
|
var thisEmptyRef = (0, _react.useRef)();
|
|
71
78
|
var emptyRef = ref || thisEmptyRef;
|
|
72
79
|
var imgClasses = (0, _classnames.default)("".concat(emptyPrefixCls, "-image"));
|
|
73
|
-
var imgNode = image ===
|
|
74
|
-
src: _transferEmpty.default,
|
|
75
|
-
className: imgClasses,
|
|
76
|
-
style: imageStyle,
|
|
77
|
-
alt: "empty"
|
|
78
|
-
}) : image ? /*#__PURE__*/_react.default.createElement("img", {
|
|
80
|
+
var imgNode = typeof image === 'string' ? /*#__PURE__*/_react.default.createElement("img", {
|
|
79
81
|
src: image,
|
|
80
82
|
className: imgClasses,
|
|
81
83
|
style: imageStyle,
|
|
82
84
|
alt: "empty"
|
|
83
|
-
}) :
|
|
85
|
+
}) : image;
|
|
84
86
|
var descriptionNode = description === undefined ? /*#__PURE__*/_react.default.createElement("div", {
|
|
85
87
|
className: "".concat(emptyPrefixCls, "-description")
|
|
86
88
|
}, emptyLangMsg.emptyText) : description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -100,5 +102,7 @@ var InteranalEmpty = function InteranalEmpty(props, ref) {
|
|
|
100
102
|
var Empty = /*#__PURE__*/_react.default.forwardRef(InteranalEmpty);
|
|
101
103
|
|
|
102
104
|
Empty.displayName = 'Empty';
|
|
105
|
+
Empty.DEFAULT_IMG = defaultEmptyImg;
|
|
106
|
+
Empty.ILLUSTRATION_IMG = illustrationEmptyImg;
|
|
103
107
|
var _default = Empty;
|
|
104
108
|
exports.default = _default;
|