@eightshift/ui-components 7.2.0 → 7.3.0
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/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/fonts/google-sans-flex-latin-ext-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-latin-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-symbols-full-normal.woff2 +0 -0
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-xfxA_s9a.js → gradient-editor-CInqVF8v.js} +6 -11
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/{jsx-svg-BRJ4n3pD.js → jsx-svg-DT1SBWuP.js} +6 -12
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-Bh8G7Urm.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BiWZjrGF.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-DaIUEc0g.js → tabs-C2tPOEYr.js} +150 -153
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +18 -18
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-B21SgugS.js +0 -601
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-DR_I4_yn.js +0 -765
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as $
|
|
4
|
-
import { t as $
|
|
5
|
-
import { t as $
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as $
|
|
9
|
-
import { t as $
|
|
10
|
-
import {
|
|
11
|
-
import { n as $
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { g as $a4e76a5424781910$export$e08e3b67e392101e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, p as $390e54f620492c70$export$f680877a34711e37, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
2
|
+
import { H as $23f2114a1b82827e$export$e58f029f0fbfdb29, T as $2add3ce32c6007eb$export$186c6964ca17d99, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, c as $1e74c67db218ce67$export$f8168d8dd8fd66e6, d as $3e6197669829fe11$export$40bfa8c7b0832715, f as $fe16bffc7a557bf0$export$7f54fc3180508a52, j as $2add3ce32c6007eb$export$fedb369cb70207f1, k as $2add3ce32c6007eb$export$a11b0059900ceec8, n as $48a7d519b337145d$export$4eaf04e54aa8eed6 } from "./useHover-lyApu3ba.js";
|
|
3
|
+
import { t as $600b3cf69ae46262$export$90fc3a17d93f704c } from "./useEvent-ypAU33vv.js";
|
|
4
|
+
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CR-bmorj.js";
|
|
5
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
6
|
+
import { n as $2c9edc598a03d523$export$420e68273165f4ec } from "./useFocusRing-BgYY-7ko.js";
|
|
7
|
+
import { t as $1dfb119a85e764e5$export$cc77c4ff7e8673c5 } from "./NumberFormatter-JHF0Tadk.js";
|
|
8
|
+
import { t as $bd90acf18e792be6$export$b7a616150fdb9f44 } from "./useNumberFormatter-CR1PAFPG.js";
|
|
9
|
+
import { r as $240e9101ba2842f5$export$cb6e0bb50bc19463, t as $240e9101ba2842f5$export$7d15b64cf5a3a4c4 } from "./number-MWRvGfyE.js";
|
|
10
|
+
import { i as $a46cf152bb926da5$export$d10ae4f68404609a, r as $a46cf152bb926da5$export$a9b970dcc4ae71a9 } from "./Button-Biwg7zwt.js";
|
|
11
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb } from "./useFormValidation-BcME9D0E.js";
|
|
12
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-BuMc_O4y.js";
|
|
13
|
+
import { t as $054f71d2330da2e3$export$712718f7aec83d5 } from "./useTextField-BW3ZwGyz.js";
|
|
14
14
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
15
15
|
import { flushSync } from "react-dom";
|
|
16
|
-
//#region node_modules/@internationalized/number/dist/NumberParser.mjs
|
|
17
|
-
var $
|
|
18
|
-
var $
|
|
16
|
+
//#region node_modules/@internationalized/number/dist/private/NumberParser.mjs
|
|
17
|
+
var $eb76cf4feb040f77$var$CURRENCY_SIGN_REGEX = new RegExp("^.*\\(.*\\).*$");
|
|
18
|
+
var $eb76cf4feb040f77$var$NUMBERING_SYSTEMS = [
|
|
19
19
|
"latn",
|
|
20
20
|
"arab",
|
|
21
21
|
"hanidec",
|
|
@@ -23,55 +23,71 @@ var $6c7bd7858deea686$var$NUMBERING_SYSTEMS = [
|
|
|
23
23
|
"beng",
|
|
24
24
|
"fullwide"
|
|
25
25
|
];
|
|
26
|
-
var $
|
|
26
|
+
var $eb76cf4feb040f77$export$cd11ab140839f11d = class {
|
|
27
|
+
constructor(locale, options = {}) {
|
|
28
|
+
this.locale = locale;
|
|
29
|
+
this.options = options;
|
|
30
|
+
}
|
|
27
31
|
/**
|
|
28
32
|
* Parses the given string to a number. Returns NaN if a valid number could not be parsed.
|
|
29
33
|
*/ parse(value) {
|
|
30
|
-
return $
|
|
34
|
+
return $eb76cf4feb040f77$var$getNumberParserImpl(this.locale, this.options, value).parse(value);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Returns whether the given string could potentially be a valid number. This should be used to
|
|
34
38
|
* validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity
|
|
35
39
|
* of the minus/plus sign characters can be checked.
|
|
36
40
|
*/ isValidPartialNumber(value, minValue, maxValue) {
|
|
37
|
-
return $
|
|
41
|
+
return $eb76cf4feb040f77$var$getNumberParserImpl(this.locale, this.options, value).isValidPartialNumber(value, minValue, maxValue);
|
|
38
42
|
}
|
|
39
43
|
/**
|
|
40
44
|
* Returns a numbering system for which the given string is valid in the current locale.
|
|
41
45
|
* If no numbering system could be detected, the default numbering system for the current
|
|
42
46
|
* locale is returned.
|
|
43
47
|
*/ getNumberingSystem(value) {
|
|
44
|
-
return $
|
|
45
|
-
}
|
|
46
|
-
constructor(locale, options = {}) {
|
|
47
|
-
this.locale = locale;
|
|
48
|
-
this.options = options;
|
|
48
|
+
return $eb76cf4feb040f77$var$getNumberParserImpl(this.locale, this.options, value).options.numberingSystem;
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
var $
|
|
52
|
-
function $
|
|
53
|
-
let defaultParser = $
|
|
51
|
+
var $eb76cf4feb040f77$var$numberParserCache = new Map();
|
|
52
|
+
function $eb76cf4feb040f77$var$getNumberParserImpl(locale, options, value) {
|
|
53
|
+
let defaultParser = $eb76cf4feb040f77$var$getCachedNumberParser(locale, options);
|
|
54
54
|
if (!locale.includes("-nu-") && !defaultParser.isValidPartialNumber(value)) {
|
|
55
|
-
for (let numberingSystem of $
|
|
56
|
-
let parser = $
|
|
55
|
+
for (let numberingSystem of $eb76cf4feb040f77$var$NUMBERING_SYSTEMS) if (numberingSystem !== defaultParser.options.numberingSystem) {
|
|
56
|
+
let parser = $eb76cf4feb040f77$var$getCachedNumberParser(locale + (locale.includes("-u-") ? "-nu-" : "-u-nu-") + numberingSystem, options);
|
|
57
57
|
if (parser.isValidPartialNumber(value)) return parser;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
return defaultParser;
|
|
61
61
|
}
|
|
62
|
-
function $
|
|
62
|
+
function $eb76cf4feb040f77$var$getCachedNumberParser(locale, options) {
|
|
63
63
|
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
64
|
-
let parser = $
|
|
64
|
+
let parser = $eb76cf4feb040f77$var$numberParserCache.get(cacheKey);
|
|
65
65
|
if (!parser) {
|
|
66
|
-
parser = new $
|
|
67
|
-
$
|
|
66
|
+
parser = new $eb76cf4feb040f77$var$NumberParserImpl(locale, options);
|
|
67
|
+
$eb76cf4feb040f77$var$numberParserCache.set(cacheKey, parser);
|
|
68
68
|
}
|
|
69
69
|
return parser;
|
|
70
70
|
}
|
|
71
|
-
var $
|
|
71
|
+
var $eb76cf4feb040f77$var$NumberParserImpl = class {
|
|
72
|
+
constructor(locale, options = {}) {
|
|
73
|
+
this.locale = locale;
|
|
74
|
+
if (options.roundingIncrement !== 1 && options.roundingIncrement != null) {
|
|
75
|
+
if (options.maximumFractionDigits == null && options.minimumFractionDigits == null) {
|
|
76
|
+
options.maximumFractionDigits = 0;
|
|
77
|
+
options.minimumFractionDigits = 0;
|
|
78
|
+
} else if (options.maximumFractionDigits == null) options.maximumFractionDigits = options.minimumFractionDigits;
|
|
79
|
+
else if (options.minimumFractionDigits == null) options.minimumFractionDigits = options.maximumFractionDigits;
|
|
80
|
+
}
|
|
81
|
+
this.formatter = new Intl.NumberFormat(locale, options);
|
|
82
|
+
this.options = this.formatter.resolvedOptions();
|
|
83
|
+
this.symbols = $eb76cf4feb040f77$var$getSymbols(locale, this.formatter, this.options, options);
|
|
84
|
+
if (this.options.style === "percent" && ((this.options.minimumFractionDigits ?? 0) > 18 || (this.options.maximumFractionDigits ?? 0) > 18)) console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");
|
|
85
|
+
}
|
|
72
86
|
parse(value) {
|
|
87
|
+
let isGroupSymbolAllowed = this.formatter.resolvedOptions().useGrouping;
|
|
73
88
|
let fullySanitizedValue = this.sanitize(value);
|
|
74
|
-
if (this.symbols.group
|
|
89
|
+
if (!isGroupSymbolAllowed && this.symbols.group && fullySanitizedValue.includes(this.symbols.group)) return NaN;
|
|
90
|
+
else if (this.symbols.group) fullySanitizedValue = fullySanitizedValue.replaceAll(this.symbols.group, "");
|
|
75
91
|
if (this.symbols.decimal) fullySanitizedValue = fullySanitizedValue.replace(this.symbols.decimal, ".");
|
|
76
92
|
if (this.symbols.minusSign) fullySanitizedValue = fullySanitizedValue.replace(this.symbols.minusSign, "-");
|
|
77
93
|
fullySanitizedValue = fullySanitizedValue.replace(this.symbols.numeral, this.symbols.index);
|
|
@@ -91,63 +107,49 @@ var $6c7bd7858deea686$var$NumberParserImpl = class {
|
|
|
91
107
|
let newValue = fullySanitizedValue ? +fullySanitizedValue : NaN;
|
|
92
108
|
if (isNaN(newValue)) return NaN;
|
|
93
109
|
if (this.options.style === "percent") {
|
|
94
|
-
var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
|
|
95
110
|
let options = {
|
|
96
111
|
...this.options,
|
|
97
112
|
style: "decimal",
|
|
98
|
-
minimumFractionDigits: Math.min((
|
|
99
|
-
maximumFractionDigits: Math.min((
|
|
113
|
+
minimumFractionDigits: Math.min((this.options.minimumFractionDigits ?? 0) + 2, 20),
|
|
114
|
+
maximumFractionDigits: Math.min((this.options.maximumFractionDigits ?? 0) + 2, 20)
|
|
100
115
|
};
|
|
101
|
-
return new $
|
|
116
|
+
return new $eb76cf4feb040f77$export$cd11ab140839f11d(this.locale, options).parse(new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(this.locale, options).format(newValue));
|
|
102
117
|
}
|
|
103
|
-
if (this.options.currencySign === "accounting" && $
|
|
118
|
+
if (this.options.currencySign === "accounting" && $eb76cf4feb040f77$var$CURRENCY_SIGN_REGEX.test(value)) newValue = -1 * newValue;
|
|
104
119
|
return newValue;
|
|
105
120
|
}
|
|
106
121
|
sanitize(value) {
|
|
122
|
+
let isGroupSymbolAllowed = this.formatter.resolvedOptions().useGrouping;
|
|
123
|
+
if (this.symbols.noNumeralUnits.length > 0 && this.symbols.noNumeralUnits.find((obj) => obj.unit === value)) return this.symbols.noNumeralUnits.find((obj) => obj.unit === value).value.toString();
|
|
107
124
|
value = value.replace(this.symbols.literals, "");
|
|
108
125
|
if (this.symbols.minusSign) value = value.replace("-", this.symbols.minusSign);
|
|
109
126
|
if (this.options.numberingSystem === "arab") {
|
|
110
127
|
if (this.symbols.decimal) {
|
|
111
|
-
value = value
|
|
112
|
-
value = value
|
|
128
|
+
value = $eb76cf4feb040f77$var$replaceAll(value, ",", this.symbols.decimal);
|
|
129
|
+
value = $eb76cf4feb040f77$var$replaceAll(value, String.fromCharCode(1548), this.symbols.decimal);
|
|
113
130
|
}
|
|
114
|
-
if (this.symbols.group) value = $
|
|
131
|
+
if (this.symbols.group && isGroupSymbolAllowed) value = $eb76cf4feb040f77$var$replaceAll(value, ".", this.symbols.group);
|
|
115
132
|
}
|
|
116
|
-
if (this.symbols.group === "’" && value.includes("'")) value = $
|
|
117
|
-
if (this.options.locale === "fr-FR" && this.symbols.group) {
|
|
118
|
-
value = $
|
|
119
|
-
value = $
|
|
133
|
+
if (this.symbols.group === "’" && value.includes("'") && isGroupSymbolAllowed) value = $eb76cf4feb040f77$var$replaceAll(value, "'", this.symbols.group);
|
|
134
|
+
if (this.options.locale === "fr-FR" && this.symbols.group && isGroupSymbolAllowed) {
|
|
135
|
+
value = $eb76cf4feb040f77$var$replaceAll(value, " ", this.symbols.group);
|
|
136
|
+
value = $eb76cf4feb040f77$var$replaceAll(value, /\u00A0/g, this.symbols.group);
|
|
120
137
|
}
|
|
121
138
|
return value;
|
|
122
139
|
}
|
|
123
140
|
isValidPartialNumber(value, minValue = -Infinity, maxValue = Infinity) {
|
|
141
|
+
let isGroupSymbolAllowed = this.formatter.resolvedOptions().useGrouping;
|
|
124
142
|
value = this.sanitize(value);
|
|
125
143
|
if (this.symbols.minusSign && value.startsWith(this.symbols.minusSign) && minValue < 0) value = value.slice(this.symbols.minusSign.length);
|
|
126
144
|
else if (this.symbols.plusSign && value.startsWith(this.symbols.plusSign) && maxValue > 0) value = value.slice(this.symbols.plusSign.length);
|
|
127
|
-
if (this.symbols.group && value.startsWith(this.symbols.group)) return false;
|
|
128
145
|
if (this.symbols.decimal && value.indexOf(this.symbols.decimal) > -1 && this.options.maximumFractionDigits === 0) return false;
|
|
129
|
-
if (this.symbols.group) value = $
|
|
146
|
+
if (this.symbols.group && isGroupSymbolAllowed) value = $eb76cf4feb040f77$var$replaceAll(value, this.symbols.group, "");
|
|
130
147
|
value = value.replace(this.symbols.numeral, "");
|
|
131
148
|
if (this.symbols.decimal) value = value.replace(this.symbols.decimal, "");
|
|
132
149
|
return value.length === 0;
|
|
133
150
|
}
|
|
134
|
-
constructor(locale, options = {}) {
|
|
135
|
-
this.locale = locale;
|
|
136
|
-
if (options.roundingIncrement !== 1 && options.roundingIncrement != null) {
|
|
137
|
-
if (options.maximumFractionDigits == null && options.minimumFractionDigits == null) {
|
|
138
|
-
options.maximumFractionDigits = 0;
|
|
139
|
-
options.minimumFractionDigits = 0;
|
|
140
|
-
} else if (options.maximumFractionDigits == null) options.maximumFractionDigits = options.minimumFractionDigits;
|
|
141
|
-
else if (options.minimumFractionDigits == null) options.minimumFractionDigits = options.maximumFractionDigits;
|
|
142
|
-
}
|
|
143
|
-
this.formatter = new Intl.NumberFormat(locale, options);
|
|
144
|
-
this.options = this.formatter.resolvedOptions();
|
|
145
|
-
this.symbols = $6c7bd7858deea686$var$getSymbols(locale, this.formatter, this.options, options);
|
|
146
|
-
var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
|
|
147
|
-
if (this.options.style === "percent" && (((_this_options_minimumFractionDigits = this.options.minimumFractionDigits) !== null && _this_options_minimumFractionDigits !== void 0 ? _this_options_minimumFractionDigits : 0) > 18 || ((_this_options_maximumFractionDigits = this.options.maximumFractionDigits) !== null && _this_options_maximumFractionDigits !== void 0 ? _this_options_maximumFractionDigits : 0) > 18)) console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");
|
|
148
|
-
}
|
|
149
151
|
};
|
|
150
|
-
var $
|
|
152
|
+
var $eb76cf4feb040f77$var$nonLiteralParts = new Set([
|
|
151
153
|
"decimal",
|
|
152
154
|
"fraction",
|
|
153
155
|
"integer",
|
|
@@ -155,7 +157,7 @@ var $6c7bd7858deea686$var$nonLiteralParts = new Set([
|
|
|
155
157
|
"plusSign",
|
|
156
158
|
"group"
|
|
157
159
|
]);
|
|
158
|
-
var $
|
|
160
|
+
var $eb76cf4feb040f77$var$pluralNumbers = [
|
|
159
161
|
0,
|
|
160
162
|
4,
|
|
161
163
|
2,
|
|
@@ -169,33 +171,40 @@ var $6c7bd7858deea686$var$pluralNumbers = [
|
|
|
169
171
|
.1,
|
|
170
172
|
1.1
|
|
171
173
|
];
|
|
172
|
-
function $
|
|
173
|
-
var _allParts_find, _posAllParts_find, _decimalParts_find, _allParts_find1;
|
|
174
|
+
function $eb76cf4feb040f77$var$getSymbols(locale, formatter, intlOptions, originalOptions) {
|
|
174
175
|
let symbolFormatter = new Intl.NumberFormat(locale, {
|
|
175
176
|
...intlOptions,
|
|
176
177
|
minimumSignificantDigits: 1,
|
|
177
178
|
maximumSignificantDigits: 21,
|
|
178
179
|
roundingIncrement: 1,
|
|
179
180
|
roundingPriority: "auto",
|
|
180
|
-
roundingMode: "halfExpand"
|
|
181
|
+
roundingMode: "halfExpand",
|
|
182
|
+
useGrouping: true
|
|
181
183
|
});
|
|
182
184
|
let allParts = symbolFormatter.formatToParts(-10000.111);
|
|
183
185
|
let posAllParts = symbolFormatter.formatToParts(10000.111);
|
|
184
|
-
let pluralParts = $
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
let pluralParts = $eb76cf4feb040f77$var$pluralNumbers.map((n) => symbolFormatter.formatToParts(n));
|
|
187
|
+
let noNumeralUnits = pluralParts.map((p, i) => {
|
|
188
|
+
let unit = p.find((p) => p.type === "unit");
|
|
189
|
+
if (unit && !p.some((p) => p.type === "integer" || p.type === "fraction")) return {
|
|
190
|
+
unit: unit.value,
|
|
191
|
+
value: $eb76cf4feb040f77$var$pluralNumbers[i]
|
|
192
|
+
};
|
|
193
|
+
return null;
|
|
194
|
+
}).filter((p) => !!p);
|
|
195
|
+
let minusSign = allParts.find((p) => p.type === "minusSign")?.value ?? "-";
|
|
196
|
+
let plusSign = posAllParts.find((p) => p.type === "plusSign")?.value;
|
|
197
|
+
if (!plusSign && (originalOptions?.signDisplay === "exceptZero" || originalOptions?.signDisplay === "always")) plusSign = "+";
|
|
198
|
+
let decimal = new Intl.NumberFormat(locale, {
|
|
190
199
|
...intlOptions,
|
|
191
200
|
minimumFractionDigits: 2,
|
|
192
201
|
maximumFractionDigits: 2
|
|
193
|
-
}).formatToParts(.001).find((p) => p.type === "decimal")
|
|
194
|
-
let group =
|
|
195
|
-
let allPartsLiterals = allParts.filter((p) => !$
|
|
196
|
-
let pluralPartsLiterals = pluralParts.flatMap((p) => p.filter((p) => !$
|
|
202
|
+
}).formatToParts(.001).find((p) => p.type === "decimal")?.value;
|
|
203
|
+
let group = allParts.find((p) => p.type === "group")?.value;
|
|
204
|
+
let allPartsLiterals = allParts.filter((p) => !$eb76cf4feb040f77$var$nonLiteralParts.has(p.type)).map((p) => $eb76cf4feb040f77$var$escapeRegex(p.value));
|
|
205
|
+
let pluralPartsLiterals = pluralParts.flatMap((p) => p.filter((p) => !$eb76cf4feb040f77$var$nonLiteralParts.has(p.type)).map((p) => $eb76cf4feb040f77$var$escapeRegex(p.value)));
|
|
197
206
|
let sortedLiterals = [...new Set([...allPartsLiterals, ...pluralPartsLiterals])].sort((a, b) => b.length - a.length);
|
|
198
|
-
let literals = sortedLiterals.length === 0 ? new RegExp("
|
|
207
|
+
let literals = sortedLiterals.length === 0 ? new RegExp("\\p{White_Space}|\\p{Cf}", "gu") : new RegExp(`${sortedLiterals.join("|")}|\\p{White_Space}|\\p{Cf}`, "gu");
|
|
199
208
|
let numerals = [...new Intl.NumberFormat(intlOptions.locale, { useGrouping: false }).format(9876543210)].reverse();
|
|
200
209
|
let indexes = new Map(numerals.map((d, i) => [d, i]));
|
|
201
210
|
let numeral = new RegExp(`[${numerals.join("")}]`, "g");
|
|
@@ -207,38 +216,25 @@ function $6c7bd7858deea686$var$getSymbols(locale, formatter, intlOptions, origin
|
|
|
207
216
|
group,
|
|
208
217
|
literals,
|
|
209
218
|
numeral,
|
|
210
|
-
|
|
219
|
+
numerals,
|
|
220
|
+
index,
|
|
221
|
+
noNumeralUnits
|
|
211
222
|
};
|
|
212
223
|
}
|
|
213
|
-
function $
|
|
224
|
+
function $eb76cf4feb040f77$var$replaceAll(str, find, replace) {
|
|
214
225
|
if (str.replaceAll) return str.replaceAll(find, replace);
|
|
215
226
|
return str.split(find).join(replace);
|
|
216
227
|
}
|
|
217
|
-
function $
|
|
228
|
+
function $eb76cf4feb040f77$var$escapeRegex(string) {
|
|
218
229
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
219
230
|
}
|
|
220
231
|
//#endregion
|
|
221
|
-
//#region node_modules
|
|
222
|
-
function $
|
|
223
|
-
let { onScroll, isDisabled } = props;
|
|
224
|
-
let onScrollHandler = useCallback((e) => {
|
|
225
|
-
if (e.ctrlKey) return;
|
|
226
|
-
e.preventDefault();
|
|
227
|
-
e.stopPropagation();
|
|
228
|
-
if (onScroll) onScroll({
|
|
229
|
-
deltaX: e.deltaX,
|
|
230
|
-
deltaY: e.deltaY
|
|
231
|
-
});
|
|
232
|
-
}, [onScroll]);
|
|
233
|
-
$e9faafb641e167db$export$90fc3a17d93f704c(ref, "wheel", isDisabled ? void 0 : onScrollHandler);
|
|
234
|
-
}
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region node_modules/@react-aria/textfield/dist/useFormattedTextField.mjs
|
|
237
|
-
function $d841c8010a73d545$var$supportsNativeBeforeInputEvent() {
|
|
232
|
+
//#region node_modules/react-aria/dist/private/textfield/useFormattedTextField.mjs
|
|
233
|
+
function $62888b2ec35be488$var$supportsNativeBeforeInputEvent() {
|
|
238
234
|
return typeof window !== "undefined" && window.InputEvent && typeof InputEvent.prototype.getTargetRanges === "function";
|
|
239
235
|
}
|
|
240
|
-
function $
|
|
241
|
-
let onBeforeInputFallback = $
|
|
236
|
+
function $62888b2ec35be488$export$4f384c9210e583c3(props, state, inputRef) {
|
|
237
|
+
let onBeforeInputFallback = $fe16bffc7a557bf0$export$7f54fc3180508a52((e) => {
|
|
242
238
|
let input = inputRef.current;
|
|
243
239
|
if (!input) return;
|
|
244
240
|
let nextValue = null;
|
|
@@ -268,21 +264,21 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
268
264
|
if (nextValue == null || !state.validate(nextValue)) e.preventDefault();
|
|
269
265
|
});
|
|
270
266
|
useEffect(() => {
|
|
271
|
-
if (!$
|
|
267
|
+
if (!$62888b2ec35be488$var$supportsNativeBeforeInputEvent() || !inputRef.current) return;
|
|
272
268
|
let input = inputRef.current;
|
|
273
269
|
input.addEventListener("beforeinput", onBeforeInputFallback, false);
|
|
274
270
|
return () => {
|
|
275
271
|
input.removeEventListener("beforeinput", onBeforeInputFallback, false);
|
|
276
272
|
};
|
|
277
273
|
}, [inputRef]);
|
|
278
|
-
let onBeforeInput = !$
|
|
279
|
-
let nextValue = $
|
|
274
|
+
let onBeforeInput = !$62888b2ec35be488$var$supportsNativeBeforeInputEvent() ? (e) => {
|
|
275
|
+
let nextValue = $23f2114a1b82827e$export$e58f029f0fbfdb29(e).value.slice(0, $23f2114a1b82827e$export$e58f029f0fbfdb29(e).selectionStart) + e.data + $23f2114a1b82827e$export$e58f029f0fbfdb29(e).value.slice($23f2114a1b82827e$export$e58f029f0fbfdb29(e).selectionEnd);
|
|
280
276
|
if (!state.validate(nextValue)) e.preventDefault();
|
|
281
277
|
} : null;
|
|
282
|
-
let { labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps, ...validation } = $
|
|
278
|
+
let { labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps, ...validation } = $054f71d2330da2e3$export$712718f7aec83d5(props, inputRef);
|
|
283
279
|
let compositionStartState = useRef(null);
|
|
284
280
|
return {
|
|
285
|
-
inputProps: $
|
|
281
|
+
inputProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(textFieldProps, {
|
|
286
282
|
onBeforeInput,
|
|
287
283
|
onCompositionStart() {
|
|
288
284
|
let { value, selectionStart, selectionEnd } = inputRef.current;
|
|
@@ -308,341 +304,211 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
308
304
|
};
|
|
309
305
|
}
|
|
310
306
|
//#endregion
|
|
311
|
-
//#region node_modules
|
|
312
|
-
function $
|
|
313
|
-
let {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
let formatter = useMemo(() => new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(locale, {
|
|
325
|
-
...formatOptions,
|
|
326
|
-
numberingSystem
|
|
327
|
-
}), [
|
|
328
|
-
locale,
|
|
329
|
-
formatOptions,
|
|
330
|
-
numberingSystem
|
|
331
|
-
]);
|
|
332
|
-
let intlOptions = useMemo(() => formatter.resolvedOptions(), [formatter]);
|
|
333
|
-
let format = useCallback((value) => isNaN(value) || value === null ? "" : formatter.format(value), [formatter]);
|
|
334
|
-
let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
|
|
335
|
-
...props,
|
|
336
|
-
value: numberValue
|
|
337
|
-
});
|
|
338
|
-
let clampStep = step !== void 0 && !isNaN(step) ? step : 1;
|
|
339
|
-
if (intlOptions.style === "percent" && (step === void 0 || isNaN(step))) clampStep = .01;
|
|
340
|
-
let [prevValue, setPrevValue] = useState(numberValue);
|
|
341
|
-
let [prevLocale, setPrevLocale] = useState(locale);
|
|
342
|
-
let [prevFormatOptions, setPrevFormatOptions] = useState(formatOptions);
|
|
343
|
-
if (!Object.is(numberValue, prevValue) || locale !== prevLocale || formatOptions !== prevFormatOptions) {
|
|
344
|
-
setInputValue(format(numberValue));
|
|
345
|
-
setPrevValue(numberValue);
|
|
346
|
-
setPrevLocale(locale);
|
|
347
|
-
setPrevFormatOptions(formatOptions);
|
|
348
|
-
}
|
|
349
|
-
let parsedValue = useMemo(() => numberParser.parse(inputValue), [numberParser, inputValue]);
|
|
350
|
-
let commit = (overrideValue) => {
|
|
351
|
-
let newInputValue = overrideValue === void 0 ? inputValue : overrideValue;
|
|
352
|
-
let newParsedValue = parsedValue;
|
|
353
|
-
if (overrideValue !== void 0) newParsedValue = numberParser.parse(newInputValue);
|
|
354
|
-
if (!newInputValue.length) {
|
|
355
|
-
setNumberValue(NaN);
|
|
356
|
-
setInputValue(value === void 0 ? "" : format(numberValue));
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
if (isNaN(newParsedValue)) {
|
|
360
|
-
setInputValue(format(numberValue));
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
let clampedValue;
|
|
364
|
-
if (step === void 0 || isNaN(step)) clampedValue = $9446cca9a3875146$export$7d15b64cf5a3a4c4(newParsedValue, minValue, maxValue);
|
|
365
|
-
else clampedValue = $9446cca9a3875146$export$cb6e0bb50bc19463(newParsedValue, minValue, maxValue, step);
|
|
366
|
-
clampedValue = numberParser.parse(format(clampedValue));
|
|
367
|
-
setNumberValue(clampedValue);
|
|
368
|
-
setInputValue(format(value === void 0 ? clampedValue : numberValue));
|
|
369
|
-
validation.commitValidation();
|
|
370
|
-
};
|
|
371
|
-
let safeNextStep = (operation, minMax = 0) => {
|
|
372
|
-
let prev = parsedValue;
|
|
373
|
-
if (isNaN(prev)) return $9446cca9a3875146$export$cb6e0bb50bc19463(isNaN(minMax) ? 0 : minMax, minValue, maxValue, clampStep);
|
|
374
|
-
else {
|
|
375
|
-
let newValue = $9446cca9a3875146$export$cb6e0bb50bc19463(prev, minValue, maxValue, clampStep);
|
|
376
|
-
if (operation === "+" && newValue > prev || operation === "-" && newValue < prev) return newValue;
|
|
377
|
-
return $9446cca9a3875146$export$cb6e0bb50bc19463($de67e98908f0c6ee$var$handleDecimalOperation(operation, prev, clampStep), minValue, maxValue, clampStep);
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
let increment = () => {
|
|
381
|
-
let newValue = safeNextStep("+", minValue);
|
|
382
|
-
if (newValue === numberValue) setInputValue(format(newValue));
|
|
383
|
-
setNumberValue(newValue);
|
|
384
|
-
validation.commitValidation();
|
|
385
|
-
};
|
|
386
|
-
let decrement = () => {
|
|
387
|
-
let newValue = safeNextStep("-", maxValue);
|
|
388
|
-
if (newValue === numberValue) setInputValue(format(newValue));
|
|
389
|
-
setNumberValue(newValue);
|
|
390
|
-
validation.commitValidation();
|
|
391
|
-
};
|
|
392
|
-
let incrementToMax = () => {
|
|
393
|
-
if (maxValue != null) {
|
|
394
|
-
setNumberValue($9446cca9a3875146$export$cb6e0bb50bc19463(maxValue, minValue, maxValue, clampStep));
|
|
395
|
-
validation.commitValidation();
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
let decrementToMin = () => {
|
|
399
|
-
if (minValue != null) {
|
|
400
|
-
setNumberValue(minValue);
|
|
401
|
-
validation.commitValidation();
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
let canIncrement = useMemo(() => !isDisabled && !isReadOnly && (isNaN(parsedValue) || maxValue === void 0 || isNaN(maxValue) || $9446cca9a3875146$export$cb6e0bb50bc19463(parsedValue, minValue, maxValue, clampStep) > parsedValue || $de67e98908f0c6ee$var$handleDecimalOperation("+", parsedValue, clampStep) <= maxValue), [
|
|
405
|
-
isDisabled,
|
|
406
|
-
isReadOnly,
|
|
407
|
-
minValue,
|
|
408
|
-
maxValue,
|
|
409
|
-
clampStep,
|
|
410
|
-
parsedValue
|
|
411
|
-
]);
|
|
412
|
-
let canDecrement = useMemo(() => !isDisabled && !isReadOnly && (isNaN(parsedValue) || minValue === void 0 || isNaN(minValue) || $9446cca9a3875146$export$cb6e0bb50bc19463(parsedValue, minValue, maxValue, clampStep) < parsedValue || $de67e98908f0c6ee$var$handleDecimalOperation("-", parsedValue, clampStep) >= minValue), [
|
|
413
|
-
isDisabled,
|
|
414
|
-
isReadOnly,
|
|
415
|
-
minValue,
|
|
416
|
-
maxValue,
|
|
417
|
-
clampStep,
|
|
418
|
-
parsedValue
|
|
419
|
-
]);
|
|
420
|
-
let validate = (value) => numberParser.isValidPartialNumber(value, minValue, maxValue);
|
|
421
|
-
return {
|
|
422
|
-
...validation,
|
|
423
|
-
validate,
|
|
424
|
-
increment,
|
|
425
|
-
incrementToMax,
|
|
426
|
-
decrement,
|
|
427
|
-
decrementToMin,
|
|
428
|
-
canIncrement,
|
|
429
|
-
canDecrement,
|
|
430
|
-
minValue,
|
|
431
|
-
maxValue,
|
|
432
|
-
numberValue: parsedValue,
|
|
433
|
-
defaultNumberValue: isNaN(defaultValue) ? initialValue : defaultValue,
|
|
434
|
-
setNumberValue,
|
|
435
|
-
setInputValue,
|
|
436
|
-
inputValue,
|
|
437
|
-
commit
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
function $de67e98908f0c6ee$var$handleDecimalOperation(operator, value1, value2) {
|
|
441
|
-
let result = operator === "+" ? value1 + value2 : value1 - value2;
|
|
442
|
-
if (value1 % 1 !== 0 || value2 % 1 !== 0) {
|
|
443
|
-
const value1Decimal = value1.toString().split(".");
|
|
444
|
-
const value2Decimal = value2.toString().split(".");
|
|
445
|
-
const value1DecimalLength = value1Decimal[1] && value1Decimal[1].length || 0;
|
|
446
|
-
const value2DecimalLength = value2Decimal[1] && value2Decimal[1].length || 0;
|
|
447
|
-
const multiplier = Math.pow(10, Math.max(value1DecimalLength, value2DecimalLength));
|
|
448
|
-
value1 = Math.round(value1 * multiplier);
|
|
449
|
-
value2 = Math.round(value2 * multiplier);
|
|
450
|
-
result = operator === "+" ? value1 + value2 : value1 - value2;
|
|
451
|
-
result /= multiplier;
|
|
452
|
-
}
|
|
453
|
-
return result;
|
|
307
|
+
//#region node_modules/react-aria/dist/private/interactions/useScrollWheel.mjs
|
|
308
|
+
function $14554ba6a2007b17$export$2123ff2b87c81ca(props, ref) {
|
|
309
|
+
let { onScroll, isDisabled } = props;
|
|
310
|
+
let onScrollHandler = useCallback((e) => {
|
|
311
|
+
if (e.ctrlKey) return;
|
|
312
|
+
e.preventDefault();
|
|
313
|
+
e.stopPropagation();
|
|
314
|
+
if (onScroll) onScroll({
|
|
315
|
+
deltaX: e.deltaX,
|
|
316
|
+
deltaY: e.deltaY
|
|
317
|
+
});
|
|
318
|
+
}, [onScroll]);
|
|
319
|
+
$600b3cf69ae46262$export$90fc3a17d93f704c(ref, "wheel", isDisabled ? void 0 : onScrollHandler);
|
|
454
320
|
}
|
|
455
321
|
//#endregion
|
|
456
|
-
//#region node_modules
|
|
457
|
-
var $
|
|
458
|
-
$
|
|
322
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/ar-AE.mjs
|
|
323
|
+
var $c03aa2dde3f54f51$exports = {};
|
|
324
|
+
$c03aa2dde3f54f51$exports = { "Empty": `\u{641}\u{627}\u{631}\u{63A}` };
|
|
459
325
|
//#endregion
|
|
460
|
-
//#region node_modules
|
|
461
|
-
var $
|
|
462
|
-
$
|
|
326
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/bg-BG.mjs
|
|
327
|
+
var $d612b270ee5ea6ca$exports = {};
|
|
328
|
+
$d612b270ee5ea6ca$exports = { "Empty": `\u{418}\u{437}\u{43F}\u{440}\u{430}\u{437}\u{43D}\u{438}` };
|
|
463
329
|
//#endregion
|
|
464
|
-
//#region node_modules
|
|
465
|
-
var $
|
|
466
|
-
$
|
|
330
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/cs-CZ.mjs
|
|
331
|
+
var $9516ade4a4f015ec$exports = {};
|
|
332
|
+
$9516ade4a4f015ec$exports = { "Empty": `Pr\xe1zdn\xe9` };
|
|
467
333
|
//#endregion
|
|
468
|
-
//#region node_modules
|
|
469
|
-
var $
|
|
470
|
-
$
|
|
334
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/da-DK.mjs
|
|
335
|
+
var $41d49e6197917be1$exports = {};
|
|
336
|
+
$41d49e6197917be1$exports = { "Empty": `Tom` };
|
|
471
337
|
//#endregion
|
|
472
|
-
//#region node_modules
|
|
473
|
-
var $
|
|
474
|
-
$
|
|
338
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/de-DE.mjs
|
|
339
|
+
var $23b4dd964f7cc840$exports = {};
|
|
340
|
+
$23b4dd964f7cc840$exports = { "Empty": `Leer` };
|
|
475
341
|
//#endregion
|
|
476
|
-
//#region node_modules
|
|
477
|
-
var $
|
|
478
|
-
$
|
|
342
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/el-GR.mjs
|
|
343
|
+
var $18cf3acc4056ec0e$exports = {};
|
|
344
|
+
$18cf3acc4056ec0e$exports = { "Empty": `\u{386}\u{3B4}\u{3B5}\u{3B9}\u{3BF}` };
|
|
479
345
|
//#endregion
|
|
480
|
-
//#region node_modules
|
|
481
|
-
var $
|
|
482
|
-
$
|
|
346
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/en-US.mjs
|
|
347
|
+
var $df59f74ff621f180$exports = {};
|
|
348
|
+
$df59f74ff621f180$exports = { "Empty": `Empty` };
|
|
483
349
|
//#endregion
|
|
484
|
-
//#region node_modules
|
|
485
|
-
var $
|
|
486
|
-
$
|
|
350
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/es-ES.mjs
|
|
351
|
+
var $1a750506d5a4610f$exports = {};
|
|
352
|
+
$1a750506d5a4610f$exports = { "Empty": `Vac\xedo` };
|
|
487
353
|
//#endregion
|
|
488
|
-
//#region node_modules
|
|
489
|
-
var $
|
|
490
|
-
$
|
|
354
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/et-EE.mjs
|
|
355
|
+
var $8e1ed6a70b6e99d0$exports = {};
|
|
356
|
+
$8e1ed6a70b6e99d0$exports = { "Empty": `T\xfchjenda` };
|
|
491
357
|
//#endregion
|
|
492
|
-
//#region node_modules
|
|
493
|
-
var $
|
|
494
|
-
$
|
|
358
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/fi-FI.mjs
|
|
359
|
+
var $bda17b3c68ec60e0$exports = {};
|
|
360
|
+
$bda17b3c68ec60e0$exports = { "Empty": `Tyhj\xe4` };
|
|
495
361
|
//#endregion
|
|
496
|
-
//#region node_modules
|
|
497
|
-
var $
|
|
498
|
-
$
|
|
499
|
-
//#endregion
|
|
500
|
-
//#region node_modules
|
|
501
|
-
var $
|
|
502
|
-
$
|
|
503
|
-
//#endregion
|
|
504
|
-
//#region node_modules
|
|
505
|
-
var $
|
|
506
|
-
$
|
|
507
|
-
//#endregion
|
|
508
|
-
//#region node_modules
|
|
509
|
-
var $
|
|
510
|
-
$
|
|
511
|
-
//#endregion
|
|
512
|
-
//#region node_modules
|
|
513
|
-
var $
|
|
514
|
-
$
|
|
515
|
-
//#endregion
|
|
516
|
-
//#region node_modules
|
|
517
|
-
var $
|
|
518
|
-
$
|
|
519
|
-
//#endregion
|
|
520
|
-
//#region node_modules
|
|
521
|
-
var $
|
|
522
|
-
$
|
|
523
|
-
//#endregion
|
|
524
|
-
//#region node_modules
|
|
525
|
-
var $
|
|
526
|
-
$
|
|
527
|
-
//#endregion
|
|
528
|
-
//#region node_modules
|
|
529
|
-
var $
|
|
530
|
-
$
|
|
531
|
-
//#endregion
|
|
532
|
-
//#region node_modules
|
|
533
|
-
var $
|
|
534
|
-
$
|
|
535
|
-
//#endregion
|
|
536
|
-
//#region node_modules
|
|
537
|
-
var $
|
|
538
|
-
$
|
|
539
|
-
//#endregion
|
|
540
|
-
//#region node_modules
|
|
541
|
-
var $
|
|
542
|
-
$
|
|
543
|
-
//#endregion
|
|
544
|
-
//#region node_modules
|
|
545
|
-
var $
|
|
546
|
-
$
|
|
547
|
-
//#endregion
|
|
548
|
-
//#region node_modules
|
|
549
|
-
var $
|
|
550
|
-
$
|
|
551
|
-
//#endregion
|
|
552
|
-
//#region node_modules
|
|
553
|
-
var $
|
|
554
|
-
$
|
|
555
|
-
//#endregion
|
|
556
|
-
//#region node_modules
|
|
557
|
-
var $
|
|
558
|
-
$
|
|
559
|
-
//#endregion
|
|
560
|
-
//#region node_modules
|
|
561
|
-
var $
|
|
562
|
-
$
|
|
563
|
-
//#endregion
|
|
564
|
-
//#region node_modules
|
|
565
|
-
var $
|
|
566
|
-
$
|
|
567
|
-
//#endregion
|
|
568
|
-
//#region node_modules
|
|
569
|
-
var $
|
|
570
|
-
$
|
|
571
|
-
//#endregion
|
|
572
|
-
//#region node_modules
|
|
573
|
-
var $
|
|
574
|
-
$
|
|
575
|
-
//#endregion
|
|
576
|
-
//#region node_modules
|
|
577
|
-
var $
|
|
578
|
-
$
|
|
579
|
-
//#endregion
|
|
580
|
-
//#region node_modules
|
|
581
|
-
var $
|
|
582
|
-
$
|
|
583
|
-
//#endregion
|
|
584
|
-
//#region node_modules
|
|
585
|
-
var $
|
|
586
|
-
$
|
|
587
|
-
//#endregion
|
|
588
|
-
//#region node_modules
|
|
589
|
-
var $
|
|
590
|
-
$
|
|
591
|
-
//#endregion
|
|
592
|
-
//#region node_modules
|
|
593
|
-
var $
|
|
594
|
-
$
|
|
595
|
-
"ar-AE": $
|
|
596
|
-
"bg-BG": $
|
|
597
|
-
"cs-CZ": $
|
|
598
|
-
"da-DK": $
|
|
599
|
-
"de-DE": $
|
|
600
|
-
"el-GR": $
|
|
601
|
-
"en-US": $
|
|
602
|
-
"es-ES": $
|
|
603
|
-
"et-EE": $
|
|
604
|
-
"fi-FI": $
|
|
605
|
-
"fr-FR": $
|
|
606
|
-
"he-IL": $
|
|
607
|
-
"hr-HR": $
|
|
608
|
-
"hu-HU": $
|
|
609
|
-
"it-IT": $
|
|
610
|
-
"ja-JP": $
|
|
611
|
-
"ko-KR": $
|
|
612
|
-
"lt-LT": $
|
|
613
|
-
"lv-LV": $
|
|
614
|
-
"nb-NO": $
|
|
615
|
-
"nl-NL": $
|
|
616
|
-
"pl-PL": $
|
|
617
|
-
"pt-BR": $
|
|
618
|
-
"pt-PT": $
|
|
619
|
-
"ro-RO": $
|
|
620
|
-
"ru-RU": $
|
|
621
|
-
"sk-SK": $
|
|
622
|
-
"sl-SI": $
|
|
623
|
-
"sr-SP": $
|
|
624
|
-
"sv-SE": $
|
|
625
|
-
"tr-TR": $
|
|
626
|
-
"uk-UA": $
|
|
627
|
-
"zh-CN": $
|
|
628
|
-
"zh-TW": $
|
|
362
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/fr-FR.mjs
|
|
363
|
+
var $dfccc3416d8619f2$exports = {};
|
|
364
|
+
$dfccc3416d8619f2$exports = { "Empty": `Vide` };
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/he-IL.mjs
|
|
367
|
+
var $03ad7cde4af17dbc$exports = {};
|
|
368
|
+
$03ad7cde4af17dbc$exports = { "Empty": `\u{5E8}\u{5D9}\u{5E7}` };
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/hr-HR.mjs
|
|
371
|
+
var $3d83efd6529bcc21$exports = {};
|
|
372
|
+
$3d83efd6529bcc21$exports = { "Empty": `Prazno` };
|
|
373
|
+
//#endregion
|
|
374
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/hu-HU.mjs
|
|
375
|
+
var $3cf52fb2bf374b1e$exports = {};
|
|
376
|
+
$3cf52fb2bf374b1e$exports = { "Empty": `\xdcres` };
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/it-IT.mjs
|
|
379
|
+
var $6a6f2c49f92bd42e$exports = {};
|
|
380
|
+
$6a6f2c49f92bd42e$exports = { "Empty": `Vuoto` };
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/ja-JP.mjs
|
|
383
|
+
var $3cc0319ead4d5f7a$exports = {};
|
|
384
|
+
$3cc0319ead4d5f7a$exports = { "Empty": `\u{7A7A}` };
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/ko-KR.mjs
|
|
387
|
+
var $24d65dbbedc50cf8$exports = {};
|
|
388
|
+
$24d65dbbedc50cf8$exports = { "Empty": `\u{BE44}\u{C5B4} \u{C788}\u{C74C}` };
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/lt-LT.mjs
|
|
391
|
+
var $9022dcf5dfa5b508$exports = {};
|
|
392
|
+
$9022dcf5dfa5b508$exports = { "Empty": `Tu\u{161}\u{10D}ias` };
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/lv-LV.mjs
|
|
395
|
+
var $6746207c35f8a73d$exports = {};
|
|
396
|
+
$6746207c35f8a73d$exports = { "Empty": `Tuk\u{161}s` };
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/nb-NO.mjs
|
|
399
|
+
var $e23e2c12aa0580ab$exports = {};
|
|
400
|
+
$e23e2c12aa0580ab$exports = { "Empty": `Tom` };
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/nl-NL.mjs
|
|
403
|
+
var $7a42c3dae25ebf3e$exports = {};
|
|
404
|
+
$7a42c3dae25ebf3e$exports = { "Empty": `Leeg` };
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/pl-PL.mjs
|
|
407
|
+
var $f033322c769d9228$exports = {};
|
|
408
|
+
$f033322c769d9228$exports = { "Empty": `Pusty` };
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/pt-BR.mjs
|
|
411
|
+
var $bff6557112f09a21$exports = {};
|
|
412
|
+
$bff6557112f09a21$exports = { "Empty": `Vazio` };
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/pt-PT.mjs
|
|
415
|
+
var $69371b06c393f3b9$exports = {};
|
|
416
|
+
$69371b06c393f3b9$exports = { "Empty": `Vazio` };
|
|
417
|
+
//#endregion
|
|
418
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/ro-RO.mjs
|
|
419
|
+
var $76fd2ca03adf7a37$exports = {};
|
|
420
|
+
$76fd2ca03adf7a37$exports = { "Empty": `Gol` };
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/ru-RU.mjs
|
|
423
|
+
var $fa02fe0d4c09a614$exports = {};
|
|
424
|
+
$fa02fe0d4c09a614$exports = { "Empty": `\u{41D}\u{435} \u{437}\u{430}\u{43F}\u{43E}\u{43B}\u{43D}\u{435}\u{43D}\u{43E}` };
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/sk-SK.mjs
|
|
427
|
+
var $a240aba809e2b311$exports = {};
|
|
428
|
+
$a240aba809e2b311$exports = { "Empty": `Pr\xe1zdne` };
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/sl-SI.mjs
|
|
431
|
+
var $2c29d48084ee6251$exports = {};
|
|
432
|
+
$2c29d48084ee6251$exports = { "Empty": `Prazen` };
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/sr-SP.mjs
|
|
435
|
+
var $254c7eb682749050$exports = {};
|
|
436
|
+
$254c7eb682749050$exports = { "Empty": `Prazno` };
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/sv-SE.mjs
|
|
439
|
+
var $add997722e4d4b6e$exports = {};
|
|
440
|
+
$add997722e4d4b6e$exports = { "Empty": `Tomt` };
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/tr-TR.mjs
|
|
443
|
+
var $542f020fc9285606$exports = {};
|
|
444
|
+
$542f020fc9285606$exports = { "Empty": `Bo\u{15F}` };
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/uk-UA.mjs
|
|
447
|
+
var $3135b03c5e7cb78f$exports = {};
|
|
448
|
+
$3135b03c5e7cb78f$exports = { "Empty": `\u{41F}\u{443}\u{441}\u{442}\u{43E}` };
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/zh-CN.mjs
|
|
451
|
+
var $29092b8c778be040$exports = {};
|
|
452
|
+
$29092b8c778be040$exports = { "Empty": `\u{7A7A}` };
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region node_modules/react-aria/dist/private/intl/spinbutton/zh-TW.mjs
|
|
455
|
+
var $94b34635baf16223$exports = {};
|
|
456
|
+
$94b34635baf16223$exports = { "Empty": `\u{7A7A}\u{767D}` };
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region node_modules/react-aria/dist/private/spinbutton/intlStrings.mjs
|
|
459
|
+
var $6279e3628ec747df$exports = {};
|
|
460
|
+
$6279e3628ec747df$exports = {
|
|
461
|
+
"ar-AE": $c03aa2dde3f54f51$exports,
|
|
462
|
+
"bg-BG": $d612b270ee5ea6ca$exports,
|
|
463
|
+
"cs-CZ": $9516ade4a4f015ec$exports,
|
|
464
|
+
"da-DK": $41d49e6197917be1$exports,
|
|
465
|
+
"de-DE": $23b4dd964f7cc840$exports,
|
|
466
|
+
"el-GR": $18cf3acc4056ec0e$exports,
|
|
467
|
+
"en-US": $df59f74ff621f180$exports,
|
|
468
|
+
"es-ES": $1a750506d5a4610f$exports,
|
|
469
|
+
"et-EE": $8e1ed6a70b6e99d0$exports,
|
|
470
|
+
"fi-FI": $bda17b3c68ec60e0$exports,
|
|
471
|
+
"fr-FR": $dfccc3416d8619f2$exports,
|
|
472
|
+
"he-IL": $03ad7cde4af17dbc$exports,
|
|
473
|
+
"hr-HR": $3d83efd6529bcc21$exports,
|
|
474
|
+
"hu-HU": $3cf52fb2bf374b1e$exports,
|
|
475
|
+
"it-IT": $6a6f2c49f92bd42e$exports,
|
|
476
|
+
"ja-JP": $3cc0319ead4d5f7a$exports,
|
|
477
|
+
"ko-KR": $24d65dbbedc50cf8$exports,
|
|
478
|
+
"lt-LT": $9022dcf5dfa5b508$exports,
|
|
479
|
+
"lv-LV": $6746207c35f8a73d$exports,
|
|
480
|
+
"nb-NO": $e23e2c12aa0580ab$exports,
|
|
481
|
+
"nl-NL": $7a42c3dae25ebf3e$exports,
|
|
482
|
+
"pl-PL": $f033322c769d9228$exports,
|
|
483
|
+
"pt-BR": $bff6557112f09a21$exports,
|
|
484
|
+
"pt-PT": $69371b06c393f3b9$exports,
|
|
485
|
+
"ro-RO": $76fd2ca03adf7a37$exports,
|
|
486
|
+
"ru-RU": $fa02fe0d4c09a614$exports,
|
|
487
|
+
"sk-SK": $a240aba809e2b311$exports,
|
|
488
|
+
"sl-SI": $2c29d48084ee6251$exports,
|
|
489
|
+
"sr-SP": $254c7eb682749050$exports,
|
|
490
|
+
"sv-SE": $add997722e4d4b6e$exports,
|
|
491
|
+
"tr-TR": $542f020fc9285606$exports,
|
|
492
|
+
"uk-UA": $3135b03c5e7cb78f$exports,
|
|
493
|
+
"zh-CN": $29092b8c778be040$exports,
|
|
494
|
+
"zh-TW": $94b34635baf16223$exports
|
|
629
495
|
};
|
|
630
496
|
//#endregion
|
|
631
|
-
//#region node_modules
|
|
497
|
+
//#region node_modules/react-aria/dist/private/spinbutton/useSpinButton.mjs
|
|
632
498
|
function $parcel$interopDefault$1(a) {
|
|
633
499
|
return a && a.__esModule ? a.default : a;
|
|
634
500
|
}
|
|
635
|
-
var $
|
|
636
|
-
function $
|
|
501
|
+
var $757ec6630f26125c$var$noop = () => {};
|
|
502
|
+
function $757ec6630f26125c$export$e908e06f4b8e3402(props) {
|
|
637
503
|
const _async = useRef(void 0);
|
|
638
504
|
let { value, textValue, minValue, maxValue, isDisabled, isReadOnly, isRequired, onIncrement, onIncrementPage, onDecrement, onDecrementPage, onDecrementToMin, onIncrementToMax } = props;
|
|
639
|
-
const stringFormatter = $
|
|
505
|
+
const stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault$1($6279e3628ec747df$exports), "@react-aria/spinbutton");
|
|
640
506
|
let isSpinning = useRef(false);
|
|
641
507
|
const clearAsync = useCallback(() => {
|
|
642
508
|
clearTimeout(_async.current);
|
|
643
509
|
isSpinning.current = false;
|
|
644
510
|
}, []);
|
|
645
|
-
const clearAsyncEvent = $
|
|
511
|
+
const clearAsyncEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(() => {
|
|
646
512
|
clearAsync();
|
|
647
513
|
});
|
|
648
514
|
useEffect(() => {
|
|
@@ -653,38 +519,38 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
653
519
|
switch (e.key) {
|
|
654
520
|
case "PageUp": if (onIncrementPage) {
|
|
655
521
|
e.preventDefault();
|
|
656
|
-
onIncrementPage
|
|
522
|
+
onIncrementPage?.();
|
|
657
523
|
break;
|
|
658
524
|
}
|
|
659
525
|
case "ArrowUp":
|
|
660
526
|
case "Up":
|
|
661
527
|
if (onIncrement) {
|
|
662
528
|
e.preventDefault();
|
|
663
|
-
onIncrement
|
|
529
|
+
onIncrement?.();
|
|
664
530
|
}
|
|
665
531
|
break;
|
|
666
532
|
case "PageDown": if (onDecrementPage) {
|
|
667
533
|
e.preventDefault();
|
|
668
|
-
onDecrementPage
|
|
534
|
+
onDecrementPage?.();
|
|
669
535
|
break;
|
|
670
536
|
}
|
|
671
537
|
case "ArrowDown":
|
|
672
538
|
case "Down":
|
|
673
539
|
if (onDecrement) {
|
|
674
540
|
e.preventDefault();
|
|
675
|
-
onDecrement
|
|
541
|
+
onDecrement?.();
|
|
676
542
|
}
|
|
677
543
|
break;
|
|
678
544
|
case "Home":
|
|
679
545
|
if (onDecrementToMin) {
|
|
680
546
|
e.preventDefault();
|
|
681
|
-
onDecrementToMin
|
|
547
|
+
onDecrementToMin?.();
|
|
682
548
|
}
|
|
683
549
|
break;
|
|
684
550
|
case "End":
|
|
685
551
|
if (onIncrementToMax) {
|
|
686
552
|
e.preventDefault();
|
|
687
|
-
onIncrementToMax
|
|
553
|
+
onIncrementToMax?.();
|
|
688
554
|
}
|
|
689
555
|
break;
|
|
690
556
|
}
|
|
@@ -699,33 +565,33 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
699
565
|
let ariaTextValue = textValue === "" ? stringFormatter.format("Empty") : (textValue || `${value}`).replace("-", "−");
|
|
700
566
|
useEffect(() => {
|
|
701
567
|
if (isFocused.current) {
|
|
702
|
-
$
|
|
703
|
-
$
|
|
568
|
+
$a46cf152bb926da5$export$d10ae4f68404609a("assertive");
|
|
569
|
+
$a46cf152bb926da5$export$a9b970dcc4ae71a9(ariaTextValue, "assertive");
|
|
704
570
|
}
|
|
705
571
|
}, [ariaTextValue]);
|
|
706
572
|
let onPointerCancel = useCallback(() => {
|
|
707
573
|
clearAsync();
|
|
708
574
|
}, [clearAsync]);
|
|
709
|
-
const onIncrementEvent = $
|
|
710
|
-
const onDecrementEvent = $
|
|
711
|
-
const stepUpEvent = $
|
|
575
|
+
const onIncrementEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(onIncrement ?? $757ec6630f26125c$var$noop);
|
|
576
|
+
const onDecrementEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(onDecrement ?? $757ec6630f26125c$var$noop);
|
|
577
|
+
const stepUpEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(() => {
|
|
712
578
|
if (maxValue === void 0 || isNaN(maxValue) || value === void 0 || isNaN(value) || value < maxValue) {
|
|
713
579
|
onIncrementEvent();
|
|
714
580
|
onIncrementPressStartEvent(60);
|
|
715
581
|
}
|
|
716
582
|
});
|
|
717
|
-
const onIncrementPressStartEvent = $
|
|
583
|
+
const onIncrementPressStartEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52((initialStepDelay) => {
|
|
718
584
|
clearAsyncEvent();
|
|
719
585
|
isSpinning.current = true;
|
|
720
586
|
_async.current = window.setTimeout(stepUpEvent, initialStepDelay);
|
|
721
587
|
});
|
|
722
|
-
const stepDownEvent = $
|
|
588
|
+
const stepDownEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(() => {
|
|
723
589
|
if (minValue === void 0 || isNaN(minValue) || value === void 0 || isNaN(value) || value > minValue) {
|
|
724
590
|
onDecrementEvent();
|
|
725
591
|
onDecrementPressStartEvent(60);
|
|
726
592
|
}
|
|
727
593
|
});
|
|
728
|
-
const onDecrementPressStartEvent = $
|
|
594
|
+
const onDecrementPressStartEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52((initialStepDelay) => {
|
|
729
595
|
clearAsyncEvent();
|
|
730
596
|
isSpinning.current = true;
|
|
731
597
|
_async.current = window.setTimeout(stepDownEvent, initialStepDelay);
|
|
@@ -733,7 +599,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
733
599
|
let cancelContextMenu = (e) => {
|
|
734
600
|
e.preventDefault();
|
|
735
601
|
};
|
|
736
|
-
let { addGlobalListener, removeAllGlobalListeners } = $
|
|
602
|
+
let { addGlobalListener, removeAllGlobalListeners } = $48a7d519b337145d$export$4eaf04e54aa8eed6();
|
|
737
603
|
let isUp = useRef(false);
|
|
738
604
|
let [isIncrementPressed, setIsIncrementPressed] = useState(null);
|
|
739
605
|
useEffect(() => {
|
|
@@ -763,7 +629,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
763
629
|
onPressStart: (e) => {
|
|
764
630
|
clearAsync();
|
|
765
631
|
if (e.pointerType !== "touch") {
|
|
766
|
-
onIncrement
|
|
632
|
+
onIncrement?.();
|
|
767
633
|
setIsIncrementPressed("mouse");
|
|
768
634
|
} else {
|
|
769
635
|
addGlobalListener(window, "pointercancel", onPointerCancel, { capture: true });
|
|
@@ -781,7 +647,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
781
647
|
onPressEnd: (e) => {
|
|
782
648
|
clearAsync();
|
|
783
649
|
if (e.pointerType === "touch") {
|
|
784
|
-
if (!isSpinning.current && isUp.current) onIncrement
|
|
650
|
+
if (!isSpinning.current && isUp.current) onIncrement?.();
|
|
785
651
|
}
|
|
786
652
|
isUp.current = false;
|
|
787
653
|
setIsIncrementPressed(null);
|
|
@@ -793,7 +659,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
793
659
|
onPressStart: (e) => {
|
|
794
660
|
clearAsync();
|
|
795
661
|
if (e.pointerType !== "touch") {
|
|
796
|
-
onDecrement
|
|
662
|
+
onDecrement?.();
|
|
797
663
|
setIsDecrementPressed("mouse");
|
|
798
664
|
} else {
|
|
799
665
|
addGlobalListener(window, "pointercancel", onPointerCancel, { capture: true });
|
|
@@ -810,7 +676,7 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
810
676
|
onPressEnd: (e) => {
|
|
811
677
|
clearAsync();
|
|
812
678
|
if (e.pointerType === "touch") {
|
|
813
|
-
if (!isSpinning.current && isUp.current) onDecrement
|
|
679
|
+
if (!isSpinning.current && isUp.current) onDecrement?.();
|
|
814
680
|
}
|
|
815
681
|
isUp.current = false;
|
|
816
682
|
setIsDecrementPressed(null);
|
|
@@ -821,346 +687,343 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
821
687
|
};
|
|
822
688
|
}
|
|
823
689
|
//#endregion
|
|
824
|
-
//#region node_modules
|
|
825
|
-
var $
|
|
826
|
-
$
|
|
690
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/ar-AE.mjs
|
|
691
|
+
var $50f1093a6d23d116$exports = {};
|
|
692
|
+
$50f1093a6d23d116$exports = {
|
|
827
693
|
"decrease": (args) => `\u{62E}\u{641}\u{636} ${args.fieldLabel}`,
|
|
828
694
|
"increase": (args) => `\u{632}\u{64A}\u{627}\u{62F}\u{629} ${args.fieldLabel}`,
|
|
829
695
|
"numberField": `\u{62D}\u{642}\u{644} \u{631}\u{642}\u{645}\u{64A}`
|
|
830
696
|
};
|
|
831
697
|
//#endregion
|
|
832
|
-
//#region node_modules
|
|
833
|
-
var $
|
|
834
|
-
$
|
|
698
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/bg-BG.mjs
|
|
699
|
+
var $8f4fd2367d49b0f4$exports = {};
|
|
700
|
+
$8f4fd2367d49b0f4$exports = {
|
|
835
701
|
"decrease": (args) => `\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${args.fieldLabel}`,
|
|
836
702
|
"increase": (args) => `\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${args.fieldLabel}`,
|
|
837
703
|
"numberField": `\u{41D}\u{43E}\u{43C}\u{435}\u{440} \u{43D}\u{430} \u{43F}\u{43E}\u{43B}\u{435}\u{442}\u{43E}`
|
|
838
704
|
};
|
|
839
705
|
//#endregion
|
|
840
|
-
//#region node_modules
|
|
841
|
-
var $
|
|
842
|
-
$
|
|
706
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/cs-CZ.mjs
|
|
707
|
+
var $060018a1c3ec2fce$exports = {};
|
|
708
|
+
$060018a1c3ec2fce$exports = {
|
|
843
709
|
"decrease": (args) => `Sn\xed\u{17E}it ${args.fieldLabel}`,
|
|
844
710
|
"increase": (args) => `Zv\xfd\u{161}it ${args.fieldLabel}`,
|
|
845
711
|
"numberField": `\u{10C}\xedseln\xe9 pole`
|
|
846
712
|
};
|
|
847
713
|
//#endregion
|
|
848
|
-
//#region node_modules
|
|
849
|
-
var $
|
|
850
|
-
$
|
|
714
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/da-DK.mjs
|
|
715
|
+
var $34605f3e0266a8f3$exports = {};
|
|
716
|
+
$34605f3e0266a8f3$exports = {
|
|
851
717
|
"decrease": (args) => `Reducer ${args.fieldLabel}`,
|
|
852
718
|
"increase": (args) => `\xd8g ${args.fieldLabel}`,
|
|
853
719
|
"numberField": `Talfelt`
|
|
854
720
|
};
|
|
855
721
|
//#endregion
|
|
856
|
-
//#region node_modules
|
|
857
|
-
var $
|
|
858
|
-
$
|
|
722
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/de-DE.mjs
|
|
723
|
+
var $64f20e1112866bbd$exports = {};
|
|
724
|
+
$64f20e1112866bbd$exports = {
|
|
859
725
|
"decrease": (args) => `${args.fieldLabel} verringern`,
|
|
860
726
|
"increase": (args) => `${args.fieldLabel} erh\xf6hen`,
|
|
861
727
|
"numberField": `Nummernfeld`
|
|
862
728
|
};
|
|
863
729
|
//#endregion
|
|
864
|
-
//#region node_modules
|
|
865
|
-
var $
|
|
866
|
-
$
|
|
730
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/el-GR.mjs
|
|
731
|
+
var $bfa0aaf1a402f382$exports = {};
|
|
732
|
+
$bfa0aaf1a402f382$exports = {
|
|
867
733
|
"decrease": (args) => `\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${args.fieldLabel}`,
|
|
868
734
|
"increase": (args) => `\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${args.fieldLabel}`,
|
|
869
735
|
"numberField": `\u{3A0}\u{3B5}\u{3B4}\u{3AF}\u{3BF} \u{3B1}\u{3C1}\u{3B9}\u{3B8}\u{3BC}\u{3BF}\u{3CD}`
|
|
870
736
|
};
|
|
871
737
|
//#endregion
|
|
872
|
-
//#region node_modules
|
|
873
|
-
var $
|
|
874
|
-
$
|
|
738
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/en-US.mjs
|
|
739
|
+
var $2656ce930519213b$exports = {};
|
|
740
|
+
$2656ce930519213b$exports = {
|
|
875
741
|
"decrease": (args) => `Decrease ${args.fieldLabel}`,
|
|
876
742
|
"increase": (args) => `Increase ${args.fieldLabel}`,
|
|
877
743
|
"numberField": `Number field`
|
|
878
744
|
};
|
|
879
745
|
//#endregion
|
|
880
|
-
//#region node_modules
|
|
881
|
-
var $
|
|
882
|
-
$
|
|
746
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/es-ES.mjs
|
|
747
|
+
var $260cc0fc04d161dd$exports = {};
|
|
748
|
+
$260cc0fc04d161dd$exports = {
|
|
883
749
|
"decrease": (args) => `Reducir ${args.fieldLabel}`,
|
|
884
750
|
"increase": (args) => `Aumentar ${args.fieldLabel}`,
|
|
885
751
|
"numberField": `Campo de n\xfamero`
|
|
886
752
|
};
|
|
887
753
|
//#endregion
|
|
888
|
-
//#region node_modules
|
|
889
|
-
var $
|
|
890
|
-
$
|
|
754
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/et-EE.mjs
|
|
755
|
+
var $5929126f62332a39$exports = {};
|
|
756
|
+
$5929126f62332a39$exports = {
|
|
891
757
|
"decrease": (args) => `V\xe4henda ${args.fieldLabel}`,
|
|
892
758
|
"increase": (args) => `Suurenda ${args.fieldLabel}`,
|
|
893
759
|
"numberField": `Numbri v\xe4li`
|
|
894
760
|
};
|
|
895
761
|
//#endregion
|
|
896
|
-
//#region node_modules
|
|
897
|
-
var $
|
|
898
|
-
$
|
|
762
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/fi-FI.mjs
|
|
763
|
+
var $fc98374bce6a8f49$exports = {};
|
|
764
|
+
$fc98374bce6a8f49$exports = {
|
|
899
765
|
"decrease": (args) => `V\xe4henn\xe4 ${args.fieldLabel}`,
|
|
900
766
|
"increase": (args) => `Lis\xe4\xe4 ${args.fieldLabel}`,
|
|
901
767
|
"numberField": `Numerokentt\xe4`
|
|
902
768
|
};
|
|
903
769
|
//#endregion
|
|
904
|
-
//#region node_modules
|
|
905
|
-
var $
|
|
906
|
-
$
|
|
770
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/fr-FR.mjs
|
|
771
|
+
var $574239e9a0c4ce9f$exports = {};
|
|
772
|
+
$574239e9a0c4ce9f$exports = {
|
|
907
773
|
"decrease": (args) => `Diminuer ${args.fieldLabel}`,
|
|
908
774
|
"increase": (args) => `Augmenter ${args.fieldLabel}`,
|
|
909
775
|
"numberField": `Champ de nombre`
|
|
910
776
|
};
|
|
911
777
|
//#endregion
|
|
912
|
-
//#region node_modules
|
|
913
|
-
var $
|
|
914
|
-
$
|
|
778
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/he-IL.mjs
|
|
779
|
+
var $a80db10c45105af6$exports = {};
|
|
780
|
+
$a80db10c45105af6$exports = {
|
|
915
781
|
"decrease": (args) => `\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${args.fieldLabel}`,
|
|
916
782
|
"increase": (args) => `\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${args.fieldLabel}`,
|
|
917
783
|
"numberField": `\u{5E9}\u{5D3}\u{5D4} \u{5DE}\u{5E1}\u{5E4}\u{5E8}`
|
|
918
784
|
};
|
|
919
785
|
//#endregion
|
|
920
|
-
//#region node_modules
|
|
921
|
-
var $
|
|
922
|
-
$
|
|
786
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/hr-HR.mjs
|
|
787
|
+
var $1df8c58f234da60a$exports = {};
|
|
788
|
+
$1df8c58f234da60a$exports = {
|
|
923
789
|
"decrease": (args) => `Smanji ${args.fieldLabel}`,
|
|
924
790
|
"increase": (args) => `Pove\u{107}aj ${args.fieldLabel}`,
|
|
925
791
|
"numberField": `Polje broja`
|
|
926
792
|
};
|
|
927
793
|
//#endregion
|
|
928
|
-
//#region node_modules
|
|
929
|
-
var $
|
|
930
|
-
$
|
|
794
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/hu-HU.mjs
|
|
795
|
+
var $c990249689bb58d0$exports = {};
|
|
796
|
+
$c990249689bb58d0$exports = {
|
|
931
797
|
"decrease": (args) => `${args.fieldLabel} cs\xf6kkent\xe9se`,
|
|
932
798
|
"increase": (args) => `${args.fieldLabel} n\xf6vel\xe9se`,
|
|
933
799
|
"numberField": `Sz\xe1mmez\u{151}`
|
|
934
800
|
};
|
|
935
801
|
//#endregion
|
|
936
|
-
//#region node_modules
|
|
937
|
-
var $
|
|
938
|
-
$
|
|
802
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/it-IT.mjs
|
|
803
|
+
var $03e73e050e75c075$exports = {};
|
|
804
|
+
$03e73e050e75c075$exports = {
|
|
939
805
|
"decrease": (args) => `Riduci ${args.fieldLabel}`,
|
|
940
806
|
"increase": (args) => `Aumenta ${args.fieldLabel}`,
|
|
941
807
|
"numberField": `Campo numero`
|
|
942
808
|
};
|
|
943
809
|
//#endregion
|
|
944
|
-
//#region node_modules
|
|
945
|
-
var $
|
|
946
|
-
$
|
|
810
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/ja-JP.mjs
|
|
811
|
+
var $1486a16b22508ab9$exports = {};
|
|
812
|
+
$1486a16b22508ab9$exports = {
|
|
947
813
|
"decrease": (args) => `${args.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,
|
|
948
814
|
"increase": (args) => `${args.fieldLabel}\u{3092}\u{62E1}\u{5927}`,
|
|
949
815
|
"numberField": `\u{6570}\u{5024}\u{30D5}\u{30A3}\u{30FC}\u{30EB}\u{30C9}`
|
|
950
816
|
};
|
|
951
817
|
//#endregion
|
|
952
|
-
//#region node_modules
|
|
953
|
-
var $
|
|
954
|
-
$
|
|
818
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/ko-KR.mjs
|
|
819
|
+
var $da3ce82ad291e297$exports = {};
|
|
820
|
+
$da3ce82ad291e297$exports = {
|
|
955
821
|
"decrease": (args) => `${args.fieldLabel} \u{AC10}\u{C18C}`,
|
|
956
822
|
"increase": (args) => `${args.fieldLabel} \u{C99D}\u{AC00}`,
|
|
957
823
|
"numberField": `\u{BC88}\u{D638} \u{D544}\u{B4DC}`
|
|
958
824
|
};
|
|
959
825
|
//#endregion
|
|
960
|
-
//#region node_modules
|
|
961
|
-
var $
|
|
962
|
-
$
|
|
826
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/lt-LT.mjs
|
|
827
|
+
var $f06e9c465fb83243$exports = {};
|
|
828
|
+
$f06e9c465fb83243$exports = {
|
|
963
829
|
"decrease": (args) => `Suma\u{17E}inti ${args.fieldLabel}`,
|
|
964
830
|
"increase": (args) => `Padidinti ${args.fieldLabel}`,
|
|
965
831
|
"numberField": `Numerio laukas`
|
|
966
832
|
};
|
|
967
833
|
//#endregion
|
|
968
|
-
//#region node_modules
|
|
969
|
-
var $
|
|
970
|
-
$
|
|
834
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/lv-LV.mjs
|
|
835
|
+
var $02ed0f44dca8e510$exports = {};
|
|
836
|
+
$02ed0f44dca8e510$exports = {
|
|
971
837
|
"decrease": (args) => `Samazin\u{101}\u{161}ana ${args.fieldLabel}`,
|
|
972
838
|
"increase": (args) => `Palielin\u{101}\u{161}ana ${args.fieldLabel}`,
|
|
973
839
|
"numberField": `Skait\u{13C}u lauks`
|
|
974
840
|
};
|
|
975
841
|
//#endregion
|
|
976
|
-
//#region node_modules
|
|
977
|
-
var $
|
|
978
|
-
$
|
|
842
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/nb-NO.mjs
|
|
843
|
+
var $7d2396d9fde5f3f5$exports = {};
|
|
844
|
+
$7d2396d9fde5f3f5$exports = {
|
|
979
845
|
"decrease": (args) => `Reduser ${args.fieldLabel}`,
|
|
980
846
|
"increase": (args) => `\xd8k ${args.fieldLabel}`,
|
|
981
847
|
"numberField": `Tallfelt`
|
|
982
848
|
};
|
|
983
849
|
//#endregion
|
|
984
|
-
//#region node_modules
|
|
985
|
-
var $
|
|
986
|
-
$
|
|
850
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/nl-NL.mjs
|
|
851
|
+
var $294f579ef11ab713$exports = {};
|
|
852
|
+
$294f579ef11ab713$exports = {
|
|
987
853
|
"decrease": (args) => `${args.fieldLabel} verlagen`,
|
|
988
854
|
"increase": (args) => `${args.fieldLabel} verhogen`,
|
|
989
855
|
"numberField": `Getalveld`
|
|
990
856
|
};
|
|
991
857
|
//#endregion
|
|
992
|
-
//#region node_modules
|
|
993
|
-
var $
|
|
994
|
-
$
|
|
858
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/pl-PL.mjs
|
|
859
|
+
var $46b77281e4caa836$exports = {};
|
|
860
|
+
$46b77281e4caa836$exports = {
|
|
995
861
|
"decrease": (args) => `Zmniejsz ${args.fieldLabel}`,
|
|
996
862
|
"increase": (args) => `Zwi\u{119}ksz ${args.fieldLabel}`,
|
|
997
863
|
"numberField": `Pole numeru`
|
|
998
864
|
};
|
|
999
865
|
//#endregion
|
|
1000
|
-
//#region node_modules
|
|
1001
|
-
var $
|
|
1002
|
-
$
|
|
866
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/pt-BR.mjs
|
|
867
|
+
var $f12d8c9bdaa0bcb1$exports = {};
|
|
868
|
+
$f12d8c9bdaa0bcb1$exports = {
|
|
1003
869
|
"decrease": (args) => `Diminuir ${args.fieldLabel}`,
|
|
1004
870
|
"increase": (args) => `Aumentar ${args.fieldLabel}`,
|
|
1005
871
|
"numberField": `Campo de n\xfamero`
|
|
1006
872
|
};
|
|
1007
873
|
//#endregion
|
|
1008
|
-
//#region node_modules
|
|
1009
|
-
var $
|
|
1010
|
-
$
|
|
874
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/pt-PT.mjs
|
|
875
|
+
var $8b1446e7064e2ed7$exports = {};
|
|
876
|
+
$8b1446e7064e2ed7$exports = {
|
|
1011
877
|
"decrease": (args) => `Diminuir ${args.fieldLabel}`,
|
|
1012
878
|
"increase": (args) => `Aumentar ${args.fieldLabel}`,
|
|
1013
879
|
"numberField": `Campo num\xe9rico`
|
|
1014
880
|
};
|
|
1015
881
|
//#endregion
|
|
1016
|
-
//#region node_modules
|
|
1017
|
-
var $
|
|
1018
|
-
$
|
|
882
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/ro-RO.mjs
|
|
883
|
+
var $c709bb06dc2a8e23$exports = {};
|
|
884
|
+
$c709bb06dc2a8e23$exports = {
|
|
1019
885
|
"decrease": (args) => `Sc\u{103}dere ${args.fieldLabel}`,
|
|
1020
886
|
"increase": (args) => `Cre\u{219}tere ${args.fieldLabel}`,
|
|
1021
887
|
"numberField": `C\xe2mp numeric`
|
|
1022
888
|
};
|
|
1023
889
|
//#endregion
|
|
1024
|
-
//#region node_modules
|
|
1025
|
-
var $
|
|
1026
|
-
$
|
|
890
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/ru-RU.mjs
|
|
891
|
+
var $915fe8001bee7d0a$exports = {};
|
|
892
|
+
$915fe8001bee7d0a$exports = {
|
|
1027
893
|
"decrease": (args) => `\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${args.fieldLabel}`,
|
|
1028
894
|
"increase": (args) => `\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${args.fieldLabel}`,
|
|
1029
895
|
"numberField": `\u{427}\u{438}\u{441}\u{43B}\u{43E}\u{432}\u{43E}\u{435} \u{43F}\u{43E}\u{43B}\u{435}`
|
|
1030
896
|
};
|
|
1031
897
|
//#endregion
|
|
1032
|
-
//#region node_modules
|
|
1033
|
-
var $
|
|
1034
|
-
$
|
|
898
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/sk-SK.mjs
|
|
899
|
+
var $79e778f6a71e6e7d$exports = {};
|
|
900
|
+
$79e778f6a71e6e7d$exports = {
|
|
1035
901
|
"decrease": (args) => `Zn\xed\u{17E}i\u{165} ${args.fieldLabel}`,
|
|
1036
902
|
"increase": (args) => `Zv\xfd\u{161}i\u{165} ${args.fieldLabel}`,
|
|
1037
903
|
"numberField": `\u{10C}\xedseln\xe9 pole`
|
|
1038
904
|
};
|
|
1039
905
|
//#endregion
|
|
1040
|
-
//#region node_modules
|
|
1041
|
-
var $
|
|
1042
|
-
$
|
|
906
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/sl-SI.mjs
|
|
907
|
+
var $6799bde136a492e8$exports = {};
|
|
908
|
+
$6799bde136a492e8$exports = {
|
|
1043
909
|
"decrease": (args) => `Upadati ${args.fieldLabel}`,
|
|
1044
910
|
"increase": (args) => `Pove\u{10D}ajte ${args.fieldLabel}`,
|
|
1045
911
|
"numberField": `\u{160}tevil\u{10D}no polje`
|
|
1046
912
|
};
|
|
1047
913
|
//#endregion
|
|
1048
|
-
//#region node_modules
|
|
1049
|
-
var $
|
|
1050
|
-
$
|
|
914
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/sr-SP.mjs
|
|
915
|
+
var $ca2ffb0adac8e2d5$exports = {};
|
|
916
|
+
$ca2ffb0adac8e2d5$exports = {
|
|
1051
917
|
"decrease": (args) => `Smanji ${args.fieldLabel}`,
|
|
1052
918
|
"increase": (args) => `Pove\u{107}aj ${args.fieldLabel}`,
|
|
1053
919
|
"numberField": `Polje broja`
|
|
1054
920
|
};
|
|
1055
921
|
//#endregion
|
|
1056
|
-
//#region node_modules
|
|
1057
|
-
var $
|
|
1058
|
-
$
|
|
922
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/sv-SE.mjs
|
|
923
|
+
var $23a41be500b56b00$exports = {};
|
|
924
|
+
$23a41be500b56b00$exports = {
|
|
1059
925
|
"decrease": (args) => `Minska ${args.fieldLabel}`,
|
|
1060
926
|
"increase": (args) => `\xd6ka ${args.fieldLabel}`,
|
|
1061
927
|
"numberField": `Nummerf\xe4lt`
|
|
1062
928
|
};
|
|
1063
929
|
//#endregion
|
|
1064
|
-
//#region node_modules
|
|
1065
|
-
var $
|
|
1066
|
-
$
|
|
930
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/tr-TR.mjs
|
|
931
|
+
var $5847a002bd1a8278$exports = {};
|
|
932
|
+
$5847a002bd1a8278$exports = {
|
|
1067
933
|
"decrease": (args) => `${args.fieldLabel} azalt`,
|
|
1068
934
|
"increase": (args) => `${args.fieldLabel} artt\u{131}r`,
|
|
1069
935
|
"numberField": `Say\u{131} alan\u{131}`
|
|
1070
936
|
};
|
|
1071
937
|
//#endregion
|
|
1072
|
-
//#region node_modules
|
|
1073
|
-
var $
|
|
1074
|
-
$
|
|
938
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/uk-UA.mjs
|
|
939
|
+
var $e802b0c478fad83f$exports = {};
|
|
940
|
+
$e802b0c478fad83f$exports = {
|
|
1075
941
|
"decrease": (args) => `\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${args.fieldLabel}`,
|
|
1076
942
|
"increase": (args) => `\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${args.fieldLabel}`,
|
|
1077
943
|
"numberField": `\u{41F}\u{43E}\u{43B}\u{435} \u{43D}\u{43E}\u{43C}\u{435}\u{440}\u{430}`
|
|
1078
944
|
};
|
|
1079
945
|
//#endregion
|
|
1080
|
-
//#region node_modules
|
|
1081
|
-
var $
|
|
1082
|
-
$
|
|
946
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/zh-CN.mjs
|
|
947
|
+
var $9bee35dcd8ee2f43$exports = {};
|
|
948
|
+
$9bee35dcd8ee2f43$exports = {
|
|
1083
949
|
"decrease": (args) => `\u{964D}\u{4F4E} ${args.fieldLabel}`,
|
|
1084
950
|
"increase": (args) => `\u{63D0}\u{9AD8} ${args.fieldLabel}`,
|
|
1085
951
|
"numberField": `\u{6570}\u{5B57}\u{5B57}\u{6BB5}`
|
|
1086
952
|
};
|
|
1087
953
|
//#endregion
|
|
1088
|
-
//#region node_modules
|
|
1089
|
-
var $
|
|
1090
|
-
$
|
|
954
|
+
//#region node_modules/react-aria/dist/private/intl/numberfield/zh-TW.mjs
|
|
955
|
+
var $7f5044f0e0d68e7e$exports = {};
|
|
956
|
+
$7f5044f0e0d68e7e$exports = {
|
|
1091
957
|
"decrease": (args) => `\u{7E2E}\u{5C0F} ${args.fieldLabel}`,
|
|
1092
958
|
"increase": (args) => `\u{653E}\u{5927} ${args.fieldLabel}`,
|
|
1093
959
|
"numberField": `\u{6578}\u{5B57}\u{6B04}\u{4F4D}`
|
|
1094
960
|
};
|
|
1095
961
|
//#endregion
|
|
1096
|
-
//#region node_modules
|
|
1097
|
-
var $
|
|
1098
|
-
$
|
|
1099
|
-
"ar-AE": $
|
|
1100
|
-
"bg-BG": $
|
|
1101
|
-
"cs-CZ": $
|
|
1102
|
-
"da-DK": $
|
|
1103
|
-
"de-DE": $
|
|
1104
|
-
"el-GR": $
|
|
1105
|
-
"en-US": $
|
|
1106
|
-
"es-ES": $
|
|
1107
|
-
"et-EE": $
|
|
1108
|
-
"fi-FI": $
|
|
1109
|
-
"fr-FR": $
|
|
1110
|
-
"he-IL": $
|
|
1111
|
-
"hr-HR": $
|
|
1112
|
-
"hu-HU": $
|
|
1113
|
-
"it-IT": $
|
|
1114
|
-
"ja-JP": $
|
|
1115
|
-
"ko-KR": $
|
|
1116
|
-
"lt-LT": $
|
|
1117
|
-
"lv-LV": $
|
|
1118
|
-
"nb-NO": $
|
|
1119
|
-
"nl-NL": $
|
|
1120
|
-
"pl-PL": $
|
|
1121
|
-
"pt-BR": $
|
|
1122
|
-
"pt-PT": $
|
|
1123
|
-
"ro-RO": $
|
|
1124
|
-
"ru-RU": $
|
|
1125
|
-
"sk-SK": $
|
|
1126
|
-
"sl-SI": $
|
|
1127
|
-
"sr-SP": $
|
|
1128
|
-
"sv-SE": $
|
|
1129
|
-
"tr-TR": $
|
|
1130
|
-
"uk-UA": $
|
|
1131
|
-
"zh-CN": $
|
|
1132
|
-
"zh-TW": $
|
|
962
|
+
//#region node_modules/react-aria/dist/private/numberfield/intlStrings.mjs
|
|
963
|
+
var $fda7dc186b468fdb$exports = {};
|
|
964
|
+
$fda7dc186b468fdb$exports = {
|
|
965
|
+
"ar-AE": $50f1093a6d23d116$exports,
|
|
966
|
+
"bg-BG": $8f4fd2367d49b0f4$exports,
|
|
967
|
+
"cs-CZ": $060018a1c3ec2fce$exports,
|
|
968
|
+
"da-DK": $34605f3e0266a8f3$exports,
|
|
969
|
+
"de-DE": $64f20e1112866bbd$exports,
|
|
970
|
+
"el-GR": $bfa0aaf1a402f382$exports,
|
|
971
|
+
"en-US": $2656ce930519213b$exports,
|
|
972
|
+
"es-ES": $260cc0fc04d161dd$exports,
|
|
973
|
+
"et-EE": $5929126f62332a39$exports,
|
|
974
|
+
"fi-FI": $fc98374bce6a8f49$exports,
|
|
975
|
+
"fr-FR": $574239e9a0c4ce9f$exports,
|
|
976
|
+
"he-IL": $a80db10c45105af6$exports,
|
|
977
|
+
"hr-HR": $1df8c58f234da60a$exports,
|
|
978
|
+
"hu-HU": $c990249689bb58d0$exports,
|
|
979
|
+
"it-IT": $03e73e050e75c075$exports,
|
|
980
|
+
"ja-JP": $1486a16b22508ab9$exports,
|
|
981
|
+
"ko-KR": $da3ce82ad291e297$exports,
|
|
982
|
+
"lt-LT": $f06e9c465fb83243$exports,
|
|
983
|
+
"lv-LV": $02ed0f44dca8e510$exports,
|
|
984
|
+
"nb-NO": $7d2396d9fde5f3f5$exports,
|
|
985
|
+
"nl-NL": $294f579ef11ab713$exports,
|
|
986
|
+
"pl-PL": $46b77281e4caa836$exports,
|
|
987
|
+
"pt-BR": $f12d8c9bdaa0bcb1$exports,
|
|
988
|
+
"pt-PT": $8b1446e7064e2ed7$exports,
|
|
989
|
+
"ro-RO": $c709bb06dc2a8e23$exports,
|
|
990
|
+
"ru-RU": $915fe8001bee7d0a$exports,
|
|
991
|
+
"sk-SK": $79e778f6a71e6e7d$exports,
|
|
992
|
+
"sl-SI": $6799bde136a492e8$exports,
|
|
993
|
+
"sr-SP": $ca2ffb0adac8e2d5$exports,
|
|
994
|
+
"sv-SE": $23a41be500b56b00$exports,
|
|
995
|
+
"tr-TR": $5847a002bd1a8278$exports,
|
|
996
|
+
"uk-UA": $e802b0c478fad83f$exports,
|
|
997
|
+
"zh-CN": $9bee35dcd8ee2f43$exports,
|
|
998
|
+
"zh-TW": $7f5044f0e0d68e7e$exports
|
|
1133
999
|
};
|
|
1134
1000
|
//#endregion
|
|
1135
|
-
//#region node_modules
|
|
1001
|
+
//#region node_modules/react-aria/dist/private/numberfield/useNumberField.mjs
|
|
1136
1002
|
function $parcel$interopDefault(a) {
|
|
1137
1003
|
return a && a.__esModule ? a.default : a;
|
|
1138
1004
|
}
|
|
1139
|
-
function $
|
|
1005
|
+
function $cd2fa56213693c5e$export$23f548e970bdf099(props, state, inputRef) {
|
|
1140
1006
|
let { id, decrementAriaLabel, incrementAriaLabel, isDisabled, isReadOnly, isRequired, minValue, maxValue, autoFocus, label, formatOptions, onBlur = () => {}, onFocus, onFocusChange, onKeyDown, onKeyUp, description, errorMessage, isWheelDisabled, ...otherProps } = props;
|
|
1141
1007
|
let { increment, incrementToMax, decrement, decrementToMin, numberValue, inputValue, commit, commitValidation } = state;
|
|
1142
|
-
const stringFormatter = $
|
|
1008
|
+
const stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault($fda7dc186b468fdb$exports), "@react-aria/numberfield");
|
|
1143
1009
|
let commitAndAnnounce = useCallback(() => {
|
|
1144
|
-
|
|
1145
|
-
var _inputRef_current_value;
|
|
1146
|
-
let oldValue = (_inputRef_current_value = (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.value) !== null && _inputRef_current_value !== void 0 ? _inputRef_current_value : "";
|
|
1010
|
+
let oldValue = inputRef.current?.value ?? "";
|
|
1147
1011
|
flushSync(() => {
|
|
1148
1012
|
commit();
|
|
1149
1013
|
});
|
|
1150
|
-
|
|
1151
|
-
if (((_inputRef_current1 = inputRef.current) === null || _inputRef_current1 === void 0 ? void 0 : _inputRef_current1.value) !== oldValue) $319e236875307eab$export$a9b970dcc4ae71a9((_inputRef_current_value1 = (_inputRef_current2 = inputRef.current) === null || _inputRef_current2 === void 0 ? void 0 : _inputRef_current2.value) !== null && _inputRef_current_value1 !== void 0 ? _inputRef_current_value1 : "", "assertive");
|
|
1014
|
+
if (inputRef.current?.value !== oldValue) $a46cf152bb926da5$export$a9b970dcc4ae71a9(inputRef.current?.value ?? "", "assertive");
|
|
1152
1015
|
}, [commit, inputRef]);
|
|
1153
|
-
let inputId = $
|
|
1154
|
-
let { focusProps } = $
|
|
1016
|
+
let inputId = $390e54f620492c70$export$f680877a34711e37(id);
|
|
1017
|
+
let { focusProps } = $1e74c67db218ce67$export$f8168d8dd8fd66e6({ onBlur() {
|
|
1155
1018
|
commitAndAnnounce();
|
|
1156
1019
|
} });
|
|
1157
|
-
let numberFormatter = $
|
|
1020
|
+
let numberFormatter = $bd90acf18e792be6$export$b7a616150fdb9f44(formatOptions);
|
|
1158
1021
|
let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);
|
|
1159
|
-
let textValueFormatter = $
|
|
1022
|
+
let textValueFormatter = $bd90acf18e792be6$export$b7a616150fdb9f44({
|
|
1160
1023
|
...formatOptions,
|
|
1161
1024
|
currencySign: void 0
|
|
1162
1025
|
});
|
|
1163
|
-
let { spinButtonProps, incrementButtonProps: incButtonProps, decrementButtonProps: decButtonProps } = $
|
|
1026
|
+
let { spinButtonProps, incrementButtonProps: incButtonProps, decrementButtonProps: decButtonProps } = $757ec6630f26125c$export$e908e06f4b8e3402({
|
|
1164
1027
|
isDisabled,
|
|
1165
1028
|
isReadOnly,
|
|
1166
1029
|
isRequired,
|
|
@@ -1174,11 +1037,11 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1174
1037
|
textValue: useMemo(() => isNaN(numberValue) ? "" : textValueFormatter.format(numberValue), [textValueFormatter, numberValue])
|
|
1175
1038
|
});
|
|
1176
1039
|
let [focusWithin, setFocusWithin] = useState(false);
|
|
1177
|
-
let { focusWithinProps } = $
|
|
1040
|
+
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
|
|
1178
1041
|
isDisabled,
|
|
1179
1042
|
onFocusWithinChange: setFocusWithin
|
|
1180
1043
|
});
|
|
1181
|
-
$
|
|
1044
|
+
$14554ba6a2007b17$export$2123ff2b87c81ca({
|
|
1182
1045
|
onScroll: useCallback((e) => {
|
|
1183
1046
|
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
1184
1047
|
if (e.deltaY > 0) increment();
|
|
@@ -1186,14 +1049,13 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1186
1049
|
}, [decrement, increment]),
|
|
1187
1050
|
isDisabled: isWheelDisabled || isDisabled || isReadOnly || !focusWithin
|
|
1188
1051
|
}, inputRef);
|
|
1189
|
-
|
|
1190
|
-
let hasDecimals = ((_intlOptions_maximumFractionDigits = intlOptions.maximumFractionDigits) !== null && _intlOptions_maximumFractionDigits !== void 0 ? _intlOptions_maximumFractionDigits : 0) > 0;
|
|
1052
|
+
let hasDecimals = (intlOptions.maximumFractionDigits ?? 0) > 0;
|
|
1191
1053
|
let hasNegative = state.minValue === void 0 || isNaN(state.minValue) || state.minValue < 0;
|
|
1192
1054
|
let inputMode = "numeric";
|
|
1193
|
-
if ($
|
|
1055
|
+
if ($2add3ce32c6007eb$export$186c6964ca17d99()) {
|
|
1194
1056
|
if (hasNegative) inputMode = "text";
|
|
1195
1057
|
else if (hasDecimals) inputMode = "decimal";
|
|
1196
|
-
} else if ($
|
|
1058
|
+
} else if ($2add3ce32c6007eb$export$a11b0059900ceec8()) {
|
|
1197
1059
|
if (hasNegative) inputMode = "numeric";
|
|
1198
1060
|
else if (hasDecimals) inputMode = "decimal";
|
|
1199
1061
|
}
|
|
@@ -1201,27 +1063,25 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1201
1063
|
if (state.validate(value)) state.setInputValue(value);
|
|
1202
1064
|
};
|
|
1203
1065
|
let onPaste = (e) => {
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
var _inputElement_selectionEnd, _inputElement_selectionStart;
|
|
1208
|
-
if (inputElement && ((_inputElement_selectionEnd = inputElement.selectionEnd) !== null && _inputElement_selectionEnd !== void 0 ? _inputElement_selectionEnd : -1) - ((_inputElement_selectionStart = inputElement.selectionStart) !== null && _inputElement_selectionStart !== void 0 ? _inputElement_selectionStart : 0) === inputElement.value.length) {
|
|
1209
|
-
var _e_clipboardData_getData, _e_clipboardData_getData1, _e_clipboardData;
|
|
1066
|
+
props.onPaste?.(e);
|
|
1067
|
+
let inputElement = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
1068
|
+
if (inputElement && (inputElement.selectionEnd ?? -1) - (inputElement.selectionStart ?? 0) === inputElement.value.length) {
|
|
1210
1069
|
e.preventDefault();
|
|
1211
|
-
|
|
1212
|
-
commit((_e_clipboardData_getData_trim = (_e_clipboardData = e.clipboardData) === null || _e_clipboardData === void 0 ? void 0 : (_e_clipboardData_getData1 = _e_clipboardData.getData) === null || _e_clipboardData_getData1 === void 0 ? void 0 : (_e_clipboardData_getData = _e_clipboardData_getData1.call(_e_clipboardData, "text/plain")) === null || _e_clipboardData_getData === void 0 ? void 0 : _e_clipboardData_getData.trim()) !== null && _e_clipboardData_getData_trim !== void 0 ? _e_clipboardData_getData_trim : "");
|
|
1070
|
+
commit(e.clipboardData?.getData?.("text/plain")?.trim() ?? "");
|
|
1213
1071
|
}
|
|
1214
1072
|
};
|
|
1215
|
-
let domProps = $
|
|
1073
|
+
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props);
|
|
1216
1074
|
let onKeyDownEnter = useCallback((e) => {
|
|
1217
1075
|
if (e.nativeEvent.isComposing) return;
|
|
1218
1076
|
if (e.key === "Enter") {
|
|
1219
|
-
|
|
1077
|
+
flushSync(() => {
|
|
1078
|
+
commit();
|
|
1079
|
+
});
|
|
1220
1080
|
commitValidation();
|
|
1221
1081
|
} else e.continuePropagation();
|
|
1222
1082
|
}, [commit, commitValidation]);
|
|
1223
1083
|
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
1224
|
-
let { labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps } = $
|
|
1084
|
+
let { labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps } = $62888b2ec35be488$export$4f384c9210e583c3({
|
|
1225
1085
|
...otherProps,
|
|
1226
1086
|
...domProps,
|
|
1227
1087
|
name: void 0,
|
|
@@ -1232,7 +1092,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1232
1092
|
isReadOnly,
|
|
1233
1093
|
isRequired,
|
|
1234
1094
|
validate: void 0,
|
|
1235
|
-
[$
|
|
1095
|
+
[$fd2148440a13ec26$export$a763b9476acd3eb]: state,
|
|
1236
1096
|
value: inputValue,
|
|
1237
1097
|
defaultValue: "!",
|
|
1238
1098
|
autoComplete: "off",
|
|
@@ -1245,16 +1105,17 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1245
1105
|
onBlur,
|
|
1246
1106
|
onFocus,
|
|
1247
1107
|
onFocusChange,
|
|
1248
|
-
onKeyDown: useMemo(() => $
|
|
1108
|
+
onKeyDown: useMemo(() => $a4e76a5424781910$export$e08e3b67e392101e(onKeyDownEnter, onKeyDown), [onKeyDownEnter, onKeyDown]),
|
|
1249
1109
|
onKeyUp,
|
|
1250
1110
|
onPaste,
|
|
1251
1111
|
description,
|
|
1252
1112
|
errorMessage
|
|
1253
1113
|
}, state, inputRef);
|
|
1254
|
-
$
|
|
1255
|
-
|
|
1114
|
+
$3274bf1495747a7b$export$5add1d006293d136(inputRef, state.defaultNumberValue, state.setNumberValue);
|
|
1115
|
+
$cd2fa56213693c5e$var$useNativeValidation(state, props.validationBehavior, props.commitBehavior, inputRef, state.minValue, state.maxValue, props.step, state.numberValue);
|
|
1116
|
+
let inputProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(spinButtonProps, focusProps, textFieldProps, {
|
|
1256
1117
|
role: null,
|
|
1257
|
-
"aria-roledescription": !$
|
|
1118
|
+
"aria-roledescription": !$2add3ce32c6007eb$export$fedb369cb70207f1() ? stringFormatter.format("numberField") : null,
|
|
1258
1119
|
"aria-valuemax": null,
|
|
1259
1120
|
"aria-valuemin": null,
|
|
1260
1121
|
"aria-valuenow": null,
|
|
@@ -1264,17 +1125,16 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1264
1125
|
});
|
|
1265
1126
|
if (props.validationBehavior === "native") inputProps["aria-required"] = void 0;
|
|
1266
1127
|
let onButtonPressStart = (e) => {
|
|
1267
|
-
|
|
1268
|
-
if (
|
|
1269
|
-
if (e.pointerType === "mouse") (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 || _inputRef_current.focus();
|
|
1128
|
+
if ($23f2114a1b82827e$export$cd4e5573fbe2b576() === inputRef.current) return;
|
|
1129
|
+
if (e.pointerType === "mouse") inputRef.current?.focus();
|
|
1270
1130
|
else e.target.focus();
|
|
1271
1131
|
};
|
|
1272
1132
|
let fieldLabel = props["aria-label"] || (typeof props.label === "string" ? props.label : "");
|
|
1273
1133
|
let ariaLabelledby;
|
|
1274
1134
|
if (!fieldLabel) ariaLabelledby = props.label != null ? labelProps.id : props["aria-labelledby"];
|
|
1275
|
-
let incrementId = $
|
|
1276
|
-
let decrementId = $
|
|
1277
|
-
let incrementButtonProps = $
|
|
1135
|
+
let incrementId = $390e54f620492c70$export$f680877a34711e37();
|
|
1136
|
+
let decrementId = $390e54f620492c70$export$f680877a34711e37();
|
|
1137
|
+
let incrementButtonProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(incButtonProps, {
|
|
1278
1138
|
"aria-label": incrementAriaLabel || stringFormatter.format("increase", { fieldLabel }).trim(),
|
|
1279
1139
|
id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,
|
|
1280
1140
|
"aria-labelledby": ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,
|
|
@@ -1285,7 +1145,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1285
1145
|
isDisabled: !state.canIncrement,
|
|
1286
1146
|
onPressStart: onButtonPressStart
|
|
1287
1147
|
});
|
|
1288
|
-
let decrementButtonProps = $
|
|
1148
|
+
let decrementButtonProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(decButtonProps, {
|
|
1289
1149
|
"aria-label": decrementAriaLabel || stringFormatter.format("decrease", { fieldLabel }).trim(),
|
|
1290
1150
|
id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,
|
|
1291
1151
|
"aria-labelledby": ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,
|
|
@@ -1314,5 +1174,191 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
1314
1174
|
validationDetails
|
|
1315
1175
|
};
|
|
1316
1176
|
}
|
|
1177
|
+
var $cd2fa56213693c5e$var$numberInput = null;
|
|
1178
|
+
function $cd2fa56213693c5e$var$useNativeValidation(state, validationBehavior, commitBehavior, inputRef, min, max, step, value) {
|
|
1179
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
1180
|
+
let input = inputRef.current;
|
|
1181
|
+
if (commitBehavior !== "validate" || state.realtimeValidation.isInvalid || !input || input.disabled) return;
|
|
1182
|
+
if (!$cd2fa56213693c5e$var$numberInput && typeof document !== "undefined") {
|
|
1183
|
+
$cd2fa56213693c5e$var$numberInput = document.createElement("input");
|
|
1184
|
+
$cd2fa56213693c5e$var$numberInput.type = "number";
|
|
1185
|
+
}
|
|
1186
|
+
if (!$cd2fa56213693c5e$var$numberInput) return;
|
|
1187
|
+
$cd2fa56213693c5e$var$numberInput.min = min != null && !isNaN(min) ? String(min) : "";
|
|
1188
|
+
$cd2fa56213693c5e$var$numberInput.max = max != null && !isNaN(max) ? String(max) : "";
|
|
1189
|
+
$cd2fa56213693c5e$var$numberInput.step = step != null && !isNaN(step) ? String(step) : "";
|
|
1190
|
+
$cd2fa56213693c5e$var$numberInput.value = value != null && !isNaN(value) ? String(value) : "";
|
|
1191
|
+
let valid = input.validity.valid && $cd2fa56213693c5e$var$numberInput.validity.valid;
|
|
1192
|
+
let validationMessage = input.validationMessage || $cd2fa56213693c5e$var$numberInput.validationMessage;
|
|
1193
|
+
let validity = {
|
|
1194
|
+
isInvalid: !valid,
|
|
1195
|
+
validationErrors: validationMessage ? [validationMessage] : [],
|
|
1196
|
+
validationDetails: {
|
|
1197
|
+
badInput: input.validity.badInput,
|
|
1198
|
+
customError: input.validity.customError,
|
|
1199
|
+
patternMismatch: input.validity.patternMismatch,
|
|
1200
|
+
rangeOverflow: $cd2fa56213693c5e$var$numberInput.validity.rangeOverflow,
|
|
1201
|
+
rangeUnderflow: $cd2fa56213693c5e$var$numberInput.validity.rangeUnderflow,
|
|
1202
|
+
stepMismatch: $cd2fa56213693c5e$var$numberInput.validity.stepMismatch,
|
|
1203
|
+
tooLong: input.validity.tooLong,
|
|
1204
|
+
tooShort: input.validity.tooShort,
|
|
1205
|
+
typeMismatch: input.validity.typeMismatch,
|
|
1206
|
+
valueMissing: input.validity.valueMissing,
|
|
1207
|
+
valid
|
|
1208
|
+
}
|
|
1209
|
+
};
|
|
1210
|
+
state.updateValidation(validity);
|
|
1211
|
+
if (validationBehavior === "native" && !$cd2fa56213693c5e$var$numberInput.validity.valid) input.setCustomValidity($cd2fa56213693c5e$var$numberInput.validationMessage);
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
//#endregion
|
|
1215
|
+
//#region node_modules/react-stately/dist/private/numberfield/useNumberFieldState.mjs
|
|
1216
|
+
function $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c(props) {
|
|
1217
|
+
let { minValue, maxValue, step, formatOptions, value, defaultValue = NaN, onChange, locale, isDisabled, isReadOnly, commitBehavior = "snap" } = props;
|
|
1218
|
+
if (value === null) value = NaN;
|
|
1219
|
+
let snapValue = useCallback((value) => {
|
|
1220
|
+
return step === void 0 || isNaN(step) ? $240e9101ba2842f5$export$7d15b64cf5a3a4c4(value, minValue, maxValue) : $240e9101ba2842f5$export$cb6e0bb50bc19463(value, minValue, maxValue, step);
|
|
1221
|
+
}, [
|
|
1222
|
+
step,
|
|
1223
|
+
minValue,
|
|
1224
|
+
maxValue
|
|
1225
|
+
]);
|
|
1226
|
+
if (value !== void 0 && !isNaN(value) && commitBehavior === "snap") value = snapValue(value);
|
|
1227
|
+
if (!isNaN(defaultValue) && commitBehavior === "snap") defaultValue = snapValue(defaultValue);
|
|
1228
|
+
let [numberValue, setNumberValue] = $3e6197669829fe11$export$40bfa8c7b0832715(value, isNaN(defaultValue) ? NaN : defaultValue, onChange);
|
|
1229
|
+
let [initialValue] = useState(numberValue);
|
|
1230
|
+
let [inputValue, setInputValue] = useState(() => isNaN(numberValue) ? "" : new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(locale, formatOptions).format(numberValue));
|
|
1231
|
+
let numberParser = useMemo(() => new $eb76cf4feb040f77$export$cd11ab140839f11d(locale, formatOptions), [locale, formatOptions]);
|
|
1232
|
+
let numberingSystem = useMemo(() => numberParser.getNumberingSystem(inputValue), [numberParser, inputValue]);
|
|
1233
|
+
let formatter = useMemo(() => new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(locale, {
|
|
1234
|
+
...formatOptions,
|
|
1235
|
+
numberingSystem
|
|
1236
|
+
}), [
|
|
1237
|
+
locale,
|
|
1238
|
+
formatOptions,
|
|
1239
|
+
numberingSystem
|
|
1240
|
+
]);
|
|
1241
|
+
let intlOptions = useMemo(() => formatter.resolvedOptions(), [formatter]);
|
|
1242
|
+
let format = useCallback((value) => isNaN(value) || value === null ? "" : formatter.format(value), [formatter]);
|
|
1243
|
+
let validation = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
1244
|
+
...props,
|
|
1245
|
+
value: numberValue
|
|
1246
|
+
});
|
|
1247
|
+
let clampStep = step !== void 0 && !isNaN(step) ? step : 1;
|
|
1248
|
+
if (intlOptions.style === "percent" && (step === void 0 || isNaN(step))) clampStep = .01;
|
|
1249
|
+
let [prevValue, setPrevValue] = useState(numberValue);
|
|
1250
|
+
let [prevLocale, setPrevLocale] = useState(locale);
|
|
1251
|
+
let [prevFormatOptions, setPrevFormatOptions] = useState(formatOptions);
|
|
1252
|
+
if (!Object.is(numberValue, prevValue) || locale !== prevLocale || formatOptions !== prevFormatOptions) {
|
|
1253
|
+
setInputValue(format(numberValue));
|
|
1254
|
+
setPrevValue(numberValue);
|
|
1255
|
+
setPrevLocale(locale);
|
|
1256
|
+
setPrevFormatOptions(formatOptions);
|
|
1257
|
+
}
|
|
1258
|
+
let parsedValue = useMemo(() => numberParser.parse(inputValue), [numberParser, inputValue]);
|
|
1259
|
+
let commit = (overrideValue) => {
|
|
1260
|
+
let newInputValue = overrideValue === void 0 ? inputValue : overrideValue;
|
|
1261
|
+
let newParsedValue = parsedValue;
|
|
1262
|
+
if (overrideValue !== void 0) newParsedValue = numberParser.parse(newInputValue);
|
|
1263
|
+
if (!newInputValue.length) {
|
|
1264
|
+
setNumberValue(NaN);
|
|
1265
|
+
setInputValue(value === void 0 ? "" : format(numberValue));
|
|
1266
|
+
return;
|
|
1267
|
+
}
|
|
1268
|
+
if (isNaN(newParsedValue)) {
|
|
1269
|
+
setInputValue(format(numberValue));
|
|
1270
|
+
return;
|
|
1271
|
+
}
|
|
1272
|
+
let clampedValue = commitBehavior === "snap" ? snapValue(newParsedValue) : newParsedValue;
|
|
1273
|
+
clampedValue = numberParser.parse(format(clampedValue));
|
|
1274
|
+
let shouldValidate = clampedValue !== numberValue;
|
|
1275
|
+
setNumberValue(clampedValue);
|
|
1276
|
+
setInputValue(format(value === void 0 ? clampedValue : numberValue));
|
|
1277
|
+
if (shouldValidate) validation.commitValidation();
|
|
1278
|
+
};
|
|
1279
|
+
let safeNextStep = (operation, minMax = 0) => {
|
|
1280
|
+
let prev = parsedValue;
|
|
1281
|
+
if (isNaN(prev)) return $240e9101ba2842f5$export$cb6e0bb50bc19463(isNaN(minMax) ? 0 : minMax, minValue, maxValue, clampStep);
|
|
1282
|
+
else {
|
|
1283
|
+
let newValue = $240e9101ba2842f5$export$cb6e0bb50bc19463(prev, minValue, maxValue, clampStep);
|
|
1284
|
+
if (operation === "+" && newValue > prev || operation === "-" && newValue < prev) return newValue;
|
|
1285
|
+
return $240e9101ba2842f5$export$cb6e0bb50bc19463($3d0ee518c6f3d04f$var$handleDecimalOperation(operation, prev, clampStep), minValue, maxValue, clampStep);
|
|
1286
|
+
}
|
|
1287
|
+
};
|
|
1288
|
+
let increment = () => {
|
|
1289
|
+
let newValue = safeNextStep("+", minValue);
|
|
1290
|
+
if (newValue === numberValue) setInputValue(format(newValue));
|
|
1291
|
+
setNumberValue(newValue);
|
|
1292
|
+
validation.commitValidation();
|
|
1293
|
+
};
|
|
1294
|
+
let decrement = () => {
|
|
1295
|
+
let newValue = safeNextStep("-", maxValue);
|
|
1296
|
+
if (newValue === numberValue) setInputValue(format(newValue));
|
|
1297
|
+
setNumberValue(newValue);
|
|
1298
|
+
validation.commitValidation();
|
|
1299
|
+
};
|
|
1300
|
+
let incrementToMax = () => {
|
|
1301
|
+
if (maxValue != null) {
|
|
1302
|
+
setNumberValue($240e9101ba2842f5$export$cb6e0bb50bc19463(maxValue, minValue, maxValue, clampStep));
|
|
1303
|
+
validation.commitValidation();
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
let decrementToMin = () => {
|
|
1307
|
+
if (minValue != null) {
|
|
1308
|
+
setNumberValue(minValue);
|
|
1309
|
+
validation.commitValidation();
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
let canIncrement = useMemo(() => !isDisabled && !isReadOnly && (isNaN(parsedValue) || maxValue === void 0 || isNaN(maxValue) || $240e9101ba2842f5$export$cb6e0bb50bc19463(parsedValue, minValue, maxValue, clampStep) > parsedValue || $3d0ee518c6f3d04f$var$handleDecimalOperation("+", parsedValue, clampStep) <= maxValue), [
|
|
1313
|
+
isDisabled,
|
|
1314
|
+
isReadOnly,
|
|
1315
|
+
minValue,
|
|
1316
|
+
maxValue,
|
|
1317
|
+
clampStep,
|
|
1318
|
+
parsedValue
|
|
1319
|
+
]);
|
|
1320
|
+
let canDecrement = useMemo(() => !isDisabled && !isReadOnly && (isNaN(parsedValue) || minValue === void 0 || isNaN(minValue) || $240e9101ba2842f5$export$cb6e0bb50bc19463(parsedValue, minValue, maxValue, clampStep) < parsedValue || $3d0ee518c6f3d04f$var$handleDecimalOperation("-", parsedValue, clampStep) >= minValue), [
|
|
1321
|
+
isDisabled,
|
|
1322
|
+
isReadOnly,
|
|
1323
|
+
minValue,
|
|
1324
|
+
maxValue,
|
|
1325
|
+
clampStep,
|
|
1326
|
+
parsedValue
|
|
1327
|
+
]);
|
|
1328
|
+
let validate = (value) => numberParser.isValidPartialNumber(value, minValue, maxValue);
|
|
1329
|
+
return {
|
|
1330
|
+
...validation,
|
|
1331
|
+
validate,
|
|
1332
|
+
increment,
|
|
1333
|
+
incrementToMax,
|
|
1334
|
+
decrement,
|
|
1335
|
+
decrementToMin,
|
|
1336
|
+
canIncrement,
|
|
1337
|
+
canDecrement,
|
|
1338
|
+
minValue,
|
|
1339
|
+
maxValue,
|
|
1340
|
+
numberValue: parsedValue,
|
|
1341
|
+
defaultNumberValue: isNaN(defaultValue) ? initialValue : defaultValue,
|
|
1342
|
+
setNumberValue,
|
|
1343
|
+
setInputValue,
|
|
1344
|
+
inputValue,
|
|
1345
|
+
commit
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
function $3d0ee518c6f3d04f$var$handleDecimalOperation(operator, value1, value2) {
|
|
1349
|
+
let result = operator === "+" ? value1 + value2 : value1 - value2;
|
|
1350
|
+
if (value1 % 1 !== 0 || value2 % 1 !== 0) {
|
|
1351
|
+
const value1Decimal = value1.toString().split(".");
|
|
1352
|
+
const value2Decimal = value2.toString().split(".");
|
|
1353
|
+
const value1DecimalLength = value1Decimal[1] && value1Decimal[1].length || 0;
|
|
1354
|
+
const value2DecimalLength = value2Decimal[1] && value2Decimal[1].length || 0;
|
|
1355
|
+
const multiplier = Math.pow(10, Math.max(value1DecimalLength, value2DecimalLength));
|
|
1356
|
+
value1 = Math.round(value1 * multiplier);
|
|
1357
|
+
value2 = Math.round(value2 * multiplier);
|
|
1358
|
+
result = operator === "+" ? value1 + value2 : value1 - value2;
|
|
1359
|
+
result /= multiplier;
|
|
1360
|
+
}
|
|
1361
|
+
return result;
|
|
1362
|
+
}
|
|
1317
1363
|
//#endregion
|
|
1318
|
-
export { $
|
|
1364
|
+
export { $62888b2ec35be488$export$4f384c9210e583c3 as a, $14554ba6a2007b17$export$2123ff2b87c81ca as i, $cd2fa56213693c5e$export$23f548e970bdf099 as n, $757ec6630f26125c$export$e908e06f4b8e3402 as r, $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c as t };
|