@element-plus/nightly 0.0.20241118 → 0.0.20241120

Sign up to get free protection for your applications and to get access to all the features.
Files changed (402) hide show
  1. package/README.md +0 -5
  2. package/attributes.json +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.full.js +156 -128
  5. package/dist/index.full.min.js +13 -13
  6. package/dist/index.full.min.js.map +1 -1
  7. package/dist/index.full.min.mjs +12 -12
  8. package/dist/index.full.min.mjs.map +1 -1
  9. package/dist/index.full.mjs +156 -128
  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/hr.js +1 -1
  95. package/dist/locale/hr.min.js +1 -1
  96. package/dist/locale/hr.min.mjs +1 -1
  97. package/dist/locale/hr.mjs +1 -1
  98. package/dist/locale/hu.js +1 -1
  99. package/dist/locale/hu.min.js +1 -1
  100. package/dist/locale/hu.min.mjs +1 -1
  101. package/dist/locale/hu.mjs +1 -1
  102. package/dist/locale/hy-am.js +1 -1
  103. package/dist/locale/hy-am.min.js +1 -1
  104. package/dist/locale/hy-am.min.mjs +1 -1
  105. package/dist/locale/hy-am.mjs +1 -1
  106. package/dist/locale/id.js +1 -1
  107. package/dist/locale/id.min.js +1 -1
  108. package/dist/locale/id.min.mjs +1 -1
  109. package/dist/locale/id.mjs +1 -1
  110. package/dist/locale/it.js +1 -1
  111. package/dist/locale/it.min.js +1 -1
  112. package/dist/locale/it.min.mjs +1 -1
  113. package/dist/locale/it.mjs +1 -1
  114. package/dist/locale/ja.js +1 -1
  115. package/dist/locale/ja.min.js +1 -1
  116. package/dist/locale/ja.min.mjs +1 -1
  117. package/dist/locale/ja.mjs +1 -1
  118. package/dist/locale/kk.js +1 -1
  119. package/dist/locale/kk.min.js +1 -1
  120. package/dist/locale/kk.min.mjs +1 -1
  121. package/dist/locale/kk.mjs +1 -1
  122. package/dist/locale/km.js +1 -1
  123. package/dist/locale/km.min.js +1 -1
  124. package/dist/locale/km.min.mjs +1 -1
  125. package/dist/locale/km.mjs +1 -1
  126. package/dist/locale/ko.js +1 -1
  127. package/dist/locale/ko.min.js +1 -1
  128. package/dist/locale/ko.min.mjs +1 -1
  129. package/dist/locale/ko.mjs +1 -1
  130. package/dist/locale/ku.js +1 -1
  131. package/dist/locale/ku.min.js +1 -1
  132. package/dist/locale/ku.min.mjs +1 -1
  133. package/dist/locale/ku.mjs +1 -1
  134. package/dist/locale/ky.js +1 -1
  135. package/dist/locale/ky.min.js +1 -1
  136. package/dist/locale/ky.min.mjs +1 -1
  137. package/dist/locale/ky.mjs +1 -1
  138. package/dist/locale/lt.js +1 -1
  139. package/dist/locale/lt.min.js +1 -1
  140. package/dist/locale/lt.min.mjs +1 -1
  141. package/dist/locale/lt.mjs +1 -1
  142. package/dist/locale/lv.js +1 -1
  143. package/dist/locale/lv.min.js +1 -1
  144. package/dist/locale/lv.min.mjs +1 -1
  145. package/dist/locale/lv.mjs +1 -1
  146. package/dist/locale/mg.js +1 -1
  147. package/dist/locale/mg.min.js +1 -1
  148. package/dist/locale/mg.min.mjs +1 -1
  149. package/dist/locale/mg.mjs +1 -1
  150. package/dist/locale/mn.js +1 -1
  151. package/dist/locale/mn.min.js +1 -1
  152. package/dist/locale/mn.min.mjs +1 -1
  153. package/dist/locale/mn.mjs +1 -1
  154. package/dist/locale/ms.js +191 -0
  155. package/dist/locale/ms.min.js +2 -0
  156. package/dist/locale/ms.min.js.map +1 -0
  157. package/dist/locale/ms.min.mjs +2 -0
  158. package/dist/locale/ms.min.mjs.map +1 -0
  159. package/dist/locale/ms.mjs +183 -0
  160. package/dist/locale/my.js +1 -1
  161. package/dist/locale/my.min.js +1 -1
  162. package/dist/locale/my.min.mjs +1 -1
  163. package/dist/locale/my.mjs +1 -1
  164. package/dist/locale/nb-no.js +1 -1
  165. package/dist/locale/nb-no.min.js +1 -1
  166. package/dist/locale/nb-no.min.mjs +1 -1
  167. package/dist/locale/nb-no.mjs +1 -1
  168. package/dist/locale/nl.js +1 -1
  169. package/dist/locale/nl.min.js +1 -1
  170. package/dist/locale/nl.min.mjs +1 -1
  171. package/dist/locale/nl.mjs +1 -1
  172. package/dist/locale/pa.js +1 -1
  173. package/dist/locale/pa.min.js +1 -1
  174. package/dist/locale/pa.min.mjs +1 -1
  175. package/dist/locale/pa.mjs +1 -1
  176. package/dist/locale/pl.js +1 -1
  177. package/dist/locale/pl.min.js +1 -1
  178. package/dist/locale/pl.min.mjs +1 -1
  179. package/dist/locale/pl.mjs +1 -1
  180. package/dist/locale/pt-br.js +1 -1
  181. package/dist/locale/pt-br.min.js +1 -1
  182. package/dist/locale/pt-br.min.mjs +1 -1
  183. package/dist/locale/pt-br.mjs +1 -1
  184. package/dist/locale/pt.js +1 -1
  185. package/dist/locale/pt.min.js +1 -1
  186. package/dist/locale/pt.min.mjs +1 -1
  187. package/dist/locale/pt.mjs +1 -1
  188. package/dist/locale/ro.js +1 -1
  189. package/dist/locale/ro.min.js +1 -1
  190. package/dist/locale/ro.min.mjs +1 -1
  191. package/dist/locale/ro.mjs +1 -1
  192. package/dist/locale/ru.js +1 -1
  193. package/dist/locale/ru.min.js +1 -1
  194. package/dist/locale/ru.min.mjs +1 -1
  195. package/dist/locale/ru.mjs +1 -1
  196. package/dist/locale/sk.js +1 -1
  197. package/dist/locale/sk.min.js +1 -1
  198. package/dist/locale/sk.min.mjs +1 -1
  199. package/dist/locale/sk.mjs +1 -1
  200. package/dist/locale/sl.js +1 -1
  201. package/dist/locale/sl.min.js +1 -1
  202. package/dist/locale/sl.min.mjs +1 -1
  203. package/dist/locale/sl.mjs +1 -1
  204. package/dist/locale/sr.js +1 -1
  205. package/dist/locale/sr.min.js +1 -1
  206. package/dist/locale/sr.min.mjs +1 -1
  207. package/dist/locale/sr.mjs +1 -1
  208. package/dist/locale/sv.js +1 -1
  209. package/dist/locale/sv.min.js +1 -1
  210. package/dist/locale/sv.min.mjs +1 -1
  211. package/dist/locale/sv.mjs +1 -1
  212. package/dist/locale/sw.js +1 -1
  213. package/dist/locale/sw.min.js +1 -1
  214. package/dist/locale/sw.min.mjs +1 -1
  215. package/dist/locale/sw.mjs +1 -1
  216. package/dist/locale/ta.js +1 -1
  217. package/dist/locale/ta.min.js +1 -1
  218. package/dist/locale/ta.min.mjs +1 -1
  219. package/dist/locale/ta.mjs +1 -1
  220. package/dist/locale/th.js +1 -1
  221. package/dist/locale/th.min.js +1 -1
  222. package/dist/locale/th.min.mjs +1 -1
  223. package/dist/locale/th.mjs +1 -1
  224. package/dist/locale/tk.js +1 -1
  225. package/dist/locale/tk.min.js +1 -1
  226. package/dist/locale/tk.min.mjs +1 -1
  227. package/dist/locale/tk.mjs +1 -1
  228. package/dist/locale/tr.js +1 -1
  229. package/dist/locale/tr.min.js +1 -1
  230. package/dist/locale/tr.min.mjs +1 -1
  231. package/dist/locale/tr.mjs +1 -1
  232. package/dist/locale/ug-cn.js +1 -1
  233. package/dist/locale/ug-cn.min.js +1 -1
  234. package/dist/locale/ug-cn.min.mjs +1 -1
  235. package/dist/locale/ug-cn.mjs +1 -1
  236. package/dist/locale/uk.js +1 -1
  237. package/dist/locale/uk.min.js +1 -1
  238. package/dist/locale/uk.min.mjs +1 -1
  239. package/dist/locale/uk.mjs +1 -1
  240. package/dist/locale/uz-uz.js +1 -1
  241. package/dist/locale/uz-uz.min.js +1 -1
  242. package/dist/locale/uz-uz.min.mjs +1 -1
  243. package/dist/locale/uz-uz.mjs +1 -1
  244. package/dist/locale/vi.js +1 -1
  245. package/dist/locale/vi.min.js +1 -1
  246. package/dist/locale/vi.min.mjs +1 -1
  247. package/dist/locale/vi.mjs +1 -1
  248. package/dist/locale/zh-cn.js +1 -1
  249. package/dist/locale/zh-cn.min.js +1 -1
  250. package/dist/locale/zh-cn.min.mjs +1 -1
  251. package/dist/locale/zh-cn.mjs +1 -1
  252. package/dist/locale/zh-tw.js +1 -1
  253. package/dist/locale/zh-tw.min.js +1 -1
  254. package/dist/locale/zh-tw.min.mjs +1 -1
  255. package/dist/locale/zh-tw.mjs +1 -1
  256. package/es/components/anchor/index.mjs +2 -2
  257. package/es/components/anchor/src/anchor.mjs +193 -38
  258. package/es/components/anchor/src/anchor.mjs.map +1 -1
  259. package/es/components/anchor/src/anchor2.mjs +38 -193
  260. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  261. package/es/components/badge/index.mjs +2 -2
  262. package/es/components/badge/src/badge.mjs +69 -32
  263. package/es/components/badge/src/badge.mjs.map +1 -1
  264. package/es/components/badge/src/badge2.mjs +32 -69
  265. package/es/components/badge/src/badge2.mjs.map +1 -1
  266. package/es/components/dialog/src/dialog-content.mjs +26 -89
  267. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  268. package/es/components/dialog/src/dialog-content2.mjs +89 -26
  269. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  270. package/es/components/dialog/src/dialog.mjs +1 -1
  271. package/es/components/dialog/src/dialog2.mjs +1 -1
  272. package/es/components/image-viewer/src/image-viewer2.mjs +141 -118
  273. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  274. package/es/components/index.mjs +8 -8
  275. package/es/components/mention/src/mention-dropdown.mjs +167 -15
  276. package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
  277. package/es/components/mention/src/mention-dropdown2.mjs +15 -167
  278. package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
  279. package/es/components/mention/src/mention2.mjs +1 -1
  280. package/es/components/menu/index.mjs +2 -2
  281. package/es/components/menu/src/menu-item-group.mjs +35 -4
  282. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  283. package/es/components/menu/src/menu-item-group2.mjs +4 -35
  284. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  285. package/es/components/notification/src/notification.d.ts +4 -4
  286. package/es/components/notification/src/notification.mjs +5 -1
  287. package/es/components/notification/src/notification.mjs.map +1 -1
  288. package/es/components/notification/src/notification.vue.d.ts +12 -12
  289. package/es/components/notification/src/notify.mjs +2 -4
  290. package/es/components/notification/src/notify.mjs.map +1 -1
  291. package/es/components/popconfirm/index.mjs +2 -2
  292. package/es/components/popconfirm/src/popconfirm.mjs +115 -47
  293. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  294. package/es/components/popconfirm/src/popconfirm2.mjs +47 -115
  295. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  296. package/es/components/popper/index.mjs +2 -2
  297. package/es/components/popper/src/content.mjs +137 -93
  298. package/es/components/popper/src/content.mjs.map +1 -1
  299. package/es/components/popper/src/content2.mjs +93 -137
  300. package/es/components/popper/src/content2.mjs.map +1 -1
  301. package/es/components/row/index.mjs +2 -2
  302. package/es/components/row/src/row.mjs +29 -45
  303. package/es/components/row/src/row.mjs.map +1 -1
  304. package/es/components/row/src/row2.mjs +45 -29
  305. package/es/components/row/src/row2.mjs.map +1 -1
  306. package/es/components/statistic/index.mjs +2 -2
  307. package/es/components/statistic/src/statistic.mjs +70 -25
  308. package/es/components/statistic/src/statistic.mjs.map +1 -1
  309. package/es/components/statistic/src/statistic2.mjs +25 -70
  310. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  311. package/es/components/table/src/table.mjs +5 -3
  312. package/es/components/table/src/table.mjs.map +1 -1
  313. package/es/components/table/src/table.vue.d.ts +2 -1
  314. package/es/components/tag/src/tag2.mjs +4 -1
  315. package/es/components/tag/src/tag2.mjs.map +1 -1
  316. package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
  317. package/es/components/tooltip/src/content.mjs +1 -1
  318. package/es/components/tooltip/src/content2.mjs +1 -1
  319. package/es/index.mjs +8 -8
  320. package/es/locale/lang/ms.d.ts +180 -0
  321. package/es/locale/lang/ms.mjs +182 -0
  322. package/es/locale/lang/ms.mjs.map +1 -0
  323. package/es/version.d.ts +1 -1
  324. package/es/version.mjs +1 -1
  325. package/es/version.mjs.map +1 -1
  326. package/global.d.ts +2 -0
  327. package/lib/components/anchor/index.js +2 -2
  328. package/lib/components/anchor/src/anchor.js +192 -38
  329. package/lib/components/anchor/src/anchor.js.map +1 -1
  330. package/lib/components/anchor/src/anchor2.js +38 -192
  331. package/lib/components/anchor/src/anchor2.js.map +1 -1
  332. package/lib/components/badge/index.js +2 -2
  333. package/lib/components/badge/src/badge.js +69 -32
  334. package/lib/components/badge/src/badge.js.map +1 -1
  335. package/lib/components/badge/src/badge2.js +32 -69
  336. package/lib/components/badge/src/badge2.js.map +1 -1
  337. package/lib/components/dialog/src/dialog-content.js +26 -88
  338. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  339. package/lib/components/dialog/src/dialog-content2.js +88 -26
  340. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  341. package/lib/components/dialog/src/dialog.js +1 -1
  342. package/lib/components/dialog/src/dialog2.js +1 -1
  343. package/lib/components/image-viewer/src/image-viewer2.js +141 -118
  344. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  345. package/lib/components/index.js +8 -8
  346. package/lib/components/mention/src/mention-dropdown.js +167 -16
  347. package/lib/components/mention/src/mention-dropdown.js.map +1 -1
  348. package/lib/components/mention/src/mention-dropdown2.js +16 -167
  349. package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
  350. package/lib/components/mention/src/mention2.js +1 -1
  351. package/lib/components/menu/index.js +2 -2
  352. package/lib/components/menu/src/menu-item-group.js +35 -4
  353. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  354. package/lib/components/menu/src/menu-item-group2.js +4 -35
  355. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  356. package/lib/components/notification/src/notification.d.ts +4 -4
  357. package/lib/components/notification/src/notification.js +5 -1
  358. package/lib/components/notification/src/notification.js.map +1 -1
  359. package/lib/components/notification/src/notification.vue.d.ts +12 -12
  360. package/lib/components/notification/src/notify.js +1 -3
  361. package/lib/components/notification/src/notify.js.map +1 -1
  362. package/lib/components/popconfirm/index.js +2 -2
  363. package/lib/components/popconfirm/src/popconfirm.js +115 -48
  364. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  365. package/lib/components/popconfirm/src/popconfirm2.js +48 -115
  366. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  367. package/lib/components/popper/index.js +2 -2
  368. package/lib/components/popper/src/content.js +137 -98
  369. package/lib/components/popper/src/content.js.map +1 -1
  370. package/lib/components/popper/src/content2.js +98 -137
  371. package/lib/components/popper/src/content2.js.map +1 -1
  372. package/lib/components/row/index.js +2 -2
  373. package/lib/components/row/src/row.js +31 -45
  374. package/lib/components/row/src/row.js.map +1 -1
  375. package/lib/components/row/src/row2.js +45 -31
  376. package/lib/components/row/src/row2.js.map +1 -1
  377. package/lib/components/statistic/index.js +2 -2
  378. package/lib/components/statistic/src/statistic.js +70 -25
  379. package/lib/components/statistic/src/statistic.js.map +1 -1
  380. package/lib/components/statistic/src/statistic2.js +25 -70
  381. package/lib/components/statistic/src/statistic2.js.map +1 -1
  382. package/lib/components/table/src/table.js +5 -3
  383. package/lib/components/table/src/table.js.map +1 -1
  384. package/lib/components/table/src/table.vue.d.ts +2 -1
  385. package/lib/components/tag/src/tag2.js +4 -1
  386. package/lib/components/tag/src/tag2.js.map +1 -1
  387. package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
  388. package/lib/components/tooltip/src/content.js +1 -1
  389. package/lib/components/tooltip/src/content2.js +1 -1
  390. package/lib/index.js +8 -8
  391. package/lib/locale/lang/ms.d.ts +180 -0
  392. package/lib/locale/lang/ms.js +186 -0
  393. package/lib/locale/lang/ms.js.map +1 -0
  394. package/lib/version.d.ts +1 -1
  395. package/lib/version.js +1 -1
  396. package/lib/version.js.map +1 -1
  397. package/package.json +2 -2
  398. package/tags.json +1 -1
  399. package/theme-chalk/el-image-viewer.css +1 -1
  400. package/theme-chalk/index.css +1 -1
  401. package/theme-chalk/src/image-viewer.scss +4 -0
  402. package/web-types.json +1 -1
