@element-plus/nightly 0.0.20260406 → 0.0.20260408
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 +37 -8
- package/dist/index.full.min.js +6 -6
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +6 -6
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +37 -8
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/component.mjs +3 -3
- package/es/components/affix/src/affix.vue.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +1 -1
- package/es/components/anchor/src/anchor.d.ts +1 -1
- package/es/components/anchor/src/anchor.vue.d.ts +4 -4
- package/es/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs +4 -2
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +1 -1
- package/es/components/calendar/style/css.mjs +1 -1
- package/es/components/calendar/style/index.mjs +1 -1
- package/es/components/carousel/src/carousel.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +2 -2
- package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/es/components/col/src/col.vue.d.ts +1 -1
- package/es/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- package/es/components/divider/src/divider.d.ts +1 -1
- package/es/components/divider/src/divider.vue.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +2 -2
- package/es/components/dropdown/src/dropdown.vue.d.ts +6 -6
- package/es/components/dropdown/style/css.mjs +1 -1
- package/es/components/dropdown/style/index.mjs +1 -1
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/link/src/link.vue.d.ts +1 -1
- package/es/components/mention/src/mention.d.ts +1 -1
- package/es/components/mention/src/mention.vue_vue_type_script_setup_true_lang.mjs +5 -3
- package/es/components/mention/src/mention.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/menu/src/menu.d.ts +4 -4
- package/es/components/menu/src/utils/menu-item.mjs +1 -1
- package/es/components/menu/src/utils/submenu.mjs +1 -1
- package/es/components/message/src/message.vue.d.ts +3 -3
- package/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.vue.d.ts +1 -1
- package/es/components/progress/src/progress.vue.d.ts +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -2
- package/es/components/segmented/src/segmented.d.ts +1 -1
- package/es/components/select/src/option.vue.d.ts +1 -0
- package/es/components/select/src/option.vue_vue_type_script_lang.mjs +11 -0
- package/es/components/select/src/option.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/option2.mjs +2 -1
- package/es/components/select/src/option2.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +6 -5
- package/es/components/select/src/type.d.ts +1 -0
- package/es/components/select-v2/src/option-item.mjs +2 -1
- package/es/components/select-v2/src/option-item.mjs.map +1 -1
- package/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs +13 -1
- package/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/slider/src/button.vue.d.ts +1 -1
- package/es/components/slider/src/slider.vue.d.ts +1 -1
- package/es/components/space/src/space.d.ts +4 -4
- package/es/components/splitter/src/splitter.d.ts +1 -1
- package/es/components/steps/src/steps.d.ts +1 -1
- package/es/components/steps/src/steps.vue.d.ts +1 -1
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/table/src/table.vue.d.ts +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/tree-select/src/tree-select.vue.d.ts +2 -2
- package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/props.d.ts +2 -2
- package/es/constants/index.mjs +2 -2
- package/es/directives/trap-focus/index.mjs +1 -1
- package/es/index.mjs +9 -9
- package/es/plugin.mjs +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +107 -107
- package/lib/components/affix/src/affix.vue.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +1 -1
- package/lib/components/anchor/src/anchor.d.ts +1 -1
- package/lib/components/anchor/src/anchor.vue.d.ts +4 -4
- package/lib/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js +4 -2
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +1 -1
- package/lib/components/calendar/style/css.js +1 -1
- package/lib/components/calendar/style/index.js +1 -1
- package/lib/components/carousel/src/carousel.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +2 -2
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +12 -12
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js +11 -11
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/lib/components/col/src/col.vue.d.ts +1 -1
- package/lib/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- package/lib/components/divider/src/divider.d.ts +1 -1
- package/lib/components/divider/src/divider.vue.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown.vue.d.ts +6 -6
- package/lib/components/dropdown/style/css.js +1 -1
- package/lib/components/dropdown/style/index.js +1 -1
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/index.js +123 -123
- package/lib/components/input/src/input.d.ts +1 -1
- package/lib/components/link/src/link.vue.d.ts +1 -1
- package/lib/components/mention/src/mention.d.ts +1 -1
- package/lib/components/mention/src/mention.vue_vue_type_script_setup_true_lang.js +4 -2
- package/lib/components/mention/src/mention.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/menu/src/menu.d.ts +4 -4
- package/lib/components/menu/src/utils/menu-item.js +11 -11
- package/lib/components/menu/src/utils/menu-item.js.map +1 -1
- package/lib/components/menu/src/utils/submenu.js +9 -9
- package/lib/components/menu/src/utils/submenu.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +3 -3
- package/lib/components/message/src/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/lib/components/message/src/message.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.vue.d.ts +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -2
- package/lib/components/segmented/src/segmented.d.ts +1 -1
- package/lib/components/select/src/option.vue.d.ts +1 -0
- package/lib/components/select/src/option.vue_vue_type_script_lang.js +11 -0
- package/lib/components/select/src/option.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/option2.js +2 -1
- package/lib/components/select/src/option2.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +6 -5
- package/lib/components/select/src/type.d.ts +1 -0
- package/lib/components/select-v2/src/option-item.js +2 -1
- package/lib/components/select-v2/src/option-item.js.map +1 -1
- package/lib/components/select-v2/src/option-item.vue_vue_type_script_lang.js +13 -1
- package/lib/components/select-v2/src/option-item.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/slider/src/button.vue.d.ts +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +1 -1
- package/lib/components/space/src/space.d.ts +4 -4
- package/lib/components/splitter/src/splitter.d.ts +1 -1
- package/lib/components/steps/src/steps.d.ts +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +1 -1
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/table/src/table.vue.d.ts +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/tree-select/src/tree-select.vue.d.ts +2 -2
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/props.d.ts +2 -2
- package/lib/constants/index.js +2 -2
- package/lib/directives/trap-focus/index.js +5 -5
- package/lib/directives/trap-focus/index.js.map +1 -1
- package/lib/index.js +126 -126
- package/lib/plugin.js +12 -12
- 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,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_aria = require('../../../../
|
|
3
|
-
const require_aria$1 = require('../../../../
|
|
2
|
+
const require_aria = require('../../../../constants/aria.js');
|
|
3
|
+
const require_aria$1 = require('../../../../utils/dom/aria.js');
|
|
4
4
|
const require_event = require('../../../../utils/dom/event.js');
|
|
5
5
|
const require_submenu = require('./submenu.js');
|
|
6
6
|
|
|
@@ -23,22 +23,22 @@ var MenuItem = class {
|
|
|
23
23
|
const code = require_event.getEventCode(event);
|
|
24
24
|
let prevDef = false;
|
|
25
25
|
switch (code) {
|
|
26
|
-
case require_aria
|
|
27
|
-
require_aria.triggerEvent(event.currentTarget, "mouseenter");
|
|
26
|
+
case require_aria.EVENT_CODE.down:
|
|
27
|
+
require_aria$1.triggerEvent(event.currentTarget, "mouseenter");
|
|
28
28
|
this.submenu && this.submenu.gotoSubIndex(0);
|
|
29
29
|
prevDef = true;
|
|
30
30
|
break;
|
|
31
|
-
case require_aria
|
|
32
|
-
require_aria.triggerEvent(event.currentTarget, "mouseenter");
|
|
31
|
+
case require_aria.EVENT_CODE.up:
|
|
32
|
+
require_aria$1.triggerEvent(event.currentTarget, "mouseenter");
|
|
33
33
|
this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);
|
|
34
34
|
prevDef = true;
|
|
35
35
|
break;
|
|
36
|
-
case require_aria
|
|
37
|
-
require_aria.triggerEvent(event.currentTarget, "mouseleave");
|
|
36
|
+
case require_aria.EVENT_CODE.tab:
|
|
37
|
+
require_aria$1.triggerEvent(event.currentTarget, "mouseleave");
|
|
38
38
|
break;
|
|
39
|
-
case require_aria
|
|
40
|
-
case require_aria
|
|
41
|
-
case require_aria
|
|
39
|
+
case require_aria.EVENT_CODE.enter:
|
|
40
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
41
|
+
case require_aria.EVENT_CODE.space:
|
|
42
42
|
prevDef = true;
|
|
43
43
|
event.currentTarget.click();
|
|
44
44
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item.js","names":["SubMenu","getEventCode","EVENT_CODE"],"sources":["../../../../../../../packages/components/menu/src/utils/menu-item.ts"],"sourcesContent":["// @ts-nocheck\nimport { getEventCode, triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport SubMenu from './submenu'\n\nclass MenuItem {\n public submenu: SubMenu = null\n constructor(\n public domNode: HTMLElement,\n namespace: string\n ) {\n this.submenu = null\n this.init(namespace)\n }\n\n init(namespace: string): void {\n this.domNode.setAttribute('tabindex', '0')\n const menuChild = this.domNode.querySelector(`.${namespace}-menu`)\n if (menuChild) {\n this.submenu = new SubMenu(this, menuChild)\n }\n this.addListeners()\n }\n\n addListeners(): void {\n this.domNode.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = getEventCode(event)\n let prevDef = false\n\n switch (code) {\n case EVENT_CODE.down: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu && this.submenu.gotoSubIndex(0)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu &&\n this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n }\n })\n }\n}\n\nexport default MenuItem\n"],"mappings":";;;;;;;AAKA,IAAM,WAAN,MAAe;CAEb,YACE,AAAO,SACP,WACA;EAFO;iBAFiB;AAKxB,OAAK,UAAU;AACf,OAAK,KAAK,UAAU;;CAGtB,KAAK,WAAyB;AAC5B,OAAK,QAAQ,aAAa,YAAY,IAAI;EAC1C,MAAM,YAAY,KAAK,QAAQ,cAAc,IAAI,UAAU,OAAO;AAClE,MAAI,UACF,MAAK,UAAU,IAAIA,wBAAQ,MAAM,UAAU;AAE7C,OAAK,cAAc;;CAGrB,eAAqB;AACnB,OAAK,QAAQ,iBAAiB,YAAY,UAAyB;GACjE,MAAM,OAAOC,2BAAa,MAAM;GAChC,IAAI,UAAU;AAEd,WAAQ,MAAR;IACE,KAAKC,
|
|
1
|
+
{"version":3,"file":"menu-item.js","names":["SubMenu","getEventCode","EVENT_CODE"],"sources":["../../../../../../../packages/components/menu/src/utils/menu-item.ts"],"sourcesContent":["// @ts-nocheck\nimport { getEventCode, triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport SubMenu from './submenu'\n\nclass MenuItem {\n public submenu: SubMenu = null\n constructor(\n public domNode: HTMLElement,\n namespace: string\n ) {\n this.submenu = null\n this.init(namespace)\n }\n\n init(namespace: string): void {\n this.domNode.setAttribute('tabindex', '0')\n const menuChild = this.domNode.querySelector(`.${namespace}-menu`)\n if (menuChild) {\n this.submenu = new SubMenu(this, menuChild)\n }\n this.addListeners()\n }\n\n addListeners(): void {\n this.domNode.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = getEventCode(event)\n let prevDef = false\n\n switch (code) {\n case EVENT_CODE.down: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu && this.submenu.gotoSubIndex(0)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu &&\n this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n }\n })\n }\n}\n\nexport default MenuItem\n"],"mappings":";;;;;;;AAKA,IAAM,WAAN,MAAe;CAEb,YACE,AAAO,SACP,WACA;EAFO;iBAFiB;AAKxB,OAAK,UAAU;AACf,OAAK,KAAK,UAAU;;CAGtB,KAAK,WAAyB;AAC5B,OAAK,QAAQ,aAAa,YAAY,IAAI;EAC1C,MAAM,YAAY,KAAK,QAAQ,cAAc,IAAI,UAAU,OAAO;AAClE,MAAI,UACF,MAAK,UAAU,IAAIA,wBAAQ,MAAM,UAAU;AAE7C,OAAK,cAAc;;CAGrB,eAAqB;AACnB,OAAK,QAAQ,iBAAiB,YAAY,UAAyB;GACjE,MAAM,OAAOC,2BAAa,MAAM;GAChC,IAAI,UAAU;AAEd,WAAQ,MAAR;IACE,KAAKC,wBAAW;AACd,iCAAa,MAAM,eAA8B,aAAa;AAC9D,UAAK,WAAW,KAAK,QAAQ,aAAa,EAAE;AAC5C,eAAU;AACV;IAEF,KAAKA,wBAAW;AACd,iCAAa,MAAM,eAA8B,aAAa;AAC9D,UAAK,WACH,KAAK,QAAQ,aAAa,KAAK,QAAQ,aAAa,SAAS,EAAE;AACjE,eAAU;AACV;IAEF,KAAKA,wBAAW;AACd,iCAAa,MAAM,eAA8B,aAAa;AAC9D;IAEF,KAAKA,wBAAW;IAChB,KAAKA,wBAAW;IAChB,KAAKA,wBAAW;AACd,eAAU;AACT,KAAC,MAAM,cAA8B,OAAO;AAC7C;;AAGJ,OAAI,QACF,OAAM,gBAAgB;IAExB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_aria = require('../../../../
|
|
3
|
-
const require_aria$1 = require('../../../../
|
|
2
|
+
const require_aria = require('../../../../constants/aria.js');
|
|
3
|
+
const require_aria$1 = require('../../../../utils/dom/aria.js');
|
|
4
4
|
const require_event = require('../../../../utils/dom/event.js');
|
|
5
5
|
|
|
6
6
|
//#region ../../packages/components/menu/src/utils/submenu.ts
|
|
@@ -29,20 +29,20 @@ var SubMenu = class {
|
|
|
29
29
|
const code = require_event.getEventCode(event);
|
|
30
30
|
let prevDef = false;
|
|
31
31
|
switch (code) {
|
|
32
|
-
case require_aria
|
|
32
|
+
case require_aria.EVENT_CODE.down:
|
|
33
33
|
this.gotoSubIndex(this.subIndex + 1);
|
|
34
34
|
prevDef = true;
|
|
35
35
|
break;
|
|
36
|
-
case require_aria
|
|
36
|
+
case require_aria.EVENT_CODE.up:
|
|
37
37
|
this.gotoSubIndex(this.subIndex - 1);
|
|
38
38
|
prevDef = true;
|
|
39
39
|
break;
|
|
40
|
-
case require_aria
|
|
41
|
-
require_aria.triggerEvent(parentNode, "mouseleave");
|
|
40
|
+
case require_aria.EVENT_CODE.tab:
|
|
41
|
+
require_aria$1.triggerEvent(parentNode, "mouseleave");
|
|
42
42
|
break;
|
|
43
|
-
case require_aria
|
|
44
|
-
case require_aria
|
|
45
|
-
case require_aria
|
|
43
|
+
case require_aria.EVENT_CODE.enter:
|
|
44
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
45
|
+
case require_aria.EVENT_CODE.space:
|
|
46
46
|
prevDef = true;
|
|
47
47
|
event.currentTarget.click();
|
|
48
48
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submenu.js","names":["getEventCode","EVENT_CODE"],"sources":["../../../../../../../packages/components/menu/src/utils/submenu.ts"],"sourcesContent":["// @ts-nocheck\nimport { getEventCode, triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\n\nimport type MenuItem from './menu-item'\n\nclass SubMenu {\n public subMenuItems: NodeList\n public subIndex = 0\n constructor(\n public parent: MenuItem,\n public domNode: ParentNode\n ) {\n this.subIndex = 0\n this.init()\n }\n\n init(): void {\n this.subMenuItems = this.domNode.querySelectorAll('li')\n this.addListeners()\n }\n\n gotoSubIndex(idx: number): void {\n if (idx === this.subMenuItems.length) {\n idx = 0\n } else if (idx < 0) {\n idx = this.subMenuItems.length - 1\n }\n ;(this.subMenuItems[idx] as HTMLElement).focus()\n this.subIndex = idx\n }\n\n addListeners(): void {\n const parentNode = this.parent.domNode\n Array.prototype.forEach.call(this.subMenuItems, (el: Element) => {\n el.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = getEventCode(event)\n let prevDef = false\n\n switch (code) {\n case EVENT_CODE.down: {\n this.gotoSubIndex(this.subIndex + 1)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n this.gotoSubIndex(this.subIndex - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(parentNode as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n event.stopPropagation()\n }\n return false\n })\n })\n }\n}\n\nexport default SubMenu\n"],"mappings":";;;;;;AAMA,IAAM,UAAN,MAAc;CAGZ,YACE,AAAO,QACP,AAAO,SACP;EAFO;EACA;kBAHS;AAKhB,OAAK,WAAW;AAChB,OAAK,MAAM;;CAGb,OAAa;AACX,OAAK,eAAe,KAAK,QAAQ,iBAAiB,KAAK;AACvD,OAAK,cAAc;;CAGrB,aAAa,KAAmB;AAC9B,MAAI,QAAQ,KAAK,aAAa,OAC5B,OAAM;WACG,MAAM,EACf,OAAM,KAAK,aAAa,SAAS;AAElC,EAAC,KAAK,aAAa,KAAqB,OAAO;AAChD,OAAK,WAAW;;CAGlB,eAAqB;EACnB,MAAM,aAAa,KAAK,OAAO;AAC/B,QAAM,UAAU,QAAQ,KAAK,KAAK,eAAe,OAAgB;AAC/D,MAAG,iBAAiB,YAAY,UAAyB;IACvD,MAAM,OAAOA,2BAAa,MAAM;IAChC,IAAI,UAAU;AAEd,YAAQ,MAAR;KACE,KAAKC,
|
|
1
|
+
{"version":3,"file":"submenu.js","names":["getEventCode","EVENT_CODE"],"sources":["../../../../../../../packages/components/menu/src/utils/submenu.ts"],"sourcesContent":["// @ts-nocheck\nimport { getEventCode, triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\n\nimport type MenuItem from './menu-item'\n\nclass SubMenu {\n public subMenuItems: NodeList\n public subIndex = 0\n constructor(\n public parent: MenuItem,\n public domNode: ParentNode\n ) {\n this.subIndex = 0\n this.init()\n }\n\n init(): void {\n this.subMenuItems = this.domNode.querySelectorAll('li')\n this.addListeners()\n }\n\n gotoSubIndex(idx: number): void {\n if (idx === this.subMenuItems.length) {\n idx = 0\n } else if (idx < 0) {\n idx = this.subMenuItems.length - 1\n }\n ;(this.subMenuItems[idx] as HTMLElement).focus()\n this.subIndex = idx\n }\n\n addListeners(): void {\n const parentNode = this.parent.domNode\n Array.prototype.forEach.call(this.subMenuItems, (el: Element) => {\n el.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = getEventCode(event)\n let prevDef = false\n\n switch (code) {\n case EVENT_CODE.down: {\n this.gotoSubIndex(this.subIndex + 1)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n this.gotoSubIndex(this.subIndex - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(parentNode as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n event.stopPropagation()\n }\n return false\n })\n })\n }\n}\n\nexport default SubMenu\n"],"mappings":";;;;;;AAMA,IAAM,UAAN,MAAc;CAGZ,YACE,AAAO,QACP,AAAO,SACP;EAFO;EACA;kBAHS;AAKhB,OAAK,WAAW;AAChB,OAAK,MAAM;;CAGb,OAAa;AACX,OAAK,eAAe,KAAK,QAAQ,iBAAiB,KAAK;AACvD,OAAK,cAAc;;CAGrB,aAAa,KAAmB;AAC9B,MAAI,QAAQ,KAAK,aAAa,OAC5B,OAAM;WACG,MAAM,EACf,OAAM,KAAK,aAAa,SAAS;AAElC,EAAC,KAAK,aAAa,KAAqB,OAAO;AAChD,OAAK,WAAW;;CAGlB,eAAqB;EACnB,MAAM,aAAa,KAAK,OAAO;AAC/B,QAAM,UAAU,QAAQ,KAAK,KAAK,eAAe,OAAgB;AAC/D,MAAG,iBAAiB,YAAY,UAAyB;IACvD,MAAM,OAAOA,2BAAa,MAAM;IAChC,IAAI,UAAU;AAEd,YAAQ,MAAR;KACE,KAAKC,wBAAW;AACd,WAAK,aAAa,KAAK,WAAW,EAAE;AACpC,gBAAU;AACV;KAEF,KAAKA,wBAAW;AACd,WAAK,aAAa,KAAK,WAAW,EAAE;AACpC,gBAAU;AACV;KAEF,KAAKA,wBAAW;AACd,kCAAa,YAA2B,aAAa;AACrD;KAEF,KAAKA,wBAAW;KAChB,KAAKA,wBAAW;KAChB,KAAKA,wBAAW;AACd,gBAAU;AACT,MAAC,MAAM,cAA8B,OAAO;AAC7C;;AAGJ,QAAI,SAAS;AACX,WAAM,gBAAgB;AACtB,WAAM,iBAAiB;;AAEzB,WAAO;KACP;IACF"}
|
|
@@ -18,17 +18,17 @@ declare const __VLS_base: vue.DefineComponent<MessageProps, {
|
|
|
18
18
|
}, string, vue.PublicProps, Readonly<MessageProps> & Readonly<{
|
|
19
19
|
onDestroy?: (() => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
+
zIndex: number;
|
|
22
|
+
offset: number;
|
|
21
23
|
type: MessageType;
|
|
22
24
|
onClose: () => void;
|
|
23
|
-
offset: number;
|
|
24
|
-
duration: number;
|
|
25
|
-
zIndex: number;
|
|
26
25
|
id: string;
|
|
27
26
|
icon: IconPropType;
|
|
28
27
|
placement: MessagePlacement;
|
|
29
28
|
plain: boolean;
|
|
30
29
|
message: string | vue.VNode | (() => vue.VNode);
|
|
31
30
|
showClose: boolean;
|
|
31
|
+
duration: number;
|
|
32
32
|
customClass: string;
|
|
33
33
|
dangerouslyUseHTMLString: boolean;
|
|
34
34
|
grouping: boolean;
|
|
@@ -38,7 +38,7 @@ var message_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vu
|
|
|
38
38
|
const placement = (0, vue.computed)(() => props.placement || require_message.MESSAGE_DEFAULT_PLACEMENT);
|
|
39
39
|
const lastOffset = (0, vue.computed)(() => require_instance.getLastOffset(props.id, placement.value));
|
|
40
40
|
const offset = (0, vue.computed)(() => {
|
|
41
|
-
return require_instance.getOffsetOrSpace(props.id, props.offset, placement.value) + lastOffset.value;
|
|
41
|
+
return Math.max(require_instance.getOffsetOrSpace(props.id, props.offset, placement.value) + lastOffset.value, props.offset);
|
|
42
42
|
});
|
|
43
43
|
const bottom = (0, vue.computed)(() => height.value + offset.value);
|
|
44
44
|
const horizontalClass = (0, vue.computed)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-enter=\"isStartTransition = true\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('closable', showClose),\n ns.is('plain', plain),\n ns.is('bottom', verticalProperty === 'bottom'),\n horizontalClass,\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport {\n TypeComponents,\n TypeComponentsMap,\n getEventCode,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n MESSAGE_DEFAULT_PLACEMENT,\n messageDefaults,\n messageEmits,\n} from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport { omit } from 'lodash-unified'\n\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\nimport type { MessageProps } from './message'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = withDefaults(\n defineProps<MessageProps>(),\n omit(messageDefaults, 'appendTo')\n)\nconst emit = defineEmits(messageEmits)\n\nconst isStartTransition = ref(false)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst placement = computed(() => props.placement || MESSAGE_DEFAULT_PLACEMENT)\n\nconst lastOffset = computed(() => getLastOffset(props.id, placement.value))\nconst offset = computed(() => {\n return (\n getOffsetOrSpace(props.id, props.offset, placement.value)
|
|
1
|
+
{"version":3,"file":"message.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-enter=\"isStartTransition = true\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('closable', showClose),\n ns.is('plain', plain),\n ns.is('bottom', verticalProperty === 'bottom'),\n horizontalClass,\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport {\n TypeComponents,\n TypeComponentsMap,\n getEventCode,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n MESSAGE_DEFAULT_PLACEMENT,\n messageDefaults,\n messageEmits,\n} from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport { omit } from 'lodash-unified'\n\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\nimport type { MessageProps } from './message'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = withDefaults(\n defineProps<MessageProps>(),\n omit(messageDefaults, 'appendTo')\n)\nconst emit = defineEmits(messageEmits)\n\nconst isStartTransition = ref(false)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst placement = computed(() => props.placement || MESSAGE_DEFAULT_PLACEMENT)\n\nconst lastOffset = computed(() => getLastOffset(props.id, placement.value))\nconst offset = computed(() => {\n return Math.max(\n getOffsetOrSpace(props.id, props.offset, placement.value) +\n lastOffset.value,\n props.offset\n )\n})\nconst bottom = computed(() => height.value + offset.value)\nconst horizontalClass = computed(() => {\n if (placement.value.includes('left')) return ns.is('left')\n if (placement.value.includes('right')) return ns.is('right')\n return ns.is('center')\n})\n\nconst verticalProperty = computed(() =>\n placement.value.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst customStyle = computed<CSSProperties>(() => ({\n [verticalProperty.value]: `${offset.value}px`,\n zIndex: currentZIndex.value,\n}))\n\nfunction startTimer() {\n if (props.duration === 0) return\n ;({ stop: stopTimer } = useTimeoutFn(() => {\n close()\n }, props.duration))\n}\n\nfunction clearTimer() {\n stopTimer?.()\n}\n\nfunction close() {\n visible.value = false\n\n // if the message has never started a transition, we can destroy it immediately\n nextTick(() => {\n if (!isStartTransition.value) {\n props.onClose?.()\n emit('destroy')\n }\n })\n}\n\nfunction keydown(event: KeyboardEvent) {\n const code = getEventCode(event)\n if (code === EVENT_CODE.esc) {\n // press esc to close the message\n close()\n }\n}\n\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nwatch(\n () => props.repeatNum,\n () => {\n clearTimer()\n startTimer()\n }\n)\n\nuseEventListener(document, 'keydown', keydown)\n\nuseResizeObserver(messageRef, () => {\n height.value = messageRef.value!.getBoundingClientRect().height\n})\n\ndefineExpose({\n visible,\n bottom,\n close,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAwEA,MAAM,EAAE,UAAU;EAMlB,MAAM,QAAQ;EAId,MAAM,OAAO;EAEb,MAAM,iCAAwB,MAAK;EAEnC,MAAM,EAAE,IAAI,WAAW,qDAA2B,UAAS;EAC3D,MAAM,EAAE,eAAe,eAAe;EAEtC,MAAM,2BAAiC;EACvC,MAAM,uBAAc,MAAK;EACzB,MAAM,sBAAa,EAAC;EAEpB,IAAI,YAAsC;EAE1C,MAAM,oCACJ,MAAM,OAAQ,MAAM,SAAS,UAAU,WAAW,MAAM,OAAQ,OAClE;EACA,MAAM,oCAA2B;GAC/B,MAAM,OAAO,MAAM;AACnB,UAAO,GAAG,GAAG,GAAG,QAAQ,KAAK,GAAG,QAAQ,+BAAkB,OAAM;IACjE;EACD,MAAM,wCACE,MAAM,QAAQ,+BAAkB,MAAM,SAAS,GACvD;EAEA,MAAM,oCAA2B,MAAM,aAAa,0CAAyB;EAE7E,MAAM,qCAA4B,+BAAc,MAAM,IAAI,UAAU,MAAM,CAAA;EAC1E,MAAM,iCAAwB;AAC5B,UAAO,KAAK,IACV,kCAAiB,MAAM,IAAI,MAAM,QAAQ,UAAU,MAAM,GACvD,WAAW,OACb,MAAM,OACR;IACD;EACD,MAAM,iCAAwB,OAAO,QAAQ,OAAO,MAAK;EACzD,MAAM,0CAAiC;AACrC,OAAI,UAAU,MAAM,SAAS,OAAO,CAAE,QAAO,GAAG,GAAG,OAAM;AACzD,OAAI,UAAU,MAAM,SAAS,QAAQ,CAAE,QAAO,GAAG,GAAG,QAAO;AAC3D,UAAO,GAAG,GAAG,SAAQ;IACtB;EAED,MAAM,2CACJ,UAAU,MAAM,WAAW,MAAM,GAAG,QAAQ,SAC9C;EAEA,MAAM,uCAA6C;IAChD,iBAAiB,QAAQ,GAAG,OAAO,MAAM;GAC1C,QAAQ,cAAc;GACvB,EAAC;EAEF,SAAS,aAAa;AACpB,OAAI,MAAM,aAAa,EAAG;AACzB,IAAC,CAAE,MAAM,kDAAiC;AACzC,WAAM;MACL,MAAM,SAAS;;EAGpB,SAAS,aAAa;AACpB,gBAAY;;EAGd,SAAS,QAAQ;AACf,WAAQ,QAAQ;AAGhB,2BAAe;AACb,QAAI,CAAC,kBAAkB,OAAO;AAC5B,WAAM,WAAU;AAChB,UAAK,UAAS;;KAEjB;;EAGH,SAAS,QAAQ,OAAsB;AAErC,OADa,2BAAa,MAAK,KAClB,wBAAW,IAEtB,QAAM;;AAIV,2BAAgB;AACd,eAAW;AACX,eAAW;AACX,WAAQ,QAAQ;IACjB;AAED,uBACQ,MAAM,iBACN;AACJ,eAAW;AACX,eAAW;IAEf;AAEA,qCAAiB,UAAU,WAAW,QAAO;AAE7C,sCAAkB,kBAAkB;AAClC,UAAO,QAAQ,WAAW,MAAO,uBAAuB,CAAC;IAC1D;AAED,WAAa;GACX;GACA;GACA;GACD,CAAA;;qDA9Ic,gBAAA;IA3CV,qBAAM,GAAE,CAAC,EAAC,OAAA;IACV,eAAY,OAAA,OAAA,OAAA,MAAA,WAAE,kBAAA,QAAiB;IAC/B,eAAc,QAAA;IACd,cAAW,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,UAAA;IAJrB,WAAA;;oCA2CQ,qDAAA,OAAA;KAnCH,IAAI,QAAA;cACD;KAAJ,KAAI;KACH,+BAAK;qBAAY,GAAE,CAAC,GAAC;wBAAe,GAAE,CAAC,EAAE,QAAA,KAAI,GAAI,QAAA,MAAI;qBAAY,GAAE,CAAC,GAAE,YAAa,QAAA,UAAS;qBAAW,GAAE,CAAC,GAAE,SAAU,QAAA,MAAK;qBAAW,GAAE,CAAC,GAAE,UAAW,iBAAA,UAAgB,SAAA;MAAwB,gBAAA;MAAyB,QAAA;;KASvN,+BAAO,YAAA,MAAW;KACnB,MAAK;KACJ,cAAY;KACZ,cAAY;;KAGL,QAAA,YAAS,+DAIf,wBAAA,EAAA;;MAHC,OAAO,QAAA;MACP,MAAM,UAAA;MACN,8CAAO,GAAE,CAAC,EAAC,QAAA,CAAA;;;;;;KAEC,cAAA,mEAEL,qBAAA,EAAA;;MAFqB,+BAAK,gBAAG,GAAE,CAAC,EAAC,OAAA,EAAU,UAAA,MAAS,CAAA;;sCAC3B,8EAAjB,cAAA,MAAa,CAAA;;;yBAQxB,KAAA,QAAA,WAAA,EAAA,QAAA,EALK,QAAA,8EAEN,KAAA;;MAFiC,8CAAO,GAAE,CAAC,EAAC,UAAA,CAAA;iCAC3C,QAAA,QAAO,EAAA,EAAA,uDAG0C,cAAA,EAAA,KAAA,GAAA,EAAA,6BADtD,uFAA2F,8BACrC,KAAA;MAA3C,8CAAO,GAAE,CAAC,EAAC,UAAA,CAAA;MAAa,WAAQ,QAAA;;KAE9B,QAAA,uEAEL,qBAAA,EAAA;;MAFiB,8CAAO,GAAE,CAAC,EAAC,WAAA,CAAA;MAAe,gCAAY,OAAK,CAAA,OAAA,CAAA;;sCAC3D,qCAAA,MAAA,CAAA;;;qCAlCH,QAAA,MAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message2.js","names":[],"sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-enter=\"isStartTransition = true\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('closable', showClose),\n ns.is('plain', plain),\n ns.is('bottom', verticalProperty === 'bottom'),\n horizontalClass,\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport {\n TypeComponents,\n TypeComponentsMap,\n getEventCode,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n MESSAGE_DEFAULT_PLACEMENT,\n messageDefaults,\n messageEmits,\n} from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport { omit } from 'lodash-unified'\n\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\nimport type { MessageProps } from './message'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = withDefaults(\n defineProps<MessageProps>(),\n omit(messageDefaults, 'appendTo')\n)\nconst emit = defineEmits(messageEmits)\n\nconst isStartTransition = ref(false)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst placement = computed(() => props.placement || MESSAGE_DEFAULT_PLACEMENT)\n\nconst lastOffset = computed(() => getLastOffset(props.id, placement.value))\nconst offset = computed(() => {\n return (\n getOffsetOrSpace(props.id, props.offset, placement.value)
|
|
1
|
+
{"version":3,"file":"message2.js","names":[],"sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-enter=\"isStartTransition = true\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('closable', showClose),\n ns.is('plain', plain),\n ns.is('bottom', verticalProperty === 'bottom'),\n horizontalClass,\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport {\n TypeComponents,\n TypeComponentsMap,\n getEventCode,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n MESSAGE_DEFAULT_PLACEMENT,\n messageDefaults,\n messageEmits,\n} from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport { omit } from 'lodash-unified'\n\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\nimport type { MessageProps } from './message'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = withDefaults(\n defineProps<MessageProps>(),\n omit(messageDefaults, 'appendTo')\n)\nconst emit = defineEmits(messageEmits)\n\nconst isStartTransition = ref(false)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst placement = computed(() => props.placement || MESSAGE_DEFAULT_PLACEMENT)\n\nconst lastOffset = computed(() => getLastOffset(props.id, placement.value))\nconst offset = computed(() => {\n return Math.max(\n getOffsetOrSpace(props.id, props.offset, placement.value) +\n lastOffset.value,\n props.offset\n )\n})\nconst bottom = computed(() => height.value + offset.value)\nconst horizontalClass = computed(() => {\n if (placement.value.includes('left')) return ns.is('left')\n if (placement.value.includes('right')) return ns.is('right')\n return ns.is('center')\n})\n\nconst verticalProperty = computed(() =>\n placement.value.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst customStyle = computed<CSSProperties>(() => ({\n [verticalProperty.value]: `${offset.value}px`,\n zIndex: currentZIndex.value,\n}))\n\nfunction startTimer() {\n if (props.duration === 0) return\n ;({ stop: stopTimer } = useTimeoutFn(() => {\n close()\n }, props.duration))\n}\n\nfunction clearTimer() {\n stopTimer?.()\n}\n\nfunction close() {\n visible.value = false\n\n // if the message has never started a transition, we can destroy it immediately\n nextTick(() => {\n if (!isStartTransition.value) {\n props.onClose?.()\n emit('destroy')\n }\n })\n}\n\nfunction keydown(event: KeyboardEvent) {\n const code = getEventCode(event)\n if (code === EVENT_CODE.esc) {\n // press esc to close the message\n close()\n }\n}\n\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nwatch(\n () => props.repeatNum,\n () => {\n clearTimer()\n startTimer()\n }\n)\n\nuseEventListener(document, 'keydown', keydown)\n\nuseResizeObserver(messageRef, () => {\n height.value = messageRef.value!.getBoundingClientRect().height\n})\n\ndefineExpose({\n visible,\n bottom,\n close,\n})\n</script>\n"],"mappings":""}
|
|
@@ -17,16 +17,16 @@ declare const __VLS_base: vue.DefineComponent<NotificationProps, {
|
|
|
17
17
|
}, string, vue.PublicProps, Readonly<NotificationProps> & Readonly<{
|
|
18
18
|
onDestroy?: (() => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
title: string;
|
|
21
|
-
type: NotificationType;
|
|
22
20
|
offset: number;
|
|
23
|
-
duration: number;
|
|
24
|
-
onClick: () => void;
|
|
25
21
|
position: NotificationPosition;
|
|
22
|
+
type: NotificationType;
|
|
23
|
+
title: string;
|
|
26
24
|
id: string;
|
|
25
|
+
onClick: () => void;
|
|
27
26
|
message: string | vue.VNode | (() => vue.VNode);
|
|
28
27
|
closeIcon: IconPropType;
|
|
29
28
|
showClose: boolean;
|
|
29
|
+
duration: number;
|
|
30
30
|
customClass: string;
|
|
31
31
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_base: vue.DefineComponent<PopconfirmProps, {
|
|
|
27
27
|
onCancel?: ((e: MouseEvent) => any) | undefined;
|
|
28
28
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
-
effect: PopperEffect;
|
|
31
30
|
teleported: boolean;
|
|
31
|
+
effect: PopperEffect;
|
|
32
32
|
icon: IconPropType;
|
|
33
33
|
hideAfter: number;
|
|
34
34
|
width: string | number;
|
|
@@ -33,9 +33,9 @@ declare const __VLS_base: vue.DefineComponent<PopoverProps, {
|
|
|
33
33
|
"onAfter-enter"?: (() => any) | undefined;
|
|
34
34
|
"onAfter-leave"?: (() => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
|
-
effect: PopperEffect;
|
|
37
36
|
offset: number;
|
|
38
37
|
teleported: boolean;
|
|
38
|
+
effect: PopperEffect;
|
|
39
39
|
tabindex: string | number;
|
|
40
40
|
visible: boolean | null;
|
|
41
41
|
content: string;
|
|
@@ -4,7 +4,7 @@ import { SetupContext } from "vue";
|
|
|
4
4
|
|
|
5
5
|
//#region ../../packages/components/popper/src/composables/use-focus-trap.d.ts
|
|
6
6
|
declare const usePopperContentFocusTrap: (props: PopperContentProps, emit: SetupContext<PopperContentEmits>["emit"]) => {
|
|
7
|
-
focusStartRef: vue.Ref<HTMLElement | "
|
|
7
|
+
focusStartRef: vue.Ref<HTMLElement | "first" | "container" | undefined, HTMLElement | "first" | "container" | undefined>;
|
|
8
8
|
trapped: vue.Ref<boolean, boolean>;
|
|
9
9
|
onFocusAfterReleased: (event: CustomEvent) => void;
|
|
10
10
|
onFocusAfterTrapped: () => void;
|
|
@@ -40,8 +40,8 @@ declare const __VLS_base: vue.DefineComponent<PopperContentProps, {
|
|
|
40
40
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
41
41
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
42
42
|
}>, {
|
|
43
|
-
effect: PopperEffect;
|
|
44
43
|
offset: number;
|
|
44
|
+
effect: PopperEffect;
|
|
45
45
|
visible: boolean;
|
|
46
46
|
style: string | false | vue.CSSProperties | vue.StyleValue[] | null;
|
|
47
47
|
enterable: boolean;
|
|
@@ -14,7 +14,6 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
};
|
|
15
15
|
declare const __VLS_base: vue.DefineComponent<ProgressProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
16
16
|
type: "line" | "circle" | "dashboard";
|
|
17
|
-
duration: number;
|
|
18
17
|
color: string | ProgressColor[] | ProgressFn;
|
|
19
18
|
strokeLinecap: NonNullable<vue.SVGAttributes["stroke-linecap"]>;
|
|
20
19
|
strokeWidth: number;
|
|
@@ -22,6 +21,7 @@ declare const __VLS_base: vue.DefineComponent<ProgressProps, {}, {}, {}, {}, vue
|
|
|
22
21
|
format: ProgressFn;
|
|
23
22
|
percentage: number;
|
|
24
23
|
status: "" | "success" | "exception" | "warning";
|
|
24
|
+
duration: number;
|
|
25
25
|
showText: boolean;
|
|
26
26
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -13,9 +13,9 @@ declare const __VLS_base: vue.DefineComponent<RadioGroupProps, {}, {}, {}, {}, v
|
|
|
13
13
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
14
14
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
type: "radio" | "button";
|
|
17
16
|
fill: string;
|
|
18
17
|
props: radioOptionProp;
|
|
18
|
+
type: "radio" | "button";
|
|
19
19
|
id: string;
|
|
20
20
|
disabled: boolean;
|
|
21
21
|
modelValue: string | number | boolean;
|
|
@@ -23,7 +23,7 @@ declare const rovingFocusGroupProps: {
|
|
|
23
23
|
loop: BooleanConstructor;
|
|
24
24
|
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
|
25
25
|
orientation: {
|
|
26
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "
|
|
26
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
|
27
27
|
readonly required: false;
|
|
28
28
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
29
29
|
__epPropKey: true;
|
|
@@ -38,7 +38,7 @@ declare const __VLS_export: vue.DefineComponent<{}, {}, {}, {}, {}, vue.Componen
|
|
|
38
38
|
loop: BooleanConstructor;
|
|
39
39
|
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
|
40
40
|
orientation: {
|
|
41
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "
|
|
41
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
|
42
42
|
readonly required: false;
|
|
43
43
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
44
44
|
__epPropKey: true;
|
|
@@ -63,7 +63,7 @@ declare const __VLS_export: vue.DefineComponent<{}, {}, {}, {}, {}, vue.Componen
|
|
|
63
63
|
loop: BooleanConstructor;
|
|
64
64
|
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
|
65
65
|
orientation: {
|
|
66
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "
|
|
66
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
|
67
67
|
readonly required: false;
|
|
68
68
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
69
69
|
__epPropKey: true;
|
|
@@ -62,7 +62,7 @@ interface SegmentedProps<T extends Option = Option> {
|
|
|
62
62
|
*/
|
|
63
63
|
declare const segmentedProps: {
|
|
64
64
|
ariaLabel: StringConstructor;
|
|
65
|
-
direction: EpPropFinalized<(new (...args: any[]) => "
|
|
65
|
+
direction: EpPropFinalized<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical")) | null)[], unknown, unknown, string, boolean>;
|
|
66
66
|
options: EpPropFinalized<(new (...args: any[]) => Option[]) | (() => Option[]) | (((new (...args: any[]) => Option[]) | (() => Option[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
67
67
|
modelValue: EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
68
68
|
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
|
@@ -54,6 +54,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
54
54
|
hover: boolean;
|
|
55
55
|
};
|
|
56
56
|
hoverItem: () => void;
|
|
57
|
+
handleMousedown: (event: MouseEvent) => void;
|
|
57
58
|
updateOption: (query: string) => void;
|
|
58
59
|
selectOptionClick: () => void;
|
|
59
60
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
|
2
|
+
const require_aria = require('../../../utils/dom/aria.js');
|
|
2
3
|
const require_index = require('../../../hooks/use-namespace/index.js');
|
|
3
4
|
const require_index$1 = require('../../../hooks/use-id/index.js');
|
|
4
5
|
const require_option = require('./option.js');
|
|
@@ -43,6 +44,15 @@ var option_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
43
44
|
function selectOptionClick() {
|
|
44
45
|
if (!isDisabled.value) select.handleOptionSelect(vm);
|
|
45
46
|
}
|
|
47
|
+
const handleMousedown = (event) => {
|
|
48
|
+
let target = event.target;
|
|
49
|
+
const currentTarget = event.currentTarget;
|
|
50
|
+
while (target && target !== currentTarget) {
|
|
51
|
+
if (require_aria.isFocusable(target)) return;
|
|
52
|
+
target = target.parentElement;
|
|
53
|
+
}
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
};
|
|
46
56
|
return {
|
|
47
57
|
ns,
|
|
48
58
|
id,
|
|
@@ -55,6 +65,7 @@ var option_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
55
65
|
hover,
|
|
56
66
|
states,
|
|
57
67
|
hoverItem,
|
|
68
|
+
handleMousedown,
|
|
58
69
|
updateOption,
|
|
59
70
|
selectOptionClick
|
|
60
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.vue_vue_type_script_lang.js","names":[],"sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { COMPONENT_NAME, optionProps } from './option'\n\nimport type {\n OptionExposed,\n OptionInternalInstance,\n OptionStates,\n} from './type'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n\n props: optionProps,\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive<OptionStates>({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = (getCurrentInstance()! as OptionInternalInstance).proxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n\n // if option is not selected, remove it from cache\n nextTick(() => {\n const { selected: selectedOptions } = select.states\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n visible,\n hover,\n states,\n\n hoverItem,\n updateOption,\n selectOptionClick,\n } satisfies OptionExposed\n },\n})\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"option.vue_vue_type_script_lang.js","names":[],"sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @mousedown=\"handleMousedown\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { COMPONENT_NAME, optionProps } from './option'\nimport { isFocusable } from '@element-plus/utils'\n\nimport type {\n OptionExposed,\n OptionInternalInstance,\n OptionStates,\n} from './type'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n\n props: optionProps,\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive<OptionStates>({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = (getCurrentInstance()! as OptionInternalInstance).proxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n\n // if option is not selected, remove it from cache\n nextTick(() => {\n const { selected: selectedOptions } = select.states\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n const handleMousedown = (event: MouseEvent) => {\n let target = event.target as HTMLElement | null\n const currentTarget = event.currentTarget as HTMLElement\n\n while (target && target !== currentTarget) {\n if (isFocusable(target)) {\n return\n }\n target = target.parentElement\n }\n\n event.preventDefault()\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n visible,\n hover,\n states,\n\n hoverItem,\n handleMousedown,\n updateOption,\n selectOptionClick,\n } satisfies OptionExposed\n },\n})\n</script>\n"],"mappings":";;;;;;;;;AAwCA,uEAA+B;CAC7B,MAAM;CACN,eAAe;CAEf,OAAO;CAEP,MAAM,OAAO;EACX,MAAM,KAAK,2BAAa,SAAQ;EAChC,MAAM,KAAK,uBAAM;EAEjB,MAAM,uCAA8B;GAClC,GAAG,GAAG,YAAY,OAAO;GACzB,GAAG,GAAG,2BAAkB,WAAW,CAAC;GACpC,GAAG,GAAG,2BAAkB,aAAa,CAAC;GACtC,GAAG,GAAG,2BAAkB,MAAM,CAAC;GAChC,CAAA;EAED,MAAM,2BAAgC;GACpC,OAAO;GACP,eAAe;GACf,SAAS;GACT,OAAO;GACR,CAAA;EAED,MAAM,EACJ,cACA,cACA,YACA,QACA,WACA,iBACE,4BAAU,OAAO,OAAM;EAE3B,MAAM,EAAE,SAAS,0BAAiB,OAAM;EAExC,MAAM,kCAA0B,CAA6B;AAE7D,SAAO,eAAe,GAAE;AAExB,iCAAsB;GACpB,MAAM,MAAM,GAAG;AAGf,2BAAe;IACb,MAAM,EAAE,UAAU,oBAAoB,OAAO;IAC7C,MAAM,eAAe,gBAAgB,MAAM,SAAS;AAClD,YAAO,KAAK,UAAU,GAAG;MAC1B;AACD,QAAI,OAAO,OAAO,cAAc,IAAI,IAAG,KAAM,MAAM,CAAC,aAClD,QAAO,OAAO,cAAc,OAAO,IAAG;KAEzC;AACD,UAAO,gBAAgB,KAAK,GAAE;IAC/B;EAED,SAAS,oBAAoB;AAC3B,OAAI,CAAC,WAAW,MACd,QAAO,mBAAmB,GAAE;;EAIhC,MAAM,mBAAmB,UAAsB;GAC7C,IAAI,SAAS,MAAM;GACnB,MAAM,gBAAgB,MAAM;AAE5B,UAAO,UAAU,WAAW,eAAe;AACzC,QAAI,yBAAY,OAAO,CACrB;AAEF,aAAS,OAAO;;AAGlB,SAAM,gBAAe;;AAGvB,SAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
|
|
@@ -18,7 +18,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18
18
|
"aria-disabled": _ctx.isDisabled || void 0,
|
|
19
19
|
"aria-selected": _ctx.itemSelected,
|
|
20
20
|
onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
|
|
21
|
-
|
|
21
|
+
onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
|
|
22
|
+
onClick: _cache[2] || (_cache[2] = (0, vue.withModifiers)((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
|
|
22
23
|
}, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(_ctx.currentLabel), 1)])], 42, _hoisted_1)), [[vue.vShow, _ctx.visible]]);
|
|
23
24
|
}
|
|
24
25
|
var option_default = /* @__PURE__ */ require__plugin_vue_export_helper.default(require_option_vue_vue_type_script_lang.default, [["render", _sfc_render]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option2.js","names":[],"sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { COMPONENT_NAME, optionProps } from './option'\n\nimport type {\n OptionExposed,\n OptionInternalInstance,\n OptionStates,\n} from './type'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n\n props: optionProps,\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive<OptionStates>({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = (getCurrentInstance()! as OptionInternalInstance).proxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n\n // if option is not selected, remove it from cache\n nextTick(() => {\n const { selected: selectedOptions } = select.states\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n visible,\n hover,\n states,\n\n hoverItem,\n updateOption,\n selectOptionClick,\n } satisfies OptionExposed\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"option2.js","names":[],"sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @mousedown=\"handleMousedown\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { COMPONENT_NAME, optionProps } from './option'\nimport { isFocusable } from '@element-plus/utils'\n\nimport type {\n OptionExposed,\n OptionInternalInstance,\n OptionStates,\n} from './type'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n\n props: optionProps,\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive<OptionStates>({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = (getCurrentInstance()! as OptionInternalInstance).proxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n\n // if option is not selected, remove it from cache\n nextTick(() => {\n const { selected: selectedOptions } = select.states\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n const handleMousedown = (event: MouseEvent) => {\n let target = event.target as HTMLElement | null\n const currentTarget = event.currentTarget as HTMLElement\n\n while (target && target !== currentTarget) {\n if (isFocusable(target)) {\n return\n }\n target = target.parentElement\n }\n\n event.preventDefault()\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n visible,\n hover,\n states,\n\n hoverItem,\n handleMousedown,\n updateOption,\n selectOptionClick,\n } satisfies OptionExposed\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;mFAeO,MAAA;EAZF,IAAI,KAAA;EACJ,+BAAO,KAAA,aAAY;EACpB,MAAK;EACJ,iBAAe,KAAA,cAAc,KAAA;EAC7B,iBAAe,KAAA;EACf,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,aAAA,KAAA,UAAA,GAAA,KAAA;EACX,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,mBAAA,KAAA,gBAAA,GAAA,KAAA;EACX,SAAK,OAAA,OAAA,OAAA,6BAAA,GAAA,SAAO,KAAA,qBAAA,KAAA,kBAAA,GAAA,KAAA,EAAiB,CAAA,OAAA,CAAA;EAAA,EAAA,qBAIvB,KAAA,QAAA,WAAA,EAAA,QAAA,6BAD0B,QAAA,+BAAtB,KAAA,aAAY,EAAA,EAAA,CAAA,CAAA,kCAXf,KAAA,QAAO,CAAA,CAAA"}
|
|
@@ -402,10 +402,10 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
402
402
|
"onRemove-tag"?: ((...args: any[]) => any) | undefined;
|
|
403
403
|
"onPopup-scroll"?: ((...args: any[]) => any) | undefined;
|
|
404
404
|
}>, {
|
|
405
|
-
effect: EpPropMergeType<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown>;
|
|
406
|
-
props: Props;
|
|
407
405
|
offset: number;
|
|
408
406
|
teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
407
|
+
props: Props;
|
|
408
|
+
effect: EpPropMergeType<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown>;
|
|
409
409
|
disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
410
410
|
modelValue: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>[] | null) | (((new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>[] | null)) | null)[], unknown, unknown>;
|
|
411
411
|
autocomplete: string;
|
|
@@ -514,6 +514,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
514
514
|
hover: boolean;
|
|
515
515
|
};
|
|
516
516
|
hoverItem: () => void;
|
|
517
|
+
handleMousedown: (event: MouseEvent) => void;
|
|
517
518
|
updateOption: (query: string) => void;
|
|
518
519
|
selectOptionClick: () => void;
|
|
519
520
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
@@ -747,9 +748,9 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
747
748
|
"before-show": (...args: any[]) => void;
|
|
748
749
|
"before-hide": (...args: any[]) => void;
|
|
749
750
|
}, vue.PublicProps, {
|
|
750
|
-
effect: PopperEffect;
|
|
751
751
|
offset: number;
|
|
752
752
|
teleported: boolean;
|
|
753
|
+
effect: PopperEffect;
|
|
753
754
|
visible: boolean | null;
|
|
754
755
|
content: string;
|
|
755
756
|
style: string | false | vue.CSSProperties | vue.StyleValue[] | null;
|
|
@@ -798,9 +799,9 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
798
799
|
onClose: (event?: Event, delay?: number) => void;
|
|
799
800
|
hide: (event?: Event) => void;
|
|
800
801
|
}, {}, {}, {}, {
|
|
801
|
-
effect: PopperEffect;
|
|
802
802
|
offset: number;
|
|
803
803
|
teleported: boolean;
|
|
804
|
+
effect: PopperEffect;
|
|
804
805
|
visible: boolean | null;
|
|
805
806
|
content: string;
|
|
806
807
|
style: string | false | vue.CSSProperties | vue.StyleValue[] | null;
|
|
@@ -854,9 +855,9 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
854
855
|
"before-show": (...args: any[]) => void;
|
|
855
856
|
"before-hide": (...args: any[]) => void;
|
|
856
857
|
}, string, {
|
|
857
|
-
effect: PopperEffect;
|
|
858
858
|
offset: number;
|
|
859
859
|
teleported: boolean;
|
|
860
|
+
effect: PopperEffect;
|
|
860
861
|
visible: boolean | null;
|
|
861
862
|
content: string;
|
|
862
863
|
style: string | false | vue.CSSProperties | vue.StyleValue[] | null;
|
|
@@ -25,7 +25,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25
25
|
_ctx.ns.is("hovering", _ctx.hovering)
|
|
26
26
|
]),
|
|
27
27
|
onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
|
|
28
|
-
|
|
28
|
+
onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
|
|
29
|
+
onClick: _cache[2] || (_cache[2] = (0, vue.withModifiers)((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
|
|
29
30
|
}, [(0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
30
31
|
item: _ctx.item,
|
|
31
32
|
index: _ctx.index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-item.js","names":[],"sources":["../../../../../../packages/components/select-v2/src/option-item.vue"],"sourcesContent":["<template>\n <li\n :id=\"`${contentId}-${index}`\"\n role=\"option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled || undefined\"\n :style=\"style\"\n :class=\"[\n ns.be('dropdown', 'item'),\n ns.is('selected', selected),\n ns.is('disabled', disabled),\n ns.is('created', created),\n ns.is('hovering', hovering),\n ]\"\n @mousemove=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot :item=\"item\" :index=\"index\" :disabled=\"disabled\">\n <span>{{ getLabel(item) }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { useProps } from './useProps'\nimport { optionV2Emits, optionV2Props } from './defaults'\nimport { selectV2InjectionKey } from './token'\n\nexport default defineComponent({\n props: optionV2Props,\n emits: optionV2Emits,\n setup(props, { emit }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const { hoverItem, selectOptionClick } = useOption(props, { emit })\n const { getLabel } = useProps(select.props)\n const contentId = select.contentId\n\n return {\n ns,\n contentId,\n hoverItem,\n selectOptionClick,\n getLabel,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"option-item.js","names":[],"sources":["../../../../../../packages/components/select-v2/src/option-item.vue"],"sourcesContent":["<template>\n <li\n :id=\"`${contentId}-${index}`\"\n role=\"option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled || undefined\"\n :style=\"style\"\n :class=\"[\n ns.be('dropdown', 'item'),\n ns.is('selected', selected),\n ns.is('disabled', disabled),\n ns.is('created', created),\n ns.is('hovering', hovering),\n ]\"\n @mousemove=\"hoverItem\"\n @mousedown=\"handleMousedown\"\n @click.stop=\"selectOptionClick\"\n >\n <slot :item=\"item\" :index=\"index\" :disabled=\"disabled\">\n <span>{{ getLabel(item) }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { useProps } from './useProps'\nimport { optionV2Emits, optionV2Props } from './defaults'\nimport { selectV2InjectionKey } from './token'\nimport { isFocusable } from '@element-plus/utils'\n\nexport default defineComponent({\n props: optionV2Props,\n emits: optionV2Emits,\n setup(props, { emit }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const { hoverItem, selectOptionClick } = useOption(props, { emit })\n const { getLabel } = useProps(select.props)\n const contentId = select.contentId\n\n const handleMousedown = (event: MouseEvent) => {\n let target = event.target as HTMLElement | null\n const currentTarget = event.currentTarget as HTMLElement\n\n while (target && target !== currentTarget) {\n if (isFocusable(target)) {\n return\n }\n target = target.parentElement\n }\n\n event.preventDefault()\n }\n\n return {\n ns,\n contentId,\n hoverItem,\n handleMousedown,\n selectOptionClick,\n getLabel,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;0DAqBO,MAAA;EAnBF,IAAE,GAAK,KAAA,UAAS,GAAI,KAAA;EACrB,MAAK;EACJ,iBAAe,KAAA;EACf,iBAAe,KAAA,YAAY,KAAA;EAC3B,+BAAO,KAAA,MAAK;EACZ,+BAAK;GAAU,KAAA,GAAG,GAAE,YAAA,OAAA;GAA4B,KAAA,GAAG,GAAE,YAAa,KAAA,SAAQ;GAAS,KAAA,GAAG,GAAE,YAAa,KAAA,SAAQ;GAAS,KAAA,GAAG,GAAE,WAAY,KAAA,QAAO;GAAS,KAAA,GAAG,GAAE,YAAa,KAAA,SAAQ;GAAA,CAAA;EAOjL,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,aAAA,KAAA,UAAA,GAAA,KAAA;EACX,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,mBAAA,KAAA,gBAAA,GAAA,KAAA;EACX,SAAK,OAAA,OAAA,OAAA,6BAAA,GAAA,SAAO,KAAA,qBAAA,KAAA,kBAAA,GAAA,KAAA,EAAiB,CAAA,OAAA,CAAA;EAAA,EAAA,qBAIvB,KAAA,QAAA,WAAA;EAFA,MAAM,KAAA;EAAO,OAAO,KAAA;EAAQ,UAAU,KAAA;EAAA,QAEtC,6BAD4B,QAAA,+BAAxB,KAAA,SAAS,KAAA,KAAI,CAAA,EAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
|
2
|
+
const require_aria = require('../../../utils/dom/aria.js');
|
|
2
3
|
const require_index = require('../../../hooks/use-namespace/index.js');
|
|
3
4
|
const require_useProps = require('./useProps.js');
|
|
4
5
|
const require_useOption = require('./useOption.js');
|
|
@@ -15,10 +16,21 @@ var option_item_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
15
16
|
const ns = require_index.useNamespace("select");
|
|
16
17
|
const { hoverItem, selectOptionClick } = require_useOption.useOption(props, { emit });
|
|
17
18
|
const { getLabel } = require_useProps.useProps(select.props);
|
|
19
|
+
const contentId = select.contentId;
|
|
20
|
+
const handleMousedown = (event) => {
|
|
21
|
+
let target = event.target;
|
|
22
|
+
const currentTarget = event.currentTarget;
|
|
23
|
+
while (target && target !== currentTarget) {
|
|
24
|
+
if (require_aria.isFocusable(target)) return;
|
|
25
|
+
target = target.parentElement;
|
|
26
|
+
}
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
};
|
|
18
29
|
return {
|
|
19
30
|
ns,
|
|
20
|
-
contentId
|
|
31
|
+
contentId,
|
|
21
32
|
hoverItem,
|
|
33
|
+
handleMousedown,
|
|
22
34
|
selectOptionClick,
|
|
23
35
|
getLabel
|
|
24
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-item.vue_vue_type_script_lang.js","names":[],"sources":["../../../../../../packages/components/select-v2/src/option-item.vue"],"sourcesContent":["<template>\n <li\n :id=\"`${contentId}-${index}`\"\n role=\"option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled || undefined\"\n :style=\"style\"\n :class=\"[\n ns.be('dropdown', 'item'),\n ns.is('selected', selected),\n ns.is('disabled', disabled),\n ns.is('created', created),\n ns.is('hovering', hovering),\n ]\"\n @mousemove=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot :item=\"item\" :index=\"index\" :disabled=\"disabled\">\n <span>{{ getLabel(item) }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { useProps } from './useProps'\nimport { optionV2Emits, optionV2Props } from './defaults'\nimport { selectV2InjectionKey } from './token'\n\nexport default defineComponent({\n props: optionV2Props,\n emits: optionV2Emits,\n setup(props, { emit }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const { hoverItem, selectOptionClick } = useOption(props, { emit })\n const { getLabel } = useProps(select.props)\n const contentId = select.contentId\n\n return {\n ns,\n contentId,\n hoverItem,\n selectOptionClick,\n getLabel,\n }\n },\n})\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"option-item.vue_vue_type_script_lang.js","names":[],"sources":["../../../../../../packages/components/select-v2/src/option-item.vue"],"sourcesContent":["<template>\n <li\n :id=\"`${contentId}-${index}`\"\n role=\"option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled || undefined\"\n :style=\"style\"\n :class=\"[\n ns.be('dropdown', 'item'),\n ns.is('selected', selected),\n ns.is('disabled', disabled),\n ns.is('created', created),\n ns.is('hovering', hovering),\n ]\"\n @mousemove=\"hoverItem\"\n @mousedown=\"handleMousedown\"\n @click.stop=\"selectOptionClick\"\n >\n <slot :item=\"item\" :index=\"index\" :disabled=\"disabled\">\n <span>{{ getLabel(item) }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { useProps } from './useProps'\nimport { optionV2Emits, optionV2Props } from './defaults'\nimport { selectV2InjectionKey } from './token'\nimport { isFocusable } from '@element-plus/utils'\n\nexport default defineComponent({\n props: optionV2Props,\n emits: optionV2Emits,\n setup(props, { emit }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const { hoverItem, selectOptionClick } = useOption(props, { emit })\n const { getLabel } = useProps(select.props)\n const contentId = select.contentId\n\n const handleMousedown = (event: MouseEvent) => {\n let target = event.target as HTMLElement | null\n const currentTarget = event.currentTarget as HTMLElement\n\n while (target && target !== currentTarget) {\n if (isFocusable(target)) {\n return\n }\n target = target.parentElement\n }\n\n event.preventDefault()\n }\n\n return {\n ns,\n contentId,\n hoverItem,\n handleMousedown,\n selectOptionClick,\n getLabel,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;AAiCA,4EAA+B;CAC7B,OAAO;CACP,OAAO;CACP,MAAM,OAAO,EAAE,QAAQ;EACrB,MAAM,yBAAgB,mCAAqB;EAC3C,MAAM,KAAK,2BAAa,SAAQ;EAChC,MAAM,EAAE,WAAW,sBAAsB,4BAAU,OAAO,EAAE,MAAM,CAAA;EAClE,MAAM,EAAE,aAAa,0BAAS,OAAO,MAAK;EAC1C,MAAM,YAAY,OAAO;EAEzB,MAAM,mBAAmB,UAAsB;GAC7C,IAAI,SAAS,MAAM;GACnB,MAAM,gBAAgB,MAAM;AAE5B,UAAO,UAAU,WAAW,eAAe;AACzC,QAAI,yBAAY,OAAO,CACrB;AAEF,aAAS,OAAO;;AAGlB,SAAM,gBAAe;;AAGvB,SAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
|