bkui-vue 0.0.1-beta.6 → 0.0.1-beta.60

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 (506) hide show
  1. package/README.md +31 -19
  2. package/dist/index.cjs.js +57 -0
  3. package/dist/index.esm.js +21606 -0
  4. package/dist/index.umd.js +57 -0
  5. package/dist/style.css +1 -2009
  6. package/lib/alert/alert.d.ts +24 -15
  7. package/lib/alert/alert.variable.css +33 -0
  8. package/lib/alert/index.d.ts +180 -0
  9. package/lib/alert/index.js +1 -1
  10. package/lib/animate-number/animate-number.d.ts +12 -7
  11. package/lib/animate-number/index.d.ts +97 -0
  12. package/lib/animate-number/index.js +1 -1
  13. package/lib/backtop/backtop.d.ts +27 -13
  14. package/lib/backtop/backtop.variable.css +33 -0
  15. package/lib/backtop/index.d.ts +166 -0
  16. package/lib/backtop/index.js +1 -1
  17. package/lib/badge/badge.css +5 -5
  18. package/lib/badge/badge.d.ts +64 -22
  19. package/lib/badge/badge.less +5 -6
  20. package/lib/badge/badge.variable.css +38 -5
  21. package/lib/badge/index.d.ts +267 -0
  22. package/lib/badge/index.js +1 -1
  23. package/lib/breadcrumb/breadcrumb-item.d.ts +13 -9
  24. package/lib/breadcrumb/breadcrumb.css +18 -1
  25. package/lib/breadcrumb/breadcrumb.d.ts +37 -9
  26. package/lib/breadcrumb/breadcrumb.less +13 -2
  27. package/lib/breadcrumb/breadcrumb.variable.css +51 -1
  28. package/lib/breadcrumb/index.d.ts +194 -0
  29. package/lib/breadcrumb/index.js +1 -1
  30. package/lib/button/button-group.d.ts +3 -5
  31. package/lib/button/button.css +41 -21
  32. package/lib/button/button.d.ts +66 -30
  33. package/lib/button/button.less +44 -28
  34. package/lib/button/button.variable.css +74 -21
  35. package/lib/button/index.d.ts +237 -0
  36. package/lib/button/index.js +1 -1
  37. package/lib/card/card.css +53 -1
  38. package/lib/card/card.d.ts +74 -18
  39. package/lib/card/card.less +50 -2
  40. package/lib/card/card.variable.css +86 -1
  41. package/lib/card/index.d.ts +283 -0
  42. package/lib/card/index.js +1 -1
  43. package/lib/checkbox/checkbox-group.d.ts +13 -9
  44. package/lib/checkbox/checkbox.css +12 -0
  45. package/lib/checkbox/checkbox.d.ts +33 -30
  46. package/lib/checkbox/checkbox.less +17 -0
  47. package/lib/checkbox/checkbox.variable.css +45 -0
  48. package/lib/checkbox/common.d.ts +3 -3
  49. package/lib/checkbox/index.d.ts +253 -0
  50. package/lib/checkbox/index.js +1 -1
  51. package/lib/checkbox/type.d.ts +9 -12
  52. package/lib/code-diff/code-diff.css +186 -0
  53. package/lib/code-diff/code-diff.d.ts +80 -0
  54. package/lib/code-diff/code-diff.less +238 -0
  55. package/lib/code-diff/code-diff.variable.css +280 -0
  56. package/lib/code-diff/index.d.ts +154 -0
  57. package/lib/code-diff/index.js +1 -0
  58. package/lib/collapse/collapse.css +8 -0
  59. package/lib/collapse/collapse.d.ts +50 -18
  60. package/lib/collapse/collapse.less +10 -0
  61. package/lib/collapse/collapse.variable.css +8 -0
  62. package/lib/collapse/index.d.ts +166 -0
  63. package/lib/collapse/index.js +1 -1
  64. package/lib/components.d.ts +42 -0
  65. package/lib/components.js +1 -0
  66. package/lib/container/col.d.ts +51 -0
  67. package/lib/container/container.css +48 -0
  68. package/lib/container/container.d.ts +83 -0
  69. package/lib/container/container.less +20 -0
  70. package/lib/container/container.variable.css +142 -0
  71. package/lib/container/index.d.ts +223 -0
  72. package/lib/container/index.js +1 -0
  73. package/lib/container/row.d.ts +4 -0
  74. package/lib/date-picker/date-picker.css +407 -0
  75. package/lib/date-picker/date-picker.d.ts +294 -0
  76. package/lib/date-picker/date-picker.less +526 -0
  77. package/lib/date-picker/date-picker.variable.css +501 -0
  78. package/lib/date-picker/fecha.d.ts +6 -0
  79. package/lib/date-picker/index.d.ts +713 -0
  80. package/lib/date-picker/index.js +1 -0
  81. package/lib/date-picker/interface.d.ts +22 -0
  82. package/lib/date-picker/props.d.ts +111 -0
  83. package/lib/date-picker/utils.d.ts +97 -0
  84. package/lib/dialog/dialog.css +40 -0
  85. package/lib/dialog/dialog.d.ts +226 -51
  86. package/lib/dialog/dialog.less +16 -0
  87. package/lib/dialog/dialog.variable.css +40 -0
  88. package/lib/dialog/index.d.ts +608 -0
  89. package/lib/dialog/index.js +1 -1
  90. package/lib/directives/clickoutside.d.ts +3 -0
  91. package/lib/directives/index.d.ts +3 -0
  92. package/lib/directives/index.js +2 -15
  93. package/lib/directives/index.js.LICENSE.txt +14 -0
  94. package/lib/directives/tooltips.d.ts +17 -0
  95. package/lib/dist.index.js +1 -0
  96. package/lib/divider/divider.css +38 -0
  97. package/lib/divider/divider.d.ts +48 -0
  98. package/lib/divider/divider.less +53 -0
  99. package/lib/divider/divider.variable.css +132 -0
  100. package/lib/divider/index.d.ts +142 -0
  101. package/lib/divider/index.js +1 -0
  102. package/lib/divider/props.d.ts +21 -0
  103. package/lib/dropdown/dropdown-item.d.ts +19 -0
  104. package/lib/dropdown/dropdown-menu.d.ts +16 -0
  105. package/lib/dropdown/dropdown.css +43 -0
  106. package/lib/dropdown/dropdown.d.ts +63 -0
  107. package/lib/dropdown/dropdown.less +54 -0
  108. package/lib/dropdown/dropdown.variable.css +137 -0
  109. package/lib/dropdown/index.d.ts +200 -0
  110. package/lib/dropdown/index.js +1 -0
  111. package/lib/exception/exception.d.ts +11 -9
  112. package/lib/exception/exception.variable.css +33 -0
  113. package/lib/exception/index.d.ts +96 -0
  114. package/lib/exception/index.js +1 -1
  115. package/lib/fixed-navbar/fixed-navbar.d.ts +15 -9
  116. package/lib/fixed-navbar/fixed-navbar.variable.css +33 -0
  117. package/lib/fixed-navbar/index.d.ts +112 -0
  118. package/lib/fixed-navbar/index.js +1 -1
  119. package/lib/form/common.d.ts +3 -0
  120. package/lib/form/compose-form-item.d.ts +16 -0
  121. package/lib/form/form-item.d.ts +145 -0
  122. package/lib/form/form.css +113 -0
  123. package/lib/form/form.d.ts +64 -0
  124. package/lib/form/form.less +141 -0
  125. package/lib/form/form.variable.css +207 -0
  126. package/lib/form/index.d.ts +262 -0
  127. package/lib/form/index.js +1 -0
  128. package/lib/form/type.d.ts +21 -0
  129. package/lib/form/validator.d.ts +8 -0
  130. package/lib/icon/angle-double-down-line.d.ts +4 -0
  131. package/lib/icon/angle-double-down-line.js +1 -0
  132. package/lib/icon/angle-double-left-line.d.ts +4 -0
  133. package/lib/icon/angle-double-left-line.js +1 -0
  134. package/lib/icon/angle-double-left.d.ts +4 -0
  135. package/lib/icon/angle-double-left.js +1 -0
  136. package/lib/icon/angle-double-right-line.d.ts +4 -0
  137. package/lib/icon/angle-double-right-line.js +1 -0
  138. package/lib/icon/angle-double-right.d.ts +4 -0
  139. package/lib/icon/angle-double-right.js +1 -0
  140. package/lib/icon/angle-double-up-line.d.ts +4 -0
  141. package/lib/icon/angle-double-up-line.js +1 -0
  142. package/lib/icon/angle-down-fill.d.ts +4 -0
  143. package/lib/icon/angle-down-fill.js +1 -0
  144. package/lib/icon/angle-down-line.d.ts +4 -0
  145. package/lib/icon/angle-down-line.js +1 -0
  146. package/lib/icon/angle-down.d.ts +4 -0
  147. package/lib/icon/angle-down.js +1 -0
  148. package/lib/icon/angle-left.d.ts +4 -0
  149. package/lib/icon/angle-left.js +1 -0
  150. package/lib/icon/angle-right.d.ts +4 -0
  151. package/lib/icon/angle-right.js +1 -0
  152. package/lib/icon/angle-up-fill.d.ts +4 -0
  153. package/lib/icon/angle-up-fill.js +1 -0
  154. package/lib/icon/angle-up.d.ts +4 -0
  155. package/lib/icon/angle-up.js +1 -0
  156. package/lib/icon/arrows-left.d.ts +4 -0
  157. package/lib/icon/arrows-left.js +1 -0
  158. package/lib/icon/arrows-right.d.ts +4 -0
  159. package/lib/icon/arrows-right.js +1 -0
  160. package/lib/icon/bk.d.ts +4 -0
  161. package/lib/icon/bk.js +1 -0
  162. package/lib/icon/circle.d.ts +4 -0
  163. package/lib/icon/circle.js +1 -0
  164. package/lib/icon/close-line.d.ts +4 -0
  165. package/lib/icon/close-line.js +1 -0
  166. package/lib/icon/close.d.ts +4 -0
  167. package/lib/icon/close.js +1 -0
  168. package/lib/icon/code.d.ts +4 -0
  169. package/lib/icon/code.js +1 -0
  170. package/lib/icon/cog-shape.d.ts +4 -0
  171. package/lib/icon/cog-shape.js +1 -0
  172. package/lib/icon/collapse-left.d.ts +4 -0
  173. package/lib/icon/collapse-left.js +1 -0
  174. package/lib/icon/copy.d.ts +4 -0
  175. package/lib/icon/copy.js +1 -0
  176. package/lib/icon/data-shape.d.ts +4 -0
  177. package/lib/icon/data-shape.js +1 -0
  178. package/lib/icon/done.d.ts +4 -0
  179. package/lib/icon/done.js +1 -0
  180. package/lib/icon/down-shape.d.ts +4 -0
  181. package/lib/icon/down-shape.js +1 -0
  182. package/lib/icon/down-small.d.ts +4 -0
  183. package/lib/icon/down-small.js +1 -0
  184. package/lib/icon/edit-line.d.ts +4 -0
  185. package/lib/icon/edit-line.js +1 -0
  186. package/lib/icon/ellipsis.d.ts +4 -0
  187. package/lib/icon/ellipsis.js +1 -0
  188. package/lib/icon/error.d.ts +4 -0
  189. package/lib/icon/error.js +1 -0
  190. package/lib/icon/eye.d.ts +4 -0
  191. package/lib/icon/eye.js +1 -0
  192. package/lib/icon/folder-open.d.ts +4 -0
  193. package/lib/icon/folder-open.js +1 -0
  194. package/lib/icon/folder-shape-open.d.ts +4 -0
  195. package/lib/icon/folder-shape-open.js +1 -0
  196. package/lib/icon/folder-shape.d.ts +4 -0
  197. package/lib/icon/folder-shape.js +1 -0
  198. package/lib/icon/folder.d.ts +4 -0
  199. package/lib/icon/folder.js +1 -0
  200. package/lib/icon/funnel.d.ts +4 -0
  201. package/lib/icon/help-document-fill.d.ts +4 -0
  202. package/lib/icon/help-document-fill.js +1 -0
  203. package/lib/icon/help-fill.d.ts +4 -0
  204. package/lib/icon/help-fill.js +1 -0
  205. package/lib/icon/help.d.ts +4 -0
  206. package/lib/icon/help.js +1 -0
  207. package/lib/icon/icon.d.ts +12 -0
  208. package/lib/icon/index.d.ts +57 -0
  209. package/lib/icon/index.js +1 -15
  210. package/lib/icon/info-line.d.ts +4 -0
  211. package/lib/icon/info-line.js +1 -0
  212. package/lib/icon/info.d.ts +4 -0
  213. package/lib/icon/info.js +1 -0
  214. package/lib/icon/left-shape.d.ts +4 -0
  215. package/lib/icon/left-shape.js +1 -0
  216. package/lib/icon/play-shape.d.ts +4 -0
  217. package/lib/icon/play-shape.js +1 -0
  218. package/lib/icon/plus.d.ts +4 -0
  219. package/lib/icon/plus.js +1 -0
  220. package/lib/icon/qq.d.ts +4 -0
  221. package/lib/icon/qq.js +1 -0
  222. package/lib/icon/right-shape.d.ts +4 -0
  223. package/lib/icon/right-shape.js +1 -0
  224. package/lib/icon/search.d.ts +4 -0
  225. package/lib/icon/search.js +1 -0
  226. package/lib/icon/share.d.ts +4 -0
  227. package/lib/icon/share.js +1 -0
  228. package/lib/icon/spinner.d.ts +4 -0
  229. package/lib/icon/spinner.js +1 -0
  230. package/lib/icon/success.d.ts +4 -0
  231. package/lib/icon/success.js +1 -0
  232. package/lib/icon/switcher-loading.d.ts +4 -0
  233. package/lib/icon/switcher-loading.js +1 -0
  234. package/lib/icon/text-file.d.ts +4 -0
  235. package/lib/icon/text-file.js +1 -0
  236. package/lib/icon/tree-application-shape.d.ts +4 -0
  237. package/lib/icon/tree-application-shape.js +1 -0
  238. package/lib/icon/unvisible.d.ts +4 -0
  239. package/lib/icon/unvisible.js +1 -0
  240. package/lib/icon/up-shape.d.ts +4 -0
  241. package/lib/icon/up-shape.js +1 -0
  242. package/lib/icon/warn.d.ts +4 -0
  243. package/lib/icon/warn.js +1 -0
  244. package/lib/icon/weixin.d.ts +4 -0
  245. package/lib/icon/weixin.js +1 -0
  246. package/lib/index.d.ts +3 -0
  247. package/lib/index.js +1 -0
  248. package/lib/input/index.d.ts +451 -0
  249. package/lib/input/index.js +1 -15
  250. package/lib/input/input.css +75 -4
  251. package/lib/input/input.d.ts +118 -43
  252. package/lib/input/input.less +86 -8
  253. package/lib/input/input.variable.css +109 -4
  254. package/lib/link/index.d.ts +164 -0
  255. package/lib/link/index.js +1 -1
  256. package/lib/link/link.d.ts +25 -13
  257. package/lib/link/link.variable.css +33 -0
  258. package/lib/loading/index.d.ts +172 -0
  259. package/lib/loading/index.js +1 -1
  260. package/lib/loading/loading.css +118 -73
  261. package/lib/loading/loading.d.ts +67 -20
  262. package/lib/loading/loading.less +75 -58
  263. package/lib/loading/loading.variable.css +151 -73
  264. package/lib/menu/index.d.ts +188 -0
  265. package/lib/menu/index.js +1 -0
  266. package/lib/menu/menu-group.d.ts +14 -0
  267. package/lib/menu/menu-item.d.ts +16 -0
  268. package/lib/menu/menu.css +190 -0
  269. package/lib/menu/menu.d.ts +64 -0
  270. package/lib/menu/menu.less +180 -0
  271. package/lib/menu/menu.variable.css +284 -0
  272. package/lib/menu/submenu.css +3 -0
  273. package/lib/menu/submenu.d.ts +22 -0
  274. package/lib/menu/submenu.less +5 -0
  275. package/lib/menu/submenu.variable.css +97 -0
  276. package/lib/menu/utils.d.ts +41 -0
  277. package/lib/message/index.d.ts +2 -0
  278. package/lib/message/index.js +1 -0
  279. package/lib/message/message.css +62 -0
  280. package/lib/message/message.less +72 -0
  281. package/lib/message/message.variable.css +156 -0
  282. package/lib/message/messageConstructor.d.ts +106 -0
  283. package/lib/modal/index.d.ts +374 -0
  284. package/lib/modal/index.js +1 -1
  285. package/lib/modal/modal.css +20 -0
  286. package/lib/modal/modal.d.ts +108 -27
  287. package/lib/modal/modal.less +27 -0
  288. package/lib/modal/modal.variable.css +20 -0
  289. package/lib/modal/props.mixin.d.ts +44 -11
  290. package/lib/navigation/index.d.ts +2 -0
  291. package/lib/navigation/index.js +1 -0
  292. package/lib/navigation/navigation-title.d.ts +25 -0
  293. package/lib/navigation/navigation.css +184 -0
  294. package/lib/navigation/navigation.d.ts +111 -0
  295. package/lib/navigation/navigation.less +210 -0
  296. package/lib/navigation/navigation.variable.css +278 -0
  297. package/lib/notify/index.d.ts +2 -0
  298. package/lib/notify/index.js +1 -0
  299. package/lib/notify/notify.css +49 -0
  300. package/lib/notify/notify.less +58 -0
  301. package/lib/notify/notify.variable.css +143 -0
  302. package/lib/notify/notifyConstructor.d.ts +91 -0
  303. package/lib/pagination/index.d.ts +395 -0
  304. package/lib/pagination/index.js +1 -0
  305. package/lib/pagination/pagination.css +179 -0
  306. package/lib/pagination/pagination.d.ts +220 -0
  307. package/lib/pagination/pagination.less +201 -0
  308. package/lib/pagination/pagination.variable.css +273 -0
  309. package/lib/pagination/type.d.ts +6 -0
  310. package/lib/pagination/use-limit.d.ts +8 -0
  311. package/lib/pagination/use-list.d.ts +8 -0
  312. package/lib/pagination/use-small-list.d.ts +5 -0
  313. package/lib/pagination/use-total.d.ts +5 -0
  314. package/lib/popover/index.d.ts +318 -0
  315. package/lib/popover/index.js +1 -1
  316. package/lib/popover/popover.css +23 -14
  317. package/lib/popover/popover.d.ts +90 -46
  318. package/lib/popover/popover.less +57 -46
  319. package/lib/popover/popover.variable.css +56 -14
  320. package/lib/popover/props.d.ts +89 -0
  321. package/lib/preset.d.ts +7 -0
  322. package/lib/preset.js +1 -0
  323. package/lib/process/index.d.ts +205 -0
  324. package/lib/process/index.js +1 -0
  325. package/lib/process/process.css +138 -0
  326. package/lib/process/process.d.ts +131 -0
  327. package/lib/process/process.less +178 -0
  328. package/lib/process/process.variable.css +232 -0
  329. package/lib/progress/index.d.ts +398 -0
  330. package/lib/progress/index.js +1 -1
  331. package/lib/progress/progress.css +8 -3
  332. package/lib/progress/progress.d.ts +88 -35
  333. package/lib/progress/progress.less +0 -4
  334. package/lib/progress/progress.variable.css +41 -3
  335. package/lib/radio/common.d.ts +5 -5
  336. package/lib/radio/index.d.ts +278 -0
  337. package/lib/radio/index.js +1 -1
  338. package/lib/radio/radio-button.d.ts +29 -20
  339. package/lib/radio/radio-group.d.ts +11 -10
  340. package/lib/radio/radio.css +8 -2
  341. package/lib/radio/radio.d.ts +27 -17
  342. package/lib/radio/radio.less +9 -2
  343. package/lib/radio/radio.variable.css +41 -2
  344. package/lib/radio/type.d.ts +10 -5
  345. package/lib/rate/index.d.ts +113 -0
  346. package/lib/rate/index.js +1 -1
  347. package/lib/rate/rate.d.ts +13 -10
  348. package/lib/rate/star.d.ts +33 -16
  349. package/lib/resize-layout/index.d.ts +336 -0
  350. package/lib/resize-layout/index.js +1 -0
  351. package/lib/resize-layout/resize-layout.css +189 -0
  352. package/lib/resize-layout/resize-layout.d.ts +127 -0
  353. package/lib/resize-layout/resize-layout.less +233 -0
  354. package/lib/resize-layout/resize-layout.variable.css +283 -0
  355. package/lib/select/common.d.ts +23 -17
  356. package/lib/select/index.d.ts +1377 -0
  357. package/lib/select/index.js +1 -1
  358. package/lib/select/option.d.ts +12 -19
  359. package/lib/select/optionGroup.d.ts +54 -0
  360. package/lib/select/select.css +248 -17
  361. package/lib/select/select.d.ts +282 -156
  362. package/lib/select/select.less +251 -46
  363. package/lib/select/select.variable.css +281 -17
  364. package/lib/select/type.d.ts +31 -0
  365. package/lib/shared/{bk-helper-core.d.ts → helper.d.ts} +6 -1
  366. package/lib/shared/index.d.ts +52 -0
  367. package/lib/shared/index.js +1 -1
  368. package/lib/shared/{bk-mask-manager.d.ts → mask-manager.d.ts} +32 -3
  369. package/lib/shared/{bk-pop-manager.d.ts → pop-manager.d.ts} +8 -1
  370. package/lib/shared/{bk-popover.d.ts → popover.d.ts} +57 -6
  371. package/lib/shared/utils.d.ts +6 -0
  372. package/lib/shared/vue-types.d.ts +8 -7
  373. package/lib/shared/z-index-manager.d.ts +6 -1
  374. package/lib/sideslider/index.d.ts +337 -0
  375. package/lib/sideslider/index.js +1 -1
  376. package/lib/sideslider/sideslider.d.ts +114 -30
  377. package/lib/sideslider/sideslider.variable.css +33 -0
  378. package/lib/slider/index.d.ts +27 -0
  379. package/lib/slider/index.js +1 -0
  380. package/lib/slider/slider-button.d.ts +80 -0
  381. package/lib/slider/slider.css +149 -0
  382. package/lib/slider/slider.d.ts +201 -0
  383. package/lib/slider/slider.less +179 -0
  384. package/lib/slider/slider.variable.css +243 -0
  385. package/lib/steps/index.d.ts +250 -0
  386. package/lib/steps/index.js +1 -0
  387. package/lib/steps/steps.css +288 -0
  388. package/lib/steps/steps.d.ts +161 -0
  389. package/lib/steps/steps.less +324 -0
  390. package/lib/steps/steps.variable.css +382 -0
  391. package/lib/styles/index.d.ts +48 -0
  392. package/lib/styles/mixins/clearfix.css +8 -0
  393. package/lib/styles/mixins/clearfix.less +10 -0
  394. package/lib/styles/mixins/clearfix.variable.css +8 -0
  395. package/lib/styles/mixins/mixins.css +8 -0
  396. package/lib/styles/mixins/mixins.less +1 -0
  397. package/lib/styles/mixins/mixins.variable.css +8 -0
  398. package/lib/styles/mixins/popper.css +43 -0
  399. package/lib/styles/mixins/popper.less +52 -0
  400. package/lib/styles/mixins/popper.variable.css +43 -0
  401. package/lib/styles/mixins/size.less +9 -0
  402. package/lib/styles/reset.css +273 -0
  403. package/lib/styles/reset.less +313 -0
  404. package/lib/styles/reset.variable.css +273 -0
  405. package/lib/styles/themes/themes.less +53 -2
  406. package/lib/swiper/index.d.ts +181 -0
  407. package/lib/swiper/index.js +1 -0
  408. package/lib/swiper/swiper.css +91 -0
  409. package/lib/swiper/swiper.d.ts +65 -0
  410. package/lib/swiper/swiper.less +107 -0
  411. package/lib/swiper/swiper.variable.css +91 -0
  412. package/lib/switcher/index.d.ts +286 -0
  413. package/lib/switcher/index.js +1 -1
  414. package/lib/switcher/switcher.css +157 -135
  415. package/lib/switcher/switcher.d.ts +48 -32
  416. package/lib/switcher/switcher.less +211 -153
  417. package/lib/switcher/switcher.variable.css +190 -135
  418. package/lib/tab/index.d.ts +443 -0
  419. package/lib/tab/index.js +1 -0
  420. package/lib/tab/props.d.ts +191 -0
  421. package/lib/tab/tab-nav.d.ts +165 -0
  422. package/lib/tab/tab-panel.d.ts +73 -0
  423. package/lib/tab/tab.css +148 -0
  424. package/lib/tab/tab.d.ts +140 -0
  425. package/lib/tab/tab.less +222 -0
  426. package/lib/tab/tab.variable.css +242 -0
  427. package/lib/table/const.d.ts +4 -0
  428. package/lib/table/index.d.ts +359 -0
  429. package/lib/table/index.js +1 -1
  430. package/lib/table/plugins/head-filter.css +68 -0
  431. package/lib/table/plugins/head-filter.less +83 -0
  432. package/lib/table/plugins/head-filter.variable.css +162 -0
  433. package/lib/table/plugins/head-sort.css +22 -0
  434. package/lib/table/plugins/head-sort.less +28 -0
  435. package/lib/table/plugins/head-sort.variable.css +116 -0
  436. package/lib/table/plugins/settings.css +110 -0
  437. package/lib/table/plugins/settings.less +136 -0
  438. package/lib/table/plugins/settings.variable.css +204 -0
  439. package/lib/table/props.d.ts +184 -0
  440. package/lib/table/render.d.ts +120 -0
  441. package/lib/table/table.css +321 -0
  442. package/lib/table/table.d.ts +114 -36
  443. package/lib/table/table.less +160 -1
  444. package/lib/table/table.variable.css +354 -0
  445. package/lib/table/use-common.d.ts +20 -0
  446. package/lib/table/utils.d.ts +83 -0
  447. package/lib/tag/index.d.ts +229 -0
  448. package/lib/tag/index.js +1 -1
  449. package/lib/tag/tag.css +97 -0
  450. package/lib/tag/tag.d.ts +83 -53
  451. package/lib/tag/tag.less +110 -2
  452. package/lib/tag/tag.variable.css +130 -0
  453. package/lib/tag-input/common.d.ts +24 -0
  454. package/lib/tag-input/index.d.ts +2 -0
  455. package/lib/tag-input/index.js +1 -0
  456. package/lib/tag-input/list-tag-render.d.ts +47 -0
  457. package/lib/tag-input/tag-input.css +208 -0
  458. package/lib/tag-input/tag-input.d.ts +374 -0
  459. package/lib/tag-input/tag-input.less +250 -0
  460. package/lib/tag-input/tag-input.variable.css +302 -0
  461. package/lib/tag-input/tag-props.d.ts +131 -0
  462. package/lib/tag-input/tag-render.d.ts +38 -0
  463. package/lib/timeline/index.d.ts +129 -0
  464. package/lib/timeline/index.js +1 -0
  465. package/lib/timeline/timeline.css +235 -0
  466. package/lib/timeline/timeline.d.ts +81 -0
  467. package/lib/timeline/timeline.less +239 -0
  468. package/lib/timeline/timeline.variable.css +329 -0
  469. package/lib/transfer/index.d.ts +351 -0
  470. package/lib/transfer/index.js +1 -0
  471. package/lib/transfer/transfer.css +158 -0
  472. package/lib/transfer/transfer.d.ts +185 -0
  473. package/lib/transfer/transfer.less +171 -0
  474. package/lib/transfer/transfer.variable.css +252 -0
  475. package/lib/tree/index.d.ts +266 -0
  476. package/lib/tree/index.js +1 -0
  477. package/lib/tree/props.d.ts +99 -0
  478. package/lib/tree/tree.css +50 -0
  479. package/lib/tree/tree.d.ts +110 -0
  480. package/lib/tree/tree.less +63 -0
  481. package/lib/tree/tree.variable.css +144 -0
  482. package/lib/tree/use-async.d.ts +5 -0
  483. package/lib/tree/use-node-action.d.ts +6 -0
  484. package/lib/tree/use-node-attribute.d.ts +13 -0
  485. package/lib/tree/util.d.ts +70 -0
  486. package/lib/use-form.d.ts +3 -0
  487. package/lib/use-message.d.ts +2 -0
  488. package/lib/virtual-render/index.d.ts +556 -0
  489. package/lib/virtual-render/index.js +1 -0
  490. package/lib/virtual-render/props.d.ts +157 -0
  491. package/lib/virtual-render/v-virtual-render.d.ts +7 -0
  492. package/lib/virtual-render/virtual-render.css +33 -0
  493. package/lib/virtual-render/virtual-render.d.ts +244 -0
  494. package/lib/virtual-render/virtual-render.less +43 -0
  495. package/lib/virtual-render/virtual-render.variable.css +33 -0
  496. package/package.json +108 -79
  497. package/dist/bkui-vue.cjs.js +0 -4887
  498. package/dist/bkui-vue.esm.js +0 -4883
  499. package/dist/bkui-vue.umd.js +0 -4890
  500. package/lib/checkbox-group/index.js +0 -1
  501. package/lib/radio-button/index.js +0 -1
  502. package/lib/radio-group/index.js +0 -1
  503. package/lib/styles/index.js +0 -1
  504. package/lib/table/common.d.ts +0 -3
  505. package/lib/table/table-layout.d.ts +0 -14
  506. package/lib/table/type.d.ts +0 -12
