@element-plus/nightly 0.0.20241216 → 0.0.20241217

Sign up to get free protection for your applications and to get access to all the features.
Files changed (338) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/ms.js +1 -1
  152. package/dist/locale/ms.min.js +1 -1
  153. package/dist/locale/ms.min.mjs +1 -1
  154. package/dist/locale/ms.mjs +1 -1
  155. package/dist/locale/my.js +1 -1
  156. package/dist/locale/my.min.js +1 -1
  157. package/dist/locale/my.min.mjs +1 -1
  158. package/dist/locale/my.mjs +1 -1
  159. package/dist/locale/nb-no.js +1 -1
  160. package/dist/locale/nb-no.min.js +1 -1
  161. package/dist/locale/nb-no.min.mjs +1 -1
  162. package/dist/locale/nb-no.mjs +1 -1
  163. package/dist/locale/nl.js +1 -1
  164. package/dist/locale/nl.min.js +1 -1
  165. package/dist/locale/nl.min.mjs +1 -1
  166. package/dist/locale/nl.mjs +1 -1
  167. package/dist/locale/pa.js +1 -1
  168. package/dist/locale/pa.min.js +1 -1
  169. package/dist/locale/pa.min.mjs +1 -1
  170. package/dist/locale/pa.mjs +1 -1
  171. package/dist/locale/pl.js +1 -1
  172. package/dist/locale/pl.min.js +1 -1
  173. package/dist/locale/pl.min.mjs +1 -1
  174. package/dist/locale/pl.mjs +1 -1
  175. package/dist/locale/pt-br.js +1 -1
  176. package/dist/locale/pt-br.min.js +1 -1
  177. package/dist/locale/pt-br.min.mjs +1 -1
  178. package/dist/locale/pt-br.mjs +1 -1
  179. package/dist/locale/pt.js +1 -1
  180. package/dist/locale/pt.min.js +1 -1
  181. package/dist/locale/pt.min.mjs +1 -1
  182. package/dist/locale/pt.mjs +1 -1
  183. package/dist/locale/ro.js +1 -1
  184. package/dist/locale/ro.min.js +1 -1
  185. package/dist/locale/ro.min.mjs +1 -1
  186. package/dist/locale/ro.mjs +1 -1
  187. package/dist/locale/ru.js +1 -1
  188. package/dist/locale/ru.min.js +1 -1
  189. package/dist/locale/ru.min.mjs +1 -1
  190. package/dist/locale/ru.mjs +1 -1
  191. package/dist/locale/sk.js +1 -1
  192. package/dist/locale/sk.min.js +1 -1
  193. package/dist/locale/sk.min.mjs +1 -1
  194. package/dist/locale/sk.mjs +1 -1
  195. package/dist/locale/sl.js +1 -1
  196. package/dist/locale/sl.min.js +1 -1
  197. package/dist/locale/sl.min.mjs +1 -1
  198. package/dist/locale/sl.mjs +1 -1
  199. package/dist/locale/sr.js +1 -1
  200. package/dist/locale/sr.min.js +1 -1
  201. package/dist/locale/sr.min.mjs +1 -1
  202. package/dist/locale/sr.mjs +1 -1
  203. package/dist/locale/sv.js +1 -1
  204. package/dist/locale/sv.min.js +1 -1
  205. package/dist/locale/sv.min.mjs +1 -1
  206. package/dist/locale/sv.mjs +1 -1
  207. package/dist/locale/sw.js +1 -1
  208. package/dist/locale/sw.min.js +1 -1
  209. package/dist/locale/sw.min.mjs +1 -1
  210. package/dist/locale/sw.mjs +1 -1
  211. package/dist/locale/ta.js +1 -1
  212. package/dist/locale/ta.min.js +1 -1
  213. package/dist/locale/ta.min.mjs +1 -1
  214. package/dist/locale/ta.mjs +1 -1
  215. package/dist/locale/th.js +1 -1
  216. package/dist/locale/th.min.js +1 -1
  217. package/dist/locale/th.min.mjs +1 -1
  218. package/dist/locale/th.mjs +1 -1
  219. package/dist/locale/tk.js +1 -1
  220. package/dist/locale/tk.min.js +1 -1
  221. package/dist/locale/tk.min.mjs +1 -1
  222. package/dist/locale/tk.mjs +1 -1
  223. package/dist/locale/tr.js +1 -1
  224. package/dist/locale/tr.min.js +1 -1
  225. package/dist/locale/tr.min.mjs +1 -1
  226. package/dist/locale/tr.mjs +1 -1
  227. package/dist/locale/ug-cn.js +1 -1
  228. package/dist/locale/ug-cn.min.js +1 -1
  229. package/dist/locale/ug-cn.min.mjs +1 -1
  230. package/dist/locale/ug-cn.mjs +1 -1
  231. package/dist/locale/uk.js +1 -1
  232. package/dist/locale/uk.min.js +1 -1
  233. package/dist/locale/uk.min.mjs +1 -1
  234. package/dist/locale/uk.mjs +1 -1
  235. package/dist/locale/uz-uz.js +1 -1
  236. package/dist/locale/uz-uz.min.js +1 -1
  237. package/dist/locale/uz-uz.min.mjs +1 -1
  238. package/dist/locale/uz-uz.mjs +1 -1
  239. package/dist/locale/vi.js +1 -1
  240. package/dist/locale/vi.min.js +1 -1
  241. package/dist/locale/vi.min.mjs +1 -1
  242. package/dist/locale/vi.mjs +1 -1
  243. package/dist/locale/zh-cn.js +1 -1
  244. package/dist/locale/zh-cn.min.js +1 -1
  245. package/dist/locale/zh-cn.min.mjs +1 -1
  246. package/dist/locale/zh-cn.mjs +1 -1
  247. package/dist/locale/zh-tw.js +1 -1
  248. package/dist/locale/zh-tw.min.js +1 -1
  249. package/dist/locale/zh-tw.min.mjs +1 -1
  250. package/dist/locale/zh-tw.mjs +1 -1
  251. package/es/components/color-picker/index.mjs +2 -2
  252. package/es/components/color-picker/src/color-picker.mjs +399 -40
  253. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  254. package/es/components/color-picker/src/color-picker2.mjs +40 -399
  255. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  256. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  257. package/es/components/countdown/index.mjs +2 -2
  258. package/es/components/countdown/src/countdown.mjs +79 -22
  259. package/es/components/countdown/src/countdown.mjs.map +1 -1
  260. package/es/components/countdown/src/countdown2.mjs +22 -79
  261. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  262. package/es/components/descriptions/index.mjs +2 -2
  263. package/es/components/descriptions/src/description.mjs +126 -26
  264. package/es/components/descriptions/src/description.mjs.map +1 -1
  265. package/es/components/descriptions/src/description2.mjs +26 -126
  266. package/es/components/descriptions/src/description2.mjs.map +1 -1
  267. package/es/components/dialog/src/dialog-content.mjs +87 -26
  268. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  269. package/es/components/dialog/src/dialog-content2.mjs +26 -87
  270. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  271. package/es/components/dialog/src/dialog.mjs +1 -1
  272. package/es/components/dialog/src/dialog2.mjs +1 -1
  273. package/es/components/index.mjs +5 -5
  274. package/es/components/statistic/index.mjs +2 -2
  275. package/es/components/statistic/src/statistic.mjs +25 -69
  276. package/es/components/statistic/src/statistic.mjs.map +1 -1
  277. package/es/components/statistic/src/statistic2.mjs +69 -25
  278. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  279. package/es/components/tabs/index.mjs +2 -2
  280. package/es/components/tabs/src/tab-pane.mjs +71 -13
  281. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  282. package/es/components/tabs/src/tab-pane2.mjs +13 -71
  283. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  284. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  285. package/es/components/transfer/src/transfer-panel.mjs +19 -130
  286. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  287. package/es/components/transfer/src/transfer-panel2.mjs +130 -19
  288. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  289. package/es/components/transfer/src/transfer2.mjs +1 -1
  290. package/es/index.mjs +5 -5
  291. package/es/version.d.ts +1 -1
  292. package/es/version.mjs +1 -1
  293. package/es/version.mjs.map +1 -1
  294. package/lib/components/color-picker/index.js +2 -2
  295. package/lib/components/color-picker/src/color-picker.js +397 -40
  296. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  297. package/lib/components/color-picker/src/color-picker2.js +40 -397
  298. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  299. package/lib/components/color-picker/src/components/predefine.js +1 -1
  300. package/lib/components/countdown/index.js +2 -2
  301. package/lib/components/countdown/src/countdown.js +79 -23
  302. package/lib/components/countdown/src/countdown.js.map +1 -1
  303. package/lib/components/countdown/src/countdown2.js +23 -79
  304. package/lib/components/countdown/src/countdown2.js.map +1 -1
  305. package/lib/components/descriptions/index.js +2 -2
  306. package/lib/components/descriptions/src/description.js +126 -26
  307. package/lib/components/descriptions/src/description.js.map +1 -1
  308. package/lib/components/descriptions/src/description2.js +26 -126
  309. package/lib/components/descriptions/src/description2.js.map +1 -1
  310. package/lib/components/dialog/src/dialog-content.js +86 -26
  311. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  312. package/lib/components/dialog/src/dialog-content2.js +26 -86
  313. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  314. package/lib/components/dialog/src/dialog.js +1 -1
  315. package/lib/components/dialog/src/dialog2.js +1 -1
  316. package/lib/components/index.js +5 -5
  317. package/lib/components/statistic/index.js +2 -2
  318. package/lib/components/statistic/src/statistic.js +25 -69
  319. package/lib/components/statistic/src/statistic.js.map +1 -1
  320. package/lib/components/statistic/src/statistic2.js +69 -25
  321. package/lib/components/statistic/src/statistic2.js.map +1 -1
  322. package/lib/components/tabs/index.js +2 -2
  323. package/lib/components/tabs/src/tab-pane.js +71 -13
  324. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  325. package/lib/components/tabs/src/tab-pane2.js +13 -71
  326. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  327. package/lib/components/transfer/src/composables/use-check.js +1 -1
  328. package/lib/components/transfer/src/transfer-panel.js +21 -130
  329. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  330. package/lib/components/transfer/src/transfer-panel2.js +130 -21
  331. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  332. package/lib/components/transfer/src/transfer2.js +1 -1
  333. package/lib/index.js +5 -5
  334. package/lib/version.d.ts +1 -1
  335. package/lib/version.js +1 -1
  336. package/lib/version.js.map +1 -1
  337. package/package.json +2 -2
  338. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-content.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: Boolean,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: Boolean,\n /**\n * @description draggable Dialog can overflow the viewport\n */\n overflow: Boolean,\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n"],"names":[],"mappings":";;;AACY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
