@pzerelles/headlessui-svelte 2.1.2-next.51 → 2.1.2-next.52
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.
|
@@ -37,7 +37,7 @@ export function transitionDataAttributes(data) {
|
|
|
37
37
|
return attributes;
|
|
38
38
|
}
|
|
39
39
|
export function useTransition(options) {
|
|
40
|
-
const { enabled, element, show, events } = $derived(options);
|
|
40
|
+
const { enabled, element, show, events, asChild } = $derived(options);
|
|
41
41
|
let visible = $state((() => show)());
|
|
42
42
|
let flags = $state((() => (enabled && visible ? TransitionState.Enter | TransitionState.Closed : TransitionState.None))());
|
|
43
43
|
let inFlight = $state(false);
|
|
@@ -58,7 +58,7 @@ export function useTransition(options) {
|
|
|
58
58
|
}
|
|
59
59
|
if (!node) {
|
|
60
60
|
// Retry if the DOM node isn't available yet
|
|
61
|
-
if (show) {
|
|
61
|
+
if (show && !asChild) {
|
|
62
62
|
flags |= TransitionState.Enter | TransitionState.Closed;
|
|
63
63
|
return d.nextFrame(() => retry(enabled, show, node, d));
|
|
64
64
|
}
|