@yamada-ui/use-animation
Advanced tools
Comparing version 1.0.39-next-20241005235555 to 1.0.39-next-20241008193728
import { AnimationStyle, Theme } from '@yamada-ui/core'; | ||
type Styles = AnimationStyle | Theme["animations"] | (AnimationStyle | Theme["animations"])[]; | ||
type Styles = (AnimationStyle | Theme["animations"])[] | AnimationStyle | Theme["animations"]; | ||
/** | ||
@@ -17,8 +17,8 @@ * `useAnimation` is a custom hook that implements animations similar to CSS `keyframes`. | ||
[key: string]: Styles; | ||
}>(arrayOrObj: T, init?: keyof T | (keyof T)[]) => [string | undefined, (key: keyof T | (keyof T)[] | ((key: keyof T | (keyof T)[] | undefined) => keyof T | (keyof T)[])) => void]; | ||
}>(arrayOrObj: T, init?: (keyof T)[] | keyof T) => [string | undefined, (key: ((key: (keyof T)[] | keyof T | undefined) => (keyof T)[] | keyof T) | (keyof T)[] | keyof T) => void]; | ||
interface UseAnimationObserverProps { | ||
ref: React.RefObject<HTMLElement>; | ||
isOpen: boolean; | ||
ref: React.RefObject<HTMLElement>; | ||
} | ||
declare const useAnimationObserver: ({ isOpen, ref, }: UseAnimationObserverProps) => { | ||
declare const useAnimationObserver: ({ ref, isOpen, }: UseAnimationObserverProps) => { | ||
present: boolean; | ||
@@ -25,0 +25,0 @@ onAnimationComplete(): void; |
@@ -69,3 +69,2 @@ "use client" | ||
(keysOrFunc) => { | ||
var _a; | ||
const args = (() => { | ||
@@ -85,3 +84,3 @@ if (!(0, import_utils.isUndefined)(keys.current) && (0, import_utils.isArray)(arrayOrObj)) { | ||
} else { | ||
setAnimations(cache.current.get((_a = keys.current) != null ? _a : "")); | ||
setAnimations(cache.current.get(keys.current)); | ||
} | ||
@@ -94,4 +93,4 @@ }, | ||
var useAnimationObserver = ({ | ||
isOpen, | ||
ref | ||
ref, | ||
isOpen | ||
}) => { | ||
@@ -98,0 +97,0 @@ const [mounted, setMounted] = (0, import_react.useState)(isOpen); |
{ | ||
"name": "@yamada-ui/use-animation", | ||
"version": "1.0.39-next-20241005235555", | ||
"version": "1.0.39-next-20241008193728", | ||
"description": "Yamada UI useAnimation custom hook", | ||
@@ -29,6 +29,6 @@ "keywords": [ | ||
"csstype": "^3.1.3", | ||
"@yamada-ui/core": "1.15.2-next-20241005235555", | ||
"@yamada-ui/core": "1.15.2-next-20241008193728", | ||
"@yamada-ui/use-boolean": "1.0.3", | ||
"@yamada-ui/use-event-listener": "1.0.21", | ||
"@yamada-ui/utils": "1.5.2" | ||
"@yamada-ui/use-event-listener": "1.0.22-next-20241008193728", | ||
"@yamada-ui/utils": "1.5.3-next-20241008193728" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
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
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
26732
251
+ Added@yamada-ui/core@1.15.2-next-20241008193728(transitive)
+ Added@yamada-ui/portal@1.0.23-next-20241008193728(transitive)
+ Added@yamada-ui/use-event-listener@1.0.22-next-20241008193728(transitive)
+ Added@yamada-ui/utils@1.5.3-next-20241008193728(transitive)
- Removed@yamada-ui/core@1.15.2-next-20241005235555(transitive)
- Removed@yamada-ui/portal@1.0.23-next-20241005235555(transitive)
- Removed@yamada-ui/use-event-listener@1.0.21(transitive)
- Removed@yamada-ui/utils@1.5.2(transitive)
Updated@yamada-ui/use-event-listener@1.0.22-next-20241008193728