@tamagui/dismissable
Advanced tools
Comparing version 1.0.1-beta.118 to 1.0.1-beta.119
@@ -24,6 +24,4 @@ "use strict"; | ||
__export(Dismissable_exports, { | ||
Branch: () => Branch, | ||
Dismissable: () => Dismissable, | ||
DismissableBranch: () => DismissableBranch, | ||
Root: () => Root | ||
DismissableBranch: () => DismissableBranch | ||
}); | ||
@@ -54,2 +52,3 @@ module.exports = __toCommonJS(Dismissable_exports); | ||
disableOutsidePointerEvents = false, | ||
forceUnmount, | ||
onEscapeKeyDown, | ||
@@ -121,2 +120,4 @@ onPointerDownOutside, | ||
React.useEffect(() => { | ||
if (forceUnmount) | ||
return; | ||
return () => { | ||
@@ -129,5 +130,7 @@ if (!node) | ||
}; | ||
}, [node, context]); | ||
}, [node, context, forceUnmount]); | ||
React.useEffect(() => { | ||
const handleUpdate = () => force({}); | ||
const handleUpdate = () => { | ||
force({}); | ||
}; | ||
document.addEventListener(CONTEXT_UPDATE, handleUpdate); | ||
@@ -194,3 +197,3 @@ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); | ||
}; | ||
const timerId = window.setTimeout(() => { | ||
const timerId = setTimeout(() => { | ||
document.addEventListener("pointerdown", handlePointerDown); | ||
@@ -243,11 +246,7 @@ }, 0); | ||
} | ||
const Root = Dismissable; | ||
const Branch = DismissableBranch; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
Branch, | ||
Dismissable, | ||
DismissableBranch, | ||
Root | ||
DismissableBranch | ||
}); | ||
//# sourceMappingURL=Dismissable.js.map |
@@ -24,2 +24,3 @@ import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown"; | ||
disableOutsidePointerEvents = false, | ||
forceUnmount, | ||
onEscapeKeyDown, | ||
@@ -91,2 +92,4 @@ onPointerDownOutside, | ||
React.useEffect(() => { | ||
if (forceUnmount) | ||
return; | ||
return () => { | ||
@@ -99,5 +102,7 @@ if (!node) | ||
}; | ||
}, [node, context]); | ||
}, [node, context, forceUnmount]); | ||
React.useEffect(() => { | ||
const handleUpdate = () => force({}); | ||
const handleUpdate = () => { | ||
force({}); | ||
}; | ||
document.addEventListener(CONTEXT_UPDATE, handleUpdate); | ||
@@ -164,3 +169,3 @@ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); | ||
}; | ||
const timerId = window.setTimeout(() => { | ||
const timerId = setTimeout(() => { | ||
document.addEventListener("pointerdown", handlePointerDown); | ||
@@ -213,10 +218,6 @@ }, 0); | ||
} | ||
const Root = Dismissable; | ||
const Branch = DismissableBranch; | ||
export { | ||
Branch, | ||
Dismissable, | ||
DismissableBranch, | ||
Root | ||
DismissableBranch | ||
}; | ||
//# sourceMappingURL=Dismissable.js.map |
@@ -24,2 +24,3 @@ import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown"; | ||
disableOutsidePointerEvents = false, | ||
forceUnmount, | ||
onEscapeKeyDown, | ||
@@ -91,2 +92,4 @@ onPointerDownOutside, | ||
React.useEffect(() => { | ||
if (forceUnmount) | ||
return; | ||
return () => { | ||
@@ -99,5 +102,7 @@ if (!node) | ||
}; | ||
}, [node, context]); | ||
}, [node, context, forceUnmount]); | ||
React.useEffect(() => { | ||
const handleUpdate = () => force({}); | ||
const handleUpdate = () => { | ||
force({}); | ||
}; | ||
document.addEventListener(CONTEXT_UPDATE, handleUpdate); | ||
@@ -153,3 +158,3 @@ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); | ||
}; | ||
const timerId = window.setTimeout(() => { | ||
const timerId = setTimeout(() => { | ||
document.addEventListener("pointerdown", handlePointerDown); | ||
@@ -202,10 +207,6 @@ }, 0); | ||
} | ||
const Root = Dismissable; | ||
const Branch = DismissableBranch; | ||
export { | ||
Branch, | ||
Dismissable, | ||
DismissableBranch, | ||
Root | ||
DismissableBranch | ||
}; | ||
//# sourceMappingURL=Dismissable.js.map |
{ | ||
"name": "@tamagui/dismissable", | ||
"version": "1.0.1-beta.118", | ||
"version": "1.0.1-beta.119", | ||
"sideEffects": true, | ||
@@ -23,5 +23,5 @@ "source": "src/index.ts", | ||
"@radix-ui/react-use-escape-keydown": "^0.1.0", | ||
"@tamagui/compose-refs": "^1.0.1-beta.118", | ||
"@tamagui/core": "^1.0.1-beta.118", | ||
"@tamagui/use-event": "^1.0.1-beta.118" | ||
"@tamagui/compose-refs": "^1.0.1-beta.119", | ||
"@tamagui/core": "^1.0.1-beta.119", | ||
"@tamagui/use-event": "^1.0.1-beta.119" | ||
}, | ||
@@ -33,3 +33,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@tamagui/build": "^1.0.1-beta.118", | ||
"@tamagui/build": "^1.0.1-beta.119", | ||
"react": "*", | ||
@@ -36,0 +36,0 @@ "react-dom": "*" |
@@ -11,6 +11,4 @@ import * as React from 'react'; | ||
}>; | ||
declare const Root: React.ForwardRefExoticComponent<DismissableProps & React.RefAttributes<HTMLDivElement>>; | ||
declare const Branch: React.ForwardRefExoticComponent<DismissableBranchProps & React.RefAttributes<HTMLDivElement>>; | ||
export { Dismissable, DismissableBranch, Root, Branch, }; | ||
export { Dismissable, DismissableBranch }; | ||
export type { DismissableProps }; | ||
//# sourceMappingURL=Dismissable.d.ts.map |
@@ -10,2 +10,3 @@ import React from 'react'; | ||
onDismiss?: () => void; | ||
forceUnmount?: boolean; | ||
children?: React.ReactNode; | ||
@@ -12,0 +13,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
105403