@swisspost/internet-header 10.4.0 → 10.5.0
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/cjs/{breakpoints-CI0Xuh1L.js → breakpoints-Kruvy8Dm.js} +11 -10
- package/dist/cjs/{event-from-CwMw19f8.js → event-from-CTcQxB9-.js} +19 -13
- package/dist/cjs/index-B5ypPkK3.js +4 -4
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CL8OSAS4.js → package-DdU-rENe.js} +1 -1
- package/dist/cjs/{package-HZ6bBKwJ.js → package-pLOjVG24.js} +1 -1
- package/dist/cjs/post-accordion_4.cjs.entry.js +4 -4
- package/dist/cjs/post-autocomplete.cjs.entry.js +65 -50
- package/dist/cjs/post-avatar.cjs.entry.js +1 -1
- package/dist/cjs/post-back-to-top.cjs.entry.js +20 -8
- package/dist/cjs/post-banner.cjs.entry.js +2 -9
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +11 -3
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +111 -61
- package/dist/cjs/post-closebutton.cjs.entry.js +46 -8
- package/dist/cjs/post-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/post-footer.cjs.entry.js +4 -5
- package/dist/cjs/post-header.cjs.entry.js +5 -5
- package/dist/cjs/post-icon.cjs.entry.js +2 -2
- package/dist/cjs/post-language-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/post-language-menu.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox-option.cjs.entry.js +3 -3
- package/dist/cjs/post-listbox.cjs.entry.js +4 -4
- package/dist/cjs/post-logo.cjs.entry.js +2 -2
- package/dist/cjs/post-mainnavigation.cjs.entry.js +2 -2
- package/dist/cjs/post-megadropdown-trigger.cjs.entry.js +3 -3
- package/dist/cjs/post-megadropdown.cjs.entry.js +3 -4
- package/dist/cjs/post-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/post-menu_2.cjs.entry.js +25 -10
- package/dist/cjs/post-number-input.cjs.entry.js +3 -3
- package/dist/cjs/post-pagination.cjs.entry.js +1 -1
- package/dist/cjs/post-popover-trigger.cjs.entry.js +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/post-popovercontainer.cjs.entry.js +317 -176
- package/dist/cjs/post-progressbar.cjs.entry.js +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +3 -3
- package/dist/cjs/post-side-navigation.cjs.entry.js +4 -5
- package/dist/cjs/post-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/post-stepper.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-item.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-togglebutton.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/swisspost-internet-footer.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.js +1 -1
- package/dist/components/breakpoints.js +1 -1
- package/dist/components/event-from.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/package2.js +1 -1
- package/dist/components/post-autocomplete.js +1 -1
- package/dist/components/post-back-to-top.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +1 -1
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-date-picker.js +1 -1
- package/dist/components/post-footer2.js +1 -1
- package/dist/components/post-header2.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-logo2.js +1 -1
- package/dist/components/post-mainnavigation2.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-progressbar.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-side-navigation-trigger.js +1 -1
- package/dist/components/post-side-navigation.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{breakpoints-C3jWktf-.js → breakpoints-I1j7a0bW.js} +11 -10
- package/dist/esm/{event-from-rEfV4v4a.js → event-from-BEcxHjuM.js} +19 -14
- package/dist/esm/index-h3opCZqH.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-B4lS4y6E.js → package-CWWSnot0.js} +1 -1
- package/dist/esm/{package-tTf1w3A9.js → package-Ny5VnydI.js} +1 -1
- package/dist/esm/post-accordion_4.entry.js +4 -4
- package/dist/esm/post-autocomplete.entry.js +65 -50
- package/dist/esm/post-avatar.entry.js +1 -1
- package/dist/esm/post-back-to-top.entry.js +20 -8
- package/dist/esm/post-banner.entry.js +2 -9
- package/dist/esm/post-breadcrumb-item.entry.js +11 -3
- package/dist/esm/post-breadcrumbs.entry.js +111 -61
- package/dist/esm/post-closebutton.entry.js +46 -8
- package/dist/esm/post-date-picker.entry.js +3 -3
- package/dist/esm/post-footer.entry.js +4 -5
- package/dist/esm/post-header.entry.js +5 -5
- package/dist/esm/post-icon.entry.js +2 -2
- package/dist/esm/post-language-menu-item.entry.js +1 -1
- package/dist/esm/post-language-menu.entry.js +3 -3
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/post-listbox-option.entry.js +3 -3
- package/dist/esm/post-listbox.entry.js +4 -4
- package/dist/esm/post-logo.entry.js +2 -2
- package/dist/esm/post-mainnavigation.entry.js +2 -2
- package/dist/esm/post-megadropdown-trigger.entry.js +3 -3
- package/dist/esm/post-megadropdown.entry.js +3 -4
- package/dist/esm/post-menu-item.entry.js +1 -1
- package/dist/esm/post-menu_2.entry.js +25 -10
- package/dist/esm/post-number-input.entry.js +3 -3
- package/dist/esm/post-pagination.entry.js +1 -1
- package/dist/esm/post-popover-trigger.entry.js +3 -3
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/post-popovercontainer.entry.js +317 -176
- package/dist/esm/post-progressbar.entry.js +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-side-navigation-trigger.entry.js +3 -3
- package/dist/esm/post-side-navigation.entry.js +4 -5
- package/dist/esm/post-stepper-item.entry.js +2 -2
- package/dist/esm/post-stepper.entry.js +2 -2
- package/dist/esm/post-tab-item.entry.js +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-togglebutton.entry.js +2 -2
- package/dist/esm/post-tooltip-trigger.entry.js +2 -2
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/esm/swisspost-internet-footer.entry.js +1 -1
- package/dist/esm/swisspost-internet-header.entry.js +1 -1
- package/dist/esm/swisspost-internet-header.js +1 -1
- package/dist/esm-es5/breakpoints-I1j7a0bW.js +1 -0
- package/dist/esm-es5/event-from-BEcxHjuM.js +1 -0
- package/dist/esm-es5/index-h3opCZqH.js +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{package-B4lS4y6E.js → package-CWWSnot0.js} +1 -1
- package/dist/esm-es5/package-Ny5VnydI.js +1 -0
- package/dist/esm-es5/post-accordion_4.entry.js +1 -1
- package/dist/esm-es5/post-autocomplete.entry.js +1 -1
- package/dist/esm-es5/post-avatar.entry.js +1 -1
- package/dist/esm-es5/post-back-to-top.entry.js +1 -1
- package/dist/esm-es5/post-banner.entry.js +1 -1
- package/dist/esm-es5/post-breadcrumb-item.entry.js +1 -1
- package/dist/esm-es5/post-breadcrumbs.entry.js +1 -1
- package/dist/esm-es5/post-closebutton.entry.js +1 -1
- package/dist/esm-es5/post-date-picker.entry.js +1 -1
- package/dist/esm-es5/post-footer.entry.js +1 -1
- package/dist/esm-es5/post-header.entry.js +1 -1
- package/dist/esm-es5/post-icon.entry.js +1 -1
- package/dist/esm-es5/post-language-menu-item.entry.js +1 -1
- package/dist/esm-es5/post-language-menu.entry.js +1 -1
- package/dist/esm-es5/post-linkarea.entry.js +1 -1
- package/dist/esm-es5/post-listbox-option.entry.js +1 -1
- package/dist/esm-es5/post-listbox.entry.js +1 -1
- package/dist/esm-es5/post-logo.entry.js +1 -1
- package/dist/esm-es5/post-mainnavigation.entry.js +1 -1
- package/dist/esm-es5/post-megadropdown-trigger.entry.js +1 -1
- package/dist/esm-es5/post-megadropdown.entry.js +1 -1
- package/dist/esm-es5/post-menu-item.entry.js +1 -1
- package/dist/esm-es5/post-menu_2.entry.js +1 -1
- package/dist/esm-es5/post-number-input.entry.js +1 -1
- package/dist/esm-es5/post-pagination.entry.js +1 -1
- package/dist/esm-es5/post-popover-trigger.entry.js +1 -1
- package/dist/esm-es5/post-popover.entry.js +1 -1
- package/dist/esm-es5/post-popovercontainer.entry.js +1 -1
- package/dist/esm-es5/post-progressbar.entry.js +1 -1
- package/dist/esm-es5/post-rating.entry.js +1 -1
- package/dist/esm-es5/post-side-navigation-trigger.entry.js +1 -1
- package/dist/esm-es5/post-side-navigation.entry.js +1 -1
- package/dist/esm-es5/post-stepper-item.entry.js +1 -1
- package/dist/esm-es5/post-stepper.entry.js +1 -1
- package/dist/esm-es5/post-tab-item.entry.js +1 -1
- package/dist/esm-es5/post-tab-panel.entry.js +1 -1
- package/dist/esm-es5/post-tabs.entry.js +1 -1
- package/dist/esm-es5/post-togglebutton.entry.js +1 -1
- package/dist/esm-es5/post-tooltip-trigger.entry.js +1 -1
- package/dist/esm-es5/post-tooltip.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-footer.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.js +1 -1
- package/dist/swisspost-internet-header/index.esm.js +1 -1
- package/dist/swisspost-internet-header/{p-92e0402a.entry.js → p-004c6278.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-429f04bc.system.entry.js → p-03a80973.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-79512699.entry.js → p-04651cdc.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-06eb086c.system.entry.js +1 -0
- package/dist/swisspost-internet-header/p-08a6f709.system.entry.js +1 -0
- package/dist/swisspost-internet-header/p-097214a3.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-80cb2bdb.entry.js → p-138f2186.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-14a5b926.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-bc470741.entry.js → p-1501e9e0.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-65cfb55b.entry.js → p-15613920.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-159e96f4.system.entry.js +1 -0
- package/dist/swisspost-internet-header/p-1c33394a.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-8e61f407.system.entry.js → p-204aaba4.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-f7a9a615.system.entry.js → p-250ff1e6.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-e9582f72.system.entry.js → p-2e23353c.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-0de83906.entry.js → p-2e4a1d59.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-30b56aa5.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-06de7983.entry.js → p-38159567.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-756574fd.entry.js → p-3b8bc9bf.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-3dfdd503.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-be97ff93.system.entry.js → p-3f3e5828.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-3f704fa4.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-fe440b79.entry.js → p-40ee5200.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-436a661f.entry.js +1 -0
- package/dist/swisspost-internet-header/p-4e883523.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-ecb554c7.system.entry.js → p-51c3d47f.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-58318d31.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-a204bb79.system.entry.js → p-5e98bd48.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-2ec721b4.system.entry.js → p-638891f4.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-6d4d21b7.entry.js +1 -0
- package/dist/swisspost-internet-header/p-6d67cc9d.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-31f0de1e.entry.js → p-6dea21a2.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-7204ff05.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-3c228ed0.system.entry.js → p-735effe5.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-770cac8f.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-52e305d7.system.entry.js → p-7f223aac.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-81985723.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-80993537.system.entry.js → p-83549cef.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-85d6fa3b.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-1801d35d.system.entry.js → p-8978be6a.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-d7e470ff.system.entry.js → p-8afbbdf6.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-c1e959fb.entry.js → p-8c11a307.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-48cace4d.system.entry.js → p-8e81fedf.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-9b4f74a6.system.entry.js → p-93653f6e.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-BEcxHjuM.js +1 -0
- package/dist/swisspost-internet-header/{p-BhneAPKT.system.js → p-Bkt75U1-.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-B4kfqOjJ.js → p-C3HusDuA.js} +1 -1
- package/dist/swisspost-internet-header/{p-D8meK6Dd.system.js → p-CYCx3cRc.system.js} +1 -1
- package/dist/swisspost-internet-header/p-D1A3ltXC.system.js +1 -0
- package/dist/swisspost-internet-header/p-I1j7a0bW.js +1 -0
- package/dist/swisspost-internet-header/{p-CHYNOqn0.system.js → p-MZb_boDk.system.js} +1 -1
- package/dist/swisspost-internet-header/p-Ny5VnydI.js +1 -0
- package/dist/swisspost-internet-header/p-R5BnOD0U.system.js +1 -1
- package/dist/swisspost-internet-header/p-a1476fe8.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-b8bb2c10.entry.js → p-a1a640e5.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-a24350c6.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-de258c90.system.entry.js → p-a3f0cee6.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-36be5234.entry.js → p-a5b1c8b5.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-a6db4d60.entry.js +1 -0
- package/dist/swisspost-internet-header/p-aaa51210.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-09d4521f.entry.js → p-b1d25e1d.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-b62df652.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-0da236b6.system.entry.js → p-badd758a.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-658dd74d.entry.js → p-bb7fe5c4.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-7c53064b.entry.js → p-c0cd2db1.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-90e78f26.system.entry.js → p-c275ce9f.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-c5a114a3.system.entry.js +1 -0
- package/dist/swisspost-internet-header/p-c96d1aeb.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-4876e706.system.entry.js → p-cb0bcdf7.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-bf2996de.system.entry.js → p-cc0d4d02.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-120a2867.entry.js → p-d6f0b224.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-17a3d14a.system.entry.js → p-d90947de.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-db9eae5a.system.entry.js → p-d96cbabb.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-f32d49d7.entry.js → p-dbb7038b.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-2b04e974.system.entry.js → p-dcee68ed.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-dd20bb2e.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-2501eb09.entry.js → p-ddbbc505.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-deadf1bf.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-f2ed3863.entry.js → p-e008aab0.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-f523050e.entry.js → p-e02d5b07.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-9e57bd5a.entry.js → p-e0563b59.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-e5171236.entry.js +1 -0
- package/dist/swisspost-internet-header/p-e6c60488.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-25a5281d.entry.js → p-e9569ed9.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-ec43767f.entry.js → p-eb0b4ff8.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-a9c5178f.system.entry.js → p-ee42c33b.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-85087a43.system.entry.js → p-f04924d8.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-f54a41d5.system.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-ab97669b.system.entry.js → p-f8cb3ed7.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-e3515572.entry.js → p-fa10409f.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-fb4b0989.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-bda3094c.entry.js → p-fddbd731.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-ec06df2f.entry.js → p-fec7c3c1.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-iSGRM5O1.system.js +1 -0
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
- package/package.json +4 -4
- package/dist/esm-es5/breakpoints-C3jWktf-.js +0 -1
- package/dist/esm-es5/event-from-rEfV4v4a.js +0 -1
- package/dist/esm-es5/package-tTf1w3A9.js +0 -1
- package/dist/swisspost-internet-header/p-16182f34.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-1a39c0c7.entry.js +0 -1
- package/dist/swisspost-internet-header/p-1aeb1d6c.entry.js +0 -1
- package/dist/swisspost-internet-header/p-1ec41382.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-1f30f235.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-1fe8276f.entry.js +0 -1
- package/dist/swisspost-internet-header/p-2738143c.entry.js +0 -1
- package/dist/swisspost-internet-header/p-2990978f.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-3373f238.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-34259104.entry.js +0 -1
- package/dist/swisspost-internet-header/p-3c917e9d.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-42394464.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-4b44ce5f.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-4d3939eb.entry.js +0 -1
- package/dist/swisspost-internet-header/p-5efffa89.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-7a66d431.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-7baa1968.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-805ee472.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-83410f32.entry.js +0 -1
- package/dist/swisspost-internet-header/p-8b9c9fda.entry.js +0 -1
- package/dist/swisspost-internet-header/p-925c8906.entry.js +0 -1
- package/dist/swisspost-internet-header/p-999af688.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-C1pxTt7y.system.js +0 -1
- package/dist/swisspost-internet-header/p-CGtndO2e.system.js +0 -1
- package/dist/swisspost-internet-header/p-Ck6UMUSA.js +0 -1
- package/dist/swisspost-internet-header/p-acabba28.entry.js +0 -1
- package/dist/swisspost-internet-header/p-aefc1c4c.entry.js +0 -1
- package/dist/swisspost-internet-header/p-b05dd248.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-c546bebe.entry.js +0 -1
- package/dist/swisspost-internet-header/p-ca9c885e.entry.js +0 -1
- package/dist/swisspost-internet-header/p-e26d9136.entry.js +0 -1
- package/dist/swisspost-internet-header/p-ec45ed63.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-f56fe63d.entry.js +0 -1
- package/dist/swisspost-internet-header/p-fe9ac5ca.system.entry.js +0 -1
- package/dist/swisspost-internet-header/p-rEfV4v4a.js +0 -1
- package/dist/swisspost-internet-header/p-tTf1w3A9.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-B5ypPkK3.js');
|
|
4
|
-
var _package = require('./package-
|
|
4
|
+
var _package = require('./package-DdU-rENe.js');
|
|
5
5
|
var oneOf = require('./one-of-7TSi182P.js');
|
|
6
6
|
var placement = require('./placement-qEFR9hmI.js');
|
|
7
7
|
var type = require('./type-CAeEC3oM.js');
|
|
@@ -12,6 +12,7 @@ require('./create-validator-decorator-CJK3Xf77.js');
|
|
|
12
12
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
15
16
|
const min = Math.min;
|
|
16
17
|
const max = Math.max;
|
|
17
18
|
const round = Math.round;
|
|
@@ -104,12 +105,12 @@ function getOppositePlacement(placement) {
|
|
|
104
105
|
return oppositeSideMap[side] + placement.slice(side.length);
|
|
105
106
|
}
|
|
106
107
|
function expandPaddingObject(padding) {
|
|
108
|
+
var _padding$top, _padding$right, _padding$bottom, _padding$left;
|
|
107
109
|
return {
|
|
108
|
-
top: 0,
|
|
109
|
-
right: 0,
|
|
110
|
-
bottom: 0,
|
|
111
|
-
left: 0
|
|
112
|
-
...padding
|
|
110
|
+
top: (_padding$top = padding.top) != null ? _padding$top : 0,
|
|
111
|
+
right: (_padding$right = padding.right) != null ? _padding$right : 0,
|
|
112
|
+
bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
|
|
113
|
+
left: (_padding$left = padding.left) != null ? _padding$left : 0
|
|
113
114
|
};
|
|
114
115
|
}
|
|
115
116
|
function getPaddingObject(padding) {
|
|
@@ -184,13 +185,9 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
184
185
|
y: reference.y
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
break;
|
|
191
|
-
case 'end':
|
|
192
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
193
|
-
break;
|
|
188
|
+
const alignment = getAlignment(placement);
|
|
189
|
+
if (alignment) {
|
|
190
|
+
coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
|
|
194
191
|
}
|
|
195
192
|
return coords;
|
|
196
193
|
}
|
|
@@ -239,10 +236,7 @@ async function detectOverflow(state, options) {
|
|
|
239
236
|
height: rects.floating.height
|
|
240
237
|
} : rects.reference;
|
|
241
238
|
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
242
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)))
|
|
243
|
-
x: 1,
|
|
244
|
-
y: 1
|
|
245
|
-
} : {
|
|
239
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
246
240
|
x: 1,
|
|
247
241
|
y: 1
|
|
248
242
|
};
|
|
@@ -415,17 +409,16 @@ const arrow$1 = options => ({
|
|
|
415
409
|
|
|
416
410
|
// Make sure the arrow doesn't overflow the floating element if the center
|
|
417
411
|
// point is outside the floating element's bounds.
|
|
418
|
-
const min$1 = minPadding;
|
|
419
412
|
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
420
413
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
421
|
-
const offset = clamp(
|
|
414
|
+
const offset = clamp(minPadding, center, max);
|
|
422
415
|
|
|
423
416
|
// If the reference is small enough that the arrow's padding causes it to
|
|
424
417
|
// to point to nothing for an aligned placement, adjust the offset of the
|
|
425
418
|
// floating element itself. To ensure `shift()` continues to take action,
|
|
426
419
|
// a single reset is performed when this is true.
|
|
427
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center <
|
|
428
|
-
const alignmentOffset = shouldAddOffset ? center <
|
|
420
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
421
|
+
const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;
|
|
429
422
|
return {
|
|
430
423
|
[axis]: coords[axis] + alignmentOffset,
|
|
431
424
|
data: {
|
|
@@ -572,6 +565,76 @@ const flip$1 = function (options) {
|
|
|
572
565
|
};
|
|
573
566
|
};
|
|
574
567
|
|
|
568
|
+
function getSideOffsets(overflow, rect) {
|
|
569
|
+
return {
|
|
570
|
+
top: overflow.top - rect.height,
|
|
571
|
+
right: overflow.right - rect.width,
|
|
572
|
+
bottom: overflow.bottom - rect.height,
|
|
573
|
+
left: overflow.left - rect.width
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
function isAnySideFullyClipped(overflow) {
|
|
577
|
+
return sides.some(side => overflow[side] >= 0);
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
581
|
+
* when it is not in the same clipping context as the reference element.
|
|
582
|
+
* @see https://floating-ui.com/docs/hide
|
|
583
|
+
*/
|
|
584
|
+
const hide$1 = function (options) {
|
|
585
|
+
if (options === void 0) {
|
|
586
|
+
options = {};
|
|
587
|
+
}
|
|
588
|
+
return {
|
|
589
|
+
name: 'hide',
|
|
590
|
+
options,
|
|
591
|
+
async fn(state) {
|
|
592
|
+
const {
|
|
593
|
+
rects,
|
|
594
|
+
platform
|
|
595
|
+
} = state;
|
|
596
|
+
const {
|
|
597
|
+
strategy = 'referenceHidden',
|
|
598
|
+
...detectOverflowOptions
|
|
599
|
+
} = evaluate(options, state);
|
|
600
|
+
switch (strategy) {
|
|
601
|
+
case 'referenceHidden':
|
|
602
|
+
{
|
|
603
|
+
const overflow = await platform.detectOverflow(state, {
|
|
604
|
+
...detectOverflowOptions,
|
|
605
|
+
elementContext: 'reference'
|
|
606
|
+
});
|
|
607
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
608
|
+
return {
|
|
609
|
+
data: {
|
|
610
|
+
referenceHiddenOffsets: offsets,
|
|
611
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
case 'escaped':
|
|
616
|
+
{
|
|
617
|
+
const overflow = await platform.detectOverflow(state, {
|
|
618
|
+
...detectOverflowOptions,
|
|
619
|
+
altBoundary: true
|
|
620
|
+
});
|
|
621
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
622
|
+
return {
|
|
623
|
+
data: {
|
|
624
|
+
escapedOffsets: offsets,
|
|
625
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
default:
|
|
630
|
+
{
|
|
631
|
+
return {};
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
|
|
575
638
|
function getBoundingRect(rects) {
|
|
576
639
|
const minX = min(...rects.map(rect => rect.left));
|
|
577
640
|
const minY = min(...rects.map(rect => rect.top));
|
|
@@ -628,12 +691,19 @@ const inline$1 = function (options) {
|
|
|
628
691
|
y
|
|
629
692
|
} = evaluate(options, state);
|
|
630
693
|
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
|
|
694
|
+
|
|
695
|
+
// No rects (e.g. a hidden or detached reference, or a collapsed range) —
|
|
696
|
+
// keep the existing reference rect rather than resetting to an invalid
|
|
697
|
+
// one with non-finite values.
|
|
698
|
+
if (!nativeClientRects.length) {
|
|
699
|
+
return {};
|
|
700
|
+
}
|
|
631
701
|
const clientRects = getRectsByLine(nativeClientRects);
|
|
632
702
|
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
633
703
|
const paddingObject = getPaddingObject(padding);
|
|
634
704
|
function getBoundingClientRect() {
|
|
635
705
|
// There are two rects and they are disjoined.
|
|
636
|
-
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
|
706
|
+
if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) {
|
|
637
707
|
// Find the first rect in which the point is fully inside.
|
|
638
708
|
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;
|
|
639
709
|
}
|
|
@@ -648,18 +718,12 @@ const inline$1 = function (options) {
|
|
|
648
718
|
const bottom = lastRect.bottom;
|
|
649
719
|
const left = isTop ? firstRect.left : lastRect.left;
|
|
650
720
|
const right = isTop ? firstRect.right : lastRect.right;
|
|
651
|
-
|
|
652
|
-
const height = bottom - top;
|
|
653
|
-
return {
|
|
654
|
-
top,
|
|
655
|
-
bottom,
|
|
656
|
-
left,
|
|
657
|
-
right,
|
|
658
|
-
width,
|
|
659
|
-
height,
|
|
721
|
+
return rectToClientRect({
|
|
660
722
|
x: left,
|
|
661
|
-
y: top
|
|
662
|
-
|
|
723
|
+
y: top,
|
|
724
|
+
width: right - left,
|
|
725
|
+
height: bottom - top
|
|
726
|
+
});
|
|
663
727
|
}
|
|
664
728
|
const isLeftSide = getSide(placement) === 'left';
|
|
665
729
|
const maxRight = max(...clientRects.map(rect => rect.right));
|
|
@@ -667,20 +731,12 @@ const inline$1 = function (options) {
|
|
|
667
731
|
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
|
668
732
|
const top = measureRects[0].top;
|
|
669
733
|
const bottom = measureRects[measureRects.length - 1].bottom;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
bottom,
|
|
677
|
-
left,
|
|
678
|
-
right,
|
|
679
|
-
width,
|
|
680
|
-
height,
|
|
681
|
-
x: left,
|
|
682
|
-
y: top
|
|
683
|
-
};
|
|
734
|
+
return rectToClientRect({
|
|
735
|
+
x: minLeft,
|
|
736
|
+
y: top,
|
|
737
|
+
width: maxRight - minLeft,
|
|
738
|
+
height: bottom - top
|
|
739
|
+
});
|
|
684
740
|
}
|
|
685
741
|
return fallback;
|
|
686
742
|
}
|
|
@@ -830,23 +886,16 @@ const shift$1 = function (options) {
|
|
|
830
886
|
y
|
|
831
887
|
};
|
|
832
888
|
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
833
|
-
const crossAxis = getSideAxis(
|
|
889
|
+
const crossAxis = getSideAxis(placement);
|
|
834
890
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
835
891
|
let mainAxisCoord = coords[mainAxis];
|
|
836
892
|
let crossAxisCoord = coords[crossAxis];
|
|
893
|
+
const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
|
|
837
894
|
if (checkMainAxis) {
|
|
838
|
-
|
|
839
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
840
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
841
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
842
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
895
|
+
mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
|
|
843
896
|
}
|
|
844
897
|
if (checkCrossAxis) {
|
|
845
|
-
|
|
846
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
847
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
848
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
849
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
898
|
+
crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
|
|
850
899
|
}
|
|
851
900
|
const limitedCoords = limiter.fn({
|
|
852
901
|
...state,
|
|
@@ -877,6 +926,7 @@ const limitShift$1 = function (options) {
|
|
|
877
926
|
return {
|
|
878
927
|
options,
|
|
879
928
|
fn(state) {
|
|
929
|
+
var _rawOffset$mainAxis, _rawOffset$crossAxis;
|
|
880
930
|
const {
|
|
881
931
|
x,
|
|
882
932
|
y,
|
|
@@ -902,9 +952,8 @@ const limitShift$1 = function (options) {
|
|
|
902
952
|
mainAxis: rawOffset,
|
|
903
953
|
crossAxis: 0
|
|
904
954
|
} : {
|
|
905
|
-
mainAxis: 0,
|
|
906
|
-
crossAxis: 0
|
|
907
|
-
...rawOffset
|
|
955
|
+
mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
|
|
956
|
+
crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
|
|
908
957
|
};
|
|
909
958
|
if (checkMainAxis) {
|
|
910
959
|
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
@@ -936,6 +985,12 @@ const limitShift$1 = function (options) {
|
|
|
936
985
|
};
|
|
937
986
|
};
|
|
938
987
|
|
|
988
|
+
// Method syntax keeps callback parameters bivariant, but expressing the
|
|
989
|
+
// explicit `| undefined` required by `exactOptionalPropertyTypes` needs
|
|
990
|
+
// property syntax, which is contravariant under `strictFunctionTypes`.
|
|
991
|
+
// Extracting the function from a method position restores that bivariance so
|
|
992
|
+
// consumers can still assign callbacks with narrower parameter types.
|
|
993
|
+
|
|
939
994
|
/**
|
|
940
995
|
* Provides data that allows you to change the size of the floating element —
|
|
941
996
|
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
@@ -950,7 +1005,6 @@ const size$1 = function (options) {
|
|
|
950
1005
|
name: 'size',
|
|
951
1006
|
options,
|
|
952
1007
|
async fn(state) {
|
|
953
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
954
1008
|
const {
|
|
955
1009
|
placement,
|
|
956
1010
|
rects,
|
|
@@ -982,24 +1036,21 @@ const size$1 = function (options) {
|
|
|
982
1036
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
983
1037
|
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
984
1038
|
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
985
|
-
const
|
|
1039
|
+
const shiftData = state.middlewareData.shift;
|
|
1040
|
+
const noShift = !shiftData;
|
|
986
1041
|
let availableHeight = overflowAvailableHeight;
|
|
987
1042
|
let availableWidth = overflowAvailableWidth;
|
|
988
|
-
if (
|
|
1043
|
+
if (shiftData != null && shiftData.enabled.x) {
|
|
989
1044
|
availableWidth = maximumClippingWidth;
|
|
990
1045
|
}
|
|
991
|
-
if (
|
|
1046
|
+
if (shiftData != null && shiftData.enabled.y) {
|
|
992
1047
|
availableHeight = maximumClippingHeight;
|
|
993
1048
|
}
|
|
994
1049
|
if (noShift && !alignment) {
|
|
995
|
-
const xMin = max(overflow.left, 0);
|
|
996
|
-
const xMax = max(overflow.right, 0);
|
|
997
|
-
const yMin = max(overflow.top, 0);
|
|
998
|
-
const yMax = max(overflow.bottom, 0);
|
|
999
1050
|
if (isYAxis) {
|
|
1000
|
-
availableWidth = width - 2 *
|
|
1051
|
+
availableWidth = width - 2 * max(overflow.left, overflow.right);
|
|
1001
1052
|
} else {
|
|
1002
|
-
availableHeight = height - 2 *
|
|
1053
|
+
availableHeight = height - 2 * max(overflow.top, overflow.bottom);
|
|
1003
1054
|
}
|
|
1004
1055
|
}
|
|
1005
1056
|
await apply({
|
|
@@ -1155,7 +1206,7 @@ function getParentNode(node) {
|
|
|
1155
1206
|
function getNearestOverflowAncestor(node) {
|
|
1156
1207
|
const parentNode = getParentNode(node);
|
|
1157
1208
|
if (isLastTraversableNode(parentNode)) {
|
|
1158
|
-
return node.ownerDocument
|
|
1209
|
+
return (node.ownerDocument || node).body;
|
|
1159
1210
|
}
|
|
1160
1211
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1161
1212
|
return parentNode;
|
|
@@ -1252,10 +1303,7 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1252
1303
|
if (isFixed === void 0) {
|
|
1253
1304
|
isFixed = false;
|
|
1254
1305
|
}
|
|
1255
|
-
|
|
1256
|
-
return false;
|
|
1257
|
-
}
|
|
1258
|
-
return isFixed;
|
|
1306
|
+
return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
|
|
1259
1307
|
}
|
|
1260
1308
|
|
|
1261
1309
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
@@ -1282,12 +1330,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1282
1330
|
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1283
1331
|
let width = clientRect.width / scale.x;
|
|
1284
1332
|
let height = clientRect.height / scale.y;
|
|
1285
|
-
if (domElement) {
|
|
1333
|
+
if (domElement && offsetParent) {
|
|
1286
1334
|
const win = getWindow(domElement);
|
|
1287
|
-
const offsetWin =
|
|
1335
|
+
const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1288
1336
|
let currentWin = win;
|
|
1289
1337
|
let currentIFrame = getFrameElement(currentWin);
|
|
1290
|
-
while (currentIFrame &&
|
|
1338
|
+
while (currentIFrame && offsetWin !== currentWin) {
|
|
1291
1339
|
const iframeScale = getScale(currentIFrame);
|
|
1292
1340
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1293
1341
|
const css = getComputedStyle$1(currentIFrame);
|
|
@@ -1351,7 +1399,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1351
1399
|
let scale = createCoords(1);
|
|
1352
1400
|
const offsets = createCoords(0);
|
|
1353
1401
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1354
|
-
if (isOffsetParentAnElement || !
|
|
1402
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
1355
1403
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1356
1404
|
scroll = getNodeScroll(offsetParent);
|
|
1357
1405
|
}
|
|
@@ -1372,18 +1420,17 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1372
1420
|
}
|
|
1373
1421
|
|
|
1374
1422
|
function getClientRects(element) {
|
|
1375
|
-
return Array.from(element.getClientRects());
|
|
1423
|
+
return element.getClientRects ? Array.from(element.getClientRects()) : [];
|
|
1376
1424
|
}
|
|
1377
1425
|
|
|
1378
1426
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
1379
1427
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1380
|
-
function getDocumentRect(
|
|
1381
|
-
const
|
|
1382
|
-
const
|
|
1383
|
-
const body = element.ownerDocument.body;
|
|
1428
|
+
function getDocumentRect(html) {
|
|
1429
|
+
const scroll = getNodeScroll(html);
|
|
1430
|
+
const body = html.ownerDocument.body;
|
|
1384
1431
|
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1385
1432
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1386
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(
|
|
1433
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(html);
|
|
1387
1434
|
const y = -scroll.scrollTop;
|
|
1388
1435
|
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1389
1436
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
@@ -1400,7 +1447,11 @@ function getDocumentRect(element) {
|
|
|
1400
1447
|
// calculation is affected by unusual styles.
|
|
1401
1448
|
// Most scrollbars leave 15-18px of space.
|
|
1402
1449
|
const SCROLLBAR_MAX = 25;
|
|
1403
|
-
function getViewportRect(element, strategy) {
|
|
1450
|
+
function getViewportRect(element, strategy, rootBoundary) {
|
|
1451
|
+
if (rootBoundary === void 0) {
|
|
1452
|
+
rootBoundary = 'viewport';
|
|
1453
|
+
}
|
|
1454
|
+
const isLayoutViewport = rootBoundary === 'layoutViewport';
|
|
1404
1455
|
const win = getWindow(element);
|
|
1405
1456
|
const html = getDocumentElement(element);
|
|
1406
1457
|
const visualViewport = win.visualViewport;
|
|
@@ -1409,31 +1460,42 @@ function getViewportRect(element, strategy) {
|
|
|
1409
1460
|
let x = 0;
|
|
1410
1461
|
let y = 0;
|
|
1411
1462
|
if (visualViewport) {
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1463
|
+
// Client coordinates are relative to the layout viewport, except in
|
|
1464
|
+
// WebKit with an `absolute` strategy, where they are relative to the
|
|
1465
|
+
// visual viewport.
|
|
1466
|
+
const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
|
|
1467
|
+
if (isLayoutViewport) {
|
|
1468
|
+
if (!layoutRelativeClientCoords) {
|
|
1469
|
+
x = -visualViewport.offsetLeft;
|
|
1470
|
+
y = -visualViewport.offsetTop;
|
|
1471
|
+
}
|
|
1472
|
+
} else {
|
|
1473
|
+
width = visualViewport.width;
|
|
1474
|
+
height = visualViewport.height;
|
|
1475
|
+
if (layoutRelativeClientCoords) {
|
|
1476
|
+
x = visualViewport.offsetLeft;
|
|
1477
|
+
y = visualViewport.offsetTop;
|
|
1478
|
+
}
|
|
1418
1479
|
}
|
|
1419
1480
|
}
|
|
1420
1481
|
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1421
|
-
//
|
|
1422
|
-
// visual width
|
|
1423
|
-
//
|
|
1482
|
+
// `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
|
|
1483
|
+
// the visual width but isn't reflected in `html.clientWidth`, so subtract it.
|
|
1484
|
+
// Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
|
|
1485
|
+
// reserves an empty inline-start gutter that clips nothing, so exclude just
|
|
1486
|
+
// the one scrollbar-side gutter — halve the measured (two-gutter) total. A
|
|
1487
|
+
// left-side scrollbar (`windowScrollbarX > 0`) is already handled by
|
|
1488
|
+
// `getHTMLOffset`/`visualViewport.width`; skip it here.
|
|
1424
1489
|
if (windowScrollbarX <= 0) {
|
|
1425
1490
|
const doc = html.ownerDocument;
|
|
1426
1491
|
const body = doc.body;
|
|
1427
1492
|
const bodyStyles = getComputedStyle(body);
|
|
1428
1493
|
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1429
|
-
const
|
|
1430
|
-
|
|
1431
|
-
|
|
1494
|
+
const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1495
|
+
const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
|
|
1496
|
+
if (gutter <= SCROLLBAR_MAX) {
|
|
1497
|
+
width -= gutter;
|
|
1432
1498
|
}
|
|
1433
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1434
|
-
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
1435
|
-
// by the scrollbar amount so there isn't extra space on the right.
|
|
1436
|
-
width += windowScrollbarX;
|
|
1437
1499
|
}
|
|
1438
1500
|
return {
|
|
1439
1501
|
width,
|
|
@@ -1448,7 +1510,7 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
1448
1510
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1449
1511
|
const top = clientRect.top + element.clientTop;
|
|
1450
1512
|
const left = clientRect.left + element.clientLeft;
|
|
1451
|
-
const scale =
|
|
1513
|
+
const scale = getScale(element);
|
|
1452
1514
|
const width = element.clientWidth * scale.x;
|
|
1453
1515
|
const height = element.clientHeight * scale.y;
|
|
1454
1516
|
const x = left * scale.x;
|
|
@@ -1462,8 +1524,8 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
1462
1524
|
}
|
|
1463
1525
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1464
1526
|
let rect;
|
|
1465
|
-
if (clippingAncestor === 'viewport') {
|
|
1466
|
-
rect = getViewportRect(element, strategy);
|
|
1527
|
+
if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
|
|
1528
|
+
rect = getViewportRect(element, strategy, clippingAncestor);
|
|
1467
1529
|
} else if (clippingAncestor === 'document') {
|
|
1468
1530
|
rect = getDocumentRect(getDocumentElement(element));
|
|
1469
1531
|
} else if (isElement(clippingAncestor)) {
|
|
@@ -1479,13 +1541,6 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
1479
1541
|
}
|
|
1480
1542
|
return rectToClientRect(rect);
|
|
1481
1543
|
}
|
|
1482
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1483
|
-
const parentNode = getParentNode(element);
|
|
1484
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1485
|
-
return false;
|
|
1486
|
-
}
|
|
1487
|
-
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1488
|
-
}
|
|
1489
1544
|
|
|
1490
1545
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1491
1546
|
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
@@ -1496,7 +1551,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1496
1551
|
return cachedResult;
|
|
1497
1552
|
}
|
|
1498
1553
|
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1499
|
-
let
|
|
1554
|
+
let lastKeptComputedStyle = null;
|
|
1500
1555
|
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
1501
1556
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1502
1557
|
|
|
@@ -1504,16 +1559,20 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1504
1559
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1505
1560
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
1506
1561
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1562
|
+
// Position of the containing block chain below the current node. A fixed
|
|
1563
|
+
// element whose containing block hasn't been found yet is a fixed chain.
|
|
1564
|
+
const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
|
|
1565
|
+
|
|
1566
|
+
// A non-containing ancestor does not clip the element when the chain
|
|
1567
|
+
// below it escapes it: a fixed chain escapes all ancestors up to the
|
|
1568
|
+
// next containing block, an absolute chain escapes static ancestors.
|
|
1569
|
+
const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
|
|
1511
1570
|
if (shouldDropCurrentNode) {
|
|
1512
1571
|
// Drop non-containing blocks.
|
|
1513
1572
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1514
1573
|
} else {
|
|
1515
|
-
//
|
|
1516
|
-
|
|
1574
|
+
// The kept node carries the chain position for the next iteration.
|
|
1575
|
+
lastKeptComputedStyle = computedStyle;
|
|
1517
1576
|
}
|
|
1518
1577
|
currentNode = getParentNode(currentNode);
|
|
1519
1578
|
}
|
|
@@ -1523,7 +1582,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1523
1582
|
|
|
1524
1583
|
// Gets the maximum area that the element is visible in due to any number of
|
|
1525
1584
|
// clipping ancestors.
|
|
1526
|
-
function getClippingRect(_ref) {
|
|
1585
|
+
function getClippingRect$1(_ref) {
|
|
1527
1586
|
let {
|
|
1528
1587
|
element,
|
|
1529
1588
|
boundary,
|
|
@@ -1573,13 +1632,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1573
1632
|
scrollTop: 0
|
|
1574
1633
|
};
|
|
1575
1634
|
const offsets = createCoords(0);
|
|
1576
|
-
|
|
1577
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1578
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1579
|
-
function setLeftRTLScrollbarOffset() {
|
|
1580
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1581
|
-
}
|
|
1582
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1635
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
1583
1636
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1584
1637
|
scroll = getNodeScroll(offsetParent);
|
|
1585
1638
|
}
|
|
@@ -1587,12 +1640,13 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1587
1640
|
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1588
1641
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1589
1642
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1590
|
-
} else if (documentElement) {
|
|
1591
|
-
setLeftRTLScrollbarOffset();
|
|
1592
1643
|
}
|
|
1593
1644
|
}
|
|
1594
|
-
|
|
1595
|
-
|
|
1645
|
+
|
|
1646
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1647
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1648
|
+
if (!isOffsetParentAnElement && documentElement) {
|
|
1649
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1596
1650
|
}
|
|
1597
1651
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1598
1652
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
@@ -1677,7 +1731,7 @@ function isRTL(element) {
|
|
|
1677
1731
|
const platform = {
|
|
1678
1732
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1679
1733
|
getDocumentElement,
|
|
1680
|
-
getClippingRect,
|
|
1734
|
+
getClippingRect: getClippingRect$1,
|
|
1681
1735
|
getOffsetParent,
|
|
1682
1736
|
getElementRects,
|
|
1683
1737
|
getClientRects,
|
|
@@ -1692,7 +1746,7 @@ function rectsAreEqual(a, b) {
|
|
|
1692
1746
|
}
|
|
1693
1747
|
|
|
1694
1748
|
// https://samthor.au/2021/observing-dom/
|
|
1695
|
-
function observeMove(element, onMove) {
|
|
1749
|
+
function observeMove(element, onMove, ancestorResize) {
|
|
1696
1750
|
let io = null;
|
|
1697
1751
|
let timeoutId;
|
|
1698
1752
|
const root = getDocumentElement(element);
|
|
@@ -1735,13 +1789,22 @@ function observeMove(element, onMove) {
|
|
|
1735
1789
|
let isFirstUpdate = true;
|
|
1736
1790
|
function handleObserve(entries) {
|
|
1737
1791
|
const ratio = entries[0].intersectionRatio;
|
|
1792
|
+
|
|
1793
|
+
// The entry is a snapshot, so the reference may have moved since the
|
|
1794
|
+
// intersection was computed (under performance constraints, or between
|
|
1795
|
+
// consecutive frames of a multi-frame layout shift). The reported ratio
|
|
1796
|
+
// and the observed area are stale in that case and cannot be trusted to
|
|
1797
|
+
// detect subsequent movement, so refresh regardless of the ratio.
|
|
1798
|
+
if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1799
|
+
return refresh();
|
|
1800
|
+
}
|
|
1738
1801
|
if (ratio !== threshold) {
|
|
1739
1802
|
if (!isFirstUpdate) {
|
|
1740
1803
|
return refresh();
|
|
1741
1804
|
}
|
|
1742
1805
|
if (!ratio) {
|
|
1743
|
-
// If the reference is clipped, the ratio is 0. Throttle
|
|
1744
|
-
// to prevent an infinite loop of updates.
|
|
1806
|
+
// If the reference is clipped in place, the ratio is 0. Throttle
|
|
1807
|
+
// the refresh to prevent an infinite loop of updates.
|
|
1745
1808
|
timeoutId = setTimeout(() => {
|
|
1746
1809
|
refresh(false, 1e-7);
|
|
1747
1810
|
}, 1000);
|
|
@@ -1749,16 +1812,6 @@ function observeMove(element, onMove) {
|
|
|
1749
1812
|
refresh(false, ratio);
|
|
1750
1813
|
}
|
|
1751
1814
|
}
|
|
1752
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1753
|
-
// It's possible that even though the ratio is reported as 1, the
|
|
1754
|
-
// element is not actually fully within the IntersectionObserver's root
|
|
1755
|
-
// area anymore. This can happen under performance constraints. This may
|
|
1756
|
-
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1757
|
-
// work around this, we compare the element's bounding rect now with
|
|
1758
|
-
// what it was at the time we created the IntersectionObserver. If they
|
|
1759
|
-
// are not equal then the element moved, so we refresh.
|
|
1760
|
-
refresh();
|
|
1761
|
-
}
|
|
1762
1815
|
isFirstUpdate = false;
|
|
1763
1816
|
}
|
|
1764
1817
|
|
|
@@ -1775,8 +1828,18 @@ function observeMove(element, onMove) {
|
|
|
1775
1828
|
}
|
|
1776
1829
|
io.observe(element);
|
|
1777
1830
|
}
|
|
1831
|
+
const win = getWindow(element);
|
|
1832
|
+
// The window is a resize ancestor, so when `ancestorResize` is enabled its
|
|
1833
|
+
// listener already runs the update on resize. Here we only need to rebuild
|
|
1834
|
+
// the `IntersectionObserver` for the new root size, skipping a redundant
|
|
1835
|
+
// update. When `ancestorResize` is disabled, this becomes the sole update.
|
|
1836
|
+
const handleResize = () => refresh(ancestorResize);
|
|
1837
|
+
win.addEventListener('resize', handleResize);
|
|
1778
1838
|
refresh(true);
|
|
1779
|
-
return
|
|
1839
|
+
return () => {
|
|
1840
|
+
win.removeEventListener('resize', handleResize);
|
|
1841
|
+
cleanup();
|
|
1842
|
+
};
|
|
1780
1843
|
}
|
|
1781
1844
|
|
|
1782
1845
|
/**
|
|
@@ -1801,12 +1864,10 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1801
1864
|
const referenceEl = unwrapElement(reference);
|
|
1802
1865
|
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
|
|
1803
1866
|
ancestors.forEach(ancestor => {
|
|
1804
|
-
ancestorScroll && ancestor.addEventListener('scroll', update
|
|
1805
|
-
passive: true
|
|
1806
|
-
});
|
|
1867
|
+
ancestorScroll && ancestor.addEventListener('scroll', update);
|
|
1807
1868
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1808
1869
|
});
|
|
1809
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1870
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
|
|
1810
1871
|
let reobserveFrame = -1;
|
|
1811
1872
|
let resizeObserver = null;
|
|
1812
1873
|
if (elementResize) {
|
|
@@ -1892,6 +1953,13 @@ const flip = flip$1;
|
|
|
1892
1953
|
*/
|
|
1893
1954
|
const size = size$1;
|
|
1894
1955
|
|
|
1956
|
+
/**
|
|
1957
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
1958
|
+
* when it is not in the same clipping context as the reference element.
|
|
1959
|
+
* @see https://floating-ui.com/docs/hide
|
|
1960
|
+
*/
|
|
1961
|
+
const hide = hide$1;
|
|
1962
|
+
|
|
1895
1963
|
/**
|
|
1896
1964
|
* Provides data to position an inner element of the floating element so that it
|
|
1897
1965
|
* appears centered to the reference element.
|
|
@@ -1920,11 +1988,9 @@ const computePosition = (reference, floating, options) => {
|
|
|
1920
1988
|
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1921
1989
|
// single call. If other functions become expensive, we can add them as well.
|
|
1922
1990
|
const cache = new Map();
|
|
1923
|
-
const mergedOptions = {
|
|
1924
|
-
platform,
|
|
1925
|
-
...options
|
|
1926
|
-
};
|
|
1991
|
+
const mergedOptions = options != null ? options : {};
|
|
1927
1992
|
const platformWithCache = {
|
|
1993
|
+
...platform,
|
|
1928
1994
|
...mergedOptions.platform,
|
|
1929
1995
|
_c: cache
|
|
1930
1996
|
};
|
|
@@ -2741,6 +2807,77 @@ function apply() {
|
|
|
2741
2807
|
injectStyles(document);
|
|
2742
2808
|
}
|
|
2743
2809
|
|
|
2810
|
+
/**
|
|
2811
|
+
* This utility is covered by the end-to-end tests under 'clipping' in `popovercontainer.cy.ts`.
|
|
2812
|
+
*/
|
|
2813
|
+
const CLIPPING_RECT_CACHE = Symbol('Clipping Rect Cache');
|
|
2814
|
+
/**
|
|
2815
|
+
* A custom floating UI platform that restricts clipping rectangles to the safe area.
|
|
2816
|
+
*/
|
|
2817
|
+
const safeAreaPlatform = { ...platform, getClippingRect };
|
|
2818
|
+
/**
|
|
2819
|
+
* Computes the clipping rectangle of an element while accounting for the safe area.
|
|
2820
|
+
*/
|
|
2821
|
+
async function getClippingRect(...args) {
|
|
2822
|
+
const element = args[0].element;
|
|
2823
|
+
// Check whether the clipping rectangle of the given element has already been computed during
|
|
2824
|
+
// this pass.
|
|
2825
|
+
const hit = this[CLIPPING_RECT_CACHE].get(element);
|
|
2826
|
+
if (hit)
|
|
2827
|
+
return hit;
|
|
2828
|
+
// Compute the clipping rectangle with the Floating UI DOM platform, then restrict it to the safe
|
|
2829
|
+
// area.
|
|
2830
|
+
const clippingRect = await platform.getClippingRect.apply(this, args);
|
|
2831
|
+
applySafeArea(clippingRect, element);
|
|
2832
|
+
this[CLIPPING_RECT_CACHE].set(element, clippingRect);
|
|
2833
|
+
return clippingRect;
|
|
2834
|
+
}
|
|
2835
|
+
/**
|
|
2836
|
+
* Restricts the `clippingRect` computed for `element` to the safe area, modifying it in place.
|
|
2837
|
+
*
|
|
2838
|
+
* The safe area only applies to elements that the header can actually cover, which excludes
|
|
2839
|
+
* elements without a header on their page, elements on a top layer and elements within the header.
|
|
2840
|
+
*/
|
|
2841
|
+
function applySafeArea(clippingRect, element) {
|
|
2842
|
+
const headerElement = element.ownerDocument.querySelector('post-header');
|
|
2843
|
+
if (headerElement === null)
|
|
2844
|
+
return;
|
|
2845
|
+
let parent = element;
|
|
2846
|
+
while (!isLastTraversableNode(parent)) {
|
|
2847
|
+
parent = getParentNode(parent);
|
|
2848
|
+
if (!isHTMLElement(parent))
|
|
2849
|
+
continue;
|
|
2850
|
+
// Do not apply the safe area of the header to
|
|
2851
|
+
// - elements that are on a top layer, such as a dialog.
|
|
2852
|
+
// - elements that are located within the header itself.
|
|
2853
|
+
if (isTopLayer(parent) || parent === headerElement)
|
|
2854
|
+
return;
|
|
2855
|
+
}
|
|
2856
|
+
const headerRect = headerElement.getBoundingClientRect();
|
|
2857
|
+
const top = Math.max(clippingRect.y, headerRect.bottom);
|
|
2858
|
+
clippingRect.height -= top - clippingRect.y;
|
|
2859
|
+
clippingRect.y = top;
|
|
2860
|
+
}
|
|
2861
|
+
/**
|
|
2862
|
+
* Computes the coordinates that will position the `floating` element next to a given `reference`
|
|
2863
|
+
* element while accounting for the safe area.
|
|
2864
|
+
*
|
|
2865
|
+
* The safe area is the part of the viewport that the header does not cover. Restricting the
|
|
2866
|
+
* clipping rectangles to it makes floating elements behave as if they were clipped by the header.
|
|
2867
|
+
*/
|
|
2868
|
+
const computePositionWithSafeArea = (reference, floating, options) => {
|
|
2869
|
+
// Adapted from https://github.com/floating-ui/floating-ui/blob/27629b74ba36ab8ceb2a968051927b9b69511a3b/packages/dom/src/index.ts#L15
|
|
2870
|
+
options ?? (options = {});
|
|
2871
|
+
return computePosition(reference, floating, {
|
|
2872
|
+
...options,
|
|
2873
|
+
platform: {
|
|
2874
|
+
...safeAreaPlatform,
|
|
2875
|
+
...options.platform,
|
|
2876
|
+
[CLIPPING_RECT_CACHE]: new Map(),
|
|
2877
|
+
},
|
|
2878
|
+
});
|
|
2879
|
+
};
|
|
2880
|
+
|
|
2744
2881
|
const postPopovercontainerCss = () => `@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{-webkit-box-shadow:var(--post-device-elevation-300);box-shadow:var(--post-device-elevation-300);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{-webkit-border-after:2px solid rgba(0,0,0,0);border-block-end:2px solid rgba(0,0,0,0);-webkit-border-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{-webkit-border-before:2px solid rgba(0,0,0,0);border-block-start:2px solid rgba(0,0,0,0);-webkit-border-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{-webkit-border-after:2px solid rgba(0,0,0,0);border-block-end:2px solid rgba(0,0,0,0);-webkit-border-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{-webkit-border-before:2px solid rgba(0,0,0,0);border-block-start:2px solid rgba(0,0,0,0);-webkit-border-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{-webkit-clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)));clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{-webkit-clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)));clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{-webkit-box-shadow:var(--post-device-elevation-300);box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{-webkit-filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15));filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{-webkit-filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15));filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{-webkit-filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15));filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{-webkit-filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15));filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}`;
|
|
2745
2882
|
|
|
2746
2883
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -2818,7 +2955,7 @@ const PostPopovercontainer = class {
|
|
|
2818
2955
|
if (this.toggleTimeoutId || !target)
|
|
2819
2956
|
return;
|
|
2820
2957
|
this.eventTarget = target;
|
|
2821
|
-
this.
|
|
2958
|
+
this.updatePosition();
|
|
2822
2959
|
this.host.showPopover();
|
|
2823
2960
|
}
|
|
2824
2961
|
/**
|
|
@@ -2844,7 +2981,7 @@ const PostPopovercontainer = class {
|
|
|
2844
2981
|
this.eventTarget = target;
|
|
2845
2982
|
// Prevent instant double toggle
|
|
2846
2983
|
if (!this.toggleTimeoutId) {
|
|
2847
|
-
this.
|
|
2984
|
+
this.updatePosition();
|
|
2848
2985
|
this.host.togglePopover(force);
|
|
2849
2986
|
this.toggleTimeoutId = null;
|
|
2850
2987
|
}
|
|
@@ -2956,17 +3093,14 @@ const PostPopovercontainer = class {
|
|
|
2956
3093
|
startAutoupdates() {
|
|
2957
3094
|
if (!this.eventTarget || !this.host)
|
|
2958
3095
|
return;
|
|
2959
|
-
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.
|
|
2960
|
-
}
|
|
2961
|
-
/**
|
|
2962
|
-
* Retrieves the dynamic height of the header
|
|
2963
|
-
*/
|
|
2964
|
-
getHeaderHeight() {
|
|
2965
|
-
const header = document.querySelector('post-header');
|
|
2966
|
-
return header ? Number.parseFloat(getComputedStyle(header).height) : 0;
|
|
3096
|
+
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.updatePosition.bind(this));
|
|
2967
3097
|
}
|
|
2968
|
-
async
|
|
2969
|
-
const { x, y, middlewareData, placement } = await this.
|
|
3098
|
+
async updatePosition() {
|
|
3099
|
+
const { x, y, middlewareData, placement } = await this.calculatePosition();
|
|
3100
|
+
// Hide the popover if the target is outside the viewport
|
|
3101
|
+
if (middlewareData.hide?.referenceHidden) {
|
|
3102
|
+
this.host.hidePopover();
|
|
3103
|
+
}
|
|
2970
3104
|
const currentPlacement = placement.split('-')[0];
|
|
2971
3105
|
this.dynamicPlacement = currentPlacement;
|
|
2972
3106
|
// Position popover
|
|
@@ -2991,13 +3125,15 @@ const PostPopovercontainer = class {
|
|
|
2991
3125
|
await this.updateSafeSpaceBoundaries(currentPlacement);
|
|
2992
3126
|
}
|
|
2993
3127
|
}
|
|
2994
|
-
async
|
|
3128
|
+
async calculatePosition() {
|
|
2995
3129
|
const gap = this.edgeGap;
|
|
2996
3130
|
const isAligned = (this.placement || 'top').includes('-');
|
|
2997
|
-
const flipMiddleware =
|
|
2998
|
-
|
|
2999
|
-
crossAxis: false,
|
|
3000
|
-
|
|
3131
|
+
const flipMiddleware = [
|
|
3132
|
+
// Flip the popover if the target moves outside the viewport
|
|
3133
|
+
flip({ elementContext: 'reference', crossAxis: false }),
|
|
3134
|
+
// Flip the popover if the popover itself moves outside the viewport
|
|
3135
|
+
flip({ elementContext: 'floating', crossAxis: false }),
|
|
3136
|
+
];
|
|
3001
3137
|
const shiftMiddleware = shift({
|
|
3002
3138
|
padding: gap,
|
|
3003
3139
|
limiter: limitShift({
|
|
@@ -3009,7 +3145,7 @@ const PostPopovercontainer = class {
|
|
|
3009
3145
|
inline(),
|
|
3010
3146
|
// Per floating-ui docs: for aligned placements (e.g. bottom-end),
|
|
3011
3147
|
// flip should come before shift. For non-aligned, shift before flip.
|
|
3012
|
-
...(isAligned ? [flipMiddleware, shiftMiddleware] : [shiftMiddleware, flipMiddleware]),
|
|
3148
|
+
...(isAligned ? [...flipMiddleware, shiftMiddleware] : [shiftMiddleware, ...flipMiddleware]),
|
|
3013
3149
|
size({
|
|
3014
3150
|
apply({ availableWidth, elements }) {
|
|
3015
3151
|
Object.assign(elements.floating.style, {
|
|
@@ -3021,7 +3157,12 @@ const PostPopovercontainer = class {
|
|
|
3021
3157
|
if (this.arrow) {
|
|
3022
3158
|
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
3023
3159
|
}
|
|
3024
|
-
|
|
3160
|
+
// Automatically hide the popover if the target moves outside the scrollport.
|
|
3161
|
+
if (this.autoHide) {
|
|
3162
|
+
// Per floating-ui docs: hide should generally be placed at the end.
|
|
3163
|
+
middleware.push(hide({ strategy: 'referenceHidden' }));
|
|
3164
|
+
}
|
|
3165
|
+
return computePositionWithSafeArea(this.eventTarget, this.host, {
|
|
3025
3166
|
placement: this.placement || 'top',
|
|
3026
3167
|
strategy: 'fixed',
|
|
3027
3168
|
middleware,
|
|
@@ -3088,9 +3229,9 @@ const PostPopovercontainer = class {
|
|
|
3088
3229
|
}
|
|
3089
3230
|
}
|
|
3090
3231
|
render() {
|
|
3091
|
-
return (index.h(index.Host, { key: '
|
|
3232
|
+
return (index.h(index.Host, { key: 'a6f41ad3ef982f9e9ec0d6450837d1cfdca73d16', "data-version": _package.version, popover: "auto" }, index.h("div", { key: '40afab436d5550fda44c8995139080161eab5b09', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (index.h("span", { key: '580bd8fcaecb89334aca05001137a4d7cccd254a', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
3092
3233
|
this.arrowRef = el;
|
|
3093
|
-
} })), index.h("span", { key: '
|
|
3234
|
+
} })), index.h("span", { key: '61a6e4e8026832afc188edd5a74535716db65945', part: "post-popovercontainer-border-mask" }), index.h("slot", { key: 'd79cb69a77dbba13ffa3c30e0393db4f3a669a12' }))));
|
|
3094
3235
|
}
|
|
3095
3236
|
get host() { return index.getElement(this); }
|
|
3096
3237
|
};
|