bkui-vue 0.0.1-beta.1 → 0.0.1-beta.13

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 (348) hide show
  1. package/LICENSE.txt +22 -0
  2. package/README.md +55 -0
  3. package/dist/bkui-vue.cjs.js +9957 -257
  4. package/dist/bkui-vue.esm.js +9919 -257
  5. package/dist/bkui-vue.umd.js +9967 -267
  6. package/dist/style.css +4010 -428
  7. package/lib/alert/alert.css +75 -0
  8. package/lib/alert/alert.d.ts +53 -0
  9. package/lib/alert/alert.less +110 -0
  10. package/lib/alert/alert.variable.css +161 -0
  11. package/lib/alert/index.d.ts +144 -0
  12. package/lib/alert/index.js +1 -0
  13. package/lib/animate-number/animate-number.d.ts +22 -0
  14. package/lib/animate-number/index.d.ts +77 -0
  15. package/lib/animate-number/index.js +1 -0
  16. package/lib/backtop/backtop.css +42 -0
  17. package/lib/backtop/backtop.d.ts +46 -0
  18. package/lib/backtop/backtop.less +18 -0
  19. package/lib/backtop/backtop.variable.css +128 -0
  20. package/lib/backtop/index.d.ts +110 -0
  21. package/lib/backtop/index.js +1 -0
  22. package/lib/badge/badge.css +121 -0
  23. package/lib/badge/badge.d.ts +70 -0
  24. package/lib/badge/badge.less +137 -0
  25. package/lib/badge/badge.variable.css +207 -0
  26. package/lib/badge/index.d.ts +149 -0
  27. package/lib/badge/index.js +1 -0
  28. package/lib/breadcrumb/breadcrumb-item.d.ts +32 -0
  29. package/lib/breadcrumb/breadcrumb.css +59 -0
  30. package/lib/breadcrumb/breadcrumb.d.ts +26 -0
  31. package/lib/breadcrumb/breadcrumb.less +54 -0
  32. package/lib/breadcrumb/breadcrumb.variable.css +145 -0
  33. package/lib/breadcrumb/index.d.ts +122 -0
  34. package/lib/breadcrumb/index.js +1 -0
  35. package/lib/breadcrumb/props.d.ts +4 -0
  36. package/lib/button/button-group.d.ts +8 -0
  37. package/lib/button/button.css +242 -22
  38. package/lib/button/button.d.ts +114 -0
  39. package/lib/button/button.less +180 -36
  40. package/lib/button/button.variable.css +339 -0
  41. package/lib/button/index.d.ts +170 -0
  42. package/lib/button/index.js +1 -206
  43. package/lib/card/card.css +63 -0
  44. package/lib/card/card.d.ts +54 -0
  45. package/lib/card/card.less +44 -0
  46. package/lib/card/card.variable.css +149 -0
  47. package/lib/card/index.d.ts +127 -0
  48. package/lib/card/index.js +1 -0
  49. package/lib/checkbox/checkbox-group.d.ts +44 -0
  50. package/lib/checkbox/checkbox.css +54 -125
  51. package/lib/checkbox/checkbox.d.ts +105 -0
  52. package/lib/checkbox/checkbox.less +66 -6
  53. package/lib/checkbox/checkbox.variable.css +150 -0
  54. package/lib/checkbox/common.d.ts +13 -0
  55. package/lib/checkbox/index.d.ts +221 -0
  56. package/lib/checkbox/index.js +1 -64
  57. package/lib/checkbox/type.d.ts +19 -0
  58. package/lib/collapse/collapse.css +30 -0
  59. package/lib/collapse/collapse.d.ts +74 -0
  60. package/lib/collapse/collapse.less +37 -0
  61. package/lib/collapse/collapse.variable.css +30 -0
  62. package/lib/collapse/index.d.ts +130 -0
  63. package/lib/collapse/index.js +1 -0
  64. package/lib/components.d.ts +31 -0
  65. package/lib/date-picker/date-picker.css +407 -0
  66. package/lib/date-picker/date-picker.d.ts +357 -0
  67. package/lib/date-picker/date-picker.less +526 -0
  68. package/lib/date-picker/date-picker.variable.css +493 -0
  69. package/lib/date-picker/fecha.d.ts +6 -0
  70. package/lib/date-picker/index.d.ts +525 -0
  71. package/lib/date-picker/index.js +1 -0
  72. package/lib/date-picker/interface.d.ts +22 -0
  73. package/lib/date-picker/utils.d.ts +97 -0
  74. package/lib/dialog/dialog.css +68 -0
  75. package/lib/dialog/dialog.d.ts +83 -0
  76. package/lib/dialog/dialog.less +80 -0
  77. package/lib/dialog/dialog.variable.css +68 -0
  78. package/lib/dialog/index.d.ts +183 -0
  79. package/lib/dialog/index.js +1 -0
  80. package/lib/directives/clickoutside.d.ts +23 -0
  81. package/lib/directives/index.d.ts +3 -0
  82. package/lib/directives/index.js +15 -0
  83. package/lib/directives/mousewheel.d.ts +3 -0
  84. package/lib/directives/tooltips.d.ts +17 -0
  85. package/lib/divider/divider.css +38 -0
  86. package/lib/divider/divider.d.ts +40 -0
  87. package/lib/divider/divider.less +53 -0
  88. package/lib/divider/divider.variable.css +124 -0
  89. package/lib/divider/index.d.ts +110 -0
  90. package/lib/divider/index.js +1 -0
  91. package/lib/dropdown/dropdown-item.d.ts +18 -0
  92. package/lib/dropdown/dropdown-menu.d.ts +15 -0
  93. package/lib/dropdown/dropdown.css +43 -0
  94. package/lib/dropdown/dropdown.d.ts +49 -0
  95. package/lib/dropdown/dropdown.less +54 -0
  96. package/lib/dropdown/dropdown.variable.css +129 -0
  97. package/lib/dropdown/index.d.ts +160 -0
  98. package/lib/dropdown/index.js +1 -0
  99. package/lib/exception/exception.css +32 -0
  100. package/lib/exception/exception.d.ts +24 -0
  101. package/lib/exception/exception.less +39 -0
  102. package/lib/exception/exception.variable.css +118 -0
  103. package/lib/exception/index.d.ts +88 -0
  104. package/lib/exception/index.js +1 -0
  105. package/lib/fixed-navbar/fixed-navbar.css +42 -0
  106. package/lib/fixed-navbar/fixed-navbar.d.ts +28 -0
  107. package/lib/fixed-navbar/fixed-navbar.less +53 -0
  108. package/lib/fixed-navbar/fixed-navbar.variable.css +128 -0
  109. package/lib/fixed-navbar/index.d.ts +88 -0
  110. package/lib/fixed-navbar/index.js +1 -0
  111. package/lib/form/common.d.ts +3 -0
  112. package/lib/form/form-item.d.ts +140 -0
  113. package/lib/form/form.css +39 -0
  114. package/lib/form/form.d.ts +76 -0
  115. package/lib/form/form.less +50 -0
  116. package/lib/form/form.variable.css +39 -0
  117. package/lib/form/index.d.ts +4 -0
  118. package/lib/form/index.js +1 -0
  119. package/lib/form/type.d.ts +21 -0
  120. package/lib/form/validator.d.ts +8 -0
  121. package/lib/icon/angle-double-left.d.ts +4 -0
  122. package/lib/icon/angle-double-right.d.ts +4 -0
  123. package/lib/icon/angle-down-line.d.ts +4 -0
  124. package/lib/icon/angle-down.d.ts +4 -0
  125. package/lib/icon/angle-left.d.ts +4 -0
  126. package/lib/icon/angle-right.d.ts +4 -0
  127. package/lib/icon/angle-up.d.ts +4 -0
  128. package/lib/icon/circle.d.ts +4 -0
  129. package/lib/icon/close.d.ts +4 -0
  130. package/lib/icon/code.d.ts +4 -0
  131. package/lib/icon/cog-shape.d.ts +4 -0
  132. package/lib/icon/collapse-left.d.ts +4 -0
  133. package/lib/icon/copy.d.ts +4 -0
  134. package/lib/icon/done.d.ts +4 -0
  135. package/lib/icon/down-shape.d.ts +4 -0
  136. package/lib/icon/down-small.d.ts +4 -0
  137. package/lib/icon/error.d.ts +4 -0
  138. package/lib/icon/eye.d.ts +4 -0
  139. package/lib/icon/folder-open.d.ts +4 -0
  140. package/lib/icon/folder-shape-open.d.ts +4 -0
  141. package/lib/icon/folder-shape.d.ts +4 -0
  142. package/lib/icon/folder.d.ts +4 -0
  143. package/lib/icon/help-document-fill.d.ts +4 -0
  144. package/lib/icon/help-fill.d.ts +4 -0
  145. package/lib/icon/help.d.ts +4 -0
  146. package/lib/icon/icon.d.ts +12 -0
  147. package/lib/icon/index.d.ts +38 -0
  148. package/lib/icon/index.js +15 -0
  149. package/lib/icon/info-line.d.ts +4 -0
  150. package/lib/icon/info.d.ts +4 -0
  151. package/lib/icon/play-shape.d.ts +4 -0
  152. package/lib/icon/plus.d.ts +4 -0
  153. package/lib/icon/right-shape.d.ts +4 -0
  154. package/lib/icon/search.d.ts +4 -0
  155. package/lib/icon/share.d.ts +4 -0
  156. package/lib/icon/success.d.ts +4 -0
  157. package/lib/icon/switcher-loading.d.ts +4 -0
  158. package/lib/icon/text-file.d.ts +4 -0
  159. package/lib/icon/tree-application-shape.d.ts +4 -0
  160. package/lib/icon/unvisible.d.ts +4 -0
  161. package/lib/icon/warn.d.ts +4 -0
  162. package/lib/index.d.ts +3 -0
  163. package/lib/input/index.d.ts +275 -0
  164. package/lib/input/index.js +15 -60
  165. package/lib/input/input.css +114 -148
  166. package/lib/input/input.d.ts +185 -0
  167. package/lib/input/input.less +107 -40
  168. package/lib/input/input.variable.css +218 -0
  169. package/lib/link/index.d.ts +116 -0
  170. package/lib/link/index.js +1 -0
  171. package/lib/link/link.css +55 -0
  172. package/lib/link/link.d.ts +46 -0
  173. package/lib/link/link.less +74 -0
  174. package/lib/link/link.variable.css +141 -0
  175. package/lib/loading/index.d.ts +125 -0
  176. package/lib/loading/index.js +1 -0
  177. package/lib/loading/loading.css +225 -0
  178. package/lib/loading/loading.d.ts +64 -0
  179. package/lib/loading/loading.less +181 -0
  180. package/lib/loading/loading.variable.css +311 -0
  181. package/lib/menu/index.d.ts +169 -0
  182. package/lib/menu/index.js +1 -0
  183. package/lib/menu/menu-group.d.ts +13 -0
  184. package/lib/menu/menu-item.d.ts +15 -0
  185. package/lib/menu/menu.css +182 -0
  186. package/lib/menu/menu.d.ts +60 -0
  187. package/lib/menu/menu.less +180 -0
  188. package/lib/menu/menu.variable.css +268 -0
  189. package/lib/menu/submenu.d.ts +21 -0
  190. package/lib/menu/submenu.less +5 -0
  191. package/lib/menu/submenu.variable.css +86 -0
  192. package/lib/menu/utils.d.ts +41 -0
  193. package/lib/message/index.d.ts +2 -0
  194. package/lib/message/index.js +1 -0
  195. package/lib/message/message.css +53 -0
  196. package/lib/message/message.less +61 -0
  197. package/lib/message/message.variable.css +139 -0
  198. package/lib/message/messageConstructor.d.ts +61 -0
  199. package/lib/modal/index.d.ts +155 -0
  200. package/lib/modal/index.js +1 -0
  201. package/lib/modal/modal.css +11 -0
  202. package/lib/modal/modal.d.ts +47 -0
  203. package/lib/modal/modal.less +12 -0
  204. package/lib/modal/modal.variable.css +11 -0
  205. package/lib/modal/props.mixin.d.ts +22 -0
  206. package/lib/navigation/index.d.ts +2 -0
  207. package/lib/navigation/index.js +1 -0
  208. package/lib/navigation/navigation-title.d.ts +22 -0
  209. package/lib/navigation/navigation.css +184 -0
  210. package/lib/navigation/navigation.d.ts +94 -0
  211. package/lib/navigation/navigation.less +210 -0
  212. package/lib/navigation/navigation.variable.css +270 -0
  213. package/lib/notify/index.d.ts +2 -0
  214. package/lib/notify/index.js +1 -0
  215. package/lib/notify/notify.css +49 -0
  216. package/lib/notify/notify.less +58 -0
  217. package/lib/notify/notify.variable.css +135 -0
  218. package/lib/notify/notifyConstructor.d.ts +75 -0
  219. package/lib/popover/index.d.ts +202 -0
  220. package/lib/popover/index.js +1 -0
  221. package/lib/popover/popover.css +55 -0
  222. package/lib/popover/popover.d.ts +88 -0
  223. package/lib/popover/popover.less +70 -0
  224. package/lib/popover/popover.variable.css +141 -0
  225. package/lib/preset.d.ts +8 -0
  226. package/lib/progress/circle.d.ts +6 -0
  227. package/lib/progress/index.d.ts +228 -0
  228. package/lib/progress/index.js +1 -0
  229. package/lib/progress/line.d.ts +6 -0
  230. package/lib/progress/progress.css +97 -0
  231. package/lib/progress/progress.d.ts +118 -0
  232. package/lib/progress/progress.less +94 -0
  233. package/lib/progress/progress.variable.css +183 -0
  234. package/lib/radio/common.d.ts +13 -0
  235. package/lib/radio/index.d.ts +228 -0
  236. package/lib/radio/index.js +1 -61
  237. package/lib/radio/radio-button.d.ts +83 -0
  238. package/lib/radio/radio-group.d.ts +40 -0
  239. package/lib/radio/radio.css +128 -125
  240. package/lib/radio/radio.d.ts +77 -0
  241. package/lib/radio/radio.less +173 -20
  242. package/lib/radio/radio.variable.css +224 -0
  243. package/lib/radio/type.d.ts +9 -0
  244. package/lib/rate/index.d.ts +101 -0
  245. package/lib/rate/index.js +1 -0
  246. package/lib/rate/rate.css +10 -0
  247. package/lib/rate/rate.d.ts +29 -0
  248. package/lib/rate/rate.less +11 -0
  249. package/lib/rate/rate.variable.css +10 -0
  250. package/lib/rate/star.css +24 -0
  251. package/lib/rate/star.d.ts +57 -0
  252. package/lib/rate/star.less +29 -0
  253. package/lib/rate/star.variable.css +24 -0
  254. package/lib/select/common.d.ts +28 -0
  255. package/lib/select/index.d.ts +950 -0
  256. package/lib/select/index.js +15 -0
  257. package/lib/select/option.d.ts +32 -0
  258. package/lib/select/optionGroup.d.ts +115 -0
  259. package/lib/select/select.css +157 -0
  260. package/lib/select/select.d.ts +285 -0
  261. package/lib/select/select.less +203 -0
  262. package/lib/select/select.variable.css +243 -0
  263. package/lib/shared/bk-helper-core.d.ts +87 -0
  264. package/lib/shared/bk-mask-manager.d.ts +47 -0
  265. package/lib/shared/bk-pop-manager.d.ts +19 -0
  266. package/lib/shared/bk-popover.d.ts +86 -0
  267. package/lib/shared/index.d.ts +51 -0
  268. package/lib/shared/index.js +1 -13
  269. package/lib/shared/scrollbar-width.d.ts +1 -0
  270. package/lib/shared/vue-types.d.ts +115 -0
  271. package/lib/shared/z-index-manager.d.ts +93 -0
  272. package/lib/sideslider/index.d.ts +139 -0
  273. package/lib/sideslider/index.js +1 -0
  274. package/lib/sideslider/sideslider.css +69 -0
  275. package/lib/sideslider/sideslider.d.ts +54 -0
  276. package/lib/sideslider/sideslider.less +86 -0
  277. package/lib/sideslider/sideslider.variable.css +155 -0
  278. package/lib/slider/index.d.ts +27 -0
  279. package/lib/slider/index.js +15 -0
  280. package/lib/slider/slider-button.d.ts +72 -0
  281. package/lib/slider/slider.css +149 -0
  282. package/lib/slider/slider.d.ts +159 -0
  283. package/lib/slider/slider.less +179 -0
  284. package/lib/slider/slider.variable.css +235 -0
  285. package/lib/steps/index.d.ts +198 -0
  286. package/lib/steps/index.js +15 -0
  287. package/lib/steps/steps.css +285 -0
  288. package/lib/steps/steps.d.ts +148 -0
  289. package/lib/steps/steps.less +320 -0
  290. package/lib/steps/steps.variable.css +371 -0
  291. package/lib/styles/index.d.ts +38 -0
  292. package/lib/styles/index.js +1 -0
  293. package/lib/styles/mixins/animate.css +21 -0
  294. package/lib/styles/mixins/animate.less +27 -0
  295. package/lib/styles/mixins/animate.variable.css +21 -0
  296. package/lib/styles/mixins/ellipsis.less +8 -0
  297. package/lib/styles/mixins/mixins.css +21 -0
  298. package/lib/styles/mixins/mixins.less +2 -0
  299. package/lib/styles/mixins/mixins.variable.css +21 -0
  300. package/lib/styles/mixins/popper.css +43 -0
  301. package/lib/styles/mixins/popper.less +52 -0
  302. package/lib/styles/mixins/popper.variable.css +43 -0
  303. package/lib/styles/mixins/size.less +10 -1
  304. package/lib/styles/reset.css +273 -0
  305. package/lib/styles/reset.less +313 -0
  306. package/lib/styles/reset.variable.css +273 -0
  307. package/lib/styles/themes/themes.less +84 -284
  308. package/lib/switcher/index.d.ts +222 -0
  309. package/lib/switcher/index.js +1 -0
  310. package/lib/switcher/switcher.css +258 -0
  311. package/lib/switcher/switcher.d.ts +97 -0
  312. package/lib/switcher/switcher.less +302 -0
  313. package/lib/switcher/switcher.variable.css +344 -0
  314. package/lib/tab/index.d.ts +416 -0
  315. package/lib/tab/index.js +1 -0
  316. package/lib/tab/tab-nav.d.ts +154 -0
  317. package/lib/tab/tab-panel.d.ts +46 -0
  318. package/lib/tab/tab.css +147 -0
  319. package/lib/tab/tab.d.ts +131 -0
  320. package/lib/tab/tab.less +221 -0
  321. package/lib/tab/tab.variable.css +233 -0
  322. package/lib/table/index.d.ts +119 -0
  323. package/lib/table/index.js +1 -0
  324. package/lib/table/props.d.ts +41 -0
  325. package/lib/table/render.d.ts +47 -0
  326. package/lib/table/table.css +44 -0
  327. package/lib/table/table.d.ts +26 -0
  328. package/lib/table/table.less +67 -0
  329. package/lib/table/table.variable.css +130 -0
  330. package/lib/table/utils.d.ts +22 -0
  331. package/lib/tag/index.d.ts +338 -0
  332. package/lib/tag/index.js +1 -0
  333. package/lib/tag/tag.d.ts +54 -0
  334. package/lib/tag/tag.less +5 -0
  335. package/lib/tag/tag.variable.css +86 -0
  336. package/lib/tree/index.d.ts +149 -0
  337. package/lib/tree/index.js +1 -0
  338. package/lib/tree/tree.css +35 -0
  339. package/lib/tree/tree.d.ts +58 -0
  340. package/lib/tree/tree.less +55 -0
  341. package/lib/tree/tree.variable.css +35 -0
  342. package/lib/tree/util.d.ts +89 -0
  343. package/lib/use-message.d.ts +2 -0
  344. package/package.json +92 -40
  345. package/lib/styles/mixins/size.css +0 -0
  346. package/lib/styles/themes/themes.css +0 -119
  347. package/lib/styles/themes/variables.css +0 -27
  348. package/lib/styles/themes/variables.less +0 -36
