Commit Graph

10 Commits

Author SHA1 Message Date
Ryan Gossiaux
9772e49054 Fix active tab selection on mount
When this runs, $api.tabs has not been updated yet, so the calculation was not correct.
This caused various bugs like defaultIndex not working and aria-selected not being set, etc.
2021-12-29 10:29:26 -10:00
Ryan Gossiaux
70c68d00fe Tab: fix aria-controls
When porting, I thought I was being clever by just using ids instead of refs in $api.panels
But I didn't notice that the refs let you distinguish those panels which are rendered from those which are not.
My implementation had aria-controls= set for all tabs, even when their panels were not in the DOM.
2021-12-28 16:51:36 -10:00
Ryan Gossiaux
b973fa6fe2 Move Tabs to <Render>
This is the last component to move to <Render>!
2021-12-20 23:19:31 -08:00
Ryan Gossiaux
f105042545 Clean up store types & initial values
Treating these as Readable for better safety from consuming code

Fixes #10
2021-12-19 01:08:50 -08:00
Ryan Gossiaux
8e890b2e80 Standardize event names to be consistent with @headlessui-react
Was previously using Vue names since Vue was the primary reference while porting, but as the public API is closer to the React one it makes sense to use that.

Fixes #8
2021-12-19 00:29:34 -08:00
Ryan Gossiaux
70910c05b0 Standardize context naming
Fixes #7
2021-12-18 23:18:45 -08:00
Ryan Gossiaux
c5ed870827 Assorted fixes
Type fixes, support a couple more classes as functions for the examples, and switch TabPanels to registering ids instead of refs
2021-12-17 14:22:19 -08:00
Ryan Gossiaux
da6d2c3be6 Fix more TS errors in strict mode 2021-12-15 14:49:19 -08:00
Ryan Gossiaux
82b138f0ae Run prettier over everything and fix some imports 2021-12-13 18:22:16 -08:00
Ryan Gossiaux
db9ec57065 Initial commit with files
Still need to fix the imports
2021-12-13 17:13:47 -08:00