@element-plus/nightly 0.0.20250807 → 0.0.20250809
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2670 -821
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +16 -16
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2670 -821
- 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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +40 -207
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +207 -40
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +31 -65
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +65 -31
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +62 -87
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +87 -62
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +31 -89
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +89 -31
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +7 -69
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +69 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +115 -181
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +181 -115
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +23 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -23
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +400 -49
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +49 -400
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/config-provider/src/config-provider-props.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +26 -178
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +178 -26
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +35 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -35
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +46 -447
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +447 -46
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +18 -18
- 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.mjs +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +73 -140
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +140 -73
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/pagination/src/components/pager.mjs +210 -16
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +16 -210
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/content.mjs +88 -130
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +130 -88
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/popper.mjs +22 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -22
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +30 -62
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +62 -30
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +10 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -10
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +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/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +227 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -227
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +27 -99
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +99 -27
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- 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 +165 -30
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +30 -165
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +4 -4
- package/es/components/tooltip-v2/src/content.mjs +110 -48
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +20 -78
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +78 -20
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/index.mjs +18 -18
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +40 -206
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +206 -40
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +32 -65
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +65 -32
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +65 -87
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +87 -65
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +35 -89
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +89 -35
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +7 -69
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +69 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +115 -181
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +181 -115
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +25 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -25
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +399 -50
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +50 -399
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/config-provider/src/config-provider-props.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +27 -178
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +178 -27
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +35 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -35
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +47 -447
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +447 -47
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +18 -18
- 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.js +1 -1
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +74 -139
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +139 -74
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/pagination/src/components/pager.js +210 -16
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +16 -210
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/content.js +93 -130
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +130 -93
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/popper.js +25 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -25
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +32 -62
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +62 -32
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +10 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -10
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +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/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +226 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -226
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +28 -99
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +99 -28
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- 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 +165 -34
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +34 -165
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +4 -4
- package/lib/components/tooltip-v2/src/content.js +110 -48
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +48 -110
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +20 -78
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +78 -20
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/index.js +18 -18
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
package/dist/index.full.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Element Plus v0.0.
|
1
|
+
/*! Element Plus v0.0.20250809 */
|
2
2
|
|
3
3
|
(function (global, factory) {
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
@@ -3040,7 +3040,7 @@
|
|
3040
3040
|
return number;
|
3041
3041
|
}
|
3042
3042
|
|
3043
|
-
function clamp(number, lower, upper) {
|
3043
|
+
function clamp$1(number, lower, upper) {
|
3044
3044
|
if (upper === void 0) {
|
3045
3045
|
upper = lower;
|
3046
3046
|
lower = void 0;
|
@@ -4649,7 +4649,7 @@
|
|
4649
4649
|
}
|
4650
4650
|
|
4651
4651
|
var WRAP_FLIP_FLAG = 512;
|
4652
|
-
function flip$
|
4652
|
+
function flip$2(func) {
|
4653
4653
|
return createWrap(func, WRAP_FLIP_FLAG);
|
4654
4654
|
}
|
4655
4655
|
|
@@ -4984,7 +4984,7 @@
|
|
4984
4984
|
var nodeIsDate = nodeUtil && nodeUtil.isDate;
|
4985
4985
|
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
4986
4986
|
|
4987
|
-
function isElement$
|
4987
|
+
function isElement$3(value) {
|
4988
4988
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
4989
4989
|
}
|
4990
4990
|
|
@@ -5195,7 +5195,7 @@
|
|
5195
5195
|
return result;
|
5196
5196
|
}
|
5197
5197
|
|
5198
|
-
function max$
|
5198
|
+
function max$4(array) {
|
5199
5199
|
return array && array.length ? baseExtremum(array, identity, baseGt) : void 0;
|
5200
5200
|
}
|
5201
5201
|
|
@@ -5244,7 +5244,7 @@
|
|
5244
5244
|
};
|
5245
5245
|
});
|
5246
5246
|
|
5247
|
-
function min$
|
5247
|
+
function min$4(array) {
|
5248
5248
|
return array && array.length ? baseExtremum(array, identity, baseLt) : void 0;
|
5249
5249
|
}
|
5250
5250
|
|
@@ -5963,7 +5963,7 @@
|
|
5963
5963
|
return array == null ? array : nativeReverse.call(array);
|
5964
5964
|
}
|
5965
5965
|
|
5966
|
-
var round$
|
5966
|
+
var round$2 = createRound("round");
|
5967
5967
|
|
5968
5968
|
function arraySample(array) {
|
5969
5969
|
var length = array.length;
|
@@ -6034,7 +6034,7 @@
|
|
6034
6034
|
|
6035
6035
|
var mapTag = "[object Map]";
|
6036
6036
|
var setTag = "[object Set]";
|
6037
|
-
function size(collection) {
|
6037
|
+
function size$1(collection) {
|
6038
6038
|
if (collection == null) {
|
6039
6039
|
return 0;
|
6040
6040
|
}
|
@@ -6970,7 +6970,7 @@
|
|
6970
6970
|
sample,
|
6971
6971
|
sampleSize,
|
6972
6972
|
shuffle,
|
6973
|
-
size,
|
6973
|
+
size: size$1,
|
6974
6974
|
some,
|
6975
6975
|
sortBy
|
6976
6976
|
};
|
@@ -6990,7 +6990,7 @@
|
|
6990
6990
|
debounce,
|
6991
6991
|
defer,
|
6992
6992
|
delay,
|
6993
|
-
flip: flip$
|
6993
|
+
flip: flip$2,
|
6994
6994
|
memoize,
|
6995
6995
|
negate,
|
6996
6996
|
once,
|
@@ -7023,7 +7023,7 @@
|
|
7023
7023
|
isBoolean: isBoolean$1,
|
7024
7024
|
isBuffer,
|
7025
7025
|
isDate,
|
7026
|
-
isElement: isElement$
|
7026
|
+
isElement: isElement$3,
|
7027
7027
|
isEmpty: isEmpty$1,
|
7028
7028
|
isEqual: isEqual$1,
|
7029
7029
|
isEqualWith,
|
@@ -7069,21 +7069,21 @@
|
|
7069
7069
|
ceil,
|
7070
7070
|
divide,
|
7071
7071
|
floor: floor$1,
|
7072
|
-
max: max$
|
7072
|
+
max: max$4,
|
7073
7073
|
maxBy,
|
7074
7074
|
mean,
|
7075
7075
|
meanBy,
|
7076
|
-
min: min$
|
7076
|
+
min: min$4,
|
7077
7077
|
minBy,
|
7078
7078
|
multiply,
|
7079
|
-
round: round$
|
7079
|
+
round: round$2,
|
7080
7080
|
subtract,
|
7081
7081
|
sum: sum$1,
|
7082
7082
|
sumBy
|
7083
7083
|
};
|
7084
7084
|
|
7085
7085
|
var number = {
|
7086
|
-
clamp,
|
7086
|
+
clamp: clamp$1,
|
7087
7087
|
inRange,
|
7088
7088
|
random
|
7089
7089
|
};
|
@@ -7811,7 +7811,7 @@
|
|
7811
7811
|
const isBoolean = (val) => typeof val === "boolean";
|
7812
7812
|
const isNumber = (val) => typeof val === "number";
|
7813
7813
|
const isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
|
7814
|
-
const isElement$
|
7814
|
+
const isElement$2 = (e) => {
|
7815
7815
|
if (typeof Element === "undefined")
|
7816
7816
|
return false;
|
7817
7817
|
return e instanceof Element;
|
@@ -10115,36 +10115,156 @@
|
|
10115
10115
|
};
|
10116
10116
|
};
|
10117
10117
|
|
10118
|
-
|
10118
|
+
/**
|
10119
|
+
* Custom positioning reference element.
|
10120
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
10121
|
+
*/
|
10122
|
+
|
10123
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
10124
|
+
const alignments = ['start', 'end'];
|
10125
|
+
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
10126
|
+
const min$3 = Math.min;
|
10127
|
+
const max$3 = Math.max;
|
10128
|
+
const round$1 = Math.round;
|
10129
|
+
const createCoords = v => ({
|
10130
|
+
x: v,
|
10131
|
+
y: v
|
10132
|
+
});
|
10133
|
+
const oppositeSideMap = {
|
10134
|
+
left: 'right',
|
10135
|
+
right: 'left',
|
10136
|
+
bottom: 'top',
|
10137
|
+
top: 'bottom'
|
10138
|
+
};
|
10139
|
+
const oppositeAlignmentMap = {
|
10140
|
+
start: 'end',
|
10141
|
+
end: 'start'
|
10142
|
+
};
|
10143
|
+
function clamp(start, value, end) {
|
10144
|
+
return max$3(start, min$3(value, end));
|
10145
|
+
}
|
10146
|
+
function evaluate(value, param) {
|
10147
|
+
return typeof value === 'function' ? value(param) : value;
|
10148
|
+
}
|
10149
|
+
function getSide$1(placement) {
|
10119
10150
|
return placement.split('-')[0];
|
10120
10151
|
}
|
10121
|
-
|
10122
|
-
function getAlignment(placement) {
|
10152
|
+
function getAlignment$1(placement) {
|
10123
10153
|
return placement.split('-')[1];
|
10124
10154
|
}
|
10125
|
-
|
10126
|
-
|
10127
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
10155
|
+
function getOppositeAxis(axis) {
|
10156
|
+
return axis === 'x' ? 'y' : 'x';
|
10128
10157
|
}
|
10129
|
-
|
10130
|
-
function getLengthFromAxis(axis) {
|
10158
|
+
function getAxisLength(axis) {
|
10131
10159
|
return axis === 'y' ? 'height' : 'width';
|
10132
10160
|
}
|
10161
|
+
function getSideAxis(placement) {
|
10162
|
+
return ['top', 'bottom'].includes(getSide$1(placement)) ? 'y' : 'x';
|
10163
|
+
}
|
10164
|
+
function getAlignmentAxis(placement) {
|
10165
|
+
return getOppositeAxis(getSideAxis(placement));
|
10166
|
+
}
|
10167
|
+
function getAlignmentSides$1(placement, rects, rtl) {
|
10168
|
+
if (rtl === void 0) {
|
10169
|
+
rtl = false;
|
10170
|
+
}
|
10171
|
+
const alignment = getAlignment$1(placement);
|
10172
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
10173
|
+
const length = getAxisLength(alignmentAxis);
|
10174
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
10175
|
+
if (rects.reference[length] > rects.floating[length]) {
|
10176
|
+
mainAlignmentSide = getOppositePlacement$1(mainAlignmentSide);
|
10177
|
+
}
|
10178
|
+
return [mainAlignmentSide, getOppositePlacement$1(mainAlignmentSide)];
|
10179
|
+
}
|
10180
|
+
function getExpandedPlacements$1(placement) {
|
10181
|
+
const oppositePlacement = getOppositePlacement$1(placement);
|
10182
|
+
return [getOppositeAlignmentPlacement$1(placement), oppositePlacement, getOppositeAlignmentPlacement$1(oppositePlacement)];
|
10183
|
+
}
|
10184
|
+
function getOppositeAlignmentPlacement$1(placement) {
|
10185
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
10186
|
+
}
|
10187
|
+
function getSideList(side, isStart, rtl) {
|
10188
|
+
const lr = ['left', 'right'];
|
10189
|
+
const rl = ['right', 'left'];
|
10190
|
+
const tb = ['top', 'bottom'];
|
10191
|
+
const bt = ['bottom', 'top'];
|
10192
|
+
switch (side) {
|
10193
|
+
case 'top':
|
10194
|
+
case 'bottom':
|
10195
|
+
if (rtl) return isStart ? rl : lr;
|
10196
|
+
return isStart ? lr : rl;
|
10197
|
+
case 'left':
|
10198
|
+
case 'right':
|
10199
|
+
return isStart ? tb : bt;
|
10200
|
+
default:
|
10201
|
+
return [];
|
10202
|
+
}
|
10203
|
+
}
|
10204
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
10205
|
+
const alignment = getAlignment$1(placement);
|
10206
|
+
let list = getSideList(getSide$1(placement), direction === 'start', rtl);
|
10207
|
+
if (alignment) {
|
10208
|
+
list = list.map(side => side + "-" + alignment);
|
10209
|
+
if (flipAlignment) {
|
10210
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement$1));
|
10211
|
+
}
|
10212
|
+
}
|
10213
|
+
return list;
|
10214
|
+
}
|
10215
|
+
function getOppositePlacement$1(placement) {
|
10216
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
10217
|
+
}
|
10218
|
+
function expandPaddingObject$1(padding) {
|
10219
|
+
return {
|
10220
|
+
top: 0,
|
10221
|
+
right: 0,
|
10222
|
+
bottom: 0,
|
10223
|
+
left: 0,
|
10224
|
+
...padding
|
10225
|
+
};
|
10226
|
+
}
|
10227
|
+
function getPaddingObject(padding) {
|
10228
|
+
return typeof padding !== 'number' ? expandPaddingObject$1(padding) : {
|
10229
|
+
top: padding,
|
10230
|
+
right: padding,
|
10231
|
+
bottom: padding,
|
10232
|
+
left: padding
|
10233
|
+
};
|
10234
|
+
}
|
10235
|
+
function rectToClientRect$1(rect) {
|
10236
|
+
const {
|
10237
|
+
x,
|
10238
|
+
y,
|
10239
|
+
width,
|
10240
|
+
height
|
10241
|
+
} = rect;
|
10242
|
+
return {
|
10243
|
+
width,
|
10244
|
+
height,
|
10245
|
+
top: y,
|
10246
|
+
left: x,
|
10247
|
+
right: x + width,
|
10248
|
+
bottom: y + height,
|
10249
|
+
x,
|
10250
|
+
y
|
10251
|
+
};
|
10252
|
+
}
|
10133
10253
|
|
10134
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
10254
|
+
function computeCoordsFromPlacement$1(_ref, placement, rtl) {
|
10135
10255
|
let {
|
10136
10256
|
reference,
|
10137
10257
|
floating
|
10138
10258
|
} = _ref;
|
10259
|
+
const sideAxis = getSideAxis(placement);
|
10260
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
10261
|
+
const alignLength = getAxisLength(alignmentAxis);
|
10262
|
+
const side = getSide$1(placement);
|
10263
|
+
const isVertical = sideAxis === 'y';
|
10139
10264
|
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
10140
10265
|
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
10141
|
-
const
|
10142
|
-
const length = getLengthFromAxis(mainAxis);
|
10143
|
-
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
10144
|
-
const side = getSide(placement);
|
10145
|
-
const isVertical = mainAxis === 'x';
|
10266
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
10146
10267
|
let coords;
|
10147
|
-
|
10148
10268
|
switch (side) {
|
10149
10269
|
case 'top':
|
10150
10270
|
coords = {
|
@@ -10152,65 +10272,57 @@
|
|
10152
10272
|
y: reference.y - floating.height
|
10153
10273
|
};
|
10154
10274
|
break;
|
10155
|
-
|
10156
10275
|
case 'bottom':
|
10157
10276
|
coords = {
|
10158
10277
|
x: commonX,
|
10159
10278
|
y: reference.y + reference.height
|
10160
10279
|
};
|
10161
10280
|
break;
|
10162
|
-
|
10163
10281
|
case 'right':
|
10164
10282
|
coords = {
|
10165
10283
|
x: reference.x + reference.width,
|
10166
10284
|
y: commonY
|
10167
10285
|
};
|
10168
10286
|
break;
|
10169
|
-
|
10170
10287
|
case 'left':
|
10171
10288
|
coords = {
|
10172
10289
|
x: reference.x - floating.width,
|
10173
10290
|
y: commonY
|
10174
10291
|
};
|
10175
10292
|
break;
|
10176
|
-
|
10177
10293
|
default:
|
10178
10294
|
coords = {
|
10179
10295
|
x: reference.x,
|
10180
10296
|
y: reference.y
|
10181
10297
|
};
|
10182
10298
|
}
|
10183
|
-
|
10184
|
-
switch (getAlignment(placement)) {
|
10299
|
+
switch (getAlignment$1(placement)) {
|
10185
10300
|
case 'start':
|
10186
|
-
coords[
|
10301
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
10187
10302
|
break;
|
10188
|
-
|
10189
10303
|
case 'end':
|
10190
|
-
coords[
|
10304
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
10191
10305
|
break;
|
10192
10306
|
}
|
10193
|
-
|
10194
10307
|
return coords;
|
10195
10308
|
}
|
10196
10309
|
|
10197
10310
|
/**
|
10198
10311
|
* Computes the `x` and `y` coordinates that will place the floating element
|
10199
|
-
* next to a reference element
|
10312
|
+
* next to a given reference element.
|
10200
10313
|
*
|
10201
10314
|
* This export does not have any `platform` interface logic. You will need to
|
10202
10315
|
* write one for the platform you are using Floating UI with.
|
10203
10316
|
*/
|
10204
|
-
|
10205
|
-
const computePosition$1 = async (reference, floating, config) => {
|
10317
|
+
const computePosition$3 = async (reference, floating, config) => {
|
10206
10318
|
const {
|
10207
10319
|
placement = 'bottom',
|
10208
10320
|
strategy = 'absolute',
|
10209
10321
|
middleware = [],
|
10210
10322
|
platform
|
10211
10323
|
} = config;
|
10324
|
+
const validMiddleware = middleware.filter(Boolean);
|
10212
10325
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
10213
|
-
|
10214
10326
|
let rects = await platform.getElementRects({
|
10215
10327
|
reference,
|
10216
10328
|
floating,
|
@@ -10219,16 +10331,15 @@
|
|
10219
10331
|
let {
|
10220
10332
|
x,
|
10221
10333
|
y
|
10222
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
10334
|
+
} = computeCoordsFromPlacement$1(rects, placement, rtl);
|
10223
10335
|
let statefulPlacement = placement;
|
10224
10336
|
let middlewareData = {};
|
10225
10337
|
let resetCount = 0;
|
10226
|
-
|
10227
|
-
for (let i = 0; i < middleware.length; i++) {
|
10338
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
10228
10339
|
const {
|
10229
10340
|
name,
|
10230
10341
|
fn
|
10231
|
-
} =
|
10342
|
+
} = validMiddleware[i];
|
10232
10343
|
const {
|
10233
10344
|
x: nextX,
|
10234
10345
|
y: nextY,
|
@@ -10250,20 +10361,19 @@
|
|
10250
10361
|
});
|
10251
10362
|
x = nextX != null ? nextX : x;
|
10252
10363
|
y = nextY != null ? nextY : y;
|
10253
|
-
middlewareData = {
|
10254
|
-
|
10364
|
+
middlewareData = {
|
10365
|
+
...middlewareData,
|
10366
|
+
[name]: {
|
10367
|
+
...middlewareData[name],
|
10255
10368
|
...data
|
10256
10369
|
}
|
10257
10370
|
};
|
10258
|
-
|
10259
10371
|
if (reset && resetCount <= 50) {
|
10260
10372
|
resetCount++;
|
10261
|
-
|
10262
10373
|
if (typeof reset === 'object') {
|
10263
10374
|
if (reset.placement) {
|
10264
10375
|
statefulPlacement = reset.placement;
|
10265
10376
|
}
|
10266
|
-
|
10267
10377
|
if (reset.rects) {
|
10268
10378
|
rects = reset.rects === true ? await platform.getElementRects({
|
10269
10379
|
reference,
|
@@ -10271,18 +10381,14 @@
|
|
10271
10381
|
strategy
|
10272
10382
|
}) : reset.rects;
|
10273
10383
|
}
|
10274
|
-
|
10275
10384
|
({
|
10276
10385
|
x,
|
10277
10386
|
y
|
10278
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
10387
|
+
} = computeCoordsFromPlacement$1(rects, statefulPlacement, rtl));
|
10279
10388
|
}
|
10280
|
-
|
10281
10389
|
i = -1;
|
10282
|
-
continue;
|
10283
10390
|
}
|
10284
10391
|
}
|
10285
|
-
|
10286
10392
|
return {
|
10287
10393
|
x,
|
10288
10394
|
y,
|
@@ -10292,49 +10398,19 @@
|
|
10292
10398
|
};
|
10293
10399
|
};
|
10294
10400
|
|
10295
|
-
function expandPaddingObject(padding) {
|
10296
|
-
return {
|
10297
|
-
top: 0,
|
10298
|
-
right: 0,
|
10299
|
-
bottom: 0,
|
10300
|
-
left: 0,
|
10301
|
-
...padding
|
10302
|
-
};
|
10303
|
-
}
|
10304
|
-
|
10305
|
-
function getSideObjectFromPadding(padding) {
|
10306
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
10307
|
-
top: padding,
|
10308
|
-
right: padding,
|
10309
|
-
bottom: padding,
|
10310
|
-
left: padding
|
10311
|
-
};
|
10312
|
-
}
|
10313
|
-
|
10314
|
-
function rectToClientRect(rect) {
|
10315
|
-
return { ...rect,
|
10316
|
-
top: rect.y,
|
10317
|
-
left: rect.x,
|
10318
|
-
right: rect.x + rect.width,
|
10319
|
-
bottom: rect.y + rect.height
|
10320
|
-
};
|
10321
|
-
}
|
10322
|
-
|
10323
10401
|
/**
|
10324
10402
|
* Resolves with an object of overflow side offsets that determine how much the
|
10325
|
-
* element is overflowing a given clipping boundary.
|
10403
|
+
* element is overflowing a given clipping boundary on each side.
|
10326
10404
|
* - positive = overflowing the boundary by that number of pixels
|
10327
10405
|
* - negative = how many pixels left before it will overflow
|
10328
10406
|
* - 0 = lies flush with the boundary
|
10329
10407
|
* @see https://floating-ui.com/docs/detectOverflow
|
10330
10408
|
*/
|
10331
|
-
async function detectOverflow(
|
10409
|
+
async function detectOverflow$1(state, options) {
|
10332
10410
|
var _await$platform$isEle;
|
10333
|
-
|
10334
10411
|
if (options === void 0) {
|
10335
10412
|
options = {};
|
10336
10413
|
}
|
10337
|
-
|
10338
10414
|
const {
|
10339
10415
|
x,
|
10340
10416
|
y,
|
@@ -10342,176 +10418,251 @@
|
|
10342
10418
|
rects,
|
10343
10419
|
elements,
|
10344
10420
|
strategy
|
10345
|
-
} =
|
10421
|
+
} = state;
|
10346
10422
|
const {
|
10347
10423
|
boundary = 'clippingAncestors',
|
10348
10424
|
rootBoundary = 'viewport',
|
10349
10425
|
elementContext = 'floating',
|
10350
10426
|
altBoundary = false,
|
10351
10427
|
padding = 0
|
10352
|
-
} = options;
|
10353
|
-
const paddingObject =
|
10428
|
+
} = evaluate(options, state);
|
10429
|
+
const paddingObject = getPaddingObject(padding);
|
10354
10430
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
10355
10431
|
const element = elements[altBoundary ? altContext : elementContext];
|
10356
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
10432
|
+
const clippingClientRect = rectToClientRect$1(await platform.getClippingRect({
|
10357
10433
|
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))),
|
10358
10434
|
boundary,
|
10359
10435
|
rootBoundary,
|
10360
10436
|
strategy
|
10361
10437
|
}));
|
10362
|
-
const
|
10363
|
-
|
10364
|
-
|
10365
|
-
|
10366
|
-
|
10367
|
-
|
10438
|
+
const rect = elementContext === 'floating' ? {
|
10439
|
+
x,
|
10440
|
+
y,
|
10441
|
+
width: rects.floating.width,
|
10442
|
+
height: rects.floating.height
|
10443
|
+
} : rects.reference;
|
10444
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
10445
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
10446
|
+
x: 1,
|
10447
|
+
y: 1
|
10448
|
+
} : {
|
10449
|
+
x: 1,
|
10450
|
+
y: 1
|
10451
|
+
};
|
10452
|
+
const elementClientRect = rectToClientRect$1(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
10453
|
+
elements,
|
10454
|
+
rect,
|
10455
|
+
offsetParent,
|
10368
10456
|
strategy
|
10369
|
-
}) :
|
10457
|
+
}) : rect);
|
10370
10458
|
return {
|
10371
|
-
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
10372
|
-
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
10373
|
-
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
10374
|
-
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
10459
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
10460
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
10461
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
10462
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
10375
10463
|
};
|
10376
10464
|
}
|
10377
10465
|
|
10378
|
-
const min$2 = Math.min;
|
10379
|
-
const max$2 = Math.max;
|
10380
|
-
|
10381
|
-
function within(min$1, value, max$1) {
|
10382
|
-
return max$2(min$1, min$2(value, max$1));
|
10383
|
-
}
|
10384
|
-
|
10385
10466
|
/**
|
10386
|
-
*
|
10387
|
-
* to the reference element.
|
10467
|
+
* Provides data to position an inner element of the floating element so that it
|
10468
|
+
* appears centered to the reference element.
|
10388
10469
|
* @see https://floating-ui.com/docs/arrow
|
10389
10470
|
*/
|
10390
|
-
const arrow = options => ({
|
10471
|
+
const arrow$2 = options => ({
|
10391
10472
|
name: 'arrow',
|
10392
10473
|
options,
|
10393
|
-
|
10394
|
-
async fn(middlewareArguments) {
|
10395
|
-
// Since `element` is required, we don't Partial<> the type
|
10396
|
-
const {
|
10397
|
-
element,
|
10398
|
-
padding = 0
|
10399
|
-
} = options != null ? options : {};
|
10474
|
+
async fn(state) {
|
10400
10475
|
const {
|
10401
10476
|
x,
|
10402
10477
|
y,
|
10403
10478
|
placement,
|
10404
10479
|
rects,
|
10405
|
-
platform
|
10406
|
-
|
10407
|
-
|
10480
|
+
platform,
|
10481
|
+
elements,
|
10482
|
+
middlewareData
|
10483
|
+
} = state;
|
10484
|
+
// Since `element` is required, we don't Partial<> the type.
|
10485
|
+
const {
|
10486
|
+
element,
|
10487
|
+
padding = 0
|
10488
|
+
} = evaluate(options, state) || {};
|
10408
10489
|
if (element == null) {
|
10409
|
-
|
10410
10490
|
return {};
|
10411
10491
|
}
|
10412
|
-
|
10413
|
-
const paddingObject = getSideObjectFromPadding(padding);
|
10492
|
+
const paddingObject = getPaddingObject(padding);
|
10414
10493
|
const coords = {
|
10415
10494
|
x,
|
10416
10495
|
y
|
10417
10496
|
};
|
10418
|
-
const axis =
|
10419
|
-
const
|
10420
|
-
const length = getLengthFromAxis(axis);
|
10497
|
+
const axis = getAlignmentAxis(placement);
|
10498
|
+
const length = getAxisLength(axis);
|
10421
10499
|
const arrowDimensions = await platform.getDimensions(element);
|
10422
|
-
const
|
10423
|
-
const
|
10500
|
+
const isYAxis = axis === 'y';
|
10501
|
+
const minProp = isYAxis ? 'top' : 'left';
|
10502
|
+
const maxProp = isYAxis ? 'bottom' : 'right';
|
10503
|
+
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
10424
10504
|
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
10425
10505
|
const startDiff = coords[axis] - rects.reference[axis];
|
10426
10506
|
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
10427
|
-
let clientSize = arrowOffsetParent ?
|
10507
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
10428
10508
|
|
10429
|
-
|
10430
|
-
|
10509
|
+
// DOM platform can return `window` as the `offsetParent`.
|
10510
|
+
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
10511
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
10431
10512
|
}
|
10513
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
10432
10514
|
|
10433
|
-
|
10434
|
-
//
|
10515
|
+
// If the padding is large enough that it causes the arrow to no longer be
|
10516
|
+
// centered, modify the padding so that it is centered.
|
10517
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
10518
|
+
const minPadding = min$3(paddingObject[minProp], largestPossiblePadding);
|
10519
|
+
const maxPadding = min$3(paddingObject[maxProp], largestPossiblePadding);
|
10435
10520
|
|
10436
|
-
|
10437
|
-
|
10521
|
+
// Make sure the arrow doesn't overflow the floating element if the center
|
10522
|
+
// point is outside the floating element's bounds.
|
10523
|
+
const min$1 = minPadding;
|
10524
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
10438
10525
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
10439
|
-
const offset =
|
10440
|
-
|
10441
|
-
|
10442
|
-
|
10443
|
-
|
10526
|
+
const offset = clamp(min$1, center, max);
|
10527
|
+
|
10528
|
+
// If the reference is small enough that the arrow's padding causes it to
|
10529
|
+
// to point to nothing for an aligned placement, adjust the offset of the
|
10530
|
+
// floating element itself. To ensure `shift()` continues to take action,
|
10531
|
+
// a single reset is performed when this is true.
|
10532
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment$1(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
10533
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
10444
10534
|
return {
|
10445
|
-
[axis]: coords[axis]
|
10535
|
+
[axis]: coords[axis] + alignmentOffset,
|
10446
10536
|
data: {
|
10447
10537
|
[axis]: offset,
|
10448
|
-
centerOffset: center - offset
|
10449
|
-
|
10538
|
+
centerOffset: center - offset - alignmentOffset,
|
10539
|
+
...(shouldAddOffset && {
|
10540
|
+
alignmentOffset
|
10541
|
+
})
|
10542
|
+
},
|
10543
|
+
reset: shouldAddOffset
|
10450
10544
|
};
|
10451
10545
|
}
|
10452
|
-
|
10453
10546
|
});
|
10454
10547
|
|
10455
|
-
|
10456
|
-
|
10457
|
-
|
10458
|
-
|
10459
|
-
|
10460
|
-
|
10461
|
-
|
10462
|
-
|
10548
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
10549
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment$1(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment$1(placement) !== alignment)] : allowedPlacements.filter(placement => getSide$1(placement) === placement);
|
10550
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
10551
|
+
if (alignment) {
|
10552
|
+
return getAlignment$1(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement$1(placement) !== placement : false);
|
10553
|
+
}
|
10554
|
+
return true;
|
10555
|
+
});
|
10463
10556
|
}
|
10464
|
-
|
10465
|
-
|
10466
|
-
|
10467
|
-
|
10557
|
+
/**
|
10558
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
10559
|
+
* that has the most space available automatically, without needing to specify a
|
10560
|
+
* preferred placement. Alternative to `flip`.
|
10561
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
10562
|
+
*/
|
10563
|
+
const autoPlacement = function (options) {
|
10564
|
+
if (options === void 0) {
|
10565
|
+
options = {};
|
10468
10566
|
}
|
10567
|
+
return {
|
10568
|
+
name: 'autoPlacement',
|
10569
|
+
options,
|
10570
|
+
async fn(state) {
|
10571
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
10572
|
+
const {
|
10573
|
+
rects,
|
10574
|
+
middlewareData,
|
10575
|
+
placement,
|
10576
|
+
platform,
|
10577
|
+
elements
|
10578
|
+
} = state;
|
10579
|
+
const {
|
10580
|
+
crossAxis = false,
|
10581
|
+
alignment,
|
10582
|
+
allowedPlacements = placements,
|
10583
|
+
autoAlignment = true,
|
10584
|
+
...detectOverflowOptions
|
10585
|
+
} = evaluate(options, state);
|
10586
|
+
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
10587
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
10588
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
10589
|
+
const currentPlacement = placements$1[currentIndex];
|
10590
|
+
if (currentPlacement == null) {
|
10591
|
+
return {};
|
10592
|
+
}
|
10593
|
+
const alignmentSides = getAlignmentSides$1(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
10469
10594
|
|
10470
|
-
|
10471
|
-
|
10472
|
-
|
10473
|
-
|
10474
|
-
|
10475
|
-
|
10476
|
-
|
10477
|
-
|
10595
|
+
// Make `computeCoords` start from the right place.
|
10596
|
+
if (placement !== currentPlacement) {
|
10597
|
+
return {
|
10598
|
+
reset: {
|
10599
|
+
placement: placements$1[0]
|
10600
|
+
}
|
10601
|
+
};
|
10602
|
+
}
|
10603
|
+
const currentOverflows = [overflow[getSide$1(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
10604
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
10605
|
+
placement: currentPlacement,
|
10606
|
+
overflows: currentOverflows
|
10607
|
+
}];
|
10608
|
+
const nextPlacement = placements$1[currentIndex + 1];
|
10478
10609
|
|
10479
|
-
|
10480
|
-
|
10481
|
-
|
10610
|
+
// There are more placements to check.
|
10611
|
+
if (nextPlacement) {
|
10612
|
+
return {
|
10613
|
+
data: {
|
10614
|
+
index: currentIndex + 1,
|
10615
|
+
overflows: allOverflows
|
10616
|
+
},
|
10617
|
+
reset: {
|
10618
|
+
placement: nextPlacement
|
10619
|
+
}
|
10620
|
+
};
|
10621
|
+
}
|
10622
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
10623
|
+
const alignment = getAlignment$1(d.placement);
|
10624
|
+
return [d.placement, alignment && crossAxis ?
|
10625
|
+
// Check along the mainAxis and main crossAxis side.
|
10626
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
10627
|
+
// Check only the mainAxis.
|
10628
|
+
d.overflows[0], d.overflows];
|
10629
|
+
}).sort((a, b) => a[1] - b[1]);
|
10630
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
10631
|
+
// Aligned placements should not check their opposite crossAxis
|
10632
|
+
// side.
|
10633
|
+
getAlignment$1(d[0]) ? 2 : 3).every(v => v <= 0));
|
10634
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
10635
|
+
if (resetPlacement !== placement) {
|
10636
|
+
return {
|
10637
|
+
data: {
|
10638
|
+
index: currentIndex + 1,
|
10639
|
+
overflows: allOverflows
|
10640
|
+
},
|
10641
|
+
reset: {
|
10642
|
+
placement: resetPlacement
|
10643
|
+
}
|
10644
|
+
};
|
10645
|
+
}
|
10646
|
+
return {};
|
10647
|
+
}
|
10482
10648
|
};
|
10483
|
-
}
|
10484
|
-
|
10485
|
-
const hash = {
|
10486
|
-
start: 'end',
|
10487
|
-
end: 'start'
|
10488
10649
|
};
|
10489
|
-
function getOppositeAlignmentPlacement(placement) {
|
10490
|
-
return placement.replace(/start|end/g, matched => hash[matched]);
|
10491
|
-
}
|
10492
|
-
|
10493
|
-
function getExpandedPlacements(placement) {
|
10494
|
-
const oppositePlacement = getOppositePlacement(placement);
|
10495
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
10496
|
-
}
|
10497
10650
|
|
10498
10651
|
/**
|
10499
|
-
*
|
10500
|
-
*
|
10652
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
10653
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
10654
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
10501
10655
|
* @see https://floating-ui.com/docs/flip
|
10502
10656
|
*/
|
10503
|
-
const flip = function (options) {
|
10657
|
+
const flip$1 = function (options) {
|
10504
10658
|
if (options === void 0) {
|
10505
10659
|
options = {};
|
10506
10660
|
}
|
10507
|
-
|
10508
10661
|
return {
|
10509
10662
|
name: 'flip',
|
10510
10663
|
options,
|
10511
|
-
|
10512
|
-
|
10513
|
-
var _middlewareData$flip;
|
10514
|
-
|
10664
|
+
async fn(state) {
|
10665
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
10515
10666
|
const {
|
10516
10667
|
placement,
|
10517
10668
|
middlewareData,
|
@@ -10519,48 +10670,56 @@
|
|
10519
10670
|
initialPlacement,
|
10520
10671
|
platform,
|
10521
10672
|
elements
|
10522
|
-
} =
|
10673
|
+
} = state;
|
10523
10674
|
const {
|
10524
10675
|
mainAxis: checkMainAxis = true,
|
10525
10676
|
crossAxis: checkCrossAxis = true,
|
10526
10677
|
fallbackPlacements: specifiedFallbackPlacements,
|
10527
10678
|
fallbackStrategy = 'bestFit',
|
10679
|
+
fallbackAxisSideDirection = 'none',
|
10528
10680
|
flipAlignment = true,
|
10529
10681
|
...detectOverflowOptions
|
10530
|
-
} = options;
|
10531
|
-
|
10532
|
-
|
10533
|
-
|
10682
|
+
} = evaluate(options, state);
|
10683
|
+
|
10684
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
10685
|
+
// added, we should skip any logic now since `flip()` has already done its
|
10686
|
+
// work.
|
10687
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
10688
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
10689
|
+
return {};
|
10690
|
+
}
|
10691
|
+
const side = getSide$1(placement);
|
10692
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
10693
|
+
const isBasePlacement = getSide$1(initialPlacement) === initialPlacement;
|
10694
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
10695
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement$1(initialPlacement)] : getExpandedPlacements$1(initialPlacement));
|
10696
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
10697
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
10698
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
10699
|
+
}
|
10534
10700
|
const placements = [initialPlacement, ...fallbackPlacements];
|
10535
|
-
const overflow = await detectOverflow(
|
10701
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
10536
10702
|
const overflows = [];
|
10537
10703
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
10538
|
-
|
10539
10704
|
if (checkMainAxis) {
|
10540
10705
|
overflows.push(overflow[side]);
|
10541
10706
|
}
|
10542
|
-
|
10543
10707
|
if (checkCrossAxis) {
|
10544
|
-
const
|
10545
|
-
|
10546
|
-
cross
|
10547
|
-
} = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
10548
|
-
overflows.push(overflow[main], overflow[cross]);
|
10708
|
+
const sides = getAlignmentSides$1(placement, rects, rtl);
|
10709
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
10549
10710
|
}
|
10550
|
-
|
10551
10711
|
overflowsData = [...overflowsData, {
|
10552
10712
|
placement,
|
10553
10713
|
overflows
|
10554
|
-
}];
|
10714
|
+
}];
|
10555
10715
|
|
10716
|
+
// One or more sides is overflowing.
|
10556
10717
|
if (!overflows.every(side => side <= 0)) {
|
10557
|
-
var _middlewareData$
|
10558
|
-
|
10559
|
-
const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
|
10718
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
10719
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
10560
10720
|
const nextPlacement = placements[nextIndex];
|
10561
|
-
|
10562
10721
|
if (nextPlacement) {
|
10563
|
-
// Try next placement and re-run the lifecycle
|
10722
|
+
// Try next placement and re-run the lifecycle.
|
10564
10723
|
return {
|
10565
10724
|
data: {
|
10566
10725
|
index: nextIndex,
|
@@ -10572,27 +10731,36 @@
|
|
10572
10731
|
};
|
10573
10732
|
}
|
10574
10733
|
|
10575
|
-
|
10576
|
-
|
10577
|
-
|
10578
|
-
case 'bestFit':
|
10579
|
-
{
|
10580
|
-
var _overflowsData$map$so;
|
10581
|
-
|
10582
|
-
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;
|
10734
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
10735
|
+
// then find the placement that fits the best on the main crossAxis side.
|
10736
|
+
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;
|
10583
10737
|
|
10584
|
-
|
10585
|
-
|
10738
|
+
// Otherwise fallback.
|
10739
|
+
if (!resetPlacement) {
|
10740
|
+
switch (fallbackStrategy) {
|
10741
|
+
case 'bestFit':
|
10742
|
+
{
|
10743
|
+
var _overflowsData$filter2;
|
10744
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
10745
|
+
if (hasFallbackAxisSideDirection) {
|
10746
|
+
const currentSideAxis = getSideAxis(d.placement);
|
10747
|
+
return currentSideAxis === initialSideAxis ||
|
10748
|
+
// Create a bias to the `y` side axis due to horizontal
|
10749
|
+
// reading directions favoring greater width.
|
10750
|
+
currentSideAxis === 'y';
|
10751
|
+
}
|
10752
|
+
return true;
|
10753
|
+
}).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];
|
10754
|
+
if (placement) {
|
10755
|
+
resetPlacement = placement;
|
10756
|
+
}
|
10757
|
+
break;
|
10586
10758
|
}
|
10587
|
-
|
10759
|
+
case 'initialPlacement':
|
10760
|
+
resetPlacement = initialPlacement;
|
10588
10761
|
break;
|
10589
|
-
|
10590
|
-
|
10591
|
-
case 'initialPlacement':
|
10592
|
-
resetPlacement = initialPlacement;
|
10593
|
-
break;
|
10762
|
+
}
|
10594
10763
|
}
|
10595
|
-
|
10596
10764
|
if (placement !== resetPlacement) {
|
10597
10765
|
return {
|
10598
10766
|
reset: {
|
@@ -10601,27 +10769,229 @@
|
|
10601
10769
|
};
|
10602
10770
|
}
|
10603
10771
|
}
|
10604
|
-
|
10605
10772
|
return {};
|
10606
10773
|
}
|
10774
|
+
};
|
10775
|
+
};
|
10607
10776
|
|
10777
|
+
function getSideOffsets(overflow, rect) {
|
10778
|
+
return {
|
10779
|
+
top: overflow.top - rect.height,
|
10780
|
+
right: overflow.right - rect.width,
|
10781
|
+
bottom: overflow.bottom - rect.height,
|
10782
|
+
left: overflow.left - rect.width
|
10783
|
+
};
|
10784
|
+
}
|
10785
|
+
function isAnySideFullyClipped(overflow) {
|
10786
|
+
return sides.some(side => overflow[side] >= 0);
|
10787
|
+
}
|
10788
|
+
/**
|
10789
|
+
* Provides data to hide the floating element in applicable situations, such as
|
10790
|
+
* when it is not in the same clipping context as the reference element.
|
10791
|
+
* @see https://floating-ui.com/docs/hide
|
10792
|
+
*/
|
10793
|
+
const hide = function (options) {
|
10794
|
+
if (options === void 0) {
|
10795
|
+
options = {};
|
10796
|
+
}
|
10797
|
+
return {
|
10798
|
+
name: 'hide',
|
10799
|
+
options,
|
10800
|
+
async fn(state) {
|
10801
|
+
const {
|
10802
|
+
rects
|
10803
|
+
} = state;
|
10804
|
+
const {
|
10805
|
+
strategy = 'referenceHidden',
|
10806
|
+
...detectOverflowOptions
|
10807
|
+
} = evaluate(options, state);
|
10808
|
+
switch (strategy) {
|
10809
|
+
case 'referenceHidden':
|
10810
|
+
{
|
10811
|
+
const overflow = await detectOverflow$1(state, {
|
10812
|
+
...detectOverflowOptions,
|
10813
|
+
elementContext: 'reference'
|
10814
|
+
});
|
10815
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
10816
|
+
return {
|
10817
|
+
data: {
|
10818
|
+
referenceHiddenOffsets: offsets,
|
10819
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
10820
|
+
}
|
10821
|
+
};
|
10822
|
+
}
|
10823
|
+
case 'escaped':
|
10824
|
+
{
|
10825
|
+
const overflow = await detectOverflow$1(state, {
|
10826
|
+
...detectOverflowOptions,
|
10827
|
+
altBoundary: true
|
10828
|
+
});
|
10829
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
10830
|
+
return {
|
10831
|
+
data: {
|
10832
|
+
escapedOffsets: offsets,
|
10833
|
+
escaped: isAnySideFullyClipped(offsets)
|
10834
|
+
}
|
10835
|
+
};
|
10836
|
+
}
|
10837
|
+
default:
|
10838
|
+
{
|
10839
|
+
return {};
|
10840
|
+
}
|
10841
|
+
}
|
10842
|
+
}
|
10608
10843
|
};
|
10609
10844
|
};
|
10610
10845
|
|
10611
|
-
|
10846
|
+
function getBoundingRect(rects) {
|
10847
|
+
const minX = min$3(...rects.map(rect => rect.left));
|
10848
|
+
const minY = min$3(...rects.map(rect => rect.top));
|
10849
|
+
const maxX = max$3(...rects.map(rect => rect.right));
|
10850
|
+
const maxY = max$3(...rects.map(rect => rect.bottom));
|
10851
|
+
return {
|
10852
|
+
x: minX,
|
10853
|
+
y: minY,
|
10854
|
+
width: maxX - minX,
|
10855
|
+
height: maxY - minY
|
10856
|
+
};
|
10857
|
+
}
|
10858
|
+
function getRectsByLine(rects) {
|
10859
|
+
const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
|
10860
|
+
const groups = [];
|
10861
|
+
let prevRect = null;
|
10862
|
+
for (let i = 0; i < sortedRects.length; i++) {
|
10863
|
+
const rect = sortedRects[i];
|
10864
|
+
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
|
10865
|
+
groups.push([rect]);
|
10866
|
+
} else {
|
10867
|
+
groups[groups.length - 1].push(rect);
|
10868
|
+
}
|
10869
|
+
prevRect = rect;
|
10870
|
+
}
|
10871
|
+
return groups.map(rect => rectToClientRect$1(getBoundingRect(rect)));
|
10872
|
+
}
|
10873
|
+
/**
|
10874
|
+
* Provides improved positioning for inline reference elements that can span
|
10875
|
+
* over multiple lines, such as hyperlinks or range selections.
|
10876
|
+
* @see https://floating-ui.com/docs/inline
|
10877
|
+
*/
|
10878
|
+
const inline = function (options) {
|
10879
|
+
if (options === void 0) {
|
10880
|
+
options = {};
|
10881
|
+
}
|
10882
|
+
return {
|
10883
|
+
name: 'inline',
|
10884
|
+
options,
|
10885
|
+
async fn(state) {
|
10886
|
+
const {
|
10887
|
+
placement,
|
10888
|
+
elements,
|
10889
|
+
rects,
|
10890
|
+
platform,
|
10891
|
+
strategy
|
10892
|
+
} = state;
|
10893
|
+
// A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
|
10894
|
+
// ClientRect's bounds, despite the event listener being triggered. A
|
10895
|
+
// padding of 2 seems to handle this issue.
|
10896
|
+
const {
|
10897
|
+
padding = 2,
|
10898
|
+
x,
|
10899
|
+
y
|
10900
|
+
} = evaluate(options, state);
|
10901
|
+
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
|
10902
|
+
const clientRects = getRectsByLine(nativeClientRects);
|
10903
|
+
const fallback = rectToClientRect$1(getBoundingRect(nativeClientRects));
|
10904
|
+
const paddingObject = getPaddingObject(padding);
|
10905
|
+
function getBoundingClientRect() {
|
10906
|
+
// There are two rects and they are disjoined.
|
10907
|
+
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
10908
|
+
// Find the first rect in which the point is fully inside.
|
10909
|
+
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;
|
10910
|
+
}
|
10911
|
+
|
10912
|
+
// There are 2 or more connected rects.
|
10913
|
+
if (clientRects.length >= 2) {
|
10914
|
+
if (getSideAxis(placement) === 'y') {
|
10915
|
+
const firstRect = clientRects[0];
|
10916
|
+
const lastRect = clientRects[clientRects.length - 1];
|
10917
|
+
const isTop = getSide$1(placement) === 'top';
|
10918
|
+
const top = firstRect.top;
|
10919
|
+
const bottom = lastRect.bottom;
|
10920
|
+
const left = isTop ? firstRect.left : lastRect.left;
|
10921
|
+
const right = isTop ? firstRect.right : lastRect.right;
|
10922
|
+
const width = right - left;
|
10923
|
+
const height = bottom - top;
|
10924
|
+
return {
|
10925
|
+
top,
|
10926
|
+
bottom,
|
10927
|
+
left,
|
10928
|
+
right,
|
10929
|
+
width,
|
10930
|
+
height,
|
10931
|
+
x: left,
|
10932
|
+
y: top
|
10933
|
+
};
|
10934
|
+
}
|
10935
|
+
const isLeftSide = getSide$1(placement) === 'left';
|
10936
|
+
const maxRight = max$3(...clientRects.map(rect => rect.right));
|
10937
|
+
const minLeft = min$3(...clientRects.map(rect => rect.left));
|
10938
|
+
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
10939
|
+
const top = measureRects[0].top;
|
10940
|
+
const bottom = measureRects[measureRects.length - 1].bottom;
|
10941
|
+
const left = minLeft;
|
10942
|
+
const right = maxRight;
|
10943
|
+
const width = right - left;
|
10944
|
+
const height = bottom - top;
|
10945
|
+
return {
|
10946
|
+
top,
|
10947
|
+
bottom,
|
10948
|
+
left,
|
10949
|
+
right,
|
10950
|
+
width,
|
10951
|
+
height,
|
10952
|
+
x: left,
|
10953
|
+
y: top
|
10954
|
+
};
|
10955
|
+
}
|
10956
|
+
return fallback;
|
10957
|
+
}
|
10958
|
+
const resetRects = await platform.getElementRects({
|
10959
|
+
reference: {
|
10960
|
+
getBoundingClientRect
|
10961
|
+
},
|
10962
|
+
floating: elements.floating,
|
10963
|
+
strategy
|
10964
|
+
});
|
10965
|
+
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) {
|
10966
|
+
return {
|
10967
|
+
reset: {
|
10968
|
+
rects: resetRects
|
10969
|
+
}
|
10970
|
+
};
|
10971
|
+
}
|
10972
|
+
return {};
|
10973
|
+
}
|
10974
|
+
};
|
10975
|
+
};
|
10976
|
+
|
10977
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
10978
|
+
// Derivable.
|
10979
|
+
|
10980
|
+
async function convertValueToCoords$1(state, options) {
|
10612
10981
|
const {
|
10613
10982
|
placement,
|
10614
10983
|
platform,
|
10615
10984
|
elements
|
10616
|
-
} =
|
10985
|
+
} = state;
|
10617
10986
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
10618
|
-
const side = getSide(placement);
|
10619
|
-
const alignment = getAlignment(placement);
|
10620
|
-
const isVertical =
|
10987
|
+
const side = getSide$1(placement);
|
10988
|
+
const alignment = getAlignment$1(placement);
|
10989
|
+
const isVertical = getSideAxis(placement) === 'y';
|
10621
10990
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
10622
10991
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
10623
|
-
const rawValue =
|
10992
|
+
const rawValue = evaluate(options, state);
|
10624
10993
|
|
10994
|
+
// eslint-disable-next-line prefer-const
|
10625
10995
|
let {
|
10626
10996
|
mainAxis,
|
10627
10997
|
crossAxis,
|
@@ -10636,11 +11006,9 @@
|
|
10636
11006
|
alignmentAxis: null,
|
10637
11007
|
...rawValue
|
10638
11008
|
};
|
10639
|
-
|
10640
11009
|
if (alignment && typeof alignmentAxis === 'number') {
|
10641
11010
|
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
10642
11011
|
}
|
10643
|
-
|
10644
11012
|
return isVertical ? {
|
10645
11013
|
x: crossAxis * crossAxisMulti,
|
10646
11014
|
y: mainAxis * mainAxisMulti
|
@@ -10649,60 +11017,66 @@
|
|
10649
11017
|
y: crossAxis * crossAxisMulti
|
10650
11018
|
};
|
10651
11019
|
}
|
11020
|
+
|
10652
11021
|
/**
|
10653
|
-
*
|
11022
|
+
* Modifies the placement by translating the floating element along the
|
11023
|
+
* specified axes.
|
11024
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
11025
|
+
* object may be passed.
|
10654
11026
|
* @see https://floating-ui.com/docs/offset
|
10655
11027
|
*/
|
10656
|
-
|
10657
|
-
|
10658
|
-
|
10659
|
-
value = 0;
|
11028
|
+
const offset$1 = function (options) {
|
11029
|
+
if (options === void 0) {
|
11030
|
+
options = 0;
|
10660
11031
|
}
|
10661
|
-
|
10662
11032
|
return {
|
10663
11033
|
name: 'offset',
|
10664
|
-
options
|
10665
|
-
|
10666
|
-
|
11034
|
+
options,
|
11035
|
+
async fn(state) {
|
11036
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
10667
11037
|
const {
|
10668
11038
|
x,
|
10669
|
-
y
|
10670
|
-
|
10671
|
-
|
11039
|
+
y,
|
11040
|
+
placement,
|
11041
|
+
middlewareData
|
11042
|
+
} = state;
|
11043
|
+
const diffCoords = await convertValueToCoords$1(state, options);
|
11044
|
+
|
11045
|
+
// If the placement is the same and the arrow caused an alignment offset
|
11046
|
+
// then we don't need to change the positioning coordinates.
|
11047
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
11048
|
+
return {};
|
11049
|
+
}
|
10672
11050
|
return {
|
10673
11051
|
x: x + diffCoords.x,
|
10674
11052
|
y: y + diffCoords.y,
|
10675
|
-
data:
|
11053
|
+
data: {
|
11054
|
+
...diffCoords,
|
11055
|
+
placement
|
11056
|
+
}
|
10676
11057
|
};
|
10677
11058
|
}
|
10678
|
-
|
10679
11059
|
};
|
10680
11060
|
};
|
10681
11061
|
|
10682
|
-
function getCrossAxis(axis) {
|
10683
|
-
return axis === 'x' ? 'y' : 'x';
|
10684
|
-
}
|
10685
|
-
|
10686
11062
|
/**
|
10687
|
-
*
|
10688
|
-
*
|
11063
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
11064
|
+
* keep it in view when it will overflow the clipping boundary.
|
10689
11065
|
* @see https://floating-ui.com/docs/shift
|
10690
11066
|
*/
|
10691
|
-
const shift = function (options) {
|
11067
|
+
const shift$1 = function (options) {
|
10692
11068
|
if (options === void 0) {
|
10693
11069
|
options = {};
|
10694
11070
|
}
|
10695
|
-
|
10696
11071
|
return {
|
10697
11072
|
name: 'shift',
|
10698
11073
|
options,
|
10699
|
-
|
10700
|
-
async fn(middlewareArguments) {
|
11074
|
+
async fn(state) {
|
10701
11075
|
const {
|
10702
11076
|
x,
|
10703
11077
|
y,
|
10704
11078
|
placement
|
10705
|
-
} =
|
11079
|
+
} = state;
|
10706
11080
|
const {
|
10707
11081
|
mainAxis: checkMainAxis = true,
|
10708
11082
|
crossAxis: checkCrossAxis = false,
|
@@ -10719,424 +11093,547 @@
|
|
10719
11093
|
}
|
10720
11094
|
},
|
10721
11095
|
...detectOverflowOptions
|
10722
|
-
} = options;
|
11096
|
+
} = evaluate(options, state);
|
10723
11097
|
const coords = {
|
10724
11098
|
x,
|
10725
11099
|
y
|
10726
11100
|
};
|
10727
|
-
const overflow = await detectOverflow(
|
10728
|
-
const
|
10729
|
-
const
|
11101
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
11102
|
+
const crossAxis = getSideAxis(getSide$1(placement));
|
11103
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
10730
11104
|
let mainAxisCoord = coords[mainAxis];
|
10731
11105
|
let crossAxisCoord = coords[crossAxis];
|
10732
|
-
|
10733
11106
|
if (checkMainAxis) {
|
10734
11107
|
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
10735
11108
|
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
10736
11109
|
const min = mainAxisCoord + overflow[minSide];
|
10737
11110
|
const max = mainAxisCoord - overflow[maxSide];
|
10738
|
-
mainAxisCoord =
|
11111
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
10739
11112
|
}
|
10740
|
-
|
10741
11113
|
if (checkCrossAxis) {
|
10742
11114
|
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
10743
11115
|
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
10744
11116
|
const min = crossAxisCoord + overflow[minSide];
|
10745
11117
|
const max = crossAxisCoord - overflow[maxSide];
|
10746
|
-
crossAxisCoord =
|
11118
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
10747
11119
|
}
|
10748
|
-
|
10749
|
-
|
11120
|
+
const limitedCoords = limiter.fn({
|
11121
|
+
...state,
|
10750
11122
|
[mainAxis]: mainAxisCoord,
|
10751
11123
|
[crossAxis]: crossAxisCoord
|
10752
11124
|
});
|
10753
|
-
return {
|
11125
|
+
return {
|
11126
|
+
...limitedCoords,
|
10754
11127
|
data: {
|
10755
11128
|
x: limitedCoords.x - x,
|
10756
11129
|
y: limitedCoords.y - y
|
10757
11130
|
}
|
10758
11131
|
};
|
10759
11132
|
}
|
10760
|
-
|
10761
11133
|
};
|
10762
11134
|
};
|
10763
|
-
|
10764
|
-
|
10765
|
-
|
10766
|
-
|
10767
|
-
|
10768
|
-
|
10769
|
-
return window;
|
11135
|
+
/**
|
11136
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
11137
|
+
*/
|
11138
|
+
const limitShift = function (options) {
|
11139
|
+
if (options === void 0) {
|
11140
|
+
options = {};
|
10770
11141
|
}
|
11142
|
+
return {
|
11143
|
+
options,
|
11144
|
+
fn(state) {
|
11145
|
+
const {
|
11146
|
+
x,
|
11147
|
+
y,
|
11148
|
+
placement,
|
11149
|
+
rects,
|
11150
|
+
middlewareData
|
11151
|
+
} = state;
|
11152
|
+
const {
|
11153
|
+
offset = 0,
|
11154
|
+
mainAxis: checkMainAxis = true,
|
11155
|
+
crossAxis: checkCrossAxis = true
|
11156
|
+
} = evaluate(options, state);
|
11157
|
+
const coords = {
|
11158
|
+
x,
|
11159
|
+
y
|
11160
|
+
};
|
11161
|
+
const crossAxis = getSideAxis(placement);
|
11162
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
11163
|
+
let mainAxisCoord = coords[mainAxis];
|
11164
|
+
let crossAxisCoord = coords[crossAxis];
|
11165
|
+
const rawOffset = evaluate(offset, state);
|
11166
|
+
const computedOffset = typeof rawOffset === 'number' ? {
|
11167
|
+
mainAxis: rawOffset,
|
11168
|
+
crossAxis: 0
|
11169
|
+
} : {
|
11170
|
+
mainAxis: 0,
|
11171
|
+
crossAxis: 0,
|
11172
|
+
...rawOffset
|
11173
|
+
};
|
11174
|
+
if (checkMainAxis) {
|
11175
|
+
const len = mainAxis === 'y' ? 'height' : 'width';
|
11176
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
11177
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
11178
|
+
if (mainAxisCoord < limitMin) {
|
11179
|
+
mainAxisCoord = limitMin;
|
11180
|
+
} else if (mainAxisCoord > limitMax) {
|
11181
|
+
mainAxisCoord = limitMax;
|
11182
|
+
}
|
11183
|
+
}
|
11184
|
+
if (checkCrossAxis) {
|
11185
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
11186
|
+
const len = mainAxis === 'y' ? 'width' : 'height';
|
11187
|
+
const isOriginSide = ['top', 'left'].includes(getSide$1(placement));
|
11188
|
+
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);
|
11189
|
+
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);
|
11190
|
+
if (crossAxisCoord < limitMin) {
|
11191
|
+
crossAxisCoord = limitMin;
|
11192
|
+
} else if (crossAxisCoord > limitMax) {
|
11193
|
+
crossAxisCoord = limitMax;
|
11194
|
+
}
|
11195
|
+
}
|
11196
|
+
return {
|
11197
|
+
[mainAxis]: mainAxisCoord,
|
11198
|
+
[crossAxis]: crossAxisCoord
|
11199
|
+
};
|
11200
|
+
}
|
11201
|
+
};
|
11202
|
+
};
|
10771
11203
|
|
10772
|
-
|
10773
|
-
|
10774
|
-
|
11204
|
+
/**
|
11205
|
+
* Provides data that allows you to change the size of the floating element —
|
11206
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
11207
|
+
* width of the reference element.
|
11208
|
+
* @see https://floating-ui.com/docs/size
|
11209
|
+
*/
|
11210
|
+
const size = function (options) {
|
11211
|
+
if (options === void 0) {
|
11212
|
+
options = {};
|
10775
11213
|
}
|
11214
|
+
return {
|
11215
|
+
name: 'size',
|
11216
|
+
options,
|
11217
|
+
async fn(state) {
|
11218
|
+
const {
|
11219
|
+
placement,
|
11220
|
+
rects,
|
11221
|
+
platform,
|
11222
|
+
elements
|
11223
|
+
} = state;
|
11224
|
+
const {
|
11225
|
+
apply = () => {},
|
11226
|
+
...detectOverflowOptions
|
11227
|
+
} = evaluate(options, state);
|
11228
|
+
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
11229
|
+
const side = getSide$1(placement);
|
11230
|
+
const alignment = getAlignment$1(placement);
|
11231
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
11232
|
+
const {
|
11233
|
+
width,
|
11234
|
+
height
|
11235
|
+
} = rects.floating;
|
11236
|
+
let heightSide;
|
11237
|
+
let widthSide;
|
11238
|
+
if (side === 'top' || side === 'bottom') {
|
11239
|
+
heightSide = side;
|
11240
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
11241
|
+
} else {
|
11242
|
+
widthSide = side;
|
11243
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
11244
|
+
}
|
11245
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
11246
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
11247
|
+
const overflowAvailableHeight = min$3(height - overflow[heightSide], maximumClippingHeight);
|
11248
|
+
const overflowAvailableWidth = min$3(width - overflow[widthSide], maximumClippingWidth);
|
11249
|
+
const noShift = !state.middlewareData.shift;
|
11250
|
+
let availableHeight = overflowAvailableHeight;
|
11251
|
+
let availableWidth = overflowAvailableWidth;
|
11252
|
+
if (isYAxis) {
|
11253
|
+
availableWidth = alignment || noShift ? min$3(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
11254
|
+
} else {
|
11255
|
+
availableHeight = alignment || noShift ? min$3(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
11256
|
+
}
|
11257
|
+
if (noShift && !alignment) {
|
11258
|
+
const xMin = max$3(overflow.left, 0);
|
11259
|
+
const xMax = max$3(overflow.right, 0);
|
11260
|
+
const yMin = max$3(overflow.top, 0);
|
11261
|
+
const yMax = max$3(overflow.bottom, 0);
|
11262
|
+
if (isYAxis) {
|
11263
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$3(overflow.left, overflow.right));
|
11264
|
+
} else {
|
11265
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$3(overflow.top, overflow.bottom));
|
11266
|
+
}
|
11267
|
+
}
|
11268
|
+
await apply({
|
11269
|
+
...state,
|
11270
|
+
availableWidth,
|
11271
|
+
availableHeight
|
11272
|
+
});
|
11273
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
11274
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
11275
|
+
return {
|
11276
|
+
reset: {
|
11277
|
+
rects: true
|
11278
|
+
}
|
11279
|
+
};
|
11280
|
+
}
|
11281
|
+
return {};
|
11282
|
+
}
|
11283
|
+
};
|
11284
|
+
};
|
10776
11285
|
|
10777
|
-
|
10778
|
-
|
10779
|
-
|
10780
|
-
|
10781
|
-
|
11286
|
+
function getNodeName$1(node) {
|
11287
|
+
if (isNode$1(node)) {
|
11288
|
+
return (node.nodeName || '').toLowerCase();
|
11289
|
+
}
|
11290
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
11291
|
+
// returning `#document` an infinite loop won't occur.
|
11292
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
11293
|
+
return '#document';
|
10782
11294
|
}
|
10783
|
-
|
10784
|
-
|
10785
|
-
return
|
11295
|
+
function getWindow$1(node) {
|
11296
|
+
var _node$ownerDocument;
|
11297
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
10786
11298
|
}
|
10787
|
-
|
10788
|
-
|
10789
|
-
|
10790
|
-
|
10791
|
-
if (uaData != null && uaData.brands) {
|
10792
|
-
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
10793
|
-
}
|
10794
|
-
|
10795
|
-
return navigator.userAgent;
|
11299
|
+
function getDocumentElement$1(node) {
|
11300
|
+
var _ref;
|
11301
|
+
return (_ref = (isNode$1(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
10796
11302
|
}
|
10797
|
-
|
10798
|
-
|
10799
|
-
return value instanceof getWindow(value).HTMLElement;
|
11303
|
+
function isNode$1(value) {
|
11304
|
+
return value instanceof Node || value instanceof getWindow$1(value).Node;
|
10800
11305
|
}
|
10801
|
-
function isElement(value) {
|
10802
|
-
return value instanceof getWindow(value).Element;
|
11306
|
+
function isElement$1(value) {
|
11307
|
+
return value instanceof Element || value instanceof getWindow$1(value).Element;
|
10803
11308
|
}
|
10804
|
-
function
|
10805
|
-
return value instanceof getWindow(value).
|
11309
|
+
function isHTMLElement$1(value) {
|
11310
|
+
return value instanceof HTMLElement || value instanceof getWindow$1(value).HTMLElement;
|
10806
11311
|
}
|
10807
|
-
function isShadowRoot(
|
10808
|
-
// Browsers without `ShadowRoot` support
|
11312
|
+
function isShadowRoot$1(value) {
|
11313
|
+
// Browsers without `ShadowRoot` support.
|
10809
11314
|
if (typeof ShadowRoot === 'undefined') {
|
10810
11315
|
return false;
|
10811
11316
|
}
|
10812
|
-
|
10813
|
-
const OwnElement = getWindow(node).ShadowRoot;
|
10814
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
11317
|
+
return value instanceof ShadowRoot || value instanceof getWindow$1(value).ShadowRoot;
|
10815
11318
|
}
|
10816
|
-
function isOverflowElement(element) {
|
10817
|
-
// Firefox wants us to check `-x` and `-y` variations as well
|
11319
|
+
function isOverflowElement$1(element) {
|
10818
11320
|
const {
|
10819
11321
|
overflow,
|
10820
11322
|
overflowX,
|
10821
|
-
overflowY
|
10822
|
-
|
10823
|
-
|
10824
|
-
|
10825
|
-
function isTableElement(element) {
|
10826
|
-
return ['table', 'td', 'th'].includes(getNodeName(element));
|
11323
|
+
overflowY,
|
11324
|
+
display
|
11325
|
+
} = getComputedStyle$2(element);
|
11326
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
10827
11327
|
}
|
10828
|
-
function
|
10829
|
-
|
10830
|
-
const isFirefox = /firefox/i.test(getUAString());
|
10831
|
-
const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that
|
10832
|
-
// create a containing block.
|
10833
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
10834
|
-
|
10835
|
-
return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
|
10836
|
-
css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
|
11328
|
+
function isTableElement$1(element) {
|
11329
|
+
return ['table', 'td', 'th'].includes(getNodeName$1(element));
|
10837
11330
|
}
|
10838
|
-
function
|
10839
|
-
|
10840
|
-
|
10841
|
-
|
10842
|
-
|
10843
|
-
|
10844
|
-
|
11331
|
+
function isTopLayer(element) {
|
11332
|
+
return [':popover-open', ':modal'].some(selector => {
|
11333
|
+
try {
|
11334
|
+
return element.matches(selector);
|
11335
|
+
} catch (e) {
|
11336
|
+
return false;
|
11337
|
+
}
|
11338
|
+
});
|
10845
11339
|
}
|
11340
|
+
function isContainingBlock$1(elementOrCss) {
|
11341
|
+
const webkit = isWebKit();
|
11342
|
+
const css = isElement$1(elementOrCss) ? getComputedStyle$2(elementOrCss) : elementOrCss;
|
10846
11343
|
|
10847
|
-
|
10848
|
-
|
10849
|
-
|
10850
|
-
|
10851
|
-
|
10852
|
-
|
10853
|
-
|
10854
|
-
|
10855
|
-
|
10856
|
-
|
10857
|
-
|
10858
|
-
|
10859
|
-
isFixedStrategy = false;
|
10860
|
-
}
|
10861
|
-
|
10862
|
-
const clientRect = element.getBoundingClientRect();
|
10863
|
-
let scaleX = 1;
|
10864
|
-
let scaleY = 1;
|
10865
|
-
|
10866
|
-
if (includeScale && isHTMLElement(element)) {
|
10867
|
-
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
10868
|
-
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
11344
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
11345
|
+
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));
|
11346
|
+
}
|
11347
|
+
function getContainingBlock$1(element) {
|
11348
|
+
let currentNode = getParentNode$1(element);
|
11349
|
+
while (isHTMLElement$1(currentNode) && !isLastTraversableNode(currentNode)) {
|
11350
|
+
if (isContainingBlock$1(currentNode)) {
|
11351
|
+
return currentNode;
|
11352
|
+
} else if (isTopLayer(currentNode)) {
|
11353
|
+
return null;
|
11354
|
+
}
|
11355
|
+
currentNode = getParentNode$1(currentNode);
|
10869
11356
|
}
|
10870
|
-
|
10871
|
-
const win = isElement(element) ? getWindow(element) : window;
|
10872
|
-
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
10873
|
-
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;
|
10874
|
-
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;
|
10875
|
-
const width = clientRect.width / scaleX;
|
10876
|
-
const height = clientRect.height / scaleY;
|
10877
|
-
return {
|
10878
|
-
width,
|
10879
|
-
height,
|
10880
|
-
top: y,
|
10881
|
-
right: x + width,
|
10882
|
-
bottom: y + height,
|
10883
|
-
left: x,
|
10884
|
-
x,
|
10885
|
-
y
|
10886
|
-
};
|
11357
|
+
return null;
|
10887
11358
|
}
|
10888
|
-
|
10889
|
-
|
10890
|
-
return (
|
11359
|
+
function isWebKit() {
|
11360
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
11361
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
10891
11362
|
}
|
10892
|
-
|
10893
|
-
|
10894
|
-
|
11363
|
+
function isLastTraversableNode(node) {
|
11364
|
+
return ['html', 'body', '#document'].includes(getNodeName$1(node));
|
11365
|
+
}
|
11366
|
+
function getComputedStyle$2(element) {
|
11367
|
+
return getWindow$1(element).getComputedStyle(element);
|
11368
|
+
}
|
11369
|
+
function getNodeScroll$1(element) {
|
11370
|
+
if (isElement$1(element)) {
|
10895
11371
|
return {
|
10896
11372
|
scrollLeft: element.scrollLeft,
|
10897
11373
|
scrollTop: element.scrollTop
|
10898
11374
|
};
|
10899
11375
|
}
|
10900
|
-
|
10901
11376
|
return {
|
10902
|
-
scrollLeft: element.
|
10903
|
-
scrollTop: element.
|
11377
|
+
scrollLeft: element.scrollX,
|
11378
|
+
scrollTop: element.scrollY
|
10904
11379
|
};
|
10905
11380
|
}
|
10906
|
-
|
10907
|
-
|
10908
|
-
|
10909
|
-
|
10910
|
-
|
11381
|
+
function getParentNode$1(node) {
|
11382
|
+
if (getNodeName$1(node) === 'html') {
|
11383
|
+
return node;
|
11384
|
+
}
|
11385
|
+
const result =
|
11386
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
11387
|
+
node.assignedSlot ||
|
11388
|
+
// DOM Element detected.
|
11389
|
+
node.parentNode ||
|
11390
|
+
// ShadowRoot detected.
|
11391
|
+
isShadowRoot$1(node) && node.host ||
|
11392
|
+
// Fallback.
|
11393
|
+
getDocumentElement$1(node);
|
11394
|
+
return isShadowRoot$1(result) ? result.host : result;
|
11395
|
+
}
|
11396
|
+
function getNearestOverflowAncestor$1(node) {
|
11397
|
+
const parentNode = getParentNode$1(node);
|
11398
|
+
if (isLastTraversableNode(parentNode)) {
|
11399
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
11400
|
+
}
|
11401
|
+
if (isHTMLElement$1(parentNode) && isOverflowElement$1(parentNode)) {
|
11402
|
+
return parentNode;
|
11403
|
+
}
|
11404
|
+
return getNearestOverflowAncestor$1(parentNode);
|
10911
11405
|
}
|
10912
|
-
|
10913
|
-
|
10914
|
-
|
10915
|
-
|
11406
|
+
function getOverflowAncestors$1(node, list, traverseIframes) {
|
11407
|
+
var _node$ownerDocument2;
|
11408
|
+
if (list === void 0) {
|
11409
|
+
list = [];
|
11410
|
+
}
|
11411
|
+
if (traverseIframes === void 0) {
|
11412
|
+
traverseIframes = true;
|
11413
|
+
}
|
11414
|
+
const scrollableAncestor = getNearestOverflowAncestor$1(node);
|
11415
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
11416
|
+
const win = getWindow$1(scrollableAncestor);
|
11417
|
+
if (isBody) {
|
11418
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement$1(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors$1(win.frameElement) : []);
|
11419
|
+
}
|
11420
|
+
return list.concat(scrollableAncestor, getOverflowAncestors$1(scrollableAncestor, [], traverseIframes));
|
10916
11421
|
}
|
10917
11422
|
|
10918
|
-
function
|
10919
|
-
const
|
10920
|
-
|
10921
|
-
|
10922
|
-
|
10923
|
-
let
|
10924
|
-
|
10925
|
-
|
10926
|
-
|
10927
|
-
const
|
10928
|
-
|
10929
|
-
|
10930
|
-
|
10931
|
-
|
10932
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
10933
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
10934
|
-
scroll = getNodeScroll(offsetParent);
|
10935
|
-
}
|
10936
|
-
|
10937
|
-
if (isHTMLElement(offsetParent)) {
|
10938
|
-
const offsetRect = getBoundingClientRect(offsetParent, true);
|
10939
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
10940
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
10941
|
-
} else if (documentElement) {
|
10942
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
10943
|
-
}
|
11423
|
+
function getCssDimensions(element) {
|
11424
|
+
const css = getComputedStyle$2(element);
|
11425
|
+
// In testing environments, the `width` and `height` properties are empty
|
11426
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
11427
|
+
let width = parseFloat(css.width) || 0;
|
11428
|
+
let height = parseFloat(css.height) || 0;
|
11429
|
+
const hasOffset = isHTMLElement$1(element);
|
11430
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
11431
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
11432
|
+
const shouldFallback = round$1(width) !== offsetWidth || round$1(height) !== offsetHeight;
|
11433
|
+
if (shouldFallback) {
|
11434
|
+
width = offsetWidth;
|
11435
|
+
height = offsetHeight;
|
10944
11436
|
}
|
10945
|
-
|
10946
11437
|
return {
|
10947
|
-
|
10948
|
-
|
10949
|
-
|
10950
|
-
height: rect.height
|
11438
|
+
width,
|
11439
|
+
height,
|
11440
|
+
$: shouldFallback
|
10951
11441
|
};
|
10952
11442
|
}
|
10953
11443
|
|
10954
|
-
function
|
10955
|
-
|
10956
|
-
return node;
|
10957
|
-
}
|
10958
|
-
|
10959
|
-
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
10960
|
-
// @ts-ignore
|
10961
|
-
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
10962
|
-
node.parentNode || ( // DOM Element detected
|
10963
|
-
isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
10964
|
-
getDocumentElement(node) // fallback
|
10965
|
-
|
10966
|
-
);
|
11444
|
+
function unwrapElement(element) {
|
11445
|
+
return !isElement$1(element) ? element.contextElement : element;
|
10967
11446
|
}
|
10968
11447
|
|
10969
|
-
function
|
10970
|
-
|
10971
|
-
|
11448
|
+
function getScale(element) {
|
11449
|
+
const domElement = unwrapElement(element);
|
11450
|
+
if (!isHTMLElement$1(domElement)) {
|
11451
|
+
return createCoords(1);
|
10972
11452
|
}
|
11453
|
+
const rect = domElement.getBoundingClientRect();
|
11454
|
+
const {
|
11455
|
+
width,
|
11456
|
+
height,
|
11457
|
+
$
|
11458
|
+
} = getCssDimensions(domElement);
|
11459
|
+
let x = ($ ? round$1(rect.width) : rect.width) / width;
|
11460
|
+
let y = ($ ? round$1(rect.height) : rect.height) / height;
|
10973
11461
|
|
10974
|
-
|
10975
|
-
}
|
10976
|
-
/**
|
10977
|
-
* Polyfills the old offsetParent behavior from before the spec was changed:
|
10978
|
-
* https://github.com/w3c/csswg-drafts/issues/159
|
10979
|
-
*/
|
10980
|
-
|
10981
|
-
|
10982
|
-
function composedOffsetParent(element) {
|
10983
|
-
let {
|
10984
|
-
offsetParent
|
10985
|
-
} = element;
|
10986
|
-
let ancestor = element;
|
10987
|
-
let foundInsideSlot = false;
|
10988
|
-
|
10989
|
-
while (ancestor && ancestor !== offsetParent) {
|
10990
|
-
const {
|
10991
|
-
assignedSlot
|
10992
|
-
} = ancestor;
|
10993
|
-
|
10994
|
-
if (assignedSlot) {
|
10995
|
-
let newOffsetParent = assignedSlot.offsetParent;
|
10996
|
-
|
10997
|
-
if (getComputedStyle$1(assignedSlot).display === 'contents') {
|
10998
|
-
const hadStyleAttribute = assignedSlot.hasAttribute('style');
|
10999
|
-
const oldDisplay = assignedSlot.style.display;
|
11000
|
-
assignedSlot.style.display = getComputedStyle$1(ancestor).display;
|
11001
|
-
newOffsetParent = assignedSlot.offsetParent;
|
11002
|
-
assignedSlot.style.display = oldDisplay;
|
11003
|
-
|
11004
|
-
if (!hadStyleAttribute) {
|
11005
|
-
assignedSlot.removeAttribute('style');
|
11006
|
-
}
|
11007
|
-
}
|
11008
|
-
|
11009
|
-
ancestor = assignedSlot;
|
11010
|
-
|
11011
|
-
if (offsetParent !== newOffsetParent) {
|
11012
|
-
offsetParent = newOffsetParent;
|
11013
|
-
foundInsideSlot = true;
|
11014
|
-
}
|
11015
|
-
} else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
|
11016
|
-
break;
|
11017
|
-
}
|
11462
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
11018
11463
|
|
11019
|
-
|
11464
|
+
if (!x || !Number.isFinite(x)) {
|
11465
|
+
x = 1;
|
11020
11466
|
}
|
11021
|
-
|
11022
|
-
|
11023
|
-
}
|
11024
|
-
|
11025
|
-
function getContainingBlock(element) {
|
11026
|
-
let currentNode = getParentNode(element);
|
11027
|
-
|
11028
|
-
if (isShadowRoot(currentNode)) {
|
11029
|
-
currentNode = currentNode.host;
|
11467
|
+
if (!y || !Number.isFinite(y)) {
|
11468
|
+
y = 1;
|
11030
11469
|
}
|
11470
|
+
return {
|
11471
|
+
x,
|
11472
|
+
y
|
11473
|
+
};
|
11474
|
+
}
|
11031
11475
|
|
11032
|
-
|
11033
|
-
|
11034
|
-
|
11035
|
-
|
11036
|
-
|
11037
|
-
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
11038
|
-
}
|
11476
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
11477
|
+
function getVisualOffsets(element) {
|
11478
|
+
const win = getWindow$1(element);
|
11479
|
+
if (!isWebKit() || !win.visualViewport) {
|
11480
|
+
return noOffsets;
|
11039
11481
|
}
|
11040
|
-
|
11041
|
-
|
11042
|
-
|
11043
|
-
|
11044
|
-
|
11045
|
-
|
11046
|
-
|
11047
|
-
|
11048
|
-
let offsetParent = getTrueOffsetParent(element);
|
11049
|
-
|
11050
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
11051
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
11482
|
+
return {
|
11483
|
+
x: win.visualViewport.offsetLeft,
|
11484
|
+
y: win.visualViewport.offsetTop
|
11485
|
+
};
|
11486
|
+
}
|
11487
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
11488
|
+
if (isFixed === void 0) {
|
11489
|
+
isFixed = false;
|
11052
11490
|
}
|
11053
|
-
|
11054
|
-
|
11055
|
-
return window;
|
11491
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow$1(element)) {
|
11492
|
+
return false;
|
11056
11493
|
}
|
11057
|
-
|
11058
|
-
return offsetParent || getContainingBlock(element) || window;
|
11494
|
+
return isFixed;
|
11059
11495
|
}
|
11060
11496
|
|
11061
|
-
function
|
11062
|
-
if (
|
11063
|
-
|
11064
|
-
width: element.offsetWidth,
|
11065
|
-
height: element.offsetHeight
|
11066
|
-
};
|
11497
|
+
function getBoundingClientRect$1(element, includeScale, isFixedStrategy, offsetParent) {
|
11498
|
+
if (includeScale === void 0) {
|
11499
|
+
includeScale = false;
|
11067
11500
|
}
|
11068
|
-
|
11069
|
-
|
11070
|
-
|
11071
|
-
|
11072
|
-
|
11073
|
-
|
11501
|
+
if (isFixedStrategy === void 0) {
|
11502
|
+
isFixedStrategy = false;
|
11503
|
+
}
|
11504
|
+
const clientRect = element.getBoundingClientRect();
|
11505
|
+
const domElement = unwrapElement(element);
|
11506
|
+
let scale = createCoords(1);
|
11507
|
+
if (includeScale) {
|
11508
|
+
if (offsetParent) {
|
11509
|
+
if (isElement$1(offsetParent)) {
|
11510
|
+
scale = getScale(offsetParent);
|
11511
|
+
}
|
11512
|
+
} else {
|
11513
|
+
scale = getScale(element);
|
11514
|
+
}
|
11515
|
+
}
|
11516
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
11517
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
11518
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
11519
|
+
let width = clientRect.width / scale.x;
|
11520
|
+
let height = clientRect.height / scale.y;
|
11521
|
+
if (domElement) {
|
11522
|
+
const win = getWindow$1(domElement);
|
11523
|
+
const offsetWin = offsetParent && isElement$1(offsetParent) ? getWindow$1(offsetParent) : offsetParent;
|
11524
|
+
let currentWin = win;
|
11525
|
+
let currentIFrame = currentWin.frameElement;
|
11526
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
11527
|
+
const iframeScale = getScale(currentIFrame);
|
11528
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
11529
|
+
const css = getComputedStyle$2(currentIFrame);
|
11530
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
11531
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
11532
|
+
x *= iframeScale.x;
|
11533
|
+
y *= iframeScale.y;
|
11534
|
+
width *= iframeScale.x;
|
11535
|
+
height *= iframeScale.y;
|
11536
|
+
x += left;
|
11537
|
+
y += top;
|
11538
|
+
currentWin = getWindow$1(currentIFrame);
|
11539
|
+
currentIFrame = currentWin.frameElement;
|
11540
|
+
}
|
11541
|
+
}
|
11542
|
+
return rectToClientRect$1({
|
11543
|
+
width,
|
11544
|
+
height,
|
11545
|
+
x,
|
11546
|
+
y
|
11547
|
+
});
|
11074
11548
|
}
|
11075
11549
|
|
11076
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
11550
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect$1(_ref) {
|
11077
11551
|
let {
|
11552
|
+
elements,
|
11078
11553
|
rect,
|
11079
11554
|
offsetParent,
|
11080
11555
|
strategy
|
11081
11556
|
} = _ref;
|
11082
|
-
const
|
11083
|
-
const documentElement = getDocumentElement(offsetParent);
|
11084
|
-
|
11085
|
-
if (offsetParent === documentElement) {
|
11557
|
+
const isFixed = strategy === 'fixed';
|
11558
|
+
const documentElement = getDocumentElement$1(offsetParent);
|
11559
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
11560
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
11086
11561
|
return rect;
|
11087
11562
|
}
|
11088
|
-
|
11089
11563
|
let scroll = {
|
11090
11564
|
scrollLeft: 0,
|
11091
11565
|
scrollTop: 0
|
11092
11566
|
};
|
11093
|
-
|
11094
|
-
|
11095
|
-
|
11096
|
-
|
11097
|
-
|
11098
|
-
|
11099
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
11100
|
-
scroll = getNodeScroll(offsetParent);
|
11567
|
+
let scale = createCoords(1);
|
11568
|
+
const offsets = createCoords(0);
|
11569
|
+
const isOffsetParentAnElement = isHTMLElement$1(offsetParent);
|
11570
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
11571
|
+
if (getNodeName$1(offsetParent) !== 'body' || isOverflowElement$1(documentElement)) {
|
11572
|
+
scroll = getNodeScroll$1(offsetParent);
|
11101
11573
|
}
|
11102
|
-
|
11103
|
-
|
11104
|
-
|
11574
|
+
if (isHTMLElement$1(offsetParent)) {
|
11575
|
+
const offsetRect = getBoundingClientRect$1(offsetParent);
|
11576
|
+
scale = getScale(offsetParent);
|
11105
11577
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
11106
11578
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
11107
|
-
}
|
11108
|
-
// else if (documentElement) {
|
11109
|
-
// offsets.x = getWindowScrollBarX(documentElement);
|
11110
|
-
// }
|
11111
|
-
|
11579
|
+
}
|
11112
11580
|
}
|
11581
|
+
return {
|
11582
|
+
width: rect.width * scale.x,
|
11583
|
+
height: rect.height * scale.y,
|
11584
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
11585
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
11586
|
+
};
|
11587
|
+
}
|
11113
11588
|
|
11114
|
-
|
11115
|
-
|
11116
|
-
|
11589
|
+
function getClientRects(element) {
|
11590
|
+
return Array.from(element.getClientRects());
|
11591
|
+
}
|
11592
|
+
|
11593
|
+
function getWindowScrollBarX$1(element) {
|
11594
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
11595
|
+
// incorrect for RTL.
|
11596
|
+
return getBoundingClientRect$1(getDocumentElement$1(element)).left + getNodeScroll$1(element).scrollLeft;
|
11597
|
+
}
|
11598
|
+
|
11599
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
11600
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
11601
|
+
function getDocumentRect$1(element) {
|
11602
|
+
const html = getDocumentElement$1(element);
|
11603
|
+
const scroll = getNodeScroll$1(element);
|
11604
|
+
const body = element.ownerDocument.body;
|
11605
|
+
const width = max$3(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
11606
|
+
const height = max$3(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
11607
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX$1(element);
|
11608
|
+
const y = -scroll.scrollTop;
|
11609
|
+
if (getComputedStyle$2(body).direction === 'rtl') {
|
11610
|
+
x += max$3(html.clientWidth, body.clientWidth) - width;
|
11611
|
+
}
|
11612
|
+
return {
|
11613
|
+
width,
|
11614
|
+
height,
|
11615
|
+
x,
|
11616
|
+
y
|
11117
11617
|
};
|
11118
11618
|
}
|
11119
11619
|
|
11120
|
-
function getViewportRect(element, strategy) {
|
11121
|
-
const win = getWindow(element);
|
11122
|
-
const html = getDocumentElement(element);
|
11620
|
+
function getViewportRect$1(element, strategy) {
|
11621
|
+
const win = getWindow$1(element);
|
11622
|
+
const html = getDocumentElement$1(element);
|
11123
11623
|
const visualViewport = win.visualViewport;
|
11124
11624
|
let width = html.clientWidth;
|
11125
11625
|
let height = html.clientHeight;
|
11126
11626
|
let x = 0;
|
11127
11627
|
let y = 0;
|
11128
|
-
|
11129
11628
|
if (visualViewport) {
|
11130
11629
|
width = visualViewport.width;
|
11131
11630
|
height = visualViewport.height;
|
11132
|
-
const
|
11133
|
-
|
11134
|
-
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
11631
|
+
const visualViewportBased = isWebKit();
|
11632
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
11135
11633
|
x = visualViewport.offsetLeft;
|
11136
11634
|
y = visualViewport.offsetTop;
|
11137
11635
|
}
|
11138
11636
|
}
|
11139
|
-
|
11140
11637
|
return {
|
11141
11638
|
width,
|
11142
11639
|
height,
|
@@ -11145,23 +11642,16 @@
|
|
11145
11642
|
};
|
11146
11643
|
}
|
11147
11644
|
|
11148
|
-
//
|
11149
|
-
|
11150
|
-
|
11151
|
-
|
11152
|
-
|
11153
|
-
const
|
11154
|
-
const
|
11155
|
-
const
|
11156
|
-
const
|
11157
|
-
const
|
11158
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
11159
|
-
const y = -scroll.scrollTop;
|
11160
|
-
|
11161
|
-
if (getComputedStyle$1(body || html).direction === 'rtl') {
|
11162
|
-
x += max$1(html.clientWidth, body ? body.clientWidth : 0) - width;
|
11163
|
-
}
|
11164
|
-
|
11645
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
11646
|
+
function getInnerBoundingClientRect$1(element, strategy) {
|
11647
|
+
const clientRect = getBoundingClientRect$1(element, true, strategy === 'fixed');
|
11648
|
+
const top = clientRect.top + element.clientTop;
|
11649
|
+
const left = clientRect.left + element.clientLeft;
|
11650
|
+
const scale = isHTMLElement$1(element) ? getScale(element) : createCoords(1);
|
11651
|
+
const width = element.clientWidth * scale.x;
|
11652
|
+
const height = element.clientHeight * scale.y;
|
11653
|
+
const x = left * scale.x;
|
11654
|
+
const y = top * scale.y;
|
11165
11655
|
return {
|
11166
11656
|
width,
|
11167
11657
|
height,
|
@@ -11169,125 +11659,86 @@
|
|
11169
11659
|
y
|
11170
11660
|
};
|
11171
11661
|
}
|
11172
|
-
|
11173
|
-
|
11174
|
-
|
11175
|
-
|
11176
|
-
if (
|
11177
|
-
|
11178
|
-
|
11179
|
-
|
11180
|
-
|
11181
|
-
|
11182
|
-
|
11183
|
-
|
11184
|
-
|
11185
|
-
|
11186
|
-
|
11187
|
-
|
11188
|
-
function getOverflowAncestors(node, list) {
|
11189
|
-
var _node$ownerDocument;
|
11190
|
-
|
11191
|
-
if (list === void 0) {
|
11192
|
-
list = [];
|
11662
|
+
function getClientRectFromClippingAncestor$1(element, clippingAncestor, strategy) {
|
11663
|
+
let rect;
|
11664
|
+
if (clippingAncestor === 'viewport') {
|
11665
|
+
rect = getViewportRect$1(element, strategy);
|
11666
|
+
} else if (clippingAncestor === 'document') {
|
11667
|
+
rect = getDocumentRect$1(getDocumentElement$1(element));
|
11668
|
+
} else if (isElement$1(clippingAncestor)) {
|
11669
|
+
rect = getInnerBoundingClientRect$1(clippingAncestor, strategy);
|
11670
|
+
} else {
|
11671
|
+
const visualOffsets = getVisualOffsets(element);
|
11672
|
+
rect = {
|
11673
|
+
...clippingAncestor,
|
11674
|
+
x: clippingAncestor.x - visualOffsets.x,
|
11675
|
+
y: clippingAncestor.y - visualOffsets.y
|
11676
|
+
};
|
11193
11677
|
}
|
11194
|
-
|
11195
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
11196
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
11197
|
-
const win = getWindow(scrollableAncestor);
|
11198
|
-
const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
|
11199
|
-
const updatedList = list.concat(target);
|
11200
|
-
return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
|
11201
|
-
updatedList.concat(getOverflowAncestors(target));
|
11678
|
+
return rectToClientRect$1(rect);
|
11202
11679
|
}
|
11203
|
-
|
11204
|
-
|
11205
|
-
|
11206
|
-
|
11207
|
-
if (parent.contains(child)) {
|
11208
|
-
return true;
|
11209
|
-
} // then fallback to custom implementation with Shadow DOM support
|
11210
|
-
else if (rootNode && isShadowRoot(rootNode)) {
|
11211
|
-
let next = child;
|
11212
|
-
|
11213
|
-
do {
|
11214
|
-
// use `===` replace node.isSameNode()
|
11215
|
-
if (next && parent === next) {
|
11216
|
-
return true;
|
11217
|
-
} // @ts-ignore: need a better way to handle this...
|
11218
|
-
|
11219
|
-
|
11220
|
-
next = next.parentNode || next.host;
|
11221
|
-
} while (next);
|
11680
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
11681
|
+
const parentNode = getParentNode$1(element);
|
11682
|
+
if (parentNode === stopNode || !isElement$1(parentNode) || isLastTraversableNode(parentNode)) {
|
11683
|
+
return false;
|
11222
11684
|
}
|
11223
|
-
|
11224
|
-
return false;
|
11225
|
-
}
|
11226
|
-
|
11227
|
-
function getInnerBoundingClientRect(element, strategy) {
|
11228
|
-
const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
|
11229
|
-
const top = clientRect.top + element.clientTop;
|
11230
|
-
const left = clientRect.left + element.clientLeft;
|
11231
|
-
return {
|
11232
|
-
top,
|
11233
|
-
left,
|
11234
|
-
x: left,
|
11235
|
-
y: top,
|
11236
|
-
right: left + element.clientWidth,
|
11237
|
-
bottom: top + element.clientHeight,
|
11238
|
-
width: element.clientWidth,
|
11239
|
-
height: element.clientHeight
|
11240
|
-
};
|
11685
|
+
return getComputedStyle$2(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
11241
11686
|
}
|
11242
11687
|
|
11243
|
-
|
11244
|
-
|
11245
|
-
|
11688
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
11689
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
11690
|
+
// of the given element up the tree.
|
11691
|
+
function getClippingElementAncestors(element, cache) {
|
11692
|
+
const cachedResult = cache.get(element);
|
11693
|
+
if (cachedResult) {
|
11694
|
+
return cachedResult;
|
11246
11695
|
}
|
11696
|
+
let result = getOverflowAncestors$1(element, [], false).filter(el => isElement$1(el) && getNodeName$1(el) !== 'body');
|
11697
|
+
let currentContainingBlockComputedStyle = null;
|
11698
|
+
const elementIsFixed = getComputedStyle$2(element).position === 'fixed';
|
11699
|
+
let currentNode = elementIsFixed ? getParentNode$1(element) : element;
|
11247
11700
|
|
11248
|
-
|
11249
|
-
|
11701
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
11702
|
+
while (isElement$1(currentNode) && !isLastTraversableNode(currentNode)) {
|
11703
|
+
const computedStyle = getComputedStyle$2(currentNode);
|
11704
|
+
const currentNodeIsContaining = isContainingBlock$1(currentNode);
|
11705
|
+
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
11706
|
+
currentContainingBlockComputedStyle = null;
|
11707
|
+
}
|
11708
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement$1(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
11709
|
+
if (shouldDropCurrentNode) {
|
11710
|
+
// Drop non-containing blocks.
|
11711
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
11712
|
+
} else {
|
11713
|
+
// Record last containing block for next iteration.
|
11714
|
+
currentContainingBlockComputedStyle = computedStyle;
|
11715
|
+
}
|
11716
|
+
currentNode = getParentNode$1(currentNode);
|
11250
11717
|
}
|
11718
|
+
cache.set(element, result);
|
11719
|
+
return result;
|
11720
|
+
}
|
11251
11721
|
|
11252
|
-
|
11253
|
-
|
11254
|
-
|
11255
|
-
// `initial`
|
11256
|
-
|
11257
|
-
|
11258
|
-
function getClippingAncestors(element) {
|
11259
|
-
const clippingAncestors = getOverflowAncestors(element);
|
11260
|
-
const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);
|
11261
|
-
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
11262
|
-
|
11263
|
-
if (!isElement(clipperElement)) {
|
11264
|
-
return [];
|
11265
|
-
} // @ts-ignore isElement check ensures we return Array<Element>
|
11266
|
-
|
11267
|
-
|
11268
|
-
return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
|
11269
|
-
} // Gets the maximum area that the element is visible in due to any number of
|
11270
|
-
// clipping ancestors
|
11271
|
-
|
11272
|
-
|
11273
|
-
function getClippingRect(_ref) {
|
11722
|
+
// Gets the maximum area that the element is visible in due to any number of
|
11723
|
+
// clipping ancestors.
|
11724
|
+
function getClippingRect$1(_ref) {
|
11274
11725
|
let {
|
11275
11726
|
element,
|
11276
11727
|
boundary,
|
11277
11728
|
rootBoundary,
|
11278
11729
|
strategy
|
11279
11730
|
} = _ref;
|
11280
|
-
const
|
11281
|
-
const clippingAncestors = [...
|
11731
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
11732
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
11282
11733
|
const firstClippingAncestor = clippingAncestors[0];
|
11283
11734
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
11284
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
11285
|
-
accRect.top = max$
|
11286
|
-
accRect.right = min$
|
11287
|
-
accRect.bottom = min$
|
11288
|
-
accRect.left = max$
|
11735
|
+
const rect = getClientRectFromClippingAncestor$1(element, clippingAncestor, strategy);
|
11736
|
+
accRect.top = max$3(rect.top, accRect.top);
|
11737
|
+
accRect.right = min$3(rect.right, accRect.right);
|
11738
|
+
accRect.bottom = min$3(rect.bottom, accRect.bottom);
|
11739
|
+
accRect.left = max$3(rect.left, accRect.left);
|
11289
11740
|
return accRect;
|
11290
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
11741
|
+
}, getClientRectFromClippingAncestor$1(element, firstClippingAncestor, strategy));
|
11291
11742
|
return {
|
11292
11743
|
width: clippingRect.right - clippingRect.left,
|
11293
11744
|
height: clippingRect.bottom - clippingRect.top,
|
@@ -11296,115 +11747,210 @@
|
|
11296
11747
|
};
|
11297
11748
|
}
|
11298
11749
|
|
11299
|
-
|
11300
|
-
|
11301
|
-
|
11302
|
-
|
11303
|
-
|
11304
|
-
|
11305
|
-
|
11306
|
-
|
11307
|
-
|
11308
|
-
|
11309
|
-
floating,
|
11310
|
-
strategy
|
11311
|
-
} = _ref;
|
11312
|
-
return {
|
11313
|
-
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
11314
|
-
floating: { ...getDimensions(floating),
|
11315
|
-
x: 0,
|
11316
|
-
y: 0
|
11317
|
-
}
|
11318
|
-
};
|
11319
|
-
},
|
11320
|
-
getClientRects: element => Array.from(element.getClientRects()),
|
11321
|
-
isRTL: element => getComputedStyle$1(element).direction === 'rtl'
|
11322
|
-
};
|
11750
|
+
function getDimensions$1(element) {
|
11751
|
+
const {
|
11752
|
+
width,
|
11753
|
+
height
|
11754
|
+
} = getCssDimensions(element);
|
11755
|
+
return {
|
11756
|
+
width,
|
11757
|
+
height
|
11758
|
+
};
|
11759
|
+
}
|
11323
11760
|
|
11324
|
-
|
11325
|
-
|
11326
|
-
|
11327
|
-
|
11328
|
-
|
11329
|
-
|
11330
|
-
|
11761
|
+
function getRectRelativeToOffsetParent$1(element, offsetParent, strategy) {
|
11762
|
+
const isOffsetParentAnElement = isHTMLElement$1(offsetParent);
|
11763
|
+
const documentElement = getDocumentElement$1(offsetParent);
|
11764
|
+
const isFixed = strategy === 'fixed';
|
11765
|
+
const rect = getBoundingClientRect$1(element, true, isFixed, offsetParent);
|
11766
|
+
let scroll = {
|
11767
|
+
scrollLeft: 0,
|
11768
|
+
scrollTop: 0
|
11769
|
+
};
|
11770
|
+
const offsets = createCoords(0);
|
11771
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
11772
|
+
if (getNodeName$1(offsetParent) !== 'body' || isOverflowElement$1(documentElement)) {
|
11773
|
+
scroll = getNodeScroll$1(offsetParent);
|
11774
|
+
}
|
11775
|
+
if (isOffsetParentAnElement) {
|
11776
|
+
const offsetRect = getBoundingClientRect$1(offsetParent, true, isFixed, offsetParent);
|
11777
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
11778
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
11779
|
+
} else if (documentElement) {
|
11780
|
+
offsets.x = getWindowScrollBarX$1(documentElement);
|
11781
|
+
}
|
11331
11782
|
}
|
11783
|
+
const x = rect.left + scroll.scrollLeft - offsets.x;
|
11784
|
+
const y = rect.top + scroll.scrollTop - offsets.y;
|
11785
|
+
return {
|
11786
|
+
x,
|
11787
|
+
y,
|
11788
|
+
width: rect.width,
|
11789
|
+
height: rect.height
|
11790
|
+
};
|
11791
|
+
}
|
11332
11792
|
|
11333
|
-
|
11334
|
-
|
11335
|
-
|
11336
|
-
elementResize = true,
|
11337
|
-
animationFrame = false
|
11338
|
-
} = options;
|
11339
|
-
const ancestorScroll = _ancestorScroll && !animationFrame;
|
11340
|
-
const ancestorResize = _ancestorResize && !animationFrame;
|
11341
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
|
11342
|
-
ancestors.forEach(ancestor => {
|
11343
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
11344
|
-
passive: true
|
11345
|
-
});
|
11346
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
11347
|
-
});
|
11348
|
-
let observer = null;
|
11793
|
+
function isStaticPositioned(element) {
|
11794
|
+
return getComputedStyle$2(element).position === 'static';
|
11795
|
+
}
|
11349
11796
|
|
11350
|
-
|
11351
|
-
|
11352
|
-
|
11353
|
-
|
11354
|
-
|
11355
|
-
|
11797
|
+
function getTrueOffsetParent$1(element, polyfill) {
|
11798
|
+
if (!isHTMLElement$1(element) || getComputedStyle$2(element).position === 'fixed') {
|
11799
|
+
return null;
|
11800
|
+
}
|
11801
|
+
if (polyfill) {
|
11802
|
+
return polyfill(element);
|
11803
|
+
}
|
11804
|
+
return element.offsetParent;
|
11805
|
+
}
|
11356
11806
|
|
11357
|
-
|
11358
|
-
|
11359
|
-
|
11360
|
-
|
11807
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
11808
|
+
// such as table ancestors and cross browser bugs.
|
11809
|
+
function getOffsetParent$1(element, polyfill) {
|
11810
|
+
const win = getWindow$1(element);
|
11811
|
+
if (isTopLayer(element)) {
|
11812
|
+
return win;
|
11361
11813
|
}
|
11814
|
+
if (!isHTMLElement$1(element)) {
|
11815
|
+
let svgOffsetParent = getParentNode$1(element);
|
11816
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
11817
|
+
if (isElement$1(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
11818
|
+
return svgOffsetParent;
|
11819
|
+
}
|
11820
|
+
svgOffsetParent = getParentNode$1(svgOffsetParent);
|
11821
|
+
}
|
11822
|
+
return win;
|
11823
|
+
}
|
11824
|
+
let offsetParent = getTrueOffsetParent$1(element, polyfill);
|
11825
|
+
while (offsetParent && isTableElement$1(offsetParent) && isStaticPositioned(offsetParent)) {
|
11826
|
+
offsetParent = getTrueOffsetParent$1(offsetParent, polyfill);
|
11827
|
+
}
|
11828
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock$1(offsetParent)) {
|
11829
|
+
return win;
|
11830
|
+
}
|
11831
|
+
return offsetParent || getContainingBlock$1(element) || win;
|
11832
|
+
}
|
11362
11833
|
|
11363
|
-
|
11364
|
-
|
11834
|
+
const getElementRects = async function (data) {
|
11835
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent$1;
|
11836
|
+
const getDimensionsFn = this.getDimensions;
|
11837
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
11838
|
+
return {
|
11839
|
+
reference: getRectRelativeToOffsetParent$1(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
11840
|
+
floating: {
|
11841
|
+
x: 0,
|
11842
|
+
y: 0,
|
11843
|
+
width: floatingDimensions.width,
|
11844
|
+
height: floatingDimensions.height
|
11845
|
+
}
|
11846
|
+
};
|
11847
|
+
};
|
11365
11848
|
|
11366
|
-
|
11367
|
-
|
11368
|
-
|
11849
|
+
function isRTL$1(element) {
|
11850
|
+
return getComputedStyle$2(element).direction === 'rtl';
|
11851
|
+
}
|
11369
11852
|
|
11370
|
-
|
11371
|
-
|
11853
|
+
const platform$1 = {
|
11854
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect$1,
|
11855
|
+
getDocumentElement: getDocumentElement$1,
|
11856
|
+
getClippingRect: getClippingRect$1,
|
11857
|
+
getOffsetParent: getOffsetParent$1,
|
11858
|
+
getElementRects,
|
11859
|
+
getClientRects,
|
11860
|
+
getDimensions: getDimensions$1,
|
11861
|
+
getScale,
|
11862
|
+
isElement: isElement$1,
|
11863
|
+
isRTL: isRTL$1
|
11864
|
+
};
|
11372
11865
|
|
11373
|
-
|
11374
|
-
|
11375
|
-
|
11866
|
+
/**
|
11867
|
+
* Modifies the placement by translating the floating element along the
|
11868
|
+
* specified axes.
|
11869
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
11870
|
+
* object may be passed.
|
11871
|
+
* @see https://floating-ui.com/docs/offset
|
11872
|
+
*/
|
11873
|
+
offset$1;
|
11376
11874
|
|
11377
|
-
|
11378
|
-
|
11379
|
-
|
11875
|
+
/**
|
11876
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
11877
|
+
* that has the most space available automatically, without needing to specify a
|
11878
|
+
* preferred placement. Alternative to `flip`.
|
11879
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
11880
|
+
*/
|
11881
|
+
autoPlacement;
|
11380
11882
|
|
11381
|
-
|
11382
|
-
|
11383
|
-
|
11883
|
+
/**
|
11884
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
11885
|
+
* keep it in view when it will overflow the clipping boundary.
|
11886
|
+
* @see https://floating-ui.com/docs/shift
|
11887
|
+
*/
|
11888
|
+
shift$1;
|
11384
11889
|
|
11385
|
-
|
11386
|
-
|
11387
|
-
|
11388
|
-
|
11389
|
-
|
11390
|
-
|
11890
|
+
/**
|
11891
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
11892
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
11893
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
11894
|
+
* @see https://floating-ui.com/docs/flip
|
11895
|
+
*/
|
11896
|
+
flip$1;
|
11391
11897
|
|
11392
|
-
|
11393
|
-
|
11394
|
-
|
11395
|
-
|
11396
|
-
|
11898
|
+
/**
|
11899
|
+
* Provides data that allows you to change the size of the floating element —
|
11900
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
11901
|
+
* width of the reference element.
|
11902
|
+
* @see https://floating-ui.com/docs/size
|
11903
|
+
*/
|
11904
|
+
size;
|
11397
11905
|
|
11398
11906
|
/**
|
11399
|
-
*
|
11400
|
-
*
|
11401
|
-
*
|
11907
|
+
* Provides data to hide the floating element in applicable situations, such as
|
11908
|
+
* when it is not in the same clipping context as the reference element.
|
11909
|
+
* @see https://floating-ui.com/docs/hide
|
11402
11910
|
*/
|
11911
|
+
hide;
|
11403
11912
|
|
11404
|
-
|
11405
|
-
|
11406
|
-
|
11407
|
-
|
11913
|
+
/**
|
11914
|
+
* Provides data to position an inner element of the floating element so that it
|
11915
|
+
* appears centered to the reference element.
|
11916
|
+
* @see https://floating-ui.com/docs/arrow
|
11917
|
+
*/
|
11918
|
+
const arrow$1 = arrow$2;
|
11919
|
+
|
11920
|
+
/**
|
11921
|
+
* Provides improved positioning for inline reference elements that can span
|
11922
|
+
* over multiple lines, such as hyperlinks or range selections.
|
11923
|
+
* @see https://floating-ui.com/docs/inline
|
11924
|
+
*/
|
11925
|
+
inline;
|
11926
|
+
|
11927
|
+
/**
|
11928
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
11929
|
+
*/
|
11930
|
+
limitShift;
|
11931
|
+
|
11932
|
+
/**
|
11933
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
11934
|
+
* next to a given reference element.
|
11935
|
+
*/
|
11936
|
+
const computePosition$2 = (reference, floating, options) => {
|
11937
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
11938
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
11939
|
+
// single call. If other functions become expensive, we can add them as well.
|
11940
|
+
const cache = new Map();
|
11941
|
+
const mergedOptions = {
|
11942
|
+
platform: platform$1,
|
11943
|
+
...options
|
11944
|
+
};
|
11945
|
+
const platformWithCache = {
|
11946
|
+
...mergedOptions.platform,
|
11947
|
+
_c: cache
|
11948
|
+
};
|
11949
|
+
return computePosition$3(reference, floating, {
|
11950
|
+
...mergedOptions,
|
11951
|
+
platform: platformWithCache
|
11952
|
+
});
|
11953
|
+
};
|
11408
11954
|
|
11409
11955
|
const useFloatingProps = buildProps({});
|
11410
11956
|
const unrefReference = (elRef) => {
|
@@ -11445,7 +11991,7 @@
|
|
11445
11991
|
const contentEl = unrefElement(contentRef);
|
11446
11992
|
if (!referenceEl || !contentEl)
|
11447
11993
|
return;
|
11448
|
-
const data = await computePosition(referenceEl, contentEl, {
|
11994
|
+
const data = await computePosition$2(referenceEl, contentEl, {
|
11449
11995
|
placement: vue.unref(placement),
|
11450
11996
|
strategy: vue.unref(strategy),
|
11451
11997
|
middleware: vue.unref(middleware)
|
@@ -11480,7 +12026,7 @@
|
|
11480
12026
|
const arrowEl = vue.unref(arrowRef);
|
11481
12027
|
if (!arrowEl)
|
11482
12028
|
return {};
|
11483
|
-
return arrow({
|
12029
|
+
return arrow$1({
|
11484
12030
|
element: arrowEl,
|
11485
12031
|
padding
|
11486
12032
|
}).fn(args);
|
@@ -11885,7 +12431,7 @@
|
|
11885
12431
|
|
11886
12432
|
const ElConfigProvider = withInstall(ConfigProvider);
|
11887
12433
|
|
11888
|
-
const version$1 = "0.0.
|
12434
|
+
const version$1 = "0.0.20250809";
|
11889
12435
|
|
11890
12436
|
const makeInstaller = (components = []) => {
|
11891
12437
|
const install = (app, options) => {
|
@@ -14101,10 +14647,10 @@
|
|
14101
14647
|
return { contextStyle, paddingSize, borderSize, boxSizing };
|
14102
14648
|
}
|
14103
14649
|
function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
|
14104
|
-
var _a;
|
14650
|
+
var _a, _b;
|
14105
14651
|
if (!hiddenTextarea) {
|
14106
14652
|
hiddenTextarea = document.createElement("textarea");
|
14107
|
-
document.body.appendChild(hiddenTextarea);
|
14653
|
+
((_a = targetElement.parentNode) != null ? _a : document.body).appendChild(hiddenTextarea);
|
14108
14654
|
}
|
14109
14655
|
const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
|
14110
14656
|
contextStyle.forEach(([key, value]) => hiddenTextarea == null ? void 0 : hiddenTextarea.style.setProperty(key, value));
|
@@ -14135,7 +14681,7 @@
|
|
14135
14681
|
height = Math.min(maxHeight, height);
|
14136
14682
|
}
|
14137
14683
|
result.height = `${height}px`;
|
14138
|
-
(
|
14684
|
+
(_b = hiddenTextarea.parentNode) == null ? void 0 : _b.removeChild(hiddenTextarea);
|
14139
14685
|
hiddenTextarea = void 0;
|
14140
14686
|
return result;
|
14141
14687
|
}
|
@@ -15399,7 +15945,7 @@
|
|
15399
15945
|
vue.watch(triggerRef, (el, prevEl) => {
|
15400
15946
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
15401
15947
|
virtualTriggerAriaStopWatch = void 0;
|
15402
|
-
if (isElement$
|
15948
|
+
if (isElement$2(el)) {
|
15403
15949
|
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
15404
15950
|
var _a;
|
15405
15951
|
const handler = props[eventName];
|
@@ -15421,7 +15967,7 @@
|
|
15421
15967
|
}, { immediate: true });
|
15422
15968
|
}
|
15423
15969
|
}
|
15424
|
-
if (isElement$
|
15970
|
+
if (isElement$2(prevEl) && isFocusable(prevEl)) {
|
15425
15971
|
[
|
15426
15972
|
"aria-controls",
|
15427
15973
|
"aria-describedby",
|
@@ -15436,7 +15982,7 @@
|
|
15436
15982
|
vue.onBeforeUnmount(() => {
|
15437
15983
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
15438
15984
|
virtualTriggerAriaStopWatch = void 0;
|
15439
|
-
if (triggerRef.value && isElement$
|
15985
|
+
if (triggerRef.value && isElement$2(triggerRef.value)) {
|
15440
15986
|
const el = triggerRef.value;
|
15441
15987
|
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
15442
15988
|
const handler = props[eventName];
|
@@ -15531,7 +16077,7 @@
|
|
15531
16077
|
if (element && element.focus) {
|
15532
16078
|
const prevFocusedElement = document.activeElement;
|
15533
16079
|
let cleanup = false;
|
15534
|
-
if (isElement$
|
16080
|
+
if (isElement$2(element) && !isFocusable(element) && !element.getAttribute("tabindex")) {
|
15535
16081
|
element.setAttribute("tabindex", "-1");
|
15536
16082
|
cleanup = true;
|
15537
16083
|
}
|
@@ -15540,7 +16086,7 @@
|
|
15540
16086
|
if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
|
15541
16087
|
element.select();
|
15542
16088
|
}
|
15543
|
-
if (isElement$
|
16089
|
+
if (isElement$2(element) && cleanup) {
|
15544
16090
|
element.removeAttribute("tabindex");
|
15545
16091
|
}
|
15546
16092
|
}
|
@@ -16226,14 +16772,14 @@
|
|
16226
16772
|
triggerTargetAriaStopWatch = void 0;
|
16227
16773
|
const el = vue.unref(triggerTargetEl || contentRef.value);
|
16228
16774
|
const prevEl = vue.unref(prevTriggerTargetEl || contentRef.value);
|
16229
|
-
if (isElement$
|
16775
|
+
if (isElement$2(el)) {
|
16230
16776
|
triggerTargetAriaStopWatch = vue.watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
16231
16777
|
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
16232
16778
|
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
16233
16779
|
});
|
16234
16780
|
}, { immediate: true });
|
16235
16781
|
}
|
16236
|
-
if (prevEl !== el && isElement$
|
16782
|
+
if (prevEl !== el && isElement$2(prevEl)) {
|
16237
16783
|
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
16238
16784
|
prevEl.removeAttribute(key);
|
16239
16785
|
});
|
@@ -18338,6 +18884,10 @@
|
|
18338
18884
|
this.roundA = Math.round(100 * this.a) / 100;
|
18339
18885
|
return this;
|
18340
18886
|
};
|
18887
|
+
TinyColor2.prototype.isMonochrome = function() {
|
18888
|
+
var s = this.toHsl().s;
|
18889
|
+
return s === 0;
|
18890
|
+
};
|
18341
18891
|
TinyColor2.prototype.toHsv = function() {
|
18342
18892
|
var hsv = rgbToHsv(this.r, this.g, this.b);
|
18343
18893
|
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
|
@@ -18384,6 +18934,12 @@
|
|
18384
18934
|
}
|
18385
18935
|
return "#" + this.toHex8(allow4Char);
|
18386
18936
|
};
|
18937
|
+
TinyColor2.prototype.toHexShortString = function(allowShortChar) {
|
18938
|
+
if (allowShortChar === void 0) {
|
18939
|
+
allowShortChar = false;
|
18940
|
+
}
|
18941
|
+
return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
|
18942
|
+
};
|
18387
18943
|
TinyColor2.prototype.toRgb = function() {
|
18388
18944
|
return {
|
18389
18945
|
r: Math.round(this.r),
|
@@ -18609,10 +19165,12 @@
|
|
18609
19165
|
TinyColor2.prototype.onBackground = function(background) {
|
18610
19166
|
var fg = this.toRgb();
|
18611
19167
|
var bg = new TinyColor2(background).toRgb();
|
19168
|
+
var alpha = fg.a + bg.a * (1 - fg.a);
|
18612
19169
|
return new TinyColor2({
|
18613
|
-
r:
|
18614
|
-
g:
|
18615
|
-
b:
|
19170
|
+
r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
|
19171
|
+
g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
|
19172
|
+
b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
|
19173
|
+
a: alpha
|
18616
19174
|
});
|
18617
19175
|
};
|
18618
19176
|
TinyColor2.prototype.triad = function() {
|
@@ -20313,7 +20871,7 @@
|
|
20313
20871
|
let excludes = [];
|
20314
20872
|
if (isArray$1(binding.arg)) {
|
20315
20873
|
excludes = binding.arg;
|
20316
|
-
} else if (isElement$
|
20874
|
+
} else if (isElement$2(binding.arg)) {
|
20317
20875
|
excludes.push(binding.arg);
|
20318
20876
|
}
|
20319
20877
|
return function(mouseup, mousedown) {
|
@@ -23871,7 +24429,7 @@
|
|
23871
24429
|
}
|
23872
24430
|
return nodes;
|
23873
24431
|
};
|
23874
|
-
class Node$
|
24432
|
+
class Node$3 {
|
23875
24433
|
constructor(data, config, parent, root = false) {
|
23876
24434
|
this.data = data;
|
23877
24435
|
this.config = config;
|
@@ -23891,7 +24449,7 @@
|
|
23891
24449
|
this.pathValues = pathNodes.map((node) => node.value);
|
23892
24450
|
this.pathLabels = pathNodes.map((node) => node.label);
|
23893
24451
|
this.childrenData = childrenData;
|
23894
|
-
this.children = (childrenData || []).map((child) => new Node$
|
24452
|
+
this.children = (childrenData || []).map((child) => new Node$3(child, config, this));
|
23895
24453
|
this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
|
23896
24454
|
this.text = "";
|
23897
24455
|
}
|
@@ -23912,7 +24470,7 @@
|
|
23912
24470
|
}
|
23913
24471
|
appendChild(childData) {
|
23914
24472
|
const { childrenData, children } = this;
|
23915
|
-
const node = new Node$
|
24473
|
+
const node = new Node$3(childData, this.config, this);
|
23916
24474
|
if (isArray$1(childrenData)) {
|
23917
24475
|
childrenData.push(childData);
|
23918
24476
|
} else {
|
@@ -23976,7 +24534,7 @@
|
|
23976
24534
|
}
|
23977
24535
|
}
|
23978
24536
|
}
|
23979
|
-
var Node$
|
24537
|
+
var Node$4 = Node$3;
|
23980
24538
|
|
23981
24539
|
const flatNodes = (nodes, leafOnly) => {
|
23982
24540
|
return nodes.reduce((res, node) => {
|
@@ -23992,7 +24550,7 @@
|
|
23992
24550
|
class Store {
|
23993
24551
|
constructor(data, config) {
|
23994
24552
|
this.config = config;
|
23995
|
-
const nodes = (data || []).map((nodeData) => new Node$
|
24553
|
+
const nodes = (data || []).map((nodeData) => new Node$4(nodeData, this.config));
|
23996
24554
|
this.nodes = nodes;
|
23997
24555
|
this.allNodes = flatNodes(nodes, false);
|
23998
24556
|
this.leafNodes = flatNodes(nodes, true);
|
@@ -24004,7 +24562,7 @@
|
|
24004
24562
|
return leafOnly ? this.leafNodes : this.allNodes;
|
24005
24563
|
}
|
24006
24564
|
appendNode(nodeData, parentNode) {
|
24007
|
-
const node = parentNode ? parentNode.appendChild(nodeData) : new Node$
|
24565
|
+
const node = parentNode ? parentNode.appendChild(nodeData) : new Node$4(nodeData, this.config);
|
24008
24566
|
if (!parentNode)
|
24009
24567
|
this.nodes.push(node);
|
24010
24568
|
this.appendAllNodesAndLeafNodes(node);
|
@@ -24166,7 +24724,7 @@
|
|
24166
24724
|
};
|
24167
24725
|
const lazyLoad = (node, cb) => {
|
24168
24726
|
const cfg = config.value;
|
24169
|
-
node = node || new Node$
|
24727
|
+
node = node || new Node$4({}, cfg, void 0, true);
|
24170
24728
|
node.loading = true;
|
24171
24729
|
const resolve = (dataList) => {
|
24172
24730
|
const _node = node;
|
@@ -33811,7 +34369,7 @@
|
|
33811
34369
|
return;
|
33812
34370
|
await vue.nextTick();
|
33813
34371
|
const { scrollContainer } = props;
|
33814
|
-
if (isElement$
|
34372
|
+
if (isElement$2(scrollContainer)) {
|
33815
34373
|
_scrollContainer.value = scrollContainer;
|
33816
34374
|
} else if (isString$1(scrollContainer) && scrollContainer !== "") {
|
33817
34375
|
_scrollContainer.value = (_a = document.querySelector(scrollContainer)) != null ? _a : void 0;
|
@@ -41085,7 +41643,7 @@
|
|
41085
41643
|
});
|
41086
41644
|
var FixedSizeGrid$1 = FixedSizeGrid;
|
41087
41645
|
|
41088
|
-
const { max, min, floor } = Math;
|
41646
|
+
const { max: max$2, min: min$2, floor } = Math;
|
41089
41647
|
const ACCESS_SIZER_KEY_MAP = {
|
41090
41648
|
column: "columnWidth",
|
41091
41649
|
row: "rowHeight"
|
@@ -41130,7 +41688,7 @@
|
|
41130
41688
|
high = mid - 1;
|
41131
41689
|
}
|
41132
41690
|
}
|
41133
|
-
return max(0, low - 1);
|
41691
|
+
return max$2(0, low - 1);
|
41134
41692
|
};
|
41135
41693
|
const es = (props, gridCache, idx, offset, type) => {
|
41136
41694
|
const total = type === "column" ? props.totalColumn : props.totalRow;
|
@@ -41139,7 +41697,7 @@
|
|
41139
41697
|
idx += exponent;
|
41140
41698
|
exponent *= 2;
|
41141
41699
|
}
|
41142
|
-
return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type);
|
41700
|
+
return bs(props, gridCache, floor(idx / 2), min$2(idx, total - 1), offset, type);
|
41143
41701
|
};
|
41144
41702
|
const findItem = (props, gridCache, offset, type) => {
|
41145
41703
|
const [cache, lastVisitedIndex] = [
|
@@ -41150,7 +41708,7 @@
|
|
41150
41708
|
if (lastVisitedItemOffset >= offset) {
|
41151
41709
|
return bs(props, gridCache, 0, lastVisitedIndex, offset, type);
|
41152
41710
|
}
|
41153
|
-
return es(props, gridCache, max(0, lastVisitedIndex), offset, type);
|
41711
|
+
return es(props, gridCache, max$2(0, lastVisitedIndex), offset, type);
|
41154
41712
|
};
|
41155
41713
|
const getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => {
|
41156
41714
|
let sizeOfVisitedRows = 0;
|
@@ -41189,8 +41747,8 @@
|
|
41189
41747
|
];
|
41190
41748
|
const item = getItemFromCache(props, index, cache, type);
|
41191
41749
|
const estimatedSize = estimatedSizeAssociates(props, cache);
|
41192
|
-
const maxOffset = max(0, min(estimatedSize - size, item.offset));
|
41193
|
-
const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);
|
41750
|
+
const maxOffset = max$2(0, min$2(estimatedSize - size, item.offset));
|
41751
|
+
const minOffset = max$2(0, item.offset - size + scrollBarWidth + item.size);
|
41194
41752
|
if (alignment === SMART_ALIGNMENT) {
|
41195
41753
|
if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
|
41196
41754
|
alignment = AUTO_ALIGNMENT;
|
@@ -47142,7 +47700,7 @@
|
|
47142
47700
|
if (column.children && column.children.length > 0)
|
47143
47701
|
return;
|
47144
47702
|
const el = event.target;
|
47145
|
-
if (!isElement$
|
47703
|
+
if (!isElement$2(el)) {
|
47146
47704
|
return;
|
47147
47705
|
}
|
47148
47706
|
const target = el == null ? void 0 : el.closest("th");
|
@@ -53267,6 +53825,1297 @@
|
|
53267
53825
|
});
|
53268
53826
|
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "arrow.vue"]]);
|
53269
53827
|
|
53828
|
+
function getSide(placement) {
|
53829
|
+
return placement.split('-')[0];
|
53830
|
+
}
|
53831
|
+
|
53832
|
+
function getAlignment(placement) {
|
53833
|
+
return placement.split('-')[1];
|
53834
|
+
}
|
53835
|
+
|
53836
|
+
function getMainAxisFromPlacement(placement) {
|
53837
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
53838
|
+
}
|
53839
|
+
|
53840
|
+
function getLengthFromAxis(axis) {
|
53841
|
+
return axis === 'y' ? 'height' : 'width';
|
53842
|
+
}
|
53843
|
+
|
53844
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
53845
|
+
let {
|
53846
|
+
reference,
|
53847
|
+
floating
|
53848
|
+
} = _ref;
|
53849
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
53850
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
53851
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
53852
|
+
const length = getLengthFromAxis(mainAxis);
|
53853
|
+
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
53854
|
+
const side = getSide(placement);
|
53855
|
+
const isVertical = mainAxis === 'x';
|
53856
|
+
let coords;
|
53857
|
+
|
53858
|
+
switch (side) {
|
53859
|
+
case 'top':
|
53860
|
+
coords = {
|
53861
|
+
x: commonX,
|
53862
|
+
y: reference.y - floating.height
|
53863
|
+
};
|
53864
|
+
break;
|
53865
|
+
|
53866
|
+
case 'bottom':
|
53867
|
+
coords = {
|
53868
|
+
x: commonX,
|
53869
|
+
y: reference.y + reference.height
|
53870
|
+
};
|
53871
|
+
break;
|
53872
|
+
|
53873
|
+
case 'right':
|
53874
|
+
coords = {
|
53875
|
+
x: reference.x + reference.width,
|
53876
|
+
y: commonY
|
53877
|
+
};
|
53878
|
+
break;
|
53879
|
+
|
53880
|
+
case 'left':
|
53881
|
+
coords = {
|
53882
|
+
x: reference.x - floating.width,
|
53883
|
+
y: commonY
|
53884
|
+
};
|
53885
|
+
break;
|
53886
|
+
|
53887
|
+
default:
|
53888
|
+
coords = {
|
53889
|
+
x: reference.x,
|
53890
|
+
y: reference.y
|
53891
|
+
};
|
53892
|
+
}
|
53893
|
+
|
53894
|
+
switch (getAlignment(placement)) {
|
53895
|
+
case 'start':
|
53896
|
+
coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
53897
|
+
break;
|
53898
|
+
|
53899
|
+
case 'end':
|
53900
|
+
coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
53901
|
+
break;
|
53902
|
+
}
|
53903
|
+
|
53904
|
+
return coords;
|
53905
|
+
}
|
53906
|
+
|
53907
|
+
/**
|
53908
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
53909
|
+
* next to a reference element when it is given a certain positioning strategy.
|
53910
|
+
*
|
53911
|
+
* This export does not have any `platform` interface logic. You will need to
|
53912
|
+
* write one for the platform you are using Floating UI with.
|
53913
|
+
*/
|
53914
|
+
|
53915
|
+
const computePosition$1 = async (reference, floating, config) => {
|
53916
|
+
const {
|
53917
|
+
placement = 'bottom',
|
53918
|
+
strategy = 'absolute',
|
53919
|
+
middleware = [],
|
53920
|
+
platform
|
53921
|
+
} = config;
|
53922
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
53923
|
+
|
53924
|
+
let rects = await platform.getElementRects({
|
53925
|
+
reference,
|
53926
|
+
floating,
|
53927
|
+
strategy
|
53928
|
+
});
|
53929
|
+
let {
|
53930
|
+
x,
|
53931
|
+
y
|
53932
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
53933
|
+
let statefulPlacement = placement;
|
53934
|
+
let middlewareData = {};
|
53935
|
+
let resetCount = 0;
|
53936
|
+
|
53937
|
+
for (let i = 0; i < middleware.length; i++) {
|
53938
|
+
const {
|
53939
|
+
name,
|
53940
|
+
fn
|
53941
|
+
} = middleware[i];
|
53942
|
+
const {
|
53943
|
+
x: nextX,
|
53944
|
+
y: nextY,
|
53945
|
+
data,
|
53946
|
+
reset
|
53947
|
+
} = await fn({
|
53948
|
+
x,
|
53949
|
+
y,
|
53950
|
+
initialPlacement: placement,
|
53951
|
+
placement: statefulPlacement,
|
53952
|
+
strategy,
|
53953
|
+
middlewareData,
|
53954
|
+
rects,
|
53955
|
+
platform,
|
53956
|
+
elements: {
|
53957
|
+
reference,
|
53958
|
+
floating
|
53959
|
+
}
|
53960
|
+
});
|
53961
|
+
x = nextX != null ? nextX : x;
|
53962
|
+
y = nextY != null ? nextY : y;
|
53963
|
+
middlewareData = { ...middlewareData,
|
53964
|
+
[name]: { ...middlewareData[name],
|
53965
|
+
...data
|
53966
|
+
}
|
53967
|
+
};
|
53968
|
+
|
53969
|
+
if (reset && resetCount <= 50) {
|
53970
|
+
resetCount++;
|
53971
|
+
|
53972
|
+
if (typeof reset === 'object') {
|
53973
|
+
if (reset.placement) {
|
53974
|
+
statefulPlacement = reset.placement;
|
53975
|
+
}
|
53976
|
+
|
53977
|
+
if (reset.rects) {
|
53978
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
53979
|
+
reference,
|
53980
|
+
floating,
|
53981
|
+
strategy
|
53982
|
+
}) : reset.rects;
|
53983
|
+
}
|
53984
|
+
|
53985
|
+
({
|
53986
|
+
x,
|
53987
|
+
y
|
53988
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
53989
|
+
}
|
53990
|
+
|
53991
|
+
i = -1;
|
53992
|
+
continue;
|
53993
|
+
}
|
53994
|
+
}
|
53995
|
+
|
53996
|
+
return {
|
53997
|
+
x,
|
53998
|
+
y,
|
53999
|
+
placement: statefulPlacement,
|
54000
|
+
strategy,
|
54001
|
+
middlewareData
|
54002
|
+
};
|
54003
|
+
};
|
54004
|
+
|
54005
|
+
function expandPaddingObject(padding) {
|
54006
|
+
return {
|
54007
|
+
top: 0,
|
54008
|
+
right: 0,
|
54009
|
+
bottom: 0,
|
54010
|
+
left: 0,
|
54011
|
+
...padding
|
54012
|
+
};
|
54013
|
+
}
|
54014
|
+
|
54015
|
+
function getSideObjectFromPadding(padding) {
|
54016
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
54017
|
+
top: padding,
|
54018
|
+
right: padding,
|
54019
|
+
bottom: padding,
|
54020
|
+
left: padding
|
54021
|
+
};
|
54022
|
+
}
|
54023
|
+
|
54024
|
+
function rectToClientRect(rect) {
|
54025
|
+
return { ...rect,
|
54026
|
+
top: rect.y,
|
54027
|
+
left: rect.x,
|
54028
|
+
right: rect.x + rect.width,
|
54029
|
+
bottom: rect.y + rect.height
|
54030
|
+
};
|
54031
|
+
}
|
54032
|
+
|
54033
|
+
/**
|
54034
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
54035
|
+
* element is overflowing a given clipping boundary.
|
54036
|
+
* - positive = overflowing the boundary by that number of pixels
|
54037
|
+
* - negative = how many pixels left before it will overflow
|
54038
|
+
* - 0 = lies flush with the boundary
|
54039
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
54040
|
+
*/
|
54041
|
+
async function detectOverflow(middlewareArguments, options) {
|
54042
|
+
var _await$platform$isEle;
|
54043
|
+
|
54044
|
+
if (options === void 0) {
|
54045
|
+
options = {};
|
54046
|
+
}
|
54047
|
+
|
54048
|
+
const {
|
54049
|
+
x,
|
54050
|
+
y,
|
54051
|
+
platform,
|
54052
|
+
rects,
|
54053
|
+
elements,
|
54054
|
+
strategy
|
54055
|
+
} = middlewareArguments;
|
54056
|
+
const {
|
54057
|
+
boundary = 'clippingAncestors',
|
54058
|
+
rootBoundary = 'viewport',
|
54059
|
+
elementContext = 'floating',
|
54060
|
+
altBoundary = false,
|
54061
|
+
padding = 0
|
54062
|
+
} = options;
|
54063
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
54064
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
54065
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
54066
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
54067
|
+
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))),
|
54068
|
+
boundary,
|
54069
|
+
rootBoundary,
|
54070
|
+
strategy
|
54071
|
+
}));
|
54072
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
54073
|
+
rect: elementContext === 'floating' ? { ...rects.floating,
|
54074
|
+
x,
|
54075
|
+
y
|
54076
|
+
} : rects.reference,
|
54077
|
+
offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
|
54078
|
+
strategy
|
54079
|
+
}) : rects[elementContext]);
|
54080
|
+
return {
|
54081
|
+
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
54082
|
+
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
54083
|
+
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
54084
|
+
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
54085
|
+
};
|
54086
|
+
}
|
54087
|
+
|
54088
|
+
const min$1 = Math.min;
|
54089
|
+
const max$1 = Math.max;
|
54090
|
+
|
54091
|
+
function within(min$1$1, value, max$1$1) {
|
54092
|
+
return max$1(min$1$1, min$1(value, max$1$1));
|
54093
|
+
}
|
54094
|
+
|
54095
|
+
/**
|
54096
|
+
* Positions an inner element of the floating element such that it is centered
|
54097
|
+
* to the reference element.
|
54098
|
+
* @see https://floating-ui.com/docs/arrow
|
54099
|
+
*/
|
54100
|
+
const arrow = options => ({
|
54101
|
+
name: 'arrow',
|
54102
|
+
options,
|
54103
|
+
|
54104
|
+
async fn(middlewareArguments) {
|
54105
|
+
// Since `element` is required, we don't Partial<> the type
|
54106
|
+
const {
|
54107
|
+
element,
|
54108
|
+
padding = 0
|
54109
|
+
} = options != null ? options : {};
|
54110
|
+
const {
|
54111
|
+
x,
|
54112
|
+
y,
|
54113
|
+
placement,
|
54114
|
+
rects,
|
54115
|
+
platform
|
54116
|
+
} = middlewareArguments;
|
54117
|
+
|
54118
|
+
if (element == null) {
|
54119
|
+
|
54120
|
+
return {};
|
54121
|
+
}
|
54122
|
+
|
54123
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
54124
|
+
const coords = {
|
54125
|
+
x,
|
54126
|
+
y
|
54127
|
+
};
|
54128
|
+
const axis = getMainAxisFromPlacement(placement);
|
54129
|
+
const alignment = getAlignment(placement);
|
54130
|
+
const length = getLengthFromAxis(axis);
|
54131
|
+
const arrowDimensions = await platform.getDimensions(element);
|
54132
|
+
const minProp = axis === 'y' ? 'top' : 'left';
|
54133
|
+
const maxProp = axis === 'y' ? 'bottom' : 'right';
|
54134
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
54135
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
54136
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
54137
|
+
let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
54138
|
+
|
54139
|
+
if (clientSize === 0) {
|
54140
|
+
clientSize = rects.floating[length];
|
54141
|
+
}
|
54142
|
+
|
54143
|
+
const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center
|
54144
|
+
// point is outside the floating element's bounds
|
54145
|
+
|
54146
|
+
const min = paddingObject[minProp];
|
54147
|
+
const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
54148
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
54149
|
+
const offset = within(min, center, max); // Make sure that arrow points at the reference
|
54150
|
+
|
54151
|
+
const alignmentPadding = alignment === 'start' ? paddingObject[minProp] : paddingObject[maxProp];
|
54152
|
+
const shouldAddOffset = alignmentPadding > 0 && center !== offset && rects.reference[length] <= rects.floating[length];
|
54153
|
+
const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
|
54154
|
+
return {
|
54155
|
+
[axis]: coords[axis] - alignmentOffset,
|
54156
|
+
data: {
|
54157
|
+
[axis]: offset,
|
54158
|
+
centerOffset: center - offset
|
54159
|
+
}
|
54160
|
+
};
|
54161
|
+
}
|
54162
|
+
|
54163
|
+
});
|
54164
|
+
|
54165
|
+
const hash$1 = {
|
54166
|
+
left: 'right',
|
54167
|
+
right: 'left',
|
54168
|
+
bottom: 'top',
|
54169
|
+
top: 'bottom'
|
54170
|
+
};
|
54171
|
+
function getOppositePlacement(placement) {
|
54172
|
+
return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
|
54173
|
+
}
|
54174
|
+
|
54175
|
+
function getAlignmentSides(placement, rects, rtl) {
|
54176
|
+
if (rtl === void 0) {
|
54177
|
+
rtl = false;
|
54178
|
+
}
|
54179
|
+
|
54180
|
+
const alignment = getAlignment(placement);
|
54181
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
54182
|
+
const length = getLengthFromAxis(mainAxis);
|
54183
|
+
let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
54184
|
+
|
54185
|
+
if (rects.reference[length] > rects.floating[length]) {
|
54186
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
54187
|
+
}
|
54188
|
+
|
54189
|
+
return {
|
54190
|
+
main: mainAlignmentSide,
|
54191
|
+
cross: getOppositePlacement(mainAlignmentSide)
|
54192
|
+
};
|
54193
|
+
}
|
54194
|
+
|
54195
|
+
const hash = {
|
54196
|
+
start: 'end',
|
54197
|
+
end: 'start'
|
54198
|
+
};
|
54199
|
+
function getOppositeAlignmentPlacement(placement) {
|
54200
|
+
return placement.replace(/start|end/g, matched => hash[matched]);
|
54201
|
+
}
|
54202
|
+
|
54203
|
+
function getExpandedPlacements(placement) {
|
54204
|
+
const oppositePlacement = getOppositePlacement(placement);
|
54205
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
54206
|
+
}
|
54207
|
+
|
54208
|
+
/**
|
54209
|
+
* Changes the placement of the floating element to one that will fit if the
|
54210
|
+
* initially specified `placement` does not.
|
54211
|
+
* @see https://floating-ui.com/docs/flip
|
54212
|
+
*/
|
54213
|
+
const flip = function (options) {
|
54214
|
+
if (options === void 0) {
|
54215
|
+
options = {};
|
54216
|
+
}
|
54217
|
+
|
54218
|
+
return {
|
54219
|
+
name: 'flip',
|
54220
|
+
options,
|
54221
|
+
|
54222
|
+
async fn(middlewareArguments) {
|
54223
|
+
var _middlewareData$flip;
|
54224
|
+
|
54225
|
+
const {
|
54226
|
+
placement,
|
54227
|
+
middlewareData,
|
54228
|
+
rects,
|
54229
|
+
initialPlacement,
|
54230
|
+
platform,
|
54231
|
+
elements
|
54232
|
+
} = middlewareArguments;
|
54233
|
+
const {
|
54234
|
+
mainAxis: checkMainAxis = true,
|
54235
|
+
crossAxis: checkCrossAxis = true,
|
54236
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
54237
|
+
fallbackStrategy = 'bestFit',
|
54238
|
+
flipAlignment = true,
|
54239
|
+
...detectOverflowOptions
|
54240
|
+
} = options;
|
54241
|
+
const side = getSide(placement);
|
54242
|
+
const isBasePlacement = side === initialPlacement;
|
54243
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
54244
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
54245
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
54246
|
+
const overflows = [];
|
54247
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
54248
|
+
|
54249
|
+
if (checkMainAxis) {
|
54250
|
+
overflows.push(overflow[side]);
|
54251
|
+
}
|
54252
|
+
|
54253
|
+
if (checkCrossAxis) {
|
54254
|
+
const {
|
54255
|
+
main,
|
54256
|
+
cross
|
54257
|
+
} = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
54258
|
+
overflows.push(overflow[main], overflow[cross]);
|
54259
|
+
}
|
54260
|
+
|
54261
|
+
overflowsData = [...overflowsData, {
|
54262
|
+
placement,
|
54263
|
+
overflows
|
54264
|
+
}]; // One or more sides is overflowing
|
54265
|
+
|
54266
|
+
if (!overflows.every(side => side <= 0)) {
|
54267
|
+
var _middlewareData$flip$, _middlewareData$flip2;
|
54268
|
+
|
54269
|
+
const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
|
54270
|
+
const nextPlacement = placements[nextIndex];
|
54271
|
+
|
54272
|
+
if (nextPlacement) {
|
54273
|
+
// Try next placement and re-run the lifecycle
|
54274
|
+
return {
|
54275
|
+
data: {
|
54276
|
+
index: nextIndex,
|
54277
|
+
overflows: overflowsData
|
54278
|
+
},
|
54279
|
+
reset: {
|
54280
|
+
placement: nextPlacement
|
54281
|
+
}
|
54282
|
+
};
|
54283
|
+
}
|
54284
|
+
|
54285
|
+
let resetPlacement = 'bottom';
|
54286
|
+
|
54287
|
+
switch (fallbackStrategy) {
|
54288
|
+
case 'bestFit':
|
54289
|
+
{
|
54290
|
+
var _overflowsData$map$so;
|
54291
|
+
|
54292
|
+
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;
|
54293
|
+
|
54294
|
+
if (placement) {
|
54295
|
+
resetPlacement = placement;
|
54296
|
+
}
|
54297
|
+
|
54298
|
+
break;
|
54299
|
+
}
|
54300
|
+
|
54301
|
+
case 'initialPlacement':
|
54302
|
+
resetPlacement = initialPlacement;
|
54303
|
+
break;
|
54304
|
+
}
|
54305
|
+
|
54306
|
+
if (placement !== resetPlacement) {
|
54307
|
+
return {
|
54308
|
+
reset: {
|
54309
|
+
placement: resetPlacement
|
54310
|
+
}
|
54311
|
+
};
|
54312
|
+
}
|
54313
|
+
}
|
54314
|
+
|
54315
|
+
return {};
|
54316
|
+
}
|
54317
|
+
|
54318
|
+
};
|
54319
|
+
};
|
54320
|
+
|
54321
|
+
async function convertValueToCoords(middlewareArguments, value) {
|
54322
|
+
const {
|
54323
|
+
placement,
|
54324
|
+
platform,
|
54325
|
+
elements
|
54326
|
+
} = middlewareArguments;
|
54327
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
54328
|
+
const side = getSide(placement);
|
54329
|
+
const alignment = getAlignment(placement);
|
54330
|
+
const isVertical = getMainAxisFromPlacement(placement) === 'x';
|
54331
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
54332
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
54333
|
+
const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const
|
54334
|
+
|
54335
|
+
let {
|
54336
|
+
mainAxis,
|
54337
|
+
crossAxis,
|
54338
|
+
alignmentAxis
|
54339
|
+
} = typeof rawValue === 'number' ? {
|
54340
|
+
mainAxis: rawValue,
|
54341
|
+
crossAxis: 0,
|
54342
|
+
alignmentAxis: null
|
54343
|
+
} : {
|
54344
|
+
mainAxis: 0,
|
54345
|
+
crossAxis: 0,
|
54346
|
+
alignmentAxis: null,
|
54347
|
+
...rawValue
|
54348
|
+
};
|
54349
|
+
|
54350
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
54351
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
54352
|
+
}
|
54353
|
+
|
54354
|
+
return isVertical ? {
|
54355
|
+
x: crossAxis * crossAxisMulti,
|
54356
|
+
y: mainAxis * mainAxisMulti
|
54357
|
+
} : {
|
54358
|
+
x: mainAxis * mainAxisMulti,
|
54359
|
+
y: crossAxis * crossAxisMulti
|
54360
|
+
};
|
54361
|
+
}
|
54362
|
+
/**
|
54363
|
+
* Displaces the floating element from its reference element.
|
54364
|
+
* @see https://floating-ui.com/docs/offset
|
54365
|
+
*/
|
54366
|
+
|
54367
|
+
const offset = function (value) {
|
54368
|
+
if (value === void 0) {
|
54369
|
+
value = 0;
|
54370
|
+
}
|
54371
|
+
|
54372
|
+
return {
|
54373
|
+
name: 'offset',
|
54374
|
+
options: value,
|
54375
|
+
|
54376
|
+
async fn(middlewareArguments) {
|
54377
|
+
const {
|
54378
|
+
x,
|
54379
|
+
y
|
54380
|
+
} = middlewareArguments;
|
54381
|
+
const diffCoords = await convertValueToCoords(middlewareArguments, value);
|
54382
|
+
return {
|
54383
|
+
x: x + diffCoords.x,
|
54384
|
+
y: y + diffCoords.y,
|
54385
|
+
data: diffCoords
|
54386
|
+
};
|
54387
|
+
}
|
54388
|
+
|
54389
|
+
};
|
54390
|
+
};
|
54391
|
+
|
54392
|
+
function getCrossAxis(axis) {
|
54393
|
+
return axis === 'x' ? 'y' : 'x';
|
54394
|
+
}
|
54395
|
+
|
54396
|
+
/**
|
54397
|
+
* Shifts the floating element in order to keep it in view when it will overflow
|
54398
|
+
* a clipping boundary.
|
54399
|
+
* @see https://floating-ui.com/docs/shift
|
54400
|
+
*/
|
54401
|
+
const shift = function (options) {
|
54402
|
+
if (options === void 0) {
|
54403
|
+
options = {};
|
54404
|
+
}
|
54405
|
+
|
54406
|
+
return {
|
54407
|
+
name: 'shift',
|
54408
|
+
options,
|
54409
|
+
|
54410
|
+
async fn(middlewareArguments) {
|
54411
|
+
const {
|
54412
|
+
x,
|
54413
|
+
y,
|
54414
|
+
placement
|
54415
|
+
} = middlewareArguments;
|
54416
|
+
const {
|
54417
|
+
mainAxis: checkMainAxis = true,
|
54418
|
+
crossAxis: checkCrossAxis = false,
|
54419
|
+
limiter = {
|
54420
|
+
fn: _ref => {
|
54421
|
+
let {
|
54422
|
+
x,
|
54423
|
+
y
|
54424
|
+
} = _ref;
|
54425
|
+
return {
|
54426
|
+
x,
|
54427
|
+
y
|
54428
|
+
};
|
54429
|
+
}
|
54430
|
+
},
|
54431
|
+
...detectOverflowOptions
|
54432
|
+
} = options;
|
54433
|
+
const coords = {
|
54434
|
+
x,
|
54435
|
+
y
|
54436
|
+
};
|
54437
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
54438
|
+
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
54439
|
+
const crossAxis = getCrossAxis(mainAxis);
|
54440
|
+
let mainAxisCoord = coords[mainAxis];
|
54441
|
+
let crossAxisCoord = coords[crossAxis];
|
54442
|
+
|
54443
|
+
if (checkMainAxis) {
|
54444
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
54445
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
54446
|
+
const min = mainAxisCoord + overflow[minSide];
|
54447
|
+
const max = mainAxisCoord - overflow[maxSide];
|
54448
|
+
mainAxisCoord = within(min, mainAxisCoord, max);
|
54449
|
+
}
|
54450
|
+
|
54451
|
+
if (checkCrossAxis) {
|
54452
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
54453
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
54454
|
+
const min = crossAxisCoord + overflow[minSide];
|
54455
|
+
const max = crossAxisCoord - overflow[maxSide];
|
54456
|
+
crossAxisCoord = within(min, crossAxisCoord, max);
|
54457
|
+
}
|
54458
|
+
|
54459
|
+
const limitedCoords = limiter.fn({ ...middlewareArguments,
|
54460
|
+
[mainAxis]: mainAxisCoord,
|
54461
|
+
[crossAxis]: crossAxisCoord
|
54462
|
+
});
|
54463
|
+
return { ...limitedCoords,
|
54464
|
+
data: {
|
54465
|
+
x: limitedCoords.x - x,
|
54466
|
+
y: limitedCoords.y - y
|
54467
|
+
}
|
54468
|
+
};
|
54469
|
+
}
|
54470
|
+
|
54471
|
+
};
|
54472
|
+
};
|
54473
|
+
|
54474
|
+
function isWindow(value) {
|
54475
|
+
return value && value.document && value.location && value.alert && value.setInterval;
|
54476
|
+
}
|
54477
|
+
function getWindow(node) {
|
54478
|
+
if (node == null) {
|
54479
|
+
return window;
|
54480
|
+
}
|
54481
|
+
|
54482
|
+
if (!isWindow(node)) {
|
54483
|
+
const ownerDocument = node.ownerDocument;
|
54484
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
54485
|
+
}
|
54486
|
+
|
54487
|
+
return node;
|
54488
|
+
}
|
54489
|
+
|
54490
|
+
function getComputedStyle$1(element) {
|
54491
|
+
return getWindow(element).getComputedStyle(element);
|
54492
|
+
}
|
54493
|
+
|
54494
|
+
function getNodeName(node) {
|
54495
|
+
return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
|
54496
|
+
}
|
54497
|
+
|
54498
|
+
function getUAString() {
|
54499
|
+
const uaData = navigator.userAgentData;
|
54500
|
+
|
54501
|
+
if (uaData != null && uaData.brands) {
|
54502
|
+
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
54503
|
+
}
|
54504
|
+
|
54505
|
+
return navigator.userAgent;
|
54506
|
+
}
|
54507
|
+
|
54508
|
+
function isHTMLElement(value) {
|
54509
|
+
return value instanceof getWindow(value).HTMLElement;
|
54510
|
+
}
|
54511
|
+
function isElement(value) {
|
54512
|
+
return value instanceof getWindow(value).Element;
|
54513
|
+
}
|
54514
|
+
function isNode(value) {
|
54515
|
+
return value instanceof getWindow(value).Node;
|
54516
|
+
}
|
54517
|
+
function isShadowRoot(node) {
|
54518
|
+
// Browsers without `ShadowRoot` support
|
54519
|
+
if (typeof ShadowRoot === 'undefined') {
|
54520
|
+
return false;
|
54521
|
+
}
|
54522
|
+
|
54523
|
+
const OwnElement = getWindow(node).ShadowRoot;
|
54524
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
54525
|
+
}
|
54526
|
+
function isOverflowElement(element) {
|
54527
|
+
// Firefox wants us to check `-x` and `-y` variations as well
|
54528
|
+
const {
|
54529
|
+
overflow,
|
54530
|
+
overflowX,
|
54531
|
+
overflowY
|
54532
|
+
} = getComputedStyle$1(element);
|
54533
|
+
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
54534
|
+
}
|
54535
|
+
function isTableElement(element) {
|
54536
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
54537
|
+
}
|
54538
|
+
function isContainingBlock(element) {
|
54539
|
+
// TODO: Try and use feature detection here instead
|
54540
|
+
const isFirefox = /firefox/i.test(getUAString());
|
54541
|
+
const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that
|
54542
|
+
// create a containing block.
|
54543
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
54544
|
+
|
54545
|
+
return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
|
54546
|
+
css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
|
54547
|
+
}
|
54548
|
+
function isLayoutViewport() {
|
54549
|
+
// Not Safari
|
54550
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
|
54551
|
+
// • Always-visible scrollbar or not
|
54552
|
+
// • Width of <html>, etc.
|
54553
|
+
// const vV = win.visualViewport;
|
54554
|
+
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
54555
|
+
}
|
54556
|
+
|
54557
|
+
const min = Math.min;
|
54558
|
+
const max = Math.max;
|
54559
|
+
const round = Math.round;
|
54560
|
+
|
54561
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
54562
|
+
var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
|
54563
|
+
|
54564
|
+
if (includeScale === void 0) {
|
54565
|
+
includeScale = false;
|
54566
|
+
}
|
54567
|
+
|
54568
|
+
if (isFixedStrategy === void 0) {
|
54569
|
+
isFixedStrategy = false;
|
54570
|
+
}
|
54571
|
+
|
54572
|
+
const clientRect = element.getBoundingClientRect();
|
54573
|
+
let scaleX = 1;
|
54574
|
+
let scaleY = 1;
|
54575
|
+
|
54576
|
+
if (includeScale && isHTMLElement(element)) {
|
54577
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
54578
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
54579
|
+
}
|
54580
|
+
|
54581
|
+
const win = isElement(element) ? getWindow(element) : window;
|
54582
|
+
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
54583
|
+
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;
|
54584
|
+
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;
|
54585
|
+
const width = clientRect.width / scaleX;
|
54586
|
+
const height = clientRect.height / scaleY;
|
54587
|
+
return {
|
54588
|
+
width,
|
54589
|
+
height,
|
54590
|
+
top: y,
|
54591
|
+
right: x + width,
|
54592
|
+
bottom: y + height,
|
54593
|
+
left: x,
|
54594
|
+
x,
|
54595
|
+
y
|
54596
|
+
};
|
54597
|
+
}
|
54598
|
+
|
54599
|
+
function getDocumentElement(node) {
|
54600
|
+
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
54601
|
+
}
|
54602
|
+
|
54603
|
+
function getNodeScroll(element) {
|
54604
|
+
if (isElement(element)) {
|
54605
|
+
return {
|
54606
|
+
scrollLeft: element.scrollLeft,
|
54607
|
+
scrollTop: element.scrollTop
|
54608
|
+
};
|
54609
|
+
}
|
54610
|
+
|
54611
|
+
return {
|
54612
|
+
scrollLeft: element.pageXOffset,
|
54613
|
+
scrollTop: element.pageYOffset
|
54614
|
+
};
|
54615
|
+
}
|
54616
|
+
|
54617
|
+
function getWindowScrollBarX(element) {
|
54618
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
54619
|
+
// incorrect for RTL.
|
54620
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
54621
|
+
}
|
54622
|
+
|
54623
|
+
function isScaled(element) {
|
54624
|
+
const rect = getBoundingClientRect(element);
|
54625
|
+
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
54626
|
+
}
|
54627
|
+
|
54628
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
54629
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
54630
|
+
const documentElement = getDocumentElement(offsetParent);
|
54631
|
+
const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
|
54632
|
+
isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
|
54633
|
+
let scroll = {
|
54634
|
+
scrollLeft: 0,
|
54635
|
+
scrollTop: 0
|
54636
|
+
};
|
54637
|
+
const offsets = {
|
54638
|
+
x: 0,
|
54639
|
+
y: 0
|
54640
|
+
};
|
54641
|
+
|
54642
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
54643
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
54644
|
+
scroll = getNodeScroll(offsetParent);
|
54645
|
+
}
|
54646
|
+
|
54647
|
+
if (isHTMLElement(offsetParent)) {
|
54648
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
54649
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
54650
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
54651
|
+
} else if (documentElement) {
|
54652
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
54653
|
+
}
|
54654
|
+
}
|
54655
|
+
|
54656
|
+
return {
|
54657
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
54658
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
54659
|
+
width: rect.width,
|
54660
|
+
height: rect.height
|
54661
|
+
};
|
54662
|
+
}
|
54663
|
+
|
54664
|
+
function getParentNode(node) {
|
54665
|
+
if (getNodeName(node) === 'html') {
|
54666
|
+
return node;
|
54667
|
+
}
|
54668
|
+
|
54669
|
+
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
54670
|
+
// @ts-ignore
|
54671
|
+
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
54672
|
+
node.parentNode || ( // DOM Element detected
|
54673
|
+
isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
54674
|
+
getDocumentElement(node) // fallback
|
54675
|
+
|
54676
|
+
);
|
54677
|
+
}
|
54678
|
+
|
54679
|
+
function getTrueOffsetParent(element) {
|
54680
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
54681
|
+
return null;
|
54682
|
+
}
|
54683
|
+
|
54684
|
+
return composedOffsetParent(element);
|
54685
|
+
}
|
54686
|
+
/**
|
54687
|
+
* Polyfills the old offsetParent behavior from before the spec was changed:
|
54688
|
+
* https://github.com/w3c/csswg-drafts/issues/159
|
54689
|
+
*/
|
54690
|
+
|
54691
|
+
|
54692
|
+
function composedOffsetParent(element) {
|
54693
|
+
let {
|
54694
|
+
offsetParent
|
54695
|
+
} = element;
|
54696
|
+
let ancestor = element;
|
54697
|
+
let foundInsideSlot = false;
|
54698
|
+
|
54699
|
+
while (ancestor && ancestor !== offsetParent) {
|
54700
|
+
const {
|
54701
|
+
assignedSlot
|
54702
|
+
} = ancestor;
|
54703
|
+
|
54704
|
+
if (assignedSlot) {
|
54705
|
+
let newOffsetParent = assignedSlot.offsetParent;
|
54706
|
+
|
54707
|
+
if (getComputedStyle$1(assignedSlot).display === 'contents') {
|
54708
|
+
const hadStyleAttribute = assignedSlot.hasAttribute('style');
|
54709
|
+
const oldDisplay = assignedSlot.style.display;
|
54710
|
+
assignedSlot.style.display = getComputedStyle$1(ancestor).display;
|
54711
|
+
newOffsetParent = assignedSlot.offsetParent;
|
54712
|
+
assignedSlot.style.display = oldDisplay;
|
54713
|
+
|
54714
|
+
if (!hadStyleAttribute) {
|
54715
|
+
assignedSlot.removeAttribute('style');
|
54716
|
+
}
|
54717
|
+
}
|
54718
|
+
|
54719
|
+
ancestor = assignedSlot;
|
54720
|
+
|
54721
|
+
if (offsetParent !== newOffsetParent) {
|
54722
|
+
offsetParent = newOffsetParent;
|
54723
|
+
foundInsideSlot = true;
|
54724
|
+
}
|
54725
|
+
} else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
|
54726
|
+
break;
|
54727
|
+
}
|
54728
|
+
|
54729
|
+
ancestor = isShadowRoot(ancestor) && ancestor.host || ancestor.parentNode;
|
54730
|
+
}
|
54731
|
+
|
54732
|
+
return offsetParent;
|
54733
|
+
}
|
54734
|
+
|
54735
|
+
function getContainingBlock(element) {
|
54736
|
+
let currentNode = getParentNode(element);
|
54737
|
+
|
54738
|
+
if (isShadowRoot(currentNode)) {
|
54739
|
+
currentNode = currentNode.host;
|
54740
|
+
}
|
54741
|
+
|
54742
|
+
while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
|
54743
|
+
if (isContainingBlock(currentNode)) {
|
54744
|
+
return currentNode;
|
54745
|
+
} else {
|
54746
|
+
const parent = currentNode.parentNode;
|
54747
|
+
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
54748
|
+
}
|
54749
|
+
}
|
54750
|
+
|
54751
|
+
return null;
|
54752
|
+
} // Gets the closest ancestor positioned element. Handles some edge cases,
|
54753
|
+
// such as table ancestors and cross browser bugs.
|
54754
|
+
|
54755
|
+
|
54756
|
+
function getOffsetParent(element) {
|
54757
|
+
const window = getWindow(element);
|
54758
|
+
let offsetParent = getTrueOffsetParent(element);
|
54759
|
+
|
54760
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
54761
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
54762
|
+
}
|
54763
|
+
|
54764
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
54765
|
+
return window;
|
54766
|
+
}
|
54767
|
+
|
54768
|
+
return offsetParent || getContainingBlock(element) || window;
|
54769
|
+
}
|
54770
|
+
|
54771
|
+
function getDimensions(element) {
|
54772
|
+
if (isHTMLElement(element)) {
|
54773
|
+
return {
|
54774
|
+
width: element.offsetWidth,
|
54775
|
+
height: element.offsetHeight
|
54776
|
+
};
|
54777
|
+
}
|
54778
|
+
|
54779
|
+
const rect = getBoundingClientRect(element);
|
54780
|
+
return {
|
54781
|
+
width: rect.width,
|
54782
|
+
height: rect.height
|
54783
|
+
};
|
54784
|
+
}
|
54785
|
+
|
54786
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
54787
|
+
let {
|
54788
|
+
rect,
|
54789
|
+
offsetParent,
|
54790
|
+
strategy
|
54791
|
+
} = _ref;
|
54792
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
54793
|
+
const documentElement = getDocumentElement(offsetParent);
|
54794
|
+
|
54795
|
+
if (offsetParent === documentElement) {
|
54796
|
+
return rect;
|
54797
|
+
}
|
54798
|
+
|
54799
|
+
let scroll = {
|
54800
|
+
scrollLeft: 0,
|
54801
|
+
scrollTop: 0
|
54802
|
+
};
|
54803
|
+
const offsets = {
|
54804
|
+
x: 0,
|
54805
|
+
y: 0
|
54806
|
+
};
|
54807
|
+
|
54808
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
54809
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
54810
|
+
scroll = getNodeScroll(offsetParent);
|
54811
|
+
}
|
54812
|
+
|
54813
|
+
if (isHTMLElement(offsetParent)) {
|
54814
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
54815
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
54816
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
54817
|
+
} // This doesn't appear to be need to be negated.
|
54818
|
+
// else if (documentElement) {
|
54819
|
+
// offsets.x = getWindowScrollBarX(documentElement);
|
54820
|
+
// }
|
54821
|
+
|
54822
|
+
}
|
54823
|
+
|
54824
|
+
return { ...rect,
|
54825
|
+
x: rect.x - scroll.scrollLeft + offsets.x,
|
54826
|
+
y: rect.y - scroll.scrollTop + offsets.y
|
54827
|
+
};
|
54828
|
+
}
|
54829
|
+
|
54830
|
+
function getViewportRect(element, strategy) {
|
54831
|
+
const win = getWindow(element);
|
54832
|
+
const html = getDocumentElement(element);
|
54833
|
+
const visualViewport = win.visualViewport;
|
54834
|
+
let width = html.clientWidth;
|
54835
|
+
let height = html.clientHeight;
|
54836
|
+
let x = 0;
|
54837
|
+
let y = 0;
|
54838
|
+
|
54839
|
+
if (visualViewport) {
|
54840
|
+
width = visualViewport.width;
|
54841
|
+
height = visualViewport.height;
|
54842
|
+
const layoutViewport = isLayoutViewport();
|
54843
|
+
|
54844
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
54845
|
+
x = visualViewport.offsetLeft;
|
54846
|
+
y = visualViewport.offsetTop;
|
54847
|
+
}
|
54848
|
+
}
|
54849
|
+
|
54850
|
+
return {
|
54851
|
+
width,
|
54852
|
+
height,
|
54853
|
+
x,
|
54854
|
+
y
|
54855
|
+
};
|
54856
|
+
}
|
54857
|
+
|
54858
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
54859
|
+
|
54860
|
+
function getDocumentRect(element) {
|
54861
|
+
var _element$ownerDocumen;
|
54862
|
+
|
54863
|
+
const html = getDocumentElement(element);
|
54864
|
+
const scroll = getNodeScroll(element);
|
54865
|
+
const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
54866
|
+
const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
54867
|
+
const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
54868
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
54869
|
+
const y = -scroll.scrollTop;
|
54870
|
+
|
54871
|
+
if (getComputedStyle$1(body || html).direction === 'rtl') {
|
54872
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
54873
|
+
}
|
54874
|
+
|
54875
|
+
return {
|
54876
|
+
width,
|
54877
|
+
height,
|
54878
|
+
x,
|
54879
|
+
y
|
54880
|
+
};
|
54881
|
+
}
|
54882
|
+
|
54883
|
+
function getNearestOverflowAncestor(node) {
|
54884
|
+
const parentNode = getParentNode(node);
|
54885
|
+
|
54886
|
+
if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
|
54887
|
+
// @ts-ignore assume body is always available
|
54888
|
+
return node.ownerDocument.body;
|
54889
|
+
}
|
54890
|
+
|
54891
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
54892
|
+
return parentNode;
|
54893
|
+
}
|
54894
|
+
|
54895
|
+
return getNearestOverflowAncestor(parentNode);
|
54896
|
+
}
|
54897
|
+
|
54898
|
+
function getOverflowAncestors(node, list) {
|
54899
|
+
var _node$ownerDocument;
|
54900
|
+
|
54901
|
+
if (list === void 0) {
|
54902
|
+
list = [];
|
54903
|
+
}
|
54904
|
+
|
54905
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
54906
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
54907
|
+
const win = getWindow(scrollableAncestor);
|
54908
|
+
const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
|
54909
|
+
const updatedList = list.concat(target);
|
54910
|
+
return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
|
54911
|
+
updatedList.concat(getOverflowAncestors(target));
|
54912
|
+
}
|
54913
|
+
|
54914
|
+
function contains(parent, child) {
|
54915
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
|
54916
|
+
|
54917
|
+
if (parent.contains(child)) {
|
54918
|
+
return true;
|
54919
|
+
} // then fallback to custom implementation with Shadow DOM support
|
54920
|
+
else if (rootNode && isShadowRoot(rootNode)) {
|
54921
|
+
let next = child;
|
54922
|
+
|
54923
|
+
do {
|
54924
|
+
// use `===` replace node.isSameNode()
|
54925
|
+
if (next && parent === next) {
|
54926
|
+
return true;
|
54927
|
+
} // @ts-ignore: need a better way to handle this...
|
54928
|
+
|
54929
|
+
|
54930
|
+
next = next.parentNode || next.host;
|
54931
|
+
} while (next);
|
54932
|
+
}
|
54933
|
+
|
54934
|
+
return false;
|
54935
|
+
}
|
54936
|
+
|
54937
|
+
function getInnerBoundingClientRect(element, strategy) {
|
54938
|
+
const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
|
54939
|
+
const top = clientRect.top + element.clientTop;
|
54940
|
+
const left = clientRect.left + element.clientLeft;
|
54941
|
+
return {
|
54942
|
+
top,
|
54943
|
+
left,
|
54944
|
+
x: left,
|
54945
|
+
y: top,
|
54946
|
+
right: left + element.clientWidth,
|
54947
|
+
bottom: top + element.clientHeight,
|
54948
|
+
width: element.clientWidth,
|
54949
|
+
height: element.clientHeight
|
54950
|
+
};
|
54951
|
+
}
|
54952
|
+
|
54953
|
+
function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
|
54954
|
+
if (clippingParent === 'viewport') {
|
54955
|
+
return rectToClientRect(getViewportRect(element, strategy));
|
54956
|
+
}
|
54957
|
+
|
54958
|
+
if (isElement(clippingParent)) {
|
54959
|
+
return getInnerBoundingClientRect(clippingParent, strategy);
|
54960
|
+
}
|
54961
|
+
|
54962
|
+
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
54963
|
+
} // A "clipping ancestor" is an overflowable container with the characteristic of
|
54964
|
+
// clipping (or hiding) overflowing elements with a position different from
|
54965
|
+
// `initial`
|
54966
|
+
|
54967
|
+
|
54968
|
+
function getClippingAncestors(element) {
|
54969
|
+
const clippingAncestors = getOverflowAncestors(element);
|
54970
|
+
const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);
|
54971
|
+
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
54972
|
+
|
54973
|
+
if (!isElement(clipperElement)) {
|
54974
|
+
return [];
|
54975
|
+
} // @ts-ignore isElement check ensures we return Array<Element>
|
54976
|
+
|
54977
|
+
|
54978
|
+
return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
|
54979
|
+
} // Gets the maximum area that the element is visible in due to any number of
|
54980
|
+
// clipping ancestors
|
54981
|
+
|
54982
|
+
|
54983
|
+
function getClippingRect(_ref) {
|
54984
|
+
let {
|
54985
|
+
element,
|
54986
|
+
boundary,
|
54987
|
+
rootBoundary,
|
54988
|
+
strategy
|
54989
|
+
} = _ref;
|
54990
|
+
const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
|
54991
|
+
const clippingAncestors = [...mainClippingAncestors, rootBoundary];
|
54992
|
+
const firstClippingAncestor = clippingAncestors[0];
|
54993
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
54994
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
54995
|
+
accRect.top = max(rect.top, accRect.top);
|
54996
|
+
accRect.right = min(rect.right, accRect.right);
|
54997
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
54998
|
+
accRect.left = max(rect.left, accRect.left);
|
54999
|
+
return accRect;
|
55000
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
55001
|
+
return {
|
55002
|
+
width: clippingRect.right - clippingRect.left,
|
55003
|
+
height: clippingRect.bottom - clippingRect.top,
|
55004
|
+
x: clippingRect.left,
|
55005
|
+
y: clippingRect.top
|
55006
|
+
};
|
55007
|
+
}
|
55008
|
+
|
55009
|
+
const platform = {
|
55010
|
+
getClippingRect,
|
55011
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
55012
|
+
isElement,
|
55013
|
+
getDimensions,
|
55014
|
+
getOffsetParent,
|
55015
|
+
getDocumentElement,
|
55016
|
+
getElementRects: _ref => {
|
55017
|
+
let {
|
55018
|
+
reference,
|
55019
|
+
floating,
|
55020
|
+
strategy
|
55021
|
+
} = _ref;
|
55022
|
+
return {
|
55023
|
+
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
55024
|
+
floating: { ...getDimensions(floating),
|
55025
|
+
x: 0,
|
55026
|
+
y: 0
|
55027
|
+
}
|
55028
|
+
};
|
55029
|
+
},
|
55030
|
+
getClientRects: element => Array.from(element.getClientRects()),
|
55031
|
+
isRTL: element => getComputedStyle$1(element).direction === 'rtl'
|
55032
|
+
};
|
55033
|
+
|
55034
|
+
/**
|
55035
|
+
* Automatically updates the position of the floating element when necessary.
|
55036
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
55037
|
+
*/
|
55038
|
+
function autoUpdate(reference, floating, update, options) {
|
55039
|
+
if (options === void 0) {
|
55040
|
+
options = {};
|
55041
|
+
}
|
55042
|
+
|
55043
|
+
const {
|
55044
|
+
ancestorScroll: _ancestorScroll = true,
|
55045
|
+
ancestorResize: _ancestorResize = true,
|
55046
|
+
elementResize = true,
|
55047
|
+
animationFrame = false
|
55048
|
+
} = options;
|
55049
|
+
const ancestorScroll = _ancestorScroll && !animationFrame;
|
55050
|
+
const ancestorResize = _ancestorResize && !animationFrame;
|
55051
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
|
55052
|
+
ancestors.forEach(ancestor => {
|
55053
|
+
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
55054
|
+
passive: true
|
55055
|
+
});
|
55056
|
+
ancestorResize && ancestor.addEventListener('resize', update);
|
55057
|
+
});
|
55058
|
+
let observer = null;
|
55059
|
+
|
55060
|
+
if (elementResize) {
|
55061
|
+
let initialUpdate = true;
|
55062
|
+
observer = new ResizeObserver(() => {
|
55063
|
+
if (!initialUpdate) {
|
55064
|
+
update();
|
55065
|
+
}
|
55066
|
+
|
55067
|
+
initialUpdate = false;
|
55068
|
+
});
|
55069
|
+
isElement(reference) && !animationFrame && observer.observe(reference);
|
55070
|
+
observer.observe(floating);
|
55071
|
+
}
|
55072
|
+
|
55073
|
+
let frameId;
|
55074
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
55075
|
+
|
55076
|
+
if (animationFrame) {
|
55077
|
+
frameLoop();
|
55078
|
+
}
|
55079
|
+
|
55080
|
+
function frameLoop() {
|
55081
|
+
const nextRefRect = getBoundingClientRect(reference);
|
55082
|
+
|
55083
|
+
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
55084
|
+
update();
|
55085
|
+
}
|
55086
|
+
|
55087
|
+
prevRefRect = nextRefRect;
|
55088
|
+
frameId = requestAnimationFrame(frameLoop);
|
55089
|
+
}
|
55090
|
+
|
55091
|
+
update();
|
55092
|
+
return () => {
|
55093
|
+
var _observer;
|
55094
|
+
|
55095
|
+
ancestors.forEach(ancestor => {
|
55096
|
+
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
55097
|
+
ancestorResize && ancestor.removeEventListener('resize', update);
|
55098
|
+
});
|
55099
|
+
(_observer = observer) == null ? void 0 : _observer.disconnect();
|
55100
|
+
observer = null;
|
55101
|
+
|
55102
|
+
if (animationFrame) {
|
55103
|
+
cancelAnimationFrame(frameId);
|
55104
|
+
}
|
55105
|
+
};
|
55106
|
+
}
|
55107
|
+
|
55108
|
+
/**
|
55109
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
55110
|
+
* next to a reference element when it is given a certain CSS positioning
|
55111
|
+
* strategy.
|
55112
|
+
*/
|
55113
|
+
|
55114
|
+
const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
|
55115
|
+
platform,
|
55116
|
+
...options
|
55117
|
+
});
|
55118
|
+
|
53270
55119
|
const visualHiddenProps = buildProps({
|
53271
55120
|
style: {
|
53272
55121
|
type: definePropType([String, Object, Array]),
|
@@ -54199,7 +56048,7 @@
|
|
54199
56048
|
});
|
54200
56049
|
};
|
54201
56050
|
let nodeIdSeed = 0;
|
54202
|
-
class Node {
|
56051
|
+
class Node$1 {
|
54203
56052
|
constructor(options) {
|
54204
56053
|
this.isLeafByUser = void 0;
|
54205
56054
|
this.isLeaf = void 0;
|
@@ -54330,7 +56179,7 @@
|
|
54330
56179
|
insertChild(child, index, batch) {
|
54331
56180
|
if (!child)
|
54332
56181
|
throw new Error("InsertChild error: child is required.");
|
54333
|
-
if (!(child instanceof Node)) {
|
56182
|
+
if (!(child instanceof Node$1)) {
|
54334
56183
|
if (!batch) {
|
54335
56184
|
const children = this.getChildren(true);
|
54336
56185
|
if (!(children == null ? void 0 : children.includes(child.data))) {
|
@@ -54345,8 +56194,8 @@
|
|
54345
56194
|
parent: this,
|
54346
56195
|
store: this.store
|
54347
56196
|
});
|
54348
|
-
child = vue.reactive(new Node(child));
|
54349
|
-
if (child instanceof Node) {
|
56197
|
+
child = vue.reactive(new Node$1(child));
|
56198
|
+
if (child instanceof Node$1) {
|
54350
56199
|
child.initialize();
|
54351
56200
|
}
|
54352
56201
|
}
|
@@ -54580,7 +56429,7 @@
|
|
54580
56429
|
reInitChecked(this);
|
54581
56430
|
}
|
54582
56431
|
}
|
54583
|
-
var Node$
|
56432
|
+
var Node$2 = Node$1;
|
54584
56433
|
|
54585
56434
|
class TreeStore {
|
54586
56435
|
constructor(options) {
|
@@ -54599,7 +56448,7 @@
|
|
54599
56448
|
this.nodesMap = {};
|
54600
56449
|
}
|
54601
56450
|
initialize() {
|
54602
|
-
this.root = new Node$
|
56451
|
+
this.root = new Node$2({
|
54603
56452
|
data: this.data,
|
54604
56453
|
store: this
|
54605
56454
|
});
|
@@ -54657,7 +56506,7 @@
|
|
54657
56506
|
}
|
54658
56507
|
}
|
54659
56508
|
getNode(data) {
|
54660
|
-
if (data instanceof Node$
|
56509
|
+
if (data instanceof Node$2)
|
54661
56510
|
return data;
|
54662
56511
|
const key = isObject$1(data) ? getNodeKey(this.key, data) : data;
|
54663
56512
|
return this.nodesMap[key] || null;
|
@@ -55135,7 +56984,7 @@
|
|
55135
56984
|
},
|
55136
56985
|
props: {
|
55137
56986
|
node: {
|
55138
|
-
type: Node$
|
56987
|
+
type: Node$2,
|
55139
56988
|
default: () => ({})
|
55140
56989
|
},
|
55141
56990
|
props: {
|
@@ -61780,7 +63629,7 @@
|
|
61780
63629
|
normalized.appendTo = document.body;
|
61781
63630
|
} else if (isString$1(normalized.appendTo)) {
|
61782
63631
|
let appendTo = document.querySelector(normalized.appendTo);
|
61783
|
-
if (!isElement$
|
63632
|
+
if (!isElement$2(appendTo)) {
|
61784
63633
|
appendTo = document.body;
|
61785
63634
|
}
|
61786
63635
|
normalized.appendTo = appendTo;
|
@@ -62367,10 +64216,10 @@
|
|
62367
64216
|
if (isString$1(props.appendTo)) {
|
62368
64217
|
appendTo = document.querySelector(props.appendTo);
|
62369
64218
|
}
|
62370
|
-
if (isElement$
|
64219
|
+
if (isElement$2(props.appendTo)) {
|
62371
64220
|
appendTo = props.appendTo;
|
62372
64221
|
}
|
62373
|
-
if (!isElement$
|
64222
|
+
if (!isElement$2(appendTo)) {
|
62374
64223
|
appendTo = document.body;
|
62375
64224
|
}
|
62376
64225
|
}
|
@@ -62738,12 +64587,12 @@
|
|
62738
64587
|
}
|
62739
64588
|
};
|
62740
64589
|
let appendTo = document.body;
|
62741
|
-
if (isElement$
|
64590
|
+
if (isElement$2(options.appendTo)) {
|
62742
64591
|
appendTo = options.appendTo;
|
62743
64592
|
} else if (isString$1(options.appendTo)) {
|
62744
64593
|
appendTo = document.querySelector(options.appendTo);
|
62745
64594
|
}
|
62746
|
-
if (!isElement$
|
64595
|
+
if (!isElement$2(appendTo)) {
|
62747
64596
|
appendTo = document.body;
|
62748
64597
|
}
|
62749
64598
|
const container = document.createElement("div");
|