@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/link/link.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
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 = exports.LinkSizes = void 0;
|
|
15
|
+
|
|
16
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
17
|
+
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
19
|
+
|
|
20
|
+
var _getOwnPropertySymbols = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"));
|
|
21
|
+
|
|
22
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
23
|
+
|
|
24
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
25
|
+
|
|
26
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
27
|
+
|
|
28
|
+
var _ConfigContext = _interopRequireDefault(require("../config-provider/ConfigContext"));
|
|
29
|
+
|
|
30
|
+
var _utils = require("../_utils");
|
|
31
|
+
|
|
32
|
+
var _type = require("../_utils/type");
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
39
|
+
var t = {};
|
|
40
|
+
|
|
41
|
+
for (var p in s) {
|
|
42
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (s != null && typeof _getOwnPropertySymbols.default === "function") for (var i = 0, p = (0, _getOwnPropertySymbols.default)(s); i < p.length; i++) {
|
|
46
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
47
|
+
}
|
|
48
|
+
return t;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var LinkSizes = (0, _type.tuple)('large', 'middle', 'small');
|
|
52
|
+
exports.LinkSizes = LinkSizes;
|
|
53
|
+
|
|
54
|
+
var InternalLink = function InternalLink(props, ref) {
|
|
55
|
+
var _context, _classNames, _classNames2;
|
|
56
|
+
|
|
57
|
+
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
58
|
+
getPrefixCls = _useContext.getPrefixCls,
|
|
59
|
+
prefixCls = _useContext.prefixCls,
|
|
60
|
+
userDefaultProps = _useContext.compDefaultProps;
|
|
61
|
+
|
|
62
|
+
var linkProps = (0, _utils.getCompProps)('Link', userDefaultProps, props);
|
|
63
|
+
|
|
64
|
+
var size = linkProps.size,
|
|
65
|
+
style = linkProps.style,
|
|
66
|
+
className = linkProps.className,
|
|
67
|
+
target = linkProps.target,
|
|
68
|
+
href = linkProps.href,
|
|
69
|
+
underscore = linkProps.underscore,
|
|
70
|
+
children = linkProps.children,
|
|
71
|
+
prefix = linkProps.prefix,
|
|
72
|
+
suffix = linkProps.suffix,
|
|
73
|
+
disabled = linkProps.disabled,
|
|
74
|
+
onClick = linkProps.onClick,
|
|
75
|
+
customPrefixcls = linkProps.prefixCls,
|
|
76
|
+
others = __rest(linkProps // ref
|
|
77
|
+
, ["size", "style", "className", "target", "href", "underscore", "children", "prefix", "suffix", "disabled", "onClick", "prefixCls"]); // ref
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
var linkRef = ref || /*#__PURE__*/_react.default.createRef();
|
|
81
|
+
|
|
82
|
+
var linkPrefixCls = getPrefixCls(prefixCls, 'link', customPrefixcls); // 按钮样式前缀
|
|
83
|
+
|
|
84
|
+
var wrapperClasses = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(linkPrefixCls), true), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(linkPrefixCls, "-size-")).call(_context, size), size), _classNames));
|
|
85
|
+
var linkClasses = (0, _classnames.default)(className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(linkPrefixCls, "-text"), true), (0, _defineProperty2.default)(_classNames2, "".concat(linkPrefixCls, "-underscore"), underscore), (0, _defineProperty2.default)(_classNames2, "".concat(linkPrefixCls, "-disabled"), disabled), _classNames2));
|
|
86
|
+
|
|
87
|
+
var handleClick = function handleClick(e) {
|
|
88
|
+
// 禁用状态 不跳转
|
|
89
|
+
disabled && e.preventDefault();
|
|
90
|
+
onClick && (onClick === null || onClick === void 0 ? void 0 : onClick(e));
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var prefixNode = (0, _react.useMemo)(function () {
|
|
94
|
+
return prefix ? /*#__PURE__*/_react.default.createElement("span", {
|
|
95
|
+
className: "".concat(linkPrefixCls, "-prefix")
|
|
96
|
+
}, prefix) : null;
|
|
97
|
+
}, [prefix, linkPrefixCls]);
|
|
98
|
+
var suffixNode = (0, _react.useMemo)(function () {
|
|
99
|
+
return suffix ? /*#__PURE__*/_react.default.createElement("span", {
|
|
100
|
+
className: "".concat(linkPrefixCls, "-suffix")
|
|
101
|
+
}, suffix) : null;
|
|
102
|
+
}, [suffix, linkPrefixCls]);
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
+
style: style,
|
|
105
|
+
className: wrapperClasses
|
|
106
|
+
}, prefixNode, /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({
|
|
107
|
+
ref: linkRef,
|
|
108
|
+
target: target,
|
|
109
|
+
disabled: disabled,
|
|
110
|
+
href: href,
|
|
111
|
+
className: linkClasses,
|
|
112
|
+
onClick: handleClick
|
|
113
|
+
}, others), children), suffixNode);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var Link = /*#__PURE__*/_react.default.forwardRef(InternalLink);
|
|
117
|
+
|
|
118
|
+
Link.displayName = 'Link';
|
|
119
|
+
var _default = Link;
|
|
120
|
+
exports.default = _default;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* ----------- color ——————---- start */
|
|
2
|
+
/* ----------- color ——————---- end */
|
|
3
|
+
/* ----------- motion ——————---- start */
|
|
4
|
+
/* ----------- motion ——————---- end */
|
|
5
|
+
/* ----------- transition ——————---- start */
|
|
6
|
+
/* ----------- transition ——————---- end */
|
|
7
|
+
/* ----------- font ——————---- start */
|
|
8
|
+
/* ----------- font ——————---- end */
|
|
9
|
+
/* ----------- zIndex ——————---- start */
|
|
10
|
+
/*
|
|
11
|
+
普通组件内部自身层级应设置在0-100间
|
|
12
|
+
*/
|
|
13
|
+
/* ----------- zIndex ——————---- end */
|
|
14
|
+
/* ----------- Button ——————---- start */
|
|
15
|
+
/* ----------- Button ——————---- end */
|
|
16
|
+
/* ----------- Collapse ——————---- start */
|
|
17
|
+
/* ----------- Collapse ——————---- end */
|
|
18
|
+
/* ----------- Card ——————---- start */
|
|
19
|
+
/* ----------- Card ——————---- end */
|
|
20
|
+
/* ----------- Carousel ——————---- start */
|
|
21
|
+
/* ----------- Carousel ——————---- end */
|
|
22
|
+
/* ----------- Cascader ——————---- start */
|
|
23
|
+
/* ----------- Cascader ——————---- end */
|
|
24
|
+
/* ----------- Switch ——————---- start */
|
|
25
|
+
/* ----------- Switch ——————---- end */
|
|
26
|
+
/* ----------- Input ——————---- start */
|
|
27
|
+
/* ----------- Input ——————---- end */
|
|
28
|
+
/* ----------- InputNumber ——————---- start */
|
|
29
|
+
/* ----------- InputNumber ——————---- end */
|
|
30
|
+
/* ----------- checkbox ——————---- start */
|
|
31
|
+
/* ----------- checkbox ——————---- start */
|
|
32
|
+
/* ----------- checkbox ——————---- end */
|
|
33
|
+
/* ----------- Radio ——————---- start */
|
|
34
|
+
/* ----------- Radio ——————---- end */
|
|
35
|
+
/* ----------- icon ——————---- start */
|
|
36
|
+
/* ----------- icon ——————---- end */
|
|
37
|
+
/* ----------- Popconfirm ——————---- start */
|
|
38
|
+
/* ----------- Popconfirm ——————---- end */
|
|
39
|
+
/* ----------- Progress ——————---- start */
|
|
40
|
+
/* ----------- Progress ——————---- end */
|
|
41
|
+
/* ----------- Pagination ——————---- start */
|
|
42
|
+
/* ----------- Pagination ——————---- end */
|
|
43
|
+
/* ----------- Timeline ——————---- start */
|
|
44
|
+
/* ----------- Timeline ——————---- end */
|
|
45
|
+
/* ----------- Tabs ——————---- start */
|
|
46
|
+
/* ----------- Tabs ——————---- end */
|
|
47
|
+
/* ----------- Select ——————---- start */
|
|
48
|
+
/* ----------- Select ——————---- end */
|
|
49
|
+
/* ----------- Rate ——————---- start */
|
|
50
|
+
/* ----------- Rate ——————---- end */
|
|
51
|
+
/* ----------- Dropdown ——————---- start */
|
|
52
|
+
/* ----------- Dropdown ——————---- end */
|
|
53
|
+
/* ----------- Tooltip ——————---- start */
|
|
54
|
+
/* ----------- Tooltip ——————---- end */
|
|
55
|
+
/* ----------- Transfer ——————---- start */
|
|
56
|
+
/* ----------- Transfer ——————---- end */
|
|
57
|
+
/* ----------- DatePicker ——————---- start */
|
|
58
|
+
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- Tree ——————---- start */
|
|
60
|
+
/* ----------- Tree ——————---- end */
|
|
61
|
+
/* ----------- Alert ——————---- start */
|
|
62
|
+
/* ----------- Alert ——————---- end */
|
|
63
|
+
/* ----------- Split-Panel ——————---- start */
|
|
64
|
+
/* ----------- Split-Panel ——————---- end */
|
|
65
|
+
/* ----------- Modal ——————---- start */
|
|
66
|
+
/* ----------- Modal ——————---- end */
|
|
67
|
+
/* ----------- Steps ——————---- start */
|
|
68
|
+
/* ----------- Steps ——————---- end */
|
|
69
|
+
/* ----------- Form ——————---- start */
|
|
70
|
+
/* ----------- Form ——————---- end */
|
|
71
|
+
/* ----------- Tag ——————---- start */
|
|
72
|
+
/* ----------- Tag ——————---- end */
|
|
73
|
+
/* ----------- Menu ——————---- start */
|
|
74
|
+
/* ----------- Menu ——————---- end */
|
|
75
|
+
/* ----------- notice ——————---- start */
|
|
76
|
+
/* ----------- message ——————---- end */
|
|
77
|
+
/* ----------- Spin ——————---- start */
|
|
78
|
+
/* ----------- Spin ——————---- end */
|
|
79
|
+
/* ----------- Spin ——————---- start */
|
|
80
|
+
/* ----------- Spin ——————---- end */
|
|
81
|
+
/* ----------- Layout ——————---- start */
|
|
82
|
+
/* ----------- Layout ——————---- end */
|
|
83
|
+
/* ----------- Typography ——————---- start */
|
|
84
|
+
/* ----------- Typography ——————---- start */
|
|
85
|
+
/* ----------- Search ——————---- start */
|
|
86
|
+
/* ----------- Search ——————---- start */
|
|
87
|
+
/* ----------- Badge ——————---- start */
|
|
88
|
+
/* ----------- Badge ——————---- end */
|
|
89
|
+
/* ----------- Anchor ——————---- start */
|
|
90
|
+
/* ----------- Anchor ——————---- end */
|
|
91
|
+
/* ----------- Avatar ——————---- start */
|
|
92
|
+
/* ----------- Avatar ——————---- end */
|
|
93
|
+
/* ----------- AdvancedSelector ——————---- start */
|
|
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 */
|
|
104
|
+
.kd-link {
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
display: inline-block;
|
|
107
|
+
color: var(--kd-c-link-color-text, var(--kd-g-color-text-link, #0e5fd8));
|
|
108
|
+
}
|
|
109
|
+
.kd-link .kd-link-text {
|
|
110
|
+
height: auto;
|
|
111
|
+
width: auto;
|
|
112
|
+
padding: 0;
|
|
113
|
+
min-width: auto;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
color: inherit;
|
|
118
|
+
font-weight: var(--kd-c-link-font-weight, var(--kd-g-font-weight, 400));
|
|
119
|
+
}
|
|
120
|
+
.kd-link .kd-link-text:not(.kd-link-disabled):hover {
|
|
121
|
+
color: var(--kd-c-link-color-text-link-hover, #87A9FF);
|
|
122
|
+
}
|
|
123
|
+
.kd-link .kd-link-text:not(.kd-link-disabled):active {
|
|
124
|
+
color: var(--kd-c-link-color-text-link-active, #3761CA);
|
|
125
|
+
}
|
|
126
|
+
.kd-link-size-small {
|
|
127
|
+
height: var(--kd-c-link-sizing-height-small, 18px);
|
|
128
|
+
line-height: var(--kd-c-link-sizing-height-small, 18px);
|
|
129
|
+
font-size: var(--kd-c-link-font-size-small, var(--kd-g-font-size-small, 12px));
|
|
130
|
+
}
|
|
131
|
+
.kd-link-size-middle {
|
|
132
|
+
height: var(--kd-c-link-sizing-height-middle, 21px);
|
|
133
|
+
line-height: var(--kd-c-link-sizing-height-middle, 21px);
|
|
134
|
+
font-size: var(--kd-c-link-font-size-middle, var(--kd-g-font-size-middle, 14px));
|
|
135
|
+
}
|
|
136
|
+
.kd-link-size-large {
|
|
137
|
+
height: var(--kd-c-link-sizing-height-large, 24px);
|
|
138
|
+
line-height: var(--kd-c-link-sizing-height-large, 24px);
|
|
139
|
+
font-size: var(--kd-c-link-font-size-large, var(--kd-g-font-size-large, 16px));
|
|
140
|
+
}
|
|
141
|
+
.kd-link-underscore {
|
|
142
|
+
border-bottom: 1px solid;
|
|
143
|
+
}
|
|
144
|
+
.kd-link-disabled {
|
|
145
|
+
color: var(--kd-c-link-color-text-link-disabled, #9EBFEF) !important;
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
.kd-link-prefix {
|
|
149
|
+
display: inline-block;
|
|
150
|
+
margin-right: var(--kd-c-link-prefix-horizontal, 4px);
|
|
151
|
+
}
|
|
152
|
+
.kd-link-suffix {
|
|
153
|
+
display: inline-block;
|
|
154
|
+
margin-left: var(--kd-c-link-suffix-horizontal, 4px);
|
|
155
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import '../../style/themes/index';
|
|
2
|
+
@import './mixin.less';
|
|
3
|
+
|
|
4
|
+
@wrapper-prefix-cls: ~'@{kd-prefix}-link-wrapper';
|
|
5
|
+
@link-prefix-cls: ~'@{kd-prefix}-link';
|
|
6
|
+
|
|
7
|
+
.@{link-prefix-cls} {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
color: @link-color-text;
|
|
11
|
+
|
|
12
|
+
.@{link-prefix-cls}-text {
|
|
13
|
+
height: auto;
|
|
14
|
+
width: auto;
|
|
15
|
+
padding: 0;
|
|
16
|
+
min-width: auto;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
color: inherit;
|
|
21
|
+
font-weight: @link-g-font-weight;
|
|
22
|
+
&:not(.@{link-prefix-cls}-disabled):hover {
|
|
23
|
+
color: @link-color-text-hover;
|
|
24
|
+
}
|
|
25
|
+
&:not(.@{link-prefix-cls}-disabled):active {
|
|
26
|
+
color: @link-color-text-active;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 小号尺寸链接
|
|
31
|
+
&-size-small {
|
|
32
|
+
.link-size(@link-small-font-size, @link-small-height);
|
|
33
|
+
}
|
|
34
|
+
// 中号尺寸链接
|
|
35
|
+
&-size-middle {
|
|
36
|
+
.link-size(@link-middle-font-size, @link-middle-height);
|
|
37
|
+
}
|
|
38
|
+
// 大号尺寸链接
|
|
39
|
+
&-size-large {
|
|
40
|
+
.link-size(@link-large-font-size, @link-large-height);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-underscore {
|
|
44
|
+
border-bottom: 1px solid;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&-disabled {
|
|
48
|
+
color: @link-color-text-disabled !important;
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-prefix {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
margin-right: @link-prefix-horizontal;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&-suffix {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
margin-left: @link-suffix-horizontal;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
2
|
+
|
|
3
|
+
@link-custom-prefix: ~'--@{kd-prefix}-c-link';
|
|
4
|
+
|
|
5
|
+
// color
|
|
6
|
+
@link-color-text: var(~'@{link-custom-prefix}-color-text', @color-text-link);
|
|
7
|
+
@link-color-text-hover: var(~'@{link-custom-prefix}-color-text-link-hover', #87A9FF);
|
|
8
|
+
@link-color-text-active: var(~'@{link-custom-prefix}-color-text-link-active', #3761CA);
|
|
9
|
+
@link-color-text-disabled: var(~'@{link-custom-prefix}-color-text-link-disabled', #9EBFEF);
|
|
10
|
+
|
|
11
|
+
// font
|
|
12
|
+
@link-g-font-weight: var(~'@{link-custom-prefix}-font-weight', @font-weight-light);
|
|
13
|
+
@link-small-font-size: var(~'@{link-custom-prefix}-font-size-small', @font-size-small); // 小号 文字大小
|
|
14
|
+
@link-middle-font-size: var(~'@{link-custom-prefix}-font-size-middle', @font-size-middle); // 中号 文字大小
|
|
15
|
+
@link-large-font-size: var(~'@{link-custom-prefix}-font-size-large', @font-size-large); // 大号 文字大小
|
|
16
|
+
|
|
17
|
+
// sizing
|
|
18
|
+
@link-small-height: var(~'@{link-custom-prefix}-sizing-height-small', 18px); // 小号 高度
|
|
19
|
+
@link-middle-height: var(~'@{link-custom-prefix}-sizing-height-middle', 21px); // 中号 高度
|
|
20
|
+
@link-large-height: var(~'@{link-custom-prefix}-sizing-height-large', 24px); // 大号 高度
|
|
21
|
+
|
|
22
|
+
// spacing
|
|
23
|
+
@link-prefix-horizontal: var(~'@{link-custom-prefix}-prefix-horizontal', 4px); // 前缀图标间隔
|
|
24
|
+
@link-suffix-horizontal: var(~'@{link-custom-prefix}-suffix-horizontal', 4px); // 后缀图标间隔
|
package/lib/menu/menuItem.js
CHANGED
|
@@ -158,8 +158,7 @@ var InternalMenuItem = function InternalMenuItem(props, ref) {
|
|
|
158
158
|
className: (0, _classnames.default)(className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, prefixCls, subMenuMode !== 'horizontal'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-collapsed"), collapsed && level === 1), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-active"), selectedKey === keyValue), _classNames)),
|
|
159
159
|
role: "menuitem",
|
|
160
160
|
style: style,
|
|
161
|
-
key: keyValue
|
|
162
|
-
title: children
|
|
161
|
+
key: keyValue
|
|
163
162
|
}, mouseEvent), /*#__PURE__*/React.createElement("div", {
|
|
164
163
|
className: (0, _classnames.default)("".concat(prefixCls, "-title")),
|
|
165
164
|
style: titleStyle
|