element-ps 2.0.23 → 2.0.24

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 (422) hide show
  1. package/dist/index.full.js +121 -116
  2. package/dist/index.full.min.js +3 -3
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +3 -3
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +121 -116
  7. package/dist/locale/en.js +1 -1
  8. package/dist/locale/en.min.js +1 -1
  9. package/dist/locale/en.min.mjs +1 -1
  10. package/dist/locale/en.mjs +1 -1
  11. package/dist/locale/zh-cn.js +1 -1
  12. package/dist/locale/zh-cn.min.js +1 -1
  13. package/dist/locale/zh-cn.min.mjs +1 -1
  14. package/dist/locale/zh-cn.mjs +1 -1
  15. package/es/components/affix/index.mjs +2 -2
  16. package/es/components/affix/src/affix.mjs +19 -82
  17. package/es/components/affix/src/affix.mjs.map +1 -1
  18. package/es/components/affix/src/affix2.mjs +82 -19
  19. package/es/components/affix/src/affix2.mjs.map +1 -1
  20. package/es/components/autocomplete/index.d.ts +5 -5
  21. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  22. package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  23. package/es/components/avatar/index.mjs +2 -2
  24. package/es/components/avatar/src/avatar.mjs +29 -61
  25. package/es/components/avatar/src/avatar.mjs.map +1 -1
  26. package/es/components/avatar/src/avatar2.mjs +61 -29
  27. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  28. package/es/components/breadcrumb/index.mjs +4 -4
  29. package/es/components/breadcrumb/src/breadcrumb-item.mjs +46 -11
  30. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  31. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -46
  32. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  33. package/es/components/breadcrumb/src/breadcrumb.mjs +37 -12
  34. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  35. package/es/components/breadcrumb/src/breadcrumb2.mjs +12 -37
  36. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  37. package/es/components/button/index.mjs +3 -3
  38. package/es/components/button/src/button-group.mjs +30 -5
  39. package/es/components/button/src/button-group.mjs.map +1 -1
  40. package/es/components/button/src/button-group2.mjs +5 -30
  41. package/es/components/button/src/button-group2.mjs.map +1 -1
  42. package/es/components/button/src/button.mjs +96 -48
  43. package/es/components/button/src/button.mjs.map +1 -1
  44. package/es/components/button/src/button2.mjs +48 -96
  45. package/es/components/button/src/button2.mjs.map +1 -1
  46. package/es/components/carousel/index.mjs +2 -2
  47. package/es/components/carousel/src/carousel.mjs +201 -43
  48. package/es/components/carousel/src/carousel.mjs.map +1 -1
  49. package/es/components/carousel/src/carousel2.mjs +43 -201
  50. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  51. package/es/components/cascader/src/index.mjs +2 -2
  52. package/es/components/collapse/index.mjs +2 -2
  53. package/es/components/collapse/src/collapse-item.mjs +12 -91
  54. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  55. package/es/components/collapse/src/collapse-item2.mjs +91 -12
  56. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  57. package/es/components/collection/index.mjs +1 -1
  58. package/es/components/collection/src/collection.mjs +30 -10
  59. package/es/components/collection/src/collection.mjs.map +1 -1
  60. package/es/components/collection/src/collection2.mjs +10 -30
  61. package/es/components/collection/src/collection2.mjs.map +1 -1
  62. package/es/components/dropdown/index.d.ts +3 -3
  63. package/es/components/dropdown/index.mjs +2 -2
  64. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  65. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  66. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  67. package/es/components/dropdown/src/dropdown.d.ts +1 -1
  68. package/es/components/dropdown/src/dropdown.mjs +109 -100
  69. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  70. package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
  71. package/es/components/dropdown/src/dropdown2.mjs +100 -109
  72. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  73. package/es/components/form/index.mjs +4 -4
  74. package/es/components/form/src/form-item.mjs +177 -46
  75. package/es/components/form/src/form-item.mjs.map +1 -1
  76. package/es/components/form/src/form-item2.mjs +46 -177
  77. package/es/components/form/src/form-item2.mjs.map +1 -1
  78. package/es/components/form/src/form.mjs +45 -40
  79. package/es/components/form/src/form.mjs.map +1 -1
  80. package/es/components/form/src/form2.mjs +40 -45
  81. package/es/components/form/src/form2.mjs.map +1 -1
  82. package/es/components/image/index.d.ts +4 -0
  83. package/es/components/image/src/image.d.ts +1 -0
  84. package/es/components/image/src/image.mjs +3 -0
  85. package/es/components/image/src/image.mjs.map +1 -1
  86. package/es/components/image/src/image.vue.d.ts +4 -0
  87. package/es/components/image/src/image2.mjs +8 -6
  88. package/es/components/image/src/image2.mjs.map +1 -1
  89. package/es/components/image-viewer/index.mjs +2 -2
  90. package/es/components/image-viewer/src/image-viewer.mjs +210 -31
  91. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  92. package/es/components/image-viewer/src/image-viewer2.mjs +31 -210
  93. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  94. package/es/components/index.mjs +27 -27
  95. package/es/components/input/index.mjs +2 -2
  96. package/es/components/input/src/input.mjs +85 -296
  97. package/es/components/input/src/input.mjs.map +1 -1
  98. package/es/components/input/src/input2.mjs +296 -85
  99. package/es/components/input/src/input2.mjs.map +1 -1
  100. package/es/components/link/index.mjs +2 -2
  101. package/es/components/link/src/link.mjs +43 -19
  102. package/es/components/link/src/link.mjs.map +1 -1
  103. package/es/components/link/src/link2.mjs +19 -43
  104. package/es/components/link/src/link2.mjs.map +1 -1
  105. package/es/components/menu/index.d.ts +3 -3
  106. package/es/components/menu/src/menu.d.ts +4 -4
  107. package/es/components/page-header/index.mjs +2 -2
  108. package/es/components/page-header/src/page-header.mjs +55 -14
  109. package/es/components/page-header/src/page-header.mjs.map +1 -1
  110. package/es/components/page-header/src/page-header2.mjs +14 -55
  111. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  112. package/es/components/popconfirm/index.mjs +2 -2
  113. package/es/components/popconfirm/src/popconfirm.mjs +53 -20
  114. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  115. package/es/components/popconfirm/src/popconfirm2.mjs +20 -53
  116. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  117. package/es/components/popover/index.d.ts +6 -6
  118. package/es/components/popover/src/index.vue.d.ts +3 -3
  119. package/es/components/popover/src/popover.d.ts +1 -1
  120. package/es/components/popover/src/popover.mjs +2 -2
  121. package/es/components/popper/index.mjs +2 -2
  122. package/es/components/popper/src/content.mjs +52 -64
  123. package/es/components/popper/src/content.mjs.map +1 -1
  124. package/es/components/popper/src/content2.mjs +64 -52
  125. package/es/components/popper/src/content2.mjs.map +1 -1
  126. package/es/components/radio/index.mjs +4 -4
  127. package/es/components/radio/src/radio-button.mjs +80 -9
  128. package/es/components/radio/src/radio-button.mjs.map +1 -1
  129. package/es/components/radio/src/radio-button2.mjs +9 -80
  130. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  131. package/es/components/radio/src/radio-group.mjs +37 -18
  132. package/es/components/radio/src/radio-group.mjs.map +1 -1
  133. package/es/components/radio/src/radio-group2.mjs +18 -37
  134. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  135. package/es/components/result/index.mjs +2 -2
  136. package/es/components/result/src/result.mjs +73 -28
  137. package/es/components/result/src/result.mjs.map +1 -1
  138. package/es/components/result/src/result2.mjs +28 -73
  139. package/es/components/result/src/result2.mjs.map +1 -1
  140. package/es/components/roving-focus-group/index.mjs +3 -3
  141. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  142. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  143. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  144. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  145. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  146. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  147. package/es/components/scrollbar/index.mjs +3 -3
  148. package/es/components/scrollbar/src/bar2.mjs +1 -1
  149. package/es/components/scrollbar/src/scrollbar.mjs +42 -112
  150. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  151. package/es/components/scrollbar/src/scrollbar2.mjs +112 -42
  152. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  153. package/es/components/scrollbar/src/thumb.mjs +11 -59
  154. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  155. package/es/components/scrollbar/src/thumb2.mjs +59 -11
  156. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  157. package/es/components/select/index.d.ts +5 -5
  158. package/es/components/select/src/select.mjs +2 -2
  159. package/es/components/select/src/select.vue.d.ts +5 -5
  160. package/es/components/select/src/useSelect.d.ts +5 -5
  161. package/es/components/select-v2/index.d.ts +10 -10
  162. package/es/components/select-v2/src/defaults.mjs +1 -1
  163. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  164. package/es/components/select-v2/src/select.vue.d.ts +5 -5
  165. package/es/components/select-v2/src/useSelect.d.ts +5 -5
  166. package/es/components/switch/index.mjs +2 -2
  167. package/es/components/switch/src/switch.mjs +176 -81
  168. package/es/components/switch/src/switch.mjs.map +1 -1
  169. package/es/components/switch/src/switch2.mjs +81 -176
  170. package/es/components/switch/src/switch2.mjs.map +1 -1
  171. package/es/components/table/index.d.ts +1 -1
  172. package/es/components/table/src/filter-panel.vue.d.ts +5 -5
  173. package/es/components/table/src/table.vue.d.ts +1 -1
  174. package/es/components/tabs/index.mjs +2 -2
  175. package/es/components/tabs/src/tab-pane.mjs +14 -60
  176. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  177. package/es/components/tabs/src/tab-pane2.mjs +60 -14
  178. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  179. package/es/components/tag/index.mjs +2 -2
  180. package/es/components/tag/src/tag.mjs +81 -33
  181. package/es/components/tag/src/tag.mjs.map +1 -1
  182. package/es/components/tag/src/tag2.mjs +33 -81
  183. package/es/components/tag/src/tag2.mjs.map +1 -1
  184. package/es/components/time-picker/src/common/picker.vue.d.ts +5 -5
  185. package/es/components/tooltip/index.d.ts +3 -3
  186. package/es/components/tooltip/index.mjs +2 -2
  187. package/es/components/tooltip/src/tooltip.d.ts +1 -1
  188. package/es/components/tooltip/src/tooltip.mjs +51 -64
  189. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  190. package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
  191. package/es/components/tooltip/src/tooltip2.mjs +64 -51
  192. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  193. package/es/components/tooltip/src/trigger.mjs +1 -1
  194. package/es/components/tooltip/src/trigger.vue.d.ts +3 -3
  195. package/es/components/tooltip-v2/index.mjs +4 -4
  196. package/es/components/tooltip-v2/src/arrow.mjs +38 -22
  197. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  198. package/es/components/tooltip-v2/src/arrow2.mjs +22 -38
  199. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  200. package/es/components/tooltip-v2/src/root.mjs +17 -81
  201. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  202. package/es/components/tooltip-v2/src/root2.mjs +81 -17
  203. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  204. package/es/components/tooltip-v2/src/tooltip.mjs +21 -74
  205. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  206. package/es/components/tooltip-v2/src/tooltip2.mjs +74 -21
  207. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  208. package/es/components/upload/index.mjs +1 -1
  209. package/es/components/upload/src/upload-content.mjs +15 -46
  210. package/es/components/upload/src/upload-content.mjs.map +1 -1
  211. package/es/components/upload/src/upload-content2.mjs +46 -15
  212. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  213. package/es/components/upload/src/upload2.mjs +1 -1
  214. package/es/index.mjs +27 -27
  215. package/es/version.d.ts +1 -1
  216. package/es/version.mjs +1 -1
  217. package/es/version.mjs.map +1 -1
  218. package/lib/components/affix/index.js +2 -2
  219. package/lib/components/affix/src/affix.js +19 -82
  220. package/lib/components/affix/src/affix.js.map +1 -1
  221. package/lib/components/affix/src/affix2.js +82 -19
  222. package/lib/components/affix/src/affix2.js.map +1 -1
  223. package/lib/components/autocomplete/index.d.ts +5 -5
  224. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  225. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  226. package/lib/components/avatar/index.js +2 -2
  227. package/lib/components/avatar/src/avatar.js +29 -61
  228. package/lib/components/avatar/src/avatar.js.map +1 -1
  229. package/lib/components/avatar/src/avatar2.js +61 -29
  230. package/lib/components/avatar/src/avatar2.js.map +1 -1
  231. package/lib/components/breadcrumb/index.js +4 -4
  232. package/lib/components/breadcrumb/src/breadcrumb-item.js +46 -11
  233. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  234. package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -46
  235. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  236. package/lib/components/breadcrumb/src/breadcrumb.js +37 -12
  237. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  238. package/lib/components/breadcrumb/src/breadcrumb2.js +12 -37
  239. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  240. package/lib/components/button/index.js +3 -3
  241. package/lib/components/button/src/button-group.js +30 -5
  242. package/lib/components/button/src/button-group.js.map +1 -1
  243. package/lib/components/button/src/button-group2.js +5 -30
  244. package/lib/components/button/src/button-group2.js.map +1 -1
  245. package/lib/components/button/src/button.js +96 -50
  246. package/lib/components/button/src/button.js.map +1 -1
  247. package/lib/components/button/src/button2.js +50 -96
  248. package/lib/components/button/src/button2.js.map +1 -1
  249. package/lib/components/carousel/index.js +2 -2
  250. package/lib/components/carousel/src/carousel.js +201 -43
  251. package/lib/components/carousel/src/carousel.js.map +1 -1
  252. package/lib/components/carousel/src/carousel2.js +43 -201
  253. package/lib/components/carousel/src/carousel2.js.map +1 -1
  254. package/lib/components/cascader/src/index.js +2 -2
  255. package/lib/components/collapse/index.js +2 -2
  256. package/lib/components/collapse/src/collapse-item.js +12 -91
  257. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  258. package/lib/components/collapse/src/collapse-item2.js +91 -12
  259. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  260. package/lib/components/collection/index.js +1 -1
  261. package/lib/components/collection/src/collection.js +30 -9
  262. package/lib/components/collection/src/collection.js.map +1 -1
  263. package/lib/components/collection/src/collection2.js +9 -30
  264. package/lib/components/collection/src/collection2.js.map +1 -1
  265. package/lib/components/dropdown/index.d.ts +3 -3
  266. package/lib/components/dropdown/index.js +2 -2
  267. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  268. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  269. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  270. package/lib/components/dropdown/src/dropdown.d.ts +1 -1
  271. package/lib/components/dropdown/src/dropdown.js +109 -109
  272. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  273. package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
  274. package/lib/components/dropdown/src/dropdown2.js +109 -109
  275. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  276. package/lib/components/form/index.js +4 -4
  277. package/lib/components/form/src/form-item.js +177 -47
  278. package/lib/components/form/src/form-item.js.map +1 -1
  279. package/lib/components/form/src/form-item2.js +47 -177
  280. package/lib/components/form/src/form-item2.js.map +1 -1
  281. package/lib/components/form/src/form.js +45 -40
  282. package/lib/components/form/src/form.js.map +1 -1
  283. package/lib/components/form/src/form2.js +40 -45
  284. package/lib/components/form/src/form2.js.map +1 -1
  285. package/lib/components/image/index.d.ts +4 -0
  286. package/lib/components/image/src/image.d.ts +1 -0
  287. package/lib/components/image/src/image.js +3 -0
  288. package/lib/components/image/src/image.js.map +1 -1
  289. package/lib/components/image/src/image.vue.d.ts +4 -0
  290. package/lib/components/image/src/image2.js +8 -6
  291. package/lib/components/image/src/image2.js.map +1 -1
  292. package/lib/components/image-viewer/index.js +2 -2
  293. package/lib/components/image-viewer/src/image-viewer.js +210 -31
  294. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  295. package/lib/components/image-viewer/src/image-viewer2.js +31 -210
  296. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  297. package/lib/components/index.js +27 -27
  298. package/lib/components/input/index.js +2 -2
  299. package/lib/components/input/src/input.js +84 -295
  300. package/lib/components/input/src/input.js.map +1 -1
  301. package/lib/components/input/src/input2.js +295 -84
  302. package/lib/components/input/src/input2.js.map +1 -1
  303. package/lib/components/link/index.js +2 -2
  304. package/lib/components/link/src/link.js +43 -19
  305. package/lib/components/link/src/link.js.map +1 -1
  306. package/lib/components/link/src/link2.js +19 -43
  307. package/lib/components/link/src/link2.js.map +1 -1
  308. package/lib/components/menu/index.d.ts +3 -3
  309. package/lib/components/menu/src/menu.d.ts +4 -4
  310. package/lib/components/page-header/index.js +2 -2
  311. package/lib/components/page-header/src/page-header.js +55 -14
  312. package/lib/components/page-header/src/page-header.js.map +1 -1
  313. package/lib/components/page-header/src/page-header2.js +14 -55
  314. package/lib/components/page-header/src/page-header2.js.map +1 -1
  315. package/lib/components/popconfirm/index.js +2 -2
  316. package/lib/components/popconfirm/src/popconfirm.js +53 -20
  317. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  318. package/lib/components/popconfirm/src/popconfirm2.js +20 -53
  319. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  320. package/lib/components/popover/index.d.ts +6 -6
  321. package/lib/components/popover/src/index.vue.d.ts +3 -3
  322. package/lib/components/popover/src/popover.d.ts +1 -1
  323. package/lib/components/popover/src/popover.js +2 -2
  324. package/lib/components/popper/index.js +2 -2
  325. package/lib/components/popper/src/content.js +52 -65
  326. package/lib/components/popper/src/content.js.map +1 -1
  327. package/lib/components/popper/src/content2.js +65 -52
  328. package/lib/components/popper/src/content2.js.map +1 -1
  329. package/lib/components/radio/index.js +4 -4
  330. package/lib/components/radio/src/radio-button.js +79 -8
  331. package/lib/components/radio/src/radio-button.js.map +1 -1
  332. package/lib/components/radio/src/radio-button2.js +8 -79
  333. package/lib/components/radio/src/radio-button2.js.map +1 -1
  334. package/lib/components/radio/src/radio-group.js +37 -18
  335. package/lib/components/radio/src/radio-group.js.map +1 -1
  336. package/lib/components/radio/src/radio-group2.js +18 -37
  337. package/lib/components/radio/src/radio-group2.js.map +1 -1
  338. package/lib/components/result/index.js +2 -2
  339. package/lib/components/result/src/result.js +73 -30
  340. package/lib/components/result/src/result.js.map +1 -1
  341. package/lib/components/result/src/result2.js +30 -73
  342. package/lib/components/result/src/result2.js.map +1 -1
  343. package/lib/components/roving-focus-group/index.js +2 -2
  344. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  345. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  346. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  347. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  348. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  349. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  350. package/lib/components/scrollbar/index.js +3 -3
  351. package/lib/components/scrollbar/src/bar2.js +1 -1
  352. package/lib/components/scrollbar/src/scrollbar.js +42 -112
  353. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  354. package/lib/components/scrollbar/src/scrollbar2.js +112 -42
  355. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  356. package/lib/components/scrollbar/src/thumb.js +11 -59
  357. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  358. package/lib/components/scrollbar/src/thumb2.js +59 -11
  359. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  360. package/lib/components/select/index.d.ts +5 -5
  361. package/lib/components/select/src/select.js +2 -2
  362. package/lib/components/select/src/select.vue.d.ts +5 -5
  363. package/lib/components/select/src/useSelect.d.ts +5 -5
  364. package/lib/components/select-v2/index.d.ts +10 -10
  365. package/lib/components/select-v2/src/defaults.js +1 -1
  366. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  367. package/lib/components/select-v2/src/select.vue.d.ts +5 -5
  368. package/lib/components/select-v2/src/useSelect.d.ts +5 -5
  369. package/lib/components/switch/index.js +2 -2
  370. package/lib/components/switch/src/switch.js +176 -81
  371. package/lib/components/switch/src/switch.js.map +1 -1
  372. package/lib/components/switch/src/switch2.js +81 -176
  373. package/lib/components/switch/src/switch2.js.map +1 -1
  374. package/lib/components/table/index.d.ts +1 -1
  375. package/lib/components/table/src/filter-panel.vue.d.ts +5 -5
  376. package/lib/components/table/src/table.vue.d.ts +1 -1
  377. package/lib/components/tabs/index.js +2 -2
  378. package/lib/components/tabs/src/tab-pane.js +14 -60
  379. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  380. package/lib/components/tabs/src/tab-pane2.js +60 -14
  381. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  382. package/lib/components/tag/index.js +2 -2
  383. package/lib/components/tag/src/tag.js +81 -34
  384. package/lib/components/tag/src/tag.js.map +1 -1
  385. package/lib/components/tag/src/tag2.js +34 -81
  386. package/lib/components/tag/src/tag2.js.map +1 -1
  387. package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -5
  388. package/lib/components/tooltip/index.d.ts +3 -3
  389. package/lib/components/tooltip/index.js +2 -2
  390. package/lib/components/tooltip/src/tooltip.d.ts +1 -1
  391. package/lib/components/tooltip/src/tooltip.js +50 -65
  392. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  393. package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
  394. package/lib/components/tooltip/src/tooltip2.js +65 -50
  395. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  396. package/lib/components/tooltip/src/trigger.js +1 -1
  397. package/lib/components/tooltip/src/trigger.vue.d.ts +3 -3
  398. package/lib/components/tooltip-v2/index.js +4 -4
  399. package/lib/components/tooltip-v2/src/arrow.js +38 -23
  400. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  401. package/lib/components/tooltip-v2/src/arrow2.js +23 -38
  402. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  403. package/lib/components/tooltip-v2/src/root.js +17 -81
  404. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  405. package/lib/components/tooltip-v2/src/root2.js +81 -17
  406. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  407. package/lib/components/tooltip-v2/src/tooltip.js +21 -74
  408. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  409. package/lib/components/tooltip-v2/src/tooltip2.js +74 -21
  410. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  411. package/lib/components/upload/index.js +1 -1
  412. package/lib/components/upload/src/upload-content.js +15 -46
  413. package/lib/components/upload/src/upload-content.js.map +1 -1
  414. package/lib/components/upload/src/upload-content2.js +46 -15
  415. package/lib/components/upload/src/upload-content2.js.map +1 -1
  416. package/lib/components/upload/src/upload2.js +1 -1
  417. package/lib/index.js +27 -27
  418. package/lib/version.d.ts +1 -1
  419. package/lib/version.js +1 -1
  420. package/lib/version.js.map +1 -1
  421. package/package.json +1 -1
  422. package/web-types.json +1 -1
