Socket
Socket
Sign inDemoInstall

@react-aria/spinbutton

Package Overview
Dependencies
Maintainers
2
Versions
675
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/spinbutton - npm Package Compare versions

Comparing version 3.6.4 to 3.6.5

44

dist/useSpinButton.main.js

@@ -35,3 +35,3 @@ var $cb4b786159079747$exports = require("./intlStrings.main.js");

let { value: value, textValue: textValue, minValue: minValue, maxValue: maxValue, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, onIncrement: onIncrement, onIncrementPage: onIncrementPage, onDecrement: onDecrement, onDecrementPage: onDecrementPage, onDecrementToMin: onDecrementToMin, onIncrementToMax: onIncrementToMax } = props;
const stringFormatter = (0, $2pZbw$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($cb4b786159079747$exports))), "@react-aria/spinbutton");
const stringFormatter = (0, $2pZbw$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($cb4b786159079747$exports))), '@react-aria/spinbutton');
const clearAsync = ()=>clearTimeout(_async.current);

@@ -45,3 +45,3 @@ // eslint-disable-next-line arrow-body-style

switch(e.key){
case "PageUp":
case 'PageUp':
if (onIncrementPage) {

@@ -53,4 +53,4 @@ e.preventDefault();

// fallthrough!
case "ArrowUp":
case "Up":
case 'ArrowUp':
case 'Up':
if (onIncrement) {

@@ -61,3 +61,3 @@ e.preventDefault();

break;
case "PageDown":
case 'PageDown':
if (onDecrementPage) {

@@ -69,4 +69,4 @@ e.preventDefault();

// fallthrough
case "ArrowDown":
case "Down":
case 'ArrowDown':
case 'Down':
if (onDecrement) {

@@ -77,3 +77,3 @@ e.preventDefault();

break;
case "Home":
case 'Home':
if (onDecrementToMin) {

@@ -84,3 +84,3 @@ e.preventDefault();

break;
case "End":
case 'End':
if (onIncrementToMax) {

@@ -104,7 +104,7 @@ e.preventDefault();

// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
let ariaTextValue = textValue === "" ? stringFormatter.format("Empty") : (textValue || `${value}`).replace("-", "\u2212");
let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
(0, $2pZbw$react.useEffect)(()=>{
if (isFocused.current) {
(0, $2pZbw$reactarialiveannouncer.clearAnnouncer)("assertive");
(0, $2pZbw$reactarialiveannouncer.announce)(ariaTextValue, "assertive");
(0, $2pZbw$reactarialiveannouncer.clearAnnouncer)('assertive');
(0, $2pZbw$reactarialiveannouncer.announce)(ariaTextValue, 'assertive');
}

@@ -136,10 +136,10 @@ }, [

spinButtonProps: {
role: "spinbutton",
"aria-valuenow": value !== undefined && !isNaN(value) ? value : undefined,
"aria-valuetext": ariaTextValue,
"aria-valuemin": minValue,
"aria-valuemax": maxValue,
"aria-disabled": isDisabled || undefined,
"aria-readonly": isReadOnly || undefined,
"aria-required": isRequired || undefined,
role: 'spinbutton',
'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,
'aria-valuetext': ariaTextValue,
'aria-valuemin': minValue,
'aria-valuemax': maxValue,
'aria-disabled': isDisabled || undefined,
'aria-readonly': isReadOnly || undefined,
'aria-required': isRequired || undefined,
onKeyDown: onKeyDown,

@@ -152,3 +152,3 @@ onFocus: onFocus,

onIncrementPressStart(400);
addGlobalListener(window, "contextmenu", cancelContextMenu);
addGlobalListener(window, 'contextmenu', cancelContextMenu);
},

@@ -165,3 +165,3 @@ onPressEnd: ()=>{

onDecrementPressStart(400);
addGlobalListener(window, "contextmenu", cancelContextMenu);
addGlobalListener(window, 'contextmenu', cancelContextMenu);
},

@@ -168,0 +168,0 @@ onPressEnd: ()=>{

@@ -29,3 +29,3 @@ import $5rwhf$intlStringsmodulejs from "./intlStrings.module.js";

let { value: value, textValue: textValue, minValue: minValue, maxValue: maxValue, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, onIncrement: onIncrement, onIncrementPage: onIncrementPage, onDecrement: onDecrement, onDecrementPage: onDecrementPage, onDecrementToMin: onDecrementToMin, onIncrementToMax: onIncrementToMax } = props;
const stringFormatter = (0, $5rwhf$useLocalizedStringFormatter)((0, ($parcel$interopDefault($5rwhf$intlStringsmodulejs))), "@react-aria/spinbutton");
const stringFormatter = (0, $5rwhf$useLocalizedStringFormatter)((0, ($parcel$interopDefault($5rwhf$intlStringsmodulejs))), '@react-aria/spinbutton');
const clearAsync = ()=>clearTimeout(_async.current);

@@ -39,3 +39,3 @@ // eslint-disable-next-line arrow-body-style

switch(e.key){
case "PageUp":
case 'PageUp':
if (onIncrementPage) {

@@ -47,4 +47,4 @@ e.preventDefault();

// fallthrough!
case "ArrowUp":
case "Up":
case 'ArrowUp':
case 'Up':
if (onIncrement) {

@@ -55,3 +55,3 @@ e.preventDefault();

break;
case "PageDown":
case 'PageDown':
if (onDecrementPage) {

@@ -63,4 +63,4 @@ e.preventDefault();

// fallthrough
case "ArrowDown":
case "Down":
case 'ArrowDown':
case 'Down':
if (onDecrement) {

@@ -71,3 +71,3 @@ e.preventDefault();

break;
case "Home":
case 'Home':
if (onDecrementToMin) {

@@ -78,3 +78,3 @@ e.preventDefault();

break;
case "End":
case 'End':
if (onIncrementToMax) {

@@ -98,7 +98,7 @@ e.preventDefault();

// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
let ariaTextValue = textValue === "" ? stringFormatter.format("Empty") : (textValue || `${value}`).replace("-", "\u2212");
let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
(0, $5rwhf$useEffect)(()=>{
if (isFocused.current) {
(0, $5rwhf$clearAnnouncer)("assertive");
(0, $5rwhf$announce)(ariaTextValue, "assertive");
(0, $5rwhf$clearAnnouncer)('assertive');
(0, $5rwhf$announce)(ariaTextValue, 'assertive');
}

@@ -130,10 +130,10 @@ }, [

spinButtonProps: {
role: "spinbutton",
"aria-valuenow": value !== undefined && !isNaN(value) ? value : undefined,
"aria-valuetext": ariaTextValue,
"aria-valuemin": minValue,
"aria-valuemax": maxValue,
"aria-disabled": isDisabled || undefined,
"aria-readonly": isReadOnly || undefined,
"aria-required": isRequired || undefined,
role: 'spinbutton',
'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,
'aria-valuetext': ariaTextValue,
'aria-valuemin': minValue,
'aria-valuemax': maxValue,
'aria-disabled': isDisabled || undefined,
'aria-readonly': isReadOnly || undefined,
'aria-required': isRequired || undefined,
onKeyDown: onKeyDown,

@@ -146,3 +146,3 @@ onFocus: onFocus,

onIncrementPressStart(400);
addGlobalListener(window, "contextmenu", cancelContextMenu);
addGlobalListener(window, 'contextmenu', cancelContextMenu);
},

@@ -159,3 +159,3 @@ onPressEnd: ()=>{

onDecrementPressStart(400);
addGlobalListener(window, "contextmenu", cancelContextMenu);
addGlobalListener(window, 'contextmenu', cancelContextMenu);
},

@@ -162,0 +162,0 @@ onPressEnd: ()=>{

{
"name": "@react-aria/spinbutton",
"version": "3.6.4",
"version": "3.6.5",
"description": "Spectrum UI components in React",

@@ -25,7 +25,7 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/i18n": "^3.11.0",
"@react-aria/live-announcer": "^3.3.3",
"@react-aria/utils": "^3.24.0",
"@react-types/button": "^3.9.3",
"@react-types/shared": "^3.23.0",
"@react-aria/i18n": "^3.11.1",
"@react-aria/live-announcer": "^3.3.4",
"@react-aria/utils": "^3.24.1",
"@react-types/button": "^3.9.4",
"@react-types/shared": "^3.23.1",
"@swc/helpers": "^0.5.0"

@@ -40,3 +40,3 @@ },

},
"gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd"
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
}

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

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

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