@element-plus/nightly 0.0.20250708 → 0.0.20250709
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/dist/index.full.js +5 -2
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +7 -7
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +5 -2
- 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/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.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/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +24 -129
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +129 -24
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +58 -366
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +366 -58
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +29 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -29
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +134 -16
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +16 -134
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +652 -81
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +81 -652
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +119 -59
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +59 -119
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +79 -21
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +21 -79
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +108 -299
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +299 -108
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +65 -226
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +226 -65
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +46 -447
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +447 -46
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +21 -21
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +35 -18
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +18 -35
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +210 -16
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +16 -210
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +17 -35
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +35 -17
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +4 -4
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +112 -66
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +66 -112
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +22 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -22
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +5 -65
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +65 -5
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select/src/select2.mjs +4 -1
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/slider/src/button.mjs +19 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/splitter/index.mjs +2 -2
- package/es/components/splitter/src/split-panel.mjs +17 -152
- package/es/components/splitter/src/split-panel.mjs.map +1 -1
- package/es/components/splitter/src/split-panel2.mjs +152 -17
- package/es/components/splitter/src/split-panel2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +35 -41
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +41 -35
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +13 -82
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +82 -13
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +99 -27
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +27 -99
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +51 -132
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +132 -51
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +72 -33
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +33 -72
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +17 -79
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +79 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +220 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -220
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +21 -21
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +25 -129
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +129 -25
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +57 -364
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +364 -57
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +29 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -29
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +134 -17
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +17 -134
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +652 -82
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +82 -652
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox.js +119 -60
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +60 -119
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +79 -22
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +22 -79
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +117 -299
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +299 -117
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +65 -225
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +225 -65
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +47 -447
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +447 -47
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +21 -21
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +35 -18
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +18 -35
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +210 -16
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +16 -210
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +18 -35
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +35 -18
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +4 -4
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +112 -67
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +67 -112
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +25 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -25
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +5 -65
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +65 -5
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select2.js +3 -0
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/slider/src/button.js +20 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/splitter/index.js +2 -2
- package/lib/components/splitter/src/split-panel.js +17 -152
- package/lib/components/splitter/src/split-panel.js.map +1 -1
- package/lib/components/splitter/src/split-panel2.js +152 -17
- package/lib/components/splitter/src/split-panel2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +36 -41
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +41 -36
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +13 -82
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +82 -13
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +99 -28
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +28 -99
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +51 -137
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +137 -51
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +72 -33
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +33 -72
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +17 -79
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +79 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +220 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -220
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +21 -21
- 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/web-types.json +1 -1
@@ -1,30 +1,135 @@
|
|
1
|
+
import { defineComponent, shallowRef, ref, computed, watch, onMounted, watchEffect, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot, nextTick } from 'vue';
|
2
|
+
import { useWindowSize, useElementBounding, useEventListener } from '@vueuse/core';
|
3
|
+
import { affixProps, affixEmits } from './affix.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
+
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
7
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
1
8
|
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
2
|
-
import {
|
3
|
-
import { isNumber, isBoolean } from '../../../utils/types.mjs';
|
9
|
+
import { throwError } from '../../../utils/error.mjs';
|
4
10
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
const COMPONENT_NAME = "ElAffix";
|
12
|
+
const __default__ = defineComponent({
|
13
|
+
name: COMPONENT_NAME
|
14
|
+
});
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
16
|
+
...__default__,
|
17
|
+
props: affixProps,
|
18
|
+
emits: affixEmits,
|
19
|
+
setup(__props, { expose, emit }) {
|
20
|
+
const props = __props;
|
21
|
+
const ns = useNamespace("affix");
|
22
|
+
const target = shallowRef();
|
23
|
+
const root = shallowRef();
|
24
|
+
const scrollContainer = shallowRef();
|
25
|
+
const { height: windowHeight } = useWindowSize();
|
26
|
+
const {
|
27
|
+
height: rootHeight,
|
28
|
+
width: rootWidth,
|
29
|
+
top: rootTop,
|
30
|
+
bottom: rootBottom,
|
31
|
+
update: updateRoot
|
32
|
+
} = useElementBounding(root, { windowScroll: false });
|
33
|
+
const targetRect = useElementBounding(target);
|
34
|
+
const fixed = ref(false);
|
35
|
+
const scrollTop = ref(0);
|
36
|
+
const transform = ref(0);
|
37
|
+
const rootStyle = computed(() => {
|
38
|
+
return {
|
39
|
+
height: fixed.value ? `${rootHeight.value}px` : "",
|
40
|
+
width: fixed.value ? `${rootWidth.value}px` : ""
|
41
|
+
};
|
42
|
+
});
|
43
|
+
const affixStyle = computed(() => {
|
44
|
+
if (!fixed.value)
|
45
|
+
return {};
|
46
|
+
const offset = props.offset ? addUnit(props.offset) : 0;
|
47
|
+
return {
|
48
|
+
height: `${rootHeight.value}px`,
|
49
|
+
width: `${rootWidth.value}px`,
|
50
|
+
top: props.position === "top" ? offset : "",
|
51
|
+
bottom: props.position === "bottom" ? offset : "",
|
52
|
+
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
53
|
+
zIndex: props.zIndex
|
54
|
+
};
|
55
|
+
});
|
56
|
+
const update = () => {
|
57
|
+
if (!scrollContainer.value)
|
58
|
+
return;
|
59
|
+
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
60
|
+
const { position, target: target2, offset } = props;
|
61
|
+
const rootHeightOffset = offset + rootHeight.value;
|
62
|
+
if (position === "top") {
|
63
|
+
if (target2) {
|
64
|
+
const difference = targetRect.bottom.value - rootHeightOffset;
|
65
|
+
fixed.value = offset > rootTop.value && targetRect.bottom.value > 0;
|
66
|
+
transform.value = difference < 0 ? difference : 0;
|
67
|
+
} else {
|
68
|
+
fixed.value = offset > rootTop.value;
|
69
|
+
}
|
70
|
+
} else if (target2) {
|
71
|
+
const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
|
72
|
+
fixed.value = windowHeight.value - offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
73
|
+
transform.value = difference < 0 ? -difference : 0;
|
74
|
+
} else {
|
75
|
+
fixed.value = windowHeight.value - offset < rootBottom.value;
|
76
|
+
}
|
77
|
+
};
|
78
|
+
const updateRootRect = async () => {
|
79
|
+
if (!fixed.value) {
|
80
|
+
updateRoot();
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
fixed.value = false;
|
84
|
+
await nextTick();
|
85
|
+
updateRoot();
|
86
|
+
fixed.value = true;
|
87
|
+
};
|
88
|
+
const handleScroll = async () => {
|
89
|
+
updateRoot();
|
90
|
+
await nextTick();
|
91
|
+
emit("scroll", {
|
92
|
+
scrollTop: scrollTop.value,
|
93
|
+
fixed: fixed.value
|
94
|
+
});
|
95
|
+
};
|
96
|
+
watch(fixed, (val) => emit(CHANGE_EVENT, val));
|
97
|
+
onMounted(() => {
|
98
|
+
var _a;
|
99
|
+
if (props.target) {
|
100
|
+
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
101
|
+
if (!target.value)
|
102
|
+
throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`);
|
103
|
+
} else {
|
104
|
+
target.value = document.documentElement;
|
105
|
+
}
|
106
|
+
scrollContainer.value = getScrollContainer(root.value, true);
|
107
|
+
updateRoot();
|
108
|
+
});
|
109
|
+
useEventListener(scrollContainer, "scroll", handleScroll);
|
110
|
+
watchEffect(update);
|
111
|
+
expose({
|
112
|
+
update,
|
113
|
+
updateRoot: updateRootRect
|
114
|
+
});
|
115
|
+
return (_ctx, _cache) => {
|
116
|
+
return openBlock(), createElementBlock("div", {
|
117
|
+
ref_key: "root",
|
118
|
+
ref: root,
|
119
|
+
class: normalizeClass(unref(ns).b()),
|
120
|
+
style: normalizeStyle(unref(rootStyle))
|
121
|
+
}, [
|
122
|
+
createElementVNode("div", {
|
123
|
+
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
124
|
+
style: normalizeStyle(unref(affixStyle))
|
125
|
+
}, [
|
126
|
+
renderSlot(_ctx.$slots, "default")
|
127
|
+
], 6)
|
128
|
+
], 6);
|
129
|
+
};
|
22
130
|
}
|
23
131
|
});
|
24
|
-
|
25
|
-
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
|
26
|
-
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
|
27
|
-
};
|
132
|
+
var Affix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "affix.vue"]]);
|
28
133
|
|
29
|
-
export {
|
134
|
+
export { Affix as default };
|
30
135
|
//# sourceMappingURL=affix2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
1
|
+
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n shallowRef,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { affixEmits, affixProps } from './affix'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? addUnit(props.offset) : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n const { position, target, offset } = props\n const rootHeightOffset = offset + rootHeight.value\n\n if (position === 'top') {\n if (target) {\n const difference = targetRect.bottom.value - rootHeightOffset\n fixed.value = offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = offset > rootTop.value\n }\n } else if (target) {\n const difference =\n windowHeight.value - targetRect.top.value - rootHeightOffset\n fixed.value =\n windowHeight.value - offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - offset < rootBottom.value\n }\n}\n\nconst updateRootRect = async () => {\n if (!fixed.value) {\n updateRoot()\n return\n }\n\n fixed.value = false\n await nextTick()\n updateRoot()\n fixed.value = true\n}\n\nconst handleScroll = async () => {\n updateRoot()\n await nextTick()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit(CHANGE_EVENT, val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot: updateRootRect,\n})\n</script>\n"],"names":["target"],"mappings":"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"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Autocomplete from './src/
|
2
|
-
export { autocompleteEmits, autocompleteProps } from './src/
|
1
|
+
import Autocomplete from './src/autocomplete2.mjs';
|
2
|
+
export { autocompleteEmits, autocompleteProps } from './src/autocomplete.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElAutocomplete = withInstall(Autocomplete);
|
@@ -1,371 +1,63 @@
|
|
1
|
-
import { defineComponent, computed, useAttrs, ref, onBeforeUnmount, onMounted, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, normalizeStyle, createVNode, createElementBlock, renderSlot, Fragment, renderList, createTextVNode, toDisplayString, mergeProps, withKeys, withModifiers, createSlots } from 'vue';
|
2
|
-
import { pick, debounce } from 'lodash-unified';
|
3
|
-
import { onClickOutside } from '@vueuse/core';
|
4
|
-
import { Loading } from '@element-plus/icons-vue';
|
5
|
-
import { ElInput } from '../../input/index.mjs';
|
6
|
-
import { ElScrollbar } from '../../scrollbar/index.mjs';
|
7
|
-
import { ElTooltip } from '../../tooltip/index.mjs';
|
8
|
-
import { ElIcon } from '../../icon/index.mjs';
|
9
|
-
import { autocompleteProps, autocompleteEmits } from './autocomplete2.mjs';
|
10
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
11
1
|
import { inputProps } from '../../input/src/input.mjs';
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
import { INPUT_EVENT, UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
17
|
-
import { throwError } from '../../../utils/error.mjs';
|
2
|
+
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
4
|
+
import { NOOP, isString, isObject } from '@vue/shared';
|
5
|
+
import { UPDATE_MODEL_EVENT, INPUT_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
18
6
|
|
19
|
-
const
|
20
|
-
|
21
|
-
|
22
|
-
|
7
|
+
const autocompleteProps = buildProps({
|
8
|
+
...inputProps,
|
9
|
+
valueKey: {
|
10
|
+
type: String,
|
11
|
+
default: "value"
|
12
|
+
},
|
13
|
+
modelValue: {
|
14
|
+
type: [String, Number],
|
15
|
+
default: ""
|
16
|
+
},
|
17
|
+
debounce: {
|
18
|
+
type: Number,
|
19
|
+
default: 300
|
20
|
+
},
|
21
|
+
placement: {
|
22
|
+
type: definePropType(String),
|
23
|
+
values: [
|
24
|
+
"top",
|
25
|
+
"top-start",
|
26
|
+
"top-end",
|
27
|
+
"bottom",
|
28
|
+
"bottom-start",
|
29
|
+
"bottom-end"
|
30
|
+
],
|
31
|
+
default: "bottom-start"
|
32
|
+
},
|
33
|
+
fetchSuggestions: {
|
34
|
+
type: definePropType([Function, Array]),
|
35
|
+
default: NOOP
|
36
|
+
},
|
37
|
+
popperClass: {
|
38
|
+
type: String,
|
39
|
+
default: ""
|
40
|
+
},
|
41
|
+
triggerOnFocus: {
|
42
|
+
type: Boolean,
|
43
|
+
default: true
|
44
|
+
},
|
45
|
+
selectWhenUnmatched: Boolean,
|
46
|
+
hideLoading: Boolean,
|
47
|
+
teleported: useTooltipContentProps.teleported,
|
48
|
+
appendTo: useTooltipContentProps.appendTo,
|
49
|
+
highlightFirstItem: Boolean,
|
50
|
+
fitInputWidth: Boolean
|
23
51
|
});
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
const ns = useNamespace("autocomplete");
|
34
|
-
const inputRef = ref();
|
35
|
-
const regionRef = ref();
|
36
|
-
const popperRef = ref();
|
37
|
-
const listboxRef = ref();
|
38
|
-
let readonly = false;
|
39
|
-
let ignoreFocusEvent = false;
|
40
|
-
const suggestions = ref([]);
|
41
|
-
const highlightedIndex = ref(-1);
|
42
|
-
const dropdownWidth = ref("");
|
43
|
-
const activated = ref(false);
|
44
|
-
const suggestionDisabled = ref(false);
|
45
|
-
const loading = ref(false);
|
46
|
-
const listboxId = useId();
|
47
|
-
const styles = computed(() => rawAttrs.style);
|
48
|
-
const suggestionVisible = computed(() => {
|
49
|
-
const isValidData = suggestions.value.length > 0;
|
50
|
-
return (isValidData || loading.value) && activated.value;
|
51
|
-
});
|
52
|
-
const suggestionLoading = computed(() => !props.hideLoading && loading.value);
|
53
|
-
const refInput = computed(() => {
|
54
|
-
if (inputRef.value) {
|
55
|
-
return Array.from(inputRef.value.$el.querySelectorAll("input"));
|
56
|
-
}
|
57
|
-
return [];
|
58
|
-
});
|
59
|
-
const onSuggestionShow = () => {
|
60
|
-
if (suggestionVisible.value) {
|
61
|
-
dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
|
62
|
-
}
|
63
|
-
};
|
64
|
-
const onHide = () => {
|
65
|
-
highlightedIndex.value = -1;
|
66
|
-
};
|
67
|
-
const getData = async (queryString) => {
|
68
|
-
if (suggestionDisabled.value)
|
69
|
-
return;
|
70
|
-
const cb = (suggestionList) => {
|
71
|
-
loading.value = false;
|
72
|
-
if (suggestionDisabled.value)
|
73
|
-
return;
|
74
|
-
if (isArray(suggestionList)) {
|
75
|
-
suggestions.value = suggestionList;
|
76
|
-
highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
|
77
|
-
} else {
|
78
|
-
throwError(COMPONENT_NAME, "autocomplete suggestions must be an array");
|
79
|
-
}
|
80
|
-
};
|
81
|
-
loading.value = true;
|
82
|
-
if (isArray(props.fetchSuggestions)) {
|
83
|
-
cb(props.fetchSuggestions);
|
84
|
-
} else {
|
85
|
-
const result = await props.fetchSuggestions(queryString, cb);
|
86
|
-
if (isArray(result))
|
87
|
-
cb(result);
|
88
|
-
}
|
89
|
-
};
|
90
|
-
const debouncedGetData = debounce(getData, props.debounce);
|
91
|
-
const handleInput = (value) => {
|
92
|
-
const valuePresented = !!value;
|
93
|
-
emit(INPUT_EVENT, value);
|
94
|
-
emit(UPDATE_MODEL_EVENT, value);
|
95
|
-
suggestionDisabled.value = false;
|
96
|
-
activated.value || (activated.value = valuePresented);
|
97
|
-
if (!props.triggerOnFocus && !value) {
|
98
|
-
suggestionDisabled.value = true;
|
99
|
-
suggestions.value = [];
|
100
|
-
return;
|
101
|
-
}
|
102
|
-
debouncedGetData(value);
|
103
|
-
};
|
104
|
-
const handleMouseDown = (event) => {
|
105
|
-
var _a;
|
106
|
-
if (disabled.value)
|
107
|
-
return;
|
108
|
-
if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
|
109
|
-
activated.value = true;
|
110
|
-
}
|
111
|
-
};
|
112
|
-
const handleChange = (value) => {
|
113
|
-
emit(CHANGE_EVENT, value);
|
114
|
-
};
|
115
|
-
const handleFocus = (evt) => {
|
116
|
-
var _a;
|
117
|
-
if (!ignoreFocusEvent) {
|
118
|
-
activated.value = true;
|
119
|
-
emit("focus", evt);
|
120
|
-
const queryString = (_a = props.modelValue) != null ? _a : "";
|
121
|
-
if (props.triggerOnFocus && !readonly) {
|
122
|
-
debouncedGetData(String(queryString));
|
123
|
-
}
|
124
|
-
} else {
|
125
|
-
ignoreFocusEvent = false;
|
126
|
-
}
|
127
|
-
};
|
128
|
-
const handleBlur = (evt) => {
|
129
|
-
setTimeout(() => {
|
130
|
-
var _a;
|
131
|
-
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent()) {
|
132
|
-
ignoreFocusEvent = true;
|
133
|
-
return;
|
134
|
-
}
|
135
|
-
activated.value && close();
|
136
|
-
emit("blur", evt);
|
137
|
-
});
|
138
|
-
};
|
139
|
-
const handleClear = () => {
|
140
|
-
activated.value = false;
|
141
|
-
emit(UPDATE_MODEL_EVENT, "");
|
142
|
-
emit("clear");
|
143
|
-
};
|
144
|
-
const handleKeyEnter = async () => {
|
145
|
-
if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) {
|
146
|
-
handleSelect(suggestions.value[highlightedIndex.value]);
|
147
|
-
} else if (props.selectWhenUnmatched) {
|
148
|
-
emit("select", { value: props.modelValue });
|
149
|
-
suggestions.value = [];
|
150
|
-
highlightedIndex.value = -1;
|
151
|
-
}
|
152
|
-
};
|
153
|
-
const handleKeyEscape = (evt) => {
|
154
|
-
if (suggestionVisible.value) {
|
155
|
-
evt.preventDefault();
|
156
|
-
evt.stopPropagation();
|
157
|
-
close();
|
158
|
-
}
|
159
|
-
};
|
160
|
-
const close = () => {
|
161
|
-
activated.value = false;
|
162
|
-
};
|
163
|
-
const focus = () => {
|
164
|
-
var _a;
|
165
|
-
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
166
|
-
};
|
167
|
-
const blur = () => {
|
168
|
-
var _a;
|
169
|
-
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
170
|
-
};
|
171
|
-
const handleSelect = async (item) => {
|
172
|
-
emit(INPUT_EVENT, item[props.valueKey]);
|
173
|
-
emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
|
174
|
-
emit("select", item);
|
175
|
-
suggestions.value = [];
|
176
|
-
highlightedIndex.value = -1;
|
177
|
-
};
|
178
|
-
const highlight = (index) => {
|
179
|
-
if (!suggestionVisible.value || loading.value)
|
180
|
-
return;
|
181
|
-
if (index < 0) {
|
182
|
-
highlightedIndex.value = -1;
|
183
|
-
return;
|
184
|
-
}
|
185
|
-
if (index >= suggestions.value.length) {
|
186
|
-
index = suggestions.value.length - 1;
|
187
|
-
}
|
188
|
-
const suggestion = regionRef.value.querySelector(`.${ns.be("suggestion", "wrap")}`);
|
189
|
-
const suggestionList = suggestion.querySelectorAll(`.${ns.be("suggestion", "list")} li`);
|
190
|
-
const highlightItem = suggestionList[index];
|
191
|
-
const scrollTop = suggestion.scrollTop;
|
192
|
-
const { offsetTop, scrollHeight } = highlightItem;
|
193
|
-
if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) {
|
194
|
-
suggestion.scrollTop += scrollHeight;
|
195
|
-
}
|
196
|
-
if (offsetTop < scrollTop) {
|
197
|
-
suggestion.scrollTop -= scrollHeight;
|
198
|
-
}
|
199
|
-
highlightedIndex.value = index;
|
200
|
-
inputRef.value.ref.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
|
201
|
-
};
|
202
|
-
const stopHandle = onClickOutside(listboxRef, () => {
|
203
|
-
var _a;
|
204
|
-
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent())
|
205
|
-
return;
|
206
|
-
suggestionVisible.value && close();
|
207
|
-
});
|
208
|
-
onBeforeUnmount(() => {
|
209
|
-
stopHandle == null ? void 0 : stopHandle();
|
210
|
-
});
|
211
|
-
onMounted(() => {
|
212
|
-
inputRef.value.ref.setAttribute("role", "textbox");
|
213
|
-
inputRef.value.ref.setAttribute("aria-autocomplete", "list");
|
214
|
-
inputRef.value.ref.setAttribute("aria-controls", "id");
|
215
|
-
inputRef.value.ref.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
|
216
|
-
readonly = inputRef.value.ref.hasAttribute("readonly");
|
217
|
-
});
|
218
|
-
expose({
|
219
|
-
highlightedIndex,
|
220
|
-
activated,
|
221
|
-
loading,
|
222
|
-
inputRef,
|
223
|
-
popperRef,
|
224
|
-
suggestions,
|
225
|
-
handleSelect,
|
226
|
-
handleKeyEnter,
|
227
|
-
focus,
|
228
|
-
blur,
|
229
|
-
close,
|
230
|
-
highlight,
|
231
|
-
getData
|
232
|
-
});
|
233
|
-
return (_ctx, _cache) => {
|
234
|
-
return openBlock(), createBlock(unref(ElTooltip), {
|
235
|
-
ref_key: "popperRef",
|
236
|
-
ref: popperRef,
|
237
|
-
visible: unref(suggestionVisible),
|
238
|
-
placement: _ctx.placement,
|
239
|
-
"fallback-placements": ["bottom-start", "top-start"],
|
240
|
-
"popper-class": [unref(ns).e("popper"), _ctx.popperClass],
|
241
|
-
teleported: _ctx.teleported,
|
242
|
-
"append-to": _ctx.appendTo,
|
243
|
-
"gpu-acceleration": false,
|
244
|
-
pure: "",
|
245
|
-
"manual-mode": "",
|
246
|
-
effect: "light",
|
247
|
-
trigger: "click",
|
248
|
-
transition: `${unref(ns).namespace.value}-zoom-in-top`,
|
249
|
-
persistent: "",
|
250
|
-
role: "listbox",
|
251
|
-
onBeforeShow: onSuggestionShow,
|
252
|
-
onHide
|
253
|
-
}, {
|
254
|
-
content: withCtx(() => [
|
255
|
-
createElementVNode("div", {
|
256
|
-
ref_key: "regionRef",
|
257
|
-
ref: regionRef,
|
258
|
-
class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", unref(suggestionLoading))]),
|
259
|
-
style: normalizeStyle({
|
260
|
-
[_ctx.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
|
261
|
-
outline: "none"
|
262
|
-
}),
|
263
|
-
role: "region"
|
264
|
-
}, [
|
265
|
-
createVNode(unref(ElScrollbar), {
|
266
|
-
id: unref(listboxId),
|
267
|
-
tag: "ul",
|
268
|
-
"wrap-class": unref(ns).be("suggestion", "wrap"),
|
269
|
-
"view-class": unref(ns).be("suggestion", "list"),
|
270
|
-
role: "listbox"
|
271
|
-
}, {
|
272
|
-
default: withCtx(() => [
|
273
|
-
unref(suggestionLoading) ? (openBlock(), createElementBlock("li", { key: 0 }, [
|
274
|
-
renderSlot(_ctx.$slots, "loading", {}, () => [
|
275
|
-
createVNode(unref(ElIcon), {
|
276
|
-
class: normalizeClass(unref(ns).is("loading"))
|
277
|
-
}, {
|
278
|
-
default: withCtx(() => [
|
279
|
-
createVNode(unref(Loading))
|
280
|
-
]),
|
281
|
-
_: 1
|
282
|
-
}, 8, ["class"])
|
283
|
-
])
|
284
|
-
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
|
285
|
-
return openBlock(), createElementBlock("li", {
|
286
|
-
id: `${unref(listboxId)}-item-${index}`,
|
287
|
-
key: index,
|
288
|
-
class: normalizeClass({ highlighted: highlightedIndex.value === index }),
|
289
|
-
role: "option",
|
290
|
-
"aria-selected": highlightedIndex.value === index,
|
291
|
-
onClick: ($event) => handleSelect(item)
|
292
|
-
}, [
|
293
|
-
renderSlot(_ctx.$slots, "default", { item }, () => [
|
294
|
-
createTextVNode(toDisplayString(item[_ctx.valueKey]), 1)
|
295
|
-
])
|
296
|
-
], 10, ["id", "aria-selected", "onClick"]);
|
297
|
-
}), 128))
|
298
|
-
]),
|
299
|
-
_: 3
|
300
|
-
}, 8, ["id", "wrap-class", "view-class"])
|
301
|
-
], 6)
|
302
|
-
]),
|
303
|
-
default: withCtx(() => [
|
304
|
-
createElementVNode("div", {
|
305
|
-
ref_key: "listboxRef",
|
306
|
-
ref: listboxRef,
|
307
|
-
class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]),
|
308
|
-
style: normalizeStyle(unref(styles)),
|
309
|
-
role: "combobox",
|
310
|
-
"aria-haspopup": "listbox",
|
311
|
-
"aria-expanded": unref(suggestionVisible),
|
312
|
-
"aria-owns": unref(listboxId)
|
313
|
-
}, [
|
314
|
-
createVNode(unref(ElInput), mergeProps({
|
315
|
-
ref_key: "inputRef",
|
316
|
-
ref: inputRef
|
317
|
-
}, mergeProps(unref(passInputProps), _ctx.$attrs), {
|
318
|
-
"model-value": _ctx.modelValue,
|
319
|
-
disabled: unref(disabled),
|
320
|
-
onInput: handleInput,
|
321
|
-
onChange: handleChange,
|
322
|
-
onFocus: handleFocus,
|
323
|
-
onBlur: handleBlur,
|
324
|
-
onClear: handleClear,
|
325
|
-
onKeydown: [
|
326
|
-
withKeys(withModifiers(($event) => highlight(highlightedIndex.value - 1), ["prevent"]), ["up"]),
|
327
|
-
withKeys(withModifiers(($event) => highlight(highlightedIndex.value + 1), ["prevent"]), ["down"]),
|
328
|
-
withKeys(handleKeyEnter, ["enter"]),
|
329
|
-
withKeys(close, ["tab"]),
|
330
|
-
withKeys(handleKeyEscape, ["esc"])
|
331
|
-
],
|
332
|
-
onMousedown: handleMouseDown
|
333
|
-
}), createSlots({
|
334
|
-
_: 2
|
335
|
-
}, [
|
336
|
-
_ctx.$slots.prepend ? {
|
337
|
-
name: "prepend",
|
338
|
-
fn: withCtx(() => [
|
339
|
-
renderSlot(_ctx.$slots, "prepend")
|
340
|
-
])
|
341
|
-
} : void 0,
|
342
|
-
_ctx.$slots.append ? {
|
343
|
-
name: "append",
|
344
|
-
fn: withCtx(() => [
|
345
|
-
renderSlot(_ctx.$slots, "append")
|
346
|
-
])
|
347
|
-
} : void 0,
|
348
|
-
_ctx.$slots.prefix ? {
|
349
|
-
name: "prefix",
|
350
|
-
fn: withCtx(() => [
|
351
|
-
renderSlot(_ctx.$slots, "prefix")
|
352
|
-
])
|
353
|
-
} : void 0,
|
354
|
-
_ctx.$slots.suffix ? {
|
355
|
-
name: "suffix",
|
356
|
-
fn: withCtx(() => [
|
357
|
-
renderSlot(_ctx.$slots, "suffix")
|
358
|
-
])
|
359
|
-
} : void 0
|
360
|
-
]), 1040, ["model-value", "disabled", "onKeydown"])
|
361
|
-
], 14, ["aria-expanded", "aria-owns"])
|
362
|
-
]),
|
363
|
-
_: 3
|
364
|
-
}, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]);
|
365
|
-
};
|
366
|
-
}
|
367
|
-
});
|
368
|
-
var Autocomplete = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "autocomplete.vue"]]);
|
52
|
+
const autocompleteEmits = {
|
53
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
54
|
+
[INPUT_EVENT]: (value) => isString(value),
|
55
|
+
[CHANGE_EVENT]: (value) => isString(value),
|
56
|
+
focus: (evt) => evt instanceof FocusEvent,
|
57
|
+
blur: (evt) => evt instanceof FocusEvent,
|
58
|
+
clear: () => true,
|
59
|
+
select: (item) => isObject(item)
|
60
|
+
};
|
369
61
|
|
370
|
-
export {
|
62
|
+
export { autocompleteEmits, autocompleteProps };
|
371
63
|
//# sourceMappingURL=autocomplete.mjs.map
|