@@ -2,95 +2,306 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var vue = require('vue');
6
+ var core = require('@vueuse/core');
7
+ var lodashUnified = require('lodash-unified');
8
+ var iconsVue = require('@element-plus/icons-vue');
5
9
  require('../../../utils/index.js');
6
10
  require('../../../hooks/index.js');
7
- var props = require('../../../utils/vue/props.js');
8
- var index = require('../../../hooks/use-common-props/index.js');
11
+ var utils = require('./utils.js');
12
+ var input = require('./input.js');
13
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
14
+ var index = require('../../../hooks/use-attrs/index.js');
15
+ var index$1 = require('../../../hooks/use-form-item/index.js');
16
+ var index$2 = require('../../../hooks/use-common-props/index.js');
17
+ var index$3 = require('../../../hooks/use-namespace/index.js');
9
18
  var icon = require('../../../utils/vue/icon.js');
10
- var typescript = require('../../../utils/typescript.js');
19
+ var shared = require('@vue/shared');
20
+ var error = require('../../../utils/error.js');
11
21
 
12
- const inputProps = props.buildProps({
13
- size: index.useSizeProp,
14
- disabled: Boolean,
15
- modelValue: {
16
- type: props.definePropType([
17
- String,
18
- Number,
19
- Object
20
- ]),
21
- default: ""
22
- },
23
- type: {
24
- type: String,
25
- default: "text"
26
- },
27
- resize: {
28
- type: String,
29
- values: ["none", "both", "horizontal", "vertical"]
30
- },
31
- autosize: {
32
- type: props.definePropType([Boolean, Object]),
33
- default: false
34
- },
35
- autocomplete: {
36
- type: String,
37
- default: "off"
38
- },
39
- formatter: {
40
- type: Function
41
- },
42
- parser: {
43
- type: Function
44
- },
45
- placeholder: {
46
- type: String
47
- },
48
- form: {
49
- type: String,
50
- default: ""
51
- },
52
- readonly: {
53
- type: Boolean,
54
- default: false
55
- },
56
- clearable: {
57
- type: Boolean,
58
- default: false
59
- },
60
- showPassword: {
61
- type: Boolean,
62
- default: false
63
- },
64
- showWordLimit: {
65
- type: Boolean,
66
- default: false
67
- },
68
- suffixIcon: {
69
- type: icon.iconPropType,
70
- default: ""
71
- },
72
- prefixIcon: {
73
- type: icon.iconPropType,
74
- default: ""
75
- },
76
- label: {
77
- type: String
78
- },
79
- tabindex: {
80
- type: [Number, String]
81
- },
82
- validateEvent: {
83
- type: Boolean,
84
- default: true
85
- },
86
- inputStyle: {
87
- type: props.definePropType([Object, Array, String]),
88
- default: () => typescript.mutable({})
89
- },
90
- widget: {
91
- type: String
22
+ const _hoisted_1 = ["widget"];
23
+ const _hoisted_2 = ["type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder"];
24
+ const _hoisted_3 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
25
+ const __default__ = {
26
+ name: "PsInput",
27
+ inheritAttrs: false
28
+ };
29
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
30
+ ...__default__,
31
+ props: input.inputProps,
32
+ setup(__props, { expose }) {
33
+ const props = __props;
34
+ const PENDANT_MAP = {
35
+ suffix: "append",
36
+ prefix: "prepend"
37
+ };
38
+ const instance = vue.getCurrentInstance();
39
+ const rawAttrs = vue.useAttrs();
40
+ const slots = vue.useSlots();
41
+ const attrs = index.useAttrs();
42
+ const { form, formItem } = index$1.useFormItem();
43
+ const inputSize = index$2.useSize();
44
+ const inputDisabled = index$2.useDisabled();
45
+ const nsInput = index$3.useNamespace("input");
46
+ const nsTextarea = index$3.useNamespace("textarea");
47
+ const input = vue.shallowRef();
48
+ const textarea = vue.shallowRef();
49
+ const focused = vue.ref(false);
50
+ const hovering = vue.ref(false);
51
+ const isComposing = vue.ref(false);
52
+ const passwordVisible = vue.ref(false);
53
+ const textareaCalcStyle = vue.shallowRef(props.inputStyle);
54
+ const _ref = vue.computed(() => input.value || textarea.value);
55
+ const needStatusIcon = vue.computed(() => {
56
+ var _a;
57
+ return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false;
58
+ });
59
+ const validateState = vue.computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
60
+ const validateIcon = vue.computed(() => icon.ValidateComponentsMap[validateState.value]);
61
+ const passwordIcon = vue.computed(() => passwordVisible.value ? iconsVue.View : iconsVue.Hide);
62
+ const containerStyle = vue.computed(() => [
63
+ rawAttrs.style,
64
+ props.inputStyle
65
+ ]);
66
+ const textareaStyle = vue.computed(() => [
67
+ props.inputStyle,
68
+ textareaCalcStyle.value,
69
+ { resize: props.resize }
70
+ ]);
71
+ const nativeInputValue = vue.computed(() => lodashUnified.isNil(props.modelValue) ? "" : String(props.modelValue));
72
+ const showClear = vue.computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
73
+ const showPwdVisible = vue.computed(() => props.showPassword && !inputDisabled.value && !props.readonly && (!!nativeInputValue.value || focused.value));
74
+ const isWordLimitVisible = vue.computed(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
75
+ const textLength = vue.computed(() => Array.from(nativeInputValue.value).length);
76
+ const inputExceed = vue.computed(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
77
+ const suffixVisible = vue.computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
78
+ const resizeTextarea = () => {
79
+ const { type, autosize } = props;
80
+ if (!core.isClient || type !== "textarea")
81
+ return;
82
+ if (autosize) {
83
+ const minRows = shared.isObject(autosize) ? autosize.minRows : void 0;
84
+ const maxRows = shared.isObject(autosize) ? autosize.maxRows : void 0;
85
+ textareaCalcStyle.value = {
86
+ ...utils.calcTextareaHeight(textarea.value, minRows, maxRows)
87
+ };
88
+ } else {
89
+ textareaCalcStyle.value = {
90
+ minHeight: utils.calcTextareaHeight(textarea.value).minHeight
91
+ };
92
+ }
93
+ };
94
+ const setNativeInputValue = () => {
95
+ const input2 = _ref.value;
96
+ if (!input2 || input2.value === nativeInputValue.value)
97
+ return;
98
+ input2.value = nativeInputValue.value;
99
+ };
100
+ const calcIconOffset = (place) => {
101
+ const { el } = instance.vnode;
102
+ if (!el)
103
+ return;
104
+ const elList = Array.from(el.querySelectorAll(`.${nsInput.e(place)}`));
105
+ const target = elList.find((item) => item.parentNode === el);
106
+ if (!target)
107
+ return;
108
+ const pendant = PENDANT_MAP[place];
109
+ if (slots[pendant]) {
110
+ target.style.transform = `translateX(${place === "suffix" ? "-" : ""}${el.querySelector(`.${nsInput.be("group", pendant)}`).offsetWidth}px)`;
111
+ } else {
112
+ target.removeAttribute("style");
113
+ }
114
+ };
115
+ const updateIconOffset = () => {
116
+ calcIconOffset("prefix");
117
+ calcIconOffset("suffix");
118
+ };
119
+ vue.onMounted(async () => {
120
+ if (!props.formatter && props.parser) {
121
+ error.debugWarn("PsInput", "If you set the parser, you also need to set the formatter.");
122
+ }
123
+ setNativeInputValue();
124
+ updateIconOffset();
125
+ await vue.nextTick();
126
+ resizeTextarea();
127
+ });
128
+ vue.onUpdated(async () => {
129
+ await vue.nextTick();
130
+ updateIconOffset();
131
+ });
132
+ expose({
133
+ input,
134
+ textarea,
135
+ ref: _ref,
136
+ textareaStyle,
137
+ autosize: vue.toRef(props, "autosize")
138
+ });
139
+ return (_ctx, _cache) => {
140
+ const _component_ps_icon = vue.resolveComponent("ps-icon");
141
+ const _component_circle_close = vue.resolveComponent("circle-close");
142
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
143
+ class: vue.normalizeClass([
144
+ _ctx.type === "textarea" ? vue.unref(nsTextarea).b() : vue.unref(nsInput).b(),
145
+ vue.unref(nsInput).m(vue.unref(inputSize)),
146
+ vue.unref(nsInput).is("disabled", vue.unref(inputDisabled)),
147
+ vue.unref(nsInput).is("exceed", vue.unref(inputExceed)),
148
+ {
149
+ [vue.unref(nsInput).b("group")]: _ctx.$slots.prepend || _ctx.$slots.append,
150
+ [vue.unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
151
+ [vue.unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend,
152
+ [vue.unref(nsInput).m("prefix")]: _ctx.$slots.prefix || _ctx.prefixIcon,
153
+ [vue.unref(nsInput).m("suffix")]: _ctx.$slots.suffix || _ctx.suffixIcon || _ctx.clearable || _ctx.showPassword,
154
+ [vue.unref(nsInput).bm("suffix", "password-clear")]: vue.unref(showClear) && vue.unref(showPwdVisible)
155
+ },
156
+ _ctx.$attrs.class
157
+ ]),
158
+ style: vue.normalizeStyle(vue.unref(containerStyle)),
159
+ widget: _ctx.widget
160
+ }, [
161
+ vue.createCommentVNode(" input "),
162
+ _ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
163
+ vue.createCommentVNode(" prepend slot "),
164
+ _ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", {
165
+ key: 0,
166
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "prepend"))
167
+ }, [
168
+ vue.renderSlot(_ctx.$slots, "prepend")
169
+ ], 2)) : vue.createCommentVNode("v-if", true),
170
+ vue.createElementVNode("div", {
171
+ class: vue.normalizeClass([vue.unref(nsInput).e("wrapper"), vue.unref(nsInput).is("focus", focused.value)])
172
+ }, [
173
+ vue.createCommentVNode(" prefix slot "),
174
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", {
175
+ key: 0,
176
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix"))
177
+ }, [
178
+ vue.createElementVNode("span", {
179
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix-inner"))
180
+ }, [
181
+ vue.renderSlot(_ctx.$slots, "prefix"),
182
+ _ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
183
+ key: 0,
184
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
185
+ }, {
186
+ default: vue.withCtx(() => [
187
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
188
+ ]),
189
+ _: 1
190
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
191
+ ], 2)
192
+ ], 2)) : vue.createCommentVNode("v-if", true),
193
+ vue.createElementVNode("input", vue.mergeProps({
194
+ ref_key: "input",
195
+ ref: input,
196
+ class: vue.unref(nsInput).e("inner")
197
+ }, vue.unref(attrs), {
198
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
199
+ disabled: vue.unref(inputDisabled),
200
+ formatter: _ctx.formatter,
201
+ parser: _ctx.parser,
202
+ readonly: _ctx.readonly,
203
+ autocomplete: _ctx.autocomplete,
204
+ tabindex: _ctx.tabindex,
205
+ "aria-label": _ctx.label,
206
+ placeholder: _ctx.placeholder,
207
+ style: _ctx.inputStyle
208
+ }), null, 16, _hoisted_2),
209
+ vue.createCommentVNode(" suffix slot "),
210
+ vue.unref(suffixVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
211
+ key: 1,
212
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix"))
213
+ }, [
214
+ vue.createElementVNode("span", {
215
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix-inner"))
216
+ }, [
217
+ !vue.unref(showClear) || !vue.unref(showPwdVisible) || !vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
218
+ vue.renderSlot(_ctx.$slots, "suffix"),
219
+ _ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
220
+ key: 0,
221
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
222
+ }, {
223
+ default: vue.withCtx(() => [
224
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.suffixIcon)))
225
+ ]),
226
+ _: 1
227
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
228
+ ], 64)) : vue.createCommentVNode("v-if", true),
229
+ vue.unref(showClear) ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
230
+ key: 1,
231
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("clear")])
232
+ }, {
233
+ default: vue.withCtx(() => [
234
+ vue.createVNode(_component_circle_close)
235
+ ]),
236
+ _: 1
237
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
238
+ vue.unref(showPwdVisible) ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
239
+ key: 2,
240
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("password")])
241
+ }, {
242
+ default: vue.withCtx(() => [
243
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(passwordIcon))))
244
+ ]),
245
+ _: 1
246
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
247
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
248
+ key: 3,
249
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
250
+ }, [
251
+ vue.createElementVNode("span", {
252
+ class: vue.normalizeClass(vue.unref(nsInput).e("count-inner"))
253
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 3)
254
+ ], 2)) : vue.createCommentVNode("v-if", true),
255
+ vue.unref(validateState) && vue.unref(validateIcon) && vue.unref(needStatusIcon) ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
256
+ key: 4,
257
+ class: vue.normalizeClass([
258
+ vue.unref(nsInput).e("icon"),
259
+ vue.unref(nsInput).e("validateIcon"),
260
+ vue.unref(nsInput).is("loading", vue.unref(validateState) === "validating")
261
+ ])
262
+ }, {
263
+ default: vue.withCtx(() => [
264
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(validateIcon))))
265
+ ]),
266
+ _: 1
267
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
268
+ ], 2)
269
+ ], 2)) : vue.createCommentVNode("v-if", true)
270
+ ], 2),
271
+ vue.createCommentVNode(" append slot "),
272
+ _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
273
+ key: 1,
274
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "append"))
275
+ }, [
276
+ vue.renderSlot(_ctx.$slots, "append")
277
+ ], 2)) : vue.createCommentVNode("v-if", true)
278
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
279
+ vue.createCommentVNode(" textarea "),
280
+ vue.createElementVNode("textarea", vue.mergeProps({
281
+ ref_key: "textarea",
282
+ ref: textarea,
283
+ class: vue.unref(nsTextarea).e("inner")
284
+ }, vue.unref(attrs), {
285
+ tabindex: _ctx.tabindex,
286
+ disabled: vue.unref(inputDisabled),
287
+ readonly: _ctx.readonly,
288
+ autocomplete: _ctx.autocomplete,
289
+ style: vue.unref(textareaStyle),
290
+ "aria-label": _ctx.label,
291
+ placeholder: _ctx.placeholder
292
+ }), null, 16, _hoisted_3),
293
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
294
+ key: 0,
295
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
296
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 3)) : vue.createCommentVNode("v-if", true)
297
+ ], 64))
298
+ ], 14, _hoisted_1)), [
299
+ [vue.vShow, _ctx.type !== "hidden"]
300
+ ]);
301
+ };
92
302
  }
