@element-plus/nightly 0.0.20250314 → 0.0.20250315
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 +34 -31
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +34 -31
- 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/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/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +42 -20
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +20 -42
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +38 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -38
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +90 -18
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +18 -90
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +401 -39
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +39 -401
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/descriptions/src/constants.d.ts +1 -0
- package/es/components/descriptions/src/constants.mjs +4 -0
- package/es/components/descriptions/src/constants.mjs.map +1 -0
- package/es/components/descriptions/src/description-item.mjs +2 -1
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +2 -1
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +29 -87
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +87 -29
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +35 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -35
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +49 -446
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +446 -49
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +19 -19
- package/es/components/input/src/input2.mjs +3 -2
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/message-box/src/message-box.type.d.ts +2 -0
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +142 -68
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +68 -142
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- 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/pagination.mjs +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +64 -10
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +10 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/button.mjs +91 -19
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +19 -91
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider.mjs +238 -92
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +92 -238
- package/es/components/slider/src/slider2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +19 -190
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +190 -19
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +228 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -228
- package/es/components/switch/src/switch2.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/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +72 -14
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +14 -72
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.mjs +43 -67
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +67 -43
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +125 -97
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +97 -125
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +210 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -210
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +19 -19
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +42 -20
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +20 -42
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +38 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -38
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +90 -18
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +18 -90
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +400 -40
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +40 -400
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/descriptions/src/constants.d.ts +1 -0
- package/lib/components/descriptions/src/constants.js +8 -0
- package/lib/components/descriptions/src/constants.js.map +1 -0
- package/lib/components/descriptions/src/description-item.js +2 -1
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +2 -1
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +29 -86
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +86 -29
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +35 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -35
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +50 -446
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +446 -50
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +19 -19
- package/lib/components/input/src/input2.js +3 -2
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/message-box/src/message-box.type.d.ts +2 -0
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +141 -69
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +69 -141
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- 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/pagination.js +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/scrollbar/src/bar.js +64 -10
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +10 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +17 -22
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +22 -17
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/button.js +91 -20
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +20 -91
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider.js +238 -93
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +93 -238
- package/lib/components/slider/src/slider2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +19 -190
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +190 -19
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +227 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -227
- package/lib/components/switch/src/switch2.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/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +72 -14
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +14 -72
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.js +46 -67
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +67 -46
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +125 -100
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +100 -125
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +210 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -210
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +19 -19
- 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,214 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DArrowLeft, MoreFilled, DArrowRight } from '@element-plus/icons-vue';
|
|
3
|
-
import { paginationPagerProps } from './pager.mjs';
|
|
4
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { CHANGE_EVENT } from '../../../../constants/event.mjs';
|
|
6
|
-
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
|
1
|
+
import { buildProps } from '../../../../utils/vue/props/runtime.mjs';
|
|
8
2
|
|
|
9
|
-
const
|
|
10
|
-
|
|
3
|
+
const paginationPagerProps = buildProps({
|
|
4
|
+
currentPage: {
|
|
5
|
+
type: Number,
|
|
6
|
+
default: 1
|
|
7
|
+
},
|
|
8
|
+
pageCount: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
pagerCount: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 7
|
|
15
|
+
},
|
|
16
|
+
disabled: Boolean
|
|
11
17
|
});
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
-
...__default__,
|
|
14
|
-
props: paginationPagerProps,
|
|
15
|
-
emits: [CHANGE_EVENT],
|
|
16
|
-
setup(__props, { emit }) {
|
|
17
|
-
const props = __props;
|
|
18
|
-
const nsPager = useNamespace("pager");
|
|
19
|
-
const nsIcon = useNamespace("icon");
|
|
20
|
-
const { t } = useLocale();
|
|
21
|
-
const showPrevMore = ref(false);
|
|
22
|
-
const showNextMore = ref(false);
|
|
23
|
-
const quickPrevHover = ref(false);
|
|
24
|
-
const quickNextHover = ref(false);
|
|
25
|
-
const quickPrevFocus = ref(false);
|
|
26
|
-
const quickNextFocus = ref(false);
|
|
27
|
-
const pagers = computed(() => {
|
|
28
|
-
const pagerCount = props.pagerCount;
|
|
29
|
-
const halfPagerCount = (pagerCount - 1) / 2;
|
|
30
|
-
const currentPage = Number(props.currentPage);
|
|
31
|
-
const pageCount = Number(props.pageCount);
|
|
32
|
-
let showPrevMore2 = false;
|
|
33
|
-
let showNextMore2 = false;
|
|
34
|
-
if (pageCount > pagerCount) {
|
|
35
|
-
if (currentPage > pagerCount - halfPagerCount) {
|
|
36
|
-
showPrevMore2 = true;
|
|
37
|
-
}
|
|
38
|
-
if (currentPage < pageCount - halfPagerCount) {
|
|
39
|
-
showNextMore2 = true;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
const array = [];
|
|
43
|
-
if (showPrevMore2 && !showNextMore2) {
|
|
44
|
-
const startPage = pageCount - (pagerCount - 2);
|
|
45
|
-
for (let i = startPage; i < pageCount; i++) {
|
|
46
|
-
array.push(i);
|
|
47
|
-
}
|
|
48
|
-
} else if (!showPrevMore2 && showNextMore2) {
|
|
49
|
-
for (let i = 2; i < pagerCount; i++) {
|
|
50
|
-
array.push(i);
|
|
51
|
-
}
|
|
52
|
-
} else if (showPrevMore2 && showNextMore2) {
|
|
53
|
-
const offset = Math.floor(pagerCount / 2) - 1;
|
|
54
|
-
for (let i = currentPage - offset; i <= currentPage + offset; i++) {
|
|
55
|
-
array.push(i);
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
for (let i = 2; i < pageCount; i++) {
|
|
59
|
-
array.push(i);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return array;
|
|
63
|
-
});
|
|
64
|
-
const prevMoreKls = computed(() => [
|
|
65
|
-
"more",
|
|
66
|
-
"btn-quickprev",
|
|
67
|
-
nsIcon.b(),
|
|
68
|
-
nsPager.is("disabled", props.disabled)
|
|
69
|
-
]);
|
|
70
|
-
const nextMoreKls = computed(() => [
|
|
71
|
-
"more",
|
|
72
|
-
"btn-quicknext",
|
|
73
|
-
nsIcon.b(),
|
|
74
|
-
nsPager.is("disabled", props.disabled)
|
|
75
|
-
]);
|
|
76
|
-
const tabindex = computed(() => props.disabled ? -1 : 0);
|
|
77
|
-
watchEffect(() => {
|
|
78
|
-
const halfPagerCount = (props.pagerCount - 1) / 2;
|
|
79
|
-
showPrevMore.value = false;
|
|
80
|
-
showNextMore.value = false;
|
|
81
|
-
if (props.pageCount > props.pagerCount) {
|
|
82
|
-
if (props.currentPage > props.pagerCount - halfPagerCount) {
|
|
83
|
-
showPrevMore.value = true;
|
|
84
|
-
}
|
|
85
|
-
if (props.currentPage < props.pageCount - halfPagerCount) {
|
|
86
|
-
showNextMore.value = true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
function onMouseEnter(forward = false) {
|
|
91
|
-
if (props.disabled)
|
|
92
|
-
return;
|
|
93
|
-
if (forward) {
|
|
94
|
-
quickPrevHover.value = true;
|
|
95
|
-
} else {
|
|
96
|
-
quickNextHover.value = true;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function onFocus(forward = false) {
|
|
100
|
-
if (forward) {
|
|
101
|
-
quickPrevFocus.value = true;
|
|
102
|
-
} else {
|
|
103
|
-
quickNextFocus.value = true;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function onEnter(e) {
|
|
107
|
-
const target = e.target;
|
|
108
|
-
if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
|
|
109
|
-
const newPage = Number(target.textContent);
|
|
110
|
-
if (newPage !== props.currentPage) {
|
|
111
|
-
emit(CHANGE_EVENT, newPage);
|
|
112
|
-
}
|
|
113
|
-
} else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) {
|
|
114
|
-
onPagerClick(e);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
function onPagerClick(event) {
|
|
118
|
-
const target = event.target;
|
|
119
|
-
if (target.tagName.toLowerCase() === "ul" || props.disabled) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
let newPage = Number(target.textContent);
|
|
123
|
-
const pageCount = props.pageCount;
|
|
124
|
-
const currentPage = props.currentPage;
|
|
125
|
-
const pagerCountOffset = props.pagerCount - 2;
|
|
126
|
-
if (target.className.includes("more")) {
|
|
127
|
-
if (target.className.includes("quickprev")) {
|
|
128
|
-
newPage = currentPage - pagerCountOffset;
|
|
129
|
-
} else if (target.className.includes("quicknext")) {
|
|
130
|
-
newPage = currentPage + pagerCountOffset;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (!Number.isNaN(+newPage)) {
|
|
134
|
-
if (newPage < 1) {
|
|
135
|
-
newPage = 1;
|
|
136
|
-
}
|
|
137
|
-
if (newPage > pageCount) {
|
|
138
|
-
newPage = pageCount;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (newPage !== currentPage) {
|
|
142
|
-
emit(CHANGE_EVENT, newPage);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return (_ctx, _cache) => {
|
|
146
|
-
return openBlock(), createElementBlock("ul", {
|
|
147
|
-
class: normalizeClass(unref(nsPager).b()),
|
|
148
|
-
onClick: onPagerClick,
|
|
149
|
-
onKeyup: withKeys(onEnter, ["enter"])
|
|
150
|
-
}, [
|
|
151
|
-
_ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
|
|
152
|
-
key: 0,
|
|
153
|
-
class: normalizeClass([[
|
|
154
|
-
unref(nsPager).is("active", _ctx.currentPage === 1),
|
|
155
|
-
unref(nsPager).is("disabled", _ctx.disabled)
|
|
156
|
-
], "number"]),
|
|
157
|
-
"aria-current": _ctx.currentPage === 1,
|
|
158
|
-
"aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
|
|
159
|
-
tabindex: unref(tabindex)
|
|
160
|
-
}, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true),
|
|
161
|
-
showPrevMore.value ? (openBlock(), createElementBlock("li", {
|
|
162
|
-
key: 1,
|
|
163
|
-
class: normalizeClass(unref(prevMoreKls)),
|
|
164
|
-
tabindex: unref(tabindex),
|
|
165
|
-
"aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
|
|
166
|
-
onMouseenter: ($event) => onMouseEnter(true),
|
|
167
|
-
onMouseleave: ($event) => quickPrevHover.value = false,
|
|
168
|
-
onFocus: ($event) => onFocus(true),
|
|
169
|
-
onBlur: ($event) => quickPrevFocus.value = false
|
|
170
|
-
}, [
|
|
171
|
-
(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(DArrowLeft), { key: 0 })) : (openBlock(), createBlock(unref(MoreFilled), { key: 1 }))
|
|
172
|
-
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
|
|
173
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagers), (pager) => {
|
|
174
|
-
return openBlock(), createElementBlock("li", {
|
|
175
|
-
key: pager,
|
|
176
|
-
class: normalizeClass([[
|
|
177
|
-
unref(nsPager).is("active", _ctx.currentPage === pager),
|
|
178
|
-
unref(nsPager).is("disabled", _ctx.disabled)
|
|
179
|
-
], "number"]),
|
|
180
|
-
"aria-current": _ctx.currentPage === pager,
|
|
181
|
-
"aria-label": unref(t)("el.pagination.currentPage", { pager }),
|
|
182
|
-
tabindex: unref(tabindex)
|
|
183
|
-
}, toDisplayString(pager), 11, ["aria-current", "aria-label", "tabindex"]);
|
|
184
|
-
}), 128)),
|
|
185
|
-
showNextMore.value ? (openBlock(), createElementBlock("li", {
|
|
186
|
-
key: 2,
|
|
187
|
-
class: normalizeClass(unref(nextMoreKls)),
|
|
188
|
-
tabindex: unref(tabindex),
|
|
189
|
-
"aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
|
|
190
|
-
onMouseenter: ($event) => onMouseEnter(),
|
|
191
|
-
onMouseleave: ($event) => quickNextHover.value = false,
|
|
192
|
-
onFocus: ($event) => onFocus(),
|
|
193
|
-
onBlur: ($event) => quickNextFocus.value = false
|
|
194
|
-
}, [
|
|
195
|
-
(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(DArrowRight), { key: 0 })) : (openBlock(), createBlock(unref(MoreFilled), { key: 1 }))
|
|
196
|
-
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
|
|
197
|
-
_ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
|
|
198
|
-
key: 3,
|
|
199
|
-
class: normalizeClass([[
|
|
200
|
-
unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount),
|
|
201
|
-
unref(nsPager).is("disabled", _ctx.disabled)
|
|
202
|
-
], "number"]),
|
|
203
|
-
"aria-current": _ctx.currentPage === _ctx.pageCount,
|
|
204
|
-
"aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
|
|
205
|
-
tabindex: unref(tabindex)
|
|
206
|
-
}, toDisplayString(_ctx.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true)
|
|
207
|
-
], 42, ["onKeyup"]);
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
var Pager = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pager.vue"]]);
|
|
212
18
|
|
|
213
|
-
export {
|
|
19
|
+
export { paginationPagerProps };
|
|
214
20
|
//# sourceMappingURL=pager2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pager2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/pager.vue"],"sourcesContent":["<template>\n <ul :class=\"nsPager.b()\" @click=\"onPagerClick\" @keyup.enter=\"onEnter\">\n <li\n v-if=\"pageCount > 0\"\n :class=\"[\n nsPager.is('active', currentPage === 1),\n nsPager.is('disabled', disabled),\n ]\"\n class=\"number\"\n :aria-current=\"currentPage === 1\"\n :aria-label=\"t('el.pagination.currentPage', { pager: 1 })\"\n :tabindex=\"tabindex\"\n >\n 1\n </li>\n <li\n v-if=\"showPrevMore\"\n :class=\"prevMoreKls\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.pagination.prevPages', { pager: pagerCount - 2 })\"\n @mouseenter=\"onMouseEnter(true)\"\n @mouseleave=\"quickPrevHover = false\"\n @focus=\"onFocus(true)\"\n @blur=\"quickPrevFocus = false\"\n >\n <d-arrow-left v-if=\"(quickPrevHover || quickPrevFocus) && !disabled\" />\n <more-filled v-else />\n </li>\n <li\n v-for=\"pager in pagers\"\n :key=\"pager\"\n :class=\"[\n nsPager.is('active', currentPage === pager),\n nsPager.is('disabled', disabled),\n ]\"\n class=\"number\"\n :aria-current=\"currentPage === pager\"\n :aria-label=\"t('el.pagination.currentPage', { pager })\"\n :tabindex=\"tabindex\"\n >\n {{ pager }}\n </li>\n <li\n v-if=\"showNextMore\"\n :class=\"nextMoreKls\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.pagination.nextPages', { pager: pagerCount - 2 })\"\n @mouseenter=\"onMouseEnter()\"\n @mouseleave=\"quickNextHover = false\"\n @focus=\"onFocus()\"\n @blur=\"quickNextFocus = false\"\n >\n <d-arrow-right v-if=\"(quickNextHover || quickNextFocus) && !disabled\" />\n <more-filled v-else />\n </li>\n <li\n v-if=\"pageCount > 1\"\n :class=\"[\n nsPager.is('active', currentPage === pageCount),\n nsPager.is('disabled', disabled),\n ]\"\n class=\"number\"\n :aria-current=\"currentPage === pageCount\"\n :aria-label=\"t('el.pagination.currentPage', { pager: pageCount })\"\n :tabindex=\"tabindex\"\n >\n {{ pageCount }}\n </li>\n </ul>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watchEffect } from 'vue'\nimport { DArrowLeft, DArrowRight, MoreFilled } from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { paginationPagerProps } from './pager'\ndefineOptions({\n name: 'ElPaginationPager',\n})\nconst props = defineProps(paginationPagerProps)\nconst emit = defineEmits([CHANGE_EVENT])\nconst nsPager = useNamespace('pager')\nconst nsIcon = useNamespace('icon')\nconst { t } = useLocale()\n\nconst showPrevMore = ref(false)\nconst showNextMore = ref(false)\nconst quickPrevHover = ref(false)\nconst quickNextHover = ref(false)\nconst quickPrevFocus = ref(false)\nconst quickNextFocus = ref(false)\nconst pagers = computed(() => {\n const pagerCount = props.pagerCount\n const halfPagerCount = (pagerCount - 1) / 2\n const currentPage = Number(props.currentPage)\n const pageCount = Number(props.pageCount)\n let showPrevMore = false\n let showNextMore = false\n if (pageCount > pagerCount) {\n if (currentPage > pagerCount - halfPagerCount) {\n showPrevMore = true\n }\n if (currentPage < pageCount - halfPagerCount) {\n showNextMore = true\n }\n }\n const array: number[] = []\n if (showPrevMore && !showNextMore) {\n const startPage = pageCount - (pagerCount - 2)\n for (let i = startPage; i < pageCount; i++) {\n array.push(i)\n }\n } else if (!showPrevMore && showNextMore) {\n for (let i = 2; i < pagerCount; i++) {\n array.push(i)\n }\n } else if (showPrevMore && showNextMore) {\n const offset = Math.floor(pagerCount / 2) - 1\n for (let i = currentPage - offset; i <= currentPage + offset; i++) {\n array.push(i)\n }\n } else {\n for (let i = 2; i < pageCount; i++) {\n array.push(i)\n }\n }\n return array\n})\n\nconst prevMoreKls = computed(() => [\n 'more',\n 'btn-quickprev',\n nsIcon.b(),\n nsPager.is('disabled', props.disabled),\n])\nconst nextMoreKls = computed(() => [\n 'more',\n 'btn-quicknext',\n nsIcon.b(),\n nsPager.is('disabled', props.disabled),\n])\n\nconst tabindex = computed(() => (props.disabled ? -1 : 0))\nwatchEffect(() => {\n const halfPagerCount = (props.pagerCount - 1) / 2\n showPrevMore.value = false\n showNextMore.value = false\n if (props.pageCount! > props.pagerCount) {\n if (props.currentPage > props.pagerCount - halfPagerCount) {\n showPrevMore.value = true\n }\n if (props.currentPage < props.pageCount! - halfPagerCount) {\n showNextMore.value = true\n }\n }\n})\nfunction onMouseEnter(forward = false) {\n if (props.disabled) return\n if (forward) {\n quickPrevHover.value = true\n } else {\n quickNextHover.value = true\n }\n}\nfunction onFocus(forward = false) {\n if (forward) {\n quickPrevFocus.value = true\n } else {\n quickNextFocus.value = true\n }\n}\nfunction onEnter(e: UIEvent) {\n const target = e.target as HTMLElement\n if (\n target.tagName.toLowerCase() === 'li' &&\n Array.from(target.classList).includes('number')\n ) {\n const newPage = Number(target.textContent)\n if (newPage !== props.currentPage) {\n emit(CHANGE_EVENT, newPage)\n }\n } else if (\n target.tagName.toLowerCase() === 'li' &&\n Array.from(target.classList).includes('more')\n ) {\n onPagerClick(e)\n }\n}\nfunction onPagerClick(event: UIEvent) {\n const target = event.target as HTMLElement\n if (target.tagName.toLowerCase() === 'ul' || props.disabled) {\n return\n }\n let newPage = Number(target.textContent)\n const pageCount = props.pageCount!\n const currentPage = props.currentPage\n const pagerCountOffset = props.pagerCount - 2\n if (target.className.includes('more')) {\n if (target.className.includes('quickprev')) {\n newPage = currentPage - pagerCountOffset\n } else if (target.className.includes('quicknext')) {\n newPage = currentPage + pagerCountOffset\n }\n }\n if (!Number.isNaN(+newPage)) {\n if (newPage < 1) {\n newPage = 1\n }\n if (newPage > pageCount) {\n newPage = pageCount\n }\n }\n if (newPage !== currentPage) {\n emit(CHANGE_EVENT, newPage)\n }\n}\n</script>\n"],"names":["showPrevMore","showNextMore"],"mappings":";;;;;;;;mCA6Ec,CAAA;AAAA,EACZ,IAAM,EAAA,mBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAGA,IAAM,MAAA,OAAA,GAAU,aAAa,OAAO,CAAA,CAAA;AACpC,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,EAAE,CAAE,EAAA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,CAAA,QAAA,CAAA,WAAA,CAAA,EAAA;AAAA,UAC1B,OAAA,GAAA,WAAA,GAAA,gBAAA,CAAA;AAAA,SACF;AACA,OAAA;AACE,MAAA,IAAA,CAAA,YAAiB,CAAA,CAAA,OAAA,CAAA,EAAA;AACf,QAAU,IAAA,OAAA,GAAA,CAAA,EAAA;AAAA,UACZ,OAAA,GAAA,CAAA,CAAA;AACA,SAAA;AACE,QAAU,IAAA,OAAA,GAAA,SAAA,EAAA;AAAA,UACZ,OAAA,GAAA,SAAA,CAAA;AAAA,SACF;AACA,OAAA;AACE,MAAA,IAAA,uBAA0B,EAAA;AAAA,QAC5B,IAAA,CAAA,YAAA,EAAA,OAAA,CAAA,CAAA;AAAA,OACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pager2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/pager.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Pager from './pager.vue'\n\nexport const paginationPagerProps = buildProps({\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n required: true,\n },\n pagerCount: {\n type: Number,\n default: 7,\n },\n disabled: Boolean,\n} as const)\n\nexport type PaginationPagerProps = ExtractPropTypes<typeof paginationPagerProps>\n\nexport type PagerInstance = InstanceType<typeof Pager>\n"],"names":[],"mappings":";;AACY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC;;;;"}
|
|
@@ -6,7 +6,7 @@ import Next from './components/next2.mjs';
|
|
|
6
6
|
import Sizes from './components/sizes.mjs';
|
|
7
7
|
import Jumper from './components/jumper2.mjs';
|
|
8
8
|
import Total from './components/total2.mjs';
|
|
9
|
-
import Pager from './components/
|
|
9
|
+
import Pager from './components/pager.mjs';
|
|
10
10
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
11
11
|
import { isNumber } from '../../../utils/types.mjs';
|
|
12
12
|
import { mutable } from '../../../utils/typescript.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dropdownProps } from '../../dropdown/src/dropdown.mjs';
|
|
2
2
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
-
import { useTooltipTriggerProps } from '../../tooltip/src/
|
|
3
|
+
import { useTooltipTriggerProps } from '../../tooltip/src/trigger2.mjs';
|
|
4
4
|
import { useTooltipContentProps } from '../../tooltip/src/content2.mjs';
|
|
5
5
|
import { isBoolean } from '../../../utils/types.mjs';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ElRovingFocusGroup from './src/roving-focus-
|
|
2
|
-
export { default as ElRovingFocusGroup, default } from './src/roving-focus-
|
|
1
|
+
import ElRovingFocusGroup from './src/roving-focus-group2.mjs';
|
|
2
|
+
export { default as ElRovingFocusGroup, default } from './src/roving-focus-group2.mjs';
|
|
3
3
|
export { default as ElRovingFocusItem } from './src/roving-focus-item.mjs';
|
|
4
4
|
export { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from './src/tokens.mjs';
|
|
5
5
|
export { focusFirst, getFocusIntent, reorderArray } from './src/utils.mjs';
|
|
6
|
-
export { ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY } from './src/roving-focus-
|
|
6
|
+
export { ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY } from './src/roving-focus-group.mjs';
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, provide, readonly, toRef, unref, watch, renderSlot } from 'vue';
|
|
2
2
|
import { useEventListener } from '@vueuse/core';
|
|
3
|
-
import { rovingFocusGroupProps, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-
|
|
3
|
+
import { rovingFocusGroupProps, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-group.mjs';
|
|
4
4
|
import { ROVING_FOCUS_GROUP_INJECTION_KEY } from './tokens.mjs';
|
|
5
5
|
import { focusFirst } from './utils.mjs';
|
|
6
6
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { ElCollection } from './roving-focus-group2.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import { createCollectionWithScope } from '../../collection/src/collection.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
3
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
const rovingFocusGroupProps = buildProps({
|
|
5
|
+
style: { type: definePropType([String, Array, Object]) },
|
|
6
|
+
currentTabId: {
|
|
7
|
+
type: definePropType(String)
|
|
8
|
+
},
|
|
9
|
+
defaultCurrentTabId: String,
|
|
10
|
+
loop: Boolean,
|
|
11
|
+
dir: {
|
|
12
|
+
type: String,
|
|
13
|
+
values: ["ltr", "rtl"],
|
|
14
|
+
default: "ltr"
|
|
15
|
+
},
|
|
16
|
+
orientation: {
|
|
17
|
+
type: definePropType(String)
|
|
18
|
+
},
|
|
19
|
+
onBlur: Function,
|
|
20
|
+
onFocus: Function,
|
|
21
|
+
onMousedown: Function
|
|
12
22
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
default: withCtx(() => [
|
|
20
|
-
renderSlot(_ctx.$slots, "default")
|
|
21
|
-
]),
|
|
22
|
-
_: 3
|
|
23
|
-
}, 16)
|
|
24
|
-
]),
|
|
25
|
-
_: 3
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
var ElRovingFocusGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "roving-focus-group.vue"]]);
|
|
23
|
+
const {
|
|
24
|
+
ElCollection,
|
|
25
|
+
ElCollectionItem,
|
|
26
|
+
COLLECTION_INJECTION_KEY,
|
|
27
|
+
COLLECTION_ITEM_INJECTION_KEY
|
|
28
|
+
} = createCollectionWithScope("RovingFocusGroup");
|
|
29
29
|
|
|
30
|
-
export {
|
|
30
|
+
export { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, rovingFocusGroupProps };
|
|
31
31
|
//# sourceMappingURL=roving-focus-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roving-focus-group.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.
|
|
1
|
+
{"version":3,"file":"roving-focus-group.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { createCollectionWithScope } from '@element-plus/components/collection'\nimport type { ExtractPropTypes, HTMLAttributes, StyleValue } from 'vue'\n\nexport const rovingFocusGroupProps = buildProps({\n style: { type: definePropType<StyleValue>([String, Array, Object]) },\n currentTabId: {\n type: definePropType<string | null>(String),\n },\n defaultCurrentTabId: String,\n loop: Boolean,\n dir: {\n type: String, // left for direction support\n values: ['ltr', 'rtl'],\n default: 'ltr',\n },\n orientation: {\n // left for orientation support\n type: definePropType<HTMLAttributes['aria-orientation']>(String),\n },\n\n onBlur: Function,\n onFocus: Function,\n onMousedown: Function,\n})\n\nexport type ElRovingFocusGroupProps = ExtractPropTypes<\n typeof rovingFocusGroupProps\n>\n\nconst {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n} = createCollectionWithScope('RovingFocusGroup')\n\nexport {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n}\n"],"names":[],"mappings":";;;AAEY,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE;AAC1D,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE,MAAM;AAC7B,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,OAAO,EAAE,QAAQ;AACnB,EAAE,WAAW,EAAE,QAAQ;AACvB,CAAC,EAAE;AACE,MAAC;AACN,EAAE,YAAY;AACd,EAAE,gBAAgB;AAClB,EAAE,wBAAwB;AAC1B,EAAE,6BAA6B;AAC/B,CAAC,GAAG,yBAAyB,CAAC,kBAAkB;;;;"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, renderSlot } from 'vue';
|
|
2
|
+
import ElRovingFocusGroupImpl from './roving-focus-group-impl.mjs';
|
|
3
|
+
import { ElCollection } from './roving-focus-group.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
3
5
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
loop: Boolean,
|
|
11
|
-
dir: {
|
|
12
|
-
type: String,
|
|
13
|
-
values: ["ltr", "rtl"],
|
|
14
|
-
default: "ltr"
|
|
15
|
-
},
|
|
16
|
-
orientation: {
|
|
17
|
-
type: definePropType(String)
|
|
18
|
-
},
|
|
19
|
-
onBlur: Function,
|
|
20
|
-
onFocus: Function,
|
|
21
|
-
onMousedown: Function
|
|
6
|
+
const _sfc_main = defineComponent({
|
|
7
|
+
name: "ElRovingFocusGroup",
|
|
8
|
+
components: {
|
|
9
|
+
ElFocusGroupCollection: ElCollection,
|
|
10
|
+
ElRovingFocusGroupImpl
|
|
11
|
+
}
|
|
22
12
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
|
|
15
|
+
const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
|
|
16
|
+
return openBlock(), createBlock(_component_el_focus_group_collection, null, {
|
|
17
|
+
default: withCtx(() => [
|
|
18
|
+
createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
|
19
|
+
default: withCtx(() => [
|
|
20
|
+
renderSlot(_ctx.$slots, "default")
|
|
21
|
+
]),
|
|
22
|
+
_: 3
|
|
23
|
+
}, 16)
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
var ElRovingFocusGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "roving-focus-group.vue"]]);
|
|
29
29
|
|
|
30
|
-
export {
|
|
30
|
+
export { ElRovingFocusGroup as default };
|
|
31
31
|
//# sourceMappingURL=roving-focus-group2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roving-focus-group2.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.
|
|
1
|
+
{"version":3,"file":"roving-focus-group2.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.vue"],"sourcesContent":["<template>\n <el-focus-group-collection>\n <el-roving-focus-group-impl v-bind=\"$attrs\">\n <slot />\n </el-roving-focus-group-impl>\n </el-focus-group-collection>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport ElRovingFocusGroupImpl from './roving-focus-group-impl.vue'\nimport { ElCollection as ElFocusGroupCollection } from './roving-focus-group'\n\nexport default defineComponent({\n name: 'ElRovingFocusGroup',\n components: {\n ElFocusGroupCollection,\n ElRovingFocusGroupImpl,\n },\n})\n</script>\n"],"names":["ElFocusGroupCollection","_createBlock","_withCtx","_createVNode","_normalizeProps","_guardReactiveProps","_renderSlot"],"mappings":";;;;;AAaA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,oBAAA;AAAA,EACN,UAAY,EAAA;AAAA,4BACVA,YAAA;AAAA,IACA,sBAAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;;;sBAlBCC,WAI4B,CAAA,oCAAA,EAAA,IAAA,EAAA;AAAA,IAAA,OAAA,EAAAC,OAAA,CAH1B,MAE6B;AAAA,MAF7BC,WAAA,CAAA,qCAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA,EAAA;AAAA,QAE6B,OAAA,EAAAH,OAAA,CAAA,MAAA;AAAA,UAAAI,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAFO,CAAM;AAAA,SAAA,CAAA;AAAA,QAAA,CAAA,EAAA,CAAA;AAChC,OAAA,EAAA,EAAA,CAAR;AAAQ,KAAA,CAAA;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, computed, unref, provide, nextTick, resolveComponent, openBlock, createBlock, withCtx, renderSlot } from 'vue';
|
|
2
|
-
import { ElCollectionItem, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-
|
|
2
|
+
import { ElCollectionItem, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-group.mjs';
|
|
3
3
|
import { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from './tokens.mjs';
|
|
4
4
|
import { getFocusIntent, reorderArray, focusFirst } from './utils.mjs';
|
|
5
5
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
@@ -1,15 +1,69 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, inject, ref, openBlock, createElementBlock, Fragment, createVNode } from 'vue';
|
|
2
|
+
import { GAP } from './util.mjs';
|
|
3
|
+
import Thumb from './thumb2.mjs';
|
|
4
|
+
import { barProps } from './bar2.mjs';
|
|
5
|
+
import { scrollbarContextKey } from './constants.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
2
7
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "bar",
|
|
10
|
+
props: barProps,
|
|
11
|
+
setup(__props, { expose }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const scrollbar = inject(scrollbarContextKey);
|
|
14
|
+
const moveX = ref(0);
|
|
15
|
+
const moveY = ref(0);
|
|
16
|
+
const sizeWidth = ref("");
|
|
17
|
+
const sizeHeight = ref("");
|
|
18
|
+
const ratioY = ref(1);
|
|
19
|
+
const ratioX = ref(1);
|
|
20
|
+
const handleScroll = (wrap) => {
|
|
21
|
+
if (wrap) {
|
|
22
|
+
const offsetHeight = wrap.offsetHeight - GAP;
|
|
23
|
+
const offsetWidth = wrap.offsetWidth - GAP;
|
|
24
|
+
moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
|
|
25
|
+
moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const update = () => {
|
|
29
|
+
const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement;
|
|
30
|
+
if (!wrap)
|
|
31
|
+
return;
|
|
32
|
+
const offsetHeight = wrap.offsetHeight - GAP;
|
|
33
|
+
const offsetWidth = wrap.offsetWidth - GAP;
|
|
34
|
+
const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
|
|
35
|
+
const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
|
|
36
|
+
const height = Math.max(originalHeight, props.minSize);
|
|
37
|
+
const width = Math.max(originalWidth, props.minSize);
|
|
38
|
+
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
39
|
+
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
40
|
+
sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
|
|
41
|
+
sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
|
|
42
|
+
};
|
|
43
|
+
expose({
|
|
44
|
+
handleScroll,
|
|
45
|
+
update
|
|
46
|
+
});
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
49
|
+
createVNode(Thumb, {
|
|
50
|
+
move: moveX.value,
|
|
51
|
+
ratio: ratioX.value,
|
|
52
|
+
size: sizeWidth.value,
|
|
53
|
+
always: _ctx.always
|
|
54
|
+
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
55
|
+
createVNode(Thumb, {
|
|
56
|
+
move: moveY.value,
|
|
57
|
+
ratio: ratioY.value,
|
|
58
|
+
size: sizeHeight.value,
|
|
59
|
+
vertical: "",
|
|
60
|
+
always: _ctx.always
|
|
61
|
+
}, null, 8, ["move", "ratio", "size", "always"])
|
|
62
|
+
], 64);
|
|
63
|
+
};
|
|
11
64
|
}
|
|
12
65
|
});
|
|
66
|
+
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bar.vue"]]);
|
|
13
67
|
|
|
14
|
-
export {
|
|
68
|
+
export { Bar as default };
|
|
15
69
|
//# sourceMappingURL=bar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar.mjs","sources":["../../../../../../packages/components/scrollbar/src/bar.
|
|
1
|
+
{"version":3,"file":"bar.mjs","sources":["../../../../../../packages/components/scrollbar/src/bar.vue"],"sourcesContent":["<template>\n <thumb :move=\"moveX\" :ratio=\"ratioX\" :size=\"sizeWidth\" :always=\"always\" />\n <thumb\n :move=\"moveY\"\n :ratio=\"ratioY\"\n :size=\"sizeHeight\"\n vertical\n :always=\"always\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport { GAP } from './util'\nimport Thumb from './thumb.vue'\nimport { barProps } from './bar'\nimport { scrollbarContextKey } from './constants'\n\nconst props = defineProps(barProps)\n\nconst scrollbar = inject(scrollbarContextKey)\n\nconst moveX = ref(0)\nconst moveY = ref(0)\nconst sizeWidth = ref('')\nconst sizeHeight = ref('')\nconst ratioY = ref(1)\nconst ratioX = ref(1)\n\nconst handleScroll = (wrap: HTMLDivElement) => {\n if (wrap) {\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n moveY.value = ((wrap.scrollTop * 100) / offsetHeight) * ratioY.value\n moveX.value = ((wrap.scrollLeft * 100) / offsetWidth) * ratioX.value\n }\n}\n\nconst update = () => {\n const wrap = scrollbar?.wrapElement\n if (!wrap) return\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\ndefineExpose({\n handleScroll,\n update,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,IAAM,MAAA,SAAA,GAAY,OAAO,mBAAmB,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,SAAA,GAAY,IAAI,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,UAAA,GAAa,IAAI,EAAE,CAAA,CAAA;AACzB,IAAM,MAAA,MAAA,GAAS,IAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAAS,IAAI,CAAC,CAAA,CAAA;AAEpB,I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aAAgB,CAAA,IAAA,KAAA,IAAA,WAAA,GAAA,KAAA,CAAA,CAAA,CAAA;AACjE,MAAA,UAAU,SAAgB,MAAA,GAAA,GAAA,GAAoB,YAAA,GAAG,SAAY,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAAA,MAC/D,SAAA,CAAA,KAAA,GAAA,KAAA,GAAA,GAAA,GAAA,WAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAEA,KAAa,CAAA;AAAA,IACX,MAAA,CAAA;AAAA,MACA,YAAA;AAAA,MACD,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,69 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GAP } from './util.mjs';
|
|
3
|
-
import Thumb from './thumb2.mjs';
|
|
4
|
-
import { barProps } from './bar.mjs';
|
|
5
|
-
import { scrollbarContextKey } from './constants.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
7
2
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const sizeWidth = ref("");
|
|
17
|
-
const sizeHeight = ref("");
|
|
18
|
-
const ratioY = ref(1);
|
|
19
|
-
const ratioX = ref(1);
|
|
20
|
-
const handleScroll = (wrap) => {
|
|
21
|
-
if (wrap) {
|
|
22
|
-
const offsetHeight = wrap.offsetHeight - GAP;
|
|
23
|
-
const offsetWidth = wrap.offsetWidth - GAP;
|
|
24
|
-
moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
|
|
25
|
-
moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const update = () => {
|
|
29
|
-
const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement;
|
|
30
|
-
if (!wrap)
|
|
31
|
-
return;
|
|
32
|
-
const offsetHeight = wrap.offsetHeight - GAP;
|
|
33
|
-
const offsetWidth = wrap.offsetWidth - GAP;
|
|
34
|
-
const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
|
|
35
|
-
const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
|
|
36
|
-
const height = Math.max(originalHeight, props.minSize);
|
|
37
|
-
const width = Math.max(originalWidth, props.minSize);
|
|
38
|
-
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
39
|
-
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
40
|
-
sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
|
|
41
|
-
sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
|
|
42
|
-
};
|
|
43
|
-
expose({
|
|
44
|
-
handleScroll,
|
|
45
|
-
update
|
|
46
|
-
});
|
|
47
|
-
return (_ctx, _cache) => {
|
|
48
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
49
|
-
createVNode(Thumb, {
|
|
50
|
-
move: moveX.value,
|
|
51
|
-
ratio: ratioX.value,
|
|
52
|
-
size: sizeWidth.value,
|
|
53
|
-
always: _ctx.always
|
|
54
|
-
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
55
|
-
createVNode(Thumb, {
|
|
56
|
-
move: moveY.value,
|
|
57
|
-
ratio: ratioY.value,
|
|
58
|
-
size: sizeHeight.value,
|
|
59
|
-
vertical: "",
|
|
60
|
-
always: _ctx.always
|
|
61
|
-
}, null, 8, ["move", "ratio", "size", "always"])
|
|
62
|
-
], 64);
|
|
63
|
-
};
|
|
3
|
+
const barProps = buildProps({
|
|
4
|
+
always: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: true
|
|
7
|
+
},
|
|
8
|
+
minSize: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: true
|
|
64
11
|
}
|
|
65
12
|
});
|
|
66
|
-
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bar.vue"]]);
|
|
67
13
|
|
|
68
|
-
export {
|
|
14
|
+
export { barProps };
|
|
69
15
|
//# sourceMappingURL=bar2.mjs.map
|