@element-plus/nightly 0.0.20240724 → 0.0.20240725
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.
- package/attributes.json +1 -1
- package/dist/index.full.js +37 -105
- package/dist/index.full.min.js +6 -6
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +6 -6
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +37 -105
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/index.d.ts +80 -80
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +80 -80
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -54
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +54 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +38 -89
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +89 -38
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.d.ts +8 -8
- package/es/components/breadcrumb/src/breadcrumb-item.d.ts +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +1 -4
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item.vue.d.ts +4 -4
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +57 -77
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +77 -57
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +87 -33
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +33 -87
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/carousel/index.d.ts +4 -0
- package/es/components/carousel/src/carousel.d.ts +1 -0
- package/es/components/carousel/src/carousel.mjs +4 -0
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +4 -0
- package/es/components/carousel/src/constants.d.ts +1 -0
- package/es/components/carousel/src/constants.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel-item.mjs +5 -6
- package/es/components/carousel/src/use-carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.mjs +1 -0
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +160 -160
- package/es/components/cascader/src/cascader.vue.d.ts +80 -80
- package/es/components/cascader/src/cascader2.mjs +1 -1
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/check-tag/index.d.ts +4 -4
- package/es/components/check-tag/src/check-tag.d.ts +1 -1
- package/es/components/check-tag/src/check-tag.mjs +1 -4
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag.vue.d.ts +4 -4
- package/es/components/color-picker/index.d.ts +44 -44
- package/es/components/color-picker/src/color-picker.vue.d.ts +44 -44
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +23 -77
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +77 -23
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +20 -20
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +20 -20
- package/es/components/date-picker/src/date-picker.d.ts +1 -1
- package/es/components/date-picker/src/panel-utils.d.ts +40 -40
- package/es/components/descriptions/index.d.ts +4 -4
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.mjs +1 -4
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +4 -4
- package/es/components/dialog/index.d.ts +7 -7
- package/es/components/dialog/src/dialog.d.ts +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -4
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +7 -7
- package/es/components/drawer/index.d.ts +7 -7
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.d.ts +1 -1
- package/es/components/drawer/src/drawer.mjs +27 -181
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +7 -7
- package/es/components/drawer/src/drawer2.mjs +181 -27
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +16 -16
- package/es/components/dropdown/src/dropdown.vue.d.ts +16 -16
- package/es/components/index.mjs +6 -6
- package/es/components/input/index.d.ts +20 -20
- package/es/components/input/src/input.d.ts +5 -5
- package/es/components/input/src/input.mjs +5 -20
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue.d.ts +20 -20
- package/es/components/input-number/index.d.ts +57 -57
- package/es/components/input-number/src/input-number.vue.d.ts +57 -57
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.mjs +1 -4
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/overlay/index.d.ts +3 -3
- package/es/components/overlay/src/overlay.d.ts +4 -4
- package/es/components/overlay/src/overlay.mjs +1 -4
- package/es/components/overlay/src/overlay.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.vue.d.ts +20 -20
- package/es/components/pagination/src/components/sizes.vue.d.ts +32 -32
- package/es/components/popconfirm/index.d.ts +24 -24
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +24 -24
- package/es/components/popover/index.d.ts +24 -24
- package/es/components/popover/src/popover.vue.d.ts +24 -24
- package/es/components/progress/index.d.ts +8 -8
- package/es/components/progress/src/progress.d.ts +2 -2
- package/es/components/progress/src/progress.mjs +2 -8
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress.vue.d.ts +8 -8
- package/es/components/rate/index.d.ts +4 -4
- package/es/components/rate/src/rate.d.ts +1 -1
- package/es/components/rate/src/rate.mjs +1 -4
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +4 -4
- package/es/components/select/index.d.ts +32 -32
- package/es/components/select/src/select.vue.d.ts +32 -32
- package/es/components/select/src/useSelect.d.ts +32 -32
- package/es/components/select-v2/index.d.ts +64 -64
- package/es/components/select-v2/src/select.vue.d.ts +32 -32
- package/es/components/select-v2/src/useSelect.d.ts +32 -32
- package/es/components/slider/index.d.ts +97 -97
- package/es/components/slider/src/button.vue.d.ts +8 -8
- package/es/components/slider/src/composables/use-slide.d.ts +32 -32
- package/es/components/slider/src/slider.vue.d.ts +97 -97
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +19 -191
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +191 -19
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/switch/index.d.ts +12 -12
- package/es/components/switch/src/switch.d.ts +3 -3
- package/es/components/switch/src/switch.mjs +3 -12
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +12 -12
- package/es/components/table/src/filter-panel.vue.d.ts +16 -16
- package/es/components/teleport/index.d.ts +4 -4
- package/es/components/teleport/src/teleport.d.ts +1 -1
- package/es/components/teleport/src/teleport.mjs +1 -4
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport.vue.d.ts +4 -4
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/src/common/picker.vue.d.ts +45 -45
- package/es/components/time-picker/src/time-picker.d.ts +1 -1
- package/es/components/time-select/index.d.ts +64 -64
- package/es/components/time-select/src/time-select.vue.d.ts +64 -64
- package/es/components/timeline/index.d.ts +24 -24
- package/es/components/timeline/src/timeline-item.d.ts +3 -3
- package/es/components/timeline/src/timeline-item.mjs +3 -12
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +12 -12
- package/es/components/tooltip/index.d.ts +8 -8
- package/es/components/tooltip/src/content.d.ts +1 -1
- package/es/components/tooltip/src/content.mjs +1 -4
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +4 -4
- package/es/components/tooltip/src/tooltip.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +8 -8
- package/es/components/tooltip-v2/index.d.ts +13 -13
- package/es/components/tooltip-v2/src/content.d.ts +1 -1
- package/es/components/tooltip-v2/src/content.mjs +1 -4
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content.vue.d.ts +4 -4
- package/es/components/tooltip-v2/src/tooltip.d.ts +1 -1
- package/es/components/tooltip-v2/src/tooltip.vue.d.ts +13 -13
- package/es/components/transfer/index.d.ts +100 -100
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -128
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel.vue.d.ts +20 -20
- package/es/components/transfer/src/transfer-panel2.mjs +128 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer.vue.d.ts +100 -100
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/upload/index.d.ts +38 -38
- package/es/components/upload/src/upload-content.d.ts +2 -2
- package/es/components/upload/src/upload-content.vue.d.ts +8 -8
- package/es/components/upload/src/upload-list.vue.d.ts +8 -8
- package/es/components/upload/src/upload.d.ts +8 -16
- package/es/components/upload/src/upload.mjs +2 -8
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +38 -38
- package/es/index.mjs +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/index.d.ts +80 -80
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +80 -80
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -54
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +54 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +38 -89
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +89 -38
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.d.ts +8 -8
- package/lib/components/breadcrumb/src/breadcrumb-item.d.ts +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item.js +1 -4
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item.vue.d.ts +4 -4
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +60 -77
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +77 -60
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +87 -37
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +37 -87
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/carousel/index.d.ts +4 -0
- package/lib/components/carousel/src/carousel.d.ts +1 -0
- package/lib/components/carousel/src/carousel.js +4 -0
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +4 -0
- package/lib/components/carousel/src/constants.d.ts +1 -0
- package/lib/components/carousel/src/constants.js.map +1 -1
- package/lib/components/carousel/src/use-carousel-item.js +5 -6
- package/lib/components/carousel/src/use-carousel-item.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.js +1 -0
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/index.d.ts +160 -160
- package/lib/components/cascader/src/cascader.vue.d.ts +80 -80
- package/lib/components/cascader/src/cascader2.js +1 -1
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/check-tag/index.d.ts +4 -4
- package/lib/components/check-tag/src/check-tag.d.ts +1 -1
- package/lib/components/check-tag/src/check-tag.js +1 -4
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag.vue.d.ts +4 -4
- package/lib/components/color-picker/index.d.ts +44 -44
- package/lib/components/color-picker/src/color-picker.vue.d.ts +44 -44
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +24 -77
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +77 -24
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +20 -20
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +20 -20
- package/lib/components/date-picker/src/date-picker.d.ts +1 -1
- package/lib/components/date-picker/src/panel-utils.d.ts +40 -40
- package/lib/components/descriptions/index.d.ts +4 -4
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.js +1 -4
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +4 -4
- package/lib/components/dialog/index.d.ts +7 -7
- package/lib/components/dialog/src/dialog.d.ts +1 -1
- package/lib/components/dialog/src/dialog.js +1 -4
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +7 -7
- package/lib/components/drawer/index.d.ts +7 -7
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.d.ts +1 -1
- package/lib/components/drawer/src/drawer.js +28 -181
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +7 -7
- package/lib/components/drawer/src/drawer2.js +181 -28
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +16 -16
- package/lib/components/dropdown/src/dropdown.vue.d.ts +16 -16
- package/lib/components/index.js +6 -6
- package/lib/components/input/index.d.ts +20 -20
- package/lib/components/input/src/input.d.ts +5 -5
- package/lib/components/input/src/input.js +5 -20
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +20 -20
- package/lib/components/input-number/index.d.ts +57 -57
- package/lib/components/input-number/src/input-number.vue.d.ts +57 -57
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.js +1 -4
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/overlay/index.d.ts +3 -3
- package/lib/components/overlay/src/overlay.d.ts +4 -4
- package/lib/components/overlay/src/overlay.js +1 -4
- package/lib/components/overlay/src/overlay.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.vue.d.ts +20 -20
- package/lib/components/pagination/src/components/sizes.vue.d.ts +32 -32
- package/lib/components/popconfirm/index.d.ts +24 -24
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +24 -24
- package/lib/components/popover/index.d.ts +24 -24
- package/lib/components/popover/src/popover.vue.d.ts +24 -24
- package/lib/components/progress/index.d.ts +8 -8
- package/lib/components/progress/src/progress.d.ts +2 -2
- package/lib/components/progress/src/progress.js +2 -8
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +8 -8
- package/lib/components/rate/index.d.ts +4 -4
- package/lib/components/rate/src/rate.d.ts +1 -1
- package/lib/components/rate/src/rate.js +1 -4
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +4 -4
- package/lib/components/select/index.d.ts +32 -32
- package/lib/components/select/src/select.vue.d.ts +32 -32
- package/lib/components/select/src/useSelect.d.ts +32 -32
- package/lib/components/select-v2/index.d.ts +64 -64
- package/lib/components/select-v2/src/select.vue.d.ts +32 -32
- package/lib/components/select-v2/src/useSelect.d.ts +32 -32
- package/lib/components/slider/index.d.ts +97 -97
- package/lib/components/slider/src/button.vue.d.ts +8 -8
- package/lib/components/slider/src/composables/use-slide.d.ts +32 -32
- package/lib/components/slider/src/slider.vue.d.ts +97 -97
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +19 -191
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +191 -19
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/switch/index.d.ts +12 -12
- package/lib/components/switch/src/switch.d.ts +3 -3
- package/lib/components/switch/src/switch.js +3 -12
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +12 -12
- package/lib/components/table/src/filter-panel.vue.d.ts +16 -16
- package/lib/components/teleport/index.d.ts +4 -4
- package/lib/components/teleport/src/teleport.d.ts +1 -1
- package/lib/components/teleport/src/teleport.js +1 -4
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport.vue.d.ts +4 -4
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/src/common/picker.vue.d.ts +45 -45
- package/lib/components/time-picker/src/time-picker.d.ts +1 -1
- package/lib/components/time-select/index.d.ts +64 -64
- package/lib/components/time-select/src/time-select.vue.d.ts +64 -64
- package/lib/components/timeline/index.d.ts +24 -24
- package/lib/components/timeline/src/timeline-item.d.ts +3 -3
- package/lib/components/timeline/src/timeline-item.js +3 -12
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +12 -12
- package/lib/components/tooltip/index.d.ts +8 -8
- package/lib/components/tooltip/src/content.d.ts +1 -1
- package/lib/components/tooltip/src/content.js +1 -4
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +4 -4
- package/lib/components/tooltip/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +8 -8
- package/lib/components/tooltip-v2/index.d.ts +13 -13
- package/lib/components/tooltip-v2/src/content.d.ts +1 -1
- package/lib/components/tooltip-v2/src/content.js +1 -4
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content.vue.d.ts +4 -4
- package/lib/components/tooltip-v2/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +13 -13
- package/lib/components/transfer/index.d.ts +100 -100
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -128
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +20 -20
- package/lib/components/transfer/src/transfer-panel2.js +128 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer.vue.d.ts +100 -100
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/upload/index.d.ts +38 -38
- package/lib/components/upload/src/upload-content.d.ts +2 -2
- package/lib/components/upload/src/upload-content.vue.d.ts +8 -8
- package/lib/components/upload/src/upload-list.vue.d.ts +8 -8
- package/lib/components/upload/src/upload.d.ts +8 -16
- package/lib/components/upload/src/upload.js +2 -8
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +38 -38
- package/lib/index.js +6 -6
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -2,96 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require('
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
require('../../time-picker/index.js');
|
|
7
|
+
var utils = require('../../time-picker/src/utils.js');
|
|
8
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
|
+
var shared = require('@vue/shared');
|
|
11
10
|
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const getPrevMonthLastDays = (date, count) => {
|
|
12
|
+
const lastDay = date.subtract(1, "month").endOf("month").date();
|
|
13
|
+
return utils.rangeArr(count).map((_, index) => lastDay - (count - index - 1));
|
|
14
|
+
};
|
|
15
|
+
const getMonthDays = (date) => {
|
|
16
|
+
const days = date.daysInMonth();
|
|
17
|
+
return utils.rangeArr(days).map((_, index) => index + 1);
|
|
18
|
+
};
|
|
19
|
+
const toNestedArr = (days) => utils.rangeArr(days.length / 7).map((index) => {
|
|
20
|
+
const start = index * 7;
|
|
21
|
+
return days.slice(start, start + 7);
|
|
16
22
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
getSlotData
|
|
31
|
-
} = useDateTable.useDateTable(props, emit);
|
|
32
|
-
const nsTable = index.useNamespace("calendar-table");
|
|
33
|
-
const nsDay = index.useNamespace("calendar-day");
|
|
34
|
-
const getCellClass = ({ text, type }) => {
|
|
35
|
-
const classes = [type];
|
|
36
|
-
if (type === "current") {
|
|
37
|
-
const date = getFormattedDate(text, type);
|
|
38
|
-
if (date.isSame(props.selectedDay, "day")) {
|
|
39
|
-
classes.push(nsDay.is("selected"));
|
|
40
|
-
}
|
|
41
|
-
if (date.isSame(now, "day")) {
|
|
42
|
-
classes.push(nsDay.is("today"));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return classes;
|
|
46
|
-
};
|
|
47
|
-
expose({
|
|
48
|
-
getFormattedDate
|
|
49
|
-
});
|
|
50
|
-
return (_ctx, _cache) => {
|
|
51
|
-
return vue.openBlock(), vue.createElementBlock("table", {
|
|
52
|
-
class: vue.normalizeClass([vue.unref(nsTable).b(), vue.unref(nsTable).is("range", vue.unref(isInRange))]),
|
|
53
|
-
cellspacing: "0",
|
|
54
|
-
cellpadding: "0"
|
|
55
|
-
}, [
|
|
56
|
-
!_ctx.hideHeader ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_1, [
|
|
57
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(weekDays), (day) => {
|
|
58
|
-
return vue.openBlock(), vue.createElementBlock("th", { key: day }, vue.toDisplayString(day), 1);
|
|
59
|
-
}), 128))
|
|
60
|
-
])) : vue.createCommentVNode("v-if", true),
|
|
61
|
-
vue.createElementVNode("tbody", null, [
|
|
62
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(rows), (row, index) => {
|
|
63
|
-
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
64
|
-
key: index,
|
|
65
|
-
class: vue.normalizeClass({
|
|
66
|
-
[vue.unref(nsTable).e("row")]: true,
|
|
67
|
-
[vue.unref(nsTable).em("row", "hide-border")]: index === 0 && _ctx.hideHeader
|
|
68
|
-
})
|
|
69
|
-
}, [
|
|
70
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(row, (cell, key) => {
|
|
71
|
-
return vue.openBlock(), vue.createElementBlock("td", {
|
|
72
|
-
key,
|
|
73
|
-
class: vue.normalizeClass(getCellClass(cell)),
|
|
74
|
-
onClick: ($event) => vue.unref(handlePickDay)(cell)
|
|
75
|
-
}, [
|
|
76
|
-
vue.createElementVNode("div", {
|
|
77
|
-
class: vue.normalizeClass(vue.unref(nsDay).b())
|
|
78
|
-
}, [
|
|
79
|
-
vue.renderSlot(_ctx.$slots, "date-cell", {
|
|
80
|
-
data: vue.unref(getSlotData)(cell)
|
|
81
|
-
}, () => [
|
|
82
|
-
vue.createElementVNode("span", null, vue.toDisplayString(cell.text), 1)
|
|
83
|
-
])
|
|
84
|
-
], 2)
|
|
85
|
-
], 10, _hoisted_2);
|
|
86
|
-
}), 128))
|
|
87
|
-
], 2);
|
|
88
|
-
}), 128))
|
|
89
|
-
])
|
|
90
|
-
], 2);
|
|
91
|
-
};
|
|
23
|
+
const dateTableProps = runtime.buildProps({
|
|
24
|
+
selectedDay: {
|
|
25
|
+
type: runtime.definePropType(Object)
|
|
26
|
+
},
|
|
27
|
+
range: {
|
|
28
|
+
type: runtime.definePropType(Array)
|
|
29
|
+
},
|
|
30
|
+
date: {
|
|
31
|
+
type: runtime.definePropType(Object),
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
hideHeader: {
|
|
35
|
+
type: Boolean
|
|
92
36
|
}
|
|
93
37
|
});
|
|
94
|
-
|
|
38
|
+
const dateTableEmits = {
|
|
39
|
+
pick: (value) => shared.isObject(value)
|
|
40
|
+
};
|
|
95
41
|
|
|
96
|
-
exports
|
|
42
|
+
exports.dateTableEmits = dateTableEmits;
|
|
43
|
+
exports.dateTableProps = dateTableProps;
|
|
44
|
+
exports.getMonthDays = getMonthDays;
|
|
45
|
+
exports.getPrevMonthLastDays = getPrevMonthLastDays;
|
|
46
|
+
exports.toNestedArr = toNestedArr;
|
|
97
47
|
//# sourceMappingURL=date-table2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-table2.js","sources":["../../../../../../packages/components/calendar/src/date-table.
|
|
1
|
+
{"version":3,"file":"date-table2.js","sources":["../../../../../../packages/components/calendar/src/date-table.ts"],"sourcesContent":["import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type CalendarDateCellType = 'next' | 'prev' | 'current'\nexport type CalendarDateCell = {\n text: number\n type: CalendarDateCellType\n}\n\nexport const getPrevMonthLastDays = (date: Dayjs, count: number) => {\n const lastDay = date.subtract(1, 'month').endOf('month').date()\n return rangeArr(count).map((_, index) => lastDay - (count - index - 1))\n}\n\nexport const getMonthDays = (date: Dayjs) => {\n const days = date.daysInMonth()\n return rangeArr(days).map((_, index) => index + 1)\n}\n\nexport const toNestedArr = (days: CalendarDateCell[]) =>\n rangeArr(days.length / 7).map((index) => {\n const start = index * 7\n return days.slice(start, start + 7)\n })\n\nexport const dateTableProps = buildProps({\n selectedDay: {\n type: definePropType<Dayjs>(Object),\n },\n range: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n date: {\n type: definePropType<Dayjs>(Object),\n required: true,\n },\n hideHeader: {\n type: Boolean,\n },\n} as const)\nexport type DateTableProps = ExtractPropTypes<typeof dateTableProps>\n\nexport const dateTableEmits = {\n pick: (value: Dayjs) => isObject(value),\n}\nexport type DateTableEmits = typeof dateTableEmits\n"],"names":["rangeArr","buildProps","definePropType","isObject"],"mappings":";;;;;;;;;;AAEY,MAAC,oBAAoB,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK;AACrD,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClE,EAAE,OAAOA,cAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAK;AACtC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClC,EAAE,OAAOA,cAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC;AACrD,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,IAAI,KAAKA,cAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK;AAC9E,EAAE,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;AAC1B,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AACtC,CAAC,EAAE;AACS,MAAC,cAAc,GAAGC,kBAAU,CAAC;AACzC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEA,sBAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,IAAI,EAAE,CAAC,KAAK,KAAKC,eAAQ,CAAC,KAAK,CAAC;AAClC;;;;;;;;"}
|
|
@@ -8,7 +8,7 @@ var localeData = require('dayjs/plugin/localeData.js');
|
|
|
8
8
|
require('../../../hooks/index.js');
|
|
9
9
|
require('../../time-picker/index.js');
|
|
10
10
|
require('../../../constants/index.js');
|
|
11
|
-
var dateTable = require('./date-
|
|
11
|
+
var dateTable = require('./date-table2.js');
|
|
12
12
|
var index = require('../../../hooks/use-locale/index.js');
|
|
13
13
|
var utils = require('../../time-picker/src/utils.js');
|
|
14
14
|
var date = require('../../../constants/date.js');
|
|
@@ -7,6 +7,7 @@ export declare const ElCarousel: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
7
7
|
readonly indicatorPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
8
8
|
readonly arrow: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
9
9
|
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
10
|
+
readonly cardScale: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
10
11
|
readonly loop: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
11
12
|
readonly direction: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
12
13
|
readonly pauseOnHover: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -22,6 +23,7 @@ export declare const ElCarousel: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
22
23
|
readonly indicatorPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
23
24
|
readonly arrow: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
24
25
|
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
26
|
+
readonly cardScale: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
25
27
|
readonly loop: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
26
28
|
readonly direction: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
27
29
|
readonly pauseOnHover: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -160,6 +162,7 @@ export declare const ElCarousel: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
160
162
|
readonly indicatorPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
161
163
|
readonly arrow: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
162
164
|
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
165
|
+
readonly cardScale: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
163
166
|
readonly loop: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
164
167
|
readonly direction: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
165
168
|
readonly pauseOnHover: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -177,6 +180,7 @@ export declare const ElCarousel: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
177
180
|
readonly autoplay: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
178
181
|
readonly interval: number;
|
|
179
182
|
readonly indicatorPosition: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "none" | "outside", unknown>;
|
|
183
|
+
readonly cardScale: number;
|
|
180
184
|
readonly pauseOnHover: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
181
185
|
readonly motionBlur: boolean;
|
|
182
186
|
}>> & {
|
|
@@ -8,6 +8,7 @@ export declare const carouselProps: {
|
|
|
8
8
|
readonly indicatorPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
9
9
|
readonly arrow: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
10
10
|
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
11
|
+
readonly cardScale: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
11
12
|
readonly loop: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
12
13
|
readonly direction: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
13
14
|
readonly pauseOnHover: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n /**\n * @description index of the initially active slide (starting from 0)\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description height of the carousel\n */\n height: {\n type: String,\n default: '',\n },\n /**\n * @description how indicators are triggered\n */\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether automatically loop the slides\n */\n autoplay: {\n type: Boolean,\n default: true,\n },\n /**\n * @description interval of the auto loop, in milliseconds\n */\n interval: {\n type: Number,\n default: 3000,\n },\n /**\n * @description position of the indicators\n */\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n /**\n * @description when arrows are shown\n */\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n /**\n * @description type of the Carousel\n */\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n /**\n * @description display the items in loop\n */\n loop: {\n type: Boolean,\n default: true,\n },\n /**\n * @description display direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description pause autoplay when hover\n */\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n /**\n * @description infuse dynamism and smoothness into the carousel\n */\n motionBlur: Boolean,\n} as const)\n\nexport const carouselEmits = {\n /**\n * @description triggers when the active slide switches\n * @param current index of the new active slide\n * @param prev index of the old active slide\n */\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes<typeof carouselProps>\nexport type CarouselEmits = typeof carouselEmits\n"],"names":["buildProps","isNumber"],"mappings":";;;;;;;;AACY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC;AACxB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE,OAAO;AACrB,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAACC,cAAQ,CAAC;AAC5D;;;;;"}
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n /**\n * @description index of the initially active slide (starting from 0)\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description height of the carousel\n */\n height: {\n type: String,\n default: '',\n },\n /**\n * @description how indicators are triggered\n */\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether automatically loop the slides\n */\n autoplay: {\n type: Boolean,\n default: true,\n },\n /**\n * @description interval of the auto loop, in milliseconds\n */\n interval: {\n type: Number,\n default: 3000,\n },\n /**\n * @description position of the indicators\n */\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n /**\n * @description when arrows are shown\n */\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n /**\n * @description type of the Carousel\n */\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n /**\n * @description when type is card, scaled size of secondary cards\n */\n cardScale: {\n type: Number,\n default: 0.83,\n },\n /**\n * @description display the items in loop\n */\n loop: {\n type: Boolean,\n default: true,\n },\n /**\n * @description display direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description pause autoplay when hover\n */\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n /**\n * @description infuse dynamism and smoothness into the carousel\n */\n motionBlur: Boolean,\n} as const)\n\nexport const carouselEmits = {\n /**\n * @description triggers when the active slide switches\n * @param current index of the new active slide\n * @param prev index of the old active slide\n */\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes<typeof carouselProps>\nexport type CarouselEmits = typeof carouselEmits\n"],"names":["buildProps","isNumber"],"mappings":";;;;;;;;AACY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ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
|
|
7
7
|
readonly indicatorPosition: import("../../../utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
8
8
|
readonly arrow: import("../../../utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
9
9
|
readonly type: import("../../../utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
10
|
+
readonly cardScale: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
10
11
|
readonly loop: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
11
12
|
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
12
13
|
readonly pauseOnHover: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -22,6 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
23
|
readonly indicatorPosition: import("../../../utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
23
24
|
readonly arrow: import("../../../utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
24
25
|
readonly type: import("../../../utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
26
|
+
readonly cardScale: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
25
27
|
readonly loop: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
26
28
|
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
27
29
|
readonly pauseOnHover: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -160,6 +162,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
160
162
|
readonly indicatorPosition: import("../../../utils").EpPropFinalized<StringConstructor, "" | "none" | "outside", unknown, "", boolean>;
|
|
161
163
|
readonly arrow: import("../../../utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, "hover", boolean>;
|
|
162
164
|
readonly type: import("../../../utils").EpPropFinalized<StringConstructor, "" | "card", unknown, "", boolean>;
|
|
165
|
+
readonly cardScale: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.83, boolean>;
|
|
163
166
|
readonly loop: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
164
167
|
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
165
168
|
readonly pauseOnHover: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
@@ -177,6 +180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
180
|
readonly autoplay: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
178
181
|
readonly interval: number;
|
|
179
182
|
readonly indicatorPosition: import("../../../utils").EpPropMergeType<StringConstructor, "" | "none" | "outside", unknown>;
|
|
183
|
+
readonly cardScale: number;
|
|
180
184
|
readonly pauseOnHover: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
181
185
|
readonly motionBlur: boolean;
|
|
182
186
|
}>;
|
|
@@ -21,6 +21,7 @@ export declare type CarouselContext = {
|
|
|
21
21
|
isCardType: Ref<boolean>;
|
|
22
22
|
isVertical: Ref<boolean>;
|
|
23
23
|
loop: boolean;
|
|
24
|
+
cardScale: number;
|
|
24
25
|
addItem: (item: CarouselItemContext) => void;
|
|
25
26
|
removeItem: (uid: number) => void;
|
|
26
27
|
setActiveItem: (index: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref<HTMLElement | undefined>\n items: Ref<CarouselItemContext[]>\n isCardType: Ref<boolean>\n isVertical: Ref<boolean>\n loop: boolean\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB;;;;"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref<HTMLElement | undefined>\n items: Ref<CarouselItemContext[]>\n isCardType: Ref<boolean>\n isVertical: Ref<boolean>\n loop: boolean\n cardScale: number\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB;;;;"}
|
|
@@ -17,7 +17,6 @@ const useCarouselItem = (props, componentName) => {
|
|
|
17
17
|
if (!instance) {
|
|
18
18
|
error.debugWarn(componentName, "compositional hook can only be invoked inside setups");
|
|
19
19
|
}
|
|
20
|
-
const CARD_SCALE = 0.83;
|
|
21
20
|
const carouselItemRef = vue.ref();
|
|
22
21
|
const hover = vue.ref(false);
|
|
23
22
|
const translate = vue.ref(0);
|
|
@@ -26,7 +25,7 @@ const useCarouselItem = (props, componentName) => {
|
|
|
26
25
|
const ready = vue.ref(false);
|
|
27
26
|
const inStage = vue.ref(false);
|
|
28
27
|
const animating = vue.ref(false);
|
|
29
|
-
const { isCardType, isVertical } = carouselContext;
|
|
28
|
+
const { isCardType, isVertical, cardScale } = carouselContext;
|
|
30
29
|
function processIndex(index, activeIndex, length) {
|
|
31
30
|
const lastItemIndex = length - 1;
|
|
32
31
|
const prevItemIndex = activeIndex - 1;
|
|
@@ -47,11 +46,11 @@ const useCarouselItem = (props, componentName) => {
|
|
|
47
46
|
var _a, _b;
|
|
48
47
|
const parentWidth = vue.unref(isVertical) ? ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetHeight) || 0 : ((_b = carouselContext.root.value) == null ? void 0 : _b.offsetWidth) || 0;
|
|
49
48
|
if (inStage.value) {
|
|
50
|
-
return parentWidth * ((2 -
|
|
49
|
+
return parentWidth * ((2 - cardScale) * (index - activeIndex) + 1) / 4;
|
|
51
50
|
} else if (index < activeIndex) {
|
|
52
|
-
return -(1 +
|
|
51
|
+
return -(1 + cardScale) * parentWidth / 4;
|
|
53
52
|
} else {
|
|
54
|
-
return (3 +
|
|
53
|
+
return (3 + cardScale) * parentWidth / 4;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
function calcTranslate(index, activeIndex, isVertical2) {
|
|
@@ -77,7 +76,7 @@ const useCarouselItem = (props, componentName) => {
|
|
|
77
76
|
if (_isCardType) {
|
|
78
77
|
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
79
78
|
translate.value = calcCardTranslate(index, activeIndex);
|
|
80
|
-
scale.value = vue.unref(active) ? 1 :
|
|
79
|
+
scale.value = vue.unref(active) ? 1 : cardScale;
|
|
81
80
|
} else {
|
|
82
81
|
translate.value = calcTranslate(index, activeIndex, _isVertical);
|
|
83
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-carousel-item.js","sources":["../../../../../../packages/components/carousel/src/use-carousel-item.ts"],"sourcesContent":["import {\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n unref,\n} from 'vue'\nimport { debugWarn, isUndefined } from '@element-plus/utils'\nimport { carouselContextKey } from './constants'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport const useCarouselItem = (\n props: CarouselItemProps,\n componentName: string\n) => {\n const carouselContext = inject(carouselContextKey)!\n // instance\n const instance = getCurrentInstance()!\n if (!carouselContext) {\n debugWarn(\n componentName,\n 'usage: <el-carousel></el-carousel-item></el-carousel>'\n )\n }\n\n if (!instance) {\n debugWarn(\n componentName,\n 'compositional hook can only be invoked inside setups'\n )\n }\n\n const
|
|
1
|
+
{"version":3,"file":"use-carousel-item.js","sources":["../../../../../../packages/components/carousel/src/use-carousel-item.ts"],"sourcesContent":["import {\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n unref,\n} from 'vue'\nimport { debugWarn, isUndefined } from '@element-plus/utils'\nimport { carouselContextKey } from './constants'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport const useCarouselItem = (\n props: CarouselItemProps,\n componentName: string\n) => {\n const carouselContext = inject(carouselContextKey)!\n // instance\n const instance = getCurrentInstance()!\n if (!carouselContext) {\n debugWarn(\n componentName,\n 'usage: <el-carousel></el-carousel-item></el-carousel>'\n )\n }\n\n if (!instance) {\n debugWarn(\n componentName,\n 'compositional hook can only be invoked inside setups'\n )\n }\n\n const carouselItemRef = ref<HTMLElement>()\n const hover = ref(false)\n const translate = ref(0)\n const scale = ref(1)\n const active = ref(false)\n const ready = ref(false)\n const inStage = ref(false)\n const animating = ref(false)\n\n // computed\n const { isCardType, isVertical, cardScale } = carouselContext\n\n // methods\n\n function processIndex(index: number, activeIndex: number, length: number) {\n const lastItemIndex = length - 1\n const prevItemIndex = activeIndex - 1\n const nextItemIndex = activeIndex + 1\n const halfItemIndex = length / 2\n\n if (activeIndex === 0 && index === lastItemIndex) {\n return -1\n } else if (activeIndex === lastItemIndex && index === 0) {\n return length\n } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {\n return length + 1\n } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {\n return -2\n }\n return index\n }\n\n function calcCardTranslate(index: number, activeIndex: number) {\n const parentWidth = unref(isVertical)\n ? carouselContext.root.value?.offsetHeight || 0\n : carouselContext.root.value?.offsetWidth || 0\n\n if (inStage.value) {\n return (parentWidth * ((2 - cardScale) * (index - activeIndex) + 1)) / 4\n } else if (index < activeIndex) {\n return (-(1 + cardScale) * parentWidth) / 4\n } else {\n return ((3 + cardScale) * parentWidth) / 4\n }\n }\n\n function calcTranslate(\n index: number,\n activeIndex: number,\n isVertical: boolean\n ) {\n const rootEl = carouselContext.root.value\n if (!rootEl) return 0\n\n const distance =\n (isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0\n return distance * (index - activeIndex)\n }\n\n const translateItem = (\n index: number,\n activeIndex: number,\n oldIndex?: number\n ) => {\n const _isCardType = unref(isCardType)\n const carouselItemLength = carouselContext.items.value.length ?? Number.NaN\n\n const isActive = index === activeIndex\n if (!_isCardType && !isUndefined(oldIndex)) {\n animating.value = isActive || index === oldIndex\n }\n\n if (!isActive && carouselItemLength > 2 && carouselContext.loop) {\n index = processIndex(index, activeIndex, carouselItemLength)\n }\n\n const _isVertical = unref(isVertical)\n active.value = isActive\n\n if (_isCardType) {\n inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1\n translate.value = calcCardTranslate(index, activeIndex)\n scale.value = unref(active) ? 1 : cardScale\n } else {\n translate.value = calcTranslate(index, activeIndex, _isVertical)\n }\n\n ready.value = true\n\n if (isActive && carouselItemRef.value) {\n carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight)\n }\n }\n\n function handleItemClick() {\n if (carouselContext && unref(isCardType)) {\n const index = carouselContext.items.value.findIndex(\n ({ uid }) => uid === instance.uid\n )\n carouselContext.setActiveItem(index)\n }\n }\n\n // lifecycle\n onMounted(() => {\n carouselContext.addItem({\n props,\n states: reactive({\n hover,\n translate,\n scale,\n active,\n ready,\n inStage,\n animating,\n }),\n uid: instance.uid,\n translateItem,\n })\n })\n\n onUnmounted(() => {\n carouselContext.removeItem(instance.uid)\n })\n\n return {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n }\n}\n"],"names":["inject","carouselContextKey","getCurrentInstance","debugWarn","ref","unref","isUndefined","onMounted","reactive","onUnmounted"],"mappings":";;;;;;;;;;AAWY,MAAC,eAAe,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK;AACzD,EAAE,MAAM,eAAe,GAAGA,UAAM,CAACC,4BAAkB,CAAC,CAAC;AACrD,EAAE,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AACxC,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB,IAAIC,eAAS,CAAC,aAAa,EAAE,uDAAuD,CAAC,CAAC;AACtF,GAAG;AACH,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,IAAIA,eAAS,CAAC,aAAa,EAAE,sDAAsD,CAAC,CAAC;AACrF,GAAG;AACH,EAAE,MAAM,eAAe,GAAGC,OAAG,EAAE,CAAC;AAChC,EAAE,MAAM,KAAK,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC3B,EAAE,MAAM,SAAS,GAAGA,OAAG,CAAC,CAAC,CAAC,CAAC;AAC3B,EAAE,MAAM,KAAK,GAAGA,OAAG,CAAC,CAAC,CAAC,CAAC;AACvB,EAAE,MAAM,MAAM,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC5B,EAAE,MAAM,KAAK,GAAGA,OAAG,CAAC,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J,EAAE,SAAS,eAAe,GAAG;AAC7B,IAAI,IAAI,eAAe,IAAIA,SAAK,CAAC,UAAU,CAAC,EAAE;AAC9C,MAAM,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC7F,MAAM,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL,GAAG;AACH,EAAEE,aAAS,CAAC,MAAM;AAClB,IAAI,eAAe,CAAC,OAAO,CAAC;AAC5B,MAAM,KAAK;AACX,MAAM,MAAM,EAAEC,YAAQ,CAAC;AACvB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,OAAO;AACf,QAAQ,SAAS;AACjB,OAAO,CAAC;AACR,MAAM,GAAG,EAAE,QAAQ,CAAC,GAAG;AACvB,MAAM,aAAa;AACnB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC;AACL,EAAEC,eAAW,CAAC,MAAM;AACpB,IAAI,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC7C,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,eAAe;AACnB,IAAI,MAAM;AACV,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,KAAK;AACT,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-carousel.js","sources":["../../../../../../packages/components/carousel/src/use-carousel.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext<CarouselEmits>['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren<CarouselItemContext>(\n getCurrentInstance()!,\n 'ElCarouselItem'\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref<ReturnType<typeof setInterval> | null>(null)\n const hover = ref(false)\n const root = ref<HTMLDivElement>()\n const containerHeight = ref<number>(0)\n const isItemsTwoLength = ref(true)\n const isFirstCall = ref(true)\n const isTransitioning = ref(false)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n isFirstCall.value = false\n\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n } else {\n isTransitioning.value = false\n }\n }\n\n function setActiveItem(index: number | string) {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n isFirstCall.value = false\n\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleTransitionEnd() {\n isTransitioning.value = false\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n if (index !== activeIndex.value) {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n }\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const carouselItemsName = 'ElCarouselItem'\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === carouselItemsName\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit('change', current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef<ReturnType<typeof useResizeObserver>>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n isTransitioning,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleTransitionEnd,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n"],"names":["useOrderedChildren","getCurrentInstance","useSlots","ref","computed","unref","throttle","isString","debugWarn","flattedChildren","isVNode","watch","shallowRef","onMounted","useResizeObserver","onBeforeUnmount","provide","carouselContextKey"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,aAAa,GAAG,GAAG,CAAC;AACd,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC3D,EAAE,MAAM;AACR,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,QAAQ,EAAE,OAAO;AACrB,IAAI,WAAW,EAAE,UAAU;AAC3B,GAAG,GAAGA,wBAAkB,CAACC,sBAAkB,EAAE,EAAE,gBAAgB,CAAC,CAAC;AACjE,EAAE,MAAM,KAAK,GAAGC,YAAQ,EAAE,CAAC;AAC3B,EAAE,MAAM,WAAW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AACpB,IAAI,iBAAiB;AACrB,IAAI,mBAAmB;AACvB,IAAI,iBAAiB;AACrB,IAAI,oBAAoB;AACxB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,mBAAmB;AACvB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-carousel.js","sources":["../../../../../../packages/components/carousel/src/use-carousel.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext<CarouselEmits>['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren<CarouselItemContext>(\n getCurrentInstance()!,\n 'ElCarouselItem'\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref<ReturnType<typeof setInterval> | null>(null)\n const hover = ref(false)\n const root = ref<HTMLDivElement>()\n const containerHeight = ref<number>(0)\n const isItemsTwoLength = ref(true)\n const isFirstCall = ref(true)\n const isTransitioning = ref(false)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n isFirstCall.value = false\n\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n } else {\n isTransitioning.value = false\n }\n }\n\n function setActiveItem(index: number | string) {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n isFirstCall.value = false\n\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleTransitionEnd() {\n isTransitioning.value = false\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n if (index !== activeIndex.value) {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n }\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const carouselItemsName = 'ElCarouselItem'\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === carouselItemsName\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit('change', current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef<ReturnType<typeof useResizeObserver>>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n cardScale: props.cardScale,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n isTransitioning,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleTransitionEnd,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n"],"names":["useOrderedChildren","getCurrentInstance","useSlots","ref","computed","unref","throttle","isString","debugWarn","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