1
+ {"version":3,"file":"dialog-content.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div :ref=\"composedDialogRef\" :class=\"dialogKls\" :style=\"style\" tabindex=\"-1\">\n <header\n ref=\"headerRef\"\n :class=\"[ns.e('header'), { 'show-close': showClose }]\"\n >\n <slot name=\"header\">\n <span role=\"heading\" :aria-level=\"ariaLevel\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"t('el.dialog.close')\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n @click=\"$emit('close')\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </el-icon>\n </button>\n </header>\n <div :id=\"bodyId\" :class=\"ns.e('body')\">\n <slot />\n </div>\n <footer v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { FOCUS_TRAP_INJECTION_KEY } from '@element-plus/components/focus-trap'\nimport { useDraggable, useLocale } from '@element-plus/hooks'\nimport { CloseComponents, composeRefs } from '@element-plus/utils'\nimport { dialogInjectionKey } from './constants'\nimport { dialogContentEmits, dialogContentProps } from './dialog-content'\n\nconst { t } = useLocale()\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\nconst props = defineProps(dialogContentProps)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey)!\nconst { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\nconst dialogKls = computed(() => [\n ns.b(),\n ns.is('fullscreen', props.fullscreen),\n ns.is('draggable', props.draggable),\n ns.is('align-center', props.alignCenter),\n { [ns.m('center')]: props.center },\n])\n\nconst composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n\nconst draggable = computed(() => props.draggable)\nconst overflow = computed(() => props.overflow)\nconst { resetPosition } = useDraggable(\n dialogRef,\n headerRef,\n draggable,\n overflow\n)\n\ndefineExpose({\n resetPosition,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref","_normalizeClass","_normalizeStyle"],"mappings":";;;;;;;;;;;mCA4Cc,CAAA,EAAE,IAAM,EAAA,iBAAA,EAAkB,CAAA,CAAA;;;;;;;AAHxC,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAE,OAAU,GAAA,eAAA,CAAA;AAMlB,IAAM,MAAA,EAAE,WAAW,SAAW,EAAA,MAAA,EAAQ,IAAI,KAAM,EAAA,GAAI,OAAO,kBAAkB,CAAA,CAAA;AAC7E,IAAA,MAAM,EAAE,YAAA,EAAiB,GAAA,MAAA,CAAO,wBAAwB,CAAA,CAAA;AAExD,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAAA,MAC/B,GAAG,CAAE,EAAA;AAAA,MACL,EAAG,CAAA,EAAA,CAAG,YAAc,EAAA,KAAA,CAAM,UAAU,CAAA;AAAA,MACpC,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,EAAG,CAAA,EAAA,CAAG,cAAgB,EAAA,KAAA,CAAM,WAAW,CAAA;AAAA,MACvC,EAAE,CAAC,EAAG,CAAA,CAAA,CAAE,QAAQ,CAAC,GAAG,MAAM,MAAO,EAAA;AAAA,KAClC,CAAA,CAAA;AAED,IAAM,MAAA,iBAAA,GAAoB,WAAY,CAAA,YAAA,EAAc,SAAS,CAAA,CAAA;AAE7D,IAAA,MAAM,SAAY,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,SAAS,CAAA,CAAA;AAChD,IAAA,MAAM,QAAW,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAE,eAAkB,GAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA,CAAA;AAAA,IACxB,MAAA,CAAA;AAAA,MACA,aAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACF,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAEA,QAAa,GAAA,EAAAC,KAAA,CAAA,iBAAA,CAAA;AAAA,QACX,KAAA,EAAAC,cAAA,CAAAD,KAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACD,KAAA,EAAAE,cAAA,CAAAF,KAAA,CAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,92 +1,31 @@
1
- import { defineComponent, inject, computed, openBlock, createElementBlock, unref, normalizeClass, normalizeStyle, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx, createBlock, resolveDynamicComponent, createCommentVNode } from 'vue';
2
- import { ElIcon } from '../../icon/index.mjs';
3
- import { dialogInjectionKey } from './constants.mjs';
4
- import { dialogContentProps, dialogContentEmits } from './dialog-content.mjs';
5
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
- import { FOCUS_TRAP_INJECTION_KEY } from '../../focus-trap/src/tokens.mjs';
7
- import { useDraggable } from '../../../hooks/use-draggable/index.mjs';
8
- import { CloseComponents } from '../../../utils/vue/icon.mjs';
9
- import { composeRefs } from '../../../utils/vue/refs.mjs';
10
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
1
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
+ import { iconPropType } from '../../../utils/vue/icon.mjs';
11
3
 
