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