Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-aria/listbox

Package Overview
Dependencies
Maintainers
1
Versions
785
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/listbox - npm Package Compare versions

Comparing version 3.0.0-rc.0 to 3.0.0-rc.1

src/index.ts

20

dist/main.js

@@ -65,3 +65,3 @@ var {

exports.useListBox = useListBox;
const $f10fc7bba5e201cb95788604af75$var$isSafariMacOS = typeof window !== 'undefined' && window.navigator != null ? /^Mac/.test(window.navigator.platform) && /Safari/.test(window.navigator.userAgent) && !/Chrome/.test(window.navigator.userAgent) : false;
/**

@@ -73,2 +73,3 @@ * Provides the behavior and accessibility implementation for an option in a listbox.

*/
function useOption(props, state, ref) {

@@ -88,8 +89,13 @@ let {

'aria-disabled': isDisabled,
'aria-selected': isSelected,
'aria-label': props['aria-label'],
'aria-labelledby': labelId,
'aria-describedby': descriptionId
};
'aria-selected': isSelected
}; // Safari with VoiceOver on macOS misreads options with aria-labelledby or aria-label as simply "text".
// We should not map slots to the label and description on Safari and instead just have VoiceOver read the textContent.
// https://bugs.webkit.org/show_bug.cgi?id=209279
if (!$f10fc7bba5e201cb95788604af75$var$isSafariMacOS) {
optionProps['aria-label'] = props['aria-label'];
optionProps['aria-labelledby'] = labelId;
optionProps['aria-describedby'] = descriptionId;
}
if (isVirtualized) {

@@ -128,3 +134,3 @@ optionProps['aria-posinset'] = state.collection.getItem(key).index + 1;

return {
optionProps: _babelRuntimeHelpersExtends({}, optionProps, {}, mergeProps(pressProps, hoverProps)),
optionProps: _babelRuntimeHelpersExtends({}, optionProps, mergeProps(pressProps, hoverProps)),
labelProps: {

@@ -131,0 +137,0 @@ id: labelId

@@ -41,3 +41,3 @@ import { isFocusVisible, useHover, usePress } from "@react-aria/interactions";

}
const $d79719e4e3369b10c98de169e0d7fe$var$isSafariMacOS = typeof window !== 'undefined' && window.navigator != null ? /^Mac/.test(window.navigator.platform) && /Safari/.test(window.navigator.userAgent) && !/Chrome/.test(window.navigator.userAgent) : false;
/**

@@ -49,2 +49,3 @@ * Provides the behavior and accessibility implementation for an option in a listbox.

*/
export function useOption(props, state, ref) {

@@ -64,8 +65,13 @@ let {

'aria-disabled': isDisabled,
'aria-selected': isSelected,
'aria-label': props['aria-label'],
'aria-labelledby': labelId,
'aria-describedby': descriptionId
};
'aria-selected': isSelected
}; // Safari with VoiceOver on macOS misreads options with aria-labelledby or aria-label as simply "text".
// We should not map slots to the label and description on Safari and instead just have VoiceOver read the textContent.
// https://bugs.webkit.org/show_bug.cgi?id=209279
if (!$d79719e4e3369b10c98de169e0d7fe$var$isSafariMacOS) {
optionProps['aria-label'] = props['aria-label'];
optionProps['aria-labelledby'] = labelId;
optionProps['aria-describedby'] = descriptionId;
}
if (isVirtualized) {

@@ -104,3 +110,3 @@ optionProps['aria-posinset'] = state.collection.getItem(key).index + 1;

return {
optionProps: _babelRuntimeHelpersEsmExtends({}, optionProps, {}, mergeProps(pressProps, hoverProps)),
optionProps: _babelRuntimeHelpersEsmExtends({}, optionProps, mergeProps(pressProps, hoverProps)),
labelProps: {

@@ -107,0 +113,0 @@ id: labelId

{
"name": "@react-aria/listbox",
"version": "3.0.0-rc.0",
"version": "3.0.0-rc.1",
"description": "Spectrum UI components in React",

@@ -11,3 +11,4 @@ "license": "Apache-2.0",

"files": [
"dist"
"dist",
"src"
],

@@ -21,9 +22,9 @@ "sideEffects": false,

"@babel/runtime": "^7.6.2",
"@react-aria/interactions": "3.0.0-rc.3",
"@react-aria/label": "3.0.0-rc.3",
"@react-aria/selection": "3.0.0-rc.0",
"@react-aria/utils": "3.0.0-rc.3",
"@react-stately/list": "3.0.0-rc.0",
"@react-types/listbox": "3.0.0-rc.0",
"@react-types/shared": "3.0.0-rc.3"
"@react-aria/interactions": "3.0.0-rc.4",
"@react-aria/label": "3.0.0-rc.4",
"@react-aria/selection": "3.0.0-rc.1",
"@react-aria/utils": "3.0.0-rc.4",
"@react-stately/list": "3.0.0-rc.1",
"@react-types/listbox": "3.0.0-rc.1",
"@react-types/shared": "3.0.0-rc.4"
},

@@ -36,3 +37,3 @@ "peerDependencies": {

},
"gitHead": "461d6321126ae9b4f1508aa912f7b36bf8a603f8"
"gitHead": "ee5ad1544ed65366c0fadabc2c63d39573ba3ffd"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc