@react-aria/spinbutton 3.1.1 → 3.1.2

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/main.js CHANGED
@@ -3,168 +3,218 @@ var $2BLaI$react = require("react");
3
3
  var $2BLaI$reactariautils = require("@react-aria/utils");
4
4
  var $2BLaI$reactariai18n = require("@react-aria/i18n");
5
5
 
6
- function $parcel$exportWildcard(dest, source) {
7
- Object.keys(source).forEach(function(key) {
8
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
9
- return;
10
- }
11
-
12
- Object.defineProperty(dest, key, {
13
- enumerable: true,
14
- get: function get() {
15
- return source[key];
16
- }
17
- });
18
- });
19
-
20
- return dest;
6
+ function $parcel$export(e, n, v, s) {
7
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
21
8
  }
22
9
  function $parcel$interopDefault(a) {
23
10
  return a && a.__esModule ? a.default : a;
24
11
  }
25
- function $parcel$export(e, n, v, s) {
26
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
27
- }
28
- var $37bbd4c129023f61$exports = {};
29
-
30
- $parcel$export($37bbd4c129023f61$exports, "useSpinButton", () => $37bbd4c129023f61$export$e908e06f4b8e3402);
31
12
 
13
+ $parcel$export(module.exports, "useSpinButton", () => $37bbd4c129023f61$export$e908e06f4b8e3402);
32
14
 
33
15
  var $55fd103defc81437$exports = {};
34
16
  var $db6c23092fbfea22$exports = {};
35
- $db6c23092fbfea22$exports = JSON.parse("{\"Empty\":\"فارغ\"}");
17
+ $db6c23092fbfea22$exports = {
18
+ "Empty": `فارغ`
19
+ };
36
20
 
37
21
 
38
22
  var $f4b3121a918895c4$exports = {};
39
- $f4b3121a918895c4$exports = JSON.parse("{\"Empty\":\"Изпразни\"}");
23
+ $f4b3121a918895c4$exports = {
24
+ "Empty": `Изпразни`
25
+ };
40
26
 
41
27
 
42
28
  var $d01cc02a83842f4c$exports = {};
43
- $d01cc02a83842f4c$exports = JSON.parse("{\"Empty\":\"Prázdné\"}");
29
+ $d01cc02a83842f4c$exports = {
30
+ "Empty": `Prázdné`
31
+ };
44
32
 
45
33
 
46
34
  var $ae20f188998ad249$exports = {};
47
- $ae20f188998ad249$exports = JSON.parse("{\"Empty\":\"Tom\"}");
35
+ $ae20f188998ad249$exports = {
36
+ "Empty": `Tom`
37
+ };
48
38
 
49
39
 
50
40
  var $f17ee93fe12c77e5$exports = {};
51
- $f17ee93fe12c77e5$exports = JSON.parse("{\"Empty\":\"Leer\"}");
41
+ $f17ee93fe12c77e5$exports = {
42
+ "Empty": `Leer`
43
+ };
52
44
 
53
45
 
54
46
  var $9691dc6a69dd5ba9$exports = {};
55
- $9691dc6a69dd5ba9$exports = JSON.parse("{\"Empty\":\"Άδειο\"}");
47
+ $9691dc6a69dd5ba9$exports = {
48
+ "Empty": `Άδειο`
49
+ };
56
50
 
57
51
 
58
52
  var $b2385949437f9917$exports = {};
59
- $b2385949437f9917$exports = JSON.parse("{\"Empty\":\"Empty\"}");
53
+ $b2385949437f9917$exports = {
54
+ "Empty": `Empty`
55
+ };
60
56
 
61
57
 
62
58
  var $ed6d4429037ec60d$exports = {};
63
- $ed6d4429037ec60d$exports = JSON.parse("{\"Empty\":\"Vacío\"}");
59
+ $ed6d4429037ec60d$exports = {
60
+ "Empty": `Vacío`
61
+ };
64
62
 
65
63
 
66
64
  var $c9cb32f5c221f118$exports = {};
67
- $c9cb32f5c221f118$exports = JSON.parse("{\"Empty\":\"Tühjenda\"}");
65
+ $c9cb32f5c221f118$exports = {
66
+ "Empty": `Tühjenda`
67
+ };
68
68
 
69
69
 
70
70
  var $5be8f6c4ad248dda$exports = {};
71
- $5be8f6c4ad248dda$exports = JSON.parse("{\"Empty\":\"Tyhjä\"}");
71
+ $5be8f6c4ad248dda$exports = {
72
+ "Empty": `Tyhjä`
73
+ };
72
74
 
73
75
 
74
76
  var $3f46a428519ddd7e$exports = {};
75
- $3f46a428519ddd7e$exports = JSON.parse("{\"Empty\":\"Vide\"}");
77
+ $3f46a428519ddd7e$exports = {
78
+ "Empty": `Vide`
79
+ };
76
80
 
77
81
 
78
82
  var $41c7f98604688f35$exports = {};
79
- $41c7f98604688f35$exports = JSON.parse("{\"Empty\":\"ריק\"}");
83
+ $41c7f98604688f35$exports = {
84
+ "Empty": `ריק`
85
+ };
80
86
 
81
87
 
82
88
  var $183e97db82c2cbf0$exports = {};
83
- $183e97db82c2cbf0$exports = JSON.parse("{\"Empty\":\"Prazno\"}");
89
+ $183e97db82c2cbf0$exports = {
90
+ "Empty": `Prazno`
91
+ };
84
92
 
85
93
 
86
94
  var $749cae0664a7dc03$exports = {};
87
- $749cae0664a7dc03$exports = JSON.parse("{\"Empty\":\"Üres\"}");
95
+ $749cae0664a7dc03$exports = {
96
+ "Empty": `Üres`
97
+ };
88
98
 
89
99
 
90
100
  var $4129f25b282c341e$exports = {};
91
- $4129f25b282c341e$exports = JSON.parse("{\"Empty\":\"Vuoto\"}");
101
+ $4129f25b282c341e$exports = {
102
+ "Empty": `Vuoto`
103
+ };
92
104
 
93
105
 
94
106
  var $908925465e00dbfc$exports = {};
95
- $908925465e00dbfc$exports = JSON.parse("{\"Empty\":\"空\"}");
107
+ $908925465e00dbfc$exports = {
108
+ "Empty": `空`
109
+ };
96
110
 
97
111
 
98
112
  var $34fae452e2e356d9$exports = {};
99
- $34fae452e2e356d9$exports = JSON.parse("{\"Empty\":\"비어 있음\"}");
113
+ $34fae452e2e356d9$exports = {
114
+ "Empty": `비어 있음`
115
+ };
100
116
 
101
117
 
102
118
  var $458e73ba0e56bdd4$exports = {};
