@element-plus/nightly 0.0.20241112 → 0.0.20241113

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +19 -6
  3. package/dist/index.full.min.js +11 -11
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +11 -11
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +19 -6
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hr.js +1 -1
  93. package/dist/locale/hr.min.js +1 -1
  94. package/dist/locale/hr.min.mjs +1 -1
  95. package/dist/locale/hr.mjs +1 -1
  96. package/dist/locale/hu.js +1 -1
  97. package/dist/locale/hu.min.js +1 -1
  98. package/dist/locale/hu.min.mjs +1 -1
  99. package/dist/locale/hu.mjs +1 -1
  100. package/dist/locale/hy-am.js +1 -1
  101. package/dist/locale/hy-am.min.js +1 -1
  102. package/dist/locale/hy-am.min.mjs +1 -1
  103. package/dist/locale/hy-am.mjs +1 -1
  104. package/dist/locale/id.js +1 -1
  105. package/dist/locale/id.min.js +1 -1
  106. package/dist/locale/id.min.mjs +1 -1
  107. package/dist/locale/id.mjs +1 -1
  108. package/dist/locale/it.js +1 -1
  109. package/dist/locale/it.min.js +1 -1
  110. package/dist/locale/it.min.mjs +1 -1
  111. package/dist/locale/it.mjs +1 -1
  112. package/dist/locale/ja.js +1 -1
  113. package/dist/locale/ja.min.js +1 -1
  114. package/dist/locale/ja.min.mjs +1 -1
  115. package/dist/locale/ja.mjs +1 -1
  116. package/dist/locale/kk.js +1 -1
  117. package/dist/locale/kk.min.js +1 -1
  118. package/dist/locale/kk.min.mjs +1 -1
  119. package/dist/locale/kk.mjs +1 -1
  120. package/dist/locale/km.js +1 -1
  121. package/dist/locale/km.min.js +1 -1
  122. package/dist/locale/km.min.mjs +1 -1
  123. package/dist/locale/km.mjs +1 -1
  124. package/dist/locale/ko.js +1 -1
  125. package/dist/locale/ko.min.js +1 -1
  126. package/dist/locale/ko.min.mjs +1 -1
  127. package/dist/locale/ko.mjs +1 -1
  128. package/dist/locale/ku.js +1 -1
  129. package/dist/locale/ku.min.js +1 -1
  130. package/dist/locale/ku.min.mjs +1 -1
  131. package/dist/locale/ku.mjs +1 -1
  132. package/dist/locale/ky.js +1 -1
  133. package/dist/locale/ky.min.js +1 -1
  134. package/dist/locale/ky.min.mjs +1 -1
  135. package/dist/locale/ky.mjs +1 -1
  136. package/dist/locale/lt.js +1 -1
  137. package/dist/locale/lt.min.js +1 -1
  138. package/dist/locale/lt.min.mjs +1 -1
  139. package/dist/locale/lt.mjs +1 -1
  140. package/dist/locale/lv.js +1 -1
  141. package/dist/locale/lv.min.js +1 -1
  142. package/dist/locale/lv.min.mjs +1 -1
  143. package/dist/locale/lv.mjs +1 -1
  144. package/dist/locale/mg.js +1 -1
  145. package/dist/locale/mg.min.js +1 -1
  146. package/dist/locale/mg.min.mjs +1 -1
  147. package/dist/locale/mg.mjs +1 -1
  148. package/dist/locale/mn.js +1 -1
  149. package/dist/locale/mn.min.js +1 -1
  150. package/dist/locale/mn.min.mjs +1 -1
  151. package/dist/locale/mn.mjs +1 -1
  152. package/dist/locale/my.js +1 -1
  153. package/dist/locale/my.min.js +1 -1
  154. package/dist/locale/my.min.mjs +1 -1
  155. package/dist/locale/my.mjs +1 -1
  156. package/dist/locale/nb-no.js +1 -1
  157. package/dist/locale/nb-no.min.js +1 -1
  158. package/dist/locale/nb-no.min.mjs +1 -1
  159. package/dist/locale/nb-no.mjs +1 -1
  160. package/dist/locale/nl.js +1 -1
  161. package/dist/locale/nl.min.js +1 -1
  162. package/dist/locale/nl.min.mjs +1 -1
  163. package/dist/locale/nl.mjs +1 -1
  164. package/dist/locale/pa.js +1 -1
  165. package/dist/locale/pa.min.js +1 -1
  166. package/dist/locale/pa.min.mjs +1 -1
  167. package/dist/locale/pa.mjs +1 -1
  168. package/dist/locale/pl.js +1 -1
  169. package/dist/locale/pl.min.js +1 -1
  170. package/dist/locale/pl.min.mjs +1 -1
  171. package/dist/locale/pl.mjs +1 -1
  172. package/dist/locale/pt-br.js +1 -1
  173. package/dist/locale/pt-br.min.js +1 -1
  174. package/dist/locale/pt-br.min.mjs +1 -1
  175. package/dist/locale/pt-br.mjs +1 -1
  176. package/dist/locale/pt.js +1 -1
  177. package/dist/locale/pt.min.js +1 -1
  178. package/dist/locale/pt.min.mjs +1 -1
  179. package/dist/locale/pt.mjs +1 -1
  180. package/dist/locale/ro.js +1 -1
  181. package/dist/locale/ro.min.js +1 -1
  182. package/dist/locale/ro.min.mjs +1 -1
  183. package/dist/locale/ro.mjs +1 -1
  184. package/dist/locale/ru.js +1 -1
  185. package/dist/locale/ru.min.js +1 -1
  186. package/dist/locale/ru.min.mjs +1 -1
  187. package/dist/locale/ru.mjs +1 -1
  188. package/dist/locale/sk.js +1 -1
  189. package/dist/locale/sk.min.js +1 -1
  190. package/dist/locale/sk.min.mjs +1 -1
  191. package/dist/locale/sk.mjs +1 -1
  192. package/dist/locale/sl.js +1 -1
  193. package/dist/locale/sl.min.js +1 -1
  194. package/dist/locale/sl.min.mjs +1 -1
  195. package/dist/locale/sl.mjs +1 -1
  196. package/dist/locale/sr.js +1 -1
  197. package/dist/locale/sr.min.js +1 -1
  198. package/dist/locale/sr.min.mjs +1 -1
  199. package/dist/locale/sr.mjs +1 -1
  200. package/dist/locale/sv.js +1 -1
  201. package/dist/locale/sv.min.js +1 -1
  202. package/dist/locale/sv.min.mjs +1 -1
  203. package/dist/locale/sv.mjs +1 -1
  204. package/dist/locale/sw.js +1 -1
  205. package/dist/locale/sw.min.js +1 -1
  206. package/dist/locale/sw.min.mjs +1 -1
  207. package/dist/locale/sw.mjs +1 -1
  208. package/dist/locale/ta.js +1 -1
  209. package/dist/locale/ta.min.js +1 -1
  210. package/dist/locale/ta.min.mjs +1 -1
  211. package/dist/locale/ta.mjs +1 -1
  212. package/dist/locale/th.js +1 -1
  213. package/dist/locale/th.min.js +1 -1
  214. package/dist/locale/th.min.mjs +1 -1
  215. package/dist/locale/th.mjs +1 -1
  216. package/dist/locale/tk.js +1 -1
  217. package/dist/locale/tk.min.js +1 -1
  218. package/dist/locale/tk.min.mjs +1 -1
  219. package/dist/locale/tk.mjs +1 -1
  220. package/dist/locale/tr.js +1 -1
  221. package/dist/locale/tr.min.js +1 -1
  222. package/dist/locale/tr.min.mjs +1 -1
  223. package/dist/locale/tr.mjs +1 -1
  224. package/dist/locale/ug-cn.js +1 -1
  225. package/dist/locale/ug-cn.min.js +1 -1
  226. package/dist/locale/ug-cn.min.mjs +1 -1
  227. package/dist/locale/ug-cn.mjs +1 -1
  228. package/dist/locale/uk.js +1 -1
  229. package/dist/locale/uk.min.js +1 -1
  230. package/dist/locale/uk.min.mjs +1 -1
  231. package/dist/locale/uk.mjs +1 -1
  232. package/dist/locale/uz-uz.js +1 -1
  233. package/dist/locale/uz-uz.min.js +1 -1
  234. package/dist/locale/uz-uz.min.mjs +1 -1
  235. package/dist/locale/uz-uz.mjs +1 -1
  236. package/dist/locale/vi.js +1 -1
  237. package/dist/locale/vi.min.js +1 -1
  238. package/dist/locale/vi.min.mjs +1 -1
  239. package/dist/locale/vi.mjs +1 -1
  240. package/dist/locale/zh-cn.js +1 -1
  241. package/dist/locale/zh-cn.min.js +1 -1
  242. package/dist/locale/zh-cn.min.mjs +1 -1
  243. package/dist/locale/zh-cn.mjs +1 -1
  244. package/dist/locale/zh-tw.js +1 -1
  245. package/dist/locale/zh-tw.min.js +1 -1
  246. package/dist/locale/zh-tw.min.mjs +1 -1
  247. package/dist/locale/zh-tw.mjs +1 -1
  248. package/es/components/carousel/index.mjs +2 -2
  249. package/es/components/carousel/src/carousel-item.mjs +70 -8
  250. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  251. package/es/components/carousel/src/carousel-item2.mjs +8 -70
  252. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  253. package/es/components/cascader/index.mjs +2 -2
  254. package/es/components/cascader/src/cascader.mjs +627 -83
  255. package/es/components/cascader/src/cascader.mjs.map +1 -1
  256. package/es/components/cascader/src/cascader2.mjs +83 -627
  257. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  258. package/es/components/collapse/index.mjs +2 -2
  259. package/es/components/collapse/src/collapse.mjs +28 -18
  260. package/es/components/collapse/src/collapse.mjs.map +1 -1
  261. package/es/components/collapse/src/collapse2.mjs +18 -28
  262. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  263. package/es/components/descriptions/src/description-item.d.ts +4 -0
  264. package/es/components/descriptions/src/description-item.mjs +4 -0
  265. package/es/components/descriptions/src/description-item.mjs.map +1 -1
  266. package/es/components/descriptions/src/description.d.ts +1 -0
  267. package/es/components/descriptions/src/description.mjs +4 -0
  268. package/es/components/descriptions/src/description.mjs.map +1 -1
  269. package/es/components/descriptions/src/description.vue.d.ts +3 -0
  270. package/es/components/descriptions/src/descriptions-cell.mjs +2 -1
  271. package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
  272. package/es/components/descriptions/src/descriptions.type.d.ts +2 -0
  273. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  274. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  275. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  276. package/es/components/index.mjs +5 -5
  277. package/es/components/pagination/style/css.d.ts +1 -0
  278. package/es/components/pagination/style/css.mjs +1 -0
  279. package/es/components/pagination/style/css.mjs.map +1 -1
  280. package/es/components/pagination/style/index.d.ts +1 -0
  281. package/es/components/pagination/style/index.mjs +1 -0
  282. package/es/components/pagination/style/index.mjs.map +1 -1
  283. package/es/components/roving-focus-group/index.mjs +3 -3
  284. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  285. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  286. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  287. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  288. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  289. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  290. package/es/components/scrollbar/index.mjs +2 -2
  291. package/es/components/scrollbar/src/scrollbar.mjs +171 -55
  292. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  293. package/es/components/scrollbar/src/scrollbar2.mjs +55 -171
  294. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  295. package/es/components/segmented/index.mjs +2 -2
  296. package/es/components/segmented/src/segmented.mjs +169 -34
  297. package/es/components/segmented/src/segmented.mjs.map +1 -1
  298. package/es/components/segmented/src/segmented2.mjs +34 -169
  299. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  300. package/es/components/slider/src/button.mjs +21 -91
  301. package/es/components/slider/src/button.mjs.map +1 -1
  302. package/es/components/slider/src/button2.mjs +91 -21
  303. package/es/components/slider/src/button2.mjs.map +1 -1
  304. package/es/components/slider/src/slider2.mjs +1 -1
  305. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +8 -4
  306. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
  307. package/es/index.mjs +5 -5
  308. package/es/version.d.ts +1 -1
  309. package/es/version.mjs +1 -1
  310. package/es/version.mjs.map +1 -1
  311. package/lib/components/carousel/index.js +2 -2
  312. package/lib/components/carousel/src/carousel-item.js +70 -8
  313. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  314. package/lib/components/carousel/src/carousel-item2.js +8 -70
  315. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  316. package/lib/components/cascader/index.js +2 -2
  317. package/lib/components/cascader/src/cascader.js +627 -84
  318. package/lib/components/cascader/src/cascader.js.map +1 -1
  319. package/lib/components/cascader/src/cascader2.js +84 -627
  320. package/lib/components/cascader/src/cascader2.js.map +1 -1
  321. package/lib/components/collapse/index.js +2 -2
  322. package/lib/components/collapse/src/collapse.js +28 -20
  323. package/lib/components/collapse/src/collapse.js.map +1 -1
  324. package/lib/components/collapse/src/collapse2.js +20 -28
  325. package/lib/components/collapse/src/collapse2.js.map +1 -1
  326. package/lib/components/descriptions/src/description-item.d.ts +4 -0
  327. package/lib/components/descriptions/src/description-item.js +4 -0
  328. package/lib/components/descriptions/src/description-item.js.map +1 -1
  329. package/lib/components/descriptions/src/description.d.ts +1 -0
  330. package/lib/components/descriptions/src/description.js +4 -0
  331. package/lib/components/descriptions/src/description.js.map +1 -1
  332. package/lib/components/descriptions/src/description.vue.d.ts +3 -0
  333. package/lib/components/descriptions/src/descriptions-cell.js +2 -1
  334. package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
  335. package/lib/components/descriptions/src/descriptions.type.d.ts +2 -0
  336. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  337. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  338. package/lib/components/dropdown/src/dropdown2.js +1 -1
  339. package/lib/components/index.js +5 -5
  340. package/lib/components/pagination/style/css.d.ts +1 -0
  341. package/lib/components/pagination/style/css.js +1 -0
  342. package/lib/components/pagination/style/css.js.map +1 -1
  343. package/lib/components/pagination/style/index.d.ts +1 -0
  344. package/lib/components/pagination/style/index.js +1 -0
  345. package/lib/components/pagination/style/index.js.map +1 -1
  346. package/lib/components/roving-focus-group/index.js +2 -2
  347. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  348. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  349. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  350. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  351. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  352. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  353. package/lib/components/scrollbar/index.js +2 -2
  354. package/lib/components/scrollbar/src/scrollbar.js +171 -56
  355. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  356. package/lib/components/scrollbar/src/scrollbar2.js +56 -171
  357. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  358. package/lib/components/segmented/index.js +2 -2
  359. package/lib/components/segmented/src/segmented.js +168 -34
  360. package/lib/components/segmented/src/segmented.js.map +1 -1
  361. package/lib/components/segmented/src/segmented2.js +34 -168
  362. package/lib/components/segmented/src/segmented2.js.map +1 -1
  363. package/lib/components/slider/src/button.js +22 -91
  364. package/lib/components/slider/src/button.js.map +1 -1
  365. package/lib/components/slider/src/button2.js +91 -22
  366. package/lib/components/slider/src/button2.js.map +1 -1
  367. package/lib/components/slider/src/slider2.js +1 -1
  368. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +7 -3
  369. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
  370. package/lib/index.js +5 -5
  371. package/lib/version.d.ts +1 -1
  372. package/lib/version.js +1 -1
  373. package/lib/version.js.map +1 -1
  374. package/package.json +2 -2
  375. package/tags.json +1 -1
  376. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"basic-time-spinner.mjs","sources":["../../../../../../../packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b('spinner'), { 'has-seconds': showSeconds }]\">\n <template v-if=\"!arrowControl\">\n <el-scrollbar\n v-for=\"item in spinnerItems\"\n :key=\"item\"\n :ref=\"(scrollbar: unknown) => setRef(scrollbar as any, item)\"\n :class=\"ns.be('spinner', 'wrapper')\"\n wrap-style=\"max-height: inherit;\"\n :view-class=\"ns.be('spinner', 'list')\"\n noresize\n tag=\"ul\"\n @mouseenter=\"emitSelectRange(item)\"\n @mousemove=\"adjustCurrentSpinner(item)\"\n >\n <li\n v-for=\"(disabled, key) in timeList[item]\"\n :key=\"key\"\n :class=\"[\n ns.be('spinner', 'item'),\n ns.is('active', key === timePartials[item]),\n ns.is('disabled', disabled),\n ]\"\n @click=\"handleClick(item, { value: key, disabled })\"\n >\n <template v-if=\"item === 'hours'\">\n {{ ('0' + (amPmMode ? key % 12 || 12 : key)).slice(-2)\n }}{{ getAmPmFlag(key) }}\n </template>\n <template v-else>\n {{ ('0' + key).slice(-2) }}\n </template>\n </li>\n </el-scrollbar>\n </template>\n <template v-if=\"arrowControl\">\n <div\n v-for=\"item in spinnerItems\"\n :key=\"item\"\n :class=\"[ns.be('spinner', 'wrapper'), ns.is('arrow')]\"\n @mouseenter=\"emitSelectRange(item)\"\n >\n <el-icon\n v-repeat-click=\"onDecrement\"\n :class=\"['arrow-up', ns.be('spinner', 'arrow')]\"\n >\n <arrow-up />\n </el-icon>\n <el-icon\n v-repeat-click=\"onIncrement\"\n :class=\"['arrow-down', ns.be('spinner', 'arrow')]\"\n >\n <arrow-down />\n </el-icon>\n <ul :class=\"ns.be('spinner', 'list')\">\n <li\n v-for=\"(time, key) in arrowControlTimeList[item]\"\n :key=\"key\"\n :class=\"[\n ns.be('spinner', 'item'),\n ns.is('active', time === timePartials[item]),\n ns.is('disabled', timeList[item][time!]),\n ]\"\n >\n <template v-if=\"isNumber(time)\">\n <template v-if=\"item === 'hours'\">\n {{ ('0' + (amPmMode ? time % 12 || 12 : time)).slice(-2)\n }}{{ getAmPmFlag(time) }}\n </template>\n <template v-else>\n {{ ('0' + time).slice(-2) }}\n </template>\n </template>\n </li>\n </ul>\n </div>\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, unref, watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { vRepeatClick } from '@element-plus/directives'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElIcon from '@element-plus/components/icon'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { getStyle, isNumber } from '@element-plus/utils'\nimport { timeUnits } from '../constants'\nimport { buildTimeList } from '../utils'\nimport { basicTimeSpinnerProps } from '../props/basic-time-spinner'\nimport { getTimeLists } from '../composables/use-time-picker'\n\nimport type { Ref } from 'vue'\nimport type { ScrollbarInstance } from '@element-plus/components/scrollbar'\nimport type { TimeUnit } from '../constants'\nimport type { TimeList } from '../utils'\n\nconst props = defineProps(basicTimeSpinnerProps)\nconst emit = defineEmits(['change', 'select-range', 'set-option'])\n\nconst ns = useNamespace('time')\n\nconst { getHoursList, getMinutesList, getSecondsList } = getTimeLists(\n props.disabledHours,\n props.disabledMinutes,\n props.disabledSeconds\n)\n\n// data\nlet isScrolling = false\n\nconst currentScrollbar = ref<TimeUnit>()\nconst listHoursRef = ref<ScrollbarInstance>()\nconst listMinutesRef = ref<ScrollbarInstance>()\nconst listSecondsRef = ref<ScrollbarInstance>()\nconst listRefsMap: Record<TimeUnit, Ref<ScrollbarInstance | undefined>> = {\n hours: listHoursRef,\n minutes: listMinutesRef,\n seconds: listSecondsRef,\n}\n\n// computed\nconst spinnerItems = computed(() => {\n return props.showSeconds ? timeUnits : timeUnits.slice(0, 2)\n})\n\nconst timePartials = computed<Record<TimeUnit, number>>(() => {\n const { spinnerDate } = props\n const hours = spinnerDate.hour()\n const minutes = spinnerDate.minute()\n const seconds = spinnerDate.second()\n return { hours, minutes, seconds }\n})\n\nconst timeList = computed(() => {\n const { hours, minutes } = unref(timePartials)\n return {\n hours: getHoursList(props.role),\n minutes: getMinutesList(hours, props.role),\n seconds: getSecondsList(hours, minutes, props.role),\n }\n})\n\nconst arrowControlTimeList = computed<Record<TimeUnit, TimeList>>(() => {\n const { hours, minutes, seconds } = unref(timePartials)\n\n return {\n hours: buildTimeList(hours, 23),\n minutes: buildTimeList(minutes, 59),\n seconds: buildTimeList(seconds, 59),\n }\n})\n\nconst debouncedResetScroll = debounce((type) => {\n isScrolling = false\n adjustCurrentSpinner(type)\n}, 200)\n\nconst getAmPmFlag = (hour: number) => {\n const shouldShowAmPm = !!props.amPmMode\n if (!shouldShowAmPm) return ''\n const isCapital = props.amPmMode === 'A'\n // todo locale\n let content = hour < 12 ? ' am' : ' pm'\n if (isCapital) content = content.toUpperCase()\n return content\n}\n\nconst emitSelectRange = (type: TimeUnit) => {\n let range\n\n switch (type) {\n case 'hours':\n range = [0, 2]\n break\n case 'minutes':\n range = [3, 5]\n break\n case 'seconds':\n range = [6, 8]\n break\n }\n const [left, right] = range\n\n emit('select-range', left, right)\n currentScrollbar.value = type\n}\n\nconst adjustCurrentSpinner = (type: TimeUnit) => {\n adjustSpinner(type, unref(timePartials)[type])\n}\n\nconst adjustSpinners = () => {\n adjustCurrentSpinner('hours')\n adjustCurrentSpinner('minutes')\n adjustCurrentSpinner('seconds')\n}\n\nconst getScrollbarElement = (el: HTMLElement) =>\n el.querySelector(`.${ns.namespace.value}-scrollbar__wrap`) as HTMLElement\n\nconst adjustSpinner = (type: TimeUnit, value: number) => {\n if (props.arrowControl) return\n const scrollbar = unref(listRefsMap[type])\n if (scrollbar && scrollbar.$el) {\n getScrollbarElement(scrollbar.$el).scrollTop = Math.max(\n 0,\n value * typeItemHeight(type)\n )\n }\n}\n\nconst typeItemHeight = (type: TimeUnit): number => {\n const scrollbar = unref(listRefsMap[type])\n const listItem = scrollbar?.$el.querySelector('li')\n if (listItem) {\n return Number.parseFloat(getStyle(listItem, 'height')) || 0\n }\n return 0\n}\n\nconst onIncrement = () => {\n scrollDown(1)\n}\n\nconst onDecrement = () => {\n scrollDown(-1)\n}\n\nconst scrollDown = (step: number) => {\n if (!currentScrollbar.value) {\n emitSelectRange('hours')\n }\n\n const label = currentScrollbar.value!\n const now = unref(timePartials)[label]\n const total = currentScrollbar.value === 'hours' ? 24 : 60\n const next = findNextUnDisabled(label, now, step, total)\n\n modifyDateField(label, next)\n adjustSpinner(label, next)\n nextTick(() => emitSelectRange(label))\n}\n\nconst findNextUnDisabled = (\n type: TimeUnit,\n now: number,\n step: number,\n total: number\n) => {\n let next = (now + step + total) % total\n const list = unref(timeList)[type]\n while (list[next] && next !== now) {\n next = (next + step + total) % total\n }\n return next\n}\n\nconst modifyDateField = (type: TimeUnit, value: number) => {\n const list = unref(timeList)[type]\n const isDisabled = list[value]\n if (isDisabled) return\n\n const { hours, minutes, seconds } = unref(timePartials)\n\n let changeTo\n switch (type) {\n case 'hours':\n changeTo = props.spinnerDate.hour(value).minute(minutes).second(seconds)\n break\n case 'minutes':\n changeTo = props.spinnerDate.hour(hours).minute(value).second(seconds)\n break\n case 'seconds':\n changeTo = props.spinnerDate.hour(hours).minute(minutes).second(value)\n break\n }\n emit('change', changeTo)\n}\n\nconst handleClick = (\n type: TimeUnit,\n { value, disabled }: { value: number; disabled: boolean }\n) => {\n if (!disabled) {\n modifyDateField(type, value)\n emitSelectRange(type)\n adjustSpinner(type, value)\n }\n}\n\nconst handleScroll = (type: TimeUnit) => {\n const scrollbar = unref(listRefsMap[type])\n if (!scrollbar) return\n\n isScrolling = true\n debouncedResetScroll(type)\n const value = Math.min(\n Math.round(\n (getScrollbarElement(scrollbar.$el).scrollTop -\n (scrollBarHeight(type) * 0.5 - 10) / typeItemHeight(type) +\n 3) /\n typeItemHeight(type)\n ),\n type === 'hours' ? 23 : 59\n )\n modifyDateField(type, value)\n}\n\nconst scrollBarHeight = (type: TimeUnit) => {\n return unref(listRefsMap[type])!.$el.offsetHeight\n}\n\nconst bindScrollEvent = () => {\n const bindFunction = (type: TimeUnit) => {\n const scrollbar = unref(listRefsMap[type])\n if (scrollbar && scrollbar.$el) {\n getScrollbarElement(scrollbar.$el).onscroll = () => {\n // TODO: scroll is emitted when set scrollTop programmatically\n // should find better solutions in the future!\n handleScroll(type)\n }\n }\n }\n bindFunction('hours')\n bindFunction('minutes')\n bindFunction('seconds')\n}\n\nonMounted(() => {\n nextTick(() => {\n !props.arrowControl && bindScrollEvent()\n adjustSpinners()\n // set selection on the first hour part\n if (props.role === 'start') emitSelectRange('hours')\n })\n})\n\nconst setRef = (scrollbar: ScrollbarInstance | null, type: TimeUnit) => {\n listRefsMap[type].value = scrollbar ?? undefined\n}\n\nemit('set-option', [`${props.role}_scrollDown`, scrollDown])\nemit('set-option', [`${props.role}_emitSelectRange`, emitSelectRange])\n\nwatch(\n () => props.spinnerDate,\n () => {\n if (isScrolling) return\n adjustSpinners()\n }\n)\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_Fragment","_renderList","_createBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqGA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAA,MAAM,EAAE,YAAA,EAAc,cAAgB,EAAA,cAAA,EAAmB,GAAA,Y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EAAA,KAAA,CAAA,IAAA,CAAA,gBAAA,CAAA,EAAA,eAAA,CAAA,CAAA,CAAA;AAAA,IACH,KAAC,CAAA,MAAA,KAAA,CAAA,WAAA,EAAA,MAAA;AAED,MAAM,IAAA,WAAU;AACd,QAAY,OAAA;AAA2B,MACzC,cAAA,EAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AACA,IAAA,oBAAoB;AAEpB,MAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,aACc,EAAAC,cAAA,CAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,EAAA,EAAA,aAAA,EAAA,IAAA,CAAA,WAAA,EAAA,CAAA,CAAA;AAAA,OACN,EAAA;AACJ,QAAA,CAAA,IAAiB,CAAA,YAAA,IAAAH,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,CAAAG,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAAC,UAAA,CAAAF,KAAA,CAAA,YAAA,CAAA,EAAA,CAAA,IAAA,KAAA;AACjB,UAAe,OAAAH,SAAA,EAAA,EAAAM,WAAA,CAAAH,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,YACjB,GAAA,EAAA,IAAA;AAAA,YACF,OAAA,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"basic-time-spinner.mjs","sources":["../../../../../../../packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b('spinner'), { 'has-seconds': showSeconds }]\">\n <template v-if=\"!arrowControl\">\n <el-scrollbar\n v-for=\"item in spinnerItems\"\n :key=\"item\"\n :ref=\"(scrollbar: unknown) => setRef(scrollbar as any, item)\"\n :class=\"ns.be('spinner', 'wrapper')\"\n wrap-style=\"max-height: inherit;\"\n :view-class=\"ns.be('spinner', 'list')\"\n noresize\n tag=\"ul\"\n @mouseenter=\"emitSelectRange(item)\"\n @mousemove=\"adjustCurrentSpinner(item)\"\n >\n <li\n v-for=\"(disabled, key) in timeList[item]\"\n :key=\"key\"\n :class=\"[\n ns.be('spinner', 'item'),\n ns.is('active', key === timePartials[item]),\n ns.is('disabled', disabled),\n ]\"\n @click=\"handleClick(item, { value: key, disabled })\"\n >\n <template v-if=\"item === 'hours'\">\n {{ ('0' + (amPmMode ? key % 12 || 12 : key)).slice(-2)\n }}{{ getAmPmFlag(key) }}\n </template>\n <template v-else>\n {{ ('0' + key).slice(-2) }}\n </template>\n </li>\n </el-scrollbar>\n </template>\n <template v-if=\"arrowControl\">\n <div\n v-for=\"item in spinnerItems\"\n :key=\"item\"\n :class=\"[ns.be('spinner', 'wrapper'), ns.is('arrow')]\"\n @mouseenter=\"emitSelectRange(item)\"\n >\n <el-icon\n v-repeat-click=\"onDecrement\"\n :class=\"['arrow-up', ns.be('spinner', 'arrow')]\"\n >\n <arrow-up />\n </el-icon>\n <el-icon\n v-repeat-click=\"onIncrement\"\n :class=\"['arrow-down', ns.be('spinner', 'arrow')]\"\n >\n <arrow-down />\n </el-icon>\n <ul :class=\"ns.be('spinner', 'list')\">\n <li\n v-for=\"(time, key) in arrowControlTimeList[item]\"\n :key=\"key\"\n :class=\"[\n ns.be('spinner', 'item'),\n ns.is('active', time === timePartials[item]),\n ns.is('disabled', timeList[item][time!]),\n ]\"\n >\n <template v-if=\"isNumber(time)\">\n <template v-if=\"item === 'hours'\">\n {{ ('0' + (amPmMode ? time % 12 || 12 : time)).slice(-2)\n }}{{ getAmPmFlag(time) }}\n </template>\n <template v-else>\n {{ ('0' + time).slice(-2) }}\n </template>\n </template>\n </li>\n </ul>\n </div>\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, inject, nextTick, onMounted, ref, unref, watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { vRepeatClick } from '@element-plus/directives'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElIcon from '@element-plus/components/icon'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { getStyle, isNumber } from '@element-plus/utils'\nimport { timeUnits } from '../constants'\nimport { buildTimeList } from '../utils'\nimport { basicTimeSpinnerProps } from '../props/basic-time-spinner'\nimport { getTimeLists } from '../composables/use-time-picker'\n\nimport type { Ref } from 'vue'\nimport type { ScrollbarInstance } from '@element-plus/components/scrollbar'\nimport type { TimeUnit } from '../constants'\nimport type { TimeList } from '../utils'\n\nconst props = defineProps(basicTimeSpinnerProps)\nconst pickerBase = inject('EP_PICKER_BASE') as any\nconst { isRange } = pickerBase.props\nconst emit = defineEmits(['change', 'select-range', 'set-option'])\n\nconst ns = useNamespace('time')\n\nconst { getHoursList, getMinutesList, getSecondsList } = getTimeLists(\n props.disabledHours,\n props.disabledMinutes,\n props.disabledSeconds\n)\n\n// data\nlet isScrolling = false\n\nconst currentScrollbar = ref<TimeUnit>()\nconst listHoursRef = ref<ScrollbarInstance>()\nconst listMinutesRef = ref<ScrollbarInstance>()\nconst listSecondsRef = ref<ScrollbarInstance>()\nconst listRefsMap: Record<TimeUnit, Ref<ScrollbarInstance | undefined>> = {\n hours: listHoursRef,\n minutes: listMinutesRef,\n seconds: listSecondsRef,\n}\n\n// computed\nconst spinnerItems = computed(() => {\n return props.showSeconds ? timeUnits : timeUnits.slice(0, 2)\n})\n\nconst timePartials = computed<Record<TimeUnit, number>>(() => {\n const { spinnerDate } = props\n const hours = spinnerDate.hour()\n const minutes = spinnerDate.minute()\n const seconds = spinnerDate.second()\n return { hours, minutes, seconds }\n})\n\nconst timeList = computed(() => {\n const { hours, minutes } = unref(timePartials)\n const { role, spinnerDate } = props\n const compare = !isRange ? spinnerDate : undefined\n return {\n hours: getHoursList(role, compare),\n minutes: getMinutesList(hours, role, compare),\n seconds: getSecondsList(hours, minutes, role, compare),\n }\n})\n\nconst arrowControlTimeList = computed<Record<TimeUnit, TimeList>>(() => {\n const { hours, minutes, seconds } = unref(timePartials)\n\n return {\n hours: buildTimeList(hours, 23),\n minutes: buildTimeList(minutes, 59),\n seconds: buildTimeList(seconds, 59),\n }\n})\n\nconst debouncedResetScroll = debounce((type) => {\n isScrolling = false\n adjustCurrentSpinner(type)\n}, 200)\n\nconst getAmPmFlag = (hour: number) => {\n const shouldShowAmPm = !!props.amPmMode\n if (!shouldShowAmPm) return ''\n const isCapital = props.amPmMode === 'A'\n // todo locale\n let content = hour < 12 ? ' am' : ' pm'\n if (isCapital) content = content.toUpperCase()\n return content\n}\n\nconst emitSelectRange = (type: TimeUnit) => {\n let range\n\n switch (type) {\n case 'hours':\n range = [0, 2]\n break\n case 'minutes':\n range = [3, 5]\n break\n case 'seconds':\n range = [6, 8]\n break\n }\n const [left, right] = range\n\n emit('select-range', left, right)\n currentScrollbar.value = type\n}\n\nconst adjustCurrentSpinner = (type: TimeUnit) => {\n adjustSpinner(type, unref(timePartials)[type])\n}\n\nconst adjustSpinners = () => {\n adjustCurrentSpinner('hours')\n adjustCurrentSpinner('minutes')\n adjustCurrentSpinner('seconds')\n}\n\nconst getScrollbarElement = (el: HTMLElement) =>\n el.querySelector(`.${ns.namespace.value}-scrollbar__wrap`) as HTMLElement\n\nconst adjustSpinner = (type: TimeUnit, value: number) => {\n if (props.arrowControl) return\n const scrollbar = unref(listRefsMap[type])\n if (scrollbar && scrollbar.$el) {\n getScrollbarElement(scrollbar.$el).scrollTop = Math.max(\n 0,\n value * typeItemHeight(type)\n )\n }\n}\n\nconst typeItemHeight = (type: TimeUnit): number => {\n const scrollbar = unref(listRefsMap[type])\n const listItem = scrollbar?.$el.querySelector('li')\n if (listItem) {\n return Number.parseFloat(getStyle(listItem, 'height')) || 0\n }\n return 0\n}\n\nconst onIncrement = () => {\n scrollDown(1)\n}\n\nconst onDecrement = () => {\n scrollDown(-1)\n}\n\nconst scrollDown = (step: number) => {\n if (!currentScrollbar.value) {\n emitSelectRange('hours')\n }\n\n const label = currentScrollbar.value!\n const now = unref(timePartials)[label]\n const total = currentScrollbar.value === 'hours' ? 24 : 60\n const next = findNextUnDisabled(label, now, step, total)\n\n modifyDateField(label, next)\n adjustSpinner(label, next)\n nextTick(() => emitSelectRange(label))\n}\n\nconst findNextUnDisabled = (\n type: TimeUnit,\n now: number,\n step: number,\n total: number\n) => {\n let next = (now + step + total) % total\n const list = unref(timeList)[type]\n while (list[next] && next !== now) {\n next = (next + step + total) % total\n }\n return next\n}\n\nconst modifyDateField = (type: TimeUnit, value: number) => {\n const list = unref(timeList)[type]\n const isDisabled = list[value]\n if (isDisabled) return\n\n const { hours, minutes, seconds } = unref(timePartials)\n\n let changeTo\n switch (type) {\n case 'hours':\n changeTo = props.spinnerDate.hour(value).minute(minutes).second(seconds)\n break\n case 'minutes':\n changeTo = props.spinnerDate.hour(hours).minute(value).second(seconds)\n break\n case 'seconds':\n changeTo = props.spinnerDate.hour(hours).minute(minutes).second(value)\n break\n }\n emit('change', changeTo)\n}\n\nconst handleClick = (\n type: TimeUnit,\n { value, disabled }: { value: number; disabled: boolean }\n) => {\n if (!disabled) {\n modifyDateField(type, value)\n emitSelectRange(type)\n adjustSpinner(type, value)\n }\n}\n\nconst handleScroll = (type: TimeUnit) => {\n const scrollbar = unref(listRefsMap[type])\n if (!scrollbar) return\n\n isScrolling = true\n debouncedResetScroll(type)\n const value = Math.min(\n Math.round(\n (getScrollbarElement(scrollbar.$el).scrollTop -\n (scrollBarHeight(type) * 0.5 - 10) / typeItemHeight(type) +\n 3) /\n typeItemHeight(type)\n ),\n type === 'hours' ? 23 : 59\n )\n modifyDateField(type, value)\n}\n\nconst scrollBarHeight = (type: TimeUnit) => {\n return unref(listRefsMap[type])!.$el.offsetHeight\n}\n\nconst bindScrollEvent = () => {\n const bindFunction = (type: TimeUnit) => {\n const scrollbar = unref(listRefsMap[type])\n if (scrollbar && scrollbar.$el) {\n getScrollbarElement(scrollbar.$el).onscroll = () => {\n // TODO: scroll is emitted when set scrollTop programmatically\n // should find better solutions in the future!\n handleScroll(type)\n }\n }\n }\n bindFunction('hours')\n bindFunction('minutes')\n bindFunction('seconds')\n}\n\nonMounted(() => {\n nextTick(() => {\n !props.arrowControl && bindScrollEvent()\n adjustSpinners()\n // set selection on the first hour part\n if (props.role === 'start') emitSelectRange('hours')\n })\n})\n\nconst setRef = (scrollbar: ScrollbarInstance | null, type: TimeUnit) => {\n listRefsMap[type].value = scrollbar ?? undefined\n}\n\nemit('set-option', [`${props.role}_scrollDown`, scrollDown])\nemit('set-option', [`${props.role}_emitSelectRange`, emitSelectRange])\n\nwatch(\n () => props.spinnerDate,\n () => {\n if (isScrolling) return\n adjustSpinners()\n }\n)\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_Fragment","_renderList","_createBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmGA,IAAM,MAAA,UAAA,GAAa,OAAO,gBAAgB,CAAA,CAAA;AAC1C,IAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,UAAW,CAAA,KAAA,CAAA;AAG/B,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAA,MAAM,EAAE,YAAA,EAAc,cAAgB,EAAA,cAAA,EAAmB,GAAA,YAAA,CAAA,KAAA,CAAA,aAAA,EAAA,KAAA,CAAA,eAAA,EAAA,KAAA,CAAA,eAAA,CAAA,CAAA;AAAA,IAAA,IACjD,WAAA,GAAA,KAAA,CAAA;AAAA,IAAA,MACA,gBAAA,GAAA,GAAA,EAAA,CAAA;AAAA,IAAA,MACA,YAAA,GAAA,GAAA,EAAA,CAAA;AAAA,IACR,MAAA,cAAA,GAAA,GAAA,EAAA,CAAA;AAGA,IAAA,MAAkB,cAAA,GAAA,GAAA,EAAA,CAAA;AAElB,IAAA,MAAM;AACN,MAAA,mBAAqB;AACrB,MAAA,uBAA8C;AAC9C,MAAA,uBAA8C;AAC9C,KAAA,C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AA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,aACc,EAAAC,cAAA,CAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,EAAA,EAAA,aAAA,EAAA,IAAA,CAAA,WAAA,EAAA,CAAA,CAAA;AAAA,OACN,EAAA;AACJ,QAAA,CAAA,IAAiB,CAAA,YAAA,IAAAH,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,CAAAG,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAAC,UAAA,CAAAF,KAAA,CAAA,YAAA,CAAA,EAAA,CAAA,IAAA,KAAA;AACjB,UAAe,OAAAH,SAAA,EAAA,EAAAM,WAAA,CAAAH,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,YACjB,GAAA,EAAA,IAAA;AAAA,YACF,OAAA,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/es/index.mjs CHANGED
