Commit Graph

22 Commits

Author SHA1 Message Date
Ryan Gossiaux
38f1b27c57 Move <Listbox> to bind:value 2023-06-11 14:45:30 -07:00
Ryan Gossiaux
5fdd47b435 Refactor types out into types.ts file and use /// <reference types="...">
Fixes packaging problems.
2022-03-18 11:19:25 -07:00
Ryan Gossiaux
cc27615e96 Add JSDoc comments
Yay
2022-03-18 11:19:25 -07:00
Ryan Gossiaux
d7f6a58753 Add default as prop type for when as= is not provided 2022-03-18 11:19:25 -07:00
Ryan Gossiaux
231775e60b Type Listbox with $$Props 2022-03-18 11:19:25 -07:00
Ryan Gossiaux
3c9dcc9b67 Move to using writable<T> syntax 2022-02-17 16:42:19 -08:00
Ryan Gossiaux
bfc68577cc Add better event typing
The any types could probably be improved with $$Generic
2022-01-31 21:15:00 -08:00
Ryan Gossiaux
5e795d2d4f Fix typeahead search logic when repeating a letter
Fixes #35

This ports 186a4cfcef
2022-01-21 17:06:51 -08:00
Ryan Gossiaux
6d2aa60d22 Use new TS option to preserve imports in tests
These assertions were here to prevent imports (needed for svelte-inine-compile) from being removed.
2022-01-17 23:59:29 -05:00
Ryan Gossiaux
e16e27f04e Handle dynamically adding items in list components: Radio Group, Tabs, Listbox, Menu
Fixes #29

Upstream Headless UI handles this for Radio Group but not for the others. I didn't see any reason why not to implement this for the other ones too.
2021-12-31 11:46:00 -10: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
25a4b0f6e5 Add <Render> usage to <Listbox> 2021-12-20 17:47:02 -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
70910c05b0 Standardize context naming
Fixes #7
2021-12-18 23:18:45 -08:00
Ryan Gossiaux
4d47ba89a6 Clean up Listbox store/context usage
Fixes #9
2021-12-18 23:07:55 -08:00
Ryan Gossiaux
9e45d92929 Refactor to useOpenClosed
Fixes #6
2021-12-18 21:36:09 -08:00
Ryan Gossiaux
5b36ce9404 Fix various type errors with strict mode 2021-12-15 14:06:33 -08:00
Ryan Gossiaux
dbfb2c227e Move contexts over to useXContext model
Fixes #4
2021-12-15 10:13:01 -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