fix: outside click refocus bug (#114)

* add watch script

* make interactions in Vue and React consistent

* re-work focus restoration

When we click outside of the Menu or Listbox, we want to
restore the focus to the Button, *unless* we clicked on/in an element
that is focusable in itself. For example, when the Menu is open and you
click in an input field, the input field should stay focused. We should
also close the Menu itself at this point.

* add examples with multiple elements

* bump dependencies
This commit is contained in:
Robin Malfait
2020-10-20 15:38:12 +02:00
committed by GitHub
parent 47b3ad1387
commit 24725216e4
22 changed files with 696 additions and 222 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
set -e
node="yarn node"
tsdxArgs=()
# Add script name
tsdxArgs+=("watch" "--name" "headlessui" "--format" "cjs,esm,umd" "--tsconfig" "./tsconfig.tsdx.json")
# Passthrough arguments and flags
tsdxArgs+=($@)
# Execute
$node "$(yarn bin tsdx)" "${tsdxArgs[@]}"