@yamada-ui/use-animation
Advanced tools
Comparing version 0.1.18 to 0.1.19
@@ -20,3 +20,3 @@ import { StylesProps, Token } from '@yamada-ui/core'; | ||
}; | ||
declare const useAnimationObserver: ({ isOpen, ref }: UseAnimationObserverProps) => { | ||
declare const useAnimationObserver: ({ isOpen, ref, }: UseAnimationObserverProps) => { | ||
present: boolean; | ||
@@ -23,0 +23,0 @@ onAnimationComplete(): void; |
@@ -93,7 +93,12 @@ "use strict"; | ||
key, | ||
styles.map(({ keyframes, ...config }) => createAnimation(keyframes, config)(theme, colorMode)).join(", ") | ||
styles.map( | ||
({ keyframes, ...config }) => createAnimation(keyframes, config)(theme, colorMode) | ||
).join(", ") | ||
); | ||
} else { | ||
const { keyframes, ...config } = styles; | ||
cache.current.set(key, createAnimation(keyframes, config)(theme, colorMode)); | ||
cache.current.set( | ||
key, | ||
createAnimation(keyframes, config)(theme, colorMode) | ||
); | ||
} | ||
@@ -120,3 +125,5 @@ } | ||
if ((0, import_utils.isArray)(keys.current)) { | ||
setAnimations(keys.current.map((key) => cache.current.get(key)).join(", ")); | ||
setAnimations( | ||
keys.current.map((key) => cache.current.get(key)).join(", ") | ||
); | ||
} else { | ||
@@ -130,3 +137,6 @@ setAnimations(cache.current.get((_a = keys.current) != null ? _a : "")); | ||
}; | ||
var useAnimationObserver = ({ isOpen, ref }) => { | ||
var useAnimationObserver = ({ | ||
isOpen, | ||
ref | ||
}) => { | ||
const [mounted, setMounted] = (0, import_react.useState)(isOpen); | ||
@@ -151,3 +161,5 @@ const [flg, { on }] = (0, import_use_boolean.useBoolean)(); | ||
const ownerWindow = (0, import_utils.getOwnerWindow)(ref.current); | ||
const event = new ownerWindow.CustomEvent("animationend", { bubbles: true }); | ||
const event = new ownerWindow.CustomEvent("animationend", { | ||
bubbles: true | ||
}); | ||
(_a = ref.current) == null ? void 0 : _a.dispatchEvent(event); | ||
@@ -154,0 +166,0 @@ } |
{ | ||
"name": "@yamada-ui/use-animation", | ||
"version": "0.1.18", | ||
"version": "0.1.19", | ||
"description": "Yamada UI useAnimation custom hook", | ||
@@ -28,6 +28,6 @@ "keywords": [ | ||
"csstype": "^3.1.1", | ||
"@yamada-ui/core": "0.5.1", | ||
"@yamada-ui/utils": "0.1.3", | ||
"@yamada-ui/use-boolean": "0.1.0", | ||
"@yamada-ui/use-event-listener": "0.1.3" | ||
"@yamada-ui/core": "0.5.2", | ||
"@yamada-ui/utils": "0.1.4", | ||
"@yamada-ui/use-event-listener": "0.1.4", | ||
"@yamada-ui/use-boolean": "0.1.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17535
348
+ Added@yamada-ui/core@0.5.2(transitive)
+ Added@yamada-ui/portal@0.2.3(transitive)
+ Added@yamada-ui/use-event-listener@0.1.4(transitive)
+ Added@yamada-ui/utils@0.1.4(transitive)
- Removed@yamada-ui/core@0.5.1(transitive)
- Removed@yamada-ui/portal@0.2.2(transitive)
- Removed@yamada-ui/use-event-listener@0.1.3(transitive)
- Removed@yamada-ui/utils@0.1.3(transitive)
Updated@yamada-ui/core@0.5.2
Updated@yamada-ui/utils@0.1.4