@@ -30,10 +30,10 @@ export { ElCalendar } from './components/calendar/index.mjs';
30
30
  export { cardProps } from './components/card/src/card.mjs';
31
31
  export { ElCard } from './components/card/index.mjs';
32
32
  export { carouselEmits, carouselProps } from './components/carousel/src/carousel.mjs';
33
- export { carouselItemProps } from './components/carousel/src/carousel-item.mjs';
33
+ export { carouselItemProps } from './components/carousel/src/carousel-item2.mjs';
34
34
  export { CAROUSEL_ITEM_NAME, carouselContextKey } from './components/carousel/src/constants.mjs';
35
35
  export { ElCarousel, ElCarouselItem } from './components/carousel/index.mjs';
36
- export { cascaderEmits, cascaderProps } from './components/cascader/src/cascader.mjs';
36
+ export { cascaderEmits, cascaderProps } from './components/cascader/src/cascader2.mjs';
37
37
  export { ElCascader } from './components/cascader/index.mjs';
38
38
  export { CASCADER_PANEL_INJECTION_KEY } from './components/cascader-panel/src/types.mjs';
39
39
  export { CommonProps, DefaultProps, useCascaderConfig } from './components/cascader-panel/src/config.mjs';
@@ -46,7 +46,7 @@ export { checkboxGroupContextKey } from './components/checkbox/src/constants.mjs
46
46
  export { ElCheckbox, ElCheckboxButton, ElCheckboxGroup } from './components/checkbox/index.mjs';
