@pzerelles/headlessui-svelte 2.1.2-next.68 → 2.1.2-next.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -141,13 +141,20 @@
|
|
|
141
141
|
)
|
|
142
142
|
)
|
|
143
143
|
|
|
144
|
+
let timeout: NodeJS.Timeout | undefined
|
|
145
|
+
|
|
144
146
|
$effect(() => {
|
|
145
147
|
if (hover && !visible) {
|
|
146
|
-
setTimeout(() => {
|
|
148
|
+
timeout = setTimeout(() => {
|
|
149
|
+
timeout = undefined
|
|
147
150
|
context.togglePopover()
|
|
148
151
|
}, delay)
|
|
149
|
-
} else if (!hover
|
|
150
|
-
|
|
152
|
+
} else if (!hover) {
|
|
153
|
+
if (timeout) {
|
|
154
|
+
clearTimeout(timeout)
|
|
155
|
+
timeout = undefined
|
|
156
|
+
}
|
|
157
|
+
if (visible) context.closePopover()
|
|
151
158
|
}
|
|
152
159
|
})
|
|
153
160
|
</script>
|