103
- $458e73ba0e56bdd4$exports = JSON.parse("{\"Empty\":\"Tuščias\"}");
119
+ $458e73ba0e56bdd4$exports = {
120
+ "Empty": `Tuščias`
121
+ };
104
122
 
105
123
 
106
124
  var $2ddf9ecf84010f95$exports = {};
107
- $2ddf9ecf84010f95$exports = JSON.parse("{\"Empty\":\"Tukšs\"}");
125
+ $2ddf9ecf84010f95$exports = {
126
+ "Empty": `Tukšs`
127
+ };
108
128
 
109
129
 
110
130
  var $b787a09821b773ea$exports = {};
111
- $b787a09821b773ea$exports = JSON.parse("{\"Empty\":\"Tom\"}");
131
+ $b787a09821b773ea$exports = {
132
+ "Empty": `Tom`
133
+ };
112
134
 
113
135
 
114
136
  var $6b951cc1b0de6d71$exports = {};
115
- $6b951cc1b0de6d71$exports = JSON.parse("{\"Empty\":\"Leeg\"}");
137
+ $6b951cc1b0de6d71$exports = {
138
+ "Empty": `Leeg`
139
+ };
116
140
 
117
141
 
118
142
  var $fc3eb600d1c488fa$exports = {};
119
- $fc3eb600d1c488fa$exports = JSON.parse("{\"Empty\":\"Pusty\"}");
143
+ $fc3eb600d1c488fa$exports = {
144
+ "Empty": `Pusty`
145
+ };
120
146
 
121
147
 
122
148
  var $ba0f4e25830e4bbf$exports = {};
123
- $ba0f4e25830e4bbf$exports = JSON.parse("{\"Empty\":\"Vazio\"}");
149
+ $ba0f4e25830e4bbf$exports = {
150
+ "Empty": `Vazio`
151
+ };
124
152
 
125
153
 
126
154
  var $2cd34c446640bd1d$exports = {};
127
- $2cd34c446640bd1d$exports = JSON.parse("{\"Empty\":\"Vazio\"}");
155
+ $2cd34c446640bd1d$exports = {
156
+ "Empty": `Vazio`
157
+ };
128
158
 
129
159
 
130
160
  var $55c7bf6cdae0bed5$exports = {};
131
- $55c7bf6cdae0bed5$exports = JSON.parse("{\"Empty\":\"Gol\"}");
161
+ $55c7bf6cdae0bed5$exports = {
162
+ "Empty": `Gol`
163
+ };
132
164
 
133
165
 
134
166
  var $240e8ca0b043d76a$exports = {};
135
- $240e8ca0b043d76a$exports = JSON.parse("{\"Empty\":\"Не заполнено\"}");
167
+ $240e8ca0b043d76a$exports = {
168
+ "Empty": `Не заполнено`
169
+ };
136
170
 
137
171
 
138
172
  var $c28c7ecdb94a1868$exports = {};
139
- $c28c7ecdb94a1868$exports = JSON.parse("{\"Empty\":\"Prázdne\"}");
173
+ $c28c7ecdb94a1868$exports = {
174
+ "Empty": `Prázdne`
175
+ };
140
176
 
141
177
 
142
178
  var $c2d6776ba29b6517$exports = {};
143
- $c2d6776ba29b6517$exports = JSON.parse("{\"Empty\":\"Prazen\"}");
179
+ $c2d6776ba29b6517$exports = {
180
+ "Empty": `Prazen`
181
+ };
144
182
 
145
183
 
146
184
  var $628464d96d5a7855$exports = {};
147
- $628464d96d5a7855$exports = JSON.parse("{\"Empty\":\"Prazno\"}");
185
+ $628464d96d5a7855$exports = {
186
+ "Empty": `Prazno`
187
+ };
148
188
 
149
189
 
150
190
  var $5a1bcd0a675a6f60$exports = {};
151
- $5a1bcd0a675a6f60$exports = JSON.parse("{\"Empty\":\"Tomt\"}");
191
+ $5a1bcd0a675a6f60$exports = {
192
+ "Empty": `Tomt`
193
+ };
152
194
 
153
195
 
154
196
  var $f71e9bc82e4a5a16$exports = {};
155
- $f71e9bc82e4a5a16$exports = JSON.parse("{\"Empty\":\"Boş\"}");
197
+ $f71e9bc82e4a5a16$exports = {
198
+ "Empty": `Boş`
199
+ };
156
200
 
157
201
 
158
202
  var $cb1ece2578f5693e$exports = {};
159
- $cb1ece2578f5693e$exports = JSON.parse("{\"Empty\":\"Пусто\"}");
203
+ $cb1ece2578f5693e$exports = {
204
+ "Empty": `Пусто`
205
+ };
160
206
 
161
207
 
162
208
  var $d8ce7cc5e4398a80$exports = {};
163
- $d8ce7cc5e4398a80$exports = JSON.parse("{\"Empty\":\"空\"}");
209
+ $d8ce7cc5e4398a80$exports = {
210
+ "Empty": `空`
211
+ };
164
212
 
165
213
 
166
214
  var $8db5191ec1aacb53$exports = {};
167
- $8db5191ec1aacb53$exports = JSON.parse("{\"Empty\":\"空白\"}");
215
+ $8db5191ec1aacb53$exports = {
216
+ "Empty": `空白`
217
+ };
168
218
 
169
219
 
170
220
  $55fd103defc81437$exports = {
@@ -207,10 +257,11 @@ $55fd103defc81437$exports = {
207
257
 
208
258
 
209
259
 
260
+
210
261
  function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
211
262
  const _async = $2BLaI$react.useRef();
212
263
  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;
213
- const formatMessage = $2BLaI$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($55fd103defc81437$exports)));
264
+ const stringFormatter = $2BLaI$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($55fd103defc81437$exports)));
214
265
  const propsRef = $2BLaI$react.useRef(props);
215
266
  propsRef.current = props;
216
267
  const clearAsync = ()=>clearTimeout(_async.current)
@@ -276,7 +327,7 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
276
327
  // This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
277
328
  // and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
278
329
  // In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