47
47
  export { colProps } from './components/col/src/col.mjs';
48
48
  export { ElCol } from './components/col/index.mjs';
49
- export { collapseEmits, collapseProps, emitChangeFn } from './components/collapse/src/collapse.mjs';
49
+ export { collapseEmits, collapseProps, emitChangeFn } from './components/collapse/src/collapse2.mjs';
50
50
  export { collapseItemProps } from './components/collapse/src/collapse-item.mjs';
51
51
  export { collapseContextKey } from './components/collapse/src/constants.mjs';
52
52
  export { ElCollapse, ElCollapseItem } from './components/collapse/index.mjs';
@@ -136,7 +136,7 @@ export { RowAlign, RowJustify, rowProps } from './components/row/src/row.mjs';
136
136
  export { rowContextKey } from './components/row/src/constants.mjs';
137
137
  export { ElRow } from './components/row/index.mjs';
138
138
  export { BAR_MAP, GAP, renderThumbStyle } from './components/scrollbar/src/util.mjs';
139
- export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/scrollbar.mjs';
139
+ export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/scrollbar2.mjs';
140
140
  export { thumbProps } from './components/scrollbar/src/thumb.mjs';
141
141
  export { scrollbarContextKey } from './components/scrollbar/src/constants.mjs';
142
142
  export { ElScrollbar } from './components/scrollbar/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.20241112";
