Commit Graph

225 Commits

Author SHA1 Message Date
Ryan Gossiaux
229f81c462 Fix flash of unstyled content issue
The style reset also resets the CSS import so we need to duplicate it.
2022-03-02 00:13:28 -08:00
Ryan Gossiaux
7fc9629975 Update kit & adapter packages 2022-03-02 00:13:01 -08:00
Ryan Gossiaux
c73ac8b9f1 Add website to package.json 2022-03-01 13:35:13 -08:00
rgossiaux
9dd377f061 Update README.md 2022-03-01 13:32:54 -08:00
rgossiaux
57af9b5770 Update README.md
Add docs site link
2022-03-01 13:32:07 -08:00
rgossiaux
9b43312735 Initial docs (#61)
Add initial documentation site.

Co-authored-by: ambiguous48 <33713262+ambiguous48@users.noreply.github.com>
2022-03-01 13:14:53 -08:00
Ryan Gossiaux
01954a0693 Fix focus trap issue with static Dialog components
We need a tick() when the focus trap is enabled, to wait for other updates to be applied first. Noticed this when playing around in the REPL.
2022-02-28 15:00:06 -08:00
Ryan Gossiaux
f5875ef810 1.0.0-beta.10 2022-02-27 15:26:14 -08:00
Ryan Gossiaux
b18fd2093b Manually clean up <Portal> on destroy
Fixes #68

In some cases, when Svelte sees a parent and a child, it will detach the parent and assume that this suffices to detach the child. However, the <Portal> moves elements around in the DOM, so this assumption does not always hold. We need to make sure we detach the portal element ourselves.
2022-02-27 15:24:14 -08:00
Ryan Gossiaux
87aadf2490 Fix style attribute getting wiped away incorrectly
This fixes an issue where any update to a component would un-set the `style` attribute, which interacts poorly with actions that use inline styles (like Popper)
2022-02-25 18:41:12 -08:00
Ryan Gossiaux
3c9dcc9b67 Move to using writable<T> syntax 2022-02-17 16:42:19 -08:00
Ryan Gossiaux
87360c0196 Fix type errors in classNames() in routes/ 2022-02-08 23:50:29 -08:00
Ryan Gossiaux
894aee1b55 npm update svelte-check 2022-02-08 23:48:31 -08:00
Ryan Gossiaux
be1bd8736c Fix incorrect html-for= => for= in a couple examples
Caught by the new transformation: `npm run check -- --use-new-transformation`
2022-02-08 18:34:31 -08:00
rgossiaux
26958edf06 Add issue templates 2022-02-06 18:07:50 -08:00
Ryan Gossiaux
a8d145d421 1.0.0-beta.9 2022-02-06 11:16:45 -08:00
Ryan Gossiaux
78ec3bfb8a Update package command to replace process.env.NODE_ENV automatically 2022-02-06 11:16:45 -08:00
rgossiaux
13e090e316 Update README.md
Add -D to npm install per https://github.com/sveltejs/sapper/issues/774
2022-02-02 10:50:35 -08:00
Ryan Gossiaux
495fa64bf9 Support style as a function
Seems useful to add.

Also improve the prop typing of <Render>, marginally, though as these types do not carry over to end users yet, it's just cosmetic for now.
2022-02-01 12:38:35 -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
dde8112ca7 Upgrade svelte-check version 2022-01-31 20:39:33 -08:00
Ryan Gossiaux
cdc0d86044 Add/improve slotProps handling for Label & Description
* Add slot props support to Label
* Refactor slot props usage in Description
* Add missing slot props to RadioGroupLabel and RadioGroupDescription
2022-01-27 16:04:15 -08:00
Ryan Gossiaux
0430f2d6b6 1.0.0-beta.8 2022-01-21 17:09:38 -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
bc809ef590 Workaround tabIndex=-1 added to document body by SvelteKit
This ends up producing a lot of extra focus events that normally would not exist.

Fixes #36
Fixes #39
2022-01-21 16:17:16 -08:00
Ryan Gossiaux
ac1f86ac15 Add Label fixes and tests
Fixes #33
2022-01-20 15:05:11 -08:00
Ryan Gossiaux
6224278607 Add upstream HeadlessUI Label tests 2022-01-17 23:59:29 -05:00
Ryan Gossiaux
81806a98aa Upgrade svelte2tsx version to support slot prop spread
For #31 which will be fixed in the next release
2022-01-17 23:59:29 -05: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
5d83d35e71 1.0.0-beta.7 2021-12-31 11:50:23 -10: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
b5b6854d2d Menu: fix typo slot => slotProps
This will have caused class as a function to not work correctly for Menu
2021-12-30 18:59:17 -10:00
Ryan Gossiaux
48f50d65d9 Expose <Portal> and <PortalGroup> components
After all, why not? Headless UI exposes them too, and now that I have some unit tests for them I feel more confident in it.
2021-12-30 17:52:32 -10:00
Ryan Gossiaux
00d92048dc Fix a few Transition-related tests 2021-12-30 17:52:03 -10:00
Ryan Gossiaux
839bb55e40 Add Portal tests 2021-12-30 17:31:16 -10:00
Ryan Gossiaux
b0a3eef486 Portal: make reactive correctly on changes to target from PortalGroup 2021-12-30 17:30:21 -10:00
Ryan Gossiaux
2911102eea Add Description tests 2021-12-30 16:36:37 -10:00
Ryan Gossiaux
3ff520d72d Use svelte-inline-compile library to add more unit tests (mostly slot prop)
This brings the number of tests from 381 => 424 which I'm pleased with.

It'd be nice to replace my TestRenderer tests with this but it's not worth the effort.
2021-12-30 15:43:39 -10:00
Ryan Gossiaux
72b0b838e4 RadioGroupOption: active slot prop should have boolean, not integer, value 2021-12-30 15:39:55 -10:00
Ryan Gossiaux
e0d64f9bfc TabPanel: add selected slot prop 2021-12-30 12:51:06 -10:00
Ryan Gossiaux
a9d57659fb Migrate Description to <Render> and pass slot props 2021-12-30 12:13:47 -10:00
Ryan Gossiaux
2b705fd1ae Fix tests after introduction of babel step 2021-12-30 09:56:22 -10:00
Ryan Gossiaux
809cf84164 Add open slot prop to <Menu> 2021-12-30 09:46:29 -10:00
Ryan Gossiaux
a96c4a2339 Add svelte-inline-compile 2021-12-30 09:41:42 -10:00
Ryan Gossiaux
3068c88f8c Add support for svelte-inline-compile to jest 2021-12-30 09:40:10 -10:00
Ryan Gossiaux
a9a0fd3109 1.0.0-beta.6 2021-12-29 11:01:57 -10:00
Ryan Gossiaux
0550274e88 Add .gitattributes to exclude test files from stats
Want this to show up as a Svelte library, not TS, and this seems to be the best way to do it.
2021-12-29 10:58:07 -10:00
Ryan Gossiaux
7578037da5 Add Tabs tests 2021-12-29 10:53:12 -10:00
Ryan Gossiaux
0996de1e6e Add test data to Tab components 2021-12-29 10:32:28 -10:00
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