12
- const __default__ = defineComponent({ name: "ElDialogContent" });
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- ...__default__,
15
- props: dialogContentProps,
16
- emits: dialogContentEmits,
17
- setup(__props, { expose }) {
18
- const props = __props;
19
- const { t } = useLocale();
20
- const { Close } = CloseComponents;
21
- const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey);
22
- const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
23
- const dialogKls = computed(() => [
24
- ns.b(),
25
- ns.is("fullscreen", props.fullscreen),
26
- ns.is("draggable", props.draggable),
27
- ns.is("align-center", props.alignCenter),
28
- { [ns.m("center")]: props.center }
29
- ]);
30
- const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
31
- const draggable = computed(() => props.draggable);
32
- const overflow = computed(() => props.overflow);
33
- const { resetPosition } = useDraggable(dialogRef, headerRef, draggable, overflow);
34
- expose({
35
- resetPosition
36
- });
37
- return (_ctx, _cache) => {
38
- return openBlock(), createElementBlock("div", {
39
- ref: unref(composedDialogRef),
40
- class: normalizeClass(unref(dialogKls)),
41
- style: normalizeStyle(unref(style)),
42
- tabindex: "-1"
43
- }, [
44
- createElementVNode("header", {
45
- ref_key: "headerRef",
46
- ref: headerRef,
47
- class: normalizeClass([unref(ns).e("header"), { "show-close": _ctx.showClose }])
48
- }, [
49
- renderSlot(_ctx.$slots, "header", {}, () => [
50
- createElementVNode("span", {
51
- role: "heading",
52
- "aria-level": _ctx.ariaLevel,
53
- class: normalizeClass(unref(ns).e("title"))
54
- }, toDisplayString(_ctx.title), 11, ["aria-level"])
55
- ]),
56
- _ctx.showClose ? (openBlock(), createElementBlock("button", {
57
- key: 0,
58
- "aria-label": unref(t)("el.dialog.close"),
59
- class: normalizeClass(unref(ns).e("headerbtn")),
60
- type: "button",
61
- onClick: ($event) => _ctx.$emit("close")
62
- }, [
63
- createVNode(unref(ElIcon), {
64
- class: normalizeClass(unref(ns).e("close"))
65
- }, {
66
- default: withCtx(() => [
67
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || unref(Close))))
68
- ]),
69
- _: 1
70
- }, 8, ["class"])
71
- ], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true)
72
- ], 2),
73
- createElementVNode("div", {
74
- id: unref(bodyId),
75
- class: normalizeClass(unref(ns).e("body"))
76
- }, [
77
- renderSlot(_ctx.$slots, "default")
78
- ], 10, ["id"]),
79
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
80
- key: 0,
81
- class: normalizeClass(unref(ns).e("footer"))
82
- }, [
83
- renderSlot(_ctx.$slots, "footer")
84
- ], 2)) : createCommentVNode("v-if", true)
85
- ], 6);
86
- };
4
+ const dialogContentProps = buildProps({
5
+ center: Boolean,
6
+ alignCenter: Boolean,
7
+ closeIcon: {
8
+ type: iconPropType
9
+ },
10
+ draggable: Boolean,
11
+ overflow: Boolean,
12
+ fullscreen: Boolean,
13
+ showClose: {
14
+ type: Boolean,
15
+ default: true
16
+ },
17
+ title: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ ariaLevel: {
22
+ type: String,
23
+ default: "2"
87
24
  }
88
25
  });
