element-pe 2.2.51 → 2.2.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (672) hide show
  1. package/dist/index.full.js +15 -2
  2. package/dist/index.full.min.js +12 -12
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +11 -11
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +15 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar.js +1 -1
  12. package/dist/locale/ar.min.js +1 -1
  13. package/dist/locale/ar.min.mjs +1 -1
  14. package/dist/locale/ar.mjs +1 -1
  15. package/dist/locale/az.js +1 -1
  16. package/dist/locale/az.min.js +1 -1
  17. package/dist/locale/az.min.mjs +1 -1
  18. package/dist/locale/az.mjs +1 -1
  19. package/dist/locale/bg.js +1 -1
  20. package/dist/locale/bg.min.js +1 -1
  21. package/dist/locale/bg.min.mjs +1 -1
  22. package/dist/locale/bg.mjs +1 -1
  23. package/dist/locale/bn.js +1 -1
  24. package/dist/locale/bn.min.js +1 -1
  25. package/dist/locale/bn.min.mjs +1 -1
  26. package/dist/locale/bn.mjs +1 -1
  27. package/dist/locale/ca.js +1 -1
  28. package/dist/locale/ca.min.js +1 -1
  29. package/dist/locale/ca.min.mjs +1 -1
  30. package/dist/locale/ca.mjs +1 -1
  31. package/dist/locale/ckb.js +1 -1
  32. package/dist/locale/ckb.min.js +1 -1
  33. package/dist/locale/ckb.min.mjs +1 -1
  34. package/dist/locale/ckb.mjs +1 -1
  35. package/dist/locale/cs.js +1 -1
  36. package/dist/locale/cs.min.js +1 -1
  37. package/dist/locale/cs.min.mjs +1 -1
  38. package/dist/locale/cs.mjs +1 -1
  39. package/dist/locale/da.js +1 -1
  40. package/dist/locale/da.min.js +1 -1
  41. package/dist/locale/da.min.mjs +1 -1
  42. package/dist/locale/da.mjs +1 -1
  43. package/dist/locale/de.js +1 -1
  44. package/dist/locale/de.min.js +1 -1
  45. package/dist/locale/de.min.mjs +1 -1
  46. package/dist/locale/de.mjs +1 -1
  47. package/dist/locale/el.js +1 -1
  48. package/dist/locale/el.min.js +1 -1
  49. package/dist/locale/el.min.mjs +1 -1
  50. package/dist/locale/el.mjs +1 -1
  51. package/dist/locale/en.js +1 -1
  52. package/dist/locale/en.min.js +1 -1
  53. package/dist/locale/en.min.mjs +1 -1
  54. package/dist/locale/en.mjs +1 -1
  55. package/dist/locale/eo.js +1 -1
  56. package/dist/locale/eo.min.js +1 -1
  57. package/dist/locale/eo.min.mjs +1 -1
  58. package/dist/locale/eo.mjs +1 -1
  59. package/dist/locale/es.js +1 -1
  60. package/dist/locale/es.min.js +1 -1
  61. package/dist/locale/es.min.mjs +1 -1
  62. package/dist/locale/es.mjs +1 -1
  63. package/dist/locale/et.js +1 -1
  64. package/dist/locale/et.min.js +1 -1
  65. package/dist/locale/et.min.mjs +1 -1
  66. package/dist/locale/et.mjs +1 -1
  67. package/dist/locale/eu.js +1 -1
  68. package/dist/locale/eu.min.js +1 -1
  69. package/dist/locale/eu.min.mjs +1 -1
  70. package/dist/locale/eu.mjs +1 -1
  71. package/dist/locale/fa.js +1 -1
  72. package/dist/locale/fa.min.js +1 -1
  73. package/dist/locale/fa.min.mjs +1 -1
  74. package/dist/locale/fa.mjs +1 -1
  75. package/dist/locale/fi.js +1 -1
  76. package/dist/locale/fi.min.js +1 -1
  77. package/dist/locale/fi.min.mjs +1 -1
  78. package/dist/locale/fi.mjs +1 -1
  79. package/dist/locale/fr.js +1 -1
  80. package/dist/locale/fr.min.js +1 -1
  81. package/dist/locale/fr.min.mjs +1 -1
  82. package/dist/locale/fr.mjs +1 -1
  83. package/dist/locale/he.js +1 -1
  84. package/dist/locale/he.min.js +1 -1
  85. package/dist/locale/he.min.mjs +1 -1
  86. package/dist/locale/he.mjs +1 -1
  87. package/dist/locale/hr.js +1 -1
  88. package/dist/locale/hr.min.js +1 -1
  89. package/dist/locale/hr.min.mjs +1 -1
  90. package/dist/locale/hr.mjs +1 -1
  91. package/dist/locale/hu.js +1 -1
  92. package/dist/locale/hu.min.js +1 -1
  93. package/dist/locale/hu.min.mjs +1 -1
  94. package/dist/locale/hu.mjs +1 -1
  95. package/dist/locale/hy-am.js +1 -1
  96. package/dist/locale/hy-am.min.js +1 -1
  97. package/dist/locale/hy-am.min.mjs +1 -1
  98. package/dist/locale/hy-am.mjs +1 -1
  99. package/dist/locale/id.js +1 -1
  100. package/dist/locale/id.min.js +1 -1
  101. package/dist/locale/id.min.mjs +1 -1
  102. package/dist/locale/id.mjs +1 -1
  103. package/dist/locale/it.js +1 -1
  104. package/dist/locale/it.min.js +1 -1
  105. package/dist/locale/it.min.mjs +1 -1
  106. package/dist/locale/it.mjs +1 -1
  107. package/dist/locale/ja.js +1 -1
  108. package/dist/locale/ja.min.js +1 -1
  109. package/dist/locale/ja.min.mjs +1 -1
  110. package/dist/locale/ja.mjs +1 -1
  111. package/dist/locale/kk.js +1 -1
  112. package/dist/locale/kk.min.js +1 -1
  113. package/dist/locale/kk.min.mjs +1 -1
  114. package/dist/locale/kk.mjs +1 -1
  115. package/dist/locale/km.js +1 -1
  116. package/dist/locale/km.min.js +1 -1
  117. package/dist/locale/km.min.mjs +1 -1
  118. package/dist/locale/km.mjs +1 -1
  119. package/dist/locale/ko.js +1 -1
  120. package/dist/locale/ko.min.js +1 -1
  121. package/dist/locale/ko.min.mjs +1 -1
  122. package/dist/locale/ko.mjs +1 -1
  123. package/dist/locale/ku.js +1 -1
  124. package/dist/locale/ku.min.js +1 -1
  125. package/dist/locale/ku.min.mjs +1 -1
  126. package/dist/locale/ku.mjs +1 -1
  127. package/dist/locale/ky.js +1 -1
  128. package/dist/locale/ky.min.js +1 -1
  129. package/dist/locale/ky.min.mjs +1 -1
  130. package/dist/locale/ky.mjs +1 -1
  131. package/dist/locale/lt.js +1 -1
  132. package/dist/locale/lt.min.js +1 -1
  133. package/dist/locale/lt.min.mjs +1 -1
  134. package/dist/locale/lt.mjs +1 -1
  135. package/dist/locale/lv.js +1 -1
  136. package/dist/locale/lv.min.js +1 -1
  137. package/dist/locale/lv.min.mjs +1 -1
  138. package/dist/locale/lv.mjs +1 -1
  139. package/dist/locale/mg.js +1 -1
  140. package/dist/locale/mg.min.js +1 -1
  141. package/dist/locale/mg.min.mjs +1 -1
  142. package/dist/locale/mg.mjs +1 -1
  143. package/dist/locale/mn.js +1 -1
  144. package/dist/locale/mn.min.js +1 -1
  145. package/dist/locale/mn.min.mjs +1 -1
  146. package/dist/locale/mn.mjs +1 -1
  147. package/dist/locale/nb-no.js +1 -1
  148. package/dist/locale/nb-no.min.js +1 -1
  149. package/dist/locale/nb-no.min.mjs +1 -1
  150. package/dist/locale/nb-no.mjs +1 -1
  151. package/dist/locale/nl.js +1 -1
  152. package/dist/locale/nl.min.js +1 -1
  153. package/dist/locale/nl.min.mjs +1 -1
  154. package/dist/locale/nl.mjs +1 -1
  155. package/dist/locale/pa.js +1 -1
  156. package/dist/locale/pa.min.js +1 -1
  157. package/dist/locale/pa.min.mjs +1 -1
  158. package/dist/locale/pa.mjs +1 -1
  159. package/dist/locale/pl.js +1 -1
  160. package/dist/locale/pl.min.js +1 -1
  161. package/dist/locale/pl.min.mjs +1 -1
  162. package/dist/locale/pl.mjs +1 -1
  163. package/dist/locale/pt-br.js +1 -1
  164. package/dist/locale/pt-br.min.js +1 -1
  165. package/dist/locale/pt-br.min.mjs +1 -1
  166. package/dist/locale/pt-br.mjs +1 -1
  167. package/dist/locale/pt.js +1 -1
  168. package/dist/locale/pt.min.js +1 -1
  169. package/dist/locale/pt.min.mjs +1 -1
  170. package/dist/locale/pt.mjs +1 -1
  171. package/dist/locale/ro.js +1 -1
  172. package/dist/locale/ro.min.js +1 -1
  173. package/dist/locale/ro.min.mjs +1 -1
  174. package/dist/locale/ro.mjs +1 -1
  175. package/dist/locale/ru.js +1 -1
  176. package/dist/locale/ru.min.js +1 -1
  177. package/dist/locale/ru.min.mjs +1 -1
  178. package/dist/locale/ru.mjs +1 -1
  179. package/dist/locale/sk.js +1 -1
  180. package/dist/locale/sk.min.js +1 -1
  181. package/dist/locale/sk.min.mjs +1 -1
  182. package/dist/locale/sk.mjs +1 -1
  183. package/dist/locale/sl.js +1 -1
  184. package/dist/locale/sl.min.js +1 -1
  185. package/dist/locale/sl.min.mjs +1 -1
  186. package/dist/locale/sl.mjs +1 -1
  187. package/dist/locale/sr.js +1 -1
  188. package/dist/locale/sr.min.js +1 -1
  189. package/dist/locale/sr.min.mjs +1 -1
  190. package/dist/locale/sr.mjs +1 -1
  191. package/dist/locale/sv.js +1 -1
  192. package/dist/locale/sv.min.js +1 -1
  193. package/dist/locale/sv.min.mjs +1 -1
  194. package/dist/locale/sv.mjs +1 -1
  195. package/dist/locale/ta.js +1 -1
  196. package/dist/locale/ta.min.js +1 -1
  197. package/dist/locale/ta.min.mjs +1 -1
  198. package/dist/locale/ta.mjs +1 -1
  199. package/dist/locale/th.js +1 -1
  200. package/dist/locale/th.min.js +1 -1
  201. package/dist/locale/th.min.mjs +1 -1
  202. package/dist/locale/th.mjs +1 -1
  203. package/dist/locale/tk.js +1 -1
  204. package/dist/locale/tk.min.js +1 -1
  205. package/dist/locale/tk.min.mjs +1 -1
  206. package/dist/locale/tk.mjs +1 -1
  207. package/dist/locale/tr.js +1 -1
  208. package/dist/locale/tr.min.js +1 -1
  209. package/dist/locale/tr.min.mjs +1 -1
  210. package/dist/locale/tr.mjs +1 -1
  211. package/dist/locale/ug-cn.js +1 -1
  212. package/dist/locale/ug-cn.min.js +1 -1
  213. package/dist/locale/ug-cn.min.mjs +1 -1
  214. package/dist/locale/ug-cn.mjs +1 -1
  215. package/dist/locale/uk.js +1 -1
  216. package/dist/locale/uk.min.js +1 -1
  217. package/dist/locale/uk.min.mjs +1 -1
  218. package/dist/locale/uk.mjs +1 -1
  219. package/dist/locale/uz-uz.js +1 -1
  220. package/dist/locale/uz-uz.min.js +1 -1
  221. package/dist/locale/uz-uz.min.mjs +1 -1
  222. package/dist/locale/uz-uz.mjs +1 -1
  223. package/dist/locale/vi.js +1 -1
  224. package/dist/locale/vi.min.js +1 -1
  225. package/dist/locale/vi.min.mjs +1 -1
  226. package/dist/locale/vi.mjs +1 -1
  227. package/dist/locale/zh-cn.js +1 -1
  228. package/dist/locale/zh-cn.min.js +1 -1
  229. package/dist/locale/zh-cn.min.mjs +1 -1
  230. package/dist/locale/zh-cn.mjs +1 -1
  231. package/dist/locale/zh-tw.js +1 -1
  232. package/dist/locale/zh-tw.min.js +1 -1
  233. package/dist/locale/zh-tw.min.mjs +1 -1
  234. package/dist/locale/zh-tw.mjs +1 -1
  235. package/es/components/alert/index.mjs +2 -2
  236. package/es/components/alert/src/alert.mjs +103 -38
  237. package/es/components/alert/src/alert.mjs.map +1 -1
  238. package/es/components/alert/src/alert2.mjs +38 -103
  239. package/es/components/alert/src/alert2.mjs.map +1 -1
  240. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  241. package/es/components/avatar/index.mjs +2 -2
  242. package/es/components/avatar/src/avatar.mjs +69 -32
  243. package/es/components/avatar/src/avatar.mjs.map +1 -1
  244. package/es/components/avatar/src/avatar2.mjs +32 -69
  245. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  246. package/es/components/backtop/index.mjs +2 -2
  247. package/es/components/backtop/src/backtop.mjs +61 -23
  248. package/es/components/backtop/src/backtop.mjs.map +1 -1
  249. package/es/components/backtop/src/backtop2.mjs +23 -61
  250. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  251. package/es/components/breadcrumb/index.mjs +2 -2
  252. package/es/components/breadcrumb/src/breadcrumb.mjs +11 -36
  253. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  254. package/es/components/breadcrumb/src/breadcrumb2.mjs +36 -11
  255. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  256. package/es/components/button/index.mjs +1 -1
  257. package/es/components/button/src/button-group.mjs +30 -6
  258. package/es/components/button/src/button-group.mjs.map +1 -1
  259. package/es/components/button/src/button-group2.mjs +6 -30
  260. package/es/components/button/src/button-group2.mjs.map +1 -1
  261. package/es/components/calendar/index.mjs +2 -2
  262. package/es/components/calendar/src/calendar.mjs +131 -18
  263. package/es/components/calendar/src/calendar.mjs.map +1 -1
  264. package/es/components/calendar/src/calendar2.mjs +18 -131
  265. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  266. package/es/components/calendar/src/date-table.mjs +33 -87
  267. package/es/components/calendar/src/date-table.mjs.map +1 -1
  268. package/es/components/calendar/src/date-table2.mjs +87 -33
  269. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  270. package/es/components/calendar/src/use-date-table.mjs +1 -1
  271. package/es/components/card/index.mjs +2 -2
  272. package/es/components/card/src/card.mjs +35 -16
  273. package/es/components/card/src/card.mjs.map +1 -1
  274. package/es/components/card/src/card2.mjs +16 -35
  275. package/es/components/card/src/card2.mjs.map +1 -1
  276. package/es/components/cascader/src/cascader.mjs +2 -2
  277. package/es/components/cascader-panel/src/index.mjs +1 -1
  278. package/es/components/cascader-panel/src/menu.mjs +1 -1
  279. package/es/components/cascader-panel/src/node.mjs +209 -116
  280. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  281. package/es/components/cascader-panel/src/node2.mjs +116 -209
  282. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  283. package/es/components/cascader-panel/src/store.mjs +1 -1
  284. package/es/components/checkbox/index.mjs +2 -2
  285. package/es/components/checkbox/src/checkbox-button.mjs +1 -1
  286. package/es/components/checkbox/src/checkbox.mjs +49 -117
  287. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  288. package/es/components/checkbox/src/checkbox2.mjs +117 -49
  289. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  290. package/es/components/col/index.mjs +2 -2
  291. package/es/components/col/src/col.mjs +66 -43
  292. package/es/components/col/src/col.mjs.map +1 -1
  293. package/es/components/col/src/col2.mjs +43 -66
  294. package/es/components/col/src/col2.mjs.map +1 -1
  295. package/es/components/collection/index.mjs +1 -1
  296. package/es/components/collection/src/collection.mjs +10 -62
  297. package/es/components/collection/src/collection.mjs.map +1 -1
  298. package/es/components/collection/src/collection2.mjs +62 -10
  299. package/es/components/collection/src/collection2.mjs.map +1 -1
  300. package/es/components/descriptions/src/description2.mjs +1 -1
  301. package/es/components/descriptions/src/descriptions-row.mjs +64 -7
  302. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  303. package/es/components/descriptions/src/descriptions-row2.mjs +7 -64
  304. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  305. package/es/components/dialog/index.mjs +2 -2
  306. package/es/components/dialog/src/dialog.mjs +174 -73
  307. package/es/components/dialog/src/dialog.mjs.map +1 -1
  308. package/es/components/dialog/src/dialog2.mjs +73 -174
  309. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  310. package/es/components/drawer/src/drawer.mjs +1 -1
  311. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
  312. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  313. package/es/components/dropdown/src/dropdown.mjs +2 -2
  314. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  315. package/es/components/empty/index.mjs +2 -2
  316. package/es/components/empty/src/empty.mjs +55 -11
  317. package/es/components/empty/src/empty.mjs.map +1 -1
  318. package/es/components/empty/src/empty2.mjs +11 -55
  319. package/es/components/empty/src/empty2.mjs.map +1 -1
  320. package/es/components/form/index.mjs +2 -2
  321. package/es/components/form/src/form-item.mjs +46 -326
  322. package/es/components/form/src/form-item.mjs.map +1 -1
  323. package/es/components/form/src/form-item2.mjs +326 -46
  324. package/es/components/form/src/form-item2.mjs.map +1 -1
  325. package/es/components/index.mjs +27 -27
  326. package/es/components/notification/index.mjs +1 -1
  327. package/es/components/notification/src/notification.mjs +69 -149
  328. package/es/components/notification/src/notification.mjs.map +1 -1
  329. package/es/components/notification/src/notification2.mjs +149 -69
  330. package/es/components/notification/src/notification2.mjs.map +1 -1
  331. package/es/components/notification/src/notify.mjs +2 -2
  332. package/es/components/page-header/index.mjs +2 -2
  333. package/es/components/page-header/src/page-header.mjs +17 -103
  334. package/es/components/page-header/src/page-header.mjs.map +1 -1
  335. package/es/components/page-header/src/page-header2.mjs +103 -17
  336. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  337. package/es/components/pagination/src/components/next.mjs +19 -38
  338. package/es/components/pagination/src/components/next.mjs.map +1 -1
  339. package/es/components/pagination/src/components/next2.mjs +38 -19
  340. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  341. package/es/components/pagination/src/components/prev.mjs +38 -18
  342. package/es/components/pagination/src/components/prev.mjs.map +1 -1
  343. package/es/components/pagination/src/components/prev2.mjs +18 -38
  344. package/es/components/pagination/src/components/prev2.mjs.map +1 -1
  345. package/es/components/pagination/src/pagination.mjs +2 -2
  346. package/es/components/popconfirm/src/popconfirm.mjs +1 -1
  347. package/es/components/popover/index.mjs +2 -2
  348. package/es/components/popover/src/popover.mjs +111 -66
  349. package/es/components/popover/src/popover.mjs.map +1 -1
  350. package/es/components/popover/src/popover2.mjs +66 -111
  351. package/es/components/popover/src/popover2.mjs.map +1 -1
  352. package/es/components/radio/index.mjs +2 -2
  353. package/es/components/radio/src/radio-group.mjs +70 -36
  354. package/es/components/radio/src/radio-group.mjs.map +1 -1
  355. package/es/components/radio/src/radio-group2.mjs +36 -70
  356. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  357. package/es/components/rate/index.mjs +2 -2
  358. package/es/components/rate/src/rate.mjs +257 -87
  359. package/es/components/rate/src/rate.mjs.map +1 -1
  360. package/es/components/rate/src/rate2.mjs +87 -257
  361. package/es/components/rate/src/rate2.mjs.map +1 -1
  362. package/es/components/result/index.mjs +2 -2
  363. package/es/components/result/src/result.mjs +63 -29
  364. package/es/components/result/src/result.mjs.map +1 -1
  365. package/es/components/result/src/result2.mjs +29 -63
  366. package/es/components/result/src/result2.mjs.map +1 -1
  367. package/es/components/roving-focus-group/index.mjs +3 -3
  368. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +6 -1
  369. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map +1 -1
  370. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  371. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  372. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  373. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  374. package/es/components/roving-focus-group/src/roving-focus-item.mjs +12 -1
  375. package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -1
  376. package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +5 -0
  377. package/es/components/scrollbar/index.mjs +2 -2
  378. package/es/components/scrollbar/src/scrollbar.mjs +46 -176
  379. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  380. package/es/components/scrollbar/src/scrollbar2.mjs +176 -46
  381. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  382. package/es/components/select/src/select.mjs +2 -2
  383. package/es/components/select-v2/src/defaults.mjs +1 -1
  384. package/es/components/skeleton/index.mjs +4 -4
  385. package/es/components/skeleton/src/skeleton-item.mjs +23 -18
  386. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  387. package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
  388. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  389. package/es/components/skeleton/src/skeleton.mjs +49 -22
  390. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  391. package/es/components/skeleton/src/skeleton2.mjs +22 -49
  392. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  393. package/es/components/steps/index.mjs +2 -2
  394. package/es/components/steps/src/item.mjs +19 -190
  395. package/es/components/steps/src/item.mjs.map +1 -1
  396. package/es/components/steps/src/item2.mjs +190 -19
  397. package/es/components/steps/src/item2.mjs.map +1 -1
  398. package/es/components/switch/index.mjs +2 -2
  399. package/es/components/switch/src/switch.mjs +243 -88
  400. package/es/components/switch/src/switch.mjs.map +1 -1
  401. package/es/components/switch/src/switch2.mjs +88 -243
  402. package/es/components/switch/src/switch2.mjs.map +1 -1
  403. package/es/components/tag/index.mjs +2 -2
  404. package/es/components/tag/src/tag.mjs +98 -33
  405. package/es/components/tag/src/tag.mjs.map +1 -1
  406. package/es/components/tag/src/tag2.mjs +33 -98
  407. package/es/components/tag/src/tag2.mjs.map +1 -1
  408. package/es/components/teleport/index.mjs +2 -2
  409. package/es/components/teleport/src/teleport.mjs +44 -18
  410. package/es/components/teleport/src/teleport.mjs.map +1 -1
  411. package/es/components/teleport/src/teleport2.mjs +18 -44
  412. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  413. package/es/components/time-select/index.mjs +1 -1
  414. package/es/components/time-select/src/time-select.mjs +118 -48
  415. package/es/components/time-select/src/time-select.mjs.map +1 -1
  416. package/es/components/time-select/src/time-select2.mjs +48 -118
  417. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  418. package/es/components/timeline/index.mjs +2 -2
  419. package/es/components/timeline/src/timeline-item.mjs +42 -70
  420. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  421. package/es/components/timeline/src/timeline-item2.mjs +70 -42
  422. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  423. package/es/components/tooltip/index.mjs +3 -3
  424. package/es/components/tooltip/src/content.mjs +179 -31
  425. package/es/components/tooltip/src/content.mjs.map +1 -1
  426. package/es/components/tooltip/src/content2.mjs +31 -179
  427. package/es/components/tooltip/src/content2.mjs.map +1 -1
  428. package/es/components/tooltip/src/tooltip.mjs +174 -31
  429. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  430. package/es/components/tooltip/src/tooltip2.mjs +31 -174
  431. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  432. package/es/components/tooltip-v2/index.mjs +2 -2
  433. package/es/components/tooltip-v2/src/content.mjs +114 -50
  434. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  435. package/es/components/tooltip-v2/src/content2.mjs +50 -114
  436. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  437. package/es/components/tooltip-v2/src/root.mjs +82 -17
  438. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  439. package/es/components/tooltip-v2/src/root2.mjs +17 -82
  440. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  441. package/es/components/tooltip-v2/src/tooltip.mjs +4 -4
  442. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  443. package/es/components/upload/index.mjs +1 -1
  444. package/es/components/upload/src/upload-content.mjs +178 -33
  445. package/es/components/upload/src/upload-content.mjs.map +1 -1
  446. package/es/components/upload/src/upload-content2.mjs +33 -178
  447. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  448. package/es/components/upload/src/upload2.mjs +1 -1
  449. package/es/index.mjs +27 -27
  450. package/es/version.d.ts +1 -1
  451. package/es/version.mjs +1 -1
  452. package/es/version.mjs.map +1 -1
  453. package/lib/components/alert/index.js +2 -2
  454. package/lib/components/alert/src/alert.js +102 -39
  455. package/lib/components/alert/src/alert.js.map +1 -1
  456. package/lib/components/alert/src/alert2.js +39 -102
  457. package/lib/components/alert/src/alert2.js.map +1 -1
  458. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  459. package/lib/components/avatar/index.js +2 -2
  460. package/lib/components/avatar/src/avatar.js +69 -33
  461. package/lib/components/avatar/src/avatar.js.map +1 -1
  462. package/lib/components/avatar/src/avatar2.js +33 -69
  463. package/lib/components/avatar/src/avatar2.js.map +1 -1
  464. package/lib/components/backtop/index.js +2 -2
  465. package/lib/components/backtop/src/backtop.js +61 -24
  466. package/lib/components/backtop/src/backtop.js.map +1 -1
  467. package/lib/components/backtop/src/backtop2.js +24 -61
  468. package/lib/components/backtop/src/backtop2.js.map +1 -1
  469. package/lib/components/breadcrumb/index.js +2 -2
  470. package/lib/components/breadcrumb/src/breadcrumb.js +11 -36
  471. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  472. package/lib/components/breadcrumb/src/breadcrumb2.js +36 -11
  473. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  474. package/lib/components/button/index.js +1 -1
  475. package/lib/components/button/src/button-group.js +30 -6
  476. package/lib/components/button/src/button-group.js.map +1 -1
  477. package/lib/components/button/src/button-group2.js +6 -30
  478. package/lib/components/button/src/button-group2.js.map +1 -1
  479. package/lib/components/calendar/index.js +2 -2
  480. package/lib/components/calendar/src/calendar.js +131 -19
  481. package/lib/components/calendar/src/calendar.js.map +1 -1
  482. package/lib/components/calendar/src/calendar2.js +19 -131
  483. package/lib/components/calendar/src/calendar2.js.map +1 -1
  484. package/lib/components/calendar/src/date-table.js +37 -87
  485. package/lib/components/calendar/src/date-table.js.map +1 -1
  486. package/lib/components/calendar/src/date-table2.js +87 -37
  487. package/lib/components/calendar/src/date-table2.js.map +1 -1
  488. package/lib/components/calendar/src/use-date-table.js +1 -1
  489. package/lib/components/card/index.js +2 -2
  490. package/lib/components/card/src/card.js +35 -16
  491. package/lib/components/card/src/card.js.map +1 -1
  492. package/lib/components/card/src/card2.js +16 -35
  493. package/lib/components/card/src/card2.js.map +1 -1
  494. package/lib/components/cascader/src/cascader.js +2 -2
  495. package/lib/components/cascader-panel/src/index.js +1 -1
  496. package/lib/components/cascader-panel/src/menu.js +1 -1
  497. package/lib/components/cascader-panel/src/node.js +209 -116
  498. package/lib/components/cascader-panel/src/node.js.map +1 -1
  499. package/lib/components/cascader-panel/src/node2.js +116 -209
  500. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  501. package/lib/components/cascader-panel/src/store.js +1 -1
  502. package/lib/components/checkbox/index.js +2 -2
  503. package/lib/components/checkbox/src/checkbox-button.js +1 -1
  504. package/lib/components/checkbox/src/checkbox.js +50 -117
  505. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  506. package/lib/components/checkbox/src/checkbox2.js +117 -50
  507. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  508. package/lib/components/col/index.js +2 -2
  509. package/lib/components/col/src/col.js +66 -43
  510. package/lib/components/col/src/col.js.map +1 -1
  511. package/lib/components/col/src/col2.js +43 -66
  512. package/lib/components/col/src/col2.js.map +1 -1
  513. package/lib/components/collection/index.js +1 -1
  514. package/lib/components/collection/src/collection.js +9 -62
  515. package/lib/components/collection/src/collection.js.map +1 -1
  516. package/lib/components/collection/src/collection2.js +62 -9
  517. package/lib/components/collection/src/collection2.js.map +1 -1
  518. package/lib/components/descriptions/src/description2.js +1 -1
  519. package/lib/components/descriptions/src/descriptions-row.js +64 -7
  520. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  521. package/lib/components/descriptions/src/descriptions-row2.js +7 -64
  522. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  523. package/lib/components/dialog/index.js +2 -2
  524. package/lib/components/dialog/src/dialog.js +174 -74
  525. package/lib/components/dialog/src/dialog.js.map +1 -1
  526. package/lib/components/dialog/src/dialog2.js +74 -174
  527. package/lib/components/dialog/src/dialog2.js.map +1 -1
  528. package/lib/components/drawer/src/drawer.js +1 -1
  529. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
  530. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  531. package/lib/components/dropdown/src/dropdown.js +2 -2
  532. package/lib/components/dropdown/src/dropdown2.js +1 -1
  533. package/lib/components/empty/index.js +2 -2
  534. package/lib/components/empty/src/empty.js +55 -11
  535. package/lib/components/empty/src/empty.js.map +1 -1
  536. package/lib/components/empty/src/empty2.js +11 -55
  537. package/lib/components/empty/src/empty2.js.map +1 -1
  538. package/lib/components/form/index.js +2 -2
  539. package/lib/components/form/src/form-item.js +47 -330
  540. package/lib/components/form/src/form-item.js.map +1 -1
  541. package/lib/components/form/src/form-item2.js +330 -47
  542. package/lib/components/form/src/form-item2.js.map +1 -1
  543. package/lib/components/index.js +27 -27
  544. package/lib/components/notification/index.js +1 -1
  545. package/lib/components/notification/src/notification.js +70 -148
  546. package/lib/components/notification/src/notification.js.map +1 -1
  547. package/lib/components/notification/src/notification2.js +148 -70
  548. package/lib/components/notification/src/notification2.js.map +1 -1
  549. package/lib/components/notification/src/notify.js +2 -2
  550. package/lib/components/page-header/index.js +2 -2
  551. package/lib/components/page-header/src/page-header.js +18 -103
  552. package/lib/components/page-header/src/page-header.js.map +1 -1
  553. package/lib/components/page-header/src/page-header2.js +103 -18
  554. package/lib/components/page-header/src/page-header2.js.map +1 -1
  555. package/lib/components/pagination/src/components/next.js +19 -38
  556. package/lib/components/pagination/src/components/next.js.map +1 -1
  557. package/lib/components/pagination/src/components/next2.js +38 -19
  558. package/lib/components/pagination/src/components/next2.js.map +1 -1
  559. package/lib/components/pagination/src/components/prev.js +38 -19
  560. package/lib/components/pagination/src/components/prev.js.map +1 -1
  561. package/lib/components/pagination/src/components/prev2.js +19 -38
  562. package/lib/components/pagination/src/components/prev2.js.map +1 -1
  563. package/lib/components/pagination/src/pagination.js +2 -2
  564. package/lib/components/popconfirm/src/popconfirm.js +1 -1
  565. package/lib/components/popover/index.js +2 -2
  566. package/lib/components/popover/src/popover.js +111 -67
  567. package/lib/components/popover/src/popover.js.map +1 -1
  568. package/lib/components/popover/src/popover2.js +67 -111
  569. package/lib/components/popover/src/popover2.js.map +1 -1
  570. package/lib/components/radio/index.js +2 -2
  571. package/lib/components/radio/src/radio-group.js +70 -37
  572. package/lib/components/radio/src/radio-group.js.map +1 -1
  573. package/lib/components/radio/src/radio-group2.js +37 -70
  574. package/lib/components/radio/src/radio-group2.js.map +1 -1
  575. package/lib/components/rate/index.js +2 -2
  576. package/lib/components/rate/src/rate.js +256 -87
  577. package/lib/components/rate/src/rate.js.map +1 -1
  578. package/lib/components/rate/src/rate2.js +87 -256
  579. package/lib/components/rate/src/rate2.js.map +1 -1
  580. package/lib/components/result/index.js +2 -2
  581. package/lib/components/result/src/result.js +63 -31
  582. package/lib/components/result/src/result.js.map +1 -1
  583. package/lib/components/result/src/result2.js +31 -63
  584. package/lib/components/result/src/result2.js.map +1 -1
  585. package/lib/components/roving-focus-group/index.js +2 -2
  586. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +6 -1
  587. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js.map +1 -1
  588. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  589. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  590. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  591. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  592. package/lib/components/roving-focus-group/src/roving-focus-item.js +12 -1
  593. package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -1
  594. package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +5 -0
  595. package/lib/components/scrollbar/index.js +2 -2
  596. package/lib/components/scrollbar/src/scrollbar.js +47 -176
  597. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  598. package/lib/components/scrollbar/src/scrollbar2.js +176 -47
  599. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  600. package/lib/components/select/src/select.js +2 -2
  601. package/lib/components/select-v2/src/defaults.js +1 -1
  602. package/lib/components/skeleton/index.js +4 -4
  603. package/lib/components/skeleton/src/skeleton-item.js +23 -18
  604. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  605. package/lib/components/skeleton/src/skeleton-item2.js +18 -23
  606. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  607. package/lib/components/skeleton/src/skeleton.js +49 -22
  608. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  609. package/lib/components/skeleton/src/skeleton2.js +22 -49
  610. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  611. package/lib/components/steps/index.js +2 -2
  612. package/lib/components/steps/src/item.js +19 -190
  613. package/lib/components/steps/src/item.js.map +1 -1
  614. package/lib/components/steps/src/item2.js +190 -19
  615. package/lib/components/steps/src/item2.js.map +1 -1
  616. package/lib/components/switch/index.js +2 -2
  617. package/lib/components/switch/src/switch.js +242 -88
  618. package/lib/components/switch/src/switch.js.map +1 -1
  619. package/lib/components/switch/src/switch2.js +88 -242
  620. package/lib/components/switch/src/switch2.js.map +1 -1
  621. package/lib/components/tag/index.js +2 -2
  622. package/lib/components/tag/src/tag.js +98 -34
  623. package/lib/components/tag/src/tag.js.map +1 -1
  624. package/lib/components/tag/src/tag2.js +34 -98
  625. package/lib/components/tag/src/tag2.js.map +1 -1
  626. package/lib/components/teleport/index.js +2 -2
  627. package/lib/components/teleport/src/teleport.js +44 -18
  628. package/lib/components/teleport/src/teleport.js.map +1 -1
  629. package/lib/components/teleport/src/teleport2.js +18 -44
  630. package/lib/components/teleport/src/teleport2.js.map +1 -1
  631. package/lib/components/time-select/index.js +1 -1
  632. package/lib/components/time-select/src/time-select.js +123 -48
  633. package/lib/components/time-select/src/time-select.js.map +1 -1
  634. package/lib/components/time-select/src/time-select2.js +48 -123
  635. package/lib/components/time-select/src/time-select2.js.map +1 -1
  636. package/lib/components/timeline/index.js +2 -2
  637. package/lib/components/timeline/src/timeline-item.js +42 -70
  638. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  639. package/lib/components/timeline/src/timeline-item2.js +70 -42
  640. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  641. package/lib/components/tooltip/index.js +3 -3
  642. package/lib/components/tooltip/src/content.js +179 -31
  643. package/lib/components/tooltip/src/content.js.map +1 -1
  644. package/lib/components/tooltip/src/content2.js +31 -179
  645. package/lib/components/tooltip/src/content2.js.map +1 -1
  646. package/lib/components/tooltip/src/tooltip.js +173 -34
  647. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  648. package/lib/components/tooltip/src/tooltip2.js +34 -173
  649. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  650. package/lib/components/tooltip-v2/index.js +2 -2
  651. package/lib/components/tooltip-v2/src/content.js +114 -50
  652. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  653. package/lib/components/tooltip-v2/src/content2.js +50 -114
  654. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  655. package/lib/components/tooltip-v2/src/root.js +82 -17
  656. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  657. package/lib/components/tooltip-v2/src/root2.js +17 -82
  658. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  659. package/lib/components/tooltip-v2/src/tooltip.js +4 -4
  660. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  661. package/lib/components/upload/index.js +1 -1
  662. package/lib/components/upload/src/upload-content.js +176 -31
  663. package/lib/components/upload/src/upload-content.js.map +1 -1
  664. package/lib/components/upload/src/upload-content2.js +31 -176
  665. package/lib/components/upload/src/upload-content2.js.map +1 -1
  666. package/lib/components/upload/src/upload2.js +1 -1
  667. package/lib/index.js +27 -27
  668. package/lib/version.d.ts +1 -1
  669. package/lib/version.js +1 -1
  670. package/lib/version.js.map +1 -1
  671. package/package.json +1 -1
  672. package/web-types.json +1 -1
