rgossiaux / svelte-headlessui

Unofficial Svelte port of the Headless UI component library
https://svelte-headlessui.goss.io
MIT License
1.79k stars 97 forks source link

Support Svelte 4 #152

Open silenceofthewans opened 1 year ago

silenceofthewans commented 1 year ago

Changelog: https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md

rgossiaux commented 1 year ago

Yes, I'll be hoping to release official Svelte 4 compatibility soon, but I haven't tested it out much yet because some of my dependencies need to be upgraded.

In the meantime, please let me know if anyone has been using the library with Svelte 4 successfully or unsuccessfully. From what I've seen it should be fine, but this library's internals do some pretty sophisticated things in a few places, which is why I haven't just bumped the peerDependencies without doing some testing first.

silenceofthewans commented 1 year ago

I've been using Menu and Listbox in my app and they seem to be working fine can't say much for other components.

Robin-w151 commented 1 year ago

I've been using the Popover component and everything is running smooth so far.

AyeRlS commented 1 year ago

It seems to work well, no issue so far

JeremyDarbellay commented 1 year ago

I've been using the Dialog component, no troubles atm.

MaximumMaxxx commented 1 year ago

Switch component works fine

vfrunza commented 1 year ago

Listbox has been working fine for me too.

MaximumMaxxx commented 1 year ago

Has anyone found a workaround for the peer dependencies not being aligned to use while this issue sits in limbo?

rgossiaux commented 1 year ago

@MaximumMaxxx You should be able to just ignore the warning. I've been traveling lately but I plan on releasing an update to bump the peerDependencies in a week or two.

padidas commented 1 year ago

In case anyone is wondering how to overwrite the peer dependencies - this worked for me:

"devDependencies": {
    ...
    "@rgossiaux/svelte-headlessui": "^2.0.0",
    "svelte": "^4.1.2",
    ...
  },
  "overrides": {
    "@rgossiaux/svelte-headlessui": {
      "svelte": "$svelte"
    }
  }
zach-hopkins commented 1 year ago

In case anyone is wondering how to overwrite the peer dependencies - this worked for me:

"devDependencies": {
    ...
    "@rgossiaux/svelte-headlessui": "^2.0.0",
    "svelte": "^4.1.2",
    ...
  },
  "overrides": {
    "@rgossiaux/svelte-headlessui": {
      "svelte": "$svelte"
    }
  }

Thank you for this.

Have been using in production for two weeks with no issues @rgossiaux

bradyisom commented 1 year ago

I'm using with Svelte v4 and it looks like the open prop in Disclosure is not working.

adminy commented 8 months ago

Svelte 5 support? Unfortunately it's not backwards compatible and it's not as simple as version bump. Any plans to support svelte 5?

Loizzus commented 4 months ago

I have created a new fork for us to share so we can fix these issues: https://github.com/PyongyangOpenSource/svelte-headlessui