@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.
Files changed (452) hide show
  1. package/LICENSE +104 -105
  2. package/dist/default-theme.js +17 -12
  3. package/dist/kdesign-complete.less +3334 -1374
  4. package/dist/kdesign.css +2565 -1931
  5. package/dist/kdesign.css.map +1 -1
  6. package/dist/kdesign.js +783 -112
  7. package/dist/kdesign.js.map +1 -1
  8. package/dist/kdesign.min.css +4 -4
  9. package/dist/kdesign.min.js +6 -6
  10. package/dist/kdesign.min.js.map +1 -1
  11. package/es/alert/style/index.css +32 -30
  12. package/es/alert/style/index.less +36 -37
  13. package/es/alert/style/token.less +29 -0
  14. package/es/anchor/style/index.css +48 -34
  15. package/es/anchor/style/index.less +19 -16
  16. package/es/anchor/style/mixin.less +1 -0
  17. package/es/anchor/style/token.less +33 -0
  18. package/es/avatar/style/index.css +18 -18
  19. package/es/avatar/style/index.less +4 -25
  20. package/es/avatar/style/mixin.less +21 -4
  21. package/es/avatar/style/token.less +20 -0
  22. package/es/badge/style/index.css +38 -29
  23. package/es/badge/style/index.less +28 -30
  24. package/es/badge/style/mixin.less +1 -5
  25. package/es/badge/style/token.less +23 -0
  26. package/es/base-data/style/index.css +25 -16
  27. package/es/base-data/style/index.less +17 -17
  28. package/es/base-data/style/token.less +27 -0
  29. package/es/button/button.d.ts +1 -3
  30. package/es/button/button.js +3 -15
  31. package/es/button/style/index.css +80 -81
  32. package/es/button/style/index.less +43 -51
  33. package/es/button/style/mixin.less +6 -4
  34. package/es/button/style/token.less +88 -0
  35. package/es/card/card.d.ts +1 -0
  36. package/es/card/card.js +4 -1
  37. package/es/card/style/index.css +48 -23
  38. package/es/card/style/index.less +43 -23
  39. package/es/card/style/token.less +28 -0
  40. package/es/carousel/style/index.css +36 -30
  41. package/es/carousel/style/index.less +14 -6
  42. package/es/carousel/style/mixin.less +1 -4
  43. package/es/carousel/style/token.less +20 -0
  44. package/es/cascader/cascader.js +1 -1
  45. package/es/cascader/style/index.css +35 -26
  46. package/es/cascader/style/index.less +24 -23
  47. package/es/cascader/style/token.less +28 -0
  48. package/es/checkbox/style/index.css +86 -80
  49. package/es/checkbox/style/index.less +26 -27
  50. package/es/checkbox/style/token.less +48 -0
  51. package/es/city-picker/style/index.css +24 -14
  52. package/es/city-picker/style/index.less +16 -16
  53. package/es/city-picker/style/token.less +25 -0
  54. package/es/collapse/style/index.css +37 -26
  55. package/es/collapse/style/index.less +7 -5
  56. package/es/collapse/style/mixin.less +1 -5
  57. package/es/collapse/style/token.less +26 -0
  58. package/es/config-provider/compDefaultProps.d.ts +4 -1
  59. package/es/config-provider/compDefaultProps.js +5 -2
  60. package/es/date-picker/style/index.css +81 -72
  61. package/es/date-picker/style/index.less +36 -36
  62. package/es/date-picker/style/mixin.less +20 -18
  63. package/es/date-picker/style/token.less +71 -0
  64. package/es/drawer/drawer.d.ts +0 -1
  65. package/es/drawer/drawer.js +6 -26
  66. package/es/drawer/style/index.css +37 -31
  67. package/es/drawer/style/index.less +24 -39
  68. package/es/drawer/style/token.less +23 -0
  69. package/es/dropdown/dropdown.d.ts +1 -0
  70. package/es/dropdown/dropdown.js +13 -8
  71. package/es/dropdown/menu.d.ts +1 -1
  72. package/es/dropdown/menu.js +3 -3
  73. package/es/dropdown/style/index.css +57 -48
  74. package/es/dropdown/style/index.less +27 -24
  75. package/es/dropdown/style/token.less +26 -0
  76. package/es/empty/defaultEmptyImg.d.ts +2 -0
  77. package/es/empty/defaultEmptyImg.js +92 -0
  78. package/es/empty/empty.d.ts +5 -1
  79. package/es/empty/empty.js +10 -9
  80. package/es/empty/illustrationEmptyImg.d.ts +2 -0
  81. package/es/empty/illustrationEmptyImg.js +439 -0
  82. package/es/empty/style/index.css +12 -3
  83. package/es/empty/style/index.less +1 -1
  84. package/es/empty/style/token.less +12 -0
  85. package/es/filter/style/index.css +44 -32
  86. package/es/filter/style/index.less +34 -32
  87. package/es/filter/style/token.less +28 -0
  88. package/es/form/style/index.css +19 -10
  89. package/es/form/style/index.less +9 -6
  90. package/es/form/style/token.less +27 -0
  91. package/es/grid/style/index.css +9 -0
  92. package/es/image/style/index.css +32 -23
  93. package/es/image/style/index.less +23 -22
  94. package/es/image/style/token.less +45 -0
  95. package/es/image-cropper/style/index.css +9 -0
  96. package/es/image-cropper/style/index.less +1 -1
  97. package/es/index.d.ts +1 -0
  98. package/es/index.js +2 -1
  99. package/es/input/style/index.css +97 -88
  100. package/es/input/style/index.less +34 -31
  101. package/es/input/style/mixin.less +54 -47
  102. package/es/input/style/token.less +46 -0
  103. package/es/input-number/style/css.js +1 -0
  104. package/es/input-number/style/index.css +25 -16
  105. package/es/input-number/style/index.d.ts +1 -0
  106. package/es/input-number/style/index.js +1 -0
  107. package/es/input-number/style/index.less +12 -12
  108. package/es/input-number/style/mixin.less +4 -2
  109. package/es/input-number/style/token.less +20 -0
  110. package/es/layout/style/index.css +41 -32
  111. package/es/layout/style/index.less +9 -8
  112. package/es/layout/style/token.less +30 -0
  113. package/es/link/index.d.ts +3 -0
  114. package/es/link/index.js +3 -0
  115. package/es/link/link.d.ts +18 -0
  116. package/es/link/link.js +89 -0
  117. package/es/link/style/css.js +2 -0
  118. package/es/link/style/index.css +155 -0
  119. package/es/link/style/index.d.ts +2 -0
  120. package/es/link/style/index.js +2 -0
  121. package/es/link/style/index.less +61 -0
  122. package/es/link/style/mixin.less +7 -0
  123. package/es/link/style/token.less +24 -0
  124. package/es/menu/menuItem.js +1 -2
  125. package/es/menu/style/index.css +89 -80
  126. package/es/menu/style/index.less +51 -26
  127. package/es/menu/style/mixin.less +16 -19
  128. package/es/menu/style/token.less +32 -0
  129. package/es/message/style/index.css +23 -13
  130. package/es/message/style/index.less +15 -13
  131. package/es/message/style/token.less +21 -0
  132. package/es/modal/style/index.css +37 -28
  133. package/es/modal/style/index.less +16 -26
  134. package/es/modal/style/mixin.less +2 -0
  135. package/es/modal/style/token.less +46 -0
  136. package/es/notification/content.js +1 -1
  137. package/es/notification/style/index.css +34 -25
  138. package/es/notification/style/index.less +21 -20
  139. package/es/notification/style/token.less +28 -0
  140. package/es/pagination/pagination.js +2 -2
  141. package/es/pagination/style/index.css +159 -159
  142. package/es/pagination/style/index.less +104 -113
  143. package/es/pagination/style/token.less +28 -0
  144. package/es/popconfirm/style/index.css +54 -33
  145. package/es/popconfirm/style/index.less +41 -20
  146. package/es/popconfirm/style/token.less +28 -0
  147. package/es/progress/style/index.css +41 -27
  148. package/es/progress/style/index.less +24 -8
  149. package/es/progress/style/mixin.less +2 -1
  150. package/es/progress/style/token.less +40 -0
  151. package/es/radio/style/index.css +91 -76
  152. package/es/radio/style/index.less +76 -64
  153. package/es/radio/style/token.less +47 -0
  154. package/es/rate/style/index.css +26 -17
  155. package/es/rate/style/index.less +4 -3
  156. package/es/rate/style/token.less +18 -0
  157. package/es/search/style/index.css +103 -82
  158. package/es/search/style/index.less +49 -35
  159. package/es/search/style/mixin.less +4 -2
  160. package/es/search/style/token.less +60 -0
  161. package/es/select/select.js +3 -14
  162. package/es/select/style/index.css +46 -37
  163. package/es/select/style/index.less +10 -10
  164. package/es/select/style/mixin.less +4 -7
  165. package/es/select/style/token.less +43 -0
  166. package/es/slider/slider.js +5 -13
  167. package/es/slider/sliderTooltip.js +0 -1
  168. package/es/slider/style/index.css +21 -12
  169. package/es/slider/style/index.less +10 -10
  170. package/es/slider/style/mixin.less +3 -1
  171. package/es/slider/style/token.less +17 -0
  172. package/es/space/style/index.css +9 -0
  173. package/es/spin/style/index.css +23 -14
  174. package/es/spin/style/index.less +3 -2
  175. package/es/spin/style/mixin.less +1 -0
  176. package/es/spin/style/token.less +15 -0
  177. package/es/split-panel/style/index.css +35 -44
  178. package/es/split-panel/style/index.less +16 -34
  179. package/es/split-panel/style/token.less +23 -0
  180. package/es/stepper/style/index.css +50 -25
  181. package/es/stepper/style/index.less +45 -11
  182. package/es/stepper/style/mixin.less +7 -5
  183. package/es/stepper/style/token.less +28 -0
  184. package/es/steps/Steps.js +4 -1
  185. package/es/steps/style/index.css +74 -37
  186. package/es/steps/style/index.less +281 -189
  187. package/es/steps/style/token.less +31 -0
  188. package/es/style/mixins/index.less +10 -9
  189. package/es/style/mixins/overlay.less +2 -2
  190. package/es/style/themes/default.less +22 -12
  191. package/es/style/themes/token.less +128 -0
  192. package/es/switch/style/index.css +38 -29
  193. package/es/switch/style/index.less +17 -6
  194. package/es/switch/style/mixin.less +6 -5
  195. package/es/switch/style/token.less +45 -0
  196. package/es/tabs/style/index.css +59 -50
  197. package/es/tabs/style/index.less +3 -3
  198. package/es/tabs/style/mixin.less +2 -0
  199. package/es/tabs/style/token.less +32 -0
  200. package/es/tabs/tabs.js +3 -1
  201. package/es/tag/style/index.css +122 -113
  202. package/es/tag/style/index.less +19 -19
  203. package/es/tag/style/mixin.less +2 -1
  204. package/es/tag/style/token.less +42 -0
  205. package/es/timeline/style/index.css +40 -30
  206. package/es/timeline/style/index.less +33 -30
  207. package/es/timeline/style/token.less +45 -0
  208. package/es/tooltip/style/index.css +26 -17
  209. package/es/tooltip/style/index.less +6 -5
  210. package/es/tooltip/style/token.less +20 -0
  211. package/es/transfer/operation.js +2 -2
  212. package/es/transfer/style/index.css +37 -24
  213. package/es/transfer/style/index.less +4 -0
  214. package/es/transfer/style/mixins.less +2 -0
  215. package/es/transfer/style/token.less +29 -0
  216. package/es/tree/style/index.css +37 -37
  217. package/es/tree/style/index.less +8 -20
  218. package/es/tree/style/mixin.less +1 -5
  219. package/es/tree/style/token.less +27 -0
  220. package/es/typography/style/index.css +46 -53
  221. package/es/typography/style/index.less +15 -15
  222. package/es/typography/style/mixin.less +9 -11
  223. package/es/typography/style/token.less +38 -0
  224. package/es/upload/style/index.css +41 -31
  225. package/es/upload/style/index.less +27 -25
  226. package/es/upload/style/token.less +28 -0
  227. package/lib/alert/style/index.css +32 -30
  228. package/lib/alert/style/index.less +36 -37
  229. package/lib/alert/style/token.less +29 -0
  230. package/lib/anchor/style/index.css +48 -34
  231. package/lib/anchor/style/index.less +19 -16
  232. package/lib/anchor/style/mixin.less +1 -0
  233. package/lib/anchor/style/token.less +33 -0
  234. package/lib/avatar/style/index.css +18 -18
  235. package/lib/avatar/style/index.less +4 -25
  236. package/lib/avatar/style/mixin.less +21 -4
  237. package/lib/avatar/style/token.less +20 -0
  238. package/lib/badge/style/index.css +38 -29
  239. package/lib/badge/style/index.less +28 -30
  240. package/lib/badge/style/mixin.less +1 -5
  241. package/lib/badge/style/token.less +23 -0
  242. package/lib/base-data/style/index.css +25 -16
  243. package/lib/base-data/style/index.less +17 -17
  244. package/lib/base-data/style/token.less +27 -0
  245. package/lib/button/button.d.ts +1 -3
  246. package/lib/button/button.js +3 -15
  247. package/lib/button/style/index.css +80 -81
  248. package/lib/button/style/index.less +43 -51
  249. package/lib/button/style/mixin.less +6 -4
  250. package/lib/button/style/token.less +88 -0
  251. package/lib/card/card.d.ts +1 -0
  252. package/lib/card/card.js +4 -1
  253. package/lib/card/style/index.css +48 -23
  254. package/lib/card/style/index.less +43 -23
  255. package/lib/card/style/token.less +28 -0
  256. package/lib/carousel/style/index.css +36 -30
  257. package/lib/carousel/style/index.less +14 -6
  258. package/lib/carousel/style/mixin.less +1 -4
  259. package/lib/carousel/style/token.less +20 -0
  260. package/lib/cascader/cascader.js +1 -1
  261. package/lib/cascader/style/index.css +35 -26
  262. package/lib/cascader/style/index.less +24 -23
  263. package/lib/cascader/style/token.less +28 -0
  264. package/lib/checkbox/style/index.css +86 -80
  265. package/lib/checkbox/style/index.less +26 -27
  266. package/lib/checkbox/style/token.less +48 -0
  267. package/lib/city-picker/style/index.css +24 -14
  268. package/lib/city-picker/style/index.less +16 -16
  269. package/lib/city-picker/style/token.less +25 -0
  270. package/lib/collapse/style/index.css +37 -26
  271. package/lib/collapse/style/index.less +7 -5
  272. package/lib/collapse/style/mixin.less +1 -5
  273. package/lib/collapse/style/token.less +26 -0
  274. package/lib/config-provider/compDefaultProps.d.ts +4 -1
  275. package/lib/config-provider/compDefaultProps.js +5 -2
  276. package/lib/date-picker/style/index.css +81 -72
  277. package/lib/date-picker/style/index.less +36 -36
  278. package/lib/date-picker/style/mixin.less +20 -18
  279. package/lib/date-picker/style/token.less +71 -0
  280. package/lib/drawer/drawer.d.ts +0 -1
  281. package/lib/drawer/drawer.js +6 -26
  282. package/lib/drawer/style/index.css +37 -31
  283. package/lib/drawer/style/index.less +24 -39
  284. package/lib/drawer/style/token.less +23 -0
  285. package/lib/dropdown/dropdown.d.ts +1 -0
  286. package/lib/dropdown/dropdown.js +13 -8
  287. package/lib/dropdown/menu.d.ts +1 -1
  288. package/lib/dropdown/menu.js +3 -3
  289. package/lib/dropdown/style/index.css +57 -48
  290. package/lib/dropdown/style/index.less +27 -24
  291. package/lib/dropdown/style/token.less +26 -0
  292. package/lib/empty/defaultEmptyImg.d.ts +2 -0
  293. package/lib/empty/defaultEmptyImg.js +113 -0
  294. package/lib/empty/empty.d.ts +5 -1
  295. package/lib/empty/empty.js +13 -9
  296. package/lib/empty/illustrationEmptyImg.d.ts +2 -0
  297. package/lib/empty/illustrationEmptyImg.js +460 -0
  298. package/lib/empty/style/index.css +12 -3
  299. package/lib/empty/style/index.less +1 -1
  300. package/lib/empty/style/token.less +12 -0
  301. package/lib/filter/style/index.css +44 -32
  302. package/lib/filter/style/index.less +34 -32
  303. package/lib/filter/style/token.less +28 -0
  304. package/lib/form/style/index.css +19 -10
  305. package/lib/form/style/index.less +9 -6
  306. package/lib/form/style/token.less +27 -0
  307. package/lib/grid/style/index.css +9 -0
  308. package/lib/image/style/index.css +32 -23
  309. package/lib/image/style/index.less +23 -22
  310. package/lib/image/style/token.less +45 -0
  311. package/lib/image-cropper/style/index.css +9 -0
  312. package/lib/image-cropper/style/index.less +1 -1
  313. package/lib/index.d.ts +1 -0
  314. package/lib/index.js +8 -0
  315. package/lib/input/style/index.css +97 -88
  316. package/lib/input/style/index.less +34 -31
  317. package/lib/input/style/mixin.less +54 -47
  318. package/lib/input/style/token.less +46 -0
  319. package/lib/input-number/style/css.js +2 -0
  320. package/lib/input-number/style/index.css +25 -16
  321. package/lib/input-number/style/index.d.ts +1 -0
  322. package/lib/input-number/style/index.js +2 -0
  323. package/lib/input-number/style/index.less +12 -12
  324. package/lib/input-number/style/mixin.less +4 -2
  325. package/lib/input-number/style/token.less +20 -0
  326. package/lib/layout/style/index.css +41 -32
  327. package/lib/layout/style/index.less +9 -8
  328. package/lib/layout/style/token.less +30 -0
  329. package/lib/link/index.d.ts +3 -0
  330. package/lib/link/index.js +36 -0
  331. package/lib/link/link.d.ts +18 -0
  332. package/lib/link/link.js +120 -0
  333. package/lib/link/style/css.js +5 -0
  334. package/lib/link/style/index.css +155 -0
  335. package/lib/link/style/index.d.ts +2 -0
  336. package/lib/link/style/index.js +5 -0
  337. package/lib/link/style/index.less +61 -0
  338. package/lib/link/style/mixin.less +7 -0
  339. package/lib/link/style/token.less +24 -0
  340. package/lib/menu/menuItem.js +1 -2
  341. package/lib/menu/style/index.css +89 -80
  342. package/lib/menu/style/index.less +51 -26
  343. package/lib/menu/style/mixin.less +16 -19
  344. package/lib/menu/style/token.less +32 -0
  345. package/lib/message/style/index.css +23 -13
  346. package/lib/message/style/index.less +15 -13
  347. package/lib/message/style/token.less +21 -0
  348. package/lib/modal/style/index.css +37 -28
  349. package/lib/modal/style/index.less +16 -26
  350. package/lib/modal/style/mixin.less +2 -0
  351. package/lib/modal/style/token.less +46 -0
  352. package/lib/notification/content.js +1 -1
  353. package/lib/notification/style/index.css +34 -25
  354. package/lib/notification/style/index.less +21 -20
  355. package/lib/notification/style/token.less +28 -0
  356. package/lib/pagination/pagination.js +2 -2
  357. package/lib/pagination/style/index.css +159 -159
  358. package/lib/pagination/style/index.less +104 -113
  359. package/lib/pagination/style/token.less +28 -0
  360. package/lib/popconfirm/style/index.css +54 -33
  361. package/lib/popconfirm/style/index.less +41 -20
  362. package/lib/popconfirm/style/token.less +28 -0
  363. package/lib/progress/style/index.css +41 -27
  364. package/lib/progress/style/index.less +24 -8
  365. package/lib/progress/style/mixin.less +2 -1
  366. package/lib/progress/style/token.less +40 -0
  367. package/lib/radio/style/index.css +91 -76
  368. package/lib/radio/style/index.less +76 -64
  369. package/lib/radio/style/token.less +47 -0
  370. package/lib/rate/style/index.css +26 -17
  371. package/lib/rate/style/index.less +4 -3
  372. package/lib/rate/style/token.less +18 -0
  373. package/lib/search/style/index.css +103 -82
  374. package/lib/search/style/index.less +49 -35
  375. package/lib/search/style/mixin.less +4 -2
  376. package/lib/search/style/token.less +60 -0
  377. package/lib/select/select.js +3 -14
  378. package/lib/select/style/index.css +46 -37
  379. package/lib/select/style/index.less +10 -10
  380. package/lib/select/style/mixin.less +4 -7
  381. package/lib/select/style/token.less +43 -0
  382. package/lib/slider/slider.js +5 -13
  383. package/lib/slider/sliderTooltip.js +0 -1
  384. package/lib/slider/style/index.css +21 -12
  385. package/lib/slider/style/index.less +10 -10
  386. package/lib/slider/style/mixin.less +3 -1
  387. package/lib/slider/style/token.less +17 -0
  388. package/lib/space/style/index.css +9 -0
  389. package/lib/spin/style/index.css +23 -14
  390. package/lib/spin/style/index.less +3 -2
  391. package/lib/spin/style/mixin.less +1 -0
  392. package/lib/spin/style/token.less +15 -0
  393. package/lib/split-panel/style/index.css +35 -44
  394. package/lib/split-panel/style/index.less +16 -34
  395. package/lib/split-panel/style/token.less +23 -0
  396. package/lib/stepper/style/index.css +50 -25
  397. package/lib/stepper/style/index.less +45 -11
  398. package/lib/stepper/style/mixin.less +7 -5
  399. package/lib/stepper/style/token.less +28 -0
  400. package/lib/steps/Steps.js +4 -1
  401. package/lib/steps/style/index.css +74 -37
  402. package/lib/steps/style/index.less +281 -189
  403. package/lib/steps/style/token.less +31 -0
  404. package/lib/style/components.less +1 -0
  405. package/lib/style/mixins/index.less +10 -9
  406. package/lib/style/mixins/overlay.less +2 -2
  407. package/lib/style/themes/default.less +22 -12
  408. package/lib/style/themes/token.less +128 -0
  409. package/lib/switch/style/index.css +38 -29
  410. package/lib/switch/style/index.less +17 -6
  411. package/lib/switch/style/mixin.less +6 -5
  412. package/lib/switch/style/token.less +45 -0
  413. package/lib/tabs/style/index.css +59 -50
  414. package/lib/tabs/style/index.less +3 -3
  415. package/lib/tabs/style/mixin.less +2 -0
  416. package/lib/tabs/style/token.less +32 -0
  417. package/lib/tabs/tabs.js +3 -1
  418. package/lib/tag/style/index.css +122 -113
  419. package/lib/tag/style/index.less +19 -19
  420. package/lib/tag/style/mixin.less +2 -1
  421. package/lib/tag/style/token.less +42 -0
  422. package/lib/timeline/style/index.css +40 -30
  423. package/lib/timeline/style/index.less +33 -30
  424. package/lib/timeline/style/token.less +45 -0
  425. package/lib/tooltip/style/index.css +26 -17
  426. package/lib/tooltip/style/index.less +6 -5
  427. package/lib/tooltip/style/token.less +20 -0
  428. package/lib/transfer/operation.js +2 -2
  429. package/lib/transfer/style/index.css +37 -24
  430. package/lib/transfer/style/index.less +4 -0
  431. package/lib/transfer/style/mixins.less +2 -0
  432. package/lib/transfer/style/token.less +29 -0
  433. package/lib/tree/style/index.css +37 -37
  434. package/lib/tree/style/index.less +8 -20
  435. package/lib/tree/style/mixin.less +1 -5
  436. package/lib/tree/style/token.less +27 -0
  437. package/lib/typography/style/index.css +46 -53
  438. package/lib/typography/style/index.less +15 -15
  439. package/lib/typography/style/mixin.less +9 -11
  440. package/lib/typography/style/token.less +38 -0
  441. package/lib/upload/style/index.css +41 -31
  442. package/lib/upload/style/index.less +27 -25
  443. package/lib/upload/style/token.less +28 -0
  444. package/package.json +5 -4
  445. package/es/base-data/style/mixin.less +0 -5
  446. package/es/empty/style/mixin.less +0 -5
  447. package/es/form/style/mixin.less +0 -5
  448. package/es/steps/style/mixin.less +0 -41
  449. package/lib/base-data/style/mixin.less +0 -5
  450. package/lib/empty/style/mixin.less +0 -5
  451. package/lib/form/style/mixin.less +0 -5
  452. package/lib/steps/style/mixin.less +0 -41
