element-ps 2.0.35 → 2.0.38

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 (430) hide show
  1. package/dist/index.full.js +11 -3
  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 +11 -3
  7. package/es/components/autocomplete/index.d.ts +5 -5
  8. package/es/components/autocomplete/index.mjs +2 -2
  9. package/es/components/autocomplete/src/autocomplete.mjs +58 -94
  10. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  11. package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  12. package/es/components/autocomplete/src/autocomplete2.mjs +94 -58
  13. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  14. package/es/components/avatar/index.mjs +2 -2
  15. package/es/components/avatar/src/avatar.mjs +29 -61
  16. package/es/components/avatar/src/avatar.mjs.map +1 -1
  17. package/es/components/avatar/src/avatar2.mjs +61 -29
  18. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  19. package/es/components/breadcrumb/index.mjs +4 -4
  20. package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -46
  21. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  22. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +46 -11
  23. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  24. package/es/components/breadcrumb/src/breadcrumb.mjs +12 -37
  25. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  26. package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -12
  27. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  28. package/es/components/button/index.mjs +3 -3
  29. package/es/components/button/src/button-group.mjs +5 -30
  30. package/es/components/button/src/button-group.mjs.map +1 -1
  31. package/es/components/button/src/button-group2.mjs +30 -5
  32. package/es/components/button/src/button-group2.mjs.map +1 -1
  33. package/es/components/button/src/button.mjs +48 -96
  34. package/es/components/button/src/button.mjs.map +1 -1
  35. package/es/components/button/src/button2.mjs +96 -48
  36. package/es/components/button/src/button2.mjs.map +1 -1
  37. package/es/components/calendar/src/calendar2.mjs +1 -1
  38. package/es/components/calendar/src/date-table.mjs +27 -146
  39. package/es/components/calendar/src/date-table.mjs.map +1 -1
  40. package/es/components/calendar/src/date-table2.mjs +146 -27
  41. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  42. package/es/components/card/index.mjs +2 -2
  43. package/es/components/card/src/card.mjs +35 -15
  44. package/es/components/card/src/card.mjs.map +1 -1
  45. package/es/components/card/src/card2.mjs +15 -35
  46. package/es/components/card/src/card2.mjs.map +1 -1
  47. package/es/components/carousel/index.mjs +2 -2
  48. package/es/components/carousel/src/carousel-item.mjs +7 -148
  49. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  50. package/es/components/carousel/src/carousel-item2.mjs +148 -7
  51. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  52. package/es/components/check-tag/index.mjs +2 -2
  53. package/es/components/check-tag/src/check-tag.mjs +7 -20
  54. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  55. package/es/components/check-tag/src/check-tag2.mjs +20 -7
  56. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  57. package/es/components/collapse/index.mjs +2 -2
  58. package/es/components/collapse/src/collapse.mjs +61 -14
  59. package/es/components/collapse/src/collapse.mjs.map +1 -1
  60. package/es/components/collapse/src/collapse2.mjs +14 -61
  61. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  62. package/es/components/collection/index.mjs +1 -1
  63. package/es/components/collection/src/collection.mjs +10 -30
  64. package/es/components/collection/src/collection.mjs.map +1 -1
  65. package/es/components/collection/src/collection2.mjs +30 -10
  66. package/es/components/collection/src/collection2.mjs.map +1 -1
  67. package/es/components/dialog/src/dialog-content.mjs +34 -79
  68. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  69. package/es/components/dialog/src/dialog-content2.mjs +79 -34
  70. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  71. package/es/components/dialog/src/dialog.mjs +1 -1
  72. package/es/components/dialog/src/dialog2.mjs +1 -1
  73. package/es/components/drawer/index.mjs +2 -2
  74. package/es/components/drawer/src/drawer.mjs +23 -117
  75. package/es/components/drawer/src/drawer.mjs.map +1 -1
  76. package/es/components/drawer/src/drawer2.mjs +117 -23
  77. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  78. package/es/components/dropdown/index.d.ts +3 -3
  79. package/es/components/dropdown/src/dropdown.d.ts +1 -1
  80. package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
  81. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  82. package/es/components/empty/index.mjs +2 -2
  83. package/es/components/empty/src/empty.mjs +56 -11
  84. package/es/components/empty/src/empty.mjs.map +1 -1
  85. package/es/components/empty/src/empty2.mjs +11 -56
  86. package/es/components/empty/src/empty2.mjs.map +1 -1
  87. package/es/components/form/index.mjs +2 -2
  88. package/es/components/form/src/form-item2.mjs +1 -1
  89. package/es/components/form/src/form-item2.mjs.map +1 -1
  90. package/es/components/form/src/form.mjs +40 -45
  91. package/es/components/form/src/form.mjs.map +1 -1
  92. package/es/components/form/src/form2.mjs +45 -40
  93. package/es/components/form/src/form2.mjs.map +1 -1
  94. package/es/components/icon/index.mjs +2 -2
  95. package/es/components/icon/src/icon.mjs +8 -35
  96. package/es/components/icon/src/icon.mjs.map +1 -1
  97. package/es/components/icon/src/icon2.mjs +35 -8
  98. package/es/components/icon/src/icon2.mjs.map +1 -1
  99. package/es/components/index.mjs +30 -30
  100. package/es/components/input/index.mjs +2 -2
  101. package/es/components/input/src/input.mjs +85 -295
  102. package/es/components/input/src/input.mjs.map +1 -1
  103. package/es/components/input/src/input2.mjs +295 -85
  104. package/es/components/input/src/input2.mjs.map +1 -1
  105. package/es/components/link/index.mjs +2 -2
  106. package/es/components/link/src/link.mjs +43 -19
  107. package/es/components/link/src/link.mjs.map +1 -1
  108. package/es/components/link/src/link2.mjs +19 -43
  109. package/es/components/link/src/link2.mjs.map +1 -1
  110. package/es/components/menu/index.d.ts +3 -3
  111. package/es/components/menu/src/menu.d.ts +4 -4
  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 +22 -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/popper/index.mjs +4 -4
  121. package/es/components/popper/src/arrow.mjs +7 -31
  122. package/es/components/popper/src/arrow.mjs.map +1 -1
  123. package/es/components/popper/src/arrow2.mjs +31 -7
  124. package/es/components/popper/src/arrow2.mjs.map +1 -1
  125. package/es/components/popper/src/trigger.mjs +28 -17
  126. package/es/components/popper/src/trigger.mjs.map +1 -1
  127. package/es/components/popper/src/trigger2.mjs +17 -28
  128. package/es/components/popper/src/trigger2.mjs.map +1 -1
  129. package/es/components/progress/index.mjs +2 -2
  130. package/es/components/progress/src/progress.mjs +57 -230
  131. package/es/components/progress/src/progress.mjs.map +1 -1
  132. package/es/components/progress/src/progress2.mjs +230 -57
  133. package/es/components/progress/src/progress2.mjs.map +1 -1
  134. package/es/components/radio/index.mjs +2 -2
  135. package/es/components/radio/src/radio-group.mjs +18 -37
  136. package/es/components/radio/src/radio-group.mjs.map +1 -1
  137. package/es/components/radio/src/radio-group2.mjs +37 -18
  138. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  139. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +1 -1
  140. package/es/components/scrollbar/index.mjs +2 -2
  141. package/es/components/scrollbar/src/scrollbar.mjs +42 -112
  142. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  143. package/es/components/scrollbar/src/scrollbar2.mjs +112 -42
  144. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  145. package/es/components/select/index.d.ts +5 -5
  146. package/es/components/select/src/select.vue.d.ts +5 -5
  147. package/es/components/select/src/useSelect.d.ts +5 -5
  148. package/es/components/select-v2/index.d.ts +10 -10
  149. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  150. package/es/components/select-v2/src/select.vue.d.ts +5 -5
  151. package/es/components/select-v2/src/useSelect.d.ts +5 -5
  152. package/es/components/switch/index.mjs +2 -2
  153. package/es/components/switch/src/switch.mjs +176 -81
  154. package/es/components/switch/src/switch.mjs.map +1 -1
  155. package/es/components/switch/src/switch2.mjs +81 -176
  156. package/es/components/switch/src/switch2.mjs.map +1 -1
  157. package/es/components/table/index.d.ts +1 -1
  158. package/es/components/table/src/filter-panel.vue.d.ts +5 -5
  159. package/es/components/table/src/store/helper.mjs +5 -1
  160. package/es/components/table/src/store/helper.mjs.map +1 -1
  161. package/es/components/table/src/table.vue.d.ts +1 -1
  162. package/es/components/tabs/index.mjs +3 -3
  163. package/es/components/tabs/src/tab-bar.mjs +7 -76
  164. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  165. package/es/components/tabs/src/tab-bar2.mjs +76 -7
  166. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  167. package/es/components/tabs/src/tab-nav.mjs +1 -1
  168. package/es/components/tabs/src/tab-pane.mjs +15 -61
  169. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  170. package/es/components/tabs/src/tab-pane2.mjs +61 -15
  171. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  172. package/es/components/teleport/index.mjs +2 -2
  173. package/es/components/teleport/src/teleport.mjs +18 -43
  174. package/es/components/teleport/src/teleport.mjs.map +1 -1
  175. package/es/components/teleport/src/teleport2.mjs +43 -18
  176. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  177. package/es/components/time-picker/src/common/picker.vue.d.ts +5 -5
  178. package/es/components/timeline/index.mjs +2 -2
  179. package/es/components/timeline/src/timeline-item.mjs +73 -39
  180. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  181. package/es/components/timeline/src/timeline-item2.mjs +39 -73
  182. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  183. package/es/components/tooltip/index.d.ts +3 -3
  184. package/es/components/tooltip/src/tooltip.d.ts +1 -1
  185. package/es/components/tooltip/src/tooltip.mjs +1 -1
  186. package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
  187. package/es/components/tooltip/src/tooltip2.mjs +5 -3
  188. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  189. package/es/components/tooltip/src/trigger.mjs +1 -1
  190. package/es/components/tooltip/src/trigger.vue.d.ts +3 -3
  191. package/es/components/tooltip-v2/index.mjs +2 -2
  192. package/es/components/tooltip-v2/src/content.mjs +50 -113
  193. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  194. package/es/components/tooltip-v2/src/content2.mjs +113 -50
  195. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  196. package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
  197. package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
  198. package/es/components/tooltip-v2/src/trigger.mjs +89 -11
  199. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  200. package/es/components/tooltip-v2/src/trigger2.mjs +11 -89
  201. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  202. package/es/components/upload/index.mjs +4 -4
  203. package/es/components/upload/src/upload-content.mjs +1 -1
  204. package/es/components/upload/src/upload-content2.mjs +1 -1
  205. package/es/components/upload/src/upload-dragger.mjs +32 -11
  206. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  207. package/es/components/upload/src/upload-dragger2.mjs +11 -32
  208. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  209. package/es/components/upload/src/upload-list.mjs +26 -155
  210. package/es/components/upload/src/upload-list.mjs.map +1 -1
  211. package/es/components/upload/src/upload-list2.mjs +155 -26
  212. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  213. package/es/components/upload/src/upload.mjs +99 -106
  214. package/es/components/upload/src/upload.mjs.map +1 -1
  215. package/es/components/upload/src/upload2.mjs +106 -99
  216. package/es/components/upload/src/upload2.mjs.map +1 -1
  217. package/es/index.mjs +30 -30
  218. package/lib/components/autocomplete/index.d.ts +5 -5
  219. package/lib/components/autocomplete/index.js +2 -2
  220. package/lib/components/autocomplete/src/autocomplete.js +58 -94
  221. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  222. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  223. package/lib/components/autocomplete/src/autocomplete2.js +94 -58
  224. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  225. package/lib/components/avatar/index.js +2 -2
  226. package/lib/components/avatar/src/avatar.js +29 -61
  227. package/lib/components/avatar/src/avatar.js.map +1 -1
  228. package/lib/components/avatar/src/avatar2.js +61 -29
  229. package/lib/components/avatar/src/avatar2.js.map +1 -1
  230. package/lib/components/breadcrumb/index.js +4 -4
  231. package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -46
  232. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  233. package/lib/components/breadcrumb/src/breadcrumb-item2.js +46 -11
  234. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  235. package/lib/components/breadcrumb/src/breadcrumb.js +12 -37
  236. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  237. package/lib/components/breadcrumb/src/breadcrumb2.js +37 -12
  238. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  239. package/lib/components/button/index.js +3 -3
  240. package/lib/components/button/src/button-group.js +5 -30
  241. package/lib/components/button/src/button-group.js.map +1 -1
  242. package/lib/components/button/src/button-group2.js +30 -5
  243. package/lib/components/button/src/button-group2.js.map +1 -1
  244. package/lib/components/button/src/button.js +50 -96
  245. package/lib/components/button/src/button.js.map +1 -1
  246. package/lib/components/button/src/button2.js +96 -50
  247. package/lib/components/button/src/button2.js.map +1 -1
  248. package/lib/components/calendar/src/calendar2.js +1 -1
  249. package/lib/components/calendar/src/date-table.js +30 -151
  250. package/lib/components/calendar/src/date-table.js.map +1 -1
  251. package/lib/components/calendar/src/date-table2.js +151 -30
  252. package/lib/components/calendar/src/date-table2.js.map +1 -1
  253. package/lib/components/card/index.js +2 -2
  254. package/lib/components/card/src/card.js +35 -15
  255. package/lib/components/card/src/card.js.map +1 -1
  256. package/lib/components/card/src/card2.js +15 -35
  257. package/lib/components/card/src/card2.js.map +1 -1
  258. package/lib/components/carousel/index.js +2 -2
  259. package/lib/components/carousel/src/carousel-item.js +7 -148
  260. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  261. package/lib/components/carousel/src/carousel-item2.js +148 -7
  262. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  263. package/lib/components/check-tag/index.js +2 -2
  264. package/lib/components/check-tag/src/check-tag.js +7 -20
  265. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  266. package/lib/components/check-tag/src/check-tag2.js +20 -7
  267. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  268. package/lib/components/collapse/index.js +2 -2
  269. package/lib/components/collapse/src/collapse.js +61 -16
  270. package/lib/components/collapse/src/collapse.js.map +1 -1
  271. package/lib/components/collapse/src/collapse2.js +16 -61
  272. package/lib/components/collapse/src/collapse2.js.map +1 -1
  273. package/lib/components/collection/index.js +1 -1
  274. package/lib/components/collection/src/collection.js +9 -30
  275. package/lib/components/collection/src/collection.js.map +1 -1
  276. package/lib/components/collection/src/collection2.js +30 -9
  277. package/lib/components/collection/src/collection2.js.map +1 -1
  278. package/lib/components/dialog/src/dialog-content.js +33 -78
  279. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  280. package/lib/components/dialog/src/dialog-content2.js +78 -33
  281. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  282. package/lib/components/dialog/src/dialog.js +1 -1
  283. package/lib/components/dialog/src/dialog2.js +1 -1
  284. package/lib/components/drawer/index.js +2 -2
  285. package/lib/components/drawer/src/drawer.js +23 -117
  286. package/lib/components/drawer/src/drawer.js.map +1 -1
  287. package/lib/components/drawer/src/drawer2.js +117 -23
  288. package/lib/components/drawer/src/drawer2.js.map +1 -1
  289. package/lib/components/dropdown/index.d.ts +3 -3
  290. package/lib/components/dropdown/src/dropdown.d.ts +1 -1
  291. package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
  292. package/lib/components/dropdown/src/dropdown2.js +1 -1
  293. package/lib/components/empty/index.js +2 -2
  294. package/lib/components/empty/src/empty.js +56 -11
  295. package/lib/components/empty/src/empty.js.map +1 -1
  296. package/lib/components/empty/src/empty2.js +11 -56
  297. package/lib/components/empty/src/empty2.js.map +1 -1
  298. package/lib/components/form/index.js +2 -2
  299. package/lib/components/form/src/form-item2.js +1 -1
  300. package/lib/components/form/src/form-item2.js.map +1 -1
  301. package/lib/components/form/src/form.js +40 -45
  302. package/lib/components/form/src/form.js.map +1 -1
  303. package/lib/components/form/src/form2.js +45 -40
  304. package/lib/components/form/src/form2.js.map +1 -1
  305. package/lib/components/icon/index.js +2 -2
  306. package/lib/components/icon/src/icon.js +8 -35
  307. package/lib/components/icon/src/icon.js.map +1 -1
  308. package/lib/components/icon/src/icon2.js +35 -8
  309. package/lib/components/icon/src/icon2.js.map +1 -1
  310. package/lib/components/index.js +30 -30
  311. package/lib/components/input/index.js +2 -2
  312. package/lib/components/input/src/input.js +84 -294
  313. package/lib/components/input/src/input.js.map +1 -1
  314. package/lib/components/input/src/input2.js +294 -84
  315. package/lib/components/input/src/input2.js.map +1 -1
  316. package/lib/components/link/index.js +2 -2
  317. package/lib/components/link/src/link.js +43 -19
  318. package/lib/components/link/src/link.js.map +1 -1
  319. package/lib/components/link/src/link2.js +19 -43
  320. package/lib/components/link/src/link2.js.map +1 -1
  321. package/lib/components/menu/index.d.ts +3 -3
  322. package/lib/components/menu/src/menu.d.ts +4 -4
  323. package/lib/components/popconfirm/index.js +2 -2
  324. package/lib/components/popconfirm/src/popconfirm.js +53 -20
  325. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  326. package/lib/components/popconfirm/src/popconfirm2.js +22 -53
  327. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  328. package/lib/components/popover/index.d.ts +6 -6
  329. package/lib/components/popover/src/index.vue.d.ts +3 -3
  330. package/lib/components/popover/src/popover.d.ts +1 -1
  331. package/lib/components/popper/index.js +4 -4
  332. package/lib/components/popper/src/arrow.js +7 -31
  333. package/lib/components/popper/src/arrow.js.map +1 -1
  334. package/lib/components/popper/src/arrow2.js +31 -7
  335. package/lib/components/popper/src/arrow2.js.map +1 -1
  336. package/lib/components/popper/src/trigger.js +28 -17
  337. package/lib/components/popper/src/trigger.js.map +1 -1
  338. package/lib/components/popper/src/trigger2.js +17 -28
  339. package/lib/components/popper/src/trigger2.js.map +1 -1
  340. package/lib/components/progress/index.js +2 -2
  341. package/lib/components/progress/src/progress.js +57 -230
  342. package/lib/components/progress/src/progress.js.map +1 -1
  343. package/lib/components/progress/src/progress2.js +230 -57
  344. package/lib/components/progress/src/progress2.js.map +1 -1
  345. package/lib/components/radio/index.js +2 -2
  346. package/lib/components/radio/src/radio-group.js +18 -37
  347. package/lib/components/radio/src/radio-group.js.map +1 -1
  348. package/lib/components/radio/src/radio-group2.js +37 -18
  349. package/lib/components/radio/src/radio-group2.js.map +1 -1
  350. package/lib/components/roving-focus-group/src/roving-focus-group2.js +1 -1
  351. package/lib/components/scrollbar/index.js +2 -2
  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/select/index.d.ts +5 -5
  357. package/lib/components/select/src/select.vue.d.ts +5 -5
  358. package/lib/components/select/src/useSelect.d.ts +5 -5
  359. package/lib/components/select-v2/index.d.ts +10 -10
  360. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  361. package/lib/components/select-v2/src/select.vue.d.ts +5 -5
  362. package/lib/components/select-v2/src/useSelect.d.ts +5 -5
  363. package/lib/components/switch/index.js +2 -2
  364. package/lib/components/switch/src/switch.js +176 -81
  365. package/lib/components/switch/src/switch.js.map +1 -1
  366. package/lib/components/switch/src/switch2.js +81 -176
  367. package/lib/components/switch/src/switch2.js.map +1 -1
  368. package/lib/components/table/index.d.ts +1 -1
  369. package/lib/components/table/src/filter-panel.vue.d.ts +5 -5
  370. package/lib/components/table/src/store/helper.js +5 -1
  371. package/lib/components/table/src/store/helper.js.map +1 -1
  372. package/lib/components/table/src/table.vue.d.ts +1 -1
  373. package/lib/components/tabs/index.js +3 -3
  374. package/lib/components/tabs/src/tab-bar.js +7 -76
  375. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  376. package/lib/components/tabs/src/tab-bar2.js +76 -7
  377. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  378. package/lib/components/tabs/src/tab-nav.js +1 -1
  379. package/lib/components/tabs/src/tab-pane.js +15 -61
  380. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  381. package/lib/components/tabs/src/tab-pane2.js +61 -15
  382. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  383. package/lib/components/teleport/index.js +2 -2
  384. package/lib/components/teleport/src/teleport.js +18 -43
  385. package/lib/components/teleport/src/teleport.js.map +1 -1
  386. package/lib/components/teleport/src/teleport2.js +43 -18
  387. package/lib/components/teleport/src/teleport2.js.map +1 -1
  388. package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -5
  389. package/lib/components/timeline/index.js +2 -2
  390. package/lib/components/timeline/src/timeline-item.js +73 -39
  391. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  392. package/lib/components/timeline/src/timeline-item2.js +39 -73
  393. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  394. package/lib/components/tooltip/index.d.ts +3 -3
  395. package/lib/components/tooltip/src/tooltip.d.ts +1 -1
  396. package/lib/components/tooltip/src/tooltip.js +1 -1
  397. package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
  398. package/lib/components/tooltip/src/tooltip2.js +4 -2
  399. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  400. package/lib/components/tooltip/src/trigger.js +1 -1
  401. package/lib/components/tooltip/src/trigger.vue.d.ts +3 -3
  402. package/lib/components/tooltip-v2/index.js +2 -2
  403. package/lib/components/tooltip-v2/src/content.js +50 -113
  404. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  405. package/lib/components/tooltip-v2/src/content2.js +113 -50
  406. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  407. package/lib/components/tooltip-v2/src/tooltip.js +2 -2
  408. package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
  409. package/lib/components/tooltip-v2/src/trigger.js +89 -11
  410. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  411. package/lib/components/tooltip-v2/src/trigger2.js +11 -89
  412. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  413. package/lib/components/upload/index.js +4 -4
  414. package/lib/components/upload/src/upload-content.js +1 -1
  415. package/lib/components/upload/src/upload-content2.js +1 -1
  416. package/lib/components/upload/src/upload-dragger.js +32 -12
  417. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  418. package/lib/components/upload/src/upload-dragger2.js +12 -32
  419. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  420. package/lib/components/upload/src/upload-list.js +27 -155
  421. package/lib/components/upload/src/upload-list.js.map +1 -1
  422. package/lib/components/upload/src/upload-list2.js +155 -27
  423. package/lib/components/upload/src/upload-list2.js.map +1 -1
  424. package/lib/components/upload/src/upload.js +99 -109
  425. package/lib/components/upload/src/upload.js.map +1 -1
  426. package/lib/components/upload/src/upload2.js +109 -99
  427. package/lib/components/upload/src/upload2.js.map +1 -1
  428. package/lib/index.js +30 -30
  429. package/package.json +1 -1
  430. package/web-types.json +1 -1