@@ -2,19 +2,44 @@
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');
7
- var icon = require('../../../utils/vue/icon.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var constants = require('./constants.js');
8
+ var breadcrumb = require('./breadcrumb.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
8
11
 
9
- const breadcrumbProps = runtime.buildProps({
10
- separator: {
11
- type: String,
12
- default: "/"
13
- },
14
- separatorIcon: {
15
- type: icon.iconPropType
12
+ const __default__ = vue.defineComponent({
13
+ name: "ElBreadcrumb"
14
+ });
15
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
+ ...__default__,
17
+ props: breadcrumb.breadcrumbProps,
18
+ setup(__props) {
19
+ const props = __props;
20
+ const ns = index.useNamespace("breadcrumb");
21
+ const breadcrumb = vue.ref();
22
+ vue.provide(constants.breadcrumbKey, props);
23
+ vue.onMounted(() => {
24
+ const items = breadcrumb.value.querySelectorAll(`.${ns.e("item")}`);
25
+ if (items.length) {
26
+ items[items.length - 1].setAttribute("aria-current", "page");
27
+ }
28
+ });
29
+ return (_ctx, _cache) => {
30
+ return vue.openBlock(), vue.createElementBlock("div", {
31
+ ref_key: "breadcrumb",
32
+ ref: breadcrumb,
33
+ class: vue.normalizeClass(vue.unref(ns).b()),
34
+ "aria-label": "Breadcrumb",
35
+ role: "navigation"
36
+ }, [
37
+ vue.renderSlot(_ctx.$slots, "default")
38
+ ], 2);
39
+ };
16
40
  }
17
41
  });
42
+ var Breadcrumb = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/breadcrumb/src/breadcrumb.vue"]]);
18
43
 
19
- exports.breadcrumbProps = breadcrumbProps;
44
+ exports["default"] = Breadcrumb;
20
45
  //# sourceMappingURL=breadcrumb2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb2.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const breadcrumbProps = buildProps({\n /**\n * @description separator character\n */\n separator: {\n type: String,\n default: '/',\n },\n /**\n * @description icon component of icon separator\n */\n separatorIcon: {\n type: iconPropType,\n },\n} as const)\nexport type BreadcrumbProps = ExtractPropTypes<typeof breadcrumbProps>\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"breadcrumb2.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb.vue"],"sourcesContent":["<template>\n <div\n ref=\"breadcrumb\"\n :class=\"ns.b()\"\n aria-label=\"Breadcrumb\"\n role=\"navigation\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { onMounted, provide, ref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbKey } from './constants'\nimport { breadcrumbProps } from './breadcrumb'\n\ndefineOptions({\n name: 'ElBreadcrumb',\n})\n\nconst props = defineProps(breadcrumbProps)\n\nconst ns = useNamespace('breadcrumb')\nconst breadcrumb = ref<HTMLDivElement>()\n\nprovide(breadcrumbKey, props)\n\nonMounted(() => {\n const items = breadcrumb.value!.querySelectorAll(`.${ns.e('item')}`)\n if (items.length) {\n items[items.length - 1].setAttribute('aria-current', 'page')\n }\n})\n</script>\n"],"names":["useNamespace","ref","provide","breadcrumbKey","onMounted"],"mappings":";;;;;;;;;;;uCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,YAAY,CAAA,CAAA;AACpC,IAAA,MAAM,aAAaC,OAAoB,EAAA,CAAA;AAEvC,IAAAC,WAAA,CAAQC,yBAAe,KAAK,CAAA,CAAA;AAE5B,IAAAC,aAAA,CAAU,MAAM;AACd,MAAM,MAAA,KAAA,GAAQ,WAAW,KAAO,CAAA,gBAAA,CAAiB,IAAI,EAAG,CAAA,CAAA,CAAE,MAAM,CAAG,CAAA,CAAA,CAAA,CAAA;AACnE,MAAA,IAAI,MAAM,MAAQ,EAAA;AAChB,QAAA,KAAA,CAAM,KAAM,CAAA,MAAA,GAAS,CAAG,CAAA,CAAA,YAAA,CAAa,gBAAgB,MAAM,CAAA,CAAA;AAAA,OAC7D;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
6
  var button$1 = require('./src/button2.js');
7
- var buttonGroup = require('./src/button-group2.js');
7
+ var buttonGroup = require('./src/button-group.js');
8
8
  var button = require('./src/button.js');
9
9
  var constants = require('./src/constants.js');
10
10
  var install = require('../../utils/vue/install.js');
@@ -2,12 +2,36 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var button = require('./button.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var buttonGroup = require('./button-group2.js');
8
+ var constants = require('./constants.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
6
11
 
7
- const buttonGroupProps = {
8
- size: button.buttonProps.size,
9
- type: button.buttonProps.type
10
- };
12
+ const __default__ = vue.defineComponent({
13
+ name: "ElButtonGroup"
14
+ });
15
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
+ ...__default__,
17
+ props: buttonGroup.buttonGroupProps,
18
+ setup(__props) {
19
+ const props = __props;
20
+ vue.provide(constants.buttonGroupContextKey, vue.reactive({
21
+ size: vue.toRef(props, "size"),
22
+ type: vue.toRef(props, "type")
23
+ }));
24
+ const ns = index.useNamespace("button");
25
+ return (_ctx, _cache) => {
26
+ return vue.openBlock(), vue.createElementBlock("div", {
27
+ class: vue.normalizeClass(`${vue.unref(ns).b("group")}`)
28
+ }, [
29
+ vue.renderSlot(_ctx.$slots, "default")
30
+ ], 2);
31
+ };
32
+ }
33
+ });
34
+ var ButtonGroup = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/button/src/button-group.vue"]]);
11
35
 
12
- exports.buttonGroupProps = buttonGroupProps;
36
+ exports["default"] = ButtonGroup;
13
37
  //# sourceMappingURL=button-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.js","sources":["../../../../../../packages/components/button/src/button-group.ts"],"sourcesContent":["import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonGroupProps = {\n /**\n * @description control the size of buttons in this button-group\n */\n size: buttonProps.size,\n /**\n * @description control the type of buttons in this button-group\n */\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes<typeof buttonGroupProps>\n"],"names":["buttonProps"],"mappings":";;;;;;AACY,MAAC,gBAAgB,GAAG;AAChC,EAAE,IAAI,EAAEA,kBAAW,CAAC,IAAI;AACxB,EAAE,IAAI,EAAEA,kBAAW,CAAC,IAAI;AACxB;;;;"}
1
+ {"version":3,"file":"button-group.js","sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"`${ns.b('group')}`\">\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { buttonGroupProps } from './button-group'\nimport { buttonGroupContextKey } from './constants'\n\ndefineOptions({\n name: 'ElButtonGroup',\n})\nconst props = defineProps(buttonGroupProps)\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"names":["provide","buttonGroupContextKey","reactive","toRef","useNamespace"],"mappings":";;;;;;;;;;;uCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAAA,WAAA,CACEC,iCACAC,YAAS,CAAA;AAAA,MACP,IAAA,EAAMC,SAAM,CAAA,KAAA,EAAO,MAAM,CAAA;AAAA,MACzB,IAAA,EAAMA,SAAM,CAAA,KAAA,EAAO,MAAM,CAAA;AAAA,KAC1B,CACH,CAAA,CAAA;AACA,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;;;;;;;;;;;;;;"}
@@ -2,36 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var buttonGroup = require('./button-group.js');
8
- var constants = require('./constants.js');
9
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
- var index = require('../../../hooks/use-namespace/index.js');
5
+ var button = require('./button.js');
11
6
 
12
- const __default__ = vue.defineComponent({
13
- name: "ElButtonGroup"
14
- });
15
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
- ...__default__,
17
- props: buttonGroup.buttonGroupProps,
18
- setup(__props) {
19
- const props = __props;
20
- vue.provide(constants.buttonGroupContextKey, vue.reactive({
21
- size: vue.toRef(props, "size"),
22
- type: vue.toRef(props, "type")
23
- }));
24
- const ns = index.useNamespace("button");
25
- return (_ctx, _cache) => {
26
- return vue.openBlock(), vue.createElementBlock("div", {
27
- class: vue.normalizeClass(`${vue.unref(ns).b("group")}`)
28
- }, [
29
- vue.renderSlot(_ctx.$slots, "default")
30
- ], 2);
31
- };
32
- }
33
- });
34
- var ButtonGroup = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/button/src/button-group.vue"]]);
7
+ const buttonGroupProps = {
8
+ size: button.buttonProps.size,
9
+ type: button.buttonProps.type
10
+ };
35
11
 
36
- exports["default"] = ButtonGroup;
12
+ exports.buttonGroupProps = buttonGroupProps;
37
13
  //# sourceMappingURL=button-group2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-group2.js","sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"`${ns.b('group')}`\">\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { buttonGroupProps } from './button-group'\nimport { buttonGroupContextKey } from './constants'\n\ndefineOptions({\n name: 'ElButtonGroup',\n})\nconst props = defineProps(buttonGroupProps)\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"names":["provide","buttonGroupContextKey","reactive","toRef","useNamespace"],"mappings":";;;;;;;;;;;uCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAAA,WAAA,CACEC,iCACAC,YAAS,CAAA;AAAA,MACP,IAAA,EAAMC,SAAM,CAAA,KAAA,EAAO,MAAM,CAAA;AAAA,MACzB,IAAA,EAAMA,SAAM,CAAA,KAAA,EAAO,MAAM,CAAA;AAAA,KAC1B,CACH,CAAA,CAAA;AACA,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"button-group2.js","sources":["../../../../../../packages/components/button/src/button-group.ts"],"sourcesContent":["import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonGroupProps = {\n /**\n * @description control the size of buttons in this button-group\n */\n size: buttonProps.size,\n /**\n * @description control the type of buttons in this button-group\n */\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes<typeof buttonGroupProps>\n"],"names":["buttonProps"],"mappings":";;;;;;AACY,MAAC,gBAAgB,GAAG;AAChC,EAAE,IAAI,EAAEA,kBAAW,CAAC,IAAI;AACxB,EAAE,IAAI,EAAEA,kBAAW,CAAC,IAAI;AACxB;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var calendar$1 = require('./src/calendar2.js');
7
- var calendar = require('./src/calendar.js');
6
+ var calendar$1 = require('./src/calendar.js');
7
+ var calendar = require('./src/calendar2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElCalendar = install.withInstall(calendar$1["default"]);
@@ -2,27 +2,139 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- require('../../../constants/index.js');
7
- var shared = require('@vue/shared');
8
- var runtime = require('../../../utils/vue/props/runtime.js');
9
- var event = require('../../../constants/event.js');
5
+ var vue = require('vue');
6
+ var index$2 = require('../../button/index.js');
7
+ require('../../../hooks/index.js');
8
+ var dateTable = require('./date-table2.js');
9
+ var useCalendar = require('./use-calendar.js');
10
+ var calendar = require('./calendar2.js');
11
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
+ var index = require('../../../hooks/use-namespace/index.js');
13
+ var index$1 = require('../../../hooks/use-locale/index.js');
10
14
 
11
- const isValidRange = (range) => shared.isArray(range) && range.length === 2 && range.every((item) => shared.isDate(item));
12
- const calendarProps = runtime.buildProps({
13
- modelValue: {
14
- type: Date
15
- },
16
- range: {
17
- type: runtime.definePropType(Array),
18
- validator: isValidRange
15
+ const COMPONENT_NAME = "ElCalendar";
16
+ const __default__ = vue.defineComponent({
17
+ name: COMPONENT_NAME
18
+ });
19
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
+ ...__default__,
21
+ props: calendar.calendarProps,
22
+ emits: calendar.calendarEmits,
23
+ setup(__props, { expose, emit }) {
24
+ const props = __props;
25
+ const ns = index.useNamespace("calendar");
26
+ const {
27
+ calculateValidatedDateRange,
28
+ date,
29
+ pickDay,
30
+ realSelectedDay,
31
+ selectDate,
32
+ validatedRange
33
+ } = useCalendar.useCalendar(props, emit, COMPONENT_NAME);
34
+ const { t } = index$1.useLocale();
35
+ const i18nDate = vue.computed(() => {
36
+ const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
37
+ return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
38
+ });
39
+ expose({
40
+ selectedDay: realSelectedDay,
41
+ pickDay,
42
+ selectDate,
43
+ calculateValidatedDateRange
44
+ });
45
+ return (_ctx, _cache) => {
46
+ return vue.openBlock(), vue.createElementBlock("div", {
47
+ class: vue.normalizeClass(vue.unref(ns).b())
48
+ }, [
49
+ vue.createElementVNode("div", {
50
+ class: vue.normalizeClass(vue.unref(ns).e("header"))
51
+ }, [
52
+ vue.renderSlot(_ctx.$slots, "header", { date: vue.unref(i18nDate) }, () => [
53
+ vue.createElementVNode("div", {
54
+ class: vue.normalizeClass(vue.unref(ns).e("title"))
55
+ }, vue.toDisplayString(vue.unref(i18nDate)), 3),
56
+ vue.unref(validatedRange).length === 0 ? (vue.openBlock(), vue.createElementBlock("div", {
57
+ key: 0,
58
+ class: vue.normalizeClass(vue.unref(ns).e("button-group"))
59
+ }, [
60
+ vue.createVNode(vue.unref(index$2.ElButtonGroup), null, {
61
+ default: vue.withCtx(() => [
62
+ vue.createVNode(vue.unref(index$2.ElButton), {
63
+ size: "small",
64
+ onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(selectDate)("prev-month"))
65
+ }, {
66
+ default: vue.withCtx(() => [
67
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.datepicker.prevMonth")), 1)
68
+ ]),
69
+ _: 1
70
+ }),
71
+ vue.createVNode(vue.unref(index$2.ElButton), {
72
+ size: "small",
73
+ onClick: _cache[1] || (_cache[1] = ($event) => vue.unref(selectDate)("today"))
74
+ }, {
75
+ default: vue.withCtx(() => [
76
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.datepicker.today")), 1)
77
+ ]),
78
+ _: 1
79
+ }),
80
+ vue.createVNode(vue.unref(index$2.ElButton), {
81
+ size: "small",
82
+ onClick: _cache[2] || (_cache[2] = ($event) => vue.unref(selectDate)("next-month"))
83
+ }, {
84
+ default: vue.withCtx(() => [
85
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.datepicker.nextMonth")), 1)
86
+ ]),
87
+ _: 1
88
+ })
89
+ ]),
90
+ _: 1
91
+ })
92
+ ], 2)) : vue.createCommentVNode("v-if", true)
93
+ ])
94
+ ], 2),
95
+ vue.unref(validatedRange).length === 0 ? (vue.openBlock(), vue.createElementBlock("div", {
96
+ key: 0,
97
+ class: vue.normalizeClass(vue.unref(ns).e("body"))
98
+ }, [
99
+ vue.createVNode(dateTable["default"], {
100
+ date: vue.unref(date),
101
+ "selected-day": vue.unref(realSelectedDay),
102
+ onPick: vue.unref(pickDay)
103
+ }, vue.createSlots({ _: 2 }, [
104
+ _ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
105
+ name: "date-cell",
106
+ fn: vue.withCtx((data) => [
107
+ _ctx.$slots["date-cell"] ? vue.renderSlot(_ctx.$slots, "date-cell", vue.normalizeProps(vue.mergeProps({ key: 0 }, data))) : vue.renderSlot(_ctx.$slots, "dateCell", vue.normalizeProps(vue.mergeProps({ key: 1 }, data)))
108
+ ])
109
+ } : void 0
110
+ ]), 1032, ["date", "selected-day", "onPick"])
111
+ ], 2)) : (vue.openBlock(), vue.createElementBlock("div", {
112
+ key: 1,
113
+ class: vue.normalizeClass(vue.unref(ns).e("body"))
114
+ }, [
115
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(validatedRange), (range_, index) => {
116
+ return vue.openBlock(), vue.createBlock(dateTable["default"], {
117
+ key: index,
118
+ date: range_[0],
119
+ "selected-day": vue.unref(realSelectedDay),
120
+ range: range_,
121
+ "hide-header": index !== 0,
122
+ onPick: vue.unref(pickDay)
123
+ }, vue.createSlots({ _: 2 }, [
124
+ _ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
125
+ name: "date-cell",
126
+ fn: vue.withCtx((data) => [
127
+ _ctx.$slots["date-cell"] ? vue.renderSlot(_ctx.$slots, "date-cell", vue.normalizeProps(vue.mergeProps({ key: 0 }, data))) : vue.renderSlot(_ctx.$slots, "dateCell", vue.normalizeProps(vue.mergeProps({ key: 1 }, data)))
128
+ ])
129
+ } : void 0
130
+ ]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
131
+ }), 128))
132
+ ], 2))
133
+ ], 2);
134
+ };
19
135
  }
20
136
  });