@@ -0,0 +1,258 @@
1
+ @keyframes loading-scale-animate {
2
+ 0% {
3
+ transform: scale(1);
4
+ }
5
+ 100% {
6
+ transform: scale(0.6);
7
+ }
8
+ }
9
+ @keyframes fade {
10
+ 100% {
11
+ background-color: transparent;
12
+ }
13
+ }
14
+ .bk-fade-transtion .bk-fade-enter-active,
15
+ .bk-fade-transtion .bk-fade-leave-active {
16
+ transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
17
+ }
18
+ .bk-fade-transtion .bk-fade-enter,
19
+ .bk-fade-transtion .bk-fade-leave-to {
20
+ opacity: 0;
21
+ }
22
+ .bk-switcher {
23
+ position: relative;
24
+ display: inline-block;
25
+ /* 默认尺寸 */
26
+ width: 36px;
27
+ height: 20px;
28
+ line-height: 20px;
29
+ text-align: left;
30
+ vertical-align: middle;
31
+ background-color: #c4c6cc;
32
+ border-radius: 50px;
33
+ transition: all 0.4s ease;
34
+ /* 显示文本时固定尺寸 */
35
+ }
36
+ .bk-switcher:focus {
37
+ box-shadow: 0px 0px 6px #c4c6cc;
38
+ }
39
+ .bk-switcher:after {
40
+ position: absolute;
41
+ top: 2px;
42
+ left: 2px;
43
+ display: block;
44
+ width: 24px;
45
+ height: 24px;
46
+ cursor: pointer;
47
+ background: #fff;
48
+ border-radius: 100px;
49
+ content: '';
50
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
51
+ transition: all 0.3s ease;
52
+ }
53
+ .bk-switcher:not(.show-label):after {
54
+ width: 16px;
55
+ height: 16px;
56
+ }
57
+ .bk-switcher:not(.show-label).is-checked:after {
58
+ margin-left: -18px;
59
+ }
60
+ .bk-switcher.is-loading {
61
+ cursor: defalt;
62
+ }
63
+ .bk-switcher.is-loading input[type=checkbox] {
64
+ cursor: default;
65
+ }
66
+ .bk-switcher .bk-switcher-loading {
67
+ position: absolute;
68
+ top: 50%;
69
+ left: 1px;
70
+ z-index: 10;
71
+ display: flex;
72
+ width: 18px;
73
+ height: 18px;
74
+ transform: translateY(-50%);
75
+ }
76
+ .bk-switcher .bk-switcher-loading svg {
77
+ color: #3a84ff;
78
+ }
79
+ .bk-switcher .switcher-label {
80
+ display: none;
81
+ width: 30px;
82
+ height: 28px;
83
+ margin: 0 0 0 26px;
84
+ font-size: 12px;
85
+ font-weight: normal;
86
+ color: #fff;
87
+ text-align: center;
88
+ vertical-align: top;
89
+ transition: all ease 0.3s;
90
+ }
91
+ .bk-switcher .switcher-label .on-text {
92
+ display: none;
93
+ }
94
+ .bk-switcher .switcher-label .off-text {
95
+ display: inline-block;
96
+ }
97
+ .bk-switcher.show-label {
98
+ width: 60px;
99
+ height: 28px;
100
+ line-height: 28px;
101
+ }
102
+ .bk-switcher.show-label .switcher-label {
103
+ display: inline-block;
104
+ }
105
+ .bk-switcher.show-label .bk-switcher-loading {
106
+ width: 26px;
107
+ height: 26px;
108
+ align-items: center;
109
+ justify-content: center;
110
+ }
111
+ .bk-switcher.show-label .bk-switcher-loading svg {
112
+ font-size: 24px;
113
+ }
114
+ .bk-switcher.is-disabled {
115
+ cursor: default;
116
+ /* background-color: #eee !important; */
117
+ opacity: 0.3;
118
+ }
119
+ .bk-switcher.is-disabled input[type=checkbox] {
120
+ cursor: not-allowed;
121
+ }
122
+ .bk-switcher.is-checked {
123
+ background: #2dcb56;
124
+ }
125
+ .bk-switcher.is-checked:focus {
126
+ box-shadow: 0px 0px 6px #2dcb56;
127
+ }
128
+ .bk-switcher.is-checked.primary {
129
+ background: #3a84ff;
130
+ }
131
+ .bk-switcher.is-checked.primary:focus {
132
+ box-shadow: 0px 0px 6px #3a84ff;
133
+ }
134
+ .bk-switcher.is-checked:after {
135
+ top: 2px;
136
+ left: 100%;
137
+ margin-left: -26px;
138
+ }
139
+ .bk-switcher.is-checked .switcher-label {
140
+ margin-left: 4px;
141
+ }
142
+ .bk-switcher.is-checked .switcher-label .on-text {
143
+ display: inline-block;
144
+ }
145
+ .bk-switcher.is-checked .switcher-label .off-text {
146
+ display: none;
147
+ }
148
+ .bk-switcher.is-checked .bk-switcher-loading {
149
+ right: 1px;
150
+ left: auto;
151
+ }
152
+ .bk-switcher.bk-switcher-outline {
153
+ background: #fff;
154
+ border: 1px solid #c4c6cc;
155
+ }
156
+ .bk-switcher.bk-switcher-outline:after {
157
+ width: 22px;
158
+ height: 22px;
159
+ background-color: #c4c6cc;
160
+ box-shadow: none;
161
+ }
162
+ .bk-switcher.bk-switcher-outline .switcher-label {
163
+ height: 26px;
164
+ margin-left: 24px;
165
+ color: #c4c6cc;
166
+ }
167
+ .bk-switcher.bk-switcher-outline .bk-switcher-loading {
168
+ width: 22px;
169
+ height: 22px;
170
+ align-items: center;
171
+ justify-content: center;
172
+ }
173
+ .bk-switcher.bk-switcher-outline.is-checked {
174
+ border: 1px solid #2dcb56;
175
+ }
176
+ .bk-switcher.bk-switcher-outline.is-checked:after {
177
+ margin-left: -24px;
178
+ background-color: #2dcb56;
179
+ }
180
+ .bk-switcher.bk-switcher-outline.is-checked .switcher-label {
181
+ margin-left: 4px;
182
+ color: #2dcb56;
183
+ }
184
+ .bk-switcher.bk-switcher-outline.is-disabled {
185
+ background-color: #fff;
186
+ border-color: #eee;
187
+ }
188
+ .bk-switcher.bk-switcher-outline.is-disabled .switcher-label {
189
+ color: #eee;
190
+ }
191
+ .bk-switcher.bk-switcher-outline.is-disabled:after {
192
+ background-color: #eee;
193
+ }
194
+ .bk-switcher.bk-switcher-outline.bk-switcher-large:after {
195
+ width: 18px;
196
+ height: 18px;
197
+ }
198
+ .bk-switcher.bk-switcher-outline.bk-switcher-large.is-checked:after {
199
+ margin-left: -20px;
200
+ }
201
+ .bk-switcher.bk-switcher-square {
202
+ border-radius: 2px;
203
+ }
204
+ .bk-switcher.bk-switcher-square:after {
205
+ border-radius: 2px;
206
+ }
207
+ .bk-switcher.bk-switcher-square .switcher-label {
208
+ width: 35px;
209
+ }
210
+ .bk-switcher.bk-switcher-large {
211
+ width: 42px;
212
+ height: 24px;
213
+ line-height: 22px;
214
+ border-radius: 12px;
215
+ }
216
+ .bk-switcher.bk-switcher-large:after {
217
+ width: 20px;
218
+ height: 20px;
219
+ }
220
+ .bk-switcher.bk-switcher-large.is-checked:after {
221
+ top: 2px;
222
+ left: 100%;
223
+ margin-left: -22px;
224
+ }
225
+ .bk-switcher.bk-switcher-large .bk-switcher-loading {
226
+ width: 22px;
227
+ height: 22px;
228
+ }
229
+ .bk-switcher.bk-switcher-small {
230
+ width: 26px;
231
+ height: 16px;
232
+ line-height: 22px;
233
+ }
234
+ .bk-switcher.bk-switcher-small:after {
235
+ width: 12px;
236
+ height: 12px;
237
+ }
238
+ .bk-switcher.bk-switcher-small.is-checked:after {
239
+ top: 2px;
240
+ left: 100%;
241
+ margin-left: -14px;
242
+ }
243
+ .bk-switcher.bk-switcher-small .bk-switcher-loading {
244
+ width: 14px;
245
+ height: 14px;
246
+ }
247
+ .bk-switcher input[type=checkbox],
248
+ .bk-switcher input[type=radio] {
249
+ position: absolute;
250
+ top: 0;
251
+ left: 0;
252
+ z-index: 1;
253
+ width: 100%;
254
+ height: 100%;
255
+ margin: 0;
256
+ cursor: pointer;
257
+ opacity: 0;
258
+ }
@@ -0,0 +1,97 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ theme: import("vue-types").VueTypeDef<string> & {
3
+ default: string;
4
+ };
5
+ size: import("vue-types").VueTypeDef<string>;
6
+ disabled: import("vue-types").VueTypeValidableDef<boolean> & {
7
+ default: boolean;
8
+ };
9
+ showText: import("vue-types").VueTypeValidableDef<boolean> & {
10
+ default: boolean;
11
+ };
12
+ isOutline: import("vue-types").VueTypeValidableDef<boolean> & {
13
+ default: boolean;
14
+ };
15
+ onText: import("vue-types").VueTypeValidableDef<string> & {
16
+ default: string;
17
+ } & {
18
+ default: string;
19
+ };
20
+ offText: import("vue-types").VueTypeValidableDef<string> & {
21
+ default: string;
22
+ } & {
23
+ default: string;
24
+ };
25
+ isSquare: import("vue-types").VueTypeValidableDef<boolean> & {
26
+ default: boolean;
27
+ };
28
+ extCls: import("vue-types").VueTypeValidableDef<string> & {
29
+ default: string;
30
+ };
31
+ preCheck: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
32
+ default: (...args: any[]) => any;
33
+ } & {
34
+ default: (...args: any[]) => any;
35
+ };
36
+ trueValue: import("vue-types").VueTypeDef<string | number | boolean> & {
37
+ default: string | number | boolean;
38
+ };
39
+ falseValue: import("vue-types").VueTypeDef<string | number | boolean> & {
40
+ default: string | number | boolean;
41
+ };
42
+ value: import("vue-types").VueTypeDef<string | number | boolean> & {
43
+ default: string | number | boolean;
44
+ };
45
+ modelValue: import("vue-types").VueTypeDef<string | number | boolean> & {
46
+ default: string | number | boolean;
47
+ };
48
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
49
+ theme?: unknown;
50
+ size?: unknown;
51
+ disabled?: unknown;
52
+ showText?: unknown;
53
+ isOutline?: unknown;
54
+ onText?: unknown;
55
+ offText?: unknown;
56
+ isSquare?: unknown;
57
+ extCls?: unknown;
58
+ preCheck?: unknown;
59
+ trueValue?: unknown;
60
+ falseValue?: unknown;
61
+ value?: unknown;
62
+ modelValue?: unknown;
63
+ } & {
64
+ theme: string;
65
+ value: string | number | boolean;
66
+ extCls: string;
67
+ disabled: boolean;
68
+ modelValue: string | number | boolean;
69
+ showText: boolean;
70
+ isOutline: boolean;
71
+ onText: string;
72
+ offText: string;
73
+ isSquare: boolean;
74
+ trueValue: string | number | boolean;
75
+ falseValue: string | number | boolean;
76
+ } & {
77
+ size?: string;
78
+ preCheck?: (...args: any[]) => any;
79
+ }> & {
80
+ onChange?: (...args: any[]) => any;
81
+ "onUpdate:modelValue"?: (...args: any[]) => any;
82
+ }, {
83
+ theme: string;
84
+ value: string | number | boolean;
85
+ extCls: string;
86
+ disabled: boolean;
87
+ modelValue: string | number | boolean;
88
+ showText: boolean;
89
+ isOutline: boolean;
90
+ onText: string;
91
+ offText: string;
92
+ isSquare: boolean;
93
+ preCheck: (...args: any[]) => any;
94
+ trueValue: string | number | boolean;
95
+ falseValue: string | number | boolean;
96
+ }>;
97
+ export default _default;
@@ -0,0 +1,302 @@
1
+ @import '../styles/themes/themes.less';
2
+ @import '../styles/mixins/mixins.less';
3
+
4
+ .@{bk-prefix}-switcher {
5
+ position: relative;
6
+ display: inline-block;
7
+
8
+ /* 默认尺寸 */
9
+ width: 36px;
10
+ height: 20px;
11
+ line-height: 20px;
12
+ text-align: left;
13
+ vertical-align: middle;
14
+ background-color: @switch-grey-color;
15
+ border-radius: 50px;
16
+ transition: all .4s ease;
17
+
18
+ &:focus {
19
+ box-shadow: 0px 0px 6px @switch-grey-color;
20
+ }
21
+
22
+ &:after {
23
+ position: absolute;
24
+ top: 2px;
25
+ left: 2px;
26
+ display: block;
27
+ width: 24px;
28
+ height: 24px;
29
+ cursor: pointer;
30
+ background: @switch-default-color;
31
+ border-radius: 100px;
32
+ content: '';
33
+ box-shadow: 0 0 3px rgba(0, 0, 0, .2);
34
+ transition: all .3s ease
35
+ }
36
+
37
+ &:not(.show-label):after {
38
+ width: 16px;
39
+ height: 16px;
40
+ }
41
+
42
+ &:not(.show-label).is-checked {
43
+ &:after {
44
+ margin-left: -18px;
45
+ }
46
+ }
47
+
48
+ &.is-loading {
49
+ cursor: defalt;
50
+
51
+ input[type=checkbox] {
52
+ cursor: default;
53
+ }
54
+ }
55
+
56
+ .bk-switcher-loading {
57
+ position: absolute;
58
+ top: 50%;
59
+ left: 1px;
60
+ z-index: 10;
61
+ display: flex;
62
+ width: 18px;
63
+ height: 18px;
64
+ transform: translateY(-50%);
65
+
66
+ svg {
67
+ color: rgb(58, 132, 255);;
68
+ }
69
+ }
70
+
71
+ .switcher-label {
72
+ display: none;
73
+ width: 30px;
74
+ height: 28px;
75
+ margin: 0 0 0 26px;
76
+ font-size: 12px;
77
+ font-weight: normal;
78
+ color: @switch-default-color;
79
+ text-align: center;
80
+ vertical-align: top;
81
+ transition: all ease .3s;
82
+
83
+ .on-text {
84
+ display: none;
85
+ }
86
+
87
+ .off-text {
88
+ display: inline-block
89
+ }
90
+ }
91
+
92
+ /* 显示文本时固定尺寸 */
93
+ &.show-label {
94
+ width: 60px;
95
+ height: 28px;
96
+ line-height: 28px;
97
+
98
+ .switcher-label {
99
+ display: inline-block;
100
+ }
101
+
102
+ .bk-switcher-loading {
103
+ width: 26px;
104
+ height: 26px;
105
+ align-items: center;
106
+ justify-content: center;
107
+
108
+ svg {
109
+ font-size: 24px;
110
+ }
111
+ }
112
+ }
113
+
114
+ &.is-disabled {
115
+ cursor: default;
116
+
117
+ /* background-color: #eee !important; */
118
+ opacity: .3;
119
+
120
+ input[type=checkbox] {
121
+ cursor: not-allowed;
122
+ }
123
+ }
124
+
125
+ &.is-checked {
126
+ background: @success-color;
127
+
128
+ &:focus {
129
+ box-shadow: 0px 0px 6px @success-color;
130
+ }
131
+
132
+ &.primary {
133
+ background: @primary-color;
134
+
135
+ &:focus {
136
+ box-shadow: 0px 0px 6px @primary-color;
137
+ }
138
+ }
139
+
140
+ &:after {
141
+ top: 2px;
142
+ left: 100%;
143
+ margin-left: -26px;
144
+ }
145
+
146
+ .switcher-label {
147
+ margin-left: 4px;
148
+
149
+ .on-text {
150
+ display: inline-block;
151
+ }
152
+
153
+ .off-text {
154
+ display: none;
155
+ }
156
+ }
157
+
158
+ .bk-switcher-loading {
159
+ right: 1px;
160
+ left: auto;
161
+ }
162
+ }
163
+
164
+ &.bk-switcher-outline {
165
+ background: @switch-default-color;
166
+ border: 1px solid @switch-grey-color;
167
+
168
+ &:after {
169
+ width: 22px;
170
+ height: 22px;
171
+ background-color: @switch-grey-color;
172
+ box-shadow: none;
173
+ }
174
+
175
+ .switcher-label {
176
+ height: 26px;
177
+ margin-left: 24px;
178
+ color: @switch-grey-color;
179
+ }
180
+
181
+ .bk-switcher-loading {
182
+ width: 22px;
183
+ height: 22px;
184
+ align-items: center;
185
+ justify-content: center;
186
+ }
187
+
188
+ &.is-checked {
189
+ border: 1px solid @success-color;
190
+
191
+ &:after {
192
+ margin-left: -24px;
193
+ background-color: @success-color;
194
+ }
195
+
196
+ .switcher-label {
197
+ margin-left: 4px;
198
+ color: @success-color;
199
+ }
200
+ }
201
+
202
+ &.is-disabled {
203
+ background-color: @switch-default-color;
204
+ border-color: #eee;
205
+
206
+ .switcher-label {
207
+ color: #eee;
208
+ }
209
+
210
+ &:after {
211
+ background-color: #eee;
212
+ }
213
+ }
214
+
215
+ &.bk-switcher-large {
216
+ &:after {
217
+ width: 18px;
218
+ height: 18px;
219
+ }
220
+
221
+ &.is-checked {
222
+ &:after {
223
+ margin-left: -20px;
224
+ }
225
+ }
226
+ }
227
+ }
228
+
229
+ &.bk-switcher-square {
230
+ border-radius: 2px;
231
+
232
+ &:after {
233
+ border-radius: 2px;
234
+ }
235
+
236
+ .switcher-label {
237
+ width: 35px;
238
+ }
239
+ }
240
+
241
+ &.bk-switcher-large {
242
+ width: 42px;
243
+ height: 24px;
244
+ line-height: 22px;
245
+ border-radius: 12px;
246
+
247
+ &:after {
248
+ width: 20px;
249
+ height: 20px;
250
+ }
251
+
252
+ &.is-checked {
253
+ &:after {
254
+ top: 2px;
255
+ left: 100%;
256
+ margin-left: -22px;
257
+ }
258
+ }
259
+
260
+ .bk-switcher-loading {
261
+ width: 22px;
262
+ height: 22px;
263
+ }
264
+ }
265
+
266
+ &.bk-switcher-small {
267
+ width: 26px;
268
+ height: 16px;
269
+ line-height: 22px;
270
+
271
+ &:after {
272
+ width: 12px;
273
+ height: 12px;
274
+ }
275
+
276
+ &.is-checked {
277
+ &:after {
278
+ top: 2px;
279
+ left: 100%;
280
+ margin-left: -14px;
281
+ }
282
+ }
283
+
284
+ .bk-switcher-loading {
285
+ width: 14px;
286
+ height: 14px;
287
+ }
288
+ }
289
+
290
+ input[type=checkbox],
291
+ input[type=radio] {
292
+ position: absolute;
293
+ top: 0;
294
+ left: 0;
295
+ z-index: 1;
296
+ width: 100%;
297
+ height: 100%;
298
+ margin: 0;
299
+ cursor: pointer;
300
+ opacity: 0;
301
+ }
302
+ }