bestguy / sveltestrap

Bootstrap 4 & 5 components for Svelte
https://sveltestrap.js.org
MIT License
1.3k stars 183 forks source link

Migrate to floating UI #567

Open benmccann opened 1 year ago

benmccann commented 1 year ago

Floating UI is the newer version of popper. Using it will avoid all of the issues around CJS/ESM as it's properly packaged using exports

I took a bit of a stab at it, but ran out of time. I thought I'd share here as a starting point for anyone who wants to take a stab at migrating off popper.js

https://github.com/benmccann/sveltestrap/commit/46d9f94d8005d7b3911dd4bb0d45167ec549081f

The initial styles aren't being applied correctly in my branch, which means that the popper ends up at the bottom of the screen. I think that's the main thing to fix. I also didn't try to migrate the dropdown - though that could possibly be done in a separate PR if we don't mind having two dependencies in the interim.