@@ -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', 'link', 'text');
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", "target", "href", "size", "loading", "shape", "bordered", "onClick", "icon", "ghost", "block", "disabled", "htmlType"]);
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 === 'link' || type === 'text'; // 判断按钮是否文本或链接类型。这些类型下有部分样式不适用
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-link):not(.kd-btn-text)::after {
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-link):not(.kd-btn-text)[click-animating-wave='true']::after {
135
- -webkit-animation: fadeEffect calc(0.3s + 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards, waveEffect calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards;
136
- animation: fadeEffect calc(0.3s + 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards, waveEffect calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards;
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(217, 217, 217, 0.65) !important;
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: #375cca;
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: #375cca;
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: 16px;
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: 16px;
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: 18px;
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: #666;
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: #5582f3;
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(&-link):not(&-text)::after{
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-color;
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(&-link):not(&-text)[click-animating-wave='true']::after {
23
- animation: fadeEffect calc(@transition-duration + 0.1s) @ease-out forwards,
24
- waveEffect calc(@transition-duration - 0.1s) @ease-out forwards;
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,&:active {
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: @white;
33
- border-color: @strong-border-color;
34
- color: @secondary-text-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: @theme-color-hover;
48
- border-color: @theme-color-hover;
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: @theme-color-click;
52
- background-color: @theme-color-click;
58
+ border-color: @btn-primary-border-color-active;
59
+ background-color: @btn-primary-background-color-active;
53
60
  }
54
61
  &:disabled {
55
- background-color: @theme-color-disabled !important;
56
- border-color: @theme-color-disabled !important;
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: @theme-color;
64
- color: @theme-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: @theme-color-click;
68
- color: @theme-color-click;
74
+ border-color: @btn-ghost-border-color-hover;
75
+ color: @btn-ghost-font-color-active;
69
76
  }
70
77
  &:disabled {
71
- background-color: @disabled-contain-bg !important;
72
- border-color: @disabled-color !important;
73
- color: @disabled-color !important;
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: @theme-color;
96
+ color: @btn-g-text-color-loading;
90
97
  }
91
98
  &-primary-loadingIcon {
92
- color: @white;
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: @secondary-text-color;
150
+ color: @btn-text-g-text-color;
144
151
  padding: 0;
145
152
  min-width: auto;
146
153
  &:hover {
147
- color: @theme-color;
154
+ color: @btn-text-g-text-color-hover;
148
155
  }
149
156
  &:active {
150
- color: @theme-color-click;
157
+ color: @btn-text-g-text-color-active;
151
158
  }
152
159
  &[disabled] {
153
- color: @disabled-color !important;
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: @theme-color;
179
+ color: @btn-background-ghost-g-text-color;
188
180
  &:hover {
189
- color: @white;
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 @btn-border-style transparent;
10
+ font-weight: @btn-g-font-weight;
11
+ border: @btn-border-width solid transparent;
10
12
  user-select: none;
11
- border-radius: @radius-size;
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); // 大号 内间距 横向
@@ -19,6 +19,7 @@ export interface CardProps {
19
19
  headStyle?: React.CSSProperties;
20
20
  bodyStyle?: React.CSSProperties;
21
21
  actions?: Array<React.ReactNode>;
22
+ extra?: Array<React.ReactNode>;
22
23
  }
23
24
  declare const Card: React.FC<CardProps>;
24
25
  export default Card;
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';