@element-plus/nightly 0.0.20250808 → 0.0.20250810
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/attributes.json +1 -1
- package/dist/index.full.js +2735 -845
- package/dist/index.full.min.js +14 -14
- 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 +2735 -846
- 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/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +53 -21
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +21 -53
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider-props.d.ts +7 -0
- package/es/components/config-provider/src/config-provider-props.mjs +3 -0
- package/es/components/config-provider/src/config-provider-props.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +12 -0
- package/es/components/dialog/index.mjs +1 -1
- package/es/components/dialog/src/dialog-content.d.ts +3 -3
- package/es/components/dialog/src/dialog-content.mjs +12 -3
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +9 -9
- package/es/components/dialog/src/dialog-content2.mjs +4 -4
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +12 -5
- package/es/components/dialog/src/dialog.mjs +3 -3
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +11 -11
- package/es/components/dialog/src/dialog2.mjs +6 -4
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.d.ts +4 -1
- package/es/components/dialog/src/use-dialog.mjs +37 -12
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/drawer/src/drawer.d.ts +4 -4
- package/es/components/drawer/src/drawer.vue.d.ts +11 -11
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/es/components/index.mjs +13 -13
- package/es/components/input/src/utils.mjs +3 -3
- package/es/components/input/src/utils.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +100 -15
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +15 -100
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +1 -1
- package/es/components/message-box/src/index.vue.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +1 -1
- package/es/components/pagination/src/components/pager.mjs +16 -210
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +210 -16
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/content.mjs +130 -88
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +88 -130
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +91 -19
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +19 -91
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -69
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +69 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -227
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +227 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +87 -11
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +11 -87
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +17 -79
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +79 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +69 -154
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +1 -1
- package/es/components/tour/src/tour2.mjs +154 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/tree/src/tree.vue.d.ts +1 -1
- package/es/index.d.ts +66 -38
- package/es/index.mjs +13 -13
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +53 -22
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +22 -53
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/config-provider/src/config-provider-props.d.ts +7 -0
- package/lib/components/config-provider/src/config-provider-props.js +3 -0
- package/lib/components/config-provider/src/config-provider-props.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +12 -0
- package/lib/components/dialog/index.js +1 -0
- package/lib/components/dialog/index.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.d.ts +3 -3
- package/lib/components/dialog/src/dialog-content.js +12 -3
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +9 -9
- package/lib/components/dialog/src/dialog-content2.js +4 -4
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +12 -5
- package/lib/components/dialog/src/dialog.js +3 -2
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +11 -11
- package/lib/components/dialog/src/dialog2.js +6 -4
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.d.ts +4 -1
- package/lib/components/dialog/src/use-dialog.js +37 -12
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/drawer/src/drawer.d.ts +4 -4
- package/lib/components/drawer/src/drawer.vue.d.ts +11 -11
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/lib/components/index.js +13 -12
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/src/utils.js +3 -3
- package/lib/components/input/src/utils.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +100 -16
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +16 -100
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +1 -1
- package/lib/components/pagination/src/components/pager.js +16 -210
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +210 -16
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/content.js +130 -93
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +93 -130
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/slider/src/button.js +91 -20
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +20 -91
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -69
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +69 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -226
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +226 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +87 -11
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +11 -87
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +17 -79
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +79 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +69 -153
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +1 -1
- package/lib/components/tour/src/tour2.js +153 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +1 -1
- package/lib/index.d.ts +66 -38
- package/lib/index.js +13 -12
- package/lib/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/tags.json +1 -1
- package/web-types.json +1 -1
package/dist/index.full.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Element Plus v0.0.
|
1
|
+
/*! Element Plus v0.0.20250810 */
|
2
2
|
|
3
3
|
import { unref, readonly, shallowRef, watchEffect, getCurrentScope, onScopeDispose, isRef, ref, watch, getCurrentInstance, onMounted, nextTick, computed, defineComponent, openBlock, createElementBlock, createElementVNode, warn, isVNode, Fragment, Comment, onBeforeUnmount, inject, onUnmounted, h as h$1, Teleport as Teleport$1, onBeforeMount, provide, triggerRef, renderSlot, normalizeClass, normalizeStyle, mergeProps, useSlots, toRef, createBlock, Transition, withCtx, withDirectives, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, createVNode, vShow, reactive, toRefs, onUpdated, TransitionGroup, useAttrs as useAttrs$1, withModifiers, onActivated, cloneVNode, Text as Text$1, onDeactivated, renderList, withKeys, createSlots, normalizeProps, guardReactiveProps, toRaw, vModelCheckbox, vModelRadio, onBeforeUpdate, vModelText, toHandlers, resolveComponent, markRaw, effectScope, resolveDirective, toHandlerKey, render, createApp, shallowReactive } from 'vue';
|
4
4
|
|
@@ -3036,7 +3036,7 @@ function baseClamp(number, lower, upper) {
|
|
3036
3036
|
return number;
|
3037
3037
|
}
|
3038
3038
|
|
3039
|
-
function clamp(number, lower, upper) {
|
3039
|
+
function clamp$1(number, lower, upper) {
|
3040
3040
|
if (upper === void 0) {
|
3041
3041
|
upper = lower;
|
3042
3042
|
lower = void 0;
|
@@ -4645,7 +4645,7 @@ function flattenDepth(array, depth) {
|
|
4645
4645
|
}
|
4646
4646
|
|
4647
4647
|
var WRAP_FLIP_FLAG = 512;
|
4648
|
-
function flip$
|
4648
|
+
function flip$2(func) {
|
4649
4649
|
return createWrap(func, WRAP_FLIP_FLAG);
|
4650
4650
|
}
|
4651
4651
|
|
@@ -4980,7 +4980,7 @@ function baseIsDate(value) {
|
|
4980
4980
|
var nodeIsDate = nodeUtil && nodeUtil.isDate;
|
4981
4981
|
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
4982
4982
|
|
4983
|
-
function isElement$
|
4983
|
+
function isElement$3(value) {
|
4984
4984
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
4985
4985
|
}
|
4986
4986
|
|
@@ -5191,7 +5191,7 @@ function baseExtremum(array, iteratee, comparator) {
|
|
5191
5191
|
return result;
|
5192
5192
|
}
|
5193
5193
|
|
5194
|
-
function max$
|
5194
|
+
function max$4(array) {
|
5195
5195
|
return array && array.length ? baseExtremum(array, identity, baseGt) : void 0;
|
5196
5196
|
}
|
5197
5197
|
|
@@ -5240,7 +5240,7 @@ var methodOf = baseRest(function(object, args) {
|
|
5240
5240
|
};
|
5241
5241
|
});
|
5242
5242
|
|
5243
|
-
function min$
|
5243
|
+
function min$4(array) {
|
5244
5244
|
return array && array.length ? baseExtremum(array, identity, baseLt) : void 0;
|
5245
5245
|
}
|
5246
5246
|
|
@@ -5959,7 +5959,7 @@ function reverse(array) {
|
|
5959
5959
|
return array == null ? array : nativeReverse.call(array);
|
5960
5960
|
}
|
5961
5961
|
|
5962
|
-
var round$
|
5962
|
+
var round$2 = createRound("round");
|
5963
5963
|
|
5964
5964
|
function arraySample(array) {
|
5965
5965
|
var length = array.length;
|
@@ -6030,7 +6030,7 @@ function shuffle(collection) {
|
|
6030
6030
|
|
6031
6031
|
var mapTag = "[object Map]";
|
6032
6032
|
var setTag = "[object Set]";
|
6033
|
-
function size(collection) {
|
6033
|
+
function size$1(collection) {
|
6034
6034
|
if (collection == null) {
|
6035
6035
|
return 0;
|
6036
6036
|
}
|
@@ -6966,7 +6966,7 @@ var collection = {
|
|
6966
6966
|
sample,
|
6967
6967
|
sampleSize,
|
6968
6968
|
shuffle,
|
6969
|
-
size,
|
6969
|
+
size: size$1,
|
6970
6970
|
some,
|
6971
6971
|
sortBy
|
6972
6972
|
};
|
@@ -6986,7 +6986,7 @@ var func = {
|
|
6986
6986
|
debounce,
|
6987
6987
|
defer,
|
6988
6988
|
delay,
|
6989
|
-
flip: flip$
|
6989
|
+
flip: flip$2,
|
6990
6990
|
memoize,
|
6991
6991
|
negate,
|
6992
6992
|
once,
|
@@ -7019,7 +7019,7 @@ var lang = {
|
|
7019
7019
|
isBoolean: isBoolean$1,
|
7020
7020
|
isBuffer,
|
7021
7021
|
isDate,
|
7022
|
-
isElement: isElement$
|
7022
|
+
isElement: isElement$3,
|
7023
7023
|
isEmpty: isEmpty$1,
|
7024
7024
|
isEqual: isEqual$1,
|
7025
7025
|
isEqualWith,
|
@@ -7065,21 +7065,21 @@ var math = {
|
|
7065
7065
|
ceil,
|
7066
7066
|
divide,
|
7067
7067
|
floor: floor$1,
|
7068
|
-
max: max$
|
7068
|
+
max: max$4,
|
7069
7069
|
maxBy,
|
7070
7070
|
mean,
|
7071
7071
|
meanBy,
|
7072
|
-
min: min$
|
7072
|
+
min: min$4,
|
7073
7073
|
minBy,
|
7074
7074
|
multiply,
|
7075
|
-
round: round$
|
7075
|
+
round: round$2,
|
7076
7076
|
subtract,
|
7077
7077
|
sum: sum$1,
|
7078
7078
|
sumBy
|
7079
7079
|
};
|
7080
7080
|
|
7081
7081
|
var number = {
|
7082
|
-
clamp,
|
7082
|
+
clamp: clamp$1,
|
7083
7083
|
inRange,
|
7084
7084
|
random
|
7085
7085
|
};
|
@@ -7807,7 +7807,7 @@ const isUndefined = (val) => val === void 0;
|
|
7807
7807
|
const isBoolean = (val) => typeof val === "boolean";
|
7808
7808
|
const isNumber = (val) => typeof val === "number";
|
7809
7809
|
const isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
|
7810
|
-
const isElement$
|
7810
|
+
const isElement$2 = (e) => {
|
7811
7811
|
if (typeof Element === "undefined")
|
7812
7812
|
return false;
|
7813
7813
|
return e instanceof Element;
|
@@ -10111,36 +10111,156 @@ const useZIndex = (zIndexOverrides) => {
|
|
10111
10111
|
};
|
10112
10112
|
};
|
10113
10113
|
|
10114
|
-
|
10114
|
+
/**
|
10115
|
+
* Custom positioning reference element.
|
10116
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
10117
|
+
*/
|
10118
|
+
|
10119
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
10120
|
+
const alignments = ['start', 'end'];
|
10121
|
+
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
10122
|
+
const min$3 = Math.min;
|
10123
|
+
const max$3 = Math.max;
|
10124
|
+
const round$1 = Math.round;
|
10125
|
+
const createCoords = v => ({
|
10126
|
+
x: v,
|
10127
|
+
y: v
|
10128
|
+
});
|
10129
|
+
const oppositeSideMap = {
|
10130
|
+
left: 'right',
|
10131
|
+
right: 'left',
|
10132
|
+
bottom: 'top',
|
10133
|
+
top: 'bottom'
|
10134
|
+
};
|
10135
|
+
const oppositeAlignmentMap = {
|
10136
|
+
start: 'end',
|
10137
|
+
end: 'start'
|
10138
|
+
};
|
10139
|
+
function clamp(start, value, end) {
|
10140
|
+
return max$3(start, min$3(value, end));
|
10141
|
+
}
|
10142
|
+
function evaluate(value, param) {
|
10143
|
+
return typeof value === 'function' ? value(param) : value;
|
10144
|
+
}
|
10145
|
+
function getSide$1(placement) {
|
10115
10146
|
return placement.split('-')[0];
|
10116
10147
|
}
|
10117
|
-
|
10118
|
-
function getAlignment(placement) {
|
10148
|
+
function getAlignment$1(placement) {
|
10119
10149
|
return placement.split('-')[1];
|
10120
10150
|
}
|
10121
|
-
|
10122
|
-
|
10123
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
10151
|
+
function getOppositeAxis(axis) {
|
10152
|
+
return axis === 'x' ? 'y' : 'x';
|
10124
10153
|
}
|
10125
|
-
|
10126
|
-
function getLengthFromAxis(axis) {
|
10154
|
+
function getAxisLength(axis) {
|
10127
10155
|
return axis === 'y' ? 'height' : 'width';
|
10128
10156
|
}
|
10157
|
+
function getSideAxis(placement) {
|
10158
|
+
return ['top', 'bottom'].includes(getSide$1(placement)) ? 'y' : 'x';
|
10159
|
+
}
|
10160
|
+
function getAlignmentAxis(placement) {
|
10161
|
+
return getOppositeAxis(getSideAxis(placement));
|
10162
|
+
}
|
10163
|
+
function getAlignmentSides$1(placement, rects, rtl) {
|
10164
|
+
if (rtl === void 0) {
|
10165
|
+
rtl = false;
|
10166
|
+
}
|
10167
|
+
const alignment = getAlignment$1(placement);
|
10168
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
10169
|
+
const length = getAxisLength(alignmentAxis);
|
10170
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
10171
|
+
if (rects.reference[length] > rects.floating[length]) {
|
10172
|
+
mainAlignmentSide = getOppositePlacement$1(mainAlignmentSide);
|
10173
|
+
}
|
10174
|
+
return [mainAlignmentSide, getOppositePlacement$1(mainAlignmentSide)];
|
10175
|
+
}
|
10176
|
+
function getExpandedPlacements$1(placement) {
|
10177
|
+
const oppositePlacement = getOppositePlacement$1(placement);
|
10178
|
+
return [getOppositeAlignmentPlacement$1(placement), oppositePlacement, getOppositeAlignmentPlacement$1(oppositePlacement)];
|
10179
|
+
}
|
10180
|
+
function getOppositeAlignmentPlacement$1(placement) {
|
10181
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
10182
|
+
}
|
10183
|
+
function getSideList(side, isStart, rtl) {
|
10184
|
+
const lr = ['left', 'right'];
|
10185
|
+
const rl = ['right', 'left'];
|
10186
|
+
const tb = ['top', 'bottom'];
|
10187
|
+
const bt = ['bottom', 'top'];
|
10188
|
+
switch (side) {
|
10189
|
+
case 'top':
|
10190
|
+
case 'bottom':
|
10191
|
+
if (rtl) return isStart ? rl : lr;
|
10192
|
+
return isStart ? lr : rl;
|
10193
|
+
case 'left':
|
10194
|
+
case 'right':
|
10195
|
+
return isStart ? tb : bt;
|
10196
|
+
default:
|
10197
|
+
return [];
|
10198
|
+
}
|
10199
|
+
}
|
10200
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
10201
|
+
const alignment = getAlignment$1(placement);
|
10202
|
+
let list = getSideList(getSide$1(placement), direction === 'start', rtl);
|
10203
|
+
if (alignment) {
|
10204
|
+
list = list.map(side => side + "-" + alignment);
|
10205
|
+
if (flipAlignment) {
|
10206
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement$1));
|
10207
|
+
}
|
10208
|
+
}
|
10209
|
+
return list;
|
10210
|
+
}
|
10211
|
+
function getOppositePlacement$1(placement) {
|
10212
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
10213
|
+
}
|
10214
|
+
function expandPaddingObject$1(padding) {
|
10215
|
+
return {
|
10216
|
+
top: 0,
|
10217
|
+
right: 0,
|
10218
|
+
bottom: 0,
|
10219
|
+
left: 0,
|
10220
|
+
...padding
|
10221
|
+
};
|
10222
|
+
}
|
10223
|
+
function getPaddingObject(padding) {
|
10224
|
+
return typeof padding !== 'number' ? expandPaddingObject$1(padding) : {
|
10225
|
+
top: padding,
|
10226
|
+
right: padding,
|
10227
|
+
bottom: padding,
|
10228
|
+
left: padding
|
10229
|
+
};
|
10230
|
+
}
|
10231
|
+
function rectToClientRect$1(rect) {
|
10232
|
+
const {
|
10233
|
+
x,
|
10234
|
+
y,
|
10235
|
+
width,
|
10236
|
+
height
|
10237
|
+
} = rect;
|
10238
|
+
return {
|
10239
|
+
width,
|
10240
|
+
height,
|
10241
|
+
top: y,
|
10242
|
+
left: x,
|
10243
|
+
right: x + width,
|
10244
|
+
bottom: y + height,
|
10245
|
+
x,
|
10246
|
+
y
|
10247
|
+
};
|
10248
|
+
}
|
10129
10249
|
|
10130
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
10250
|
+
function computeCoordsFromPlacement$1(_ref, placement, rtl) {
|
10131
10251
|
let {
|
10132
10252
|
reference,
|
10133
10253
|
floating
|
10134
10254
|
} = _ref;
|
10255
|
+
const sideAxis = getSideAxis(placement);
|
10256
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
10257
|
+
const alignLength = getAxisLength(alignmentAxis);
|
10258
|
+
const side = getSide$1(placement);
|
10259
|
+
const isVertical = sideAxis === 'y';
|
10135
10260
|
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
10136
10261
|
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
10137
|
-
const
|
10138
|
-
const length = getLengthFromAxis(mainAxis);
|
10139
|
-
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
10140
|
-
const side = getSide(placement);
|
10141
|
-
const isVertical = mainAxis === 'x';
|
10262
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
10142
10263
|
let coords;
|
10143
|
-
|
10144
10264
|
switch (side) {
|
10145
10265
|
case 'top':
|
10146
10266
|
coords = {
|
@@ -10148,65 +10268,57 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
10148
10268
|
y: reference.y - floating.height
|
10149
10269
|
};
|
10150
10270
|
break;
|
10151
|
-
|
10152
10271
|
case 'bottom':
|
10153
10272
|
coords = {
|
10154
10273
|
x: commonX,
|
10155
10274
|
y: reference.y + reference.height
|
10156
10275
|
};
|
10157
10276
|
break;
|
10158
|
-
|
10159
10277
|
case 'right':
|
10160
10278
|
coords = {
|
10161
10279
|
x: reference.x + reference.width,
|
10162
10280
|
y: commonY
|
10163
10281
|
};
|
10164
10282
|
break;
|
10165
|
-
|
10166
10283
|
case 'left':
|
10167
10284
|
coords = {
|
10168
10285
|
x: reference.x - floating.width,
|
10169
10286
|
y: commonY
|
10170
10287
|
};
|
10171
10288
|
break;
|
10172
|
-
|
10173
10289
|
default:
|
10174
10290
|
coords = {
|
10175
10291
|
x: reference.x,
|
10176
10292
|
y: reference.y
|
10177
10293
|
};
|
10178
10294
|
}
|
10179
|
-
|
10180
|
-
switch (getAlignment(placement)) {
|
10295
|
+
switch (getAlignment$1(placement)) {
|
10181
10296
|
case 'start':
|
10182
|
-
coords[
|
10297
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
10183
10298
|
break;
|
10184
|
-
|
10185
10299
|
case 'end':
|
10186
|
-
coords[
|
10300
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
10187
10301
|
break;
|
10188
10302
|
}
|
10189
|
-
|
10190
10303
|
return coords;
|
10191
10304
|
}
|
10192
10305
|
|
10193
10306
|
/**
|
10194
10307
|
* Computes the `x` and `y` coordinates that will place the floating element
|
10195
|
-
* next to a reference element
|
10308
|
+
* next to a given reference element.
|
10196
10309
|
*
|
10197
10310
|
* This export does not have any `platform` interface logic. You will need to
|
10198
10311
|
* write one for the platform you are using Floating UI with.
|
10199
10312
|
*/
|
10200
|
-
|
10201
|
-
const computePosition$1 = async (reference, floating, config) => {
|
10313
|
+
const computePosition$3 = async (reference, floating, config) => {
|
10202
10314
|
const {
|
10203
10315
|
placement = 'bottom',
|
10204
10316
|
strategy = 'absolute',
|
10205
10317
|
middleware = [],
|
10206
10318
|
platform
|
10207
10319
|
} = config;
|
10320
|
+
const validMiddleware = middleware.filter(Boolean);
|
10208
10321
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
10209
|
-
|
10210
10322
|
let rects = await platform.getElementRects({
|
10211
10323
|
reference,
|
10212
10324
|
floating,
|
@@ -10215,16 +10327,15 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
10215
10327
|
let {
|
10216
10328
|
x,
|
10217
10329
|
y
|
10218
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
10330
|
+
} = computeCoordsFromPlacement$1(rects, placement, rtl);
|
10219
10331
|
let statefulPlacement = placement;
|
10220
10332
|
let middlewareData = {};
|
10221
10333
|
let resetCount = 0;
|
10222
|
-
|
10223
|
-
for (let i = 0; i < middleware.length; i++) {
|
10334
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
10224
10335
|
const {
|
10225
10336
|
name,
|
10226
10337
|
fn
|
10227
|
-
} =
|
10338
|
+
} = validMiddleware[i];
|
10228
10339
|
const {
|
10229
10340
|
x: nextX,
|
10230
10341
|
y: nextY,
|
@@ -10246,20 +10357,19 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
10246
10357
|
});
|
10247
10358
|
x = nextX != null ? nextX : x;
|
10248
10359
|
y = nextY != null ? nextY : y;
|
10249
|
-
middlewareData = {
|
10250
|
-
|
10360
|
+
middlewareData = {
|
10361
|
+
...middlewareData,
|
10362
|
+
[name]: {
|
10363
|
+
...middlewareData[name],
|
10251
10364
|
...data
|
10252
10365
|
}
|
10253
10366
|
};
|
10254
|
-
|
10255
10367
|
if (reset && resetCount <= 50) {
|
10256
10368
|
resetCount++;
|
10257
|
-
|
10258
10369
|
if (typeof reset === 'object') {
|
10259
10370
|
if (reset.placement) {
|
10260
10371
|
statefulPlacement = reset.placement;
|
10261
10372
|
}
|
10262
|
-
|
10263
10373
|
if (reset.rects) {
|
10264
10374
|
rects = reset.rects === true ? await platform.getElementRects({
|
10265
10375
|
reference,
|
@@ -10267,18 +10377,14 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
10267
10377
|
strategy
|
10268
10378
|
}) : reset.rects;
|
10269
10379
|
}
|
10270
|
-
|
10271
10380
|
({
|
10272
10381
|
x,
|
10273
10382
|
y
|
10274
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
10383
|
+
} = computeCoordsFromPlacement$1(rects, statefulPlacement, rtl));
|
10275
10384
|
}
|
10276
|
-
|
10277
10385
|
i = -1;
|
10278
|
-
continue;
|
10279
10386
|
}
|
10280
10387
|
}
|
10281
|
-
|
10282
10388
|
return {
|
10283
10389
|
x,
|
10284
10390
|
y,
|
@@ -10288,49 +10394,19 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
10288
10394
|
};
|
10289
10395
|
};
|
10290
10396
|
|
10291
|
-
function expandPaddingObject(padding) {
|
10292
|
-
return {
|
10293
|
-
top: 0,
|
10294
|
-
right: 0,
|
10295
|
-
bottom: 0,
|
10296
|
-
left: 0,
|
10297
|
-
...padding
|
10298
|
-
};
|
10299
|
-
}
|
10300
|
-
|
10301
|
-
function getSideObjectFromPadding(padding) {
|
10302
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
10303
|
-
top: padding,
|
10304
|
-
right: padding,
|
10305
|
-
bottom: padding,
|
10306
|
-
left: padding
|
10307
|
-
};
|
10308
|
-
}
|
10309
|
-
|
10310
|
-
function rectToClientRect(rect) {
|
10311
|
-
return { ...rect,
|
10312
|
-
top: rect.y,
|
10313
|
-
left: rect.x,
|
10314
|
-
right: rect.x + rect.width,
|
10315
|
-
bottom: rect.y + rect.height
|
10316
|
-
};
|
10317
|
-
}
|
10318
|
-
|
10319
10397
|
/**
|
10320
10398
|
* Resolves with an object of overflow side offsets that determine how much the
|
10321
|
-
* element is overflowing a given clipping boundary.
|
10399
|
+
* element is overflowing a given clipping boundary on each side.
|
10322
10400
|
* - positive = overflowing the boundary by that number of pixels
|
10323
10401
|
* - negative = how many pixels left before it will overflow
|
10324
10402
|
* - 0 = lies flush with the boundary
|
10325
10403
|
* @see https://floating-ui.com/docs/detectOverflow
|
10326
10404
|
*/
|
10327
|
-
async function detectOverflow(
|
10405
|
+
async function detectOverflow$1(state, options) {
|
10328
10406
|
var _await$platform$isEle;
|
10329
|
-
|
10330
10407
|
if (options === void 0) {
|
10331
10408
|
options = {};
|
10332
10409
|
}
|
10333
|
-
|
10334
10410
|
const {
|
10335
10411
|
x,
|
10336
10412
|
y,
|
@@ -10338,176 +10414,251 @@ async function detectOverflow(middlewareArguments, options) {
|
|
10338
10414
|
rects,
|
10339
10415
|
elements,
|
10340
10416
|
strategy
|
10341
|
-
} =
|
10417
|
+
} = state;
|
10342
10418
|
const {
|
10343
10419
|
boundary = 'clippingAncestors',
|
10344
10420
|
rootBoundary = 'viewport',
|
10345
10421
|
elementContext = 'floating',
|
10346
10422
|
altBoundary = false,
|
10347
10423
|
padding = 0
|
10348
|
-
} = options;
|
10349
|
-
const paddingObject =
|
10424
|
+
} = evaluate(options, state);
|
10425
|
+
const paddingObject = getPaddingObject(padding);
|
10350
10426
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
10351
10427
|
const element = elements[altBoundary ? altContext : elementContext];
|
10352
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
10428
|
+
const clippingClientRect = rectToClientRect$1(await platform.getClippingRect({
|
10353
10429
|
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
10354
10430
|
boundary,
|
10355
10431
|
rootBoundary,
|
10356
10432
|
strategy
|
10357
10433
|
}));
|
10358
|
-
const
|
10359
|
-
|
10360
|
-
|
10361
|
-
|
10362
|
-
|
10363
|
-
|
10434
|
+
const rect = elementContext === 'floating' ? {
|
10435
|
+
x,
|
10436
|
+
y,
|
10437
|
+
width: rects.floating.width,
|
10438
|
+
height: rects.floating.height
|
10439
|
+
} : rects.reference;
|
10440
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
10441
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
10442
|
+
x: 1,
|
10443
|
+
y: 1
|
10444
|
+
} : {
|
10445
|
+
x: 1,
|
10446
|
+
y: 1
|
10447
|
+
};
|
10448
|
+
const elementClientRect = rectToClientRect$1(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
10449
|
+
elements,
|
10450
|
+
rect,
|
10451
|
+
offsetParent,
|
10364
10452
|
strategy
|
10365
|
-
}) :
|
10453
|
+
}) : rect);
|
10366
10454
|
return {
|
10367
|
-
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
10368
|
-
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
10369
|
-
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
10370
|
-
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
10455
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
10456
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
10457
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
10458
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
10371
10459
|
};
|
10372
10460
|
}
|
10373
10461
|
|
10374
|
-
const min$2 = Math.min;
|
10375
|
-
const max$2 = Math.max;
|
10376
|
-
|
10377
|
-
function within(min$1, value, max$1) {
|
10378
|
-
return max$2(min$1, min$2(value, max$1));
|
10379
|
-
}
|
10380
|
-
|
10381
10462
|
/**
|
10382
|
-
*
|
10383
|
-
* to the reference element.
|
10463
|
+
* Provides data to position an inner element of the floating element so that it
|
10464
|
+
* appears centered to the reference element.
|
10384
10465
|
* @see https://floating-ui.com/docs/arrow
|
10385
10466
|
*/
|
10386
|
-
const arrow = options => ({
|
10467
|
+
const arrow$2 = options => ({
|
10387
10468
|
name: 'arrow',
|
10388
10469
|
options,
|
10389
|
-
|
10390
|
-
async fn(middlewareArguments) {
|
10391
|
-
// Since `element` is required, we don't Partial<> the type
|
10392
|
-
const {
|
10393
|
-
element,
|
10394
|
-
padding = 0
|
10395
|
-
} = options != null ? options : {};
|
10470
|
+
async fn(state) {
|
10396
10471
|
const {
|
10397
10472
|
x,
|
10398
10473
|
y,
|
10399
10474
|
placement,
|
10400
10475
|
rects,
|
10401
|
-
platform
|
10402
|
-
|
10403
|
-
|
10476
|
+
platform,
|
10477
|
+
elements,
|
10478
|
+
middlewareData
|
10479
|
+
} = state;
|
10480
|
+
// Since `element` is required, we don't Partial<> the type.
|
10481
|
+
const {
|
10482
|
+
element,
|
10483
|
+
padding = 0
|
10484
|
+
} = evaluate(options, state) || {};
|
10404
10485
|
if (element == null) {
|
10405
|
-
|
10406
10486
|
return {};
|
10407
10487
|
}
|
10408
|
-
|
10409
|
-
const paddingObject = getSideObjectFromPadding(padding);
|
10488
|
+
const paddingObject = getPaddingObject(padding);
|
10410
10489
|
const coords = {
|
10411
10490
|
x,
|
10412
10491
|
y
|
10413
10492
|
};
|
10414
|
-
const axis =
|
10415
|
-
const
|
10416
|
-
const length = getLengthFromAxis(axis);
|
10493
|
+
const axis = getAlignmentAxis(placement);
|
10494
|
+
const length = getAxisLength(axis);
|
10417
10495
|
const arrowDimensions = await platform.getDimensions(element);
|
10418
|
-
const
|
10419
|
-
const
|
10496
|
+
const isYAxis = axis === 'y';
|
10497
|
+
const minProp = isYAxis ? 'top' : 'left';
|
10498
|
+
const maxProp = isYAxis ? 'bottom' : 'right';
|
10499
|
+
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
10420
10500
|
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
10421
10501
|
const startDiff = coords[axis] - rects.reference[axis];
|
10422
10502
|
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
10423
|
-
let clientSize = arrowOffsetParent ?
|
10503
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
10424
10504
|
|
10425
|
-
|
10426
|
-
|
10505
|
+
// DOM platform can return `window` as the `offsetParent`.
|
10506
|
+
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
10507
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
10427
10508
|
}
|
10509
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
10428
10510
|
|
10429
|
-
|
10430
|
-
//
|
10511
|
+
// If the padding is large enough that it causes the arrow to no longer be
|
10512
|
+
// centered, modify the padding so that it is centered.
|
10513
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
10514
|
+
const minPadding = min$3(paddingObject[minProp], largestPossiblePadding);
|
10515
|
+
const maxPadding = min$3(paddingObject[maxProp], largestPossiblePadding);
|
10431
10516
|
|
10432
|
-
|
10433
|
-
|
10517
|
+
// Make sure the arrow doesn't overflow the floating element if the center
|
10518
|
+
// point is outside the floating element's bounds.
|
10519
|
+
const min$1 = minPadding;
|
10520
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
10434
10521
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
10435
|
-
const offset =
|
10436
|
-
|
10437
|
-
|
10438
|
-
|
10439
|
-
|
10522
|
+
const offset = clamp(min$1, center, max);
|
10523
|
+
|
10524
|
+
// If the reference is small enough that the arrow's padding causes it to
|
10525
|
+
// to point to nothing for an aligned placement, adjust the offset of the
|
10526
|
+
// floating element itself. To ensure `shift()` continues to take action,
|
10527
|
+
// a single reset is performed when this is true.
|
10528
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment$1(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
10529
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
10440
10530
|
return {
|
10441
|
-
[axis]: coords[axis]
|
10531
|
+
[axis]: coords[axis] + alignmentOffset,
|
10442
10532
|
data: {
|
10443
10533
|
[axis]: offset,
|
10444
|
-
centerOffset: center - offset
|
10445
|
-
|
10534
|
+
centerOffset: center - offset - alignmentOffset,
|
10535
|
+
...(shouldAddOffset && {
|
10536
|
+
alignmentOffset
|
10537
|
+
})
|
10538
|
+
},
|
10539
|
+
reset: shouldAddOffset
|
10446
10540
|
};
|
10447
10541
|
}
|
10448
|
-
|
10449
10542
|
});
|
10450
10543
|
|
10451
|
-
|
10452
|
-
|
10453
|
-
|
10454
|
-
|
10455
|
-
|
10456
|
-
}
|
10457
|
-
|
10458
|
-
|
10544
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
10545
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment$1(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment$1(placement) !== alignment)] : allowedPlacements.filter(placement => getSide$1(placement) === placement);
|
10546
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
10547
|
+
if (alignment) {
|
10548
|
+
return getAlignment$1(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement$1(placement) !== placement : false);
|
10549
|
+
}
|
10550
|
+
return true;
|
10551
|
+
});
|
10459
10552
|
}
|
10460
|
-
|
10461
|
-
|
10462
|
-
|
10463
|
-
|
10553
|
+
/**
|
10554
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
10555
|
+
* that has the most space available automatically, without needing to specify a
|
10556
|
+
* preferred placement. Alternative to `flip`.
|
10557
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
10558
|
+
*/
|
10559
|
+
const autoPlacement = function (options) {
|
10560
|
+
if (options === void 0) {
|
10561
|
+
options = {};
|
10464
10562
|
}
|
10563
|
+
return {
|
10564
|
+
name: 'autoPlacement',
|
10565
|
+
options,
|
10566
|
+
async fn(state) {
|
10567
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
10568
|
+
const {
|
10569
|
+
rects,
|
10570
|
+
middlewareData,
|
10571
|
+
placement,
|
10572
|
+
platform,
|
10573
|
+
elements
|
10574
|
+
} = state;
|
10575
|
+
const {
|
10576
|
+
crossAxis = false,
|
10577
|
+
alignment,
|
10578
|
+
allowedPlacements = placements,
|
10579
|
+
autoAlignment = true,
|
10580
|
+
...detectOverflowOptions
|
10581
|
+
} = evaluate(options, state);
|
10582
|
+
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
10583
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
10584
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
10585
|
+
const currentPlacement = placements$1[currentIndex];
|
10586
|
+
if (currentPlacement == null) {
|
10587
|
+
return {};
|
10588
|
+
}
|
10589
|
+
const alignmentSides = getAlignmentSides$1(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
10465
10590
|
|
10466
|
-
|
10467
|
-
|
10468
|
-
|
10469
|
-
|
10470
|
-
|
10471
|
-
|
10472
|
-
|
10473
|
-
|
10591
|
+
// Make `computeCoords` start from the right place.
|
10592
|
+
if (placement !== currentPlacement) {
|
10593
|
+
return {
|
10594
|
+
reset: {
|
10595
|
+
placement: placements$1[0]
|
10596
|
+
}
|
10597
|
+
};
|
10598
|
+
}
|
10599
|
+
const currentOverflows = [overflow[getSide$1(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
10600
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
10601
|
+
placement: currentPlacement,
|
10602
|
+
overflows: currentOverflows
|
10603
|
+
}];
|
10604
|
+
const nextPlacement = placements$1[currentIndex + 1];
|
10474
10605
|
|
10475
|
-
|
10476
|
-
|
10477
|
-
|
10606
|
+
// There are more placements to check.
|
10607
|
+
if (nextPlacement) {
|
10608
|
+
return {
|
10609
|
+
data: {
|
10610
|
+
index: currentIndex + 1,
|
10611
|
+
overflows: allOverflows
|
10612
|
+
},
|
10613
|
+
reset: {
|
10614
|
+
placement: nextPlacement
|
10615
|
+
}
|
10616
|
+
};
|
10617
|
+
}
|
10618
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
10619
|
+
const alignment = getAlignment$1(d.placement);
|
10620
|
+
return [d.placement, alignment && crossAxis ?
|
10621
|
+
// Check along the mainAxis and main crossAxis side.
|
10622
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
10623
|
+
// Check only the mainAxis.
|
10624
|
+
d.overflows[0], d.overflows];
|
10625
|
+
}).sort((a, b) => a[1] - b[1]);
|
10626
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
10627
|
+
// Aligned placements should not check their opposite crossAxis
|
10628
|
+
// side.
|
10629
|
+
getAlignment$1(d[0]) ? 2 : 3).every(v => v <= 0));
|
10630
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
10631
|
+
if (resetPlacement !== placement) {
|
10632
|
+
return {
|
10633
|
+
data: {
|
10634
|
+
index: currentIndex + 1,
|
10635
|
+
overflows: allOverflows
|
10636
|
+
},
|
10637
|
+
reset: {
|
10638
|
+
placement: resetPlacement
|
10639
|
+
}
|
10640
|
+
};
|
10641
|
+
}
|
10642
|
+
return {};
|
10643
|
+
}
|
10478
10644
|
};
|
10479
|
-
}
|
10480
|
-
|
10481
|
-
const hash = {
|
10482
|
-
start: 'end',
|
10483
|
-
end: 'start'
|
10484
10645
|
};
|
10485
|
-
function getOppositeAlignmentPlacement(placement) {
|
10486
|
-
return placement.replace(/start|end/g, matched => hash[matched]);
|
10487
|
-
}
|
10488
|
-
|
10489
|
-
function getExpandedPlacements(placement) {
|
10490
|
-
const oppositePlacement = getOppositePlacement(placement);
|
10491
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
10492
|
-
}
|
10493
10646
|
|
10494
10647
|
/**
|
10495
|
-
*
|
10496
|
-
*
|
10648
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
10649
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
10650
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
10497
10651
|
* @see https://floating-ui.com/docs/flip
|
10498
10652
|
*/
|
10499
|
-
const flip = function (options) {
|
10653
|
+
const flip$1 = function (options) {
|
10500
10654
|
if (options === void 0) {
|
10501
10655
|
options = {};
|
10502
10656
|
}
|
10503
|
-
|
10504
10657
|
return {
|
10505
10658
|
name: 'flip',
|
10506
10659
|
options,
|
10507
|
-
|
10508
|
-
|
10509
|
-
var _middlewareData$flip;
|
10510
|
-
|
10660
|
+
async fn(state) {
|
10661
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
10511
10662
|
const {
|
10512
10663
|
placement,
|
10513
10664
|
middlewareData,
|
@@ -10515,48 +10666,56 @@ const flip = function (options) {
|
|
10515
10666
|
initialPlacement,
|
10516
10667
|
platform,
|
10517
10668
|
elements
|
10518
|
-
} =
|
10669
|
+
} = state;
|
10519
10670
|
const {
|
10520
10671
|
mainAxis: checkMainAxis = true,
|
10521
10672
|
crossAxis: checkCrossAxis = true,
|
10522
10673
|
fallbackPlacements: specifiedFallbackPlacements,
|
10523
10674
|
fallbackStrategy = 'bestFit',
|
10675
|
+
fallbackAxisSideDirection = 'none',
|
10524
10676
|
flipAlignment = true,
|
10525
10677
|
...detectOverflowOptions
|
10526
|
-
} = options;
|
10527
|
-
|
10528
|
-
|
10529
|
-
|
10678
|
+
} = evaluate(options, state);
|
10679
|
+
|
10680
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
10681
|
+
// added, we should skip any logic now since `flip()` has already done its
|
10682
|
+
// work.
|
10683
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
10684
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
10685
|
+
return {};
|
10686
|
+
}
|
10687
|
+
const side = getSide$1(placement);
|
10688
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
10689
|
+
const isBasePlacement = getSide$1(initialPlacement) === initialPlacement;
|
10690
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
10691
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement$1(initialPlacement)] : getExpandedPlacements$1(initialPlacement));
|
10692
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
10693
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
10694
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
10695
|
+
}
|
10530
10696
|
const placements = [initialPlacement, ...fallbackPlacements];
|
10531
|
-
const overflow = await detectOverflow(
|
10697
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
10532
10698
|
const overflows = [];
|
10533
10699
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
10534
|
-
|
10535
10700
|
if (checkMainAxis) {
|
10536
10701
|
overflows.push(overflow[side]);
|
10537
10702
|
}
|
10538
|
-
|
10539
10703
|
if (checkCrossAxis) {
|
10540
|
-
const
|
10541
|
-
|
10542
|
-
cross
|
10543
|
-
} = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
10544
|
-
overflows.push(overflow[main], overflow[cross]);
|
10704
|
+
const sides = getAlignmentSides$1(placement, rects, rtl);
|
10705
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
10545
10706
|
}
|
10546
|
-
|
10547
10707
|
overflowsData = [...overflowsData, {
|
10548
10708
|
placement,
|
10549
10709
|
overflows
|
10550
|
-
}];
|
10710
|
+
}];
|
10551
10711
|
|
10712
|
+
// One or more sides is overflowing.
|
10552
10713
|
if (!overflows.every(side => side <= 0)) {
|
10553
|
-
var _middlewareData$
|
10554
|
-
|
10555
|
-
const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
|
10714
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
10715
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
10556
10716
|
const nextPlacement = placements[nextIndex];
|
10557
|
-
|
10558
10717
|
if (nextPlacement) {
|
10559
|
-
// Try next placement and re-run the lifecycle
|
10718
|
+
// Try next placement and re-run the lifecycle.
|
10560
10719
|
return {
|
10561
10720
|
data: {
|
10562
10721
|
index: nextIndex,
|
@@ -10568,27 +10727,36 @@ const flip = function (options) {
|
|
10568
10727
|
};
|
10569
10728
|
}
|
10570
10729
|
|
10571
|
-
|
10572
|
-
|
10573
|
-
|
10574
|
-
case 'bestFit':
|
10575
|
-
{
|
10576
|
-
var _overflowsData$map$so;
|
10577
|
-
|
10578
|
-
const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement;
|
10730
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
10731
|
+
// then find the placement that fits the best on the main crossAxis side.
|
10732
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
10579
10733
|
|
10580
|
-
|
10581
|
-
|
10734
|
+
// Otherwise fallback.
|
10735
|
+
if (!resetPlacement) {
|
10736
|
+
switch (fallbackStrategy) {
|
10737
|
+
case 'bestFit':
|
10738
|
+
{
|
10739
|
+
var _overflowsData$filter2;
|
10740
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
10741
|
+
if (hasFallbackAxisSideDirection) {
|
10742
|
+
const currentSideAxis = getSideAxis(d.placement);
|
10743
|
+
return currentSideAxis === initialSideAxis ||
|
10744
|
+
// Create a bias to the `y` side axis due to horizontal
|
10745
|
+
// reading directions favoring greater width.
|
10746
|
+
currentSideAxis === 'y';
|
10747
|
+
}
|
10748
|
+
return true;
|
10749
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
10750
|
+
if (placement) {
|
10751
|
+
resetPlacement = placement;
|
10752
|
+
}
|
10753
|
+
break;
|
10582
10754
|
}
|
10583
|
-
|
10755
|
+
case 'initialPlacement':
|
10756
|
+
resetPlacement = initialPlacement;
|
10584
10757
|
break;
|
10585
|
-
|
10586
|
-
|
10587
|
-
case 'initialPlacement':
|
10588
|
-
resetPlacement = initialPlacement;
|
10589
|
-
break;
|
10758
|
+
}
|
10590
10759
|
}
|
10591
|
-
|
10592
10760
|
if (placement !== resetPlacement) {
|
10593
10761
|
return {
|
10594
10762
|
reset: {
|
@@ -10597,27 +10765,229 @@ const flip = function (options) {
|
|
10597
10765
|
};
|
10598
10766
|
}
|
10599
10767
|
}
|
10600
|
-
|
10601
10768
|
return {};
|
10602
10769
|
}
|
10770
|
+
};
|
10771
|
+
};
|
10603
10772
|
|
10773
|
+
function getSideOffsets(overflow, rect) {
|
10774
|
+
return {
|
10775
|
+
top: overflow.top - rect.height,
|
10776
|
+
right: overflow.right - rect.width,
|
10777
|
+
bottom: overflow.bottom - rect.height,
|
10778
|
+
left: overflow.left - rect.width
|
10779
|
+
};
|
10780
|
+
}
|
10781
|
+
function isAnySideFullyClipped(overflow) {
|
10782
|
+
return sides.some(side => overflow[side] >= 0);
|
10783
|
+
}
|
10784
|
+
/**
|
10785
|
+
* Provides data to hide the floating element in applicable situations, such as
|
10786
|
+
* when it is not in the same clipping context as the reference element.
|
10787
|
+
* @see https://floating-ui.com/docs/hide
|
10788
|
+
*/
|
10789
|
+
const hide = function (options) {
|
10790
|
+
if (options === void 0) {
|
10791
|
+
options = {};
|
10792
|
+
}
|
10793
|
+
return {
|
10794
|
+
name: 'hide',
|
10795
|
+
options,
|
10796
|
+
async fn(state) {
|
10797
|
+
const {
|
10798
|
+
rects
|
10799
|
+
} = state;
|
10800
|
+
const {
|
10801
|
+
strategy = 'referenceHidden',
|
10802
|
+
...detectOverflowOptions
|
10803
|
+
} = evaluate(options, state);
|
10804
|
+
switch (strategy) {
|
10805
|
+
case 'referenceHidden':
|
10806
|
+
{
|
10807
|
+
const overflow = await detectOverflow$1(state, {
|
10808
|
+
...detectOverflowOptions,
|
10809
|
+
elementContext: 'reference'
|
10810
|
+
});
|
10811
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
10812
|
+
return {
|
10813
|
+
data: {
|
10814
|
+
referenceHiddenOffsets: offsets,
|
10815
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
10816
|
+
}
|
10817
|
+
};
|
10818
|
+
}
|
10819
|
+
case 'escaped':
|
10820
|
+
{
|
10821
|
+
const overflow = await detectOverflow$1(state, {
|
10822
|
+
...detectOverflowOptions,
|
10823
|
+
altBoundary: true
|
10824
|
+
});
|
10825
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
10826
|
+
return {
|
10827
|
+
data: {
|
10828
|
+
escapedOffsets: offsets,
|
10829
|
+
escaped: isAnySideFullyClipped(offsets)
|
10830
|
+
}
|
10831
|
+
};
|
10832
|
+
}
|
10833
|
+
default:
|
10834
|
+
{
|
10835
|
+
return {};
|
10836
|
+
}
|
10837
|
+
}
|
10838
|
+
}
|
10604
10839
|
};
|
10605
10840
|
};
|
10606
10841
|
|
10607
|
-
|
10842
|
+
function getBoundingRect(rects) {
|
10843
|
+
const minX = min$3(...rects.map(rect => rect.left));
|
10844
|
+
const minY = min$3(...rects.map(rect => rect.top));
|
10845
|
+
const maxX = max$3(...rects.map(rect => rect.right));
|
10846
|
+
const maxY = max$3(...rects.map(rect => rect.bottom));
|
10847
|
+
return {
|
10848
|
+
x: minX,
|
10849
|
+
y: minY,
|
10850
|
+
width: maxX - minX,
|
10851
|
+
height: maxY - minY
|
10852
|
+
};
|
10853
|
+
}
|
10854
|
+
function getRectsByLine(rects) {
|
10855
|
+
const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
|
10856
|
+
const groups = [];
|
10857
|
+
let prevRect = null;
|
10858
|
+
for (let i = 0; i < sortedRects.length; i++) {
|
10859
|
+
const rect = sortedRects[i];
|
10860
|
+
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
|
10861
|
+
groups.push([rect]);
|
10862
|
+
} else {
|
10863
|
+
groups[groups.length - 1].push(rect);
|
10864
|
+
}
|
10865
|
+
prevRect = rect;
|
10866
|
+
}
|
10867
|
+
return groups.map(rect => rectToClientRect$1(getBoundingRect(rect)));
|
10868
|
+
}
|
10869
|
+
/**
|
10870
|
+
* Provides improved positioning for inline reference elements that can span
|
10871
|
+
* over multiple lines, such as hyperlinks or range selections.
|
10872
|
+
* @see https://floating-ui.com/docs/inline
|
10873
|
+
*/
|
10874
|
+
const inline = function (options) {
|
10875
|
+
if (options === void 0) {
|
10876
|
+
options = {};
|
10877
|
+
}
|
10878
|
+
return {
|
10879
|
+
name: 'inline',
|
10880
|
+
options,
|
10881
|
+
async fn(state) {
|
10882
|
+
const {
|
10883
|
+
placement,
|
10884
|
+
elements,
|
10885
|
+
rects,
|
10886
|
+
platform,
|
10887
|
+
strategy
|
10888
|
+
} = state;
|
10889
|
+
// A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
|
10890
|
+
// ClientRect's bounds, despite the event listener being triggered. A
|
10891
|
+
// padding of 2 seems to handle this issue.
|
10892
|
+
const {
|
10893
|
+
padding = 2,
|
10894
|
+
x,
|
10895
|
+
y
|
10896
|
+
} = evaluate(options, state);
|
10897
|
+
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
|
10898
|
+
const clientRects = getRectsByLine(nativeClientRects);
|
10899
|
+
const fallback = rectToClientRect$1(getBoundingRect(nativeClientRects));
|
10900
|
+
const paddingObject = getPaddingObject(padding);
|
10901
|
+
function getBoundingClientRect() {
|
10902
|
+
// There are two rects and they are disjoined.
|
10903
|
+
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
10904
|
+
// Find the first rect in which the point is fully inside.
|
10905
|
+
return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
|
10906
|
+
}
|
10907
|
+
|
10908
|
+
// There are 2 or more connected rects.
|
10909
|
+
if (clientRects.length >= 2) {
|
10910
|
+
if (getSideAxis(placement) === 'y') {
|
10911
|
+
const firstRect = clientRects[0];
|
10912
|
+
const lastRect = clientRects[clientRects.length - 1];
|
10913
|
+
const isTop = getSide$1(placement) === 'top';
|
10914
|
+
const top = firstRect.top;
|
10915
|
+
const bottom = lastRect.bottom;
|
10916
|
+
const left = isTop ? firstRect.left : lastRect.left;
|
10917
|
+
const right = isTop ? firstRect.right : lastRect.right;
|
10918
|
+
const width = right - left;
|
10919
|
+
const height = bottom - top;
|
10920
|
+
return {
|
10921
|
+
top,
|
10922
|
+
bottom,
|
10923
|
+
left,
|
10924
|
+
right,
|
10925
|
+
width,
|
10926
|
+
height,
|
10927
|
+
x: left,
|
10928
|
+
y: top
|
10929
|
+
};
|
10930
|
+
}
|
10931
|
+
const isLeftSide = getSide$1(placement) === 'left';
|
10932
|
+
const maxRight = max$3(...clientRects.map(rect => rect.right));
|
10933
|
+
const minLeft = min$3(...clientRects.map(rect => rect.left));
|
10934
|
+
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
10935
|
+
const top = measureRects[0].top;
|
10936
|
+
const bottom = measureRects[measureRects.length - 1].bottom;
|
10937
|
+
const left = minLeft;
|
10938
|
+
const right = maxRight;
|
10939
|
+
const width = right - left;
|
10940
|
+
const height = bottom - top;
|
10941
|
+
return {
|
10942
|
+
top,
|
10943
|
+
bottom,
|
10944
|
+
left,
|
10945
|
+
right,
|
10946
|
+
width,
|
10947
|
+
height,
|
10948
|
+
x: left,
|
10949
|
+
y: top
|
10950
|
+
};
|
10951
|
+
}
|
10952
|
+
return fallback;
|
10953
|
+
}
|
10954
|
+
const resetRects = await platform.getElementRects({
|
10955
|
+
reference: {
|
10956
|
+
getBoundingClientRect
|
10957
|
+
},
|
10958
|
+
floating: elements.floating,
|
10959
|
+
strategy
|
10960
|
+
});
|
10961
|
+
if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
|
10962
|
+
return {
|
10963
|
+
reset: {
|
10964
|
+
rects: resetRects
|
10965
|
+
}
|
10966
|
+
};
|
10967
|
+
}
|
10968
|
+
return {};
|
10969
|
+
}
|
10970
|
+
};
|
10971
|
+
};
|
10972
|
+
|
10973
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
10974
|
+
// Derivable.
|
10975
|
+
|
10976
|
+
async function convertValueToCoords$1(state, options) {
|
10608
10977
|
const {
|
10609
10978
|
placement,
|
10610
10979
|
platform,
|
10611
10980
|
elements
|
10612
|
-
} =
|
10981
|
+
} = state;
|
10613
10982
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
10614
|
-
const side = getSide(placement);
|
10615
|
-
const alignment = getAlignment(placement);
|
10616
|
-
const isVertical =
|
10983
|
+
const side = getSide$1(placement);
|
10984
|
+
const alignment = getAlignment$1(placement);
|
10985
|
+
const isVertical = getSideAxis(placement) === 'y';
|
10617
10986
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
10618
10987
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
10619
|
-
const rawValue =
|
10988
|
+
const rawValue = evaluate(options, state);
|
10620
10989
|
|
10990
|
+
// eslint-disable-next-line prefer-const
|
10621
10991
|
let {
|
10622
10992
|
mainAxis,
|
10623
10993
|
crossAxis,
|
@@ -10632,11 +11002,9 @@ async function convertValueToCoords(middlewareArguments, value) {
|
|
10632
11002
|
alignmentAxis: null,
|
10633
11003
|
...rawValue
|
10634
11004
|
};
|
10635
|
-
|
10636
11005
|
if (alignment && typeof alignmentAxis === 'number') {
|
10637
11006
|
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
10638
11007
|
}
|
10639
|
-
|
10640
11008
|
return isVertical ? {
|
10641
11009
|
x: crossAxis * crossAxisMulti,
|
10642
11010
|
y: mainAxis * mainAxisMulti
|
@@ -10645,60 +11013,66 @@ async function convertValueToCoords(middlewareArguments, value) {
|
|
10645
11013
|
y: crossAxis * crossAxisMulti
|
10646
11014
|
};
|
10647
11015
|
}
|
11016
|
+
|
10648
11017
|
/**
|
10649
|
-
*
|
11018
|
+
* Modifies the placement by translating the floating element along the
|
11019
|
+
* specified axes.
|
11020
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
11021
|
+
* object may be passed.
|
10650
11022
|
* @see https://floating-ui.com/docs/offset
|
10651
11023
|
*/
|
10652
|
-
|
10653
|
-
|
10654
|
-
|
10655
|
-
value = 0;
|
11024
|
+
const offset$1 = function (options) {
|
11025
|
+
if (options === void 0) {
|
11026
|
+
options = 0;
|
10656
11027
|
}
|
10657
|
-
|
10658
11028
|
return {
|
10659
11029
|
name: 'offset',
|
10660
|
-
options
|
10661
|
-
|
10662
|
-
|
11030
|
+
options,
|
11031
|
+
async fn(state) {
|
11032
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
10663
11033
|
const {
|
10664
11034
|
x,
|
10665
|
-
y
|
10666
|
-
|
10667
|
-
|
11035
|
+
y,
|
11036
|
+
placement,
|
11037
|
+
middlewareData
|
11038
|
+
} = state;
|
11039
|
+
const diffCoords = await convertValueToCoords$1(state, options);
|
11040
|
+
|
11041
|
+
// If the placement is the same and the arrow caused an alignment offset
|
11042
|
+
// then we don't need to change the positioning coordinates.
|
11043
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
11044
|
+
return {};
|
11045
|
+
}
|
10668
11046
|
return {
|
10669
11047
|
x: x + diffCoords.x,
|
10670
11048
|
y: y + diffCoords.y,
|
10671
|
-
data:
|
11049
|
+
data: {
|
11050
|
+
...diffCoords,
|
11051
|
+
placement
|
11052
|
+
}
|
10672
11053
|
};
|
10673
11054
|
}
|
10674
|
-
|
10675
11055
|
};
|
10676
11056
|
};
|
10677
11057
|
|
10678
|
-
function getCrossAxis(axis) {
|
10679
|
-
return axis === 'x' ? 'y' : 'x';
|
10680
|
-
}
|
10681
|
-
|
10682
11058
|
/**
|
10683
|
-
*
|
10684
|
-
*
|
11059
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
11060
|
+
* keep it in view when it will overflow the clipping boundary.
|
10685
11061
|
* @see https://floating-ui.com/docs/shift
|
10686
11062
|
*/
|
10687
|
-
const shift = function (options) {
|
11063
|
+
const shift$1 = function (options) {
|
10688
11064
|
if (options === void 0) {
|
10689
11065
|
options = {};
|
10690
11066
|
}
|
10691
|
-
|
10692
11067
|
return {
|
10693
11068
|
name: 'shift',
|
10694
11069
|
options,
|
10695
|
-
|
10696
|
-
async fn(middlewareArguments) {
|
11070
|
+
async fn(state) {
|
10697
11071
|
const {
|
10698
11072
|
x,
|
10699
11073
|
y,
|
10700
11074
|
placement
|
10701
|
-
} =
|
11075
|
+
} = state;
|
10702
11076
|
const {
|
10703
11077
|
mainAxis: checkMainAxis = true,
|
10704
11078
|
crossAxis: checkCrossAxis = false,
|
@@ -10715,424 +11089,547 @@ const shift = function (options) {
|
|
10715
11089
|
}
|
10716
11090
|
},
|
10717
11091
|
...detectOverflowOptions
|
10718
|
-
} = options;
|
11092
|
+
} = evaluate(options, state);
|
10719
11093
|
const coords = {
|
10720
11094
|
x,
|
10721
11095
|
y
|
10722
11096
|
};
|
10723
|
-
const overflow = await detectOverflow(
|
10724
|
-
const
|
10725
|
-
const
|
11097
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
11098
|
+
const crossAxis = getSideAxis(getSide$1(placement));
|
11099
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
10726
11100
|
let mainAxisCoord = coords[mainAxis];
|
10727
11101
|
let crossAxisCoord = coords[crossAxis];
|
10728
|
-
|
10729
11102
|
if (checkMainAxis) {
|
10730
11103
|
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
10731
11104
|
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
10732
11105
|
const min = mainAxisCoord + overflow[minSide];
|
10733
11106
|
const max = mainAxisCoord - overflow[maxSide];
|
10734
|
-
mainAxisCoord =
|
11107
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
10735
11108
|
}
|
10736
|
-
|
10737
11109
|
if (checkCrossAxis) {
|
10738
11110
|
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
10739
11111
|
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
10740
11112
|
const min = crossAxisCoord + overflow[minSide];
|
10741
11113
|
const max = crossAxisCoord - overflow[maxSide];
|
10742
|
-
crossAxisCoord =
|
11114
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
10743
11115
|
}
|
10744
|
-
|
10745
|
-
|
11116
|
+
const limitedCoords = limiter.fn({
|
11117
|
+
...state,
|
10746
11118
|
[mainAxis]: mainAxisCoord,
|
10747
11119
|
[crossAxis]: crossAxisCoord
|
10748
11120
|
});
|
10749
|
-
return {
|
11121
|
+
return {
|
11122
|
+
...limitedCoords,
|
10750
11123
|
data: {
|
10751
11124
|
x: limitedCoords.x - x,
|
10752
11125
|
y: limitedCoords.y - y
|
10753
11126
|
}
|
10754
11127
|
};
|
10755
11128
|
}
|
10756
|
-
|
10757
11129
|
};
|
10758
11130
|
};
|
10759
|
-
|
10760
|
-
|
10761
|
-
|
10762
|
-
|
10763
|
-
|
10764
|
-
|
10765
|
-
return window;
|
11131
|
+
/**
|
11132
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
11133
|
+
*/
|
11134
|
+
const limitShift = function (options) {
|
11135
|
+
if (options === void 0) {
|
11136
|
+
options = {};
|
10766
11137
|
}
|
11138
|
+
return {
|
11139
|
+
options,
|
11140
|
+
fn(state) {
|
11141
|
+
const {
|
11142
|
+
x,
|
11143
|
+
y,
|
11144
|
+
placement,
|
11145
|
+
rects,
|
11146
|
+
middlewareData
|
11147
|
+
} = state;
|
11148
|
+
const {
|
11149
|
+
offset = 0,
|
11150
|
+
mainAxis: checkMainAxis = true,
|
11151
|
+
crossAxis: checkCrossAxis = true
|
11152
|
+
} = evaluate(options, state);
|
11153
|
+
const coords = {
|
11154
|
+
x,
|
11155
|
+
y
|
11156
|
+
};
|
11157
|
+
const crossAxis = getSideAxis(placement);
|
11158
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
11159
|
+
let mainAxisCoord = coords[mainAxis];
|
11160
|
+
let crossAxisCoord = coords[crossAxis];
|
11161
|
+
const rawOffset = evaluate(offset, state);
|
11162
|
+
const computedOffset = typeof rawOffset === 'number' ? {
|
11163
|
+
mainAxis: rawOffset,
|
11164
|
+
crossAxis: 0
|
11165
|
+
} : {
|
11166
|
+
mainAxis: 0,
|
11167
|
+
crossAxis: 0,
|
11168
|
+
...rawOffset
|
11169
|
+
};
|
11170
|
+
if (checkMainAxis) {
|
11171
|
+
const len = mainAxis === 'y' ? 'height' : 'width';
|
11172
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
11173
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
11174
|
+
if (mainAxisCoord < limitMin) {
|
11175
|
+
mainAxisCoord = limitMin;
|
11176
|
+
} else if (mainAxisCoord > limitMax) {
|
11177
|
+
mainAxisCoord = limitMax;
|
11178
|
+
}
|
11179
|
+
}
|
11180
|
+
if (checkCrossAxis) {
|
11181
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
11182
|
+
const len = mainAxis === 'y' ? 'width' : 'height';
|
11183
|
+
const isOriginSide = ['top', 'left'].includes(getSide$1(placement));
|
11184
|
+
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
11185
|
+
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
11186
|
+
if (crossAxisCoord < limitMin) {
|
11187
|
+
crossAxisCoord = limitMin;
|
11188
|
+
} else if (crossAxisCoord > limitMax) {
|
11189
|
+
crossAxisCoord = limitMax;
|
11190
|
+
}
|
11191
|
+
}
|
11192
|
+
return {
|
11193
|
+
[mainAxis]: mainAxisCoord,
|
11194
|
+
[crossAxis]: crossAxisCoord
|
11195
|
+
};
|
11196
|
+
}
|
11197
|
+
};
|
11198
|
+
};
|
10767
11199
|
|
10768
|
-
|
10769
|
-
|
10770
|
-
|
11200
|
+
/**
|
11201
|
+
* Provides data that allows you to change the size of the floating element —
|
11202
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
11203
|
+
* width of the reference element.
|
11204
|
+
* @see https://floating-ui.com/docs/size
|
11205
|
+
*/
|
11206
|
+
const size = function (options) {
|
11207
|
+
if (options === void 0) {
|
11208
|
+
options = {};
|
10771
11209
|
}
|
11210
|
+
return {
|
11211
|
+
name: 'size',
|
11212
|
+
options,
|
11213
|
+
async fn(state) {
|
11214
|
+
const {
|
11215
|
+
placement,
|
11216
|
+
rects,
|
11217
|
+
platform,
|
11218
|
+
elements
|
11219
|
+
} = state;
|
11220
|
+
const {
|
11221
|
+
apply = () => {},
|
11222
|
+
...detectOverflowOptions
|
11223
|
+
} = evaluate(options, state);
|
11224
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
11225
|
+
const side = getSide$1(placement);
|
11226
|
+
const alignment = getAlignment$1(placement);
|
11227
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
11228
|
+
const {
|
11229
|
+
width,
|
11230
|
+
height
|
11231
|
+
} = rects.floating;
|
11232
|
+
let heightSide;
|
11233
|
+
let widthSide;
|
11234
|
+
if (side === 'top' || side === 'bottom') {
|
11235
|
+
heightSide = side;
|
11236
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
11237
|
+
} else {
|
11238
|
+
widthSide = side;
|
11239
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
11240
|
+
}
|
11241
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
11242
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
11243
|
+
const overflowAvailableHeight = min$3(height - overflow[heightSide], maximumClippingHeight);
|
11244
|
+
const overflowAvailableWidth = min$3(width - overflow[widthSide], maximumClippingWidth);
|
11245
|
+
const noShift = !state.middlewareData.shift;
|
11246
|
+
let availableHeight = overflowAvailableHeight;
|
11247
|
+
let availableWidth = overflowAvailableWidth;
|
11248
|
+
if (isYAxis) {
|
11249
|
+
availableWidth = alignment || noShift ? min$3(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
11250
|
+
} else {
|
11251
|
+
availableHeight = alignment || noShift ? min$3(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
11252
|
+
}
|
11253
|
+
if (noShift && !alignment) {
|
11254
|
+
const xMin = max$3(overflow.left, 0);
|
11255
|
+
const xMax = max$3(overflow.right, 0);
|
11256
|
+
const yMin = max$3(overflow.top, 0);
|
11257
|
+
const yMax = max$3(overflow.bottom, 0);
|
11258
|
+
if (isYAxis) {
|
11259
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$3(overflow.left, overflow.right));
|
11260
|
+
} else {
|
11261
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$3(overflow.top, overflow.bottom));
|
11262
|
+
}
|
11263
|
+
}
|
11264
|
+
await apply({
|
11265
|
+
...state,
|
11266
|
+
availableWidth,
|
11267
|
+
availableHeight
|
11268
|
+
});
|
11269
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
11270
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
11271
|
+
return {
|
11272
|
+
reset: {
|
11273
|
+
rects: true
|
11274
|
+
}
|
11275
|
+
};
|
11276
|
+
}
|
11277
|
+
return {};
|
11278
|
+
}
|
11279
|
+
};
|
11280
|
+
};
|
10772
11281
|
|
10773
|
-
|
10774
|
-
|
10775
|
-
|
10776
|
-
|
10777
|
-
|
11282
|
+
function getNodeName$1(node) {
|
11283
|
+
if (isNode$1(node)) {
|
11284
|
+
return (node.nodeName || '').toLowerCase();
|
11285
|
+
}
|
11286
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
11287
|
+
// returning `#document` an infinite loop won't occur.
|
11288
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
11289
|
+
return '#document';
|
10778
11290
|
}
|
10779
|
-
|
10780
|
-
|
10781
|
-
return
|
11291
|
+
function getWindow$1(node) {
|
11292
|
+
var _node$ownerDocument;
|
11293
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
10782
11294
|
}
|
10783
|
-
|
10784
|
-
|
10785
|
-
|
10786
|
-
|
10787
|
-
if (uaData != null && uaData.brands) {
|
10788
|
-
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
10789
|
-
}
|
10790
|
-
|
10791
|
-
return navigator.userAgent;
|
11295
|
+
function getDocumentElement$1(node) {
|
11296
|
+
var _ref;
|
11297
|
+
return (_ref = (isNode$1(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
10792
11298
|
}
|
10793
|
-
|
10794
|
-
|
10795
|
-
return value instanceof getWindow(value).HTMLElement;
|
11299
|
+
function isNode$1(value) {
|
11300
|
+
return value instanceof Node || value instanceof getWindow$1(value).Node;
|
10796
11301
|
}
|
10797
|
-
function isElement(value) {
|
10798
|
-
return value instanceof getWindow(value).Element;
|
11302
|
+
function isElement$1(value) {
|
11303
|
+
return value instanceof Element || value instanceof getWindow$1(value).Element;
|
10799
11304
|
}
|
10800
|
-
function
|
10801
|
-
return value instanceof getWindow(value).
|
11305
|
+
function isHTMLElement$1(value) {
|
11306
|
+
return value instanceof HTMLElement || value instanceof getWindow$1(value).HTMLElement;
|
10802
11307
|
}
|
10803
|
-
function isShadowRoot(
|
10804
|
-
// Browsers without `ShadowRoot` support
|
11308
|
+
function isShadowRoot$1(value) {
|
11309
|
+
// Browsers without `ShadowRoot` support.
|
10805
11310
|
if (typeof ShadowRoot === 'undefined') {
|
10806
11311
|
return false;
|
10807
11312
|
}
|
10808
|
-
|
10809
|
-
const OwnElement = getWindow(node).ShadowRoot;
|
10810
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
11313
|
+
return value instanceof ShadowRoot || value instanceof getWindow$1(value).ShadowRoot;
|
10811
11314
|
}
|
10812
|
-
function isOverflowElement(element) {
|
10813
|
-
// Firefox wants us to check `-x` and `-y` variations as well
|
11315
|
+
function isOverflowElement$1(element) {
|
10814
11316
|
const {
|
10815
11317
|
overflow,
|
10816
11318
|
overflowX,
|
10817
|
-
overflowY
|
10818
|
-
|
10819
|
-
|
10820
|
-
|
10821
|
-
function isTableElement(element) {
|
10822
|
-
return ['table', 'td', 'th'].includes(getNodeName(element));
|
11319
|
+
overflowY,
|
11320
|
+
display
|
11321
|
+
} = getComputedStyle$2(element);
|
11322
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
10823
11323
|
}
|
10824
|
-
function
|
10825
|
-
|
10826
|
-
const isFirefox = /firefox/i.test(getUAString());
|
10827
|
-
const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that
|
10828
|
-
// create a containing block.
|
10829
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
10830
|
-
|
10831
|
-
return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
|
10832
|
-
css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
|
11324
|
+
function isTableElement$1(element) {
|
11325
|
+
return ['table', 'td', 'th'].includes(getNodeName$1(element));
|
10833
11326
|
}
|
10834
|
-
function
|
10835
|
-
|
10836
|
-
|
10837
|
-
|
10838
|
-
|
10839
|
-
|
10840
|
-
|
11327
|
+
function isTopLayer(element) {
|
11328
|
+
return [':popover-open', ':modal'].some(selector => {
|
11329
|
+
try {
|
11330
|
+
return element.matches(selector);
|
11331
|
+
} catch (e) {
|
11332
|
+
return false;
|
11333
|
+
}
|
11334
|
+
});
|
10841
11335
|
}
|
11336
|
+
function isContainingBlock$1(elementOrCss) {
|
11337
|
+
const webkit = isWebKit();
|
11338
|
+
const css = isElement$1(elementOrCss) ? getComputedStyle$2(elementOrCss) : elementOrCss;
|
10842
11339
|
|
10843
|
-
|
10844
|
-
|
10845
|
-
|
10846
|
-
|
10847
|
-
|
10848
|
-
|
10849
|
-
|
10850
|
-
|
10851
|
-
|
10852
|
-
|
10853
|
-
|
10854
|
-
|
10855
|
-
isFixedStrategy = false;
|
10856
|
-
}
|
10857
|
-
|
10858
|
-
const clientRect = element.getBoundingClientRect();
|
10859
|
-
let scaleX = 1;
|
10860
|
-
let scaleY = 1;
|
10861
|
-
|
10862
|
-
if (includeScale && isHTMLElement(element)) {
|
10863
|
-
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
10864
|
-
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
11340
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
11341
|
+
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
11342
|
+
}
|
11343
|
+
function getContainingBlock$1(element) {
|
11344
|
+
let currentNode = getParentNode$1(element);
|
11345
|
+
while (isHTMLElement$1(currentNode) && !isLastTraversableNode(currentNode)) {
|
11346
|
+
if (isContainingBlock$1(currentNode)) {
|
11347
|
+
return currentNode;
|
11348
|
+
} else if (isTopLayer(currentNode)) {
|
11349
|
+
return null;
|
11350
|
+
}
|
11351
|
+
currentNode = getParentNode$1(currentNode);
|
10865
11352
|
}
|
10866
|
-
|
10867
|
-
const win = isElement(element) ? getWindow(element) : window;
|
10868
|
-
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
10869
|
-
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
|
10870
|
-
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
|
10871
|
-
const width = clientRect.width / scaleX;
|
10872
|
-
const height = clientRect.height / scaleY;
|
10873
|
-
return {
|
10874
|
-
width,
|
10875
|
-
height,
|
10876
|
-
top: y,
|
10877
|
-
right: x + width,
|
10878
|
-
bottom: y + height,
|
10879
|
-
left: x,
|
10880
|
-
x,
|
10881
|
-
y
|
10882
|
-
};
|
11353
|
+
return null;
|
10883
11354
|
}
|
10884
|
-
|
10885
|
-
|
10886
|
-
return (
|
11355
|
+
function isWebKit() {
|
11356
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
11357
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
10887
11358
|
}
|
10888
|
-
|
10889
|
-
|
10890
|
-
|
11359
|
+
function isLastTraversableNode(node) {
|
11360
|
+
return ['html', 'body', '#document'].includes(getNodeName$1(node));
|
11361
|
+
}
|
11362
|
+
function getComputedStyle$2(element) {
|
11363
|
+
return getWindow$1(element).getComputedStyle(element);
|
11364
|
+
}
|
11365
|
+
function getNodeScroll$1(element) {
|
11366
|
+
if (isElement$1(element)) {
|
10891
11367
|
return {
|
10892
11368
|
scrollLeft: element.scrollLeft,
|
10893
11369
|
scrollTop: element.scrollTop
|
10894
11370
|
};
|
10895
11371
|
}
|
10896
|
-
|
10897
11372
|
return {
|
10898
|
-
scrollLeft: element.
|
10899
|
-
scrollTop: element.
|
11373
|
+
scrollLeft: element.scrollX,
|
11374
|
+
scrollTop: element.scrollY
|
10900
11375
|
};
|
10901
11376
|
}
|
10902
|
-
|
10903
|
-
|
10904
|
-
|
10905
|
-
|
10906
|
-
|
11377
|
+
function getParentNode$1(node) {
|
11378
|
+
if (getNodeName$1(node) === 'html') {
|
11379
|
+
return node;
|
11380
|
+
}
|
11381
|
+
const result =
|
11382
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
11383
|
+
node.assignedSlot ||
|
11384
|
+
// DOM Element detected.
|
11385
|
+
node.parentNode ||
|
11386
|
+
// ShadowRoot detected.
|
11387
|
+
isShadowRoot$1(node) && node.host ||
|
11388
|
+
// Fallback.
|
11389
|
+
getDocumentElement$1(node);
|
11390
|
+
return isShadowRoot$1(result) ? result.host : result;
|
11391
|
+
}
|
11392
|
+
function getNearestOverflowAncestor$1(node) {
|
11393
|
+
const parentNode = getParentNode$1(node);
|
11394
|
+
if (isLastTraversableNode(parentNode)) {
|
11395
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
11396
|
+
}
|
11397
|
+
if (isHTMLElement$1(parentNode) && isOverflowElement$1(parentNode)) {
|
11398
|
+
return parentNode;
|
11399
|
+
}
|
11400
|
+
return getNearestOverflowAncestor$1(parentNode);
|
10907
11401
|
}
|
10908
|
-
|
10909
|
-
|
10910
|
-
|
10911
|
-
|
11402
|
+
function getOverflowAncestors$1(node, list, traverseIframes) {
|
11403
|
+
var _node$ownerDocument2;
|
11404
|
+
if (list === void 0) {
|
11405
|
+
list = [];
|
11406
|
+
}
|
11407
|
+
if (traverseIframes === void 0) {
|
11408
|
+
traverseIframes = true;
|
11409
|
+
}
|
11410
|
+
const scrollableAncestor = getNearestOverflowAncestor$1(node);
|
11411
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
11412
|
+
const win = getWindow$1(scrollableAncestor);
|
11413
|
+
if (isBody) {
|
11414
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement$1(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors$1(win.frameElement) : []);
|
11415
|
+
}
|
11416
|
+
return list.concat(scrollableAncestor, getOverflowAncestors$1(scrollableAncestor, [], traverseIframes));
|
10912
11417
|
}
|
10913
11418
|
|
10914
|
-
function
|
10915
|
-
const
|
10916
|
-
|
10917
|
-
|
10918
|
-
|
10919
|
-
let
|
10920
|
-
|
10921
|
-
|
10922
|
-
|
10923
|
-
const
|
10924
|
-
|
10925
|
-
|
10926
|
-
|
10927
|
-
|
10928
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
10929
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
10930
|
-
scroll = getNodeScroll(offsetParent);
|
10931
|
-
}
|
10932
|
-
|
10933
|
-
if (isHTMLElement(offsetParent)) {
|
10934
|
-
const offsetRect = getBoundingClientRect(offsetParent, true);
|
10935
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
10936
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
10937
|
-
} else if (documentElement) {
|
10938
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
10939
|
-
}
|
11419
|
+
function getCssDimensions(element) {
|
11420
|
+
const css = getComputedStyle$2(element);
|
11421
|
+
// In testing environments, the `width` and `height` properties are empty
|
11422
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
11423
|
+
let width = parseFloat(css.width) || 0;
|
11424
|
+
let height = parseFloat(css.height) || 0;
|
11425
|
+
const hasOffset = isHTMLElement$1(element);
|
11426
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
11427
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
11428
|
+
const shouldFallback = round$1(width) !== offsetWidth || round$1(height) !== offsetHeight;
|
11429
|
+
if (shouldFallback) {
|
11430
|
+
width = offsetWidth;
|
11431
|
+
height = offsetHeight;
|
10940
11432
|
}
|
10941
|
-
|
10942
11433
|
return {
|
10943
|
-
|
10944
|
-
|
10945
|
-
|
10946
|
-
height: rect.height
|
11434
|
+
width,
|
11435
|
+
height,
|
11436
|
+
$: shouldFallback
|
10947
11437
|
};
|
10948
11438
|
}
|
10949
11439
|
|
10950
|
-
function
|
10951
|
-
|
10952
|
-
return node;
|
10953
|
-
}
|
10954
|
-
|
10955
|
-
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
10956
|
-
// @ts-ignore
|
10957
|
-
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
10958
|
-
node.parentNode || ( // DOM Element detected
|
10959
|
-
isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
10960
|
-
getDocumentElement(node) // fallback
|
10961
|
-
|
10962
|
-
);
|
11440
|
+
function unwrapElement(element) {
|
11441
|
+
return !isElement$1(element) ? element.contextElement : element;
|
10963
11442
|
}
|
10964
11443
|
|
10965
|
-
function
|
10966
|
-
|
10967
|
-
|
11444
|
+
function getScale(element) {
|
11445
|
+
const domElement = unwrapElement(element);
|
11446
|
+
if (!isHTMLElement$1(domElement)) {
|
11447
|
+
return createCoords(1);
|
10968
11448
|
}
|
11449
|
+
const rect = domElement.getBoundingClientRect();
|
11450
|
+
const {
|
11451
|
+
width,
|
11452
|
+
height,
|
11453
|
+
$
|
11454
|
+
} = getCssDimensions(domElement);
|
11455
|
+
let x = ($ ? round$1(rect.width) : rect.width) / width;
|
11456
|
+
let y = ($ ? round$1(rect.height) : rect.height) / height;
|
10969
11457
|
|
10970
|
-
|
10971
|
-
}
|
10972
|
-
/**
|
10973
|
-
* Polyfills the old offsetParent behavior from before the spec was changed:
|
10974
|
-
* https://github.com/w3c/csswg-drafts/issues/159
|
10975
|
-
*/
|
10976
|
-
|
10977
|
-
|
10978
|
-
function composedOffsetParent(element) {
|
10979
|
-
let {
|
10980
|
-
offsetParent
|
10981
|
-
} = element;
|
10982
|
-
let ancestor = element;
|
10983
|
-
let foundInsideSlot = false;
|
10984
|
-
|
10985
|
-
while (ancestor && ancestor !== offsetParent) {
|
10986
|
-
const {
|
10987
|
-
assignedSlot
|
10988
|
-
} = ancestor;
|
10989
|
-
|
10990
|
-
if (assignedSlot) {
|
10991
|
-
let newOffsetParent = assignedSlot.offsetParent;
|
10992
|
-
|
10993
|
-
if (getComputedStyle$1(assignedSlot).display === 'contents') {
|
10994
|
-
const hadStyleAttribute = assignedSlot.hasAttribute('style');
|
10995
|
-
const oldDisplay = assignedSlot.style.display;
|
10996
|
-
assignedSlot.style.display = getComputedStyle$1(ancestor).display;
|
10997
|
-
newOffsetParent = assignedSlot.offsetParent;
|
10998
|
-
assignedSlot.style.display = oldDisplay;
|
10999
|
-
|
11000
|
-
if (!hadStyleAttribute) {
|
11001
|
-
assignedSlot.removeAttribute('style');
|
11002
|
-
}
|
11003
|
-
}
|
11004
|
-
|
11005
|
-
ancestor = assignedSlot;
|
11006
|
-
|
11007
|
-
if (offsetParent !== newOffsetParent) {
|
11008
|
-
offsetParent = newOffsetParent;
|
11009
|
-
foundInsideSlot = true;
|
11010
|
-
}
|
11011
|
-
} else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
|
11012
|
-
break;
|
11013
|
-
}
|
11458
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
11014
11459
|
|
11015
|
-
|
11460
|
+
if (!x || !Number.isFinite(x)) {
|
11461
|
+
x = 1;
|
11016
11462
|
}
|
11017
|
-
|
11018
|
-
|
11019
|
-
}
|
11020
|
-
|
11021
|
-
function getContainingBlock(element) {
|
11022
|
-
let currentNode = getParentNode(element);
|
11023
|
-
|
11024
|
-
if (isShadowRoot(currentNode)) {
|
11025
|
-
currentNode = currentNode.host;
|
11463
|
+
if (!y || !Number.isFinite(y)) {
|
11464
|
+
y = 1;
|
11026
11465
|
}
|
11466
|
+
return {
|
11467
|
+
x,
|
11468
|
+
y
|
11469
|
+
};
|
11470
|
+
}
|
11027
11471
|
|
11028
|
-
|
11029
|
-
|
11030
|
-
|
11031
|
-
|
11032
|
-
|
11033
|
-
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
11034
|
-
}
|
11472
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
11473
|
+
function getVisualOffsets(element) {
|
11474
|
+
const win = getWindow$1(element);
|
11475
|
+
if (!isWebKit() || !win.visualViewport) {
|
11476
|
+
return noOffsets;
|
11035
11477
|
}
|
11036
|
-
|
11037
|
-
|
11038
|
-
|
11039
|
-
|
11040
|
-
|
11041
|
-
|
11042
|
-
|
11043
|
-
|
11044
|
-
let offsetParent = getTrueOffsetParent(element);
|
11045
|
-
|
11046
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
11047
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
11478
|
+
return {
|
11479
|
+
x: win.visualViewport.offsetLeft,
|
11480
|
+
y: win.visualViewport.offsetTop
|
11481
|
+
};
|
11482
|
+
}
|
11483
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
11484
|
+
if (isFixed === void 0) {
|
11485
|
+
isFixed = false;
|
11048
11486
|
}
|
11049
|
-
|
11050
|
-
|
11051
|
-
return window;
|
11487
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow$1(element)) {
|
11488
|
+
return false;
|
11052
11489
|
}
|
11053
|
-
|
11054
|
-
return offsetParent || getContainingBlock(element) || window;
|
11490
|
+
return isFixed;
|
11055
11491
|
}
|
11056
11492
|
|
11057
|
-
function
|
11058
|
-
if (
|
11059
|
-
|
11060
|
-
width: element.offsetWidth,
|
11061
|
-
height: element.offsetHeight
|
11062
|
-
};
|
11493
|
+
function getBoundingClientRect$1(element, includeScale, isFixedStrategy, offsetParent) {
|
11494
|
+
if (includeScale === void 0) {
|
11495
|
+
includeScale = false;
|
11063
11496
|
}
|
11064
|
-
|
11065
|
-
|
11066
|
-
|
11067
|
-
|
11068
|
-
|
11069
|
-
|
11497
|
+
if (isFixedStrategy === void 0) {
|
11498
|
+
isFixedStrategy = false;
|
11499
|
+
}
|
11500
|
+
const clientRect = element.getBoundingClientRect();
|
11501
|
+
const domElement = unwrapElement(element);
|
11502
|
+
let scale = createCoords(1);
|
11503
|
+
if (includeScale) {
|
11504
|
+
if (offsetParent) {
|
11505
|
+
if (isElement$1(offsetParent)) {
|
11506
|
+
scale = getScale(offsetParent);
|
11507
|
+
}
|
11508
|
+
} else {
|
11509
|
+
scale = getScale(element);
|
11510
|
+
}
|
11511
|
+
}
|
11512
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
11513
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
11514
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
11515
|
+
let width = clientRect.width / scale.x;
|
11516
|
+
let height = clientRect.height / scale.y;
|
11517
|
+
if (domElement) {
|
11518
|
+
const win = getWindow$1(domElement);
|
11519
|
+
const offsetWin = offsetParent && isElement$1(offsetParent) ? getWindow$1(offsetParent) : offsetParent;
|
11520
|
+
let currentWin = win;
|
11521
|
+
let currentIFrame = currentWin.frameElement;
|
11522
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
11523
|
+
const iframeScale = getScale(currentIFrame);
|
11524
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
11525
|
+
const css = getComputedStyle$2(currentIFrame);
|
11526
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
11527
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
11528
|
+
x *= iframeScale.x;
|
11529
|
+
y *= iframeScale.y;
|
11530
|
+
width *= iframeScale.x;
|
11531
|
+
height *= iframeScale.y;
|
11532
|
+
x += left;
|
11533
|
+
y += top;
|
11534
|
+
currentWin = getWindow$1(currentIFrame);
|
11535
|
+
currentIFrame = currentWin.frameElement;
|
11536
|
+
}
|
11537
|
+
}
|
11538
|
+
return rectToClientRect$1({
|
11539
|
+
width,
|
11540
|
+
height,
|
11541
|
+
x,
|
11542
|
+
y
|
11543
|
+
});
|
11070
11544
|
}
|
11071
11545
|
|
11072
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
11546
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect$1(_ref) {
|
11073
11547
|
let {
|
11548
|
+
elements,
|
11074
11549
|
rect,
|
11075
11550
|
offsetParent,
|
11076
11551
|
strategy
|
11077
11552
|
} = _ref;
|
11078
|
-
const
|
11079
|
-
const documentElement = getDocumentElement(offsetParent);
|
11080
|
-
|
11081
|
-
if (offsetParent === documentElement) {
|
11553
|
+
const isFixed = strategy === 'fixed';
|
11554
|
+
const documentElement = getDocumentElement$1(offsetParent);
|
11555
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
11556
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
11082
11557
|
return rect;
|
11083
11558
|
}
|
11084
|
-
|
11085
11559
|
let scroll = {
|
11086
11560
|
scrollLeft: 0,
|
11087
11561
|
scrollTop: 0
|
11088
11562
|
};
|
11089
|
-
|
11090
|
-
|
11091
|
-
|
11092
|
-
|
11093
|
-
|
11094
|
-
|
11095
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
11096
|
-
scroll = getNodeScroll(offsetParent);
|
11563
|
+
let scale = createCoords(1);
|
11564
|
+
const offsets = createCoords(0);
|
11565
|
+
const isOffsetParentAnElement = isHTMLElement$1(offsetParent);
|
11566
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
11567
|
+
if (getNodeName$1(offsetParent) !== 'body' || isOverflowElement$1(documentElement)) {
|
11568
|
+
scroll = getNodeScroll$1(offsetParent);
|
11097
11569
|
}
|
11098
|
-
|
11099
|
-
|
11100
|
-
|
11570
|
+
if (isHTMLElement$1(offsetParent)) {
|
11571
|
+
const offsetRect = getBoundingClientRect$1(offsetParent);
|
11572
|
+
scale = getScale(offsetParent);
|
11101
11573
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
11102
11574
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
11103
|
-
}
|
11104
|
-
// else if (documentElement) {
|
11105
|
-
// offsets.x = getWindowScrollBarX(documentElement);
|
11106
|
-
// }
|
11107
|
-
|
11575
|
+
}
|
11108
11576
|
}
|
11577
|
+
return {
|
11578
|
+
width: rect.width * scale.x,
|
11579
|
+
height: rect.height * scale.y,
|
11580
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
11581
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
11582
|
+
};
|
11583
|
+
}
|
11109
11584
|
|
11110
|
-
|
11111
|
-
|
11112
|
-
|
11585
|
+
function getClientRects(element) {
|
11586
|
+
return Array.from(element.getClientRects());
|
11587
|
+
}
|
11588
|
+
|
11589
|
+
function getWindowScrollBarX$1(element) {
|
11590
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
11591
|
+
// incorrect for RTL.
|
11592
|
+
return getBoundingClientRect$1(getDocumentElement$1(element)).left + getNodeScroll$1(element).scrollLeft;
|
11593
|
+
}
|
11594
|
+
|
11595
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
11596
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
11597
|
+
function getDocumentRect$1(element) {
|
11598
|
+
const html = getDocumentElement$1(element);
|
11599
|
+
const scroll = getNodeScroll$1(element);
|
11600
|
+
const body = element.ownerDocument.body;
|
11601
|
+
const width = max$3(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
11602
|
+
const height = max$3(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
11603
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX$1(element);
|
11604
|
+
const y = -scroll.scrollTop;
|
11605
|
+
if (getComputedStyle$2(body).direction === 'rtl') {
|
11606
|
+
x += max$3(html.clientWidth, body.clientWidth) - width;
|
11607
|
+
}
|
11608
|
+
return {
|
11609
|
+
width,
|
11610
|
+
height,
|
11611
|
+
x,
|
11612
|
+
y
|
11113
11613
|
};
|
11114
11614
|
}
|
11115
11615
|
|
11116
|
-
function getViewportRect(element, strategy) {
|
11117
|
-
const win = getWindow(element);
|
11118
|
-
const html = getDocumentElement(element);
|
11616
|
+
function getViewportRect$1(element, strategy) {
|
11617
|
+
const win = getWindow$1(element);
|
11618
|
+
const html = getDocumentElement$1(element);
|
11119
11619
|
const visualViewport = win.visualViewport;
|
11120
11620
|
let width = html.clientWidth;
|
11121
11621
|
let height = html.clientHeight;
|
11122
11622
|
let x = 0;
|
11123
11623
|
let y = 0;
|
11124
|
-
|
11125
11624
|
if (visualViewport) {
|
11126
11625
|
width = visualViewport.width;
|
11127
11626
|
height = visualViewport.height;
|
11128
|
-
const
|
11129
|
-
|
11130
|
-
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
11627
|
+
const visualViewportBased = isWebKit();
|
11628
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
11131
11629
|
x = visualViewport.offsetLeft;
|
11132
11630
|
y = visualViewport.offsetTop;
|
11133
11631
|
}
|
11134
11632
|
}
|
11135
|
-
|
11136
11633
|
return {
|
11137
11634
|
width,
|
11138
11635
|
height,
|
@@ -11141,23 +11638,16 @@ function getViewportRect(element, strategy) {
|
|
11141
11638
|
};
|
11142
11639
|
}
|
11143
11640
|
|
11144
|
-
//
|
11145
|
-
|
11146
|
-
|
11147
|
-
|
11148
|
-
|
11149
|
-
const
|
11150
|
-
const
|
11151
|
-
const
|
11152
|
-
const
|
11153
|
-
const
|
11154
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
11155
|
-
const y = -scroll.scrollTop;
|
11156
|
-
|
11157
|
-
if (getComputedStyle$1(body || html).direction === 'rtl') {
|
11158
|
-
x += max$1(html.clientWidth, body ? body.clientWidth : 0) - width;
|
11159
|
-
}
|
11160
|
-
|
11641
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
11642
|
+
function getInnerBoundingClientRect$1(element, strategy) {
|
11643
|
+
const clientRect = getBoundingClientRect$1(element, true, strategy === 'fixed');
|
11644
|
+
const top = clientRect.top + element.clientTop;
|
11645
|
+
const left = clientRect.left + element.clientLeft;
|
11646
|
+
const scale = isHTMLElement$1(element) ? getScale(element) : createCoords(1);
|
11647
|
+
const width = element.clientWidth * scale.x;
|
11648
|
+
const height = element.clientHeight * scale.y;
|
11649
|
+
const x = left * scale.x;
|
11650
|
+
const y = top * scale.y;
|
11161
11651
|
return {
|
11162
11652
|
width,
|
11163
11653
|
height,
|
@@ -11165,125 +11655,86 @@ function getDocumentRect(element) {
|
|
11165
11655
|
y
|
11166
11656
|
};
|
11167
11657
|
}
|
11168
|
-
|
11169
|
-
|
11170
|
-
|
11171
|
-
|
11172
|
-
if (
|
11173
|
-
|
11174
|
-
|
11175
|
-
|
11176
|
-
|
11177
|
-
|
11178
|
-
|
11179
|
-
|
11180
|
-
|
11181
|
-
|
11182
|
-
}
|
11183
|
-
|
11184
|
-
function getOverflowAncestors(node, list) {
|
11185
|
-
var _node$ownerDocument;
|
11186
|
-
|
11187
|
-
if (list === void 0) {
|
11188
|
-
list = [];
|
11658
|
+
function getClientRectFromClippingAncestor$1(element, clippingAncestor, strategy) {
|
11659
|
+
let rect;
|
11660
|
+
if (clippingAncestor === 'viewport') {
|
11661
|
+
rect = getViewportRect$1(element, strategy);
|
11662
|
+
} else if (clippingAncestor === 'document') {
|
11663
|
+
rect = getDocumentRect$1(getDocumentElement$1(element));
|
11664
|
+
} else if (isElement$1(clippingAncestor)) {
|
11665
|
+
rect = getInnerBoundingClientRect$1(clippingAncestor, strategy);
|
11666
|
+
} else {
|
11667
|
+
const visualOffsets = getVisualOffsets(element);
|
11668
|
+
rect = {
|
11669
|
+
...clippingAncestor,
|
11670
|
+
x: clippingAncestor.x - visualOffsets.x,
|
11671
|
+
y: clippingAncestor.y - visualOffsets.y
|
11672
|
+
};
|
11189
11673
|
}
|
11190
|
-
|
11191
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
11192
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
11193
|
-
const win = getWindow(scrollableAncestor);
|
11194
|
-
const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
|
11195
|
-
const updatedList = list.concat(target);
|
11196
|
-
return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
|
11197
|
-
updatedList.concat(getOverflowAncestors(target));
|
11674
|
+
return rectToClientRect$1(rect);
|
11198
11675
|
}
|
11199
|
-
|
11200
|
-
|
11201
|
-
|
11202
|
-
|
11203
|
-
if (parent.contains(child)) {
|
11204
|
-
return true;
|
11205
|
-
} // then fallback to custom implementation with Shadow DOM support
|
11206
|
-
else if (rootNode && isShadowRoot(rootNode)) {
|
11207
|
-
let next = child;
|
11208
|
-
|
11209
|
-
do {
|
11210
|
-
// use `===` replace node.isSameNode()
|
11211
|
-
if (next && parent === next) {
|
11212
|
-
return true;
|
11213
|
-
} // @ts-ignore: need a better way to handle this...
|
11214
|
-
|
11215
|
-
|
11216
|
-
next = next.parentNode || next.host;
|
11217
|
-
} while (next);
|
11676
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
11677
|
+
const parentNode = getParentNode$1(element);
|
11678
|
+
if (parentNode === stopNode || !isElement$1(parentNode) || isLastTraversableNode(parentNode)) {
|
11679
|
+
return false;
|
11218
11680
|
}
|
11219
|
-
|
11220
|
-
return false;
|
11221
|
-
}
|
11222
|
-
|
11223
|
-
function getInnerBoundingClientRect(element, strategy) {
|
11224
|
-
const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
|
11225
|
-
const top = clientRect.top + element.clientTop;
|
11226
|
-
const left = clientRect.left + element.clientLeft;
|
11227
|
-
return {
|
11228
|
-
top,
|
11229
|
-
left,
|
11230
|
-
x: left,
|
11231
|
-
y: top,
|
11232
|
-
right: left + element.clientWidth,
|
11233
|
-
bottom: top + element.clientHeight,
|
11234
|
-
width: element.clientWidth,
|
11235
|
-
height: element.clientHeight
|
11236
|
-
};
|
11681
|
+
return getComputedStyle$2(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
11237
11682
|
}
|
11238
11683
|
|
11239
|
-
|
11240
|
-
|
11241
|
-
|
11684
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
11685
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
11686
|
+
// of the given element up the tree.
|
11687
|
+
function getClippingElementAncestors(element, cache) {
|
11688
|
+
const cachedResult = cache.get(element);
|
11689
|
+
if (cachedResult) {
|
11690
|
+
return cachedResult;
|
11242
11691
|
}
|
11692
|
+
let result = getOverflowAncestors$1(element, [], false).filter(el => isElement$1(el) && getNodeName$1(el) !== 'body');
|
11693
|
+
let currentContainingBlockComputedStyle = null;
|
11694
|
+
const elementIsFixed = getComputedStyle$2(element).position === 'fixed';
|
11695
|
+
let currentNode = elementIsFixed ? getParentNode$1(element) : element;
|
11243
11696
|
|
11244
|
-
|
11245
|
-
|
11697
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
11698
|
+
while (isElement$1(currentNode) && !isLastTraversableNode(currentNode)) {
|
11699
|
+
const computedStyle = getComputedStyle$2(currentNode);
|
11700
|
+
const currentNodeIsContaining = isContainingBlock$1(currentNode);
|
11701
|
+
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
11702
|
+
currentContainingBlockComputedStyle = null;
|
11703
|
+
}
|
11704
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement$1(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
11705
|
+
if (shouldDropCurrentNode) {
|
11706
|
+
// Drop non-containing blocks.
|
11707
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
11708
|
+
} else {
|
11709
|
+
// Record last containing block for next iteration.
|
11710
|
+
currentContainingBlockComputedStyle = computedStyle;
|
11711
|
+
}
|
11712
|
+
currentNode = getParentNode$1(currentNode);
|
11246
11713
|
}
|
11714
|
+
cache.set(element, result);
|
11715
|
+
return result;
|
11716
|
+
}
|
11247
11717
|
|
11248
|
-
|
11249
|
-
|
11250
|
-
|
11251
|
-
// `initial`
|
11252
|
-
|
11253
|
-
|
11254
|
-
function getClippingAncestors(element) {
|
11255
|
-
const clippingAncestors = getOverflowAncestors(element);
|
11256
|
-
const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);
|
11257
|
-
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
11258
|
-
|
11259
|
-
if (!isElement(clipperElement)) {
|
11260
|
-
return [];
|
11261
|
-
} // @ts-ignore isElement check ensures we return Array<Element>
|
11262
|
-
|
11263
|
-
|
11264
|
-
return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
|
11265
|
-
} // Gets the maximum area that the element is visible in due to any number of
|
11266
|
-
// clipping ancestors
|
11267
|
-
|
11268
|
-
|
11269
|
-
function getClippingRect(_ref) {
|
11718
|
+
// Gets the maximum area that the element is visible in due to any number of
|
11719
|
+
// clipping ancestors.
|
11720
|
+
function getClippingRect$1(_ref) {
|
11270
11721
|
let {
|
11271
11722
|
element,
|
11272
11723
|
boundary,
|
11273
11724
|
rootBoundary,
|
11274
11725
|
strategy
|
11275
11726
|
} = _ref;
|
11276
|
-
const
|
11277
|
-
const clippingAncestors = [...
|
11727
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
11728
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
11278
11729
|
const firstClippingAncestor = clippingAncestors[0];
|
11279
11730
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
11280
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
11281
|
-
accRect.top = max$
|
11282
|
-
accRect.right = min$
|
11283
|
-
accRect.bottom = min$
|
11284
|
-
accRect.left = max$
|
11731
|
+
const rect = getClientRectFromClippingAncestor$1(element, clippingAncestor, strategy);
|
11732
|
+
accRect.top = max$3(rect.top, accRect.top);
|
11733
|
+
accRect.right = min$3(rect.right, accRect.right);
|
11734
|
+
accRect.bottom = min$3(rect.bottom, accRect.bottom);
|
11735
|
+
accRect.left = max$3(rect.left, accRect.left);
|
11285
11736
|
return accRect;
|
11286
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
11737
|
+
}, getClientRectFromClippingAncestor$1(element, firstClippingAncestor, strategy));
|
11287
11738
|
return {
|
11288
11739
|
width: clippingRect.right - clippingRect.left,
|
11289
11740
|
height: clippingRect.bottom - clippingRect.top,
|
@@ -11292,115 +11743,210 @@ function getClippingRect(_ref) {
|
|
11292
11743
|
};
|
11293
11744
|
}
|
11294
11745
|
|
11295
|
-
|
11296
|
-
|
11297
|
-
|
11298
|
-
|
11299
|
-
|
11300
|
-
|
11301
|
-
|
11302
|
-
|
11303
|
-
|
11304
|
-
|
11305
|
-
floating,
|
11306
|
-
strategy
|
11307
|
-
} = _ref;
|
11308
|
-
return {
|
11309
|
-
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
11310
|
-
floating: { ...getDimensions(floating),
|
11311
|
-
x: 0,
|
11312
|
-
y: 0
|
11313
|
-
}
|
11314
|
-
};
|
11315
|
-
},
|
11316
|
-
getClientRects: element => Array.from(element.getClientRects()),
|
11317
|
-
isRTL: element => getComputedStyle$1(element).direction === 'rtl'
|
11318
|
-
};
|
11746
|
+
function getDimensions$1(element) {
|
11747
|
+
const {
|
11748
|
+
width,
|
11749
|
+
height
|
11750
|
+
} = getCssDimensions(element);
|
11751
|
+
return {
|
11752
|
+
width,
|
11753
|
+
height
|
11754
|
+
};
|
11755
|
+
}
|
11319
11756
|
|
11320
|
-
|
11321
|
-
|
11322
|
-
|
11323
|
-
|
11324
|
-
|
11325
|
-
|
11326
|
-
|
11757
|
+
function getRectRelativeToOffsetParent$1(element, offsetParent, strategy) {
|
11758
|
+
const isOffsetParentAnElement = isHTMLElement$1(offsetParent);
|
11759
|
+
const documentElement = getDocumentElement$1(offsetParent);
|
11760
|
+
const isFixed = strategy === 'fixed';
|
11761
|
+
const rect = getBoundingClientRect$1(element, true, isFixed, offsetParent);
|
11762
|
+
let scroll = {
|
11763
|
+
scrollLeft: 0,
|
11764
|
+
scrollTop: 0
|
11765
|
+
};
|
11766
|
+
const offsets = createCoords(0);
|
11767
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
11768
|
+
if (getNodeName$1(offsetParent) !== 'body' || isOverflowElement$1(documentElement)) {
|
11769
|
+
scroll = getNodeScroll$1(offsetParent);
|
11770
|
+
}
|
11771
|
+
if (isOffsetParentAnElement) {
|
11772
|
+
const offsetRect = getBoundingClientRect$1(offsetParent, true, isFixed, offsetParent);
|
11773
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
11774
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
11775
|
+
} else if (documentElement) {
|
11776
|
+
offsets.x = getWindowScrollBarX$1(documentElement);
|
11777
|
+
}
|
11327
11778
|
}
|
11779
|
+
const x = rect.left + scroll.scrollLeft - offsets.x;
|
11780
|
+
const y = rect.top + scroll.scrollTop - offsets.y;
|
11781
|
+
return {
|
11782
|
+
x,
|
11783
|
+
y,
|
11784
|
+
width: rect.width,
|
11785
|
+
height: rect.height
|
11786
|
+
};
|
11787
|
+
}
|
11328
11788
|
|
11329
|
-
|
11330
|
-
|
11331
|
-
|
11332
|
-
elementResize = true,
|
11333
|
-
animationFrame = false
|
11334
|
-
} = options;
|
11335
|
-
const ancestorScroll = _ancestorScroll && !animationFrame;
|
11336
|
-
const ancestorResize = _ancestorResize && !animationFrame;
|
11337
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
|
11338
|
-
ancestors.forEach(ancestor => {
|
11339
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
11340
|
-
passive: true
|
11341
|
-
});
|
11342
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
11343
|
-
});
|
11344
|
-
let observer = null;
|
11789
|
+
function isStaticPositioned(element) {
|
11790
|
+
return getComputedStyle$2(element).position === 'static';
|
11791
|
+
}
|
11345
11792
|
|
11346
|
-
|
11347
|
-
|
11348
|
-
|
11349
|
-
|
11350
|
-
|
11351
|
-
|
11793
|
+
function getTrueOffsetParent$1(element, polyfill) {
|
11794
|
+
if (!isHTMLElement$1(element) || getComputedStyle$2(element).position === 'fixed') {
|
11795
|
+
return null;
|
11796
|
+
}
|
11797
|
+
if (polyfill) {
|
11798
|
+
return polyfill(element);
|
11799
|
+
}
|
11800
|
+
return element.offsetParent;
|
11801
|
+
}
|
11352
11802
|
|
11353
|
-
|
11354
|
-
|
11355
|
-
|
11356
|
-
|
11803
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
11804
|
+
// such as table ancestors and cross browser bugs.
|
11805
|
+
function getOffsetParent$1(element, polyfill) {
|
11806
|
+
const win = getWindow$1(element);
|
11807
|
+
if (isTopLayer(element)) {
|
11808
|
+
return win;
|
11357
11809
|
}
|
11810
|
+
if (!isHTMLElement$1(element)) {
|
11811
|
+
let svgOffsetParent = getParentNode$1(element);
|
11812
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
11813
|
+
if (isElement$1(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
11814
|
+
return svgOffsetParent;
|
11815
|
+
}
|
11816
|
+
svgOffsetParent = getParentNode$1(svgOffsetParent);
|
11817
|
+
}
|
11818
|
+
return win;
|
11819
|
+
}
|
11820
|
+
let offsetParent = getTrueOffsetParent$1(element, polyfill);
|
11821
|
+
while (offsetParent && isTableElement$1(offsetParent) && isStaticPositioned(offsetParent)) {
|
11822
|
+
offsetParent = getTrueOffsetParent$1(offsetParent, polyfill);
|
11823
|
+
}
|
11824
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock$1(offsetParent)) {
|
11825
|
+
return win;
|
11826
|
+
}
|
11827
|
+
return offsetParent || getContainingBlock$1(element) || win;
|
11828
|
+
}
|
11358
11829
|
|
11359
|
-
|
11360
|
-
|
11830
|
+
const getElementRects = async function (data) {
|
11831
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent$1;
|
11832
|
+
const getDimensionsFn = this.getDimensions;
|
11833
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
11834
|
+
return {
|
11835
|
+
reference: getRectRelativeToOffsetParent$1(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
11836
|
+
floating: {
|
11837
|
+
x: 0,
|
11838
|
+
y: 0,
|
11839
|
+
width: floatingDimensions.width,
|
11840
|
+
height: floatingDimensions.height
|
11841
|
+
}
|
11842
|
+
};
|
11843
|
+
};
|
11361
11844
|
|
11362
|
-
|
11363
|
-
|
11364
|
-
|
11845
|
+
function isRTL$1(element) {
|
11846
|
+
return getComputedStyle$2(element).direction === 'rtl';
|
11847
|
+
}
|
11365
11848
|
|
11366
|
-
|
11367
|
-
|
11849
|
+
const platform$1 = {
|
11850
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect$1,
|
11851
|
+
getDocumentElement: getDocumentElement$1,
|
11852
|
+
getClippingRect: getClippingRect$1,
|
11853
|
+
getOffsetParent: getOffsetParent$1,
|
11854
|
+
getElementRects,
|
11855
|
+
getClientRects,
|
11856
|
+
getDimensions: getDimensions$1,
|
11857
|
+
getScale,
|
11858
|
+
isElement: isElement$1,
|
11859
|
+
isRTL: isRTL$1
|
11860
|
+
};
|
11368
11861
|
|
11369
|
-
|
11370
|
-
|
11371
|
-
|
11862
|
+
/**
|
11863
|
+
* Modifies the placement by translating the floating element along the
|
11864
|
+
* specified axes.
|
11865
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
11866
|
+
* object may be passed.
|
11867
|
+
* @see https://floating-ui.com/docs/offset
|
11868
|
+
*/
|
11869
|
+
offset$1;
|
11372
11870
|
|
11373
|
-
|
11374
|
-
|
11375
|
-
|
11871
|
+
/**
|
11872
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
11873
|
+
* that has the most space available automatically, without needing to specify a
|
11874
|
+
* preferred placement. Alternative to `flip`.
|
11875
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
11876
|
+
*/
|
11877
|
+
autoPlacement;
|
11376
11878
|
|
11377
|
-
|
11378
|
-
|
11379
|
-
|
11879
|
+
/**
|
11880
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
11881
|
+
* keep it in view when it will overflow the clipping boundary.
|
11882
|
+
* @see https://floating-ui.com/docs/shift
|
11883
|
+
*/
|
11884
|
+
shift$1;
|
11380
11885
|
|
11381
|
-
|
11382
|
-
|
11383
|
-
|
11384
|
-
|
11385
|
-
|
11386
|
-
|
11886
|
+
/**
|
11887
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
11888
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
11889
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
11890
|
+
* @see https://floating-ui.com/docs/flip
|
11891
|
+
*/
|
11892
|
+
flip$1;
|
11387
11893
|
|
11388
|
-
|
11389
|
-
|
11390
|
-
|
11391
|
-
|
11392
|
-
|
11894
|
+
/**
|
11895
|
+
* Provides data that allows you to change the size of the floating element —
|
11896
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
11897
|
+
* width of the reference element.
|
11898
|
+
* @see https://floating-ui.com/docs/size
|
11899
|
+
*/
|
11900
|
+
size;
|
11393
11901
|
|
11394
11902
|
/**
|
11395
|
-
*
|
11396
|
-
*
|
11397
|
-
*
|
11903
|
+
* Provides data to hide the floating element in applicable situations, such as
|
11904
|
+
* when it is not in the same clipping context as the reference element.
|
11905
|
+
* @see https://floating-ui.com/docs/hide
|
11398
11906
|
*/
|
11907
|
+
hide;
|
11399
11908
|
|
11400
|
-
|
11401
|
-
|
11402
|
-
|
11403
|
-
|
11909
|
+
/**
|
11910
|
+
* Provides data to position an inner element of the floating element so that it
|
11911
|
+
* appears centered to the reference element.
|
11912
|
+
* @see https://floating-ui.com/docs/arrow
|
11913
|
+
*/
|
11914
|
+
const arrow$1 = arrow$2;
|
11915
|
+
|
11916
|
+
/**
|
11917
|
+
* Provides improved positioning for inline reference elements that can span
|
11918
|
+
* over multiple lines, such as hyperlinks or range selections.
|
11919
|
+
* @see https://floating-ui.com/docs/inline
|
11920
|
+
*/
|
11921
|
+
inline;
|
11922
|
+
|
11923
|
+
/**
|
11924
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
11925
|
+
*/
|
11926
|
+
limitShift;
|
11927
|
+
|
11928
|
+
/**
|
11929
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
11930
|
+
* next to a given reference element.
|
11931
|
+
*/
|
11932
|
+
const computePosition$2 = (reference, floating, options) => {
|
11933
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
11934
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
11935
|
+
// single call. If other functions become expensive, we can add them as well.
|
11936
|
+
const cache = new Map();
|
11937
|
+
const mergedOptions = {
|
11938
|
+
platform: platform$1,
|
11939
|
+
...options
|
11940
|
+
};
|
11941
|
+
const platformWithCache = {
|
11942
|
+
...mergedOptions.platform,
|
11943
|
+
_c: cache
|
11944
|
+
};
|
11945
|
+
return computePosition$3(reference, floating, {
|
11946
|
+
...mergedOptions,
|
11947
|
+
platform: platformWithCache
|
11948
|
+
});
|
11949
|
+
};
|
11404
11950
|
|
11405
11951
|
const useFloatingProps = buildProps({});
|
11406
11952
|
const unrefReference = (elRef) => {
|
@@ -11441,7 +11987,7 @@ const useFloating$1 = ({
|
|
11441
11987
|
const contentEl = unrefElement(contentRef);
|
11442
11988
|
if (!referenceEl || !contentEl)
|
11443
11989
|
return;
|
11444
|
-
const data = await computePosition(referenceEl, contentEl, {
|
11990
|
+
const data = await computePosition$2(referenceEl, contentEl, {
|
11445
11991
|
placement: unref(placement),
|
11446
11992
|
strategy: unref(strategy),
|
11447
11993
|
middleware: unref(middleware)
|
@@ -11476,7 +12022,7 @@ const arrowMiddleware = ({
|
|
11476
12022
|
const arrowEl = unref(arrowRef);
|
11477
12023
|
if (!arrowEl)
|
11478
12024
|
return {};
|
11479
|
-
return arrow({
|
12025
|
+
return arrow$1({
|
11480
12026
|
element: arrowEl,
|
11481
12027
|
padding
|
11482
12028
|
}).fn(args);
|
@@ -11844,6 +12390,9 @@ const configProviderProps = buildProps({
|
|
11844
12390
|
card: {
|
11845
12391
|
type: definePropType(Object)
|
11846
12392
|
},
|
12393
|
+
dialog: {
|
12394
|
+
type: definePropType(Object)
|
12395
|
+
},
|
11847
12396
|
link: {
|
11848
12397
|
type: definePropType(Object)
|
11849
12398
|
},
|
@@ -11881,7 +12430,7 @@ const ConfigProvider = defineComponent({
|
|
11881
12430
|
|
11882
12431
|
const ElConfigProvider = withInstall(ConfigProvider);
|
11883
12432
|
|
11884
|
-
const version$1 = "0.0.
|
12433
|
+
const version$1 = "0.0.20250810";
|
11885
12434
|
|
11886
12435
|
const makeInstaller = (components = []) => {
|
11887
12436
|
const install = (app, options) => {
|
@@ -14097,10 +14646,10 @@ function calculateNodeStyling(targetElement) {
|
|
14097
14646
|
return { contextStyle, paddingSize, borderSize, boxSizing };
|
14098
14647
|
}
|
14099
14648
|
function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
|
14100
|
-
var _a;
|
14649
|
+
var _a, _b;
|
14101
14650
|
if (!hiddenTextarea) {
|
14102
14651
|
hiddenTextarea = document.createElement("textarea");
|
14103
|
-
document.body.appendChild(hiddenTextarea);
|
14652
|
+
((_a = targetElement.parentNode) != null ? _a : document.body).appendChild(hiddenTextarea);
|
14104
14653
|
}
|
14105
14654
|
const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
|
14106
14655
|
contextStyle.forEach(([key, value]) => hiddenTextarea == null ? void 0 : hiddenTextarea.style.setProperty(key, value));
|
@@ -14131,7 +14680,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
|
|
14131
14680
|
height = Math.min(maxHeight, height);
|
14132
14681
|
}
|
14133
14682
|
result.height = `${height}px`;
|
14134
|
-
(
|
14683
|
+
(_b = hiddenTextarea.parentNode) == null ? void 0 : _b.removeChild(hiddenTextarea);
|
14135
14684
|
hiddenTextarea = void 0;
|
14136
14685
|
return result;
|
14137
14686
|
}
|
@@ -15395,7 +15944,7 @@ const _sfc_main$2p = /* @__PURE__ */ defineComponent({
|
|
15395
15944
|
watch(triggerRef, (el, prevEl) => {
|
15396
15945
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
15397
15946
|
virtualTriggerAriaStopWatch = void 0;
|
15398
|
-
if (isElement$
|
15947
|
+
if (isElement$2(el)) {
|
15399
15948
|
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
15400
15949
|
var _a;
|
15401
15950
|
const handler = props[eventName];
|
@@ -15417,7 +15966,7 @@ const _sfc_main$2p = /* @__PURE__ */ defineComponent({
|
|
15417
15966
|
}, { immediate: true });
|
15418
15967
|
}
|
15419
15968
|
}
|
15420
|
-
if (isElement$
|
15969
|
+
if (isElement$2(prevEl) && isFocusable(prevEl)) {
|
15421
15970
|
[
|
15422
15971
|
"aria-controls",
|
15423
15972
|
"aria-describedby",
|
@@ -15432,7 +15981,7 @@ const _sfc_main$2p = /* @__PURE__ */ defineComponent({
|
|
15432
15981
|
onBeforeUnmount(() => {
|
15433
15982
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
15434
15983
|
virtualTriggerAriaStopWatch = void 0;
|
15435
|
-
if (triggerRef.value && isElement$
|
15984
|
+
if (triggerRef.value && isElement$2(triggerRef.value)) {
|
15436
15985
|
const el = triggerRef.value;
|
15437
15986
|
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
15438
15987
|
const handler = props[eventName];
|
@@ -15527,7 +16076,7 @@ const tryFocus = (element, shouldSelect) => {
|
|
15527
16076
|
if (element && element.focus) {
|
15528
16077
|
const prevFocusedElement = document.activeElement;
|
15529
16078
|
let cleanup = false;
|
15530
|
-
if (isElement$
|
16079
|
+
if (isElement$2(element) && !isFocusable(element) && !element.getAttribute("tabindex")) {
|
15531
16080
|
element.setAttribute("tabindex", "-1");
|
15532
16081
|
cleanup = true;
|
15533
16082
|
}
|
@@ -15536,7 +16085,7 @@ const tryFocus = (element, shouldSelect) => {
|
|
15536
16085
|
if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
|
15537
16086
|
element.select();
|
15538
16087
|
}
|
15539
|
-
if (isElement$
|
16088
|
+
if (isElement$2(element) && cleanup) {
|
15540
16089
|
element.removeAttribute("tabindex");
|
15541
16090
|
}
|
15542
16091
|
}
|
@@ -16222,14 +16771,14 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
16222
16771
|
triggerTargetAriaStopWatch = void 0;
|
16223
16772
|
const el = unref(triggerTargetEl || contentRef.value);
|
16224
16773
|
const prevEl = unref(prevTriggerTargetEl || contentRef.value);
|
16225
|
-
if (isElement$
|
16774
|
+
if (isElement$2(el)) {
|
16226
16775
|
triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
16227
16776
|
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
16228
16777
|
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
16229
16778
|
});
|
16230
16779
|
}, { immediate: true });
|
16231
16780
|
}
|
16232
|
-
if (prevEl !== el && isElement$
|
16781
|
+
if (prevEl !== el && isElement$2(prevEl)) {
|
16233
16782
|
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
16234
16783
|
prevEl.removeAttribute(key);
|
16235
16784
|
});
|
@@ -18334,6 +18883,10 @@ var TinyColor = function() {
|
|
18334
18883
|
this.roundA = Math.round(100 * this.a) / 100;
|
18335
18884
|
return this;
|
18336
18885
|
};
|
18886
|
+
TinyColor2.prototype.isMonochrome = function() {
|
18887
|
+
var s = this.toHsl().s;
|
18888
|
+
return s === 0;
|
18889
|
+
};
|
18337
18890
|
TinyColor2.prototype.toHsv = function() {
|
18338
18891
|
var hsv = rgbToHsv(this.r, this.g, this.b);
|
18339
18892
|
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
|
@@ -18380,6 +18933,12 @@ var TinyColor = function() {
|
|
18380
18933
|
}
|
18381
18934
|
return "#" + this.toHex8(allow4Char);
|
18382
18935
|
};
|
18936
|
+
TinyColor2.prototype.toHexShortString = function(allowShortChar) {
|
18937
|
+
if (allowShortChar === void 0) {
|
18938
|
+
allowShortChar = false;
|
18939
|
+
}
|
18940
|
+
return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
|
18941
|
+
};
|
18383
18942
|
TinyColor2.prototype.toRgb = function() {
|
18384
18943
|
return {
|
18385
18944
|
r: Math.round(this.r),
|
@@ -18605,10 +19164,12 @@ var TinyColor = function() {
|
|
18605
19164
|
TinyColor2.prototype.onBackground = function(background) {
|
18606
19165
|
var fg = this.toRgb();
|
18607
19166
|
var bg = new TinyColor2(background).toRgb();
|
19167
|
+
var alpha = fg.a + bg.a * (1 - fg.a);
|
18608
19168
|
return new TinyColor2({
|
18609
|
-
r:
|
18610
|
-
g:
|
18611
|
-
b:
|
19169
|
+
r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
|
19170
|
+
g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
|
19171
|
+
b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
|
19172
|
+
a: alpha
|
18612
19173
|
});
|
18613
19174
|
};
|
18614
19175
|
TinyColor2.prototype.triad = function() {
|
@@ -20309,7 +20870,7 @@ function createDocumentHandler(el, binding) {
|
|
20309
20870
|
let excludes = [];
|
20310
20871
|
if (isArray$1(binding.arg)) {
|
20311
20872
|
excludes = binding.arg;
|
20312
|
-
} else if (isElement$
|
20873
|
+
} else if (isElement$2(binding.arg)) {
|
20313
20874
|
excludes.push(binding.arg);
|
20314
20875
|
}
|
20315
20876
|
return function(mouseup, mousedown) {
|
@@ -23867,7 +24428,7 @@ const calculatePathNodes = (node) => {
|
|
23867
24428
|
}
|
23868
24429
|
return nodes;
|
23869
24430
|
};
|
23870
|
-
class Node$
|
24431
|
+
class Node$3 {
|
23871
24432
|
constructor(data, config, parent, root = false) {
|
23872
24433
|
this.data = data;
|
23873
24434
|
this.config = config;
|
@@ -23887,7 +24448,7 @@ class Node$2 {
|
|
23887
24448
|
this.pathValues = pathNodes.map((node) => node.value);
|
23888
24449
|
this.pathLabels = pathNodes.map((node) => node.label);
|
23889
24450
|
this.childrenData = childrenData;
|
23890
|
-
this.children = (childrenData || []).map((child) => new Node$
|
24451
|
+
this.children = (childrenData || []).map((child) => new Node$3(child, config, this));
|
23891
24452
|
this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
|
23892
24453
|
this.text = "";
|
23893
24454
|
}
|
@@ -23908,7 +24469,7 @@ class Node$2 {
|
|
23908
24469
|
}
|
23909
24470
|
appendChild(childData) {
|
23910
24471
|
const { childrenData, children } = this;
|
23911
|
-
const node = new Node$
|
24472
|
+
const node = new Node$3(childData, this.config, this);
|
23912
24473
|
if (isArray$1(childrenData)) {
|
23913
24474
|
childrenData.push(childData);
|
23914
24475
|
} else {
|
@@ -23972,7 +24533,7 @@ class Node$2 {
|
|
23972
24533
|
}
|
23973
24534
|
}
|
23974
24535
|
}
|
23975
|
-
var Node$
|
24536
|
+
var Node$4 = Node$3;
|
23976
24537
|
|
23977
24538
|
const flatNodes = (nodes, leafOnly) => {
|
23978
24539
|
return nodes.reduce((res, node) => {
|
@@ -23988,7 +24549,7 @@ const flatNodes = (nodes, leafOnly) => {
|
|
23988
24549
|
class Store {
|
23989
24550
|
constructor(data, config) {
|
23990
24551
|
this.config = config;
|
23991
|
-
const nodes = (data || []).map((nodeData) => new Node$
|
24552
|
+
const nodes = (data || []).map((nodeData) => new Node$4(nodeData, this.config));
|
23992
24553
|
this.nodes = nodes;
|
23993
24554
|
this.allNodes = flatNodes(nodes, false);
|
23994
24555
|
this.leafNodes = flatNodes(nodes, true);
|
@@ -24000,7 +24561,7 @@ class Store {
|
|
24000
24561
|
return leafOnly ? this.leafNodes : this.allNodes;
|
24001
24562
|
}
|
24002
24563
|
appendNode(nodeData, parentNode) {
|
24003
|
-
const node = parentNode ? parentNode.appendChild(nodeData) : new Node$
|
24564
|
+
const node = parentNode ? parentNode.appendChild(nodeData) : new Node$4(nodeData, this.config);
|
24004
24565
|
if (!parentNode)
|
24005
24566
|
this.nodes.push(node);
|
24006
24567
|
this.appendAllNodesAndLeafNodes(node);
|
@@ -24162,7 +24723,7 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
24162
24723
|
};
|
24163
24724
|
const lazyLoad = (node, cb) => {
|
24164
24725
|
const cfg = config.value;
|
24165
|
-
node = node || new Node$
|
24726
|
+
node = node || new Node$4({}, cfg, void 0, true);
|
24166
24727
|
node.loading = true;
|
24167
24728
|
const resolve = (dataList) => {
|
24168
24729
|
const _node = node;
|
@@ -31148,12 +31709,21 @@ const DEFAULT_DIALOG_TRANSITION = "dialog-fade";
|
|
31148
31709
|
|
31149
31710
|
const dialogContentProps = buildProps({
|
31150
31711
|
center: Boolean,
|
31151
|
-
alignCenter:
|
31712
|
+
alignCenter: {
|
31713
|
+
type: Boolean,
|
31714
|
+
default: void 0
|
31715
|
+
},
|
31152
31716
|
closeIcon: {
|
31153
31717
|
type: iconPropType
|
31154
31718
|
},
|
31155
|
-
draggable:
|
31156
|
-
|
31719
|
+
draggable: {
|
31720
|
+
type: Boolean,
|
31721
|
+
default: void 0
|
31722
|
+
},
|
31723
|
+
overflow: {
|
31724
|
+
type: Boolean,
|
31725
|
+
default: void 0
|
31726
|
+
},
|
31157
31727
|
fullscreen: Boolean,
|
31158
31728
|
headerClass: String,
|
31159
31729
|
bodyClass: String,
|
@@ -31189,13 +31759,13 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
31189
31759
|
const dialogKls = computed(() => [
|
31190
31760
|
ns.b(),
|
31191
31761
|
ns.is("fullscreen", props.fullscreen),
|
31192
|
-
ns.is("draggable", props.draggable),
|
31193
|
-
ns.is("align-center", props.alignCenter),
|
31762
|
+
ns.is("draggable", !!props.draggable),
|
31763
|
+
ns.is("align-center", !!props.alignCenter),
|
31194
31764
|
{ [ns.m("center")]: props.center }
|
31195
31765
|
]);
|
31196
31766
|
const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
|
31197
|
-
const draggable = computed(() => props.draggable);
|
31198
|
-
const overflow = computed(() => props.overflow);
|
31767
|
+
const draggable = computed(() => !!props.draggable);
|
31768
|
+
const overflow = computed(() => !!props.overflow);
|
31199
31769
|
const { resetPosition, updatePosition } = useDraggable(dialogRef, headerRef, draggable, overflow);
|
31200
31770
|
expose({
|
31201
31771
|
resetPosition,
|
@@ -31312,7 +31882,7 @@ const dialogProps = buildProps({
|
|
31312
31882
|
},
|
31313
31883
|
transition: {
|
31314
31884
|
type: definePropType([String, Object]),
|
31315
|
-
default:
|
31885
|
+
default: void 0
|
31316
31886
|
}
|
31317
31887
|
});
|
31318
31888
|
const dialogEmits = {
|
@@ -31324,6 +31894,7 @@ const dialogEmits = {
|
|
31324
31894
|
openAutoFocus: () => true,
|
31325
31895
|
closeAutoFocus: () => true
|
31326
31896
|
};
|
31897
|
+
const dialogContextKey = Symbol("dialogContextKey");
|
31327
31898
|
|
31328
31899
|
const useDialog = (props, targetRef) => {
|
31329
31900
|
var _a;
|
@@ -31339,7 +31910,15 @@ const useDialog = (props, targetRef) => {
|
|
31339
31910
|
const zIndex = ref((_a = props.zIndex) != null ? _a : nextZIndex());
|
31340
31911
|
let openTimer = void 0;
|
31341
31912
|
let closeTimer = void 0;
|
31342
|
-
const
|
31913
|
+
const config = useGlobalConfig();
|
31914
|
+
const namespace = computed(() => {
|
31915
|
+
var _a2, _b;
|
31916
|
+
return (_b = (_a2 = config.value) == null ? void 0 : _a2.namespace) != null ? _b : defaultNamespace;
|
31917
|
+
});
|
31918
|
+
const globalConfig = computed(() => {
|
31919
|
+
var _a2;
|
31920
|
+
return (_a2 = config.value) == null ? void 0 : _a2.dialog;
|
31921
|
+
});
|
31343
31922
|
const style = computed(() => {
|
31344
31923
|
const style2 = {};
|
31345
31924
|
const varPrefix = `--${namespace.value}-dialog`;
|
@@ -31353,21 +31932,35 @@ const useDialog = (props, targetRef) => {
|
|
31353
31932
|
}
|
31354
31933
|
return style2;
|
31355
31934
|
});
|
31935
|
+
const _draggable = computed(() => {
|
31936
|
+
var _a2, _b, _c;
|
31937
|
+
return ((_c = (_b = props.draggable) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.draggable) != null ? _c : false) && !props.fullscreen;
|
31938
|
+
});
|
31939
|
+
const _alignCenter = computed(() => {
|
31940
|
+
var _a2, _b, _c;
|
31941
|
+
return (_c = (_b = props.alignCenter) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.alignCenter) != null ? _c : false;
|
31942
|
+
});
|
31943
|
+
const _overflow = computed(() => {
|
31944
|
+
var _a2, _b, _c;
|
31945
|
+
return (_c = (_b = props.overflow) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.overflow) != null ? _c : false;
|
31946
|
+
});
|
31356
31947
|
const overlayDialogStyle = computed(() => {
|
31357
|
-
if (
|
31948
|
+
if (_alignCenter.value) {
|
31358
31949
|
return { display: "flex" };
|
31359
31950
|
}
|
31360
31951
|
return {};
|
31361
31952
|
});
|
31362
31953
|
const transitionConfig = computed(() => {
|
31954
|
+
var _a2, _b, _c;
|
31955
|
+
const transition = (_c = (_b = props.transition) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.transition) != null ? _c : DEFAULT_DIALOG_TRANSITION;
|
31363
31956
|
const baseConfig = {
|
31364
|
-
name:
|
31957
|
+
name: transition,
|
31365
31958
|
onAfterEnter: afterEnter,
|
31366
31959
|
onBeforeLeave: beforeLeave,
|
31367
31960
|
onAfterLeave: afterLeave
|
31368
31961
|
};
|
31369
|
-
if (isObject$1(
|
31370
|
-
const
|
31962
|
+
if (isObject$1(transition)) {
|
31963
|
+
const config2 = { ...transition };
|
31371
31964
|
const _mergeHook = (userHook, defaultHook) => {
|
31372
31965
|
return (el) => {
|
31373
31966
|
if (isArray$1(userHook)) {
|
@@ -31381,13 +31974,13 @@ const useDialog = (props, targetRef) => {
|
|
31381
31974
|
defaultHook();
|
31382
31975
|
};
|
31383
31976
|
};
|
31384
|
-
|
31385
|
-
|
31386
|
-
|
31387
|
-
if (!
|
31388
|
-
|
31977
|
+
config2.onAfterEnter = _mergeHook(config2.onAfterEnter, afterEnter);
|
31978
|
+
config2.onBeforeLeave = _mergeHook(config2.onBeforeLeave, beforeLeave);
|
31979
|
+
config2.onAfterLeave = _mergeHook(config2.onAfterLeave, afterLeave);
|
31980
|
+
if (!config2.name) {
|
31981
|
+
config2.name = DEFAULT_DIALOG_TRANSITION;
|
31389
31982
|
}
|
31390
|
-
return
|
31983
|
+
return config2;
|
31391
31984
|
}
|
31392
31985
|
return baseConfig;
|
31393
31986
|
});
|
@@ -31530,7 +32123,10 @@ const useDialog = (props, targetRef) => {
|
|
31530
32123
|
rendered,
|
31531
32124
|
visible,
|
31532
32125
|
zIndex,
|
31533
|
-
transitionConfig
|
32126
|
+
transitionConfig,
|
32127
|
+
_draggable,
|
32128
|
+
_alignCenter,
|
32129
|
+
_overflow
|
31534
32130
|
};
|
31535
32131
|
};
|
31536
32132
|
|
@@ -31565,6 +32161,9 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
31565
32161
|
rendered,
|
31566
32162
|
transitionConfig,
|
31567
32163
|
zIndex,
|
32164
|
+
_draggable,
|
32165
|
+
_alignCenter,
|
32166
|
+
_overflow,
|
31568
32167
|
handleClose,
|
31569
32168
|
onModalClick,
|
31570
32169
|
onOpenAutoFocus,
|
@@ -31581,7 +32180,6 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
31581
32180
|
style
|
31582
32181
|
});
|
31583
32182
|
const overlayEvent = useSameTarget(onModalClick);
|
31584
|
-
const draggable = computed(() => props.draggable && !props.fullscreen);
|
31585
32183
|
const penetrable = computed(() => props.modalPenetrable && !props.modal && !props.fullscreen);
|
31586
32184
|
const resetPosition = () => {
|
31587
32185
|
var _a;
|
@@ -31642,10 +32240,10 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
31642
32240
|
ref: dialogContentRef
|
31643
32241
|
}, _ctx.$attrs, {
|
31644
32242
|
center: _ctx.center,
|
31645
|
-
"align-center":
|
32243
|
+
"align-center": unref(_alignCenter),
|
31646
32244
|
"close-icon": _ctx.closeIcon,
|
31647
|
-
draggable: unref(
|
31648
|
-
overflow:
|
32245
|
+
draggable: unref(_draggable),
|
32246
|
+
overflow: unref(_overflow),
|
31649
32247
|
fullscreen: _ctx.fullscreen,
|
31650
32248
|
"header-class": _ctx.headerClass,
|
31651
32249
|
"body-class": _ctx.bodyClass,
|
@@ -33807,7 +34405,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
33807
34405
|
return;
|
33808
34406
|
await nextTick();
|
33809
34407
|
const { scrollContainer } = props;
|
33810
|
-
if (isElement$
|
34408
|
+
if (isElement$2(scrollContainer)) {
|
33811
34409
|
_scrollContainer.value = scrollContainer;
|
33812
34410
|
} else if (isString$1(scrollContainer) && scrollContainer !== "") {
|
33813
34411
|
_scrollContainer.value = (_a = document.querySelector(scrollContainer)) != null ? _a : void 0;
|
@@ -41081,7 +41679,7 @@ const FixedSizeGrid = createGrid$1({
|
|
41081
41679
|
});
|
41082
41680
|
var FixedSizeGrid$1 = FixedSizeGrid;
|
41083
41681
|
|
41084
|
-
const { max, min, floor } = Math;
|
41682
|
+
const { max: max$2, min: min$2, floor } = Math;
|
41085
41683
|
const ACCESS_SIZER_KEY_MAP = {
|
41086
41684
|
column: "columnWidth",
|
41087
41685
|
row: "rowHeight"
|
@@ -41126,7 +41724,7 @@ const bs = (props, gridCache, low, high, offset, type) => {
|
|
41126
41724
|
high = mid - 1;
|
41127
41725
|
}
|
41128
41726
|
}
|
41129
|
-
return max(0, low - 1);
|
41727
|
+
return max$2(0, low - 1);
|
41130
41728
|
};
|
41131
41729
|
const es = (props, gridCache, idx, offset, type) => {
|
41132
41730
|
const total = type === "column" ? props.totalColumn : props.totalRow;
|
@@ -41135,7 +41733,7 @@ const es = (props, gridCache, idx, offset, type) => {
|
|
41135
41733
|
idx += exponent;
|
41136
41734
|
exponent *= 2;
|
41137
41735
|
}
|
41138
|
-
return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type);
|
41736
|
+
return bs(props, gridCache, floor(idx / 2), min$2(idx, total - 1), offset, type);
|
41139
41737
|
};
|
41140
41738
|
const findItem = (props, gridCache, offset, type) => {
|
41141
41739
|
const [cache, lastVisitedIndex] = [
|
@@ -41146,7 +41744,7 @@ const findItem = (props, gridCache, offset, type) => {
|
|
41146
41744
|
if (lastVisitedItemOffset >= offset) {
|
41147
41745
|
return bs(props, gridCache, 0, lastVisitedIndex, offset, type);
|
41148
41746
|
}
|
41149
|
-
return es(props, gridCache, max(0, lastVisitedIndex), offset, type);
|
41747
|
+
return es(props, gridCache, max$2(0, lastVisitedIndex), offset, type);
|
41150
41748
|
};
|
41151
41749
|
const getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => {
|
41152
41750
|
let sizeOfVisitedRows = 0;
|
@@ -41185,8 +41783,8 @@ const getOffset$1 = (props, index, alignment, scrollOffset, cache, type, scrollB
|
|
41185
41783
|
];
|
41186
41784
|
const item = getItemFromCache(props, index, cache, type);
|
41187
41785
|
const estimatedSize = estimatedSizeAssociates(props, cache);
|
41188
|
-
const maxOffset = max(0, min(estimatedSize - size, item.offset));
|
41189
|
-
const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);
|
41786
|
+
const maxOffset = max$2(0, min$2(estimatedSize - size, item.offset));
|
41787
|
+
const minOffset = max$2(0, item.offset - size + scrollBarWidth + item.size);
|
41190
41788
|
if (alignment === SMART_ALIGNMENT) {
|
41191
41789
|
if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
|
41192
41790
|
alignment = AUTO_ALIGNMENT;
|
@@ -47138,7 +47736,7 @@ function useEvent(props, emit) {
|
|
47138
47736
|
if (column.children && column.children.length > 0)
|
47139
47737
|
return;
|
47140
47738
|
const el = event.target;
|
47141
|
-
if (!isElement$
|
47739
|
+
if (!isElement$2(el)) {
|
47142
47740
|
return;
|
47143
47741
|
}
|
47144
47742
|
const target = el == null ? void 0 : el.closest("th");
|
@@ -53263,6 +53861,1297 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
53263
53861
|
});
|
53264
53862
|
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "arrow.vue"]]);
|
53265
53863
|
|
53864
|
+
function getSide(placement) {
|
53865
|
+
return placement.split('-')[0];
|
53866
|
+
}
|
53867
|
+
|
53868
|
+
function getAlignment(placement) {
|
53869
|
+
return placement.split('-')[1];
|
53870
|
+
}
|
53871
|
+
|
53872
|
+
function getMainAxisFromPlacement(placement) {
|
53873
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
53874
|
+
}
|
53875
|
+
|
53876
|
+
function getLengthFromAxis(axis) {
|
53877
|
+
return axis === 'y' ? 'height' : 'width';
|
53878
|
+
}
|
53879
|
+
|
53880
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
53881
|
+
let {
|
53882
|
+
reference,
|
53883
|
+
floating
|
53884
|
+
} = _ref;
|
53885
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
53886
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
53887
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
53888
|
+
const length = getLengthFromAxis(mainAxis);
|
53889
|
+
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
53890
|
+
const side = getSide(placement);
|
53891
|
+
const isVertical = mainAxis === 'x';
|
53892
|
+
let coords;
|
53893
|
+
|
53894
|
+
switch (side) {
|
53895
|
+
case 'top':
|
53896
|
+
coords = {
|
53897
|
+
x: commonX,
|
53898
|
+
y: reference.y - floating.height
|
53899
|
+
};
|
53900
|
+
break;
|
53901
|
+
|
53902
|
+
case 'bottom':
|
53903
|
+
coords = {
|
53904
|
+
x: commonX,
|
53905
|
+
y: reference.y + reference.height
|
53906
|
+
};
|
53907
|
+
break;
|
53908
|
+
|
53909
|
+
case 'right':
|
53910
|
+
coords = {
|
53911
|
+
x: reference.x + reference.width,
|
53912
|
+
y: commonY
|
53913
|
+
};
|
53914
|
+
break;
|
53915
|
+
|
53916
|
+
case 'left':
|
53917
|
+
coords = {
|
53918
|
+
x: reference.x - floating.width,
|
53919
|
+
y: commonY
|
53920
|
+
};
|
53921
|
+
break;
|
53922
|
+
|
53923
|
+
default:
|
53924
|
+
coords = {
|
53925
|
+
x: reference.x,
|
53926
|
+
y: reference.y
|
53927
|
+
};
|
53928
|
+
}
|
53929
|
+
|
53930
|
+
switch (getAlignment(placement)) {
|
53931
|
+
case 'start':
|
53932
|
+
coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
53933
|
+
break;
|
53934
|
+
|
53935
|
+
case 'end':
|
53936
|
+
coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
53937
|
+
break;
|
53938
|
+
}
|
53939
|
+
|
53940
|
+
return coords;
|
53941
|
+
}
|
53942
|
+
|
53943
|
+
/**
|
53944
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
53945
|
+
* next to a reference element when it is given a certain positioning strategy.
|
53946
|
+
*
|
53947
|
+
* This export does not have any `platform` interface logic. You will need to
|
53948
|
+
* write one for the platform you are using Floating UI with.
|
53949
|
+
*/
|
53950
|
+
|
53951
|
+
const computePosition$1 = async (reference, floating, config) => {
|
53952
|
+
const {
|
53953
|
+
placement = 'bottom',
|
53954
|
+
strategy = 'absolute',
|
53955
|
+
middleware = [],
|
53956
|
+
platform
|
53957
|
+
} = config;
|
53958
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
53959
|
+
|
53960
|
+
let rects = await platform.getElementRects({
|
53961
|
+
reference,
|
53962
|
+
floating,
|
53963
|
+
strategy
|
53964
|
+
});
|
53965
|
+
let {
|
53966
|
+
x,
|
53967
|
+
y
|
53968
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
53969
|
+
let statefulPlacement = placement;
|
53970
|
+
let middlewareData = {};
|
53971
|
+
let resetCount = 0;
|
53972
|
+
|
53973
|
+
for (let i = 0; i < middleware.length; i++) {
|
53974
|
+
const {
|
53975
|
+
name,
|
53976
|
+
fn
|
53977
|
+
} = middleware[i];
|
53978
|
+
const {
|
53979
|
+
x: nextX,
|
53980
|
+
y: nextY,
|
53981
|
+
data,
|
53982
|
+
reset
|
53983
|
+
} = await fn({
|
53984
|
+
x,
|
53985
|
+
y,
|
53986
|
+
initialPlacement: placement,
|
53987
|
+
placement: statefulPlacement,
|
53988
|
+
strategy,
|
53989
|
+
middlewareData,
|
53990
|
+
rects,
|
53991
|
+
platform,
|
53992
|
+
elements: {
|
53993
|
+
reference,
|
53994
|
+
floating
|
53995
|
+
}
|
53996
|
+
});
|
53997
|
+
x = nextX != null ? nextX : x;
|
53998
|
+
y = nextY != null ? nextY : y;
|
53999
|
+
middlewareData = { ...middlewareData,
|
54000
|
+
[name]: { ...middlewareData[name],
|
54001
|
+
...data
|
54002
|
+
}
|
54003
|
+
};
|
54004
|
+
|
54005
|
+
if (reset && resetCount <= 50) {
|
54006
|
+
resetCount++;
|
54007
|
+
|
54008
|
+
if (typeof reset === 'object') {
|
54009
|
+
if (reset.placement) {
|
54010
|
+
statefulPlacement = reset.placement;
|
54011
|
+
}
|
54012
|
+
|
54013
|
+
if (reset.rects) {
|
54014
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
54015
|
+
reference,
|
54016
|
+
floating,
|
54017
|
+
strategy
|
54018
|
+
}) : reset.rects;
|
54019
|
+
}
|
54020
|
+
|
54021
|
+
({
|
54022
|
+
x,
|
54023
|
+
y
|
54024
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
54025
|
+
}
|
54026
|
+
|
54027
|
+
i = -1;
|
54028
|
+
continue;
|
54029
|
+
}
|
54030
|
+
}
|
54031
|
+
|
54032
|
+
return {
|
54033
|
+
x,
|
54034
|
+
y,
|
54035
|
+
placement: statefulPlacement,
|
54036
|
+
strategy,
|
54037
|
+
middlewareData
|
54038
|
+
};
|
54039
|
+
};
|
54040
|
+
|
54041
|
+
function expandPaddingObject(padding) {
|
54042
|
+
return {
|
54043
|
+
top: 0,
|
54044
|
+
right: 0,
|
54045
|
+
bottom: 0,
|
54046
|
+
left: 0,
|
54047
|
+
...padding
|
54048
|
+
};
|
54049
|
+
}
|
54050
|
+
|
54051
|
+
function getSideObjectFromPadding(padding) {
|
54052
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
54053
|
+
top: padding,
|
54054
|
+
right: padding,
|
54055
|
+
bottom: padding,
|
54056
|
+
left: padding
|
54057
|
+
};
|
54058
|
+
}
|
54059
|
+
|
54060
|
+
function rectToClientRect(rect) {
|
54061
|
+
return { ...rect,
|
54062
|
+
top: rect.y,
|
54063
|
+
left: rect.x,
|
54064
|
+
right: rect.x + rect.width,
|
54065
|
+
bottom: rect.y + rect.height
|
54066
|
+
};
|
54067
|
+
}
|
54068
|
+
|
54069
|
+
/**
|
54070
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
54071
|
+
* element is overflowing a given clipping boundary.
|
54072
|
+
* - positive = overflowing the boundary by that number of pixels
|
54073
|
+
* - negative = how many pixels left before it will overflow
|
54074
|
+
* - 0 = lies flush with the boundary
|
54075
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
54076
|
+
*/
|
54077
|
+
async function detectOverflow(middlewareArguments, options) {
|
54078
|
+
var _await$platform$isEle;
|
54079
|
+
|
54080
|
+
if (options === void 0) {
|
54081
|
+
options = {};
|
54082
|
+
}
|
54083
|
+
|
54084
|
+
const {
|
54085
|
+
x,
|
54086
|
+
y,
|
54087
|
+
platform,
|
54088
|
+
rects,
|
54089
|
+
elements,
|
54090
|
+
strategy
|
54091
|
+
} = middlewareArguments;
|
54092
|
+
const {
|
54093
|
+
boundary = 'clippingAncestors',
|
54094
|
+
rootBoundary = 'viewport',
|
54095
|
+
elementContext = 'floating',
|
54096
|
+
altBoundary = false,
|
54097
|
+
padding = 0
|
54098
|
+
} = options;
|
54099
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
54100
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
54101
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
54102
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
54103
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
54104
|
+
boundary,
|
54105
|
+
rootBoundary,
|
54106
|
+
strategy
|
54107
|
+
}));
|
54108
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
54109
|
+
rect: elementContext === 'floating' ? { ...rects.floating,
|
54110
|
+
x,
|
54111
|
+
y
|
54112
|
+
} : rects.reference,
|
54113
|
+
offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
|
54114
|
+
strategy
|
54115
|
+
}) : rects[elementContext]);
|
54116
|
+
return {
|
54117
|
+
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
54118
|
+
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
54119
|
+
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
54120
|
+
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
54121
|
+
};
|
54122
|
+
}
|
54123
|
+
|
54124
|
+
const min$1 = Math.min;
|
54125
|
+
const max$1 = Math.max;
|
54126
|
+
|
54127
|
+
function within(min$1$1, value, max$1$1) {
|
54128
|
+
return max$1(min$1$1, min$1(value, max$1$1));
|
54129
|
+
}
|
54130
|
+
|
54131
|
+
/**
|
54132
|
+
* Positions an inner element of the floating element such that it is centered
|
54133
|
+
* to the reference element.
|
54134
|
+
* @see https://floating-ui.com/docs/arrow
|
54135
|
+
*/
|
54136
|
+
const arrow = options => ({
|
54137
|
+
name: 'arrow',
|
54138
|
+
options,
|
54139
|
+
|
54140
|
+
async fn(middlewareArguments) {
|
54141
|
+
// Since `element` is required, we don't Partial<> the type
|
54142
|
+
const {
|
54143
|
+
element,
|
54144
|
+
padding = 0
|
54145
|
+
} = options != null ? options : {};
|
54146
|
+
const {
|
54147
|
+
x,
|
54148
|
+
y,
|
54149
|
+
placement,
|
54150
|
+
rects,
|
54151
|
+
platform
|
54152
|
+
} = middlewareArguments;
|
54153
|
+
|
54154
|
+
if (element == null) {
|
54155
|
+
|
54156
|
+
return {};
|
54157
|
+
}
|
54158
|
+
|
54159
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
54160
|
+
const coords = {
|
54161
|
+
x,
|
54162
|
+
y
|
54163
|
+
};
|
54164
|
+
const axis = getMainAxisFromPlacement(placement);
|
54165
|
+
const alignment = getAlignment(placement);
|
54166
|
+
const length = getLengthFromAxis(axis);
|
54167
|
+
const arrowDimensions = await platform.getDimensions(element);
|
54168
|
+
const minProp = axis === 'y' ? 'top' : 'left';
|
54169
|
+
const maxProp = axis === 'y' ? 'bottom' : 'right';
|
54170
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
54171
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
54172
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
54173
|
+
let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
54174
|
+
|
54175
|
+
if (clientSize === 0) {
|
54176
|
+
clientSize = rects.floating[length];
|
54177
|
+
}
|
54178
|
+
|
54179
|
+
const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center
|
54180
|
+
// point is outside the floating element's bounds
|
54181
|
+
|
54182
|
+
const min = paddingObject[minProp];
|
54183
|
+
const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
54184
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
54185
|
+
const offset = within(min, center, max); // Make sure that arrow points at the reference
|
54186
|
+
|
54187
|
+
const alignmentPadding = alignment === 'start' ? paddingObject[minProp] : paddingObject[maxProp];
|
54188
|
+
const shouldAddOffset = alignmentPadding > 0 && center !== offset && rects.reference[length] <= rects.floating[length];
|
54189
|
+
const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
|
54190
|
+
return {
|
54191
|
+
[axis]: coords[axis] - alignmentOffset,
|
54192
|
+
data: {
|
54193
|
+
[axis]: offset,
|
54194
|
+
centerOffset: center - offset
|
54195
|
+
}
|
54196
|
+
};
|
54197
|
+
}
|
54198
|
+
|
54199
|
+
});
|
54200
|
+
|
54201
|
+
const hash$1 = {
|
54202
|
+
left: 'right',
|
54203
|
+
right: 'left',
|
54204
|
+
bottom: 'top',
|
54205
|
+
top: 'bottom'
|
54206
|
+
};
|
54207
|
+
function getOppositePlacement(placement) {
|
54208
|
+
return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
|
54209
|
+
}
|
54210
|
+
|
54211
|
+
function getAlignmentSides(placement, rects, rtl) {
|
54212
|
+
if (rtl === void 0) {
|
54213
|
+
rtl = false;
|
54214
|
+
}
|
54215
|
+
|
54216
|
+
const alignment = getAlignment(placement);
|
54217
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
54218
|
+
const length = getLengthFromAxis(mainAxis);
|
54219
|
+
let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
54220
|
+
|
54221
|
+
if (rects.reference[length] > rects.floating[length]) {
|
54222
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
54223
|
+
}
|
54224
|
+
|
54225
|
+
return {
|
54226
|
+
main: mainAlignmentSide,
|
54227
|
+
cross: getOppositePlacement(mainAlignmentSide)
|
54228
|
+
};
|
54229
|
+
}
|
54230
|
+
|
54231
|
+
const hash = {
|
54232
|
+
start: 'end',
|
54233
|
+
end: 'start'
|
54234
|
+
};
|
54235
|
+
function getOppositeAlignmentPlacement(placement) {
|
54236
|
+
return placement.replace(/start|end/g, matched => hash[matched]);
|
54237
|
+
}
|
54238
|
+
|
54239
|
+
function getExpandedPlacements(placement) {
|
54240
|
+
const oppositePlacement = getOppositePlacement(placement);
|
54241
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
54242
|
+
}
|
54243
|
+
|
54244
|
+
/**
|
54245
|
+
* Changes the placement of the floating element to one that will fit if the
|
54246
|
+
* initially specified `placement` does not.
|
54247
|
+
* @see https://floating-ui.com/docs/flip
|
54248
|
+
*/
|
54249
|
+
const flip = function (options) {
|
54250
|
+
if (options === void 0) {
|
54251
|
+
options = {};
|
54252
|
+
}
|
54253
|
+
|
54254
|
+
return {
|
54255
|
+
name: 'flip',
|
54256
|
+
options,
|
54257
|
+
|
54258
|
+
async fn(middlewareArguments) {
|
54259
|
+
var _middlewareData$flip;
|
54260
|
+
|
54261
|
+
const {
|
54262
|
+
placement,
|
54263
|
+
middlewareData,
|
54264
|
+
rects,
|
54265
|
+
initialPlacement,
|
54266
|
+
platform,
|
54267
|
+
elements
|
54268
|
+
} = middlewareArguments;
|
54269
|
+
const {
|
54270
|
+
mainAxis: checkMainAxis = true,
|
54271
|
+
crossAxis: checkCrossAxis = true,
|
54272
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
54273
|
+
fallbackStrategy = 'bestFit',
|
54274
|
+
flipAlignment = true,
|
54275
|
+
...detectOverflowOptions
|
54276
|
+
} = options;
|
54277
|
+
const side = getSide(placement);
|
54278
|
+
const isBasePlacement = side === initialPlacement;
|
54279
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
54280
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
54281
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
54282
|
+
const overflows = [];
|
54283
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
54284
|
+
|
54285
|
+
if (checkMainAxis) {
|
54286
|
+
overflows.push(overflow[side]);
|
54287
|
+
}
|
54288
|
+
|
54289
|
+
if (checkCrossAxis) {
|
54290
|
+
const {
|
54291
|
+
main,
|
54292
|
+
cross
|
54293
|
+
} = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
54294
|
+
overflows.push(overflow[main], overflow[cross]);
|
54295
|
+
}
|
54296
|
+
|
54297
|
+
overflowsData = [...overflowsData, {
|
54298
|
+
placement,
|
54299
|
+
overflows
|
54300
|
+
}]; // One or more sides is overflowing
|
54301
|
+
|
54302
|
+
if (!overflows.every(side => side <= 0)) {
|
54303
|
+
var _middlewareData$flip$, _middlewareData$flip2;
|
54304
|
+
|
54305
|
+
const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
|
54306
|
+
const nextPlacement = placements[nextIndex];
|
54307
|
+
|
54308
|
+
if (nextPlacement) {
|
54309
|
+
// Try next placement and re-run the lifecycle
|
54310
|
+
return {
|
54311
|
+
data: {
|
54312
|
+
index: nextIndex,
|
54313
|
+
overflows: overflowsData
|
54314
|
+
},
|
54315
|
+
reset: {
|
54316
|
+
placement: nextPlacement
|
54317
|
+
}
|
54318
|
+
};
|
54319
|
+
}
|
54320
|
+
|
54321
|
+
let resetPlacement = 'bottom';
|
54322
|
+
|
54323
|
+
switch (fallbackStrategy) {
|
54324
|
+
case 'bestFit':
|
54325
|
+
{
|
54326
|
+
var _overflowsData$map$so;
|
54327
|
+
|
54328
|
+
const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement;
|
54329
|
+
|
54330
|
+
if (placement) {
|
54331
|
+
resetPlacement = placement;
|
54332
|
+
}
|
54333
|
+
|
54334
|
+
break;
|
54335
|
+
}
|
54336
|
+
|
54337
|
+
case 'initialPlacement':
|
54338
|
+
resetPlacement = initialPlacement;
|
54339
|
+
break;
|
54340
|
+
}
|
54341
|
+
|
54342
|
+
if (placement !== resetPlacement) {
|
54343
|
+
return {
|
54344
|
+
reset: {
|
54345
|
+
placement: resetPlacement
|
54346
|
+
}
|
54347
|
+
};
|
54348
|
+
}
|
54349
|
+
}
|
54350
|
+
|
54351
|
+
return {};
|
54352
|
+
}
|
54353
|
+
|
54354
|
+
};
|
54355
|
+
};
|
54356
|
+
|
54357
|
+
async function convertValueToCoords(middlewareArguments, value) {
|
54358
|
+
const {
|
54359
|
+
placement,
|
54360
|
+
platform,
|
54361
|
+
elements
|
54362
|
+
} = middlewareArguments;
|
54363
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
54364
|
+
const side = getSide(placement);
|
54365
|
+
const alignment = getAlignment(placement);
|
54366
|
+
const isVertical = getMainAxisFromPlacement(placement) === 'x';
|
54367
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
54368
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
54369
|
+
const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const
|
54370
|
+
|
54371
|
+
let {
|
54372
|
+
mainAxis,
|
54373
|
+
crossAxis,
|
54374
|
+
alignmentAxis
|
54375
|
+
} = typeof rawValue === 'number' ? {
|
54376
|
+
mainAxis: rawValue,
|
54377
|
+
crossAxis: 0,
|
54378
|
+
alignmentAxis: null
|
54379
|
+
} : {
|
54380
|
+
mainAxis: 0,
|
54381
|
+
crossAxis: 0,
|
54382
|
+
alignmentAxis: null,
|
54383
|
+
...rawValue
|
54384
|
+
};
|
54385
|
+
|
54386
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
54387
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
54388
|
+
}
|
54389
|
+
|
54390
|
+
return isVertical ? {
|
54391
|
+
x: crossAxis * crossAxisMulti,
|
54392
|
+
y: mainAxis * mainAxisMulti
|
54393
|
+
} : {
|
54394
|
+
x: mainAxis * mainAxisMulti,
|
54395
|
+
y: crossAxis * crossAxisMulti
|
54396
|
+
};
|
54397
|
+
}
|
54398
|
+
/**
|
54399
|
+
* Displaces the floating element from its reference element.
|
54400
|
+
* @see https://floating-ui.com/docs/offset
|
54401
|
+
*/
|
54402
|
+
|
54403
|
+
const offset = function (value) {
|
54404
|
+
if (value === void 0) {
|
54405
|
+
value = 0;
|
54406
|
+
}
|
54407
|
+
|
54408
|
+
return {
|
54409
|
+
name: 'offset',
|
54410
|
+
options: value,
|
54411
|
+
|
54412
|
+
async fn(middlewareArguments) {
|
54413
|
+
const {
|
54414
|
+
x,
|
54415
|
+
y
|
54416
|
+
} = middlewareArguments;
|
54417
|
+
const diffCoords = await convertValueToCoords(middlewareArguments, value);
|
54418
|
+
return {
|
54419
|
+
x: x + diffCoords.x,
|
54420
|
+
y: y + diffCoords.y,
|
54421
|
+
data: diffCoords
|
54422
|
+
};
|
54423
|
+
}
|
54424
|
+
|
54425
|
+
};
|
54426
|
+
};
|
54427
|
+
|
54428
|
+
function getCrossAxis(axis) {
|
54429
|
+
return axis === 'x' ? 'y' : 'x';
|
54430
|
+
}
|
54431
|
+
|
54432
|
+
/**
|
54433
|
+
* Shifts the floating element in order to keep it in view when it will overflow
|
54434
|
+
* a clipping boundary.
|
54435
|
+
* @see https://floating-ui.com/docs/shift
|
54436
|
+
*/
|
54437
|
+
const shift = function (options) {
|
54438
|
+
if (options === void 0) {
|
54439
|
+
options = {};
|
54440
|
+
}
|
54441
|
+
|
54442
|
+
return {
|
54443
|
+
name: 'shift',
|
54444
|
+
options,
|
54445
|
+
|
54446
|
+
async fn(middlewareArguments) {
|
54447
|
+
const {
|
54448
|
+
x,
|
54449
|
+
y,
|
54450
|
+
placement
|
54451
|
+
} = middlewareArguments;
|
54452
|
+
const {
|
54453
|
+
mainAxis: checkMainAxis = true,
|
54454
|
+
crossAxis: checkCrossAxis = false,
|
54455
|
+
limiter = {
|
54456
|
+
fn: _ref => {
|
54457
|
+
let {
|
54458
|
+
x,
|
54459
|
+
y
|
54460
|
+
} = _ref;
|
54461
|
+
return {
|
54462
|
+
x,
|
54463
|
+
y
|
54464
|
+
};
|
54465
|
+
}
|
54466
|
+
},
|
54467
|
+
...detectOverflowOptions
|
54468
|
+
} = options;
|
54469
|
+
const coords = {
|
54470
|
+
x,
|
54471
|
+
y
|
54472
|
+
};
|
54473
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
54474
|
+
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
54475
|
+
const crossAxis = getCrossAxis(mainAxis);
|
54476
|
+
let mainAxisCoord = coords[mainAxis];
|
54477
|
+
let crossAxisCoord = coords[crossAxis];
|
54478
|
+
|
54479
|
+
if (checkMainAxis) {
|
54480
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
54481
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
54482
|
+
const min = mainAxisCoord + overflow[minSide];
|
54483
|
+
const max = mainAxisCoord - overflow[maxSide];
|
54484
|
+
mainAxisCoord = within(min, mainAxisCoord, max);
|
54485
|
+
}
|
54486
|
+
|
54487
|
+
if (checkCrossAxis) {
|
54488
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
54489
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
54490
|
+
const min = crossAxisCoord + overflow[minSide];
|
54491
|
+
const max = crossAxisCoord - overflow[maxSide];
|
54492
|
+
crossAxisCoord = within(min, crossAxisCoord, max);
|
54493
|
+
}
|
54494
|
+
|
54495
|
+
const limitedCoords = limiter.fn({ ...middlewareArguments,
|
54496
|
+
[mainAxis]: mainAxisCoord,
|
54497
|
+
[crossAxis]: crossAxisCoord
|
54498
|
+
});
|
54499
|
+
return { ...limitedCoords,
|
54500
|
+
data: {
|
54501
|
+
x: limitedCoords.x - x,
|
54502
|
+
y: limitedCoords.y - y
|
54503
|
+
}
|
54504
|
+
};
|
54505
|
+
}
|
54506
|
+
|
54507
|
+
};
|
54508
|
+
};
|
54509
|
+
|
54510
|
+
function isWindow(value) {
|
54511
|
+
return value && value.document && value.location && value.alert && value.setInterval;
|
54512
|
+
}
|
54513
|
+
function getWindow(node) {
|
54514
|
+
if (node == null) {
|
54515
|
+
return window;
|
54516
|
+
}
|
54517
|
+
|
54518
|
+
if (!isWindow(node)) {
|
54519
|
+
const ownerDocument = node.ownerDocument;
|
54520
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
54521
|
+
}
|
54522
|
+
|
54523
|
+
return node;
|
54524
|
+
}
|
54525
|
+
|
54526
|
+
function getComputedStyle$1(element) {
|
54527
|
+
return getWindow(element).getComputedStyle(element);
|
54528
|
+
}
|
54529
|
+
|
54530
|
+
function getNodeName(node) {
|
54531
|
+
return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
|
54532
|
+
}
|
54533
|
+
|
54534
|
+
function getUAString() {
|
54535
|
+
const uaData = navigator.userAgentData;
|
54536
|
+
|
54537
|
+
if (uaData != null && uaData.brands) {
|
54538
|
+
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
54539
|
+
}
|
54540
|
+
|
54541
|
+
return navigator.userAgent;
|
54542
|
+
}
|
54543
|
+
|
54544
|
+
function isHTMLElement(value) {
|
54545
|
+
return value instanceof getWindow(value).HTMLElement;
|
54546
|
+
}
|
54547
|
+
function isElement(value) {
|
54548
|
+
return value instanceof getWindow(value).Element;
|
54549
|
+
}
|
54550
|
+
function isNode(value) {
|
54551
|
+
return value instanceof getWindow(value).Node;
|
54552
|
+
}
|
54553
|
+
function isShadowRoot(node) {
|
54554
|
+
// Browsers without `ShadowRoot` support
|
54555
|
+
if (typeof ShadowRoot === 'undefined') {
|
54556
|
+
return false;
|
54557
|
+
}
|
54558
|
+
|
54559
|
+
const OwnElement = getWindow(node).ShadowRoot;
|
54560
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
54561
|
+
}
|
54562
|
+
function isOverflowElement(element) {
|
54563
|
+
// Firefox wants us to check `-x` and `-y` variations as well
|
54564
|
+
const {
|
54565
|
+
overflow,
|
54566
|
+
overflowX,
|
54567
|
+
overflowY
|
54568
|
+
} = getComputedStyle$1(element);
|
54569
|
+
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
54570
|
+
}
|
54571
|
+
function isTableElement(element) {
|
54572
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
54573
|
+
}
|
54574
|
+
function isContainingBlock(element) {
|
54575
|
+
// TODO: Try and use feature detection here instead
|
54576
|
+
const isFirefox = /firefox/i.test(getUAString());
|
54577
|
+
const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that
|
54578
|
+
// create a containing block.
|
54579
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
54580
|
+
|
54581
|
+
return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
|
54582
|
+
css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
|
54583
|
+
}
|
54584
|
+
function isLayoutViewport() {
|
54585
|
+
// Not Safari
|
54586
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
|
54587
|
+
// • Always-visible scrollbar or not
|
54588
|
+
// • Width of <html>, etc.
|
54589
|
+
// const vV = win.visualViewport;
|
54590
|
+
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
54591
|
+
}
|
54592
|
+
|
54593
|
+
const min = Math.min;
|
54594
|
+
const max = Math.max;
|
54595
|
+
const round = Math.round;
|
54596
|
+
|
54597
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
54598
|
+
var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
|
54599
|
+
|
54600
|
+
if (includeScale === void 0) {
|
54601
|
+
includeScale = false;
|
54602
|
+
}
|
54603
|
+
|
54604
|
+
if (isFixedStrategy === void 0) {
|
54605
|
+
isFixedStrategy = false;
|
54606
|
+
}
|
54607
|
+
|
54608
|
+
const clientRect = element.getBoundingClientRect();
|
54609
|
+
let scaleX = 1;
|
54610
|
+
let scaleY = 1;
|
54611
|
+
|
54612
|
+
if (includeScale && isHTMLElement(element)) {
|
54613
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
54614
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
54615
|
+
}
|
54616
|
+
|
54617
|
+
const win = isElement(element) ? getWindow(element) : window;
|
54618
|
+
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
54619
|
+
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
|
54620
|
+
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
|
54621
|
+
const width = clientRect.width / scaleX;
|
54622
|
+
const height = clientRect.height / scaleY;
|
54623
|
+
return {
|
54624
|
+
width,
|
54625
|
+
height,
|
54626
|
+
top: y,
|
54627
|
+
right: x + width,
|
54628
|
+
bottom: y + height,
|
54629
|
+
left: x,
|
54630
|
+
x,
|
54631
|
+
y
|
54632
|
+
};
|
54633
|
+
}
|
54634
|
+
|
54635
|
+
function getDocumentElement(node) {
|
54636
|
+
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
54637
|
+
}
|
54638
|
+
|
54639
|
+
function getNodeScroll(element) {
|
54640
|
+
if (isElement(element)) {
|
54641
|
+
return {
|
54642
|
+
scrollLeft: element.scrollLeft,
|
54643
|
+
scrollTop: element.scrollTop
|
54644
|
+
};
|
54645
|
+
}
|
54646
|
+
|
54647
|
+
return {
|
54648
|
+
scrollLeft: element.pageXOffset,
|
54649
|
+
scrollTop: element.pageYOffset
|
54650
|
+
};
|
54651
|
+
}
|
54652
|
+
|
54653
|
+
function getWindowScrollBarX(element) {
|
54654
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
54655
|
+
// incorrect for RTL.
|
54656
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
54657
|
+
}
|
54658
|
+
|
54659
|
+
function isScaled(element) {
|
54660
|
+
const rect = getBoundingClientRect(element);
|
54661
|
+
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
54662
|
+
}
|
54663
|
+
|
54664
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
54665
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
54666
|
+
const documentElement = getDocumentElement(offsetParent);
|
54667
|
+
const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
|
54668
|
+
isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
|
54669
|
+
let scroll = {
|
54670
|
+
scrollLeft: 0,
|
54671
|
+
scrollTop: 0
|
54672
|
+
};
|
54673
|
+
const offsets = {
|
54674
|
+
x: 0,
|
54675
|
+
y: 0
|
54676
|
+
};
|
54677
|
+
|
54678
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
54679
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
54680
|
+
scroll = getNodeScroll(offsetParent);
|
54681
|
+
}
|
54682
|
+
|
54683
|
+
if (isHTMLElement(offsetParent)) {
|
54684
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
54685
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
54686
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
54687
|
+
} else if (documentElement) {
|
54688
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
54689
|
+
}
|
54690
|
+
}
|
54691
|
+
|
54692
|
+
return {
|
54693
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
54694
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
54695
|
+
width: rect.width,
|
54696
|
+
height: rect.height
|
54697
|
+
};
|
54698
|
+
}
|
54699
|
+
|
54700
|
+
function getParentNode(node) {
|
54701
|
+
if (getNodeName(node) === 'html') {
|
54702
|
+
return node;
|
54703
|
+
}
|
54704
|
+
|
54705
|
+
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
54706
|
+
// @ts-ignore
|
54707
|
+
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
54708
|
+
node.parentNode || ( // DOM Element detected
|
54709
|
+
isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
54710
|
+
getDocumentElement(node) // fallback
|
54711
|
+
|
54712
|
+
);
|
54713
|
+
}
|
54714
|
+
|
54715
|
+
function getTrueOffsetParent(element) {
|
54716
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
54717
|
+
return null;
|
54718
|
+
}
|
54719
|
+
|
54720
|
+
return composedOffsetParent(element);
|
54721
|
+
}
|
54722
|
+
/**
|
54723
|
+
* Polyfills the old offsetParent behavior from before the spec was changed:
|
54724
|
+
* https://github.com/w3c/csswg-drafts/issues/159
|
54725
|
+
*/
|
54726
|
+
|
54727
|
+
|
54728
|
+
function composedOffsetParent(element) {
|
54729
|
+
let {
|
54730
|
+
offsetParent
|
54731
|
+
} = element;
|
54732
|
+
let ancestor = element;
|
54733
|
+
let foundInsideSlot = false;
|
54734
|
+
|
54735
|
+
while (ancestor && ancestor !== offsetParent) {
|
54736
|
+
const {
|
54737
|
+
assignedSlot
|
54738
|
+
} = ancestor;
|
54739
|
+
|
54740
|
+
if (assignedSlot) {
|
54741
|
+
let newOffsetParent = assignedSlot.offsetParent;
|
54742
|
+
|
54743
|
+
if (getComputedStyle$1(assignedSlot).display === 'contents') {
|
54744
|
+
const hadStyleAttribute = assignedSlot.hasAttribute('style');
|
54745
|
+
const oldDisplay = assignedSlot.style.display;
|
54746
|
+
assignedSlot.style.display = getComputedStyle$1(ancestor).display;
|
54747
|
+
newOffsetParent = assignedSlot.offsetParent;
|
54748
|
+
assignedSlot.style.display = oldDisplay;
|
54749
|
+
|
54750
|
+
if (!hadStyleAttribute) {
|
54751
|
+
assignedSlot.removeAttribute('style');
|
54752
|
+
}
|
54753
|
+
}
|
54754
|
+
|
54755
|
+
ancestor = assignedSlot;
|
54756
|
+
|
54757
|
+
if (offsetParent !== newOffsetParent) {
|
54758
|
+
offsetParent = newOffsetParent;
|
54759
|
+
foundInsideSlot = true;
|
54760
|
+
}
|
54761
|
+
} else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
|
54762
|
+
break;
|
54763
|
+
}
|
54764
|
+
|
54765
|
+
ancestor = isShadowRoot(ancestor) && ancestor.host || ancestor.parentNode;
|
54766
|
+
}
|
54767
|
+
|
54768
|
+
return offsetParent;
|
54769
|
+
}
|
54770
|
+
|
54771
|
+
function getContainingBlock(element) {
|
54772
|
+
let currentNode = getParentNode(element);
|
54773
|
+
|
54774
|
+
if (isShadowRoot(currentNode)) {
|
54775
|
+
currentNode = currentNode.host;
|
54776
|
+
}
|
54777
|
+
|
54778
|
+
while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
|
54779
|
+
if (isContainingBlock(currentNode)) {
|
54780
|
+
return currentNode;
|
54781
|
+
} else {
|
54782
|
+
const parent = currentNode.parentNode;
|
54783
|
+
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
54784
|
+
}
|
54785
|
+
}
|
54786
|
+
|
54787
|
+
return null;
|
54788
|
+
} // Gets the closest ancestor positioned element. Handles some edge cases,
|
54789
|
+
// such as table ancestors and cross browser bugs.
|
54790
|
+
|
54791
|
+
|
54792
|
+
function getOffsetParent(element) {
|
54793
|
+
const window = getWindow(element);
|
54794
|
+
let offsetParent = getTrueOffsetParent(element);
|
54795
|
+
|
54796
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
54797
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
54798
|
+
}
|
54799
|
+
|
54800
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
54801
|
+
return window;
|
54802
|
+
}
|
54803
|
+
|
54804
|
+
return offsetParent || getContainingBlock(element) || window;
|
54805
|
+
}
|
54806
|
+
|
54807
|
+
function getDimensions(element) {
|
54808
|
+
if (isHTMLElement(element)) {
|
54809
|
+
return {
|
54810
|
+
width: element.offsetWidth,
|
54811
|
+
height: element.offsetHeight
|
54812
|
+
};
|
54813
|
+
}
|
54814
|
+
|
54815
|
+
const rect = getBoundingClientRect(element);
|
54816
|
+
return {
|
54817
|
+
width: rect.width,
|
54818
|
+
height: rect.height
|
54819
|
+
};
|
54820
|
+
}
|
54821
|
+
|
54822
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
54823
|
+
let {
|
54824
|
+
rect,
|
54825
|
+
offsetParent,
|
54826
|
+
strategy
|
54827
|
+
} = _ref;
|
54828
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
54829
|
+
const documentElement = getDocumentElement(offsetParent);
|
54830
|
+
|
54831
|
+
if (offsetParent === documentElement) {
|
54832
|
+
return rect;
|
54833
|
+
}
|
54834
|
+
|
54835
|
+
let scroll = {
|
54836
|
+
scrollLeft: 0,
|
54837
|
+
scrollTop: 0
|
54838
|
+
};
|
54839
|
+
const offsets = {
|
54840
|
+
x: 0,
|
54841
|
+
y: 0
|
54842
|
+
};
|
54843
|
+
|
54844
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
54845
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
54846
|
+
scroll = getNodeScroll(offsetParent);
|
54847
|
+
}
|
54848
|
+
|
54849
|
+
if (isHTMLElement(offsetParent)) {
|
54850
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
54851
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
54852
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
54853
|
+
} // This doesn't appear to be need to be negated.
|
54854
|
+
// else if (documentElement) {
|
54855
|
+
// offsets.x = getWindowScrollBarX(documentElement);
|
54856
|
+
// }
|
54857
|
+
|
54858
|
+
}
|
54859
|
+
|
54860
|
+
return { ...rect,
|
54861
|
+
x: rect.x - scroll.scrollLeft + offsets.x,
|
54862
|
+
y: rect.y - scroll.scrollTop + offsets.y
|
54863
|
+
};
|
54864
|
+
}
|
54865
|
+
|
54866
|
+
function getViewportRect(element, strategy) {
|
54867
|
+
const win = getWindow(element);
|
54868
|
+
const html = getDocumentElement(element);
|
54869
|
+
const visualViewport = win.visualViewport;
|
54870
|
+
let width = html.clientWidth;
|
54871
|
+
let height = html.clientHeight;
|
54872
|
+
let x = 0;
|
54873
|
+
let y = 0;
|
54874
|
+
|
54875
|
+
if (visualViewport) {
|
54876
|
+
width = visualViewport.width;
|
54877
|
+
height = visualViewport.height;
|
54878
|
+
const layoutViewport = isLayoutViewport();
|
54879
|
+
|
54880
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
54881
|
+
x = visualViewport.offsetLeft;
|
54882
|
+
y = visualViewport.offsetTop;
|
54883
|
+
}
|
54884
|
+
}
|
54885
|
+
|
54886
|
+
return {
|
54887
|
+
width,
|
54888
|
+
height,
|
54889
|
+
x,
|
54890
|
+
y
|
54891
|
+
};
|
54892
|
+
}
|
54893
|
+
|
54894
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
54895
|
+
|
54896
|
+
function getDocumentRect(element) {
|
54897
|
+
var _element$ownerDocumen;
|
54898
|
+
|
54899
|
+
const html = getDocumentElement(element);
|
54900
|
+
const scroll = getNodeScroll(element);
|
54901
|
+
const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
54902
|
+
const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
54903
|
+
const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
54904
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
54905
|
+
const y = -scroll.scrollTop;
|
54906
|
+
|
54907
|
+
if (getComputedStyle$1(body || html).direction === 'rtl') {
|
54908
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
54909
|
+
}
|
54910
|
+
|
54911
|
+
return {
|
54912
|
+
width,
|
54913
|
+
height,
|
54914
|
+
x,
|
54915
|
+
y
|
54916
|
+
};
|
54917
|
+
}
|
54918
|
+
|
54919
|
+
function getNearestOverflowAncestor(node) {
|
54920
|
+
const parentNode = getParentNode(node);
|
54921
|
+
|
54922
|
+
if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
|
54923
|
+
// @ts-ignore assume body is always available
|
54924
|
+
return node.ownerDocument.body;
|
54925
|
+
}
|
54926
|
+
|
54927
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
54928
|
+
return parentNode;
|
54929
|
+
}
|
54930
|
+
|
54931
|
+
return getNearestOverflowAncestor(parentNode);
|
54932
|
+
}
|
54933
|
+
|
54934
|
+
function getOverflowAncestors(node, list) {
|
54935
|
+
var _node$ownerDocument;
|
54936
|
+
|
54937
|
+
if (list === void 0) {
|
54938
|
+
list = [];
|
54939
|
+
}
|
54940
|
+
|
54941
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
54942
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
54943
|
+
const win = getWindow(scrollableAncestor);
|
54944
|
+
const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
|
54945
|
+
const updatedList = list.concat(target);
|
54946
|
+
return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
|
54947
|
+
updatedList.concat(getOverflowAncestors(target));
|
54948
|
+
}
|
54949
|
+
|
54950
|
+
function contains(parent, child) {
|
54951
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
|
54952
|
+
|
54953
|
+
if (parent.contains(child)) {
|
54954
|
+
return true;
|
54955
|
+
} // then fallback to custom implementation with Shadow DOM support
|
54956
|
+
else if (rootNode && isShadowRoot(rootNode)) {
|
54957
|
+
let next = child;
|
54958
|
+
|
54959
|
+
do {
|
54960
|
+
// use `===` replace node.isSameNode()
|
54961
|
+
if (next && parent === next) {
|
54962
|
+
return true;
|
54963
|
+
} // @ts-ignore: need a better way to handle this...
|
54964
|
+
|
54965
|
+
|
54966
|
+
next = next.parentNode || next.host;
|
54967
|
+
} while (next);
|
54968
|
+
}
|
54969
|
+
|
54970
|
+
return false;
|
54971
|
+
}
|
54972
|
+
|
54973
|
+
function getInnerBoundingClientRect(element, strategy) {
|
54974
|
+
const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
|
54975
|
+
const top = clientRect.top + element.clientTop;
|
54976
|
+
const left = clientRect.left + element.clientLeft;
|
54977
|
+
return {
|
54978
|
+
top,
|
54979
|
+
left,
|
54980
|
+
x: left,
|
54981
|
+
y: top,
|
54982
|
+
right: left + element.clientWidth,
|
54983
|
+
bottom: top + element.clientHeight,
|
54984
|
+
width: element.clientWidth,
|
54985
|
+
height: element.clientHeight
|
54986
|
+
};
|
54987
|
+
}
|
54988
|
+
|
54989
|
+
function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
|
54990
|
+
if (clippingParent === 'viewport') {
|
54991
|
+
return rectToClientRect(getViewportRect(element, strategy));
|
54992
|
+
}
|
54993
|
+
|
54994
|
+
if (isElement(clippingParent)) {
|
54995
|
+
return getInnerBoundingClientRect(clippingParent, strategy);
|
54996
|
+
}
|
54997
|
+
|
54998
|
+
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
54999
|
+
} // A "clipping ancestor" is an overflowable container with the characteristic of
|
55000
|
+
// clipping (or hiding) overflowing elements with a position different from
|
55001
|
+
// `initial`
|
55002
|
+
|
55003
|
+
|
55004
|
+
function getClippingAncestors(element) {
|
55005
|
+
const clippingAncestors = getOverflowAncestors(element);
|
55006
|
+
const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);
|
55007
|
+
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
55008
|
+
|
55009
|
+
if (!isElement(clipperElement)) {
|
55010
|
+
return [];
|
55011
|
+
} // @ts-ignore isElement check ensures we return Array<Element>
|
55012
|
+
|
55013
|
+
|
55014
|
+
return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
|
55015
|
+
} // Gets the maximum area that the element is visible in due to any number of
|
55016
|
+
// clipping ancestors
|
55017
|
+
|
55018
|
+
|
55019
|
+
function getClippingRect(_ref) {
|
55020
|
+
let {
|
55021
|
+
element,
|
55022
|
+
boundary,
|
55023
|
+
rootBoundary,
|
55024
|
+
strategy
|
55025
|
+
} = _ref;
|
55026
|
+
const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
|
55027
|
+
const clippingAncestors = [...mainClippingAncestors, rootBoundary];
|
55028
|
+
const firstClippingAncestor = clippingAncestors[0];
|
55029
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
55030
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
55031
|
+
accRect.top = max(rect.top, accRect.top);
|
55032
|
+
accRect.right = min(rect.right, accRect.right);
|
55033
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
55034
|
+
accRect.left = max(rect.left, accRect.left);
|
55035
|
+
return accRect;
|
55036
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
55037
|
+
return {
|
55038
|
+
width: clippingRect.right - clippingRect.left,
|
55039
|
+
height: clippingRect.bottom - clippingRect.top,
|
55040
|
+
x: clippingRect.left,
|
55041
|
+
y: clippingRect.top
|
55042
|
+
};
|
55043
|
+
}
|
55044
|
+
|
55045
|
+
const platform = {
|
55046
|
+
getClippingRect,
|
55047
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
55048
|
+
isElement,
|
55049
|
+
getDimensions,
|
55050
|
+
getOffsetParent,
|
55051
|
+
getDocumentElement,
|
55052
|
+
getElementRects: _ref => {
|
55053
|
+
let {
|
55054
|
+
reference,
|
55055
|
+
floating,
|
55056
|
+
strategy
|
55057
|
+
} = _ref;
|
55058
|
+
return {
|
55059
|
+
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
55060
|
+
floating: { ...getDimensions(floating),
|
55061
|
+
x: 0,
|
55062
|
+
y: 0
|
55063
|
+
}
|
55064
|
+
};
|
55065
|
+
},
|
55066
|
+
getClientRects: element => Array.from(element.getClientRects()),
|
55067
|
+
isRTL: element => getComputedStyle$1(element).direction === 'rtl'
|
55068
|
+
};
|
55069
|
+
|
55070
|
+
/**
|
55071
|
+
* Automatically updates the position of the floating element when necessary.
|
55072
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
55073
|
+
*/
|
55074
|
+
function autoUpdate(reference, floating, update, options) {
|
55075
|
+
if (options === void 0) {
|
55076
|
+
options = {};
|
55077
|
+
}
|
55078
|
+
|
55079
|
+
const {
|
55080
|
+
ancestorScroll: _ancestorScroll = true,
|
55081
|
+
ancestorResize: _ancestorResize = true,
|
55082
|
+
elementResize = true,
|
55083
|
+
animationFrame = false
|
55084
|
+
} = options;
|
55085
|
+
const ancestorScroll = _ancestorScroll && !animationFrame;
|
55086
|
+
const ancestorResize = _ancestorResize && !animationFrame;
|
55087
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
|
55088
|
+
ancestors.forEach(ancestor => {
|
55089
|
+
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
55090
|
+
passive: true
|
55091
|
+
});
|
55092
|
+
ancestorResize && ancestor.addEventListener('resize', update);
|
55093
|
+
});
|
55094
|
+
let observer = null;
|
55095
|
+
|
55096
|
+
if (elementResize) {
|
55097
|
+
let initialUpdate = true;
|
55098
|
+
observer = new ResizeObserver(() => {
|
55099
|
+
if (!initialUpdate) {
|
55100
|
+
update();
|
55101
|
+
}
|
55102
|
+
|
55103
|
+
initialUpdate = false;
|
55104
|
+
});
|
55105
|
+
isElement(reference) && !animationFrame && observer.observe(reference);
|
55106
|
+
observer.observe(floating);
|
55107
|
+
}
|
55108
|
+
|
55109
|
+
let frameId;
|
55110
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
55111
|
+
|
55112
|
+
if (animationFrame) {
|
55113
|
+
frameLoop();
|
55114
|
+
}
|
55115
|
+
|
55116
|
+
function frameLoop() {
|
55117
|
+
const nextRefRect = getBoundingClientRect(reference);
|
55118
|
+
|
55119
|
+
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
55120
|
+
update();
|
55121
|
+
}
|
55122
|
+
|
55123
|
+
prevRefRect = nextRefRect;
|
55124
|
+
frameId = requestAnimationFrame(frameLoop);
|
55125
|
+
}
|
55126
|
+
|
55127
|
+
update();
|
55128
|
+
return () => {
|
55129
|
+
var _observer;
|
55130
|
+
|
55131
|
+
ancestors.forEach(ancestor => {
|
55132
|
+
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
55133
|
+
ancestorResize && ancestor.removeEventListener('resize', update);
|
55134
|
+
});
|
55135
|
+
(_observer = observer) == null ? void 0 : _observer.disconnect();
|
55136
|
+
observer = null;
|
55137
|
+
|
55138
|
+
if (animationFrame) {
|
55139
|
+
cancelAnimationFrame(frameId);
|
55140
|
+
}
|
55141
|
+
};
|
55142
|
+
}
|
55143
|
+
|
55144
|
+
/**
|
55145
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
55146
|
+
* next to a reference element when it is given a certain CSS positioning
|
55147
|
+
* strategy.
|
55148
|
+
*/
|
55149
|
+
|
55150
|
+
const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
|
55151
|
+
platform,
|
55152
|
+
...options
|
55153
|
+
});
|
55154
|
+
|
53266
55155
|
const visualHiddenProps = buildProps({
|
53267
55156
|
style: {
|
53268
55157
|
type: definePropType([String, Object, Array]),
|
@@ -54195,7 +56084,7 @@ const setCanFocus = function(childNodes, focus) {
|
|
54195
56084
|
});
|
54196
56085
|
};
|
54197
56086
|
let nodeIdSeed = 0;
|
54198
|
-
class Node {
|
56087
|
+
class Node$1 {
|
54199
56088
|
constructor(options) {
|
54200
56089
|
this.isLeafByUser = void 0;
|
54201
56090
|
this.isLeaf = void 0;
|
@@ -54326,7 +56215,7 @@ class Node {
|
|
54326
56215
|
insertChild(child, index, batch) {
|
54327
56216
|
if (!child)
|
54328
56217
|
throw new Error("InsertChild error: child is required.");
|
54329
|
-
if (!(child instanceof Node)) {
|
56218
|
+
if (!(child instanceof Node$1)) {
|
54330
56219
|
if (!batch) {
|
54331
56220
|
const children = this.getChildren(true);
|
54332
56221
|
if (!(children == null ? void 0 : children.includes(child.data))) {
|
@@ -54341,8 +56230,8 @@ class Node {
|
|
54341
56230
|
parent: this,
|
54342
56231
|
store: this.store
|
54343
56232
|
});
|
54344
|
-
child = reactive(new Node(child));
|
54345
|
-
if (child instanceof Node) {
|
56233
|
+
child = reactive(new Node$1(child));
|
56234
|
+
if (child instanceof Node$1) {
|
54346
56235
|
child.initialize();
|
54347
56236
|
}
|
54348
56237
|
}
|
@@ -54576,7 +56465,7 @@ class Node {
|
|
54576
56465
|
reInitChecked(this);
|
54577
56466
|
}
|
54578
56467
|
}
|
54579
|
-
var Node$
|
56468
|
+
var Node$2 = Node$1;
|
54580
56469
|
|
54581
56470
|
class TreeStore {
|
54582
56471
|
constructor(options) {
|
@@ -54595,7 +56484,7 @@ class TreeStore {
|
|
54595
56484
|
this.nodesMap = {};
|
54596
56485
|
}
|
54597
56486
|
initialize() {
|
54598
|
-
this.root = new Node$
|
56487
|
+
this.root = new Node$2({
|
54599
56488
|
data: this.data,
|
54600
56489
|
store: this
|
54601
56490
|
});
|
@@ -54653,7 +56542,7 @@ class TreeStore {
|
|
54653
56542
|
}
|
54654
56543
|
}
|
54655
56544
|
getNode(data) {
|
54656
|
-
if (data instanceof Node$
|
56545
|
+
if (data instanceof Node$2)
|
54657
56546
|
return data;
|
54658
56547
|
const key = isObject$1(data) ? getNodeKey(this.key, data) : data;
|
54659
56548
|
return this.nodesMap[key] || null;
|
@@ -55131,7 +57020,7 @@ const _sfc_main$o = defineComponent({
|
|
55131
57020
|
},
|
55132
57021
|
props: {
|
55133
57022
|
node: {
|
55134
|
-
type: Node$
|
57023
|
+
type: Node$2,
|
55135
57024
|
default: () => ({})
|
55136
57025
|
},
|
55137
57026
|
props: {
|
@@ -61776,7 +63665,7 @@ const normalizeOptions = (params) => {
|
|
61776
63665
|
normalized.appendTo = document.body;
|
61777
63666
|
} else if (isString$1(normalized.appendTo)) {
|
61778
63667
|
let appendTo = document.querySelector(normalized.appendTo);
|
61779
|
-
if (!isElement$
|
63668
|
+
if (!isElement$2(appendTo)) {
|
61780
63669
|
appendTo = document.body;
|
61781
63670
|
}
|
61782
63671
|
normalized.appendTo = appendTo;
|
@@ -62363,10 +64252,10 @@ const getAppendToElement = (props) => {
|
|
62363
64252
|
if (isString$1(props.appendTo)) {
|
62364
64253
|
appendTo = document.querySelector(props.appendTo);
|
62365
64254
|
}
|
62366
|
-
if (isElement$
|
64255
|
+
if (isElement$2(props.appendTo)) {
|
62367
64256
|
appendTo = props.appendTo;
|
62368
64257
|
}
|
62369
|
-
if (!isElement$
|
64258
|
+
if (!isElement$2(appendTo)) {
|
62370
64259
|
appendTo = document.body;
|
62371
64260
|
}
|
62372
64261
|
}
|
@@ -62734,12 +64623,12 @@ const notify = function(options = {}, context) {
|
|
62734
64623
|
}
|
62735
64624
|
};
|
62736
64625
|
let appendTo = document.body;
|
62737
|
-
if (isElement$
|
64626
|
+
if (isElement$2(options.appendTo)) {
|
62738
64627
|
appendTo = options.appendTo;
|
62739
64628
|
} else if (isString$1(options.appendTo)) {
|
62740
64629
|
appendTo = document.querySelector(options.appendTo);
|
62741
64630
|
}
|
62742
|
-
if (!isElement$
|
64631
|
+
if (!isElement$2(appendTo)) {
|
62743
64632
|
appendTo = document.body;
|
62744
64633
|
}
|
62745
64634
|
const container = document.createElement("div");
|
@@ -62827,4 +64716,4 @@ var installer = makeInstaller([...Components, ...Plugins]);
|
|
62827
64716
|
const install = installer.install;
|
62828
64717
|
const version = installer.version;
|
62829
64718
|
|
62830
|
-
export { BAR_MAP, CAROUSEL_ITEM_NAME, CASCADER_PANEL_INJECTION_KEY, CHANGE_EVENT, ClickOutside, CommonPicker, CommonProps, DEFAULT_DIALOG_TRANSITION, DEFAULT_EMPTY_VALUES, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_VALUE_ON_CLEAR, COLLECTION_INJECTION_KEY as DROPDOWN_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DefaultProps, DynamicSizeGrid$1 as DynamicSizeGrid, DynamicSizeList$1 as DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup$1 as ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup$1 as ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElCollection, ElCollectionItem, ElColorPicker, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputTag, ElLink, ElLoading, vLoading$1 as ElLoadingDirective, Loading$1 as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, ElPopperArrow, ElPopperContent, ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid$1 as FixedSizeGrid, FixedSizeList$1 as FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, MENU_INJECTION_KEY, Mousewheel, NODE_INSTANCE_INJECTION_KEY, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY$1 as ROOT_TREE_INJECTION_KEY, RowAlign, RowJustify, SCOPE$4 as SCOPE, SIZE_INJECTION_KEY, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TableV2$1 as TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, ZINDEX_INJECTION_KEY, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, ariaProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerContextKey, colorPickerEmits, colorPickerProps, columnAlignment, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, datePickerProps, dayOrDaysToDate, dayjs, installer as default, defaultInitialZIndex, defaultNamespace, defaultProps, descriptionItemProps, descriptionProps, dialogEmits, dialogInjectionKey, dialogProps, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, emptyValuesContextKey, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, inputTagEmits, inputTagProps, install, linkEmits, linkProps, localeContextKey, makeInstaller, makeList, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messageProps, messageTypes, namespaceContextKey, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popperArrowProps, popperContentEmits, popperContentProps, popperCoreConfigProps, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioProps, radioPropsBase, rangeArr, rateEmits, rateProps, renderThumbStyle$1 as renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits$1 as timeUnits, timelineItemProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, translate, uploadBaseProps, uploadContentProps, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, useAriaProps, useAttrs, useCalcInputWidth, useCascaderConfig, useComposition, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDeprecated, useDialog, useDisabled, useDraggable, useEmptyValues, useEmptyValuesProps, useEscapeKeydown, useFloating$1 as useFloating, useFloatingProps, useFocus, useFocusController, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useForwardRef, useForwardRefDirective, useGetDerivedNamespace, useGlobalComponentSettings, useGlobalConfig, useGlobalSize, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useSameTarget, useSize$1 as useSize, useSizeProp, useSizeProps, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vLoading$1 as vLoading, vRepeatClick, valueEquals, version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps, zIndexContextKey };
|
64719
|
+
export { BAR_MAP, CAROUSEL_ITEM_NAME, CASCADER_PANEL_INJECTION_KEY, CHANGE_EVENT, ClickOutside, CommonPicker, CommonProps, DEFAULT_DIALOG_TRANSITION, DEFAULT_EMPTY_VALUES, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_VALUE_ON_CLEAR, COLLECTION_INJECTION_KEY as DROPDOWN_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DefaultProps, DynamicSizeGrid$1 as DynamicSizeGrid, DynamicSizeList$1 as DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup$1 as ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup$1 as ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElCollection, ElCollectionItem, ElColorPicker, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputTag, ElLink, ElLoading, vLoading$1 as ElLoadingDirective, Loading$1 as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, ElPopperArrow, ElPopperContent, ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid$1 as FixedSizeGrid, FixedSizeList$1 as FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, MENU_INJECTION_KEY, Mousewheel, NODE_INSTANCE_INJECTION_KEY, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY$1 as ROOT_TREE_INJECTION_KEY, RowAlign, RowJustify, SCOPE$4 as SCOPE, SIZE_INJECTION_KEY, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TableV2$1 as TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, ZINDEX_INJECTION_KEY, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, ariaProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerContextKey, colorPickerEmits, colorPickerProps, columnAlignment, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, datePickerProps, dayOrDaysToDate, dayjs, installer as default, defaultInitialZIndex, defaultNamespace, defaultProps, descriptionItemProps, descriptionProps, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, emptyValuesContextKey, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, inputTagEmits, inputTagProps, install, linkEmits, linkProps, localeContextKey, makeInstaller, makeList, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messageProps, messageTypes, namespaceContextKey, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popperArrowProps, popperContentEmits, popperContentProps, popperCoreConfigProps, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioProps, radioPropsBase, rangeArr, rateEmits, rateProps, renderThumbStyle$1 as renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits$1 as timeUnits, timelineItemProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, translate, uploadBaseProps, uploadContentProps, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, useAriaProps, useAttrs, useCalcInputWidth, useCascaderConfig, useComposition, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDeprecated, useDialog, useDisabled, useDraggable, useEmptyValues, useEmptyValuesProps, useEscapeKeydown, useFloating$1 as useFloating, useFloatingProps, useFocus, useFocusController, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useForwardRef, useForwardRefDirective, useGetDerivedNamespace, useGlobalComponentSettings, useGlobalConfig, useGlobalSize, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useSameTarget, useSize$1 as useSize, useSizeProp, useSizeProps, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vLoading$1 as vLoading, vRepeatClick, valueEquals, version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps, zIndexContextKey };
|