279
- textValue = textValue === '' ? formatMessage('Empty') : (textValue || `${value}`).replace('-', '\u2212');
330
+ textValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
280
331
  $2BLaI$react.useEffect(()=>{
281
332
  if (isFocused.current) $2BLaI$reactarialiveannouncer.announce(textValue, 'assertive');
282
333
  }, [
@@ -352,7 +403,6 @@ function $37bbd4c129023f61$export$e908e06f4b8e3402(props) {
352
403
  }
353
404
 
354
405
 
355
- $parcel$exportWildcard(module.exports, $37bbd4c129023f61$exports);
356
406
 
357
407
 
358
408
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAs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,gBAAE,QAAQ;YACzB,CAAe,gBAAE,QAAQ;YACzB,CAAe,gBAAE,UAAU,IAAI,IAAI;YACnC,CAAe,gBAAE,UAAU,IAAI,IAAI;YACnC,CAAe,gBAAE,UAAU,IAAI,IAAI;uBACnC,SAAS;qBACT,OAAO;oBACP,MAAM;QACR,CAAC;QACD,oBAAoB,EAAE,CAAC;YACrB,YAAY,MAAQ,CAAC;gBACnB,qBAAqB,CAAC,GAAG;gBACzB,iBAAiB,CAAC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;QACD,oBAAoB,EAAE,CAAC;YACrB,YAAY,MAAQ,CAAC;gBACnB,qBAAqB,CAAC,GAAG;gBACzB,iBAAiB,CAAC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/intl/*.js","packages/@react-aria/spinbutton/intl/ar-AE.json","packages/@react-aria/spinbutton/intl/bg-BG.json","packages/@react-aria/spinbutton/intl/cs-CZ.json","packages/@react-aria/spinbutton/intl/da-DK.json","packages/@react-aria/spinbutton/intl/de-DE.json","packages/@react-aria/spinbutton/intl/el-GR.json","packages/@react-aria/spinbutton/intl/en-US.json","packages/@react-aria/spinbutton/intl/es-ES.json","packages/@react-aria/spinbutton/intl/et-EE.json","packages/@react-aria/spinbutton/intl/fi-FI.json","packages/@react-aria/spinbutton/intl/fr-FR.json","packages/@react-aria/spinbutton/intl/he-IL.json","packages/@react-aria/spinbutton/intl/hr-HR.json","packages/@react-aria/spinbutton/intl/hu-HU.json","packages/@react-aria/spinbutton/intl/it-IT.json","packages/@react-aria/spinbutton/intl/ja-JP.json","packages/@react-aria/spinbutton/intl/ko-KR.json","packages/@react-aria/spinbutton/intl/lt-LT.json","packages/@react-aria/spinbutton/intl/lv-LV.json","packages/@react-aria/spinbutton/intl/nb-NO.json","packages/@react-aria/spinbutton/intl/nl-NL.json","packages/@react-aria/spinbutton/intl/pl-PL.json","packages/@react-aria/spinbutton/intl/pt-BR.json","packages/@react-aria/spinbutton/intl/pt-PT.json","packages/@react-aria/spinbutton/intl/ro-RO.json","packages/@react-aria/spinbutton/intl/ru-RU.json","packages/@react-aria/spinbutton/intl/sk-SK.json","packages/@react-aria/spinbutton/intl/sl-SI.json","packages/@react-aria/spinbutton/intl/sr-SP.json","packages/@react-aria/spinbutton/intl/sv-SE.json","packages/@react-aria/spinbutton/intl/tr-TR.json","packages/@react-aria/spinbutton/intl/uk-UA.json","packages/@react-aria/spinbutton/intl/zh-CN.json","packages/@react-aria/spinbutton/intl/zh-TW.json"],"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 */\n\nexport * 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} from '@react-aria/live-announcer';\nimport {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, useCallback, useEffect, useRef} from 'react';\nimport {InputBase, RangeInputBase, Validation, ValueBase} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useGlobalListeners} from '@react-aria/utils';\nimport {useMessageFormatter} from '@react-aria/i18n';\n\n\nexport interface SpinButtonProps extends InputBase, Validation, 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: HTMLAttributes<HTMLDivElement>,\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 formatMessage = useMessageFormatter(intlMessages);\n const propsRef = useRef(props);\n propsRef.current = props;\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 textValue = textValue === '' ? formatMessage('Empty') : (textValue || `${value}`).replace('-', '\\u2212');\n\n useEffect(() => {\n if (isFocused.current) {\n announce(textValue, 'assertive');\n }\n }, [textValue]);\n\n const onIncrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onIncrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(maxValue) || isNaN(value) || value < maxValue) {\n onIncrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onIncrement, maxValue, value]\n );\n\n const onDecrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onDecrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(minValue) || isNaN(value) || value > minValue) {\n onDecrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onDecrement, minValue, value]\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': !isNaN(value) ? value : null,\n 'aria-valuetext': textValue,\n 'aria-valuemin': minValue,\n 'aria-valuemax': maxValue,\n 'aria-disabled': isDisabled || null,\n 'aria-readonly': isReadOnly || null,\n 'aria-required': isRequired || null,\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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}","{\n \"Empty\": \"فارغ\"\n}\n","{\n \"Empty\": \"Изпразни\"\n}\n","{\n \"Empty\": \"Prázdné\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leer\"\n}\n","{\n \"Empty\": \"Άδειο\"\n}\n","{\n \"Empty\": \"Empty\"\n}\n","{\n \"Empty\": \"Vacío\"\n}\n","{\n \"Empty\": \"Tühjenda\"\n}\n","{\n \"Empty\": \"Tyhjä\"\n}\n","{\n \"Empty\": \"Vide\"\n}\n","{\n \"Empty\": \"ריק\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Üres\"\n}\n","{\n \"Empty\": \"Vuoto\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"비어 있음\"\n}\n","{\n \"Empty\": \"Tuščias\"\n}\n","{\n \"Empty\": \"Tukšs\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leeg\"\n}\n","{\n \"Empty\": \"Pusty\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Gol\"\n}\n","{\n \"Empty\": \"Не заполнено\"\n}\n","{\n \"Empty\": \"Prázdne\"\n}\n","{\n \"Empty\": \"Prazen\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Tomt\"\n}\n","{\n \"Empty\": \"Boş\"\n}\n","{\n \"Empty\": \"Пусто\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"空白\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AGAA,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,QAAI;AAClC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,gBAAQ;AACtC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,SAAO;AACrC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,GAAG;AACjC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,IAAI;AAClC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,UAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,KAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,MAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,SAAQ;AACtC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,MAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,IAAI;A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AC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;QACD,oBAAoB,EAAE,CAAC;YACrB,YAAY,MAAQ,CAAC;gBACnB,qBAAqB,CAAC,GAAG;gBACzB,iBAAiB,CAAC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/intl/*.js","packages/@react-aria/spinbutton/intl/ar-AE.json","packages/@react-aria/spinbutton/intl/bg-BG.json","packages/@react-aria/spinbutton/intl/cs-CZ.json","packages/@react-aria/spinbutton/intl/da-DK.json","packages/@react-aria/spinbutton/intl/de-DE.json","packages/@react-aria/spinbutton/intl/el-GR.json","packages/@react-aria/spinbutton/intl/en-US.json","packages/@react-aria/spinbutton/intl/es-ES.json","packages/@react-aria/spinbutton/intl/et-EE.json","packages/@react-aria/spinbutton/intl/fi-FI.json","packages/@react-aria/spinbutton/intl/fr-FR.json","packages/@react-aria/spinbutton/intl/he-IL.json","packages/@react-aria/spinbutton/intl/hr-HR.json","packages/@react-aria/spinbutton/intl/hu-HU.json","packages/@react-aria/spinbutton/intl/it-IT.json","packages/@react-aria/spinbutton/intl/ja-JP.json","packages/@react-aria/spinbutton/intl/ko-KR.json","packages/@react-aria/spinbutton/intl/lt-LT.json","packages/@react-aria/spinbutton/intl/lv-LV.json","packages/@react-aria/spinbutton/intl/nb-NO.json","packages/@react-aria/spinbutton/intl/nl-NL.json","packages/@react-aria/spinbutton/intl/pl-PL.json","packages/@react-aria/spinbutton/intl/pt-BR.json","packages/@react-aria/spinbutton/intl/pt-PT.json","packages/@react-aria/spinbutton/intl/ro-RO.json","packages/@react-aria/spinbutton/intl/ru-RU.json","packages/@react-aria/spinbutton/intl/sk-SK.json","packages/@react-aria/spinbutton/intl/sl-SI.json","packages/@react-aria/spinbutton/intl/sr-SP.json","packages/@react-aria/spinbutton/intl/sv-SE.json","packages/@react-aria/spinbutton/intl/tr-TR.json","packages/@react-aria/spinbutton/intl/uk-UA.json","packages/@react-aria/spinbutton/intl/zh-CN.json","packages/@react-aria/spinbutton/intl/zh-TW.json"],"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} 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 {useCallback, useEffect, useRef} from 'react';\nimport {useGlobalListeners} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface SpinButtonProps extends InputBase, Validation, 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);\n const propsRef = useRef(props);\n propsRef.current = props;\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 textValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\\u2212');\n\n useEffect(() => {\n if (isFocused.current) {\n announce(textValue, 'assertive');\n }\n }, [textValue]);\n\n const onIncrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onIncrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(maxValue) || isNaN(value) || value < maxValue) {\n onIncrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onIncrement, maxValue, value]\n );\n\n const onDecrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onDecrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(minValue) || isNaN(value) || value > minValue) {\n onDecrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onDecrement, minValue, value]\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': !isNaN(value) ? value : null,\n 'aria-valuetext': textValue,\n 'aria-valuemin': minValue,\n 'aria-valuemax': maxValue,\n 'aria-disabled': isDisabled || null,\n 'aria-readonly': isReadOnly || null,\n 'aria-required': isRequired || null,\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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}","{\n \"Empty\": \"فارغ\"\n}\n","{\n \"Empty\": \"Изпразни\"\n}\n","{\n \"Empty\": \"Prázdné\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leer\"\n}\n","{\n \"Empty\": \"Άδειο\"\n}\n","{\n \"Empty\": \"Empty\"\n}\n","{\n \"Empty\": \"Vacío\"\n}\n","{\n \"Empty\": \"Tühjenda\"\n}\n","{\n \"Empty\": \"Tyhjä\"\n}\n","{\n \"Empty\": \"Vide\"\n}\n","{\n \"Empty\": \"ריק\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Üres\"\n}\n","{\n \"Empty\": \"Vuoto\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"비어 있음\"\n}\n","{\n \"Empty\": \"Tuščias\"\n}\n","{\n \"Empty\": \"Tukšs\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leeg\"\n}\n","{\n \"Empty\": \"Pusty\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Gol\"\n}\n","{\n \"Empty\": \"Не заполнено\"\n}\n","{\n \"Empty\": \"Prázdne\"\n}\n","{\n \"Empty\": \"Prazen\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Tomt\"\n}\n","{\n \"Empty\": \"Boş\"\n}\n","{\n \"Empty\": \"Пусто\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"空白\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,154 +1,215 @@
1
1
  import {announce as $glIEW$announce} from "@react-aria/live-announcer";
