@element-plus/nightly 0.0.20260131 → 0.0.20260201
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 +14 -8
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +14 -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/components/alert/src/alert.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
- package/es/components/avatar/src/avatar.d.ts +4 -3
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb.d.ts +4 -3
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/button/src/button.d.ts +3 -2
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +1 -1
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/select-controller.mjs.map +1 -1
- package/es/components/card/src/card.d.ts +3 -0
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.mjs +1 -1
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/src/cascader.d.ts +4 -3
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.d.ts +4 -3
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/es/components/color-picker-panel/src/props/sv-panel.mjs.map +1 -1
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.d.ts +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.d.ts +3 -3
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/divider/src/divider.d.ts +6 -0
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/input/src/input.d.ts +8 -7
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue.d.ts +23 -23
- package/es/components/input/src/input.vue2.mjs +1 -3
- package/es/components/input/src/input.vue2.mjs.map +1 -1
- package/es/components/input-number/src/input-number.d.ts +3 -0
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +4 -3
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +1 -1
- package/es/components/link/src/link.d.ts +4 -3
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention.vue.d.ts +1 -1
- package/es/components/message/src/message.d.ts +4 -4
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +1 -1
- package/es/components/notification/src/notification.d.ts +6 -5
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +1 -1
- package/es/components/page-header/src/page-header.d.ts +10 -3
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header.vue.d.ts +1 -1
- package/es/components/page-header/src/page-header.vue2.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.d.ts +4 -3
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/radio/src/radio-button.vue.d.ts +10 -10
- package/es/components/radio/src/radio-button.vue2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +18 -18
- package/es/components/radio/src/radio-group.vue2.mjs.map +1 -1
- package/es/components/radio/src/radio.vue.d.ts +12 -12
- package/es/components/radio/src/radio.vue2.mjs.map +1 -1
- package/es/components/rate/src/rate.d.ts +4 -3
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +3 -4
- package/es/components/result/src/result.d.ts +6 -0
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.d.ts +3 -0
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.d.ts +3 -0
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.d.ts +3 -0
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/steps/src/item.d.ts +7 -3
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item.vue.d.ts +1 -1
- package/es/components/switch/src/switch.d.ts +10 -9
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/time-select/src/time-select.d.ts +6 -2
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +2 -2
- package/es/components/time-select/src/time-select.vue2.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item.d.ts +4 -3
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.d.ts +3 -0
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tour/src/step.d.ts +4 -3
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/tour.d.ts +4 -3
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tree-v2/src/types.d.ts +1 -1
- package/es/hooks/use-aria/index.d.ts +3 -0
- package/es/hooks/use-aria/index.mjs.map +1 -1
- package/es/utils/dom/aria.d.ts +1 -0
- package/es/utils/dom/aria.mjs +5 -1
- package/es/utils/dom/aria.mjs.map +1 -1
- package/es/utils/dom/index.mjs +1 -1
- package/es/utils/dom/scroll.mjs +6 -1
- package/es/utils/dom/scroll.mjs.map +1 -1
- package/es/utils/dom/style.mjs +2 -1
- package/es/utils/dom/style.mjs.map +1 -1
- package/es/utils/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
- package/lib/components/avatar/src/avatar.d.ts +4 -3
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb.d.ts +4 -3
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/button/src/button.d.ts +3 -2
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +1 -1
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/select-controller.js.map +1 -1
- package/lib/components/card/src/card.d.ts +3 -0
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.js +1 -1
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/src/cascader.d.ts +4 -3
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.d.ts +4 -3
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/lib/components/color-picker-panel/src/props/sv-panel.js.map +1 -1
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.d.ts +1 -1
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.d.ts +3 -3
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/divider/src/divider.d.ts +6 -0
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/input/src/input.d.ts +8 -7
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +23 -23
- package/lib/components/input/src/input.vue2.js +1 -3
- package/lib/components/input/src/input.vue2.js.map +1 -1
- package/lib/components/input-number/src/input-number.d.ts +3 -0
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +4 -3
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +1 -1
- package/lib/components/link/src/link.d.ts +4 -3
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention.vue.d.ts +1 -1
- package/lib/components/message/src/message.d.ts +4 -4
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.d.ts +6 -5
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +1 -1
- package/lib/components/page-header/src/page-header.d.ts +10 -3
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header.vue.d.ts +1 -1
- package/lib/components/page-header/src/page-header.vue2.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.d.ts +4 -3
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/radio/src/radio-button.vue.d.ts +10 -10
- package/lib/components/radio/src/radio-button.vue2.js.map +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +18 -18
- package/lib/components/radio/src/radio-group.vue2.js.map +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +12 -12
- package/lib/components/radio/src/radio.vue2.js.map +1 -1
- package/lib/components/rate/src/rate.d.ts +4 -3
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +3 -4
- package/lib/components/result/src/result.d.ts +6 -0
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/scrollbar/src/bar.d.ts +3 -0
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.d.ts +3 -0
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.d.ts +3 -0
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/steps/src/item.d.ts +7 -3
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item.vue.d.ts +1 -1
- package/lib/components/switch/src/switch.d.ts +10 -9
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/time-select/src/time-select.d.ts +6 -2
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
- package/lib/components/time-select/src/time-select.vue2.js.map +1 -1
- package/lib/components/timeline/src/timeline-item.d.ts +4 -3
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.d.ts +3 -0
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tour/src/step.d.ts +4 -3
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/tour.d.ts +4 -3
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tree-v2/src/types.d.ts +1 -1
- package/lib/hooks/use-aria/index.d.ts +3 -0
- package/lib/hooks/use-aria/index.js.map +1 -1
- package/lib/utils/dom/aria.d.ts +1 -0
- package/lib/utils/dom/aria.js +5 -0
- package/lib/utils/dom/aria.js.map +1 -1
- package/lib/utils/dom/index.js +1 -0
- package/lib/utils/dom/index.js.map +1 -1
- package/lib/utils/dom/scroll.js +6 -1
- package/lib/utils/dom/scroll.js.map +1 -1
- package/lib/utils/dom/style.js +2 -1
- package/lib/utils/dom/style.js.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- 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,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { IconPropType } from '@element-plus/nightly/es/utils';
|
|
2
3
|
import type TimelineItem from './timeline-item.vue';
|
|
3
4
|
export interface TimelineItemProps {
|
|
4
5
|
/**
|
|
@@ -32,7 +33,7 @@ export interface TimelineItemProps {
|
|
|
32
33
|
/**
|
|
33
34
|
* @description icon component
|
|
34
35
|
*/
|
|
35
|
-
icon?:
|
|
36
|
+
icon?: IconPropType;
|
|
36
37
|
/**
|
|
37
38
|
* @description icon is hollow
|
|
38
39
|
*/
|
|
@@ -50,7 +51,7 @@ export declare const timelineItemProps: {
|
|
|
50
51
|
readonly color: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
51
52
|
readonly size: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
|
|
52
53
|
readonly icon: {
|
|
53
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
|
|
54
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
|
|
54
55
|
readonly required: false;
|
|
55
56
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
56
57
|
__epPropKey: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type {
|
|
1
|
+
{"version":3,"file":"timeline-item.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type TimelineItem from './timeline-item.vue'\n\nexport interface TimelineItemProps {\n /**\n * @description timestamp content\n */\n timestamp?: string\n /**\n * @description whether to show timestamp\n */\n hideTimestamp?: boolean\n /**\n * @description whether vertically centered\n */\n center?: boolean\n /**\n * @description position of timestamp\n */\n placement?: 'top' | 'bottom'\n /**\n * @description node type\n */\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | ''\n /**\n * @description background color of node\n */\n color?: string\n /**\n * @description node size\n */\n size?: 'normal' | 'large'\n /**\n * @description icon component\n */\n icon?: IconPropType\n /**\n * @description icon is hollow\n */\n hollow?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.\n */\nexport const timelineItemProps = buildProps({\n /**\n * @description timestamp content\n */\n timestamp: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show timestamp\n */\n hideTimestamp: Boolean,\n /**\n * @description whether vertically centered\n */\n center: Boolean,\n /**\n * @description position of timestamp\n */\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n /**\n * @description node type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n /**\n * @description background color of node\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description node size\n */\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description icon is hollow\n */\n hollow: Boolean,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.\n */\nexport type TimelineItemPropsPublic = ExtractPublicPropTypes<\n typeof timelineItemProps\n>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;AAgDO,MAAM,oBAAoBA,kBAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAI1C,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe,OAAA;AAAA;AAAA;AAAA;AAAA,EAIf,MAAA,EAAQ,OAAA;AAAA;AAAA;AAAA;AAAA,EAIR,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,KAAA,EAAO,QAAQ,CAAA;AAAA,IACxB,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,UAAU,MAAM,CAAA;AAAA,IAC1D,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,QAAA,EAAU,OAAO,CAAA;AAAA,IAC1B,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAMC;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AACV,CAAU;;;;"}
|
|
@@ -349,5 +349,8 @@ export declare const tooltipEmits: readonly [..."update:visible"[], "before-show
|
|
|
349
349
|
* @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.
|
|
350
350
|
*/
|
|
351
351
|
export type ElTooltipProps = UseTooltipProps;
|
|
352
|
+
/**
|
|
353
|
+
* @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.
|
|
354
|
+
*/
|
|
352
355
|
export type ElTooltipPropsPublic = ExtractPublicPropTypes<typeof useTooltipProps>;
|
|
353
356
|
export type TooltipInstance = InstanceType<typeof Tooltip> & unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../../../../../packages/components/tooltip/src/tooltip.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { createModelToggleComposable } from '@element-plus/hooks'\nimport { popperArrowProps, popperProps } from '@element-plus/components/popper'\nimport { useTooltipContentProps } from './content'\nimport { useTooltipTriggerProps } from './trigger'\n\nimport type {\n PopperArrowProps,\n PopperProps,\n} from '@element-plus/components/popper'\nimport type { ElTooltipContentProps } from './content'\nimport type { UseTooltipTriggerProps } from './trigger'\nimport type Tooltip from './tooltip.vue'\nimport type { ExtractPublicPropTypes } from 'vue'\n\nexport const {\n useModelToggleProps: useTooltipModelToggleProps,\n useModelToggleEmits: useTooltipModelToggleEmits,\n useModelToggle: useTooltipModelToggle,\n} = createModelToggleComposable('visible' as const)\n\nexport interface UseTooltipProps\n extends\n PopperProps,\n ElTooltipContentProps,\n UseTooltipTriggerProps,\n PopperArrowProps {\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow?: boolean\n 'onUpdate:visible'?: (value: boolean) => void\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.\n */\nexport const useTooltipProps = buildProps({\n ...popperProps,\n ...useTooltipModelToggleProps,\n ...useTooltipContentProps,\n ...useTooltipTriggerProps,\n ...popperArrowProps,\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const tooltipEmits = [\n ...useTooltipModelToggleEmits,\n 'before-show',\n 'before-hide',\n 'show',\n 'hide',\n 'open',\n 'close',\n] as const\n\n/**\n * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.\n */\nexport type ElTooltipProps = UseTooltipProps\nexport type ElTooltipPropsPublic = ExtractPublicPropTypes<\n typeof useTooltipProps\n>\n\nexport type TooltipInstance = InstanceType<typeof Tooltip> & unknown\n"],"names":["createModelToggleComposable","buildProps","popperProps","useTooltipContentProps","useTooltipTriggerProps","popperArrowProps"],"mappings":";;;;;;;;;AAeO,MAAM;AAAA,EACX,mBAAA,EAAqB,0BAAA;AAAA,EACrB,mBAAA,EAAqB,0BAAA;AAAA,EACrB,cAAA,EAAgB;AAClB,CAAA,GAAIA,kCAA4B,SAAkB;AAkB3C,MAAM,kBAAkBC,kBAAA,CAAW;AAAA,EACxC,GAAGC,kBAAA;AAAA,EACH,GAAG,0BAAA;AAAA,EACH,GAAGC,8BAAA;AAAA,EACH,GAAGC,8BAAA;AAAA,EACH,GAAGC,sBAAA;AAAA;AAAA;AAAA;AAAA,EAIH,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAC;AAEM,MAAM,YAAA,GAAe;AAAA,EAC1B,GAAG,0BAAA;AAAA,EACH,aAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../../../../../packages/components/tooltip/src/tooltip.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { createModelToggleComposable } from '@element-plus/hooks'\nimport { popperArrowProps, popperProps } from '@element-plus/components/popper'\nimport { useTooltipContentProps } from './content'\nimport { useTooltipTriggerProps } from './trigger'\n\nimport type {\n PopperArrowProps,\n PopperProps,\n} from '@element-plus/components/popper'\nimport type { ElTooltipContentProps } from './content'\nimport type { UseTooltipTriggerProps } from './trigger'\nimport type Tooltip from './tooltip.vue'\nimport type { ExtractPublicPropTypes } from 'vue'\n\nexport const {\n useModelToggleProps: useTooltipModelToggleProps,\n useModelToggleEmits: useTooltipModelToggleEmits,\n useModelToggle: useTooltipModelToggle,\n} = createModelToggleComposable('visible' as const)\n\nexport interface UseTooltipProps\n extends\n PopperProps,\n ElTooltipContentProps,\n UseTooltipTriggerProps,\n PopperArrowProps {\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow?: boolean\n 'onUpdate:visible'?: (value: boolean) => void\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.\n */\nexport const useTooltipProps = buildProps({\n ...popperProps,\n ...useTooltipModelToggleProps,\n ...useTooltipContentProps,\n ...useTooltipTriggerProps,\n ...popperArrowProps,\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const tooltipEmits = [\n ...useTooltipModelToggleEmits,\n 'before-show',\n 'before-hide',\n 'show',\n 'hide',\n 'open',\n 'close',\n] as const\n\n/**\n * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.\n */\nexport type ElTooltipProps = UseTooltipProps\n\n/**\n * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.\n */\nexport type ElTooltipPropsPublic = ExtractPublicPropTypes<\n typeof useTooltipProps\n>\n\nexport type TooltipInstance = InstanceType<typeof Tooltip> & unknown\n"],"names":["createModelToggleComposable","buildProps","popperProps","useTooltipContentProps","useTooltipTriggerProps","popperArrowProps"],"mappings":";;;;;;;;;AAeO,MAAM;AAAA,EACX,mBAAA,EAAqB,0BAAA;AAAA,EACrB,mBAAA,EAAqB,0BAAA;AAAA,EACrB,cAAA,EAAgB;AAClB,CAAA,GAAIA,kCAA4B,SAAkB;AAkB3C,MAAM,kBAAkBC,kBAAA,CAAW;AAAA,EACxC,GAAGC,kBAAA;AAAA,EACH,GAAG,0BAAA;AAAA,EACH,GAAGC,8BAAA;AAAA,EACH,GAAGC,8BAAA;AAAA,EACH,GAAGC,sBAAA;AAAA;AAAA;AAAA;AAAA,EAIH,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAC;AAEM,MAAM,YAAA,GAAe;AAAA,EAC1B,GAAG,0BAAA;AAAA,EACH,aAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF;;;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CSSProperties,
|
|
1
|
+
import type { CSSProperties, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { IconPropType } from '@element-plus/nightly/es/utils';
|
|
2
3
|
import type { TourBtnProps, TourMask } from './types';
|
|
3
4
|
import type { TourContentProps } from './content';
|
|
4
5
|
export interface TourStepProps {
|
|
@@ -21,7 +22,7 @@ export interface TourStepProps {
|
|
|
21
22
|
/**
|
|
22
23
|
* @description custom close icon, default is Close
|
|
23
24
|
*/
|
|
24
|
-
closeIcon?:
|
|
25
|
+
closeIcon?: IconPropType;
|
|
25
26
|
/**
|
|
26
27
|
* @description whether to show the arrow
|
|
27
28
|
*/
|
|
@@ -69,7 +70,7 @@ export declare const tourStepProps: {
|
|
|
69
70
|
description: StringConstructor;
|
|
70
71
|
showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
71
72
|
closeIcon: {
|
|
72
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
|
|
73
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
|
|
73
74
|
readonly required: false;
|
|
74
75
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
75
76
|
__epPropKey: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sources":["../../../../../../packages/components/tour/src/step.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { tourContentProps } from './content'\n\nimport type { CSSProperties,
|
|
1
|
+
{"version":3,"file":"step.js","sources":["../../../../../../packages/components/tour/src/step.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { tourContentProps } from './content'\n\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type { TourBtnProps, TourMask } from './types'\nimport type { TourContentProps } from './content'\n\nexport interface TourStepProps {\n /**\n * @description get the element the guide card points to. empty makes it show in center of screen\n */\n target?: string | HTMLElement | (() => HTMLElement | null) | null\n /**\n * @description the title of the tour content\n */\n title?: string\n /**\n * @description description\n */\n description?: string\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon, default is Close\n */\n closeIcon?: IconPropType\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: TourContentProps['placement']\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description custom style for content\n */\n contentStyle?: CSSProperties\n /**\n * @description properties of the previous button\n */\n prevButtonProps?: TourBtnProps\n /**\n * @description properties of the Next button\n */\n nextButtonProps?: TourBtnProps\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.\n */\nexport const tourStepProps = buildProps({\n /**\n * @description get the element the guide card points to. empty makes it show in center of screen\n */\n target: {\n type: definePropType<\n string | HTMLElement | (() => HTMLElement | null) | null\n >([String, Object, Function]),\n },\n /**\n * @description the title of the tour content\n */\n title: String,\n /**\n * @description description\n */\n description: String,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description properties of the previous button\n */\n prevButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description properties of the Next button\n */\n nextButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n})\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.\n */\nexport type TourStepPropsPublic = ExtractPublicPropTypes<typeof tourStepProps>\n\nexport const tourStepEmits = {\n close: () => true,\n}\nexport type TourStepEmits = typeof tourStepEmits\n"],"names":["buildProps","definePropType","iconPropType","tourContentProps"],"mappings":";;;;;;AAkEO,MAAM,gBAAgBA,kBAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAItC,MAAA,EAAQ;AAAA,IACN,MAAMC,sBAAA,CAEJ,CAAC,MAAA,EAAQ,MAAA,EAAQ,QAAQ,CAAC;AAAA,GAC9B;AAAA;AAAA;AAAA;AAAA,EAIA,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,WAAA,EAAa,MAAA;AAAA;AAAA;AAAA;AAAA,EAIb,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAMC;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,WAAWC,wBAAA,CAAiB,SAAA;AAAA;AAAA;AAAA;AAAA,EAI5B,IAAA,EAAM;AAAA,IACJ,IAAA,EAAMF,sBAAA,CAAyB,CAAC,OAAA,EAAS,MAAM,CAAC,CAAA;AAAA,IAChD,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAMA,sBAAA,CAA8B,CAAC,MAAM,CAAC;AAAA,GAC9C;AAAA;AAAA;AAAA;AAAA,EAIA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAMA,uBAA6B,MAAM;AAAA,GAC3C;AAAA;AAAA;AAAA;AAAA,EAIA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAMA,uBAA6B,MAAM;AAAA,GAC3C;AAAA;AAAA;AAAA;AAAA,EAIA,qBAAA,EAAuB;AAAA,IACrB,IAAA,EAAMA,sBAAA,CAAgD,CAAC,OAAA,EAAS,MAAM,CAAC,CAAA;AAAA,IACvE,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAMA,uBAAsC,MAAM;AAAA;AAEtD,CAAC;AAOM,MAAM,aAAA,GAAgB;AAAA,EAC3B,OAAO,MAAM;AACf;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TourContentProps } from './content';
|
|
2
|
-
import type { CSSProperties,
|
|
2
|
+
import type { CSSProperties, ExtractPublicPropTypes } from 'vue';
|
|
3
|
+
import type { IconPropType } from '@element-plus/nightly/es/utils';
|
|
3
4
|
import type Tour from './tour.vue';
|
|
4
5
|
import type { TourGap, TourMask } from './types';
|
|
5
6
|
export interface TourProps {
|
|
@@ -22,7 +23,7 @@ export interface TourProps {
|
|
|
22
23
|
/**
|
|
23
24
|
* @description custom close icon
|
|
24
25
|
*/
|
|
25
|
-
closeIcon?:
|
|
26
|
+
closeIcon?: IconPropType;
|
|
26
27
|
/**
|
|
27
28
|
* @description position of the guide card relative to the target element
|
|
28
29
|
*/
|
|
@@ -73,7 +74,7 @@ export declare const tourProps: {
|
|
|
73
74
|
showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
74
75
|
showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
75
76
|
closeIcon: {
|
|
76
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
|
|
77
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
|
|
77
78
|
readonly required: false;
|
|
78
79
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
79
80
|
__epPropKey: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tour.js","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { teleportProps } from '@element-plus/components/teleport'\nimport { tourContentProps } from './content'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties,
|
|
1
|
+
{"version":3,"file":"tour.js","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { teleportProps } from '@element-plus/components/teleport'\nimport { tourContentProps } from './content'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport interface TourProps {\n /**\n * @description open tour\n */\n modelValue?: boolean\n /**\n * @description what is the current step\n */\n current?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon\n */\n closeIcon?: IconPropType\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: TourContentProps['placement']\n /**\n * @description custom style for content\n */\n contentStyle?: CSSProperties\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description transparent gap between mask and target\n */\n gap?: TourGap\n /**\n * @description tour's zIndex\n */\n zIndex?: number\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n /**\n * @description which element the TourContent appends to\n */\n appendTo?: string | HTMLElement\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape?: boolean\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: teleportProps.to.type,\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport type TourPropsPublic = ExtractPublicPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour> & unknown\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"names":["buildProps","iconPropType","tourContentProps","definePropType","teleportProps","UPDATE_MODEL_EVENT","isBoolean","isNumber"],"mappings":";;;;;;;;;AAmFO,MAAM,YAAYA,kBAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIlC,UAAA,EAAY,OAAA;AAAA;AAAA;AAAA;AAAA,EAIZ,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA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IACvB,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,kBAAA,EAAoB;AAAA,IAClB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,mBAAA,EAAqB;AAAA,IACnB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAC;AAQM,MAAM,SAAA,GAAY;AAAA,EACvB,CAACC,wBAAkB,GAAG,CAAC,KAAA,KAAmBC,gBAAU,KAAK,CAAA;AAAA,EACzD,CAAC,gBAAgB,GAAG,CAAC,OAAA,KAAoBC,eAAS,OAAO,CAAA;AAAA,EACzD,KAAA,EAAO,CAAC,OAAA,KAAoBA,cAAA,CAAS,OAAO,CAAA;AAAA,EAC5C,QAAQ,MAAM,IAAA;AAAA,EACd,MAAA,EAAQ,CAAC,OAAA,KAAoBA,cAAA,CAAS,OAAO;AAC/C;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconPropType } from '@element-plus/nightly/es/utils';
|
|
1
|
+
import type { IconPropType } from '@element-plus/nightly/es/utils';
|
|
2
2
|
import type { ComponentInternalInstance, ExtractPublicPropTypes, SetupContext } from 'vue';
|
|
3
3
|
import type { treeEmits, treeProps } from './virtual-tree';
|
|
4
4
|
export type TreeNodeData = Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-aria/index.ts"],"sourcesContent":["import { pick } from 'lodash-unified'\nimport { buildProps } from '@element-plus/utils'\n\nexport interface AriaProps {\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel?: string\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation?: 'horizontal' | 'vertical' | 'undefined'\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls?: string\n}\n\nexport const ariaProps = buildProps({\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel: String,\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation: {\n type: String,\n values: ['horizontal', 'vertical', 'undefined'],\n },\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls: String,\n})\n\nexport const useAriaProps = <T extends keyof typeof ariaProps>(\n arias: Array<T>\n) => {\n return pick<typeof ariaProps, T>(ariaProps, arias)\n}\n"],"names":["buildProps","pick"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-aria/index.ts"],"sourcesContent":["import { pick } from 'lodash-unified'\nimport { buildProps } from '@element-plus/utils'\n\nexport interface AriaProps {\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel?: string\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation?: 'horizontal' | 'vertical' | 'undefined'\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls?: string\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `AriaProps` instead.\n */\nexport const ariaProps = buildProps({\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel: String,\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation: {\n type: String,\n values: ['horizontal', 'vertical', 'undefined'],\n },\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls: String,\n})\n\nexport const useAriaProps = <T extends keyof typeof ariaProps>(\n arias: Array<T>\n) => {\n return pick<typeof ariaProps, T>(ariaProps, arias)\n}\n"],"names":["buildProps","pick"],"mappings":";;;;;AAqBO,MAAM,YAAYA,kBAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIlC,SAAA,EAAW,MAAA;AAAA;AAAA;AAAA;AAAA,EAIX,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,YAAA,EAAc,UAAA,EAAY,WAAW;AAAA,GAChD;AAAA;AAAA;AAAA;AAAA,EAIA,YAAA,EAAc;AAChB,CAAC;AAEM,MAAM,YAAA,GAAe,CAC1B,KAAA,KACG;AACH,EAAA,OAAOC,kBAAA,CAA0B,WAAW,KAAK,CAAA;AACnD;;;;;"}
|
package/lib/utils/dom/aria.d.ts
CHANGED
package/lib/utils/dom/aria.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])`;
|
|
4
|
+
const isShadowRoot = (e) => {
|
|
5
|
+
if (typeof ShadowRoot === "undefined") return false;
|
|
6
|
+
return e instanceof ShadowRoot;
|
|
7
|
+
};
|
|
4
8
|
const isHTMLElement = (e) => {
|
|
5
9
|
if (typeof Element === "undefined") return false;
|
|
6
10
|
return e instanceof Element;
|
|
@@ -84,6 +88,7 @@ exports.focusNode = focusNode;
|
|
|
84
88
|
exports.getSibling = getSibling;
|
|
85
89
|
exports.isFocusable = isFocusable;
|
|
86
90
|
exports.isLeaf = isLeaf;
|
|
91
|
+
exports.isShadowRoot = isShadowRoot;
|
|
87
92
|
exports.isVisible = isVisible;
|
|
88
93
|
exports.obtainAllFocusableElements = obtainAllFocusableElements;
|
|
89
94
|
exports.triggerEvent = triggerEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aria.js","sources":["../../../../../packages/utils/dom/aria.ts"],"sourcesContent":["const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`\n\nconst isHTMLElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\n/**\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\n */\nexport const isVisible = (element: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return true\n const computed = getComputedStyle(element)\n // element.offsetParent won't work on fix positioned\n // WARNING: potential issue here, going to need some expert advices on this issue\n return computed.position === 'fixed' ? false : element.offsetParent !== null\n}\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n return Array.from(\n element.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENT_SELECTORS)\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\n}\n\n/**\n * @desc Determine if target element is focusable\n * @param element {HTMLElement}\n * @returns {Boolean} true if it is focusable\n */\nexport const isFocusable = (element: HTMLElement): boolean => {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n if (\n element.tabIndex < 0 ||\n element.hasAttribute('disabled') ||\n element.getAttribute('aria-disabled') === 'true'\n ) {\n return false\n }\n\n switch (element.nodeName) {\n case 'A': {\n // casting current element to Specific HTMLElement in order to be more type precise\n return (\n !!(element as HTMLAnchorElement).href &&\n (element as HTMLAnchorElement).rel !== 'ignore'\n )\n }\n case 'INPUT': {\n return !(\n (element as HTMLInputElement).type === 'hidden' ||\n (element as HTMLInputElement).type === 'file'\n )\n }\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA': {\n return true\n }\n default: {\n return false\n }\n }\n}\n\n/**\n * Trigger an event\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\n * @param {HTMLElement} elm\n * @param {String} name\n * @param {*} opts\n */\nexport const triggerEvent = function (\n elm: HTMLElement,\n name: string,\n ...opts: Array<boolean>\n): HTMLElement {\n let eventName: string\n\n if (name.includes('mouse') || name.includes('click')) {\n eventName = 'MouseEvents'\n } else if (name.includes('key')) {\n eventName = 'KeyboardEvent'\n } else {\n eventName = 'HTMLEvents'\n }\n const evt = document.createEvent(eventName)\n\n evt.initEvent(name, ...opts)\n elm.dispatchEvent(evt)\n return elm\n}\n\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\n\nexport const getSibling = (\n el: HTMLElement,\n distance: number,\n elClass: string\n) => {\n const { parentNode } = el\n if (!parentNode) return null\n const siblings = parentNode.querySelectorAll(elClass)\n const index = Array.prototype.indexOf.call(siblings, el)\n return siblings[index + distance] || null\n}\n\nexport const focusElement = (\n el?: HTMLElement | { focus: () => void } | null,\n options?: FocusOptions\n) => {\n if (!el || !el.focus) return\n let cleanup: boolean = false\n\n if (isHTMLElement(el) && !isFocusable(el) && !el.getAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1')\n cleanup = true\n }\n\n el.focus(options)\n\n if (isHTMLElement(el) && cleanup) {\n el.removeAttribute('tabindex')\n }\n}\n\nexport const focusNode = (el: HTMLElement) => {\n if (!el) return\n focusElement(el)\n !isLeaf(el) && el.click()\n}\n"],"names":[],"mappings":";;AAAA,MAAM,2BAAA,GAA8B,CAAA,0KAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"aria.js","sources":["../../../../../packages/utils/dom/aria.ts"],"sourcesContent":["const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`\n\nexport const isShadowRoot = (e: unknown): e is ShadowRoot => {\n if (typeof ShadowRoot === 'undefined') return false\n return e instanceof ShadowRoot\n}\n\nconst isHTMLElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\n/**\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\n */\nexport const isVisible = (element: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return true\n const computed = getComputedStyle(element)\n // element.offsetParent won't work on fix positioned\n // WARNING: potential issue here, going to need some expert advices on this issue\n return computed.position === 'fixed' ? false : element.offsetParent !== null\n}\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n return Array.from(\n element.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENT_SELECTORS)\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\n}\n\n/**\n * @desc Determine if target element is focusable\n * @param element {HTMLElement}\n * @returns {Boolean} true if it is focusable\n */\nexport const isFocusable = (element: HTMLElement): boolean => {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n if (\n element.tabIndex < 0 ||\n element.hasAttribute('disabled') ||\n element.getAttribute('aria-disabled') === 'true'\n ) {\n return false\n }\n\n switch (element.nodeName) {\n case 'A': {\n // casting current element to Specific HTMLElement in order to be more type precise\n return (\n !!(element as HTMLAnchorElement).href &&\n (element as HTMLAnchorElement).rel !== 'ignore'\n )\n }\n case 'INPUT': {\n return !(\n (element as HTMLInputElement).type === 'hidden' ||\n (element as HTMLInputElement).type === 'file'\n )\n }\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA': {\n return true\n }\n default: {\n return false\n }\n }\n}\n\n/**\n * Trigger an event\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\n * @param {HTMLElement} elm\n * @param {String} name\n * @param {*} opts\n */\nexport const triggerEvent = function (\n elm: HTMLElement,\n name: string,\n ...opts: Array<boolean>\n): HTMLElement {\n let eventName: string\n\n if (name.includes('mouse') || name.includes('click')) {\n eventName = 'MouseEvents'\n } else if (name.includes('key')) {\n eventName = 'KeyboardEvent'\n } else {\n eventName = 'HTMLEvents'\n }\n const evt = document.createEvent(eventName)\n\n evt.initEvent(name, ...opts)\n elm.dispatchEvent(evt)\n return elm\n}\n\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\n\nexport const getSibling = (\n el: HTMLElement,\n distance: number,\n elClass: string\n) => {\n const { parentNode } = el\n if (!parentNode) return null\n const siblings = parentNode.querySelectorAll(elClass)\n const index = Array.prototype.indexOf.call(siblings, el)\n return siblings[index + distance] || null\n}\n\nexport const focusElement = (\n el?: HTMLElement | { focus: () => void } | null,\n options?: FocusOptions\n) => {\n if (!el || !el.focus) return\n let cleanup: boolean = false\n\n if (isHTMLElement(el) && !isFocusable(el) && !el.getAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1')\n cleanup = true\n }\n\n el.focus(options)\n\n if (isHTMLElement(el) && cleanup) {\n el.removeAttribute('tabindex')\n }\n}\n\nexport const focusNode = (el: HTMLElement) => {\n if (!el) return\n focusElement(el)\n !isLeaf(el) && el.click()\n}\n"],"names":[],"mappings":";;AAAA,MAAM,2BAAA,GAA8B,CAAA,0KAAA,CAAA;AAE7B,MAAM,YAAA,GAAe,CAAC,CAAA,KAAgC;AAC3D,EAAA,IAAI,OAAO,UAAA,KAAe,WAAA,EAAa,OAAO,KAAA;AAC9C,EAAA,OAAO,CAAA,YAAa,UAAA;AACtB;AAEA,MAAM,aAAA,GAAgB,CAAC,CAAA,KAA6B;AAClD,EAAA,IAAI,OAAO,OAAA,KAAY,WAAA,EAAa,OAAO,KAAA;AAC3C,EAAA,OAAO,CAAA,YAAa,OAAA;AACtB,CAAA;AAKO,MAAM,SAAA,GAAY,CAAC,OAAA,KAAyB;AACjD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,MAAA,EAAQ,OAAO,IAAA;AAC5C,EAAA,MAAM,QAAA,GAAW,iBAAiB,OAAO,CAAA;AAGzC,EAAA,OAAO,QAAA,CAAS,QAAA,KAAa,OAAA,GAAU,KAAA,GAAQ,QAAQ,YAAA,KAAiB,IAAA;AAC1E;AAEO,MAAM,0BAAA,GAA6B,CACxC,OAAA,KACkB;AAClB,EAAA,OAAO,KAAA,CAAM,IAAA;AAAA,IACX,OAAA,CAAQ,iBAA8B,2BAA2B;AAAA,GACnE,CAAE,OAAO,CAAC,IAAA,KAAsB,YAAY,IAAI,CAAA,IAAK,SAAA,CAAU,IAAI,CAAC,CAAA;AACtE;AAOO,MAAM,WAAA,GAAc,CAAC,OAAA,KAAkC;AAC5D,EAAA,IACE,OAAA,CAAQ,QAAA,GAAW,CAAA,IAClB,OAAA,CAAQ,QAAA,KAAa,KAAK,OAAA,CAAQ,YAAA,CAAa,UAAU,CAAA,KAAM,IAAA,EAChE;AACA,IAAA,OAAO,IAAA;AAAA,EACT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
CHANGED
|
@@ -14,6 +14,7 @@ exports.focusNode = aria.focusNode;
|
|
|
14
14
|
exports.getSibling = aria.getSibling;
|
|
15
15
|
exports.isFocusable = aria.isFocusable;
|
|
16
16
|
exports.isLeaf = aria.isLeaf;
|
|
17
|
+
exports.isShadowRoot = aria.isShadowRoot;
|
|
17
18
|
exports.isVisible = aria.isVisible;
|
|
18
19
|
exports.obtainAllFocusableElements = aria.obtainAllFocusableElements;
|
|
19
20
|
exports.triggerEvent = aria.triggerEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/utils/dom/scroll.js
CHANGED
|
@@ -5,6 +5,7 @@ var easings = require('../easings.js');
|
|
|
5
5
|
var types = require('../types.js');
|
|
6
6
|
var raf = require('../raf.js');
|
|
7
7
|
var style = require('./style.js');
|
|
8
|
+
var aria = require('./aria.js');
|
|
8
9
|
var shared = require('@vue/shared');
|
|
9
10
|
|
|
10
11
|
const isScroll = (el, isVertical) => {
|
|
@@ -24,7 +25,11 @@ const getScrollContainer = (el, isVertical) => {
|
|
|
24
25
|
if ([window, document, document.documentElement].includes(parent))
|
|
25
26
|
return window;
|
|
26
27
|
if (isScroll(parent, isVertical)) return parent;
|
|
27
|
-
parent
|
|
28
|
+
if (aria.isShadowRoot(parent)) {
|
|
29
|
+
parent = parent.host;
|
|
30
|
+
} else {
|
|
31
|
+
parent = parent.parentNode;
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
return parent;
|
|
30
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.js","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\nimport { easeInOutCubic } from '../easings'\nimport { isFunction, isWindow } from '../types'\nimport { cAF, rAF } from '../raf'\nimport { getStyle } from './style'\n\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\n if (!isClient) return false\n\n const key = (\n {\n undefined: 'overflow',\n true: 'overflow-y',\n false: 'overflow-x',\n } as const\n )[String(isVertical)]!\n const overflow = getStyle(el, key)\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\n}\n\nexport const getScrollContainer = (\n el: HTMLElement,\n isVertical?: boolean\n): Window | HTMLElement | undefined => {\n if (!isClient) return\n\n let parent: HTMLElement = el\n while (parent) {\n if ([window, document, document.documentElement].includes(parent))\n return window\n\n if (isScroll(parent, isVertical)) return parent\n\n parent = parent.parentNode as HTMLElement\n }\n\n return parent\n}\n\nlet scrollBarWidth: number\nexport const getScrollBarWidth = (namespace: string): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n outer.className = `${namespace}-scrollbar__wrap`\n outer.style.visibility = 'hidden'\n outer.style.width = '100px'\n outer.style.position = 'absolute'\n outer.style.top = '-9999px'\n document.body.appendChild(outer)\n\n const widthNoScroll = outer.offsetWidth\n outer.style.overflow = 'scroll'\n\n const inner = document.createElement('div')\n inner.style.width = '100%'\n outer.appendChild(inner)\n\n const widthWithScroll = inner.offsetWidth\n outer.parentNode?.removeChild(outer)\n scrollBarWidth = widthNoScroll - widthWithScroll\n\n return scrollBarWidth\n}\n\n/**\n * Scroll with in the container element, positioning the **selected** element at the top\n * of the container\n */\nexport function scrollIntoView(\n container: HTMLElement,\n selected: HTMLElement\n): void {\n if (!isClient) return\n\n if (!selected) {\n container.scrollTop = 0\n return\n }\n\n const offsetParents: HTMLElement[] = []\n let pointer = selected.offsetParent\n while (\n pointer !== null &&\n container !== pointer &&\n container.contains(pointer)\n ) {\n offsetParents.push(pointer as HTMLElement)\n pointer = (pointer as HTMLElement).offsetParent\n }\n const top =\n selected.offsetTop +\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\n const bottom = top + selected.offsetHeight\n const viewRectTop = container.scrollTop\n const viewRectBottom = viewRectTop + container.clientHeight\n\n if (top < viewRectTop) {\n container.scrollTop = top\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight\n }\n}\n\nexport function animateScrollTo(\n container: HTMLElement | Window,\n from: number,\n to: number,\n duration: number,\n callback?: unknown\n) {\n const startTime = Date.now()\n\n let handle: number | undefined\n const scroll = () => {\n const timestamp = Date.now()\n const time = timestamp - startTime\n const nextScrollTop = easeInOutCubic(\n time > duration ? duration : time,\n from,\n to,\n duration\n )\n\n if (isWindow(container)) {\n container.scrollTo(window.pageXOffset, nextScrollTop)\n } else {\n container.scrollTop = nextScrollTop\n }\n if (time < duration) {\n handle = rAF(scroll)\n } else if (isFunction(callback)) {\n callback()\n }\n }\n\n scroll()\n\n return () => {\n handle && cAF(handle)\n }\n}\n\nexport const getScrollElement = (\n target: HTMLElement,\n container: HTMLElement | Window\n) => {\n if (isWindow(container)) {\n return target.ownerDocument.documentElement\n }\n return container\n}\n\nexport const getScrollTop = (container: HTMLElement | Window) => {\n if (isWindow(container)) {\n return window.scrollY\n }\n return container.scrollTop\n}\n"],"names":["isClient","getStyle","easeInOutCubic","isWindow","rAF","isFunction","cAF"],"mappings":"
|
|
1
|
+
{"version":3,"file":"scroll.js","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\nimport { easeInOutCubic } from '../easings'\nimport { isFunction, isWindow } from '../types'\nimport { cAF, rAF } from '../raf'\nimport { getStyle } from './style'\nimport { isShadowRoot } from './aria'\n\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\n if (!isClient) return false\n\n const key = (\n {\n undefined: 'overflow',\n true: 'overflow-y',\n false: 'overflow-x',\n } as const\n )[String(isVertical)]!\n const overflow = getStyle(el, key)\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\n}\n\nexport const getScrollContainer = (\n el: HTMLElement,\n isVertical?: boolean\n): Window | HTMLElement | undefined => {\n if (!isClient) return\n\n let parent: HTMLElement = el\n while (parent) {\n if ([window, document, document.documentElement].includes(parent))\n return window\n\n if (isScroll(parent, isVertical)) return parent\n\n if (isShadowRoot(parent)) {\n parent = parent.host as HTMLElement\n } else {\n parent = parent.parentNode as HTMLElement\n }\n }\n\n return parent\n}\n\nlet scrollBarWidth: number\nexport const getScrollBarWidth = (namespace: string): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n outer.className = `${namespace}-scrollbar__wrap`\n outer.style.visibility = 'hidden'\n outer.style.width = '100px'\n outer.style.position = 'absolute'\n outer.style.top = '-9999px'\n document.body.appendChild(outer)\n\n const widthNoScroll = outer.offsetWidth\n outer.style.overflow = 'scroll'\n\n const inner = document.createElement('div')\n inner.style.width = '100%'\n outer.appendChild(inner)\n\n const widthWithScroll = inner.offsetWidth\n outer.parentNode?.removeChild(outer)\n scrollBarWidth = widthNoScroll - widthWithScroll\n\n return scrollBarWidth\n}\n\n/**\n * Scroll with in the container element, positioning the **selected** element at the top\n * of the container\n */\nexport function scrollIntoView(\n container: HTMLElement,\n selected: HTMLElement\n): void {\n if (!isClient) return\n\n if (!selected) {\n container.scrollTop = 0\n return\n }\n\n const offsetParents: HTMLElement[] = []\n let pointer = selected.offsetParent\n while (\n pointer !== null &&\n container !== pointer &&\n container.contains(pointer)\n ) {\n offsetParents.push(pointer as HTMLElement)\n pointer = (pointer as HTMLElement).offsetParent\n }\n const top =\n selected.offsetTop +\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\n const bottom = top + selected.offsetHeight\n const viewRectTop = container.scrollTop\n const viewRectBottom = viewRectTop + container.clientHeight\n\n if (top < viewRectTop) {\n container.scrollTop = top\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight\n }\n}\n\nexport function animateScrollTo(\n container: HTMLElement | Window,\n from: number,\n to: number,\n duration: number,\n callback?: unknown\n) {\n const startTime = Date.now()\n\n let handle: number | undefined\n const scroll = () => {\n const timestamp = Date.now()\n const time = timestamp - startTime\n const nextScrollTop = easeInOutCubic(\n time > duration ? duration : time,\n from,\n to,\n duration\n )\n\n if (isWindow(container)) {\n container.scrollTo(window.pageXOffset, nextScrollTop)\n } else {\n container.scrollTop = nextScrollTop\n }\n if (time < duration) {\n handle = rAF(scroll)\n } else if (isFunction(callback)) {\n callback()\n }\n }\n\n scroll()\n\n return () => {\n handle && cAF(handle)\n }\n}\n\nexport const getScrollElement = (\n target: HTMLElement,\n container: HTMLElement | Window\n) => {\n if (isWindow(container)) {\n return target.ownerDocument.documentElement\n }\n return container\n}\n\nexport const getScrollTop = (container: HTMLElement | Window) => {\n if (isWindow(container)) {\n return window.scrollY\n }\n return container.scrollTop\n}\n"],"names":["isClient","getStyle","isShadowRoot","easeInOutCubic","isWindow","rAF","isFunction","cAF"],"mappings":";;;;;;;;;;AAOO,MAAM,QAAA,GAAW,CAAC,EAAA,EAAiB,UAAA,KAAkC;AAC1E,EAAA,IAAI,CAACA,eAAU,OAAO,KAAA;AAEtB,EAAA,MAAM,GAAA,GACJ;AAAA,IACE,SAAA,EAAW,UAAA;AAAA,IACX,IAAA,EAAM,YAAA;AAAA,IACN,KAAA,EAAO;AAAA,GACT,CACA,MAAA,CAAO,UAAU,CAAC,CAAA;AACpB,EAAA,MAAM,QAAA,GAAWC,cAAA,CAAS,EAAA,EAAI,GAAG,CAAA;AACjC,EAAA,OAAO,CAAC,QAAA,EAAU,MAAA,EAAQ,SAAS,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,KAAM,QAAA,CAAS,QAAA,CAAS,CAAC,CAAC,CAAA;AACvE;AAEO,MAAM,kBAAA,GAAqB,CAChC,EAAA,EACA,UAAA,KACqC;AACrC,EAAA,IAAI,CAACD,aAAA,EAAU;AAEf,EAAA,IAAI,MAAA,GAAsB,EAAA;AAC1B,EAAA,OAAO,MAAA,EAAQ;AACb,IAAA,IAAI,CAAC,M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 -5,6 +5,7 @@ var core = require('@vueuse/core');
|
|
|
5
5
|
var shared = require('@vue/shared');
|
|
6
6
|
var objects = require('../objects.js');
|
|
7
7
|
var error = require('../error.js');
|
|
8
|
+
var aria = require('./aria.js');
|
|
8
9
|
|
|
9
10
|
const SCOPE = "utils/dom/style";
|
|
10
11
|
const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
|
|
@@ -23,7 +24,7 @@ const removeClass = (el, cls) => {
|
|
|
23
24
|
};
|
|
24
25
|
const getStyle = (element, styleName) => {
|
|
25
26
|
var _a;
|
|
26
|
-
if (!core.isClient || !element || !styleName) return "";
|
|
27
|
+
if (!core.isClient || !element || !styleName || aria.isShadowRoot(element)) return "";
|
|
27
28
|
let key = shared.camelize(styleName);
|
|
28
29
|
if (key === "float") key = "cssFloat";
|
|
29
30
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isNumber, isObject, isString, isStringNumber } from '../types'\nimport { isClient } from '../browser'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\n\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = (element.style as any)[key]\n if (style) return style\n const computed: any = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[key] : ''\n } catch {\n return (element.style as any)[key]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key: any = camelize(styleName)\n element.style[key] = value as any\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value && value !== 0) return ''\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`\n } else if (isString(value)) {\n return value\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"names":["isClient","camelize","isObject","entriesOf","value","keysOf","isNumber","isStringNumber","isString","debugWarn"],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isNumber, isObject, isString, isStringNumber } from '../types'\nimport { isClient } from '../browser'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\nimport { isShadowRoot } from './aria'\n\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName || isShadowRoot(element)) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = (element.style as any)[key]\n if (style) return style\n const computed: any = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[key] : ''\n } catch {\n return (element.style as any)[key]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key: any = camelize(styleName)\n element.style[key] = value as any\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value && value !== 0) return ''\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`\n } else if (isString(value)) {\n return value\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"names":["isClient","isShadowRoot","camelize","isObject","entriesOf","value","keysOf","isNumber","isStringNumber","isString","debugWarn"],"mappings":";;;;;;;;;AASA,MAAM,KAAA,GAAQ,iBAAA;AAEP,MAAM,gBAAA,GAAmB,CAAC,GAAA,GAAM,EAAA,KACrC,IAAI,KAAA,CAAM,GAAG,CAAA,CAAE,MAAA,CAAO,CAAC,IAAA,KAAS,CAAC,CAAC,IAAA,CAAK,MAAM;AAExC,MAAM,QAAA,GAAW,CAAC,EAAA,EAAa,GAAA,KAAyB;AAC7D,EAAA,IAAI,CAAC,EAAA,IAAM,CAAC,GAAA,EAAK,OAAO,KAAA;AACxB,EAAA,IAAI,IAAI,QAAA,CAAS,GAAG,GA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AA,OAAO,KAAA;AAAA,EACT;AACA,EAAAC,eAAA,CAAU,OAAO,0CAA0C,CAAA;AAC7D;;;;;;;;;;;"}
|
package/lib/utils/index.js
CHANGED
|
@@ -66,6 +66,7 @@ exports.focusNode = aria.focusNode;
|
|
|
66
66
|
exports.getSibling = aria.getSibling;
|
|
67
67
|
exports.isFocusable = aria.isFocusable;
|
|
68
68
|
exports.isLeaf = aria.isLeaf;
|
|
69
|
+
exports.isShadowRoot = aria.isShadowRoot;
|
|
69
70
|
exports.isVisible = aria.isVisible;
|
|
70
71
|
exports.obtainAllFocusableElements = aria.obtainAllFocusableElements;
|
|
71
72
|
exports.triggerEvent = aria.triggerEvent;
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20260201";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20260201'\n"],"names":[],"mappings":";;AAAO,MAAM,OAAA,GAAU;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@element-plus/nightly",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20260201",
|
|
4
4
|
"description": "A Component Library for Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"element-plus",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"not ie 11",
|
|
110
110
|
"not op_mini all"
|
|
111
111
|
],
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "0023b39f01e24dffdc52cf1d144e46dbbdc9990c"
|
|
113
113
|
}
|