@element-plus/nightly 0.0.20241122 → 0.0.20241124

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. package/dist/index.full.js +26 -12
  2. package/dist/index.full.min.js +15 -15
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +15 -15
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +26 -13
  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/autocomplete/src/autocomplete.vue.d.ts +2 -2
  252. package/es/components/card/index.mjs +2 -2
  253. package/es/components/card/src/card.mjs +43 -21
  254. package/es/components/card/src/card.mjs.map +1 -1
  255. package/es/components/card/src/card2.mjs +21 -43
  256. package/es/components/card/src/card2.mjs.map +1 -1
  257. package/es/components/checkbox/index.mjs +2 -2
  258. package/es/components/checkbox/src/checkbox-group.mjs +30 -73
  259. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  260. package/es/components/checkbox/src/checkbox-group2.mjs +73 -30
  261. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  262. package/es/components/date-picker/src/date-picker.d.ts +12 -11
  263. package/es/components/date-picker/src/date-picker.mjs.map +1 -1
  264. package/es/components/index.mjs +6 -6
  265. package/es/components/input/src/input.vue.d.ts +1 -1
  266. package/es/components/input/src/input2.mjs +4 -4
  267. package/es/components/input/src/input2.mjs.map +1 -1
  268. package/es/components/mention/src/mention-dropdown.mjs +167 -15
  269. package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
  270. package/es/components/mention/src/mention-dropdown2.mjs +15 -167
  271. package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
  272. package/es/components/mention/src/mention.vue.d.ts +2 -2
  273. package/es/components/mention/src/mention2.mjs +1 -1
  274. package/es/components/menu/index.mjs +2 -2
  275. package/es/components/menu/src/menu-item.mjs +97 -14
  276. package/es/components/menu/src/menu-item.mjs.map +1 -1
  277. package/es/components/menu/src/menu-item2.mjs +14 -97
  278. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  279. package/es/components/segmented/index.mjs +2 -2
  280. package/es/components/segmented/src/segmented.mjs +169 -34
  281. package/es/components/segmented/src/segmented.mjs.map +1 -1
  282. package/es/components/segmented/src/segmented2.mjs +34 -169
  283. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  284. package/es/components/skeleton/index.mjs +2 -2
  285. package/es/components/skeleton/src/skeleton-item.mjs +18 -23
  286. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  287. package/es/components/skeleton/src/skeleton-item2.mjs +23 -18
  288. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  289. package/es/components/skeleton/src/skeleton2.mjs +1 -1
  290. package/es/components/time-picker/index.mjs +1 -1
  291. package/es/components/time-picker/src/common/picker.mjs +5 -5
  292. package/es/components/time-picker/src/common/picker.mjs.map +1 -1
  293. package/es/components/time-picker/src/utils.d.ts +2 -0
  294. package/es/components/time-picker/src/utils.mjs +4 -1
  295. package/es/components/time-picker/src/utils.mjs.map +1 -1
  296. package/es/components/transfer/src/transfer-panel.vue.d.ts +1 -0
  297. package/es/components/transfer/src/transfer-panel2.mjs +6 -2
  298. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  299. package/es/components/transfer/src/transfer.vue.d.ts +4 -0
  300. package/es/components/transfer/src/transfer2.mjs +6 -0
  301. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  302. package/es/index.mjs +6 -6
  303. package/es/version.d.ts +1 -1
  304. package/es/version.mjs +1 -1
  305. package/es/version.mjs.map +1 -1
  306. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
  307. package/lib/components/card/index.js +2 -2
  308. package/lib/components/card/src/card.js +43 -21
  309. package/lib/components/card/src/card.js.map +1 -1
  310. package/lib/components/card/src/card2.js +21 -43
  311. package/lib/components/card/src/card2.js.map +1 -1
  312. package/lib/components/checkbox/index.js +2 -2
  313. package/lib/components/checkbox/src/checkbox-group.js +31 -73
  314. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  315. package/lib/components/checkbox/src/checkbox-group2.js +73 -31
  316. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  317. package/lib/components/date-picker/src/date-picker.d.ts +12 -11
  318. package/lib/components/date-picker/src/date-picker.js.map +1 -1
  319. package/lib/components/index.js +6 -5
  320. package/lib/components/index.js.map +1 -1
  321. package/lib/components/input/src/input.vue.d.ts +1 -1
  322. package/lib/components/input/src/input2.js +4 -4
  323. package/lib/components/input/src/input2.js.map +1 -1
  324. package/lib/components/mention/src/mention-dropdown.js +167 -16
  325. package/lib/components/mention/src/mention-dropdown.js.map +1 -1
  326. package/lib/components/mention/src/mention-dropdown2.js +16 -167
  327. package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
  328. package/lib/components/mention/src/mention.vue.d.ts +2 -2
  329. package/lib/components/mention/src/mention2.js +1 -1
  330. package/lib/components/menu/index.js +2 -2
  331. package/lib/components/menu/src/menu-item.js +97 -15
  332. package/lib/components/menu/src/menu-item.js.map +1 -1
  333. package/lib/components/menu/src/menu-item2.js +15 -97
  334. package/lib/components/menu/src/menu-item2.js.map +1 -1
  335. package/lib/components/segmented/index.js +2 -2
  336. package/lib/components/segmented/src/segmented.js +168 -34
  337. package/lib/components/segmented/src/segmented.js.map +1 -1
  338. package/lib/components/segmented/src/segmented2.js +34 -168
  339. package/lib/components/segmented/src/segmented2.js.map +1 -1
  340. package/lib/components/skeleton/index.js +2 -2
  341. package/lib/components/skeleton/src/skeleton-item.js +18 -23
  342. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  343. package/lib/components/skeleton/src/skeleton-item2.js +23 -18
  344. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  345. package/lib/components/skeleton/src/skeleton2.js +1 -1
  346. package/lib/components/time-picker/index.js +1 -0
  347. package/lib/components/time-picker/index.js.map +1 -1
  348. package/lib/components/time-picker/src/common/picker.js +4 -4
  349. package/lib/components/time-picker/src/common/picker.js.map +1 -1
  350. package/lib/components/time-picker/src/utils.d.ts +2 -0
  351. package/lib/components/time-picker/src/utils.js +4 -0
  352. package/lib/components/time-picker/src/utils.js.map +1 -1
  353. package/lib/components/transfer/src/transfer-panel.vue.d.ts +1 -0
  354. package/lib/components/transfer/src/transfer-panel2.js +6 -2
  355. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  356. package/lib/components/transfer/src/transfer.vue.d.ts +4 -0
  357. package/lib/components/transfer/src/transfer2.js +6 -0
  358. package/lib/components/transfer/src/transfer2.js.map +1 -1
  359. package/lib/index.js +6 -5
  360. package/lib/index.js.map +1 -1
  361. package/lib/version.d.ts +1 -1
  362. package/lib/version.js +1 -1
  363. package/lib/version.js.map +1 -1
  364. package/package.json +2 -2
  365. package/theme-chalk/src/segmented.scss +1 -1
  366. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"picker.mjs","sources":["../../../../../../../packages/components/time-picker/src/common/picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"refPopper\"\n :visible=\"pickerVisible\"\n effect=\"light\"\n pure\n trigger=\"click\"\n v-bind=\"$attrs\"\n role=\"dialog\"\n teleported\n :transition=\"`${nsDate.namespace.value}-zoom-in-top`\"\n :popper-class=\"[`${nsDate.namespace.value}-picker__popper`, popperClass]\"\n :popper-options=\"elPopperOptions\"\n :fallback-placements=\"fallbackPlacements\"\n :gpu-acceleration=\"false\"\n :placement=\"placement\"\n :stop-popper-mouse-event=\"false\"\n :hide-after=\"0\"\n persistent\n @before-show=\"onBeforeShow\"\n @show=\"onShow\"\n @hide=\"onHide\"\n >\n <template #default>\n <el-input\n v-if=\"!isRangeInput\"\n :id=\"(id as string | undefined)\"\n ref=\"inputRef\"\n container-role=\"combobox\"\n :model-value=\"(displayValue as string)\"\n :name=\"name\"\n :size=\"pickerSize\"\n :disabled=\"pickerDisabled\"\n :placeholder=\"placeholder\"\n :class=\"[nsDate.b('editor'), nsDate.bm('editor', type), $attrs.class]\"\n :style=\"$attrs.style\"\n :readonly=\"\n !editable ||\n readonly ||\n isDatesPicker ||\n isMonthsPicker ||\n isYearsPicker ||\n type === 'week'\n \"\n :aria-label=\"ariaLabel\"\n :tabindex=\"tabindex\"\n :validate-event=\"false\"\n @input=\"onUserInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydownInput\"\n @change=\"handleChange\"\n @mousedown=\"onMouseDownInput\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n @touchstart.passive=\"onTouchStartInput\"\n @click.stop\n >\n <template #prefix>\n <el-icon\n v-if=\"triggerIcon\"\n :class=\"nsInput.e('icon')\"\n @mousedown.prevent=\"onMouseDownInput\"\n @touchstart.passive=\"onTouchStartInput\"\n >\n <component :is=\"triggerIcon\" />\n </el-icon>\n </template>\n <template #suffix>\n <el-icon\n v-if=\"showClose && clearIcon\"\n :class=\"`${nsInput.e('icon')} clear-icon`\"\n @mousedown.prevent=\"NOOP\"\n @click=\"onClearIconClick\"\n >\n <component :is=\"clearIcon\" />\n </el-icon>\n </template>\n </el-input>\n <picker-range-trigger\n v-else\n :id=\"(id as string[] | undefined)\"\n ref=\"inputRef\"\n :model-value=\"displayValue\"\n :name=\"(name as string[] | undefined)\"\n :disabled=\"pickerDisabled\"\n :readonly=\"!editable || readonly\"\n :start-placeholder=\"startPlaceholder\"\n :end-placeholder=\"endPlaceholder\"\n :class=\"rangeInputKls\"\n :style=\"$attrs.style\"\n :aria-label=\"ariaLabel\"\n :tabindex=\"tabindex\"\n autocomplete=\"off\"\n role=\"combobox\"\n @click=\"onMouseDownInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @start-input=\"handleStartInput\"\n @start-change=\"handleStartChange\"\n @end-input=\"handleEndInput\"\n @end-change=\"handleEndChange\"\n @mousedown=\"onMouseDownInput\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n @touchstart.passive=\"onTouchStartInput\"\n @keydown=\"handleKeydownInput\"\n >\n <template #prefix>\n <el-icon\n v-if=\"triggerIcon\"\n :class=\"[nsInput.e('icon'), nsRange.e('icon')]\"\n >\n <component :is=\"triggerIcon\" />\n </el-icon>\n </template>\n <template #range-separator>\n <slot name=\"range-separator\">\n <span :class=\"nsRange.b('separator')\">{{ rangeSeparator }}</span>\n </slot>\n </template>\n <template #suffix>\n <el-icon\n v-if=\"clearIcon\"\n :class=\"clearIconKls\"\n @mousedown.prevent=\"NOOP\"\n @click=\"onClearIconClick\"\n >\n <component :is=\"clearIcon\" />\n </el-icon>\n </template>\n </picker-range-trigger>\n </template>\n <template #content>\n <slot\n :visible=\"pickerVisible\"\n :actual-visible=\"pickerActualVisible\"\n :parsed-value=\"parsedValue\"\n :format=\"format\"\n :date-format=\"dateFormat\"\n :time-format=\"timeFormat\"\n :unlink-panels=\"unlinkPanels\"\n :type=\"type\"\n :default-value=\"defaultValue\"\n :show-now=\"showNow\"\n @pick=\"onPick\"\n @select-range=\"setSelectionRange\"\n @set-picker-option=\"onSetPickerOption\"\n @calendar-change=\"onCalendarChange\"\n @panel-change=\"onPanelChange\"\n @mousedown.stop\n />\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n inject,\n nextTick,\n onBeforeUnmount,\n provide,\n ref,\n unref,\n useAttrs,\n watch,\n} from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { onClickOutside, unrefElement } from '@vueuse/core'\nimport {\n useEmptyValues,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport { useFormItem, useFormSize } from '@element-plus/components/form'\nimport ElInput from '@element-plus/components/input'\nimport ElIcon from '@element-plus/components/icon'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { NOOP, debugWarn, isArray } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { Calendar, Clock } from '@element-plus/icons-vue'\nimport { formatter, parseDate, valueEquals } from '../utils'\nimport { timePickerDefaultProps } from './props'\nimport PickerRangeTrigger from './picker-range-trigger.vue'\nimport type { InputInstance } from '@element-plus/components/input'\n\nimport type { Dayjs } from 'dayjs'\nimport type { ComponentPublicInstance, Ref } from 'vue'\nimport type { Options } from '@popperjs/core'\nimport type {\n DateModelType,\n DateOrDates,\n DayOrDays,\n PickerOptions,\n SingleOrRange,\n TimePickerDefaultProps,\n UserInput,\n} from './props'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\n// Date object and string\n\ndefineOptions({\n name: 'Picker',\n})\n\nconst props = defineProps(timePickerDefaultProps)\nconst emit = defineEmits([\n 'update:modelValue',\n 'change',\n 'focus',\n 'blur',\n 'clear',\n 'calendar-change',\n 'panel-change',\n 'visible-change',\n 'keydown',\n])\nconst attrs = useAttrs()\n\nconst { lang } = useLocale()\n\nconst nsDate = useNamespace('date')\nconst nsInput = useNamespace('input')\nconst nsRange = useNamespace('range')\n\nconst { form, formItem } = useFormItem()\nconst elPopperOptions = inject('ElPopperOptions', {} as Options)\nconst { valueOnClear } = useEmptyValues(props, null)\n\nconst refPopper = ref<TooltipInstance>()\nconst inputRef = ref<InputInstance>()\nconst pickerVisible = ref(false)\nconst pickerActualVisible = ref(false)\nconst valueOnOpen = ref<TimePickerDefaultProps['modelValue'] | null>(null)\nlet hasJustTabExitedInput = false\n\nconst { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, {\n beforeFocus() {\n return props.readonly || pickerDisabled.value\n },\n afterFocus() {\n pickerVisible.value = true\n },\n beforeBlur(event) {\n return (\n !hasJustTabExitedInput && refPopper.value?.isFocusInsideContent(event)\n )\n },\n afterBlur() {\n handleChange()\n pickerVisible.value = false\n hasJustTabExitedInput = false\n props.validateEvent &&\n formItem?.validate('blur').catch((err) => debugWarn(err))\n },\n})\n\nconst rangeInputKls = computed(() => [\n nsDate.b('editor'),\n nsDate.bm('editor', props.type),\n nsInput.e('wrapper'),\n nsDate.is('disabled', pickerDisabled.value),\n nsDate.is('active', pickerVisible.value),\n nsRange.b('editor'),\n pickerSize ? nsRange.bm('editor', pickerSize.value) : '',\n attrs.class,\n])\n\nconst clearIconKls = computed(() => [\n nsInput.e('icon'),\n nsRange.e('close-icon'),\n !showClose.value ? nsRange.e('close-icon--hidden') : '',\n])\n\nwatch(pickerVisible, (val) => {\n if (!val) {\n userInput.value = null\n nextTick(() => {\n emitChange(props.modelValue)\n })\n } else {\n nextTick(() => {\n if (val) {\n valueOnOpen.value = props.modelValue\n }\n })\n }\n})\nconst emitChange = (\n val: TimePickerDefaultProps['modelValue'] | null,\n isClear?: boolean\n) => {\n // determine user real change only\n if (isClear || !valueEquals(val, valueOnOpen.value)) {\n emit('change', val)\n props.validateEvent &&\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n}\nconst emitInput = (input: SingleOrRange<DateModelType | Dayjs> | null) => {\n if (!valueEquals(props.modelValue, input)) {\n let formatted\n if (isArray(input)) {\n formatted = input.map((item) =>\n formatter(item, props.valueFormat, lang.value)\n )\n } else if (input) {\n formatted = formatter(input, props.valueFormat, lang.value)\n }\n emit('update:modelValue', input ? formatted : input, lang.value)\n }\n}\nconst emitKeydown = (e: KeyboardEvent) => {\n emit('keydown', e)\n}\n\nconst refInput = computed<HTMLInputElement[]>(() => {\n if (inputRef.value) {\n return Array.from<HTMLInputElement>(\n inputRef.value.$el.querySelectorAll('input')\n )\n }\n return []\n})\n\n// @ts-ignore\nconst setSelectionRange = (start: number, end: number, pos?: 'min' | 'max') => {\n const _inputs = refInput.value\n if (!_inputs.length) return\n if (!pos || pos === 'min') {\n _inputs[0].setSelectionRange(start, end)\n _inputs[0].focus()\n } else if (pos === 'max') {\n _inputs[1].setSelectionRange(start, end)\n _inputs[1].focus()\n }\n}\n\nconst onPick = (date: any = '', visible = false) => {\n pickerVisible.value = visible\n let result\n if (isArray(date)) {\n result = date.map((_) => _.toDate())\n } else {\n // clear btn emit null\n result = date ? date.toDate() : date\n }\n userInput.value = null\n emitInput(result)\n}\n\nconst onBeforeShow = () => {\n pickerActualVisible.value = true\n}\n\nconst onShow = () => {\n emit('visible-change', true)\n}\n\nconst onHide = () => {\n pickerActualVisible.value = false\n pickerVisible.value = false\n emit('visible-change', false)\n}\n\nconst handleOpen = () => {\n pickerVisible.value = true\n}\n\nconst handleClose = () => {\n pickerVisible.value = false\n}\n\nconst pickerDisabled = computed(() => {\n return props.disabled || form?.disabled\n})\n\nconst parsedValue = computed(() => {\n let dayOrDays: DayOrDays\n if (valueIsEmpty.value) {\n if (pickerOptions.value.getDefaultValue) {\n dayOrDays = pickerOptions.value.getDefaultValue()\n }\n } else {\n if (isArray(props.modelValue)) {\n dayOrDays = props.modelValue.map((d) =>\n parseDate(d, props.valueFormat, lang.value)\n ) as [Dayjs, Dayjs]\n } else {\n dayOrDays = parseDate(props.modelValue, props.valueFormat, lang.value)!\n }\n }\n\n if (pickerOptions.value.getRangeAvailableTime) {\n const availableResult = pickerOptions.value.getRangeAvailableTime(\n dayOrDays!\n )\n if (!isEqual(availableResult, dayOrDays!)) {\n dayOrDays = availableResult\n\n // The result is corrected only when model-value exists\n if (!valueIsEmpty.value) {\n emitInput(\n (isArray(dayOrDays)\n ? dayOrDays.map((_) => _.toDate())\n : dayOrDays.toDate()) as SingleOrRange<Date>\n )\n }\n }\n }\n if (isArray(dayOrDays!) && dayOrDays.some((day) => !day)) {\n dayOrDays = [] as unknown as DayOrDays\n }\n return dayOrDays!\n})\n\nconst displayValue = computed<UserInput>(() => {\n if (!pickerOptions.value.panelReady) return ''\n const formattedValue = formatDayjsToString(parsedValue.value)\n if (isArray(userInput.value)) {\n return [\n userInput.value[0] || (formattedValue && formattedValue[0]) || '',\n userInput.value[1] || (formattedValue && formattedValue[1]) || '',\n ]\n } else if (userInput.value !== null) {\n return userInput.value\n }\n if (!isTimePicker.value && valueIsEmpty.value) return ''\n if (!pickerVisible.value && valueIsEmpty.value) return ''\n if (formattedValue) {\n return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value\n ? (formattedValue as Array<string>).join(', ')\n : formattedValue\n }\n return ''\n})\n\nconst isTimeLikePicker = computed(() => props.type.includes('time'))\n\nconst isTimePicker = computed(() => props.type.startsWith('time'))\n\nconst isDatesPicker = computed(() => props.type === 'dates')\n\nconst isMonthsPicker = computed(() => props.type === 'months')\n\nconst isYearsPicker = computed(() => props.type === 'years')\n\nconst triggerIcon = computed(\n () => props.prefixIcon || (isTimeLikePicker.value ? Clock : Calendar)\n)\n\nconst showClose = ref(false)\n\nconst onClearIconClick = (event: MouseEvent) => {\n if (props.readonly || pickerDisabled.value) return\n if (showClose.value) {\n event.stopPropagation()\n // When the handleClear Function was provided, emit null will be executed inside it\n // There is no need for us to execute emit null twice. #14752\n if (pickerOptions.value.handleClear) {\n pickerOptions.value.handleClear()\n } else {\n emitInput(valueOnClear.value)\n }\n emitChange(valueOnClear.value, true)\n showClose.value = false\n onHide()\n }\n emit('clear')\n}\n\nconst valueIsEmpty = computed(() => {\n const { modelValue } = props\n return (\n !modelValue || (isArray(modelValue) && !modelValue.filter(Boolean).length)\n )\n})\n\nconst onMouseDownInput = async (event: MouseEvent) => {\n if (props.readonly || pickerDisabled.value) return\n if ((event.target as HTMLElement)?.tagName !== 'INPUT' || isFocused.value) {\n pickerVisible.value = true\n }\n}\nconst onMouseEnter = () => {\n if (props.readonly || pickerDisabled.value) return\n if (!valueIsEmpty.value && props.clearable) {\n showClose.value = true\n }\n}\nconst onMouseLeave = () => {\n showClose.value = false\n}\n\nconst onTouchStartInput = (event: TouchEvent) => {\n if (props.readonly || pickerDisabled.value) return\n if (\n (event.touches[0].target as HTMLElement)?.tagName !== 'INPUT' ||\n isFocused.value\n ) {\n pickerVisible.value = true\n }\n}\n\nconst isRangeInput = computed(() => {\n return props.type.includes('range')\n})\n\nconst pickerSize = useFormSize()\n\nconst popperEl = computed(() => unref(refPopper)?.popperRef?.contentRef)\n\nconst stophandle = onClickOutside(\n inputRef as Ref<ComponentPublicInstance>,\n (e: PointerEvent) => {\n const unrefedPopperEl = unref(popperEl)\n const inputEl = unrefElement(inputRef as Ref<ComponentPublicInstance>)\n if (\n (unrefedPopperEl &&\n (e.target === unrefedPopperEl ||\n e.composedPath().includes(unrefedPopperEl))) ||\n e.target === inputEl ||\n (inputEl && e.composedPath().includes(inputEl))\n )\n return\n pickerVisible.value = false\n }\n)\n\nonBeforeUnmount(() => {\n stophandle?.()\n})\n\nconst userInput = ref<UserInput>(null)\n\nconst handleChange = () => {\n if (userInput.value) {\n const value = parseUserInputToDayjs(displayValue.value)\n if (value) {\n if (isValidValue(value)) {\n emitInput(\n (isArray(value)\n ? value.map((_) => _.toDate())\n : value.toDate()) as DateOrDates\n )\n userInput.value = null\n }\n }\n }\n if (userInput.value === '') {\n emitInput(valueOnClear.value)\n emitChange(valueOnClear.value)\n userInput.value = null\n }\n}\n\nconst parseUserInputToDayjs = (value: UserInput) => {\n if (!value) return null\n return pickerOptions.value.parseUserInput!(value)\n}\n\nconst formatDayjsToString = (value: DayOrDays) => {\n if (!value) return null\n return pickerOptions.value.formatToString!(value)\n}\n\nconst isValidValue = (value: DayOrDays) => {\n return pickerOptions.value.isValidValue!(value)\n}\n\nconst handleKeydownInput = async (event: Event | KeyboardEvent) => {\n if (props.readonly || pickerDisabled.value) return\n\n const { code } = event as KeyboardEvent\n emitKeydown(event as KeyboardEvent)\n if (code === EVENT_CODE.esc) {\n if (pickerVisible.value === true) {\n pickerVisible.value = false\n event.preventDefault()\n event.stopPropagation()\n }\n return\n }\n\n if (code === EVENT_CODE.down) {\n if (pickerOptions.value.handleFocusPicker) {\n event.preventDefault()\n event.stopPropagation()\n }\n if (pickerVisible.value === false) {\n pickerVisible.value = true\n await nextTick()\n }\n if (pickerOptions.value.handleFocusPicker) {\n pickerOptions.value.handleFocusPicker()\n return\n }\n }\n\n if (code === EVENT_CODE.tab) {\n hasJustTabExitedInput = true\n return\n }\n\n if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {\n if (\n userInput.value === null ||\n userInput.value === '' ||\n isValidValue(parseUserInputToDayjs(displayValue.value) as DayOrDays)\n ) {\n handleChange()\n pickerVisible.value = false\n }\n event.stopPropagation()\n return\n }\n\n // if user is typing, do not let picker handle key input\n if (userInput.value) {\n event.stopPropagation()\n return\n }\n if (pickerOptions.value.handleKeydownInput) {\n pickerOptions.value.handleKeydownInput(event as KeyboardEvent)\n }\n}\nconst onUserInput = (e: string) => {\n userInput.value = e\n // Temporary fix when the picker is dismissed and the input box\n // is focused, just mimic the behavior of antdesign.\n if (!pickerVisible.value) {\n pickerVisible.value = true\n }\n}\n\nconst handleStartInput = (event: Event) => {\n const target = event.target as HTMLInputElement\n if (userInput.value) {\n userInput.value = [target.value, userInput.value[1]]\n } else {\n userInput.value = [target.value, null]\n }\n}\n\nconst handleEndInput = (event: Event) => {\n const target = event.target as HTMLInputElement\n if (userInput.value) {\n userInput.value = [userInput.value[0], target.value]\n } else {\n userInput.value = [null, target.value]\n }\n}\n\nconst handleStartChange = () => {\n const values = userInput.value as string[]\n const value = parseUserInputToDayjs(values && values[0]) as Dayjs\n const parsedVal = unref(parsedValue) as [Dayjs, Dayjs]\n if (value && value.isValid()) {\n userInput.value = [\n formatDayjsToString(value) as string,\n displayValue.value?.[1] || null,\n ]\n const newValue = [value, parsedVal && (parsedVal[1] || null)] as DayOrDays\n if (isValidValue(newValue)) {\n emitInput(newValue)\n userInput.value = null\n }\n }\n}\n\nconst handleEndChange = () => {\n const values = unref(userInput) as string[]\n const value = parseUserInputToDayjs(values && values[1]) as Dayjs\n const parsedVal = unref(parsedValue) as [Dayjs, Dayjs]\n if (value && value.isValid()) {\n userInput.value = [\n unref(displayValue)?.[0] || null,\n formatDayjsToString(value) as string,\n ]\n const newValue = [parsedVal && parsedVal[0], value] as DayOrDays\n if (isValidValue(newValue)) {\n emitInput(newValue)\n userInput.value = null\n }\n }\n}\n\nconst pickerOptions = ref<Partial<PickerOptions>>({})\n// @ts-ignore\nconst onSetPickerOption = <T extends keyof PickerOptions>(\n e: [T, PickerOptions[T]]\n) => {\n pickerOptions.value[e[0]] = e[1]\n pickerOptions.value.panelReady = true\n}\n\n// @ts-ignore\nconst onCalendarChange = (e: [Date, null | Date]) => {\n emit('calendar-change', e)\n}\n\n// @ts-ignore\nconst onPanelChange = (\n value: [Dayjs, Dayjs],\n mode: 'month' | 'year',\n view: unknown\n) => {\n emit('panel-change', value, mode, view)\n}\n\nconst focus = () => {\n inputRef.value?.focus()\n}\n\nconst blur = () => {\n inputRef.value?.blur()\n}\n\nprovide('EP_PICKER_BASE', {\n props,\n})\n\ndefineExpose({\n /**\n * @description focus input box.\n */\n focus,\n /**\n * @description blur input box.\n */\n blur,\n /**\n * @description opens picker\n */\n handleOpen,\n /**\n * @description closes picker\n */\n handleClose,\n /**\n * @description pick item manually\n */\n onPick,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;mCA2Mc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;AAcA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IA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AAA,IAAA,EAAA,CAAA;AAED,KAAa,CAAA;AAAA,IAAA,OAAA,CAAA,gBAAA,EAAA;AAAA,MAAA,KAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAIX,MAAA,CAAA;AAAA,MAAA,KAAA;AAAA,MAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAIA,WAAA;AAAA,MAAA,MAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAIA,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,KAAA,CAAA,SAAA,CAAA,EAAAC,UAAA,CAAA;AAAA,QAAA,OAAA,EAAA,WAAA;AAAA,QAAA,GAAA,EAAA,SAAA;AAAA,QAAA,OAAA,EAAA,aAAA,CAAA,KAAA;AAAA,QAIA,MAAA,EAAA,OAAA;AAAA,QAAA,IAAA,EAAA,EAAA;AAAA,QAAA,OAAA,EAAA,OAAA;AAAA,OAAA,EAAA,IAAA,CAAA,MAAA,EAAA;AAAA,QAIA,IAAA,EAAA,QAAA;AAAA,QACD,UAAA,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"picker.mjs","sources":["../../../../../../../packages/components/time-picker/src/common/picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"refPopper\"\n :visible=\"pickerVisible\"\n effect=\"light\"\n pure\n trigger=\"click\"\n v-bind=\"$attrs\"\n role=\"dialog\"\n teleported\n :transition=\"`${nsDate.namespace.value}-zoom-in-top`\"\n :popper-class=\"[`${nsDate.namespace.value}-picker__popper`, popperClass]\"\n :popper-options=\"elPopperOptions\"\n :fallback-placements=\"fallbackPlacements\"\n :gpu-acceleration=\"false\"\n :placement=\"placement\"\n :stop-popper-mouse-event=\"false\"\n :hide-after=\"0\"\n persistent\n @before-show=\"onBeforeShow\"\n @show=\"onShow\"\n @hide=\"onHide\"\n >\n <template #default>\n <el-input\n v-if=\"!isRangeInput\"\n :id=\"(id as string | undefined)\"\n ref=\"inputRef\"\n container-role=\"combobox\"\n :model-value=\"(displayValue as string)\"\n :name=\"name\"\n :size=\"pickerSize\"\n :disabled=\"pickerDisabled\"\n :placeholder=\"placeholder\"\n :class=\"[nsDate.b('editor'), nsDate.bm('editor', type), $attrs.class]\"\n :style=\"$attrs.style\"\n :readonly=\"\n !editable ||\n readonly ||\n isDatesPicker ||\n isMonthsPicker ||\n isYearsPicker ||\n type === 'week'\n \"\n :aria-label=\"ariaLabel\"\n :tabindex=\"tabindex\"\n :validate-event=\"false\"\n @input=\"onUserInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydownInput\"\n @change=\"handleChange\"\n @mousedown=\"onMouseDownInput\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n @touchstart.passive=\"onTouchStartInput\"\n @click.stop\n >\n <template #prefix>\n <el-icon\n v-if=\"triggerIcon\"\n :class=\"nsInput.e('icon')\"\n @mousedown.prevent=\"onMouseDownInput\"\n @touchstart.passive=\"onTouchStartInput\"\n >\n <component :is=\"triggerIcon\" />\n </el-icon>\n </template>\n <template #suffix>\n <el-icon\n v-if=\"showClose && clearIcon\"\n :class=\"`${nsInput.e('icon')} clear-icon`\"\n @mousedown.prevent=\"NOOP\"\n @click=\"onClearIconClick\"\n >\n <component :is=\"clearIcon\" />\n </el-icon>\n </template>\n </el-input>\n <picker-range-trigger\n v-else\n :id=\"(id as string[] | undefined)\"\n ref=\"inputRef\"\n :model-value=\"displayValue\"\n :name=\"(name as string[] | undefined)\"\n :disabled=\"pickerDisabled\"\n :readonly=\"!editable || readonly\"\n :start-placeholder=\"startPlaceholder\"\n :end-placeholder=\"endPlaceholder\"\n :class=\"rangeInputKls\"\n :style=\"$attrs.style\"\n :aria-label=\"ariaLabel\"\n :tabindex=\"tabindex\"\n autocomplete=\"off\"\n role=\"combobox\"\n @click=\"onMouseDownInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @start-input=\"handleStartInput\"\n @start-change=\"handleStartChange\"\n @end-input=\"handleEndInput\"\n @end-change=\"handleEndChange\"\n @mousedown=\"onMouseDownInput\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n @touchstart.passive=\"onTouchStartInput\"\n @keydown=\"handleKeydownInput\"\n >\n <template #prefix>\n <el-icon\n v-if=\"triggerIcon\"\n :class=\"[nsInput.e('icon'), nsRange.e('icon')]\"\n >\n <component :is=\"triggerIcon\" />\n </el-icon>\n </template>\n <template #range-separator>\n <slot name=\"range-separator\">\n <span :class=\"nsRange.b('separator')\">{{ rangeSeparator }}</span>\n </slot>\n </template>\n <template #suffix>\n <el-icon\n v-if=\"clearIcon\"\n :class=\"clearIconKls\"\n @mousedown.prevent=\"NOOP\"\n @click=\"onClearIconClick\"\n >\n <component :is=\"clearIcon\" />\n </el-icon>\n </template>\n </picker-range-trigger>\n </template>\n <template #content>\n <slot\n :visible=\"pickerVisible\"\n :actual-visible=\"pickerActualVisible\"\n :parsed-value=\"parsedValue\"\n :format=\"format\"\n :date-format=\"dateFormat\"\n :time-format=\"timeFormat\"\n :unlink-panels=\"unlinkPanels\"\n :type=\"type\"\n :default-value=\"defaultValue\"\n :show-now=\"showNow\"\n @pick=\"onPick\"\n @select-range=\"setSelectionRange\"\n @set-picker-option=\"onSetPickerOption\"\n @calendar-change=\"onCalendarChange\"\n @panel-change=\"onPanelChange\"\n @mousedown.stop\n />\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n inject,\n nextTick,\n onBeforeUnmount,\n provide,\n ref,\n unref,\n useAttrs,\n watch,\n} from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { onClickOutside, unrefElement } from '@vueuse/core'\nimport {\n useEmptyValues,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport { useFormItem, useFormSize } from '@element-plus/components/form'\nimport ElInput from '@element-plus/components/input'\nimport ElIcon from '@element-plus/components/icon'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { NOOP, debugWarn, isArray } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { Calendar, Clock } from '@element-plus/icons-vue'\nimport { dayOrDaysToDate, formatter, parseDate, valueEquals } from '../utils'\nimport { timePickerDefaultProps } from './props'\nimport PickerRangeTrigger from './picker-range-trigger.vue'\nimport type { InputInstance } from '@element-plus/components/input'\n\nimport type { Dayjs } from 'dayjs'\nimport type { ComponentPublicInstance, Ref } from 'vue'\nimport type { Options } from '@popperjs/core'\nimport type {\n DateModelType,\n DayOrDays,\n PickerOptions,\n SingleOrRange,\n TimePickerDefaultProps,\n UserInput,\n} from './props'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'Picker',\n})\n\nconst props = defineProps(timePickerDefaultProps)\nconst emit = defineEmits([\n 'update:modelValue',\n 'change',\n 'focus',\n 'blur',\n 'clear',\n 'calendar-change',\n 'panel-change',\n 'visible-change',\n 'keydown',\n])\nconst attrs = useAttrs()\n\nconst { lang } = useLocale()\n\nconst nsDate = useNamespace('date')\nconst nsInput = useNamespace('input')\nconst nsRange = useNamespace('range')\n\nconst { form, formItem } = useFormItem()\nconst elPopperOptions = inject('ElPopperOptions', {} as Options)\nconst { valueOnClear } = useEmptyValues(props, null)\n\nconst refPopper = ref<TooltipInstance>()\nconst inputRef = ref<InputInstance>()\nconst pickerVisible = ref(false)\nconst pickerActualVisible = ref(false)\nconst valueOnOpen = ref<TimePickerDefaultProps['modelValue'] | null>(null)\nlet hasJustTabExitedInput = false\n\nconst { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, {\n beforeFocus() {\n return props.readonly || pickerDisabled.value\n },\n afterFocus() {\n pickerVisible.value = true\n },\n beforeBlur(event) {\n return (\n !hasJustTabExitedInput && refPopper.value?.isFocusInsideContent(event)\n )\n },\n afterBlur() {\n handleChange()\n pickerVisible.value = false\n hasJustTabExitedInput = false\n props.validateEvent &&\n formItem?.validate('blur').catch((err) => debugWarn(err))\n },\n})\n\nconst rangeInputKls = computed(() => [\n nsDate.b('editor'),\n nsDate.bm('editor', props.type),\n nsInput.e('wrapper'),\n nsDate.is('disabled', pickerDisabled.value),\n nsDate.is('active', pickerVisible.value),\n nsRange.b('editor'),\n pickerSize ? nsRange.bm('editor', pickerSize.value) : '',\n attrs.class,\n])\n\nconst clearIconKls = computed(() => [\n nsInput.e('icon'),\n nsRange.e('close-icon'),\n !showClose.value ? nsRange.e('close-icon--hidden') : '',\n])\n\nwatch(pickerVisible, (val) => {\n if (!val) {\n userInput.value = null\n nextTick(() => {\n emitChange(props.modelValue)\n })\n } else {\n nextTick(() => {\n if (val) {\n valueOnOpen.value = props.modelValue\n }\n })\n }\n})\nconst emitChange = (\n val: TimePickerDefaultProps['modelValue'] | null,\n isClear?: boolean\n) => {\n // determine user real change only\n if (isClear || !valueEquals(val, valueOnOpen.value)) {\n emit('change', val)\n props.validateEvent &&\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n}\nconst emitInput = (input: SingleOrRange<DateModelType> | null) => {\n if (!valueEquals(props.modelValue, input)) {\n let formatted\n if (isArray(input)) {\n formatted = input.map((item) =>\n formatter(item, props.valueFormat, lang.value)\n )\n } else if (input) {\n formatted = formatter(input, props.valueFormat, lang.value)\n }\n emit('update:modelValue', input ? formatted : input, lang.value)\n }\n}\nconst emitKeydown = (e: KeyboardEvent) => {\n emit('keydown', e)\n}\n\nconst refInput = computed<HTMLInputElement[]>(() => {\n if (inputRef.value) {\n return Array.from<HTMLInputElement>(\n inputRef.value.$el.querySelectorAll('input')\n )\n }\n return []\n})\n\n// @ts-ignore\nconst setSelectionRange = (start: number, end: number, pos?: 'min' | 'max') => {\n const _inputs = refInput.value\n if (!_inputs.length) return\n if (!pos || pos === 'min') {\n _inputs[0].setSelectionRange(start, end)\n _inputs[0].focus()\n } else if (pos === 'max') {\n _inputs[1].setSelectionRange(start, end)\n _inputs[1].focus()\n }\n}\n\nconst onPick = (date: any = '', visible = false) => {\n pickerVisible.value = visible\n let result\n if (isArray(date)) {\n result = date.map((_) => _.toDate())\n } else {\n // clear btn emit null\n result = date ? date.toDate() : date\n }\n userInput.value = null\n emitInput(result)\n}\n\nconst onBeforeShow = () => {\n pickerActualVisible.value = true\n}\n\nconst onShow = () => {\n emit('visible-change', true)\n}\n\nconst onHide = () => {\n pickerActualVisible.value = false\n pickerVisible.value = false\n emit('visible-change', false)\n}\n\nconst handleOpen = () => {\n pickerVisible.value = true\n}\n\nconst handleClose = () => {\n pickerVisible.value = false\n}\n\nconst pickerDisabled = computed(() => {\n return props.disabled || form?.disabled\n})\n\nconst parsedValue = computed(() => {\n let dayOrDays: DayOrDays\n if (valueIsEmpty.value) {\n if (pickerOptions.value.getDefaultValue) {\n dayOrDays = pickerOptions.value.getDefaultValue()\n }\n } else {\n if (isArray(props.modelValue)) {\n dayOrDays = props.modelValue.map((d) =>\n parseDate(d, props.valueFormat, lang.value)\n ) as [Dayjs, Dayjs]\n } else {\n dayOrDays = parseDate(props.modelValue, props.valueFormat, lang.value)!\n }\n }\n\n if (pickerOptions.value.getRangeAvailableTime) {\n const availableResult = pickerOptions.value.getRangeAvailableTime(\n dayOrDays!\n )\n if (!isEqual(availableResult, dayOrDays!)) {\n dayOrDays = availableResult\n\n // The result is corrected only when model-value exists\n if (!valueIsEmpty.value) {\n emitInput(dayOrDaysToDate(dayOrDays))\n }\n }\n }\n if (isArray(dayOrDays!) && dayOrDays.some((day) => !day)) {\n dayOrDays = [] as unknown as DayOrDays\n }\n return dayOrDays!\n})\n\nconst displayValue = computed<UserInput>(() => {\n if (!pickerOptions.value.panelReady) return ''\n const formattedValue = formatDayjsToString(parsedValue.value)\n if (isArray(userInput.value)) {\n return [\n userInput.value[0] || (formattedValue && formattedValue[0]) || '',\n userInput.value[1] || (formattedValue && formattedValue[1]) || '',\n ]\n } else if (userInput.value !== null) {\n return userInput.value\n }\n if (!isTimePicker.value && valueIsEmpty.value) return ''\n if (!pickerVisible.value && valueIsEmpty.value) return ''\n if (formattedValue) {\n return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value\n ? (formattedValue as Array<string>).join(', ')\n : formattedValue\n }\n return ''\n})\n\nconst isTimeLikePicker = computed(() => props.type.includes('time'))\n\nconst isTimePicker = computed(() => props.type.startsWith('time'))\n\nconst isDatesPicker = computed(() => props.type === 'dates')\n\nconst isMonthsPicker = computed(() => props.type === 'months')\n\nconst isYearsPicker = computed(() => props.type === 'years')\n\nconst triggerIcon = computed(\n () => props.prefixIcon || (isTimeLikePicker.value ? Clock : Calendar)\n)\n\nconst showClose = ref(false)\n\nconst onClearIconClick = (event: MouseEvent) => {\n if (props.readonly || pickerDisabled.value) return\n if (showClose.value) {\n event.stopPropagation()\n // When the handleClear Function was provided, emit null will be executed inside it\n // There is no need for us to execute emit null twice. #14752\n if (pickerOptions.value.handleClear) {\n pickerOptions.value.handleClear()\n } else {\n emitInput(valueOnClear.value)\n }\n emitChange(valueOnClear.value, true)\n showClose.value = false\n onHide()\n }\n emit('clear')\n}\n\nconst valueIsEmpty = computed(() => {\n const { modelValue } = props\n return (\n !modelValue || (isArray(modelValue) && !modelValue.filter(Boolean).length)\n )\n})\n\nconst onMouseDownInput = async (event: MouseEvent) => {\n if (props.readonly || pickerDisabled.value) return\n if ((event.target as HTMLElement)?.tagName !== 'INPUT' || isFocused.value) {\n pickerVisible.value = true\n }\n}\nconst onMouseEnter = () => {\n if (props.readonly || pickerDisabled.value) return\n if (!valueIsEmpty.value && props.clearable) {\n showClose.value = true\n }\n}\nconst onMouseLeave = () => {\n showClose.value = false\n}\n\nconst onTouchStartInput = (event: TouchEvent) => {\n if (props.readonly || pickerDisabled.value) return\n if (\n (event.touches[0].target as HTMLElement)?.tagName !== 'INPUT' ||\n isFocused.value\n ) {\n pickerVisible.value = true\n }\n}\n\nconst isRangeInput = computed(() => {\n return props.type.includes('range')\n})\n\nconst pickerSize = useFormSize()\n\nconst popperEl = computed(() => unref(refPopper)?.popperRef?.contentRef)\n\nconst stophandle = onClickOutside(\n inputRef as Ref<ComponentPublicInstance>,\n (e: PointerEvent) => {\n const unrefedPopperEl = unref(popperEl)\n const inputEl = unrefElement(inputRef as Ref<ComponentPublicInstance>)\n if (\n (unrefedPopperEl &&\n (e.target === unrefedPopperEl ||\n e.composedPath().includes(unrefedPopperEl))) ||\n e.target === inputEl ||\n (inputEl && e.composedPath().includes(inputEl))\n )\n return\n pickerVisible.value = false\n }\n)\n\nonBeforeUnmount(() => {\n stophandle?.()\n})\n\nconst userInput = ref<UserInput>(null)\n\nconst handleChange = () => {\n if (userInput.value) {\n const value = parseUserInputToDayjs(displayValue.value)\n if (value) {\n if (isValidValue(value)) {\n emitInput(dayOrDaysToDate(value))\n userInput.value = null\n }\n }\n }\n if (userInput.value === '') {\n emitInput(valueOnClear.value)\n emitChange(valueOnClear.value)\n userInput.value = null\n }\n}\n\nconst parseUserInputToDayjs = (value: UserInput) => {\n if (!value) return null\n return pickerOptions.value.parseUserInput!(value)\n}\n\nconst formatDayjsToString = (value: DayOrDays) => {\n if (!value) return null\n return pickerOptions.value.formatToString!(value)\n}\n\nconst isValidValue = (value: DayOrDays) => {\n return pickerOptions.value.isValidValue!(value)\n}\n\nconst handleKeydownInput = async (event: Event | KeyboardEvent) => {\n if (props.readonly || pickerDisabled.value) return\n\n const { code } = event as KeyboardEvent\n emitKeydown(event as KeyboardEvent)\n if (code === EVENT_CODE.esc) {\n if (pickerVisible.value === true) {\n pickerVisible.value = false\n event.preventDefault()\n event.stopPropagation()\n }\n return\n }\n\n if (code === EVENT_CODE.down) {\n if (pickerOptions.value.handleFocusPicker) {\n event.preventDefault()\n event.stopPropagation()\n }\n if (pickerVisible.value === false) {\n pickerVisible.value = true\n await nextTick()\n }\n if (pickerOptions.value.handleFocusPicker) {\n pickerOptions.value.handleFocusPicker()\n return\n }\n }\n\n if (code === EVENT_CODE.tab) {\n hasJustTabExitedInput = true\n return\n }\n\n if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {\n if (\n userInput.value === null ||\n userInput.value === '' ||\n isValidValue(parseUserInputToDayjs(displayValue.value) as DayOrDays)\n ) {\n handleChange()\n pickerVisible.value = false\n }\n event.stopPropagation()\n return\n }\n\n // if user is typing, do not let picker handle key input\n if (userInput.value) {\n event.stopPropagation()\n return\n }\n if (pickerOptions.value.handleKeydownInput) {\n pickerOptions.value.handleKeydownInput(event as KeyboardEvent)\n }\n}\nconst onUserInput = (e: string) => {\n userInput.value = e\n // Temporary fix when the picker is dismissed and the input box\n // is focused, just mimic the behavior of antdesign.\n if (!pickerVisible.value) {\n pickerVisible.value = true\n }\n}\n\nconst handleStartInput = (event: Event) => {\n const target = event.target as HTMLInputElement\n if (userInput.value) {\n userInput.value = [target.value, userInput.value[1]]\n } else {\n userInput.value = [target.value, null]\n }\n}\n\nconst handleEndInput = (event: Event) => {\n const target = event.target as HTMLInputElement\n if (userInput.value) {\n userInput.value = [userInput.value[0], target.value]\n } else {\n userInput.value = [null, target.value]\n }\n}\n\nconst handleStartChange = () => {\n const values = userInput.value as string[]\n const value = parseUserInputToDayjs(values && values[0]) as Dayjs\n const parsedVal = unref(parsedValue) as [Dayjs, Dayjs]\n if (value && value.isValid()) {\n userInput.value = [\n formatDayjsToString(value) as string,\n displayValue.value?.[1] || null,\n ]\n const newValue = [value, parsedVal && (parsedVal[1] || null)] as DayOrDays\n if (isValidValue(newValue)) {\n emitInput(dayOrDaysToDate(newValue))\n userInput.value = null\n }\n }\n}\n\nconst handleEndChange = () => {\n const values = unref(userInput) as string[]\n const value = parseUserInputToDayjs(values && values[1]) as Dayjs\n const parsedVal = unref(parsedValue) as [Dayjs, Dayjs]\n if (value && value.isValid()) {\n userInput.value = [\n unref(displayValue)?.[0] || null,\n formatDayjsToString(value) as string,\n ]\n const newValue = [parsedVal && parsedVal[0], value] as DayOrDays\n if (isValidValue(newValue)) {\n emitInput(dayOrDaysToDate(newValue))\n userInput.value = null\n }\n }\n}\n\nconst pickerOptions = ref<Partial<PickerOptions>>({})\n// @ts-ignore\nconst onSetPickerOption = <T extends keyof PickerOptions>(\n e: [T, PickerOptions[T]]\n) => {\n pickerOptions.value[e[0]] = e[1]\n pickerOptions.value.panelReady = true\n}\n\n// @ts-ignore\nconst onCalendarChange = (e: [Date, null | Date]) => {\n emit('calendar-change', e)\n}\n\n// @ts-ignore\nconst onPanelChange = (\n value: [Dayjs, Dayjs],\n mode: 'month' | 'year',\n view: unknown\n) => {\n emit('panel-change', value, mode, view)\n}\n\nconst focus = () => {\n inputRef.value?.focus()\n}\n\nconst blur = () => {\n inputRef.value?.blur()\n}\n\nprovide('EP_PICKER_BASE', {\n props,\n})\n\ndefineExpose({\n /**\n * @description focus input box.\n */\n focus,\n /**\n * @description blur input box.\n */\n blur,\n /**\n * @description opens picker\n */\n handleOpen,\n /**\n * @description closes picker\n */\n handleClose,\n /**\n * @description pick item manually\n */\n onPick,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;mCAwMc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;AAcA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAE,IAAK,EAAA,GAAI,SAAU,EAAA,CAAA;AAE3B,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,OAAA,GAAU,aAAa,OAAO,CAAA,CAAA;AACpC,IAAM,MAAA,OAAA,GAAU,aAAa,OAAO,CAAA,CAAA;AAEpC,IAAA,MAAM,EAAE,IAAA,EAAM,QAAS,EAAA,GAAI,WAAY,EAAA,CAA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KAAA,CAAA,SAAA,CAAA,EAAAC,UAAA,CAAA;AAAA,QAAA,OAAA,EAAA,WAAA;AAAA,QAAA,GAAA,EAAA,SAAA;AAAA,QAAA,OAAA,EAAA,aAAA,CAAA,KAAA;AAAA,QAIA,MAAA,EAAA,OAAA;AAAA,QACD,IAAA,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,6 @@
1
1
  import dayjs from 'dayjs';
2
2
  import type { Dayjs } from 'dayjs';
3
+ import type { DateOrDates, DayOrDays } from './common/props';
3
4
  export type TimeList = [number | undefined, number, undefined | number];
4
5
  export declare const buildTimeList: (value: number, bound: number) => TimeList;
5
6
  export declare const rangeArr: (n: number) => number[];
@@ -10,3 +11,4 @@ export declare const valueEquals: (a: Array<Date> | unknown, b: Array<Date> | un
10
11
  export declare const parseDate: (date: string | number | Date, format: string | undefined, lang: string) => dayjs.Dayjs | undefined;
11
12
  export declare const formatter: (date: string | number | Date | Dayjs, format: string | undefined, lang: string) => string | number | Date | dayjs.Dayjs;
12
13
  export declare const makeList: (total: number, method?: () => number[]) => boolean[];
14
+ export declare const dayOrDaysToDate: (dayOrDays: DayOrDays) => DateOrDates;
@@ -62,6 +62,9 @@ const makeList = (total, method) => {
62
62
  }
63
63
  return arr;
64
64
  };
65
+ const dayOrDaysToDate = (dayOrDays) => {
66
+ return isArray(dayOrDays) ? dayOrDays.map((d) => d.toDate()) : dayOrDays.toDate();
67
+ };
65
68
 
66
- export { buildTimeList, dateEquals, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals };
69
+ export { buildTimeList, dateEquals, dayOrDaysToDate, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals };
67
70
  //# sourceMappingURL=utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/time-picker/src/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { isArray, isDate, isEmpty } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\nexport type TimeList = [number | undefined, number, undefined | number]\n\nexport const buildTimeList = (value: number, bound: number): TimeList => {\n return [\n value > 0 ? value - 1 : undefined,\n value,\n value < bound ? value + 1 : undefined,\n ]\n}\n\nexport const rangeArr = (n: number) =>\n Array.from(Array.from({ length: n }).keys())\n\nexport const extractDateFormat = (format: string) => {\n return format\n .replace(/\\W?m{1,2}|\\W?ZZ/g, '')\n .replace(/\\W?h{1,2}|\\W?s{1,3}|\\W?a/gi, '')\n .trim()\n}\n\nexport const extractTimeFormat = (format: string) => {\n return format\n .replace(/\\W?D{1,2}|\\W?Do|\\W?d{1,4}|\\W?M{1,4}|\\W?Y{2,4}/g, '')\n .trim()\n}\n\nexport const dateEquals = function (a: Date | unknown, b: Date | unknown) {\n const aIsDate = isDate(a)\n const bIsDate = isDate(b)\n if (aIsDate && bIsDate) {\n return a.getTime() === b.getTime()\n }\n if (!aIsDate && !bIsDate) {\n return a === b\n }\n return false\n}\n\nexport const valueEquals = function (\n a: Array<Date> | unknown,\n b: Array<Date> | unknown\n) {\n const aIsArray = isArray(a)\n const bIsArray = isArray(b)\n if (aIsArray && bIsArray) {\n if (a.length !== b.length) {\n return false\n }\n return a.every((item, index) => dateEquals(item, b[index]))\n }\n if (!aIsArray && !bIsArray) {\n return dateEquals(a, b)\n }\n return false\n}\n\nexport const parseDate = function (\n date: string | number | Date,\n format: string | undefined,\n lang: string\n) {\n const day =\n isEmpty(format) || format === 'x'\n ? dayjs(date).locale(lang)\n : dayjs(date, format).locale(lang)\n return day.isValid() ? day : undefined\n}\n\nexport const formatter = function (\n date: string | number | Date | Dayjs,\n format: string | undefined,\n lang: string\n) {\n if (isEmpty(format)) return date\n if (format === 'x') return +date\n return dayjs(date).locale(lang).format(format)\n}\n\nexport const makeList = (total: number, method?: () => number[]) => {\n const arr: boolean[] = []\n const disabledArr = method?.()\n for (let i = 0; i < total; i++) {\n arr.push(disabledArr?.includes(i) ?? false)\n }\n return arr\n}\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC/C,EAAE,OAAO;AACT,IAAI,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC;AAClC,IAAI,KAAK;AACT,IAAI,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC;AACtC,GAAG,CAAC;AACJ,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;AAChE,MAAC,iBAAiB,GAAG,CAAC,MAAM,KAAK;AAC7C,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACjG,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,MAAM,KAAK;AAC7C,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,gDAAgD,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACrF,EAAE;AACU,MAAC,UAAU,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACzC,EAAE,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5B,EAAE,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5B,EAAE,IAAI,OAAO,IAAI,OAAO,EAAE;AAC1B,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,C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SAAS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;AACtD,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC;AACrB,IAAI,OAAO,IAAI,CAAC;AAChB,EAAE,IAAI,MAAM,KAAK,GAAG;AACpB,IAAI,OAAO,CAAC,IAAI,CAAC;AACjB,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACjD,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK;AAC3C,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;AACjB,EAAE,MAAM,WAAW,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC;AACzD,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;AAClC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,WAAW,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACjG,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;;;;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/time-picker/src/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { isArray, isDate, isEmpty } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\nimport type { DateOrDates, DayOrDays } from './common/props'\nexport type TimeList = [number | undefined, number, undefined | number]\n\nexport const buildTimeList = (value: number, bound: number): TimeList => {\n return [\n value > 0 ? value - 1 : undefined,\n value,\n value < bound ? value + 1 : undefined,\n ]\n}\n\nexport const rangeArr = (n: number) =>\n Array.from(Array.from({ length: n }).keys())\n\nexport const extractDateFormat = (format: string) => {\n return format\n .replace(/\\W?m{1,2}|\\W?ZZ/g, '')\n .replace(/\\W?h{1,2}|\\W?s{1,3}|\\W?a/gi, '')\n .trim()\n}\n\nexport const extractTimeFormat = (format: string) => {\n return format\n .replace(/\\W?D{1,2}|\\W?Do|\\W?d{1,4}|\\W?M{1,4}|\\W?Y{2,4}/g, '')\n .trim()\n}\n\nexport const dateEquals = function (a: Date | unknown, b: Date | unknown) {\n const aIsDate = isDate(a)\n const bIsDate = isDate(b)\n if (aIsDate && bIsDate) {\n return a.getTime() === b.getTime()\n }\n if (!aIsDate && !bIsDate) {\n return a === b\n }\n return false\n}\n\nexport const valueEquals = function (\n a: Array<Date> | unknown,\n b: Array<Date> | unknown\n) {\n const aIsArray = isArray(a)\n const bIsArray = isArray(b)\n if (aIsArray && bIsArray) {\n if (a.length !== b.length) {\n return false\n }\n return a.every((item, index) => dateEquals(item, b[index]))\n }\n if (!aIsArray && !bIsArray) {\n return dateEquals(a, b)\n }\n return false\n}\n\nexport const parseDate = function (\n date: string | number | Date,\n format: string | undefined,\n lang: string\n) {\n const day =\n isEmpty(format) || format === 'x'\n ? dayjs(date).locale(lang)\n : dayjs(date, format).locale(lang)\n return day.isValid() ? day : undefined\n}\n\nexport const formatter = function (\n date: string | number | Date | Dayjs,\n format: string | undefined,\n lang: string\n) {\n if (isEmpty(format)) return date\n if (format === 'x') return +date\n return dayjs(date).locale(lang).format(format)\n}\n\nexport const makeList = (total: number, method?: () => number[]) => {\n const arr: boolean[] = []\n const disabledArr = method?.()\n for (let i = 0; i < total; i++) {\n arr.push(disabledArr?.includes(i) ?? false)\n }\n return arr\n}\n\nexport const dayOrDaysToDate = (dayOrDays: DayOrDays): DateOrDates => {\n return isArray(dayOrDays)\n ? (dayOrDays.map((d) => d.toDate()) as [Date, Date])\n : dayOrDays.toDate()\n}\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC/C,EAAE,OAAO;AACT,IAA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,CAAC,CAAC;AACjD,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK;AAC3C,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;AACjB,EAAE,MAAM,WAAW,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC;AACzD,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;AAClC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,WAAW,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACjG,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb,EAAE;AACU,MAAC,eAAe,GAAG,CAAC,SAAS,KAAK;AAC9C,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;AACpF;;;;"}
@@ -1,5 +1,6 @@
1
1
  import type { VNode } from 'vue';
2
2
  declare function __VLS_template(): {
3
+ empty?(_: {}): any;
3
4
  default?(_: {}): any;
4
5
  };
5
6
  declare const __VLS_component: import("vue").DefineComponent<{
@@ -111,9 +111,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
111
  }, 8, ["modelValue", "onUpdate:modelValue", "class"]), [
112
112
  [vShow, !unref(hasNoMatch) && !unref(isEmpty)(_ctx.data)]
113
113
  ]),