21
- const calendarEmits = {
22
- [event.UPDATE_MODEL_EVENT]: (value) => shared.isDate(value),
23
- [event.INPUT_EVENT]: (value) => shared.isDate(value)
24
- };
137
+ var Calendar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/calendar/src/calendar.vue"]]);
25
138
 
26
- exports.calendarEmits = calendarEmits;
27
- exports.calendarProps = calendarProps;
139
+ exports["default"] = Calendar;
28
140
  //# sourceMappingURL=calendar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n"],"names":["isArray","isDate","buildProps","definePropType","UPDATE_MODEL_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;AAOA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAKA,cAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAKC,aAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,MAAC,aAAa,GAAGC,kBAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,YAAY;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKH,aAAM,CAAC,KAAK,CAAC;AAChD,EAAE,CAACI,iBAAW,GAAG,CAAC,KAAK,KAAKJ,aAAM,CAAC,KAAK,CAAC;AACzC;;;;;"}
1
+ {"version":3,"file":"calendar.js","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n validatedRange,\n} = useCalendar(props, emit, COMPONENT_NAME)\n\nconst { t } = useLocale()\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":["useNamespace","useCalendar","useLocale","computed"],"mappings":";;;;;;;;;;;;;;;uCAiEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AALA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAUlC,IAAM,MAAA;AAAA,MACJ,2BAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAE3C,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AAExB,IAAM,MAAA,QAAA,GAAWC,aAAS,MAAM;AAC9B,MAAA,MAAM,WAAc,GAAA,CAAA,mBAAA,EAAsB,IAAK,CAAA,KAAA,CAAM,OAAO,GAAG,CAAA,CAAA,CAAA,CAAA;AAC/D,MAAO,OAAA,CAAA,EAAG,KAAK,KAAM,CAAA,IAAA,MAAU,CAAE,CAAA,oBAAoB,CAAK,CAAA,CAAA,EAAA,CAAA,CAAE,WAAW,CAAA,CAAA,CAAA,CAAA;AAAA,KACxE,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,WAAa,EAAA,eAAA;AAAA,MAEb,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,139 +2,27 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index$2 = require('../../button/index.js');
7
- require('../../../hooks/index.js');
8
- var dateTable = require('./date-table.js');
9
- var useCalendar = require('./use-calendar.js');
10
- var calendar = require('./calendar.js');
11
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
- var index = require('../../../hooks/use-namespace/index.js');
13
- var index$1 = require('../../../hooks/use-locale/index.js');
5
+ require('../../../utils/index.js');
6
+ require('../../../constants/index.js');
7
+ var shared = require('@vue/shared');
8
+ var runtime = require('../../../utils/vue/props/runtime.js');
9
+ var event = require('../../../constants/event.js');
14
10
 
15
- const COMPONENT_NAME = "ElCalendar";
16
- const __default__ = vue.defineComponent({
17
- name: COMPONENT_NAME
18
- });
19
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
- ...__default__,
21
- props: calendar.calendarProps,
22
- emits: calendar.calendarEmits,
23
- setup(__props, { expose, emit }) {
24
- const props = __props;
25
- const ns = index.useNamespace("calendar");
26
- const {
27
- calculateValidatedDateRange,
28
- date,
29
- pickDay,
30
- realSelectedDay,
31
- selectDate,
32
- validatedRange
33
- } = useCalendar.useCalendar(props, emit, COMPONENT_NAME);
34
- const { t } = index$1.useLocale();
35
- const i18nDate = vue.computed(() => {
36
- const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
37
- return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
38
- });
39
- expose({
40
- selectedDay: realSelectedDay,
41
- pickDay,
42
- selectDate,
43
- calculateValidatedDateRange
44
- });
45
- return (_ctx, _cache) => {
46
- return vue.openBlock(), vue.createElementBlock("div", {
47
- class: vue.normalizeClass(vue.unref(ns).b())
48
- }, [
49
- vue.createElementVNode("div", {
50
- class: vue.normalizeClass(vue.unref(ns).e("header"))
51
- }, [
52
- vue.renderSlot(_ctx.$slots, "header", { date: vue.unref(i18nDate) }, () => [
53
- vue.createElementVNode("div", {
54
- class: vue.normalizeClass(vue.unref(ns).e("title"))
55
- }, vue.toDisplayString(vue.unref(i18nDate)), 3),
56
- vue.unref(validatedRange).length === 0 ? (vue.openBlock(), vue.createElementBlock("div", {
57
- key: 0,
58
- class: vue.normalizeClass(vue.unref(ns).e("button-group"))
59
- }, [
60
- vue.createVNode(vue.unref(index$2.ElButtonGroup), null, {
61
- default: vue.withCtx(() => [
62
- vue.createVNode(vue.unref(index$2.ElButton), {
63
- size: "small",
64
- onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(selectDate)("prev-month"))
65
- }, {
66
- default: vue.withCtx(() => [
67
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.datepicker.prevMonth")), 1)
68
- ]),
69
- _: 1
70
- }),
71
- vue.createVNode(vue.unref(index$2.ElButton), {
72
- size: "small",
73
- onClick: _cache[1] || (_cache[1] = ($event) => vue.unref(selectDate)("today"))
74
- }, {
75
- default: vue.withCtx(() => [
76
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.datepicker.today")), 1)
77
- ]),
78
- _: 1
79
- }),
80
- vue.createVNode(vue.unref(index$2.ElButton), {
81
- size: "small",
82
- onClick: _cache[2] || (_cache[2] = ($event) => vue.unref(selectDate)("next-month"))
83
- }, {
84
- default: vue.withCtx(() => [
85
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.datepicker.nextMonth")), 1)
86
- ]),
87
- _: 1
88
- })
89
- ]),
90
- _: 1
91
- })
92
- ], 2)) : vue.createCommentVNode("v-if", true)
93
- ])
94
- ], 2),
95
- vue.unref(validatedRange).length === 0 ? (vue.openBlock(), vue.createElementBlock("div", {
96
- key: 0,
97
- class: vue.normalizeClass(vue.unref(ns).e("body"))
98
- }, [
99
- vue.createVNode(dateTable["default"], {
100
- date: vue.unref(date),
101
- "selected-day": vue.unref(realSelectedDay),
102
- onPick: vue.unref(pickDay)
103
- }, vue.createSlots({ _: 2 }, [
104
- _ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
105
- name: "date-cell",
106
- fn: vue.withCtx((data) => [
107
- _ctx.$slots["date-cell"] ? vue.renderSlot(_ctx.$slots, "date-cell", vue.normalizeProps(vue.mergeProps({ key: 0 }, data))) : vue.renderSlot(_ctx.$slots, "dateCell", vue.normalizeProps(vue.mergeProps({ key: 1 }, data)))
108
- ])
109
- } : void 0
110
- ]), 1032, ["date", "selected-day", "onPick"])
111
- ], 2)) : (vue.openBlock(), vue.createElementBlock("div", {
112
- key: 1,
113
- class: vue.normalizeClass(vue.unref(ns).e("body"))
114
- }, [
115
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(validatedRange), (range_, index) => {
116
- return vue.openBlock(), vue.createBlock(dateTable["default"], {
117
- key: index,
118
- date: range_[0],
119
- "selected-day": vue.unref(realSelectedDay),
120
- range: range_,
121
- "hide-header": index !== 0,
122
- onPick: vue.unref(pickDay)
123
- }, vue.createSlots({ _: 2 }, [
124
- _ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
125
- name: "date-cell",
126
- fn: vue.withCtx((data) => [
127
- _ctx.$slots["date-cell"] ? vue.renderSlot(_ctx.$slots, "date-cell", vue.normalizeProps(vue.mergeProps({ key: 0 }, data))) : vue.renderSlot(_ctx.$slots, "dateCell", vue.normalizeProps(vue.mergeProps({ key: 1 }, data)))
128
- ])
129
- } : void 0
130
- ]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
131
- }), 128))
132
- ], 2))
133
- ], 2);
134
- };
11
+ const isValidRange = (range) => shared.isArray(range) && range.length === 2 && range.every((item) => shared.isDate(item));
12
+ const calendarProps = runtime.buildProps({
13
+ modelValue: {
14
+ type: Date
15
+ },
16
+ range: {
17
+ type: runtime.definePropType(Array),
18
+ validator: isValidRange
135
19
  }
136
20
  });
