element-pe 2.2.51 → 2.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +15 -2
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +15 -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.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +103 -38
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +38 -103
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.mjs +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +69 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -69
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +61 -23
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +23 -61
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +11 -36
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +36 -11
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +30 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -30
- 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 +131 -18
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +18 -131
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs +33 -87
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +87 -33
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +35 -16
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +16 -35
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +2 -2
- 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 +209 -116
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +116 -209
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +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 +49 -117
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +117 -49
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +66 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -66
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +10 -62
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +62 -10
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +64 -7
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +7 -64
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog.mjs +174 -73
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +73 -174
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/drawer/src/drawer.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +2 -2
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +55 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -55
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +46 -326
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +326 -46
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/index.mjs +27 -27
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +69 -149
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +149 -69
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -103
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +103 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +19 -38
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +38 -19
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +38 -18
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +18 -38
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +111 -66
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +66 -111
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +70 -36
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +36 -70
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +257 -87
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +87 -257
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +63 -29
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +29 -63
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +6 -1
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
- 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 +29 -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 +12 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +5 -0
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +46 -176
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +176 -46
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +2 -2
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/skeleton/index.mjs +4 -4
- package/es/components/skeleton/src/skeleton-item.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +49 -22
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +22 -49
- package/es/components/skeleton/src/skeleton2.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 +243 -88
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +88 -243
- 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 +98 -33
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +33 -98
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +44 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -44
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +1 -1
- package/es/components/time-select/src/time-select.mjs +118 -48
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +48 -118
- 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 +42 -70
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +70 -42
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +3 -3
- package/es/components/tooltip/src/content.mjs +179 -31
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +31 -179
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +174 -31
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +31 -174
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content.mjs +114 -50
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +50 -114
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +82 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -82
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +4 -4
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +178 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -178
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +27 -27
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +102 -39
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +39 -102
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +69 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -69
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +61 -24
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +24 -61
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +11 -36
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +36 -11
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +30 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -30
- 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 +131 -19
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +19 -131
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table.js +37 -87
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +87 -37
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +35 -16
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +16 -35
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +2 -2
- 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 +209 -116
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +116 -209
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +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 +50 -117
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +117 -50
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +66 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -66
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +9 -62
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +62 -9
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +64 -7
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +7 -64
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog.js +174 -74
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +74 -174
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/drawer/src/drawer.js +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +2 -2
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +55 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -55
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +47 -330
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +330 -47
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/index.js +27 -27
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +70 -148
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +148 -70
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -103
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +103 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +19 -38
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +38 -19
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +38 -19
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +19 -38
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +111 -67
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +67 -111
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +70 -37
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +37 -70
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +256 -87
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +87 -256
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +63 -31
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +31 -63
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +6 -1
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
- 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 +33 -27
- 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 +12 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +5 -0
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +47 -176
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +176 -47
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/select.js +2 -2
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/skeleton/index.js +4 -4
- package/lib/components/skeleton/src/skeleton-item.js +23 -18
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +18 -23
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +49 -22
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +22 -49
- package/lib/components/skeleton/src/skeleton2.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 +242 -88
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +88 -242
- 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 +98 -34
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +34 -98
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +44 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -44
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/time-select/index.js +1 -1
- package/lib/components/time-select/src/time-select.js +123 -48
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +48 -123
- 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 +42 -70
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +70 -42
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/index.js +3 -3
- package/lib/components/tooltip/src/content.js +179 -31
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +31 -179
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +173 -34
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +34 -173
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content.js +114 -50
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +50 -114
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +82 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -82
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +4 -4
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +176 -31
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +31 -176
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +27 -27
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result2.mjs","sources":["../../../../../../packages/components/result/src/result.
|
|
1
|
+
{"version":3,"file":"result2.mjs","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n subTitle: {\n type: String,\n default: '',\n },\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result>\n"],"names":[],"mappings":";;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,iBAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAG,iBAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,UAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -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-group.mjs';
|
|
2
|
+
export { default as ElRovingFocusGroup, default } from './src/roving-focus-group.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-group2.mjs';
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,10 +2,11 @@ import { defineComponent, ref, inject, computed, unref, provide, readonly, toRef
|
|
|
2
2
|
import '../../config-provider/index.mjs';
|
|
3
3
|
import { useEventListener } from '@vueuse/core';
|
|
4
4
|
import '../../../utils/index.mjs';
|
|
5
|
-
import { rovingFocusGroupProps, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-
|
|
5
|
+
import { rovingFocusGroupProps, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-group2.mjs';
|
|
6
6
|
import { ROVING_FOCUS_GROUP_INJECTION_KEY } from './tokens.mjs';
|
|
7
7
|
import { focusFirst } from './utils.mjs';
|
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
+
import { useGlobalConfig } from '../../config-provider/src/hooks/use-global-config.mjs';
|
|
9
10
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
10
11
|
import { watch } from '../../config-provider/src/for-editor.mjs';
|
|
11
12
|
|
|
@@ -19,6 +20,10 @@ const _sfc_main = defineComponent({
|
|
|
19
20
|
emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
|
|
20
21
|
setup(props, { emit }) {
|
|
21
22
|
var _a;
|
|
23
|
+
const forEditor = useGlobalConfig("forEditor");
|
|
24
|
+
if (forEditor.value) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
22
27
|
const currentTabbedId = ref((_a = props.currentTabId || props.defaultCurrentTabId) != null ? _a : null);
|
|
23
28
|
const isBackingOut = ref(false);
|
|
24
29
|
const isClickFocus = ref(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roving-focus-group-impl.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n inject,\n provide,\n readonly,\n ref,\n toRef,\n unref,\n} from 'vue'\nimport { watch } from '../../config-provider'\nimport { useEventListener } from '@vueuse/core'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport {\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n rovingFocusGroupProps,\n} from './roving-focus-group'\nimport { ROVING_FOCUS_GROUP_INJECTION_KEY } from './tokens'\nimport { focusFirst } from './utils'\n\nimport type { StyleValue } from 'vue'\n\nconst CURRENT_TAB_ID_CHANGE_EVT = 'currentTabIdChange'\n\nconst ENTRY_FOCUS_EVT = 'rovingFocusGroup.entryFocus'\nconst EVT_OPTS: EventInit = { bubbles: false, cancelable: true }\nexport default defineComponent({\n name: 'ElRovingFocusGroupImpl',\n inheritAttrs: false,\n props: rovingFocusGroupProps,\n emits: [CURRENT_TAB_ID_CHANGE_EVT, 'entryFocus'],\n setup(props, { emit }) {\n const currentTabbedId = ref<string | null>(\n (props.currentTabId || props.defaultCurrentTabId) ?? null\n )\n const isBackingOut = ref(false)\n const isClickFocus = ref(false)\n const rovingFocusGroupRef = ref<HTMLElement | null>(null)\n const { getItems } = inject(\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n undefined\n )!\n const rovingFocusGroupRootStyle = computed(() => {\n // casting to any for fix compiler error since HTMLElement.StyleValue does not\n // support CSSProperties\n return [\n {\n outline: 'none',\n },\n props.style as StyleValue,\n ] as any\n })\n\n const onItemFocus = (tabbedId: string) => {\n emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId)\n }\n\n const onItemShiftTab = () => {\n isBackingOut.value = true\n }\n\n const onMousedown = composeEventHandlers(\n (e: Event) => {\n props.onMousedown?.(e)\n },\n () => {\n isClickFocus.value = true\n }\n )\n\n const onFocus = composeEventHandlers(\n (e: FocusEvent) => {\n props.onFocus?.(e)\n },\n (e) => {\n const isKeyboardFocus = !unref(isClickFocus)\n const { target, currentTarget } = e\n if (\n target === currentTarget &&\n isKeyboardFocus &&\n !unref(isBackingOut)\n ) {\n const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS)\n currentTarget?.dispatchEvent(entryFocusEvt)\n\n if (!entryFocusEvt.defaultPrevented) {\n const items = getItems<{\n id: string\n focusable: boolean\n active: boolean\n }>().filter((item) => item.focusable)\n const activeItem = items.find((item) => item.active)\n const currentItem = items.find(\n (item) => item.id === unref(currentTabbedId)\n )\n const candidates = [activeItem!, currentItem!, ...items].filter(\n Boolean\n )\n const candidateNodes = candidates.map((item) => item.ref!)\n focusFirst(candidateNodes)\n }\n }\n\n isClickFocus.value = false\n }\n )\n\n const onBlur = composeEventHandlers(\n (e: Event) => {\n props.onBlur?.(e)\n },\n () => {\n isBackingOut.value = false\n }\n )\n\n const handleEntryFocus = (...args: any[]) => {\n emit('entryFocus', ...args)\n }\n\n provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {\n currentTabbedId: readonly(currentTabbedId),\n loop: toRef(props, 'loop'),\n tabIndex: computed(() => {\n return unref(isBackingOut) ? -1 : 0\n }),\n rovingFocusGroupRef,\n rovingFocusGroupRootStyle,\n orientation: toRef(props, 'orientation'),\n dir: toRef(props, 'dir'),\n onItemFocus,\n onItemShiftTab,\n onBlur,\n onFocus,\n onMousedown,\n })\n\n watch(\n () => props.currentTabId,\n (val) => {\n currentTabbedId.value = val ?? null\n }\n )\n\n useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus)\n },\n})\n</script>\n"],"names":["ROVING_FOCUS_COLLECTION_INJECTION_KEY"],"mappings":"
|
|
1
|
+
{"version":3,"file":"roving-focus-group-impl.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n inject,\n provide,\n readonly,\n ref,\n toRef,\n unref,\n} from 'vue'\nimport { useGlobalConfig, watch } from '../../config-provider'\nimport { useEventListener } from '@vueuse/core'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport {\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n rovingFocusGroupProps,\n} from './roving-focus-group'\nimport { ROVING_FOCUS_GROUP_INJECTION_KEY } from './tokens'\nimport { focusFirst } from './utils'\n\nimport type { StyleValue } from 'vue'\n\nconst CURRENT_TAB_ID_CHANGE_EVT = 'currentTabIdChange'\n\nconst ENTRY_FOCUS_EVT = 'rovingFocusGroup.entryFocus'\nconst EVT_OPTS: EventInit = { bubbles: false, cancelable: true }\nexport default defineComponent({\n name: 'ElRovingFocusGroupImpl',\n inheritAttrs: false,\n props: rovingFocusGroupProps,\n emits: [CURRENT_TAB_ID_CHANGE_EVT, 'entryFocus'],\n setup(props, { emit }) {\n const forEditor = useGlobalConfig('forEditor')\n if (forEditor.value) {\n return\n }\n\n const currentTabbedId = ref<string | null>(\n (props.currentTabId || props.defaultCurrentTabId) ?? null\n )\n const isBackingOut = ref(false)\n const isClickFocus = ref(false)\n const rovingFocusGroupRef = ref<HTMLElement | null>(null)\n const { getItems } = inject(\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n undefined\n )!\n const rovingFocusGroupRootStyle = computed(() => {\n // casting to any for fix compiler error since HTMLElement.StyleValue does not\n // support CSSProperties\n return [\n {\n outline: 'none',\n },\n props.style as StyleValue,\n ] as any\n })\n\n const onItemFocus = (tabbedId: string) => {\n emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId)\n }\n\n const onItemShiftTab = () => {\n isBackingOut.value = true\n }\n\n const onMousedown = composeEventHandlers(\n (e: Event) => {\n props.onMousedown?.(e)\n },\n () => {\n isClickFocus.value = true\n }\n )\n\n const onFocus = composeEventHandlers(\n (e: FocusEvent) => {\n props.onFocus?.(e)\n },\n (e) => {\n const isKeyboardFocus = !unref(isClickFocus)\n const { target, currentTarget } = e\n if (\n target === currentTarget &&\n isKeyboardFocus &&\n !unref(isBackingOut)\n ) {\n const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS)\n currentTarget?.dispatchEvent(entryFocusEvt)\n\n if (!entryFocusEvt.defaultPrevented) {\n const items = getItems<{\n id: string\n focusable: boolean\n active: boolean\n }>().filter((item) => item.focusable)\n const activeItem = items.find((item) => item.active)\n const currentItem = items.find(\n (item) => item.id === unref(currentTabbedId)\n )\n const candidates = [activeItem!, currentItem!, ...items].filter(\n Boolean\n )\n const candidateNodes = candidates.map((item) => item.ref!)\n focusFirst(candidateNodes)\n }\n }\n\n isClickFocus.value = false\n }\n )\n\n const onBlur = composeEventHandlers(\n (e: Event) => {\n props.onBlur?.(e)\n },\n () => {\n isBackingOut.value = false\n }\n )\n\n const handleEntryFocus = (...args: any[]) => {\n emit('entryFocus', ...args)\n }\n\n provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {\n currentTabbedId: readonly(currentTabbedId),\n loop: toRef(props, 'loop'),\n tabIndex: computed(() => {\n return unref(isBackingOut) ? -1 : 0\n }),\n rovingFocusGroupRef,\n rovingFocusGroupRootStyle,\n orientation: toRef(props, 'orientation'),\n dir: toRef(props, 'dir'),\n onItemFocus,\n onItemShiftTab,\n onBlur,\n onFocus,\n onMousedown,\n })\n\n watch(\n () => props.currentTabId,\n (val) => {\n currentTabbedId.value = val ?? null\n }\n )\n\n useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus)\n },\n})\n</script>\n"],"names":["ROVING_FOCUS_COLLECTION_INJECTION_KEY"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,yBAA4B,GAAA,oBAAA,CAAA;AAElC,MAAM,eAAkB,GAAA,6BAAA,CAAA;AACxB,MAAM,QAAsB,GAAA,EAAE,OAAS,EAAA,KAAA,EAAO,YAAY,IAAK,EAAA,CAAA;AAC/D,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,wBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAAA,EACd,KAAO,EAAA,qBAAA;AAAA,EACP,KAAA,EAAO,CAAC,yBAAA,EAA2B,YAAY,CAAA;AAAA,EAC/C,KAAA,CAAM,KAAO,EAAA,EAAE,IAAQ,EAAA,EAAA;AACrB,IAAM,IAAA,EAAA,CAAA;AACN,IAAA,eAAqB,GAAA,eAAA,CA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'
|
|
3
|
-
import {
|
|
4
|
-
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-group2.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
loop: Boolean,
|
|
13
|
-
dir: {
|
|
14
|
-
type: String,
|
|
15
|
-
values: ["ltr", "rtl"],
|
|
16
|
-
default: "ltr"
|
|
17
|
-
},
|
|
18
|
-
orientation: {
|
|
19
|
-
type: definePropType(String)
|
|
20
|
-
},
|
|
21
|
-
onBlur: Function,
|
|
22
|
-
onFocus: Function,
|
|
23
|
-
onMousedown: Function
|
|
6
|
+
const _sfc_main = defineComponent({
|
|
7
|
+
name: "ElRovingFocusGroup",
|
|
8
|
+
components: {
|
|
9
|
+
ElFocusGroupCollection: ElCollection,
|
|
10
|
+
ElRovingFocusGroupImpl
|
|
11
|
+
}
|
|
24
12
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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", "/Users/meng/workspace/element-pe/packages/components/roving-focus-group/src/roving-focus-group.vue"]]);
|
|
31
29
|
|
|
32
|
-
export {
|
|
30
|
+
export { ElRovingFocusGroup as default };
|
|
33
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.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","_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,CAE6B,yEAFO,IAAM,CAAA,MAAA,CAAA,CAAA,EAAA;AAAA,QAAA,OAAA,EAAAD,OAAA,CACxC,MAAQ;AAAA,UAARE,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,SAAA,CAAA;;;;;;;;;;;"}
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import '../../collection/index.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { createCollectionWithScope } from '../../collection/src/collection2.mjs';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const rovingFocusGroupProps = buildProps({
|
|
7
|
+
style: { type: definePropType([String, Array, Object]) },
|
|
8
|
+
currentTabId: {
|
|
9
|
+
type: definePropType(String)
|
|
10
|
+
},
|
|
11
|
+
defaultCurrentTabId: String,
|
|
12
|
+
loop: Boolean,
|
|
13
|
+
dir: {
|
|
14
|
+
type: String,
|
|
15
|
+
values: ["ltr", "rtl"],
|
|
16
|
+
default: "ltr"
|
|
17
|
+
},
|
|
18
|
+
orientation: {
|
|
19
|
+
type: definePropType(String)
|
|
20
|
+
},
|
|
21
|
+
onBlur: Function,
|
|
22
|
+
onFocus: Function,
|
|
23
|
+
onMousedown: Function
|
|
12
24
|
});
|
|
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", "/Users/meng/workspace/element-pe/packages/components/roving-focus-group/src/roving-focus-group.vue"]]);
|
|
25
|
+
const {
|
|
26
|
+
ElCollection,
|
|
27
|
+
ElCollectionItem,
|
|
28
|
+
COLLECTION_INJECTION_KEY,
|
|
29
|
+
COLLECTION_ITEM_INJECTION_KEY
|
|
30
|
+
} = createCollectionWithScope("RovingFocusGroup");
|
|
29
31
|
|
|
30
|
-
export {
|
|
32
|
+
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
33
|
//# 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.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;;;;"}
|
|
@@ -2,10 +2,12 @@ import { defineComponent, inject, ref, unref, nextTick, computed, provide, resol
|
|
|
2
2
|
import '../../../hooks/index.mjs';
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
4
|
import '../../../constants/index.mjs';
|
|
5
|
-
import { ElCollectionItem, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-
|
|
5
|
+
import { ElCollectionItem, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-group2.mjs';
|
|
6
6
|
import { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from './tokens.mjs';
|
|
7
7
|
import { getFocusIntent, reorderArray, focusFirst } from './utils.mjs';
|
|
8
|
+
import '../../config-provider/index.mjs';
|
|
8
9
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
+
import { useGlobalConfig } from '../../config-provider/src/hooks/use-global-config.mjs';
|
|
9
11
|
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
10
12
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
11
13
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
@@ -26,6 +28,15 @@ const _sfc_main = defineComponent({
|
|
|
26
28
|
},
|
|
27
29
|
emits: ["mousedown", "focus", "keydown"],
|
|
28
30
|
setup(props, { emit }) {
|
|
31
|
+
const forEditor = useGlobalConfig("forEditor");
|
|
32
|
+
if (forEditor.value) {
|
|
33
|
+
return {
|
|
34
|
+
id: useId(),
|
|
35
|
+
handleKeydown: void 0,
|
|
36
|
+
handleFocus: void 0,
|
|
37
|
+
handleMousedown: void 0
|
|
38
|
+
};
|
|
39
|
+
}
|
|
29
40
|
const { currentTabbedId, loop, onItemFocus, onItemShiftTab } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
|
|
30
41
|
const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
|
|
31
42
|
const id = useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roving-focus-item.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-item.vue"],"sourcesContent":["<template>\n <el-roving-focus-collection-item\n :id=\"id\"\n :focusable=\"focusable\"\n :active=\"active\"\n >\n <slot />\n </el-roving-focus-collection-item>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n inject,\n nextTick,\n provide,\n ref,\n unref,\n} from 'vue'\nimport { useId } from '@element-plus/hooks'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport {\n ElCollectionItem as ElRovingFocusCollectionItem,\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n} from './roving-focus-group'\nimport {\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,\n} from './tokens'\nimport { focusFirst, getFocusIntent, reorderArray } from './utils'\n\nexport default defineComponent({\n components: {\n ElRovingFocusCollectionItem,\n },\n props: {\n focusable: {\n type: Boolean,\n default: true,\n },\n active: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['mousedown', 'focus', 'keydown'],\n setup(props, { emit }) {\n const { currentTabbedId, loop, onItemFocus, onItemShiftTab } = inject(\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n undefined\n )!\n\n const { getItems } = inject(\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n undefined\n )!\n\n const id = useId()\n const rovingFocusGroupItemRef = ref<HTMLElement | null>(null)\n\n const handleMousedown = composeEventHandlers(\n (e: Event) => {\n emit('mousedown', e)\n },\n (e) => {\n if (!props.focusable) {\n e.preventDefault()\n } else {\n onItemFocus(unref(id))\n }\n }\n )\n\n const handleFocus = composeEventHandlers(\n (e: Event) => {\n emit('focus', e)\n },\n () => {\n onItemFocus(unref(id))\n }\n )\n\n const handleKeydown = composeEventHandlers(\n (e: Event) => {\n emit('keydown', e)\n },\n (e) => {\n const { key, shiftKey, target, currentTarget } = e as KeyboardEvent\n if (key === EVENT_CODE.tab && shiftKey) {\n onItemShiftTab()\n return\n }\n if (target !== currentTarget) return\n const focusIntent = getFocusIntent(e as KeyboardEvent)\n\n if (focusIntent) {\n e.preventDefault()\n const items = getItems<typeof props>().filter(\n (item) => item.focusable\n )\n\n let elements = items.map((item) => item.ref!)\n\n switch (focusIntent) {\n case 'last': {\n elements.reverse()\n break\n }\n case 'prev':\n case 'next': {\n if (focusIntent === 'prev') {\n elements.reverse()\n }\n const currentIdx = elements.indexOf(currentTarget as HTMLElement)\n elements = loop.value\n ? reorderArray(elements, currentIdx + 1)\n : elements.slice(currentIdx + 1)\n break\n }\n default: {\n break\n }\n }\n\n nextTick(() => {\n focusFirst(elements)\n })\n }\n }\n )\n\n const isCurrentTab = computed(() => currentTabbedId.value === unref(id))\n\n provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {\n rovingFocusGroupItemRef,\n tabIndex: computed(() => (unref(isCurrentTab) ? 0 : -1)),\n handleMousedown,\n handleFocus,\n handleKeydown,\n })\n\n return {\n id,\n handleKeydown,\n handleFocus,\n handleMousedown,\n }\n },\n})\n</script>\n"],"names":["ElRovingFocusCollectionItem","ROVING_FOCUS_COLLECTION_INJECTION_KEY","_createBlock","_renderSlot"],"mappings":"
|
|
1
|
+
{"version":3,"file":"roving-focus-item.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-item.vue"],"sourcesContent":["<template>\n <el-roving-focus-collection-item\n :id=\"id\"\n :focusable=\"focusable\"\n :active=\"active\"\n >\n <slot />\n </el-roving-focus-collection-item>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n inject,\n nextTick,\n provide,\n ref,\n unref,\n} from 'vue'\nimport { useId } from '@element-plus/hooks'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport {\n ElCollectionItem as ElRovingFocusCollectionItem,\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n} from './roving-focus-group'\nimport {\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,\n} from './tokens'\nimport { focusFirst, getFocusIntent, reorderArray } from './utils'\nimport { useGlobalConfig } from '../../config-provider'\n\nexport default defineComponent({\n components: {\n ElRovingFocusCollectionItem,\n },\n props: {\n focusable: {\n type: Boolean,\n default: true,\n },\n active: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['mousedown', 'focus', 'keydown'],\n setup(props, { emit }) {\n const forEditor = useGlobalConfig('forEditor')\n if (forEditor.value) {\n return {\n id: useId(),\n handleKeydown: undefined,\n handleFocus: undefined,\n handleMousedown: undefined,\n }\n }\n\n const { currentTabbedId, loop, onItemFocus, onItemShiftTab } = inject(\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n undefined\n )!\n\n const { getItems } = inject(\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n undefined\n )!\n\n const id = useId()\n const rovingFocusGroupItemRef = ref<HTMLElement | null>(null)\n\n const handleMousedown = composeEventHandlers(\n (e: Event) => {\n emit('mousedown', e)\n },\n (e) => {\n if (!props.focusable) {\n e.preventDefault()\n } else {\n onItemFocus(unref(id))\n }\n }\n )\n\n const handleFocus = composeEventHandlers(\n (e: Event) => {\n emit('focus', e)\n },\n () => {\n onItemFocus(unref(id))\n }\n )\n\n const handleKeydown = composeEventHandlers(\n (e: Event) => {\n emit('keydown', e)\n },\n (e) => {\n const { key, shiftKey, target, currentTarget } = e as KeyboardEvent\n if (key === EVENT_CODE.tab && shiftKey) {\n onItemShiftTab()\n return\n }\n if (target !== currentTarget) return\n const focusIntent = getFocusIntent(e as KeyboardEvent)\n\n if (focusIntent) {\n e.preventDefault()\n const items = getItems<typeof props>().filter(\n (item) => item.focusable\n )\n\n let elements = items.map((item) => item.ref!)\n\n switch (focusIntent) {\n case 'last': {\n elements.reverse()\n break\n }\n case 'prev':\n case 'next': {\n if (focusIntent === 'prev') {\n elements.reverse()\n }\n const currentIdx = elements.indexOf(currentTarget as HTMLElement)\n elements = loop.value\n ? reorderArray(elements, currentIdx + 1)\n : elements.slice(currentIdx + 1)\n break\n }\n default: {\n break\n }\n }\n\n nextTick(() => {\n focusFirst(elements)\n })\n }\n }\n )\n\n const isCurrentTab = computed(() => currentTabbedId.value === unref(id))\n\n provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {\n rovingFocusGroupItemRef,\n tabIndex: computed(() => (unref(isCurrentTab) ? 0 : -1)),\n handleMousedown,\n handleFocus,\n handleKeydown,\n })\n\n return {\n id,\n handleKeydown,\n handleFocus,\n handleMousedown,\n }\n },\n})\n</script>\n"],"names":["ElRovingFocusCollectionItem","ROVING_FOCUS_COLLECTION_INJECTION_KEY","_createBlock","_renderSlot"],"mappings":";;;;;;;;;;;;;;AAkCA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,UAAY,EAAA;AAAA,iCACVA,gBAAA;AAAA,GACF;AAAA,EACA,KAAO,EAAA;AAAA,IACL,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,OAAA;AAAA,MACN,OAAS,EAAA,IAAA;AAAA,KACX;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,OAAA;AAAA,MACN,OAAS,EAAA,KAAA;AAAA,KACX;AAAA,GACF;AAAA,EACA,KAAO,EAAA,CAAC,WAAa,EAAA,OAAA,EAAS,SAAS,CAAA;AAAA,EACvC,KAAA,CAAM,KAAO,EAAA,EAAE,IAAQ,EAAA,EAAA;AACrB,IAAM,MAAA,SAAA,GAAY,gBAAgB,WAAW,CAAA,CAAA;AAC7C,IAAA,IAAI,UAAU,KAAO,EAAA;AACnB,MAAO,OAAA;AAAA,QACL,IAAI,KAAM,EAAA;AAAA,QACV,aAAe,EAAA,KAAA,CAAA;AAAA,QACf,WAAa,EAAA,KAAA,CAAA;AAAA,QACb,eAAiB,EAAA,KAAA,CAAA;AAAA,OACnB,CAAA;AAAA,KACF;AAEA,IAAA,MAAM,EAAE,eAAiB,EAAA,IAAA,EAAM,aAAa,cAAmB,EAAA,GAAA,MAAA,CAC7D,kCACA,KACF,CAAA,CAAA,CAAA;AAEA,IAAA,MAAM,EAAE,QAAA,EAAA,GAAa,MACnB,CAAAC,wBAAA,EACA,KACF,CAAA,CAAA,CAAA;AAEA,IAAA,MAAM,KAAK,KAAM,EAAA,CAAA;AACjB,IAAM,MAAA,uB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AAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;;sBAhKCC,WAMkC,CAAA,0CAAA,EAAA;AAAA,IAL/B,EAAI,EAAA,IAAA,CAAA,EAAA;AAAA,IACJ,SAAW,EAAA,IAAA,CAAA,SAAA;AAAA,IACX,MAAQ,EAAA,IAAA,CAAA,MAAA;AAAA,GAAA,EAAA;qBAET,MAAQ;AAAA,MAARC,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;"}
|
|
@@ -8,6 +8,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
default: boolean;
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
|
+
id: import("vue").Ref<string>;
|
|
12
|
+
handleKeydown: undefined;
|
|
13
|
+
handleFocus: undefined;
|
|
14
|
+
handleMousedown: undefined;
|
|
15
|
+
} | {
|
|
11
16
|
id: import("vue").Ref<string>;
|
|
12
17
|
handleKeydown: (event: Event) => void;
|
|
13
18
|
handleFocus: (event: Event) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Scrollbar from './src/
|
|
2
|
+
import Scrollbar from './src/scrollbar2.mjs';
|
|
3
3
|
export { BAR_MAP, GAP, renderThumbStyle } from './src/util.mjs';
|
|
4
|
-
export { scrollbarEmits, scrollbarProps } from './src/
|
|
4
|
+
export { scrollbarEmits, scrollbarProps } from './src/scrollbar.mjs';
|
|
5
5
|
export { thumbProps } from './src/thumb.mjs';
|
|
6
6
|
export { scrollbarContextKey } from './src/constants.mjs';
|
|
7
7
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,183 +1,53 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, nextTick, provide, reactive, onMounted, onUpdated, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, createBlock, resolveDynamicComponent, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
2
|
-
import '../../config-provider/index.mjs';
|
|
3
|
-
import { useResizeObserver, useEventListener } from '@vueuse/core';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
|
-
import '../../../
|
|
6
|
-
import { GAP } from './util.mjs';
|
|
7
|
-
import Bar from './bar2.mjs';
|
|
8
|
-
import { scrollbarContextKey } from './constants.mjs';
|
|
9
|
-
import { scrollbarProps, scrollbarEmits } from './scrollbar2.mjs';
|
|
10
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
11
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
13
|
-
import { isObject } from '@vue/shared';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
14
3
|
import { isNumber } from '../../../utils/types.mjs';
|
|
15
|
-
import { debugWarn } from '../../../utils/error.mjs';
|
|
16
|
-
import { watch } from '../../config-provider/src/for-editor.mjs';
|
|
17
4
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
const handleScroll = () => {
|
|
58
|
-
var _a;
|
|
59
|
-
if (wrapRef.value) {
|
|
60
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
61
|
-
emit("scroll", {
|
|
62
|
-
scrollTop: wrapRef.value.scrollTop,
|
|
63
|
-
scrollLeft: wrapRef.value.scrollLeft
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
function scrollTo(arg1, arg2) {
|
|
68
|
-
if (isObject(arg1)) {
|
|
69
|
-
wrapRef.value.scrollTo(arg1);
|
|
70
|
-
} else if (isNumber(arg1) && isNumber(arg2)) {
|
|
71
|
-
wrapRef.value.scrollTo(arg1, arg2);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const setScrollTop = (value) => {
|
|
75
|
-
if (!isNumber(value)) {
|
|
76
|
-
debugWarn(COMPONENT_NAME, "value must be a number");
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
wrapRef.value.scrollTop = value;
|
|
80
|
-
};
|
|
81
|
-
const setScrollLeft = (value) => {
|
|
82
|
-
if (!isNumber(value)) {
|
|
83
|
-
debugWarn(COMPONENT_NAME, "value must be a number");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
wrapRef.value.scrollLeft = value;
|
|
87
|
-
};
|
|
88
|
-
const update = () => {
|
|
89
|
-
if (!wrapRef.value)
|
|
90
|
-
return;
|
|
91
|
-
const offsetHeight = wrapRef.value.offsetHeight - GAP;
|
|
92
|
-
const offsetWidth = wrapRef.value.offsetWidth - GAP;
|
|
93
|
-
const originalHeight = offsetHeight ** 2 / wrapRef.value.scrollHeight;
|
|
94
|
-
const originalWidth = offsetWidth ** 2 / wrapRef.value.scrollWidth;
|
|
95
|
-
const height = Math.max(originalHeight, props.minSize);
|
|
96
|
-
const width = Math.max(originalWidth, props.minSize);
|
|
97
|
-
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
98
|
-
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
99
|
-
sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
|
|
100
|
-
sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
|
|
101
|
-
};
|
|
102
|
-
watch(() => props.noresize, (noresize) => {
|
|
103
|
-
if (noresize) {
|
|
104
|
-
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
105
|
-
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
106
|
-
} else {
|
|
107
|
-
;
|
|
108
|
-
({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update));
|
|
109
|
-
stopResizeListener = useEventListener("resize", update);
|
|
110
|
-
}
|
|
111
|
-
}, { immediate: true });
|
|
112
|
-
watch(() => [props.maxHeight, props.height], () => {
|
|
113
|
-
if (!props.native)
|
|
114
|
-
nextTick(() => {
|
|
115
|
-
var _a;
|
|
116
|
-
update();
|
|
117
|
-
if (wrapRef.value) {
|
|
118
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
provide(scrollbarContextKey, reactive({
|
|
123
|
-
scrollbarElement: scrollbarRef,
|
|
124
|
-
wrapElement: wrapRef
|
|
125
|
-
}));
|
|
126
|
-
onMounted(() => {
|
|
127
|
-
if (!props.native)
|
|
128
|
-
nextTick(() => {
|
|
129
|
-
update();
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
onUpdated(() => update());
|
|
133
|
-
expose({
|
|
134
|
-
wrapRef,
|
|
135
|
-
update,
|
|
136
|
-
scrollTo,
|
|
137
|
-
setScrollTop,
|
|
138
|
-
setScrollLeft,
|
|
139
|
-
handleScroll
|
|
140
|
-
});
|
|
141
|
-
return (_ctx, _cache) => {
|
|
142
|
-
return openBlock(), createElementBlock("div", {
|
|
143
|
-
ref_key: "scrollbarRef",
|
|
144
|
-
ref: scrollbarRef,
|
|
145
|
-
class: normalizeClass(unref(ns).b())
|
|
146
|
-
}, [
|
|
147
|
-
createElementVNode("div", {
|
|
148
|
-
ref_key: "wrapRef",
|
|
149
|
-
ref: wrapRef,
|
|
150
|
-
class: normalizeClass(unref(wrapKls)),
|
|
151
|
-
style: normalizeStyle(unref(style)),
|
|
152
|
-
onScroll: handleScroll
|
|
153
|
-
}, [
|
|
154
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
155
|
-
ref_key: "resizeRef",
|
|
156
|
-
ref: resizeRef,
|
|
157
|
-
class: normalizeClass(unref(resizeKls)),
|
|
158
|
-
style: normalizeStyle(_ctx.viewStyle)
|
|
159
|
-
}, {
|
|
160
|
-
default: withCtx(() => [
|
|
161
|
-
renderSlot(_ctx.$slots, "default")
|
|
162
|
-
]),
|
|
163
|
-
_: 3
|
|
164
|
-
}, 8, ["class", "style"]))
|
|
165
|
-
], 38),
|
|
166
|
-
!_ctx.native ? (openBlock(), createBlock(Bar, {
|
|
167
|
-
key: 0,
|
|
168
|
-
ref_key: "barRef",
|
|
169
|
-
ref: barRef,
|
|
170
|
-
height: sizeHeight.value,
|
|
171
|
-
width: sizeWidth.value,
|
|
172
|
-
always: _ctx.always,
|
|
173
|
-
"ratio-x": ratioX.value,
|
|
174
|
-
"ratio-y": ratioY.value
|
|
175
|
-
}, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"])) : createCommentVNode("v-if", true)
|
|
176
|
-
], 2);
|
|
177
|
-
};
|
|
5
|
+
const scrollbarProps = buildProps({
|
|
6
|
+
height: {
|
|
7
|
+
type: [String, Number],
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
maxHeight: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
native: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
wrapStyle: {
|
|
19
|
+
type: definePropType([String, Object, Array]),
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
wrapClass: {
|
|
23
|
+
type: [String, Array],
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
viewClass: {
|
|
27
|
+
type: [String, Array],
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
viewStyle: {
|
|
31
|
+
type: [String, Array, Object],
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
noresize: Boolean,
|
|
35
|
+
tag: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "div"
|
|
38
|
+
},
|
|
39
|
+
always: Boolean,
|
|
40
|
+
minSize: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 20
|
|
178
43
|
}
|
|
179
44
|
});
|
|
180
|
-
|
|
45
|
+
const scrollbarEmits = {
|
|
46
|
+
scroll: ({
|
|
47
|
+
scrollTop,
|
|
48
|
+
scrollLeft
|
|
49
|
+
}) => [scrollTop, scrollLeft].every(isNumber)
|
|
50
|
+
};
|
|
181
51
|
|
|
182
|
-
export {
|
|
52
|
+
export { scrollbarEmits, scrollbarProps };
|
|
183
53
|
//# sourceMappingURL=scrollbar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar.mjs","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbarRef\" :class=\"ns.b()\">\n <div ref=\"wrapRef\" :class=\"wrapKls\" :style=\"style\" @scroll=\"handleScroll\">\n <component\n :is=\"tag\"\n ref=\"resizeRef\"\n :class=\"resizeKls\"\n :style=\"viewStyle\"\n >\n <slot />\n </component>\n </div>\n <template v-if=\"!native\">\n <bar\n ref=\"barRef\"\n :height=\"sizeHeight\"\n :width=\"sizeWidth\"\n :always=\"always\"\n :ratio-x=\"ratioX\"\n :ratio-y=\"ratioY\"\n />\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n} from 'vue'\nimport { watch } from '../../config-provider'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { addUnit, debugWarn, isNumber, isObject } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { GAP } from './util'\nimport Bar from './bar.vue'\nimport { scrollbarContextKey } from './constants'\nimport { scrollbarEmits, scrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\nconst COMPONENT_NAME = 'ElScrollbar'\n\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(scrollbarProps)\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\n\nconst scrollbarRef = ref<HTMLDivElement>()\nconst wrapRef = ref<HTMLDivElement>()\nconst resizeRef = ref<HTMLElement>()\n\nconst sizeWidth = ref('0')\nconst sizeHeight = ref('0')\nconst barRef = ref<BarInstance>()\nconst ratioY = ref(1)\nconst ratioX = ref(1)\n\nconst style = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n if (props.height) style.height = addUnit(props.height)\n if (props.maxHeight) style.maxHeight = addUnit(props.maxHeight)\n return [props.wrapStyle, style]\n})\n\nconst wrapKls = computed(() => {\n return [\n props.wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !props.native },\n ]\n})\n\nconst resizeKls = computed(() => {\n return [ns.e('view'), props.viewClass]\n})\n\nconst handleScroll = () => {\n if (wrapRef.value) {\n barRef.value?.handleScroll(wrapRef.value)\n\n emit('scroll', {\n scrollTop: wrapRef.value.scrollTop,\n scrollLeft: wrapRef.value.scrollLeft,\n })\n }\n}\n\n// TODO: refactor method overrides, due to script setup dts\n// @ts-nocheck\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrapRef.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrapRef.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollLeft = value\n}\n\nconst update = () => {\n if (!wrapRef.value) return\n const offsetHeight = wrapRef.value.offsetHeight - GAP\n const offsetWidth = wrapRef.value.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrapRef.value.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrapRef.value.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\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update))\n stopResizeListener = useEventListener('resize', update)\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => [props.maxHeight, props.height],\n () => {\n if (!props.native)\n nextTick(() => {\n update()\n if (wrapRef.value) {\n barRef.value?.handleScroll(wrapRef.value)\n }\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbarRef,\n wrapElement: wrapRef,\n })\n)\n\nonMounted(() => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrapRef,\n /** @description update scrollbar state manually */\n update,\n /** @description scrolls to a particular set of coordinates */\n scrollTo,\n /** @description set distance to scroll top */\n setScrollTop,\n /** @description set distance to scroll left */\n setScrollLeft,\n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AAA,CAAA,CAAA;AACE,IAAA,SAAA,CAAA,MAAe;AACb,MAAO,IAAA,CAAA,KAAA,CAAA,MAAA;AAAA,QACT,QAAC,CAAA,MAAA;AAAA,UACJ,MAAA,EAAA,CAAA;AACD,SAAU,CAAA,CAAA;AAEV,KAAa,CAAA,CAAA;AAAA,IAEX,SAAA,CAAA,MAAA,MAAA,EAAA,CAAA,CAAA;AAAA,IAEA,MAAA,CAAA;AAAA,MAEA,OAAA;AAAA,MAEA,MAAA;AAAA,MAEA,QAAA;AAAA,MAEA,YAAA;AAAA,MACD,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"scrollbar.mjs","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: {\n type: Boolean,\n default: false,\n },\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n} as const)\nexport type ScrollbarProps = ExtractPropTypes<typeof scrollbarProps>\n\nexport const scrollbarEmits = {\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\n\nexport type ScrollbarInstance = InstanceType<typeof Scrollbar>\n"],"names":[],"mappings":";;;;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AACzB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AACzB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;AACjC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM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