1
+ export declare const version = "0.0.20241113";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20241112";
1
+ const version = "0.0.20241113";
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.20241112'\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.20241113'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
6
  var carousel$1 = require('./src/carousel2.js');
7
- var carouselItem$1 = require('./src/carousel-item2.js');
7
+ var carouselItem$1 = require('./src/carousel-item.js');
8
8
  var carousel = require('./src/carousel.js');
9
- var carouselItem = require('./src/carousel-item.js');
9
+ var carouselItem = require('./src/carousel-item2.js');
10
10
  var constants = require('./src/constants.js');
11
11
  var install = require('../../utils/vue/install.js');
12
12
 
@@ -2,16 +2,78 @@
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 carouselItem = require('./carousel-item2.js');
8
+ var useCarouselItem = require('./use-carousel-item.js');
9
+ var constants = require('./constants.js');
10
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
11
+ var index = require('../../../hooks/use-namespace/index.js');
7
12
 
8
- const carouselItemProps = runtime.buildProps({
9
- name: { type: String, default: "" },
10
- label: {
11
- type: [String, Number],
12
- default: ""
13
+ const __default__ = vue.defineComponent({
14
+ name: constants.CAROUSEL_ITEM_NAME
15
+ });
16
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
+ ...__default__,
18
+ props: carouselItem.carouselItemProps,
19
+ setup(__props) {
20
+ const props = __props;
21
+ const ns = index.useNamespace("carousel");
22
+ const {
23
+ carouselItemRef,
24
+ active,
25
+ animating,
26
+ hover,
27
+ inStage,
28
+ isVertical,
29
+ translate,
30
+ isCardType,
31
+ scale,
32
+ ready,
33
+ handleItemClick
34
+ } = useCarouselItem.useCarouselItem(props);
35
+ const itemKls = vue.computed(() => [
36
+ ns.e("item"),
37
+ ns.is("active", active.value),
38
+ ns.is("in-stage", inStage.value),
39
+ ns.is("hover", hover.value),
40
+ ns.is("animating", animating.value),
41
+ {
42
+ [ns.em("item", "card")]: isCardType.value,
43
+ [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
44
+ }
45
+ ]);
46
+ const itemStyle = vue.computed(() => {
47
+ const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
48
+ const _translate = `${translateType}(${vue.unref(translate)}px)`;
49
+ const _scale = `scale(${vue.unref(scale)})`;
50
+ const transform = [_translate, _scale].join(" ");
51
+ return {
52
+ transform
53
+ };
54
+ });
55
+ return (_ctx, _cache) => {
56
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
57
+ ref_key: "carouselItemRef",
58
+ ref: carouselItemRef,
59
+ class: vue.normalizeClass(vue.unref(itemKls)),
60
+ style: vue.normalizeStyle(vue.unref(itemStyle)),
61
+ onClick: vue.unref(handleItemClick)
62
+ }, [
63
+ vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
64
+ key: 0,
65
+ class: vue.normalizeClass(vue.unref(ns).e("mask"))
66
+ }, null, 2)), [
67
+ [vue.vShow, !vue.unref(active)]
68
+ ]) : vue.createCommentVNode("v-if", true),
69
+ vue.renderSlot(_ctx.$slots, "default")
70
+ ], 14, ["onClick"])), [
71
+ [vue.vShow, vue.unref(ready)]
72
+ ]);
73
+ };
13
74
  }