93
303
  });
304
+ var Input = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/input/src/input.vue"]]);
94
305
 
95
- exports.inputProps = inputProps;
306
+ exports["default"] = Input;
96
307
  //# sourceMappingURL=input2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input2.js","sources":["../../../../../../packages/components/input/src/input.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n mutable,\n} from '@element-ps/utils'\nimport { useSizeProp } from '@element-ps/hooks'\nimport type Input from './input.vue'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n\nexport const inputProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n Object,\n ]),\n default: '',\n },\n type: {\n type: String,\n default: 'text',\n },\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n autosize: {\n type: definePropType<InputAutoSize>([Boolean, Object]),\n default: false,\n },\n autocomplete: {\n type: String,\n default: 'off',\n },\n formatter: {\n type: Function,\n },\n parser: {\n type: Function,\n },\n placeholder: {\n type: String,\n },\n form: {\n type: String,\n default: '',\n },\n readonly: {\n type: Boolean,\n default: false,\n },\n clearable: {\n type: Boolean,\n default: false,\n },\n showPassword: {\n type: Boolean,\n default: false,\n },\n showWordLimit: {\n type: Boolean,\n default: false,\n },\n suffixIcon: {\n type: iconPropType,\n default: '',\n },\n prefixIcon: {\n type: iconPropType,\n default: '',\n },\n label: {\n type: String,\n },\n tabindex: {\n type: [Number, String],\n },\n validateEvent: {\n type: Boolean,\n default: true,\n },\n inputStyle: {\n type: definePropType<StyleValue>([Object, Array, String]),\n default: () => mutable({} as const),\n },\n widget: {\n type: String,\n },\n} as const)\nexport type InputProps = ExtractPropTypes<typeof inputProps>\n\nexport type InputInstance = InstanceType<typeof Input>\n"],"names":["buildProps","useSizeProp","definePropType","iconPropType","mutable"],"mappings":";;;;;;;;;;;AAOY,MAAC,UAAU,GAAGA,gBAAU,CAAC;AACrC,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEC,oBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC;AACtD,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAEA,oBAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EA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AC;AACjD,IAAI,OAAO,EAAE,MAAME,kBAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"input2.js","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div\n v-show=\"type !== 'hidden'\"\n :class=\"[\n type === 'textarea' ? nsTextarea.b() : nsInput.b(),\n nsInput.m(inputSize),\n nsInput.is('disabled', inputDisabled),\n nsInput.is('exceed', inputExceed),\n {\n [nsInput.b('group')]: $slots.prepend || $slots.append,\n [nsInput.bm('group', 'append')]: $slots.append,\n [nsInput.bm('group', 'prepend')]: $slots.prepend,\n [nsInput.m('prefix')]: $slots.prefix || prefixIcon,\n [nsInput.m('suffix')]:\n $slots.suffix || suffixIcon || clearable || showPassword,\n [nsInput.bm('suffix', 'password-clear')]: showClear && showPwdVisible,\n },\n $attrs.class,\n ]\"\n :style=\"containerStyle\"\n :widget=\"widget\"\n >\n <!-- input -->\n <template v-if=\"type !== 'textarea'\">\n <!-- prepend slot -->\n <div v-if=\"$slots.prepend\" :class=\"nsInput.be('group', 'prepend')\">\n <slot name=\"prepend\" />\n </div>\n\n <div :class=\"[nsInput.e('wrapper'), nsInput.is('focus', focused)]\">\n <!-- prefix slot -->\n <span v-if=\"$slots.prefix || prefixIcon\" :class=\"nsInput.e('prefix')\">\n <span :class=\"nsInput.e('prefix-inner')\">\n <slot name=\"prefix\" />\n <ps-icon v-if=\"prefixIcon\" :class=\"nsInput.e('icon')\">\n <component :is=\"prefixIcon\" />\n </ps-icon>\n </span>\n </span>\n\n <input\n ref=\"input\"\n :class=\"nsInput.e('inner')\"\n v-bind=\"attrs\"\n :type=\"showPassword ? (passwordVisible ? 'text' : 'password') : type\"\n :disabled=\"inputDisabled\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :tabindex=\"tabindex\"\n :aria-label=\"label\"\n :placeholder=\"placeholder\"\n :style=\"inputStyle\"\n />\n\n <!-- suffix slot -->\n <span v-if=\"suffixVisible\" :class=\"nsInput.e('suffix')\">\n <span :class=\"nsInput.e('suffix-inner')\">\n <template\n v-if=\"!showClear || !showPwdVisible || !isWordLimitVisible\"\n >\n <slot name=\"suffix\" />\n <ps-icon v-if=\"suffixIcon\" :class=\"nsInput.e('icon')\">\n <component :is=\"suffixIcon\" />\n </ps-icon>\n </template>\n <ps-icon\n v-if=\"showClear\"\n :class=\"[nsInput.e('icon'), nsInput.e('clear')]\"\n >\n <circle-close />\n </ps-icon>\n <ps-icon\n v-if=\"showPwdVisible\"\n :class=\"[nsInput.e('icon'), nsInput.e('password')]\"\n >\n <component :is=\"passwordIcon\" />\n </ps-icon>\n <span v-if=\"isWordLimitVisible\" :class=\"nsInput.e('count')\">\n <span :class=\"nsInput.e('count-inner')\">\n {{ textLength }} / {{ attrs.maxlength }}\n </span>\n </span>\n <ps-icon\n v-if=\"validateState && validateIcon && needStatusIcon\"\n :class=\"[\n nsInput.e('icon'),\n nsInput.e('validateIcon'),\n nsInput.is('loading', validateState === 'validating'),\n ]\"\n >\n <component :is=\"validateIcon\" />\n </ps-icon>\n </span>\n </span>\n </div>\n\n <!-- append slot -->\n <div v-if=\"$slots.append\" :class=\"nsInput.be('group', 'append')\">\n <slot name=\"append\" />\n </div>\n </template>\n\n <!-- textarea -->\n <template v-else>\n <textarea\n ref=\"textarea\"\n :class=\"nsTextarea.e('inner')\"\n v-bind=\"attrs\"\n :tabindex=\"tabindex\"\n :disabled=\"inputDisabled\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :style=\"textareaStyle\"\n :aria-label=\"label\"\n :placeholder=\"placeholder\"\n />\n <span v-if=\"isWordLimitVisible\" :class=\"nsInput.e('count')\">\n {{ textLength }} / {{ attrs.maxlength }}\n </span>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n onUpdated,\n ref,\n shallowRef,\n toRef,\n useAttrs as useRawAttrs,\n useSlots,\n} from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport {\n Hide as IconHide,\n View as IconView,\n} from '@element-plus/icons-vue'\nimport {\n ValidateComponentsMap,\n debugWarn,\n isObject,\n} from '@element-ps/utils'\nimport {\n useAttrs,\n useDisabled,\n useFormItem,\n useNamespace,\n useSize,\n} from '@element-ps/hooks'\nimport { calcTextareaHeight } from './utils'\nimport { inputProps } from './input'\nimport type { StyleValue } from 'vue'\n\ntype TargetElement = HTMLInputElement | HTMLTextAreaElement\nconst PENDANT_MAP = {\n suffix: 'append',\n prefix: 'prepend',\n} as const\n\ndefineOptions({\n name: 'PsInput',\n inheritAttrs: false,\n})\nconst props = defineProps(inputProps)\n\nconst instance = getCurrentInstance()!\nconst rawAttrs = useRawAttrs()\nconst slots = useSlots()\n\nconst attrs = useAttrs()\nconst { form, formItem } = useFormItem()\nconst inputSize = useSize()\nconst inputDisabled = useDisabled()\nconst nsInput = useNamespace('input')\nconst nsTextarea = useNamespace('textarea')\n\nconst input = shallowRef<HTMLInputElement>()\nconst textarea = shallowRef<HTMLTextAreaElement>()\n\nconst focused = ref(false)\nconst hovering = ref(false)\nconst isComposing = ref(false)\nconst passwordVisible = ref(false)\nconst textareaCalcStyle = shallowRef(props.inputStyle)\n\nconst _ref = computed(() => input.value || textarea.value)\n\nconst needStatusIcon = computed(() => form?.statusIcon ?? false)\nconst validateState = computed(() => formItem?.validateState || '')\nconst validateIcon = computed(() => ValidateComponentsMap[validateState.value])\nconst passwordIcon = computed(() =>\n passwordVisible.value ? IconView : IconHide\n)\nconst containerStyle = computed<StyleValue>(() => [\n rawAttrs.style as StyleValue,\n props.inputStyle,\n])\nconst textareaStyle = computed<StyleValue>(() => [\n props.inputStyle,\n textareaCalcStyle.value,\n { resize: props.resize },\n])\nconst nativeInputValue = computed(() =>\n isNil(props.modelValue) ? '' : String(props.modelValue)\n)\nconst showClear = computed(\n () =>\n props.clearable &&\n !inputDisabled.value &&\n !props.readonly &&\n !!nativeInputValue.value &&\n (focused.value || hovering.value)\n)\nconst showPwdVisible = computed(\n () =>\n props.showPassword &&\n !inputDisabled.value &&\n !props.readonly &&\n (!!nativeInputValue.value || focused.value)\n)\nconst isWordLimitVisible = computed(\n () =>\n props.showWordLimit &&\n !!attrs.value.maxlength &&\n (props.type === 'text' || props.type === 'textarea') &&\n !inputDisabled.value &&\n !props.readonly &&\n !props.showPassword\n)\nconst textLength = computed(() => Array.from(nativeInputValue.value).length)\nconst inputExceed = computed(\n () =>\n // show exceed style if length of initial value greater then maxlength\n !!isWordLimitVisible.value &&\n textLength.value > Number(attrs.value.maxlength)\n)\nconst suffixVisible = computed(\n () =>\n !!slots.suffix ||\n !!props.suffixIcon ||\n showClear.value ||\n props.showPassword ||\n isWordLimitVisible.value ||\n (!!validateState.value && needStatusIcon.value)\n)\n\nconst resizeTextarea = () => {\n const { type, autosize } = props\n\n if (!isClient || type !== 'textarea') return\n\n if (autosize) {\n const minRows = isObject(autosize) ? autosize.minRows : undefined\n const maxRows = isObject(autosize) ? autosize.maxRows : undefined\n textareaCalcStyle.value = {\n ...calcTextareaHeight(textarea.value!, minRows, maxRows),\n }\n } else {\n textareaCalcStyle.value = {\n minHeight: calcTextareaHeight(textarea.value!).minHeight,\n }\n }\n}\n\nconst setNativeInputValue = () => {\n const input = _ref.value\n if (!input || input.value === nativeInputValue.value) return\n input.value = nativeInputValue.value\n}\n\nconst calcIconOffset = (place: 'prefix' | 'suffix') => {\n const { el } = instance.vnode\n if (!el) return\n const elList = Array.from(\n (el as Element).querySelectorAll<HTMLSpanElement>(`.${nsInput.e(place)}`)\n )\n const target = elList.find((item) => item.parentNode === el)\n if (!target) return\n\n const pendant = PENDANT_MAP[place]\n\n if (slots[pendant]) {\n target.style.transform = `translateX(${place === 'suffix' ? '-' : ''}${\n el.querySelector(`.${nsInput.be('group', pendant)}`).offsetWidth\n }px)`\n } else {\n target.removeAttribute('style')\n }\n}\n\nconst updateIconOffset = () => {\n calcIconOffset('prefix')\n calcIconOffset('suffix')\n}\n\nonMounted(async () => {\n if (!props.formatter && props.parser) {\n debugWarn(\n 'PsInput',\n 'If you set the parser, you also need to set the formatter.'\n )\n }\n setNativeInputValue()\n updateIconOffset()\n await nextTick()\n resizeTextarea()\n})\n\nonUpdated(async () => {\n await nextTick()\n updateIconOffset()\n})\n\ndefineExpose({\n /** @description HTML input element */\n input,\n /** @description HTML textarea element */\n textarea,\n /** @description HTML element, input or textarea */\n ref: _ref,\n /** @description style of textarea. */\n textareaStyle,\n\n /** @description from props (used on unit test) */\n autosize: toRef(props, 'autosize'),\n})\n</script>\n"],"names":["getCurrentInstance","useRawAttrs","useSlots","useAttrs","useFormItem","useSize","useDisabled","useNamespace","shallowRef","ref","computed","ValidateComponentsMap","IconView","IconHide","isNil","isClient","isObject","calcTextareaHeight","onMounted","debugWarn","nextTick","onUpdated"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiKA,IAAA,MAAA,WAAA,GAAA;AAAA,MACA,MAAA,EAAA,QAAA;AAAA,MACA,MAAA,EAAA,SAAA;AAAA,KACA,CAAA;AAQA,IAAA,MAAA,WAAAA,sBAAA,EAAA,CAAA;AACA,IAAA,MAAA,WAAAC,YAAA,EAAA,CAAA;AACA,IAAA,MAAA,QAAAC,YAAA,EAAA,CAAA;AAEA,IAAA,MAAA,QAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,EAAA,IAAA,EAAA,QAAA,EAAA,GAAAC,mBAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAAC,eAAA,EAAA,CAAA;AACA,IAAA,MAAA,gBAAAC,mBAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAAC,qBAAA,OAAA,CAAA,CAAA;AACA,IAAA,MAAA,UAAA,GAAAA,qBAAA,UAAA,CAAA,CAAA;AAEA,IAAA,M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KAAA,CAAA,CAAA;AAAA,IACAC,aAAA,CAAA,YAAA;AAEA,MAAA,MAAAD,YAAA,EAAA,CAAA;AAAA,MAEA,gBAAA,EAAA,CAAA;AAAA,KAEA,CAAA,CAAA;AAAA,IAAA,MAEA,CAAA;AAAA,MAEA,KAAA;AAAA,MAGA,QAAA;AAAA,MACA,GAAA,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var link$1 = require('./src/link2.js');
