@fremtind/jkl-react-hooks
Advanced tools
Comparing version 9.1.9 to 10.0.0
@@ -28,4 +28,4 @@ "use strict"; | ||
var import_usePreviousValue = require("./usePreviousValue/usePreviousValue"); | ||
const defaultEasing = import_jkl_core.easings.standard; | ||
const defaultTiming = import_jkl_core.timings.productive; | ||
const defaultEasing = "standard"; | ||
const defaultTiming = "productive"; | ||
function useAnimatedHeight(isOpen, options) { | ||
@@ -35,3 +35,3 @@ const wasOpen = (0, import_usePreviousValue.usePreviousValue)(isOpen); | ||
const timing = (options == null ? void 0 : options.timing) || defaultTiming; | ||
const transition = `${timing} height ${easing}`; | ||
const transition = `${import_jkl_core.timings[timing]} height ${import_jkl_core.easings[easing]}`; | ||
const { prefersReducedMotion } = (0, import_useBrowserPreferences.useBrowserPreferences)(); | ||
@@ -38,0 +38,0 @@ const raf1 = (0, import_react.useRef)(); |
@@ -5,4 +5,4 @@ import { easings, timings } from "@fremtind/jkl-core"; | ||
import { usePreviousValue } from "./usePreviousValue/usePreviousValue"; | ||
const defaultEasing = easings.standard; | ||
const defaultTiming = timings.productive; | ||
const defaultEasing = "standard"; | ||
const defaultTiming = "productive"; | ||
function useAnimatedHeight(isOpen, options) { | ||
@@ -12,3 +12,3 @@ const wasOpen = usePreviousValue(isOpen); | ||
const timing = (options == null ? void 0 : options.timing) || defaultTiming; | ||
const transition = `${timing} height ${easing}`; | ||
const transition = `${timings[timing]} height ${easings[easing]}`; | ||
const { prefersReducedMotion } = useBrowserPreferences(); | ||
@@ -15,0 +15,0 @@ const raf1 = useRef(); |
@@ -1,2 +0,7 @@ | ||
export declare type ColorScheme = "light" | "dark"; | ||
import { ColorScheme } from "@fremtind/jkl-core"; | ||
export type { | ||
/** | ||
* @deprecated Importer typen fra `@fremtind/jkl-core` i stedet | ||
*/ | ||
ColorScheme, }; | ||
declare type BrowserPreferences = { | ||
@@ -8,2 +13,1 @@ prefersReducedMotion: boolean; | ||
export declare const useBrowserPreferences: () => BrowserPreferences; | ||
export {}; |
{ | ||
"name": "@fremtind/jkl-react-hooks", | ||
"version": "9.1.9", | ||
"version": "10.0.0", | ||
"publishConfig": { | ||
@@ -42,3 +42,3 @@ "access": "public" | ||
"dependencies": { | ||
"@fremtind/jkl-core": "^10.1.0", | ||
"@fremtind/jkl-core": "^11.0.0", | ||
"nanoid": "^3.3.2" | ||
@@ -59,3 +59,3 @@ }, | ||
}, | ||
"gitHead": "38fdb174d241566022023fa3bc75196312f62707" | ||
"gitHead": "a223b8f8d61c99d9adb16415cd8888f5a418b1ea" | ||
} |
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
142664
1640
+ Added@fremtind/jkl-core@11.4.0(transitive)
- Removed@fremtind/jkl-core@10.1.0(transitive)
Updated@fremtind/jkl-core@^11.0.0