@element-plus/nightly 0.0.20251217 → 0.0.20251218

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 (683) hide show
  1. package/README.md +6 -2
  2. package/attributes.json +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.full.js +5 -10
  5. package/dist/index.full.min.js +6 -6
  6. package/dist/index.full.min.js.map +1 -1
  7. package/dist/index.full.min.mjs +11 -11
  8. package/dist/index.full.min.mjs.map +1 -1
  9. package/dist/index.full.mjs +5 -10
  10. package/dist/locale/af.js +1 -1
  11. package/dist/locale/af.min.js +1 -1
  12. package/dist/locale/af.min.mjs +1 -1
  13. package/dist/locale/af.mjs +1 -1
  14. package/dist/locale/ar-eg.js +1 -1
  15. package/dist/locale/ar-eg.min.js +1 -1
  16. package/dist/locale/ar-eg.min.mjs +1 -1
  17. package/dist/locale/ar-eg.mjs +1 -1
  18. package/dist/locale/ar.js +1 -1
  19. package/dist/locale/ar.min.js +1 -1
  20. package/dist/locale/ar.min.mjs +1 -1
  21. package/dist/locale/ar.mjs +1 -1
  22. package/dist/locale/az.js +1 -1
  23. package/dist/locale/az.min.js +1 -1
  24. package/dist/locale/az.min.mjs +1 -1
  25. package/dist/locale/az.mjs +1 -1
  26. package/dist/locale/bg.js +1 -1
  27. package/dist/locale/bg.min.js +1 -1
  28. package/dist/locale/bg.min.mjs +1 -1
  29. package/dist/locale/bg.mjs +1 -1
  30. package/dist/locale/bn.js +1 -1
  31. package/dist/locale/bn.min.js +1 -1
  32. package/dist/locale/bn.min.mjs +1 -1
  33. package/dist/locale/bn.mjs +1 -1
  34. package/dist/locale/ca.js +1 -1
  35. package/dist/locale/ca.min.js +1 -1
  36. package/dist/locale/ca.min.mjs +1 -1
  37. package/dist/locale/ca.mjs +1 -1
  38. package/dist/locale/ckb.js +1 -1
  39. package/dist/locale/ckb.min.js +1 -1
  40. package/dist/locale/ckb.min.mjs +1 -1
  41. package/dist/locale/ckb.mjs +1 -1
  42. package/dist/locale/cs.js +1 -1
  43. package/dist/locale/cs.min.js +1 -1
  44. package/dist/locale/cs.min.mjs +1 -1
  45. package/dist/locale/cs.mjs +1 -1
  46. package/dist/locale/da.js +1 -1
  47. package/dist/locale/da.min.js +1 -1
  48. package/dist/locale/da.min.mjs +1 -1
  49. package/dist/locale/da.mjs +1 -1
  50. package/dist/locale/de.js +1 -1
  51. package/dist/locale/de.min.js +1 -1
  52. package/dist/locale/de.min.mjs +1 -1
  53. package/dist/locale/de.mjs +1 -1
  54. package/dist/locale/el.js +1 -1
  55. package/dist/locale/el.min.js +1 -1
  56. package/dist/locale/el.min.mjs +1 -1
  57. package/dist/locale/el.mjs +1 -1
  58. package/dist/locale/en.js +1 -1
  59. package/dist/locale/en.min.js +1 -1
  60. package/dist/locale/en.min.mjs +1 -1
  61. package/dist/locale/en.mjs +1 -1
  62. package/dist/locale/eo.js +1 -1
  63. package/dist/locale/eo.min.js +1 -1
  64. package/dist/locale/eo.min.mjs +1 -1
  65. package/dist/locale/eo.mjs +1 -1
  66. package/dist/locale/es.js +1 -1
  67. package/dist/locale/es.min.js +1 -1
  68. package/dist/locale/es.min.mjs +1 -1
  69. package/dist/locale/es.mjs +1 -1
  70. package/dist/locale/et.js +1 -1
  71. package/dist/locale/et.min.js +1 -1
  72. package/dist/locale/et.min.mjs +1 -1
  73. package/dist/locale/et.mjs +1 -1
  74. package/dist/locale/eu.js +1 -1
  75. package/dist/locale/eu.min.js +1 -1
  76. package/dist/locale/eu.min.mjs +1 -1
  77. package/dist/locale/eu.mjs +1 -1
  78. package/dist/locale/fa.js +1 -1
  79. package/dist/locale/fa.min.js +1 -1
  80. package/dist/locale/fa.min.mjs +1 -1
  81. package/dist/locale/fa.mjs +1 -1
  82. package/dist/locale/fi.js +1 -1
  83. package/dist/locale/fi.min.js +1 -1
  84. package/dist/locale/fi.min.mjs +1 -1
  85. package/dist/locale/fi.mjs +1 -1
  86. package/dist/locale/fr.js +1 -1
  87. package/dist/locale/fr.min.js +1 -1
  88. package/dist/locale/fr.min.mjs +1 -1
  89. package/dist/locale/fr.mjs +1 -1
  90. package/dist/locale/he.js +1 -1
  91. package/dist/locale/he.min.js +1 -1
  92. package/dist/locale/he.min.mjs +1 -1
  93. package/dist/locale/he.mjs +1 -1
  94. package/dist/locale/hi.js +1 -1
  95. package/dist/locale/hi.min.js +1 -1
  96. package/dist/locale/hi.min.mjs +1 -1
  97. package/dist/locale/hi.mjs +1 -1
  98. package/dist/locale/hr.js +1 -1
  99. package/dist/locale/hr.min.js +1 -1
  100. package/dist/locale/hr.min.mjs +1 -1
  101. package/dist/locale/hr.mjs +1 -1
  102. package/dist/locale/hu.js +1 -1
  103. package/dist/locale/hu.min.js +1 -1
  104. package/dist/locale/hu.min.mjs +1 -1
  105. package/dist/locale/hu.mjs +1 -1
  106. package/dist/locale/hy-am.js +1 -1
  107. package/dist/locale/hy-am.min.js +1 -1
  108. package/dist/locale/hy-am.min.mjs +1 -1
  109. package/dist/locale/hy-am.mjs +1 -1
  110. package/dist/locale/id.js +1 -1
  111. package/dist/locale/id.min.js +1 -1
  112. package/dist/locale/id.min.mjs +1 -1
  113. package/dist/locale/id.mjs +1 -1
  114. package/dist/locale/it.js +1 -1
  115. package/dist/locale/it.min.js +1 -1
  116. package/dist/locale/it.min.mjs +1 -1
  117. package/dist/locale/it.mjs +1 -1
  118. package/dist/locale/ja.js +1 -1
  119. package/dist/locale/ja.min.js +1 -1
  120. package/dist/locale/ja.min.mjs +1 -1
  121. package/dist/locale/ja.mjs +1 -1
  122. package/dist/locale/kk.js +1 -1
  123. package/dist/locale/kk.min.js +1 -1
  124. package/dist/locale/kk.min.mjs +1 -1
  125. package/dist/locale/kk.mjs +1 -1
  126. package/dist/locale/km.js +1 -1
  127. package/dist/locale/km.min.js +1 -1
  128. package/dist/locale/km.min.mjs +1 -1
  129. package/dist/locale/km.mjs +1 -1
  130. package/dist/locale/ko.js +1 -1
  131. package/dist/locale/ko.min.js +1 -1
  132. package/dist/locale/ko.min.mjs +1 -1
  133. package/dist/locale/ko.mjs +1 -1
  134. package/dist/locale/ku.js +1 -1
  135. package/dist/locale/ku.min.js +1 -1
  136. package/dist/locale/ku.min.mjs +1 -1
  137. package/dist/locale/ku.mjs +1 -1
  138. package/dist/locale/ky.js +1 -1
  139. package/dist/locale/ky.min.js +1 -1
  140. package/dist/locale/ky.min.mjs +1 -1
  141. package/dist/locale/ky.mjs +1 -1
  142. package/dist/locale/lo.js +1 -1
  143. package/dist/locale/lo.min.js +1 -1
  144. package/dist/locale/lo.min.mjs +1 -1
  145. package/dist/locale/lo.mjs +1 -1
  146. package/dist/locale/lt.js +1 -1
  147. package/dist/locale/lt.min.js +1 -1
  148. package/dist/locale/lt.min.mjs +1 -1
  149. package/dist/locale/lt.mjs +1 -1
  150. package/dist/locale/lv.js +1 -1
  151. package/dist/locale/lv.min.js +1 -1
  152. package/dist/locale/lv.min.mjs +1 -1
  153. package/dist/locale/lv.mjs +1 -1
  154. package/dist/locale/mg.js +1 -1
  155. package/dist/locale/mg.min.js +1 -1
  156. package/dist/locale/mg.min.mjs +1 -1
  157. package/dist/locale/mg.mjs +1 -1
  158. package/dist/locale/mn.js +1 -1
  159. package/dist/locale/mn.min.js +1 -1
  160. package/dist/locale/mn.min.mjs +1 -1
  161. package/dist/locale/mn.mjs +1 -1
  162. package/dist/locale/ms.js +1 -1
  163. package/dist/locale/ms.min.js +1 -1
  164. package/dist/locale/ms.min.mjs +1 -1
  165. package/dist/locale/ms.mjs +1 -1
  166. package/dist/locale/my.js +1 -1
  167. package/dist/locale/my.min.js +1 -1
  168. package/dist/locale/my.min.mjs +1 -1
  169. package/dist/locale/my.mjs +1 -1
  170. package/dist/locale/nb-no.js +1 -1
  171. package/dist/locale/nb-no.min.js +1 -1
  172. package/dist/locale/nb-no.min.mjs +1 -1
  173. package/dist/locale/nb-no.mjs +1 -1
  174. package/dist/locale/nl.js +1 -1
  175. package/dist/locale/nl.min.js +1 -1
  176. package/dist/locale/nl.min.mjs +1 -1
  177. package/dist/locale/nl.mjs +1 -1
  178. package/dist/locale/no.js +1 -1
  179. package/dist/locale/no.min.js +1 -1
  180. package/dist/locale/no.min.mjs +1 -1
  181. package/dist/locale/no.mjs +1 -1
  182. package/dist/locale/pa.js +1 -1
  183. package/dist/locale/pa.min.js +1 -1
  184. package/dist/locale/pa.min.mjs +1 -1
  185. package/dist/locale/pa.mjs +1 -1
  186. package/dist/locale/pl.js +1 -1
  187. package/dist/locale/pl.min.js +1 -1
  188. package/dist/locale/pl.min.mjs +1 -1
  189. package/dist/locale/pl.mjs +1 -1
  190. package/dist/locale/pt-br.js +1 -1
  191. package/dist/locale/pt-br.min.js +1 -1
  192. package/dist/locale/pt-br.min.mjs +1 -1
  193. package/dist/locale/pt-br.mjs +1 -1
  194. package/dist/locale/pt.js +1 -1
  195. package/dist/locale/pt.min.js +1 -1
  196. package/dist/locale/pt.min.mjs +1 -1
  197. package/dist/locale/pt.mjs +1 -1
  198. package/dist/locale/ro.js +1 -1
  199. package/dist/locale/ro.min.js +1 -1
  200. package/dist/locale/ro.min.mjs +1 -1
  201. package/dist/locale/ro.mjs +1 -1
  202. package/dist/locale/ru.js +1 -1
  203. package/dist/locale/ru.min.js +1 -1
  204. package/dist/locale/ru.min.mjs +1 -1
  205. package/dist/locale/ru.mjs +1 -1
  206. package/dist/locale/sk.js +1 -1
  207. package/dist/locale/sk.min.js +1 -1
  208. package/dist/locale/sk.min.mjs +1 -1
  209. package/dist/locale/sk.mjs +1 -1
  210. package/dist/locale/sl.js +1 -1
  211. package/dist/locale/sl.min.js +1 -1
  212. package/dist/locale/sl.min.mjs +1 -1
  213. package/dist/locale/sl.mjs +1 -1
  214. package/dist/locale/sr.js +1 -1
  215. package/dist/locale/sr.min.js +1 -1
  216. package/dist/locale/sr.min.mjs +1 -1
  217. package/dist/locale/sr.mjs +1 -1
  218. package/dist/locale/sv.js +1 -1
  219. package/dist/locale/sv.min.js +1 -1
  220. package/dist/locale/sv.min.mjs +1 -1
  221. package/dist/locale/sv.mjs +1 -1
  222. package/dist/locale/sw.js +1 -1
  223. package/dist/locale/sw.min.js +1 -1
  224. package/dist/locale/sw.min.mjs +1 -1
  225. package/dist/locale/sw.mjs +1 -1
  226. package/dist/locale/ta.js +1 -1
  227. package/dist/locale/ta.min.js +1 -1
  228. package/dist/locale/ta.min.mjs +1 -1
  229. package/dist/locale/ta.mjs +1 -1
  230. package/dist/locale/te.js +1 -1
  231. package/dist/locale/te.min.js +1 -1
  232. package/dist/locale/te.min.mjs +1 -1
  233. package/dist/locale/te.mjs +1 -1
  234. package/dist/locale/th.js +1 -1
  235. package/dist/locale/th.min.js +1 -1
  236. package/dist/locale/th.min.mjs +1 -1
  237. package/dist/locale/th.mjs +1 -1
  238. package/dist/locale/tk.js +1 -1
  239. package/dist/locale/tk.min.js +1 -1
  240. package/dist/locale/tk.min.mjs +1 -1
  241. package/dist/locale/tk.mjs +1 -1
  242. package/dist/locale/tr.js +1 -1
  243. package/dist/locale/tr.min.js +1 -1
  244. package/dist/locale/tr.min.mjs +1 -1
  245. package/dist/locale/tr.mjs +1 -1
  246. package/dist/locale/ug-cn.js +1 -1
  247. package/dist/locale/ug-cn.min.js +1 -1
  248. package/dist/locale/ug-cn.min.mjs +1 -1
  249. package/dist/locale/ug-cn.mjs +1 -1
  250. package/dist/locale/uk.js +1 -1
  251. package/dist/locale/uk.min.js +1 -1
  252. package/dist/locale/uk.min.mjs +1 -1
  253. package/dist/locale/uk.mjs +1 -1
  254. package/dist/locale/uz-uz.js +1 -1
  255. package/dist/locale/uz-uz.min.js +1 -1
  256. package/dist/locale/uz-uz.min.mjs +1 -1
  257. package/dist/locale/uz-uz.mjs +1 -1
  258. package/dist/locale/vi.js +1 -1
  259. package/dist/locale/vi.min.js +1 -1
  260. package/dist/locale/vi.min.mjs +1 -1
  261. package/dist/locale/vi.mjs +1 -1
  262. package/dist/locale/zh-cn.js +1 -1
  263. package/dist/locale/zh-cn.min.js +1 -1
  264. package/dist/locale/zh-cn.min.mjs +1 -1
  265. package/dist/locale/zh-cn.mjs +1 -1
  266. package/dist/locale/zh-hk.js +1 -1
  267. package/dist/locale/zh-hk.min.js +1 -1
  268. package/dist/locale/zh-hk.min.mjs +1 -1
  269. package/dist/locale/zh-hk.mjs +1 -1
  270. package/dist/locale/zh-mo.js +1 -1
  271. package/dist/locale/zh-mo.min.js +1 -1
  272. package/dist/locale/zh-mo.min.mjs +1 -1
  273. package/dist/locale/zh-mo.mjs +1 -1
  274. package/dist/locale/zh-tw.js +1 -1
  275. package/dist/locale/zh-tw.min.js +1 -1
  276. package/dist/locale/zh-tw.min.mjs +1 -1
  277. package/dist/locale/zh-tw.mjs +1 -1
  278. package/es/components/affix/index.mjs +2 -2
  279. package/es/components/affix/src/affix.mjs +29 -153
  280. package/es/components/affix/src/affix.mjs.map +1 -1
  281. package/es/components/affix/src/affix2.mjs +153 -29
  282. package/es/components/affix/src/affix2.mjs.map +1 -1
  283. package/es/components/alert/index.mjs +2 -2
  284. package/es/components/alert/src/alert.mjs +135 -39
  285. package/es/components/alert/src/alert.mjs.map +1 -1
  286. package/es/components/alert/src/alert2.mjs +39 -135
  287. package/es/components/alert/src/alert2.mjs.map +1 -1
  288. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  289. package/es/components/badge/index.mjs +2 -2
  290. package/es/components/badge/src/badge.mjs +31 -83
  291. package/es/components/badge/src/badge.mjs.map +1 -1
  292. package/es/components/badge/src/badge2.mjs +83 -31
  293. package/es/components/badge/src/badge2.mjs.map +1 -1
  294. package/es/components/breadcrumb/index.mjs +4 -4
  295. package/es/components/breadcrumb/src/breadcrumb-item.mjs +67 -7
  296. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  297. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +7 -67
  298. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  299. package/es/components/breadcrumb/src/breadcrumb.mjs +37 -9
  300. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  301. package/es/components/breadcrumb/src/breadcrumb2.mjs +9 -37
  302. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  303. package/es/components/calendar/index.mjs +2 -2
  304. package/es/components/calendar/src/calendar.mjs +15 -180
  305. package/es/components/calendar/src/calendar.mjs.map +1 -1
  306. package/es/components/calendar/src/calendar2.mjs +180 -15
  307. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  308. package/es/components/carousel/index.mjs +2 -2
  309. package/es/components/carousel/src/carousel-item.mjs +79 -7
  310. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  311. package/es/components/carousel/src/carousel-item2.mjs +7 -79
  312. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  313. package/es/components/cascader/index.mjs +2 -2
  314. package/es/components/cascader/src/cascader.mjs +822 -103
  315. package/es/components/cascader/src/cascader.mjs.map +1 -1
  316. package/es/components/cascader/src/cascader2.mjs +103 -822
  317. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  318. package/es/components/check-tag/index.mjs +2 -2
  319. package/es/components/check-tag/src/check-tag.mjs +14 -43
  320. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  321. package/es/components/check-tag/src/check-tag2.mjs +43 -14
  322. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  323. package/es/components/color-picker/src/color-picker.mjs +1 -1
  324. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs +1 -4
  325. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs.map +1 -1
  326. package/es/components/descriptions/index.mjs +2 -2
  327. package/es/components/descriptions/src/description.mjs +24 -169
  328. package/es/components/descriptions/src/description.mjs.map +1 -1
  329. package/es/components/descriptions/src/description2.mjs +169 -24
  330. package/es/components/descriptions/src/description2.mjs.map +1 -1
  331. package/es/components/descriptions/src/descriptions-row.mjs +6 -94
  332. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  333. package/es/components/descriptions/src/descriptions-row2.mjs +94 -6
  334. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  335. package/es/components/dialog/index.mjs +2 -2
  336. package/es/components/dialog/src/dialog-content.mjs +38 -112
  337. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  338. package/es/components/dialog/src/dialog-content2.mjs +112 -38
  339. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  340. package/es/components/dialog/src/dialog.mjs +189 -73
  341. package/es/components/dialog/src/dialog.mjs.map +1 -1
  342. package/es/components/dialog/src/dialog2.mjs +73 -189
  343. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  344. package/es/components/drawer/src/drawer.mjs +1 -1
  345. package/es/components/dropdown/src/dropdown.mjs +2 -2
  346. package/es/components/form/index.mjs +2 -2
  347. package/es/components/form/src/form.mjs +54 -174
  348. package/es/components/form/src/form.mjs.map +1 -1
  349. package/es/components/form/src/form2.mjs +174 -54
  350. package/es/components/form/src/form2.mjs.map +1 -1
  351. package/es/components/image/index.mjs +2 -2
  352. package/es/components/image/src/image.mjs +279 -68
  353. package/es/components/image/src/image.mjs.map +1 -1
  354. package/es/components/image/src/image2.mjs +68 -279
  355. package/es/components/image/src/image2.mjs.map +1 -1
  356. package/es/components/index.mjs +29 -29
  357. package/es/components/input-tag/src/input-tag.mjs +1 -1
  358. package/es/components/mention/src/mention.mjs +1 -1
  359. package/es/components/menu/index.mjs +2 -2
  360. package/es/components/menu/src/menu-item-group.mjs +4 -51
  361. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  362. package/es/components/menu/src/menu-item-group2.mjs +51 -4
  363. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  364. package/es/components/pagination/src/components/jumper.mjs +7 -69
  365. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  366. package/es/components/pagination/src/components/jumper2.mjs +69 -7
  367. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  368. package/es/components/pagination/src/pagination.mjs +1 -1
  369. package/es/components/popconfirm/src/popconfirm.mjs +1 -1
  370. package/es/components/popover/index.mjs +2 -2
  371. package/es/components/popover/src/popover.mjs +65 -120
  372. package/es/components/popover/src/popover.mjs.map +1 -1
  373. package/es/components/popover/src/popover2.mjs +120 -65
  374. package/es/components/popover/src/popover2.mjs.map +1 -1
  375. package/es/components/popper/index.mjs +2 -2
  376. package/es/components/popper/src/popper.mjs +32 -22
  377. package/es/components/popper/src/popper.mjs.map +1 -1
  378. package/es/components/popper/src/popper2.mjs +22 -32
  379. package/es/components/popper/src/popper2.mjs.map +1 -1
  380. package/es/components/row/index.mjs +2 -2
  381. package/es/components/row/src/row.mjs +27 -43
  382. package/es/components/row/src/row.mjs.map +1 -1
  383. package/es/components/row/src/row2.mjs +43 -27
  384. package/es/components/row/src/row2.mjs.map +1 -1
  385. package/es/components/scrollbar/index.mjs +1 -1
  386. package/es/components/scrollbar/src/bar.mjs +69 -10
  387. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  388. package/es/components/scrollbar/src/bar2.mjs +10 -69
  389. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  390. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  391. package/es/components/scrollbar/src/thumb.mjs +163 -11
  392. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  393. package/es/components/scrollbar/src/thumb2.mjs +11 -163
  394. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  395. package/es/components/segmented/index.mjs +2 -2
  396. package/es/components/segmented/src/segmented.mjs +209 -44
  397. package/es/components/segmented/src/segmented.mjs.map +1 -1
  398. package/es/components/segmented/src/segmented2.mjs +44 -209
  399. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  400. package/es/components/select/src/select.mjs +2 -2
  401. package/es/components/select-v2/src/defaults.mjs +2 -2
  402. package/es/components/slider/src/button.mjs +104 -18
  403. package/es/components/slider/src/button.mjs.map +1 -1
  404. package/es/components/slider/src/button2.mjs +18 -104
  405. package/es/components/slider/src/button2.mjs.map +1 -1
  406. package/es/components/slider/src/slider2.mjs +1 -1
  407. package/es/components/splitter/index.mjs +4 -4
  408. package/es/components/splitter/src/split-panel.mjs +186 -19
  409. package/es/components/splitter/src/split-panel.mjs.map +1 -1
  410. package/es/components/splitter/src/split-panel2.mjs +19 -186
  411. package/es/components/splitter/src/split-panel2.mjs.map +1 -1
  412. package/es/components/splitter/src/splitter.mjs +114 -14
  413. package/es/components/splitter/src/splitter.mjs.map +1 -1
  414. package/es/components/splitter/src/splitter2.mjs +14 -114
  415. package/es/components/splitter/src/splitter2.mjs.map +1 -1
  416. package/es/components/steps/index.mjs +4 -4
  417. package/es/components/steps/src/item.mjs +18 -257
  418. package/es/components/steps/src/item.mjs.map +1 -1
  419. package/es/components/steps/src/item2.mjs +257 -18
  420. package/es/components/steps/src/item2.mjs.map +1 -1
  421. package/es/components/steps/src/steps.mjs +49 -34
  422. package/es/components/steps/src/steps.mjs.map +1 -1
  423. package/es/components/steps/src/steps2.mjs +34 -49
  424. package/es/components/steps/src/steps2.mjs.map +1 -1
  425. package/es/components/table/src/filter-panel.mjs +1 -1
  426. package/es/components/tag/index.mjs +2 -2
  427. package/es/components/tag/src/tag.mjs +131 -26
  428. package/es/components/tag/src/tag.mjs.map +1 -1
  429. package/es/components/tag/src/tag2.mjs +26 -131
  430. package/es/components/tag/src/tag2.mjs.map +1 -1
  431. package/es/components/time-picker/src/common/props.mjs +1 -1
  432. package/es/components/tooltip/index.mjs +1 -1
  433. package/es/components/tooltip/src/content.mjs +213 -28
  434. package/es/components/tooltip/src/content.mjs.map +1 -1
  435. package/es/components/tooltip/src/content2.mjs +28 -213
  436. package/es/components/tooltip/src/content2.mjs.map +1 -1
  437. package/es/components/tooltip/src/tooltip.mjs +2 -2
  438. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  439. package/es/components/tour/index.mjs +3 -3
  440. package/es/components/tour/src/content.mjs +85 -42
  441. package/es/components/tour/src/content.mjs.map +1 -1
  442. package/es/components/tour/src/content2.mjs +42 -85
  443. package/es/components/tour/src/content2.mjs.map +1 -1
  444. package/es/components/tour/src/step.mjs +43 -255
  445. package/es/components/tour/src/step.mjs.map +1 -1
  446. package/es/components/tour/src/step2.mjs +255 -43
  447. package/es/components/tour/src/step2.mjs.map +1 -1
  448. package/es/components/tour/src/tour.mjs +1 -1
  449. package/es/components/tour/src/tour2.mjs +1 -1
  450. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  451. package/es/components/transfer/src/transfer-panel.mjs +173 -20
  452. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  453. package/es/components/transfer/src/transfer-panel2.mjs +20 -173
  454. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  455. package/es/components/transfer/src/transfer2.mjs +1 -1
  456. package/es/components/tree/src/model/useKeydown.mjs +2 -4
  457. package/es/components/tree/src/model/useKeydown.mjs.map +1 -1
  458. package/es/components/upload/index.mjs +3 -3
  459. package/es/components/upload/src/upload-content.mjs +1 -1
  460. package/es/components/upload/src/upload-content2.mjs +2 -2
  461. package/es/components/upload/src/upload-dragger.mjs +69 -10
  462. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  463. package/es/components/upload/src/upload-dragger2.mjs +10 -69
  464. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  465. package/es/components/upload/src/upload-list.mjs +1 -1
  466. package/es/components/upload/src/upload.mjs +138 -101
  467. package/es/components/upload/src/upload.mjs.map +1 -1
  468. package/es/components/upload/src/upload2.mjs +101 -138
  469. package/es/components/upload/src/upload2.mjs.map +1 -1
  470. package/es/components/upload/src/use-handlers.mjs +1 -1
  471. package/es/index.mjs +29 -29
  472. package/es/version.d.ts +1 -1
  473. package/es/version.mjs +1 -1
  474. package/es/version.mjs.map +1 -1
  475. package/lib/components/affix/index.js +2 -2
  476. package/lib/components/affix/src/affix.js +30 -153
  477. package/lib/components/affix/src/affix.js.map +1 -1
  478. package/lib/components/affix/src/affix2.js +153 -30
  479. package/lib/components/affix/src/affix2.js.map +1 -1
  480. package/lib/components/alert/index.js +2 -2
  481. package/lib/components/alert/src/alert.js +134 -40
  482. package/lib/components/alert/src/alert.js.map +1 -1
  483. package/lib/components/alert/src/alert2.js +40 -134
  484. package/lib/components/alert/src/alert2.js.map +1 -1
  485. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  486. package/lib/components/badge/index.js +2 -2
  487. package/lib/components/badge/src/badge.js +31 -83
  488. package/lib/components/badge/src/badge.js.map +1 -1
  489. package/lib/components/badge/src/badge2.js +83 -31
  490. package/lib/components/badge/src/badge2.js.map +1 -1
  491. package/lib/components/breadcrumb/index.js +4 -4
  492. package/lib/components/breadcrumb/src/breadcrumb-item.js +67 -7
  493. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  494. package/lib/components/breadcrumb/src/breadcrumb-item2.js +7 -67
  495. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  496. package/lib/components/breadcrumb/src/breadcrumb.js +37 -9
  497. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  498. package/lib/components/breadcrumb/src/breadcrumb2.js +9 -37
  499. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  500. package/lib/components/calendar/index.js +2 -2
  501. package/lib/components/calendar/src/calendar.js +16 -180
  502. package/lib/components/calendar/src/calendar.js.map +1 -1
  503. package/lib/components/calendar/src/calendar2.js +180 -16
  504. package/lib/components/calendar/src/calendar2.js.map +1 -1
  505. package/lib/components/carousel/index.js +2 -2
  506. package/lib/components/carousel/src/carousel-item.js +79 -7
  507. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  508. package/lib/components/carousel/src/carousel-item2.js +7 -79
  509. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  510. package/lib/components/cascader/index.js +2 -2
  511. package/lib/components/cascader/src/cascader.js +821 -103
  512. package/lib/components/cascader/src/cascader.js.map +1 -1
  513. package/lib/components/cascader/src/cascader2.js +103 -821
  514. package/lib/components/cascader/src/cascader2.js.map +1 -1
  515. package/lib/components/check-tag/index.js +2 -2
  516. package/lib/components/check-tag/src/check-tag.js +15 -43
  517. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  518. package/lib/components/check-tag/src/check-tag2.js +43 -15
  519. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  520. package/lib/components/color-picker/src/color-picker.js +1 -1
  521. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js +1 -4
  522. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js.map +1 -1
  523. package/lib/components/descriptions/index.js +2 -2
  524. package/lib/components/descriptions/src/description.js +24 -169
  525. package/lib/components/descriptions/src/description.js.map +1 -1
  526. package/lib/components/descriptions/src/description2.js +169 -24
  527. package/lib/components/descriptions/src/description2.js.map +1 -1
  528. package/lib/components/descriptions/src/descriptions-row.js +6 -94
  529. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  530. package/lib/components/descriptions/src/descriptions-row2.js +94 -6
  531. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  532. package/lib/components/dialog/index.js +2 -2
  533. package/lib/components/dialog/src/dialog-content.js +38 -111
  534. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  535. package/lib/components/dialog/src/dialog-content2.js +111 -38
  536. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  537. package/lib/components/dialog/src/dialog.js +188 -74
  538. package/lib/components/dialog/src/dialog.js.map +1 -1
  539. package/lib/components/dialog/src/dialog2.js +74 -188
  540. package/lib/components/dialog/src/dialog2.js.map +1 -1
  541. package/lib/components/drawer/src/drawer.js +1 -1
  542. package/lib/components/dropdown/src/dropdown.js +2 -2
  543. package/lib/components/form/index.js +2 -2
  544. package/lib/components/form/src/form.js +55 -173
  545. package/lib/components/form/src/form.js.map +1 -1
  546. package/lib/components/form/src/form2.js +173 -55
  547. package/lib/components/form/src/form2.js.map +1 -1
  548. package/lib/components/image/index.js +2 -2
  549. package/lib/components/image/src/image.js +278 -68
  550. package/lib/components/image/src/image.js.map +1 -1
  551. package/lib/components/image/src/image2.js +68 -278
  552. package/lib/components/image/src/image2.js.map +1 -1
  553. package/lib/components/index.js +29 -29
  554. package/lib/components/input-tag/src/input-tag.js +1 -1
  555. package/lib/components/mention/src/mention.js +1 -1
  556. package/lib/components/menu/index.js +2 -2
  557. package/lib/components/menu/src/menu-item-group.js +4 -51
  558. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  559. package/lib/components/menu/src/menu-item-group2.js +51 -4
  560. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  561. package/lib/components/pagination/src/components/jumper.js +7 -69
  562. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  563. package/lib/components/pagination/src/components/jumper2.js +69 -7
  564. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  565. package/lib/components/pagination/src/pagination.js +1 -1
  566. package/lib/components/popconfirm/src/popconfirm.js +1 -1
  567. package/lib/components/popover/index.js +2 -2
  568. package/lib/components/popover/src/popover.js +66 -120
  569. package/lib/components/popover/src/popover.js.map +1 -1
  570. package/lib/components/popover/src/popover2.js +120 -66
  571. package/lib/components/popover/src/popover2.js.map +1 -1
  572. package/lib/components/popper/index.js +2 -2
  573. package/lib/components/popper/src/popper.js +32 -25
  574. package/lib/components/popper/src/popper.js.map +1 -1
  575. package/lib/components/popper/src/popper2.js +25 -32
  576. package/lib/components/popper/src/popper2.js.map +1 -1
  577. package/lib/components/row/index.js +2 -2
  578. package/lib/components/row/src/row.js +29 -43
  579. package/lib/components/row/src/row.js.map +1 -1
  580. package/lib/components/row/src/row2.js +43 -29
  581. package/lib/components/row/src/row2.js.map +1 -1
  582. package/lib/components/scrollbar/index.js +1 -1
  583. package/lib/components/scrollbar/src/bar.js +69 -10
  584. package/lib/components/scrollbar/src/bar.js.map +1 -1
  585. package/lib/components/scrollbar/src/bar2.js +10 -69
  586. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  587. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  588. package/lib/components/scrollbar/src/thumb.js +163 -11
  589. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  590. package/lib/components/scrollbar/src/thumb2.js +11 -163
  591. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  592. package/lib/components/segmented/index.js +2 -2
  593. package/lib/components/segmented/src/segmented.js +208 -45
  594. package/lib/components/segmented/src/segmented.js.map +1 -1
  595. package/lib/components/segmented/src/segmented2.js +45 -208
  596. package/lib/components/segmented/src/segmented2.js.map +1 -1
  597. package/lib/components/select/src/select.js +2 -2
  598. package/lib/components/select-v2/src/defaults.js +2 -2
  599. package/lib/components/slider/src/button.js +104 -19
  600. package/lib/components/slider/src/button.js.map +1 -1
  601. package/lib/components/slider/src/button2.js +19 -104
  602. package/lib/components/slider/src/button2.js.map +1 -1
  603. package/lib/components/slider/src/slider2.js +1 -1
  604. package/lib/components/splitter/index.js +4 -4
  605. package/lib/components/splitter/src/split-panel.js +186 -20
  606. package/lib/components/splitter/src/split-panel.js.map +1 -1
  607. package/lib/components/splitter/src/split-panel2.js +20 -186
  608. package/lib/components/splitter/src/split-panel2.js.map +1 -1
  609. package/lib/components/splitter/src/splitter.js +114 -15
  610. package/lib/components/splitter/src/splitter.js.map +1 -1
  611. package/lib/components/splitter/src/splitter2.js +15 -114
  612. package/lib/components/splitter/src/splitter2.js.map +1 -1
  613. package/lib/components/steps/index.js +4 -4
  614. package/lib/components/steps/src/item.js +18 -257
  615. package/lib/components/steps/src/item.js.map +1 -1
  616. package/lib/components/steps/src/item2.js +257 -18
  617. package/lib/components/steps/src/item2.js.map +1 -1
  618. package/lib/components/steps/src/steps.js +49 -35
  619. package/lib/components/steps/src/steps.js.map +1 -1
  620. package/lib/components/steps/src/steps2.js +35 -49
  621. package/lib/components/steps/src/steps2.js.map +1 -1
  622. package/lib/components/table/src/filter-panel.js +1 -1
  623. package/lib/components/tag/index.js +2 -2
  624. package/lib/components/tag/src/tag.js +131 -27
  625. package/lib/components/tag/src/tag.js.map +1 -1
  626. package/lib/components/tag/src/tag2.js +27 -131
  627. package/lib/components/tag/src/tag2.js.map +1 -1
  628. package/lib/components/time-picker/src/common/props.js +1 -1
  629. package/lib/components/tooltip/index.js +1 -1
  630. package/lib/components/tooltip/src/content.js +213 -28
  631. package/lib/components/tooltip/src/content.js.map +1 -1
  632. package/lib/components/tooltip/src/content2.js +28 -213
  633. package/lib/components/tooltip/src/content2.js.map +1 -1
  634. package/lib/components/tooltip/src/tooltip.js +2 -2
  635. package/lib/components/tooltip/src/tooltip2.js +1 -1
  636. package/lib/components/tour/index.js +3 -3
  637. package/lib/components/tour/src/content.js +85 -45
  638. package/lib/components/tour/src/content.js.map +1 -1
  639. package/lib/components/tour/src/content2.js +45 -85
  640. package/lib/components/tour/src/content2.js.map +1 -1
  641. package/lib/components/tour/src/step.js +43 -254
  642. package/lib/components/tour/src/step.js.map +1 -1
  643. package/lib/components/tour/src/step2.js +254 -43
  644. package/lib/components/tour/src/step2.js.map +1 -1
  645. package/lib/components/tour/src/tour.js +1 -1
  646. package/lib/components/tour/src/tour2.js +1 -1
  647. package/lib/components/transfer/src/composables/use-check.js +1 -1
  648. package/lib/components/transfer/src/transfer-panel.js +173 -22
  649. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  650. package/lib/components/transfer/src/transfer-panel2.js +22 -173
  651. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  652. package/lib/components/transfer/src/transfer2.js +1 -1
  653. package/lib/components/tree/src/model/useKeydown.js +2 -4
  654. package/lib/components/tree/src/model/useKeydown.js.map +1 -1
  655. package/lib/components/upload/index.js +3 -3
  656. package/lib/components/upload/src/upload-content.js +1 -1
  657. package/lib/components/upload/src/upload-content2.js +2 -2
  658. package/lib/components/upload/src/upload-dragger.js +69 -11
  659. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  660. package/lib/components/upload/src/upload-dragger2.js +11 -69
  661. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  662. package/lib/components/upload/src/upload-list.js +1 -1
  663. package/lib/components/upload/src/upload.js +138 -104
  664. package/lib/components/upload/src/upload.js.map +1 -1
  665. package/lib/components/upload/src/upload2.js +104 -138
  666. package/lib/components/upload/src/upload2.js.map +1 -1
  667. package/lib/components/upload/src/use-handlers.js +1 -1
  668. package/lib/index.js +29 -29
  669. package/lib/version.d.ts +1 -1
  670. package/lib/version.js +1 -1
  671. package/lib/version.js.map +1 -1
  672. package/package.json +2 -2
  673. package/tags.json +1 -1
  674. package/theme-chalk/el-date-picker-panel.css +1 -1
  675. package/theme-chalk/el-form-item.css +1 -0
  676. package/theme-chalk/el-form.css +1 -1
  677. package/theme-chalk/el-time-picker.css +1 -1
  678. package/theme-chalk/el-time-select.css +1 -1
  679. package/theme-chalk/index.css +1 -1
  680. package/theme-chalk/src/date-picker/picker-panel.scss +5 -0
  681. package/theme-chalk/src/form-item.scss +232 -0
  682. package/theme-chalk/src/form.scss +0 -229
  683. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { teleportProps } from '@element-plus/components/teleport'\n\nimport type {\n CSSProperties,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<CSSProperties['z-index']>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n /**\n * @description whether affix element is teleported, if `true` it will be teleported to where `append-to` sets\n * */\n teleported: Boolean,\n /**\n * @description which element the affix element appends to\n * */\n appendTo: {\n type: teleportProps.to.type,\n default: 'body',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\nexport type AffixPropsPublic = ExtractPublicPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix> & unknown\n"],"names":[],"mappings":";;;;;AAgBO,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,cAAA,CAAyC,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IAC/D,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,KAAA,EAAO,QAAQ,CAAA;AAAA,IACxB,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EAIA,UAAY,EAAA,OAAA;AAAA,EAIZ,QAAU,EAAA;AAAA,IACR,IAAA,EAAM,cAAc,EAAG,CAAA,IAAA;AAAA,IACvB,OAAS,EAAA,MAAA;AAAA,GACX;AACF,CAAU,EAAA;AAIH,MAAM,UAAa,GAAA;AAAA,EACxB,MAAA,EAAQ,CAAC,EAAE,SAAW,EAAA,KAAA,OACpB,QAAS,CAAA,SAAS,CAAK,IAAA,SAAA,CAAU,KAAK,CAAA;AAAA,EACxC,CAAC,YAAA,GAAe,CAAC,KAAA,KAAmB,UAAU,KAAK,CAAA;AACrD;;;;"}
1
+ {"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <el-teleport :disabled=\"teleportDisabled\" :to=\"appendTo\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </el-teleport>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n shallowRef,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport ElTeleport from '@element-plus/components/teleport'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { affixEmits, affixProps } from './affix'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n left: rootLeft,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst teleportDisabled = computed(() => {\n return !props.teleported || !fixed.value\n})\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = addUnit(props.offset)\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n left: props.teleported ? `${rootLeft.value}px` : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n const { position, target, offset } = props\n const rootHeightOffset = offset + rootHeight.value\n\n if (position === 'top') {\n if (target) {\n const difference = targetRect.bottom.value - rootHeightOffset\n fixed.value = offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = offset > rootTop.value\n }\n } else if (target) {\n const difference =\n windowHeight.value - targetRect.top.value - rootHeightOffset\n fixed.value =\n windowHeight.value - offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - offset < rootBottom.value\n }\n}\n\nconst updateRootRect = async () => {\n if (!fixed.value) {\n updateRoot()\n return\n }\n\n fixed.value = false\n await nextTick()\n updateRoot()\n fixed.value = true\n}\n\nconst handleScroll = async () => {\n updateRoot()\n await nextTick()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit(CHANGE_EVENT, val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot: updateRootRect,\n})\n</script>\n"],"names":["target","_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle","_createVNode","appendTo","_createElementVNode","_renderSlot"],"mappings":";;;;;;;;;;;AAiCA,MAAM,cAAiB,GAAA,SAAA,CAAA;;;;;;;;;AA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;AAAA,QAAA;AAAA,UANG,OAAA,EAAA,MAAA;AAAA,UAAJ,GAAI,EAAA,IAAA;AAAA,UAAQ,OAAKC,cAAE,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAG,GAAC,CAAA;AAAA,UAAK,KAAA,EAAKC,cAAE,CAAA,SAAA,CAAS,KAAA,CAAA;AAAA,SAAA;AAAA;UAC/CC,WAAA,CAIcF,KAAA,CAAA,UAAA,CAAA,EAAA;AAAA,YAJA,UAAU,gBAAA,CAAA,KAAA;AAAA,YAAmB,IAAIG,IAAAA,CAAAA,QAAAA;AAAAA,WAAAA,EAAAA;AAAAA,6BAC7C,MAEM;AAAA,cAFNC,kBAAA;AAAA,gBAEM,KAAA;AAAA,gBAAA;AAAA,kBAFA,KAAK,EAAAL,cAAA,CAAA,EAAA,CAAKC,KAAG,CAAA,EAAA,CAAA,CAAA,CAAA,CAAC,WAAY,KAAK,CAAA,KAAA,EAAA,CAAA;AAAA,kBAAK,KAAA,EAAKC,cAAE,CAAA,UAAA,CAAU,KAAA,CAAA;AAAA,iBAAA;AAAA;kBACzDI,UAAA,CAAQ,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,iBAAA;AAAA;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import Alert from './src/alert2.mjs';
2
- export { alertEffects, alertEmits, alertProps } from './src/alert.mjs';
1
+ import Alert from './src/alert.mjs';
2
+ export { alertEffects, alertEmits, alertProps } from './src/alert2.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElAlert = withInstall(Alert);
@@ -1,44 +1,140 @@
1
- import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
2
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
3
- import { keysOf } from '../../../utils/objects.mjs';
1
+ import { defineComponent, useSlots, ref, computed, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, renderSlot, resolveDynamicComponent, createCommentVNode, createElementBlock, createTextVNode, toDisplayString, Fragment, createVNode, vShow } from 'vue';
2
+ import { ElIcon } from '../../icon/index.mjs';
3
+ import { alertProps, alertEmits } from './alert2.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { TypeComponentsMap, TypeComponents } from '../../../utils/vue/icon.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
+ import { debugWarn } from '../../../utils/error.mjs';
4
8
 
5
- const alertEffects = ["light", "dark"];
6
- const alertProps = buildProps({
7
- title: {
8
- type: String,
9
- default: ""
9
+ const _sfc_main = defineComponent({
10
+ ...{
11
+ name: "ElAlert"
10
12
  },
11
- description: {
12
- type: String,
13
- default: ""
14
- },
15
- type: {
16
- type: String,
17
- values: keysOf(TypeComponentsMap),
18
- default: "info"
19
- },
20
- closable: {
21
- type: Boolean,
22
- default: true
23
- },
24
- closeText: {
25
- type: String,
26
- default: ""
27
- },
28
- showIcon: Boolean,
29
- center: Boolean,
30
- effect: {
31
- type: String,
32
- values: alertEffects,
33
- default: "light"
34
- },
35
- showAfter: Number,
36
- hideAfter: Number,
37
- autoClose: Number
13
+ __name: "alert",
14
+ props: alertProps,
15
+ emits: alertEmits,
16
+ setup(__props, { emit: __emit }) {
17
+ const { Close } = TypeComponents;
18
+ const props = __props;
19
+ const emit = __emit;
20
+ const slots = useSlots();
21
+ const ns = useNamespace("alert");
22
+ const visible = ref(true);
23
+ const iconComponent = computed(() => TypeComponentsMap[props.type]);
24
+ const hasDesc = computed(() => !!(props.description || slots.default));
25
+ const close = (evt) => {
26
+ visible.value = false;
27
+ emit("close", evt);
28
+ };
29
+ if (props.showAfter || props.hideAfter || props.autoClose) {
30
+ debugWarn(
31
+ "el-alert",
32
+ "The `show-after`, `hide-after`, and `auto-close` attributes were removed after 2.11.8. Please use `v-if` and `v-show` to manually replace them, visit: https://github.com/element-plus/element-plus/pull/22560"
33
+ );
34
+ }
35
+ return (_ctx, _cache) => {
36
+ return openBlock(), createBlock(Transition, {
37
+ name: unref(ns).b("fade"),
38
+ persisted: ""
39
+ }, {
40
+ default: withCtx(() => [
41
+ withDirectives(createElementVNode(
42
+ "div",
43
+ {
44
+ class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
45
+ role: "alert"
46
+ },
47
+ [
48
+ _ctx.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), {
49
+ key: 0,
50
+ class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)])
51
+ }, {
52
+ default: withCtx(() => [
53
+ renderSlot(_ctx.$slots, "icon", {}, () => [
54
+ (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))
55
+ ])
56
+ ]),
57
+ _: 3
58
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
59
+ createElementVNode(
60
+ "div",
61
+ {
62
+ class: normalizeClass(unref(ns).e("content"))
63
+ },
64
+ [
65
+ _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock(
66
+ "span",
67
+ {
68
+ key: 0,
69
+ class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }])
70
+ },
71
+ [
72
+ renderSlot(_ctx.$slots, "title", {}, () => [
73
+ createTextVNode(
74
+ toDisplayString(_ctx.title),
75
+ 1
76
+ )
77
+ ])
78
+ ],
79
+ 2
80
+ )) : createCommentVNode("v-if", true),
81
+ hasDesc.value ? (openBlock(), createElementBlock(
82
+ "p",
83
+ {
84
+ key: 1,
85
+ class: normalizeClass(unref(ns).e("description"))
86
+ },
87
+ [
88
+ renderSlot(_ctx.$slots, "default", {}, () => [
89
+ createTextVNode(
90
+ toDisplayString(_ctx.description),
91
+ 1
92
+ )
93
+ ])
94
+ ],
95
+ 2
96
+ )) : createCommentVNode("v-if", true),
97
+ _ctx.closable ? (openBlock(), createElementBlock(
98
+ Fragment,
99
+ { key: 2 },
100
+ [
101
+ _ctx.closeText ? (openBlock(), createElementBlock(
102
+ "div",
103
+ {
104
+ key: 0,
105
+ class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
106
+ onClick: close
107
+ },
108
+ toDisplayString(_ctx.closeText),
109
+ 3
110
+ )) : (openBlock(), createBlock(unref(ElIcon), {
111
+ key: 1,
112
+ class: normalizeClass(unref(ns).e("close-btn")),
113
+ onClick: close
114
+ }, {
115
+ default: withCtx(() => [
116
+ createVNode(unref(Close))
117
+ ]),
118
+ _: 1
119
+ }, 8, ["class"]))
120
+ ],
121
+ 64
122
+ )) : createCommentVNode("v-if", true)
123
+ ],
124
+ 2
125
+ )
126
+ ],
127
+ 2
128
+ ), [
129
+ [vShow, visible.value]
130
+ ])
131
+ ]),
132
+ _: 3
133
+ }, 8, ["name"]);
134
+ };
135
+ }
38
136
  });