14
75
  });
76
+ var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
15
77
 
16
- exports.carouselItemProps = carouselItemProps;
78
+ exports["default"] = CarouselItem;
17
79
  //# sourceMappingURL=carousel-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n /**\n * @description name of the item, can be used in `setActiveItem`\n */\n name: { type: String, default: '' },\n /**\n * @description text content for the corresponding indicator\n */\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"itemKls\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\nimport { CAROUSEL_ITEM_NAME } from './constants'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: CAROUSEL_ITEM_NAME,\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\n\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props)\n\nconst itemKls = computed(() => [\n ns.e('item'),\n ns.is('active', active.value),\n ns.is('in-stage', inStage.value),\n ns.is('hover', hover.value),\n ns.is('animating', animating.value),\n {\n [ns.em('item', 'card')]: isCardType.value,\n [ns.em('item', 'card-vertical')]: isCardType.value && isVertical.value,\n },\n])\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["CAROUSEL_ITEM_NAME","useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;uCAsBc,CAAA;AAAA,EACZ,IAAM,EAAAA,4BAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACF,GAAIC,gCAAgB,KAAK,CAAA,CAAA;AAEzB,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAAA,MAC7B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,MAAA,CAAO,KAAK,CAAA;AAAA,MAC5B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,MAC/B,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAC1B,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,MAClC;AAAA,QACE,CAAC,EAAG,CAAA,EAAA,CAAG,QAAQ,MAAM,CAAC,GAAG,UAAW,CAAA,KAAA;AAAA,QACpC,CAAC,GAAG,EAAG,CAAA,MAAA,EAAQ,eAAe,CAAC,GAAG,UAAW,CAAA,KAAA,IAAS,UAAW,CAAA,KAAA;AAAA,OACnE;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYA,aAAwB,MAAM;AAC9C,MAAA,MAAM,gBAAgB,CAAY,SAAA,EAAAC,SAAA,CAAM,UAAU,CAAA,GAAI,MAAM,GAAG,CAAA,CAAA,CAAA;AAC/D,MAAA,MAAM,aAAa,CAAG,EAAA,aAAa,CAAI,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAC,CAAA,GAAA,CAAA,CAAA;AACvD,MAAA,MAAM,MAAS,GAAA,CAAA,MAAA,EAASA,SAAM,CAAA,KAAK,CAAC,CAAA,CAAA,CAAA,CAAA;AACpC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,78 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var carouselItem = require('./carousel-item.js');
