@element-plus/nightly 0.0.20250221 → 0.0.20250223
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 +11 -9
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +11 -9
- 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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +42 -192
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +192 -42
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.mjs +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -38
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +38 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/collection/src/tokens.d.ts +2 -2
- package/es/components/color-picker/src/color-picker.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +2 -2
- package/es/components/dropdown/src/dropdown.mjs +4 -2
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +5 -5
- package/es/components/dropdown/src/dropdown2.mjs +4 -3
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/dropdown/src/tokens.d.ts +3 -2
- package/es/components/dropdown/src/tokens.mjs.map +1 -1
- package/es/components/dropdown/src/useDropdown.d.ts +0 -1
- package/es/components/dropdown/src/useDropdown.mjs +2 -90
- package/es/components/dropdown/src/useDropdown.mjs.map +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/index.mjs +19 -19
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +97 -15
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +15 -97
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +114 -45
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +45 -114
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +36 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -36
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +207 -53
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +53 -207
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +73 -32
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +32 -73
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +28 -62
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +62 -28
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -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 +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -1
- package/es/components/roving-focus-group/src/tokens.d.ts +2 -2
- package/es/components/roving-focus-group/src/tokens.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +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/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +71 -13
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +13 -71
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +18 -8
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +8 -18
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +33 -72
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +72 -33
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +28 -192
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +192 -28
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +2 -2
- package/es/components/tooltip-v2/index.mjs +4 -4
- package/es/components/tooltip-v2/src/arrow.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.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 +3 -3
- package/es/components/upload/src/upload-content.mjs +196 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -196
- package/es/components/upload/src/upload-content2.mjs.map +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/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +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/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +42 -191
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +191 -42
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -38
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +38 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/collection/src/tokens.d.ts +2 -2
- package/lib/components/color-picker/src/color-picker.js +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown.js +4 -2
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +5 -5
- package/lib/components/dropdown/src/dropdown2.js +4 -3
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/dropdown/src/tokens.d.ts +3 -2
- package/lib/components/dropdown/src/tokens.js.map +1 -1
- package/lib/components/dropdown/src/useDropdown.d.ts +0 -1
- package/lib/components/dropdown/src/useDropdown.js +0 -89
- package/lib/components/dropdown/src/useDropdown.js.map +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/index.js +19 -19
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +97 -16
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +16 -97
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +114 -46
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +46 -114
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +36 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -36
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +207 -53
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +53 -207
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +73 -34
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +34 -73
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +30 -62
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +62 -30
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -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 +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -1
- package/lib/components/roving-focus-group/src/tokens.d.ts +2 -2
- package/lib/components/roving-focus-group/src/tokens.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +170 -56
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +56 -170
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +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/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +71 -13
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +13 -71
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +18 -8
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +8 -18
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +33 -72
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +72 -33
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +28 -192
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +192 -28
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +2 -2
- package/lib/components/tooltip-v2/index.js +4 -4
- package/lib/components/tooltip-v2/src/arrow.js +22 -37
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +37 -22
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.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 +3 -3
- package/lib/components/upload/src/upload-content.js +195 -32
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +32 -195
- package/lib/components/upload/src/upload-content2.js.map +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/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +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,67 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
4
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import { CircleCheckFilled, WarningFilled, CircleCloseFilled, InfoFilled } from '@element-plus/icons-vue';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
5
3
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
32
|
-
unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: normalizeClass(unref(resultIcon).class)
|
|
35
|
-
}, null, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
36
|
-
])
|
|
37
|
-
], 2),
|
|
38
|
-
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
41
|
-
}, [
|
|
42
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
43
|
-
createElementVNode("p", null, toDisplayString(_ctx.title), 1)
|
|
44
|
-
])
|
|
45
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
46
|
-
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
|
|
47
|
-
key: 1,
|
|
48
|
-
class: normalizeClass(unref(ns).e("subtitle"))
|
|
49
|
-
}, [
|
|
50
|
-
renderSlot(_ctx.$slots, "sub-title", {}, () => [
|
|
51
|
-
createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
|
|
52
|
-
])
|
|
53
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
54
|
-
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
55
|
-
key: 2,
|
|
56
|
-
class: normalizeClass(unref(ns).e("extra"))
|
|
57
|
-
}, [
|
|
58
|
-
renderSlot(_ctx.$slots, "extra")
|
|
59
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
60
|
-
], 2);
|
|
61
|
-
};
|
|
4
|
+
const IconMap = {
|
|
5
|
+
success: "icon-success",
|
|
6
|
+
warning: "icon-warning",
|
|
7
|
+
error: "icon-error",
|
|
8
|
+
info: "icon-info"
|
|
9
|
+
};
|
|
10
|
+
const IconComponentMap = {
|
|
11
|
+
[IconMap.success]: CircleCheckFilled,
|
|
12
|
+
[IconMap.warning]: WarningFilled,
|
|
13
|
+
[IconMap.error]: CircleCloseFilled,
|
|
14
|
+
[IconMap.info]: InfoFilled
|
|
15
|
+
};
|
|
16
|
+
const resultProps = buildProps({
|
|
17
|
+
title: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
subTitle: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
icon: {
|
|
26
|
+
type: String,
|
|
27
|
+
values: ["success", "warning", "info", "error"],
|
|
28
|
+
default: "info"
|
|
62
29
|
}
|
|
63
30
|
});
|
|
64
|
-
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "result.vue"]]);
|
|
65
31
|
|
|
66
|
-
export {
|
|
32
|
+
export { IconComponentMap, IconMap, resultProps };
|
|
67
33
|
//# sourceMappingURL=result.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.
|
|
1
|
+
{"version":3,"file":"result.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 /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\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,33 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { resultProps, IconMap, IconComponentMap } from './result.mjs';
|
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
4
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
5
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
6
|
+
const __default__ = defineComponent({
|
|
7
|
+
name: "ElResult"
|
|
8
|
+
});
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...__default__,
|
|
11
|
+
props: resultProps,
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const ns = useNamespace("result");
|
|
15
|
+
const resultIcon = computed(() => {
|
|
16
|
+
const icon = props.icon;
|
|
17
|
+
const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
|
|
18
|
+
const iconComponent = IconComponentMap[iconClass] || IconComponentMap["icon-info"];
|
|
19
|
+
return {
|
|
20
|
+
class: iconClass,
|
|
21
|
+
component: iconComponent
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
return openBlock(), createElementBlock("div", {
|
|
26
|
+
class: normalizeClass(unref(ns).b())
|
|
27
|
+
}, [
|
|
28
|
+
createElementVNode("div", {
|
|
29
|
+
class: normalizeClass(unref(ns).e("icon"))
|
|
30
|
+
}, [
|
|
31
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
32
|
+
unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: normalizeClass(unref(resultIcon).class)
|
|
35
|
+
}, null, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
36
|
+
])
|
|
37
|
+
], 2),
|
|
38
|
+
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: normalizeClass(unref(ns).e("title"))
|
|
41
|
+
}, [
|
|
42
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
43
|
+
createElementVNode("p", null, toDisplayString(_ctx.title), 1)
|
|
44
|
+
])
|
|
45
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
46
|
+
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
|
|
47
|
+
key: 1,
|
|
48
|
+
class: normalizeClass(unref(ns).e("subtitle"))
|
|
49
|
+
}, [
|
|
50
|
+
renderSlot(_ctx.$slots, "sub-title", {}, () => [
|
|
51
|
+
createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
|
|
52
|
+
])
|
|
53
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
54
|
+
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
55
|
+
key: 2,
|
|
56
|
+
class: normalizeClass(unref(ns).e("extra"))
|
|
57
|
+
}, [
|
|
58
|
+
renderSlot(_ctx.$slots, "extra")
|
|
59
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
60
|
+
], 2);
|
|
61
|
+
};
|
|
29
62
|
}
|
|
30
63
|
});
|
|
64
|
+
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "result.vue"]]);
|
|
31
65
|
|
|
32
|
-
export {
|
|
66
|
+
export { Result as default };
|
|
33
67
|
//# sourceMappingURL=result2.mjs.map
|
|
@@ -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.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots['sub-title']\" :class=\"ns.e('subtitle')\">\n <slot name=\"sub-title\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { IconComponentMap, IconMap, resultProps } from './result'\n\ndefineOptions({\n name: 'ElResult',\n})\n\nconst props = defineProps(resultProps)\n\nconst ns = useNamespace('result')\n\nconst resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;mCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,UAAA,GAAa,SAAS,MAAM;AAChC,MAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA;AACnB,MAAA,MAAM,YAAY,IAAQ,IAAA,OAAA,CAAQ,IAAI,CAAI,GAAA,OAAA,CAAQ,IAAI,CAAI,GAAA,WAAA,CAAA;AAC1D,MAAA,MAAM,aACJ,GAAA,gBAAA,CAAiB,SAAS,CAAA,IAAK,iBAAiB,WAAW,CAAA,CAAA;AAE7D,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,SAAA;AAAA,QACP,SAAW,EAAA,aAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -19,7 +19,7 @@ const _sfc_main = defineComponent({
|
|
|
19
19
|
const currentTabbedId = ref((_a = props.currentTabId || props.defaultCurrentTabId) != null ? _a : null);
|
|
20
20
|
const isBackingOut = ref(false);
|
|
21
21
|
const isClickFocus = ref(false);
|
|
22
|
-
const rovingFocusGroupRef = ref(
|
|
22
|
+
const rovingFocusGroupRef = ref();
|
|
23
23
|
const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
|
|
24
24
|
const rovingFocusGroupRootStyle = computed(() => {
|
|
25
25
|
return [
|
|
@@ -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 watch,\n} from 'vue'\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
|
|
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 watch,\n} from 'vue'\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>()\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","_renderSlot"],"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,KAAM,CAAA,KAAA,EAAO,EAAE,IAAA,EAAQ,EAAA;AACrB,IAAA,IAAA,EAAM,CAAkB;AAAA,IACrB,MAAA,eAAsB,GAAA,GAAA,CAAA,CAAA,EAAM,GAAwB,KAAA,CAAA,YAAA,IAAA,KAAA,CAAA,mBAAA,KAAA,IAAA,GAAA,EAAA,GAAA,IAAA,CAAA,CAAA;AAAA,IACvD,MAAA,YAAA,GAAA,GAAA,CAAA,KAAA,CAAA,CAAA;AACA,IAAM,MAAA,YAAA,GAAe,IAAI,KAAK,CAAA,CAAA;AAC9B,IAAM,MAAA,mBAAmB,GAAK,GAAA,EAAA,CAAA;AAC9B,IAAA,MAAM,sBAAsBA,wBAAiB,EAAA,KAAA,CAAA,CAAA,CAAA;AAC7C,IAAM,MAAA,yBAAe,GAAA,QAAA,CAAA,MAAA;AAAA,MACnB,OAAA;AAA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A,QAAA,CAAA,eAAA,CAAA;AAAA,MACF,IAAA,EAAA,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA;AAEA,MAAA,QAAe,EAAA,QAAA,CAAA,MAAA;AAAA,QACC,OAAA,KAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA;AACZ,OAAA,CAAA;AAAgB,MAClB,mBAAA;AAAA,MACA,yBAAM;AACJ,MAAA,WAAA,EAAA,KAAqB,CAAA,KAAA,EAAA,aAAA,CAAA;AAAA,MACvB,GAAA,EAAA,KAAA,CAAA,KAAA,EAAA,KAAA,CAAA;AAAA,MACF,WAAA;AAEA,MAAM,cAAA;AACJ,MAAK,MAAA;AAAqB,MAC5B,OAAA;AAEA,MAAA,WAA0C;AAAA,KACxC,CAAA,CAAA;AAAyC,IACzC,KAAA,CAAA,MAAY,KAAA,CAAA,YAAa,EAAA,CAAA,GAAA,KAAA;AAAA,MACzB,qBAAyB,GAAA,GAAA,IAAA,IAAA,GAAA,GAAA,GAAA,IAAA,CAAA;AACvB,KAAO,CAAA,CAAA;AAA2B,IAAA,gBACnC,CAAA,mBAAA,EAAA,eAAA,EAAA,gBAAA,CAAA,CAAA;AAAA,GACD;AAAA,CACA,CAAA,CAAA;AACuC,SACvC,WAAW,CAAA,IAAY,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;AAAA,EACvB,OAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;AAAA,CACA;AACA,6BACA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,6BAAA,CAAA,CAAA,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createCollectionWithScope } from '../../collection/src/
|
|
1
|
+
import { createCollectionWithScope } from '../../collection/src/collection.mjs';
|
|
2
2
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
3
|
|
|
4
4
|
const rovingFocusGroupProps = buildProps({
|
|
@@ -26,7 +26,7 @@ const _sfc_main = defineComponent({
|
|
|
26
26
|
const { currentTabbedId, loop, onItemFocus, onItemShiftTab } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
|
|
27
27
|
const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
|
|
28
28
|
const id = useId();
|
|
29
|
-
const rovingFocusGroupItemRef = ref(
|
|
29
|
+
const rovingFocusGroupItemRef = ref();
|
|
30
30
|
const handleMousedown = composeEventHandlers((e) => {
|
|
31
31
|
emit("mousedown", e);
|
|
32
32
|
}, (e) => {
|
|
@@ -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
|
|
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>()\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 { code, shiftKey, target, currentTarget } = e as KeyboardEvent\n if (code === 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","_resolveComponent","_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;;;;;AAiCA,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,EAA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op: Ref<ElRovingFocusGroupProps['loop']>;
|
|
8
8
|
orientation: Ref<ElRovingFocusGroupProps['orientation']>;
|
|
9
9
|
tabIndex: Ref<number>;
|
|
10
|
-
rovingFocusGroupRef: Ref<HTMLElement |
|
|
10
|
+
rovingFocusGroupRef: Ref<HTMLElement | undefined>;
|
|
11
11
|
rovingFocusGroupRootStyle: Ref<StyleValue>;
|
|
12
12
|
onBlur: EventHandler;
|
|
13
13
|
onFocus: EventHandler<FocusEvent>;
|
|
@@ -16,7 +16,7 @@ export type RovingGroupInjectionContext = {
|
|
|
16
16
|
onItemShiftTab: () => void;
|
|
17
17
|
};
|
|
18
18
|
export type RovingFocusGroupItemInjectionContext = {
|
|
19
|
-
rovingFocusGroupItemRef: Ref<HTMLElement |
|
|
19
|
+
rovingFocusGroupItemRef: Ref<HTMLElement | undefined>;
|
|
20
20
|
tabIndex: Ref<number>;
|
|
21
21
|
handleMousedown: EventHandler;
|
|
22
22
|
handleFocus: EventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/tokens.ts"],"sourcesContent":["import type { InjectionKey, Ref, StyleValue } from 'vue'\nimport type { ElRovingFocusGroupProps } from './roving-focus-group'\n\ntype EventHandler<T = Event> = (e: T) => void\n\nexport type RovingGroupInjectionContext = {\n currentTabbedId: Ref<string | null>\n dir: Ref<ElRovingFocusGroupProps['dir']>\n loop: Ref<ElRovingFocusGroupProps['loop']>\n orientation: Ref<ElRovingFocusGroupProps['orientation']>\n tabIndex: Ref<number>\n rovingFocusGroupRef: Ref<HTMLElement |
|
|
1
|
+
{"version":3,"file":"tokens.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/tokens.ts"],"sourcesContent":["import type { InjectionKey, Ref, StyleValue } from 'vue'\nimport type { ElRovingFocusGroupProps } from './roving-focus-group'\n\ntype EventHandler<T = Event> = (e: T) => void\n\nexport type RovingGroupInjectionContext = {\n currentTabbedId: Ref<string | null>\n dir: Ref<ElRovingFocusGroupProps['dir']>\n loop: Ref<ElRovingFocusGroupProps['loop']>\n orientation: Ref<ElRovingFocusGroupProps['orientation']>\n tabIndex: Ref<number>\n rovingFocusGroupRef: Ref<HTMLElement | undefined>\n rovingFocusGroupRootStyle: Ref<StyleValue>\n onBlur: EventHandler\n onFocus: EventHandler<FocusEvent>\n onMousedown: EventHandler\n onItemFocus: (id: string) => void\n onItemShiftTab: () => void\n}\n\nexport type RovingFocusGroupItemInjectionContext = {\n rovingFocusGroupItemRef: Ref<HTMLElement | undefined>\n tabIndex: Ref<number>\n handleMousedown: EventHandler\n handleFocus: EventHandler\n handleKeydown: EventHandler\n}\n\nexport const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey<RovingGroupInjectionContext> =\n Symbol('elRovingFocusGroup')\n\nexport const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey<RovingFocusGroupItemInjectionContext> =\n Symbol('elRovingFocusGroupItem')\n"],"names":[],"mappings":"AAAY,MAAC,gCAAgC,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACjE,MAAC,qCAAqC,GAAG,MAAM,CAAC,wBAAwB;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Scrollbar from './src/
|
|
1
|
+
import Scrollbar from './src/scrollbar.mjs';
|
|
2
2
|
export { BAR_MAP, GAP, renderThumbStyle } from './src/util.mjs';
|
|
3
|
-
export { scrollbarEmits, scrollbarProps } from './src/
|
|
3
|
+
export { scrollbarEmits, scrollbarProps } from './src/scrollbar2.mjs';
|
|
4
4
|
export { thumbProps } from './src/thumb.mjs';
|
|
5
5
|
export { scrollbarContextKey } from './src/constants.mjs';
|
|
6
6
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,60 +1,175 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, watch, nextTick, provide, reactive, onActivated, onMounted, onUpdated, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, createBlock, resolveDynamicComponent, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
2
|
+
import { useResizeObserver, useEventListener } from '@vueuse/core';
|
|
3
|
+
import Bar from './bar2.mjs';
|
|
4
|
+
import { scrollbarContextKey } from './constants.mjs';
|
|
5
|
+
import { scrollbarProps, scrollbarEmits } from './scrollbar2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
9
|
+
import { isObject } from '@vue/shared';
|
|
3
10
|
import { isNumber } from '../../../utils/types.mjs';
|
|
11
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
|
4
12
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
43
|
-
},
|
|
44
|
-
tabindex: {
|
|
45
|
-
type: [String, Number],
|
|
46
|
-
default: void 0
|
|
47
|
-
},
|
|
48
|
-
id: String,
|
|
49
|
-
role: String,
|
|
50
|
-
...useAriaProps(["ariaLabel", "ariaOrientation"])
|
|
13
|
+
const COMPONENT_NAME = "ElScrollbar";
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: COMPONENT_NAME
|
|
51
16
|
});
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: scrollbarProps,
|
|
20
|
+
emits: scrollbarEmits,
|
|
21
|
+
setup(__props, { expose, emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const ns = useNamespace("scrollbar");
|
|
24
|
+
let stopResizeObserver = void 0;
|
|
25
|
+
let stopResizeListener = void 0;
|
|
26
|
+
let wrapScrollTop = 0;
|
|
27
|
+
let wrapScrollLeft = 0;
|
|
28
|
+
const scrollbarRef = ref();
|
|
29
|
+
const wrapRef = ref();
|
|
30
|
+
const resizeRef = ref();
|
|
31
|
+
const barRef = ref();
|
|
32
|
+
const wrapStyle = computed(() => {
|
|
33
|
+
const style = {};
|
|
34
|
+
if (props.height)
|
|
35
|
+
style.height = addUnit(props.height);
|
|
36
|
+
if (props.maxHeight)
|
|
37
|
+
style.maxHeight = addUnit(props.maxHeight);
|
|
38
|
+
return [props.wrapStyle, style];
|
|
39
|
+
});
|
|
40
|
+
const wrapKls = computed(() => {
|
|
41
|
+
return [
|
|
42
|
+
props.wrapClass,
|
|
43
|
+
ns.e("wrap"),
|
|
44
|
+
{ [ns.em("wrap", "hidden-default")]: !props.native }
|
|
45
|
+
];
|
|
46
|
+
});
|
|
47
|
+
const resizeKls = computed(() => {
|
|
48
|
+
return [ns.e("view"), props.viewClass];
|
|
49
|
+
});
|
|
50
|
+
const handleScroll = () => {
|
|
51
|
+
var _a;
|
|
52
|
+
if (wrapRef.value) {
|
|
53
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
54
|
+
wrapScrollTop = wrapRef.value.scrollTop;
|
|
55
|
+
wrapScrollLeft = wrapRef.value.scrollLeft;
|
|
56
|
+
emit("scroll", {
|
|
57
|
+
scrollTop: wrapRef.value.scrollTop,
|
|
58
|
+
scrollLeft: wrapRef.value.scrollLeft
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function scrollTo(arg1, arg2) {
|
|
63
|
+
if (isObject(arg1)) {
|
|
64
|
+
wrapRef.value.scrollTo(arg1);
|
|
65
|
+
} else if (isNumber(arg1) && isNumber(arg2)) {
|
|
66
|
+
wrapRef.value.scrollTo(arg1, arg2);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const setScrollTop = (value) => {
|
|
70
|
+
if (!isNumber(value)) {
|
|
71
|
+
debugWarn(COMPONENT_NAME, "value must be a number");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
wrapRef.value.scrollTop = value;
|
|
75
|
+
};
|
|
76
|
+
const setScrollLeft = (value) => {
|
|
77
|
+
if (!isNumber(value)) {
|
|
78
|
+
debugWarn(COMPONENT_NAME, "value must be a number");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
wrapRef.value.scrollLeft = value;
|
|
82
|
+
};
|
|
83
|
+
const update = () => {
|
|
84
|
+
var _a;
|
|
85
|
+
(_a = barRef.value) == null ? void 0 : _a.update();
|
|
86
|
+
};
|
|
87
|
+
watch(() => props.noresize, (noresize) => {
|
|
88
|
+
if (noresize) {
|
|
89
|
+
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
90
|
+
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
91
|
+
} else {
|
|
92
|
+
({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update));
|
|
93
|
+
stopResizeListener = useEventListener("resize", update);
|
|
94
|
+
}
|
|
95
|
+
}, { immediate: true });
|
|
96
|
+
watch(() => [props.maxHeight, props.height], () => {
|
|
97
|
+
if (!props.native)
|
|
98
|
+
nextTick(() => {
|
|
99
|
+
var _a;
|
|
100
|
+
update();
|
|
101
|
+
if (wrapRef.value) {
|
|
102
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
provide(scrollbarContextKey, reactive({
|
|
107
|
+
scrollbarElement: scrollbarRef,
|
|
108
|
+
wrapElement: wrapRef
|
|
109
|
+
}));
|
|
110
|
+
onActivated(() => {
|
|
111
|
+
if (wrapRef.value) {
|
|
112
|
+
wrapRef.value.scrollTop = wrapScrollTop;
|
|
113
|
+
wrapRef.value.scrollLeft = wrapScrollLeft;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
onMounted(() => {
|
|
117
|
+
if (!props.native)
|
|
118
|
+
nextTick(() => {
|
|
119
|
+
update();
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
onUpdated(() => update());
|
|
123
|
+
expose({
|
|
124
|
+
wrapRef,
|
|
125
|
+
update,
|
|
126
|
+
scrollTo,
|
|
127
|
+
setScrollTop,
|
|
128
|
+
setScrollLeft,
|
|
129
|
+
handleScroll
|
|
130
|
+
});
|
|
131
|
+
return (_ctx, _cache) => {
|
|
132
|
+
return openBlock(), createElementBlock("div", {
|
|
133
|
+
ref_key: "scrollbarRef",
|
|
134
|
+
ref: scrollbarRef,
|
|
135
|
+
class: normalizeClass(unref(ns).b())
|
|
136
|
+
}, [
|
|
137
|
+
createElementVNode("div", {
|
|
138
|
+
ref_key: "wrapRef",
|
|
139
|
+
ref: wrapRef,
|
|
140
|
+
class: normalizeClass(unref(wrapKls)),
|
|
141
|
+
style: normalizeStyle(unref(wrapStyle)),
|
|
142
|
+
tabindex: _ctx.tabindex,
|
|
143
|
+
onScroll: handleScroll
|
|
144
|
+
}, [
|
|
145
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
146
|
+
id: _ctx.id,
|
|
147
|
+
ref_key: "resizeRef",
|
|
148
|
+
ref: resizeRef,
|
|
149
|
+
class: normalizeClass(unref(resizeKls)),
|
|
150
|
+
style: normalizeStyle(_ctx.viewStyle),
|
|
151
|
+
role: _ctx.role,
|
|
152
|
+
"aria-label": _ctx.ariaLabel,
|
|
153
|
+
"aria-orientation": _ctx.ariaOrientation
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [
|
|
156
|
+
renderSlot(_ctx.$slots, "default")
|
|
157
|
+
]),
|
|
158
|
+
_: 3
|
|
159
|
+
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
|
|
160
|
+
], 46, ["tabindex"]),
|
|
161
|
+
!_ctx.native ? (openBlock(), createBlock(Bar, {
|
|
162
|
+
key: 0,
|
|
163
|
+
ref_key: "barRef",
|
|
164
|
+
ref: barRef,
|
|
165
|
+
always: _ctx.always,
|
|
166
|
+
"min-size": _ctx.minSize
|
|
167
|
+
}, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)
|
|
168
|
+
], 2);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "scrollbar.vue"]]);
|
|
58
173
|
|
|
59
|
-
export {
|
|
174
|
+
export { Scrollbar as default };
|
|
60
175
|
//# sourceMappingURL=scrollbar.mjs.map
|