39
- const alertEmits = {
40
- close: (evt) => evt instanceof MouseEvent
41
- };
137
+ var Alert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);
42
138
 
43
- export { alertEffects, alertEmits, alertProps };
139
+ export { Alert as default };
44
140
  //# sourceMappingURL=alert.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of appearance, in millisecond, not valid in controlled mode\n */\n showAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of disappear, in millisecond, not valid in controlled mode\n */\n hideAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description disappear automatically, in millisecond, not valid in controlled mode\n */\n autoClose: Number,\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\nexport type AlertPropsPublic = ExtractPublicPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":[],"mappings":";;;;AAIa,MAAA,YAAA,GAAe,CAAC,OAAA,EAAS,MAAM,EAAA;AAErC,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAAA,IAChC,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,MAAQ,EAAA,OAAA;AAAA,EACR,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,YAAA;AAAA,IACR,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAKA,SAAW,EAAA,MAAA;AAAA,EAKX,SAAW,EAAA,MAAA;AAAA,EAKX,SAAW,EAAA,MAAA;AACb,CAAU,EAAA;AAIH,MAAM,UAAa,GAAA;AAAA,EACxB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAe,YAAA,UAAA;AAC7C;;;;"}
1
+ {"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <el-icon\n v-if=\"showIcon && ($slots.icon || iconComponent)\"\n :class=\"[ns.e('icon'), ns.is('big', hasDesc)]\"\n >\n <slot name=\"icon\">\n <component :is=\"iconComponent\" />\n </slot>\n </el-icon>\n\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), { 'with-description': hasDesc }]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"hasDesc\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n @click=\"close\"\n >\n {{ closeText }}\n </div>\n <el-icon v-else :class=\"ns.e('close-btn')\" @click=\"close\">\n <Close />\n </el-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n TypeComponents,\n TypeComponentsMap,\n debugWarn,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { alertEmits, alertProps } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElAlert',\n})\n\nconst props = defineProps(alertProps)\nconst emit = defineEmits(alertEmits)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\nconst visible = ref(true)\n\nconst iconComponent = computed(() => TypeComponentsMap[props.type])\n\nconst hasDesc = computed(() => !!(props.description || slots.default))\n\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n\nif (props.showAfter || props.hideAfter || props.autoClose) {\n debugWarn(\n 'el-alert',\n 'The `show-after`, `hide-after`, and `auto-close` attributes were removed after 2.11.8. Please use `v-if` and `v-show` to manually replace them, visit: https://github.com/element-plus/element-plus/pull/22560'\n )\n}\n</script>\n"],"names":["_createBlock","_Transition","_unref","_withDirectives","_createElementVNode","_normalizeClass","type","center","effect","showIcon","$slots","_openBlock","_renderSlot","_resolveDynamicComponent","title","_createElementBlock","_createTextVNode","description","closable","_Fragment","closeText","_createVNode"],"mappings":";;;;;;;;;;;;;;;;AAwDM,IAAA,MAAA,EAAE,OAAU,GAAA,cAAA,CAAA;AAMlB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEjB,IAAA,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAEzB,IAAA,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AAExB,IAAA,MAAM,aAAgB,GAAA,QAAA,CAAS,MAAM,iBAAA,CAAkB,MAAM,IAAK,CAAA,CAAA,CAAA;AAE5D,IAAA,MAAA,OAAA,GAAU,SAAS,MAAM,CAAC,EAAE,KAAM,CAAA,WAAA,IAAe,MAAM,OAAQ,CAAA,CAAA,CAAA;AAE/D,IAAA,MAAA,KAAA,GAAQ,CAAC,GAAoB,KAAA;AACjC,MAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AAAA,KACnB,CAAA;AAEA,IAAA,IAAI,KAAM,CAAA,SAAA,IAAa,KAAM,CAAA,SAAA,I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,KAAA;AAAA,wBAAA;AAAA,0BAAA,GAAA,EAAA,CAAA;AAAA,0BAJH,KAAK,EAAAV,cAAA,CAAG,CAAAH,KAAA,CAAA,EAAA,CAAG,CAAA,CAAA,CAAC,WAAA,CAAA,EAAeA,UAAG,EAAE,CAAA,UAAA,CAAA,CAAA,CAAA;AAAA,0BAChC,OAAO,EAAA,KAAA;AAAA,yBAAA;AAAA,wCAELkB,KAAS,SAAA,CAAA;AAAA,wBAAA,CAAA;AAAA,4BAAAT,SAAA,EAAA,EAEdX,WAEU,CAAAE,KAAA,CAAA,MAAA,CAAA,EAAA;AAAA,wBAAA,GAAA,EAAA,CAAA;AAAA,wBAFO,OAAKG,cAAE,CAAAH,KAAA,IAAG,CAAA,CAAA,CAAC,WAAA,CAAA,CAAA;AAAA,wBAAgB,OAAO,EAAA,KAAA;AAAA,uBAAA,EAAA;AAAA,yCACjD,MAAS;AAAA,0BAATmB,WAAA,CAASnB,KAAA,CAAA,KAAA,CAAA,CAAA;AAAA,yBAAA,CAAA;AAAA;;;;;;;;;;;kBAlCP,EAAA,OAAA,CAAO,KAAA,CAAA;AAAA,WAAA,CAAA;AAAA;;;;;;;;;;"}
@@ -1,140 +1,44 @@
1
- import { defineComponent, useSlots, ref, computed, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, renderSlot, resolveDynamicComponent, createCommentVNode, createElementBlock, createTextVNode, toDisplayString, Fragment, createVNode, vShow } from 'vue';
2
- import { ElIcon } from '../../icon/index.mjs';
3
- import { alertProps, alertEmits } from './alert.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { TypeComponentsMap, TypeComponents } from '../../../utils/vue/icon.mjs';
6
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
- import { debugWarn } from '../../../utils/error.mjs';
1
+ import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
2
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
3
+ import { keysOf } from '../../../utils/objects.mjs';
8
4
 
