Ryan Gossiaux
c73d9bf919
Add <Render> to Dialog
2021-12-20 18:34:38 -08:00
Ryan Gossiaux
6bb8554890
Rename slot to slotProps in <Render>
...
Conflicted with Svelte's use of the `slot` attribute
2021-12-20 18:26:12 -08:00
Ryan Gossiaux
4388273b8b
Add <Render> to Switch
2021-12-20 18:15:28 -08:00
Ryan Gossiaux
25a4b0f6e5
Add <Render> usage to <Listbox>
2021-12-20 17:47:02 -08:00
Ryan Gossiaux
c69de8050f
Convert Menu to <Render>
2021-12-20 15:46:51 -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
63d44e125c
Improve a few more types, including StateDefinition["foo"] usage
...
Fixes #5
2021-12-19 00:09:44 -08:00
Ryan Gossiaux
305dc1543f
$api?. => $api. when possible
...
Now that this stuff has all been cleaned up with useXContext functions
2021-12-18 23:56:37 -08:00
Ryan Gossiaux
70910c05b0
Standardize context naming
...
Fixes #7
2021-12-18 23:18:45 -08:00
Ryan Gossiaux
03399fc954
Fix listbox label ref
2021-12-18 23:17:56 -08:00
Ryan Gossiaux
4d47ba89a6
Clean up Listbox store/context usage
...
Fixes #9
2021-12-18 23:07:55 -08:00
Ryan Gossiaux
1966219b30
Refactor Popover stores/contexts
2021-12-18 22:36:57 -08:00
Ryan Gossiaux
9e45d92929
Refactor to useOpenClosed
...
Fixes #6
2021-12-18 21:36:09 -08:00
Ryan Gossiaux
4a6edb4e1c
Fix some more type errors and turn on TS strict mode
...
Possible now that svelte2tsx has fixed a few bugs!
2021-12-18 18:48:15 -08:00
Ryan Gossiaux
2c8be5047d
Fix Transition events
...
In Svelte the component updates/unmount happen in a different order than in React. The `mounted` guard doesn't work in Svelte and needs a different approach.
2021-12-18 15:41:18 -08:00
Ryan Gossiaux
2d6bd4658e
Fix entered styles on Transitions
...
Broke this when I started manually managing classes.
2021-12-18 15:35:53 -08:00
Ryan Gossiaux
993db81cfa
Fix TransitionChild to preserve class while transitioning
...
This fixes an issue where the example component-examples/dropdown did not render the leave transition
2021-12-17 16:52:10 -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
6076a60837
Fix PopoverPanel focus issue
...
Fixes #20
2021-12-16 23:06:36 -08:00
Ryan Gossiaux
f5130c6cc1
Add use= support to Popover
...
Fixes #21
Not sure it's worth doing this component by component instead of figuring out <Render> first but w/e
2021-12-16 16:35:09 -08:00
Ryan Gossiaux
0911f5efdd
Fix some imports
2021-12-16 16:22:14 -08:00
Ryan Gossiaux
4f74dd8ca9
Fix Transition undefined/null bug
2021-12-15 18:40:00 -08:00
Ryan Gossiaux
da6d2c3be6
Fix more TS errors in strict mode
2021-12-15 14:49:19 -08:00
Ryan Gossiaux
5b36ce9404
Fix various type errors with strict mode
2021-12-15 14:06:33 -08:00
Ryan Gossiaux
543c1263e3
Also fix label/description context usage
2021-12-15 10:31:14 -08:00
Ryan Gossiaux
dbfb2c227e
Move contexts over to useXContext model
...
Fixes #4
2021-12-15 10:13:01 -08:00
Ryan Gossiaux
f1edb17609
Fix transitioning away
...
Fixes #17
The root problem here, which took me ages to find, was that `state` should not be reactive. It should only be set once the child has finished, via the nesting context.
2021-12-14 22:56:55 -08:00
Ryan Gossiaux
df96d74003
A couple fixes to Dialog
...
Quickfix for SSR
Let it take open from OpenClose context properly
2021-12-14 22:54:06 -08:00
Ryan Gossiaux
47c6918fd2
Fix PortalGroup context
2021-12-14 16:01:47 -08:00
Ryan Gossiaux
7de1e35524
Add index.ts files
2021-12-14 15:28:26 -08:00
Ryan Gossiaux
4fb49c546a
Add wrapper for TransitionChild
2021-12-14 15:28:05 -08:00
Ryan Gossiaux
0185f9f9f6
Don't render Transition contents if they're not visible
...
Fixes #14
2021-12-14 13:54:34 -08:00
Ryan Gossiaux
02bb968396
Fix initial focus issues with Dialog
...
Fixes #15
2021-12-14 13:19:58 -08:00
Ryan Gossiaux
9d7f56cdcd
Minor tweaks to default values
2021-12-14 12:04:23 -08:00
Ryan Gossiaux
543a6dba3d
Bind missing dialog ref
...
Fixes #12
Fixes #13
2021-12-14 12:03:01 -08:00
Ryan Gossiaux
5aea8065d3
Fixes to Dialog
...
Fix bad porting from useEffect--needs to run on destroy as well. Also fix a missing function invocation.
2021-12-14 12:01:42 -08:00
Ryan Gossiaux
0fe7b0ea04
Add action forwarding and add to Menu
2021-12-13 22:08:22 -08:00
Ryan Gossiaux
a4e55d7167
Fix TransitionRoot inheriting state from other components
2021-12-13 21:57:34 -08:00
Ryan Gossiaux
5cc50973e4
Fixes to Dialog
2021-12-13 21:03:25 -08:00
Ryan Gossiaux
a12b64faed
Fix a few more misc issues (TS errors, dupe files)
2021-12-13 19:01:59 -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