2
2
  import {useRef as $glIEW$useRef, useEffect as $glIEW$useEffect, useCallback as $glIEW$useCallback} from "react";
3
3
  import {useGlobalListeners as $glIEW$useGlobalListeners} from "@react-aria/utils";
4
- import {useMessageFormatter as $glIEW$useMessageFormatter} from "@react-aria/i18n";
4
+ import {useLocalizedStringFormatter as $glIEW$useLocalizedStringFormatter} from "@react-aria/i18n";
5
5
 
6
6
  function $parcel$interopDefault(a) {
7
7
  return a && a.__esModule ? a.default : a;
8
8
  }
9
- function $parcel$export(e, n, v, s) {
10
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
11
- }
12
- var $d2e8511e6f209edf$exports = {};
13
-
14
- $parcel$export($d2e8511e6f209edf$exports, "useSpinButton", () => $d2e8511e6f209edf$export$e908e06f4b8e3402);
15
-
16
9
 
17
10
  var $c6208a7792e31a37$exports = {};
18
11
  var $ed6aae4e5f766f1e$exports = {};
19
- $ed6aae4e5f766f1e$exports = JSON.parse("{\"Empty\":\"فارغ\"}");
12
+ $ed6aae4e5f766f1e$exports = {
13
+ "Empty": `فارغ`
14
+ };
20
15
 
21
16
 
22
17
  var $38854e2b175151fa$exports = {};
23
- $38854e2b175151fa$exports = JSON.parse("{\"Empty\":\"Изпразни\"}");
18
+ $38854e2b175151fa$exports = {
19
+ "Empty": `Изпразни`
20
+ };
24
21
 
25
22
 
26
23
  var $15b25ab20f3945b2$exports = {};
27
- $15b25ab20f3945b2$exports = JSON.parse("{\"Empty\":\"Prázdné\"}");
24
+ $15b25ab20f3945b2$exports = {
25
+ "Empty": `Prázdné`
26
+ };
28
27
 
29
28
 
30
29
  var $692a4298b6b649a2$exports = {};
31
- $692a4298b6b649a2$exports = JSON.parse("{\"Empty\":\"Tom\"}");
30
+ $692a4298b6b649a2$exports = {
31
+ "Empty": `Tom`
32
+ };
32
33
 
33
34
 
34
35
  var $1c6e1539193f1243$exports = {};
35
- $1c6e1539193f1243$exports = JSON.parse("{\"Empty\":\"Leer\"}");
36
+ $1c6e1539193f1243$exports = {
37
+ "Empty": `Leer`
38
+ };
36
39
 
37
40
 
38
41
  var $1e8678632c464b6d$exports = {};
39
- $1e8678632c464b6d$exports = JSON.parse("{\"Empty\":\"Άδειο\"}");
42
+ $1e8678632c464b6d$exports = {
43
+ "Empty": `Άδειο`
44
+ };
40
45
 
41
46
 
42
47
  var $4adc85d9bf5b9eed$exports = {};
43
- $4adc85d9bf5b9eed$exports = JSON.parse("{\"Empty\":\"Empty\"}");
48
+ $4adc85d9bf5b9eed$exports = {
49
+ "Empty": `Empty`
50
+ };
44
51
 
45
52
 