9
- const _sfc_main = defineComponent({
10
- ...{
11
- name: "ElAlert"
5
+ const alertEffects = ["light", "dark"];
6
+ const alertProps = buildProps({
7
+ title: {
8
+ type: String,
9
+ default: ""
12
10
  },
13
- __name: "alert",
14
- props: alertProps,
15
- emits: alertEmits,
16
- setup(__props, { emit: __emit }) {
17
- const { Close } = TypeComponents;
18
- const props = __props;
19
- const emit = __emit;
20
- const slots = useSlots();
21
- const ns = useNamespace("alert");
22
- const visible = ref(true);
23
- const iconComponent = computed(() => TypeComponentsMap[props.type]);
24
- const hasDesc = computed(() => !!(props.description || slots.default));
25
- const close = (evt) => {
26
- visible.value = false;
27
- emit("close", evt);
28
- };
29
- if (props.showAfter || props.hideAfter || props.autoClose) {
30
- debugWarn(
31
- "el-alert",
32
- "The `show-after`, `hide-after`, and `auto-close` attributes were removed after 2.11.8. Please use `v-if` and `v-show` to manually replace them, visit: https://github.com/element-plus/element-plus/pull/22560"
33
- );
34
- }
35
- return (_ctx, _cache) => {
36
- return openBlock(), createBlock(Transition, {
37
- name: unref(ns).b("fade"),
38
- persisted: ""
39
- }, {
40
- default: withCtx(() => [
41
- withDirectives(createElementVNode(
42
- "div",
43
- {
44
- class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
45
- role: "alert"
46
- },
47
- [
48
- _ctx.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), {
49
- key: 0,
50
- class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)])
51
- }, {
52
- default: withCtx(() => [
53
- renderSlot(_ctx.$slots, "icon", {}, () => [
54
- (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))
55
- ])
56
- ]),
57
- _: 3
58
- }, 8, ["class"])) : createCommentVNode("v-if", true),
59
- createElementVNode(
60
- "div",
61
- {
62
- class: normalizeClass(unref(ns).e("content"))
63
- },
64
- [
65
- _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock(
66
- "span",
67
- {
68
- key: 0,
69
- class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }])
70
- },
71
- [
72
- renderSlot(_ctx.$slots, "title", {}, () => [
73
- createTextVNode(
74
- toDisplayString(_ctx.title),
75
- 1
76
- )
77
- ])
78
- ],
79
- 2
80
- )) : createCommentVNode("v-if", true),
81
- hasDesc.value ? (openBlock(), createElementBlock(
82
- "p",
83
- {
84
- key: 1,
85
- class: normalizeClass(unref(ns).e("description"))
86
- },
87
- [
88
- renderSlot(_ctx.$slots, "default", {}, () => [
89
- createTextVNode(
90
- toDisplayString(_ctx.description),
91
- 1
92
- )
93
- ])
94
- ],
95
- 2
96
- )) : createCommentVNode("v-if", true),
97
- _ctx.closable ? (openBlock(), createElementBlock(
98
- Fragment,
99
- { key: 2 },
100
- [
101
- _ctx.closeText ? (openBlock(), createElementBlock(
102
- "div",
103
- {
104
- key: 0,
105
- class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
106
- onClick: close
107
- },
108
- toDisplayString(_ctx.closeText),
109
- 3
110
- )) : (openBlock(), createBlock(unref(ElIcon), {
111
- key: 1,
112
- class: normalizeClass(unref(ns).e("close-btn")),
113
- onClick: close
114
- }, {
115
- default: withCtx(() => [
116
- createVNode(unref(Close))
117
- ]),
118
- _: 1
119
- }, 8, ["class"]))
120
- ],
121
- 64
122
- )) : createCommentVNode("v-if", true)
123
- ],
124
- 2
125
- )
126
- ],
127
- 2
128
- ), [
129
- [vShow, visible.value]
130
- ])
131
- ]),
132
- _: 3
133
- }, 8, ["name"]);
134
- };
135
- }
11
+ description: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ type: {
16
+ type: String,
17
+ values: keysOf(TypeComponentsMap),
18
+ default: "info"
19
+ },
20
+ closable: {
21
+ type: Boolean,
22
+ default: true
23
+ },
24
+ closeText: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ showIcon: Boolean,
29
+ center: Boolean,
30
+ effect: {
31
+ type: String,
32
+ values: alertEffects,
33
+ default: "light"
34
+ },
35
+ showAfter: Number,
36
+ hideAfter: Number,
37
+ autoClose: Number
136
38
  });