89
- var ElDialogContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "dialog-content.vue"]]);
26
+ const dialogContentEmits = {
27
+ close: () => true
28
+ };
90
29
 
91
- export { ElDialogContent as default };
30
+ export { dialogContentEmits, dialogContentProps };
92
31
  //# sourceMappingURL=dialog-content2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-content2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div :ref=\"composedDialogRef\" :class=\"dialogKls\" :style=\"style\" tabindex=\"-1\">\n <header\n ref=\"headerRef\"\n :class=\"[ns.e('header'), { 'show-close': showClose }]\"\n >\n <slot name=\"header\">\n <span role=\"heading\" :aria-level=\"ariaLevel\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"t('el.dialog.close')\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n @click=\"$emit('close')\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </el-icon>\n </button>\n </header>\n <div :id=\"bodyId\" :class=\"ns.e('body')\">\n <slot />\n </div>\n <footer v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { FOCUS_TRAP_INJECTION_KEY } from '@element-plus/components/focus-trap'\nimport { useDraggable, useLocale } from '@element-plus/hooks'\nimport { CloseComponents, composeRefs } from '@element-plus/utils'\nimport { dialogInjectionKey } from './constants'\nimport { dialogContentEmits, dialogContentProps } from './dialog-content'\n\nconst { t } = useLocale()\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\nconst props = defineProps(dialogContentProps)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey)!\nconst { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\nconst dialogKls = computed(() => [\n ns.b(),\n ns.is('fullscreen', props.fullscreen),\n ns.is('draggable', props.draggable),\n ns.is('align-center', props.alignCenter),\n { [ns.m('center')]: props.center },\n])\n\nconst composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n\nconst draggable = computed(() => props.draggable)\nconst overflow = computed(() => props.overflow)\nconst { resetPosition } = useDraggable(\n dialogRef,\n headerRef,\n draggable,\n overflow\n)\n\ndefineExpose({\n resetPosition,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref","_normalizeClass","_normalizeStyle"],"mappings":";;;;;;;;;;;mCA4Cc,CAAA,EAAE,IAAM,EAAA,iBAAA,EAAkB,CAAA,CAAA;;;;;;;AAHxC,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAE,OAAU,GAAA,eAAA,CAAA;AAMlB,IAAM,MAAA,EAAE,WAAW,SAAW,EAAA,MAAA,EAAQ,IAAI,KAAM,EAAA,GAAI,OAAO,kBAAkB,CAAA,CAAA;AAC7E,IAAA,MAAM,EAAE,YAAA,EAAiB,GAAA,MAAA,CAAO,wBAAwB,CAAA,CAAA;AAExD,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAAA,MAC/B,GAAG,CAAE,EAAA;AAAA,MACL,EAAG,CAAA,EAAA,CAAG,YAAc,EAAA,KAAA,CAAM,UAAU,CAAA;AAAA,MACpC,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,EAAG,CAAA,EAAA,CAAG,cAAgB,EAAA,KAAA,CAAM,WAAW,CAAA;AAAA,MACvC,EAAE,CAAC,EAAG,CAAA,CAAA,CAAE,QAAQ,CAAC,GAAG,MAAM,MAAO,EAAA;AAAA,KAClC,CAAA,CAAA;AAED,IAAM,MAAA,iBAAA,GAAoB,WAAY,CAAA,YAAA,EAAc,SAAS,CAAA,CAAA;AAE7D,IAAA,MAAM,SAAY,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,SAAS,CAAA,CAAA;AAChD,IAAA,MAAM,QAAW,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAE,eAAkB,GAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA,CAAA;AAAA,IACxB,MAAA,CAAA;AAAA,MACA,aAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACF,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAEA,QAAa,GAAA,EAAAC,KAAA,CAAA,iBAAA,CAAA;AAAA,QACX,KAAA,EAAAC,cAAA,CAAAD,KAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACD,KAAA,EAAAE,cAAA,CAAAF,KAAA,CAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog-content2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: Boolean,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: Boolean,\n /**\n * @description draggable Dialog can overflow the viewport\n */\n overflow: Boolean,\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n"],"names":[],"mappings":";;;AACY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
