vxe-pc-ui 4.20.34 → 4.20.36

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 (879) hide show
  1. package/dist/all.esm.js +45718 -45038
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +307 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/alert/src/alert.js +117 -114
  6. package/es/anchor/index.d.ts +8 -8
  7. package/es/anchor/src/anchor-link.js +110 -107
  8. package/es/anchor/src/anchor.d.ts +1 -1
  9. package/es/anchor/src/anchor.js +212 -209
  10. package/es/avatar/index.d.ts +6 -6
  11. package/es/avatar/src/avatar.d.ts +1 -1
  12. package/es/avatar/src/avatar.js +132 -129
  13. package/es/backtop/index.d.ts +42 -42
  14. package/es/backtop/src/backtop.d.ts +7 -7
  15. package/es/backtop/src/backtop.js +267 -264
  16. package/es/badge/index.d.ts +6 -6
  17. package/es/badge/src/badge.d.ts +1 -1
  18. package/es/badge/src/badge.js +102 -99
  19. package/es/breadcrumb/src/breadcrumb-item.js +104 -101
  20. package/es/breadcrumb/src/breadcrumb.js +70 -67
  21. package/es/button/index.d.ts +20 -20
  22. package/es/button/src/button-group.js +88 -85
  23. package/es/button/src/button.d.ts +3 -3
  24. package/es/calendar/index.d.ts +20 -20
  25. package/es/calendar/src/calendar.d.ts +3 -3
  26. package/es/calendar/src/calendar.js +1371 -1368
  27. package/es/card/index.d.ts +12 -12
  28. package/es/card/src/card.d.ts +2 -2
  29. package/es/card/src/card.js +235 -232
  30. package/es/carousel/index.d.ts +14 -14
  31. package/es/carousel/src/carousel-item.js +78 -75
  32. package/es/carousel/src/carousel.d.ts +2 -2
  33. package/es/carousel/src/carousel.js +392 -389
  34. package/es/cascader/index.d.ts +70 -70
  35. package/es/cascader/src/cascader.d.ts +11 -11
  36. package/es/cascader/src/cascader.js +1667 -1664
  37. package/es/checkbox/index.d.ts +14 -14
  38. package/es/checkbox/src/button.d.ts +2 -2
  39. package/es/checkbox/src/button.js +198 -195
  40. package/es/checkbox/src/checkbox.d.ts +2 -2
  41. package/es/checkbox/src/checkbox.js +181 -178
  42. package/es/checkbox/src/group.d.ts +4 -4
  43. package/es/checkbox/src/group.js +210 -207
  44. package/es/checkbox-button/index.d.ts +14 -14
  45. package/es/checkbox-group/index.d.ts +26 -26
  46. package/es/collapse/index.d.ts +14 -14
  47. package/es/collapse/src/collapse-pane.js +98 -95
  48. package/es/collapse/src/collapse.d.ts +2 -2
  49. package/es/collapse/src/collapse.js +340 -337
  50. package/es/color-picker/index.d.ts +46 -46
  51. package/es/color-picker/src/color-picker.d.ts +8 -8
  52. package/es/color-picker/src/color-picker.js +1116 -1113
  53. package/es/color-picker/src/util.d.ts +9 -1
  54. package/es/components.d.ts +1 -0
  55. package/es/components.js +3 -0
  56. package/es/context-menu/index.d.ts +16 -16
  57. package/es/context-menu/src/context-menu.d.ts +3 -3
  58. package/es/context-menu/src/context-menu.js +601 -598
  59. package/es/countdown/index.d.ts +2 -2
  60. package/es/countdown/src/countdown.d.ts +1 -1
  61. package/es/countdown/src/countdown.js +224 -221
  62. package/es/date-panel/index.d.ts +46 -46
  63. package/es/date-panel/src/date-panel.d.ts +7 -7
  64. package/es/date-panel/src/date-panel.js +1905 -1902
  65. package/es/date-picker/index.d.ts +110 -110
  66. package/es/date-picker/src/date-picker.d.ts +17 -17
  67. package/es/date-picker/src/date-picker.js +1537 -1534
  68. package/es/date-range-picker/index.d.ts +114 -114
  69. package/es/date-range-picker/src/date-range-picker.d.ts +17 -17
  70. package/es/date-range-picker/src/date-range-picker.js +1412 -1409
  71. package/es/divider/index.d.ts +6 -6
  72. package/es/divider/src/divider.d.ts +1 -1
  73. package/es/divider/src/divider.js +80 -77
  74. package/es/drawer/index.d.ts +74 -74
  75. package/es/drawer/src/drawer.d.ts +13 -13
  76. package/es/drawer/src/drawer.js +778 -775
  77. package/es/dynamics/index.d.ts +12 -12
  78. package/es/empty/src/empty.js +100 -97
  79. package/es/form/index.d.ts +36 -36
  80. package/es/form/src/form-config-item.d.ts +7 -7
  81. package/es/form/src/form-group.d.ts +7 -7
  82. package/es/form/src/form-group.js +74 -71
  83. package/es/form/src/form-item.d.ts +7 -7
  84. package/es/form/src/form-item.js +76 -73
  85. package/es/form/src/form.d.ts +6 -6
  86. package/es/form/src/form.js +789 -786
  87. package/es/form-gather/index.d.ts +42 -42
  88. package/es/form-group/index.d.ts +42 -42
  89. package/es/form-item/index.d.ts +42 -42
  90. package/es/icon/src/icon.js +59 -56
  91. package/es/icon/style.css +1 -1
  92. package/es/icon/style.mini.css +1 -1
  93. package/es/icon-picker/index.d.ts +22 -22
  94. package/es/icon-picker/src/icon-picker.d.ts +4 -4
  95. package/es/icon-picker/src/icon-picker.js +719 -716
  96. package/es/image/index.d.ts +30 -30
  97. package/es/image/src/group.d.ts +2 -2
  98. package/es/image/src/group.js +130 -127
  99. package/es/image/src/image.d.ts +5 -5
  100. package/es/image/src/image.js +243 -240
  101. package/es/image/src/preview.d.ts +3 -3
  102. package/es/image/src/preview.js +627 -624
  103. package/es/image-group/index.d.ts +8 -8
  104. package/es/image-preview/index.d.ts +16 -16
  105. package/es/index.esm.js +2 -0
  106. package/es/index.js +2 -0
  107. package/es/input/index.d.ts +160 -160
  108. package/es/input/src/input.d.ts +25 -25
  109. package/es/input/src/input.js +2700 -2697
  110. package/es/layout-aside/src/layout-aside.js +138 -135
  111. package/es/layout-body/src/layout-body.js +145 -142
  112. package/es/layout-container/src/layout-container.js +71 -68
  113. package/es/layout-footer/src/layout-footer.js +60 -57
  114. package/es/layout-header/src/layout-header.js +58 -55
  115. package/es/link/src/link.js +131 -128
  116. package/es/list/src/list.js +2174 -2171
  117. package/es/loading/index.d.ts +6 -6
  118. package/es/loading/src/loading.d.ts +1 -1
  119. package/es/loading/src/loading.js +141 -138
  120. package/es/mention/src/mention.js +49 -46
  121. package/es/menu/index.d.ts +32 -32
  122. package/es/menu/src/menu.d.ts +5 -5
  123. package/es/menu/src/menu.js +799 -796
  124. package/es/modal/index.d.ts +92 -92
  125. package/es/modal/src/modal.d.ts +16 -16
  126. package/es/modal/src/modal.js +1519 -1527
  127. package/es/notice-bar/index.d.ts +8 -8
  128. package/es/notice-bar/src/notice-bar.d.ts +2 -2
  129. package/es/notice-bar/src/notice-bar.js +168 -165
  130. package/es/number-input/index.d.ts +134 -134
  131. package/es/number-input/src/number-input.d.ts +21 -21
  132. package/es/number-input/src/number-input.js +1094 -1091
  133. package/es/optgroup/index.d.ts +6 -6
  134. package/es/option/index.d.ts +6 -6
  135. package/es/pager/index.d.ts +34 -34
  136. package/es/pager/src/pager.d.ts +6 -6
  137. package/es/pager/src/pager.js +767 -764
  138. package/es/password-input/index.d.ts +72 -72
  139. package/es/password-input/src/password-input.d.ts +11 -11
  140. package/es/password-input/src/password-input.js +431 -428
  141. package/es/print/index.d.ts +6 -6
  142. package/es/print/src/page-break.js +63 -60
  143. package/es/print/src/print.d.ts +1 -1
  144. package/es/print/src/print.js +303 -300
  145. package/es/pulldown/index.d.ts +22 -22
  146. package/es/pulldown/src/pulldown.d.ts +4 -4
  147. package/es/pulldown/src/pulldown.js +403 -400
  148. package/es/radio/index.d.ts +20 -20
  149. package/es/radio/src/button.d.ts +3 -3
  150. package/es/radio/src/button.js +214 -211
  151. package/es/radio/src/group.d.ts +4 -4
  152. package/es/radio/src/group.js +195 -192
  153. package/es/radio/src/radio.d.ts +3 -3
  154. package/es/radio/src/radio.js +194 -191
  155. package/es/radio-button/index.d.ts +20 -20
  156. package/es/radio-group/index.d.ts +26 -26
  157. package/es/rate/index.d.ts +14 -14
  158. package/es/rate/src/rate.d.ts +2 -2
  159. package/es/rate/src/rate.js +164 -161
  160. package/es/result/src/result.js +116 -113
  161. package/es/row/index.d.ts +6 -6
  162. package/es/row/src/col.js +133 -130
  163. package/es/row/src/row.d.ts +1 -1
  164. package/es/row/src/row.js +111 -108
  165. package/es/scrollbar/index.d.ts +30 -30
  166. package/es/scrollbar/src/scrollbar.d.ts +5 -5
  167. package/es/scrollbar/src/scrollbar.js +518 -515
  168. package/es/segmented/index.d.ts +14 -14
  169. package/es/segmented/src/segmented.d.ts +2 -2
  170. package/es/segmented/src/segmented.js +240 -237
  171. package/es/select/index.d.ts +66 -66
  172. package/es/select/src/optgroup.d.ts +1 -1
  173. package/es/select/src/optgroup.js +44 -41
  174. package/es/select/src/option.d.ts +1 -1
  175. package/es/select/src/option.js +39 -36
  176. package/es/select/src/select.d.ts +11 -11
  177. package/es/select/src/select.js +1914 -1896
  178. package/es/slider/index.d.ts +38 -38
  179. package/es/slider/src/slider.d.ts +6 -6
  180. package/es/slider/src/slider.js +419 -416
  181. package/es/space/index.d.ts +36 -36
  182. package/es/space/src/space.d.ts +6 -6
  183. package/es/space/src/space.js +190 -187
  184. package/es/split/index.d.ts +14 -14
  185. package/es/split-pane/index.d.ts +18 -18
  186. package/es/splitter/index.d.ts +14 -14
  187. package/es/splitter/src/splitter-panel.d.ts +3 -3
  188. package/es/splitter/src/splitter-panel.js +146 -143
  189. package/es/splitter/src/splitter.d.ts +3 -3
  190. package/es/splitter/src/splitter.js +917 -914
  191. package/es/splitter-panel/index.d.ts +18 -18
  192. package/es/step-item/index.d.ts +76 -0
  193. package/es/step-item/index.js +17 -0
  194. package/es/steps/index.d.ts +288 -34
  195. package/es/steps/src/step-info.d.ts +6 -0
  196. package/es/steps/src/step-info.js +20 -0
  197. package/es/steps/src/step-item.d.ts +14 -0
  198. package/es/steps/src/step-item.js +39 -0
  199. package/es/steps/src/steps.d.ts +68 -8
  200. package/es/steps/src/steps.js +299 -47
  201. package/es/steps/src/util.d.ts +7 -0
  202. package/es/steps/src/util.js +44 -0
  203. package/es/steps/style.css +297 -0
  204. package/es/steps/style.mini.css +1 -0
  205. package/es/style.css +307 -1
  206. package/es/style.mini.css +1 -1
  207. package/es/switch/index.d.ts +24 -24
  208. package/es/switch/src/switch.d.ts +4 -4
  209. package/es/switch/src/switch.js +228 -225
  210. package/es/table-select/index.d.ts +30 -30
  211. package/es/table-select/src/table-select.d.ts +5 -5
  212. package/es/table-select/src/table-select.js +865 -862
  213. package/es/table-transfer/src/table-transfer.js +61 -58
  214. package/es/tabs/index.d.ts +26 -26
  215. package/es/tabs/src/tab-pane.js +102 -99
  216. package/es/tabs/src/tabs.d.ts +4 -4
  217. package/es/tabs/src/tabs.js +936 -933
  218. package/es/tag/index.d.ts +16 -16
  219. package/es/tag/src/tag.d.ts +3 -3
  220. package/es/tag/src/tag.js +163 -160
  221. package/es/text/src/text.js +232 -229
  222. package/es/text-ellipsis/src/text-ellipsis.js +252 -249
  223. package/es/textarea/index.d.ts +76 -76
  224. package/es/textarea/src/textarea.d.ts +12 -12
  225. package/es/textarea/src/textarea.js +434 -431
  226. package/es/timeline/index.d.ts +6 -6
  227. package/es/timeline/src/timeline.d.ts +1 -1
  228. package/es/timeline/src/timeline.js +74 -36
  229. package/es/timeline/src/util.js +7 -4
  230. package/es/tip/index.d.ts +9 -9
  231. package/es/tip/src/tip.d.ts +1 -1
  232. package/es/tip/src/tip.js +117 -114
  233. package/es/tooltip/index.d.ts +72 -72
  234. package/es/tooltip/src/tooltip.d.ts +14 -14
  235. package/es/tooltip/src/tooltip.js +552 -549
  236. package/es/tour/src/tour.js +49 -46
  237. package/es/transfer/src/transfer.js +95 -92
  238. package/es/tree/index.d.ts +44 -44
  239. package/es/tree/src/tree.d.ts +7 -7
  240. package/es/tree/src/tree.js +3379 -3376
  241. package/es/tree-select/index.d.ts +74 -74
  242. package/es/tree-select/src/tree-select.d.ts +12 -12
  243. package/es/tree-select/src/tree-select.js +969 -966
  244. package/es/ui/index.js +8 -2
  245. package/es/ui/src/log.js +1 -1
  246. package/es/ui/src/vn.d.ts +1 -1
  247. package/es/upload/index.d.ts +128 -128
  248. package/es/upload/src/upload.d.ts +21 -21
  249. package/es/upload/src/upload.js +1791 -1788
  250. package/es/vxe-icon/style.css +1 -1
  251. package/es/vxe-icon/style.mini.css +1 -1
  252. package/es/vxe-steps/style.css +297 -0
  253. package/es/vxe-steps/style.mini.css +1 -0
  254. package/es/watermark/index.d.ts +6 -6
  255. package/es/watermark/src/watermark.d.ts +1 -1
  256. package/es/watermark/src/watermark.js +158 -155
  257. package/lib/alert/index.d.ts +170 -0
  258. package/lib/alert/src/alert.d.ts +35 -0
  259. package/lib/alert/src/alert.js +117 -114
  260. package/lib/anchor/index.d.ts +140 -0
  261. package/lib/anchor/src/anchor-link.d.ts +12 -0
  262. package/lib/anchor/src/anchor-link.js +110 -107
  263. package/lib/anchor/src/anchor.d.ts +26 -0
  264. package/lib/anchor/src/anchor.js +212 -209
  265. package/lib/anchor/src/util.d.ts +3 -0
  266. package/lib/anchor-link/index.d.ts +64 -0
  267. package/lib/avatar/index.d.ts +216 -0
  268. package/lib/avatar/src/avatar.d.ts +48 -0
  269. package/lib/avatar/src/avatar.js +132 -129
  270. package/lib/backtop/index.d.ts +640 -0
  271. package/lib/backtop/src/backtop.d.ts +146 -0
  272. package/lib/backtop/src/backtop.js +267 -264
  273. package/lib/badge/index.d.ts +154 -0
  274. package/lib/badge/src/badge.d.ts +33 -0
  275. package/lib/badge/src/badge.js +102 -99
  276. package/lib/breadcrumb/index.d.ts +108 -0
  277. package/lib/breadcrumb/src/breadcrumb-item.d.ts +10 -0
  278. package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
  279. package/lib/breadcrumb/src/breadcrumb.d.ts +20 -0
  280. package/lib/breadcrumb/src/breadcrumb.js +70 -67
  281. package/lib/breadcrumb-item/index.d.ts +56 -0
  282. package/lib/button/index.d.ts +592 -0
  283. package/lib/button/src/button-group.d.ts +39 -0
  284. package/lib/button/src/button-group.js +88 -85
  285. package/lib/button/src/button.d.ts +235 -0
  286. package/lib/button-group/index.d.ts +188 -0
  287. package/lib/calendar/index.d.ts +442 -0
  288. package/lib/calendar/src/calendar.d.ts +93 -0
  289. package/lib/calendar/src/calendar.js +1371 -1368
  290. package/lib/card/index.d.ts +314 -0
  291. package/lib/card/src/card.d.ts +71 -0
  292. package/lib/card/src/card.js +235 -232
  293. package/lib/carousel/index.d.ts +360 -0
  294. package/lib/carousel/src/carousel-item.d.ts +12 -0
  295. package/lib/carousel/src/carousel-item.js +78 -75
  296. package/lib/carousel/src/carousel.d.ts +79 -0
  297. package/lib/carousel/src/carousel.js +392 -389
  298. package/lib/carousel/src/util.d.ts +3 -0
  299. package/lib/carousel-item/index.d.ts +64 -0
  300. package/lib/cascader/index.d.ts +842 -0
  301. package/lib/cascader/src/cascader.d.ts +183 -0
  302. package/lib/cascader/src/cascader.js +1665 -1662
  303. package/lib/cascader/src/util.d.ts +2 -0
  304. package/lib/checkbox/index.d.ts +292 -0
  305. package/lib/checkbox/src/button.d.ts +73 -0
  306. package/lib/checkbox/src/button.js +198 -195
  307. package/lib/checkbox/src/checkbox.d.ts +71 -0
  308. package/lib/checkbox/src/checkbox.js +181 -178
  309. package/lib/checkbox/src/group.d.ts +68 -0
  310. package/lib/checkbox/src/group.js +210 -207
  311. package/lib/checkbox-button/index.d.ts +304 -0
  312. package/lib/checkbox-group/index.d.ts +320 -0
  313. package/lib/col/index.d.ts +124 -0
  314. package/lib/collapse/index.d.ts +224 -0
  315. package/lib/collapse/src/collapse-pane.d.ts +16 -0
  316. package/lib/collapse/src/collapse-pane.js +98 -95
  317. package/lib/collapse/src/collapse.d.ts +45 -0
  318. package/lib/collapse/src/collapse.js +340 -337
  319. package/lib/collapse/src/util.d.ts +3 -0
  320. package/lib/collapse-pane/index.d.ts +80 -0
  321. package/lib/color-picker/index.d.ts +636 -0
  322. package/lib/color-picker/src/color-picker.d.ts +159 -0
  323. package/lib/color-picker/src/color-picker.js +1116 -1113
  324. package/lib/color-picker/src/util.d.ts +62 -0
  325. package/lib/components.d.ts +156 -0
  326. package/lib/components.js +3 -0
  327. package/lib/context-menu/index.d.ts +338 -0
  328. package/lib/context-menu/src/context-menu.d.ts +70 -0
  329. package/lib/context-menu/src/context-menu.js +601 -598
  330. package/lib/countdown/index.d.ts +148 -0
  331. package/lib/countdown/src/countdown.d.ts +28 -0
  332. package/lib/countdown/src/countdown.js +224 -221
  333. package/lib/date-panel/index.d.ts +520 -0
  334. package/lib/date-panel/src/date-panel.d.ts +112 -0
  335. package/lib/date-panel/src/date-panel.js +1905 -1902
  336. package/lib/date-panel/src/util.d.ts +40 -0
  337. package/lib/date-picker/index.d.ts +1074 -0
  338. package/lib/date-picker/src/date-picker.d.ts +262 -0
  339. package/lib/date-picker/src/date-picker.js +1537 -1534
  340. package/lib/date-range-picker/index.d.ts +1044 -0
  341. package/lib/date-range-picker/src/date-range-picker.d.ts +245 -0
  342. package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
  343. package/lib/divider/index.d.ts +198 -0
  344. package/lib/divider/src/divider.d.ts +43 -0
  345. package/lib/divider/src/divider.js +80 -77
  346. package/lib/drawer/index.d.ts +1398 -0
  347. package/lib/drawer/src/drawer.d.ts +317 -0
  348. package/lib/drawer/src/drawer.js +778 -775
  349. package/lib/drawer/src/store.d.ts +2 -0
  350. package/lib/dynamics/index.d.ts +463 -0
  351. package/lib/empty/index.d.ts +116 -0
  352. package/lib/empty/src/empty.d.ts +24 -0
  353. package/lib/empty/src/empty.js +100 -97
  354. package/lib/form/index.d.ts +836 -0
  355. package/lib/form/render/index.d.ts +1 -0
  356. package/lib/form/src/form-config-item.d.ts +187 -0
  357. package/lib/form/src/form-group.d.ts +188 -0
  358. package/lib/form/src/form-group.js +74 -71
  359. package/lib/form/src/form-item.d.ts +271 -0
  360. package/lib/form/src/form-item.js +76 -73
  361. package/lib/form/src/form.d.ts +191 -0
  362. package/lib/form/src/form.js +789 -786
  363. package/lib/form/src/itemInfo.d.ts +5 -0
  364. package/lib/form/src/render.d.ts +27 -0
  365. package/lib/form/src/util.d.ts +13 -0
  366. package/lib/form-gather/index.d.ts +840 -0
  367. package/lib/form-group/index.d.ts +828 -0
  368. package/lib/form-item/index.d.ts +828 -0
  369. package/lib/icon/index.d.ts +132 -0
  370. package/lib/icon/src/icon.d.ts +26 -0
  371. package/lib/icon/src/icon.js +59 -56
  372. package/lib/icon/style/style.css +1 -1
  373. package/lib/icon/style/style.mini.css +1 -1
  374. package/lib/icon-picker/index.d.ts +440 -0
  375. package/lib/icon-picker/src/icon-picker.d.ts +105 -0
  376. package/lib/icon-picker/src/icon-picker.js +719 -716
  377. package/lib/image/index.d.ts +442 -0
  378. package/lib/image/src/group.d.ts +57 -0
  379. package/lib/image/src/group.js +130 -127
  380. package/lib/image/src/image.d.ts +96 -0
  381. package/lib/image/src/image.js +243 -240
  382. package/lib/image/src/preview.d.ts +73 -0
  383. package/lib/image/src/preview.js +627 -624
  384. package/lib/image/src/util.d.ts +2 -0
  385. package/lib/image-group/index.d.ts +270 -0
  386. package/lib/image-preview/index.d.ts +352 -0
  387. package/lib/index.common.js +2 -0
  388. package/lib/index.d.ts +6 -0
  389. package/lib/index.js +2 -0
  390. package/lib/index.umd.js +47411 -46732
  391. package/lib/index.umd.min.js +3 -3
  392. package/lib/input/index.d.ts +1402 -0
  393. package/lib/input/src/input.d.ts +318 -0
  394. package/lib/input/src/input.js +2700 -2697
  395. package/lib/language/ar-EG.d.ts +908 -0
  396. package/lib/language/de-DE.d.ts +908 -0
  397. package/lib/language/en-US.d.ts +908 -0
  398. package/lib/language/es-ES.d.ts +908 -0
  399. package/lib/language/fr-FR.d.ts +908 -0
  400. package/lib/language/hu-HU.d.ts +908 -0
  401. package/lib/language/hy-AM.d.ts +908 -0
  402. package/lib/language/id-ID.d.ts +908 -0
  403. package/lib/language/it-IT.d.ts +908 -0
  404. package/lib/language/ja-JP.d.ts +908 -0
  405. package/lib/language/ko-KR.d.ts +908 -0
  406. package/lib/language/ms-MY.d.ts +908 -0
  407. package/lib/language/nb-NO.d.ts +908 -0
  408. package/lib/language/pt-BR.d.ts +908 -0
  409. package/lib/language/ru-RU.d.ts +908 -0
  410. package/lib/language/th-TH.d.ts +908 -0
  411. package/lib/language/ug-CN.d.ts +908 -0
  412. package/lib/language/uk-UA.d.ts +908 -0
  413. package/lib/language/uz-UZ.d.ts +908 -0
  414. package/lib/language/vi-VN.d.ts +908 -0
  415. package/lib/language/zh-CHT.d.ts +908 -0
  416. package/lib/language/zh-CN.d.ts +908 -0
  417. package/lib/language/zh-HK.d.ts +908 -0
  418. package/lib/language/zh-MO.d.ts +908 -0
  419. package/lib/language/zh-TC.d.ts +908 -0
  420. package/lib/language/zh-TW.d.ts +908 -0
  421. package/lib/layout-aside/index.d.ts +178 -0
  422. package/lib/layout-aside/src/layout-aside.d.ts +39 -0
  423. package/lib/layout-aside/src/layout-aside.js +138 -135
  424. package/lib/layout-body/index.d.ts +192 -0
  425. package/lib/layout-body/src/layout-body.d.ts +42 -0
  426. package/lib/layout-body/src/layout-body.js +145 -142
  427. package/lib/layout-container/index.d.ts +130 -0
  428. package/lib/layout-container/src/layout-container.d.ts +27 -0
  429. package/lib/layout-container/src/layout-container.js +71 -68
  430. package/lib/layout-footer/index.d.ts +56 -0
  431. package/lib/layout-footer/src/layout-footer.d.ts +10 -0
  432. package/lib/layout-footer/src/layout-footer.js +60 -57
  433. package/lib/layout-header/index.d.ts +48 -0
  434. package/lib/layout-header/src/layout-header.d.ts +8 -0
  435. package/lib/layout-header/src/layout-header.js +58 -55
  436. package/lib/link/index.d.ts +210 -0
  437. package/lib/link/src/link.d.ts +51 -0
  438. package/lib/link/src/link.js +131 -128
  439. package/lib/list/index.d.ts +538 -0
  440. package/lib/list/src/list.d.ts +110 -0
  441. package/lib/list/src/list.js +2173 -2170
  442. package/lib/list/src/store.d.ts +6 -0
  443. package/lib/list/src/util.d.ts +2 -0
  444. package/lib/loading/index.d.ts +257 -0
  445. package/lib/loading/src/loading.d.ts +56 -0
  446. package/lib/loading/src/loading.js +141 -138
  447. package/lib/locale/ar-EG.umd.d.ts +908 -0
  448. package/lib/locale/de-DE.umd.d.ts +908 -0
  449. package/lib/locale/en-US.umd.d.ts +908 -0
  450. package/lib/locale/es-ES.umd.d.ts +908 -0
  451. package/lib/locale/fr-FR.umd.d.ts +908 -0
  452. package/lib/locale/hu-HU.umd.d.ts +908 -0
  453. package/lib/locale/hy-AM.umd.d.ts +908 -0
  454. package/lib/locale/id-ID.umd.d.ts +908 -0
  455. package/lib/locale/it-IT.umd.d.ts +908 -0
  456. package/lib/locale/ja-JP.umd.d.ts +908 -0
  457. package/lib/locale/ko-KR.umd.d.ts +908 -0
  458. package/lib/locale/ms-MY.umd.d.ts +908 -0
  459. package/lib/locale/nb-NO.umd.d.ts +908 -0
  460. package/lib/locale/pt-BR.umd.d.ts +908 -0
  461. package/lib/locale/ru-RU.umd.d.ts +908 -0
  462. package/lib/locale/th-TH.umd.d.ts +908 -0
  463. package/lib/locale/ug-CN.umd.d.ts +908 -0
  464. package/lib/locale/uk-UA.umd.d.ts +908 -0
  465. package/lib/locale/uz-UZ.umd.d.ts +908 -0
  466. package/lib/locale/vi-VN.umd.d.ts +908 -0
  467. package/lib/locale/zh-CHT.umd.d.ts +908 -0
  468. package/lib/locale/zh-CN.umd.d.ts +908 -0
  469. package/lib/locale/zh-HK.umd.d.ts +908 -0
  470. package/lib/locale/zh-MO.umd.d.ts +908 -0
  471. package/lib/locale/zh-TC.umd.d.ts +908 -0
  472. package/lib/locale/zh-TW.umd.d.ts +908 -0
  473. package/lib/mention/index.d.ts +84 -0
  474. package/lib/mention/src/mention.d.ts +16 -0
  475. package/lib/mention/src/mention.js +49 -46
  476. package/lib/menu/index.d.ts +446 -0
  477. package/lib/menu/src/menu.d.ts +98 -0
  478. package/lib/menu/src/menu.js +799 -796
  479. package/lib/modal/index.d.ts +1934 -0
  480. package/lib/modal/src/modal.d.ts +457 -0
  481. package/lib/modal/src/modal.js +1519 -1527
  482. package/lib/modal/src/store.d.ts +2 -0
  483. package/lib/notice-bar/index.d.ts +232 -0
  484. package/lib/notice-bar/src/notice-bar.d.ts +49 -0
  485. package/lib/notice-bar/src/notice-bar.js +168 -165
  486. package/lib/number-input/index.d.ts +1208 -0
  487. package/lib/number-input/src/number-input.d.ts +268 -0
  488. package/lib/number-input/src/number-input.js +1094 -1091
  489. package/lib/number-input/src/util.d.ts +3 -0
  490. package/lib/optgroup/index.d.ts +150 -0
  491. package/lib/option/index.d.ts +158 -0
  492. package/lib/pager/index.d.ts +682 -0
  493. package/lib/pager/src/pager.d.ts +155 -0
  494. package/lib/pager/src/pager.js +767 -764
  495. package/lib/password-input/index.d.ts +572 -0
  496. package/lib/password-input/src/password-input.d.ts +122 -0
  497. package/lib/password-input/src/password-input.js +431 -428
  498. package/lib/print/index.d.ts +454 -0
  499. package/lib/print/src/page-break.d.ts +9 -0
  500. package/lib/print/src/page-break.js +63 -60
  501. package/lib/print/src/print.d.ts +113 -0
  502. package/lib/print/src/print.js +303 -300
  503. package/lib/print/src/util.d.ts +6 -0
  504. package/lib/print-page-break/index.d.ts +60 -0
  505. package/lib/pulldown/index.d.ts +356 -0
  506. package/lib/pulldown/src/pulldown.d.ts +99 -0
  507. package/lib/pulldown/src/pulldown.js +403 -400
  508. package/lib/radio/index.d.ts +292 -0
  509. package/lib/radio/src/button.d.ts +73 -0
  510. package/lib/radio/src/button.js +214 -211
  511. package/lib/radio/src/group.d.ts +66 -0
  512. package/lib/radio/src/group.js +195 -192
  513. package/lib/radio/src/radio.d.ts +71 -0
  514. package/lib/radio/src/radio.js +194 -191
  515. package/lib/radio-button/index.d.ts +304 -0
  516. package/lib/radio-group/index.d.ts +308 -0
  517. package/lib/rate/index.d.ts +200 -0
  518. package/lib/rate/src/rate.d.ts +41 -0
  519. package/lib/rate/src/rate.js +164 -161
  520. package/lib/result/index.d.ts +96 -0
  521. package/lib/result/src/result.d.ts +20 -0
  522. package/lib/result/src/result.js +116 -113
  523. package/lib/row/index.d.ts +192 -0
  524. package/lib/row/src/col.d.ts +26 -0
  525. package/lib/row/src/col.js +133 -130
  526. package/lib/row/src/row.d.ts +40 -0
  527. package/lib/row/src/row.js +111 -108
  528. package/lib/scrollbar/index.d.ts +660 -0
  529. package/lib/scrollbar/src/scrollbar.d.ts +167 -0
  530. package/lib/scrollbar/src/scrollbar.js +518 -515
  531. package/lib/segmented/index.d.ts +210 -0
  532. package/lib/segmented/src/segmented.d.ts +44 -0
  533. package/lib/segmented/src/segmented.js +240 -237
  534. package/lib/select/index.d.ts +1120 -0
  535. package/lib/select/src/optgroup.d.ts +31 -0
  536. package/lib/select/src/optgroup.js +44 -41
  537. package/lib/select/src/option-info.d.ts +5 -0
  538. package/lib/select/src/option.d.ts +33 -0
  539. package/lib/select/src/option.js +39 -36
  540. package/lib/select/src/select.d.ts +303 -0
  541. package/lib/select/src/select.js +1915 -1897
  542. package/lib/select/src/util.d.ts +10 -0
  543. package/lib/slider/index.d.ts +530 -0
  544. package/lib/slider/src/slider.d.ts +115 -0
  545. package/lib/slider/src/slider.js +419 -416
  546. package/lib/space/index.d.ts +548 -0
  547. package/lib/space/src/space.d.ts +126 -0
  548. package/lib/space/src/space.js +190 -187
  549. package/lib/split/index.d.ts +348 -0
  550. package/lib/split-pane/index.d.ts +230 -0
  551. package/lib/splitter/index.d.ts +348 -0
  552. package/lib/splitter/src/splitter-panel.d.ts +51 -0
  553. package/lib/splitter/src/splitter-panel.js +146 -143
  554. package/lib/splitter/src/splitter.d.ts +73 -0
  555. package/lib/splitter/src/splitter.js +917 -914
  556. package/lib/splitter/src/util.d.ts +3 -0
  557. package/lib/splitter-panel/index.d.ts +230 -0
  558. package/lib/step-item/index.d.ts +76 -0
  559. package/lib/step-item/index.js +47 -0
  560. package/lib/steps/index.d.ts +314 -0
  561. package/lib/steps/src/step-info.d.ts +6 -0
  562. package/lib/steps/src/step-info.js +49 -0
  563. package/lib/steps/src/step-item.d.ts +14 -0
  564. package/lib/steps/src/step-item.js +59 -0
  565. package/lib/steps/src/steps.d.ts +69 -0
  566. package/lib/steps/src/steps.js +298 -46
  567. package/lib/steps/src/util.d.ts +7 -0
  568. package/lib/steps/src/util.js +74 -0
  569. package/lib/steps/style/style.css +297 -0
  570. package/lib/steps/style/style.mini.css +1 -0
  571. package/lib/style.css +307 -1
  572. package/lib/style.mini.css +1 -1
  573. package/lib/switch/index.d.ts +332 -0
  574. package/lib/switch/src/switch.d.ts +71 -0
  575. package/lib/switch/src/switch.js +228 -225
  576. package/lib/tab-pane/index.d.ts +96 -0
  577. package/lib/table-select/index.d.ts +528 -0
  578. package/lib/table-select/src/table-select.d.ts +122 -0
  579. package/lib/table-select/src/table-select.js +865 -862
  580. package/lib/table-transfer/index.d.ts +100 -0
  581. package/lib/table-transfer/src/table-transfer.d.ts +20 -0
  582. package/lib/table-transfer/src/table-transfer.js +61 -58
  583. package/lib/tabs/index.d.ts +488 -0
  584. package/lib/tabs/src/tab-pane.d.ts +20 -0
  585. package/lib/tabs/src/tab-pane.js +102 -99
  586. package/lib/tabs/src/tabs.d.ts +105 -0
  587. package/lib/tabs/src/tabs.js +936 -933
  588. package/lib/tabs/src/util.d.ts +3 -0
  589. package/lib/tag/index.d.ts +332 -0
  590. package/lib/tag/src/tag.d.ts +71 -0
  591. package/lib/tag/src/tag.js +163 -160
  592. package/lib/text/index.d.ts +242 -0
  593. package/lib/text/src/text.d.ts +48 -0
  594. package/lib/text/src/text.js +232 -229
  595. package/lib/text-ellipsis/index.d.ts +218 -0
  596. package/lib/text-ellipsis/src/text-ellipsis.d.ts +53 -0
  597. package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
  598. package/lib/textarea/index.d.ts +738 -0
  599. package/lib/textarea/src/textarea.d.ts +170 -0
  600. package/lib/textarea/src/textarea.js +434 -431
  601. package/lib/timeline/index.d.ts +176 -0
  602. package/lib/timeline/src/timeline-info.d.ts +6 -0
  603. package/lib/timeline/src/timeline-item.d.ts +12 -0
  604. package/lib/timeline/src/timeline.d.ts +38 -0
  605. package/lib/timeline/src/timeline.js +74 -36
  606. package/lib/timeline/src/util.d.ts +7 -0
  607. package/lib/timeline/src/util.js +7 -4
  608. package/lib/timeline-item/index.d.ts +68 -0
  609. package/lib/tip/index.d.ts +275 -0
  610. package/lib/tip/src/tip.d.ts +46 -0
  611. package/lib/tip/src/tip.js +117 -114
  612. package/lib/tooltip/index.d.ts +890 -0
  613. package/lib/tooltip/src/tooltip.d.ts +202 -0
  614. package/lib/tooltip/src/tooltip.js +552 -549
  615. package/lib/tour/index.d.ts +84 -0
  616. package/lib/tour/src/tour.d.ts +16 -0
  617. package/lib/tour/src/tour.js +49 -46
  618. package/lib/transfer/index.d.ts +100 -0
  619. package/lib/transfer/src/transfer.d.ts +20 -0
  620. package/lib/transfer/src/transfer.js +95 -92
  621. package/lib/tree/index.d.ts +1402 -0
  622. package/lib/tree/src/store.d.ts +6 -0
  623. package/lib/tree/src/tree.d.ts +313 -0
  624. package/lib/tree/src/tree.js +3379 -3376
  625. package/lib/tree/src/util.d.ts +3 -0
  626. package/lib/tree-select/index.d.ts +986 -0
  627. package/lib/tree-select/src/tree-select.d.ts +255 -0
  628. package/lib/tree-select/src/tree-select.js +969 -966
  629. package/lib/ui/index.d.ts +6 -0
  630. package/lib/ui/index.js +8 -2
  631. package/lib/ui/src/anime.d.ts +10 -0
  632. package/lib/ui/src/comp.d.ts +2 -0
  633. package/lib/ui/src/dom.d.ts +70 -0
  634. package/lib/ui/src/log.d.ts +6 -0
  635. package/lib/ui/src/log.js +1 -1
  636. package/lib/ui/src/utils.d.ts +23 -0
  637. package/lib/ui/src/vn.d.ts +6 -0
  638. package/lib/upload/index.d.ts +1778 -0
  639. package/lib/upload/src/upload.d.ts +413 -0
  640. package/lib/upload/src/upload.js +1788 -1785
  641. package/lib/upload/src/util.d.ts +16 -0
  642. package/lib/vxe-alert/index.d.ts +3 -0
  643. package/lib/vxe-anchor/index.d.ts +3 -0
  644. package/lib/vxe-anchor-link/index.d.ts +3 -0
  645. package/lib/vxe-avatar/index.d.ts +3 -0
  646. package/lib/vxe-backtop/index.d.ts +3 -0
  647. package/lib/vxe-badge/index.d.ts +3 -0
  648. package/lib/vxe-breadcrumb/index.d.ts +3 -0
  649. package/lib/vxe-breadcrumb-item/index.d.ts +3 -0
  650. package/lib/vxe-button/index.d.ts +3 -0
  651. package/lib/vxe-button-group/index.d.ts +3 -0
  652. package/lib/vxe-calendar/index.d.ts +3 -0
  653. package/lib/vxe-card/index.d.ts +3 -0
  654. package/lib/vxe-carousel/index.d.ts +3 -0
  655. package/lib/vxe-carousel-item/index.d.ts +3 -0
  656. package/lib/vxe-cascader/index.d.ts +3 -0
  657. package/lib/vxe-checkbox/index.d.ts +3 -0
  658. package/lib/vxe-checkbox-button/index.d.ts +3 -0
  659. package/lib/vxe-checkbox-group/index.d.ts +3 -0
  660. package/lib/vxe-col/index.d.ts +3 -0
  661. package/lib/vxe-collapse/index.d.ts +3 -0
  662. package/lib/vxe-collapse-pane/index.d.ts +3 -0
  663. package/lib/vxe-color-picker/index.d.ts +3 -0
  664. package/lib/vxe-context-menu/index.d.ts +3 -0
  665. package/lib/vxe-countdown/index.d.ts +3 -0
  666. package/lib/vxe-date-panel/index.d.ts +3 -0
  667. package/lib/vxe-date-picker/index.d.ts +3 -0
  668. package/lib/vxe-date-range-picker/index.d.ts +3 -0
  669. package/lib/vxe-divider/index.d.ts +3 -0
  670. package/lib/vxe-drawer/index.d.ts +3 -0
  671. package/lib/vxe-empty/index.d.ts +3 -0
  672. package/lib/vxe-form/index.d.ts +3 -0
  673. package/lib/vxe-form-gather/index.d.ts +3 -0
  674. package/lib/vxe-form-group/index.d.ts +3 -0
  675. package/lib/vxe-form-item/index.d.ts +3 -0
  676. package/lib/vxe-icon/index.d.ts +3 -0
  677. package/lib/vxe-icon/style/style.css +1 -1
  678. package/lib/vxe-icon/style/style.mini.css +1 -1
  679. package/lib/vxe-icon-picker/index.d.ts +3 -0
  680. package/lib/vxe-image/index.d.ts +3 -0
  681. package/lib/vxe-image-group/index.d.ts +3 -0
  682. package/lib/vxe-image-preview/index.d.ts +3 -0
  683. package/lib/vxe-input/index.d.ts +3 -0
  684. package/lib/vxe-layout-aside/index.d.ts +3 -0
  685. package/lib/vxe-layout-body/index.d.ts +3 -0
  686. package/lib/vxe-layout-container/index.d.ts +3 -0
  687. package/lib/vxe-layout-footer/index.d.ts +3 -0
  688. package/lib/vxe-layout-header/index.d.ts +3 -0
  689. package/lib/vxe-link/index.d.ts +3 -0
  690. package/lib/vxe-list/index.d.ts +3 -0
  691. package/lib/vxe-loading/index.d.ts +3 -0
  692. package/lib/vxe-mention/index.d.ts +3 -0
  693. package/lib/vxe-menu/index.d.ts +3 -0
  694. package/lib/vxe-modal/index.d.ts +3 -0
  695. package/lib/vxe-notice-bar/index.d.ts +3 -0
  696. package/lib/vxe-number-input/index.d.ts +3 -0
  697. package/lib/vxe-optgroup/index.d.ts +3 -0
  698. package/lib/vxe-option/index.d.ts +3 -0
  699. package/lib/vxe-pager/index.d.ts +3 -0
  700. package/lib/vxe-password-input/index.d.ts +3 -0
  701. package/lib/vxe-print/index.d.ts +3 -0
  702. package/lib/vxe-print-page-break/index.d.ts +3 -0
  703. package/lib/vxe-pulldown/index.d.ts +3 -0
  704. package/lib/vxe-radio/index.d.ts +3 -0
  705. package/lib/vxe-radio-button/index.d.ts +3 -0
  706. package/lib/vxe-radio-group/index.d.ts +3 -0
  707. package/lib/vxe-rate/index.d.ts +3 -0
  708. package/lib/vxe-result/index.d.ts +3 -0
  709. package/lib/vxe-row/index.d.ts +3 -0
  710. package/lib/vxe-scrollbar/index.d.ts +3 -0
  711. package/lib/vxe-segmented/index.d.ts +3 -0
  712. package/lib/vxe-select/index.d.ts +3 -0
  713. package/lib/vxe-slider/index.d.ts +3 -0
  714. package/lib/vxe-space/index.d.ts +3 -0
  715. package/lib/vxe-split/index.d.ts +3 -0
  716. package/lib/vxe-split-pane/index.d.ts +3 -0
  717. package/lib/vxe-splitter/index.d.ts +3 -0
  718. package/lib/vxe-splitter-panel/index.d.ts +3 -0
  719. package/lib/vxe-steps/index.d.ts +3 -0
  720. package/lib/vxe-steps/style/style.css +297 -0
  721. package/lib/vxe-steps/style/style.mini.css +1 -0
  722. package/lib/vxe-switch/index.d.ts +3 -0
  723. package/lib/vxe-tab-pane/index.d.ts +3 -0
  724. package/lib/vxe-table-select/index.d.ts +3 -0
  725. package/lib/vxe-table-transfer/index.d.ts +3 -0
  726. package/lib/vxe-tabs/index.d.ts +3 -0
  727. package/lib/vxe-tag/index.d.ts +3 -0
  728. package/lib/vxe-text/index.d.ts +3 -0
  729. package/lib/vxe-text-ellipsis/index.d.ts +3 -0
  730. package/lib/vxe-textarea/index.d.ts +3 -0
  731. package/lib/vxe-timeline/index.d.ts +3 -0
  732. package/lib/vxe-timeline-item/index.d.ts +3 -0
  733. package/lib/vxe-tip/index.d.ts +3 -0
  734. package/lib/vxe-tooltip/index.d.ts +3 -0
  735. package/lib/vxe-tour/index.d.ts +3 -0
  736. package/lib/vxe-transfer/index.d.ts +3 -0
  737. package/lib/vxe-tree/index.d.ts +3 -0
  738. package/lib/vxe-tree-select/index.d.ts +3 -0
  739. package/lib/vxe-ui/index.d.ts +3 -0
  740. package/lib/vxe-upload/index.d.ts +3 -0
  741. package/lib/vxe-watermark/index.d.ts +3 -0
  742. package/lib/watermark/index.d.ts +183 -0
  743. package/lib/watermark/src/util.d.ts +9 -0
  744. package/lib/watermark/src/watermark.d.ts +39 -0
  745. package/lib/watermark/src/watermark.js +158 -155
  746. package/package.json +9 -9
  747. package/packages/alert/src/alert.ts +2 -2
  748. package/packages/anchor/src/anchor-link.ts +2 -2
  749. package/packages/anchor/src/anchor.ts +2 -2
  750. package/packages/avatar/src/avatar.ts +2 -2
  751. package/packages/backtop/src/backtop.ts +2 -2
  752. package/packages/badge/src/badge.ts +2 -2
  753. package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
  754. package/packages/breadcrumb/src/breadcrumb.ts +2 -2
  755. package/packages/button/src/button-group.ts +2 -2
  756. package/packages/calendar/src/calendar.ts +2 -2
  757. package/packages/card/src/card.ts +2 -2
  758. package/packages/carousel/src/carousel-item.ts +2 -2
  759. package/packages/carousel/src/carousel.ts +2 -2
  760. package/packages/cascader/src/cascader.ts +2 -2
  761. package/packages/checkbox/src/button.ts +3 -15
  762. package/packages/checkbox/src/checkbox.ts +2 -2
  763. package/packages/checkbox/src/group.ts +2 -2
  764. package/packages/collapse/src/collapse-pane.ts +2 -2
  765. package/packages/collapse/src/collapse.ts +2 -2
  766. package/packages/color-picker/src/color-picker.ts +2 -2
  767. package/packages/components.ts +3 -0
  768. package/packages/context-menu/src/context-menu.ts +3 -16
  769. package/packages/countdown/src/countdown.ts +2 -2
  770. package/packages/date-panel/src/date-panel.ts +2 -2
  771. package/packages/date-picker/src/date-picker.ts +2 -2
  772. package/packages/date-range-picker/src/date-range-picker.ts +2 -2
  773. package/packages/divider/src/divider.ts +2 -2
  774. package/packages/drawer/src/drawer.ts +2 -2
  775. package/packages/empty/src/empty.ts +2 -2
  776. package/packages/form/src/form-group.ts +2 -2
  777. package/packages/form/src/form-item.ts +2 -2
  778. package/packages/form/src/form.ts +2 -2
  779. package/packages/icon/src/icon.ts +2 -2
  780. package/packages/icon-picker/src/icon-picker.ts +2 -2
  781. package/packages/image/src/group.ts +2 -2
  782. package/packages/image/src/image.ts +2 -2
  783. package/packages/image/src/preview.ts +3 -16
  784. package/packages/index.ts +2 -2
  785. package/packages/input/src/input.ts +2 -2
  786. package/packages/layout-aside/src/layout-aside.ts +2 -2
  787. package/packages/layout-body/src/layout-body.ts +2 -2
  788. package/packages/layout-container/src/layout-container.ts +3 -14
  789. package/packages/layout-footer/src/layout-footer.ts +2 -2
  790. package/packages/layout-header/src/layout-header.ts +2 -2
  791. package/packages/link/src/link.ts +2 -2
  792. package/packages/list/src/list.ts +2 -2
  793. package/packages/loading/src/loading.ts +2 -2
  794. package/packages/mention/src/mention.ts +2 -2
  795. package/packages/menu/src/menu.ts +2 -2
  796. package/packages/modal/src/modal.ts +5 -20
  797. package/packages/notice-bar/src/notice-bar.ts +2 -2
  798. package/packages/number-input/src/number-input.ts +3 -17
  799. package/packages/pager/src/pager.ts +2 -2
  800. package/packages/password-input/src/password-input.ts +2 -2
  801. package/packages/print/src/page-break.ts +2 -2
  802. package/packages/print/src/print.ts +2 -2
  803. package/packages/pulldown/src/pulldown.ts +2 -2
  804. package/packages/radio/src/button.ts +3 -16
  805. package/packages/radio/src/group.ts +3 -17
  806. package/packages/radio/src/radio.ts +2 -2
  807. package/packages/rate/src/rate.ts +2 -2
  808. package/packages/result/src/result.ts +2 -2
  809. package/packages/row/src/col.ts +2 -2
  810. package/packages/row/src/row.ts +2 -2
  811. package/packages/scrollbar/src/scrollbar.ts +3 -4
  812. package/packages/segmented/src/segmented.ts +2 -2
  813. package/packages/select/src/optgroup.ts +2 -2
  814. package/packages/select/src/option.ts +2 -2
  815. package/packages/select/src/select.ts +33 -19
  816. package/packages/slider/src/slider.ts +2 -2
  817. package/packages/space/src/space.ts +2 -2
  818. package/packages/splitter/src/splitter-panel.ts +2 -2
  819. package/packages/splitter/src/splitter.ts +2 -2
  820. package/packages/step-item/index.ts +16 -0
  821. package/packages/steps/src/step-info.ts +18 -0
  822. package/packages/steps/src/step-item.ts +41 -0
  823. package/packages/steps/src/steps.ts +273 -13
  824. package/packages/steps/src/util.ts +44 -0
  825. package/packages/switch/src/switch.ts +2 -2
  826. package/packages/table-select/src/table-select.ts +2 -2
  827. package/packages/table-transfer/src/table-transfer.ts +3 -15
  828. package/packages/tabs/src/tab-pane.ts +2 -2
  829. package/packages/tabs/src/tabs.ts +2 -2
  830. package/packages/tag/src/tag.ts +2 -2
  831. package/packages/text/src/text.ts +2 -2
  832. package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
  833. package/packages/textarea/src/textarea.ts +2 -2
  834. package/packages/timeline/src/timeline-info.ts +17 -17
  835. package/packages/timeline/src/timeline.ts +93 -49
  836. package/packages/timeline/src/util.ts +44 -41
  837. package/packages/tip/src/tip.ts +2 -2
  838. package/packages/tooltip/src/tooltip.ts +2 -2
  839. package/packages/tour/src/tour.ts +2 -2
  840. package/packages/transfer/src/transfer.ts +2 -2
  841. package/packages/tree/src/tree.ts +2 -2
  842. package/packages/tree-select/src/tree-select.ts +2 -2
  843. package/packages/ui/index.ts +8 -1
  844. package/packages/upload/src/upload.ts +2 -2
  845. package/packages/watermark/src/watermark.ts +2 -2
  846. package/styles/all.scss +1 -0
  847. package/styles/components/step-item.scss +0 -0
  848. package/styles/components/steps.scss +354 -0
  849. package/styles/theme/base.scss +9 -0
  850. package/types/all.d.ts +3 -0
  851. package/types/components/gantt.d.ts +1 -3
  852. package/types/components/select.d.ts +1 -13
  853. package/types/components/step-item.d.ts +72 -0
  854. package/types/components/steps.d.ts +67 -8
  855. package/types/components/table.d.ts +7 -66
  856. package/types/handles/form-design.d.ts +1 -4
  857. package/types/ui/global-config.d.ts +2 -0
  858. package/types/ui/global-icon.d.ts +7 -0
  859. /package/dist/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  860. /package/dist/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  861. /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  862. /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  863. /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  864. /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  865. /package/es/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  866. /package/es/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  867. /package/es/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  868. /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  869. /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  870. /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  871. /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  872. /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  873. /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  874. /package/lib/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  875. /package/lib/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  876. /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  877. /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  878. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  879. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
