@react-aria/spinbutton 3.6.4 → 3.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/useSpinButton.main.js +22 -22
- package/dist/useSpinButton.mjs +23 -23
- package/dist/useSpinButton.module.js +22 -22
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +7 -7
package/dist/ar-AE.mjs
CHANGED
package/dist/bg-BG.mjs
CHANGED
package/dist/cs-CZ.mjs
CHANGED
package/dist/da-DK.mjs
CHANGED
package/dist/de-DE.mjs
CHANGED
package/dist/el-GR.mjs
CHANGED
package/dist/en-US.mjs
CHANGED
package/dist/es-ES.mjs
CHANGED
package/dist/et-EE.mjs
CHANGED
package/dist/fi-FI.mjs
CHANGED
package/dist/fr-FR.mjs
CHANGED
package/dist/he-IL.mjs
CHANGED
package/dist/hr-HR.mjs
CHANGED
package/dist/hu-HU.mjs
CHANGED
package/dist/intlStrings.mjs
CHANGED
package/dist/it-IT.mjs
CHANGED
package/dist/ja-JP.mjs
CHANGED
package/dist/ko-KR.mjs
CHANGED
package/dist/lt-LT.mjs
CHANGED
package/dist/lv-LV.mjs
CHANGED
package/dist/nb-NO.mjs
CHANGED
package/dist/nl-NL.mjs
CHANGED
package/dist/pl-PL.mjs
CHANGED
package/dist/pt-BR.mjs
CHANGED
package/dist/pt-PT.mjs
CHANGED
package/dist/ro-RO.mjs
CHANGED
package/dist/ru-RU.mjs
CHANGED
package/dist/sk-SK.mjs
CHANGED
package/dist/sl-SI.mjs
CHANGED
package/dist/sr-SP.mjs
CHANGED
package/dist/sv-SE.mjs
CHANGED
package/dist/tr-TR.mjs
CHANGED
package/dist/uk-UA.mjs
CHANGED
|
@@ -32,7 +32,7 @@ $parcel$export(module.exports, "useSpinButton", () => $37bbd4c129023f61$export$e
|
|
|
32
32
|
function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
33
33
|
const _async = (0, $2pZbw$react.useRef)();
|
|
34
34
|
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;
|
|
35
|
-
const stringFormatter = (0, $2pZbw$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($cb4b786159079747$exports))),
|
|
35
|
+
const stringFormatter = (0, $2pZbw$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($cb4b786159079747$exports))), '@react-aria/spinbutton');
|
|
36
36
|
const clearAsync = ()=>clearTimeout(_async.current);
|
|
37
37
|
// eslint-disable-next-line arrow-body-style
|
|
38
38
|
(0, $2pZbw$react.useEffect)(()=>{
|
|
@@ -41,41 +41,41 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
|
41
41
|
let onKeyDown = (e)=>{
|
|
42
42
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) return;
|
|
43
43
|
switch(e.key){
|
|
44
|
-
case
|
|
44
|
+
case 'PageUp':
|
|
45
45
|
if (onIncrementPage) {
|
|
46
46
|
e.preventDefault();
|
|
47
47
|
onIncrementPage === null || onIncrementPage === void 0 ? void 0 : onIncrementPage();
|
|
48
48
|
break;
|
|
49
49
|
}
|
|
50
50
|
// fallthrough!
|
|
51
|
-
case
|
|
52
|
-
case
|
|
51
|
+
case 'ArrowUp':
|
|
52
|
+
case 'Up':
|
|
53
53
|
if (onIncrement) {
|
|
54
54
|
e.preventDefault();
|
|
55
55
|
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
56
56
|
}
|
|
57
57
|
break;
|
|
58
|
-
case
|
|
58
|
+
case 'PageDown':
|
|
59
59
|
if (onDecrementPage) {
|
|
60
60
|
e.preventDefault();
|
|
61
61
|
onDecrementPage === null || onDecrementPage === void 0 ? void 0 : onDecrementPage();
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
// fallthrough
|
|
65
|
-
case
|
|
66
|
-
case
|
|
65
|
+
case 'ArrowDown':
|
|
66
|
+
case 'Down':
|
|
67
67
|
if (onDecrement) {
|
|
68
68
|
e.preventDefault();
|
|
69
69
|
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
70
70
|
}
|
|
71
71
|
break;
|
|
72
|
-
case
|
|
72
|
+
case 'Home':
|
|
73
73
|
if (onDecrementToMin) {
|
|
74
74
|
e.preventDefault();
|
|
75
75
|
onDecrementToMin === null || onDecrementToMin === void 0 ? void 0 : onDecrementToMin();
|
|
76
76
|
}
|
|
77
77
|
break;
|
|
78
|
-
case
|
|
78
|
+
case 'End':
|
|
79
79
|
if (onIncrementToMax) {
|
|
80
80
|
e.preventDefault();
|
|
81
81
|
onIncrementToMax === null || onIncrementToMax === void 0 ? void 0 : onIncrementToMax();
|
|
@@ -94,11 +94,11 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
|
94
94
|
// This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
|
|
95
95
|
// and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
|
|
96
96
|
// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
|
|
97
|
-
let ariaTextValue = textValue ===
|
|
97
|
+
let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
|
|
98
98
|
(0, $2pZbw$react.useEffect)(()=>{
|
|
99
99
|
if (isFocused.current) {
|
|
100
|
-
(0, $2pZbw$reactarialiveannouncer.clearAnnouncer)(
|
|
101
|
-
(0, $2pZbw$reactarialiveannouncer.announce)(ariaTextValue,
|
|
100
|
+
(0, $2pZbw$reactarialiveannouncer.clearAnnouncer)('assertive');
|
|
101
|
+
(0, $2pZbw$reactarialiveannouncer.announce)(ariaTextValue, 'assertive');
|
|
102
102
|
}
|
|
103
103
|
}, [
|
|
104
104
|
ariaTextValue
|
|
@@ -125,14 +125,14 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
|
125
125
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $2pZbw$reactariautils.useGlobalListeners)();
|
|
126
126
|
return {
|
|
127
127
|
spinButtonProps: {
|
|
128
|
-
role:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
role: 'spinbutton',
|
|
129
|
+
'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,
|
|
130
|
+
'aria-valuetext': ariaTextValue,
|
|
131
|
+
'aria-valuemin': minValue,
|
|
132
|
+
'aria-valuemax': maxValue,
|
|
133
|
+
'aria-disabled': isDisabled || undefined,
|
|
134
|
+
'aria-readonly': isReadOnly || undefined,
|
|
135
|
+
'aria-required': isRequired || undefined,
|
|
136
136
|
onKeyDown: onKeyDown,
|
|
137
137
|
onFocus: onFocus,
|
|
138
138
|
onBlur: onBlur
|
|
@@ -140,7 +140,7 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
|
140
140
|
incrementButtonProps: {
|
|
141
141
|
onPressStart: ()=>{
|
|
142
142
|
onIncrementPressStart(400);
|
|
143
|
-
addGlobalListener(window,
|
|
143
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
144
144
|
},
|
|
145
145
|
onPressEnd: ()=>{
|
|
146
146
|
clearAsync();
|
|
@@ -152,7 +152,7 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
|
152
152
|
decrementButtonProps: {
|
|
153
153
|
onPressStart: ()=>{
|
|
154
154
|
onDecrementPressStart(400);
|
|
155
|
-
addGlobalListener(window,
|
|
155
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
156
156
|
},
|
|
157
157
|
onPressEnd: ()=>{
|
|
158
158
|
clearAsync();
|
package/dist/useSpinButton.mjs
CHANGED
|
@@ -26,7 +26,7 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
27
27
|
const _async = (0, $5rwhf$useRef)();
|
|
28
28
|
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;
|
|
29
|
-
const stringFormatter = (0, $5rwhf$useLocalizedStringFormatter)((0, ($parcel$interopDefault($5rwhf$intlStringsmodulejs))),
|
|
29
|
+
const stringFormatter = (0, $5rwhf$useLocalizedStringFormatter)((0, ($parcel$interopDefault($5rwhf$intlStringsmodulejs))), '@react-aria/spinbutton');
|
|
30
30
|
const clearAsync = ()=>clearTimeout(_async.current);
|
|
31
31
|
// eslint-disable-next-line arrow-body-style
|
|
32
32
|
(0, $5rwhf$useEffect)(()=>{
|
|
@@ -35,41 +35,41 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
35
35
|
let onKeyDown = (e)=>{
|
|
36
36
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) return;
|
|
37
37
|
switch(e.key){
|
|
38
|
-
case
|
|
38
|
+
case 'PageUp':
|
|
39
39
|
if (onIncrementPage) {
|
|
40
40
|
e.preventDefault();
|
|
41
41
|
onIncrementPage === null || onIncrementPage === void 0 ? void 0 : onIncrementPage();
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
// fallthrough!
|
|
45
|
-
case
|
|
46
|
-
case
|
|
45
|
+
case 'ArrowUp':
|
|
46
|
+
case 'Up':
|
|
47
47
|
if (onIncrement) {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
50
50
|
}
|
|
51
51
|
break;
|
|
52
|
-
case
|
|
52
|
+
case 'PageDown':
|
|
53
53
|
if (onDecrementPage) {
|
|
54
54
|
e.preventDefault();
|
|
55
55
|
onDecrementPage === null || onDecrementPage === void 0 ? void 0 : onDecrementPage();
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
// fallthrough
|
|
59
|
-
case
|
|
60
|
-
case
|
|
59
|
+
case 'ArrowDown':
|
|
60
|
+
case 'Down':
|
|
61
61
|
if (onDecrement) {
|
|
62
62
|
e.preventDefault();
|
|
63
63
|
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
64
64
|
}
|
|
65
65
|
break;
|
|
66
|
-
case
|
|
66
|
+
case 'Home':
|
|
67
67
|
if (onDecrementToMin) {
|
|
68
68
|
e.preventDefault();
|
|
69
69
|
onDecrementToMin === null || onDecrementToMin === void 0 ? void 0 : onDecrementToMin();
|
|
70
70
|
}
|
|
71
71
|
break;
|
|
72
|
-
case
|
|
72
|
+
case 'End':
|
|
73
73
|
if (onIncrementToMax) {
|
|
74
74
|
e.preventDefault();
|
|
75
75
|
onIncrementToMax === null || onIncrementToMax === void 0 ? void 0 : onIncrementToMax();
|
|
@@ -88,11 +88,11 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
88
88
|
// This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
|
|
89
89
|
// and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
|
|
90
90
|
// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
|
|
91
|
-
let ariaTextValue = textValue ===
|
|
91
|
+
let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
|
|
92
92
|
(0, $5rwhf$useEffect)(()=>{
|
|
93
93
|
if (isFocused.current) {
|
|
94
|
-
(0, $5rwhf$clearAnnouncer)(
|
|
95
|
-
(0, $5rwhf$announce)(ariaTextValue,
|
|
94
|
+
(0, $5rwhf$clearAnnouncer)('assertive');
|
|
95
|
+
(0, $5rwhf$announce)(ariaTextValue, 'assertive');
|
|
96
96
|
}
|
|
97
97
|
}, [
|
|
98
98
|
ariaTextValue
|
|
@@ -119,14 +119,14 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
119
119
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $5rwhf$useGlobalListeners)();
|
|
120
120
|
return {
|
|
121
121
|
spinButtonProps: {
|
|
122
|
-
role:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
role: 'spinbutton',
|
|
123
|
+
'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,
|
|
124
|
+
'aria-valuetext': ariaTextValue,
|
|
125
|
+
'aria-valuemin': minValue,
|
|
126
|
+
'aria-valuemax': maxValue,
|
|
127
|
+
'aria-disabled': isDisabled || undefined,
|
|
128
|
+
'aria-readonly': isReadOnly || undefined,
|
|
129
|
+
'aria-required': isRequired || undefined,
|
|
130
130
|
onKeyDown: onKeyDown,
|
|
131
131
|
onFocus: onFocus,
|
|
132
132
|
onBlur: onBlur
|
|
@@ -134,7 +134,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
134
134
|
incrementButtonProps: {
|
|
135
135
|
onPressStart: ()=>{
|
|
136
136
|
onIncrementPressStart(400);
|
|
137
|
-
addGlobalListener(window,
|
|
137
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
138
138
|
},
|
|
139
139
|
onPressEnd: ()=>{
|
|
140
140
|
clearAsync();
|
|
@@ -146,7 +146,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
146
146
|
decrementButtonProps: {
|
|
147
147
|
onPressStart: ()=>{
|
|
148
148
|
onDecrementPressStart(400);
|
|
149
|
-
addGlobalListener(window,
|
|
149
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
150
150
|
},
|
|
151
151
|
onPressEnd: ()=>{
|
|
152
152
|
clearAsync();
|
|
@@ -160,4 +160,4 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
export {$d2e8511e6f209edf$export$e908e06f4b8e3402 as useSpinButton};
|
|
163
|
-
//# sourceMappingURL=useSpinButton.
|
|
163
|
+
//# sourceMappingURL=useSpinButton.module.js.map
|
|
@@ -26,7 +26,7 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
27
27
|
const _async = (0, $5rwhf$useRef)();
|
|
28
28
|
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;
|
|
29
|
-
const stringFormatter = (0, $5rwhf$useLocalizedStringFormatter)((0, ($parcel$interopDefault($5rwhf$intlStringsmodulejs))),
|
|
29
|
+
const stringFormatter = (0, $5rwhf$useLocalizedStringFormatter)((0, ($parcel$interopDefault($5rwhf$intlStringsmodulejs))), '@react-aria/spinbutton');
|
|
30
30
|
const clearAsync = ()=>clearTimeout(_async.current);
|
|
31
31
|
// eslint-disable-next-line arrow-body-style
|
|
32
32
|
(0, $5rwhf$useEffect)(()=>{
|
|
@@ -35,41 +35,41 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
35
35
|
let onKeyDown = (e)=>{
|
|
36
36
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) return;
|
|
37
37
|
switch(e.key){
|
|
38
|
-
case
|
|
38
|
+
case 'PageUp':
|
|
39
39
|
if (onIncrementPage) {
|
|
40
40
|
e.preventDefault();
|
|
41
41
|
onIncrementPage === null || onIncrementPage === void 0 ? void 0 : onIncrementPage();
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
// fallthrough!
|
|
45
|
-
case
|
|
46
|
-
case
|
|
45
|
+
case 'ArrowUp':
|
|
46
|
+
case 'Up':
|
|
47
47
|
if (onIncrement) {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
50
50
|
}
|
|
51
51
|
break;
|
|
52
|
-
case
|
|
52
|
+
case 'PageDown':
|
|
53
53
|
if (onDecrementPage) {
|
|
54
54
|
e.preventDefault();
|
|
55
55
|
onDecrementPage === null || onDecrementPage === void 0 ? void 0 : onDecrementPage();
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
// fallthrough
|
|
59
|
-
case
|
|
60
|
-
case
|
|
59
|
+
case 'ArrowDown':
|
|
60
|
+
case 'Down':
|
|
61
61
|
if (onDecrement) {
|
|
62
62
|
e.preventDefault();
|
|
63
63
|
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
64
64
|
}
|
|
65
65
|
break;
|
|
66
|
-
case
|
|
66
|
+
case 'Home':
|
|
67
67
|
if (onDecrementToMin) {
|
|
68
68
|
e.preventDefault();
|
|
69
69
|
onDecrementToMin === null || onDecrementToMin === void 0 ? void 0 : onDecrementToMin();
|
|
70
70
|
}
|
|
71
71
|
break;
|
|
72
|
-
case
|
|
72
|
+
case 'End':
|
|
73
73
|
if (onIncrementToMax) {
|
|
74
74
|
e.preventDefault();
|
|
75
75
|
onIncrementToMax === null || onIncrementToMax === void 0 ? void 0 : onIncrementToMax();
|
|
@@ -88,11 +88,11 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
88
88
|
// This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
|
|
89
89
|
// and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
|
|
90
90
|
// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
|
|
91
|
-
let ariaTextValue = textValue ===
|
|
91
|
+
let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
|
|
92
92
|
(0, $5rwhf$useEffect)(()=>{
|
|
93
93
|
if (isFocused.current) {
|
|
94
|
-
(0, $5rwhf$clearAnnouncer)(
|
|
95
|
-
(0, $5rwhf$announce)(ariaTextValue,
|
|
94
|
+
(0, $5rwhf$clearAnnouncer)('assertive');
|
|
95
|
+
(0, $5rwhf$announce)(ariaTextValue, 'assertive');
|
|
96
96
|
}
|
|
97
97
|
}, [
|
|
98
98
|
ariaTextValue
|
|
@@ -119,14 +119,14 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
119
119
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $5rwhf$useGlobalListeners)();
|
|
120
120
|
return {
|
|
121
121
|
spinButtonProps: {
|
|
122
|
-
role:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
role: 'spinbutton',
|
|
123
|
+
'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,
|
|
124
|
+
'aria-valuetext': ariaTextValue,
|
|
125
|
+
'aria-valuemin': minValue,
|
|
126
|
+
'aria-valuemax': maxValue,
|
|
127
|
+
'aria-disabled': isDisabled || undefined,
|
|
128
|
+
'aria-readonly': isReadOnly || undefined,
|
|
129
|
+
'aria-required': isRequired || undefined,
|
|
130
130
|
onKeyDown: onKeyDown,
|
|
131
131
|
onFocus: onFocus,
|
|
132
132
|
onBlur: onBlur
|
|
@@ -134,7 +134,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
134
134
|
incrementButtonProps: {
|
|
135
135
|
onPressStart: ()=>{
|
|
136
136
|
onIncrementPressStart(400);
|
|
137
|
-
addGlobalListener(window,
|
|
137
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
138
138
|
},
|
|
139
139
|
onPressEnd: ()=>{
|
|
140
140
|
clearAsync();
|
|
@@ -146,7 +146,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
146
146
|
decrementButtonProps: {
|
|
147
147
|
onPressStart: ()=>{
|
|
148
148
|
onDecrementPressStart(400);
|
|
149
|
-
addGlobalListener(window,
|
|
149
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
150
150
|
},
|
|
151
151
|
onPressEnd: ()=>{
|
|
152
152
|
clearAsync();
|
package/dist/zh-CN.mjs
CHANGED
package/dist/zh-TW.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/spinbutton",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.5",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/i18n": "^3.11.
|
|
26
|
-
"@react-aria/live-announcer": "^3.3.
|
|
27
|
-
"@react-aria/utils": "^3.24.
|
|
28
|
-
"@react-types/button": "^3.9.
|
|
29
|
-
"@react-types/shared": "^3.23.
|
|
25
|
+
"@react-aria/i18n": "^3.11.1",
|
|
26
|
+
"@react-aria/live-announcer": "^3.3.4",
|
|
27
|
+
"@react-aria/utils": "^3.24.1",
|
|
28
|
+
"@react-types/button": "^3.9.4",
|
|
29
|
+
"@react-types/shared": "^3.23.1",
|
|
30
30
|
"@swc/helpers": "^0.5.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
|
|
40
40
|
}
|