@@ -1,4 +1,4 @@
1
- import { dialogContentProps } from './dialog-content.mjs';
1
+ import { dialogContentProps } from './dialog-content2.mjs';
2
2
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
3
  import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
4
4
  import { isBoolean } from '../../../utils/types.mjs';
@@ -2,7 +2,7 @@ import { defineComponent, useSlots, computed, ref, provide, openBlock, createBlo
2
2
  import { ElOverlay } from '../../overlay/index.mjs';
3
3
  import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
4
4
  import { ElTeleport } from '../../teleport/index.mjs';
5
- import ElDialogContent from './dialog-content2.mjs';
5
+ import ElDialogContent from './dialog-content.mjs';
6
6
  import { dialogInjectionKey } from './constants.mjs';
7
7
  import { dialogProps, dialogEmits } from './dialog.mjs';
8
8
  import { useDialog } from './use-dialog.mjs';
@@ -109,15 +109,15 @@ export { colProps } from './col/src/col.mjs';
109
109
  export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
110
110
  export { collapseItemProps } from './collapse/src/collapse-item.mjs';
111
111
  export { collapseContextKey } from './collapse/src/constants.mjs';
112
- export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
112
+ export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker2.mjs';
113
113
  export { messageConfig } from './config-provider/src/config-provider.mjs';
114
114
  export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
115
115
  export { configProviderContextKey } from './config-provider/src/constants.mjs';
116
116
  export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
117
- export { countdownEmits, countdownProps } from './countdown/src/countdown.mjs';
117
+ export { countdownEmits, countdownProps } from './countdown/src/countdown2.mjs';
118
118
  export { ROOT_PICKER_INJECTION_KEY } from './date-picker/src/constants.mjs';
119
119
  export { datePickerProps } from './date-picker/src/props/date-picker.mjs';
120
- export { descriptionProps } from './descriptions/src/description.mjs';
120
+ export { descriptionProps } from './descriptions/src/description2.mjs';
121
121
  export { descriptionItemProps } from './descriptions/src/description-item.mjs';
122
122
  export { useDialog } from './dialog/src/use-dialog.mjs';
123
123
  export { dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
@@ -178,7 +178,7 @@ export { sliderContextKey } from './slider/src/constants.mjs';
178
178
  export { spaceProps } from './space/src/space.mjs';
179
179
  export { spaceItemProps } from './space/src/item.mjs';
180
180
  export { useSpace } from './space/src/use-space.mjs';
181
- export { statisticProps } from './statistic/src/statistic2.mjs';
181
+ export { statisticProps } from './statistic/src/statistic.mjs';
182
182
  export { stepProps } from './steps/src/item.mjs';
183
183
  export { stepsEmits, stepsProps } from './steps/src/steps.mjs';
184
184
  export { switchEmits, switchProps } from './switch/src/switch.mjs';
@@ -191,7 +191,7 @@ export { tableV2RowProps } from './table-v2/src/row.mjs';
191
191
  export { tabsEmits, tabsProps } from './tabs/src/tabs.mjs';
192
192
  export { tabBarProps } from './tabs/src/tab-bar.mjs';
193
193
  export { tabNavEmits, tabNavProps } from './tabs/src/tab-nav.mjs';
194
- export { tabPaneProps } from './tabs/src/tab-pane.mjs';
194
+ export { tabPaneProps } from './tabs/src/tab-pane2.mjs';
195
195
  export { tabsRootContextKey } from './tabs/src/constants.mjs';
196
196
  export { tagEmits, tagProps } from './tag/src/tag.mjs';
197
197
  export { textProps } from './text/src/text.mjs';
@@ -1,5 +1,5 @@
1
- import Statistic from './src/statistic.mjs';
2
- export { statisticProps } from './src/statistic2.mjs';
1
+ import Statistic from './src/statistic2.mjs';
2
+ export { statisticProps } from './src/statistic.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElStatistic = withInstall(Statistic);
@@ -1,74 +1,30 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
2
- import { statisticProps } from './statistic2.mjs';
3
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
5
- import { isFunction } from '@vue/shared';
6
- import { isNumber } from '../../../utils/types.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
7
2
 
8
- const __default__ = defineComponent({
9
- name: "ElStatistic"
10
- });
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- ...__default__,
13
- props: statisticProps,
14
- setup(__props, { expose }) {
15
- const props = __props;
16
- const ns = useNamespace("statistic");
17
- const displayValue = computed(() => {
18
- const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
19
- if (isFunction(formatter))
20
- return formatter(value);
21
- if (!isNumber(value) || Number.isNaN(value))
22
- return value;
23
- let [integer, decimal = ""] = String(value).split(".");
24
- decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
25
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
26
- return [integer, decimal].join(decimal ? decimalSeparator : "");
27
- });
28
- expose({
29
- displayValue
30
- });
31
- return (_ctx, _cache) => {
32
- return openBlock(), createElementBlock("div", {
33
- class: normalizeClass(unref(ns).b())
34
- }, [
35
- _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
36
- key: 0,
37
- class: normalizeClass(unref(ns).e("head"))
38
- }, [
39
- renderSlot(_ctx.$slots, "title", {}, () => [
40
- createTextVNode(toDisplayString(_ctx.title), 1)
41
- ])
42
- ], 2)) : createCommentVNode("v-if", true),
43
- createElementVNode("div", {
44
- class: normalizeClass(unref(ns).e("content"))
45
- }, [
46
- _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
47
- key: 0,
48
- class: normalizeClass(unref(ns).e("prefix"))
49
- }, [
50
- renderSlot(_ctx.$slots, "prefix", {}, () => [
51
- createElementVNode("span", null, toDisplayString(_ctx.prefix), 1)
52
- ])
53
- ], 2)) : createCommentVNode("v-if", true),
54
- createElementVNode("span", {
55
- class: normalizeClass(unref(ns).e("number")),
56
- style: normalizeStyle(_ctx.valueStyle)
57
- }, toDisplayString(unref(displayValue)), 7),
58
- _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
59
- key: 1,
60
- class: normalizeClass(unref(ns).e("suffix"))
61
- }, [
62
- renderSlot(_ctx.$slots, "suffix", {}, () => [
63
- createElementVNode("span", null, toDisplayString(_ctx.suffix), 1)
64
- ])
65
- ], 2)) : createCommentVNode("v-if", true)
66
- ], 2)
67
- ], 2);
68
- };
3
+ const statisticProps = buildProps({
4
+ decimalSeparator: {
5
+ type: String,
6
+ default: "."
7
+ },
8
+ groupSeparator: {
9
+ type: String,
10
+ default: ","
11
+ },
12
+ precision: {
13
+ type: Number,
14
+ default: 0
15
+ },
16
+ formatter: Function,
17
+ value: {
18
+ type: definePropType([Number, Object]),
19
+ default: 0
20
+ },
21
+ prefix: String,
22
+ suffix: String,
23
+ title: String,
24
+ valueStyle: {
25
+ type: definePropType([String, Object, Array])
69
26
  }
70
27
  });
