@react-aria/spinbutton 3.6.3 → 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/import.mjs +1 -264
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/main.js +2 -265
- package/dist/main.js.map +1 -1
- package/dist/module.js +1 -264
- package/dist/module.js.map +1 -1
- package/dist/useSpinButton.main.js +168 -0
- package/dist/useSpinButton.main.js.map +1 -0
- package/dist/useSpinButton.mjs +163 -0
- package/dist/useSpinButton.module.js +163 -0
- package/dist/useSpinButton.module.js.map +1 -0
- package/package.json +7 -7
package/dist/main.js
CHANGED
|
@@ -1,63 +1,12 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $f4b3121a918895c4$exports = require("./bg-BG.main.js");
|
|
3
|
-
var $d01cc02a83842f4c$exports = require("./cs-CZ.main.js");
|
|
4
|
-
var $ae20f188998ad249$exports = require("./da-DK.main.js");
|
|
5
|
-
var $f17ee93fe12c77e5$exports = require("./de-DE.main.js");
|
|
6
|
-
var $9691dc6a69dd5ba9$exports = require("./el-GR.main.js");
|
|
7
|
-
var $b2385949437f9917$exports = require("./en-US.main.js");
|
|
8
|
-
var $ed6d4429037ec60d$exports = require("./es-ES.main.js");
|
|
9
|
-
var $c9cb32f5c221f118$exports = require("./et-EE.main.js");
|
|
10
|
-
var $5be8f6c4ad248dda$exports = require("./fi-FI.main.js");
|
|
11
|
-
var $3f46a428519ddd7e$exports = require("./fr-FR.main.js");
|
|
12
|
-
var $41c7f98604688f35$exports = require("./he-IL.main.js");
|
|
13
|
-
var $183e97db82c2cbf0$exports = require("./hr-HR.main.js");
|
|
14
|
-
var $749cae0664a7dc03$exports = require("./hu-HU.main.js");
|
|
15
|
-
var $4129f25b282c341e$exports = require("./it-IT.main.js");
|
|
16
|
-
var $908925465e00dbfc$exports = require("./ja-JP.main.js");
|
|
17
|
-
var $34fae452e2e356d9$exports = require("./ko-KR.main.js");
|
|
18
|
-
var $458e73ba0e56bdd4$exports = require("./lt-LT.main.js");
|
|
19
|
-
var $2ddf9ecf84010f95$exports = require("./lv-LV.main.js");
|
|
20
|
-
var $b787a09821b773ea$exports = require("./nb-NO.main.js");
|
|
21
|
-
var $6b951cc1b0de6d71$exports = require("./nl-NL.main.js");
|
|
22
|
-
var $fc3eb600d1c488fa$exports = require("./pl-PL.main.js");
|
|
23
|
-
var $ba0f4e25830e4bbf$exports = require("./pt-BR.main.js");
|
|
24
|
-
var $2cd34c446640bd1d$exports = require("./pt-PT.main.js");
|
|
25
|
-
var $55c7bf6cdae0bed5$exports = require("./ro-RO.main.js");
|
|
26
|
-
var $240e8ca0b043d76a$exports = require("./ru-RU.main.js");
|
|
27
|
-
var $c28c7ecdb94a1868$exports = require("./sk-SK.main.js");
|
|
28
|
-
var $c2d6776ba29b6517$exports = require("./sl-SI.main.js");
|
|
29
|
-
var $628464d96d5a7855$exports = require("./sr-SP.main.js");
|
|
30
|
-
var $5a1bcd0a675a6f60$exports = require("./sv-SE.main.js");
|
|
31
|
-
var $f71e9bc82e4a5a16$exports = require("./tr-TR.main.js");
|
|
32
|
-
var $cb1ece2578f5693e$exports = require("./uk-UA.main.js");
|
|
33
|
-
var $d8ce7cc5e4398a80$exports = require("./zh-CN.main.js");
|
|
34
|
-
var $8db5191ec1aacb53$exports = require("./zh-TW.main.js");
|
|
35
|
-
var $2BLaI$reactarialiveannouncer = require("@react-aria/live-announcer");
|
|
36
|
-
var $2BLaI$react = require("react");
|
|
37
|
-
var $2BLaI$reactariautils = require("@react-aria/utils");
|
|
38
|
-
var $2BLaI$reactariai18n = require("@react-aria/i18n");
|
|
1
|
+
var $37bbd4c129023f61$exports = require("./useSpinButton.main.js");
|
|
39
2
|
|
|
40
3
|
|
|
41
4
|
function $parcel$export(e, n, v, s) {
|
|
42
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
43
6
|
}
|
|
44
7
|
|
|
45
|
-
|
|
46
|
-
return a && a.__esModule ? a.default : a;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
$parcel$export(module.exports, "useSpinButton", () => $37bbd4c129023f61$export$e908e06f4b8e3402);
|
|
8
|
+
$parcel$export(module.exports, "useSpinButton", () => $37bbd4c129023f61$exports.useSpinButton);
|
|
50
9
|
/*
|
|
51
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
52
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
53
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
54
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
-
*
|
|
56
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
57
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
58
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
59
|
-
* governing permissions and limitations under the License.
|
|
60
|
-
*/ /*
|
|
61
10
|
* Copyright 2020 Adobe. All rights reserved.
|
|
62
11
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
63
12
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -68,218 +17,6 @@ $parcel$export(module.exports, "useSpinButton", () => $37bbd4c129023f61$export$e
|
|
|
68
17
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
69
18
|
* governing permissions and limitations under the License.
|
|
70
19
|
*/
|
|
71
|
-
var $cb4b786159079747$exports = {};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
$cb4b786159079747$exports = {
|
|
107
|
-
"ar-AE": $db6c23092fbfea22$exports,
|
|
108
|
-
"bg-BG": $f4b3121a918895c4$exports,
|
|
109
|
-
"cs-CZ": $d01cc02a83842f4c$exports,
|
|
110
|
-
"da-DK": $ae20f188998ad249$exports,
|
|
111
|
-
"de-DE": $f17ee93fe12c77e5$exports,
|
|
112
|
-
"el-GR": $9691dc6a69dd5ba9$exports,
|
|
113
|
-
"en-US": $b2385949437f9917$exports,
|
|
114
|
-
"es-ES": $ed6d4429037ec60d$exports,
|
|
115
|
-
"et-EE": $c9cb32f5c221f118$exports,
|
|
116
|
-
"fi-FI": $5be8f6c4ad248dda$exports,
|
|
117
|
-
"fr-FR": $3f46a428519ddd7e$exports,
|
|
118
|
-
"he-IL": $41c7f98604688f35$exports,
|
|
119
|
-
"hr-HR": $183e97db82c2cbf0$exports,
|
|
120
|
-
"hu-HU": $749cae0664a7dc03$exports,
|
|
121
|
-
"it-IT": $4129f25b282c341e$exports,
|
|
122
|
-
"ja-JP": $908925465e00dbfc$exports,
|
|
123
|
-
"ko-KR": $34fae452e2e356d9$exports,
|
|
124
|
-
"lt-LT": $458e73ba0e56bdd4$exports,
|
|
125
|
-
"lv-LV": $2ddf9ecf84010f95$exports,
|
|
126
|
-
"nb-NO": $b787a09821b773ea$exports,
|
|
127
|
-
"nl-NL": $6b951cc1b0de6d71$exports,
|
|
128
|
-
"pl-PL": $fc3eb600d1c488fa$exports,
|
|
129
|
-
"pt-BR": $ba0f4e25830e4bbf$exports,
|
|
130
|
-
"pt-PT": $2cd34c446640bd1d$exports,
|
|
131
|
-
"ro-RO": $55c7bf6cdae0bed5$exports,
|
|
132
|
-
"ru-RU": $240e8ca0b043d76a$exports,
|
|
133
|
-
"sk-SK": $c28c7ecdb94a1868$exports,
|
|
134
|
-
"sl-SI": $c2d6776ba29b6517$exports,
|
|
135
|
-
"sr-SP": $628464d96d5a7855$exports,
|
|
136
|
-
"sv-SE": $5a1bcd0a675a6f60$exports,
|
|
137
|
-
"tr-TR": $f71e9bc82e4a5a16$exports,
|
|
138
|
-
"uk-UA": $cb1ece2578f5693e$exports,
|
|
139
|
-
"zh-CN": $d8ce7cc5e4398a80$exports,
|
|
140
|
-
"zh-TW": $8db5191ec1aacb53$exports
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
|
|
148
|
-
const _async = (0, $2BLaI$react.useRef)();
|
|
149
|
-
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;
|
|
150
|
-
const stringFormatter = (0, $2BLaI$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($cb4b786159079747$exports))), "@react-aria/spinbutton");
|
|
151
|
-
const clearAsync = ()=>clearTimeout(_async.current);
|
|
152
|
-
// eslint-disable-next-line arrow-body-style
|
|
153
|
-
(0, $2BLaI$react.useEffect)(()=>{
|
|
154
|
-
return ()=>clearAsync();
|
|
155
|
-
}, []);
|
|
156
|
-
let onKeyDown = (e)=>{
|
|
157
|
-
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) return;
|
|
158
|
-
switch(e.key){
|
|
159
|
-
case "PageUp":
|
|
160
|
-
if (onIncrementPage) {
|
|
161
|
-
e.preventDefault();
|
|
162
|
-
onIncrementPage === null || onIncrementPage === void 0 ? void 0 : onIncrementPage();
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
// fallthrough!
|
|
166
|
-
case "ArrowUp":
|
|
167
|
-
case "Up":
|
|
168
|
-
if (onIncrement) {
|
|
169
|
-
e.preventDefault();
|
|
170
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
171
|
-
}
|
|
172
|
-
break;
|
|
173
|
-
case "PageDown":
|
|
174
|
-
if (onDecrementPage) {
|
|
175
|
-
e.preventDefault();
|
|
176
|
-
onDecrementPage === null || onDecrementPage === void 0 ? void 0 : onDecrementPage();
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
// fallthrough
|
|
180
|
-
case "ArrowDown":
|
|
181
|
-
case "Down":
|
|
182
|
-
if (onDecrement) {
|
|
183
|
-
e.preventDefault();
|
|
184
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
case "Home":
|
|
188
|
-
if (onDecrementToMin) {
|
|
189
|
-
e.preventDefault();
|
|
190
|
-
onDecrementToMin === null || onDecrementToMin === void 0 ? void 0 : onDecrementToMin();
|
|
191
|
-
}
|
|
192
|
-
break;
|
|
193
|
-
case "End":
|
|
194
|
-
if (onIncrementToMax) {
|
|
195
|
-
e.preventDefault();
|
|
196
|
-
onIncrementToMax === null || onIncrementToMax === void 0 ? void 0 : onIncrementToMax();
|
|
197
|
-
}
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
let isFocused = (0, $2BLaI$react.useRef)(false);
|
|
202
|
-
let onFocus = ()=>{
|
|
203
|
-
isFocused.current = true;
|
|
204
|
-
};
|
|
205
|
-
let onBlur = ()=>{
|
|
206
|
-
isFocused.current = false;
|
|
207
|
-
};
|
|
208
|
-
// Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212).
|
|
209
|
-
// This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
|
|
210
|
-
// and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
|
|
211
|
-
// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
|
|
212
|
-
let ariaTextValue = textValue === "" ? stringFormatter.format("Empty") : (textValue || `${value}`).replace("-", "\u2212");
|
|
213
|
-
(0, $2BLaI$react.useEffect)(()=>{
|
|
214
|
-
if (isFocused.current) {
|
|
215
|
-
(0, $2BLaI$reactarialiveannouncer.clearAnnouncer)("assertive");
|
|
216
|
-
(0, $2BLaI$reactarialiveannouncer.announce)(ariaTextValue, "assertive");
|
|
217
|
-
}
|
|
218
|
-
}, [
|
|
219
|
-
ariaTextValue
|
|
220
|
-
]);
|
|
221
|
-
const onIncrementPressStart = (0, $2BLaI$reactariautils.useEffectEvent)((initialStepDelay)=>{
|
|
222
|
-
clearAsync();
|
|
223
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
224
|
-
// Start spinning after initial delay
|
|
225
|
-
_async.current = window.setTimeout(()=>{
|
|
226
|
-
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) onIncrementPressStart(60);
|
|
227
|
-
}, initialStepDelay);
|
|
228
|
-
});
|
|
229
|
-
const onDecrementPressStart = (0, $2BLaI$reactariautils.useEffectEvent)((initialStepDelay)=>{
|
|
230
|
-
clearAsync();
|
|
231
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
232
|
-
// Start spinning after initial delay
|
|
233
|
-
_async.current = window.setTimeout(()=>{
|
|
234
|
-
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
235
|
-
}, initialStepDelay);
|
|
236
|
-
});
|
|
237
|
-
let cancelContextMenu = (e)=>{
|
|
238
|
-
e.preventDefault();
|
|
239
|
-
};
|
|
240
|
-
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $2BLaI$reactariautils.useGlobalListeners)();
|
|
241
|
-
return {
|
|
242
|
-
spinButtonProps: {
|
|
243
|
-
role: "spinbutton",
|
|
244
|
-
"aria-valuenow": value !== undefined && !isNaN(value) ? value : undefined,
|
|
245
|
-
"aria-valuetext": ariaTextValue,
|
|
246
|
-
"aria-valuemin": minValue,
|
|
247
|
-
"aria-valuemax": maxValue,
|
|
248
|
-
"aria-disabled": isDisabled || undefined,
|
|
249
|
-
"aria-readonly": isReadOnly || undefined,
|
|
250
|
-
"aria-required": isRequired || undefined,
|
|
251
|
-
onKeyDown: onKeyDown,
|
|
252
|
-
onFocus: onFocus,
|
|
253
|
-
onBlur: onBlur
|
|
254
|
-
},
|
|
255
|
-
incrementButtonProps: {
|
|
256
|
-
onPressStart: ()=>{
|
|
257
|
-
onIncrementPressStart(400);
|
|
258
|
-
addGlobalListener(window, "contextmenu", cancelContextMenu);
|
|
259
|
-
},
|
|
260
|
-
onPressEnd: ()=>{
|
|
261
|
-
clearAsync();
|
|
262
|
-
removeAllGlobalListeners();
|
|
263
|
-
},
|
|
264
|
-
onFocus: onFocus,
|
|
265
|
-
onBlur: onBlur
|
|
266
|
-
},
|
|
267
|
-
decrementButtonProps: {
|
|
268
|
-
onPressStart: ()=>{
|
|
269
|
-
onDecrementPressStart(400);
|
|
270
|
-
addGlobalListener(window, "contextmenu", cancelContextMenu);
|
|
271
|
-
},
|
|
272
|
-
onPressEnd: ()=>{
|
|
273
|
-
clearAsync();
|
|
274
|
-
removeAllGlobalListeners();
|
|
275
|
-
},
|
|
276
|
-
onFocus: onFocus,
|
|
277
|
-
onBlur: onBlur
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
20
|
|
|
284
21
|
|
|
285
22
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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;YACE,IAAI,AAAC,aAAa,aAAa,MAAM,aAAe,UAAU,aAAa,MAAM,UAAW,QAAQ,UAClG,sBAAsB;QAE1B,GACA;IAEJ;IAGF,IAAI,oBAAoB,CAAC;QACvB,EAAE,cAAc;IAClB;IAEA,IAAI,qBAAC,iBAAiB,4BAAE,wBAAwB,EAAC,GAAG,CAAA,GAAA,wCAAiB;IAErE,OAAO;QACL,iBAAiB;YACf,MAAM;YACN,iBAAiB,UAAU,aAAa,CAAC,MAAM,SAAS,QAAQ;YAChE,kBAAkB;YAClB,iBAAiB;YACjB,iBAAiB;YACjB,iBAAiB,cAAc;YAC/B,iBAAiB,cAAc;YAC/B,iBAAiB,cAAc;uBAC/B;qBACA;oBACA;QACF;QACA,sBAAsB;YACpB,cAAc;gBACZ,sBAAsB;gBACtB,kBAAkB,QAAQ,eAAe;YAC3C;YACA,YAAY;gBACV;gBACA;YACF;qBACA;oBACA;QACF;QACA,sBAAsB;YACpB,cAAc;gBACZ,sBAAsB;gBACtB,kBAAkB,QAAQ,eAAe;YAC3C;YACA,YAAY;gBACV;gBACA;YACF;qBACA;oBACA;QACF;IACF;AACF;;CD5MC","sources":["packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/src/*.js"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport type {SpinButtonProps, SpinbuttonAria} from './useSpinButton';\nexport {useSpinButton} from './useSpinButton';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce, clearAnnouncer} from '@react-aria/live-announcer';\nimport {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes, InputBase, RangeInputBase, Validation, ValueBase} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useEffect, useRef} from 'react';\nimport {useEffectEvent, useGlobalListeners} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface SpinButtonProps extends InputBase, Validation<number>, ValueBase<number>, RangeInputBase<number> {\n textValue?: string,\n onIncrement?: () => void,\n onIncrementPage?: () => void,\n onDecrement?: () => void,\n onDecrementPage?: () => void,\n onDecrementToMin?: () => void,\n onIncrementToMax?: () => void\n}\n\nexport interface SpinbuttonAria {\n spinButtonProps: DOMAttributes,\n incrementButtonProps: AriaButtonProps,\n decrementButtonProps: AriaButtonProps\n}\n\nexport function useSpinButton(\n props: SpinButtonProps\n): SpinbuttonAria {\n const _async = useRef<number>();\n let {\n value,\n textValue,\n minValue,\n maxValue,\n isDisabled,\n isReadOnly,\n isRequired,\n onIncrement,\n onIncrementPage,\n onDecrement,\n onDecrementPage,\n onDecrementToMin,\n onIncrementToMax\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/spinbutton');\n\n const clearAsync = () => clearTimeout(_async.current);\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => clearAsync();\n }, []);\n\n let onKeyDown = (e) => {\n if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) {\n return;\n }\n\n switch (e.key) {\n case 'PageUp':\n if (onIncrementPage) {\n e.preventDefault();\n onIncrementPage?.();\n break;\n }\n // fallthrough!\n case 'ArrowUp':\n case 'Up':\n if (onIncrement) {\n e.preventDefault();\n onIncrement?.();\n }\n break;\n case 'PageDown':\n if (onDecrementPage) {\n e.preventDefault();\n onDecrementPage?.();\n break;\n }\n // fallthrough\n case 'ArrowDown':\n case 'Down':\n if (onDecrement) {\n e.preventDefault();\n onDecrement?.();\n }\n break;\n case 'Home':\n if (onDecrementToMin) {\n e.preventDefault();\n onDecrementToMin?.();\n }\n break;\n case 'End':\n if (onIncrementToMax) {\n e.preventDefault();\n onIncrementToMax?.();\n }\n break;\n }\n };\n\n let isFocused = useRef(false);\n let onFocus = () => {\n isFocused.current = true;\n };\n\n let onBlur = () => {\n isFocused.current = false;\n };\n\n // Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212).\n // This ensures that macOS VoiceOver announces it as \"minus\" even with other characters between the minus sign\n // and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.\n // In addition, replace the empty string with the word \"Empty\" so that iOS VoiceOver does not read \"50%\" for an empty field.\n let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\\u2212');\n\n useEffect(() => {\n if (isFocused.current) {\n clearAnnouncer('assertive');\n announce(ariaTextValue, 'assertive');\n }\n }, [ariaTextValue]);\n\n const onIncrementPressStart = useEffectEvent(\n (initialStepDelay: number) => {\n clearAsync();\n onIncrement?.();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if ((maxValue === undefined || isNaN(maxValue)) || (value === undefined || isNaN(value)) || value < maxValue) {\n onIncrementPressStart(60);\n }\n },\n initialStepDelay\n );\n }\n );\n\n const onDecrementPressStart = useEffectEvent(\n (initialStepDelay: number) => {\n clearAsync();\n onDecrement?.();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if ((minValue === undefined || isNaN(minValue)) || (value === undefined || isNaN(value)) || value > minValue) {\n onDecrementPressStart(60);\n }\n },\n initialStepDelay\n );\n }\n );\n\n let cancelContextMenu = (e) => {\n e.preventDefault();\n };\n\n let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n return {\n spinButtonProps: {\n role: 'spinbutton',\n 'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,\n 'aria-valuetext': ariaTextValue,\n 'aria-valuemin': minValue,\n 'aria-valuemax': maxValue,\n 'aria-disabled': isDisabled || undefined,\n 'aria-readonly': isReadOnly || undefined,\n 'aria-required': isRequired || undefined,\n onKeyDown,\n onFocus,\n onBlur\n },\n incrementButtonProps: {\n onPressStart: () => {\n onIncrementPressStart(400);\n addGlobalListener(window, 'contextmenu', cancelContextMenu);\n },\n onPressEnd: () => {\n clearAsync();\n removeAllGlobalListeners();\n },\n onFocus,\n onBlur\n },\n decrementButtonProps: {\n onPressStart: () => {\n onDecrementPressStart(400);\n addGlobalListener(window, 'contextmenu', cancelContextMenu);\n },\n onPressEnd: () => {\n clearAsync();\n removeAllGlobalListeners();\n },\n onFocus,\n onBlur\n }\n };\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/spinbutton/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport type {SpinButtonProps, SpinbuttonAria} from './useSpinButton';\nexport {useSpinButton} from './useSpinButton';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,57 +1,6 @@
|
|
|
1
|
-
import $
|
|
2
|
-
import $38854e2b175151fa$exports from "./bg-BG.module.js";
|
|
3
|
-
import $15b25ab20f3945b2$exports from "./cs-CZ.module.js";
|
|
4
|
-
import $692a4298b6b649a2$exports from "./da-DK.module.js";
|
|
5
|
-
import $1c6e1539193f1243$exports from "./de-DE.module.js";
|
|
6
|
-
import $1e8678632c464b6d$exports from "./el-GR.module.js";
|
|
7
|
-
import $4adc85d9bf5b9eed$exports from "./en-US.module.js";
|
|
8
|
-
import $41c4b2bb61dafbca$exports from "./es-ES.module.js";
|
|
9
|
-
import $405f8b24f5dd2a60$exports from "./et-EE.module.js";
|
|
10
|
-
import $7efe3ed02b9b9dd4$exports from "./fi-FI.module.js";
|
|
11
|
-
import $99fc4c101d92daf3$exports from "./fr-FR.module.js";
|
|
12
|
-
import $f9e155e6e8cacaa2$exports from "./he-IL.module.js";
|
|
13
|
-
import $c31b5e8e9a249fd5$exports from "./hr-HR.module.js";
|
|
14
|
-
import $9c5435bc17499bd9$exports from "./hu-HU.module.js";
|
|
15
|
-
import $6d1fc8e84d8165e1$exports from "./it-IT.module.js";
|
|
16
|
-
import $46ea6b3641b83e71$exports from "./ja-JP.module.js";
|
|
17
|
-
import $0e3cc9a288289dc5$exports from "./ko-KR.module.js";
|
|
18
|
-
import $4ff2bb25c0089ffb$exports from "./lt-LT.module.js";
|
|
19
|
-
import $6cf33cd4c010a2fb$exports from "./lv-LV.module.js";
|
|
20
|
-
import $5a9f8486f8b8837e$exports from "./nb-NO.module.js";
|
|
21
|
-
import $583f94d807f6ecea$exports from "./nl-NL.module.js";
|
|
22
|
-
import $cc4dcfeea2b4050d$exports from "./pl-PL.module.js";
|
|
23
|
-
import $68ac2954d56e12b4$exports from "./pt-BR.module.js";
|
|
24
|
-
import $fdb0616f309780b0$exports from "./pt-PT.module.js";
|
|
25
|
-
import $fe1eccf4ee1d6f52$exports from "./ro-RO.module.js";
|
|
26
|
-
import $a38b6c4e18725976$exports from "./ru-RU.module.js";
|
|
27
|
-
import $6c14ae2b766b652c$exports from "./sk-SK.module.js";
|
|
28
|
-
import $8f1c9692e16dc5eb$exports from "./sl-SI.module.js";
|
|
29
|
-
import $d2aa7abea627cafa$exports from "./sr-SP.module.js";
|
|
30
|
-
import $676b82e4b56408e6$exports from "./sv-SE.module.js";
|
|
31
|
-
import $14c9042552d7ce08$exports from "./tr-TR.module.js";
|
|
32
|
-
import $393254ebcb66c9f5$exports from "./uk-UA.module.js";
|
|
33
|
-
import $d49d621f310cf6ce$exports from "./zh-CN.module.js";
|
|
34
|
-
import $94b60c866ca5dfe6$exports from "./zh-TW.module.js";
|
|
35
|
-
import {clearAnnouncer as $glIEW$clearAnnouncer, announce as $glIEW$announce} from "@react-aria/live-announcer";
|
|
36
|
-
import {useRef as $glIEW$useRef, useEffect as $glIEW$useEffect} from "react";
|
|
37
|
-
import {useEffectEvent as $glIEW$useEffectEvent, useGlobalListeners as $glIEW$useGlobalListeners} from "@react-aria/utils";
|
|
38
|
-
import {useLocalizedStringFormatter as $glIEW$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
1
|
+
import {useSpinButton as $d2e8511e6f209edf$export$e908e06f4b8e3402} from "./useSpinButton.module.js";
|
|
39
2
|
|
|
40
|
-
|
|
41
|
-
function $parcel$interopDefault(a) {
|
|
42
|
-
return a && a.__esModule ? a.default : a;
|
|
43
|
-
}
|
|
44
3
|
/*
|
|
45
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
46
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
47
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
48
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
-
*
|
|
50
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
51
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
52
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
53
|
-
* governing permissions and limitations under the License.
|
|
54
|
-
*/ /*
|
|
55
4
|
* Copyright 2020 Adobe. All rights reserved.
|
|
56
5
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
57
6
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -62,218 +11,6 @@ function $parcel$interopDefault(a) {
|
|
|
62
11
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
63
12
|
* governing permissions and limitations under the License.
|
|
64
13
|
*/
|
|
65
|
-
var $a99895ee3dc79e61$exports = {};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
$a99895ee3dc79e61$exports = {
|
|
101
|
-
"ar-AE": $ed6aae4e5f766f1e$exports,
|
|
102
|
-
"bg-BG": $38854e2b175151fa$exports,
|
|
103
|
-
"cs-CZ": $15b25ab20f3945b2$exports,
|
|
104
|
-
"da-DK": $692a4298b6b649a2$exports,
|
|
105
|
-
"de-DE": $1c6e1539193f1243$exports,
|
|
106
|
-
"el-GR": $1e8678632c464b6d$exports,
|
|
107
|
-
"en-US": $4adc85d9bf5b9eed$exports,
|
|
108
|
-
"es-ES": $41c4b2bb61dafbca$exports,
|
|
109
|
-
"et-EE": $405f8b24f5dd2a60$exports,
|
|
110
|
-
"fi-FI": $7efe3ed02b9b9dd4$exports,
|
|
111
|
-
"fr-FR": $99fc4c101d92daf3$exports,
|
|
112
|
-
"he-IL": $f9e155e6e8cacaa2$exports,
|
|
113
|
-
"hr-HR": $c31b5e8e9a249fd5$exports,
|
|
114
|
-
"hu-HU": $9c5435bc17499bd9$exports,
|
|
115
|
-
"it-IT": $6d1fc8e84d8165e1$exports,
|
|
116
|
-
"ja-JP": $46ea6b3641b83e71$exports,
|
|
117
|
-
"ko-KR": $0e3cc9a288289dc5$exports,
|
|
118
|
-
"lt-LT": $4ff2bb25c0089ffb$exports,
|
|
119
|
-
"lv-LV": $6cf33cd4c010a2fb$exports,
|
|
120
|
-
"nb-NO": $5a9f8486f8b8837e$exports,
|
|
121
|
-
"nl-NL": $583f94d807f6ecea$exports,
|
|
122
|
-
"pl-PL": $cc4dcfeea2b4050d$exports,
|
|
123
|
-
"pt-BR": $68ac2954d56e12b4$exports,
|
|
124
|
-
"pt-PT": $fdb0616f309780b0$exports,
|
|
125
|
-
"ro-RO": $fe1eccf4ee1d6f52$exports,
|
|
126
|
-
"ru-RU": $a38b6c4e18725976$exports,
|
|
127
|
-
"sk-SK": $6c14ae2b766b652c$exports,
|
|
128
|
-
"sl-SI": $8f1c9692e16dc5eb$exports,
|
|
129
|
-
"sr-SP": $d2aa7abea627cafa$exports,
|
|
130
|
-
"sv-SE": $676b82e4b56408e6$exports,
|
|
131
|
-
"tr-TR": $14c9042552d7ce08$exports,
|
|
132
|
-
"uk-UA": $393254ebcb66c9f5$exports,
|
|
133
|
-
"zh-CN": $d49d621f310cf6ce$exports,
|
|
134
|
-
"zh-TW": $94b60c866ca5dfe6$exports
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
142
|
-
const _async = (0, $glIEW$useRef)();
|
|
143
|
-
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;
|
|
144
|
-
const stringFormatter = (0, $glIEW$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($a99895ee3dc79e61$exports))), "@react-aria/spinbutton");
|
|
145
|
-
const clearAsync = ()=>clearTimeout(_async.current);
|
|
146
|
-
// eslint-disable-next-line arrow-body-style
|
|
147
|
-
(0, $glIEW$useEffect)(()=>{
|
|
148
|
-
return ()=>clearAsync();
|
|
149
|
-
}, []);
|
|
150
|
-
let onKeyDown = (e)=>{
|
|
151
|
-
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) return;
|
|
152
|
-
switch(e.key){
|
|
153
|
-
case "PageUp":
|
|
154
|
-
if (onIncrementPage) {
|
|
155
|
-
e.preventDefault();
|
|
156
|
-
onIncrementPage === null || onIncrementPage === void 0 ? void 0 : onIncrementPage();
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
// fallthrough!
|
|
160
|
-
case "ArrowUp":
|
|
161
|
-
case "Up":
|
|
162
|
-
if (onIncrement) {
|
|
163
|
-
e.preventDefault();
|
|
164
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
165
|
-
}
|
|
166
|
-
break;
|
|
167
|
-
case "PageDown":
|
|
168
|
-
if (onDecrementPage) {
|
|
169
|
-
e.preventDefault();
|
|
170
|
-
onDecrementPage === null || onDecrementPage === void 0 ? void 0 : onDecrementPage();
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
// fallthrough
|
|
174
|
-
case "ArrowDown":
|
|
175
|
-
case "Down":
|
|
176
|
-
if (onDecrement) {
|
|
177
|
-
e.preventDefault();
|
|
178
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
179
|
-
}
|
|
180
|
-
break;
|
|
181
|
-
case "Home":
|
|
182
|
-
if (onDecrementToMin) {
|
|
183
|
-
e.preventDefault();
|
|
184
|
-
onDecrementToMin === null || onDecrementToMin === void 0 ? void 0 : onDecrementToMin();
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
case "End":
|
|
188
|
-
if (onIncrementToMax) {
|
|
189
|
-
e.preventDefault();
|
|
190
|
-
onIncrementToMax === null || onIncrementToMax === void 0 ? void 0 : onIncrementToMax();
|
|
191
|
-
}
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
let isFocused = (0, $glIEW$useRef)(false);
|
|
196
|
-
let onFocus = ()=>{
|
|
197
|
-
isFocused.current = true;
|
|
198
|
-
};
|
|
199
|
-
let onBlur = ()=>{
|
|
200
|
-
isFocused.current = false;
|
|
201
|
-
};
|
|
202
|
-
// Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212).
|
|
203
|
-
// This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
|
|
204
|
-
// and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
|
|
205
|
-
// In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
|
|
206
|
-
let ariaTextValue = textValue === "" ? stringFormatter.format("Empty") : (textValue || `${value}`).replace("-", "\u2212");
|
|
207
|
-
(0, $glIEW$useEffect)(()=>{
|
|
208
|
-
if (isFocused.current) {
|
|
209
|
-
(0, $glIEW$clearAnnouncer)("assertive");
|
|
210
|
-
(0, $glIEW$announce)(ariaTextValue, "assertive");
|
|
211
|
-
}
|
|
212
|
-
}, [
|
|
213
|
-
ariaTextValue
|
|
214
|
-
]);
|
|
215
|
-
const onIncrementPressStart = (0, $glIEW$useEffectEvent)((initialStepDelay)=>{
|
|
216
|
-
clearAsync();
|
|
217
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
218
|
-
// Start spinning after initial delay
|
|
219
|
-
_async.current = window.setTimeout(()=>{
|
|
220
|
-
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) onIncrementPressStart(60);
|
|
221
|
-
}, initialStepDelay);
|
|
222
|
-
});
|
|
223
|
-
const onDecrementPressStart = (0, $glIEW$useEffectEvent)((initialStepDelay)=>{
|
|
224
|
-
clearAsync();
|
|
225
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
226
|
-
// Start spinning after initial delay
|
|
227
|
-
_async.current = window.setTimeout(()=>{
|
|
228
|
-
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
229
|
-
}, initialStepDelay);
|
|
230
|
-
});
|
|
231
|
-
let cancelContextMenu = (e)=>{
|
|
232
|
-
e.preventDefault();
|
|
233
|
-
};
|
|
234
|
-
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $glIEW$useGlobalListeners)();
|
|
235
|
-
return {
|
|
236
|
-
spinButtonProps: {
|
|
237
|
-
role: "spinbutton",
|
|
238
|
-
"aria-valuenow": value !== undefined && !isNaN(value) ? value : undefined,
|
|
239
|
-
"aria-valuetext": ariaTextValue,
|
|
240
|
-
"aria-valuemin": minValue,
|
|
241
|
-
"aria-valuemax": maxValue,
|
|
242
|
-
"aria-disabled": isDisabled || undefined,
|
|
243
|
-
"aria-readonly": isReadOnly || undefined,
|
|
244
|
-
"aria-required": isRequired || undefined,
|
|
245
|
-
onKeyDown: onKeyDown,
|
|
246
|
-
onFocus: onFocus,
|
|
247
|
-
onBlur: onBlur
|
|
248
|
-
},
|
|
249
|
-
incrementButtonProps: {
|
|
250
|
-
onPressStart: ()=>{
|
|
251
|
-
onIncrementPressStart(400);
|
|
252
|
-
addGlobalListener(window, "contextmenu", cancelContextMenu);
|
|
253
|
-
},
|
|
254
|
-
onPressEnd: ()=>{
|
|
255
|
-
clearAsync();
|
|
256
|
-
removeAllGlobalListeners();
|
|
257
|
-
},
|
|
258
|
-
onFocus: onFocus,
|
|
259
|
-
onBlur: onBlur
|
|
260
|
-
},
|
|
261
|
-
decrementButtonProps: {
|
|
262
|
-
onPressStart: ()=>{
|
|
263
|
-
onDecrementPressStart(400);
|
|
264
|
-
addGlobalListener(window, "contextmenu", cancelContextMenu);
|
|
265
|
-
},
|
|
266
|
-
onPressEnd: ()=>{
|
|
267
|
-
clearAsync();
|
|
268
|
-
removeAllGlobalListeners();
|
|
269
|
-
},
|
|
270
|
-
onFocus: onFocus,
|
|
271
|
-
onBlur: onBlur
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
|
|
277
14
|
|
|
278
15
|
|
|
279
16
|
export {$d2e8511e6f209edf$export$e908e06f4b8e3402 as useSpinButton};
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBD,4BAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAA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ACf,MAAM;YACN,iBAAiB,UAAU,aAAa,CAAC,MAAM,SAAS,QAAQ;YAChE,kBAAkB;YAClB,iBAAiB;YACjB,iBAAiB;YACjB,iBAAiB,cAAc;YAC/B,iBAAiB,cAAc;YAC/B,iBAAiB,cAAc;uBAC/B;qBACA;oBACA;QACF;QACA,sBAAsB;YACpB,cAAc;gBACZ,sBAAsB;gBACtB,kBAAkB,QAAQ,eAAe;YAC3C;YACA,YAAY;gBACV;gBACA;YACF;qBACA;oBACA;QACF;QACA,sBAAsB;YACpB,cAAc;gBACZ,sBAAsB;gBACtB,kBAAkB,QAAQ,eAAe;YAC3C;YACA,YAAY;gBACV;gBACA;YACF;qBACA;oBACA;QACF;IACF;AACF;;CD5MC","sources":["packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/src/*.js"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport type {SpinButtonProps, SpinbuttonAria} from './useSpinButton';\nexport {useSpinButton} from './useSpinButton';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce, clearAnnouncer} from '@react-aria/live-announcer';\nimport {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes, InputBase, RangeInputBase, Validation, ValueBase} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useEffect, useRef} from 'react';\nimport {useEffectEvent, useGlobalListeners} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface SpinButtonProps extends InputBase, Validation<number>, ValueBase<number>, RangeInputBase<number> {\n textValue?: string,\n onIncrement?: () => void,\n onIncrementPage?: () => void,\n onDecrement?: () => void,\n onDecrementPage?: () => void,\n onDecrementToMin?: () => void,\n onIncrementToMax?: () => void\n}\n\nexport interface SpinbuttonAria {\n spinButtonProps: DOMAttributes,\n incrementButtonProps: AriaButtonProps,\n decrementButtonProps: AriaButtonProps\n}\n\nexport function useSpinButton(\n props: SpinButtonProps\n): SpinbuttonAria {\n const _async = useRef<number>();\n let {\n value,\n textValue,\n minValue,\n maxValue,\n isDisabled,\n isReadOnly,\n isRequired,\n onIncrement,\n onIncrementPage,\n onDecrement,\n onDecrementPage,\n onDecrementToMin,\n onIncrementToMax\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/spinbutton');\n\n const clearAsync = () => clearTimeout(_async.current);\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => clearAsync();\n }, []);\n\n let onKeyDown = (e) => {\n if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly) {\n return;\n }\n\n switch (e.key) {\n case 'PageUp':\n if (onIncrementPage) {\n e.preventDefault();\n onIncrementPage?.();\n break;\n }\n // fallthrough!\n case 'ArrowUp':\n case 'Up':\n if (onIncrement) {\n e.preventDefault();\n onIncrement?.();\n }\n break;\n case 'PageDown':\n if (onDecrementPage) {\n e.preventDefault();\n onDecrementPage?.();\n break;\n }\n // fallthrough\n case 'ArrowDown':\n case 'Down':\n if (onDecrement) {\n e.preventDefault();\n onDecrement?.();\n }\n break;\n case 'Home':\n if (onDecrementToMin) {\n e.preventDefault();\n onDecrementToMin?.();\n }\n break;\n case 'End':\n if (onIncrementToMax) {\n e.preventDefault();\n onIncrementToMax?.();\n }\n break;\n }\n };\n\n let isFocused = useRef(false);\n let onFocus = () => {\n isFocused.current = true;\n };\n\n let onBlur = () => {\n isFocused.current = false;\n };\n\n // Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212).\n // This ensures that macOS VoiceOver announces it as \"minus\" even with other characters between the minus sign\n // and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.\n // In addition, replace the empty string with the word \"Empty\" so that iOS VoiceOver does not read \"50%\" for an empty field.\n let ariaTextValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\\u2212');\n\n useEffect(() => {\n if (isFocused.current) {\n clearAnnouncer('assertive');\n announce(ariaTextValue, 'assertive');\n }\n }, [ariaTextValue]);\n\n const onIncrementPressStart = useEffectEvent(\n (initialStepDelay: number) => {\n clearAsync();\n onIncrement?.();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if ((maxValue === undefined || isNaN(maxValue)) || (value === undefined || isNaN(value)) || value < maxValue) {\n onIncrementPressStart(60);\n }\n },\n initialStepDelay\n );\n }\n );\n\n const onDecrementPressStart = useEffectEvent(\n (initialStepDelay: number) => {\n clearAsync();\n onDecrement?.();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if ((minValue === undefined || isNaN(minValue)) || (value === undefined || isNaN(value)) || value > minValue) {\n onDecrementPressStart(60);\n }\n },\n initialStepDelay\n );\n }\n );\n\n let cancelContextMenu = (e) => {\n e.preventDefault();\n };\n\n let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n return {\n spinButtonProps: {\n role: 'spinbutton',\n 'aria-valuenow': value !== undefined && !isNaN(value) ? value : undefined,\n 'aria-valuetext': ariaTextValue,\n 'aria-valuemin': minValue,\n 'aria-valuemax': maxValue,\n 'aria-disabled': isDisabled || undefined,\n 'aria-readonly': isReadOnly || undefined,\n 'aria-required': isRequired || undefined,\n onKeyDown,\n onFocus,\n onBlur\n },\n incrementButtonProps: {\n onPressStart: () => {\n onIncrementPressStart(400);\n addGlobalListener(window, 'contextmenu', cancelContextMenu);\n },\n onPressEnd: () => {\n clearAsync();\n removeAllGlobalListeners();\n },\n onFocus,\n onBlur\n },\n decrementButtonProps: {\n onPressStart: () => {\n onDecrementPressStart(400);\n addGlobalListener(window, 'contextmenu', cancelContextMenu);\n },\n onPressEnd: () => {\n clearAsync();\n removeAllGlobalListeners();\n },\n onFocus,\n onBlur\n }\n };\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/spinbutton/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport type {SpinButtonProps, SpinbuttonAria} from './useSpinButton';\nexport {useSpinButton} from './useSpinButton';\n"],"names":[],"version":3,"file":"module.js.map"}
|