7
- var link = require('./src/link.js');
6
+ var link$1 = require('./src/link.js');
7
+ var link = require('./src/link2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const PsLink = install.withInstall(link$1["default"]);
@@ -2,27 +2,51 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var props = require('../../../utils/vue/props.js');
7
- var icon = require('../../../utils/vue/icon.js');
5
+ var vue = require('vue');
6
+ var index$1 = require('../../icon/index.js');
7
+ require('../../../hooks/index.js');
8
+ var link = require('./link2.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
8
11
 
9
- const linkProps = props.buildProps({
10
- type: {
11
- type: String,
12
- values: ["primary", "success", "warning", "info", "danger", "default"],
13
- default: "default"
14
- },
15
- underline: {
16
- type: Boolean,
17
- default: true
18
- },
19
- disabled: { type: Boolean, default: false },
20
- href: { type: String, default: "" },
21
- icon: {
22
- type: icon.iconPropType,
23
- default: ""
12
+ const _hoisted_1 = ["href"];
13
+ const __default__ = {
14
+ name: "PsLink"
15
+ };
16
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
+ ...__default__,
18
+ props: link.linkProps,
19
+ setup(__props) {
20
+ const props = __props;
21
+ const ns = index.useNamespace("link");
22
+ return (_ctx, _cache) => {
23
+ return vue.openBlock(), vue.createElementBlock("a", {
24
+ class: vue.normalizeClass([
25
+ vue.unref(ns).b(),
26
+ vue.unref(ns).m(_ctx.type),
27
+ vue.unref(ns).is("disabled", _ctx.disabled),
28
+ vue.unref(ns).is("underline", _ctx.underline && !_ctx.disabled)
29
+ ]),
30
+ href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href
31
+ }, [
32
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), { key: 0 }, {
33
+ default: vue.withCtx(() => [
34
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
35
+ ]),
36
+ _: 1
37
+ })) : vue.createCommentVNode("v-if", true),
38
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
39
+ key: 1,
40
+ class: vue.normalizeClass(vue.unref(ns).e("inner"))
41
+ }, [
42
+ vue.renderSlot(_ctx.$slots, "default")
43
+ ], 2)) : vue.createCommentVNode("v-if", true),
44
+ _ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 2 }) : vue.createCommentVNode("v-if", true)
45
+ ], 10, _hoisted_1);
46
+ };
24
47
  }