114
- withDirectives(createElementVNode("p", {
114
+ withDirectives(createElementVNode("div", {
115
115
  class: normalizeClass(unref(ns).be("panel", "empty"))
116
- }, toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 3), [
116
+ }, [
117
+ renderSlot(_ctx.$slots, "empty", {}, () => [
118
+ createTextVNode(toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 1)
119
+ ])
120
+ ], 2), [
117
121
  [vShow, unref(hasNoMatch) || unref(isEmpty)(_ctx.data)]
118
122
  ])
119
123
  ], 2),
@@ -1 +1 @@
1
- {"version":3,"file":"transfer-panel2.mjs","sources":["../../../../../../packages/components/transfer/src/transfer-panel.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b('panel')\">\n <p :class=\"ns.be('panel', 'header')\">\n <el-checkbox\n v-model=\"allChecked\"\n :indeterminate=\"isIndeterminate\"\n :validate-event=\"false\"\n @change=\"handleAllCheckedChange\"\n >\n {{ title }}\n <span>{{ checkedSummary }}</span>\n </el-checkbox>\n </p>\n\n <div :class=\"[ns.be('panel', 'body'), ns.is('with-footer', hasFooter)]\">\n <el-input\n v-if=\"filterable\"\n v-model=\"query\"\n :class=\"ns.be('panel', 'filter')\"\n size=\"default\"\n :placeholder=\"placeholder\"\n :prefix-icon=\"Search\"\n clearable\n :validate-event=\"false\"\n />\n <el-checkbox-group\n v-show=\"!hasNoMatch && !isEmpty(data)\"\n v-model=\"checked\"\n :validate-event=\"false\"\n :class=\"[ns.is('filterable', filterable), ns.be('panel', 'list')]\"\n >\n <el-checkbox\n v-for=\"item in filteredData\"\n :key=\"item[propsAlias.key]\"\n :class=\"ns.be('panel', 'item')\"\n :value=\"item[propsAlias.key]\"\n :disabled=\"item[propsAlias.disabled]\"\n :validate-event=\"false\"\n >\n <option-content :option=\"optionRender?.(item)\" />\n </el-checkbox>\n </el-checkbox-group>\n <p v-show=\"hasNoMatch || isEmpty(data)\" :class=\"ns.be('panel', 'empty')\">\n {{ hasNoMatch ? t('el.transfer.noMatch') : t('el.transfer.noData') }}\n </p>\n </div>\n <p v-if=\"hasFooter\" :class=\"ns.be('panel', 'footer')\">\n <slot />\n </p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, toRefs, useSlots } from 'vue'\nimport { isEmpty } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElCheckbox, ElCheckboxGroup } from '@element-plus/components/checkbox'\nimport { ElInput } from '@element-plus/components/input'\nimport { Search } from '@element-plus/icons-vue'\nimport { transferPanelEmits, transferPanelProps } from './transfer-panel'\nimport { useCheck, usePropsAlias } from './composables'\n\nimport type { VNode } from 'vue'\nimport type { TransferPanelState } from './transfer-panel'\n\ndefineOptions({\n name: 'ElTransferPanel',\n})\n\nconst props = defineProps(transferPanelProps)\nconst emit = defineEmits(transferPanelEmits)\nconst slots = useSlots()\n\nconst OptionContent = ({ option }: { option?: VNode | VNode[] }) => option\n\nconst { t } = useLocale()\nconst ns = useNamespace('transfer')\n\nconst panelState = reactive<TransferPanelState>({\n checked: [],\n allChecked: false,\n query: '',\n checkChangeByUser: true,\n})\n\nconst propsAlias = usePropsAlias(props)\n\nconst {\n filteredData,\n checkedSummary,\n isIndeterminate,\n handleAllCheckedChange,\n} = useCheck(props, panelState, emit)\n\nconst hasNoMatch = computed(\n () => !isEmpty(panelState.query) && isEmpty(filteredData.value)\n)\n\nconst hasFooter = computed(() => !isEmpty(slots.default!()[0].children))\n\nconst { checked, allChecked, query } = toRefs(panelState)\n\ndefineExpose({\n /** @description filter keyword */\n query,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref"],"mappings":";;;;;;;;;;;;;;;mCAiEc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAA,MAAM,aAAgB,GAAA,CAAC,EAAE,MAAA,EAA2C,KAAA,MAAA,CAAA;AAEpE,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAA,MAAM,aAAa,QAA6B,CAAA;AAAA,MAC9C,SAAS,EAAC;AAAA,MACV,UAAY,EAAA,KAAA;AAAA,MACZ,KAAO,EAAA,EAAA;AAAA,MACP,iBAAmB,EAAA,IAAA;AAAA,KACpB,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAa,cAAc,KAAK,CAAA,CAAA;AAEtC,IAAM,MAAA;AAAA,MACJ,YAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,sBAAA;AAAA,KACE,GAAA,QAAA,CAAS,KAAO,EAAA,UAAA,EAAY,IAAI,CAAA,CAAA;AAEpC,IAAA,MAAM,UAAa,GAAA,QAAA,CAAA,MAAA,CAAA,OAAA,CAAA,UAAA,CAAA,KAAA,CAAA,IAAA,OAAA,CAAA,YAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IACjB,MAAA,SAAe,GAAA,QAAA,CAAA,MAAgB,CAAK,OAAA,CAAA,iBAAqB,CAAK,CAAA,QAAA,CAAA,CAAA,CAAA;AAAA,IAChE,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,KAAA,EAAA,GAAA,MAAA,CAAA,UAAA,CAAA,CAAA;AAEA,IAAM,MAAA,CAAA;AAEN,MAAA;AAEA,KAAa,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAEX,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,QACD,KAAA,EAAAC,cAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"transfer-panel2.mjs","sources":["../../../../../../packages/components/transfer/src/transfer-panel.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b('panel')\">\n <p :class=\"ns.be('panel', 'header')\">\n <el-checkbox\n v-model=\"allChecked\"\n :indeterminate=\"isIndeterminate\"\n :validate-event=\"false\"\n @change=\"handleAllCheckedChange\"\n >\n {{ title }}\n <span>{{ checkedSummary }}</span>\n </el-checkbox>\n </p>\n\n <div :class=\"[ns.be('panel', 'body'), ns.is('with-footer', hasFooter)]\">\n <el-input\n v-if=\"filterable\"\n v-model=\"query\"\n :class=\"ns.be('panel', 'filter')\"\n size=\"default\"\n :placeholder=\"placeholder\"\n :prefix-icon=\"Search\"\n clearable\n :validate-event=\"false\"\n />\n <el-checkbox-group\n v-show=\"!hasNoMatch && !isEmpty(data)\"\n v-model=\"checked\"\n :validate-event=\"false\"\n :class=\"[ns.is('filterable', filterable), ns.be('panel', 'list')]\"\n >\n <el-checkbox\n v-for=\"item in filteredData\"\n :key=\"item[propsAlias.key]\"\n :class=\"ns.be('panel', 'item')\"\n :value=\"item[propsAlias.key]\"\n :disabled=\"item[propsAlias.disabled]\"\n :validate-event=\"false\"\n >\n <option-content :option=\"optionRender?.(item)\" />\n </el-checkbox>\n </el-checkbox-group>\n <div\n v-show=\"hasNoMatch || isEmpty(data)\"\n :class=\"ns.be('panel', 'empty')\"\n >\n <slot name=\"empty\">\n {{ hasNoMatch ? t('el.transfer.noMatch') : t('el.transfer.noData') }}\n </slot>\n </div>\n </div>\n <p v-if=\"hasFooter\" :class=\"ns.be('panel', 'footer')\">\n <slot />\n </p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, toRefs, useSlots } from 'vue'\nimport { isEmpty } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElCheckbox, ElCheckboxGroup } from '@element-plus/components/checkbox'\nimport { ElInput } from '@element-plus/components/input'\nimport { Search } from '@element-plus/icons-vue'\nimport { transferPanelEmits, transferPanelProps } from './transfer-panel'\nimport { useCheck, usePropsAlias } from './composables'\n\nimport type { VNode } from 'vue'\nimport type { TransferPanelState } from './transfer-panel'\n\ndefineOptions({\n name: 'ElTransferPanel',\n})\n\nconst props = defineProps(transferPanelProps)\nconst emit = defineEmits(transferPanelEmits)\nconst slots = useSlots()\n\nconst OptionContent = ({ option }: { option?: VNode | VNode[] }) => option\n\nconst { t } = useLocale()\nconst ns = useNamespace('transfer')\n\nconst panelState = reactive<TransferPanelState>({\n checked: [],\n allChecked: false,\n query: '',\n checkChangeByUser: true,\n})\n\nconst propsAlias = usePropsAlias(props)\n\nconst {\n filteredData,\n checkedSummary,\n isIndeterminate,\n handleAllCheckedChange,\n} = useCheck(props, panelState, emit)\n\nconst hasNoMatch = computed(\n () => !isEmpty(panelState.query) && isEmpty(filteredData.value)\n)\n\nconst hasFooter = computed(() => !isEmpty(slots.default!()[0].children))\n\nconst { checked, allChecked, query } = toRefs(panelState)\n\ndefineExpose({\n /** @description filter keyword */\n query,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref"],"mappings":";;;;;;;;;;;;;;;mCAsEc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAA,MAAM,aAAgB,GAAA,CAAC,EAAE,MAAA,EAA2C,KAAA,MAAA,CAAA;AAEpE,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAA,MAAM,aAAa,QAA6B,CAAA;AAAA,MAC9C,SAAS,EAAC;AAAA,MACV,UAAY,EAAA,KAAA;AAAA,MACZ,KAAO,EAAA,EAAA;AAAA,MACP,iBAAmB,EAAA,IAAA;AAAA,KACpB,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAa,cAAc,KAAK,CAAA,CAAA;AAEtC,IAAM,MAAA;AAAA,MACJ,YAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,sBAAA;AAAA,KACE,GAAA,QAAA,CAAS,KAAO,EAAA,UAAA,EAAY,IAAI,CAAA,CAAA;AAEpC,IAAA,MAAM,UAAa,GAAA,QAAA,CAAA,MAAA,CAAA,OAAA,CAAA,UAAA,CAAA,KAAA,CAAA,IAAA,OAAA,CAAA,YAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IACjB,MAAA,SAAe,GAAA,QAAA,CAAA,MAAgB,CAAK,OAAA,CAAA,iBAAqB,CAAK,CAAA,QAAA,CAAA,CAAA,CAAA;AAAA,IAChE,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,KAAA,EAAA,GAAA,MAAA,CAAA,UAAA,CAAA,CAAA;AAEA,IAAM,MAAA,CAAA;AAEN,MAAA;AAEA,KAAa,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAEX,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,QACD,KAAA,EAAAC,cAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,8 @@
1
1
  import type { TransferDataItem, TransferDirection } from './transfer';
