@react-aria/gridlist
Advanced tools
Comparing version 3.1.3-nightly.3679 to 3.1.3-nightly.3682
@@ -149,2 +149,5 @@ var $dSFus$reactariautils = require("@react-aria/utils"); | ||
(0, $dSFus$reactariafocus.focusSafely)(focusable); | ||
(0, $dSFus$reactariautils.scrollIntoViewport)(focusable, { | ||
containingElement: (0, $dSFus$reactariautils.getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
@@ -154,7 +157,16 @@ // If there is no next focusable child, then return focus back to the row | ||
e.stopPropagation(); | ||
if (direction === "rtl") (0, $dSFus$reactariafocus.focusSafely)(ref.current); | ||
else { | ||
if (direction === "rtl") { | ||
(0, $dSFus$reactariafocus.focusSafely)(ref.current); | ||
(0, $dSFus$reactariautils.scrollIntoViewport)(ref.current, { | ||
containingElement: (0, $dSFus$reactariautils.getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
walker.currentNode = ref.current; | ||
let lastElement = $f7116f5928c03f32$var$last(walker); | ||
if (lastElement) (0, $dSFus$reactariafocus.focusSafely)(lastElement); | ||
if (lastElement) { | ||
(0, $dSFus$reactariafocus.focusSafely)(lastElement); | ||
(0, $dSFus$reactariautils.scrollIntoViewport)(lastElement, { | ||
containingElement: (0, $dSFus$reactariautils.getScrollParent)(ref.current) | ||
}); | ||
} | ||
} | ||
@@ -171,10 +183,22 @@ } | ||
(0, $dSFus$reactariafocus.focusSafely)(focusable1); | ||
(0, $dSFus$reactariautils.scrollIntoViewport)(focusable1, { | ||
containingElement: (0, $dSFus$reactariautils.getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
if (direction === "ltr") (0, $dSFus$reactariafocus.focusSafely)(ref.current); | ||
else { | ||
if (direction === "ltr") { | ||
(0, $dSFus$reactariafocus.focusSafely)(ref.current); | ||
(0, $dSFus$reactariautils.scrollIntoViewport)(ref.current, { | ||
containingElement: (0, $dSFus$reactariautils.getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
walker.currentNode = ref.current; | ||
let lastElement1 = $f7116f5928c03f32$var$last(walker); | ||
if (lastElement1) (0, $dSFus$reactariafocus.focusSafely)(lastElement1); | ||
if (lastElement1) { | ||
(0, $dSFus$reactariafocus.focusSafely)(lastElement1); | ||
(0, $dSFus$reactariautils.scrollIntoViewport)(lastElement1, { | ||
containingElement: (0, $dSFus$reactariautils.getScrollParent)(ref.current) | ||
}); | ||
} | ||
} | ||
@@ -181,0 +205,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import {useId as $13Gtr$useId, filterDOMProps as $13Gtr$filterDOMProps, mergeProps as $13Gtr$mergeProps, useSlotId as $13Gtr$useSlotId} from "@react-aria/utils"; | ||
import {useId as $13Gtr$useId, filterDOMProps as $13Gtr$filterDOMProps, mergeProps as $13Gtr$mergeProps, useSlotId as $13Gtr$useSlotId, scrollIntoViewport as $13Gtr$scrollIntoViewport, getScrollParent as $13Gtr$getScrollParent} from "@react-aria/utils"; | ||
import {useHighlightSelectionDescription as $13Gtr$useHighlightSelectionDescription, useGridSelectionAnnouncement as $13Gtr$useGridSelectionAnnouncement, useGridSelectionCheckbox as $13Gtr$useGridSelectionCheckbox} from "@react-aria/grid"; | ||
@@ -142,2 +142,5 @@ import {useSelectableList as $13Gtr$useSelectableList, useSelectableItem as $13Gtr$useSelectableItem} from "@react-aria/selection"; | ||
(0, $13Gtr$focusSafely)(focusable); | ||
(0, $13Gtr$scrollIntoViewport)(focusable, { | ||
containingElement: (0, $13Gtr$getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
@@ -147,7 +150,16 @@ // If there is no next focusable child, then return focus back to the row | ||
e.stopPropagation(); | ||
if (direction === "rtl") (0, $13Gtr$focusSafely)(ref.current); | ||
else { | ||
if (direction === "rtl") { | ||
(0, $13Gtr$focusSafely)(ref.current); | ||
(0, $13Gtr$scrollIntoViewport)(ref.current, { | ||
containingElement: (0, $13Gtr$getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
walker.currentNode = ref.current; | ||
let lastElement = $4e8b0456ef72939f$var$last(walker); | ||
if (lastElement) (0, $13Gtr$focusSafely)(lastElement); | ||
if (lastElement) { | ||
(0, $13Gtr$focusSafely)(lastElement); | ||
(0, $13Gtr$scrollIntoViewport)(lastElement, { | ||
containingElement: (0, $13Gtr$getScrollParent)(ref.current) | ||
}); | ||
} | ||
} | ||
@@ -164,10 +176,22 @@ } | ||
(0, $13Gtr$focusSafely)(focusable1); | ||
(0, $13Gtr$scrollIntoViewport)(focusable1, { | ||
containingElement: (0, $13Gtr$getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
if (direction === "ltr") (0, $13Gtr$focusSafely)(ref.current); | ||
else { | ||
if (direction === "ltr") { | ||
(0, $13Gtr$focusSafely)(ref.current); | ||
(0, $13Gtr$scrollIntoViewport)(ref.current, { | ||
containingElement: (0, $13Gtr$getScrollParent)(ref.current) | ||
}); | ||
} else { | ||
walker.currentNode = ref.current; | ||
let lastElement1 = $4e8b0456ef72939f$var$last(walker); | ||
if (lastElement1) (0, $13Gtr$focusSafely)(lastElement1); | ||
if (lastElement1) { | ||
(0, $13Gtr$focusSafely)(lastElement1); | ||
(0, $13Gtr$scrollIntoViewport)(lastElement1, { | ||
containingElement: (0, $13Gtr$getScrollParent)(ref.current) | ||
}); | ||
} | ||
} | ||
@@ -174,0 +198,0 @@ } |
{ | ||
"name": "@react-aria/gridlist", | ||
"version": "3.1.3-nightly.3679+62d779c7f", | ||
"version": "3.1.3-nightly.3682+c53cfb204", | ||
"description": "Spectrum UI components in React", | ||
@@ -20,11 +20,11 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/focus": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-aria/grid": "3.5.3-nightly.3679+62d779c7f", | ||
"@react-aria/i18n": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-aria/interactions": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-aria/selection": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-aria/utils": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-stately/list": "3.6.2-nightly.3679+62d779c7f", | ||
"@react-types/checkbox": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-types/shared": "3.0.0-nightly.1979+62d779c7f", | ||
"@react-aria/focus": "3.0.0-nightly.1982+c53cfb204", | ||
"@react-aria/grid": "3.5.3-nightly.3682+c53cfb204", | ||
"@react-aria/i18n": "3.0.0-nightly.1982+c53cfb204", | ||
"@react-aria/interactions": "3.0.0-nightly.1982+c53cfb204", | ||
"@react-aria/selection": "3.0.0-nightly.1982+c53cfb204", | ||
"@react-aria/utils": "3.0.0-nightly.1982+c53cfb204", | ||
"@react-stately/list": "3.6.2-nightly.3682+c53cfb204", | ||
"@react-types/checkbox": "3.0.0-nightly.1982+c53cfb204", | ||
"@react-types/shared": "3.0.0-nightly.1982+c53cfb204", | ||
"@swc/helpers": "^0.4.14" | ||
@@ -38,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "62d779c7f82a9c1e88b912850af342af8ea5156f" | ||
"gitHead": "c53cfb204f6977e1ac620fdfa841ffdcf567c5f0" | ||
} |
@@ -16,5 +16,5 @@ /* | ||
import {getRowId, listMap} from './utils'; | ||
import {getScrollParent, mergeProps, scrollIntoViewport, useSlotId} from '@react-aria/utils'; | ||
import {isFocusVisible} from '@react-aria/interactions'; | ||
import type {ListState} from '@react-stately/list'; | ||
import {mergeProps, useSlotId} from '@react-aria/utils'; | ||
import {KeyboardEvent as ReactKeyboardEvent, RefObject} from 'react'; | ||
@@ -96,2 +96,3 @@ import {SelectableItemStates, useSelectableItem} from '@react-aria/selection'; | ||
focusSafely(focusable); | ||
scrollIntoViewport(focusable, {containingElement: getScrollParent(ref.current)}); | ||
} else { | ||
@@ -103,2 +104,3 @@ // If there is no next focusable child, then return focus back to the row | ||
focusSafely(ref.current); | ||
scrollIntoViewport(ref.current, {containingElement: getScrollParent(ref.current)}); | ||
} else { | ||
@@ -109,2 +111,3 @@ walker.currentNode = ref.current; | ||
focusSafely(lastElement); | ||
scrollIntoViewport(lastElement, {containingElement: getScrollParent(ref.current)}); | ||
} | ||
@@ -124,2 +127,3 @@ } | ||
focusSafely(focusable); | ||
scrollIntoViewport(focusable, {containingElement: getScrollParent(ref.current)}); | ||
} else { | ||
@@ -130,2 +134,3 @@ e.preventDefault(); | ||
focusSafely(ref.current); | ||
scrollIntoViewport(ref.current, {containingElement: getScrollParent(ref.current)}); | ||
} else { | ||
@@ -136,2 +141,3 @@ walker.currentNode = ref.current; | ||
focusSafely(lastElement); | ||
scrollIntoViewport(lastElement, {containingElement: getScrollParent(ref.current)}); | ||
} | ||
@@ -138,0 +144,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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
105467
979