71
- var Statistic = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "statistic.vue"]]);
72
28
 
73
- export { Statistic as default };
29
+ export { statisticProps };
74
30
  //# sourceMappingURL=statistic.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div v-if=\"$slots.title || title\" :class=\"ns.e('head')\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div :class=\"ns.e('content')\">\n <div v-if=\"$slots.prefix || prefix\" :class=\"ns.e('prefix')\">\n <slot name=\"prefix\">\n <span>{{ prefix }}</span>\n </slot>\n </div>\n <span :class=\"ns.e('number')\" :style=\"valueStyle\">\n {{ displayValue }}\n </span>\n <div v-if=\"$slots.suffix || suffix\" :class=\"ns.e('suffix')\">\n <slot name=\"suffix\">\n <span>{{ suffix }}</span>\n </slot>\n </div>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isNumber } from '@element-plus/utils'\nimport { statisticProps } from './statistic'\n\ndefineOptions({\n name: 'ElStatistic',\n})\n\nconst props = defineProps(statisticProps)\nconst ns = useNamespace('statistic')\n\nconst displayValue = computed(() => {\n const { value, formatter, precision, decimalSeparator, groupSeparator } =\n props\n\n if (isFunction(formatter)) return formatter(value)\n\n // https://github.com/element-plus/element-plus/issues/17784\n if (!isNumber(value) || Number.isNaN(value)) return value\n\n let [integer, decimal = ''] = String(value).split('.')\n decimal = decimal\n .padEnd(precision, '0')\n .slice(0, precision > 0 ? precision : 0)\n integer = integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator)\n return [integer, decimal].join(decimal ? decimalSeparator : '')\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCA8Bc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,MAAM,EAAE,KAAO,EAAA,SAAA,EAAW,SAAW,EAAA,gBAAA,EAAkB,gBACrD,GAAA,KAAA,CAAA;AAEF,MAAA,IAAI,UAAW,CAAA,SAAS,CAAG;AAG3B,QAAI,gBAAe,CAAA,KAAK;AAExB,MAAI,IAAA,CAAC,SAAS,KAAU,CAAA,IAAA,MAAM,CAAO,KAAA,CAAA,KAAK,CAAE;AAC5C,QAAU,OAAA,KAAA,CAAA;AAGV,MAAU,IAAA,CAAA,OAAA,EAAA,OAAgB,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,KAAA,CAAA,CAAA,KAAA,CAAA,GAAuC,CAAA,CAAA;AACjE,MAAA,OAAO,GAAU,OAAA,CAAA,MAAO,UAAO,EAAA,GAAA,CAAA,CAAU,qBAAqB,CAAA,GAAA,SAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAC/D,OAAA,GAAA,OAAA,CAAA,OAAA,CAAA,uBAAA,EAAA,cAAA,CAAA,CAAA;AAED,MAAa,OAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,gBAAA,GAAA,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MAAA,CAAA;AAAA,MAAA,YAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type StatisticProps = ExtractPropTypes<typeof statisticProps>\n\nexport type StatisticInstance = InstanceType<typeof Statistic>\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}
@@ -1,30 +1,74 @@
1
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
2
+ import { statisticProps } from './statistic.mjs';
3
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
5
+ import { isFunction } from '@vue/shared';
6
+ import { isNumber } from '../../../utils/types.mjs';
2
7
 
