@react-aria/numberfield 3.4.0 → 3.5.1
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 +19 -9
- package/dist/main.js +18 -8
- package/dist/main.js.map +1 -1
- package/dist/module.js +19 -9
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/useNumberField.ts +14 -5
package/dist/import.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {useId as $gfhJl$useId, isIPhone as $gfhJl$isIPhone, isAndroid as $gfhJl$isAndroid, filterDOMProps as $gfhJl$filterDOMProps, mergeProps as $gfhJl$mergeProps, isIOS as $gfhJl$isIOS} from "@react-aria/utils";
|
|
2
|
-
import {
|
|
2
|
+
import {useMemo as $gfhJl$useMemo, useState as $gfhJl$useState, useCallback as $gfhJl$useCallback} from "react";
|
|
3
3
|
import {useFocus as $gfhJl$useFocus, useFocusWithin as $gfhJl$useFocusWithin, useScrollWheel as $gfhJl$useScrollWheel} from "@react-aria/interactions";
|
|
4
4
|
import {useFormattedTextField as $gfhJl$useFormattedTextField} from "@react-aria/textfield";
|
|
5
5
|
import {useLocalizedStringFormatter as $gfhJl$useLocalizedStringFormatter, useNumberFormatter as $gfhJl$useNumberFormatter} from "@react-aria/i18n";
|
|
@@ -348,7 +348,7 @@ $c3ef0f8b54adbb57$exports = {
|
|
|
348
348
|
|
|
349
349
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
350
350
|
let { id: id , decrementAriaLabel: decrementAriaLabel , incrementAriaLabel: incrementAriaLabel , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , minValue: minValue , maxValue: maxValue , autoFocus: autoFocus , validationState: validationState , label: label , formatOptions: formatOptions , onBlur: onBlur = ()=>{} , onFocus: onFocus , onFocusChange: onFocusChange , onKeyDown: onKeyDown , onKeyUp: onKeyUp , description: description , errorMessage: errorMessage , ...otherProps } = props;
|
|
351
|
-
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , commit: commit } = state;
|
|
351
|
+
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , inputValue: inputValue , commit: commit } = state;
|
|
352
352
|
const stringFormatter = (0, $gfhJl$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c3ef0f8b54adbb57$exports))));
|
|
353
353
|
let inputId = (0, $gfhJl$useId)(id);
|
|
354
354
|
let { focusProps: focusProps } = (0, $gfhJl$useFocus)({
|
|
@@ -357,6 +357,20 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
357
357
|
commit();
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
|
+
let numberFormatter = (0, $gfhJl$useNumberFormatter)(formatOptions);
|
|
361
|
+
let intlOptions = (0, $gfhJl$useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
362
|
+
numberFormatter
|
|
363
|
+
]);
|
|
364
|
+
// Replace negative textValue formatted using currencySign: 'accounting'
|
|
365
|
+
// with a textValue that can be announced using a minus sign.
|
|
366
|
+
let textValueFormatter = (0, $gfhJl$useNumberFormatter)({
|
|
367
|
+
...formatOptions,
|
|
368
|
+
currencySign: undefined
|
|
369
|
+
});
|
|
370
|
+
let textValue = (0, $gfhJl$useMemo)(()=>isNaN(numberValue) ? "" : textValueFormatter.format(numberValue), [
|
|
371
|
+
textValueFormatter,
|
|
372
|
+
numberValue
|
|
373
|
+
]);
|
|
360
374
|
let { spinButtonProps: spinButtonProps , incrementButtonProps: incButtonProps , decrementButtonProps: decButtonProps } = (0, $gfhJl$useSpinButton)({
|
|
361
375
|
isDisabled: isDisabled,
|
|
362
376
|
isReadOnly: isReadOnly,
|
|
@@ -368,7 +382,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
368
382
|
onDecrement: decrement,
|
|
369
383
|
onDecrementToMin: decrementToMin,
|
|
370
384
|
value: numberValue,
|
|
371
|
-
textValue:
|
|
385
|
+
textValue: textValue
|
|
372
386
|
});
|
|
373
387
|
let [focusWithin, setFocusWithin] = (0, $gfhJl$useState)(false);
|
|
374
388
|
let { focusWithinProps: focusWithinProps } = (0, $gfhJl$useFocusWithin)({
|
|
@@ -397,10 +411,6 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
397
411
|
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
398
412
|
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
399
413
|
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
400
|
-
let numberFormatter = (0, $gfhJl$useNumberFormatter)(formatOptions);
|
|
401
|
-
let intlOptions = (0, $gfhJl$useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
402
|
-
numberFormatter
|
|
403
|
-
]);
|
|
404
414
|
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
405
415
|
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
406
416
|
let inputMode = "numeric";
|
|
@@ -417,7 +427,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
417
427
|
else if (hasDecimals) inputMode = "decimal";
|
|
418
428
|
}
|
|
419
429
|
let onChange = (value)=>{
|
|
420
|
-
state.setInputValue(value);
|
|
430
|
+
if (state.validate(value)) state.setInputValue(value);
|
|
421
431
|
};
|
|
422
432
|
let domProps = (0, $gfhJl$filterDOMProps)(props);
|
|
423
433
|
let { labelProps: labelProps , inputProps: textFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $gfhJl$useFormattedTextField)({
|
|
@@ -429,7 +439,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
429
439
|
isReadOnly: isReadOnly,
|
|
430
440
|
isRequired: isRequired,
|
|
431
441
|
validationState: validationState,
|
|
432
|
-
value:
|
|
442
|
+
value: inputValue,
|
|
433
443
|
defaultValue: undefined,
|
|
434
444
|
autoComplete: "off",
|
|
435
445
|
"aria-label": props["aria-label"] || null,
|
package/dist/main.js
CHANGED
|
@@ -353,7 +353,7 @@ $1bcaad54abc442a2$exports = {
|
|
|
353
353
|
|
|
354
354
|
function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
355
355
|
let { id: id , decrementAriaLabel: decrementAriaLabel , incrementAriaLabel: incrementAriaLabel , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , minValue: minValue , maxValue: maxValue , autoFocus: autoFocus , validationState: validationState , label: label , formatOptions: formatOptions , onBlur: onBlur = ()=>{} , onFocus: onFocus , onFocusChange: onFocusChange , onKeyDown: onKeyDown , onKeyUp: onKeyUp , description: description , errorMessage: errorMessage , ...otherProps } = props;
|
|
356
|
-
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , commit: commit } = state;
|
|
356
|
+
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , inputValue: inputValue , commit: commit } = state;
|
|
357
357
|
const stringFormatter = (0, $2wEZH$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($1bcaad54abc442a2$exports))));
|
|
358
358
|
let inputId = (0, $2wEZH$reactariautils.useId)(id);
|
|
359
359
|
let { focusProps: focusProps } = (0, $2wEZH$reactariainteractions.useFocus)({
|
|
@@ -362,6 +362,20 @@ function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
362
362
|
commit();
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
|
+
let numberFormatter = (0, $2wEZH$reactariai18n.useNumberFormatter)(formatOptions);
|
|
366
|
+
let intlOptions = (0, $2wEZH$react.useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
367
|
+
numberFormatter
|
|
368
|
+
]);
|
|
369
|
+
// Replace negative textValue formatted using currencySign: 'accounting'
|
|
370
|
+
// with a textValue that can be announced using a minus sign.
|
|
371
|
+
let textValueFormatter = (0, $2wEZH$reactariai18n.useNumberFormatter)({
|
|
372
|
+
...formatOptions,
|
|
373
|
+
currencySign: undefined
|
|
374
|
+
});
|
|
375
|
+
let textValue = (0, $2wEZH$react.useMemo)(()=>isNaN(numberValue) ? "" : textValueFormatter.format(numberValue), [
|
|
376
|
+
textValueFormatter,
|
|
377
|
+
numberValue
|
|
378
|
+
]);
|
|
365
379
|
let { spinButtonProps: spinButtonProps , incrementButtonProps: incButtonProps , decrementButtonProps: decButtonProps } = (0, $2wEZH$reactariaspinbutton.useSpinButton)({
|
|
366
380
|
isDisabled: isDisabled,
|
|
367
381
|
isReadOnly: isReadOnly,
|
|
@@ -373,7 +387,7 @@ function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
373
387
|
onDecrement: decrement,
|
|
374
388
|
onDecrementToMin: decrementToMin,
|
|
375
389
|
value: numberValue,
|
|
376
|
-
textValue:
|
|
390
|
+
textValue: textValue
|
|
377
391
|
});
|
|
378
392
|
let [focusWithin, setFocusWithin] = (0, $2wEZH$react.useState)(false);
|
|
379
393
|
let { focusWithinProps: focusWithinProps } = (0, $2wEZH$reactariainteractions.useFocusWithin)({
|
|
@@ -402,10 +416,6 @@ function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
402
416
|
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
403
417
|
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
404
418
|
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
405
|
-
let numberFormatter = (0, $2wEZH$reactariai18n.useNumberFormatter)(formatOptions);
|
|
406
|
-
let intlOptions = (0, $2wEZH$react.useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
407
|
-
numberFormatter
|
|
408
|
-
]);
|
|
409
419
|
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
410
420
|
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
411
421
|
let inputMode = "numeric";
|
|
@@ -422,7 +432,7 @@ function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
422
432
|
else if (hasDecimals) inputMode = "decimal";
|
|
423
433
|
}
|
|
424
434
|
let onChange = (value)=>{
|
|
425
|
-
state.setInputValue(value);
|
|
435
|
+
if (state.validate(value)) state.setInputValue(value);
|
|
426
436
|
};
|
|
427
437
|
let domProps = (0, $2wEZH$reactariautils.filterDOMProps)(props);
|
|
428
438
|
let { labelProps: labelProps , inputProps: textFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $2wEZH$reactariatextfield.useFormattedTextField)({
|
|
@@ -434,7 +444,7 @@ function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
434
444
|
isReadOnly: isReadOnly,
|
|
435
445
|
isRequired: isRequired,
|
|
436
446
|
validationState: validationState,
|
|
437
|
-
value:
|
|
447
|
+
value: inputValue,
|
|
438
448
|
defaultValue: undefined,
|
|
439
449
|
autoComplete: "off",
|
|
440
450
|
"aria-label": props["aria-label"] || null,
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;AEZA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC,CAAC;IAChE,YAAY,CAAC,OAAS,CAAC,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC;IAChD,eAAe,CAAC,QAAQ,CAAC;AAC3B;;ADHA;;AEAA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,CAAC;IACvE,YAAY,CAAC,OAAS,CAAC,SAAS,EAAE,KAAK,UAAU,CAAC,CAAC;IACnD,eAAe,CAAC,eAAe,CAAC;AAClC;;;;ACHA,4BA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AAG,WAAW,EAAE,GAAG,KAAK,CAAC,kBAAkB;IAGjF,IAAI,cAAc,CAAA,GAAA,2BAAK,AAAD;IACtB,IAAI,cAAc,CAAA,GAAA,2BAAK,AAAD;IAEtB,IAAI,uBAAwC,CAAA,GAAA,gCAAS,EAAE,gBAAgB;QACrE,cAAc,sBAAsB,gBAAgB,MAAM,CAAC,YAAY;wBAAC;QAAU,GAAG,IAAI;QACzF,IAAI,kBAAkB,CAAC,qBAAqB,cAAc,IAAI;QAC9D,mBAAmB,kBAAkB,CAAC,qBAAqB,CAAC,EAAE,YAAY,CAAC,EAAE,eAAe,CAAC,GAAG,IAAI;QACpG,iBAAiB;QACjB,qBAAqB,IAAI;QACzB,qBAAqB,IAAI;QACzB,wBAAwB,IAAI;QAC5B,YAAY,CAAC,MAAM,YAAY;QAC/B,cAAc;IAChB;IAEA,IAAI,uBAAwC,CAAA,GAAA,gCAAS,EAAE,gBAAgB;QACrE,cAAc,sBAAsB,gBAAgB,MAAM,CAAC,YAAY;wBAAC;QAAU,GAAG,IAAI;QACzF,IAAI,kBAAkB,CAAC,qBAAqB,cAAc,IAAI;QAC9D,mBAAmB,kBAAkB,CAAC,qBAAqB,CAAC,EAAE,YAAY,CAAC,EAAE,eAAe,CAAC,GAAG,IAAI;QACpG,iBAAiB;QACjB,qBAAqB,IAAI;QACzB,qBAAqB,IAAI;QACzB,wBAAwB,IAAI;QAC5B,YAAY,CAAC,MAAM,YAAY;QAC/B,cAAc;IAChB;IAEA,OAAO;QACL,YAAY;YACV,MAAM;YACN,iBAAiB;YACjB,gBAAgB,oBAAoB,YAAY,SAAS,SAAS;YAClE,GAAG,gBAAgB;QACrB;oBACA;oBACA;8BACA;8BACA;2BACA;0BACA;IACF;AACF;;CD7RC,GACD","sources":["packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/intl/*.js","packages/@react-aria/numberfield/intl/ar-AE.json","packages/@react-aria/numberfield/intl/bg-BG.json","packages/@react-aria/numberfield/intl/cs-CZ.json","packages/@react-aria/numberfield/intl/da-DK.json","packages/@react-aria/numberfield/intl/de-DE.json","packages/@react-aria/numberfield/intl/el-GR.json","packages/@react-aria/numberfield/intl/en-US.json","packages/@react-aria/numberfield/intl/es-ES.json","packages/@react-aria/numberfield/intl/et-EE.json","packages/@react-aria/numberfield/intl/fi-FI.json","packages/@react-aria/numberfield/intl/fr-FR.json","packages/@react-aria/numberfield/intl/he-IL.json","packages/@react-aria/numberfield/intl/hr-HR.json","packages/@react-aria/numberfield/intl/hu-HU.json","packages/@react-aria/numberfield/intl/it-IT.json","packages/@react-aria/numberfield/intl/ja-JP.json","packages/@react-aria/numberfield/intl/ko-KR.json","packages/@react-aria/numberfield/intl/lt-LT.json","packages/@react-aria/numberfield/intl/lv-LV.json","packages/@react-aria/numberfield/intl/nb-NO.json","packages/@react-aria/numberfield/intl/nl-NL.json","packages/@react-aria/numberfield/intl/pl-PL.json","packages/@react-aria/numberfield/intl/pt-BR.json","packages/@react-aria/numberfield/intl/pt-PT.json","packages/@react-aria/numberfield/intl/ro-RO.json","packages/@react-aria/numberfield/intl/ru-RU.json","packages/@react-aria/numberfield/intl/sk-SK.json","packages/@react-aria/numberfield/intl/sl-SI.json","packages/@react-aria/numberfield/intl/sr-SP.json","packages/@react-aria/numberfield/intl/sv-SE.json","packages/@react-aria/numberfield/intl/tr-TR.json","packages/@react-aria/numberfield/intl/uk-UA.json","packages/@react-aria/numberfield/intl/zh-CN.json","packages/@react-aria/numberfield/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 {useNumberField} from './useNumberField';\nexport type {AriaNumberFieldProps} from '@react-types/numberfield';\nexport type {NumberFieldAria} from './useNumberField';\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 {AriaButtonProps} from '@react-types/button';\nimport {AriaNumberFieldProps} from '@react-types/numberfield';\nimport {DOMAttributes, TextInputDOMProps} from '@react-types/shared';\nimport {filterDOMProps, isAndroid, isIOS, isIPhone, mergeProps, useId} from '@react-aria/utils';\nimport {\n InputHTMLAttributes,\n LabelHTMLAttributes,\n RefObject,\n useCallback,\n useMemo,\n useState\n} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {NumberFieldState} from '@react-stately/numberfield';\nimport {useFocus, useFocusWithin} from '@react-aria/interactions';\nimport {useFormattedTextField} from '@react-aria/textfield';\nimport {\n useLocalizedStringFormatter,\n useNumberFormatter\n} from '@react-aria/i18n';\nimport {useScrollWheel} from '@react-aria/interactions';\nimport {useSpinButton} from '@react-aria/spinbutton';\n\nexport interface NumberFieldAria {\n /** Props for the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the group wrapper around the input and stepper buttons. */\n groupProps: DOMAttributes,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the increment button, to be passed to [useButton](useButton.html). */\n incrementButtonProps: AriaButtonProps,\n /** Props for the decrement button, to be passed to [useButton](useButton.html). */\n decrementButtonProps: AriaButtonProps,\n /** Props for the number field's description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the number field's error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a number field component.\n * Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nexport function useNumberField(props: AriaNumberFieldProps, state: NumberFieldState, inputRef: RefObject<HTMLInputElement>): NumberFieldAria {\n let {\n id,\n decrementAriaLabel,\n incrementAriaLabel,\n isDisabled,\n isReadOnly,\n isRequired,\n minValue,\n maxValue,\n autoFocus,\n validationState,\n label,\n formatOptions,\n onBlur = () => {},\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage,\n ...otherProps\n } = props;\n\n let {\n increment,\n incrementToMax,\n decrement,\n decrementToMin,\n numberValue,\n commit\n } = state;\n\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n let inputId = useId(id);\n\n let {focusProps} = useFocus({\n onBlur: () => {\n // Set input value to normalized valid value\n commit();\n }\n });\n\n let {\n spinButtonProps,\n incrementButtonProps: incButtonProps,\n decrementButtonProps: decButtonProps\n } = useSpinButton(\n {\n isDisabled,\n isReadOnly,\n isRequired,\n maxValue,\n minValue,\n onIncrement: increment,\n onIncrementToMax: incrementToMax,\n onDecrement: decrement,\n onDecrementToMin: decrementToMin,\n value: numberValue,\n textValue: state.inputValue\n }\n );\n\n let [focusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({isDisabled, onFocusWithinChange: setFocusWithin});\n\n let onWheel = useCallback((e) => {\n // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change\n // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec\n // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication\n // especially if the user is scrolling near 45deg\n if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {\n return;\n }\n if (e.deltaY > 0) {\n increment();\n } else if (e.deltaY < 0) {\n decrement();\n }\n }, [decrement, increment]);\n // If the input isn't supposed to receive input, disable scrolling.\n let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;\n useScrollWheel({onScroll: onWheel, isDisabled: scrollingDisabled}, inputRef);\n\n // The inputMode attribute influences the software keyboard that is shown on touch devices.\n // Browsers and operating systems are quite inconsistent about what keys are available, however.\n // We choose between numeric and decimal based on whether we allow negative and fractional numbers,\n // and based on testing on various devices to determine what keys are available in each inputMode.\n let numberFormatter = useNumberFormatter(formatOptions);\n let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);\n let hasDecimals = intlOptions.maximumFractionDigits > 0;\n let hasNegative = isNaN(state.minValue) || state.minValue < 0;\n let inputMode: TextInputDOMProps['inputMode'] = 'numeric';\n if (isIPhone()) {\n // iPhone doesn't have a minus sign in either numeric or decimal.\n // Note this is only for iPhone, not iPad, which always has both\n // minus and decimal in numeric.\n if (hasNegative) {\n inputMode = 'text';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n } else if (isAndroid()) {\n // Android numeric has both a decimal point and minus key.\n // decimal does not have a minus key.\n if (hasNegative) {\n inputMode = 'numeric';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n }\n\n let onChange = value => {\n state.setInputValue(value);\n };\n\n let domProps = filterDOMProps(props);\n\n let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps} = useFormattedTextField({\n ...otherProps,\n ...domProps,\n label,\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n validationState,\n value: state.inputValue,\n defaultValue: undefined, // defaultValue already used to populate state.inputValue, unneeded here\n autoComplete: 'off',\n 'aria-label': props['aria-label'] || null,\n 'aria-labelledby': props['aria-labelledby'] || null,\n id: inputId,\n type: 'text', // Can't use type=\"number\" because then we can't have things like $ in the field.\n inputMode,\n onChange,\n onBlur,\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage\n }, state, inputRef);\n\n let inputProps = mergeProps(\n spinButtonProps,\n focusProps,\n textFieldProps,\n {\n // override the spinbutton role, we can't focus a spin button with VO\n role: null,\n // ignore aria-roledescription on iOS so that required state will announce when it is present\n 'aria-roledescription': (!isIOS() ? stringFormatter.format('numberField') : null),\n 'aria-valuemax': null,\n 'aria-valuemin': null,\n 'aria-valuenow': null,\n 'aria-valuetext': null,\n autoCorrect: 'off',\n spellCheck: 'false'\n }\n );\n\n let onButtonPressStart = (e) => {\n // If focus is already on the input, keep it there so we don't hide the\n // software keyboard when tapping the increment/decrement buttons.\n if (document.activeElement === inputRef.current) {\n return;\n }\n\n // Otherwise, when using a mouse, move focus to the input.\n // On touch, or with a screen reader, focus the button so that the software\n // keyboard does not appear and the screen reader cursor is not moved off the button.\n if (e.pointerType === 'mouse') {\n inputRef.current.focus();\n } else {\n e.target.focus();\n }\n };\n\n // Determine the label for the increment and decrement buttons. There are 4 cases:\n //\n // 1. With a visible label that is a string: aria-label: `Increase ${props.label}`\n // 2. With a visible label that is JSX: aria-label: 'Increase', aria-labelledby: '${incrementId} ${labelId}'\n // 3. With an aria-label: aria-label: `Increase ${props['aria-label']}`\n // 4. With an aria-labelledby: aria-label: 'Increase', aria-labelledby: `${incrementId} ${props['aria-labelledby']}`\n //\n // (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in\n // the aria-label string rather than using aria-labelledby gives more flexibility to translators to change\n // the order or add additional words around the label if needed.\n let fieldLabel = props['aria-label'] || (typeof props.label === 'string' ? props.label : '');\n let ariaLabelledby: string;\n if (!fieldLabel) {\n ariaLabelledby = props.label != null ? labelProps.id : props['aria-labelledby'];\n }\n\n let incrementId = useId();\n let decrementId = useId();\n\n let incrementButtonProps: AriaButtonProps = mergeProps(incButtonProps, {\n 'aria-label': incrementAriaLabel || stringFormatter.format('increase', {fieldLabel}).trim(),\n id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,\n 'aria-labelledby': ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canIncrement,\n onPressStart: onButtonPressStart\n });\n\n let decrementButtonProps: AriaButtonProps = mergeProps(decButtonProps, {\n 'aria-label': decrementAriaLabel || stringFormatter.format('decrease', {fieldLabel}).trim(),\n id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,\n 'aria-labelledby': ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canDecrement,\n onPressStart: onButtonPressStart\n });\n\n return {\n groupProps: {\n role: 'group',\n 'aria-disabled': isDisabled,\n 'aria-invalid': validationState === 'invalid' ? 'true' : undefined,\n ...focusWithinProps\n },\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n errorMessageProps,\n descriptionProps\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 \"decrease\": \"خفض {fieldLabel}\",\n \"increase\": \"زيادة {fieldLabel}\",\n \"numberField\": \"حقل رقمي\"\n}\n","{\n \"decrease\": \"Намаляване {fieldLabel}\",\n \"increase\": \"Усилване {fieldLabel}\",\n \"numberField\": \"Номер на полето\"\n}\n","{\n \"decrease\": \"Snížit {fieldLabel}\",\n \"increase\": \"Zvýšit {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Reducer {fieldLabel}\",\n \"increase\": \"Øg {fieldLabel}\",\n \"numberField\": \"Talfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verringern\",\n \"increase\": \"{fieldLabel} erhöhen\",\n \"numberField\": \"Nummernfeld\"\n}\n","{\n \"decrease\": \"Μείωση {fieldLabel}\",\n \"increase\": \"Αύξηση {fieldLabel}\",\n \"numberField\": \"Πεδίο αριθμού\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Reducir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Vähenda {fieldLabel}\",\n \"increase\": \"Suurenda {fieldLabel}\",\n \"numberField\": \"Numbri väli\"\n}\n","{\n \"decrease\": \"Vähennä {fieldLabel}\",\n \"increase\": \"Lisää {fieldLabel}\",\n \"numberField\": \"Numerokenttä\"\n}\n","{\n \"decrease\": \"Diminuer {fieldLabel}\",\n \"increase\": \"Augmenter {fieldLabel}\",\n \"numberField\": \"Champ de nombre\"\n}\n","{\n \"decrease\": \"הקטן {fieldLabel}\",\n \"increase\": \"הגדל {fieldLabel}\",\n \"numberField\": \"שדה מספר\"\n}\n","{\n \"decrease\": \"Smanji {fieldLabel}\",\n \"increase\": \"Povećaj {fieldLabel}\",\n \"numberField\": \"Polje broja\"\n}\n","{\n \"decrease\": \"{fieldLabel} csökkentése\",\n \"increase\": \"{fieldLabel} növelése\",\n \"numberField\": \"Számmező\"\n}\n","{\n \"decrease\": \"Riduci {fieldLabel}\",\n \"increase\": \"Aumenta {fieldLabel}\",\n \"numberField\": \"Campo numero\"\n}\n","{\n \"decrease\": \"{fieldLabel}を縮小\",\n \"increase\": \"{fieldLabel}を拡大\",\n \"numberField\": \"数値フィールド\"\n}\n","{\n \"decrease\": \"{fieldLabel} 감소\",\n \"increase\": \"{fieldLabel} 증가\",\n \"numberField\": \"번호 필드\"\n}\n","{\n \"decrease\": \"Sumažinti {fieldLabel}\",\n \"increase\": \"Padidinti {fieldLabel}\",\n \"numberField\": \"Numerio laukas\"\n}\n","{\n \"decrease\": \"Samazināšana {fieldLabel}\",\n \"increase\": \"Palielināšana {fieldLabel}\",\n \"numberField\": \"Skaitļu lauks\"\n}\n","{\n \"decrease\": \"Reduser {fieldLabel}\",\n \"increase\": \"Øk {fieldLabel}\",\n \"numberField\": \"Tallfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verlagen\",\n \"increase\": \"{fieldLabel} verhogen\",\n \"numberField\": \"Getalveld\"\n}\n","{\n \"decrease\": \"Zmniejsz {fieldLabel}\",\n \"increase\": \"Zwiększ {fieldLabel}\",\n \"numberField\": \"Pole numeru\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo numérico\"\n}\n","{\n \"decrease\": \"Scădere {fieldLabel}\",\n \"increase\": \"Creștere {fieldLabel}\",\n \"numberField\": \"Câmp numeric\"\n}\n","{\n \"decrease\": \"Уменьшение {fieldLabel}\",\n \"increase\": \"Увеличение {fieldLabel}\",\n \"numberField\": \"Числовое поле\"\n}\n","{\n \"decrease\": \"Znížiť {fieldLabel}\",\n \"increase\": \"Zvýšiť {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Upadati {fieldLabel}\",\n \"increase\": \"Povečajte {fieldLabel}\",\n \"numberField\": \"Številčno polje\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Minska {fieldLabel}\",\n \"increase\": \"Öka {fieldLabel}\",\n \"numberField\": \"Nummerfält\"\n}\n","{\n \"decrease\": \"{fieldLabel} azalt\",\n \"increase\": \"{fieldLabel} arttır\",\n \"numberField\": \"Sayı alanı\"\n}\n","{\n \"decrease\": \"Зменшити {fieldLabel}\",\n \"increase\": \"Збільшити {fieldLabel}\",\n \"numberField\": \"Поле номера\"\n}\n","{\n \"decrease\": \"降低 {fieldLabel}\",\n \"increase\": \"提高 {fieldLabel}\",\n \"numberField\": \"数字字段\"\n}\n","{\n \"decrease\": \"縮小 {fieldLabel}\",\n \"increase\": \"放大 {fieldLabel}\",\n \"numberField\": \"數字欄位\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;AEZA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC,CAAC;IAChE,YAAY,CAAC,OAAS,CAAC,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC;IAChD,eAAe,CAAC,QAAQ,CAAC;AAC3B;;ADHA;;AEAA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,CAAC;IACvE,YAAY,CAAC,OAAS,CAAC,SAAS,EAAE,KAAK,UAAU,CAAC,CAAC;IACnD,eAAe,CAAC,eAAe,CAAC;AAClC;;;;ACHA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,OAAO,EAAE,KAAK,UAAU,CAAC,CAAC;IACnE,YAAY,CAAC,OAAS,CAAC,OAAO,EAAE,KAAK,UAAU,CAAC,CAAC;IACjD,eAAe,CAAC,YAAY,CAAC;AAC/B;;;;ACHA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,QAAQ,EAAE,KAAK,UAAU,CAAC,CAAC;IACpE,YAAY,CAAC,OAAS,CAAC,GAAG,EAAE,KAAK,UAAU,CAAC,CAAC;IAC7C,eAAe,CAAC,OAAO,CAAC;AAC1B;;;;ACHA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,EAAE,KAAK,UAAU,CA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rE,cAAc,sBAAsB,gBAAgB,MAAM,CAAC,YAAY;wBAAC;QAAU,GAAG,IAAI;QACzF,IAAI,kBAAkB,CAAC,qBAAqB,cAAc,IAAI;QAC9D,mBAAmB,kBAAkB,CAAC,qBAAqB,CAAC,EAAE,YAAY,CAAC,EAAE,eAAe,CAAC,GAAG,IAAI;QACpG,iBAAiB;QACjB,qBAAqB,IAAI;QACzB,qBAAqB,IAAI;QACzB,wBAAwB,IAAI;QAC5B,YAAY,CAAC,MAAM,YAAY;QAC/B,cAAc;IAChB;IAEA,IAAI,uBAAwC,CAAA,GAAA,gCAAS,EAAE,gBAAgB;QACrE,cAAc,sBAAsB,gBAAgB,MAAM,CAAC,YAAY;wBAAC;QAAU,GAAG,IAAI;QACzF,IAAI,kBAAkB,CAAC,qBAAqB,cAAc,IAAI;QAC9D,mBAAmB,kBAAkB,CAAC,qBAAqB,CAAC,EAAE,YAAY,CAAC,EAAE,eAAe,CAAC,GAAG,IAAI;QACpG,iBAAiB;QACjB,qBAAqB,IAAI;QACzB,qBAAqB,IAAI;QACzB,wBAAwB,IAAI;QAC5B,YAAY,CAAC,MAAM,YAAY;QAC/B,cAAc;IAChB;IAEA,OAAO;QACL,YAAY;YACV,MAAM;YACN,iBAAiB;YACjB,gBAAgB,oBAAoB,YAAY,SAAS,SAAS;YAClE,GAAG,gBAAgB;QACrB;oBACA;oBACA;8BACA;8BACA;2BACA;0BACA;IACF;AACF;;CDtSC,GACD","sources":["packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/intl/*.js","packages/@react-aria/numberfield/intl/ar-AE.json","packages/@react-aria/numberfield/intl/bg-BG.json","packages/@react-aria/numberfield/intl/cs-CZ.json","packages/@react-aria/numberfield/intl/da-DK.json","packages/@react-aria/numberfield/intl/de-DE.json","packages/@react-aria/numberfield/intl/el-GR.json","packages/@react-aria/numberfield/intl/en-US.json","packages/@react-aria/numberfield/intl/es-ES.json","packages/@react-aria/numberfield/intl/et-EE.json","packages/@react-aria/numberfield/intl/fi-FI.json","packages/@react-aria/numberfield/intl/fr-FR.json","packages/@react-aria/numberfield/intl/he-IL.json","packages/@react-aria/numberfield/intl/hr-HR.json","packages/@react-aria/numberfield/intl/hu-HU.json","packages/@react-aria/numberfield/intl/it-IT.json","packages/@react-aria/numberfield/intl/ja-JP.json","packages/@react-aria/numberfield/intl/ko-KR.json","packages/@react-aria/numberfield/intl/lt-LT.json","packages/@react-aria/numberfield/intl/lv-LV.json","packages/@react-aria/numberfield/intl/nb-NO.json","packages/@react-aria/numberfield/intl/nl-NL.json","packages/@react-aria/numberfield/intl/pl-PL.json","packages/@react-aria/numberfield/intl/pt-BR.json","packages/@react-aria/numberfield/intl/pt-PT.json","packages/@react-aria/numberfield/intl/ro-RO.json","packages/@react-aria/numberfield/intl/ru-RU.json","packages/@react-aria/numberfield/intl/sk-SK.json","packages/@react-aria/numberfield/intl/sl-SI.json","packages/@react-aria/numberfield/intl/sr-SP.json","packages/@react-aria/numberfield/intl/sv-SE.json","packages/@react-aria/numberfield/intl/tr-TR.json","packages/@react-aria/numberfield/intl/uk-UA.json","packages/@react-aria/numberfield/intl/zh-CN.json","packages/@react-aria/numberfield/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 {useNumberField} from './useNumberField';\nexport type {AriaNumberFieldProps} from '@react-types/numberfield';\nexport type {NumberFieldAria} from './useNumberField';\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 {AriaButtonProps} from '@react-types/button';\nimport {AriaNumberFieldProps} from '@react-types/numberfield';\nimport {DOMAttributes, TextInputDOMProps} from '@react-types/shared';\nimport {filterDOMProps, isAndroid, isIOS, isIPhone, mergeProps, useId} from '@react-aria/utils';\nimport {\n InputHTMLAttributes,\n LabelHTMLAttributes,\n RefObject,\n useCallback,\n useMemo,\n useState\n} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {NumberFieldState} from '@react-stately/numberfield';\nimport {useFocus, useFocusWithin} from '@react-aria/interactions';\nimport {useFormattedTextField} from '@react-aria/textfield';\nimport {\n useLocalizedStringFormatter,\n useNumberFormatter\n} from '@react-aria/i18n';\nimport {useScrollWheel} from '@react-aria/interactions';\nimport {useSpinButton} from '@react-aria/spinbutton';\n\nexport interface NumberFieldAria {\n /** Props for the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the group wrapper around the input and stepper buttons. */\n groupProps: DOMAttributes,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the increment button, to be passed to [useButton](useButton.html). */\n incrementButtonProps: AriaButtonProps,\n /** Props for the decrement button, to be passed to [useButton](useButton.html). */\n decrementButtonProps: AriaButtonProps,\n /** Props for the number field's description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the number field's error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a number field component.\n * Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nexport function useNumberField(props: AriaNumberFieldProps, state: NumberFieldState, inputRef: RefObject<HTMLInputElement>): NumberFieldAria {\n let {\n id,\n decrementAriaLabel,\n incrementAriaLabel,\n isDisabled,\n isReadOnly,\n isRequired,\n minValue,\n maxValue,\n autoFocus,\n validationState,\n label,\n formatOptions,\n onBlur = () => {},\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage,\n ...otherProps\n } = props;\n\n let {\n increment,\n incrementToMax,\n decrement,\n decrementToMin,\n numberValue,\n inputValue,\n commit\n } = state;\n\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n let inputId = useId(id);\n\n let {focusProps} = useFocus({\n onBlur: () => {\n // Set input value to normalized valid value\n commit();\n }\n });\n\n let numberFormatter = useNumberFormatter(formatOptions);\n let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);\n\n // Replace negative textValue formatted using currencySign: 'accounting'\n // with a textValue that can be announced using a minus sign.\n let textValueFormatter = useNumberFormatter({...formatOptions, currencySign: undefined});\n let textValue = useMemo(() => isNaN(numberValue) ? '' : textValueFormatter.format(numberValue), [textValueFormatter, numberValue]);\n\n let {\n spinButtonProps,\n incrementButtonProps: incButtonProps,\n decrementButtonProps: decButtonProps\n } = useSpinButton(\n {\n isDisabled,\n isReadOnly,\n isRequired,\n maxValue,\n minValue,\n onIncrement: increment,\n onIncrementToMax: incrementToMax,\n onDecrement: decrement,\n onDecrementToMin: decrementToMin,\n value: numberValue,\n textValue\n }\n );\n\n let [focusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({isDisabled, onFocusWithinChange: setFocusWithin});\n\n let onWheel = useCallback((e) => {\n // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change\n // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec\n // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication\n // especially if the user is scrolling near 45deg\n if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {\n return;\n }\n if (e.deltaY > 0) {\n increment();\n } else if (e.deltaY < 0) {\n decrement();\n }\n }, [decrement, increment]);\n // If the input isn't supposed to receive input, disable scrolling.\n let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;\n useScrollWheel({onScroll: onWheel, isDisabled: scrollingDisabled}, inputRef);\n\n // The inputMode attribute influences the software keyboard that is shown on touch devices.\n // Browsers and operating systems are quite inconsistent about what keys are available, however.\n // We choose between numeric and decimal based on whether we allow negative and fractional numbers,\n // and based on testing on various devices to determine what keys are available in each inputMode.\n let hasDecimals = intlOptions.maximumFractionDigits > 0;\n let hasNegative = isNaN(state.minValue) || state.minValue < 0;\n let inputMode: TextInputDOMProps['inputMode'] = 'numeric';\n if (isIPhone()) {\n // iPhone doesn't have a minus sign in either numeric or decimal.\n // Note this is only for iPhone, not iPad, which always has both\n // minus and decimal in numeric.\n if (hasNegative) {\n inputMode = 'text';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n } else if (isAndroid()) {\n // Android numeric has both a decimal point and minus key.\n // decimal does not have a minus key.\n if (hasNegative) {\n inputMode = 'numeric';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n }\n\n let onChange = value => {\n if (state.validate(value)) {\n state.setInputValue(value);\n }\n };\n\n let domProps = filterDOMProps(props);\n\n let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps} = useFormattedTextField({\n ...otherProps,\n ...domProps,\n label,\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n validationState,\n value: inputValue,\n defaultValue: undefined, // defaultValue already used to populate state.inputValue, unneeded here\n autoComplete: 'off',\n 'aria-label': props['aria-label'] || null,\n 'aria-labelledby': props['aria-labelledby'] || null,\n id: inputId,\n type: 'text', // Can't use type=\"number\" because then we can't have things like $ in the field.\n inputMode,\n onChange,\n onBlur,\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage\n }, state, inputRef);\n\n let inputProps = mergeProps(\n spinButtonProps,\n focusProps,\n textFieldProps,\n {\n // override the spinbutton role, we can't focus a spin button with VO\n role: null,\n // ignore aria-roledescription on iOS so that required state will announce when it is present\n 'aria-roledescription': (!isIOS() ? stringFormatter.format('numberField') : null),\n 'aria-valuemax': null,\n 'aria-valuemin': null,\n 'aria-valuenow': null,\n 'aria-valuetext': null,\n autoCorrect: 'off',\n spellCheck: 'false'\n }\n );\n\n let onButtonPressStart = (e) => {\n // If focus is already on the input, keep it there so we don't hide the\n // software keyboard when tapping the increment/decrement buttons.\n if (document.activeElement === inputRef.current) {\n return;\n }\n\n // Otherwise, when using a mouse, move focus to the input.\n // On touch, or with a screen reader, focus the button so that the software\n // keyboard does not appear and the screen reader cursor is not moved off the button.\n if (e.pointerType === 'mouse') {\n inputRef.current.focus();\n } else {\n e.target.focus();\n }\n };\n\n // Determine the label for the increment and decrement buttons. There are 4 cases:\n //\n // 1. With a visible label that is a string: aria-label: `Increase ${props.label}`\n // 2. With a visible label that is JSX: aria-label: 'Increase', aria-labelledby: '${incrementId} ${labelId}'\n // 3. With an aria-label: aria-label: `Increase ${props['aria-label']}`\n // 4. With an aria-labelledby: aria-label: 'Increase', aria-labelledby: `${incrementId} ${props['aria-labelledby']}`\n //\n // (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in\n // the aria-label string rather than using aria-labelledby gives more flexibility to translators to change\n // the order or add additional words around the label if needed.\n let fieldLabel = props['aria-label'] || (typeof props.label === 'string' ? props.label : '');\n let ariaLabelledby: string;\n if (!fieldLabel) {\n ariaLabelledby = props.label != null ? labelProps.id : props['aria-labelledby'];\n }\n\n let incrementId = useId();\n let decrementId = useId();\n\n let incrementButtonProps: AriaButtonProps = mergeProps(incButtonProps, {\n 'aria-label': incrementAriaLabel || stringFormatter.format('increase', {fieldLabel}).trim(),\n id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,\n 'aria-labelledby': ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canIncrement,\n onPressStart: onButtonPressStart\n });\n\n let decrementButtonProps: AriaButtonProps = mergeProps(decButtonProps, {\n 'aria-label': decrementAriaLabel || stringFormatter.format('decrease', {fieldLabel}).trim(),\n id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,\n 'aria-labelledby': ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canDecrement,\n onPressStart: onButtonPressStart\n });\n\n return {\n groupProps: {\n role: 'group',\n 'aria-disabled': isDisabled,\n 'aria-invalid': validationState === 'invalid' ? 'true' : undefined,\n ...focusWithinProps\n },\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n errorMessageProps,\n descriptionProps\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 \"decrease\": \"خفض {fieldLabel}\",\n \"increase\": \"زيادة {fieldLabel}\",\n \"numberField\": \"حقل رقمي\"\n}\n","{\n \"decrease\": \"Намаляване {fieldLabel}\",\n \"increase\": \"Усилване {fieldLabel}\",\n \"numberField\": \"Номер на полето\"\n}\n","{\n \"decrease\": \"Snížit {fieldLabel}\",\n \"increase\": \"Zvýšit {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Reducer {fieldLabel}\",\n \"increase\": \"Øg {fieldLabel}\",\n \"numberField\": \"Talfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verringern\",\n \"increase\": \"{fieldLabel} erhöhen\",\n \"numberField\": \"Nummernfeld\"\n}\n","{\n \"decrease\": \"Μείωση {fieldLabel}\",\n \"increase\": \"Αύξηση {fieldLabel}\",\n \"numberField\": \"Πεδίο αριθμού\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Reducir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Vähenda {fieldLabel}\",\n \"increase\": \"Suurenda {fieldLabel}\",\n \"numberField\": \"Numbri väli\"\n}\n","{\n \"decrease\": \"Vähennä {fieldLabel}\",\n \"increase\": \"Lisää {fieldLabel}\",\n \"numberField\": \"Numerokenttä\"\n}\n","{\n \"decrease\": \"Diminuer {fieldLabel}\",\n \"increase\": \"Augmenter {fieldLabel}\",\n \"numberField\": \"Champ de nombre\"\n}\n","{\n \"decrease\": \"הקטן {fieldLabel}\",\n \"increase\": \"הגדל {fieldLabel}\",\n \"numberField\": \"שדה מספר\"\n}\n","{\n \"decrease\": \"Smanji {fieldLabel}\",\n \"increase\": \"Povećaj {fieldLabel}\",\n \"numberField\": \"Polje broja\"\n}\n","{\n \"decrease\": \"{fieldLabel} csökkentése\",\n \"increase\": \"{fieldLabel} növelése\",\n \"numberField\": \"Számmező\"\n}\n","{\n \"decrease\": \"Riduci {fieldLabel}\",\n \"increase\": \"Aumenta {fieldLabel}\",\n \"numberField\": \"Campo numero\"\n}\n","{\n \"decrease\": \"{fieldLabel}を縮小\",\n \"increase\": \"{fieldLabel}を拡大\",\n \"numberField\": \"数値フィールド\"\n}\n","{\n \"decrease\": \"{fieldLabel} 감소\",\n \"increase\": \"{fieldLabel} 증가\",\n \"numberField\": \"번호 필드\"\n}\n","{\n \"decrease\": \"Sumažinti {fieldLabel}\",\n \"increase\": \"Padidinti {fieldLabel}\",\n \"numberField\": \"Numerio laukas\"\n}\n","{\n \"decrease\": \"Samazināšana {fieldLabel}\",\n \"increase\": \"Palielināšana {fieldLabel}\",\n \"numberField\": \"Skaitļu lauks\"\n}\n","{\n \"decrease\": \"Reduser {fieldLabel}\",\n \"increase\": \"Øk {fieldLabel}\",\n \"numberField\": \"Tallfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verlagen\",\n \"increase\": \"{fieldLabel} verhogen\",\n \"numberField\": \"Getalveld\"\n}\n","{\n \"decrease\": \"Zmniejsz {fieldLabel}\",\n \"increase\": \"Zwiększ {fieldLabel}\",\n \"numberField\": \"Pole numeru\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo numérico\"\n}\n","{\n \"decrease\": \"Scădere {fieldLabel}\",\n \"increase\": \"Creștere {fieldLabel}\",\n \"numberField\": \"Câmp numeric\"\n}\n","{\n \"decrease\": \"Уменьшение {fieldLabel}\",\n \"increase\": \"Увеличение {fieldLabel}\",\n \"numberField\": \"Числовое поле\"\n}\n","{\n \"decrease\": \"Znížiť {fieldLabel}\",\n \"increase\": \"Zvýšiť {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Upadati {fieldLabel}\",\n \"increase\": \"Povečajte {fieldLabel}\",\n \"numberField\": \"Številčno polje\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Minska {fieldLabel}\",\n \"increase\": \"Öka {fieldLabel}\",\n \"numberField\": \"Nummerfält\"\n}\n","{\n \"decrease\": \"{fieldLabel} azalt\",\n \"increase\": \"{fieldLabel} arttır\",\n \"numberField\": \"Sayı alanı\"\n}\n","{\n \"decrease\": \"Зменшити {fieldLabel}\",\n \"increase\": \"Збільшити {fieldLabel}\",\n \"numberField\": \"Поле номера\"\n}\n","{\n \"decrease\": \"降低 {fieldLabel}\",\n \"increase\": \"提高 {fieldLabel}\",\n \"numberField\": \"数字字段\"\n}\n","{\n \"decrease\": \"縮小 {fieldLabel}\",\n \"increase\": \"放大 {fieldLabel}\",\n \"numberField\": \"數字欄位\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {useId as $gfhJl$useId, isIPhone as $gfhJl$isIPhone, isAndroid as $gfhJl$isAndroid, filterDOMProps as $gfhJl$filterDOMProps, mergeProps as $gfhJl$mergeProps, isIOS as $gfhJl$isIOS} from "@react-aria/utils";
|
|
2
|
-
import {
|
|
2
|
+
import {useMemo as $gfhJl$useMemo, useState as $gfhJl$useState, useCallback as $gfhJl$useCallback} from "react";
|
|
3
3
|
import {useFocus as $gfhJl$useFocus, useFocusWithin as $gfhJl$useFocusWithin, useScrollWheel as $gfhJl$useScrollWheel} from "@react-aria/interactions";
|
|
4
4
|
import {useFormattedTextField as $gfhJl$useFormattedTextField} from "@react-aria/textfield";
|
|
5
5
|
import {useLocalizedStringFormatter as $gfhJl$useLocalizedStringFormatter, useNumberFormatter as $gfhJl$useNumberFormatter} from "@react-aria/i18n";
|
|
@@ -348,7 +348,7 @@ $c3ef0f8b54adbb57$exports = {
|
|
|
348
348
|
|
|
349
349
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
350
350
|
let { id: id , decrementAriaLabel: decrementAriaLabel , incrementAriaLabel: incrementAriaLabel , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , minValue: minValue , maxValue: maxValue , autoFocus: autoFocus , validationState: validationState , label: label , formatOptions: formatOptions , onBlur: onBlur = ()=>{} , onFocus: onFocus , onFocusChange: onFocusChange , onKeyDown: onKeyDown , onKeyUp: onKeyUp , description: description , errorMessage: errorMessage , ...otherProps } = props;
|
|
351
|
-
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , commit: commit } = state;
|
|
351
|
+
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , inputValue: inputValue , commit: commit } = state;
|
|
352
352
|
const stringFormatter = (0, $gfhJl$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c3ef0f8b54adbb57$exports))));
|
|
353
353
|
let inputId = (0, $gfhJl$useId)(id);
|
|
354
354
|
let { focusProps: focusProps } = (0, $gfhJl$useFocus)({
|
|
@@ -357,6 +357,20 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
357
357
|
commit();
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
|
+
let numberFormatter = (0, $gfhJl$useNumberFormatter)(formatOptions);
|
|
361
|
+
let intlOptions = (0, $gfhJl$useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
362
|
+
numberFormatter
|
|
363
|
+
]);
|
|
364
|
+
// Replace negative textValue formatted using currencySign: 'accounting'
|
|
365
|
+
// with a textValue that can be announced using a minus sign.
|
|
366
|
+
let textValueFormatter = (0, $gfhJl$useNumberFormatter)({
|
|
367
|
+
...formatOptions,
|
|
368
|
+
currencySign: undefined
|
|
369
|
+
});
|
|
370
|
+
let textValue = (0, $gfhJl$useMemo)(()=>isNaN(numberValue) ? "" : textValueFormatter.format(numberValue), [
|
|
371
|
+
textValueFormatter,
|
|
372
|
+
numberValue
|
|
373
|
+
]);
|
|
360
374
|
let { spinButtonProps: spinButtonProps , incrementButtonProps: incButtonProps , decrementButtonProps: decButtonProps } = (0, $gfhJl$useSpinButton)({
|
|
361
375
|
isDisabled: isDisabled,
|
|
362
376
|
isReadOnly: isReadOnly,
|
|
@@ -368,7 +382,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
368
382
|
onDecrement: decrement,
|
|
369
383
|
onDecrementToMin: decrementToMin,
|
|
370
384
|
value: numberValue,
|
|
371
|
-
textValue:
|
|
385
|
+
textValue: textValue
|
|
372
386
|
});
|
|
373
387
|
let [focusWithin, setFocusWithin] = (0, $gfhJl$useState)(false);
|
|
374
388
|
let { focusWithinProps: focusWithinProps } = (0, $gfhJl$useFocusWithin)({
|
|
@@ -397,10 +411,6 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
397
411
|
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
398
412
|
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
399
413
|
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
400
|
-
let numberFormatter = (0, $gfhJl$useNumberFormatter)(formatOptions);
|
|
401
|
-
let intlOptions = (0, $gfhJl$useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
402
|
-
numberFormatter
|
|
403
|
-
]);
|
|
404
414
|
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
405
415
|
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
406
416
|
let inputMode = "numeric";
|
|
@@ -417,7 +427,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
417
427
|
else if (hasDecimals) inputMode = "decimal";
|
|
418
428
|
}
|
|
419
429
|
let onChange = (value)=>{
|
|
420
|
-
state.setInputValue(value);
|
|
430
|
+
if (state.validate(value)) state.setInputValue(value);
|
|
421
431
|
};
|
|
422
432
|
let domProps = (0, $gfhJl$filterDOMProps)(props);
|
|
423
433
|
let { labelProps: labelProps , inputProps: textFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $gfhJl$useFormattedTextField)({
|
|
@@ -429,7 +439,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
429
439
|
isReadOnly: isReadOnly,
|
|
430
440
|
isRequired: isRequired,
|
|
431
441
|
validationState: validationState,
|
|
432
|
-
value:
|
|
442
|
+
value: inputValue,
|
|
433
443
|
defaultValue: undefined,
|
|
434
444
|
autoComplete: "off",
|
|
435
445
|
"aria-label": props["aria-label"] || null,
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;AEZA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC,CAAC;IAChE,YAAY,CAAC,OAAS,CAAC,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC;IAChD,eAAe,CAAC,QAAQ,CAAC;AAC3B;;ADHA;;AEAA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,CAAC;IACvE,YAAY,CAAC,OAAS,CAAC,SAAS,EAAE,KAAK,UAAU,CAAC,CAAC;IACnD,eAAe,CAAC,eAAe,CAAC;AAClC;;;;ACHA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,OAAO,EAAE,KAAK,UAAU,CAAC,CAAC;IACnE,YAAY,CAAC,OAAS,CAAC,OAAO,EAAE,KAAK,UAAU,CAAC,CAAC;IACjD,eAAe,CAAC,YAAY,CAAC;AAC/B;;;;ACHA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,QAAQ,EAAE,KAAK,UAAU,CAAC,CAAC;IACpE,YAAY,CAAC,OAAS,CAAC,GAAG,EAAE,KAAK,UAAU,CAAC,CAAC;IAC7C,eAAe,CAAC,OAAO,CAAC;AAC1B;;;;ACHA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,EAAE,KAAK,UAAU,CAAC,WAAW,CAAC;IACvE,YAAY,CAAC,OAAS,CAAC,EAAE,KAAK,UAAU,CAAC,QAAQ,CAAC;IAClD,eAAe,CAAC,WAAW,CAAC;AAC9B;;;;ACHA,4BAAiB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ACrE,cAAc,sBAAsB,gBAAgB,MAAM,CAAC,YAAY;wBAAC;QAAU,GAAG,IAAI;QACzF,IAAI,kBAAkB,CAAC,qBAAqB,cAAc,IAAI;QAC9D,mBAAmB,kBAAkB,CAAC,qBAAqB,CAAC,EAAE,YAAY,CAAC,EAAE,eAAe,CAAC,GAAG,IAAI;QACpG,iBAAiB;QACjB,qBAAqB,IAAI;QACzB,qBAAqB,IAAI;QACzB,wBAAwB,IAAI;QAC5B,YAAY,CAAC,MAAM,YAAY;QAC/B,cAAc;IAChB;IAEA,OAAO;QACL,YAAY;YACV,MAAM;YACN,iBAAiB;YACjB,gBAAgB,oBAAoB,YAAY,SAAS,SAAS;YAClE,GAAG,gBAAgB;QACrB;oBACA;oBACA;8BACA;8BACA;2BACA;0BACA;IACF;AACF;;CD7RC,GACD","sources":["packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/intl/*.js","packages/@react-aria/numberfield/intl/ar-AE.json","packages/@react-aria/numberfield/intl/bg-BG.json","packages/@react-aria/numberfield/intl/cs-CZ.json","packages/@react-aria/numberfield/intl/da-DK.json","packages/@react-aria/numberfield/intl/de-DE.json","packages/@react-aria/numberfield/intl/el-GR.json","packages/@react-aria/numberfield/intl/en-US.json","packages/@react-aria/numberfield/intl/es-ES.json","packages/@react-aria/numberfield/intl/et-EE.json","packages/@react-aria/numberfield/intl/fi-FI.json","packages/@react-aria/numberfield/intl/fr-FR.json","packages/@react-aria/numberfield/intl/he-IL.json","packages/@react-aria/numberfield/intl/hr-HR.json","packages/@react-aria/numberfield/intl/hu-HU.json","packages/@react-aria/numberfield/intl/it-IT.json","packages/@react-aria/numberfield/intl/ja-JP.json","packages/@react-aria/numberfield/intl/ko-KR.json","packages/@react-aria/numberfield/intl/lt-LT.json","packages/@react-aria/numberfield/intl/lv-LV.json","packages/@react-aria/numberfield/intl/nb-NO.json","packages/@react-aria/numberfield/intl/nl-NL.json","packages/@react-aria/numberfield/intl/pl-PL.json","packages/@react-aria/numberfield/intl/pt-BR.json","packages/@react-aria/numberfield/intl/pt-PT.json","packages/@react-aria/numberfield/intl/ro-RO.json","packages/@react-aria/numberfield/intl/ru-RU.json","packages/@react-aria/numberfield/intl/sk-SK.json","packages/@react-aria/numberfield/intl/sl-SI.json","packages/@react-aria/numberfield/intl/sr-SP.json","packages/@react-aria/numberfield/intl/sv-SE.json","packages/@react-aria/numberfield/intl/tr-TR.json","packages/@react-aria/numberfield/intl/uk-UA.json","packages/@react-aria/numberfield/intl/zh-CN.json","packages/@react-aria/numberfield/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 {useNumberField} from './useNumberField';\nexport type {AriaNumberFieldProps} from '@react-types/numberfield';\nexport type {NumberFieldAria} from './useNumberField';\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 {AriaButtonProps} from '@react-types/button';\nimport {AriaNumberFieldProps} from '@react-types/numberfield';\nimport {DOMAttributes, TextInputDOMProps} from '@react-types/shared';\nimport {filterDOMProps, isAndroid, isIOS, isIPhone, mergeProps, useId} from '@react-aria/utils';\nimport {\n InputHTMLAttributes,\n LabelHTMLAttributes,\n RefObject,\n useCallback,\n useMemo,\n useState\n} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {NumberFieldState} from '@react-stately/numberfield';\nimport {useFocus, useFocusWithin} from '@react-aria/interactions';\nimport {useFormattedTextField} from '@react-aria/textfield';\nimport {\n useLocalizedStringFormatter,\n useNumberFormatter\n} from '@react-aria/i18n';\nimport {useScrollWheel} from '@react-aria/interactions';\nimport {useSpinButton} from '@react-aria/spinbutton';\n\nexport interface NumberFieldAria {\n /** Props for the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the group wrapper around the input and stepper buttons. */\n groupProps: DOMAttributes,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the increment button, to be passed to [useButton](useButton.html). */\n incrementButtonProps: AriaButtonProps,\n /** Props for the decrement button, to be passed to [useButton](useButton.html). */\n decrementButtonProps: AriaButtonProps,\n /** Props for the number field's description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the number field's error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a number field component.\n * Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nexport function useNumberField(props: AriaNumberFieldProps, state: NumberFieldState, inputRef: RefObject<HTMLInputElement>): NumberFieldAria {\n let {\n id,\n decrementAriaLabel,\n incrementAriaLabel,\n isDisabled,\n isReadOnly,\n isRequired,\n minValue,\n maxValue,\n autoFocus,\n validationState,\n label,\n formatOptions,\n onBlur = () => {},\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage,\n ...otherProps\n } = props;\n\n let {\n increment,\n incrementToMax,\n decrement,\n decrementToMin,\n numberValue,\n commit\n } = state;\n\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n let inputId = useId(id);\n\n let {focusProps} = useFocus({\n onBlur: () => {\n // Set input value to normalized valid value\n commit();\n }\n });\n\n let {\n spinButtonProps,\n incrementButtonProps: incButtonProps,\n decrementButtonProps: decButtonProps\n } = useSpinButton(\n {\n isDisabled,\n isReadOnly,\n isRequired,\n maxValue,\n minValue,\n onIncrement: increment,\n onIncrementToMax: incrementToMax,\n onDecrement: decrement,\n onDecrementToMin: decrementToMin,\n value: numberValue,\n textValue: state.inputValue\n }\n );\n\n let [focusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({isDisabled, onFocusWithinChange: setFocusWithin});\n\n let onWheel = useCallback((e) => {\n // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change\n // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec\n // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication\n // especially if the user is scrolling near 45deg\n if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {\n return;\n }\n if (e.deltaY > 0) {\n increment();\n } else if (e.deltaY < 0) {\n decrement();\n }\n }, [decrement, increment]);\n // If the input isn't supposed to receive input, disable scrolling.\n let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;\n useScrollWheel({onScroll: onWheel, isDisabled: scrollingDisabled}, inputRef);\n\n // The inputMode attribute influences the software keyboard that is shown on touch devices.\n // Browsers and operating systems are quite inconsistent about what keys are available, however.\n // We choose between numeric and decimal based on whether we allow negative and fractional numbers,\n // and based on testing on various devices to determine what keys are available in each inputMode.\n let numberFormatter = useNumberFormatter(formatOptions);\n let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);\n let hasDecimals = intlOptions.maximumFractionDigits > 0;\n let hasNegative = isNaN(state.minValue) || state.minValue < 0;\n let inputMode: TextInputDOMProps['inputMode'] = 'numeric';\n if (isIPhone()) {\n // iPhone doesn't have a minus sign in either numeric or decimal.\n // Note this is only for iPhone, not iPad, which always has both\n // minus and decimal in numeric.\n if (hasNegative) {\n inputMode = 'text';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n } else if (isAndroid()) {\n // Android numeric has both a decimal point and minus key.\n // decimal does not have a minus key.\n if (hasNegative) {\n inputMode = 'numeric';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n }\n\n let onChange = value => {\n state.setInputValue(value);\n };\n\n let domProps = filterDOMProps(props);\n\n let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps} = useFormattedTextField({\n ...otherProps,\n ...domProps,\n label,\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n validationState,\n value: state.inputValue,\n defaultValue: undefined, // defaultValue already used to populate state.inputValue, unneeded here\n autoComplete: 'off',\n 'aria-label': props['aria-label'] || null,\n 'aria-labelledby': props['aria-labelledby'] || null,\n id: inputId,\n type: 'text', // Can't use type=\"number\" because then we can't have things like $ in the field.\n inputMode,\n onChange,\n onBlur,\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage\n }, state, inputRef);\n\n let inputProps = mergeProps(\n spinButtonProps,\n focusProps,\n textFieldProps,\n {\n // override the spinbutton role, we can't focus a spin button with VO\n role: null,\n // ignore aria-roledescription on iOS so that required state will announce when it is present\n 'aria-roledescription': (!isIOS() ? stringFormatter.format('numberField') : null),\n 'aria-valuemax': null,\n 'aria-valuemin': null,\n 'aria-valuenow': null,\n 'aria-valuetext': null,\n autoCorrect: 'off',\n spellCheck: 'false'\n }\n );\n\n let onButtonPressStart = (e) => {\n // If focus is already on the input, keep it there so we don't hide the\n // software keyboard when tapping the increment/decrement buttons.\n if (document.activeElement === inputRef.current) {\n return;\n }\n\n // Otherwise, when using a mouse, move focus to the input.\n // On touch, or with a screen reader, focus the button so that the software\n // keyboard does not appear and the screen reader cursor is not moved off the button.\n if (e.pointerType === 'mouse') {\n inputRef.current.focus();\n } else {\n e.target.focus();\n }\n };\n\n // Determine the label for the increment and decrement buttons. There are 4 cases:\n //\n // 1. With a visible label that is a string: aria-label: `Increase ${props.label}`\n // 2. With a visible label that is JSX: aria-label: 'Increase', aria-labelledby: '${incrementId} ${labelId}'\n // 3. With an aria-label: aria-label: `Increase ${props['aria-label']}`\n // 4. With an aria-labelledby: aria-label: 'Increase', aria-labelledby: `${incrementId} ${props['aria-labelledby']}`\n //\n // (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in\n // the aria-label string rather than using aria-labelledby gives more flexibility to translators to change\n // the order or add additional words around the label if needed.\n let fieldLabel = props['aria-label'] || (typeof props.label === 'string' ? props.label : '');\n let ariaLabelledby: string;\n if (!fieldLabel) {\n ariaLabelledby = props.label != null ? labelProps.id : props['aria-labelledby'];\n }\n\n let incrementId = useId();\n let decrementId = useId();\n\n let incrementButtonProps: AriaButtonProps = mergeProps(incButtonProps, {\n 'aria-label': incrementAriaLabel || stringFormatter.format('increase', {fieldLabel}).trim(),\n id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,\n 'aria-labelledby': ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canIncrement,\n onPressStart: onButtonPressStart\n });\n\n let decrementButtonProps: AriaButtonProps = mergeProps(decButtonProps, {\n 'aria-label': decrementAriaLabel || stringFormatter.format('decrease', {fieldLabel}).trim(),\n id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,\n 'aria-labelledby': ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canDecrement,\n onPressStart: onButtonPressStart\n });\n\n return {\n groupProps: {\n role: 'group',\n 'aria-disabled': isDisabled,\n 'aria-invalid': validationState === 'invalid' ? 'true' : undefined,\n ...focusWithinProps\n },\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n errorMessageProps,\n descriptionProps\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 \"decrease\": \"خفض {fieldLabel}\",\n \"increase\": \"زيادة {fieldLabel}\",\n \"numberField\": \"حقل رقمي\"\n}\n","{\n \"decrease\": \"Намаляване {fieldLabel}\",\n \"increase\": \"Усилване {fieldLabel}\",\n \"numberField\": \"Номер на полето\"\n}\n","{\n \"decrease\": \"Snížit {fieldLabel}\",\n \"increase\": \"Zvýšit {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Reducer {fieldLabel}\",\n \"increase\": \"Øg {fieldLabel}\",\n \"numberField\": \"Talfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verringern\",\n \"increase\": \"{fieldLabel} erhöhen\",\n \"numberField\": \"Nummernfeld\"\n}\n","{\n \"decrease\": \"Μείωση {fieldLabel}\",\n \"increase\": \"Αύξηση {fieldLabel}\",\n \"numberField\": \"Πεδίο αριθμού\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Reducir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Vähenda {fieldLabel}\",\n \"increase\": \"Suurenda {fieldLabel}\",\n \"numberField\": \"Numbri väli\"\n}\n","{\n \"decrease\": \"Vähennä {fieldLabel}\",\n \"increase\": \"Lisää {fieldLabel}\",\n \"numberField\": \"Numerokenttä\"\n}\n","{\n \"decrease\": \"Diminuer {fieldLabel}\",\n \"increase\": \"Augmenter {fieldLabel}\",\n \"numberField\": \"Champ de nombre\"\n}\n","{\n \"decrease\": \"הקטן {fieldLabel}\",\n \"increase\": \"הגדל {fieldLabel}\",\n \"numberField\": \"שדה מספר\"\n}\n","{\n \"decrease\": \"Smanji {fieldLabel}\",\n \"increase\": \"Povećaj {fieldLabel}\",\n \"numberField\": \"Polje broja\"\n}\n","{\n \"decrease\": \"{fieldLabel} csökkentése\",\n \"increase\": \"{fieldLabel} növelése\",\n \"numberField\": \"Számmező\"\n}\n","{\n \"decrease\": \"Riduci {fieldLabel}\",\n \"increase\": \"Aumenta {fieldLabel}\",\n \"numberField\": \"Campo numero\"\n}\n","{\n \"decrease\": \"{fieldLabel}を縮小\",\n \"increase\": \"{fieldLabel}を拡大\",\n \"numberField\": \"数値フィールド\"\n}\n","{\n \"decrease\": \"{fieldLabel} 감소\",\n \"increase\": \"{fieldLabel} 증가\",\n \"numberField\": \"번호 필드\"\n}\n","{\n \"decrease\": \"Sumažinti {fieldLabel}\",\n \"increase\": \"Padidinti {fieldLabel}\",\n \"numberField\": \"Numerio laukas\"\n}\n","{\n \"decrease\": \"Samazināšana {fieldLabel}\",\n \"increase\": \"Palielināšana {fieldLabel}\",\n \"numberField\": \"Skaitļu lauks\"\n}\n","{\n \"decrease\": \"Reduser {fieldLabel}\",\n \"increase\": \"Øk {fieldLabel}\",\n \"numberField\": \"Tallfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verlagen\",\n \"increase\": \"{fieldLabel} verhogen\",\n \"numberField\": \"Getalveld\"\n}\n","{\n \"decrease\": \"Zmniejsz {fieldLabel}\",\n \"increase\": \"Zwiększ {fieldLabel}\",\n \"numberField\": \"Pole numeru\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo numérico\"\n}\n","{\n \"decrease\": \"Scădere {fieldLabel}\",\n \"increase\": \"Creștere {fieldLabel}\",\n \"numberField\": \"Câmp numeric\"\n}\n","{\n \"decrease\": \"Уменьшение {fieldLabel}\",\n \"increase\": \"Увеличение {fieldLabel}\",\n \"numberField\": \"Числовое поле\"\n}\n","{\n \"decrease\": \"Znížiť {fieldLabel}\",\n \"increase\": \"Zvýšiť {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Upadati {fieldLabel}\",\n \"increase\": \"Povečajte {fieldLabel}\",\n \"numberField\": \"Številčno polje\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Minska {fieldLabel}\",\n \"increase\": \"Öka {fieldLabel}\",\n \"numberField\": \"Nummerfält\"\n}\n","{\n \"decrease\": \"{fieldLabel} azalt\",\n \"increase\": \"{fieldLabel} arttır\",\n \"numberField\": \"Sayı alanı\"\n}\n","{\n \"decrease\": \"Зменшити {fieldLabel}\",\n \"increase\": \"Збільшити {fieldLabel}\",\n \"numberField\": \"Поле номера\"\n}\n","{\n \"decrease\": \"降低 {fieldLabel}\",\n \"increase\": \"提高 {fieldLabel}\",\n \"numberField\": \"数字字段\"\n}\n","{\n \"decrease\": \"縮小 {fieldLabel}\",\n \"increase\": \"放大 {fieldLabel}\",\n \"numberField\": \"數字欄位\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;AEZA,4BAAiB;IAAG,YAAY,CAAC,OAAS,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC,CAAC;IAChE,YAAY,CAAC,OAAS,CAAC,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC;IAChD,eAAe,CAAC,QAAQ,CAAC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AAI;QACpG,iBAAiB;QACjB,qBAAqB,IAAI;QACzB,qBAAqB,IAAI;QACzB,wBAAwB,IAAI;QAC5B,YAAY,CAAC,MAAM,YAAY;QAC/B,cAAc;IAChB;IAEA,OAAO;QACL,YAAY;YACV,MAAM;YACN,iBAAiB;YACjB,gBAAgB,oBAAoB,YAAY,SAAS,SAAS;YAClE,GAAG,gBAAgB;QACrB;oBACA;oBACA;8BACA;8BACA;2BACA;0BACA;IACF;AACF;;CDtSC,GACD","sources":["packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/intl/*.js","packages/@react-aria/numberfield/intl/ar-AE.json","packages/@react-aria/numberfield/intl/bg-BG.json","packages/@react-aria/numberfield/intl/cs-CZ.json","packages/@react-aria/numberfield/intl/da-DK.json","packages/@react-aria/numberfield/intl/de-DE.json","packages/@react-aria/numberfield/intl/el-GR.json","packages/@react-aria/numberfield/intl/en-US.json","packages/@react-aria/numberfield/intl/es-ES.json","packages/@react-aria/numberfield/intl/et-EE.json","packages/@react-aria/numberfield/intl/fi-FI.json","packages/@react-aria/numberfield/intl/fr-FR.json","packages/@react-aria/numberfield/intl/he-IL.json","packages/@react-aria/numberfield/intl/hr-HR.json","packages/@react-aria/numberfield/intl/hu-HU.json","packages/@react-aria/numberfield/intl/it-IT.json","packages/@react-aria/numberfield/intl/ja-JP.json","packages/@react-aria/numberfield/intl/ko-KR.json","packages/@react-aria/numberfield/intl/lt-LT.json","packages/@react-aria/numberfield/intl/lv-LV.json","packages/@react-aria/numberfield/intl/nb-NO.json","packages/@react-aria/numberfield/intl/nl-NL.json","packages/@react-aria/numberfield/intl/pl-PL.json","packages/@react-aria/numberfield/intl/pt-BR.json","packages/@react-aria/numberfield/intl/pt-PT.json","packages/@react-aria/numberfield/intl/ro-RO.json","packages/@react-aria/numberfield/intl/ru-RU.json","packages/@react-aria/numberfield/intl/sk-SK.json","packages/@react-aria/numberfield/intl/sl-SI.json","packages/@react-aria/numberfield/intl/sr-SP.json","packages/@react-aria/numberfield/intl/sv-SE.json","packages/@react-aria/numberfield/intl/tr-TR.json","packages/@react-aria/numberfield/intl/uk-UA.json","packages/@react-aria/numberfield/intl/zh-CN.json","packages/@react-aria/numberfield/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 {useNumberField} from './useNumberField';\nexport type {AriaNumberFieldProps} from '@react-types/numberfield';\nexport type {NumberFieldAria} from './useNumberField';\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 {AriaButtonProps} from '@react-types/button';\nimport {AriaNumberFieldProps} from '@react-types/numberfield';\nimport {DOMAttributes, TextInputDOMProps} from '@react-types/shared';\nimport {filterDOMProps, isAndroid, isIOS, isIPhone, mergeProps, useId} from '@react-aria/utils';\nimport {\n InputHTMLAttributes,\n LabelHTMLAttributes,\n RefObject,\n useCallback,\n useMemo,\n useState\n} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {NumberFieldState} from '@react-stately/numberfield';\nimport {useFocus, useFocusWithin} from '@react-aria/interactions';\nimport {useFormattedTextField} from '@react-aria/textfield';\nimport {\n useLocalizedStringFormatter,\n useNumberFormatter\n} from '@react-aria/i18n';\nimport {useScrollWheel} from '@react-aria/interactions';\nimport {useSpinButton} from '@react-aria/spinbutton';\n\nexport interface NumberFieldAria {\n /** Props for the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the group wrapper around the input and stepper buttons. */\n groupProps: DOMAttributes,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the increment button, to be passed to [useButton](useButton.html). */\n incrementButtonProps: AriaButtonProps,\n /** Props for the decrement button, to be passed to [useButton](useButton.html). */\n decrementButtonProps: AriaButtonProps,\n /** Props for the number field's description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the number field's error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a number field component.\n * Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nexport function useNumberField(props: AriaNumberFieldProps, state: NumberFieldState, inputRef: RefObject<HTMLInputElement>): NumberFieldAria {\n let {\n id,\n decrementAriaLabel,\n incrementAriaLabel,\n isDisabled,\n isReadOnly,\n isRequired,\n minValue,\n maxValue,\n autoFocus,\n validationState,\n label,\n formatOptions,\n onBlur = () => {},\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage,\n ...otherProps\n } = props;\n\n let {\n increment,\n incrementToMax,\n decrement,\n decrementToMin,\n numberValue,\n inputValue,\n commit\n } = state;\n\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n let inputId = useId(id);\n\n let {focusProps} = useFocus({\n onBlur: () => {\n // Set input value to normalized valid value\n commit();\n }\n });\n\n let numberFormatter = useNumberFormatter(formatOptions);\n let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);\n\n // Replace negative textValue formatted using currencySign: 'accounting'\n // with a textValue that can be announced using a minus sign.\n let textValueFormatter = useNumberFormatter({...formatOptions, currencySign: undefined});\n let textValue = useMemo(() => isNaN(numberValue) ? '' : textValueFormatter.format(numberValue), [textValueFormatter, numberValue]);\n\n let {\n spinButtonProps,\n incrementButtonProps: incButtonProps,\n decrementButtonProps: decButtonProps\n } = useSpinButton(\n {\n isDisabled,\n isReadOnly,\n isRequired,\n maxValue,\n minValue,\n onIncrement: increment,\n onIncrementToMax: incrementToMax,\n onDecrement: decrement,\n onDecrementToMin: decrementToMin,\n value: numberValue,\n textValue\n }\n );\n\n let [focusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({isDisabled, onFocusWithinChange: setFocusWithin});\n\n let onWheel = useCallback((e) => {\n // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change\n // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec\n // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication\n // especially if the user is scrolling near 45deg\n if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {\n return;\n }\n if (e.deltaY > 0) {\n increment();\n } else if (e.deltaY < 0) {\n decrement();\n }\n }, [decrement, increment]);\n // If the input isn't supposed to receive input, disable scrolling.\n let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;\n useScrollWheel({onScroll: onWheel, isDisabled: scrollingDisabled}, inputRef);\n\n // The inputMode attribute influences the software keyboard that is shown on touch devices.\n // Browsers and operating systems are quite inconsistent about what keys are available, however.\n // We choose between numeric and decimal based on whether we allow negative and fractional numbers,\n // and based on testing on various devices to determine what keys are available in each inputMode.\n let hasDecimals = intlOptions.maximumFractionDigits > 0;\n let hasNegative = isNaN(state.minValue) || state.minValue < 0;\n let inputMode: TextInputDOMProps['inputMode'] = 'numeric';\n if (isIPhone()) {\n // iPhone doesn't have a minus sign in either numeric or decimal.\n // Note this is only for iPhone, not iPad, which always has both\n // minus and decimal in numeric.\n if (hasNegative) {\n inputMode = 'text';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n } else if (isAndroid()) {\n // Android numeric has both a decimal point and minus key.\n // decimal does not have a minus key.\n if (hasNegative) {\n inputMode = 'numeric';\n } else if (hasDecimals) {\n inputMode = 'decimal';\n }\n }\n\n let onChange = value => {\n if (state.validate(value)) {\n state.setInputValue(value);\n }\n };\n\n let domProps = filterDOMProps(props);\n\n let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps} = useFormattedTextField({\n ...otherProps,\n ...domProps,\n label,\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n validationState,\n value: inputValue,\n defaultValue: undefined, // defaultValue already used to populate state.inputValue, unneeded here\n autoComplete: 'off',\n 'aria-label': props['aria-label'] || null,\n 'aria-labelledby': props['aria-labelledby'] || null,\n id: inputId,\n type: 'text', // Can't use type=\"number\" because then we can't have things like $ in the field.\n inputMode,\n onChange,\n onBlur,\n onFocus,\n onFocusChange,\n onKeyDown,\n onKeyUp,\n description,\n errorMessage\n }, state, inputRef);\n\n let inputProps = mergeProps(\n spinButtonProps,\n focusProps,\n textFieldProps,\n {\n // override the spinbutton role, we can't focus a spin button with VO\n role: null,\n // ignore aria-roledescription on iOS so that required state will announce when it is present\n 'aria-roledescription': (!isIOS() ? stringFormatter.format('numberField') : null),\n 'aria-valuemax': null,\n 'aria-valuemin': null,\n 'aria-valuenow': null,\n 'aria-valuetext': null,\n autoCorrect: 'off',\n spellCheck: 'false'\n }\n );\n\n let onButtonPressStart = (e) => {\n // If focus is already on the input, keep it there so we don't hide the\n // software keyboard when tapping the increment/decrement buttons.\n if (document.activeElement === inputRef.current) {\n return;\n }\n\n // Otherwise, when using a mouse, move focus to the input.\n // On touch, or with a screen reader, focus the button so that the software\n // keyboard does not appear and the screen reader cursor is not moved off the button.\n if (e.pointerType === 'mouse') {\n inputRef.current.focus();\n } else {\n e.target.focus();\n }\n };\n\n // Determine the label for the increment and decrement buttons. There are 4 cases:\n //\n // 1. With a visible label that is a string: aria-label: `Increase ${props.label}`\n // 2. With a visible label that is JSX: aria-label: 'Increase', aria-labelledby: '${incrementId} ${labelId}'\n // 3. With an aria-label: aria-label: `Increase ${props['aria-label']}`\n // 4. With an aria-labelledby: aria-label: 'Increase', aria-labelledby: `${incrementId} ${props['aria-labelledby']}`\n //\n // (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in\n // the aria-label string rather than using aria-labelledby gives more flexibility to translators to change\n // the order or add additional words around the label if needed.\n let fieldLabel = props['aria-label'] || (typeof props.label === 'string' ? props.label : '');\n let ariaLabelledby: string;\n if (!fieldLabel) {\n ariaLabelledby = props.label != null ? labelProps.id : props['aria-labelledby'];\n }\n\n let incrementId = useId();\n let decrementId = useId();\n\n let incrementButtonProps: AriaButtonProps = mergeProps(incButtonProps, {\n 'aria-label': incrementAriaLabel || stringFormatter.format('increase', {fieldLabel}).trim(),\n id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,\n 'aria-labelledby': ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canIncrement,\n onPressStart: onButtonPressStart\n });\n\n let decrementButtonProps: AriaButtonProps = mergeProps(decButtonProps, {\n 'aria-label': decrementAriaLabel || stringFormatter.format('decrease', {fieldLabel}).trim(),\n id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,\n 'aria-labelledby': ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,\n 'aria-controls': inputId,\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n allowFocusWhenDisabled: true,\n isDisabled: !state.canDecrement,\n onPressStart: onButtonPressStart\n });\n\n return {\n groupProps: {\n role: 'group',\n 'aria-disabled': isDisabled,\n 'aria-invalid': validationState === 'invalid' ? 'true' : undefined,\n ...focusWithinProps\n },\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n errorMessageProps,\n descriptionProps\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 \"decrease\": \"خفض {fieldLabel}\",\n \"increase\": \"زيادة {fieldLabel}\",\n \"numberField\": \"حقل رقمي\"\n}\n","{\n \"decrease\": \"Намаляване {fieldLabel}\",\n \"increase\": \"Усилване {fieldLabel}\",\n \"numberField\": \"Номер на полето\"\n}\n","{\n \"decrease\": \"Snížit {fieldLabel}\",\n \"increase\": \"Zvýšit {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Reducer {fieldLabel}\",\n \"increase\": \"Øg {fieldLabel}\",\n \"numberField\": \"Talfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verringern\",\n \"increase\": \"{fieldLabel} erhöhen\",\n \"numberField\": \"Nummernfeld\"\n}\n","{\n \"decrease\": \"Μείωση {fieldLabel}\",\n \"increase\": \"Αύξηση {fieldLabel}\",\n \"numberField\": \"Πεδίο αριθμού\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Reducir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Vähenda {fieldLabel}\",\n \"increase\": \"Suurenda {fieldLabel}\",\n \"numberField\": \"Numbri väli\"\n}\n","{\n \"decrease\": \"Vähennä {fieldLabel}\",\n \"increase\": \"Lisää {fieldLabel}\",\n \"numberField\": \"Numerokenttä\"\n}\n","{\n \"decrease\": \"Diminuer {fieldLabel}\",\n \"increase\": \"Augmenter {fieldLabel}\",\n \"numberField\": \"Champ de nombre\"\n}\n","{\n \"decrease\": \"הקטן {fieldLabel}\",\n \"increase\": \"הגדל {fieldLabel}\",\n \"numberField\": \"שדה מספר\"\n}\n","{\n \"decrease\": \"Smanji {fieldLabel}\",\n \"increase\": \"Povećaj {fieldLabel}\",\n \"numberField\": \"Polje broja\"\n}\n","{\n \"decrease\": \"{fieldLabel} csökkentése\",\n \"increase\": \"{fieldLabel} növelése\",\n \"numberField\": \"Számmező\"\n}\n","{\n \"decrease\": \"Riduci {fieldLabel}\",\n \"increase\": \"Aumenta {fieldLabel}\",\n \"numberField\": \"Campo numero\"\n}\n","{\n \"decrease\": \"{fieldLabel}を縮小\",\n \"increase\": \"{fieldLabel}を拡大\",\n \"numberField\": \"数値フィールド\"\n}\n","{\n \"decrease\": \"{fieldLabel} 감소\",\n \"increase\": \"{fieldLabel} 증가\",\n \"numberField\": \"번호 필드\"\n}\n","{\n \"decrease\": \"Sumažinti {fieldLabel}\",\n \"increase\": \"Padidinti {fieldLabel}\",\n \"numberField\": \"Numerio laukas\"\n}\n","{\n \"decrease\": \"Samazināšana {fieldLabel}\",\n \"increase\": \"Palielināšana {fieldLabel}\",\n \"numberField\": \"Skaitļu lauks\"\n}\n","{\n \"decrease\": \"Reduser {fieldLabel}\",\n \"increase\": \"Øk {fieldLabel}\",\n \"numberField\": \"Tallfelt\"\n}\n","{\n \"decrease\": \"{fieldLabel} verlagen\",\n \"increase\": \"{fieldLabel} verhogen\",\n \"numberField\": \"Getalveld\"\n}\n","{\n \"decrease\": \"Zmniejsz {fieldLabel}\",\n \"increase\": \"Zwiększ {fieldLabel}\",\n \"numberField\": \"Pole numeru\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo de número\"\n}\n","{\n \"decrease\": \"Diminuir {fieldLabel}\",\n \"increase\": \"Aumentar {fieldLabel}\",\n \"numberField\": \"Campo numérico\"\n}\n","{\n \"decrease\": \"Scădere {fieldLabel}\",\n \"increase\": \"Creștere {fieldLabel}\",\n \"numberField\": \"Câmp numeric\"\n}\n","{\n \"decrease\": \"Уменьшение {fieldLabel}\",\n \"increase\": \"Увеличение {fieldLabel}\",\n \"numberField\": \"Числовое поле\"\n}\n","{\n \"decrease\": \"Znížiť {fieldLabel}\",\n \"increase\": \"Zvýšiť {fieldLabel}\",\n \"numberField\": \"Číselné pole\"\n}\n","{\n \"decrease\": \"Upadati {fieldLabel}\",\n \"increase\": \"Povečajte {fieldLabel}\",\n \"numberField\": \"Številčno polje\"\n}\n","{\n \"decrease\": \"Decrease {fieldLabel}\",\n \"increase\": \"Increase {fieldLabel}\",\n \"numberField\": \"Number field\"\n}\n","{\n \"decrease\": \"Minska {fieldLabel}\",\n \"increase\": \"Öka {fieldLabel}\",\n \"numberField\": \"Nummerfält\"\n}\n","{\n \"decrease\": \"{fieldLabel} azalt\",\n \"increase\": \"{fieldLabel} arttır\",\n \"numberField\": \"Sayı alanı\"\n}\n","{\n \"decrease\": \"Зменшити {fieldLabel}\",\n \"increase\": \"Збільшити {fieldLabel}\",\n \"numberField\": \"Поле номера\"\n}\n","{\n \"decrease\": \"降低 {fieldLabel}\",\n \"increase\": \"提高 {fieldLabel}\",\n \"numberField\": \"数字字段\"\n}\n","{\n \"decrease\": \"縮小 {fieldLabel}\",\n \"increase\": \"放大 {fieldLabel}\",\n \"numberField\": \"數字欄位\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAoCA;IACE,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,wEAAwE;IACxE,UAAU,EAAE,aAAa,CAAC;IAC1B,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,gEAAgE;IAChE,gBAAgB,EAAE,aAAa,CAAC;IAChC,kEAAkE;IAClE,iBAAiB,EAAE,aAAa,CAAA;CACjC;AAED;;;GAGG;AACH,+BAA+B,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,gBAAgB,CAAC,GAAG,eAAe,
|
|
1
|
+
{"mappings":";;;;;AAoCA;IACE,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,wEAAwE;IACxE,UAAU,EAAE,aAAa,CAAC;IAC1B,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,gEAAgE;IAChE,gBAAgB,EAAE,aAAa,CAAC;IAChC,kEAAkE;IAClE,iBAAiB,EAAE,aAAa,CAAA;CACjC;AAED;;;GAGG;AACH,+BAA+B,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,gBAAgB,CAAC,GAAG,eAAe,CAuP3I;ACpSD,YAAY,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-aria/numberfield/src/packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/src/packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/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 {useNumberField} from './useNumberField';\nexport type {AriaNumberFieldProps} from '@react-types/numberfield';\nexport type {NumberFieldAria} from './useNumberField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/numberfield",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/i18n": "^3.7.
|
|
26
|
-
"@react-aria/interactions": "^3.
|
|
27
|
-
"@react-aria/live-announcer": "^3.
|
|
28
|
-
"@react-aria/spinbutton": "^3.
|
|
29
|
-
"@react-aria/textfield": "^3.9.
|
|
30
|
-
"@react-aria/utils": "^3.
|
|
31
|
-
"@react-stately/numberfield": "^3.4.
|
|
32
|
-
"@react-types/button": "^3.7.
|
|
33
|
-
"@react-types/numberfield": "^3.4.
|
|
34
|
-
"@react-types/shared": "^3.
|
|
35
|
-
"@react-types/textfield": "^3.7.
|
|
25
|
+
"@react-aria/i18n": "^3.7.2",
|
|
26
|
+
"@react-aria/interactions": "^3.15.1",
|
|
27
|
+
"@react-aria/live-announcer": "^3.3.0",
|
|
28
|
+
"@react-aria/spinbutton": "^3.4.1",
|
|
29
|
+
"@react-aria/textfield": "^3.9.2",
|
|
30
|
+
"@react-aria/utils": "^3.17.0",
|
|
31
|
+
"@react-stately/numberfield": "^3.4.2",
|
|
32
|
+
"@react-types/button": "^3.7.3",
|
|
33
|
+
"@react-types/numberfield": "^3.4.2",
|
|
34
|
+
"@react-types/shared": "^3.18.1",
|
|
35
|
+
"@react-types/textfield": "^3.7.2",
|
|
36
36
|
"@swc/helpers": "^0.4.14"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "5911ed21de4b76d66f6254c02302519e02d50e16"
|
|
46
46
|
}
|
package/src/useNumberField.ts
CHANGED
|
@@ -85,6 +85,7 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
|
|
|
85
85
|
decrement,
|
|
86
86
|
decrementToMin,
|
|
87
87
|
numberValue,
|
|
88
|
+
inputValue,
|
|
88
89
|
commit
|
|
89
90
|
} = state;
|
|
90
91
|
|
|
@@ -99,6 +100,14 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
|
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
|
|
103
|
+
let numberFormatter = useNumberFormatter(formatOptions);
|
|
104
|
+
let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);
|
|
105
|
+
|
|
106
|
+
// Replace negative textValue formatted using currencySign: 'accounting'
|
|
107
|
+
// with a textValue that can be announced using a minus sign.
|
|
108
|
+
let textValueFormatter = useNumberFormatter({...formatOptions, currencySign: undefined});
|
|
109
|
+
let textValue = useMemo(() => isNaN(numberValue) ? '' : textValueFormatter.format(numberValue), [textValueFormatter, numberValue]);
|
|
110
|
+
|
|
102
111
|
let {
|
|
103
112
|
spinButtonProps,
|
|
104
113
|
incrementButtonProps: incButtonProps,
|
|
@@ -115,7 +124,7 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
|
|
|
115
124
|
onDecrement: decrement,
|
|
116
125
|
onDecrementToMin: decrementToMin,
|
|
117
126
|
value: numberValue,
|
|
118
|
-
textValue
|
|
127
|
+
textValue
|
|
119
128
|
}
|
|
120
129
|
);
|
|
121
130
|
|
|
@@ -144,8 +153,6 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
|
|
|
144
153
|
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
145
154
|
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
146
155
|
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
147
|
-
let numberFormatter = useNumberFormatter(formatOptions);
|
|
148
|
-
let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);
|
|
149
156
|
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
150
157
|
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
151
158
|
let inputMode: TextInputDOMProps['inputMode'] = 'numeric';
|
|
@@ -169,7 +176,9 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
|
|
|
169
176
|
}
|
|
170
177
|
|
|
171
178
|
let onChange = value => {
|
|
172
|
-
state.
|
|
179
|
+
if (state.validate(value)) {
|
|
180
|
+
state.setInputValue(value);
|
|
181
|
+
}
|
|
173
182
|
};
|
|
174
183
|
|
|
175
184
|
let domProps = filterDOMProps(props);
|
|
@@ -183,7 +192,7 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
|
|
|
183
192
|
isReadOnly,
|
|
184
193
|
isRequired,
|
|
185
194
|
validationState,
|
|
186
|
-
value:
|
|
195
|
+
value: inputValue,
|
|
187
196
|
defaultValue: undefined, // defaultValue already used to populate state.inputValue, unneeded here
|
|
188
197
|
autoComplete: 'off',
|
|
189
198
|
'aria-label': props['aria-label'] || null,
|