137
- var Calendar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/calendar/src/calendar.vue"]]);
21
+ const calendarEmits = {
22
+ [event.UPDATE_MODEL_EVENT]: (value) => shared.isDate(value),
23
+ [event.INPUT_EVENT]: (value) => shared.isDate(value)
24
+ };
138
25
 
139
- exports["default"] = Calendar;
26
+ exports.calendarEmits = calendarEmits;
27
+ exports.calendarProps = calendarProps;
140
28
  //# sourceMappingURL=calendar2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar2.js","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n validatedRange,\n} = useCalendar(props, emit, COMPONENT_NAME)\n\nconst { t } = useLocale()\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":["useNamespace","useCalendar","useLocale","computed"],"mappings":";;;;;;;;;;;;;;;uCAiEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AALA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAUlC,IAAM,MAAA;AAAA,MACJ,2BAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAE3C,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AAExB,IAAM,MAAA,QAAA,GAAWC,aAAS,MAAM;AAC9B,MAAA,MAAM,WAAc,GAAA,CAAA,mBAAA,EAAsB,IAAK,CAAA,KAAA,CAAM,OAAO,GAAG,CAAA,CAAA,CAAA,CAAA;AAC/D,MAAO,OAAA,CAAA,EAAG,KAAK,KAAM,CAAA,IAAA,MAAU,CAAE,CAAA,oBAAoB,CAAK,CAAA,CAAA,EAAA,CAAA,CAAE,WAAW,CAAA,CAAA,CAAA,CAAA;AAAA,KACxE,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,WAAa,EAAA,eAAA;AAAA,MAEb,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"calendar2.js","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n"],"names":["isArray","isDate","buildProps","definePropType","UPDATE_MODEL_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;AAOA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAKA,cAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAKC,aAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,MAAC,aAAa,GAAGC,kBAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,YAAY;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKH,aAAM,CAAC,KAAK,CAAC;AAChD,EAAE,CAACI,iBAAW,GAAG,CAAC,KAAK,KAAKJ,aAAM,CAAC,KAAK,CAAC;AACzC;;;;;"}