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
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
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
6bb337fb7a
Add Popover tests
2021-12-28 15:12:46 -10:00
Ryan Gossiaux
d9117431d6
Add an id to PopoverOverlay
2021-12-28 15:12:16 -10:00
Ryan Gossiaux
5bff629363
PopoverButton: fix aria-controls when Popover is closed
2021-12-28 11:36:18 -10:00
Ryan Gossiaux
c99b74c089
Prettier
...
Didn't run this on every single file because it messes up the formatting of the some of the TestRenderer constructions
2021-12-28 09:28:36 -10:00
Ryan Gossiaux
23a98b50ed
Add remaining Menu tests
2021-12-28 09:12:16 -10:00
Ryan Gossiaux
41774ec075
Fix searching for MenuItems
2021-12-28 09:08:51 -10:00
Ryan Gossiaux
d7348b35b6
Conditionally forward MenuItem click events only if the MenuItem is not disabled
...
This is obviously a lot easier in React, but at any rate this mimics upstream behavior here.
2021-12-28 09:03:43 -10:00
Ryan Gossiaux
2c09162fc0
Initial Menu tests
2021-12-27 22:00:10 -10:00
Ryan Gossiaux
fe0388cc44
Misc fixes to Menus
...
* Disabled prop not forwarded correctly to MenuButton
* Active element not set correctly when Menu is opened
* Log message had wrong component name
2021-12-27 21:58:34 -10:00
Ryan Gossiaux
6af4b2a3b6
Add initial RadioGroup tests
...
Basically all the ones that aren't annoying to write
2021-12-27 15:51:43 -08:00
Ryan Gossiaux
303c68f79c
First pass at Listbox tests
2021-12-27 15:19:00 -08:00
Ryan Gossiaux
b37e0f3c9c
Remaining Disclosure tests
...
Minus the render prop tests
2021-12-27 12:56:32 -08:00
Ryan Gossiaux
1bed7dbea7
Initial Disclosure tests
2021-12-26 23:36:37 -08:00
Ryan Gossiaux
206b83963e
Fix a couple <Disclosure> mistakes
...
* Incorrect error messages from <DisclosurePanel>
* Not using buttonId correctly (don't think this had any practical impact though)
2021-12-26 22:58:55 -08:00
Ryan Gossiaux
d1940e5d16
Add nested dialog tests
2021-12-26 22:45:03 -08:00
Ryan Gossiaux
9bd9901ef6
Add more Dialog tests
2021-12-26 18:08:03 -08:00
Ryan Gossiaux
08021bbf21
Add support for <Form> tag
2021-12-26 18:07:47 -08:00
Ryan Gossiaux
77dd80caa2
Add more Dialog tests
...
This caught an issue with <FocusTrap> already.
2021-12-26 16:53:44 -08:00
Ryan Gossiaux
a2745e1770
Fixes to issues with Dialog, FocusTrap, and StackContextProvider
...
* StackContextProvider had some reactivity that didn't make sense and would cause an infinite loop if it ever triggered.
* FocusTrap and Dialog did not work together properly all of the time. A top-level <Dialog> with initial state of closed would not have the FocusTrap triggered correctly when it was opened. Needed to make it reactive to changes in `containers`
2021-12-26 16:28:37 -08:00
Ryan Gossiaux
10f2eab08d
Add initial batch of Dialog tests
2021-12-26 12:01:18 -08:00
Ryan Gossiaux
39dda7eb76
Refactor out circular dependency in Transition components
...
This was causing problems with Jest even though it was otherwise fine.
2021-12-26 12:01:18 -08:00
Ryan Gossiaux
3801d35d0f
Fix Dialog error message when bad props are passed
2021-12-26 11:48:13 -08:00
Ryan Gossiaux
a033e8ca4a
Add <Input> element
...
Most likely this is only useful for tests
2021-12-26 11:47:20 -08:00
Ryan Gossiaux
ea8693e1ec
Add remaining Switch tests
2021-12-25 15:57:35 -08:00
Ryan Gossiaux
1156a0923e
Add a few more Switch tests and the accessibility-assertions file
2021-12-25 08:30:41 -08:00
Ryan Gossiaux
237236f8d7
Add first test
2021-12-25 01:19:03 -08:00
Ryan Gossiaux
740d91ab06
Add initial test scaffolding
2021-12-25 01:19:03 -08:00
Ryan Gossiaux
b26cc4c6c3
Actually export dl/dd/dt
2021-12-22 16:55:33 -08:00
Ryan Gossiaux
7a5c22cce0
Fix package
2021-12-22 15:07:33 -08:00
Ryan Gossiaux
014357833f
Add <dt> <dd> <dl> element support for as=
2021-12-22 15:07:05 -08:00
Ryan Gossiaux
a7e8be2c14
Add type=button handling
...
Fixes #22
2021-12-22 13:07:16 -08:00
Ryan Gossiaux
96b165acc0
Fix two issues with Transitions
...
* TransitionChild's initial state was wrong with unmount=false
* entered classes were not being removed correctly at the start of a transition
2021-12-22 11:59:18 -08:00
Ryan Gossiaux
d21287eace
Support Features rendering / static/unmount props
...
Fixes #1
2021-12-22 11:55:52 -08: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
aa3017990d
Move Transition to <Render>
2021-12-20 22:55:35 -08:00
Ryan Gossiaux
7ff28492a2
Move RadioGroup to <Render>
2021-12-20 22:42:55 -08:00
Ryan Gossiaux
df0939fe22
Fix TransitionChild class when no class prop is passed
2021-12-20 22:29:13 -08:00
Ryan Gossiaux
cfe1aaa55e
Switch Popover to <Render>
...
Also fix a bug where PopoverPanel was missing an id
2021-12-20 22:28:46 -08:00
Ryan Gossiaux
93e7148e1b
Move Disclosure to <Render>
2021-12-20 19:26:04 -08:00
Ryan Gossiaux
c73d9bf919
Add <Render> to Dialog
2021-12-20 18:34:38 -08:00