46
53
  var $41c4b2bb61dafbca$exports = {};
47
- $41c4b2bb61dafbca$exports = JSON.parse("{\"Empty\":\"Vacío\"}");
54
+ $41c4b2bb61dafbca$exports = {
55
+ "Empty": `Vacío`
56
+ };
48
57
 
49
58
 
50
59
  var $405f8b24f5dd2a60$exports = {};
51
- $405f8b24f5dd2a60$exports = JSON.parse("{\"Empty\":\"Tühjenda\"}");
60
+ $405f8b24f5dd2a60$exports = {
61
+ "Empty": `Tühjenda`
62
+ };
52
63
 
53
64
 
54
65
  var $7efe3ed02b9b9dd4$exports = {};
55
- $7efe3ed02b9b9dd4$exports = JSON.parse("{\"Empty\":\"Tyhjä\"}");
66
+ $7efe3ed02b9b9dd4$exports = {
67
+ "Empty": `Tyhjä`
68
+ };
56
69
 
57
70
 
58
71
  var $99fc4c101d92daf3$exports = {};
59
- $99fc4c101d92daf3$exports = JSON.parse("{\"Empty\":\"Vide\"}");
72
+ $99fc4c101d92daf3$exports = {
73
+ "Empty": `Vide`
74
+ };
60
75
 
61
76
 
62
77
  var $f9e155e6e8cacaa2$exports = {};
63
- $f9e155e6e8cacaa2$exports = JSON.parse("{\"Empty\":\"ריק\"}");
78
+ $f9e155e6e8cacaa2$exports = {
79
+ "Empty": `ריק`
80
+ };
64
81
 
65
82
 
66
83
  var $c31b5e8e9a249fd5$exports = {};
67
- $c31b5e8e9a249fd5$exports = JSON.parse("{\"Empty\":\"Prazno\"}");
84
+ $c31b5e8e9a249fd5$exports = {
85
+ "Empty": `Prazno`
86
+ };
68
87
 
69
88
 
70
89
  var $9c5435bc17499bd9$exports = {};
71
- $9c5435bc17499bd9$exports = JSON.parse("{\"Empty\":\"Üres\"}");
90
+ $9c5435bc17499bd9$exports = {
91
+ "Empty": `Üres`
92
+ };
72
93
 
73
94
 
74
95
  var $6d1fc8e84d8165e1$exports = {};
75
- $6d1fc8e84d8165e1$exports = JSON.parse("{\"Empty\":\"Vuoto\"}");
96
+ $6d1fc8e84d8165e1$exports = {
97
+ "Empty": `Vuoto`
98
+ };
76
99
 
77
100
 
78
101
  var $46ea6b3641b83e71$exports = {};
79
- $46ea6b3641b83e71$exports = JSON.parse("{\"Empty\":\"空\"}");
102
+ $46ea6b3641b83e71$exports = {
103
+ "Empty": `空`
104
+ };
80
105
 
81
106
 
82
107
  var $0e3cc9a288289dc5$exports = {};
83
- $0e3cc9a288289dc5$exports = JSON.parse("{\"Empty\":\"비어 있음\"}");
108
+ $0e3cc9a288289dc5$exports = {
109
+ "Empty": `비어 있음`
110
+ };
84
111
 
85
112
 
86
113
  var $4ff2bb25c0089ffb$exports = {};
87
- $4ff2bb25c0089ffb$exports = JSON.parse("{\"Empty\":\"Tuščias\"}");
114
+ $4ff2bb25c0089ffb$exports = {
115
+ "Empty": `Tuščias`
116
+ };
88
117
 
89
118
 
90
119
  var $6cf33cd4c010a2fb$exports = {};
91
- $6cf33cd4c010a2fb$exports = JSON.parse("{\"Empty\":\"Tukšs\"}");
120
+ $6cf33cd4c010a2fb$exports = {
121
+ "Empty": `Tukšs`
122
+ };
92
123
 
93
124
 
94
125
  var $5a9f8486f8b8837e$exports = {};
95
- $5a9f8486f8b8837e$exports = JSON.parse("{\"Empty\":\"Tom\"}");
126
+ $5a9f8486f8b8837e$exports = {
127
+ "Empty": `Tom`
128
+ };
96
129
 
97
130
 
98
131
  var $583f94d807f6ecea$exports = {};
99
- $583f94d807f6ecea$exports = JSON.parse("{\"Empty\":\"Leeg\"}");
132
+ $583f94d807f6ecea$exports = {
133
+ "Empty": `Leeg`
134
+ };
100
135
 
101
136
 
102
137
  var $cc4dcfeea2b4050d$exports = {};
103
- $cc4dcfeea2b4050d$exports = JSON.parse("{\"Empty\":\"Pusty\"}");
138
+ $cc4dcfeea2b4050d$exports = {
139
+ "Empty": `Pusty`
140
+ };
104
141
 
105
142
 
106
143
  var $68ac2954d56e12b4$exports = {};
107
- $68ac2954d56e12b4$exports = JSON.parse("{\"Empty\":\"Vazio\"}");
144
+ $68ac2954d56e12b4$exports = {
145
+ "Empty": `Vazio`
146
+ };
108
147
 
109
148
 
110
149
  var $fdb0616f309780b0$exports = {};
111
- $fdb0616f309780b0$exports = JSON.parse("{\"Empty\":\"Vazio\"}");
150
+ $fdb0616f309780b0$exports = {
151
+ "Empty": `Vazio`
152
+ };
112
153
 
113
154
 
114
155
  var $fe1eccf4ee1d6f52$exports = {};
115
- $fe1eccf4ee1d6f52$exports = JSON.parse("{\"Empty\":\"Gol\"}");
156
+ $fe1eccf4ee1d6f52$exports = {
157
+ "Empty": `Gol`
158
+ };
116
159
 
117
160
 
118
161
  var $a38b6c4e18725976$exports = {};
119
- $a38b6c4e18725976$exports = JSON.parse("{\"Empty\":\"Не заполнено\"}");
162
+ $a38b6c4e18725976$exports = {
163
+ "Empty": `Не заполнено`
164
+ };
120
165
 
121
166
 
122
167
  var $6c14ae2b766b652c$exports = {};
123
- $6c14ae2b766b652c$exports = JSON.parse("{\"Empty\":\"Prázdne\"}");
168
+ $6c14ae2b766b652c$exports = {
169
+ "Empty": `Prázdne`
170
+ };
124
171
 
125
172
 
126
173
  var $8f1c9692e16dc5eb$exports = {};
127
- $8f1c9692e16dc5eb$exports = JSON.parse("{\"Empty\":\"Prazen\"}");
174
+ $8f1c9692e16dc5eb$exports = {
175
+ "Empty": `Prazen`
176
+ };
128
177
 
129
178
 
130
179
  var $d2aa7abea627cafa$exports = {};