@@ -1,143 +1,99 @@
1
- import { defineComponent, inject, ref, provide, onMounted, watch, unref, onBeforeUnmount, openBlock, createElementBlock, mergeProps, createVNode, withCtx, renderSlot } from 'vue';
2
- import { isNil } from 'lodash-unified';
1
+ import { placements } from '@popperjs/core';
3
2
  import '../../../utils/index.mjs';
4
- import '../../focus-trap/index.mjs';
5
- import '../../form/index.mjs';
6
- import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
7
- import { popperContentProps, popperContentEmits } from './content.mjs';
8
- import './composables/index.mjs';
9
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
10
- import { usePopperContentFocusTrap } from './composables/use-focus-trap.mjs';
11
- import { usePopperContent } from './composables/use-content.mjs';
12
- import { usePopperContentDOM } from './composables/use-content-dom.mjs';
13
- import { formItemContextKey } from '../../form/src/constants.mjs';
14
- import { NOOP } from '@vue/shared';
15
- import { isElement } from '../../../utils/types.mjs';
16
- import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
+ import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
17
6
 
18
- const __default__ = defineComponent({
19
- name: "ElPopperContent"
20
- });
21
- const _sfc_main = /* @__PURE__ */ defineComponent({
22
- ...__default__,
23
- props: popperContentProps,
24
- emits: popperContentEmits,
25
- setup(__props, { expose, emit }) {
26
- const props = __props;
27
- const {
28
- focusStartRef,
29
- trapped,
30
- onFocusAfterReleased,
31
- onFocusAfterTrapped,
32
- onFocusInTrap,
33
- onFocusoutPrevented,
34
- onReleaseRequested
35
- } = usePopperContentFocusTrap(props, emit);
36
- const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
37
- const {
38
- ariaModal,
39
- arrowStyle,
40
- contentAttrs,
41
- contentClass,
42
- contentStyle,
43
- updateZIndex
44
- } = usePopperContentDOM(props, {
45
- styles,
46
- attributes,
47
- role
48
- });
49
- const formItemContext = inject(formItemContextKey, void 0);
50
- const arrowOffset = ref();
51
- provide(POPPER_CONTENT_INJECTION_KEY, {
52
- arrowStyle,
53
- arrowRef,
54
- arrowOffset
55
- });
56
- if (formItemContext) {
57
- provide(formItemContextKey, {
58
- ...formItemContext,
59
- addInputId: NOOP,
60
- removeInputId: NOOP
61
- });
62
- }
63
- let triggerTargetAriaStopWatch = void 0;
64
- const updatePopper = (shouldUpdateZIndex = true) => {
65
- update();
66
- shouldUpdateZIndex && updateZIndex();
67
- };
68
- const togglePopperAlive = () => {
69
- updatePopper(false);
70
- if (props.visible && props.focusOnShow) {
71
- trapped.value = true;
72
- } else if (props.visible === false) {
73
- trapped.value = false;
74
- }
75
- };
76
- onMounted(() => {
77
- watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
78
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
79
- triggerTargetAriaStopWatch = void 0;
80
- const el = unref(triggerTargetEl || contentRef.value);
81
- const prevEl = unref(prevTriggerTargetEl || contentRef.value);
82
- if (isElement(el)) {
83
- triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
84
- ;
85
- ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
86
- isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
87
- });
88
- }, { immediate: true });
89
- }
90
- if (prevEl !== el && isElement(prevEl)) {
91
- ;
92
- ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
93
- prevEl.removeAttribute(key);
94
- });
95
- }
96
- }, { immediate: true });
97
- watch(() => props.visible, togglePopperAlive, { immediate: true });
98
- });
99
- onBeforeUnmount(() => {
100
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
101
- triggerTargetAriaStopWatch = void 0;
102
- });
103
- expose({
104
- popperContentRef: contentRef,
105
- popperInstanceRef: instanceRef,
106
- updatePopper,
107
- contentStyle
108
- });
109
- return (_ctx, _cache) => {
110
- return openBlock(), createElementBlock("div", mergeProps({
111
- ref_key: "contentRef",
112
- ref: contentRef
113
- }, unref(contentAttrs), {
114
- style: unref(contentStyle),
115
- class: unref(contentClass),
116
- tabindex: "-1",
117
- onMouseenter: (e) => _ctx.$emit("mouseenter", e),
118
- onMouseleave: (e) => _ctx.$emit("mouseleave", e)
119
- }), [
120
- createVNode(unref(ElFocusTrap), {
121
- trapped: unref(trapped),
122
- "trap-on-focus-in": true,
123
- "focus-trap-el": unref(contentRef),
124
- "focus-start-el": unref(focusStartRef),
125
- onFocusAfterTrapped: unref(onFocusAfterTrapped),
126
- onFocusAfterReleased: unref(onFocusAfterReleased),
127
- onFocusin: unref(onFocusInTrap),
128
- onFocusoutPrevented: unref(onFocusoutPrevented),
129
- onReleaseRequested: unref(onReleaseRequested)
130
- }, {
131
- default: withCtx(() => [
132
- renderSlot(_ctx.$slots, "default")
133
- ]),
134
- _: 3
135
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
136
- ], 16, ["onMouseenter", "onMouseleave"]);
137
- };
7
+ const POSITIONING_STRATEGIES = ["fixed", "absolute"];
8
+ const popperCoreConfigProps = buildProps({
9
+ boundariesPadding: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ fallbackPlacements: {
14
+ type: definePropType(Array),
15
+ default: void 0
16
+ },
17
+ gpuAcceleration: {
18
+ type: Boolean,
19
+ default: true
20
+ },
21
+ offset: {
22
+ type: Number,
23
+ default: 12
24
+ },
25
+ placement: {
26
+ type: String,
27
+ values: placements,
28
+ default: "bottom"
29
+ },
30
+ popperOptions: {
31
+ type: definePropType(Object),
32
+ default: () => ({})
33
+ },
34
+ strategy: {
35
+ type: String,
36
+ values: POSITIONING_STRATEGIES,
37
+ default: "absolute"
138
38
  }
139
39
  });
140
- var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
40
+ const popperContentProps = buildProps({
41
+ ...popperCoreConfigProps,
42
+ id: String,
43
+ style: {
44
+ type: definePropType([String, Array, Object])
45
+ },
46
+ className: {
47
+ type: definePropType([String, Array, Object])
48
+ },
49
+ effect: {
50
+ type: definePropType(String),
51
+ default: "dark"
52
+ },
53
+ visible: Boolean,
54
+ enterable: {
55
+ type: Boolean,
56
+ default: true
57
+ },
58
+ pure: Boolean,
59
+ focusOnShow: {
60
+ type: Boolean,
61
+ default: false
62
+ },
63
+ trapping: {
64
+ type: Boolean,
65
+ default: false
66
+ },
67
+ popperClass: {
68
+ type: definePropType([String, Array, Object])
69
+ },
70
+ popperStyle: {
71
+ type: definePropType([String, Array, Object])
72
+ },
73
+ referenceEl: {
74
+ type: definePropType(Object)
75
+ },
76
+ triggerTargetEl: {
77
+ type: definePropType(Object)
78
+ },
79
+ stopPopperMouseEvent: {
80
+ type: Boolean,
81
+ default: true
82
+ },
83
+ virtualTriggering: Boolean,
84
+ zIndex: Number,
85
+ ...useAriaProps(["ariaLabel"])
86
+ });
87
+ const popperContentEmits = {
88
+ mouseenter: (evt) => evt instanceof MouseEvent,
89
+ mouseleave: (evt) => evt instanceof MouseEvent,
90
+ focus: () => true,
91
+ blur: () => true,
92
+ close: () => true
93
+ };
94
+ const usePopperCoreConfigProps = popperCoreConfigProps;
95
+ const usePopperContentProps = popperContentProps;
96
+ const usePopperContentEmits = popperContentEmits;
141
97
 
142
- export { ElPopperContent as default };
98
+ export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps };
143
99
  //# sourceMappingURL=content2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { NOOP, isElement } from '@element-plus/utils'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\nconst arrowOffset = ref<number>()\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n arrowOffset,\n})\n\nif (formItemContext) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n update()\n shouldUpdateZIndex && updateZIndex()\n}\n\nconst togglePopperAlive = () => {\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nonMounted(() => {\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || contentRef.value)\n const prevEl = unref(prevTriggerTargetEl || contentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef: contentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef: instanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createVNode"],"mappings":";;;;;;;;;;;;;;;;;mCAkDc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAM,MAAA;AAAA,MACJ,aAAA;AAAA,MACA,OAAA;AAAA,MAEA,oBAAA;AAAA,MACA,mBAAA;AAAA,MACA,aAAA;AAAA,MACA,mBAAA;AAAA,MACA,kBAAA;AAAA,KACF,GAAI,yBAA0B,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,EAAE,UAAY,EAAA,QAAA,EAAU,UAAY,EAAA,MAAA,EAAQ,aAAa,IAAM,EAAA,MAAA,EACnE,GAAA,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAExB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;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CAAA;AAAA,UAAA,oBAAA,EAAAA,KAAA,CAAA,oBAAA,CAAA;AAAA,UAKA,SAAA,EAAAA,KAAA,CAAA,aAAA,CAAA;AAAA,UACD,mBAAA,EAAAA,KAAA,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { PopperEffect } from './popper'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n className: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n effect: {\n type: definePropType<PopperEffect | string>(String),\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n triggerTargetEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n"],"names":[],"mappings":";;;;;;AAGA,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,MAAC,qBAAqB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ClB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE;AACU,MAAC,wBAAwB,GAAG,sBAAsB;AAClD,MAAC,qBAAqB,GAAG,mBAAmB;AAC5C,MAAC,qBAAqB,GAAG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Row from './src/row.mjs';
3
- export { RowAlign, RowJustify, rowProps } from './src/row2.mjs';
2
+ import Row from './src/row2.mjs';
3
+ export { RowAlign, RowJustify, rowProps } from './src/row.mjs';
4
4
  export { rowContextKey } from './src/constants.mjs';
5
5
  import { withInstall } from '../../utils/vue/install.mjs';
6
6
 
@@ -1,50 +1,34 @@
1
- import { defineComponent, computed, provide, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
2
- import '../../../hooks/index.mjs';
3
- import { rowContextKey } from './constants.mjs';
4
- import { rowProps } from './row2.mjs';
5
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
7
3
 
8
- const __default__ = defineComponent({
9
- name: "ElRow"
10
- });
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- ...__default__,
13
- props: rowProps,
14
- setup(__props) {
15
- const props = __props;
16
- const ns = useNamespace("row");
17
- const gutter = computed(() => props.gutter);
18
- provide(rowContextKey, {
19
- gutter
20
- });
21
- const style = computed(() => {
22
- const styles = {};
23
- if (!props.gutter) {
24
- return styles;
25
- }
26
- styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`;
27
- return styles;
28
- });
29
- const rowKls = computed(() => [
30
- ns.b(),
31
- ns.is(`justify-${props.justify}`, props.justify !== "start"),
32
- ns.is(`align-${props.align}`, !!props.align)
33
- ]);
34
- return (_ctx, _cache) => {
35
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
36
- class: normalizeClass(unref(rowKls)),
37
- style: normalizeStyle(unref(style))
38
- }, {
39
- default: withCtx(() => [
40
- renderSlot(_ctx.$slots, "default")
41
- ]),
42
- _: 3
43
- }, 8, ["class", "style"]);
44
- };
4
+ const RowJustify = [
5
+ "start",
6
+ "center",
7
+ "end",
8
+ "space-around",
9
+ "space-between",
10
+ "space-evenly"
11
+ ];
12
+ const RowAlign = ["top", "middle", "bottom"];
13
+ const rowProps = buildProps({
14
+ tag: {
15
+ type: String,
16
+ default: "div"
17
+ },
18
+ gutter: {
19
+ type: Number,
20
+ default: 0
21
+ },
22
+ justify: {
23
+ type: String,
24
+ values: RowJustify,
25
+ default: "start"
26
+ },
27
+ align: {
28
+ type: String,
29
+ values: RowAlign
45
30
  }
46
31
  });
47
- var Row = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "row.vue"]]);
48
32
 
49
- export { Row as default };
33
+ export { RowAlign, RowJustify, rowProps };
50
34
  //# sourceMappingURL=row.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"row.mjs","sources":["../../../../../../packages/components/row/src/row.vue"],"sourcesContent":["<template>\n <component :is=\"tag\" :class=\"rowKls\" :style=\"style\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { rowContextKey } from './constants'\nimport { rowProps } from './row'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElRow',\n})\n\nconst props = defineProps(rowProps)\n\nconst ns = useNamespace('row')\nconst gutter = computed(() => props.gutter)\n\nprovide(rowContextKey, {\n gutter,\n})\n\nconst style = computed(() => {\n const styles: CSSProperties = {}\n if (!props.gutter) {\n return styles\n }\n\n styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`\n return styles\n})\n\nconst rowKls = computed(() => [\n ns.b(),\n ns.is(`justify-${props.justify}`, props.justify !== 'start'),\n ns.is(`align-${props.align}`, !!props.align),\n])\n</script>\n"],"names":[],"mappings":";;;;;;;mCAac,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,KAAK,CAAA,CAAA;AAC7B,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,MAAM,CAAA,CAAA;AAE1C,IAAA,OAAA,CAAQ,aAAe,EAAA;AAAA,MACrB,MAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAA,MAAM,SAAwB,EAAC,CAAA;AAC/B,MAAI,IAAA,CAAC,MAAM,MAAQ,EAAA;AACjB,QAAO,OAAA,MAAA,CAAA;AAAA,OACT;AAEA,MAAA,MAAA,CAAO,cAAc,MAAO,CAAA,UAAA,GAAa,CAAI,CAAA,EAAA,KAAA,CAAM,SAAS,CAAC,CAAA,EAAA,CAAA,CAAA;AAC7D,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAAA,MAC5B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,GAAG,CAAW,QAAA,EAAA,KAAA,CAAM,OAAO,CAAI,CAAA,EAAA,KAAA,CAAM,YAAY,OAAO,CAAA;AAAA,MAC3D,EAAA,CAAG,GAAG,CAAS,MAAA,EAAA,KAAA,CAAM,KAAK,CAAI,CAAA,EAAA,CAAC,CAAC,KAAA,CAAM,KAAK,CAAA;AAAA,KAC5C,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"row.mjs","sources":["../../../../../../packages/components/row/src/row.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Row from './row.vue'\n\nexport const RowJustify = [\n 'start',\n 'center',\n 'end',\n 'space-around',\n 'space-between',\n 'space-evenly',\n] as const\n\nexport const RowAlign = ['top', 'middle', 'bottom'] as const\n\nexport const rowProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description grid spacing\n */\n gutter: {\n type: Number,\n default: 0,\n },\n /**\n * @description horizontal alignment of flex layout\n */\n justify: {\n type: String,\n values: RowJustify,\n default: 'start',\n },\n /**\n * @description vertical alignment of flex layout\n */\n align: {\n type: String,\n values: RowAlign,\n },\n} as const)\n\nexport type RowProps = ExtractPropTypes<typeof rowProps>\nexport type RowInstance = InstanceType<typeof Row>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG;AAC1B,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,eAAe;AACjB,EAAE,cAAc;AAChB,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACxC,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,QAAQ;AACpB,GAAG;AACH,CAAC;;;;"}
@@ -1,34 +1,50 @@
1
- import '../../../utils/index.mjs';
2
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, computed, provide, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
2
+ import '../../../hooks/index.mjs';
3
+ import { rowContextKey } from './constants.mjs';
4
+ import { rowProps } from './row.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
7
 
4
- const RowJustify = [
5
- "start",
6
- "center",
7
- "end",
8
- "space-around",
9
- "space-between",
10
- "space-evenly"
11
- ];
12
- const RowAlign = ["top", "middle", "bottom"];
13
- const rowProps = buildProps({
14
- tag: {
15
- type: String,
16
- default: "div"
17
- },
18
- gutter: {
19
- type: Number,
20
- default: 0
21
- },
22
- justify: {
23
- type: String,
24
- values: RowJustify,
25
- default: "start"
26
- },
27
- align: {
28
- type: String,
29
- values: RowAlign
8
+ const __default__ = defineComponent({
9
+ name: "ElRow"
10
+ });
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ ...__default__,
13
+ props: rowProps,
14
+ setup(__props) {
15
+ const props = __props;
16
+ const ns = useNamespace("row");
17
+ const gutter = computed(() => props.gutter);
18
+ provide(rowContextKey, {
19
+ gutter
20
+ });
21
+ const style = computed(() => {
22
+ const styles = {};
23
+ if (!props.gutter) {
24
+ return styles;
25
+ }
26
+ styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`;
27
+ return styles;
28
+ });
29
+ const rowKls = computed(() => [
30
+ ns.b(),
31
+ ns.is(`justify-${props.justify}`, props.justify !== "start"),
32
+ ns.is(`align-${props.align}`, !!props.align)
33
+ ]);
34
+ return (_ctx, _cache) => {
35
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
36
+ class: normalizeClass(unref(rowKls)),
37
+ style: normalizeStyle(unref(style))
38
+ }, {
39
+ default: withCtx(() => [
40
+ renderSlot(_ctx.$slots, "default")
41
+ ]),
42
+ _: 3
43
+ }, 8, ["class", "style"]);
44
+ };
30
45
  }
31
46
  });
47
+ var Row = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "row.vue"]]);
32
48
 
33
- export { RowAlign, RowJustify, rowProps };
49
+ export { Row as default };
34
50
  //# sourceMappingURL=row2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"row2.mjs","sources":["../../../../../../packages/components/row/src/row.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Row from './row.vue'\n\nexport const RowJustify = [\n 'start',\n 'center',\n 'end',\n 'space-around',\n 'space-between',\n 'space-evenly',\n] as const\n\nexport const RowAlign = ['top', 'middle', 'bottom'] as const\n\nexport const rowProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description grid spacing\n */\n gutter: {\n type: Number,\n default: 0,\n },\n /**\n * @description horizontal alignment of flex layout\n */\n justify: {\n type: String,\n values: RowJustify,\n default: 'start',\n },\n /**\n * @description vertical alignment of flex layout\n */\n align: {\n type: String,\n values: RowAlign,\n },\n} as const)\n\nexport type RowProps = ExtractPropTypes<typeof rowProps>\nexport type RowInstance = InstanceType<typeof Row>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG;AAC1B,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,eAAe;AACjB,EAAE,cAAc;AAChB,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACxC,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,QAAQ;AACpB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"row2.mjs","sources":["../../../../../../packages/components/row/src/row.vue"],"sourcesContent":["<template>\n <component :is=\"tag\" :class=\"rowKls\" :style=\"style\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { rowContextKey } from './constants'\nimport { rowProps } from './row'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElRow',\n})\n\nconst props = defineProps(rowProps)\n\nconst ns = useNamespace('row')\nconst gutter = computed(() => props.gutter)\n\nprovide(rowContextKey, {\n gutter,\n})\n\nconst style = computed(() => {\n const styles: CSSProperties = {}\n if (!props.gutter) {\n return styles\n }\n\n styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`\n return styles\n})\n\nconst rowKls = computed(() => [\n ns.b(),\n ns.is(`justify-${props.justify}`, props.justify !== 'start'),\n ns.is(`align-${props.align}`, !!props.align),\n])\n</script>\n"],"names":[],"mappings":";;;;;;;mCAac,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,KAAK,CAAA,CAAA;AAC7B,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,MAAM,CAAA,CAAA;AAE1C,IAAA,OAAA,CAAQ,aAAe,EAAA;AAAA,MACrB,MAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAA,MAAM,SAAwB,EAAC,CAAA;AAC/B,MAAI,IAAA,CAAC,MAAM,MAAQ,EAAA;AACjB,QAAO,OAAA,MAAA,CAAA;AAAA,OACT;AAEA,MAAA,MAAA,CAAO,cAAc,MAAO,CAAA,UAAA,GAAa,CAAI,CAAA,EAAA,KAAA,CAAM,SAAS,CAAC,CAAA,EAAA,CAAA,CAAA;AAC7D,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAAA,MAC5B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,GAAG,CAAW,QAAA,EAAA,KAAA,CAAM,OAAO,CAAI,CAAA,EAAA,KAAA,CAAM,YAAY,OAAO,CAAA;AAAA,MAC3D,EAAA,CAAG,GAAG,CAAS,MAAA,EAAA,KAAA,CAAM,KAAK,CAAI,CAAA,EAAA,CAAC,CAAC,KAAA,CAAM,KAAK,CAAA;AAAA,KAC5C,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Statistic from './src/statistic2.mjs';
3
- export { statisticProps } from './src/statistic.mjs';
2
+ import Statistic from './src/statistic.mjs';
3
+ export { statisticProps } from './src/statistic2.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const ElStatistic = withInstall(Statistic);
@@ -1,31 +1,76 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
2
+ import '../../../hooks/index.mjs';
1
3
  import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
+ import { statisticProps } from './statistic2.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
+ import { isFunction } from '@vue/shared';
8
+ import { isNumber } from '../../../utils/types.mjs';
3
9
 
4
- const statisticProps = buildProps({
5
- decimalSeparator: {
6
- type: String,
7
- default: "."
8
- },
9
- groupSeparator: {
10
- type: String,
11
- default: ","
12
- },
13
- precision: {
14
- type: Number,
15
- default: 0
16
- },
17
- formatter: Function,
18
- value: {
19
- type: definePropType([Number, Object]),
20
- default: 0
21
- },
22
- prefix: String,
23
- suffix: String,
24
- title: String,
25
- valueStyle: {
26
- type: definePropType([String, Object, Array])
10
+ const __default__ = defineComponent({
11
+ name: "ElStatistic"
12
+ });
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ ...__default__,
15
+ props: statisticProps,
16
+ setup(__props, { expose }) {
17
+ const props = __props;
18
+ const ns = useNamespace("statistic");
19
+ const displayValue = computed(() => {
20
+ const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
21
+ if (isFunction(formatter))
22
+ return formatter(value);
23
+ if (!isNumber(value) || Number.isNaN(value))
24
+ return value;
25
+ let [integer, decimal = ""] = String(value).split(".");
26
+ decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
27
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
28
+ return [integer, decimal].join(decimal ? decimalSeparator : "");
29
+ });
30
+ expose({
31
+ displayValue
32
+ });
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createElementBlock("div", {
35
+ class: normalizeClass(unref(ns).b())
36
+ }, [
37
+ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
38
+ key: 0,
39
+ class: normalizeClass(unref(ns).e("head"))
40
+ }, [
41
+ renderSlot(_ctx.$slots, "title", {}, () => [
42
+ createTextVNode(toDisplayString(_ctx.title), 1)
43
+ ])
44
+ ], 2)) : createCommentVNode("v-if", true),
45
+ createElementVNode("div", {
46
+ class: normalizeClass(unref(ns).e("content"))
47
+ }, [
48
+ _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
49
+ key: 0,
50
+ class: normalizeClass(unref(ns).e("prefix"))
51
+ }, [
52
+ renderSlot(_ctx.$slots, "prefix", {}, () => [
53
+ createElementVNode("span", null, toDisplayString(_ctx.prefix), 1)
54
+ ])
55
+ ], 2)) : createCommentVNode("v-if", true),
56
+ createElementVNode("span", {
57
+ class: normalizeClass(unref(ns).e("number")),
58
+ style: normalizeStyle(_ctx.valueStyle)
59
+ }, toDisplayString(unref(displayValue)), 7),
60
+ _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
61
+ key: 1,
62
+ class: normalizeClass(unref(ns).e("suffix"))
63
+ }, [
64
+ renderSlot(_ctx.$slots, "suffix", {}, () => [
65
+ createElementVNode("span", null, toDisplayString(_ctx.suffix), 1)
66
+ ])
67
+ ], 2)) : createCommentVNode("v-if", true)
68
+ ], 2)
69
+ ], 2);
70
+ };
27
71
  }
28
72
  });
73
+ var Statistic = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "statistic.vue"]]);
29
74
 
30
- export { statisticProps };
75
+ export { Statistic as default };
31
76
  //# sourceMappingURL=statistic.mjs.map