@element-plus/nightly 0.0.20221012 → 0.0.20221013
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 +135 -42
- package/dist/index.full.min.js +18 -18
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +16 -16
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +135 -42
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +6 -6
- package/es/components/cascader/index.d.ts +8 -8
- package/es/components/cascader/src/index.mjs +1 -1
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +4 -4
- package/es/components/color-picker/index.d.ts +6 -6
- package/es/components/color-picker/src/color-picker.vue.d.ts +6 -6
- package/es/components/dropdown/index.d.ts +4 -4
- package/es/components/dropdown/src/dropdown.vue.d.ts +4 -4
- package/es/components/focus-trap/index.mjs +2 -2
- package/es/components/focus-trap/src/focus-trap.mjs +49 -15
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
- package/es/components/focus-trap/src/tokens.d.ts +2 -0
- package/es/components/focus-trap/src/tokens.mjs +6 -1
- package/es/components/focus-trap/src/tokens.mjs.map +1 -1
- package/es/components/focus-trap/src/utils.d.ts +11 -0
- package/es/components/focus-trap/src/utils.mjs +49 -1
- package/es/components/focus-trap/src/utils.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +4 -4
- package/es/components/popconfirm/index.d.ts +6 -6
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
- package/es/components/popover/index.d.ts +6 -6
- package/es/components/popover/src/popover.vue.d.ts +6 -6
- package/es/components/popper/src/content.vue.d.ts +2 -2
- package/es/components/popper/src/content2.mjs +10 -9
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/src/select.vue.d.ts +4 -4
- package/es/components/select/src/useSelect.d.ts +4 -4
- package/es/components/select/src/useSelect.mjs +3 -1
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +8 -8
- package/es/components/select-v2/src/select.vue.d.ts +4 -4
- package/es/components/select-v2/src/useSelect.d.ts +4 -4
- package/es/components/slider/index.d.ts +10 -10
- package/es/components/slider/src/button.vue.d.ts +2 -2
- package/es/components/slider/src/composables/use-slide.d.ts +8 -8
- package/es/components/slider/src/slider.vue.d.ts +10 -10
- package/es/components/table/index.d.ts +4 -0
- package/es/components/table/index.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +4 -4
- package/es/components/tabs/index.d.ts +17 -17
- package/es/components/tabs/src/tab-nav.d.ts +4 -4
- package/es/components/tabs/src/tab-nav.mjs.map +1 -1
- package/es/components/tabs/src/tabs.d.ts +26 -26
- package/es/components/tabs/src/tabs.mjs +4 -4
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +9 -4
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +6 -6
- package/es/components/time-select/index.d.ts +16 -16
- package/es/components/time-select/src/time-select.vue.d.ts +8 -8
- package/es/components/tooltip/index.d.ts +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +2 -2
- package/es/components/tooltip/src/tooltip.vue.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +6 -6
- package/lib/components/cascader/index.d.ts +8 -8
- package/lib/components/cascader/src/index.js +1 -1
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +4 -4
- package/lib/components/color-picker/index.d.ts +6 -6
- package/lib/components/color-picker/src/color-picker.vue.d.ts +6 -6
- package/lib/components/dropdown/index.d.ts +4 -4
- package/lib/components/dropdown/src/dropdown.vue.d.ts +4 -4
- package/lib/components/focus-trap/index.js +5 -0
- package/lib/components/focus-trap/index.js.map +1 -1
- package/lib/components/focus-trap/src/focus-trap.js +48 -14
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
- package/lib/components/focus-trap/src/tokens.d.ts +2 -0
- package/lib/components/focus-trap/src/tokens.js +7 -0
- package/lib/components/focus-trap/src/tokens.js.map +1 -1
- package/lib/components/focus-trap/src/utils.d.ts +11 -0
- package/lib/components/focus-trap/src/utils.js +51 -0
- package/lib/components/focus-trap/src/utils.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +4 -4
- package/lib/components/popconfirm/index.d.ts +6 -6
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
- package/lib/components/popover/index.d.ts +6 -6
- package/lib/components/popover/src/popover.vue.d.ts +6 -6
- package/lib/components/popper/src/content.vue.d.ts +2 -2
- package/lib/components/popper/src/content2.js +10 -9
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/src/select.vue.d.ts +4 -4
- package/lib/components/select/src/useSelect.d.ts +4 -4
- package/lib/components/select/src/useSelect.js +3 -1
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +8 -8
- package/lib/components/select-v2/src/select.vue.d.ts +4 -4
- package/lib/components/select-v2/src/useSelect.d.ts +4 -4
- package/lib/components/slider/index.d.ts +10 -10
- package/lib/components/slider/src/button.vue.d.ts +2 -2
- package/lib/components/slider/src/composables/use-slide.d.ts +8 -8
- package/lib/components/slider/src/slider.vue.d.ts +10 -10
- package/lib/components/table/index.d.ts +4 -0
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +4 -4
- package/lib/components/tabs/index.d.ts +17 -17
- package/lib/components/tabs/src/tab-nav.d.ts +4 -4
- package/lib/components/tabs/src/tab-nav.js.map +1 -1
- package/lib/components/tabs/src/tabs.d.ts +26 -26
- package/lib/components/tabs/src/tabs.js +4 -4
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +8 -3
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +6 -6
- package/lib/components/time-select/index.d.ts +16 -16
- package/lib/components/time-select/src/time-select.vue.d.ts +8 -8
- package/lib/components/tooltip/index.d.ts +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +2 -2
- package/lib/components/tooltip/src/tooltip.vue.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
|
|
2
2
|
const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
|
|
3
|
+
const FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
|
|
3
4
|
const FOCUS_AFTER_TRAPPED_OPTS = {
|
|
4
5
|
cancelable: true,
|
|
5
6
|
bubbles: false
|
|
6
7
|
};
|
|
8
|
+
const FOCUSOUT_PREVENTED_OPTS = {
|
|
9
|
+
cancelable: true,
|
|
10
|
+
bubbles: false
|
|
11
|
+
};
|
|
7
12
|
const ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
|
|
8
13
|
const ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
|
|
9
14
|
const FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
|
|
10
15
|
|
|
11
|
-
export { FOCUS_AFTER_RELEASED, FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS, FOCUS_TRAP_INJECTION_KEY, ON_RELEASE_FOCUS_EVT, ON_TRAP_FOCUS_EVT };
|
|
16
|
+
export { FOCUSOUT_PREVENTED, FOCUSOUT_PREVENTED_OPTS, FOCUS_AFTER_RELEASED, FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS, FOCUS_TRAP_INJECTION_KEY, ON_RELEASE_FOCUS_EVT, ON_TRAP_FOCUS_EVT };
|
|
12
17
|
//# sourceMappingURL=tokens.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.mjs","sources":["../../../../../../packages/components/focus-trap/src/tokens.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\nexport const FOCUS_AFTER_TRAPPED = 'focus-trap.focus-after-trapped'\nexport const FOCUS_AFTER_RELEASED = 'focus-trap.focus-after-released'\nexport const FOCUS_AFTER_TRAPPED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\n\nexport const ON_TRAP_FOCUS_EVT = 'focusAfterTrapped'\nexport const ON_RELEASE_FOCUS_EVT = 'focusAfterReleased'\n\nexport type FocusTrapInjectionContext = {\n focusTrapRef: Ref<HTMLElement | undefined>\n onKeydown: (e: KeyboardEvent) => void\n}\n\nexport const FOCUS_TRAP_INJECTION_KEY: InjectionKey<FocusTrapInjectionContext> =\n Symbol('elFocusTrap')\n"],"names":[],"mappings":"AAAY,MAAC,mBAAmB,GAAG,iCAAiC;AACxD,MAAC,oBAAoB,GAAG,kCAAkC;AAC1D,MAAC,wBAAwB,GAAG;AACxC,EAAE,UAAU,EAAE,IAAI;AAClB,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE;AACU,MAAC,iBAAiB,GAAG,oBAAoB;AACzC,MAAC,oBAAoB,GAAG,qBAAqB;AAC7C,MAAC,wBAAwB,GAAG,MAAM,CAAC,aAAa;;;;"}
|
|
1
|
+
{"version":3,"file":"tokens.mjs","sources":["../../../../../../packages/components/focus-trap/src/tokens.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\nexport const FOCUS_AFTER_TRAPPED = 'focus-trap.focus-after-trapped'\nexport const FOCUS_AFTER_RELEASED = 'focus-trap.focus-after-released'\nexport const FOCUSOUT_PREVENTED = 'focus-trap.focusout-prevented'\nexport const FOCUS_AFTER_TRAPPED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\nexport const FOCUSOUT_PREVENTED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\n\nexport const ON_TRAP_FOCUS_EVT = 'focusAfterTrapped'\nexport const ON_RELEASE_FOCUS_EVT = 'focusAfterReleased'\n\nexport type FocusTrapInjectionContext = {\n focusTrapRef: Ref<HTMLElement | undefined>\n onKeydown: (e: KeyboardEvent) => void\n}\n\nexport const FOCUS_TRAP_INJECTION_KEY: InjectionKey<FocusTrapInjectionContext> =\n Symbol('elFocusTrap')\n"],"names":[],"mappings":"AAAY,MAAC,mBAAmB,GAAG,iCAAiC;AACxD,MAAC,oBAAoB,GAAG,kCAAkC;AAC1D,MAAC,kBAAkB,GAAG,gCAAgC;AACtD,MAAC,wBAAwB,GAAG;AACxC,EAAE,UAAU,EAAE,IAAI;AAClB,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE;AACU,MAAC,uBAAuB,GAAG;AACvC,EAAE,UAAU,EAAE,IAAI;AAClB,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE;AACU,MAAC,iBAAiB,GAAG,oBAAoB;AACzC,MAAC,oBAAoB,GAAG,qBAAqB;AAC7C,MAAC,wBAAwB,GAAG,MAAM,CAAC,aAAa;;;;"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
declare const focusReason: import("vue").Ref<"pointer" | "keyboard" | undefined>;
|
|
2
|
+
declare const lastUserFocusTimestamp: import("vue").Ref<number>;
|
|
3
|
+
declare const lastAutomatedFocusTimestamp: import("vue").Ref<number>;
|
|
1
4
|
export declare type FocusLayer = {
|
|
2
5
|
paused: boolean;
|
|
3
6
|
pause: () => void;
|
|
@@ -16,3 +19,11 @@ export declare const focusableStack: {
|
|
|
16
19
|
push: (layer: FocusLayer) => void;
|
|
17
20
|
remove: (layer: FocusLayer) => void;
|
|
18
21
|
};
|
|
22
|
+
export declare const isFocusCausedByUserEvent: () => boolean;
|
|
23
|
+
export declare const useFocusReason: () => {
|
|
24
|
+
focusReason: typeof focusReason;
|
|
25
|
+
lastUserFocusTimestamp: typeof lastUserFocusTimestamp;
|
|
26
|
+
lastAutomatedFocusTimestamp: typeof lastAutomatedFocusTimestamp;
|
|
27
|
+
};
|
|
28
|
+
export declare const createFocusOutPreventedEvent: (detail: CustomEventInit['detail']) => CustomEvent<any>;
|
|
29
|
+
export {};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
|
2
|
+
import { FOCUSOUT_PREVENTED, FOCUSOUT_PREVENTED_OPTS } from './tokens.mjs';
|
|
3
|
+
|
|
4
|
+
const focusReason = ref();
|
|
5
|
+
const lastUserFocusTimestamp = ref(0);
|
|
6
|
+
const lastAutomatedFocusTimestamp = ref(0);
|
|
7
|
+
let focusReasonUserCount = 0;
|
|
1
8
|
const obtainAllFocusableElements = (element) => {
|
|
2
9
|
const nodes = [];
|
|
3
10
|
const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {
|
|
@@ -45,6 +52,7 @@ const tryFocus = (element, shouldSelect) => {
|
|
|
45
52
|
if (element && element.focus) {
|
|
46
53
|
const prevFocusedElement = document.activeElement;
|
|
47
54
|
element.focus({ preventScroll: true });
|
|
55
|
+
lastAutomatedFocusTimestamp.value = window.performance.now();
|
|
48
56
|
if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
|
|
49
57
|
element.select();
|
|
50
58
|
}
|
|
@@ -87,6 +95,46 @@ const focusFirstDescendant = (elements, shouldSelect = false) => {
|
|
|
87
95
|
}
|
|
88
96
|
};
|
|
89
97
|
const focusableStack = createFocusableStack();
|
|
98
|
+
const isFocusCausedByUserEvent = () => {
|
|
99
|
+
return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
|
|
100
|
+
};
|
|
101
|
+
const notifyFocusReasonPointer = () => {
|
|
102
|
+
focusReason.value = "pointer";
|
|
103
|
+
lastUserFocusTimestamp.value = window.performance.now();
|
|
104
|
+
};
|
|
105
|
+
const notifyFocusReasonKeydown = () => {
|
|
106
|
+
focusReason.value = "keyboard";
|
|
107
|
+
lastUserFocusTimestamp.value = window.performance.now();
|
|
108
|
+
};
|
|
109
|
+
const useFocusReason = () => {
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
if (focusReasonUserCount === 0) {
|
|
112
|
+
document.addEventListener("mousedown", notifyFocusReasonPointer);
|
|
113
|
+
document.addEventListener("touchstart", notifyFocusReasonPointer);
|
|
114
|
+
document.addEventListener("keydown", notifyFocusReasonKeydown);
|
|
115
|
+
}
|
|
116
|
+
focusReasonUserCount++;
|
|
117
|
+
});
|
|
118
|
+
onBeforeUnmount(() => {
|
|
119
|
+
focusReasonUserCount--;
|
|
120
|
+
if (focusReasonUserCount <= 0) {
|
|
121
|
+
document.removeEventListener("mousedown", notifyFocusReasonPointer);
|
|
122
|
+
document.removeEventListener("touchstart", notifyFocusReasonPointer);
|
|
123
|
+
document.removeEventListener("keydown", notifyFocusReasonKeydown);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
focusReason,
|
|
128
|
+
lastUserFocusTimestamp,
|
|
129
|
+
lastAutomatedFocusTimestamp
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
const createFocusOutPreventedEvent = (detail) => {
|
|
133
|
+
return new CustomEvent(FOCUSOUT_PREVENTED, {
|
|
134
|
+
...FOCUSOUT_PREVENTED_OPTS,
|
|
135
|
+
detail
|
|
136
|
+
});
|
|
137
|
+
};
|
|
90
138
|
|
|
91
|
-
export { focusFirstDescendant, focusableStack, getEdges, getVisibleElement, isHidden, obtainAllFocusableElements, tryFocus };
|
|
139
|
+
export { createFocusOutPreventedEvent, focusFirstDescendant, focusableStack, getEdges, getVisibleElement, isFocusCausedByUserEvent, isHidden, obtainAllFocusableElements, tryFocus, useFocusReason };
|
|
92
140
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/focus-trap/src/utils.ts"],"sourcesContent":["export type FocusLayer = {\n paused: boolean\n pause: () => void\n resume: () => void\n}\n\nexport type FocusStack = FocusLayer[]\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n const nodes: HTMLElement[] = []\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (\n node: Element & {\n disabled: boolean\n hidden: boolean\n type: string\n tabIndex: number\n }\n ) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP\n return node.tabIndex >= 0 || node === document.activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n },\n })\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n\n return nodes\n}\n\nexport const getVisibleElement = (\n elements: HTMLElement[],\n container: HTMLElement\n) => {\n for (const element of elements) {\n if (!isHidden(element, container)) return element\n }\n}\n\nexport const isHidden = (element: HTMLElement, container: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return false\n if (getComputedStyle(element).visibility === 'hidden') return true\n\n while (element) {\n if (container && element === container) return false\n if (getComputedStyle(element).display === 'none') return true\n element = element.parentElement as HTMLElement\n }\n\n return false\n}\n\nexport const getEdges = (container: HTMLElement) => {\n const focusable = obtainAllFocusableElements(container)\n const first = getVisibleElement(focusable, container)\n const last = getVisibleElement(focusable.reverse(), container)\n return [first, last]\n}\n\nconst isSelectable = (\n element: any\n): element is HTMLInputElement & { select: () => void } => {\n return element instanceof HTMLInputElement && 'select' in element\n}\n\nexport const tryFocus = (\n element?: HTMLElement | { focus: () => void } | null,\n shouldSelect?: boolean\n) => {\n if (element && element.focus) {\n const prevFocusedElement = document.activeElement\n element.focus({ preventScroll: true })\n if (\n element !== prevFocusedElement &&\n isSelectable(element) &&\n shouldSelect\n ) {\n element.select()\n }\n }\n}\n\nfunction removeFromStack<T>(list: T[], item: T) {\n const copy = [...list]\n\n const idx = list.indexOf(item)\n\n if (idx !== -1) {\n copy.splice(idx, 1)\n }\n return copy\n}\n\nconst createFocusableStack = () => {\n let stack = [] as FocusStack\n\n const push = (layer: FocusLayer) => {\n const currentLayer = stack[0]\n\n if (currentLayer && layer !== currentLayer) {\n currentLayer.pause()\n }\n\n stack = removeFromStack(stack, layer)\n stack.unshift(layer)\n }\n\n const remove = (layer: FocusLayer) => {\n stack = removeFromStack(stack, layer)\n stack[0]?.resume?.()\n }\n\n return {\n push,\n remove,\n }\n}\n\nexport const focusFirstDescendant = (\n elements: HTMLElement[],\n shouldSelect = false\n) => {\n const prevFocusedElement = document.activeElement\n for (const element of elements) {\n tryFocus(element, shouldSelect)\n if (document.activeElement !== prevFocusedElement) return\n }\n}\n\nexport const focusableStack = createFocusableStack()\n"],"names":[],"mappings":"AAAY,MAAC,0BAA0B,GAAG,CAAC,OAAO,KAAK;AACvD,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,YAAY,EAAE;AAC7E,IAAI,UAAU,EAAE,CAAC,IAAI,KAAK;AAC1B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC/E,MAAM,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,IAAI,aAAa;AACvD,QAAQ,OAAO,UAAU,CAAC,WAAW,CAAC;AACtC,MAAM,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,IAAI,KAAK,QAAQ,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC;AACvH,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,MAAM,CAAC,QAAQ,EAAE;AAC1B,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACnC,EAAE,OAAO,KAAK,CAAC;AACf,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,KAAK;AAC1D,EAAE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;AACrC,MAAM,OAAO,OAAO,CAAC;AACrB,GAAG;AACH,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,OAAO,EAAE,SAAS,KAAK;AAChD,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM;AACrC,IAAI,OAAO,KAAK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;AACT,IAAI,IAAI;AACR,IAAI,MAAM;AACV,GAAG,CAAC;AACJ,CAAC,CAAC;AACU,MAAC,oBAAoB,GAAG,CAAC,QAAQ,EAAE,YAAY,GAAG,KAAK,KAAK;AACxE,EAAE,MAAM,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC;AACpD,EAAE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAClC,IAAI,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AACpC,IAAI,IAAI,QAAQ,CAAC,aAAa,KAAK,kBAAkB;AACrD,MAAM,OAAO;AACb,GAAG;AACH,EAAE;AACU,MAAC,cAAc,GAAG,oBAAoB;;;;"}
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/focus-trap/src/utils.ts"],"sourcesContent":["import { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { FOCUSOUT_PREVENTED, FOCUSOUT_PREVENTED_OPTS } from './tokens'\n\nconst focusReason = ref<'pointer' | 'keyboard'>()\nconst lastUserFocusTimestamp = ref<number>(0)\nconst lastAutomatedFocusTimestamp = ref<number>(0)\nlet focusReasonUserCount = 0\n\nexport type FocusLayer = {\n paused: boolean\n pause: () => void\n resume: () => void\n}\n\nexport type FocusStack = FocusLayer[]\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n const nodes: HTMLElement[] = []\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (\n node: Element & {\n disabled: boolean\n hidden: boolean\n type: string\n tabIndex: number\n }\n ) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP\n return node.tabIndex >= 0 || node === document.activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n },\n })\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n\n return nodes\n}\n\nexport const getVisibleElement = (\n elements: HTMLElement[],\n container: HTMLElement\n) => {\n for (const element of elements) {\n if (!isHidden(element, container)) return element\n }\n}\n\nexport const isHidden = (element: HTMLElement, container: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return false\n if (getComputedStyle(element).visibility === 'hidden') return true\n\n while (element) {\n if (container && element === container) return false\n if (getComputedStyle(element).display === 'none') return true\n element = element.parentElement as HTMLElement\n }\n\n return false\n}\n\nexport const getEdges = (container: HTMLElement) => {\n const focusable = obtainAllFocusableElements(container)\n const first = getVisibleElement(focusable, container)\n const last = getVisibleElement(focusable.reverse(), container)\n return [first, last]\n}\n\nconst isSelectable = (\n element: any\n): element is HTMLInputElement & { select: () => void } => {\n return element instanceof HTMLInputElement && 'select' in element\n}\n\nexport const tryFocus = (\n element?: HTMLElement | { focus: () => void } | null,\n shouldSelect?: boolean\n) => {\n if (element && element.focus) {\n const prevFocusedElement = document.activeElement\n element.focus({ preventScroll: true })\n lastAutomatedFocusTimestamp.value = window.performance.now()\n if (\n element !== prevFocusedElement &&\n isSelectable(element) &&\n shouldSelect\n ) {\n element.select()\n }\n }\n}\n\nfunction removeFromStack<T>(list: T[], item: T) {\n const copy = [...list]\n\n const idx = list.indexOf(item)\n\n if (idx !== -1) {\n copy.splice(idx, 1)\n }\n return copy\n}\n\nconst createFocusableStack = () => {\n let stack = [] as FocusStack\n\n const push = (layer: FocusLayer) => {\n const currentLayer = stack[0]\n\n if (currentLayer && layer !== currentLayer) {\n currentLayer.pause()\n }\n\n stack = removeFromStack(stack, layer)\n stack.unshift(layer)\n }\n\n const remove = (layer: FocusLayer) => {\n stack = removeFromStack(stack, layer)\n stack[0]?.resume?.()\n }\n\n return {\n push,\n remove,\n }\n}\n\nexport const focusFirstDescendant = (\n elements: HTMLElement[],\n shouldSelect = false\n) => {\n const prevFocusedElement = document.activeElement\n for (const element of elements) {\n tryFocus(element, shouldSelect)\n if (document.activeElement !== prevFocusedElement) return\n }\n}\n\nexport const focusableStack = createFocusableStack()\n\nexport const isFocusCausedByUserEvent = (): boolean => {\n return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value\n}\n\nconst notifyFocusReasonPointer = () => {\n focusReason.value = 'pointer'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nconst notifyFocusReasonKeydown = () => {\n focusReason.value = 'keyboard'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nexport const useFocusReason = (): {\n focusReason: typeof focusReason\n lastUserFocusTimestamp: typeof lastUserFocusTimestamp\n lastAutomatedFocusTimestamp: typeof lastAutomatedFocusTimestamp\n} => {\n onMounted(() => {\n if (focusReasonUserCount === 0) {\n document.addEventListener('mousedown', notifyFocusReasonPointer)\n document.addEventListener('touchstart', notifyFocusReasonPointer)\n document.addEventListener('keydown', notifyFocusReasonKeydown)\n }\n focusReasonUserCount++\n })\n\n onBeforeUnmount(() => {\n focusReasonUserCount--\n if (focusReasonUserCount <= 0) {\n document.removeEventListener('mousedown', notifyFocusReasonPointer)\n document.removeEventListener('touchstart', notifyFocusReasonPointer)\n document.removeEventListener('keydown', notifyFocusReasonKeydown)\n }\n })\n\n return {\n focusReason,\n lastUserFocusTimestamp,\n lastAutomatedFocusTimestamp,\n }\n}\n\nexport const createFocusOutPreventedEvent = (\n detail: CustomEventInit['detail']\n) => {\n return new CustomEvent(FOCUSOUT_PREVENTED, {\n ...FOCUSOUT_PREVENTED_OPTS,\n detail,\n })\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC;AAC1B,MAAM,sBAAsB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACtC,MAAM,2BAA2B,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3C,IAAI,oBAAoB,GAAG,CAAC,CAAC;AACjB,MAAC,0BAA0B,GAAG,CAAC,OAAO,KAAK;AACvD,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAA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E;AACnC,MAAM,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAC;AAC1E,MAAM,QAAQ,CAAC,mBAAmB,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;AAC3E,MAAM,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC;AACxE,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,WAAW;AACf,IAAI,sBAAsB;AAC1B,IAAI,2BAA2B;AAC/B,GAAG,CAAC;AACJ,EAAE;AACU,MAAC,4BAA4B,GAAG,CAAC,MAAM,KAAK;AACxD,EAAE,OAAO,IAAI,WAAW,CAAC,kBAAkB,EAAE;AAC7C,IAAI,GAAG,uBAAuB;AAC9B,IAAI,MAAM;AACV,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -2885,9 +2885,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2885
2885
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2886
2886
|
togglePopperAlive: () => void;
|
|
2887
2887
|
onFocusAfterTrapped: () => void;
|
|
2888
|
-
onFocusAfterReleased: () => void;
|
|
2888
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2889
2889
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2890
|
-
onFocusoutPrevented: () => void;
|
|
2890
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2891
2891
|
onReleaseRequested: () => void;
|
|
2892
2892
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2893
2893
|
loop: BooleanConstructor;
|
|
@@ -5756,9 +5756,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5756
5756
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5757
5757
|
togglePopperAlive: () => void;
|
|
5758
5758
|
onFocusAfterTrapped: () => void;
|
|
5759
|
-
onFocusAfterReleased: () => void;
|
|
5759
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5760
5760
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5761
|
-
onFocusoutPrevented: () => void;
|
|
5761
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5762
5762
|
onReleaseRequested: () => void;
|
|
5763
5763
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5764
5764
|
loop: BooleanConstructor;
|
|
@@ -2667,9 +2667,9 @@ export declare const ElPopconfirm: import("element-plus/es/utils").SFCWithInstal
|
|
|
2667
2667
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2668
2668
|
togglePopperAlive: () => void;
|
|
2669
2669
|
onFocusAfterTrapped: () => void;
|
|
2670
|
-
onFocusAfterReleased: () => void;
|
|
2670
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2671
2671
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2672
|
-
onFocusoutPrevented: () => void;
|
|
2672
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2673
2673
|
onReleaseRequested: () => void;
|
|
2674
2674
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2675
2675
|
loop: BooleanConstructor;
|
|
@@ -5538,9 +5538,9 @@ export declare const ElPopconfirm: import("element-plus/es/utils").SFCWithInstal
|
|
|
5538
5538
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5539
5539
|
togglePopperAlive: () => void;
|
|
5540
5540
|
onFocusAfterTrapped: () => void;
|
|
5541
|
-
onFocusAfterReleased: () => void;
|
|
5541
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5542
5542
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5543
|
-
onFocusoutPrevented: () => void;
|
|
5543
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5544
5544
|
onReleaseRequested: () => void;
|
|
5545
5545
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5546
5546
|
loop: BooleanConstructor;
|
|
@@ -8681,9 +8681,9 @@ export declare const ElPopconfirm: import("element-plus/es/utils").SFCWithInstal
|
|
|
8681
8681
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
8682
8682
|
togglePopperAlive: () => void;
|
|
8683
8683
|
onFocusAfterTrapped: () => void;
|
|
8684
|
-
onFocusAfterReleased: () => void;
|
|
8684
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
8685
8685
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
8686
|
-
onFocusoutPrevented: () => void;
|
|
8686
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
8687
8687
|
onReleaseRequested: () => void;
|
|
8688
8688
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
8689
8689
|
loop: BooleanConstructor;
|
|
@@ -2667,9 +2667,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2667
2667
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2668
2668
|
togglePopperAlive: () => void;
|
|
2669
2669
|
onFocusAfterTrapped: () => void;
|
|
2670
|
-
onFocusAfterReleased: () => void;
|
|
2670
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2671
2671
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2672
|
-
onFocusoutPrevented: () => void;
|
|
2672
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2673
2673
|
onReleaseRequested: () => void;
|
|
2674
2674
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2675
2675
|
loop: BooleanConstructor;
|
|
@@ -5538,9 +5538,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5538
5538
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5539
5539
|
togglePopperAlive: () => void;
|
|
5540
5540
|
onFocusAfterTrapped: () => void;
|
|
5541
|
-
onFocusAfterReleased: () => void;
|
|
5541
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5542
5542
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5543
|
-
onFocusoutPrevented: () => void;
|
|
5543
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5544
5544
|
onReleaseRequested: () => void;
|
|
5545
5545
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5546
5546
|
loop: BooleanConstructor;
|
|
@@ -8681,9 +8681,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8681
8681
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
8682
8682
|
togglePopperAlive: () => void;
|
|
8683
8683
|
onFocusAfterTrapped: () => void;
|
|
8684
|
-
onFocusAfterReleased: () => void;
|
|
8684
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
8685
8685
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
8686
|
-
onFocusoutPrevented: () => void;
|
|
8686
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
8687
8687
|
onReleaseRequested: () => void;
|
|
8688
8688
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
8689
8689
|
loop: BooleanConstructor;
|
|
@@ -2916,9 +2916,9 @@ export declare const ElPopover: import("element-plus/es/utils").SFCWithInstall<i
|
|
|
2916
2916
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2917
2917
|
togglePopperAlive: () => void;
|
|
2918
2918
|
onFocusAfterTrapped: () => void;
|
|
2919
|
-
onFocusAfterReleased: () => void;
|
|
2919
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2920
2920
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2921
|
-
onFocusoutPrevented: () => void;
|
|
2921
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2922
2922
|
onReleaseRequested: () => void;
|
|
2923
2923
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2924
2924
|
loop: BooleanConstructor;
|
|
@@ -5787,9 +5787,9 @@ export declare const ElPopover: import("element-plus/es/utils").SFCWithInstall<i
|
|
|
5787
5787
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5788
5788
|
togglePopperAlive: () => void;
|
|
5789
5789
|
onFocusAfterTrapped: () => void;
|
|
5790
|
-
onFocusAfterReleased: () => void;
|
|
5790
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5791
5791
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5792
|
-
onFocusoutPrevented: () => void;
|
|
5792
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5793
5793
|
onReleaseRequested: () => void;
|
|
5794
5794
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5795
5795
|
loop: BooleanConstructor;
|
|
@@ -8638,9 +8638,9 @@ export declare const ElPopover: import("element-plus/es/utils").SFCWithInstall<i
|
|
|
8638
8638
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
8639
8639
|
togglePopperAlive: () => void;
|
|
8640
8640
|
onFocusAfterTrapped: () => void;
|
|
8641
|
-
onFocusAfterReleased: () => void;
|
|
8641
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
8642
8642
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
8643
|
-
onFocusoutPrevented: () => void;
|
|
8643
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
8644
8644
|
onReleaseRequested: () => void;
|
|
8645
8645
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
8646
8646
|
loop: BooleanConstructor;
|
|
@@ -2915,9 +2915,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2915
2915
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2916
2916
|
togglePopperAlive: () => void;
|
|
2917
2917
|
onFocusAfterTrapped: () => void;
|
|
2918
|
-
onFocusAfterReleased: () => void;
|
|
2918
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2919
2919
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2920
|
-
onFocusoutPrevented: () => void;
|
|
2920
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2921
2921
|
onReleaseRequested: () => void;
|
|
2922
2922
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2923
2923
|
loop: BooleanConstructor;
|
|
@@ -5786,9 +5786,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5786
5786
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5787
5787
|
togglePopperAlive: () => void;
|
|
5788
5788
|
onFocusAfterTrapped: () => void;
|
|
5789
|
-
onFocusAfterReleased: () => void;
|
|
5789
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5790
5790
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5791
|
-
onFocusoutPrevented: () => void;
|
|
5791
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5792
5792
|
onReleaseRequested: () => void;
|
|
5793
5793
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5794
5794
|
loop: BooleanConstructor;
|
|
@@ -8637,9 +8637,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8637
8637
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
8638
8638
|
togglePopperAlive: () => void;
|
|
8639
8639
|
onFocusAfterTrapped: () => void;
|
|
8640
|
-
onFocusAfterReleased: () => void;
|
|
8640
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
8641
8641
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
8642
|
-
onFocusoutPrevented: () => void;
|
|
8642
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
8643
8643
|
onReleaseRequested: () => void;
|
|
8644
8644
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
8645
8645
|
loop: BooleanConstructor;
|
|
@@ -565,9 +565,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
565
565
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
566
566
|
togglePopperAlive: () => void;
|
|
567
567
|
onFocusAfterTrapped: () => void;
|
|
568
|
-
onFocusAfterReleased: () => void;
|
|
568
|
+
onFocusAfterReleased: (event: CustomEvent) => void;
|
|
569
569
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
570
|
-
onFocusoutPrevented: () => void;
|
|
570
|
+
onFocusoutPrevented: (event: CustomEvent) => void;
|
|
571
571
|
onReleaseRequested: () => void;
|
|
572
572
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
573
573
|
loop: BooleanConstructor;
|
|
@@ -91,25 +91,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
const onFocusAfterTrapped = () => {
|
|
92
92
|
emit("focus");
|
|
93
93
|
};
|
|
94
|
-
const onFocusAfterReleased = () => {
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
const onFocusAfterReleased = (event) => {
|
|
95
|
+
var _a;
|
|
96
|
+
if (((_a = event.detail) == null ? void 0 : _a.focusReason) !== "pointer") {
|
|
97
|
+
focusStartRef.value = "first";
|
|
98
|
+
emit("blur");
|
|
99
|
+
}
|
|
97
100
|
};
|
|
98
101
|
const onFocusInTrap = (event) => {
|
|
99
|
-
var _a;
|
|
100
102
|
if (props.visible && !trapped.value) {
|
|
101
103
|
if (event.target) {
|
|
102
104
|
focusStartRef.value = event.target;
|
|
103
105
|
}
|
|
104
106
|
trapped.value = true;
|
|
105
|
-
if (event.relatedTarget) {
|
|
106
|
-
;
|
|
107
|
-
(_a = event.relatedTarget) == null ? void 0 : _a.focus();
|
|
108
|
-
}
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
|
-
const onFocusoutPrevented = () => {
|
|
109
|
+
const onFocusoutPrevented = (event) => {
|
|
112
110
|
if (!props.trapping) {
|
|
111
|
+
if (event.detail.focusReason === "pointer") {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
}
|
|
113
114
|
trapped.value = false;
|
|
114
115
|
}
|
|
115
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"popperContentRef\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"popperContentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\nimport { createPopper } from '@popperjs/core'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport {\n POPPER_CONTENT_INJECTION_KEY,\n POPPER_INJECTION_KEY,\n formItemContextKey,\n} from '@element-plus/tokens'\nimport { isElement } from '@element-plus/utils'\nimport { popperContentEmits, popperContentProps } from './content'\nimport { buildPopperOptions, unwrapMeasurableEl } from './utils'\n\nimport type { WatchStopHandle } from 'vue'\nimport type { CreatePopperInstanceParams } from './content'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst { popperInstanceRef, contentRef, triggerRef, role } = inject(\n POPPER_INJECTION_KEY,\n undefined\n)!\nconst formItemContext = inject(formItemContextKey, undefined)\nconst { nextZIndex } = useZIndex()\nconst ns = useNamespace('popper')\nconst popperContentRef = ref<HTMLElement>()\nconst focusStartRef = ref<'container' | 'first' | HTMLElement>('first')\nconst arrowRef = ref<HTMLElement>()\nconst arrowOffset = ref<number>()\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowRef,\n arrowOffset,\n})\n\nif (\n formItemContext &&\n (formItemContext.addInputId || formItemContext.removeInputId)\n) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nconst contentZIndex = ref<number>(props.zIndex || nextZIndex())\nconst trapped = ref<boolean>(false)\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst computedReference = computed(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)\n)\n\nconst contentStyle = computed(\n () => [{ zIndex: unref(contentZIndex) }, props.popperStyle] as any\n)\n\nconst contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n])\n\nconst ariaModal = computed<string | undefined>(() => {\n return role && role.value === 'dialog' ? 'false' : undefined\n})\n\nconst createPopperInstance = ({\n referenceEl,\n popperContentEl,\n arrowEl,\n}: CreatePopperInstanceParams) => {\n const options = buildPopperOptions(props, {\n arrowEl,\n arrowOffset: unref(arrowOffset),\n })\n\n return createPopper(referenceEl, popperContentEl, options)\n}\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n unref(popperInstanceRef)?.update()\n shouldUpdateZIndex && (contentZIndex.value = props.zIndex || nextZIndex())\n}\n\nconst togglePopperAlive = () => {\n const monitorable = { name: 'eventListeners', enabled: props.visible }\n unref(popperInstanceRef)?.setOptions?.((options) => ({\n ...options,\n modifiers: [...(options.modifiers || []), monitorable],\n }))\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nconst onFocusAfterTrapped = () => {\n emit('focus')\n}\n\nconst onFocusAfterReleased = () => {\n focusStartRef.value = 'first'\n emit('blur')\n}\n\nconst onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n if (event.relatedTarget) {\n ;(event.relatedTarget as HTMLElement)?.focus()\n }\n }\n}\n\nconst onFocusoutPrevented = () => {\n if (!props.trapping) {\n trapped.value = false\n }\n}\n\nconst onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n}\n\nonMounted(() => {\n let updateHandle: WatchStopHandle\n watch(\n computedReference,\n (referenceEl) => {\n updateHandle?.()\n const popperInstance = unref(popperInstanceRef)\n popperInstance?.destroy?.()\n if (referenceEl) {\n const popperContentEl = unref(popperContentRef)!\n contentRef.value = popperContentEl\n\n popperInstanceRef.value = createPopperInstance({\n referenceEl,\n popperContentEl,\n arrowEl: unref(arrowRef),\n })\n\n updateHandle = watch(\n () => referenceEl.getBoundingClientRect(),\n () => updatePopper(),\n {\n immediate: true,\n }\n )\n } else {\n popperInstanceRef.value = undefined\n }\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || popperContentRef.value)\n const prevEl = unref(prevTriggerTargetEl || popperContentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n\n watch(\n () =>\n buildPopperOptions(props, {\n arrowEl: unref(arrowRef),\n arrowOffset: unref(arrowOffset),\n }),\n (option) => popperInstanceRef.value?.setOptions(option)\n )\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;mCAqDc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAA,MAAM,EAAE,iBAAmB,EAAA,UAAA,EAAY,YAAY,IAAS,EAAA,GAAA,MAAA,CAC1D,sBACA,KACF,CAAA,CAAA,CAAA;AACA,IAAM,MAAA,eAAA,GAAkB,MAAO,CAAA,kBAAA,EAAoB,KAAS,CAAA,CAAA,CAAA;AAC5D,IAAM,MAAA,EAAE,eAAe,SAAU,EAAA,CAAA;AACjC,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAChC,IAAA,MAAM,mBAAmB,GAAiB,EAAA,CAAA;AAC1C,IAAM,MAAA,aAAA,GAAgB,IAAyC,OAAO,CAAA,CAAA;AACtE,IAAA,MAAM,WAAW,GAAiB,EAAA,CAAA;AAClC,IAAA,MAAM,cAAc,GAAY,EAAA,CAAA;AAChC,IAAA,OAAA,CAAQ,4BAA8B,EAAA;AAAA,MACpC,QAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,IACE,eACC,KAAA,eAAA,CAAgB,UAAc,IAAA,eAAA,CAAgB,aAC/C,CAAA,EAAA;AAEA,MAAA,OAAA,CAAQ,kBAAoB,EAAA;AAAA,QAC1B,GAAG,eAAA;AAAA,QACH,UAAY,EAAA,IAAA;AAAA,QACZ,aAAe,EAAA,IAAA;AAAA,OAChB,CAAA,CAAA;AAAA,KACH;AAEA,IAAA,MAAM,aAAgB,GAAA,GAAA,CAAY,KAAM,CAAA,MAAA,I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AAA,GAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"popperContentRef\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"popperContentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\nimport { createPopper } from '@popperjs/core'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport {\n POPPER_CONTENT_INJECTION_KEY,\n POPPER_INJECTION_KEY,\n formItemContextKey,\n} from '@element-plus/tokens'\nimport { isElement } from '@element-plus/utils'\nimport { popperContentEmits, popperContentProps } from './content'\nimport { buildPopperOptions, unwrapMeasurableEl } from './utils'\n\nimport type { WatchStopHandle } from 'vue'\nimport type { CreatePopperInstanceParams } from './content'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst { popperInstanceRef, contentRef, triggerRef, role } = inject(\n POPPER_INJECTION_KEY,\n undefined\n)!\nconst formItemContext = inject(formItemContextKey, undefined)\nconst { nextZIndex } = useZIndex()\nconst ns = useNamespace('popper')\nconst popperContentRef = ref<HTMLElement>()\nconst focusStartRef = ref<'container' | 'first' | HTMLElement>('first')\nconst arrowRef = ref<HTMLElement>()\nconst arrowOffset = ref<number>()\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowRef,\n arrowOffset,\n})\n\nif (\n formItemContext &&\n (formItemContext.addInputId || formItemContext.removeInputId)\n) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nconst contentZIndex = ref<number>(props.zIndex || nextZIndex())\nconst trapped = ref<boolean>(false)\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst computedReference = computed(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)\n)\n\nconst contentStyle = computed(\n () => [{ zIndex: unref(contentZIndex) }, props.popperStyle] as any\n)\n\nconst contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n])\n\nconst ariaModal = computed<string | undefined>(() => {\n return role && role.value === 'dialog' ? 'false' : undefined\n})\n\nconst createPopperInstance = ({\n referenceEl,\n popperContentEl,\n arrowEl,\n}: CreatePopperInstanceParams) => {\n const options = buildPopperOptions(props, {\n arrowEl,\n arrowOffset: unref(arrowOffset),\n })\n\n return createPopper(referenceEl, popperContentEl, options)\n}\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n unref(popperInstanceRef)?.update()\n shouldUpdateZIndex && (contentZIndex.value = props.zIndex || nextZIndex())\n}\n\nconst togglePopperAlive = () => {\n const monitorable = { name: 'eventListeners', enabled: props.visible }\n unref(popperInstanceRef)?.setOptions?.((options) => ({\n ...options,\n modifiers: [...(options.modifiers || []), monitorable],\n }))\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nconst onFocusAfterTrapped = () => {\n emit('focus')\n}\n\nconst onFocusAfterReleased = (event: CustomEvent) => {\n if (event.detail?.focusReason !== 'pointer') {\n focusStartRef.value = 'first'\n emit('blur')\n }\n}\n\nconst onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n }\n}\n\nconst onFocusoutPrevented = (event: CustomEvent) => {\n if (!props.trapping) {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n trapped.value = false\n }\n}\n\nconst onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n}\n\nonMounted(() => {\n let updateHandle: WatchStopHandle\n watch(\n computedReference,\n (referenceEl) => {\n updateHandle?.()\n const popperInstance = unref(popperInstanceRef)\n popperInstance?.destroy?.()\n if (referenceEl) {\n const popperContentEl = unref(popperContentRef)!\n contentRef.value = popperContentEl\n\n popperInstanceRef.value = createPopperInstance({\n referenceEl,\n popperContentEl,\n arrowEl: unref(arrowRef),\n })\n\n updateHandle = watch(\n () => referenceEl.getBoundingClientRect(),\n () => updatePopper(),\n {\n immediate: true,\n }\n )\n } else {\n popperInstanceRef.value = undefined\n }\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || popperContentRef.value)\n const prevEl = unref(prevTriggerTargetEl || popperContentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n\n watch(\n () =>\n buildPopperOptions(props, {\n arrowEl: unref(arrowRef),\n arrowOffset: unref(arrowOffset),\n }),\n (option) => popperInstanceRef.value?.setOptions(option)\n )\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;mCAqDc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAA,MAAM,EAAE,iBAAmB,EAAA,UAAA,EAAY,YAAY,IAAS,EAAA,GAAA,MAAA,CAC1D,sBACA,KACF,CAAA,CAAA,CAAA;AACA,IAAM,MAAA,eAAA,GAAkB,MAAO,CAAA,kBAAA,EAAoB,KAAS,CAAA,CAAA,CAAA;AAC5D,IAAM,MAAA,EAAE,eAAe,SAAU,EAAA,CAAA;AACjC,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAChC,IAAA,MAAM,mBAAmB,GAAiB,EAAA,CAAA;AAC1C,IAAM,MAAA,aAAA,GAAgB,IAAyC,OAAO,CAAA,CAAA;AACtE,IAAA,MAAM,WAAW,GAAiB,EAAA,CAAA;AAClC,IAAA,MAAM,cAAc,GAAY,EAAA,CAAA;AAChC,IAAA,OAAA,CAAQ,4BAA8B,EAAA;AAAA,MACpC,QAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,IACE,eACC,KAAA,eAAA,CAAgB,UAAc,IAAA,eAAA,CAAgB,aAC/C,CAAA,EAAA;AAEA,MAAA,OAAA,CAAQ,kBAAoB,EAAA;AAAA,QAC1B,G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A;AAED,QAAa,OAAA,CAAA,EAAA,GAAA,iBAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAA,CAAA,MAAA,CAAA,CAAA;AAAA,OAIX,CAAA,CAAA;AAAA,KAIA,CAAA,CAAA;AAAA,IAIA,eAAA,CAAA,MAAA;AAAA,MAKA,0BAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,0BAAA,EAAA,CAAA;AAAA,MACD,0BAAA,GAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2755,9 +2755,9 @@ export declare const ElSelect: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
2755
2755
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2756
2756
|
togglePopperAlive: () => void;
|
|
2757
2757
|
onFocusAfterTrapped: () => void;
|
|
2758
|
-
onFocusAfterReleased: () => void;
|
|
2758
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2759
2759
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2760
|
-
onFocusoutPrevented: () => void;
|
|
2760
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2761
2761
|
onReleaseRequested: () => void;
|
|
2762
2762
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2763
2763
|
loop: BooleanConstructor;
|
|
@@ -5626,9 +5626,9 @@ export declare const ElSelect: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
5626
5626
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5627
5627
|
togglePopperAlive: () => void;
|
|
5628
5628
|
onFocusAfterTrapped: () => void;
|
|
5629
|
-
onFocusAfterReleased: () => void;
|
|
5629
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5630
5630
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5631
|
-
onFocusoutPrevented: () => void;
|
|
5631
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5632
5632
|
onReleaseRequested: () => void;
|
|
5633
5633
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5634
5634
|
loop: BooleanConstructor;
|
|
@@ -2757,9 +2757,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2757
2757
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2758
2758
|
togglePopperAlive: () => void;
|
|
2759
2759
|
onFocusAfterTrapped: () => void;
|
|
2760
|
-
onFocusAfterReleased: () => void;
|
|
2760
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2761
2761
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2762
|
-
onFocusoutPrevented: () => void;
|
|
2762
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2763
2763
|
onReleaseRequested: () => void;
|
|
2764
2764
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2765
2765
|
loop: BooleanConstructor;
|
|
@@ -5628,9 +5628,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5628
5628
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5629
5629
|
togglePopperAlive: () => void;
|
|
5630
5630
|
onFocusAfterTrapped: () => void;
|
|
5631
|
-
onFocusAfterReleased: () => void;
|
|
5631
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5632
5632
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5633
|
-
onFocusoutPrevented: () => void;
|
|
5633
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5634
5634
|
onReleaseRequested: () => void;
|
|
5635
5635
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5636
5636
|
loop: BooleanConstructor;
|
|
@@ -2675,9 +2675,9 @@ export declare const useSelect: (props: any, states: States, ctx: any) => {
|
|
|
2675
2675
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
2676
2676
|
togglePopperAlive: () => void;
|
|
2677
2677
|
onFocusAfterTrapped: () => void;
|
|
2678
|
-
onFocusAfterReleased: () => void;
|
|
2678
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2679
2679
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
2680
|
-
onFocusoutPrevented: () => void;
|
|
2680
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
2681
2681
|
onReleaseRequested: () => void;
|
|
2682
2682
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
2683
2683
|
loop: BooleanConstructor;
|
|
@@ -5546,9 +5546,9 @@ export declare const useSelect: (props: any, states: States, ctx: any) => {
|
|
|
5546
5546
|
updatePopper: (shouldUpdateZIndex?: boolean) => void;
|
|
5547
5547
|
togglePopperAlive: () => void;
|
|
5548
5548
|
onFocusAfterTrapped: () => void;
|
|
5549
|
-
onFocusAfterReleased: () => void;
|
|
5549
|
+
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5550
5550
|
onFocusInTrap: (event: FocusEvent) => void;
|
|
5551
|
-
onFocusoutPrevented: () => void;
|
|
5551
|
+
onFocusoutPrevented: (event: CustomEvent<any>) => void;
|
|
5552
5552
|
onReleaseRequested: () => void;
|
|
5553
5553
|
ElFocusTrap: import("vue").DefineComponent<{
|
|
5554
5554
|
loop: BooleanConstructor;
|
|
@@ -608,7 +608,9 @@ const useSelect = (props, states, ctx) => {
|
|
|
608
608
|
if (states.menuVisibleOnFocus) {
|
|
609
609
|
states.menuVisibleOnFocus = false;
|
|
610
610
|
} else {
|
|
611
|
-
|
|
611
|
+
if (!tooltipRef.value || !tooltipRef.value.isFocusInsideContent()) {
|
|
612
|
+
states.visible = !states.visible;
|
|
613
|
+
}
|
|
612
614
|
}
|
|
613
615
|
if (states.visible) {
|
|
614
616
|
;
|