3
- const statisticProps = buildProps({
4
- decimalSeparator: {
5
- type: String,
6
- default: "."
7
- },
8
- groupSeparator: {
9
- type: String,
10
- default: ","
11
- },
12
- precision: {
13
- type: Number,
14
- default: 0
15
- },
16
- formatter: Function,
17
- value: {
18
- type: definePropType([Number, Object]),
19
- default: 0
20
- },
21
- prefix: String,
22
- suffix: String,
23
- title: String,
24
- valueStyle: {
25
- type: definePropType([String, Object, Array])
8
+ const __default__ = defineComponent({
9
+ name: "ElStatistic"
10
+ });
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ ...__default__,
13
+ props: statisticProps,
14
+ setup(__props, { expose }) {
15
+ const props = __props;
16
+ const ns = useNamespace("statistic");
17
+ const displayValue = computed(() => {
18
+ const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
19
+ if (isFunction(formatter))
20
+ return formatter(value);
21
+ if (!isNumber(value) || Number.isNaN(value))
22
+ return value;
23
+ let [integer, decimal = ""] = String(value).split(".");
24
+ decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
25
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
26
+ return [integer, decimal].join(decimal ? decimalSeparator : "");
27
+ });
28
+ expose({
29
+ displayValue
30
+ });
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createElementBlock("div", {
33
+ class: normalizeClass(unref(ns).b())
34
+ }, [
35
+ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
36
+ key: 0,
37
+ class: normalizeClass(unref(ns).e("head"))
38
+ }, [
39
+ renderSlot(_ctx.$slots, "title", {}, () => [
40
+ createTextVNode(toDisplayString(_ctx.title), 1)
41
+ ])
42
+ ], 2)) : createCommentVNode("v-if", true),
43
+ createElementVNode("div", {
44
+ class: normalizeClass(unref(ns).e("content"))
45
+ }, [
46
+ _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
47
+ key: 0,
48
+ class: normalizeClass(unref(ns).e("prefix"))
49
+ }, [
50
+ renderSlot(_ctx.$slots, "prefix", {}, () => [
51
+ createElementVNode("span", null, toDisplayString(_ctx.prefix), 1)
52
+ ])
53
+ ], 2)) : createCommentVNode("v-if", true),
54
+ createElementVNode("span", {
55
+ class: normalizeClass(unref(ns).e("number")),
56
+ style: normalizeStyle(_ctx.valueStyle)
57
+ }, toDisplayString(unref(displayValue)), 7),
58
+ _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
59
+ key: 1,
60
+ class: normalizeClass(unref(ns).e("suffix"))
61
+ }, [
62
+ renderSlot(_ctx.$slots, "suffix", {}, () => [
63
+ createElementVNode("span", null, toDisplayString(_ctx.suffix), 1)
64
+ ])
65
+ ], 2)) : createCommentVNode("v-if", true)
66
+ ], 2)
67
+ ], 2);
68
+ };
26
69
  }
27
70
  });
71
+ var Statistic = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "statistic.vue"]]);
28
72
 
29
- export { statisticProps };
73
+ export { Statistic as default };
30
74
  //# sourceMappingURL=statistic2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"statistic2.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type StatisticProps = ExtractPropTypes<typeof statisticProps>\n\nexport type StatisticInstance = InstanceType<typeof Statistic>\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"statistic2.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div v-if=\"$slots.title || title\" :class=\"ns.e('head')\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div :class=\"ns.e('content')\">\n <div v-if=\"$slots.prefix || prefix\" :class=\"ns.e('prefix')\">\n <slot name=\"prefix\">\n <span>{{ prefix }}</span>\n </slot>\n </div>\n <span :class=\"ns.e('number')\" :style=\"valueStyle\">\n {{ displayValue }}\n </span>\n <div v-if=\"$slots.suffix || suffix\" :class=\"ns.e('suffix')\">\n <slot name=\"suffix\">\n <span>{{ suffix }}</span>\n </slot>\n </div>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isNumber } from '@element-plus/utils'\nimport { statisticProps } from './statistic'\n\ndefineOptions({\n name: 'ElStatistic',\n})\n\nconst props = defineProps(statisticProps)\nconst ns = useNamespace('statistic')\n\nconst displayValue = computed(() => {\n const { value, formatter, precision, decimalSeparator, groupSeparator } =\n props\n\n if (isFunction(formatter)) return formatter(value)\n\n // https://github.com/element-plus/element-plus/issues/17784\n if (!isNumber(value) || Number.isNaN(value)) return value\n\n let [integer, decimal = ''] = String(value).split('.')\n decimal = decimal\n .padEnd(precision, '0')\n .slice(0, precision > 0 ? precision : 0)\n integer = integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator)\n return [integer, decimal].join(decimal ? decimalSeparator : '')\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCA8Bc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,MAAM,EAAE,KAAO,EAAA,SAAA,EAAW,SAAW,EAAA,gBAAA,EAAkB,gBACrD,GAAA,KAAA,CAAA;AAEF,MAAA,IAAI,UAAW,CAAA,SAAS,CAAG;AAG3B,QAAI,gBAAe,CAAA,KAAK;AAExB,MAAI,IAAA,CAAC,SAAS,KAAU,CAAA,IAAA,MAAM,CAAO,KAAA,CAAA,KAAK,CAAE;AAC5C,QAAU,OAAA,KAAA,CAAA;AAGV,MAAU,IAAA,CAAA,OAAA,EAAA,OAAgB,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,KAAA,CAAA,CAAA,KAAA,CAAA,GAAuC,CAAA,CAAA;AACjE,MAAA,OAAO,GAAU,OAAA,CAAA,MAAO,UAAO,EAAA,GAAA,CAAA,CAAU,qBAAqB,CAAA,GAAA,SAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAC/D,OAAA,GAAA,OAAA,CAAA,OAAA,CAAA,uBAAA,EAAA,cAAA,CAAA,CAAA;AAED,MAAa,OAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,gBAAA,GAAA,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MAAA,CAAA;AAAA,MAAA,YAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import Tabs from './src/tabs.mjs';
2
2
  export { tabsEmits, tabsProps } from './src/tabs.mjs';
3
- import TabPane from './src/tab-pane2.mjs';
3
+ import TabPane from './src/tab-pane.mjs';
4
4
  export { tabBarProps } from './src/tab-bar.mjs';
5
5
  export { tabNavEmits, tabNavProps } from './src/tab-nav.mjs';
6
- export { tabPaneProps } from './src/tab-pane.mjs';
6
+ export { tabPaneProps } from './src/tab-pane2.mjs';
7
7
  export { tabsRootContextKey } from './src/constants.mjs';
8
8
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
9
9
 