8
- var useCarouselItem = require('./use-carousel-item.js');
9
- var constants = require('./constants.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
11
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
12
7
 
13
- const __default__ = vue.defineComponent({
14
- name: constants.CAROUSEL_ITEM_NAME
15
- });
16
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
- ...__default__,
18
- props: carouselItem.carouselItemProps,
19
- setup(__props) {
20
- const props = __props;
21
- const ns = index.useNamespace("carousel");
22
- const {
23
- carouselItemRef,
24
- active,
25
- animating,
26
- hover,
27
- inStage,
28
- isVertical,
29
- translate,
30
- isCardType,
31
- scale,
32
- ready,
33
- handleItemClick
34
- } = useCarouselItem.useCarouselItem(props);
35
- const itemKls = vue.computed(() => [
36
- ns.e("item"),
37
- ns.is("active", active.value),
38
- ns.is("in-stage", inStage.value),
39
- ns.is("hover", hover.value),
40
- ns.is("animating", animating.value),
41
- {
42
- [ns.em("item", "card")]: isCardType.value,
43
- [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
44
- }
45
- ]);
46
- const itemStyle = vue.computed(() => {
47
- const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
48
- const _translate = `${translateType}(${vue.unref(translate)}px)`;
49
- const _scale = `scale(${vue.unref(scale)})`;
50
- const transform = [_translate, _scale].join(" ");
51
- return {
52
- transform
53
- };
54
- });
55
- return (_ctx, _cache) => {
56
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
57
- ref_key: "carouselItemRef",
58
- ref: carouselItemRef,
59
- class: vue.normalizeClass(vue.unref(itemKls)),
60
- style: vue.normalizeStyle(vue.unref(itemStyle)),
61
- onClick: vue.unref(handleItemClick)
62
- }, [
63
- vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
64
- key: 0,
65
- class: vue.normalizeClass(vue.unref(ns).e("mask"))
66
- }, null, 2)), [
67
- [vue.vShow, !vue.unref(active)]
68
- ]) : vue.createCommentVNode("v-if", true),
69
- vue.renderSlot(_ctx.$slots, "default")
70
- ], 14, ["onClick"])), [
71
- [vue.vShow, vue.unref(ready)]
72
- ]);
73
- };
8
+ const carouselItemProps = runtime.buildProps({
9
+ name: { type: String, default: "" },
10
+ label: {
11
+ type: [String, Number],
12
+ default: ""
74
13
  }
75
14
  });