2
2
  declare function __VLS_template(): {
3
+ "left-empty"?(_: {}): any;
3
4
  "left-footer"?(_: {}): any;
5
+ "right-empty"?(_: {}): any;
4
6
  "right-footer"?(_: {}): any;
5
7
  };
6
8
  declare const __VLS_component: import("vue").DefineComponent<{
@@ -169,6 +171,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
169
171
  query: import("vue").Ref<string>;
170
172
  }> & {} & import("vue").ComponentCustomProperties & {
171
173
  $slots: {
174
+ empty?(_: {}): any;
172
175
  default?(_: {}): any;
173
176
  };
174
177
  }) | undefined>;
@@ -306,6 +309,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
306
309
  query: import("vue").Ref<string>;
307
310
  }> & {} & import("vue").ComponentCustomProperties & {
308
311
  $slots: {
312
+ empty?(_: {}): any;
309
313
  default?(_: {}): any;
310
314
  };
311
315
  }) | undefined>;
@@ -95,6 +95,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
95
95
  props: props.props,
96
96
  onCheckedChange: unref(onSourceCheckedChange)
97
97
  }, {
98
+ empty: withCtx(() => [
99
+ renderSlot(_ctx.$slots, "left-empty")
100
+ ]),
98
101
  default: withCtx(() => [
99
102
  renderSlot(_ctx.$slots, "left-footer")
100
103
  ]),
@@ -152,6 +155,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
152
155
  props: props.props,
153
156
  onCheckedChange: unref(onTargetCheckedChange)
154
157
  }, {
158
+ empty: withCtx(() => [
159
+ renderSlot(_ctx.$slots, "right-empty")
160
+ ]),
155
161
  default: withCtx(() => [
156
162
  renderSlot(_ctx.$slots, "right-footer")
157
163
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"transfer2.mjs","sources":["../../../../../../packages/components/transfer/src/transfer.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <transfer-panel\n ref=\"leftPanel\"\n :data=\"sourceData\"\n :option-render=\"optionRender\"\n :placeholder=\"panelFilterPlaceholder\"\n :title=\"leftPanelTitle\"\n :filterable=\"filterable\"\n :format=\"format\"\n :filter-method=\"filterMethod\"\n :default-checked=\"leftDefaultChecked\"\n :props=\"props.props\"\n @checked-change=\"onSourceCheckedChange\"\n >\n <slot name=\"left-footer\" />\n </transfer-panel>\n <div :class=\"ns.e('buttons')\">\n <el-button\n type=\"primary\"\n :class=\"[ns.e('button'), ns.is('with-texts', hasButtonTexts)]\"\n :disabled=\"isEmpty(checkedState.rightChecked)\"\n @click=\"addToLeft\"\n >\n <el-icon><arrow-left /></el-icon>\n <span v-if=\"!isUndefined(buttonTexts[0])\">{{ buttonTexts[0] }}</span>\n </el-button>\n <el-button\n type=\"primary\"\n :class=\"[ns.e('button'), ns.is('with-texts', hasButtonTexts)]\"\n :disabled=\"isEmpty(checkedState.leftChecked)\"\n @click=\"addToRight\"\n >\n <span v-if=\"!isUndefined(buttonTexts[1])\">{{ buttonTexts[1] }}</span>\n <el-icon><arrow-right /></el-icon>\n </el-button>\n </div>\n <transfer-panel\n ref=\"rightPanel\"\n :data=\"targetData\"\n :option-render=\"optionRender\"\n :placeholder=\"panelFilterPlaceholder\"\n :filterable=\"filterable\"\n :format=\"format\"\n :filter-method=\"filterMethod\"\n :title=\"rightPanelTitle\"\n :default-checked=\"rightDefaultChecked\"\n :props=\"props.props\"\n @checked-change=\"onTargetCheckedChange\"\n >\n <slot name=\"right-footer\" />\n </transfer-panel>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Comment, computed, h, reactive, ref, useSlots, watch } from 'vue'\nimport { debugWarn, isEmpty, isUndefined } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useFormItem } from '@element-plus/components/form'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport { transferEmits, transferProps } from './transfer'\nimport {\n useCheckedChange,\n useComputedData,\n useMove,\n usePropsAlias,\n} from './composables'\nimport TransferPanel from './transfer-panel.vue'\n\nimport type {\n TransferCheckedState,\n TransferDataItem,\n TransferDirection,\n} from './transfer'\nimport type { TransferPanelInstance } from './transfer-panel'\n\ndefineOptions({\n name: 'ElTransfer',\n})\n\nconst props = defineProps(transferProps)\nconst emit = defineEmits(transferEmits)\nconst slots = useSlots()\n\nconst { t } = useLocale()\nconst ns = useNamespace('transfer')\nconst { formItem } = useFormItem()\n\nconst checkedState = reactive<TransferCheckedState>({\n leftChecked: [],\n rightChecked: [],\n})\n\nconst propsAlias = usePropsAlias(props)\n\nconst { sourceData, targetData } = useComputedData(props)\n\nconst { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(\n checkedState,\n emit\n)\n\nconst { addToLeft, addToRight } = useMove(props, checkedState, emit)\n\nconst leftPanel = ref<TransferPanelInstance>()\nconst rightPanel = ref<TransferPanelInstance>()\n\nconst clearQuery = (which: TransferDirection) => {\n switch (which) {\n case 'left':\n leftPanel.value!.query = ''\n break\n case 'right':\n rightPanel.value!.query = ''\n break\n }\n}\n\nconst hasButtonTexts = computed(() => props.buttonTexts.length === 2)\n\nconst leftPanelTitle = computed(\n () => props.titles[0] || t('el.transfer.titles.0')\n)\n\nconst rightPanelTitle = computed(\n () => props.titles[1] || t('el.transfer.titles.1')\n)\n\nconst panelFilterPlaceholder = computed(\n () => props.filterPlaceholder || t('el.transfer.filterPlaceholder')\n)\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n }\n)\n\nconst optionRender = computed(() => (option: TransferDataItem) => {\n if (props.renderContent) return props.renderContent(h, option)\n\n const defaultSlotVNodes = (slots.default?.({ option }) || []).filter(\n (node) => node.type !== Comment\n )\n if (defaultSlotVNodes.length) {\n return defaultSlotVNodes\n }\n\n return h(\n 'span',\n option[propsAlias.value.label] || option[propsAlias.value.key]\n )\n})\n\ndefineExpose({\n /** @description clear the filter keyword of a certain panel */\n clearQuery,\n /** @description left panel ref */\n leftPanel,\n /** @description right panel ref */\n rightPanel,\n})\n</script>\n"],"names":["_normalizeClass","_unref","_createVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;mCA+Ec,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AAE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A,MAAA,UAAqB;AACnB,MAAA;AAEA,MAAM,UAAA;AAAwD,KAC5D,CAAA,CAAA;AAAwB,IAC1B,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AACA,MAAA,sCAA8B,CAAA,KAAA,EAAA;AAC5B,QAAO,KAAA,EAAAA,cAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA;AAAA,OACT,EAAA;AAEA,QAAOC,WAAA,CAAA,aAAA,EAAA;AAAA,UACL,OAAA,EAAA,WAAA;AAAA,UACA,GAAA,EAAO;AAAsD,UAC/D,IAAA,EAAAD,KAAA,CAAA,UAAA,CAAA;AAAA,UACD,eAAA,EAAAA,KAAA,CAAA,YAAA,CAAA;AAED,UAAa,WAAA,EAAAA,KAAA,CAAA,sBAAA,CAAA;AAAA,UAAA,KAAA,EAAAA,KAAA,CAAA,cAAA,CAAA;AAAA,UAEX,UAAA,EAAA,IAAA,CAAA,UAAA;AAAA,UAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,UAEA,eAAA,EAAA,IAAA,CAAA,YAAA;AAAA,UAAA,iBAAA,EAAA,IAAA,CAAA,kBAAA;AAAA,UAEA,KAAA,EAAA,KAAA,CAAA,KAAA;AAAA,UACD,eAAA,EAAAA,KAAA,CAAA,qBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"transfer2.mjs","sources":["../../../../../../packages/components/transfer/src/transfer.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <transfer-panel\n ref=\"leftPanel\"\n :data=\"sourceData\"\n :option-render=\"optionRender\"\n :placeholder=\"panelFilterPlaceholder\"\n :title=\"leftPanelTitle\"\n :filterable=\"filterable\"\n :format=\"format\"\n :filter-method=\"filterMethod\"\n :default-checked=\"leftDefaultChecked\"\n :props=\"props.props\"\n @checked-change=\"onSourceCheckedChange\"\n >\n <template #empty>\n <slot name=\"left-empty\" />\n </template>\n <slot name=\"left-footer\" />\n </transfer-panel>\n <div :class=\"ns.e('buttons')\">\n <el-button\n type=\"primary\"\n :class=\"[ns.e('button'), ns.is('with-texts', hasButtonTexts)]\"\n :disabled=\"isEmpty(checkedState.rightChecked)\"\n @click=\"addToLeft\"\n >\n <el-icon><arrow-left /></el-icon>\n <span v-if=\"!isUndefined(buttonTexts[0])\">{{ buttonTexts[0] }}</span>\n </el-button>\n <el-button\n type=\"primary\"\n :class=\"[ns.e('button'), ns.is('with-texts', hasButtonTexts)]\"\n :disabled=\"isEmpty(checkedState.leftChecked)\"\n @click=\"addToRight\"\n >\n <span v-if=\"!isUndefined(buttonTexts[1])\">{{ buttonTexts[1] }}</span>\n <el-icon><arrow-right /></el-icon>\n </el-button>\n </div>\n <transfer-panel\n ref=\"rightPanel\"\n :data=\"targetData\"\n :option-render=\"optionRender\"\n :placeholder=\"panelFilterPlaceholder\"\n :filterable=\"filterable\"\n :format=\"format\"\n :filter-method=\"filterMethod\"\n :title=\"rightPanelTitle\"\n :default-checked=\"rightDefaultChecked\"\n :props=\"props.props\"\n @checked-change=\"onTargetCheckedChange\"\n >\n <template #empty>\n <slot name=\"right-empty\" />\n </template>\n <slot name=\"right-footer\" />\n </transfer-panel>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Comment, computed, h, reactive, ref, useSlots, watch } from 'vue'\nimport { debugWarn, isEmpty, isUndefined } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useFormItem } from '@element-plus/components/form'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport { transferEmits, transferProps } from './transfer'\nimport {\n useCheckedChange,\n useComputedData,\n useMove,\n usePropsAlias,\n} from './composables'\nimport TransferPanel from './transfer-panel.vue'\n\nimport type {\n TransferCheckedState,\n TransferDataItem,\n TransferDirection,\n} from './transfer'\nimport type { TransferPanelInstance } from './transfer-panel'\n\ndefineOptions({\n name: 'ElTransfer',\n})\n\nconst props = defineProps(transferProps)\nconst emit = defineEmits(transferEmits)\nconst slots = useSlots()\n\nconst { t } = useLocale()\nconst ns = useNamespace('transfer')\nconst { formItem } = useFormItem()\n\nconst checkedState = reactive<TransferCheckedState>({\n leftChecked: [],\n rightChecked: [],\n})\n\nconst propsAlias = usePropsAlias(props)\n\nconst { sourceData, targetData } = useComputedData(props)\n\nconst { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(\n checkedState,\n emit\n)\n\nconst { addToLeft, addToRight } = useMove(props, checkedState, emit)\n\nconst leftPanel = ref<TransferPanelInstance>()\nconst rightPanel = ref<TransferPanelInstance>()\n\nconst clearQuery = (which: TransferDirection) => {\n switch (which) {\n case 'left':\n leftPanel.value!.query = ''\n break\n case 'right':\n rightPanel.value!.query = ''\n break\n }\n}\n\nconst hasButtonTexts = computed(() => props.buttonTexts.length === 2)\n\nconst leftPanelTitle = computed(\n () => props.titles[0] || t('el.transfer.titles.0')\n)\n\nconst rightPanelTitle = computed(\n () => props.titles[1] || t('el.transfer.titles.1')\n)\n\nconst panelFilterPlaceholder = computed(\n () => props.filterPlaceholder || t('el.transfer.filterPlaceholder')\n)\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n }\n)\n\nconst optionRender = computed(() => (option: TransferDataItem) => {\n if (props.renderContent) return props.renderContent(h, option)\n\n const defaultSlotVNodes = (slots.default?.({ option }) || []).filter(\n (node) => node.type !== Comment\n )\n if (defaultSlotVNodes.length) {\n return defaultSlotVNodes\n }\n\n return h(\n 'span',\n option[propsAlias.value.label] || option[propsAlias.value.key]\n )\n})\n\ndefineExpose({\n /** @description clear the filter keyword of a certain panel */\n clearQuery,\n /** @description left panel ref */\n leftPanel,\n /** @description right panel ref */\n rightPanel,\n})\n</script>\n"],"names":["_normalizeClass","_unref","_createVNode"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;;;;"}
package/es/index.mjs CHANGED
@@ -27,7 +27,7 @@ export { buttonGroupContextKey } from './components/button/src/constants.mjs';
27
27
  export { ElButton, ElButtonGroup } from './components/button/index.mjs';
28
28
  export { calendarEmits, calendarProps } from './components/calendar/src/calendar.mjs';
29
29
  export { ElCalendar } from './components/calendar/index.mjs';
30
- export { cardProps } from './components/card/src/card.mjs';
30
+ export { cardProps } from './components/card/src/card2.mjs';
31
31
  export { ElCard } from './components/card/index.mjs';
32
32
  export { carouselEmits, carouselProps } from './components/carousel/src/carousel.mjs';
33
33
  export { carouselItemProps } from './components/carousel/src/carousel-item.mjs';
@@ -40,7 +40,7 @@ export { CommonProps, DefaultProps, useCascaderConfig } from './components/casca
40
40
  export { ElCascaderPanel } from './components/cascader-panel/index.mjs';
41
41
  export { checkTagEmits, checkTagProps } from './components/check-tag/src/check-tag.mjs';
42
42
  export { ElCheckTag } from './components/check-tag/index.mjs';
43
- export { checkboxGroupEmits, checkboxGroupProps } from './components/checkbox/src/checkbox-group2.mjs';
43
+ export { checkboxGroupEmits, checkboxGroupProps } from './components/checkbox/src/checkbox-group.mjs';
44
44
  export { checkboxEmits, checkboxProps } from './components/checkbox/src/checkbox.mjs';
45
45
  export { checkboxGroupContextKey } from './components/checkbox/src/constants.mjs';
46
46
  export { ElCheckbox, ElCheckboxButton, ElCheckboxGroup } from './components/checkbox/index.mjs';
@@ -99,7 +99,7 @@ export { ElInputNumber } from './components/input-number/index.mjs';
99
99
  export { linkEmits, linkProps } from './components/link/src/link.mjs';
100
100
  export { ElLink } from './components/link/index.mjs';
101
101
  export { menuEmits, menuProps } from './components/menu/src/menu.mjs';
102
- export { menuItemEmits, menuItemProps } from './components/menu/src/menu-item.mjs';
102
+ export { menuItemEmits, menuItemProps } from './components/menu/src/menu-item2.mjs';
103
103
  export { menuItemGroupProps } from './components/menu/src/menu-item-group.mjs';
104
104
  export { subMenuProps } from './components/menu/src/sub-menu.mjs';
105
105
  export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './components/menu/index.mjs';
@@ -145,7 +145,7 @@ export { ElOption, ElOptionGroup, ElSelect } from './components/select/index.mjs
145
145
  export { selectV2InjectionKey } from './components/select-v2/src/token.mjs';
146
146
  export { ElSelectV2 } from './components/select-v2/index.mjs';
147
147
  export { skeletonProps } from './components/skeleton/src/skeleton.mjs';
148
- export { skeletonItemProps } from './components/skeleton/src/skeleton-item2.mjs';
148
+ export { skeletonItemProps } from './components/skeleton/src/skeleton-item.mjs';
149
149
  export { ElSkeleton, ElSkeletonItem } from './components/skeleton/index.mjs';
150
150
  export { sliderEmits, sliderProps } from './components/slider/src/slider.mjs';
151
151
  export { sliderContextKey } from './components/slider/src/constants.mjs';
@@ -179,7 +179,7 @@ export { tagEmits, tagProps } from './components/tag/src/tag.mjs';
179
179
  export { ElTag } from './components/tag/index.mjs';
180
180
  export { textProps } from './components/text/src/text.mjs';
181
181
  export { ElText } from './components/text/index.mjs';
182
- export { buildTimeList, dateEquals, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './components/time-picker/src/utils.mjs';
182
+ export { buildTimeList, dateEquals, dayOrDaysToDate, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './components/time-picker/src/utils.mjs';
183
183
  export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, timeUnits } from './components/time-picker/src/constants.mjs';
184
184
  export { timePickerDefaultProps, timePickerRngeTriggerProps } from './components/time-picker/src/common/props.mjs';
185
185
  export { ElTimePicker } from './components/time-picker/index.mjs';
@@ -218,7 +218,7 @@ export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } fr
218
218
  export { ElTour, ElTourStep } from './components/tour/index.mjs';
219
219
  export { anchorEmits, anchorProps } from './components/anchor/src/anchor.mjs';
220
220
  export { ElAnchor, ElAnchorLink } from './components/anchor/index.mjs';
221
- export { segmentedEmits, segmentedProps } from './components/segmented/src/segmented.mjs';
221
+ export { segmentedEmits, segmentedProps } from './components/segmented/src/segmented2.mjs';
222
222
  export { ElSegmented } from './components/segmented/index.mjs';
223
223
  export { mentionEmits, mentionProps } from './components/mention/src/mention.mjs';
224
224
  export { ElMention } from './components/mention/index.mjs';
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20241122";
1
+ export declare const version = "0.0.20241124";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20241122";
1
+ const version = "0.0.20241124";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20241122'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20241124'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -268,7 +268,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
268
268
  textareaStyle: import("vue").ComputedRef<StyleValue>;
269
269
  autosize: import("vue").Ref<import("@element-plus/nightly/es/components/input").InputAutoSize>;
270
270
  isComposing: import("vue").Ref<boolean>;
271
- focus: () => Promise<void>;
271
+ focus: () => void | undefined;
272
272
  blur: () => void | undefined;
273
273
  select: () => void;
274
274
  clear: () => void;
@@ -427,7 +427,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
427
427
  textareaStyle: import("vue").ComputedRef<StyleValue>;
428
428
  autosize: import("vue").Ref<import("@element-plus/nightly/es/components/input").InputAutoSize>;
429
429
  isComposing: import("vue").Ref<boolean>;
430
- focus: () => Promise<void>;
430
+ focus: () => void | undefined;
431
431
  blur: () => void | undefined;
432
432
  select: () => void;
433
433
  clear: () => void;
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var card$1 = require('./src/card2.js');
7
- var card = require('./src/card.js');
6
+ var card$1 = require('./src/card.js');
7
+ var card = require('./src/card2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElCard = install.withInstall(card$1["default"]);
@@ -2,29 +2,51 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var card = require('./card2.js');
8
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
+ var index = require('../../../hooks/use-namespace/index.js');
7
10
 
8
- const cardProps = runtime.buildProps({
9
- header: {
10
- type: String,
11
- default: ""
12
- },
13
- footer: {
14
- type: String,
15
- default: ""
16
- },
17
- bodyStyle: {
18
- type: runtime.definePropType([String, Object, Array]),
19
- default: ""
20
- },
21
- bodyClass: String,
22
- shadow: {
23
- type: String,
24
- values: ["always", "hover", "never"],
25
- default: "always"
11
+ const __default__ = vue.defineComponent({
12
+ name: "ElCard"
13
+ });
14
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
+ ...__default__,
16
+ props: card.cardProps,
17
+ setup(__props) {
18
+ const ns = index.useNamespace("card");
19
+ return (_ctx, _cache) => {
20
+ return vue.openBlock(), vue.createElementBlock("div", {
21
+ class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).is(`${_ctx.shadow}-shadow`)])
22
+ }, [
23
+ _ctx.$slots.header || _ctx.header ? (vue.openBlock(), vue.createElementBlock("div", {
24
+ key: 0,
25
+ class: vue.normalizeClass(vue.unref(ns).e("header"))
26
+ }, [
27
+ vue.renderSlot(_ctx.$slots, "header", {}, () => [
28
+ vue.createTextVNode(vue.toDisplayString(_ctx.header), 1)
29
+ ])
30
+ ], 2)) : vue.createCommentVNode("v-if", true),
31
+ vue.createElementVNode("div", {
32
+ class: vue.normalizeClass([vue.unref(ns).e("body"), _ctx.bodyClass]),
33
+ style: vue.normalizeStyle(_ctx.bodyStyle)
34
+ }, [
35
+ vue.renderSlot(_ctx.$slots, "default")
36
+ ], 6),
37
+ _ctx.$slots.footer || _ctx.footer ? (vue.openBlock(), vue.createElementBlock("div", {
38
+ key: 1,
39
+ class: vue.normalizeClass(vue.unref(ns).e("footer"))
40
+ }, [
41
+ vue.renderSlot(_ctx.$slots, "footer", {}, () => [
42
+ vue.createTextVNode(vue.toDisplayString(_ctx.footer), 1)
43
+ ])
44
+ ], 2)) : vue.createCommentVNode("v-if", true)
45
+ ], 2);
46
+ };
26
47
  }
27
48
  });
49
+ var Card = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "card.vue"]]);
28
50
 
29
- exports.cardProps = cardProps;
51
+ exports["default"] = Card;
30
52
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n footer: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'always',\n },\n} as const)\nexport type CardProps = ExtractPropTypes<typeof cardProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is(`${shadow}-shadow`)]\">\n <div v-if=\"$slots.header || header\" :class=\"ns.e('header')\">\n <slot name=\"header\">{{ header }}</slot>\n </div>\n <div :class=\"[ns.e('body'), bodyClass]\" :style=\"bodyStyle\">\n <slot />\n </div>\n <div v-if=\"$slots.footer || footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\">{{ footer }}</slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { cardProps } from './card'\n\ndefineOptions({\n name: 'ElCard',\n})\n\ndefineProps(cardProps)\n\nconst ns = useNamespace('card')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;uCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}