25
48
  });
49
+ var Link = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/link/src/link.vue"]]);
26
50
 
27
- exports.linkProps = linkProps;
51
+ exports["default"] = Link;
28
52
  //# sourceMappingURL=link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sources":["../../../../../../packages/components/link/src/link.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: 'default',\n },\n underline: {\n type: Boolean,\n default: true,\n },\n disabled: { type: Boolean, default: false },\n href: { type: String, default: '' },\n icon: {\n type: iconPropType,\n default: '',\n },\n} as const)\nexport type LinkProps = ExtractPropTypes<typeof linkProps>\n\nexport type LinkInstance = InstanceType<typeof Link>\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,SAAS,GAAGA,gBAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;AAC1E,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AAC7C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"link.js","sources":["../../../../../../packages/components/link/src/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"[\n ns.b(),\n ns.m(type),\n ns.is('disabled', disabled),\n ns.is('underline', underline && !disabled),\n ]\"\n :href=\"disabled || !href ? undefined : href\"\n >\n <ps-icon v-if=\"icon\"><component :is=\"icon\" /></ps-icon>\n <span v-if=\"$slots.default\" :class=\"ns.e('inner')\">\n <slot />\n </span>\n\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n </a>\n</template>\n\n<script lang=\"ts\" setup>\nimport { PsIcon } from '@element-ps/components/icon'\nimport { useNamespace } from '@element-ps/hooks'\nimport { linkProps } from './link'\n\ndefineOptions({\n name: 'PsLink',\n})\n\nconst props = defineProps(linkProps)\n\nconst ns = useNamespace('link')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8BA,IAAA,MAAA,EAAA,GAAAA,mBAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,51 +2,27 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index$1 = require('../../icon/index.js');
