-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for keyboard via a useFocus argument
- Loading branch information
Showing
12 changed files
with
327 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
@use 'tables'; | ||
@use 'util'; | ||
@use 'tether'; | ||
@use 'use-focus'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.use-focus-page { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 14px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<p> | ||
Use Focus (for keyboard support) | ||
</p> | ||
|
||
<div class="use-focus-page"> | ||
<button type="button"> | ||
I should show when focused with a keyboard | ||
|
||
<Tooltip @useFocus={{true}}> | ||
Hello World | ||
</Tooltip> | ||
</button> | ||
|
||
<div tabindex="0"> | ||
Focus me (I have interactive children) | ||
<Tooltip @useFocus={{true}}> | ||
Hello | ||
<a href="#">World</a> | ||
</Tooltip> | ||
</div> | ||
|
||
<button type="button"> | ||
I should | ||
<i>not</i> | ||
show a tooltip when focused with a keyboard | ||
|
||
<Tooltip @useFocus={{false}}> | ||
Hello World | ||
</Tooltip> | ||
</button> | ||
</div> | ||
|
||
<div id="portal"> | ||
{{! tooltip rendered here }} | ||
</div> |
Oops, something went wrong.