@@ -42,1185 +42,1188 @@ var import_button = __toESM(require("../../button"));
42
42
  var import_input = __toESM(require("../../input"));
43
43
  var import_number_input = __toESM(require("../../number-input"));
44
44
  const { getIcon, getConfig, getI18n, globalEvents, createEvent, useFns, renderEmptyElement } = import_core.VxeUI;
45
- var color_picker_default = (0, import_comp.defineVxeComponent)({
46
- name: "VxeColorPicker",
47
- props: {
48
- modelValue: String,
49
- placeholder: String,
50
- clearable: {
51
- type: Boolean,
52
- default: () => getConfig().colorPicker.clearable
45
+ var color_picker_default = (
46
+ /* define-vxe-component start */
47
+ (0, import_comp.defineVxeComponent)({
48
+ name: "VxeColorPicker",
49
+ props: {
50
+ modelValue: String,
51
+ placeholder: String,
52
+ clearable: {
53
+ type: Boolean,
54
+ default: () => getConfig().colorPicker.clearable
55
+ },
56
+ type: {
57
+ type: String,
58
+ default: () => getConfig().colorPicker.type
59
+ },
60
+ width: [Number, String],
61
+ size: {
62
+ type: String,
63
+ default: () => getConfig().colorPicker.size || getConfig().size
64
+ },
65
+ className: [String, Function],
66
+ popupClassName: [String, Function],
67
+ colors: {
68
+ type: Array,
69
+ default: () => import_xe_utils.default.clone(getConfig().colorPicker.colors, true) || []
70
+ },
71
+ showAlpha: {
72
+ type: Boolean,
73
+ default: () => getConfig().colorPicker.showAlpha
74
+ },
75
+ showEyeDropper: {
76
+ type: Boolean,
77
+ default: () => getConfig().colorPicker.showEyeDropper
78
+ },
79
+ showColorExtractor: {
80
+ type: Boolean,
81
+ default: () => getConfig().colorPicker.showColorExtractor
82
+ },
83
+ showQuick: {
84
+ type: Boolean,
85
+ default: () => getConfig().colorPicker.showQuick
86
+ },
87
+ readonly: {
88
+ type: Boolean,
89
+ default: null
90
+ },
91
+ disabled: {
92
+ type: Boolean,
93
+ default: null
94
+ },
95
+ clickToCopy: {
96
+ type: Boolean,
97
+ default: () => getConfig().colorPicker.clickToCopy
98
+ },
99
+ defaultColor: {
100
+ type: String,
101
+ default: () => getConfig().colorPicker.defaultColor
102
+ },
103
+ /**
104
+ * 已废弃,请使用 popupConfig.placement
105
+ * @deprecated
106
+ */
107
+ placement: String,
108
+ /**
109
+ * 已废弃,请使用 popupConfig.transfer
110
+ * @deprecated
111
+ */
112
+ transfer: {
113
+ type: Boolean,
114
+ default: null
115
+ },
116
+ popupConfig: Object
53
117
  },
54
- type: {
55
- type: String,
56
- default: () => getConfig().colorPicker.type
57
- },
58
- width: [Number, String],
59
- size: {
60
- type: String,
61
- default: () => getConfig().colorPicker.size || getConfig().size
62
- },
63
- className: [String, Function],
64
- popupClassName: [String, Function],
65
- colors: {
66
- type: Array,
67
- default: () => import_xe_utils.default.clone(getConfig().colorPicker.colors, true) || []
68
- },
69
- showAlpha: {
70
- type: Boolean,
71
- default: () => getConfig().colorPicker.showAlpha
72
- },
73
- showEyeDropper: {
74
- type: Boolean,
75
- default: () => getConfig().colorPicker.showEyeDropper
76
- },
77
- showColorExtractor: {
78
- type: Boolean,
79
- default: () => getConfig().colorPicker.showColorExtractor
80
- },
81
- showQuick: {
82
- type: Boolean,
83
- default: () => getConfig().colorPicker.showQuick
84
- },
85
- readonly: {
86
- type: Boolean,
87
- default: null
88
- },
89
- disabled: {
90
- type: Boolean,
91
- default: null
92
- },
93
- clickToCopy: {
94
- type: Boolean,
95
- default: () => getConfig().colorPicker.clickToCopy
96
- },
97
- defaultColor: {
98
- type: String,
99
- default: () => getConfig().colorPicker.defaultColor
100
- },
101
- /**
102
- * 已废弃,请使用 popupConfig.placement
103
- * @deprecated
104
- */
105
- placement: String,
106
- /**
107
- * 已废弃,请使用 popupConfig.transfer
108
- * @deprecated
109
- */
110
- transfer: {
111
- type: Boolean,
112
- default: null
113
- },
114
- popupConfig: Object
115
- },
116
- emits: ["update:modelValue", "change", "clear", "click"],
117
- setup(props, context) {
118
- const { emit } = context;
119
- const $xeModal = (0, import_vue.inject)("$xeModal", null);
120
- const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
121
- const $xeTable = (0, import_vue.inject)("$xeTable", null);
122
- const $xeCard = (0, import_vue.inject)("$xeCard", null);
123
- const $xeForm = (0, import_vue.inject)("$xeForm", null);
124
- const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
125
- const WinEyeDropper = typeof window !== "undefined" ? window.EyeDropper : null;
126
- const xID = import_xe_utils.default.uniqueId();
127
- const { computeSize } = useFns.useSize(props);
128
- const refElem = (0, import_vue.ref)();
129
- const refInputTarget = (0, import_vue.ref)();
130
- const refOptionPanel = (0, import_vue.ref)();
131
- const refHueSliderElem = (0, import_vue.ref)();
132
- const refHueSliderBtnElem = (0, import_vue.ref)();
133
- const refAlphaSliderElem = (0, import_vue.ref)();
134
- const refAlphaSliderBtnElem = (0, import_vue.ref)();
135
- const refColorPanelElem = (0, import_vue.ref)();
136
- const refColorActiveElem = (0, import_vue.ref)();
137
- const reactData = (0, import_vue.reactive)({
138
- initialized: false,
139
- selectTyle: "hex",
140
- selectColor: `${props.modelValue || ""}`,
141
- showTypePopup: false,
142
- panelColor: "",
143
- hexValue: "",
144
- rValue: 0,
145
- gValue: 0,
146
- bValue: 0,
147
- aValue: 0,
148
- panelIndex: 0,
149
- panelStyle: {},
150
- panelPlacement: null,
151
- visiblePanel: false,
152
- isAniVisible: false,
153
- isActivated: false
154
- });
155
- const typeList = [
156
- { label: "HEX", value: "hex" },
157
- { label: "RGB", value: "rgb" }
158
- ];
159
- const internalData = {
160
- // hpTimeout: undefined
161
- };
162
- const computeFormReadonly = (0, import_vue.computed)(() => {
163
- const { readonly } = props;
164
- if (readonly === null) {
165
- if ($xeForm) {
166
- return $xeForm.props.readonly;
167
- }
168
- return false;
169
- }
170
- return readonly;
171
- });
172
- const computeIsDisabled = (0, import_vue.computed)(() => {
173
- const { disabled } = props;
174
- if (disabled === null) {
175
- if ($xeForm) {
176
- return $xeForm.props.disabled;
118
+ emits: ["update:modelValue", "change", "clear", "click"],
119
+ setup(props, context) {
120
+ const { emit } = context;
121
+ const $xeModal = (0, import_vue.inject)("$xeModal", null);
122
+ const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
123
+ const $xeTable = (0, import_vue.inject)("$xeTable", null);
124
+ const $xeCard = (0, import_vue.inject)("$xeCard", null);
125
+ const $xeForm = (0, import_vue.inject)("$xeForm", null);
126
+ const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
127
+ const WinEyeDropper = typeof window !== "undefined" ? window.EyeDropper : null;
128
+ const xID = import_xe_utils.default.uniqueId();
129
+ const { computeSize } = useFns.useSize(props);
130
+ const refElem = (0, import_vue.ref)();
131
+ const refInputTarget = (0, import_vue.ref)();
132
+ const refOptionPanel = (0, import_vue.ref)();
133
+ const refHueSliderElem = (0, import_vue.ref)();
134
+ const refHueSliderBtnElem = (0, import_vue.ref)();
135
+ const refAlphaSliderElem = (0, import_vue.ref)();
136
+ const refAlphaSliderBtnElem = (0, import_vue.ref)();
137
+ const refColorPanelElem = (0, import_vue.ref)();
138
+ const refColorActiveElem = (0, import_vue.ref)();
139
+ const reactData = (0, import_vue.reactive)({
140
+ initialized: false,
141
+ selectTyle: "hex",
142
+ selectColor: `${props.modelValue || ""}`,
143
+ showTypePopup: false,
144
+ panelColor: "",
145
+ hexValue: "",
146
+ rValue: 0,
147
+ gValue: 0,
148
+ bValue: 0,
149
+ aValue: 0,
150
+ panelIndex: 0,
151
+ panelStyle: {},
152
+ panelPlacement: null,
153
+ visiblePanel: false,
154
+ isAniVisible: false,
155
+ isActivated: false
156
+ });
157
+ const typeList = [
158
+ { label: "HEX", value: "hex" },
159
+ { label: "RGB", value: "rgb" }
160
+ ];
161
+ const internalData = {
162
+ // hpTimeout: undefined
163
+ };
164
+ const computeFormReadonly = (0, import_vue.computed)(() => {
165
+ const { readonly } = props;
166
+ if (readonly === null) {
167
+ if ($xeForm) {
168
+ return $xeForm.props.readonly;
169
+ }
170
+ return false;
177
171
  }
178
- return false;
179
- }
180
- return disabled;
181
- });
182
- const computeBtnTransfer = (0, import_vue.computed)(() => {
183
- const { transfer } = props;
184
- if (transfer === null) {
185
- const globalTransfer = getConfig().colorPicker.transfer;
186
- if (import_xe_utils.default.isBoolean(globalTransfer)) {
187
- return globalTransfer;
172
+ return readonly;
173
+ });
174
+ const computeIsDisabled = (0, import_vue.computed)(() => {
175
+ const { disabled } = props;
176
+ if (disabled === null) {
177
+ if ($xeForm) {
178
+ return $xeForm.props.disabled;
179
+ }
180
+ return false;
188
181
  }
189
- if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
190
- return true;
182
+ return disabled;
183
+ });
184
+ const computeBtnTransfer = (0, import_vue.computed)(() => {
185
+ const { transfer } = props;
186
+ if (transfer === null) {
187
+ const globalTransfer = getConfig().colorPicker.transfer;
188
+ if (import_xe_utils.default.isBoolean(globalTransfer)) {
189
+ return globalTransfer;
190
+ }
191
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
192
+ return true;
193
+ }
191
194
  }
192
- }
193
- return transfer;
194
- });
195
- const computeColorList = (0, import_vue.computed)(() => {
196
- const { colors } = props;
197
- if (colors) {
198
- return colors.map((item) => {
199
- if (import_xe_utils.default.isString(item)) {
195
+ return transfer;
196
+ });
197
+ const computeColorList = (0, import_vue.computed)(() => {
198
+ const { colors } = props;
199
+ if (colors) {
200
+ return colors.map((item) => {
201
+ if (import_xe_utils.default.isString(item)) {
202
+ return {
203
+ label: item,
204
+ value: item
205
+ };
206
+ }
200
207
  return {
201
- label: item,
202
- value: item
208
+ label: import_xe_utils.default.eqNull(item.label) ? item.value : item.label,
209
+ value: item.value
203
210
  };
204
- }
205
- return {
206
- label: import_xe_utils.default.eqNull(item.label) ? item.value : item.label,
207
- value: item.value
208
- };
209
- });
210
- }
211
- return [];
212
- });
213
- const computeCurrStyle = (0, import_vue.computed)(() => {
214
- const { width } = props;
215
- const stys = {};
216
- if (width) {
217
- stys.width = (0, import_dom.toCssUnit)(width);
218
- }
219
- return stys;
220
- });
221
- const computePopupOpts = (0, import_vue.computed)(() => {
222
- return Object.assign({}, getConfig().colorPicker.popupConfig, props.popupConfig);
223
- });
224
- const computeIsRgb = (0, import_vue.computed)(() => {
225
- const { selectTyle } = reactData;
226
- return selectTyle === "rgb";
227
- });
228
- const computeSelectTypeItem = (0, import_vue.computed)(() => {
229
- const { selectTyle } = reactData;
230
- return typeList.find((item) => item.value === selectTyle);
231
- });
232
- const refMaps = {
233
- refElem
234
- };
235
- const computeMaps = {};
236
- const $xeColorPicker = {
237
- xID,
238
- props,
239
- context,
240
- reactData,
241
- getRefMaps: () => refMaps,
242
- getComputeMaps: () => computeMaps
243
- };
244
- const emitModel = (value) => {
245
- emit("update:modelValue", value);
246
- };
247
- const updateMode = () => {
248
- const { modelValue } = props;
249
- reactData.selectColor = import_xe_utils.default.toValueString(modelValue);
250
- updateModelColor();
251
- };
252
- const updateType = () => {
253
- const { type } = props;
254
- let selectTyle = "hex";
255
- if (type === "rgb" || type === "rgba") {
256
- selectTyle = "rgb";
257
- }
258
- reactData.selectTyle = selectTyle;
259
- updateMode();
260
- };
261
- const updateModelColor = () => {
262
- const { defaultColor } = props;
263
- const { selectColor, isAniVisible } = reactData;
264
- const isRgb = computeIsRgb.value;
265
- const hueSliderEl = refHueSliderElem.value;
266
- const alphaSliderEl = refAlphaSliderElem.value;
267
- const colorRest = (0, import_util.parseValColor)(selectColor || defaultColor);
268
- reactData.hexValue = "";
269
- reactData.rValue = 0;
270
- reactData.gValue = 0;
271
- reactData.bValue = 0;
272
- reactData.aValue = 1;
273
- if (colorRest) {
274
- if (colorRest.type === "hex") {
275
- reactData.hexValue = colorRest.hex;
276
- } else {
277
- reactData.rValue = colorRest.r;
278
- reactData.gValue = colorRest.g;
279
- reactData.bValue = colorRest.b;
280
- reactData.aValue = colorRest.a;
211
+ });
281
212
  }
282
- if (colorRest.value) {
283
- if (isRgb) {
284
- if (colorRest.type === "hex") {
285
- const rgbRest = (0, import_util.hexToRgb)(colorRest.hex);
286
- if (rgbRest) {
287
- reactData.rValue = rgbRest.r;
288
- reactData.gValue = rgbRest.g;
289
- reactData.bValue = rgbRest.b;
290
- reactData.aValue = rgbRest.a;
291
- }
292
- }
213
+ return [];
214
+ });
215
+ const computeCurrStyle = (0, import_vue.computed)(() => {
216
+ const { width } = props;
217
+ const stys = {};
218
+ if (width) {
219
+ stys.width = (0, import_dom.toCssUnit)(width);
220
+ }
221
+ return stys;
222
+ });
223
+ const computePopupOpts = (0, import_vue.computed)(() => {
224
+ return Object.assign({}, getConfig().colorPicker.popupConfig, props.popupConfig);
225
+ });
226
+ const computeIsRgb = (0, import_vue.computed)(() => {
227
+ const { selectTyle } = reactData;
228
+ return selectTyle === "rgb";
229
+ });
230
+ const computeSelectTypeItem = (0, import_vue.computed)(() => {
231
+ const { selectTyle } = reactData;
232
+ return typeList.find((item) => item.value === selectTyle);
233
+ });
234
+ const refMaps = {
235
+ refElem
236
+ };
237
+ const computeMaps = {};
238
+ const $xeColorPicker = {
239
+ xID,
240
+ props,
241
+ context,
242
+ reactData,
243
+ getRefMaps: () => refMaps,
244
+ getComputeMaps: () => computeMaps
245
+ };
246
+ const emitModel = (value) => {
247
+ emit("update:modelValue", value);
248
+ };
249
+ const updateMode = () => {
250
+ const { modelValue } = props;
251
+ reactData.selectColor = import_xe_utils.default.toValueString(modelValue);
252
+ updateModelColor();
253
+ };
254
+ const updateType = () => {
255
+ const { type } = props;
256
+ let selectTyle = "hex";
257
+ if (type === "rgb" || type === "rgba") {
258
+ selectTyle = "rgb";
259
+ }
260
+ reactData.selectTyle = selectTyle;
261
+ updateMode();
262
+ };
263
+ const updateModelColor = () => {
264
+ const { defaultColor } = props;
265
+ const { selectColor, isAniVisible } = reactData;
266
+ const isRgb = computeIsRgb.value;
267
+ const hueSliderEl = refHueSliderElem.value;
268
+ const alphaSliderEl = refAlphaSliderElem.value;
269
+ const colorRest = (0, import_util.parseValColor)(selectColor || defaultColor);
270
+ reactData.hexValue = "";
271
+ reactData.rValue = 0;
272
+ reactData.gValue = 0;
273
+ reactData.bValue = 0;
274
+ reactData.aValue = 1;
275
+ if (colorRest) {
276
+ if (colorRest.type === "hex") {
277
+ reactData.hexValue = colorRest.hex;
293
278
  } else {
294
- if (colorRest.type !== "hex") {
295
- reactData.hexValue = (0, import_util.rgbToHexVal)(colorRest.r, colorRest.g, colorRest.b, colorRest.a);
279
+ reactData.rValue = colorRest.r;
280
+ reactData.gValue = colorRest.g;
281
+ reactData.bValue = colorRest.b;
282
+ reactData.aValue = colorRest.a;
283
+ }
284
+ if (colorRest.value) {
285
+ if (isRgb) {
286
+ if (colorRest.type === "hex") {
287
+ const rgbRest = (0, import_util.hexToRgb)(colorRest.hex);
288
+ if (rgbRest) {
289
+ reactData.rValue = rgbRest.r;
290
+ reactData.gValue = rgbRest.g;
291
+ reactData.bValue = rgbRest.b;
292
+ reactData.aValue = rgbRest.a;
293
+ }
294
+ }
295
+ } else {
296
+ if (colorRest.type !== "hex") {
297
+ reactData.hexValue = (0, import_util.rgbToHexVal)(colorRest.r, colorRest.g, colorRest.b, colorRest.a);
298
+ }
296
299
  }
297
300
  }
298
301
  }
299
- }
300
- if (isAniVisible) {
301
- const hsvRest = colorRest ? colorRest.type === "hex" ? (0, import_util.hexToHsv)(colorRest.hex) : (0, import_util.rgbToHsv)(colorRest) : null;
302
- const colorPanelEl = refColorPanelElem.value;
303
- if (hsvRest) {
304
- if (colorPanelEl) {
305
- const offsetTop = colorPanelEl.clientHeight * (1 - hsvRest.v);
306
- const offsetLeft = colorPanelEl.clientWidth * hsvRest.s;
307
- handlePanelColor(offsetLeft, offsetTop);
302
+ if (isAniVisible) {
303
+ const hsvRest = colorRest ? colorRest.type === "hex" ? (0, import_util.hexToHsv)(colorRest.hex) : (0, import_util.rgbToHsv)(colorRest) : null;
304
+ const colorPanelEl = refColorPanelElem.value;
305
+ if (hsvRest) {
306
+ if (colorPanelEl) {
307
+ const offsetTop = colorPanelEl.clientHeight * (1 - hsvRest.v);
308
+ const offsetLeft = colorPanelEl.clientWidth * hsvRest.s;
309
+ handlePanelColor(offsetLeft, offsetTop);
310
+ }
311
+ if (hueSliderEl) {
312
+ handleHueColor(import_xe_utils.default.ceil((1 - hsvRest.h / 360) * hueSliderEl.clientWidth) - 1);
313
+ }
308
314
  }
309
- if (hueSliderEl) {
310
- handleHueColor(import_xe_utils.default.ceil((1 - hsvRest.h / 360) * hueSliderEl.clientWidth) - 1);
315
+ if (alphaSliderEl) {
316
+ handleAlphaColor(alphaSliderEl.clientWidth * reactData.aValue);
311
317
  }
312
318
  }
313
- if (alphaSliderEl) {
314
- handleAlphaColor(alphaSliderEl.clientWidth * reactData.aValue);
319
+ };
320
+ const updateZindex = () => {
321
+ if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
322
+ reactData.panelIndex = (0, import_utils.nextZIndex)();
315
323
  }
316
- }
317
- };
318
- const updateZindex = () => {
319
- if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
320
- reactData.panelIndex = (0, import_utils.nextZIndex)();
321
- }
322
- };
323
- const updatePlacement = () => {
324
- const { placement } = props;
325
- const { panelIndex } = reactData;
326
- const targetElem = refElem.value;
327
- const panelElem = refOptionPanel.value;
328
- const btnTransfer = computeBtnTransfer.value;
329
- const popupOpts = computePopupOpts.value;
330
- const handleStyle = () => {
331
- const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
332
- placement: popupOpts.placement || placement,
333
- defaultPlacement: popupOpts.defaultPlacement,
334
- appendTo: popupOpts.appendTo,
335
- teleportTo: btnTransfer
336
- });
337
- const panelStyle = Object.assign(ppObj.style, {
338
- zIndex: panelIndex
339
- });
340
- reactData.panelStyle = panelStyle;
341
- reactData.panelPlacement = ppObj.placement;
342
324
  };
343
- handleStyle();
344
- return (0, import_vue.nextTick)().then(handleStyle);
345
- };
346
- const showOptionPanel = () => {
347
- const { hpTimeout } = internalData;
348
- const isDisabled = computeIsDisabled.value;
349
- if (!isDisabled) {
350
- if (hpTimeout) {
351
- clearTimeout(hpTimeout);
352
- internalData.hpTimeout = void 0;
325
+ const updatePlacement = () => {
326
+ const { placement } = props;
327
+ const { panelIndex } = reactData;
328
+ const targetElem = refElem.value;
329
+ const panelElem = refOptionPanel.value;
330
+ const btnTransfer = computeBtnTransfer.value;
331
+ const popupOpts = computePopupOpts.value;
332
+ const handleStyle = () => {
333
+ const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
334
+ placement: popupOpts.placement || placement,
335
+ defaultPlacement: popupOpts.defaultPlacement,
336
+ appendTo: popupOpts.appendTo,
337
+ teleportTo: btnTransfer
338
+ });
339
+ const panelStyle = Object.assign(ppObj.style, {
340
+ zIndex: panelIndex
341
+ });
342
+ reactData.panelStyle = panelStyle;
343
+ reactData.panelPlacement = ppObj.placement;
344
+ };
345
+ handleStyle();
346
+ return (0, import_vue.nextTick)().then(handleStyle);
347
+ };
348
+ const showOptionPanel = () => {
349
+ const { hpTimeout } = internalData;
350
+ const isDisabled = computeIsDisabled.value;
351
+ if (!isDisabled) {
352
+ if (hpTimeout) {
353
+ clearTimeout(hpTimeout);
354
+ internalData.hpTimeout = void 0;
355
+ }
356
+ if (!reactData.initialized) {
357
+ reactData.initialized = true;
358
+ }
359
+ reactData.isActivated = true;
360
+ reactData.isAniVisible = true;
361
+ setTimeout(() => {
362
+ updateModelColor();
363
+ reactData.visiblePanel = true;
364
+ }, 10);
365
+ updateZindex();
366
+ updatePlacement();
353
367
  }
354
- if (!reactData.initialized) {
355
- reactData.initialized = true;
368
+ };
369
+ const hideOptionPanel = () => {
370
+ reactData.visiblePanel = false;
371
+ internalData.hpTimeout = setTimeout(() => {
372
+ reactData.isAniVisible = false;
373
+ }, 350);
374
+ };
375
+ const changeEvent = (evnt, value) => {
376
+ reactData.selectColor = value;
377
+ if (value !== props.modelValue) {
378
+ emitModel(value);
379
+ dispatchEvent("change", { value }, evnt);
380
+ if ($xeForm && formItemInfo) {
381
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
382
+ }
356
383
  }
357
- reactData.isActivated = true;
358
- reactData.isAniVisible = true;
359
- setTimeout(() => {
360
- updateModelColor();
361
- reactData.visiblePanel = true;
362
- }, 10);
363
- updateZindex();
364
- updatePlacement();
365
- }
366
- };
367
- const hideOptionPanel = () => {
368
- reactData.visiblePanel = false;
369
- internalData.hpTimeout = setTimeout(() => {
370
- reactData.isAniVisible = false;
371
- }, 350);
372
- };
373
- const changeEvent = (evnt, value) => {
374
- reactData.selectColor = value;
375
- if (value !== props.modelValue) {
376
- emitModel(value);
377
- dispatchEvent("change", { value }, evnt);
378
- if ($xeForm && formItemInfo) {
379
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
384
+ };
385
+ const clearValueEvent = (evnt, selectValue) => {
386
+ changeEvent(evnt, selectValue);
387
+ dispatchEvent("clear", { value: selectValue }, evnt);
388
+ };
389
+ const focusEvent = () => {
390
+ const isDisabled = computeIsDisabled.value;
391
+ if (!isDisabled) {
392
+ if (!reactData.visiblePanel) {
393
+ showOptionPanel();
394
+ }
380
395
  }
381
- }
382
- };
383
- const clearValueEvent = (evnt, selectValue) => {
384
- changeEvent(evnt, selectValue);
385
- dispatchEvent("clear", { value: selectValue }, evnt);
386
- };
387
- const focusEvent = () => {
388
- const isDisabled = computeIsDisabled.value;
389
- if (!isDisabled) {
390
- if (!reactData.visiblePanel) {
396
+ };
397
+ const blurEvent = () => {
398
+ reactData.isActivated = false;
399
+ };
400
+ const clearEvent = (evnt) => {
401
+ clearValueEvent(evnt, null);
402
+ hideOptionPanel();
403
+ };
404
+ const confirmEvent = (evnt) => {
405
+ const { selectTyle, selectColor, hexValue } = reactData;
406
+ const value = selectTyle === "hex" ? hexValue : selectColor;
407
+ changeEvent(evnt, value);
408
+ hideOptionPanel();
409
+ };
410
+ const togglePanelEvent = (evnt) => {
411
+ evnt.preventDefault();
412
+ if (reactData.visiblePanel) {
413
+ hideOptionPanel();
414
+ } else {
391
415
  showOptionPanel();
392
416
  }
393
- }
394
- };
395
- const blurEvent = () => {
396
- reactData.isActivated = false;
397
- };
398
- const clearEvent = (evnt) => {
399
- clearValueEvent(evnt, null);
400
- hideOptionPanel();
401
- };
402
- const confirmEvent = (evnt) => {
403
- const { selectTyle, selectColor, hexValue } = reactData;
404
- const value = selectTyle === "hex" ? hexValue : selectColor;
405
- changeEvent(evnt, value);
406
- hideOptionPanel();
407
- };
408
- const togglePanelEvent = (evnt) => {
409
- evnt.preventDefault();
410
- if (reactData.visiblePanel) {
411
- hideOptionPanel();
412
- } else {
413
- showOptionPanel();
414
- }
415
- };
416
- const clickEvent = (evnt) => {
417
- togglePanelEvent(evnt);
418
- dispatchEvent("click", {}, evnt);
419
- };
420
- const handlePanelClickEvent = () => {
421
- reactData.showTypePopup = false;
422
- };
423
- const toggleTypeVisibleEvent = (evnt) => {
424
- evnt.stopPropagation();
425
- reactData.showTypePopup = !reactData.showTypePopup;
426
- };
427
- const handleChangeType = (type) => {
428
- const { selectTyle } = reactData;
429
- if (type !== selectTyle) {
430
- reactData.selectTyle = type;
431
- updateModelColor();
432
- }
433
- reactData.showTypePopup = false;
434
- };
435
- const handleHueColor = (offsetLeft) => {
436
- const hueSliderEl = refHueSliderElem.value;
437
- const hueSliderBtnEl = refHueSliderBtnElem.value;
438
- if (hueSliderEl && hueSliderBtnEl) {
439
- if (offsetLeft < 0) {
440
- offsetLeft = 0;
417
+ };
418
+ const clickEvent = (evnt) => {
419
+ togglePanelEvent(evnt);
420
+ dispatchEvent("click", {}, evnt);
421
+ };
422
+ const handlePanelClickEvent = () => {
423
+ reactData.showTypePopup = false;
424
+ };
425
+ const toggleTypeVisibleEvent = (evnt) => {
426
+ evnt.stopPropagation();
427
+ reactData.showTypePopup = !reactData.showTypePopup;
428
+ };
429
+ const handleChangeType = (type) => {
430
+ const { selectTyle } = reactData;
431
+ if (type !== selectTyle) {
432
+ reactData.selectTyle = type;
433
+ updateModelColor();
434
+ }
435
+ reactData.showTypePopup = false;
436
+ };
437
+ const handleHueColor = (offsetLeft) => {
438
+ const hueSliderEl = refHueSliderElem.value;
439
+ const hueSliderBtnEl = refHueSliderBtnElem.value;
440
+ if (hueSliderEl && hueSliderBtnEl) {
441
+ if (offsetLeft < 0) {
442
+ offsetLeft = 0;
443
+ }
444
+ const barWidth = import_xe_utils.default.toInteger(hueSliderEl.clientWidth);
445
+ const itemNum = 255;
446
+ const countNum = itemNum * 6;
447
+ const offsetX = import_xe_utils.default.ceil(countNum / barWidth * offsetLeft);
448
+ const offsetNum = offsetX % itemNum;
449
+ let rNum = 0;
450
+ let gNum = 0;
451
+ let bNum = 0;
452
+ switch (Math.ceil(offsetX / itemNum)) {
453
+ case 1:
454
+ rNum = itemNum;
455
+ bNum = offsetNum;
456
+ break;
457
+ case 2:
458
+ rNum = itemNum - offsetNum;
459
+ bNum = itemNum;
460
+ break;
461
+ case 3:
462
+ gNum = offsetNum;
463
+ bNum = itemNum;
464
+ break;
465
+ case 4:
466
+ gNum = itemNum;
467
+ bNum = itemNum - offsetNum;
468
+ break;
469
+ case 5:
470
+ rNum = offsetNum;
471
+ gNum = itemNum;
472
+ break;
473
+ case 6:
474
+ rNum = itemNum;
475
+ gNum = itemNum - offsetNum;
476
+ break;
477
+ }
478
+ reactData.panelColor = (0, import_util.toValRgb)(rNum, gNum, bNum);
479
+ hueSliderBtnEl.style.left = (0, import_dom.toCssUnit)(offsetLeft);
441
480
  }
442
- const barWidth = import_xe_utils.default.toInteger(hueSliderEl.clientWidth);
443
- const itemNum = 255;
444
- const countNum = itemNum * 6;
445
- const offsetX = import_xe_utils.default.ceil(countNum / barWidth * offsetLeft);
446
- const offsetNum = offsetX % itemNum;
447
- let rNum = 0;
448
- let gNum = 0;
449
- let bNum = 0;
450
- switch (Math.ceil(offsetX / itemNum)) {
451
- case 1:
452
- rNum = itemNum;
453
- bNum = offsetNum;
454
- break;
455
- case 2:
456
- rNum = itemNum - offsetNum;
457
- bNum = itemNum;
458
- break;
459
- case 3:
460
- gNum = offsetNum;
461
- bNum = itemNum;
462
- break;
463
- case 4:
464
- gNum = itemNum;
465
- bNum = itemNum - offsetNum;
466
- break;
467
- case 5:
468
- rNum = offsetNum;
469
- gNum = itemNum;
470
- break;
471
- case 6:
472
- rNum = itemNum;
473
- gNum = itemNum - offsetNum;
474
- break;
481
+ };
482
+ const handleHueBarEvent = (evnt) => {
483
+ const hueSliderEl = refHueSliderElem.value;
484
+ const hueSliderBtnEl = refHueSliderBtnElem.value;
485
+ if (hueSliderEl && hueSliderBtnEl) {
486
+ const hueSliderRect = hueSliderEl.getBoundingClientRect();
487
+ const barWidth = import_xe_utils.default.toInteger(hueSliderEl.clientWidth);
488
+ const offsetLeft = import_xe_utils.default.ceil(Math.min(barWidth - 1, Math.max(1, evnt.clientX - hueSliderRect.x)));
489
+ handleHueColor(offsetLeft);
475
490
  }
476
- reactData.panelColor = (0, import_util.toValRgb)(rNum, gNum, bNum);
477
- hueSliderBtnEl.style.left = (0, import_dom.toCssUnit)(offsetLeft);
478
- }
479
- };
480
- const handleHueBarEvent = (evnt) => {
481
- const hueSliderEl = refHueSliderElem.value;
482
- const hueSliderBtnEl = refHueSliderBtnElem.value;
483
- if (hueSliderEl && hueSliderBtnEl) {
484
- const hueSliderRect = hueSliderEl.getBoundingClientRect();
485
- const barWidth = import_xe_utils.default.toInteger(hueSliderEl.clientWidth);
486
- const offsetLeft = import_xe_utils.default.ceil(Math.min(barWidth - 1, Math.max(1, evnt.clientX - hueSliderRect.x)));
487
- handleHueColor(offsetLeft);
488
- }
489
- };
490
- const handleHueSliderMousedownEvent = (evnt) => {
491
- evnt.preventDefault();
492
- document.onmousemove = (evnt2) => {
493
- evnt2.preventDefault();
494
- handleHueBarEvent(evnt2);
495
491
  };
496
- document.onmouseup = (evnt2) => {
497
- document.onmousemove = null;
498
- document.onmouseup = null;
499
- handleHueBarEvent(evnt2);
492
+ const handleHueSliderMousedownEvent = (evnt) => {
493
+ evnt.preventDefault();
494
+ document.onmousemove = (evnt2) => {
495
+ evnt2.preventDefault();
496
+ handleHueBarEvent(evnt2);
497
+ };
498
+ document.onmouseup = (evnt2) => {
499
+ document.onmousemove = null;
500
+ document.onmouseup = null;
501
+ handleHueBarEvent(evnt2);
502
+ };
500
503
  };
501
- };
502
- const handleAlphaColor = (offsetLeft) => {
503
- const { selectColor } = reactData;
504
- const alphaSliderEl = refAlphaSliderElem.value;
505
- const alphaSliderBtnEl = refAlphaSliderBtnElem.value;
506
- if (alphaSliderEl && alphaSliderBtnEl) {
507
- const alphaSliderRect = alphaSliderEl.getBoundingClientRect();
508
- const barWidth = alphaSliderRect.width;
509
- if (offsetLeft < 0) {
510
- offsetLeft = 0;
504
+ const handleAlphaColor = (offsetLeft) => {
505
+ const { selectColor } = reactData;
506
+ const alphaSliderEl = refAlphaSliderElem.value;
507
+ const alphaSliderBtnEl = refAlphaSliderBtnElem.value;
508
+ if (alphaSliderEl && alphaSliderBtnEl) {
509
+ const alphaSliderRect = alphaSliderEl.getBoundingClientRect();
510
+ const barWidth = alphaSliderRect.width;
511
+ if (offsetLeft < 0) {
512
+ offsetLeft = 0;
513
+ }
514
+ if (offsetLeft > barWidth) {
515
+ offsetLeft = barWidth;
516
+ }
517
+ const alpha = import_xe_utils.default.ceil(100 / barWidth * offsetLeft / 100, 2);
518
+ reactData.aValue = alpha;
519
+ alphaSliderBtnEl.style.left = (0, import_dom.toCssUnit)(offsetLeft);
520
+ reactData.selectColor = selectColor ? (0, import_util.updateColorAlpha)(selectColor, alpha) : "";
511
521
  }
512
- if (offsetLeft > barWidth) {
513
- offsetLeft = barWidth;
522
+ };
523
+ const handleAlphaBarEvent = (evnt) => {
524
+ const alphaSliderEl = refAlphaSliderElem.value;
525
+ const alphaSliderBtnEl = refAlphaSliderBtnElem.value;
526
+ if (alphaSliderEl && alphaSliderBtnEl) {
527
+ const alphaSliderRect = alphaSliderEl.getBoundingClientRect();
528
+ const barWidth = alphaSliderRect.width;
529
+ const offsetLeft = Math.min(barWidth, Math.max(0, evnt.clientX - alphaSliderRect.x));
530
+ handleAlphaColor(offsetLeft);
531
+ updateModelColor();
514
532
  }
515
- const alpha = import_xe_utils.default.ceil(100 / barWidth * offsetLeft / 100, 2);
516
- reactData.aValue = alpha;
517
- alphaSliderBtnEl.style.left = (0, import_dom.toCssUnit)(offsetLeft);
518
- reactData.selectColor = selectColor ? (0, import_util.updateColorAlpha)(selectColor, alpha) : "";
519
- }
520
- };
521
- const handleAlphaBarEvent = (evnt) => {
522
- const alphaSliderEl = refAlphaSliderElem.value;
523
- const alphaSliderBtnEl = refAlphaSliderBtnElem.value;
524
- if (alphaSliderEl && alphaSliderBtnEl) {
525
- const alphaSliderRect = alphaSliderEl.getBoundingClientRect();
526
- const barWidth = alphaSliderRect.width;
527
- const offsetLeft = Math.min(barWidth, Math.max(0, evnt.clientX - alphaSliderRect.x));
528
- handleAlphaColor(offsetLeft);
533
+ };
534
+ const handleAlphaSliderMousedownEvent = (evnt) => {
535
+ evnt.preventDefault();
536
+ document.onmousemove = (evnt2) => {
537
+ evnt2.preventDefault();
538
+ handleAlphaBarEvent(evnt2);
539
+ };
540
+ document.onmouseup = (evnt2) => {
541
+ document.onmousemove = null;
542
+ document.onmouseup = null;
543
+ handleAlphaBarEvent(evnt2);
544
+ };
545
+ };
546
+ const handleInputRgbEvent = () => {
547
+ const { rValue, gValue, bValue, aValue } = reactData;
548
+ reactData.selectColor = (0, import_util.toValRgb)(rValue, gValue, bValue, aValue);
529
549
  updateModelColor();
530
- }
531
- };
532
- const handleAlphaSliderMousedownEvent = (evnt) => {
533
- evnt.preventDefault();
534
- document.onmousemove = (evnt2) => {
535
- evnt2.preventDefault();
536
- handleAlphaBarEvent(evnt2);
537
550
  };
538
- document.onmouseup = (evnt2) => {
539
- document.onmousemove = null;
540
- document.onmouseup = null;
541
- handleAlphaBarEvent(evnt2);
551
+ const handleInputAlphaEvent = () => {
552
+ const { aValue } = reactData;
553
+ const alphaSliderEl = refAlphaSliderElem.value;
554
+ const alphaSliderBtnEl = refAlphaSliderBtnElem.value;
555
+ if (alphaSliderEl && alphaSliderBtnEl) {
556
+ const alphaSliderRect = alphaSliderEl.getBoundingClientRect();
557
+ const barWidth = alphaSliderRect.width;
558
+ const offsetLeft = barWidth * aValue;
559
+ handleAlphaColor(offsetLeft);
560
+ }
561
+ };
562
+ const handleQuickEvent = (evnt, item) => {
563
+ const value = item.value;
564
+ reactData.selectColor = value;
565
+ updateModelColor();
566
+ };
567
+ const handlePanelColor = (offsetLeft, offsetTop) => {
568
+ const colorActiveEl = refColorActiveElem.value;
569
+ if (colorActiveEl) {
570
+ colorActiveEl.style.top = (0, import_dom.toCssUnit)(offsetTop);
571
+ colorActiveEl.style.left = (0, import_dom.toCssUnit)(offsetLeft);
572
+ }
573
+ };
574
+ const handleEyeDropperEvent = () => {
575
+ if (WinEyeDropper) {
576
+ try {
577
+ const eyeDropper = new WinEyeDropper();
578
+ eyeDropper.open().then((rest) => {
579
+ if (rest && rest.sRGBHex) {
580
+ reactData.selectColor = rest.sRGBHex;
581
+ updateModelColor();
582
+ }
583
+ }).catch(() => {
584
+ });
585
+ } catch (e) {
586
+ }
587
+ }
542
588
  };
543
- };
544
- const handleInputRgbEvent = () => {
545
- const { rValue, gValue, bValue, aValue } = reactData;
546
- reactData.selectColor = (0, import_util.toValRgb)(rValue, gValue, bValue, aValue);
547
- updateModelColor();
548
- };
549
- const handleInputAlphaEvent = () => {
550
- const { aValue } = reactData;
551
- const alphaSliderEl = refAlphaSliderElem.value;
552
- const alphaSliderBtnEl = refAlphaSliderBtnElem.value;
553
- if (alphaSliderEl && alphaSliderBtnEl) {
554
- const alphaSliderRect = alphaSliderEl.getBoundingClientRect();
555
- const barWidth = alphaSliderRect.width;
556
- const offsetLeft = barWidth * aValue;
557
- handleAlphaColor(offsetLeft);
558
- }
559
- };
560
- const handleQuickEvent = (evnt, item) => {
561
- const value = item.value;
562
- reactData.selectColor = value;
563
- updateModelColor();
564
- };
565
- const handlePanelColor = (offsetLeft, offsetTop) => {
566
- const colorActiveEl = refColorActiveElem.value;
567
- if (colorActiveEl) {
568
- colorActiveEl.style.top = (0, import_dom.toCssUnit)(offsetTop);
569
- colorActiveEl.style.left = (0, import_dom.toCssUnit)(offsetLeft);
570
- }
571
- };
572
- const handleEyeDropperEvent = () => {
573
- if (WinEyeDropper) {
574
- try {
575
- const eyeDropper = new WinEyeDropper();
576
- eyeDropper.open().then((rest) => {
577
- if (rest && rest.sRGBHex) {
578
- reactData.selectColor = rest.sRGBHex;
589
+ const handleSelectColorByXY = (clientX, clientY) => {
590
+ const { showAlpha } = props;
591
+ const { panelColor, aValue } = reactData;
592
+ const colorPanelEl = refColorPanelElem.value;
593
+ const colorActiveEl = refColorActiveElem.value;
594
+ if (colorPanelEl && colorActiveEl) {
595
+ const { clientWidth, clientHeight } = colorPanelEl;
596
+ const colorPanelRect = colorPanelEl.getBoundingClientRect();
597
+ const offsetTop = Math.min(clientHeight, Math.max(0, clientY - colorPanelRect.y));
598
+ const offsetLeft = Math.min(clientWidth, Math.max(0, clientX - colorPanelRect.x));
599
+ const colorRest = (0, import_util.parseValColor)(panelColor);
600
+ if (colorRest) {
601
+ const hsvRest = colorRest.type === "hex" ? (0, import_util.hexToHsv)(colorRest.hex) : (0, import_util.rgbToHsv)(colorRest);
602
+ if (hsvRest) {
603
+ const ragRest = (0, import_util.hsvToRgb)(hsvRest.h, offsetLeft / clientWidth, 1 - offsetTop / clientHeight);
604
+ reactData.selectColor = (0, import_util.toValRgb)(ragRest.r, ragRest.g, ragRest.b, showAlpha ? aValue : null);
579
605
  updateModelColor();
580
606
  }
581
- }).catch(() => {
582
- });
583
- } catch (e) {
584
- }
585
- }
586
- };
587
- const handleSelectColorByXY = (clientX, clientY) => {
588
- const { showAlpha } = props;
589
- const { panelColor, aValue } = reactData;
590
- const colorPanelEl = refColorPanelElem.value;
591
- const colorActiveEl = refColorActiveElem.value;
592
- if (colorPanelEl && colorActiveEl) {
593
- const { clientWidth, clientHeight } = colorPanelEl;
594
- const colorPanelRect = colorPanelEl.getBoundingClientRect();
595
- const offsetTop = Math.min(clientHeight, Math.max(0, clientY - colorPanelRect.y));
596
- const offsetLeft = Math.min(clientWidth, Math.max(0, clientX - colorPanelRect.x));
597
- const colorRest = (0, import_util.parseValColor)(panelColor);
598
- if (colorRest) {
599
- const hsvRest = colorRest.type === "hex" ? (0, import_util.hexToHsv)(colorRest.hex) : (0, import_util.rgbToHsv)(colorRest);
600
- if (hsvRest) {
601
- const ragRest = (0, import_util.hsvToRgb)(hsvRest.h, offsetLeft / clientWidth, 1 - offsetTop / clientHeight);
602
- reactData.selectColor = (0, import_util.toValRgb)(ragRest.r, ragRest.g, ragRest.b, showAlpha ? aValue : null);
603
- updateModelColor();
604
607
  }
608
+ handlePanelColor(offsetLeft, offsetTop);
605
609
  }
606
- handlePanelColor(offsetLeft, offsetTop);
607
- }
608
- };
609
- const handleSelectColorMousedownEvent = (evnt) => {
610
- evnt.stopPropagation();
611
- evnt.preventDefault();
612
- handleSelectColorByXY(evnt.clientX, evnt.clientY);
613
- document.onmousemove = (evnt2) => {
614
- handleSelectColorByXY(evnt2.clientX, evnt2.clientY);
615
610
  };
616
- document.onmouseup = () => {
617
- document.onmousemove = null;
618
- document.onmouseup = null;
611
+ const handleSelectColorMousedownEvent = (evnt) => {
612
+ evnt.stopPropagation();
613
+ evnt.preventDefault();
614
+ handleSelectColorByXY(evnt.clientX, evnt.clientY);
615
+ document.onmousemove = (evnt2) => {
616
+ handleSelectColorByXY(evnt2.clientX, evnt2.clientY);
617
+ };
618
+ document.onmouseup = () => {
619
+ document.onmousemove = null;
620
+ document.onmouseup = null;
621
+ };
619
622
  };
620
- };
621
- const handleCopyColorEvent = () => {
622
- const { selectColor } = reactData;
623
- if (selectColor) {
624
- if (import_core.VxeUI.clipboard.copy(selectColor)) {
625
- if (import_core.VxeUI.modal) {
626
- import_core.VxeUI.modal.message({
627
- content: getI18n("vxe.colorPicker.copySuccess", [selectColor]),
628
- status: "success"
629
- });
623
+ const handleCopyColorEvent = () => {
624
+ const { selectColor } = reactData;
625
+ if (selectColor) {
626
+ if (import_core.VxeUI.clipboard.copy(selectColor)) {
627
+ if (import_core.VxeUI.modal) {
628
+ import_core.VxeUI.modal.message({
629
+ content: getI18n("vxe.colorPicker.copySuccess", [selectColor]),
630
+ status: "success"
631
+ });
632
+ }
630
633
  }
631
634
  }
632
- }
633
- };
634
- const handleGlobalMousedownEvent = (evnt) => {
635
- const { visiblePanel } = reactData;
636
- const isDisabled = computeIsDisabled.value;
637
- if (!isDisabled) {
638
- const el = refElem.value;
639
- const panelElem = refOptionPanel.value;
640
- reactData.isActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelElem).flag;
641
- if (visiblePanel && !reactData.isActivated) {
635
+ };
636
+ const handleGlobalMousedownEvent = (evnt) => {
637
+ const { visiblePanel } = reactData;
638
+ const isDisabled = computeIsDisabled.value;
639
+ if (!isDisabled) {
640
+ const el = refElem.value;
641
+ const panelElem = refOptionPanel.value;
642
+ reactData.isActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelElem).flag;
643
+ if (visiblePanel && !reactData.isActivated) {
644
+ hideOptionPanel();
645
+ }
646
+ }
647
+ };
648
+ const handleGlobalBlurEvent = () => {
649
+ const { visiblePanel, isActivated } = reactData;
650
+ if (visiblePanel) {
642
651
  hideOptionPanel();
643
652
  }
644
- }
645
- };
646
- const handleGlobalBlurEvent = () => {
647
- const { visiblePanel, isActivated } = reactData;
648
- if (visiblePanel) {
649
- hideOptionPanel();
650
- }
651
- if (isActivated) {
652
- reactData.isActivated = false;
653
- }
654
- if (visiblePanel || isActivated) {
655
- const targetElem = refInputTarget.value;
656
- if (targetElem) {
657
- targetElem.blur();
653
+ if (isActivated) {
654
+ reactData.isActivated = false;
655
+ }
656
+ if (visiblePanel || isActivated) {
657
+ const targetElem = refInputTarget.value;
658
+ if (targetElem) {
659
+ targetElem.blur();
660
+ }
661
+ }
662
+ };
663
+ const handleGlobalResizeEvent = () => {
664
+ const { visiblePanel } = reactData;
665
+ if (visiblePanel) {
666
+ updatePlacement();
667
+ }
668
+ };
669
+ const handleGlobalScrollEvent = () => {
670
+ const { visiblePanel } = reactData;
671
+ if (visiblePanel) {
672
+ updatePlacement();
673
+ }
674
+ };
675
+ const dispatchEvent = (type, params, evnt) => {
676
+ emit(type, createEvent(evnt, { $colorPicker: $xeColorPicker }, params));
677
+ };
678
+ const colorPickerMethods = {
679
+ dispatchEvent
680
+ };
681
+ const colorPickerPrivateMethods = {};
682
+ Object.assign($xeColorPicker, colorPickerMethods, colorPickerPrivateMethods);
683
+ const renderColorWrapper = () => {
684
+ const { showColorExtractor } = props;
685
+ const { panelColor } = reactData;
686
+ if (showColorExtractor) {
687
+ return (0, import_vue.h)(
688
+ "div",
689
+ {
690
+ ref: refColorPanelElem,
691
+ class: "vxe-color-picker--color-wrapper",
692
+ onMousedown: handleSelectColorMousedownEvent
693
+ },
694
+ [
695
+ (0, import_vue.h)("div", {
696
+ class: "vxe-color-picker--color-bg",
697
+ style: {
698
+ backgroundColor: panelColor
699
+ }
700
+ }),
701
+ (0, import_vue.h)("div", {
702
+ class: "vxe-color-picker--white-bg"
703
+ }),
704
+ (0, import_vue.h)("div", {
705
+ class: "vxe-color-picker--black-bg"
706
+ }),
707
+ (0, import_vue.h)("div", {
708
+ ref: refColorActiveElem,
709
+ class: "vxe-color-picker--color-active"
710
+ })
711
+ ]
712
+ );
658
713
  }
659
- }
660
- };
661
- const handleGlobalResizeEvent = () => {
662
- const { visiblePanel } = reactData;
663
- if (visiblePanel) {
664
- updatePlacement();
665
- }
666
- };
667
- const handleGlobalScrollEvent = () => {
668
- const { visiblePanel } = reactData;
669
- if (visiblePanel) {
670
- updatePlacement();
671
- }
672
- };
673
- const dispatchEvent = (type, params, evnt) => {
674
- emit(type, createEvent(evnt, { $colorPicker: $xeColorPicker }, params));
675
- };
676
- const colorPickerMethods = {
677
- dispatchEvent
678
- };
679
- const colorPickerPrivateMethods = {};
680
- Object.assign($xeColorPicker, colorPickerMethods, colorPickerPrivateMethods);
681
- const renderColorWrapper = () => {
682
- const { showColorExtractor } = props;
683
- const { panelColor } = reactData;
684
- if (showColorExtractor) {
714
+ return renderEmptyElement($xeColorPicker);
715
+ };
716
+ const renderColorBar = () => {
717
+ const { showAlpha, clickToCopy, showEyeDropper } = props;
718
+ const { selectTyle, showTypePopup, hexValue, rValue, gValue, bValue, aValue, selectColor, panelColor } = reactData;
719
+ const isRgb = computeIsRgb.value;
720
+ const selectTypeItem = computeSelectTypeItem.value;
685
721
  return (0, import_vue.h)(
686
722
  "div",
687
723
  {
688
- ref: refColorPanelElem,
689
- class: "vxe-color-picker--color-wrapper",
690
- onMousedown: handleSelectColorMousedownEvent
724
+ class: "vxe-color-picker--bar-wrapper"
691
725
  },
692
726
  [
693
- (0, import_vue.h)("div", {
694
- class: "vxe-color-picker--color-bg",
695
- style: {
696
- backgroundColor: panelColor
697
- }
698
- }),
699
- (0, import_vue.h)("div", {
700
- class: "vxe-color-picker--white-bg"
701
- }),
702
- (0, import_vue.h)("div", {
703
- class: "vxe-color-picker--black-bg"
704
- }),
705
- (0, import_vue.h)("div", {
706
- ref: refColorActiveElem,
707
- class: "vxe-color-picker--color-active"
708
- })
727
+ (0, import_vue.h)(
728
+ "div",
729
+ {
730
+ class: "vxe-color-picker--slider-wrapper"
731
+ },
732
+ [
733
+ showEyeDropper && WinEyeDropper ? (0, import_vue.h)(
734
+ "div",
735
+ {
736
+ class: "vxe-color-picker--color-dropper"
737
+ },
738
+ [
739
+ (0, import_vue.h)(
740
+ "span",
741
+ {
742
+ class: "vxe-color-picker--color-dropper-btn",
743
+ onClick: handleEyeDropperEvent
744
+ },
745
+ [
746
+ (0, import_vue.h)("i", {
747
+ class: getIcon().COLOR_PICKER_EYE_DROPPER
748
+ })
749
+ ]
750
+ )
751
+ ]
752
+ ) : renderEmptyElement($xeColorPicker),
753
+ (0, import_vue.h)(
754
+ "div",
755
+ {
756
+ class: "vxe-color-picker--slider-preview"
757
+ },
758
+ [
759
+ (0, import_vue.h)(
760
+ "div",
761
+ {
762
+ class: "vxe-color-picker--preview-btn"
763
+ },
764
+ [
765
+ (0, import_vue.h)(
766
+ "div",
767
+ {
768
+ class: "vxe-color-picker--preview-color",
769
+ style: {
770
+ backgroundColor: selectColor
771
+ }
772
+ },
773
+ clickToCopy ? [
774
+ (0, import_vue.h)(
775
+ "span",
776
+ {
777
+ class: "vxe-color-picker--preview-copy-btn",
778
+ onClick: handleCopyColorEvent
779
+ },
780
+ [
781
+ (0, import_vue.h)("i", {
782
+ class: getIcon().COLOR_PICKER_COLOR_COPY
783
+ })
784
+ ]
785
+ )
786
+ ] : []
787
+ )
788
+ ]
789
+ )
790
+ ]
791
+ ),
792
+ (0, import_vue.h)(
793
+ "div",
794
+ {
795
+ class: "vxe-color-picker--slider-handle"
796
+ },
797
+ [
798
+ (0, import_vue.h)(
799
+ "div",
800
+ {
801
+ ref: refHueSliderElem,
802
+ class: "vxe-color-picker--bar-hue-slider",
803
+ onClick: handleHueBarEvent
804
+ },
805
+ [
806
+ (0, import_vue.h)("div", {
807
+ ref: refHueSliderBtnElem,
808
+ class: "vxe-color-picker--bar-hue-btn",
809
+ onMousedown: handleHueSliderMousedownEvent
810
+ })
811
+ ]
812
+ ),
813
+ showAlpha ? (0, import_vue.h)(
814
+ "div",
815
+ {
816
+ ref: refAlphaSliderElem,
817
+ class: "vxe-color-picker--bar-alpha-slider",
818
+ onClick: handleAlphaBarEvent
819
+ },
820
+ [
821
+ (0, import_vue.h)("div", {
822
+ class: "vxe-color-picker--bar-alpha-bg",
823
+ style: {
824
+ background: `linear-gradient(to right, rgba(0, 0, 0, 0), ${panelColor})`
825
+ }
826
+ }),
827
+ (0, import_vue.h)("div", {
828
+ ref: refAlphaSliderBtnElem,
829
+ class: "vxe-color-picker--bar-alpha-btn",
830
+ onMousedown: handleAlphaSliderMousedownEvent
831
+ })
832
+ ]
833
+ ) : renderEmptyElement($xeColorPicker)
834
+ ]
835
+ )
836
+ ]
837
+ ),
838
+ (0, import_vue.h)(
839
+ "div",
840
+ {
841
+ class: "vxe-color-picker--custom-wrapper"
842
+ },
843
+ [
844
+ (0, import_vue.h)(
845
+ "div",
846
+ {
847
+ class: "vxe-color-picker--type-switch"
848
+ },
849
+ [
850
+ (0, import_vue.h)(
851
+ "div",
852
+ {
853
+ class: "vxe-color-picker--type-label",
854
+ onClick: toggleTypeVisibleEvent
855
+ },
856
+ [
857
+ (0, import_vue.h)("span", `${selectTypeItem ? selectTypeItem.label : selectTyle}`),
858
+ (0, import_vue.h)(
859
+ "span",
860
+ {
861
+ class: "vxe-color-picker--type-icon"
862
+ },
863
+ [
864
+ (0, import_vue.h)("i", {
865
+ class: showTypePopup ? getIcon().COLOR_PICKER_TPTY_OPEN : getIcon().COLOR_PICKER_TPTY_CLOSE
866
+ })
867
+ ]
868
+ )
869
+ ]
870
+ ),
871
+ (0, import_vue.h)(
872
+ "div",
873
+ {
874
+ class: [
875
+ "vxe-color-picker--type-popup",
876
+ {
877
+ "is--visible": showTypePopup
878
+ }
879
+ ]
880
+ },
881
+ typeList.map((item) => {
882
+ return (0, import_vue.h)(
883
+ "div",
884
+ {
885
+ class: "vxe-color-picker--type-item",
886
+ onClick(evnt) {
887
+ evnt.stopPropagation();
888
+ handleChangeType(item.value);
889
+ }
890
+ },
891
+ item.label
892
+ );
893
+ })
894
+ )
895
+ ]
896
+ ),
897
+ (0, import_vue.h)(
898
+ "div",
899
+ {
900
+ class: `vxe-color-picker--${selectTyle}-wrapper`
901
+ },
902
+ isRgb ? [
903
+ (0, import_vue.h)(
904
+ "div",
905
+ {
906
+ class: "vxe-color-picker--input-wrapper"
907
+ },
908
+ [
909
+ (0, import_vue.h)(import_number_input.default, {
910
+ type: "integer",
911
+ size: "mini",
912
+ align: "center",
913
+ min: 0,
914
+ max: 255,
915
+ maxLength: 3,
916
+ placeholder: "",
917
+ modelValue: rValue,
918
+ controlConfig: {
919
+ showButton: false
920
+ },
921
+ "onUpdate:modelValue"(val) {
922
+ reactData.rValue = val;
923
+ },
924
+ onChange: handleInputRgbEvent
925
+ }),
926
+ (0, import_vue.h)(import_number_input.default, {
927
+ type: "integer",
928
+ size: "mini",
929
+ align: "center",
930
+ min: 0,
931
+ max: 255,
932
+ maxLength: 3,
933
+ placeholder: "",
934
+ modelValue: gValue,
935
+ controlConfig: {
936
+ showButton: false
937
+ },
938
+ "onUpdate:modelValue"(val) {
939
+ reactData.gValue = val;
940
+ },
941
+ onChange: handleInputRgbEvent
942
+ }),
943
+ (0, import_vue.h)(import_number_input.default, {
944
+ type: "integer",
945
+ size: "mini",
946
+ align: "center",
947
+ min: 0,
948
+ max: 255,
949
+ maxLength: 3,
950
+ placeholder: "",
951
+ modelValue: bValue,
952
+ controlConfig: {
953
+ showButton: false
954
+ },
955
+ "onUpdate:modelValue"(val) {
956
+ reactData.bValue = val;
957
+ },
958
+ onChange: handleInputRgbEvent
959
+ }),
960
+ (0, import_vue.h)(import_number_input.default, {
961
+ type: "number",
962
+ size: "mini",
963
+ align: "center",
964
+ min: 0,
965
+ max: 1,
966
+ step: 0.01,
967
+ maxLength: 4,
968
+ placeholder: "",
969
+ modelValue: aValue,
970
+ controlConfig: {
971
+ showButton: false
972
+ },
973
+ "onUpdate:modelValue"(val) {
974
+ reactData.aValue = val;
975
+ },
976
+ onChange: handleInputAlphaEvent
977
+ })
978
+ ]
979
+ ),
980
+ (0, import_vue.h)(
981
+ "div",
982
+ {
983
+ class: "vxe-color-picker--input-title"
984
+ },
985
+ [(0, import_vue.h)("span", "R"), (0, import_vue.h)("span", "G"), (0, import_vue.h)("span", "B"), (0, import_vue.h)("span", "A")]
986
+ )
987
+ ] : [
988
+ (0, import_vue.h)(
989
+ "div",
990
+ {
991
+ class: "vxe-color-picker--input-wrapper"
992
+ },
993
+ [
994
+ (0, import_vue.h)(import_input.default, {
995
+ type: "text",
996
+ size: "mini",
997
+ align: "center",
998
+ maxLength: 9,
999
+ placeholder: "",
1000
+ modelValue: hexValue,
1001
+ "onUpdate:modelValue"(val) {
1002
+ reactData.hexValue = val;
1003
+ },
1004
+ onChange() {
1005
+ const colorRest = (0, import_util.parseValColor)(reactData.hexValue);
1006
+ if (colorRest) {
1007
+ if (colorRest.value) {
1008
+ reactData.selectColor = colorRest.value;
1009
+ updateModelColor();
1010
+ }
1011
+ }
1012
+ }
1013
+ })
1014
+ ]
1015
+ ),
1016
+ (0, import_vue.h)(
1017
+ "div",
1018
+ {
1019
+ class: "vxe-color-picker--input-title"
1020
+ },
1021
+ getI18n("vxe.colorPicker.hex")
1022
+ )
1023
+ ]
1024
+ )
1025
+ ]
1026
+ )
709
1027
  ]
710
1028
  );
711
- }
712
- return renderEmptyElement($xeColorPicker);
713
- };
714
- const renderColorBar = () => {
715
- const { showAlpha, clickToCopy, showEyeDropper } = props;
716
- const { selectTyle, showTypePopup, hexValue, rValue, gValue, bValue, aValue, selectColor, panelColor } = reactData;
717
- const isRgb = computeIsRgb.value;
718
- const selectTypeItem = computeSelectTypeItem.value;
719
- return (0, import_vue.h)(
720
- "div",
721
- {
722
- class: "vxe-color-picker--bar-wrapper"
723
- },
724
- [
725
- (0, import_vue.h)(
1029
+ };
1030
+ const renderQuickWrapper = () => {
1031
+ const { showQuick } = props;
1032
+ const colorList = computeColorList.value;
1033
+ if (showQuick && colorList.length) {
1034
+ return (0, import_vue.h)(
726
1035
  "div",
727
1036
  {
728
- class: "vxe-color-picker--slider-wrapper"
1037
+ class: "vxe-color-picker--quick-wrapper"
729
1038
  },
730
- [
731
- showEyeDropper && WinEyeDropper ? (0, import_vue.h)(
732
- "div",
733
- {
734
- class: "vxe-color-picker--color-dropper"
735
- },
736
- [
737
- (0, import_vue.h)(
738
- "span",
739
- {
740
- class: "vxe-color-picker--color-dropper-btn",
741
- onClick: handleEyeDropperEvent
742
- },
743
- [
744
- (0, import_vue.h)("i", {
745
- class: getIcon().COLOR_PICKER_EYE_DROPPER
746
- })
747
- ]
748
- )
749
- ]
750
- ) : renderEmptyElement($xeColorPicker),
751
- (0, import_vue.h)(
752
- "div",
753
- {
754
- class: "vxe-color-picker--slider-preview"
755
- },
756
- [
757
- (0, import_vue.h)(
758
- "div",
759
- {
760
- class: "vxe-color-picker--preview-btn"
761
- },
762
- [
763
- (0, import_vue.h)(
764
- "div",
765
- {
766
- class: "vxe-color-picker--preview-color",
767
- style: {
768
- backgroundColor: selectColor
769
- }
770
- },
771
- clickToCopy ? [
772
- (0, import_vue.h)(
773
- "span",
774
- {
775
- class: "vxe-color-picker--preview-copy-btn",
776
- onClick: handleCopyColorEvent
777
- },
778
- [
779
- (0, import_vue.h)("i", {
780
- class: getIcon().COLOR_PICKER_COLOR_COPY
781
- })
782
- ]
783
- )
784
- ] : []
785
- )
786
- ]
787
- )
788
- ]
789
- ),
790
- (0, import_vue.h)(
791
- "div",
792
- {
793
- class: "vxe-color-picker--slider-handle"
1039
+ colorList.map((item, i) => {
1040
+ return (0, import_vue.h)("div", {
1041
+ key: i,
1042
+ class: "vxe-color-picker--quick-item",
1043
+ title: item.label || "",
1044
+ style: {
1045
+ backgroundColor: item.value
794
1046
  },
795
- [
796
- (0, import_vue.h)(
797
- "div",
798
- {
799
- ref: refHueSliderElem,
800
- class: "vxe-color-picker--bar-hue-slider",
801
- onClick: handleHueBarEvent
802
- },
803
- [
804
- (0, import_vue.h)("div", {
805
- ref: refHueSliderBtnElem,
806
- class: "vxe-color-picker--bar-hue-btn",
807
- onMousedown: handleHueSliderMousedownEvent
808
- })
809
- ]
810
- ),
811
- showAlpha ? (0, import_vue.h)(
812
- "div",
813
- {
814
- ref: refAlphaSliderElem,
815
- class: "vxe-color-picker--bar-alpha-slider",
816
- onClick: handleAlphaBarEvent
817
- },
818
- [
819
- (0, import_vue.h)("div", {
820
- class: "vxe-color-picker--bar-alpha-bg",
821
- style: {
822
- background: `linear-gradient(to right, rgba(0, 0, 0, 0), ${panelColor})`
823
- }
824
- }),
825
- (0, import_vue.h)("div", {
826
- ref: refAlphaSliderBtnElem,
827
- class: "vxe-color-picker--bar-alpha-btn",
828
- onMousedown: handleAlphaSliderMousedownEvent
829
- })
830
- ]
831
- ) : renderEmptyElement($xeColorPicker)
832
- ]
833
- )
834
- ]
835
- ),
836
- (0, import_vue.h)(
1047
+ onClick(evnt) {
1048
+ handleQuickEvent(evnt, item);
1049
+ }
1050
+ });
1051
+ })
1052
+ );
1053
+ }
1054
+ return renderEmptyElement($xeColorPicker);
1055
+ };
1056
+ const renderVN = () => {
1057
+ const { className, popupClassName, clearable, modelValue } = props;
1058
+ const { initialized, isActivated, isAniVisible, visiblePanel } = reactData;
1059
+ const vSize = computeSize.value;
1060
+ const isDisabled = computeIsDisabled.value;
1061
+ const btnTransfer = computeBtnTransfer.value;
1062
+ const formReadonly = computeFormReadonly.value;
1063
+ if (formReadonly) {
1064
+ return (0, import_vue.h)(
837
1065
  "div",
838
1066
  {
839
- class: "vxe-color-picker--custom-wrapper"
1067
+ ref: refElem,
1068
+ class: [
1069
+ "vxe-color-picker--readonly",
1070
+ className,
1071
+ {
1072
+ [`size--${vSize}`]: vSize
1073
+ }
1074
+ ]
840
1075
  },
841
1076
  [
842
- (0, import_vue.h)(
843
- "div",
844
- {
845
- class: "vxe-color-picker--type-switch"
846
- },
847
- [
848
- (0, import_vue.h)(
849
- "div",
850
- {
851
- class: "vxe-color-picker--type-label",
852
- onClick: toggleTypeVisibleEvent
853
- },
854
- [
855
- (0, import_vue.h)("span", `${selectTypeItem ? selectTypeItem.label : selectTyle}`),
856
- (0, import_vue.h)(
857
- "span",
858
- {
859
- class: "vxe-color-picker--type-icon"
860
- },
861
- [
862
- (0, import_vue.h)("i", {
863
- class: showTypePopup ? getIcon().COLOR_PICKER_TPTY_OPEN : getIcon().COLOR_PICKER_TPTY_CLOSE
864
- })
865
- ]
866
- )
867
- ]
868
- ),
869
- (0, import_vue.h)(
870
- "div",
871
- {
872
- class: [
873
- "vxe-color-picker--type-popup",
874
- {
875
- "is--visible": showTypePopup
876
- }
877
- ]
878
- },
879
- typeList.map((item) => {
880
- return (0, import_vue.h)(
881
- "div",
882
- {
883
- class: "vxe-color-picker--type-item",
884
- onClick(evnt) {
885
- evnt.stopPropagation();
886
- handleChangeType(item.value);
887
- }
888
- },
889
- item.label
890
- );
891
- })
892
- )
893
- ]
894
- ),
895
- (0, import_vue.h)(
896
- "div",
897
- {
898
- class: `vxe-color-picker--${selectTyle}-wrapper`
899
- },
900
- isRgb ? [
901
- (0, import_vue.h)(
902
- "div",
903
- {
904
- class: "vxe-color-picker--input-wrapper"
905
- },
906
- [
907
- (0, import_vue.h)(import_number_input.default, {
908
- type: "integer",
909
- size: "mini",
910
- align: "center",
911
- min: 0,
912
- max: 255,
913
- maxLength: 3,
914
- placeholder: "",
915
- modelValue: rValue,
916
- controlConfig: {
917
- showButton: false
918
- },
919
- "onUpdate:modelValue"(val) {
920
- reactData.rValue = val;
921
- },
922
- onChange: handleInputRgbEvent
923
- }),
924
- (0, import_vue.h)(import_number_input.default, {
925
- type: "integer",
926
- size: "mini",
927
- align: "center",
928
- min: 0,
929
- max: 255,
930
- maxLength: 3,
931
- placeholder: "",
932
- modelValue: gValue,
933
- controlConfig: {
934
- showButton: false
935
- },
936
- "onUpdate:modelValue"(val) {
937
- reactData.gValue = val;
938
- },
939
- onChange: handleInputRgbEvent
940
- }),
941
- (0, import_vue.h)(import_number_input.default, {
942
- type: "integer",
943
- size: "mini",
944
- align: "center",
945
- min: 0,
946
- max: 255,
947
- maxLength: 3,
948
- placeholder: "",
949
- modelValue: bValue,
950
- controlConfig: {
951
- showButton: false
952
- },
953
- "onUpdate:modelValue"(val) {
954
- reactData.bValue = val;
955
- },
956
- onChange: handleInputRgbEvent
957
- }),
958
- (0, import_vue.h)(import_number_input.default, {
959
- type: "number",
960
- size: "mini",
961
- align: "center",
962
- min: 0,
963
- max: 1,
964
- step: 0.01,
965
- maxLength: 4,
966
- placeholder: "",
967
- modelValue: aValue,
968
- controlConfig: {
969
- showButton: false
970
- },
971
- "onUpdate:modelValue"(val) {
972
- reactData.aValue = val;
973
- },
974
- onChange: handleInputAlphaEvent
975
- })
976
- ]
977
- ),
978
- (0, import_vue.h)(
979
- "div",
980
- {
981
- class: "vxe-color-picker--input-title"
982
- },
983
- [(0, import_vue.h)("span", "R"), (0, import_vue.h)("span", "G"), (0, import_vue.h)("span", "B"), (0, import_vue.h)("span", "A")]
984
- )
985
- ] : [
986
- (0, import_vue.h)(
987
- "div",
988
- {
989
- class: "vxe-color-picker--input-wrapper"
990
- },
991
- [
992
- (0, import_vue.h)(import_input.default, {
993
- type: "text",
994
- size: "mini",
995
- align: "center",
996
- maxLength: 9,
997
- placeholder: "",
998
- modelValue: hexValue,
999
- "onUpdate:modelValue"(val) {
1000
- reactData.hexValue = val;
1001
- },
1002
- onChange() {
1003
- const colorRest = (0, import_util.parseValColor)(reactData.hexValue);
1004
- if (colorRest) {
1005
- if (colorRest.value) {
1006
- reactData.selectColor = colorRest.value;
1007
- updateModelColor();
1008
- }
1009
- }
1010
- }
1011
- })
1012
- ]
1013
- ),
1014
- (0, import_vue.h)(
1015
- "div",
1016
- {
1017
- class: "vxe-color-picker--input-title"
1018
- },
1019
- getI18n("vxe.colorPicker.hex")
1020
- )
1021
- ]
1022
- )
1077
+ (0, import_vue.h)("div", {
1078
+ class: [
1079
+ "vxe-color-picker--readonly-color",
1080
+ {
1081
+ "is--empty": !modelValue
1082
+ }
1083
+ ],
1084
+ style: modelValue ? {
1085
+ backgroundColor: modelValue
1086
+ } : void 0
1087
+ })
1023
1088
  ]
1024
- )
1025
- ]
1026
- );
1027
- };
1028
- const renderQuickWrapper = () => {
1029
- const { showQuick } = props;
1030
- const colorList = computeColorList.value;
1031
- if (showQuick && colorList.length) {
1032
- return (0, import_vue.h)(
1033
- "div",
1034
- {
1035
- class: "vxe-color-picker--quick-wrapper"
1036
- },
1037
- colorList.map((item, i) => {
1038
- return (0, import_vue.h)("div", {
1039
- key: i,
1040
- class: "vxe-color-picker--quick-item",
1041
- title: item.label || "",
1042
- style: {
1043
- backgroundColor: item.value
1044
- },
1045
- onClick(evnt) {
1046
- handleQuickEvent(evnt, item);
1047
- }
1048
- });
1049
- })
1050
- );
1051
- }
1052
- return renderEmptyElement($xeColorPicker);
1053
- };
1054
- const renderVN = () => {
1055
- const { className, popupClassName, clearable, modelValue } = props;
1056
- const { initialized, isActivated, isAniVisible, visiblePanel } = reactData;
1057
- const vSize = computeSize.value;
1058
- const isDisabled = computeIsDisabled.value;
1059
- const btnTransfer = computeBtnTransfer.value;
1060
- const formReadonly = computeFormReadonly.value;
1061
- if (formReadonly) {
1089
+ );
1090
+ }
1091
+ const currStyle = computeCurrStyle.value;
1092
+ const popupOpts = computePopupOpts.value;
1093
+ const { appendTo } = popupOpts;
1062
1094
  return (0, import_vue.h)(
1063
1095
  "div",
1064
1096
  {
1065
1097
  ref: refElem,
1066
1098
  class: [
1067
- "vxe-color-picker--readonly",
1068
- className,
1099
+ "vxe-color-picker",
1100
+ className ? import_xe_utils.default.isFunction(className) ? className({ $colorPicker: $xeColorPicker }) : className : "",
1069
1101
  {
1070
- [`size--${vSize}`]: vSize
1102
+ [`size--${vSize}`]: vSize,
1103
+ "is--selected": !!modelValue,
1104
+ "is--visible": visiblePanel,
1105
+ "is--disabled": isDisabled,
1106
+ "is--active": isActivated
1071
1107
  }
1072
- ]
1108
+ ],
1109
+ style: currStyle
1073
1110
  },
1074
1111
  [
1075
- (0, import_vue.h)("div", {
1076
- class: [
1077
- "vxe-color-picker--readonly-color",
1078
- {
1079
- "is--empty": !modelValue
1080
- }
1081
- ],
1082
- style: modelValue ? {
1083
- backgroundColor: modelValue
1084
- } : void 0
1085
- })
1112
+ (0, import_vue.h)("input", {
1113
+ ref: refInputTarget,
1114
+ class: "vxe-color-picker--input",
1115
+ onFocus: focusEvent,
1116
+ onBlur: blurEvent
1117
+ }),
1118
+ (0, import_vue.h)(
1119
+ "div",
1120
+ {
1121
+ class: "vxe-color-picker--inner",
1122
+ onClick: clickEvent
1123
+ },
1124
+ [
1125
+ (0, import_vue.h)("div", {
1126
+ class: "vxe-color-picker--inner-color",
1127
+ style: {
1128
+ backgroundColor: modelValue
1129
+ }
1130
+ })
1131
+ ]
1132
+ ),
1133
+ (0, import_vue.h)(
1134
+ import_vue.Teleport,
1135
+ {
1136
+ to: (0, import_dom.getPopupContainer)(appendTo),
1137
+ disabled: btnTransfer ? !initialized : true
1138
+ },
1139
+ [
1140
+ (0, import_vue.h)(
1141
+ "div",
1142
+ {
1143
+ ref: refOptionPanel,
1144
+ class: [
1145
+ "vxe-table--ignore-clear vxe-color-picker--panel",
1146
+ popupClassName ? import_xe_utils.default.isFunction(popupClassName) ? popupClassName({ $colorPicker: $xeColorPicker }) : popupClassName : "",
1147
+ {
1148
+ [`size--${vSize}`]: vSize,
1149
+ "is--transfer": btnTransfer,
1150
+ "ani--leave": isAniVisible,
1151
+ "ani--enter": visiblePanel
1152
+ }
1153
+ ],
1154
+ placement: reactData.panelPlacement,
1155
+ style: reactData.panelStyle
1156
+ },
1157
+ [
1158
+ initialized && (visiblePanel || isAniVisible) ? (0, import_vue.h)(
1159
+ "div",
1160
+ {
1161
+ class: "vxe-color-picker--panel-wrapper",
1162
+ onClick: handlePanelClickEvent
1163
+ },
1164
+ [
1165
+ renderColorWrapper(),
1166
+ renderColorBar(),
1167
+ renderQuickWrapper(),
1168
+ (0, import_vue.h)(
1169
+ "div",
1170
+ {
1171
+ class: "vxe-color-picker--footer-wrapper"
1172
+ },
1173
+ [
1174
+ clearable ? (0, import_vue.h)(import_button.default, {
1175
+ content: getI18n("vxe.colorPicker.clear"),
1176
+ size: "mini",
1177
+ onClick: clearEvent
1178
+ }) : renderEmptyElement($xeColorPicker),
1179
+ (0, import_vue.h)(import_button.default, {
1180
+ content: getI18n("vxe.colorPicker.confirm"),
1181
+ size: "mini",
1182
+ status: "primary",
1183
+ onClick: confirmEvent
1184
+ })
1185
+ ]
1186
+ )
1187
+ ]
1188
+ ) : renderEmptyElement($xeColorPicker)
1189
+ ]
1190
+ )
1191
+ ]
1192
+ )
1086
1193
  ]
1087
1194
  );
1088
- }
1089
- const currStyle = computeCurrStyle.value;
1090
- const popupOpts = computePopupOpts.value;
1091
- const { appendTo } = popupOpts;
1092
- return (0, import_vue.h)(
1093
- "div",
1094
- {
1095
- ref: refElem,
1096
- class: [
1097
- "vxe-color-picker",
1098
- className ? import_xe_utils.default.isFunction(className) ? className({ $colorPicker: $xeColorPicker }) : className : "",
1099
- {
1100
- [`size--${vSize}`]: vSize,
1101
- "is--selected": !!modelValue,
1102
- "is--visible": visiblePanel,
1103
- "is--disabled": isDisabled,
1104
- "is--active": isActivated
1105
- }
1106
- ],
1107
- style: currStyle
1108
- },
1109
- [
1110
- (0, import_vue.h)("input", {
1111
- ref: refInputTarget,
1112
- class: "vxe-color-picker--input",
1113
- onFocus: focusEvent,
1114
- onBlur: blurEvent
1115
- }),
1116
- (0, import_vue.h)(
1117
- "div",
1118
- {
1119
- class: "vxe-color-picker--inner",
1120
- onClick: clickEvent
1121
- },
1122
- [
1123
- (0, import_vue.h)("div", {
1124
- class: "vxe-color-picker--inner-color",
1125
- style: {
1126
- backgroundColor: modelValue
1127
- }
1128
- })
1129
- ]
1130
- ),
1131
- (0, import_vue.h)(
1132
- import_vue.Teleport,
1133
- {
1134
- to: (0, import_dom.getPopupContainer)(appendTo),
1135
- disabled: btnTransfer ? !initialized : true
1136
- },
1137
- [
1138
- (0, import_vue.h)(
1139
- "div",
1140
- {
1141
- ref: refOptionPanel,
1142
- class: [
1143
- "vxe-table--ignore-clear vxe-color-picker--panel",
1144
- popupClassName ? import_xe_utils.default.isFunction(popupClassName) ? popupClassName({ $colorPicker: $xeColorPicker }) : popupClassName : "",
1145
- {
1146
- [`size--${vSize}`]: vSize,
1147
- "is--transfer": btnTransfer,
1148
- "ani--leave": isAniVisible,
1149
- "ani--enter": visiblePanel
1150
- }
1151
- ],
1152
- placement: reactData.panelPlacement,
1153
- style: reactData.panelStyle
1154
- },
1155
- [
1156
- initialized && (visiblePanel || isAniVisible) ? (0, import_vue.h)(
1157
- "div",
1158
- {
1159
- class: "vxe-color-picker--panel-wrapper",
1160
- onClick: handlePanelClickEvent
1161
- },
1162
- [
1163
- renderColorWrapper(),
1164
- renderColorBar(),
1165
- renderQuickWrapper(),
1166
- (0, import_vue.h)(
1167
- "div",
1168
- {
1169
- class: "vxe-color-picker--footer-wrapper"
1170
- },
1171
- [
1172
- clearable ? (0, import_vue.h)(import_button.default, {
1173
- content: getI18n("vxe.colorPicker.clear"),
1174
- size: "mini",
1175
- onClick: clearEvent
1176
- }) : renderEmptyElement($xeColorPicker),
1177
- (0, import_vue.h)(import_button.default, {
1178
- content: getI18n("vxe.colorPicker.confirm"),
1179
- size: "mini",
1180
- status: "primary",
1181
- onClick: confirmEvent
1182
- })
1183
- ]
1184
- )
1185
- ]
1186
- ) : renderEmptyElement($xeColorPicker)
1187
- ]
1188
- )
1189
- ]
1190
- )
1191
- ]
1195
+ };
1196
+ (0, import_vue.watch)(
1197
+ () => props.modelValue,
1198
+ () => {
1199
+ updateMode();
1200
+ }
1192
1201
  );
1193
- };
1194
- (0, import_vue.watch)(
1195
- () => props.modelValue,
1196
- () => {
1197
- updateMode();
1198
- }
1199
- );
1200
- (0, import_vue.watch)(
1201
- () => props.type,
1202
- () => {
1203
- updateType();
1204
- }
1205
- );
1206
- (0, import_vue.onMounted)(() => {
1207
- globalEvents.on($xeColorPicker, "mousedown", handleGlobalMousedownEvent);
1208
- globalEvents.on($xeColorPicker, "blur", handleGlobalBlurEvent);
1209
- globalEvents.on($xeColorPicker, "resize", handleGlobalResizeEvent);
1210
- globalEvents.on($xeColorPicker, "scroll", handleGlobalScrollEvent);
1211
- });
1212
- (0, import_vue.onUnmounted)(() => {
1213
- globalEvents.off($xeColorPicker, "mousedown");
1214
- globalEvents.off($xeColorPicker, "blur");
1215
- globalEvents.off($xeColorPicker, "resize");
1216
- globalEvents.off($xeColorPicker, "scroll");
1217
- });
1218
- updateType();
1219
- (0, import_vue.provide)("$xeColorPicker", $xeColorPicker);
1220
- $xeColorPicker.renderVN = renderVN;
1221
- return $xeColorPicker;
1222
- },
1223
- render() {
1224
- return this.renderVN();
1225
- }
1226
- });
1202
+ (0, import_vue.watch)(
1203
+ () => props.type,
1204
+ () => {
1205
+ updateType();
1206
+ }
1207
+ );
1208
+ (0, import_vue.onMounted)(() => {
1209
+ globalEvents.on($xeColorPicker, "mousedown", handleGlobalMousedownEvent);
1210
+ globalEvents.on($xeColorPicker, "blur", handleGlobalBlurEvent);
1211
+ globalEvents.on($xeColorPicker, "resize", handleGlobalResizeEvent);
1212
+ globalEvents.on($xeColorPicker, "scroll", handleGlobalScrollEvent);
1213
+ });
1214
+ (0, import_vue.onUnmounted)(() => {
1215
+ globalEvents.off($xeColorPicker, "mousedown");
1216
+ globalEvents.off($xeColorPicker, "blur");
1217
+ globalEvents.off($xeColorPicker, "resize");
1218
+ globalEvents.off($xeColorPicker, "scroll");
1219
+ });
1220
+ updateType();
1221
+ (0, import_vue.provide)("$xeColorPicker", $xeColorPicker);
1222
+ $xeColorPicker.renderVN = renderVN;
1223
+ return $xeColorPicker;
1224
+ },
1225
+ render() {
1226
+ return this.renderVN();
1227
+ }
1228
+ })
1229
+ );