@@ -2,95 +2,305 @@
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
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
142
+ class: vue.normalizeClass([
143
+ _ctx.type === "textarea" ? vue.unref(nsTextarea).b() : vue.unref(nsInput).b(),
144
+ vue.unref(nsInput).m(vue.unref(inputSize)),
145
+ vue.unref(nsInput).is("disabled", vue.unref(inputDisabled)),
146
+ vue.unref(nsInput).is("exceed", vue.unref(inputExceed)),
147
+ {
148
+ [vue.unref(nsInput).b("group")]: _ctx.$slots.prepend || _ctx.$slots.append,
149
+ [vue.unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
150
+ [vue.unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend,
151
+ [vue.unref(nsInput).m("prefix")]: _ctx.$slots.prefix || _ctx.prefixIcon,
152
+ [vue.unref(nsInput).m("suffix")]: _ctx.$slots.suffix || _ctx.suffixIcon || _ctx.clearable || _ctx.showPassword,
153
+ [vue.unref(nsInput).bm("suffix", "password-clear")]: vue.unref(showClear) && vue.unref(showPwdVisible)
154
+ },
155
+ _ctx.$attrs.class
156
+ ]),
157
+ style: vue.normalizeStyle(vue.unref(containerStyle)),
158
+ widget: _ctx.widget
159
+ }, [
160
+ vue.createCommentVNode(" input "),
161
+ _ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
162
+ vue.createCommentVNode(" prepend slot "),
163
+ _ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", {
164
+ key: 0,
165
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "prepend"))
166
+ }, [
167
+ vue.renderSlot(_ctx.$slots, "prepend")
168
+ ], 2)) : vue.createCommentVNode("v-if", true),
169
+ vue.createElementVNode("div", {
170
+ class: vue.normalizeClass([vue.unref(nsInput).e("wrapper"), vue.unref(nsInput).is("focus", focused.value)])
171
+ }, [
172
+ vue.createCommentVNode(" prefix slot "),
173
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", {
174
+ key: 0,
175
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix"))
176
+ }, [
177
+ vue.createElementVNode("span", {
178
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix-inner"))
179
+ }, [
180
+ vue.renderSlot(_ctx.$slots, "prefix"),
181
+ _ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
182
+ key: 0,
183
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
184
+ }, {
185
+ default: vue.withCtx(() => [
186
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
187
+ ]),
188
+ _: 1
189
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
190
+ ], 2)
191
+ ], 2)) : vue.createCommentVNode("v-if", true),
192
+ vue.createElementVNode("input", vue.mergeProps({
193
+ ref_key: "input",
194
+ ref: input,
195
+ class: vue.unref(nsInput).e("inner")
196
+ }, vue.unref(attrs), {
197
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
198
+ disabled: vue.unref(inputDisabled),
199
+ formatter: _ctx.formatter,
200
+ parser: _ctx.parser,
201
+ readonly: _ctx.readonly,
202
+ autocomplete: _ctx.autocomplete,
203
+ tabindex: _ctx.tabindex,
204
+ "aria-label": _ctx.label,
205
+ placeholder: _ctx.placeholder,
206
+ style: _ctx.inputStyle
207
+ }), null, 16, _hoisted_2),
208
+ vue.createCommentVNode(" suffix slot "),
209
+ vue.unref(suffixVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
210
+ key: 1,
211
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix"))
212
+ }, [
213
+ vue.createElementVNode("span", {
214
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix-inner"))
215
+ }, [
216
+ !vue.unref(showClear) || !vue.unref(showPwdVisible) || !vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
217
+ vue.renderSlot(_ctx.$slots, "suffix"),
218
+ _ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
219
+ key: 0,
220
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
221
+ }, {
222
+ default: vue.withCtx(() => [
223
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.suffixIcon)))
224
+ ]),
225
+ _: 1
226
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
227
+ ], 64)) : vue.createCommentVNode("v-if", true),
228
+ vue.unref(showClear) ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
229
+ key: 1,
230
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("clear")])
231
+ }, {
232
+ default: vue.withCtx(() => [
233
+ vue.createVNode(vue.unref(iconsVue.CircleClose))
234
+ ]),
235
+ _: 1
236
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
237
+ vue.unref(showPwdVisible) ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
238
+ key: 2,
239
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("password")])
240
+ }, {
241
+ default: vue.withCtx(() => [
242
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(passwordIcon))))
243
+ ]),
244
+ _: 1
245
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
246
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
247
+ key: 3,
248
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
249
+ }, [
250
+ vue.createElementVNode("span", {
251
+ class: vue.normalizeClass(vue.unref(nsInput).e("count-inner"))
252
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 3)
253
+ ], 2)) : vue.createCommentVNode("v-if", true),
254
+ vue.unref(validateState) && vue.unref(validateIcon) && vue.unref(needStatusIcon) ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
255
+ key: 4,
256
+ class: vue.normalizeClass([
257
+ vue.unref(nsInput).e("icon"),
258
+ vue.unref(nsInput).e("validateIcon"),
259
+ vue.unref(nsInput).is("loading", vue.unref(validateState) === "validating")
260
+ ])
261
+ }, {
262
+ default: vue.withCtx(() => [
263
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(validateIcon))))
264
+ ]),
265
+ _: 1
266
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
267
+ ], 2)
268
+ ], 2)) : vue.createCommentVNode("v-if", true)
269
+ ], 2),
270
+ vue.createCommentVNode(" append slot "),
271
+ _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
272
+ key: 1,
273
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "append"))
274
+ }, [
275
+ vue.renderSlot(_ctx.$slots, "append")
276
+ ], 2)) : vue.createCommentVNode("v-if", true)
277
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
278
+ vue.createCommentVNode(" textarea "),
279
+ vue.createElementVNode("textarea", vue.mergeProps({
280
+ ref_key: "textarea",
281
+ ref: textarea,
282
+ class: vue.unref(nsTextarea).e("inner")
283
+ }, vue.unref(attrs), {
284
+ tabindex: _ctx.tabindex,
285
+ disabled: vue.unref(inputDisabled),
286
+ readonly: _ctx.readonly,
287
+ autocomplete: _ctx.autocomplete,
288
+ style: vue.unref(textareaStyle),
289
+ "aria-label": _ctx.label,
290
+ placeholder: _ctx.placeholder
291
+ }), null, 16, _hoisted_3),
292
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
293
+ key: 0,
294
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
295
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 3)) : vue.createCommentVNode("v-if", true)
296
+ ], 64))
297
+ ], 14, _hoisted_1)), [
298
+ [vue.vShow, _ctx.type !== "hidden"]
299
+ ]);
300
+ };
92
301
  }
93
302
  });
303
+ var Input = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/input/src/input.vue"]]);
94
304
 
95
- exports.inputProps = inputProps;
305
+ exports["default"] = Input;
96
306
  //# 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,MA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,MAAM;AAChB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAED,oBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;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 { ElIcon } from '@element-ps/components/icon'\nimport {\n CircleClose,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKA,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,QAAA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A,cAAA,CAAA,QAAA,CAAA,CAAA;AACA,KAAA,CAAA;AAGA,IACAC,aAAA,CAAA,YAAA;AACA,MAAA,IAAA,CAAA,KAAA,CAAA,SAAA,IAAA,KAAA,CAAA,MAAA,EAAA;AACA,QAAAC,eAAA,CAAA,SAAA,EAAA,4DAAA,CAAA,CAAA;AACA,OAAA;AACA,MAAA,mBAAA,EAAA,CAAA;AAAA,MACA,gBAAA,EAAA,CAAA;AAEA,MAAA,MAAAC,YAAA,EAAA,CAAA;AACA,MAAA,cAAA,EAAA,CAAA;AACA,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;;;;"}