@react-aria/utils
Advanced tools
Comparing version 3.0.0-nightly-e60fb427c-240930 to 3.0.0-nightly-fb28ab3b4-241024
@@ -39,3 +39,3 @@ | ||
}); | ||
} catch (e) { | ||
} catch { | ||
// Ignore | ||
@@ -42,0 +42,0 @@ } |
@@ -33,3 +33,3 @@ /* | ||
}); | ||
} catch (e) { | ||
} catch { | ||
// Ignore | ||
@@ -36,0 +36,0 @@ } |
@@ -18,2 +18,3 @@ | ||
*/ function $9a54e9cd5db23b5d$export$2bb74740c4e19def(node, checkForOverflow) { | ||
if (!node) return false; | ||
let style = window.getComputedStyle(node); | ||
@@ -20,0 +21,0 @@ let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY); |
@@ -12,2 +12,3 @@ /* | ||
*/ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) { | ||
if (!node) return false; | ||
let style = window.getComputedStyle(node); | ||
@@ -14,0 +15,0 @@ let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY); |
@@ -63,3 +63,3 @@ var $49f0d9486c2408aa$exports = require("./getScrollParents.main.js"); | ||
function $449412113267a1fe$export$c826860796309d1b(targetElement, opts) { | ||
if (document.contains(targetElement)) { | ||
if (targetElement && document.contains(targetElement)) { | ||
let root = document.scrollingElement || document.documentElement; | ||
@@ -66,0 +66,0 @@ let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden'; |
@@ -56,3 +56,3 @@ import {getScrollParents as $a40c673dc9f6d9c7$export$94ed1c92c7beeb22} from "./getScrollParents.module.js"; | ||
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) { | ||
if (document.contains(targetElement)) { | ||
if (targetElement && document.contains(targetElement)) { | ||
let root = document.scrollingElement || document.documentElement; | ||
@@ -59,0 +59,0 @@ let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden'; |
@@ -177,3 +177,3 @@ import React, { ForwardedRef, MutableRefObject, ReactNode, HTMLAttributes, EffectCallback, Dispatch, RefObject as _RefObject1 } from "react"; | ||
export function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T | null>): void; | ||
export function isScrollable(node: Element, checkForOverflow?: boolean): boolean; | ||
export function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean; | ||
export function getScrollParent(node: Element, checkForOverflow?: boolean): Element; | ||
@@ -206,7 +206,7 @@ export function getScrollParents(node: Element, checkForOverflow?: boolean): Element[]; | ||
*/ | ||
export function scrollIntoViewport(targetElement: Element, opts?: ScrollIntoViewportOpts): void; | ||
export function scrollIntoViewport(targetElement: Element | null, opts?: ScrollIntoViewportOpts): void; | ||
export function isVirtualClick(event: MouseEvent | PointerEvent): boolean; | ||
export function isVirtualPointerEvent(event: PointerEvent): boolean; | ||
export function useDeepMemo<T>(value: T, isEqual: (a: T, b: T) => boolean): T; | ||
export function useFormReset<T>(ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null>, initialValue: T, onReset: (value: T) => void): void; | ||
export function useFormReset<T>(ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined, initialValue: T, onReset: (value: T) => void): void; | ||
interface LoadMoreProps { | ||
@@ -213,0 +213,0 @@ /** Whether data is currently being loaded. */ |
@@ -49,3 +49,2 @@ var $eHdSW$react = require("react"); | ||
]); | ||
// eslint-disable-next-line arrow-body-style | ||
(0, $eHdSW$react.useEffect)(()=>{ | ||
@@ -52,0 +51,0 @@ return removeAllGlobalListeners; |
@@ -43,3 +43,2 @@ import {useRef as $lPAwt$useRef, useCallback as $lPAwt$useCallback, useEffect as $lPAwt$useEffect} from "react"; | ||
]); | ||
// eslint-disable-next-line arrow-body-style | ||
(0, $lPAwt$useEffect)(()=>{ | ||
@@ -46,0 +45,0 @@ return removeAllGlobalListeners; |
{ | ||
"name": "@react-aria/utils", | ||
"version": "3.0.0-nightly-e60fb427c-240930", | ||
"version": "3.0.0-nightly-fb28ab3b4-241024", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,5 +25,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/ssr": "^3.0.0-nightly-e60fb427c-240930", | ||
"@react-stately/utils": "^3.0.0-nightly-e60fb427c-240930", | ||
"@react-types/shared": "^3.0.0-nightly-e60fb427c-240930", | ||
"@react-aria/ssr": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-stately/utils": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/shared": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -38,3 +38,3 @@ "clsx": "^2.0.0" | ||
}, | ||
"stableVersion": "3.25.2" | ||
"stableVersion": "3.25.3" | ||
} |
@@ -53,3 +53,3 @@ /* | ||
}); | ||
} catch (e) { | ||
} catch { | ||
// Ignore | ||
@@ -56,0 +56,0 @@ } |
@@ -13,3 +13,6 @@ /* | ||
export function isScrollable(node: Element, checkForOverflow?: boolean): boolean { | ||
export function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean { | ||
if (!node) { | ||
return false; | ||
} | ||
let style = window.getComputedStyle(node); | ||
@@ -16,0 +19,0 @@ let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY); |
@@ -26,3 +26,3 @@ /* | ||
type NullToObject<T> = T extends (null | undefined) ? {} : T; | ||
// eslint-disable-next-line no-undef, @typescript-eslint/no-unused-vars | ||
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; | ||
@@ -29,0 +29,0 @@ |
@@ -84,4 +84,4 @@ /* | ||
*/ | ||
export function scrollIntoViewport(targetElement: Element, opts?: ScrollIntoViewportOpts) { | ||
if (document.contains(targetElement)) { | ||
export function scrollIntoViewport(targetElement: Element | null, opts?: ScrollIntoViewportOpts) { | ||
if (targetElement && document.contains(targetElement)) { | ||
let root = document.scrollingElement || document.documentElement; | ||
@@ -88,0 +88,0 @@ let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden'; |
@@ -18,3 +18,3 @@ /* | ||
export function useFormReset<T>( | ||
ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null>, | ||
ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined, | ||
initialValue: T, | ||
@@ -21,0 +21,0 @@ onReset: (value: T) => void |
@@ -45,3 +45,3 @@ /* | ||
// eslint-disable-next-line arrow-body-style | ||
useEffect(() => { | ||
@@ -48,0 +48,0 @@ return removeAllGlobalListeners; |
@@ -15,3 +15,3 @@ /* | ||
import {useEvent} from './useEvent'; | ||
// eslint-disable-next-line rulesdir/useLayoutEffectRule | ||
import {useLayoutEffect} from './useLayoutEffect'; | ||
@@ -18,0 +18,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
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
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
559294