76
- var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
77
15
 
78
- exports["default"] = CarouselItem;
16
+ exports.carouselItemProps = carouselItemProps;
79
17
  //# sourceMappingURL=carousel-item2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"itemKls\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\nimport { CAROUSEL_ITEM_NAME } from './constants'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: CAROUSEL_ITEM_NAME,\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\n\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props)\n\nconst itemKls = computed(() => [\n ns.e('item'),\n ns.is('active', active.value),\n ns.is('in-stage', inStage.value),\n ns.is('hover', hover.value),\n ns.is('animating', animating.value),\n {\n [ns.em('item', 'card')]: isCardType.value,\n [ns.em('item', 'card-vertical')]: isCardType.value && isVertical.value,\n },\n])\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["CAROUSEL_ITEM_NAME","useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;uCAsBc,CAAA;AAAA,EACZ,IAAM,EAAAA,4BAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACF,GAAIC,gCAAgB,KAAK,CAAA,CAAA;AAEzB,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAAA,MAC7B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,MAAA,CAAO,KAAK,CAAA;AAAA,MAC5B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,MAC/B,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAC1B,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,MAClC;AAAA,QACE,CAAC,EAAG,CAAA,EAAA,CAAG,QAAQ,MAAM,CAAC,GAAG,UAAW,CAAA,KAAA;AAAA,QACpC,CAAC,GAAG,EAAG,CAAA,MAAA,EAAQ,eAAe,CAAC,GAAG,UAAW,CAAA,KAAA,IAAS,UAAW,CAAA,KAAA;AAAA,OACnE;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYA,aAAwB,MAAM;AAC9C,MAAA,MAAM,gBAAgB,CAAY,SAAA,EAAAC,SAAA,CAAM,UAAU,CAAA,GAAI,MAAM,GAAG,CAAA,CAAA,CAAA;AAC/D,MAAA,MAAM,aAAa,CAAG,EAAA,aAAa,CAAI,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAC,CAAA,GAAA,CAAA,CAAA;AACvD,MAAA,MAAM,MAAS,GAAA,CAAA,MAAA,EAASA,SAAM,CAAA,KAAK,CAAC,CAAA,CAAA,CAAA,CAAA;AACpC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n /**\n * @description name of the item, can be used in `setActiveItem`\n */\n name: { type: String, default: '' },\n /**\n * @description text content for the corresponding indicator\n */\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var cascader$1 = require('./src/cascader2.js');
7
- var cascader = require('./src/cascader.js');
6
+ var cascader$1 = require('./src/cascader.js');
7
+ var cascader = require('./src/cascader2.js');
8
8
  require('./src/instances.js');
9
9
  var install = require('../../utils/vue/install.js');
10
10