131
- $d2aa7abea627cafa$exports = JSON.parse("{\"Empty\":\"Prazno\"}");
180
+ $d2aa7abea627cafa$exports = {
181
+ "Empty": `Prazno`
182
+ };
132
183
 
133
184
 
134
185
  var $676b82e4b56408e6$exports = {};
135
- $676b82e4b56408e6$exports = JSON.parse("{\"Empty\":\"Tomt\"}");
186
+ $676b82e4b56408e6$exports = {
187
+ "Empty": `Tomt`
188
+ };
136
189
 
137
190
 
138
191
  var $14c9042552d7ce08$exports = {};
139
- $14c9042552d7ce08$exports = JSON.parse("{\"Empty\":\"Boş\"}");
192
+ $14c9042552d7ce08$exports = {
193
+ "Empty": `Boş`
194
+ };
140
195
 
141
196
 
142
197
  var $393254ebcb66c9f5$exports = {};
143
- $393254ebcb66c9f5$exports = JSON.parse("{\"Empty\":\"Пусто\"}");
198
+ $393254ebcb66c9f5$exports = {
199
+ "Empty": `Пусто`
200
+ };
144
201
 
145
202
 
146
203
  var $d49d621f310cf6ce$exports = {};
147
- $d49d621f310cf6ce$exports = JSON.parse("{\"Empty\":\"空\"}");
204
+ $d49d621f310cf6ce$exports = {
205
+ "Empty": `空`
206
+ };
148
207
 
149
208
 
150
209
  var $94b60c866ca5dfe6$exports = {};
151
- $94b60c866ca5dfe6$exports = JSON.parse("{\"Empty\":\"空白\"}");
210
+ $94b60c866ca5dfe6$exports = {
211
+ "Empty": `空白`
212
+ };
152
213
 
153
214
 
154
215
  $c6208a7792e31a37$exports = {
@@ -191,10 +252,11 @@ $c6208a7792e31a37$exports = {
191
252
 
192
253
 
193
254
 
255
+
194
256
  function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
195
257
  const _async = $glIEW$useRef();
196
258
  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;
197
- const formatMessage = $glIEW$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c6208a7792e31a37$exports)));
259
+ const stringFormatter = $glIEW$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($c6208a7792e31a37$exports)));
198
260
  const propsRef = $glIEW$useRef(props);
199
261
  propsRef.current = props;
200
262
  const clearAsync = ()=>clearTimeout(_async.current)
@@ -260,7 +322,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
260
322
  // This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
261
323
  // and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
262
324
  // In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
