Let's be frank, writing an accessible component library from scratch is hard.
The funny thing is, the initial premise, is quite simple. You wanna a modal, write some css, add a show/hide toggle, and you're done. . .
Except you're not done, not by a long long way. Now you have to consider accessibility, correct aria labels, keyboard and mouse navigation, screen reader support. It is genuinely, one of those things I am probably going to regret, it is also why it is probably a better idea to just grab a library that pre-exists.
The other thing, which is really tough, is 'component-triggers.' This is where your API needs to be able to arbitrarily accept, any component as a trigger.
For example, a popover, might be triggered by a button, link, image, icon. This in itself isn't hard, but the changes you need to make to the underlying API is a real head spinner, because it needs to accept a slot, and piggy back the aria show/hide etc.
I'm almost somewhat close to a fully modular library, but the last hurdle is always the hardest.
Thankfully, the large language models have been pretty helpful, I won't lie, a lot of the library is exactly that. It's been a lot of trial and error.
Now I just need to set up jest, and roll out the testing. Phew. Once done Kamijs will be ready.