7
- require('../../../hooks/index.js');
8
- var link = require('./link.js');
9
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var props = require('../../../utils/vue/props.js');
7
+ var icon = require('../../../utils/vue/icon.js');
11
8
 
12
- const _hoisted_1 = ["href"];
13
- const __default__ = {
14
- name: "PsLink"
15
- };
16
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
- ...__default__,
18
- props: link.linkProps,
19
- setup(__props) {
20
- const props = __props;
21
- const ns = index.useNamespace("link");
22
- return (_ctx, _cache) => {
23
- return vue.openBlock(), vue.createElementBlock("a", {
24
- class: vue.normalizeClass([
25
- vue.unref(ns).b(),
26
- vue.unref(ns).m(_ctx.type),
27
- vue.unref(ns).is("disabled", _ctx.disabled),
28
- vue.unref(ns).is("underline", _ctx.underline && !_ctx.disabled)
29
- ]),
30
- href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href
31
- }, [
32
- _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), { key: 0 }, {
33
- default: vue.withCtx(() => [
34
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
35
- ]),
36
- _: 1
37
- })) : vue.createCommentVNode("v-if", true),
38
- _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
39
- key: 1,
40
- class: vue.normalizeClass(vue.unref(ns).e("inner"))
41
- }, [
42
- vue.renderSlot(_ctx.$slots, "default")
43
- ], 2)) : vue.createCommentVNode("v-if", true),
44
- _ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 2 }) : vue.createCommentVNode("v-if", true)
45
- ], 10, _hoisted_1);
46
- };
9
+ const linkProps = props.buildProps({
10
+ type: {
11
+ type: String,
12
+ values: ["primary", "success", "warning", "info", "danger", "default"],
13
+ default: "default"
14
+ },
15
+ underline: {
16
+ type: Boolean,
17
+ default: true
18
+ },
19
+ disabled: { type: Boolean, default: false },
20
+ href: { type: String, default: "" },
21
+ icon: {
22
+ type: icon.iconPropType,
23
+ default: ""
47
24
  }
48
25
  });