263
- textValue = textValue === '' ? formatMessage('Empty') : (textValue || `${value}`).replace('-', '\u2212');
325
+ textValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
264
326
  $glIEW$useEffect(()=>{
265
327
  if (isFocused.current) $glIEW$announce(textValue, 'assertive');
266
328
  }, [
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AGAA,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAsB;;;;ACAlD,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAA0B;;;;ACAtD,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAyB;;;;ACArD,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAqB;;;;ACAjD,yBAAc,GAAG,IAAI,CAAC,KAA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oB,EAAE,CAAC;YACrB,YAAY,MAAQ,CAAC;gBACnB,qBAAqB,CAAC,GAAG;gBACzB,iBAAiB,CAAC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;QACD,oBAAoB,EAAE,CAAC;YACrB,YAAY,MAAQ,CAAC;gBACnB,qBAAqB,CAAC,GAAG;gBACzB,iBAAiB,CAAC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/intl/*.js","packages/@react-aria/spinbutton/intl/ar-AE.json","packages/@react-aria/spinbutton/intl/bg-BG.json","packages/@react-aria/spinbutton/intl/cs-CZ.json","packages/@react-aria/spinbutton/intl/da-DK.json","packages/@react-aria/spinbutton/intl/de-DE.json","packages/@react-aria/spinbutton/intl/el-GR.json","packages/@react-aria/spinbutton/intl/en-US.json","packages/@react-aria/spinbutton/intl/es-ES.json","packages/@react-aria/spinbutton/intl/et-EE.json","packages/@react-aria/spinbutton/intl/fi-FI.json","packages/@react-aria/spinbutton/intl/fr-FR.json","packages/@react-aria/spinbutton/intl/he-IL.json","packages/@react-aria/spinbutton/intl/hr-HR.json","packages/@react-aria/spinbutton/intl/hu-HU.json","packages/@react-aria/spinbutton/intl/it-IT.json","packages/@react-aria/spinbutton/intl/ja-JP.json","packages/@react-aria/spinbutton/intl/ko-KR.json","packages/@react-aria/spinbutton/intl/lt-LT.json","packages/@react-aria/spinbutton/intl/lv-LV.json","packages/@react-aria/spinbutton/intl/nb-NO.json","packages/@react-aria/spinbutton/intl/nl-NL.json","packages/@react-aria/spinbutton/intl/pl-PL.json","packages/@react-aria/spinbutton/intl/pt-BR.json","packages/@react-aria/spinbutton/intl/pt-PT.json","packages/@react-aria/spinbutton/intl/ro-RO.json","packages/@react-aria/spinbutton/intl/ru-RU.json","packages/@react-aria/spinbutton/intl/sk-SK.json","packages/@react-aria/spinbutton/intl/sl-SI.json","packages/@react-aria/spinbutton/intl/sr-SP.json","packages/@react-aria/spinbutton/intl/sv-SE.json","packages/@react-aria/spinbutton/intl/tr-TR.json","packages/@react-aria/spinbutton/intl/uk-UA.json","packages/@react-aria/spinbutton/intl/zh-CN.json","packages/@react-aria/spinbutton/intl/zh-TW.json"],"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 */\n\nexport * 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} from '@react-aria/live-announcer';\nimport {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, useCallback, useEffect, useRef} from 'react';\nimport {InputBase, RangeInputBase, Validation, ValueBase} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useGlobalListeners} from '@react-aria/utils';\nimport {useMessageFormatter} from '@react-aria/i18n';\n\n\nexport interface SpinButtonProps extends InputBase, Validation, 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: HTMLAttributes<HTMLDivElement>,\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 formatMessage = useMessageFormatter(intlMessages);\n const propsRef = useRef(props);\n propsRef.current = props;\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 textValue = textValue === '' ? formatMessage('Empty') : (textValue || `${value}`).replace('-', '\\u2212');\n\n useEffect(() => {\n if (isFocused.current) {\n announce(textValue, 'assertive');\n }\n }, [textValue]);\n\n const onIncrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onIncrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(maxValue) || isNaN(value) || value < maxValue) {\n onIncrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onIncrement, maxValue, value]\n );\n\n const onDecrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onDecrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(minValue) || isNaN(value) || value > minValue) {\n onDecrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onDecrement, minValue, value]\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': !isNaN(value) ? value : null,\n 'aria-valuetext': textValue,\n 'aria-valuemin': minValue,\n 'aria-valuemax': maxValue,\n 'aria-disabled': isDisabled || null,\n 'aria-readonly': isReadOnly || null,\n 'aria-required': isRequired || null,\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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}","{\n \"Empty\": \"فارغ\"\n}\n","{\n \"Empty\": \"Изпразни\"\n}\n","{\n \"Empty\": \"Prázdné\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leer\"\n}\n","{\n \"Empty\": \"Άδειο\"\n}\n","{\n \"Empty\": \"Empty\"\n}\n","{\n \"Empty\": \"Vacío\"\n}\n","{\n \"Empty\": \"Tühjenda\"\n}\n","{\n \"Empty\": \"Tyhjä\"\n}\n","{\n \"Empty\": \"Vide\"\n}\n","{\n \"Empty\": \"ריק\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Üres\"\n}\n","{\n \"Empty\": \"Vuoto\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"비어 있음\"\n}\n","{\n \"Empty\": \"Tuščias\"\n}\n","{\n \"Empty\": \"Tukšs\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leeg\"\n}\n","{\n \"Empty\": \"Pusty\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Gol\"\n}\n","{\n \"Empty\": \"Не заполнено\"\n}\n","{\n \"Empty\": \"Prázdne\"\n}\n","{\n \"Empty\": \"Prazen\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Tomt\"\n}\n","{\n \"Empty\": \"Boş\"\n}\n","{\n \"Empty\": \"Пусто\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"空白\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;AGAA,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,QAAI;AAClC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,gBAAQ;AACtC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,SAAO;AACrC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,GAAG;AACjC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,IAAI;AAClC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,UAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,KAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,MAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,SAAQ;AACtC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,MAAK;AACnC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,IAAI;AAClC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,MAAG;AACjC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,MAAM;AACpC,CAAC;;;;ACDD,yBAAc,GAAG,CAAC;IAAE,CAAO,SAAG,KAAI;AAClC,CAAC;;;;ACDD,yB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AAG;gBACzB,iBAAiB,CAAC,MAAM,EAAE,CAAa,cAAE,iBAAiB;YAC5D,CAAC;YACD,UAAU,MAAQ,CAAC;gBACjB,UAAU;gBACV,wBAAwB;YAC1B,CAAC;qBACD,OAAO;oBACP,MAAM;QACR,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/intl/*.js","packages/@react-aria/spinbutton/intl/ar-AE.json","packages/@react-aria/spinbutton/intl/bg-BG.json","packages/@react-aria/spinbutton/intl/cs-CZ.json","packages/@react-aria/spinbutton/intl/da-DK.json","packages/@react-aria/spinbutton/intl/de-DE.json","packages/@react-aria/spinbutton/intl/el-GR.json","packages/@react-aria/spinbutton/intl/en-US.json","packages/@react-aria/spinbutton/intl/es-ES.json","packages/@react-aria/spinbutton/intl/et-EE.json","packages/@react-aria/spinbutton/intl/fi-FI.json","packages/@react-aria/spinbutton/intl/fr-FR.json","packages/@react-aria/spinbutton/intl/he-IL.json","packages/@react-aria/spinbutton/intl/hr-HR.json","packages/@react-aria/spinbutton/intl/hu-HU.json","packages/@react-aria/spinbutton/intl/it-IT.json","packages/@react-aria/spinbutton/intl/ja-JP.json","packages/@react-aria/spinbutton/intl/ko-KR.json","packages/@react-aria/spinbutton/intl/lt-LT.json","packages/@react-aria/spinbutton/intl/lv-LV.json","packages/@react-aria/spinbutton/intl/nb-NO.json","packages/@react-aria/spinbutton/intl/nl-NL.json","packages/@react-aria/spinbutton/intl/pl-PL.json","packages/@react-aria/spinbutton/intl/pt-BR.json","packages/@react-aria/spinbutton/intl/pt-PT.json","packages/@react-aria/spinbutton/intl/ro-RO.json","packages/@react-aria/spinbutton/intl/ru-RU.json","packages/@react-aria/spinbutton/intl/sk-SK.json","packages/@react-aria/spinbutton/intl/sl-SI.json","packages/@react-aria/spinbutton/intl/sr-SP.json","packages/@react-aria/spinbutton/intl/sv-SE.json","packages/@react-aria/spinbutton/intl/tr-TR.json","packages/@react-aria/spinbutton/intl/uk-UA.json","packages/@react-aria/spinbutton/intl/zh-CN.json","packages/@react-aria/spinbutton/intl/zh-TW.json"],"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} 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 {useCallback, useEffect, useRef} from 'react';\nimport {useGlobalListeners} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface SpinButtonProps extends InputBase, Validation, 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);\n const propsRef = useRef(props);\n propsRef.current = props;\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 textValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\\u2212');\n\n useEffect(() => {\n if (isFocused.current) {\n announce(textValue, 'assertive');\n }\n }, [textValue]);\n\n const onIncrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onIncrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(maxValue) || isNaN(value) || value < maxValue) {\n onIncrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onIncrement, maxValue, value]\n );\n\n const onDecrementPressStart = useCallback(\n (initialStepDelay: number) => {\n clearAsync();\n propsRef.current.onDecrement();\n // Start spinning after initial delay\n _async.current = window.setTimeout(\n () => {\n if (isNaN(minValue) || isNaN(value) || value > minValue) {\n onDecrementPressStart(60);\n }\n },\n initialStepDelay\n );\n },\n [onDecrement, minValue, value]\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': !isNaN(value) ? value : null,\n 'aria-valuetext': textValue,\n 'aria-valuemin': minValue,\n 'aria-valuemax': maxValue,\n 'aria-disabled': isDisabled || null,\n 'aria-readonly': isReadOnly || null,\n 'aria-required': isRequired || null,\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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}","{\n \"Empty\": \"فارغ\"\n}\n","{\n \"Empty\": \"Изпразни\"\n}\n","{\n \"Empty\": \"Prázdné\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leer\"\n}\n","{\n \"Empty\": \"Άδειο\"\n}\n","{\n \"Empty\": \"Empty\"\n}\n","{\n \"Empty\": \"Vacío\"\n}\n","{\n \"Empty\": \"Tühjenda\"\n}\n","{\n \"Empty\": \"Tyhjä\"\n}\n","{\n \"Empty\": \"Vide\"\n}\n","{\n \"Empty\": \"ריק\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Üres\"\n}\n","{\n \"Empty\": \"Vuoto\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"비어 있음\"\n}\n","{\n \"Empty\": \"Tuščias\"\n}\n","{\n \"Empty\": \"Tukšs\"\n}\n","{\n \"Empty\": \"Tom\"\n}\n","{\n \"Empty\": \"Leeg\"\n}\n","{\n \"Empty\": \"Pusty\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Vazio\"\n}\n","{\n \"Empty\": \"Gol\"\n}\n","{\n \"Empty\": \"Не заполнено\"\n}\n","{\n \"Empty\": \"Prázdne\"\n}\n","{\n \"Empty\": \"Prazen\"\n}\n","{\n \"Empty\": \"Prazno\"\n}\n","{\n \"Empty\": \"Tomt\"\n}\n","{\n \"Empty\": \"Boş\"\n}\n","{\n \"Empty\": \"Пусто\"\n}\n","{\n \"Empty\": \"空\"\n}\n","{\n \"Empty\": \"空白\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { AriaButtonProps } from "@react-types/button";
2
- import { HTMLAttributes } from "react";
3
- import { InputBase, RangeInputBase, Validation, ValueBase } from "@react-types/shared";
2
+ import { DOMAttributes, InputBase, RangeInputBase, Validation, ValueBase } from "@react-types/shared";
4
3
  export interface SpinButtonProps extends InputBase, Validation, ValueBase<number>, RangeInputBase<number> {
5
4
  textValue?: string;
6
5
  onIncrement?: () => void;
@@ -11,7 +10,7 @@ export interface SpinButtonProps extends InputBase, Validation, ValueBase<number
11
10
  onIncrementToMax?: () => void;
12
11
  }
13
12
  export interface SpinbuttonAria {
14
- spinButtonProps: HTMLAttributes<HTMLDivElement>;
13
+ spinButtonProps: DOMAttributes;
15
14
  incrementButtonProps: AriaButtonProps;
16
15
  decrementButtonProps: AriaButtonProps;
17
16
  }
@@ -1 +1 @@
1
- {"mappings":";;;AAsBA,gCAAiC,SAAQ,SAAS,EAAE,UAAU,EAAE,UAAU,MAAM,CAAC,EAAE,eAAe,MAAM,CAAC;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED;IACE,eAAe,EAAE,eAAe,cAAc,CAAC,CAAC;IAChD,oBAAoB,EAAE,eAAe,CAAC;IACtC,oBAAoB,EAAE,eAAe,CAAA;CACtC;AAED,8BACE,KAAK,EAAE,eAAe,GACrB,cAAc,CAiLhB","sources":["packages/@react-aria/spinbutton/src/packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/src/packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/index.ts"],"sourcesContent":[null,null,"/*\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\nexport * from './useSpinButton';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAsBA,gCAAiC,SAAQ,SAAS,EAAE,UAAU,EAAE,UAAU,MAAM,CAAC,EAAE,eAAe,MAAM,CAAC;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED;IACE,eAAe,EAAE,aAAa,CAAC;IAC/B,oBAAoB,EAAE,eAAe,CAAC;IACtC,oBAAoB,EAAE,eAAe,CAAA;CACtC;AAED,8BACE,KAAK,EAAE,eAAe,GACrB,cAAc,CAiLhB","sources":["packages/@react-aria/spinbutton/src/packages/@react-aria/spinbutton/src/useSpinButton.ts","packages/@react-aria/spinbutton/src/packages/@react-aria/spinbutton/src/index.ts","packages/@react-aria/spinbutton/src/index.ts"],"sourcesContent":[null,null,"/*\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":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/spinbutton",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-aria/i18n": "^3.4.1",
22
- "@react-aria/live-announcer": "^3.1.0",
23
- "@react-aria/utils": "^3.13.1",
24
- "@react-types/button": "^3.5.1",
25
- "@react-types/shared": "^3.13.1"
21
+ "@react-aria/i18n": "^3.5.0",
22
+ "@react-aria/live-announcer": "^3.1.1",
23
+ "@react-aria/utils": "^3.13.2",
24
+ "@react-types/button": "^3.6.0",
25
+ "@react-types/shared": "^3.14.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0",
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "715c3f563ccf8c2e0102d3e18403d9db21a05a71"
34
+ "gitHead": "cd7c0ec917122c7612f653c22f8ed558f8b66ecd"
35
35
  }
package/src/index.ts CHANGED
@@ -9,5 +9,5 @@
9
9
  * OF ANY KIND, either express or implied. See the License for the specific language
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
-
13
- export * from './useSpinButton';
12
+ export type {SpinButtonProps, SpinbuttonAria} from './useSpinButton';
13
+ export {useSpinButton} from './useSpinButton';
@@ -12,12 +12,12 @@
12
12
 
13
13
  import {announce} from '@react-aria/live-announcer';
14
14
  import {AriaButtonProps} from '@react-types/button';
15
- import {HTMLAttributes, useCallback, useEffect, useRef} from 'react';
16
- import {InputBase, RangeInputBase, Validation, ValueBase} from '@react-types/shared';
15
+ import {DOMAttributes, InputBase, RangeInputBase, Validation, ValueBase} from '@react-types/shared';
17
16
  // @ts-ignore
18
17
  import intlMessages from '../intl/*.json';
18
+ import {useCallback, useEffect, useRef} from 'react';
19
19
  import {useGlobalListeners} from '@react-aria/utils';
20
- import {useMessageFormatter} from '@react-aria/i18n';
20
+ import {useLocalizedStringFormatter} from '@react-aria/i18n';
21
21
 
22
22
 
23
23
  export interface SpinButtonProps extends InputBase, Validation, ValueBase<number>, RangeInputBase<number> {
@@ -31,7 +31,7 @@ export interface SpinButtonProps extends InputBase, Validation, ValueBase<number
31
31
  }
32
32
 
33
33
  export interface SpinbuttonAria {
34
- spinButtonProps: HTMLAttributes<HTMLDivElement>,
34
+ spinButtonProps: DOMAttributes,
35
35
  incrementButtonProps: AriaButtonProps,
36
36
  decrementButtonProps: AriaButtonProps
37
37
  }
@@ -55,7 +55,7 @@ export function useSpinButton(
55
55
  onDecrementToMin,
56
56
  onIncrementToMax
57
57
  } = props;
58
- const formatMessage = useMessageFormatter(intlMessages);
58
+ const stringFormatter = useLocalizedStringFormatter(intlMessages);
59
59
  const propsRef = useRef(props);
60
60
  propsRef.current = props;
61
61
 
@@ -128,7 +128,7 @@ export function useSpinButton(
128
128
  // This ensures that macOS VoiceOver announces it as "minus" even with other characters between the minus sign
129
129
  // and the number (e.g. currency symbol). Otherwise it announces nothing because it assumes the character is a hyphen.
130
130
  // In addition, replace the empty string with the word "Empty" so that iOS VoiceOver does not read "50%" for an empty field.
131
- textValue = textValue === '' ? formatMessage('Empty') : (textValue || `${value}`).replace('-', '\u2212');
131
+ textValue = textValue === '' ? stringFormatter.format('Empty') : (textValue || `${value}`).replace('-', '\u2212');
132
132
 
133
133
  useEffect(() => {
134
134
  if (isFocused.current) {