137
- var Alert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);
39
+ const alertEmits = {
40
+ close: (evt) => evt instanceof MouseEvent
41
+ };
138
42
 
139
- export { Alert as default };
43
+ export { alertEffects, alertEmits, alertProps };
140
44
  //# sourceMappingURL=alert2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert2.mjs","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <el-icon\n v-if=\"showIcon && ($slots.icon || iconComponent)\"\n :class=\"[ns.e('icon'), ns.is('big', hasDesc)]\"\n >\n <slot name=\"icon\">\n <component :is=\"iconComponent\" />\n </slot>\n </el-icon>\n\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), { 'with-description': hasDesc }]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"hasDesc\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n @click=\"close\"\n >\n {{ closeText }}\n </div>\n <el-icon v-else :class=\"ns.e('close-btn')\" @click=\"close\">\n <Close />\n </el-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n TypeComponents,\n TypeComponentsMap,\n debugWarn,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { alertEmits, alertProps } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElAlert',\n})\n\nconst props = defineProps(alertProps)\nconst emit = defineEmits(alertEmits)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\nconst visible = ref(true)\n\nconst iconComponent = computed(() => TypeComponentsMap[props.type])\n\nconst hasDesc = computed(() => !!(props.description || slots.default))\n\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n\nif (props.showAfter || props.hideAfter || props.autoClose) {\n debugWarn(\n 'el-alert',\n 'The `show-after`, `hide-after`, and `auto-close` attributes were removed after 2.11.8. Please use `v-if` and `v-show` to manually replace them, visit: https://github.com/element-plus/element-plus/pull/22560'\n )\n}\n</script>\n"],"names":["_createBlock","_Transition","_unref","_withDirectives","_createElementVNode","_normalizeClass","type","center","effect","showIcon","$slots","_openBlock","_renderSlot","_resolveDynamicComponent","title","_createElementBlock","_createTextVNode","description","closable","_Fragment","closeText","_createVNode"],"mappings":";;;;;;;;;;;;;;;;AAwDM,IAAA,MAAA,EAAE,OAAU,GAAA,cAAA,CAAA;AAMlB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEjB,IAAA,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAEzB,IAAA,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AAExB,IAAA,MAAM,aAAgB,GAAA,QAAA,CAAS,MAAM,iBAAA,CAAkB,MAAM,IAAK,CAAA,CAAA,CAAA;AAE5D,IAAA,MAAA,OAAA,GAAU,SAAS,MAAM,CAAC,EAAE,KAAM,CAAA,WAAA,IAAe,MAAM,OAAQ,CAAA,CAAA,CAAA;AAE/D,IAAA,MAAA,KAAA,GAAQ,CAAC,GAAoB,KAAA;AACjC,MAAA,OAAA,CAAQ,KAAQ,GAAA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BAWWI,QAAA;AAAA,oBAAA,EAAA,KAAA,CAAA,EAAA;AAAA,oBAAA;AAAA,sBATDC,IAAAA,CADR,SAAA,IAAAT,SAAA,EAAA,EAAAI,kBAAA;AAAA,wBAMM,KAAA;AAAA,wBAAA;AAAA,0BAAA,GAAA,EAAA,CAAA;AAAA,0BAJH,KAAK,EAAAV,cAAA,CAAG,CAAAH,KAAA,CAAA,EAAA,CAAG,CAAA,CAAA,CAAC,WAAA,CAAA,EAAeA,UAAG,EAAE,CAAA,UAAA,CAAA,CAAA,CAAA;AAAA,0BAChC,OAAO,EAAA,KAAA;AAAA,yBAAA;AAAA,wCAELkB,KAAS,SAAA,CAAA;AAAA,wBAAA,CAAA;AAAA,4BAAAT,SAAA,EAAA,EAEdX,WAEU,CAAAE,KAAA,CAAA,MAAA,CAAA,EAAA;AAAA,wBAAA,GAAA,EAAA,CAAA;AAAA,wBAFO,OAAKG,cAAE,CAAAH,KAAA,IAAG,CAAA,CAAA,CAAC,WAAA,CAAA,CAAA;AAAA,wBAAgB,OAAO,EAAA,KAAA;AAAA,uBAAA,EAAA;AAAA,yCACjD,MAAS;AAAA,0BAATmB,WAAA,CAASnB,KAAA,CAAA,KAAA,CAAA,CAAA;AAAA,yBAAA,CAAA;AAAA;;;;;;;;;;;kBAlCP,EAAA,OAAA,CAAO,KAAA,CAAA;AAAA,WAAA,CAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"alert2.mjs","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of appearance, in millisecond, not valid in controlled mode\n */\n showAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of disappear, in millisecond, not valid in controlled mode\n */\n hideAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description disappear automatically, in millisecond, not valid in controlled mode\n */\n autoClose: Number,\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\nexport type AlertPropsPublic = ExtractPublicPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":[],"mappings":";;;;AAIa,MAAA,YAAA,GAAe,CAAC,OAAA,EAAS,MAAM,EAAA;AAErC,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAAA,IAChC,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,MAAQ,EAAA,OAAA;AAAA,EACR,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,YAAA;AAAA,IACR,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAKA,SAAW,EAAA,MAAA;AAAA,EAKX,SAAW,EAAA,MAAA;AAAA,EAKX,SAAW,EAAA,MAAA;AACb,CAAU,EAAA;AAIH,MAAM,UAAa,GAAA;AAAA,EACxB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAe,YAAA,UAAA;AAC7C;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { inputProps } from '../../input/src/input.mjs';