49
- var Link = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/link/src/link.vue"]]);
50
26
 
51
- exports["default"] = Link;
27
+ exports.linkProps = linkProps;
52
28
  //# sourceMappingURL=link2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link2.js","sources":["../../../../../../packages/components/link/src/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"[\n ns.b(),\n ns.m(type),\n ns.is('disabled', disabled),\n ns.is('underline', underline && !disabled),\n ]\"\n :href=\"disabled || !href ? undefined : href\"\n >\n <ps-icon v-if=\"icon\"><component :is=\"icon\" /></ps-icon>\n <span v-if=\"$slots.default\" :class=\"ns.e('inner')\">\n <slot />\n </span>\n\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n </a>\n</template>\n\n<script lang=\"ts\" setup>\nimport { PsIcon } from '@element-ps/components/icon'\nimport { useNamespace } from '@element-ps/hooks'\nimport { linkProps } from './link'\n\ndefineOptions({\n name: 'PsLink',\n})\n\nconst props = defineProps(linkProps)\n\nconst ns = useNamespace('link')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8BA,IAAA,MAAA,EAAA,GAAAA,mBAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"link2.js","sources":["../../../../../../packages/components/link/src/link.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: 'default',\n },\n underline: {\n type: Boolean,\n default: true,\n },\n disabled: { type: Boolean, default: false },\n href: { type: String, default: '' },\n icon: {\n type: iconPropType,\n default: '',\n },\n} as const)\nexport type LinkProps = ExtractPropTypes<typeof linkProps>\n\nexport type LinkInstance = InstanceType<typeof Link>\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,SAAS,GAAGA,gBAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;AAC1E,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AAC7C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}