package/lib/tag/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue)}(this,(function(e,n){"use strict";var t=n.defineComponent({name:"BkTag",props:{},setup:function(){return function(){return n.createVNode("div",null,[n.createTextVNode("Tag")])}}});t.install=function(e){e.component(t.name,t)},e.default=t,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon")):t(e["../shared"],e.vue,e["../icon"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o)=>(()=>{"use strict";var r={6870:e=>{e.exports=o},4212:t=>{t.exports=e},748:e=>{e.exports=t}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={exports:{}};return r[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.r(a),n.d(a,{default:()=>c});var e=n(4212);function t(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var o=n(748),r=n(6870);const s=(0,o.defineComponent)({name:"Tag",props:{theme:e.PropTypes.theme(["success","info","warning","danger"]).def(""),closable:e.PropTypes.bool.def(!1),type:e.PropTypes.commonType(["","filled","stroke"]).def(""),checkable:e.PropTypes.bool.def(!1),checked:e.PropTypes.bool.def(!1),radius:e.PropTypes.string.def("2px"),extCls:e.PropTypes.string.def("")},emits:["change","close"],slots:["icon"],setup:function(r,s){var n=s.emit;return{wrapperCls:(0,o.computed)((function(){var o;return(0,e.classes)((t(o={"bk-tag-closable":r.closable,"bk-tag-checkable":r.checkable,"bk-tag-check":r.checked},"bk-tag-".concat(r.type),r.type),t(o,"bk-tag-".concat(r.theme),r.theme),t(o,r.extCls,!!r.extCls),o),"bk-tag")})),wrapperStyle:(0,o.computed)((function(){return{borderRadius:r.radius}})),handleClose:function(e){e.preventDefault(),e.stopPropagation(),n("close",e)},handleClick:function(e){e.preventDefault(),e.stopPropagation(),r.checkable&&n("change",!r.checked)}}},render:function(){var e,t;return(0,o.createVNode)("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?(0,o.createVNode)("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",(0,o.createVNode)("span",{class:"bk-tag-text"},[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)]),this.closable?(0,o.createVNode)(r.Error,{class:"bk-tag-close",onClick:this.handleClose},null):""])}}),c=(0,e.withInstall)(s)})(),a})()));
@@ -0,0 +1,97 @@
1
+ .bk-tag {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ height: 22px;
5
+ padding: 0 10px;
6
+ margin: 2px 6px 2px 0px;
7
+ font-size: 12px;
8
+ line-height: 22px;
9
+ color: #63656e;
10
+ cursor: default;
11
+ background-color: rgba(151, 155, 165, 0.1);
12
+ border-color: rgba(217, 220, 230, 0.6);
13
+ box-sizing: border-box;
14
+ }
15
+ .bk-tag.bk-tag-success {
16
+ color: #14a568;
17
+ border-color: rgba(20, 165, 104, 0.3);
18
+ background-color: rgba(20, 165, 104, 0.1);
19
+ }
20
+ .bk-tag.bk-tag-success.bk-tag-filled {
21
+ background-color: #14a568;
22
+ }
23
+ .bk-tag.bk-tag-info {
24
+ color: #3a84ff;
25
+ border-color: rgba(58, 132, 255, 0.3);
26
+ background-color: rgba(58, 132, 255, 0.1);
27
+ }
28
+ .bk-tag.bk-tag-info.bk-tag-filled {
29
+ background-color: #3a84ff;
30
+ }
31
+ .bk-tag.bk-tag-warning {
32
+ color: #fe9c00;
33
+ border-color: rgba(254, 165, 0, 0.3);
34
+ background-color: rgba(254, 156, 0, 0.1);
35
+ }
36
+ .bk-tag.bk-tag-warning.bk-tag-filled {
37
+ background-color: #fe9c00;
38
+ }
39
+ .bk-tag.bk-tag-danger {
40
+ color: #ea3636;
41
+ border-color: rgba(234, 53, 54, 0.3);
42
+ background-color: rgba(234, 53, 54, 0.1);
43
+ }
44
+ .bk-tag.bk-tag-danger.bk-tag-filled {
45
+ background-color: #ea3636;
46
+ }
47
+ .bk-tag:hover {
48
+ opacity: 0.8;
49
+ }
50
+ .bk-tag.bk-tag-filled {
51
+ color: #fff;
52
+ background-color: #979ba5;
53
+ }
54
+ .bk-tag.bk-tag-stroke {
55
+ padding: 0 9px;
56
+ line-height: 20px;
57
+ border-style: solid;
58
+ border-width: 1px;
59
+ }
60
+ .bk-tag.bk-tag-closable {
61
+ padding: 0 4px 0 10px;
62
+ }
63
+ .bk-tag.bk-tag-checkable {
64
+ cursor: pointer;
65
+ background: none;
66
+ }
67
+ .bk-tag.bk-tag-checkable:hover {
68
+ background: rgba(151, 155, 165, 0.15);
69
+ }
70
+ .bk-tag.bk-tag-check {
71
+ color: #fff;
72
+ background: #3a84ff;
73
+ }
74
+ .bk-tag.bk-tag-check:hover {
75
+ color: #fff;
76
+ background: #3a84ff;
77
+ opacity: 1;
78
+ }
79
+ .bk-tag .bk-tag-text {
80
+ flex: 1;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+ }
85
+ .bk-tag .bk-tag-icon {
86
+ flex-shrink: 0;
87
+ margin-right: 4px;
88
+ font-size: 14px;
89
+ line-height: 0;
90
+ }
91
+ .bk-tag .bk-tag-close {
92
+ flex-shrink: 0;
93
+ margin-left: 4px;
94
+ font-size: 12px;
95
+ line-height: 0;
96
+ cursor: pointer;
97
+ }
package/lib/tag/tag.d.ts CHANGED
@@ -1,54 +1,84 @@
1
- declare const _default: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
2
- [x: string]: unknown;
3
- }>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<(readonly unknown[] & {
4
- [x: number]: string;
5
- } & {
6
- [Symbol.iterator]?: IterableIterator<string>;
7
- map?: <U>(callbackfn: (value: string, index: number, array: readonly string[]) => U, thisArg?: any) => U[];
8
- filter?: {
9
- <S extends string>(predicate: (value: string, index: number, array: readonly string[]) => value is S, thisArg?: any): S[];
10
- (predicate: (value: string, index: number, array: readonly string[]) => unknown, thisArg?: any): string[];
11
- };
12
- length?: number;
13
- toString?: string;
14
- toLocaleString?: string;
15
- concat?: string[];
16
- join?: string;
17
- slice?: string[];
18
- indexOf?: (searchElement: string, fromIndex?: number) => number;
19
- lastIndexOf?: (searchElement: string, fromIndex?: number) => number;
20
- every?: {
21
- <S_1 extends string>(predicate: (value: string, index: number, array: readonly string[]) => value is S_1, thisArg?: any): this is readonly S_1[];
22
- (predicate: (value: string, index: number, array: readonly string[]) => unknown, thisArg?: any): boolean;
23
- };
24
- some?: (predicate: (value: string, index: number, array: readonly string[]) => unknown, thisArg?: any) => boolean;
25
- forEach?: (callbackfn: (value: string, index: number, array: readonly string[]) => void, thisArg?: any) => void;
26
- reduce?: {
27
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: readonly string[]) => string): string;
28
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: readonly string[]) => string, initialValue: string): string;
29
- <U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: readonly string[]) => U_1, initialValue: U_1): U_1;
30
- };
31
- reduceRight?: {
32
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: readonly string[]) => string): string;
33
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: readonly string[]) => string, initialValue: string): string;
34
- <U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: readonly string[]) => U_2, initialValue: U_2): U_2;
35
- };
36
- find?: {
37
- <S_2 extends string>(predicate: (this: void, value: string, index: number, obj: readonly string[]) => value is S_2, thisArg?: any): S_2;
38
- (predicate: (value: string, index: number, obj: readonly string[]) => unknown, thisArg?: any): string;
39
- };
40
- findIndex?: (predicate: (value: string, index: number, obj: readonly string[]) => unknown, thisArg?: any) => number;
41
- entries?: IterableIterator<[number, string]>;
42
- keys?: IterableIterator<number>;
43
- values?: IterableIterator<string>;
44
- includes?: (searchElement: string, fromIndex?: number) => boolean;
45
- flatMap?: <U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[];
46
- flat?: unknown[];
47
- }) | ({
48
- [x: string]: unknown;
49
- } & {} & {
50
- [x: string]: unknown;
51
- })> & {}, {
52
- [x: number]: string;
53
- } | {}>;
1
+ declare const _default: import("vue").DefineComponent<{
2
+ theme: import("vue-types").VueTypeDef<string> & {
3
+ default: string;
4
+ };
5
+ closable: import("vue-types").VueTypeValidableDef<boolean> & {
6
+ default: boolean;
7
+ } & {
8
+ default: boolean;
9
+ };
10
+ type: import("vue-types").VueTypeDef<string> & {
11
+ default: string;
12
+ };
13
+ checkable: import("vue-types").VueTypeValidableDef<boolean> & {
14
+ default: boolean;
15
+ } & {
16
+ default: boolean;
17
+ };
18
+ checked: import("vue-types").VueTypeValidableDef<boolean> & {
19
+ default: boolean;
20
+ } & {
21
+ default: boolean;
22
+ };
23
+ radius: import("vue-types").VueTypeValidableDef<string> & {
24
+ default: string;
25
+ } & {
26
+ default: string;
27
+ };
28
+ extCls: import("vue-types").VueTypeValidableDef<string> & {
29
+ default: string;
30
+ } & {
31
+ default: string;
32
+ };
33
+ }, {
34
+ wrapperCls: import("vue").ComputedRef<string>;
35
+ wrapperStyle: import("vue").ComputedRef<{
36
+ borderRadius: string;
37
+ }>;
38
+ handleClose: (e: Event) => void;
39
+ handleClick: (e: Event) => void;
40
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "change")[], "close" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
+ theme: import("vue-types").VueTypeDef<string> & {
42
+ default: string;
43
+ };
44
+ closable: import("vue-types").VueTypeValidableDef<boolean> & {
45
+ default: boolean;
46
+ } & {
47
+ default: boolean;
48
+ };
49
+ type: import("vue-types").VueTypeDef<string> & {
50
+ default: string;
51
+ };
52
+ checkable: import("vue-types").VueTypeValidableDef<boolean> & {
53
+ default: boolean;
54
+ } & {
55
+ default: boolean;
56
+ };
57
+ checked: import("vue-types").VueTypeValidableDef<boolean> & {
58
+ default: boolean;
59
+ } & {
60
+ default: boolean;
61
+ };
62
+ radius: import("vue-types").VueTypeValidableDef<string> & {
63
+ default: string;
64
+ } & {
65
+ default: string;
66
+ };
67
+ extCls: import("vue-types").VueTypeValidableDef<string> & {
68
+ default: string;
69
+ } & {
70
+ default: string;
71
+ };
72
+ }>> & {
73
+ onChange?: (...args: any[]) => any;
74
+ onClose?: (...args: any[]) => any;
75
+ }, {
76
+ type: string;
77
+ theme: string;
78
+ closable: boolean;
79
+ extCls: string;
80
+ radius: string;
81
+ checked: boolean;
82
+ checkable: boolean;
83
+ }>;
54
84
  export default _default;