2
- import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
2
+ import { useTooltipContentProps } from '../../tooltip/src/content2.mjs';
3
3
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
4
  import { NOOP, isString, isObject } from '@vue/shared';
5
5
  import { UPDATE_MODEL_EVENT, INPUT_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
@@ -1,5 +1,5 @@
1
- import Badge from './src/badge.mjs';
2
- export { badgeProps } from './src/badge2.mjs';
1
+ import Badge from './src/badge2.mjs';
2
+ export { badgeProps } from './src/badge.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElBadge = withInstall(Badge);
@@ -1,89 +1,37 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, createTextVNode, toDisplayString, vShow } from 'vue';
2
- import { badgeProps } from './badge2.mjs';
3
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
5
- import { isNumber } from '../../../utils/types.mjs';
6
- import { addUnit } from '../../../utils/dom/style.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
7
2
 
8
- const _sfc_main = defineComponent({
9
- ...{
10
- name: "ElBadge"
3
+ const badgeProps = buildProps({
4
+ value: {
5
+ type: [String, Number],
6
+ default: ""
11
7
  },
12
- __name: "badge",
13
- props: badgeProps,
14
- setup(__props, { expose: __expose }) {
15
- const props = __props;
16
- const ns = useNamespace("badge");
17
- const content = computed(() => {
18
- if (props.isDot)
19
- return "";
20
- if (isNumber(props.value) && isNumber(props.max)) {
21
- return props.max < props.value ? `${props.max}+` : `${props.value}`;
22
- }
23
- return `${props.value}`;
24
- });
25
- const style = computed(() => {
26
- var _a;
27
- return [
28
- {
29
- backgroundColor: props.color,
30
- marginRight: addUnit(-props.offset[0]),
31
- marginTop: addUnit(props.offset[1])
32
- },
33
- (_a = props.badgeStyle) != null ? _a : {}
34
- ];
35
- });
36
- __expose({
37
- content
38
- });
39
- return (_ctx, _cache) => {
40
- return openBlock(), createElementBlock(
41
- "div",
42
- {
43
- class: normalizeClass(unref(ns).b())
44
- },
45
- [
46
- renderSlot(_ctx.$slots, "default"),
47
- createVNode(Transition, {
48
- name: `${unref(ns).namespace.value}-zoom-in-center`,
49
- persisted: ""
50
- }, {
51
- default: withCtx(() => [
52
- withDirectives(createElementVNode(
53
- "sup",
54
- {
55
- class: normalizeClass([
56
- unref(ns).e("content"),
57
- unref(ns).em("content", _ctx.type),
58
- unref(ns).is("fixed", !!_ctx.$slots.default),
59
- unref(ns).is("dot", _ctx.isDot),
60
- unref(ns).is("hide-zero", !_ctx.showZero && _ctx.value === 0),
61
- _ctx.badgeClass
62
- ]),
63
- style: normalizeStyle(style.value)
64
- },
65
- [
66
- renderSlot(_ctx.$slots, "content", { value: content.value }, () => [
67
- createTextVNode(
68
- toDisplayString(content.value),
69
- 1
70
- )
71
- ])
72
- ],
73
- 6
74
- ), [
75
- [vShow, !_ctx.hidden && (content.value || _ctx.isDot || _ctx.$slots.content)]
76
- ])
77
- ]),
78
- _: 3
79
- }, 8, ["name"])
80
- ],
81
- 2
82
- );
83
- };
8
+ max: {
9
+ type: Number,
10
+ default: 99
11
+ },
12
+ isDot: Boolean,
13
+ hidden: Boolean,
14
+ type: {
15
+ type: String,
16
+ values: ["primary", "success", "warning", "info", "danger"],
17
+ default: "danger"
18
+ },
19
+ showZero: {
20
+ type: Boolean,
21
+ default: true
22
+ },
23
+ color: String,
24
+ badgeStyle: {
25
+ type: definePropType([String, Object, Array])
26
+ },
27
+ offset: {
28
+ type: definePropType(Array),
29
+ default: [0, 0]
30
+ },
31
+ badgeClass: {
32
+ type: String
84
33
  }
85
34
  });
86
- var Badge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
87
35
 
88
- export { Badge as default };
36
+ export { badgeProps };
89
37
  //# sourceMappingURL=badge.mjs.map