@@ -1,17 +1,75 @@
1
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, getCurrentInstance, useSlots, inject, ref, computed, watch, reactive, onMounted, onUnmounted, unref, withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow, createCommentVNode } from 'vue';
2
+ import { eagerComputed } from '@vueuse/core';
3
+ import { tabsRootContextKey } from './constants.mjs';
4
+ import { tabPaneProps } from './tab-pane2.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { throwError } from '../../../utils/error.mjs';
7
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
2
8
 
3
- const tabPaneProps = buildProps({
4
- label: {
5
- type: String,
6
- default: ""
7
- },
8
- name: {
9
- type: [String, Number]
10
- },
11
- closable: Boolean,
12
- disabled: Boolean,
13
- lazy: Boolean
9
+ const COMPONENT_NAME = "ElTabPane";
10
+ const __default__ = defineComponent({
11
+ name: COMPONENT_NAME
14
12
  });
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ ...__default__,
15
+ props: tabPaneProps,
16
+ setup(__props) {
17
+ const props = __props;
18
+ const instance = getCurrentInstance();
19
+ const slots = useSlots();
20
+ const tabsRoot = inject(tabsRootContextKey);
21
+ if (!tabsRoot)
22
+ throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
23
+ const ns = useNamespace("tab-pane");
24
+ const index = ref();
25
+ const isClosable = computed(() => props.closable || tabsRoot.props.closable);
26
+ const active = eagerComputed(() => {
27
+ var _a;
28
+ return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
29
+ });
30
+ const loaded = ref(active.value);
31
+ const paneName = computed(() => {
32
+ var _a;
33
+ return (_a = props.name) != null ? _a : index.value;
34
+ });
35
+ const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
36
+ watch(active, (val) => {
37
+ if (val)
38
+ loaded.value = true;
39
+ });
40
+ const pane = reactive({
41
+ uid: instance.uid,
42
+ slots,
43
+ props,
44
+ paneName,
45
+ active,
46
+ index,
47
+ isClosable
48
+ });
49
+ tabsRoot.registerPane(pane);
50
+ onMounted(() => {
51
+ tabsRoot.sortPane(pane);
52
+ });
53
+ onUnmounted(() => {
54
+ tabsRoot.unregisterPane(pane.uid);
55
+ });
56
+ return (_ctx, _cache) => {
57
+ return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
58
+ key: 0,
59
+ id: `pane-${unref(paneName)}`,
60
+ class: normalizeClass(unref(ns).b()),
61
+ role: "tabpanel",
62
+ "aria-hidden": !unref(active),
63
+ "aria-labelledby": `tab-${unref(paneName)}`
64
+ }, [
65
+ renderSlot(_ctx.$slots, "default")
66
+ ], 10, ["id", "aria-hidden", "aria-labelledby"])), [
67
+ [vShow, unref(active)]
68
+ ]) : createCommentVNode("v-if", true);
69
+ };
70
+ }
71
+ });
72
+ var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-pane.vue"]]);
15
73
 
16
- export { tabPaneProps };
74
+ export { TabPane as default };
17
75
  //# sourceMappingURL=tab-pane.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\nexport const tabPaneProps = buildProps({\n /**\n * @description title of the tab\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'\n */\n name: {\n type: [String, Number],\n },\n /**\n * @description whether Tab is closable\n */\n closable: Boolean,\n /**\n * @description whether Tab is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Tab is lazily rendered\n */\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane>\n"],"names":[],"mappings":";;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,OAAO;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst slots = useSlots()\n\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <el-tabs><el-tab-pane /></el-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable || tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n})\n\ntabsRoot.registerPane(pane)\nonMounted(() => {\n tabsRoot.sortPane(pane)\n})\n\nonUnmounted(() => {\n tabsRoot.unregisterPane(pane.uid)\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;AAGA,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,QAAA,GAAW,OAAO,kBAAkB,CAAA,CAAA;AAC1C,IAAA,IAAI,CAAC,QAAA;AACH,MAAA,UAAA,CAAW,gBAAgB,4CAA4C,CAAA,CAAA;AAEzE,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAA,MAAM,QAAQ,GAAY,EAAA,CAAA;AAC1B,IAAA,MAAM,aAAa,QAAS,CAAA,MAAM,MAAM,QAAY,IAAA,QAAA,CAAS,MAAM,QAAQ,CAAA,CAAA;AAC3E,IAAA,MAAM,MAAS,GAAA,aAAA,CAAA,MAAA;AAAA,MACb,MAAM,CAAS;AAA2C,MAC5D,OAAA,QAAA,CAAA,WAAA,CAAA,KAAA,MAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,CAAA;AACA,KAAM,CAAA,CAAA;AACN,IAAA,MAAM,YAAoB,CAAA,MAAA,CAAA,KAAA,CAAM,CAAM;AACtC,IAAA,MAAM,QAAiB,GAAA,QAAA,CAAA,MAAA;AAAA,MACrB,MAAM,CAAC;AAAqC,MAC9C,OAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA;AAEA,KAAM,CAAA,CAAA;AACJ,IAAI,MAAA,cAAoB,GAAA,aAAA,CAAA,MAAA,CAAA,KAAA,CAAA,IAAA,IAAA,MAAA,CAAA,KAAA,IAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAC1B,KAAC,CAAA,MAAA,EAAA,CAAA,GAAA,KAAA;AAED,MAAA,IAAM;AAAgB,cACN,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAAA,IACA,MAAA,IAAA,GAAA,QAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,GAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACD,MAAA;AAED,MAAA,KAAA;AACA,MAAA,UAAgB;AACd,KAAA,CAAA,CAAA;AAAsB,IACxB,QAAC,CAAA,YAAA,CAAA,IAAA,CAAA,CAAA;AAED,IAAA,SAAA,CAAA,MAAkB;AAChB,MAAS,QAAA,CAAA,QAAA,CAAA,IAAA,CAAA,CAAe;AAAQ,KACjC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}