package/lib/tag/tag.less CHANGED
@@ -1,5 +1,113 @@
1
1
  @import '../styles/themes/themes.less';
2
2
 
3
- .@{bk-prefix}-tag {
4
-
3
+ @tag-base-color: #fff;
4
+ @tag-success-color: #14a568;
5
+ @tag-info-color: @primary-color;
6
+ @tag-warning-color: #fe9c00;
7
+ @tag-danger-color: @danger-color;
8
+
9
+ @tag-success-bg-color: rgba(20,165,104,.1);
10
+ @tag-info-bg-color: rgba(58,132,255,.1);
11
+ @tag-warning-bg-color: rgba(254,156,0,.1);
12
+ @tag-danger-bg-color: rgba(234,53,54,.1);
13
+ @tag-filled-bg-color: #979ba5;
14
+
15
+ @tag-success-border-color: rgba(20,165,104,.3);
16
+ @tag-info-border-color: rgba(58,132,255,.3);
17
+ @tag-warning-border-color: rgba(254,165,0,.3);
18
+ @tag-danger-border-color: rgba(234,53,54,.3);
19
+
20
+ @tag-checkable-hover-bg-color: rgba(151,155,165,.15);
21
+
22
+ @themeSelectors: success, info, warning, danger;
23
+
24
+ .bk-tag {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ height: 22px;
28
+ padding: 0 10px;
29
+ margin: 2px 6px 2px 0px;
30
+ font-size: 12px;
31
+ line-height: 22px;
32
+ color: @default-color;
33
+ cursor: default;
34
+ background-color: rgba(151,155,165,.1);
35
+ border-color: rgba(217, 220, 230, .6);
36
+ box-sizing: border-box;
37
+
38
+ each(@themeSelectors, {
39
+ @color: 'tag-@{value}-color';
40
+ @borderColor: 'tag-@{value}-border-color';
41
+ @bgColor: 'tag-@{value}-bg-color';
42
+ &.bk-tag-@{value} {
43
+ color: @@color;
44
+ border-color: @@borderColor;
45
+ background-color: @@bgColor;
46
+ &.bk-tag-filled {
47
+ background-color: @@color;
48
+ }
49
+ }
50
+ });
51
+
52
+ &:hover {
53
+ opacity: .8;
54
+ }
55
+
56
+ &.bk-tag-filled {
57
+ color: @tag-base-color;
58
+ background-color: @tag-filled-bg-color;
59
+ }
60
+
61
+ &.bk-tag-stroke {
62
+ padding: 0 9px;
63
+ line-height: 20px;
64
+ border-style: solid;
65
+ border-width: 1px;
66
+ }
67
+
68
+ &.bk-tag-closable {
69
+ padding: 0 4px 0 10px;
70
+ }
71
+
72
+ &.bk-tag-checkable {
73
+ cursor: pointer;
74
+ background: none;
75
+
76
+ &:hover {
77
+ background: @tag-checkable-hover-bg-color;
78
+ }
79
+ }
80
+
81
+ &.bk-tag-check {
82
+ color: @tag-base-color;
83
+ background: @tag-info-color;
84
+
85
+ &:hover {
86
+ color: @tag-base-color;
87
+ background: @tag-info-color;
88
+ opacity: 1;
89
+ }
90
+ }
91
+
92
+ .bk-tag-text {
93
+ flex: 1;
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ white-space: nowrap;
97
+ }
98
+
99
+ .bk-tag-icon {
100
+ flex-shrink: 0;
101
+ margin-right: 4px;
102
+ font-size: 14px;
103
+ line-height: 0;
104
+ }
105
+
106
+ .bk-tag-close {
107
+ flex-shrink: 0;
108
+ margin-left: 4px;
109
+ font-size: 12px;
110
+ line-height: 0;
111
+ cursor: pointer;
112
+ }
5
113
  }
@@ -1,10 +1,12 @@
1
1
  :root {
2
2
  --bk-prefix: bk;
3
+ --popover-max-height: 216px;
3
4
  --primary-color: #3a84ff;
4
5
  --success-color: #2dcb56;
5
6
  --warning-color: #ff9c01;
6
7
  --danger-color: #ea3636;
7
8
  --default-color: #63656e;
9
+ --gray-color: #979ba5;
8
10
  --light-gray: #c4c6cc;
9
11
  --white-color: white;
10
12
  --disable-color: #dcdee5;
@@ -58,4 +60,132 @@
58
60
  --link-success-disabled-color: #94f5a4;
59
61
  --link-warning-disabled-color: #ffd695;
60
62
  --link-danger-disabled-color: #fd9c9c;
63
+ --message-color: var(--default-color);
64
+ --message-primary-bg-color: #f0f8ff;
65
+ --message-primary-border-color: #e1ecff;
66
+ --message-warning-bg-color: #fff4e2;
67
+ --message-warning-border-color: #ffe8c3;
68
+ --message-success-bg-color: #f2fff4;
69
+ --message-success-border-color: #dcffe2;
70
+ --message-danger-bg-color: #ffeded;
71
+ --message-danger-border-color: #ffdddd;
72
+ --slider-default-bg: #dcdee5;
73
+ --slider-disable-bar-bg: #979ba5;
74
+ --menu-bg-color: #182132;
75
+ --submenu-bg-color: #151d2c;
76
+ --menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
77
+ --menu-color: #96a2b9;
78
+ --menu-group-color: var(--default-color);
79
+ --menu-width: 260px;
80
+ --menu-collapse-width: 60px;
81
+ --menu-active-color: white;
82
+ --nav-header-bg-color: #182132;
83
+ --nav-bg-color: #182132;
84
+ --date-picker-disabled-bg: #fafbfd;
85
+ --date-picker-dropdown-mb: 4px;
86
+ --date-picker-dropdown-bg: #fff;
87
+ --table-bg-color: var(--white-color);
88
+ --table-border-color: #dcdee5;
89
+ --table-head-bg-color: #fafbfd;
90
+ --table-head-font-color: #313238;
91
+ --table-body-font-color: #575961;
92
+ --table-row-hover-bg-color: #f5f7fa;
93
+ --table-row-active-bg-color: #f0f1f5;
94
+ }
95
+ .bk-tag {
96
+ display: inline-flex;
97
+ align-items: center;
98
+ height: 22px;
99
+ padding: 0 10px;
100
+ margin: 2px 6px 2px 0px;
101
+ font-size: 12px;
102
+ line-height: 22px;
103
+ color: var(--default-color);
104
+ cursor: default;
105
+ background-color: rgba(151, 155, 165, 0.1);
106
+ border-color: rgba(217, 220, 230, 0.6);
107
+ box-sizing: border-box;
108
+ }
109
+ .bk-tag.bk-tag-success {
110
+ color: #14a568;
111
+ border-color: rgba(20, 165, 104, 0.3);
112
+ background-color: rgba(20, 165, 104, 0.1);
113
+ }
114
+ .bk-tag.bk-tag-success.bk-tag-filled {
115
+ background-color: #14a568;
116
+ }
117
+ .bk-tag.bk-tag-info {
118
+ color: var(--primary-color);
119
+ border-color: rgba(58, 132, 255, 0.3);
120
+ background-color: rgba(58, 132, 255, 0.1);
121
+ }
122
+ .bk-tag.bk-tag-info.bk-tag-filled {
123
+ background-color: var(--primary-color);
124
+ }
125
+ .bk-tag.bk-tag-warning {
126
+ color: #fe9c00;
127
+ border-color: rgba(254, 165, 0, 0.3);
128
+ background-color: rgba(254, 156, 0, 0.1);
129
+ }
130
+ .bk-tag.bk-tag-warning.bk-tag-filled {
131
+ background-color: #fe9c00;
132
+ }
133
+ .bk-tag.bk-tag-danger {
134
+ color: var(--danger-color);
135
+ border-color: rgba(234, 53, 54, 0.3);
136
+ background-color: rgba(234, 53, 54, 0.1);
137
+ }
138
+ .bk-tag.bk-tag-danger.bk-tag-filled {
139
+ background-color: var(--danger-color);
140
+ }
141
+ .bk-tag:hover {
142
+ opacity: 0.8;
143
+ }
144
+ .bk-tag.bk-tag-filled {
145
+ color: #fff;
146
+ background-color: #979ba5;
147
+ }
148
+ .bk-tag.bk-tag-stroke {
149
+ padding: 0 9px;
150
+ line-height: 20px;
151
+ border-style: solid;
152
+ border-width: 1px;
153
+ }
154
+ .bk-tag.bk-tag-closable {
155
+ padding: 0 4px 0 10px;
156
+ }
157
+ .bk-tag.bk-tag-checkable {
158
+ cursor: pointer;
159
+ background: none;
160
+ }
161
+ .bk-tag.bk-tag-checkable:hover {
162
+ background: rgba(151, 155, 165, 0.15);
163
+ }
164
+ .bk-tag.bk-tag-check {
165
+ color: #fff;
166
+ background: var(--primary-color);
167
+ }
168
+ .bk-tag.bk-tag-check:hover {
169
+ color: #fff;
170
+ background: var(--primary-color);
171
+ opacity: 1;
172
+ }
173
+ .bk-tag .bk-tag-text {
174
+ flex: 1;
175
+ overflow: hidden;
176
+ text-overflow: ellipsis;
177
+ white-space: nowrap;
178
+ }
179
+ .bk-tag .bk-tag-icon {
180
+ flex-shrink: 0;
181
+ margin-right: 4px;
182
+ font-size: 14px;
183
+ line-height: 0;
184
+ }
185
+ .bk-tag .bk-tag-close {
186
+ flex-shrink: 0;
187
+ margin-left: 4px;
188
+ font-size: 12px;
189
+ line-height: 0;
190
+ cursor: pointer;
61
191
  }
@@ -0,0 +1,24 @@
1
+ import { Ref } from 'vue';
2
+ import type { TagProps } from './tag-props';
3
+ export declare const INPUT_MIN_WIDTH = 12;
4
+ export declare function useDebouncedRef<T>(value: any, delay?: number): Ref<T>;
5
+ export declare function usePage(pageSize: Ref<number>): {
6
+ pageState: {
7
+ curPage: number;
8
+ totalSize: number;
9
+ totalPage: number;
10
+ pageSize: number;
11
+ isPageLoading: boolean;
12
+ curPageList: any[];
13
+ renderListPaged: any[];
14
+ };
15
+ initPage: (allList?: any[]) => void;
16
+ pageChange: (page: number) => void;
17
+ };
18
+ export declare function useFlatList(props: TagProps): any[];
19
+ /**
20
+ * 获取字符长度,汉字两个字节
21
+ * @param str 需要计算长度的字符
22
+ * @returns 字符长度
23
+ */
24
+ export declare const getCharLength: (str: string) => number;
@@ -0,0 +1,2 @@
1
+ import TagInput from './tag-input';
2
+ export default TagInput;
@@ -0,0 +1 @@
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../directives"),require("../icon"),require("../loading"),require("../popover"),require("../shared"));else if("function"==typeof define&&define.amd)define(["vue","../directives","../icon","../loading","../popover","../shared"],t);else{var r="object"==typeof exports?t(require("vue"),require("../directives"),require("../icon"),require("../loading"),require("../popover"),require("../shared")):t(e.vue,e["../directives"],e["../icon"],e["../loading"],e["../popover"],e["../shared"]);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(self,((e,t,r,a,n,o)=>(()=>{"use strict";var i={4061:e=>{e.exports=t},6870:e=>{e.exports=r},4870:e=>{e.exports=a},5537:e=>{e.exports=n},4212:e=>{e.exports=o},748:t=>{t.exports=e}},l={};function s(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return i[e](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function r(e,r){if(e){if("string"==typeof e)return t(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,r):void 0}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}s.r(u),s.d(u,{default:()=>b});var o=s(748),i=s(4061),l=s(6870),c=s(4870),d=s.n(c),p=s(5537),f=s.n(p),g=12,v=function(e){for(var t=e.length,r=0,a=0;a<t;a++)0!=(65280&e.charCodeAt(a))&&(r+=1),r+=1;return r},h=s(4212);const y=(0,o.defineComponent)({name:"ListTagRender",props:{node:h.PropTypes.object,searchKey:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.arrayOf(h.PropTypes.string)]),displayKey:h.PropTypes.string,searchKeyword:h.PropTypes.string,tpl:{type:Function,default:null}},render:function(){var e=this,t=function(t){if(e.searchKeyword){var r=new RegExp("(".concat(e.searchKeyword,")"),"i");return t.replace(r,'<strong class="highlight-text">$1</strong>')}return t};if(this.tpl)return this.tpl(this.node,t,o.h,this);var r=this.node[this.displayKey];return(0,o.createVNode)("div",{class:"bk-selector-node"},[(0,o.createVNode)("span",{class:"text",innerHTML:t(r)},[r])])}}),m=(0,o.defineComponent)({name:"TagRender",props:{node:h.PropTypes.object,displayKey:h.PropTypes.string,tpl:{type:Function,default:null}},render:function(){return this.tpl?this.tpl(this.node,o.h,this):(0,o.createVNode)("div",{class:"tag"},[(0,o.createVNode)("span",{class:"text"},[this.node[this.displayKey]])])}}),T=(0,o.defineComponent)({name:"BkTagInput",directives:{bkTooltips:i.bkTooltips},props:{modelValue:h.PropTypes.arrayOf(h.PropTypes.string).def([]),placeholder:h.PropTypes.string.def("请输入并按 Enter 结束"),list:h.PropTypes.arrayOf(h.PropTypes.object).def([]),disabled:h.PropTypes.bool.def(!1),tooltipKey:h.PropTypes.string.def(""),saveKey:h.PropTypes.string.def("id"),displayKey:h.PropTypes.string.def("name"),hasDeleteIcon:h.PropTypes.bool.def(!1),clearable:h.PropTypes.bool.def(!0),trigger:h.PropTypes.commonType(["focus","search"]).def("search"),searchKey:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.arrayOf(h.PropTypes.string)]).def("name"),useGroup:h.PropTypes.bool.def(!1),allowCreate:h.PropTypes.bool.def(!1),maxData:h.PropTypes.number.def(-1),maxResult:h.PropTypes.number.def(10),contentMaxHeight:h.PropTypes.number.def(300),contentWidth:h.PropTypes.number.def(190),separator:h.PropTypes.string.def(""),allowNextFocus:h.PropTypes.bool.def(!0),allowAutoMatch:h.PropTypes.bool.def(!1),showClearOnlyHover:h.PropTypes.bool.def(!1),leftSpace:h.PropTypes.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}},emits:["update:modelValue","change","select","blur","remove","removeAll"],setup:function(t,i){var l=i.emit,s=(0,o.reactive)({isEdit:!1,isHover:!1,focusItemIndex:t.allowCreate?-1:0}),u=(0,o.reactive)({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),c=function(e){var t=(0,o.reactive)({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:function(){var e,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.curPage=1,t.totalSize=a.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;var o=[];if(t.pageSize>0)for(var i=0;i<t.totalSize;i+=t.pageSize)o.push(a.slice(i,i+t.pageSize));(e=t.renderListPaged).splice.apply(e,[0,t.renderListPaged.length].concat(o)),(r=t.curPageList).splice.apply(r,[0,t.curPageList.length].concat(n(t.renderListPaged[t.curPage-1]||[])))},pageChange:function(e){var r;t.curPage=e,(r=t.curPageList).splice.apply(r,[t.curPageList.length,0].concat(n(t.renderListPaged[t.curPage-1]||[]))),t.isPageLoading=!1}}}((0,o.toRefs)(t).maxResult),d=c.pageState,p=c.initPage,f=c.pageChange,h=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,a=e;return(0,o.customRef)((function(e,n){return{get:function(){return e(),a},set:function(e){clearTimeout(t),t=setTimeout((function(){a=e,n()}),r)}}}))}("",150),y=(0,o.ref)(null),m=(0,o.ref)(null),T=(0,o.ref)(null),b=(0,o.ref)(null),L=(0,o.ref)(null),w=(0,o.ref)(null),P=(0,o.ref)(null),x=(0,o.computed)((function(){return!t.disabled&&t.hasDeleteIcon})),I=(0,o.computed)((function(){return 1===t.maxData})),S=(0,o.computed)((function(){return 0===R.selectedTagList.length&&""===h.value&&!s.isEdit})),C=(0,o.computed)((function(){return t.clearable&&!t.disabled&&0!==R.selectedTagList.length&&(!t.showClearOnlyHover||s.isHover)})),K=(0,o.computed)((function(){return{"bk-tag-input-trigger":!0,active:s.isEdit,disabled:t.disabled}}));(0,o.watch)([function(){return n(t.modelValue)},function(){return n(t.list)}],(function(){D()})),(0,o.watch)(h,(function(e){var r=0!==d.curPageList.length;""!==e&&r||""===e&&"focus"===t.trigger?u.isShow=!0:"focus"===t.trigger&&r||(u.isShow=!1)})),(0,o.watch)((function(){return u.isShow}),(function(e){k(),e&&L.value&&((0,o.nextTick)((function(){L.value.scrollTop=0})),L.value.removeEventListener("scroll",V),L.value.addEventListener("scroll",V))}));var k=function(){var e,t,r=I.value?0:null===(e=b.value)||void 0===e?void 0:e.offsetLeft;u.modifiers=[{name:"offset",options:{offset:[r,4]}}],null===(t=w.value)||void 0===t||t.update()},V=function(){if(!d.isPageLoading&&0!==L.value.scrollTop){var e=L.value;if(e.scrollTop+e.offsetHeight>=e.scrollHeight){var t=d.curPage+1;t<=d.totalPage&&(d.isPageLoading=!0,setTimeout((function(){f(t)}),500))}}},N=function(){var e;return Array.from((null===(e=T.value)||void 0===e?void 0:e.childNodes)||[]).filter((function(e){return e.nodeType!==Node.TEXT_NODE}))},A=function(e){if(!t.disabled){if(null==e?void 0:e.target){var r=e.target.className;(r.indexOf("bk-tag-input-trigger")>-1||r.indexOf("tag-list")>-1)&&T.value.appendChild(b.value)}clearTimeout(P.value),I.value&&O.value.length&&(R.tagListCache=n(O.value),R.selectedTagListCache=n(R.selectedTagList),h.value=R.selectedTagListCache[0][t.saveKey],W(R.selectedTagList[0],0),q()),s.isEdit=!0,(0,o.nextTick)((function(){var e;null===(e=y.value)||void 0===e||e.focus(),"focus"===t.trigger&&0!==R.localList.length&&(F(),u.isShow?k():u.isShow=!0)}))}},R=(0,o.reactive)({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),O=(0,o.computed)((function(){return R.selectedTagList.map((function(e){return e[t.saveKey]}))})),j=function(e){var t=(0,o.toRefs)(e),r=t.useGroup,a=t.saveKey,i=t.displayKey,l=t.list,s=(0,o.reactive)([]);return(0,o.watch)([r,a,i,l],(function(){var e=l.value;r.value&&(e=l.value.reduce((function(e,t){var r=[];return t.children&&(r=t.children.map((function(e){return Object.assign({group:{groupId:t[a.value],groupName:t[i.value]}},e)}))),e.concat(r)}),[])),s.splice.apply(s,[0,s.length].concat(n(e)))}),{immediate:!0,deep:!0}),s}(t),E=(0,o.computed)((function(){if(t.useGroup){var e={};return d.curPageList.forEach((function(t,r){t.__index__=r,e[t.group.groupId]||(e[t.group.groupId]={id:t.group.groupId,name:t.group.groupName,children:[]}),e[t.group.groupId].children.push(t)})),Object.keys(e).map((function(t){return e[t]}))}return d.curPageList})),D=function(){var e=t.saveKey,r=t.modelValue,o=t.displayKey,i=t.allowCreate,l=t.trigger;R.selectedTagList=[],R.localList=n(j),r.length&&(r.forEach((function(t){var r=R.localList.find((function(r){return t===r[e]}));if(void 0!==r)R.selectedTagList.push(r);else if(i&&!O.value.includes(t)){var n;R.selectedTagList.push((a(n={},e,t),a(n,o,t),n))}})),I.value||(R.localList=R.localList.filter((function(t){return!r.includes(t[e])})))),"focus"===l&&F()},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=t.searchKey,a=t.filterCallback,n=e.toLowerCase(),o=[];if("function"==typeof a)o=a(n,r,R.localList)||[];else if(Array.isArray(r)){var i=r.map((function(e){return R.localList.filter((function(t){return-1!==t[e].toLowerCase().indexOf(n)}))}));o=Array.from(new Set(i.flat()))}else o=R.localList.filter((function(e){return-1!==e[r].toLowerCase().indexOf(n)}));p(o)};(0,o.onMounted)((function(){D()}));var z=function(){h.value=""},_=function(){if(I.value)return 0;var e=N().findIndex((function(e){return"tagInputItem"===e.id}));return e>=0?e:0},M=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t&&e){var a=t;r&&(a=t.nextElementSibling||null),t.parentNode.insertBefore(e,a)}},q=function(e){var r=t.maxData,a=t.trigger,n=t.allowCreate;if(-1===r||r>O.value.length){var o=((null==e?void 0:e.target)?e.target:h).value,i=v(o);i?(F(o),y.value.style.width="".concat(i*g,"px")):"focus"===a&&F()}else H(),h.value="",u.isShow=!1;s.isEdit=!0,s.focusItemIndex=n?-1:0},H=function(){P.value=setTimeout((function(){var e,a,n=h.value;if(z(),s.isEdit=!1,I.value){var o=(e=R.tagListCache,a=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(o.push(a.value),!t||o.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw n}}return o}}(e,a)||r(e,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];n&&n===o&&R.selectedTagListCache.length?U(R.selectedTagListCache[0],"select"):G("remove")}else if(t.allowAutoMatch&&n){var i=d.curPageList.find((function(e){return Array.isArray(t.searchKey)?t.searchKey.map((function(t){return e[t]})).includes(n):e[t.searchKey]===n}));i?B(i,"select"):t.allowCreate&&B(n,"custom")}u.isShow=!1,l("blur",n,O.value)}),50)},B=function(e,t,r){null==r||r.stopPropagation(),e&&!e.disabled&&(I.value&&(R.tagListCache=[],R.selectedTagListCache=[],R.selectedTagList=[]),U(e,t),G("select"),z(),u.isShow=!1)},G=function(e){l("change",O.value),l(e),l("update:modelValue",O.value)},Z=function(){var e=L.value.clientHeight,t=L.value.getBoundingClientRect().y;(0,o.nextTick)((function(){var r=L.value.querySelector(".bk-selector-actived");if(r){var a=r.clientHeight,n=r.getBoundingClientRect().y;n<t&&(L.value.scrollTop=L.value.scrollTop-(t-n));var o=n+a-t;o>e&&(L.value.scrollTop=L.value.scrollTop+o-e)}}))},U=function(r,i){if(!(R.selectedTagList.length>=t.maxData&&-1!==t.maxData)){var l,s=t.separator,u=t.saveKey,c=t.displayKey,d=t.createTagValidator,p=_(),f=1,v=!1,h=function(e){return"function"!=typeof d||d(e)},m=function(e){return R.localList.find((function(t){return t[u]===e}))};if("custom"===i)if(s){var T,L=r.split(s),w=(L=L.filter((function(e){return(null==e?void 0:e.trim())&&!O.value.includes(e)&&h(e)}))).map((function(e){var t;return m(e)||(a(t={},u,e),a(t,c,e),t)}));L.length&&((T=R.selectedTagList).splice.apply(T,[p,0].concat(n(w))),f=w.length,v=!0)}else{var P="object"===e(r);if(void 0!==(l=(l=P?r[u]:r.trim()).replace(/\s+/g,""))&&!O.value.includes(l)&&h(l)){var x,S=m(l)||(P?r:(a(x={},u,l),a(x,c,l),x));R.selectedTagList.splice(p,0,S),v=!0}}else r&&(void 0===(l=r[u])||O.value.includes(l)||(R.selectedTagList.splice(p,0,r),v=!0));v&&(0,o.nextTick)((function(){for(var e=1;e<=f;e++){var r=N()[p+e];M(r,b.value)}y.value.style.width="".concat(g,"px"),I.value||(t.allowNextFocus&&A(),R.localList=R.localList.filter((function(e){return!O.value.includes(e[u])})))}))}},W=function(e,r){R.selectedTagList.splice(r,1);var a=j.some((function(r){return r===e[t.saveKey]}));(t.allowCreate&&a||!t.allowCreate)&&!I.value&&R.localList.push(e)};return Object.assign(Object.assign(Object.assign(Object.assign({popoverProps:u},(0,o.toRefs)(s)),(0,o.toRefs)(R)),(0,o.toRefs)(d)),{isShowPlaceholder:S,isShowClear:C,curInputValue:h,formatList:j,renderList:E,showTagClose:x,tagInputRef:y,bkTagSelectorRef:m,tagListRef:T,tagInputItemRef:b,selectorListRef:L,popoverRef:w,triggerClass:K,focusInputTrigger:A,activeClass:function(e,r){var a={"bk-selector-actived":!1,"bk-selector-selected":O.value.includes(e[t.saveKey])};return t.useGroup?a["bk-selector-actived"]=e.__index__===s.focusItemIndex:a["bk-selector-actived"]=r===s.focusItemIndex,a},handleInput:q,handleFocus:function(){var e;u.width=I.value?null===(e=m.value)||void 0===e?void 0:e.clientWidth:t.contentWidth},handleBlur:H,handleTagSelected:B,handleTagRemove:function(e,t,r){null==r||r.stopPropagation(),W(e,t),z(),G("remove"),y.value.style.width="".concat(g,"px")},handleClear:function(e){e.stopPropagation();var r=R.selectedTagList;R.selectedTagList=[];var a,o=j.filter((function(e){return r.some((function(r){return r[t.saveKey]===e[t.saveKey]}))}));(!t.allowCreate||0===o.length)&&t.allowCreate||I.value||(a=R.localList).push.apply(a,n(o)),G("removeAll")},tagFocus:function(e){t.disabled||(M(b.value,e.currentTarget,!0),y.value.style.width="".concat(g,"px"),u.isShow&&k())},handleKeydown:function(e){if(!d.isPageLoading){var r=e.target.value,a=v(r),n=_(),o=N();switch(e.code){case"ArrowUp":if(e.preventDefault(),!u.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,-1===s.focusItemIndex&&(s.focusItemIndex=d.curPageList.length-1),Z();break;case"ArrowDown":if(e.preventDefault(),!u.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>d.curPageList.length-1?d.curPageList.length:s.focusItemIndex,s.focusItemIndex===d.curPageList.length&&(s.focusItemIndex=0),Z();break;case"ArrowLeft":if(s.isEdit=!0,!a){if(n<1)return;M(b.value,o[n-1]),A()}break;case"ArrowRight":if(s.isEdit=!0,!a){if(n===o.length-1)return;M(o[n+1],b.value),A()}break;case"Enter":case"NumpadEnter":!t.allowCreate&&u.isShow||t.allowCreate&&s.focusItemIndex>=0&&u.isShow?B(d.curPageList[s.focusItemIndex],"select",e):t.allowCreate&&B(h.value,"custom",e),e.preventDefault();break;case"Backspace":0===n||h.value||function(e,r){var a=N();M(b.value,a[e-1]),R.selectedTagList.splice(e-1,1),A();var n=j.some((function(e){return e===r[t.saveKey]}));(t.allowCreate&&n||!t.allowCreate)&&!I.value&&R.localList.push(r),y.value="".concat(g,"px"),G("remove")}(n,R.selectedTagList[n-1])}}},handlePaste:function(e){if(e.preventDefault(),I.value)return!1;var r=t.maxData,o=t.saveKey,i=t.pasteFn,l=e.clipboardData.getData("text"),s=i?i(l):function(e){var r=[];return e.split(";").forEach((function(e){if(e.match(/^[a-zA-Z][a-zA-Z_]+/g)){var n,o=e.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");r.push((a(n={},t.saveKey,o),a(n,t.displayKey,o),n))}})),r}(l),u=s.map((function(e){return e[o]}));if(u.length){var c=N(),d=_(),p=R.localList.map((function(e){return e[o]}));if(u=u.filter((function(e){return(null==e?void 0:e.trim())&&!O.value.includes(e)&&p.includes(e)})),-1!==r){var f=R.selectedTagList.length;if(f<r){var v=r-f;u.length>v&&(u=n(u.slice(0,v)))}else u=[]}var h,m=R.localList.filter((function(e){return u.includes(e[o])}));u.length&&((h=R.selectedTagList).splice.apply(h,[d,0].concat(n(m))),M(b.value,c[d]),y.value.style.width="".concat(g,"px"),R.localList=R.localList.filter((function(e){return!u.includes(e[o])})),G("select"),A())}}})},render:function(){var e=this;return(0,o.createVNode)("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:function(){return e.isHover=!0},onMouseleave:function(){return e.isHover=!1}},[(0,o.createVNode)(f(),{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:function(){return(0,o.createVNode)("div",{class:e.triggerClass},[(0,o.createVNode)("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:"".concat(e.leftSpace,"px")}},[e.selectedTagList.map((function(t,r){var a={boundary:"window",theme:"light",distance:12,content:t[e.tooltipKey],disabled:!e.tooltipKey};return(0,o.withDirectives)((0,o.createVNode)("li",{class:"tag-item",onClick:e.tagFocus},[(0,o.createVNode)(m,{node:t,tpl:e.tagTpl,displayKey:e.displayKey},null),e.showTagClose?(0,o.createVNode)(l.Error,{class:"remove-tag",onClick:e.handleTagRemove.bind(e,t,r)},null):null]),[[(0,o.resolveDirective)("bk-tooltips"),a]])})),(0,o.withDirectives)((0,o.createVNode)("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[(0,o.withDirectives)((0,o.createVNode)("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":function(t){return e.curInputValue=t},onInput:e.handleInput,onFocus:e.handleFocus,onBlur:e.handleBlur,onKeydown:e.handleKeydown,onPaste:e.handlePaste},null),[[o.vModelText,e.curInputValue]])]),[[o.vShow,e.isEdit]])]),(0,o.withDirectives)((0,o.createVNode)("p",{class:"placeholder"},[e.placeholder]),[[o.vShow,e.isShowPlaceholder]]),e.isShowClear?(0,o.createVNode)(l.Close,{class:"clear-icon",onClick:e.handleClear},null):null])},content:function(){return(0,o.createVNode)("div",{class:"bk-selector-list"},[(0,o.createVNode)("ul",{ref:"selectorListRef",style:{"max-height":"".concat(e.contentMaxHeight,"px")},class:"outside-ul"},[e.useGroup?e.renderList.map((function(t){return(0,o.createVNode)("li",{class:"bk-selector-group-item"},[(0,o.createVNode)("span",{class:"group-name"},[t.name,(0,o.createTextVNode)(" ("),t.children.length,(0,o.createTextVNode)(")")]),(0,o.createVNode)("ul",{class:"bk-selector-group-list-item"},[t.children.map((function(t,r){return(0,o.createVNode)("li",{class:["bk-selector-list-item",{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,o.createVNode)(y,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])}))])])})):e.renderList.map((function(t,r){return(0,o.createVNode)("li",{class:["bk-selector-list-item",{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,o.createVNode)(y,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])})),e.isPageLoading?(0,o.createVNode)("li",{class:"bk-selector-list-item loading"},[(0,o.createVNode)(d(),{theme:"primary",size:c.BkLoadingSize.Small},null)]):null])])}})])}});T.install=function(e){e.component(T.name,T)};const b=T})(),u})()));
@@ -0,0 +1,47 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ node: import("vue-types").VueTypeValidableDef<{
3
+ [key: string]: any;
4
+ }> & {
5
+ default: () => {
6
+ [key: string]: any;
7
+ };
8
+ };
9
+ searchKey: import("vue-types").VueTypeDef<string | string[]>;
10
+ displayKey: import("vue-types").VueTypeValidableDef<string> & {
11
+ default: string;
12
+ };
13
+ searchKeyword: import("vue-types").VueTypeValidableDef<string> & {
14
+ default: string;
15
+ };
16
+ tpl: {
17
+ type: FunctionConstructor;
18
+ default: any;
19
+ };
20
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ node: import("vue-types").VueTypeValidableDef<{
22
+ [key: string]: any;
23
+ }> & {
24
+ default: () => {
25
+ [key: string]: any;
26
+ };
27
+ };
28
+ searchKey: import("vue-types").VueTypeDef<string | string[]>;
29
+ displayKey: import("vue-types").VueTypeValidableDef<string> & {
30
+ default: string;
31
+ };
32
+ searchKeyword: import("vue-types").VueTypeValidableDef<string> & {
33
+ default: string;
34
+ };
35
+ tpl: {
36
+ type: FunctionConstructor;
37
+ default: any;
38
+ };
39
+ }>>, {
40
+ displayKey: string;
41
+ tpl: Function;
42
+ node: {
43
+ [key: string]: any;
44
+ };
45
+ searchKeyword: string;
46
+ }>;
47
+ export default _default;