Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace @click.away with @click.outside due to deprecation #37

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elements/combobox.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</button>

<ul x-show="selectableItemsOpen"
@click.away="selectableItemsOpen = false"
@click.outside="selectableItemsOpen = false"
x-transition:enter="transition ease-out duration-50"
x-transition:enter-start="opacity-0 -translate-y-1"
x-transition:enter-end="opacity-100"
Expand Down
2 changes: 1 addition & 1 deletion elements/context-menu-examples/example-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<span class="cursor-default text-neutral-400">Right click here</span>

<template x-teleport="body">
<div x-show="contextMenuOpen" @click.away="contextMenuOpen=false" x-ref="contextmenu" class="z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white text-sm fixed p-1 shadow-md w-64" x-cloak>
<div x-show="contextMenuOpen" @click.outside="contextMenuOpen=false" x-ref="contextmenu" class="z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white text-sm fixed p-1 shadow-md w-64" x-cloak>
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none group items-center rounded px-2 py-1.5 hover:bg-blue-600 hover:text-white outline-none pl-8 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none">
<svg class="absolute w-4 h-4 -mt-px left-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" /></svg>
<span>New Folder</span>
Expand Down
2 changes: 1 addition & 1 deletion elements/context-menu-examples/example-02.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<span class="cursor-default text-neutral-400">Right click here</span>

<template x-teleport="body">
<div x-show="contextMenuOpen" @click.away="contextMenuOpen=false" x-ref="contextmenu" class="z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white text-sm fixed p-1 shadow-md w-64" x-cloak>
<div x-show="contextMenuOpen" @click.outside="contextMenuOpen=false" x-ref="contextmenu" class="z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white text-sm fixed p-1 shadow-md w-64" x-cloak>
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none group items-center rounded px-2 py-1.5 hover:bg-neutral-100 outline-none pl-8 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none">
<span>New Folder</span>
<span class="ml-auto text-xs tracking-widest text-neutral-400 group-hover:text-neutral-600">⌘N</span>
Expand Down
2 changes: 1 addition & 1 deletion elements/context-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<span class="cursor-default text-neutral-400">Right click here</span>

<template x-teleport="body">
<div x-show="contextMenuOpen" @click.away="contextMenuOpen=false" x-ref="contextmenu" class="z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white text-sm fixed p-1 shadow-md w-64" x-cloak>
<div x-show="contextMenuOpen" @click.outside="contextMenuOpen=false" x-ref="contextmenu" class="z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white text-sm fixed p-1 shadow-md w-64" x-cloak>
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none group items-center rounded px-2 py-1.5 hover:bg-neutral-100 outline-none pl-8 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none">
<span>Back</span>
<span class="ml-auto text-xs tracking-widest text-neutral-400 group-hover:text-neutral-600">⌘[</span>
Expand Down
2 changes: 1 addition & 1 deletion elements/date-picker-examples/example-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<div
x-show="datePickerOpen"
x-transition
@click.away="datePickerOpen = false"
@click.outside="datePickerOpen = false"
class="absolute top-0 left-0 max-w-lg p-4 mt-12 antialiased bg-white border-2 border-neutral-800 shadow w-[17rem] border-neutral-200/70">
<div class="flex items-center justify-between mb-2">
<div>
Expand Down
2 changes: 1 addition & 1 deletion elements/date-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<div
x-show="datePickerOpen"
x-transition
@click.away="datePickerOpen = false"
@click.outside="datePickerOpen = false"
class="absolute top-0 left-0 max-w-lg p-4 mt-12 antialiased bg-white border rounded-lg shadow w-[17rem] border-neutral-200/70">
<div class="flex items-center justify-between mb-2">
<div>
Expand Down
2 changes: 1 addition & 1 deletion elements/dropdown-menu-examples/example-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<button @click="dropdownOpen=true" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors bg-white border rounded-md hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-neutral-200/60 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none">Open</button>

<div x-show="dropdownOpen"
@click.away="dropdownOpen=false"
@click.outside="dropdownOpen=false"
x-transition:enter="ease-out duration-200"
x-transition:enter-start="-translate-y-2"
x-transition:enter-end="translate-y-0"
Expand Down
2 changes: 1 addition & 1 deletion elements/dropdown-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</button>

<div x-show="dropdownOpen"
@click.away="dropdownOpen=false"
@click.outside="dropdownOpen=false"
x-transition:enter="ease-out duration-200"
x-transition:enter-start="-translate-y-2"
x-transition:enter-end="translate-y-0"
Expand Down
2 changes: 1 addition & 1 deletion elements/menubar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
menuBarOpen: false,
menuBarMenu: ''
}"
@click.away="menuBarOpen=false"
@click.outside="menuBarOpen=false"
class="relative top-0 left-0 z-50 w-auto transition-all duration-150 ease-out"
>
<div class="relative top-0 left-0 z-40 w-auto h-10 transition duration-200 ease-out">
Expand Down
2 changes: 1 addition & 1 deletion elements/popover.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
x-show="popoverOpen"
x-init="setTimeout(function(){ popoverHeightCalculate(); }, 100);"
x-trap.inert="popoverOpen"
@click.away="popoverOpen=false;"
@click.outside="popoverOpen=false;"
@keydown.escape.window="popoverOpen=false"
:class="{ 'top-0 mt-12' : popoverPosition == 'bottom', 'bottom-0 mb-12' : popoverPosition == 'top' }"
class="absolute w-[300px] max-w-lg -translate-x-1/2 left-1/2" x-cloak>
Expand Down
2 changes: 1 addition & 1 deletion elements/select.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@

<ul x-show="selectOpen"
x-ref="selectableItemsList"
@click.away="selectOpen = false"
@click.outside="selectOpen = false"
x-transition:enter="transition ease-out duration-50"
x-transition:enter-start="opacity-0 -translate-y-1"
x-transition:enter-end="opacity-100"
Expand Down
2 changes: 1 addition & 1 deletion elements/slide-over-examples/example-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="fixed inset-y-0 right-0 flex max-w-full pl-10">
<div
x-show="slideOverOpen"
@click.away="slideOverOpen = false"
@click.outside="slideOverOpen = false"
x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700"
x-transition:enter-start="translate-x-full"
x-transition:enter-end="translate-x-0"
Expand Down
2 changes: 1 addition & 1 deletion elements/slide-over.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="fixed inset-y-0 right-0 flex max-w-full pl-10">
<div
x-show="slideOverOpen"
@click.away="slideOverOpen = false"
@click.outside="slideOverOpen = false"
x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700"
x-transition:enter-start="translate-x-full"
x-transition:enter-end="translate-x-0"
Expand Down