@react-aria/numberfield 3.1.1 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +382 -409
- package/dist/main.js.map +1 -1
- package/dist/module.js +375 -382
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/useNumberField.ts +2 -0
package/dist/main.js
CHANGED
|
@@ -1,424 +1,397 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
useNumberFormatter
|
|
8
|
-
} = require("@react-aria/i18n");
|
|
9
|
-
|
|
10
|
-
var {
|
|
11
|
-
useFormattedTextField
|
|
12
|
-
} = require("@react-aria/textfield");
|
|
13
|
-
|
|
14
|
-
var {
|
|
15
|
-
useFocus,
|
|
16
|
-
useFocusWithin,
|
|
17
|
-
useScrollWheel
|
|
18
|
-
} = require("@react-aria/interactions");
|
|
19
|
-
|
|
20
|
-
var {
|
|
21
|
-
useCallback,
|
|
22
|
-
useMemo,
|
|
23
|
-
useState
|
|
24
|
-
} = require("react");
|
|
25
|
-
|
|
26
|
-
var {
|
|
27
|
-
filterDOMProps,
|
|
28
|
-
isAndroid,
|
|
29
|
-
isIOS,
|
|
30
|
-
isIPhone,
|
|
31
|
-
mergeProps,
|
|
32
|
-
useId
|
|
33
|
-
} = require("@react-aria/utils");
|
|
34
|
-
|
|
35
|
-
var _babelRuntimeHelpersInteropRequireDefault = $parcel$interopDefault(require("@babel/runtime/helpers/interopRequireDefault"));
|
|
36
|
-
|
|
37
|
-
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
|
|
1
|
+
var $2wEZH$reactariautils = require("@react-aria/utils");
|
|
2
|
+
var $2wEZH$react = require("react");
|
|
3
|
+
var $2wEZH$reactariainteractions = require("@react-aria/interactions");
|
|
4
|
+
var $2wEZH$reactariatextfield = require("@react-aria/textfield");
|
|
5
|
+
var $2wEZH$reactariai18n = require("@react-aria/i18n");
|
|
6
|
+
var $2wEZH$reactariaspinbutton = require("@react-aria/spinbutton");
|
|
38
7
|
|
|
8
|
+
function $parcel$exportWildcard(dest, source) {
|
|
9
|
+
Object.keys(source).forEach(function(key) {
|
|
10
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
Object.defineProperty(dest, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return source[key];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return dest;
|
|
23
|
+
}
|
|
39
24
|
function $parcel$interopDefault(a) {
|
|
40
25
|
return a && a.__esModule ? a.default : a;
|
|
41
26
|
}
|
|
27
|
+
function $parcel$export(e, n, v, s) {
|
|
28
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
29
|
+
}
|
|
30
|
+
var $fa863e9b015ae839$exports = {};
|
|
31
|
+
|
|
32
|
+
$parcel$export($fa863e9b015ae839$exports, "useNumberField", () => $fa863e9b015ae839$export$23f548e970bdf099);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
var $1bcaad54abc442a2$exports = {};
|
|
36
|
+
var $15c26e9e75543508$exports = {};
|
|
37
|
+
$15c26e9e75543508$exports = JSON.parse("{\"decrease\":\"خفض {fieldLabel}\",\"increase\":\"زيادة {fieldLabel}\",\"numberField\":\"حقل رقمي\"}");
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var $2d346802965e5c25$exports = {};
|
|
41
|
+
$2d346802965e5c25$exports = JSON.parse("{\"decrease\":\"Намаляване {fieldLabel}\",\"increase\":\"Усилване {fieldLabel}\",\"numberField\":\"Номер на полето\"}");
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
var $09893e85abdd2974$exports = {};
|
|
45
|
+
$09893e85abdd2974$exports = JSON.parse("{\"decrease\":\"Snížit {fieldLabel}\",\"increase\":\"Zvýšit {fieldLabel}\",\"numberField\":\"Číselné pole\"}");
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var $413bf45f477fb4e1$exports = {};
|
|
49
|
+
$413bf45f477fb4e1$exports = JSON.parse("{\"decrease\":\"Reducer {fieldLabel}\",\"increase\":\"Øg {fieldLabel}\",\"numberField\":\"Talfelt\"}");
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
var $2727845e2efab680$exports = {};
|
|
53
|
+
$2727845e2efab680$exports = JSON.parse("{\"decrease\":\"{fieldLabel} verringern\",\"increase\":\"{fieldLabel} erhöhen\",\"numberField\":\"Nummernfeld\"}");
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
var $11030a3afacdbc2e$exports = {};
|
|
57
|
+
$11030a3afacdbc2e$exports = JSON.parse("{\"decrease\":\"Μείωση {fieldLabel}\",\"increase\":\"Αύξηση {fieldLabel}\",\"numberField\":\"Πεδίο αριθμού\"}");
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
var $1e48617299cb10e8$exports = {};
|
|
61
|
+
$1e48617299cb10e8$exports = JSON.parse("{\"decrease\":\"Decrease {fieldLabel}\",\"increase\":\"Increase {fieldLabel}\",\"numberField\":\"Number field\"}");
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
var $335176f389a02847$exports = {};
|
|
65
|
+
$335176f389a02847$exports = JSON.parse("{\"decrease\":\"Reducir {fieldLabel}\",\"increase\":\"Aumentar {fieldLabel}\",\"numberField\":\"Campo de número\"}");
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
var $b08e7fdc34a812f3$exports = {};
|
|
69
|
+
$b08e7fdc34a812f3$exports = JSON.parse("{\"decrease\":\"Vähenda {fieldLabel}\",\"increase\":\"Suurenda {fieldLabel}\",\"numberField\":\"Numbri väli\"}");
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
var $ce4c5a1eb7e6fc96$exports = {};
|
|
73
|
+
$ce4c5a1eb7e6fc96$exports = JSON.parse("{\"decrease\":\"Vähennä {fieldLabel}\",\"increase\":\"Lisää {fieldLabel}\",\"numberField\":\"Numerokenttä\"}");
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
var $341f988ce23c559c$exports = {};
|
|
77
|
+
$341f988ce23c559c$exports = JSON.parse("{\"decrease\":\"Diminuer {fieldLabel}\",\"increase\":\"Augmenter {fieldLabel}\",\"numberField\":\"Champ de nombre\"}");
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
var $950fd1a1d57d2f86$exports = {};
|
|
81
|
+
$950fd1a1d57d2f86$exports = JSON.parse("{\"decrease\":\"הקטן {fieldLabel}\",\"increase\":\"הגדל {fieldLabel}\",\"numberField\":\"שדה מספר\"}");
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
var $7b949fa64cf10a07$exports = {};
|
|
85
|
+
$7b949fa64cf10a07$exports = JSON.parse("{\"decrease\":\"Smanji {fieldLabel}\",\"increase\":\"Povećaj {fieldLabel}\",\"numberField\":\"Polje broja\"}");
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
var $a945ff6d5cb9cf90$exports = {};
|
|
89
|
+
$a945ff6d5cb9cf90$exports = JSON.parse("{\"decrease\":\"{fieldLabel} csökkentése\",\"increase\":\"{fieldLabel} növelése\",\"numberField\":\"Számmező\"}");
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
var $f3393075c1f078d7$exports = {};
|
|
93
|
+
$f3393075c1f078d7$exports = JSON.parse("{\"decrease\":\"Riduci {fieldLabel}\",\"increase\":\"Aumenta {fieldLabel}\",\"numberField\":\"Campo numero\"}");
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
var $a12655e072ef354d$exports = {};
|
|
97
|
+
$a12655e072ef354d$exports = JSON.parse("{\"decrease\":\"{fieldLabel}を縮小\",\"increase\":\"{fieldLabel}を拡大\",\"numberField\":\"数値フィールド\"}");
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
var $880dbee0519c1bad$exports = {};
|
|
101
|
+
$880dbee0519c1bad$exports = JSON.parse("{\"decrease\":\"{fieldLabel} 감소\",\"increase\":\"{fieldLabel} 증가\",\"numberField\":\"번호 필드\"}");
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
var $d4a9630b079105aa$exports = {};
|
|
105
|
+
$d4a9630b079105aa$exports = JSON.parse("{\"decrease\":\"Sumažinti {fieldLabel}\",\"increase\":\"Padidinti {fieldLabel}\",\"numberField\":\"Numerio laukas\"}");
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var $e358cd3315986eb7$exports = {};
|
|
109
|
+
$e358cd3315986eb7$exports = JSON.parse("{\"decrease\":\"Samazināšana {fieldLabel}\",\"increase\":\"Palielināšana {fieldLabel}\",\"numberField\":\"Skaitļu lauks\"}");
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
var $a8d0ee8ec28363c7$exports = {};
|
|
113
|
+
$a8d0ee8ec28363c7$exports = JSON.parse("{\"decrease\":\"Reduser {fieldLabel}\",\"increase\":\"Øk {fieldLabel}\",\"numberField\":\"Tallfelt\"}");
|
|
42
114
|
|
|
43
|
-
|
|
44
|
-
var $
|
|
45
|
-
$
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
$
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var $
|
|
57
|
-
$
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
$
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var $
|
|
69
|
-
$
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
$
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var $
|
|
81
|
-
$
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
$
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var $
|
|
93
|
-
$
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
$
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
$
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
$
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
$
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
$
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
$
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
$
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
$
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
$
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
$
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
$
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
$
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
$f2bd2269a5c765cf56d6d26edac3d2$exports = JSON.parse("{\"decrease\":\"{fieldLabel} azalt\",\"increase\":\"{fieldLabel} arttır\",\"numberField\":\"Sayı alanı\"}");
|
|
136
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/numberfield/intl/uk-UA.json
|
|
137
|
-
var $ee881c3a5d0951c202f061fbe957e$exports = {};
|
|
138
|
-
$ee881c3a5d0951c202f061fbe957e$exports = JSON.parse("{\"decrease\":\"Зменшити {fieldLabel}\",\"increase\":\"Збільшити {fieldLabel}\",\"numberField\":\"Поле номера\"}");
|
|
139
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/numberfield/intl/zh-CN.json
|
|
140
|
-
var $ed2e7ec62a1fc30780141b5ce26b663$exports = {};
|
|
141
|
-
$ed2e7ec62a1fc30780141b5ce26b663$exports = JSON.parse("{\"decrease\":\"降低 {fieldLabel}\",\"increase\":\"提高 {fieldLabel}\",\"numberField\":\"数字字段\"}");
|
|
142
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/numberfield/intl/zh-TW.json
|
|
143
|
-
var $e5db46fc5bab2e1cddabb46042e67b$exports = {};
|
|
144
|
-
$e5db46fc5bab2e1cddabb46042e67b$exports = JSON.parse("{\"decrease\":\"縮小 {fieldLabel}\",\"increase\":\"放大 {fieldLabel}\",\"numberField\":\"數字欄位\"}");
|
|
145
|
-
// @ts-ignore
|
|
146
|
-
const $ebb253b0ca493f114f41772a028a$var$intlMessages = {
|
|
147
|
-
"ar-AE": _babelRuntimeHelpersInteropRequireDefault($bb445d18f084f340ccf67353487c16$exports).default,
|
|
148
|
-
"bg-BG": _babelRuntimeHelpersInteropRequireDefault($ed6d795c880a0ab9c214b9003f1a43$exports).default,
|
|
149
|
-
"cs-CZ": _babelRuntimeHelpersInteropRequireDefault($a4fa5907cb6ec4ef05d8194cd9b3c6b9$exports).default,
|
|
150
|
-
"da-DK": _babelRuntimeHelpersInteropRequireDefault($af89a3f199f96b4b2f53fc09970add7a$exports).default,
|
|
151
|
-
"de-DE": _babelRuntimeHelpersInteropRequireDefault($b0341cdc3c5ab5e88b4f2cbd32e56479$exports).default,
|
|
152
|
-
"el-GR": _babelRuntimeHelpersInteropRequireDefault($d0de24a5d89f4698e53e6427ab9502$exports).default,
|
|
153
|
-
"en-US": _babelRuntimeHelpersInteropRequireDefault($ca2b757c6100accb55e4393f5$exports).default,
|
|
154
|
-
"es-ES": _babelRuntimeHelpersInteropRequireDefault($f31ea545ffa161b5fb56650a118d07f$exports).default,
|
|
155
|
-
"et-EE": _babelRuntimeHelpersInteropRequireDefault($b112b56324926292d7470a7621f1f$exports).default,
|
|
156
|
-
"fi-FI": _babelRuntimeHelpersInteropRequireDefault($b9ff6794fa67f0ef93f0dcffb86cc31$exports).default,
|
|
157
|
-
"fr-FR": _babelRuntimeHelpersInteropRequireDefault($ac97a9a52baebde094acea488ec586$exports).default,
|
|
158
|
-
"he-IL": _babelRuntimeHelpersInteropRequireDefault($a817963177f04fe858962588b15e3$exports).default,
|
|
159
|
-
"hr-HR": _babelRuntimeHelpersInteropRequireDefault($d73bb32bb7f8bac6e5dc11e732223c08$exports).default,
|
|
160
|
-
"hu-HU": _babelRuntimeHelpersInteropRequireDefault($e71664d22d716ff0ef6add2132$exports).default,
|
|
161
|
-
"it-IT": _babelRuntimeHelpersInteropRequireDefault($cfbad042bd5b73285229d9afcc6cf6$exports).default,
|
|
162
|
-
"ja-JP": _babelRuntimeHelpersInteropRequireDefault($b1ee0d48af31cdbaf4266405ccf9370$exports).default,
|
|
163
|
-
"ko-KR": _babelRuntimeHelpersInteropRequireDefault($dab39e0e634f48a0b5f7165f6c6d3c$exports).default,
|
|
164
|
-
"lt-LT": _babelRuntimeHelpersInteropRequireDefault($b043632ea67e0dfa620af42a79b561f6$exports).default,
|
|
165
|
-
"lv-LV": _babelRuntimeHelpersInteropRequireDefault($f3ea210b36ecef8645290573d6e8d616$exports).default,
|
|
166
|
-
"nb-NO": _babelRuntimeHelpersInteropRequireDefault($ccc61cfcd514f82dac599f764ba71c5$exports).default,
|
|
167
|
-
"nl-NL": _babelRuntimeHelpersInteropRequireDefault($dd9d3b704bf07be5389470b29747b9de$exports).default,
|
|
168
|
-
"pl-PL": _babelRuntimeHelpersInteropRequireDefault($bebe1ea9ac232e6902e0f72406e44eb$exports).default,
|
|
169
|
-
"pt-BR": _babelRuntimeHelpersInteropRequireDefault($d6e8889105da4f40a98b889847bbfde2$exports).default,
|
|
170
|
-
"pt-PT": _babelRuntimeHelpersInteropRequireDefault($c8137a1fbba7abca411e8082204660c0$exports).default,
|
|
171
|
-
"ro-RO": _babelRuntimeHelpersInteropRequireDefault($f60ff373d7de3cba59f4218efd24b7cd$exports).default,
|
|
172
|
-
"ru-RU": _babelRuntimeHelpersInteropRequireDefault($c6d4d6cf5803f02ca818e8202$exports).default,
|
|
173
|
-
"sk-SK": _babelRuntimeHelpersInteropRequireDefault($ca65c03b648624f7b8097f49088764f$exports).default,
|
|
174
|
-
"sl-SI": _babelRuntimeHelpersInteropRequireDefault($d9d6de340774d4c29f6a37a5f2255f7b$exports).default,
|
|
175
|
-
"sr-SP": _babelRuntimeHelpersInteropRequireDefault($d48f74261c92cefae6f19ede6151219$exports).default,
|
|
176
|
-
"sv-SE": _babelRuntimeHelpersInteropRequireDefault($e5a7f1976917a2974f369962ea0bf95$exports).default,
|
|
177
|
-
"tr-TR": _babelRuntimeHelpersInteropRequireDefault($f2bd2269a5c765cf56d6d26edac3d2$exports).default,
|
|
178
|
-
"uk-UA": _babelRuntimeHelpersInteropRequireDefault($ee881c3a5d0951c202f061fbe957e$exports).default,
|
|
179
|
-
"zh-CN": _babelRuntimeHelpersInteropRequireDefault($ed2e7ec62a1fc30780141b5ce26b663$exports).default,
|
|
180
|
-
"zh-TW": _babelRuntimeHelpersInteropRequireDefault($e5db46fc5bab2e1cddabb46042e67b$exports).default
|
|
115
|
+
|
|
116
|
+
var $0073957e0c754983$exports = {};
|
|
117
|
+
$0073957e0c754983$exports = JSON.parse("{\"decrease\":\"{fieldLabel} verlagen\",\"increase\":\"{fieldLabel} verhogen\",\"numberField\":\"Getalveld\"}");
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
var $51626cc4fccef54e$exports = {};
|
|
121
|
+
$51626cc4fccef54e$exports = JSON.parse("{\"decrease\":\"Zmniejsz {fieldLabel}\",\"increase\":\"Zwiększ {fieldLabel}\",\"numberField\":\"Pole numeru\"}");
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
var $60b1cee412b56d27$exports = {};
|
|
125
|
+
$60b1cee412b56d27$exports = JSON.parse("{\"decrease\":\"Diminuir {fieldLabel}\",\"increase\":\"Aumentar {fieldLabel}\",\"numberField\":\"Campo de número\"}");
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
var $df9c7cc4e8072a0f$exports = {};
|
|
129
|
+
$df9c7cc4e8072a0f$exports = JSON.parse("{\"decrease\":\"Diminuir {fieldLabel}\",\"increase\":\"Aumentar {fieldLabel}\",\"numberField\":\"Campo numérico\"}");
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
var $aea54857f9df076d$exports = {};
|
|
133
|
+
$aea54857f9df076d$exports = JSON.parse("{\"decrease\":\"Scădere {fieldLabel}\",\"increase\":\"Creștere {fieldLabel}\",\"numberField\":\"Câmp numeric\"}");
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
var $8337ebc47a7e61a3$exports = {};
|
|
137
|
+
$8337ebc47a7e61a3$exports = JSON.parse("{\"decrease\":\"Уменьшение {fieldLabel}\",\"increase\":\"Увеличение {fieldLabel}\",\"numberField\":\"Числовое поле\"}");
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
var $4703837f8f4224f8$exports = {};
|
|
141
|
+
$4703837f8f4224f8$exports = JSON.parse("{\"decrease\":\"Znížiť {fieldLabel}\",\"increase\":\"Zvýšiť {fieldLabel}\",\"numberField\":\"Číselné pole\"}");
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
var $2b9c8b37ab5bbcca$exports = {};
|
|
145
|
+
$2b9c8b37ab5bbcca$exports = JSON.parse("{\"decrease\":\"Upadati {fieldLabel}\",\"increase\":\"Povečajte {fieldLabel}\",\"numberField\":\"Številčno polje\"}");
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
var $2c78665a3b81ed56$exports = {};
|
|
149
|
+
$2c78665a3b81ed56$exports = JSON.parse("{\"decrease\":\"Decrease {fieldLabel}\",\"increase\":\"Increase {fieldLabel}\",\"numberField\":\"Number field\"}");
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
var $8da5dab2105c0d01$exports = {};
|
|
153
|
+
$8da5dab2105c0d01$exports = JSON.parse("{\"decrease\":\"Minska {fieldLabel}\",\"increase\":\"Öka {fieldLabel}\",\"numberField\":\"Nummerfält\"}");
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
var $73a2418cb50e8fda$exports = {};
|
|
157
|
+
$73a2418cb50e8fda$exports = JSON.parse("{\"decrease\":\"{fieldLabel} azalt\",\"increase\":\"{fieldLabel} arttır\",\"numberField\":\"Sayı alanı\"}");
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
var $9c85d1989bb8c41d$exports = {};
|
|
161
|
+
$9c85d1989bb8c41d$exports = JSON.parse("{\"decrease\":\"Зменшити {fieldLabel}\",\"increase\":\"Збільшити {fieldLabel}\",\"numberField\":\"Поле номера\"}");
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
var $a7db09d81aa41beb$exports = {};
|
|
165
|
+
$a7db09d81aa41beb$exports = JSON.parse("{\"decrease\":\"降低 {fieldLabel}\",\"increase\":\"提高 {fieldLabel}\",\"numberField\":\"数字字段\"}");
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
var $edd6ee4675b7a1cd$exports = {};
|
|
169
|
+
$edd6ee4675b7a1cd$exports = JSON.parse("{\"decrease\":\"縮小 {fieldLabel}\",\"increase\":\"放大 {fieldLabel}\",\"numberField\":\"數字欄位\"}");
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
$1bcaad54abc442a2$exports = {
|
|
173
|
+
"ar-AE": $15c26e9e75543508$exports,
|
|
174
|
+
"bg-BG": $2d346802965e5c25$exports,
|
|
175
|
+
"cs-CZ": $09893e85abdd2974$exports,
|
|
176
|
+
"da-DK": $413bf45f477fb4e1$exports,
|
|
177
|
+
"de-DE": $2727845e2efab680$exports,
|
|
178
|
+
"el-GR": $11030a3afacdbc2e$exports,
|
|
179
|
+
"en-US": $1e48617299cb10e8$exports,
|
|
180
|
+
"es-ES": $335176f389a02847$exports,
|
|
181
|
+
"et-EE": $b08e7fdc34a812f3$exports,
|
|
182
|
+
"fi-FI": $ce4c5a1eb7e6fc96$exports,
|
|
183
|
+
"fr-FR": $341f988ce23c559c$exports,
|
|
184
|
+
"he-IL": $950fd1a1d57d2f86$exports,
|
|
185
|
+
"hr-HR": $7b949fa64cf10a07$exports,
|
|
186
|
+
"hu-HU": $a945ff6d5cb9cf90$exports,
|
|
187
|
+
"it-IT": $f3393075c1f078d7$exports,
|
|
188
|
+
"ja-JP": $a12655e072ef354d$exports,
|
|
189
|
+
"ko-KR": $880dbee0519c1bad$exports,
|
|
190
|
+
"lt-LT": $d4a9630b079105aa$exports,
|
|
191
|
+
"lv-LV": $e358cd3315986eb7$exports,
|
|
192
|
+
"nb-NO": $a8d0ee8ec28363c7$exports,
|
|
193
|
+
"nl-NL": $0073957e0c754983$exports,
|
|
194
|
+
"pl-PL": $51626cc4fccef54e$exports,
|
|
195
|
+
"pt-BR": $60b1cee412b56d27$exports,
|
|
196
|
+
"pt-PT": $df9c7cc4e8072a0f$exports,
|
|
197
|
+
"ro-RO": $aea54857f9df076d$exports,
|
|
198
|
+
"ru-RU": $8337ebc47a7e61a3$exports,
|
|
199
|
+
"sk-SK": $4703837f8f4224f8$exports,
|
|
200
|
+
"sl-SI": $2b9c8b37ab5bbcca$exports,
|
|
201
|
+
"sr-SP": $2c78665a3b81ed56$exports,
|
|
202
|
+
"sv-SE": $8da5dab2105c0d01$exports,
|
|
203
|
+
"tr-TR": $73a2418cb50e8fda$exports,
|
|
204
|
+
"uk-UA": $9c85d1989bb8c41d$exports,
|
|
205
|
+
"zh-CN": $a7db09d81aa41beb$exports,
|
|
206
|
+
"zh-TW": $edd6ee4675b7a1cd$exports
|
|
181
207
|
};
|
|
182
208
|
|
|
183
|
-
/**
|
|
184
|
-
* Provides the behavior and accessibility implementation for a number field component.
|
|
185
|
-
* Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.
|
|
186
|
-
*/
|
|
187
|
-
function useNumberField(props, state, inputRef) {
|
|
188
|
-
let {
|
|
189
|
-
id,
|
|
190
|
-
decrementAriaLabel,
|
|
191
|
-
incrementAriaLabel,
|
|
192
|
-
isDisabled,
|
|
193
|
-
isReadOnly,
|
|
194
|
-
isRequired,
|
|
195
|
-
minValue,
|
|
196
|
-
maxValue,
|
|
197
|
-
autoFocus,
|
|
198
|
-
validationState,
|
|
199
|
-
label,
|
|
200
|
-
formatOptions,
|
|
201
|
-
onBlur,
|
|
202
|
-
onFocus,
|
|
203
|
-
onFocusChange,
|
|
204
|
-
onKeyDown,
|
|
205
|
-
onKeyUp,
|
|
206
|
-
description,
|
|
207
|
-
errorMessage
|
|
208
|
-
} = props;
|
|
209
|
-
let {
|
|
210
|
-
increment,
|
|
211
|
-
incrementToMax,
|
|
212
|
-
decrement,
|
|
213
|
-
decrementToMin,
|
|
214
|
-
numberValue,
|
|
215
|
-
commit
|
|
216
|
-
} = state;
|
|
217
|
-
const formatMessage = useMessageFormatter($ebb253b0ca493f114f41772a028a$var$intlMessages);
|
|
218
|
-
let inputId = useId(id);
|
|
219
|
-
let {
|
|
220
|
-
focusProps
|
|
221
|
-
} = useFocus({
|
|
222
|
-
onBlur: () => {
|
|
223
|
-
// Set input value to normalized valid value
|
|
224
|
-
commit();
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
let {
|
|
228
|
-
spinButtonProps,
|
|
229
|
-
incrementButtonProps: incButtonProps,
|
|
230
|
-
decrementButtonProps: decButtonProps
|
|
231
|
-
} = useSpinButton({
|
|
232
|
-
isDisabled,
|
|
233
|
-
isReadOnly,
|
|
234
|
-
isRequired,
|
|
235
|
-
maxValue,
|
|
236
|
-
minValue,
|
|
237
|
-
onIncrement: increment,
|
|
238
|
-
onIncrementToMax: incrementToMax,
|
|
239
|
-
onDecrement: decrement,
|
|
240
|
-
onDecrementToMin: decrementToMin,
|
|
241
|
-
value: numberValue,
|
|
242
|
-
textValue: state.inputValue
|
|
243
|
-
});
|
|
244
|
-
let [focusWithin, setFocusWithin] = useState(false);
|
|
245
|
-
let {
|
|
246
|
-
focusWithinProps
|
|
247
|
-
} = useFocusWithin({
|
|
248
|
-
isDisabled,
|
|
249
|
-
onFocusWithinChange: setFocusWithin
|
|
250
|
-
});
|
|
251
|
-
let onWheel = useCallback(e => {
|
|
252
|
-
// if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change
|
|
253
|
-
// if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec
|
|
254
|
-
// this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication
|
|
255
|
-
// especially if the user is scrolling near 45deg
|
|
256
|
-
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
209
|
|
|
260
|
-
if (e.deltaY > 0) {
|
|
261
|
-
increment();
|
|
262
|
-
} else if (e.deltaY < 0) {
|
|
263
|
-
decrement();
|
|
264
|
-
}
|
|
265
|
-
}, [decrement, increment]); // If the input isn't supposed to receive input, disable scrolling.
|
|
266
|
-
|
|
267
|
-
let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;
|
|
268
|
-
useScrollWheel({
|
|
269
|
-
onScroll: onWheel,
|
|
270
|
-
isDisabled: scrollingDisabled
|
|
271
|
-
}, inputRef); // The inputMode attribute influences the software keyboard that is shown on touch devices.
|
|
272
|
-
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
273
|
-
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
274
|
-
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
275
|
-
|
|
276
|
-
let numberFormatter = useNumberFormatter(formatOptions);
|
|
277
|
-
let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);
|
|
278
|
-
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
279
|
-
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
280
|
-
let inputMode = 'numeric';
|
|
281
|
-
|
|
282
|
-
if (isIPhone()) {
|
|
283
|
-
// iPhone doesn't have a minus sign in either numeric or decimal.
|
|
284
|
-
// Note this is only for iPhone, not iPad, which always has both
|
|
285
|
-
// minus and decimal in numeric.
|
|
286
|
-
if (hasNegative) {
|
|
287
|
-
inputMode = 'text';
|
|
288
|
-
} else if (hasDecimals) {
|
|
289
|
-
inputMode = 'decimal';
|
|
290
|
-
}
|
|
291
|
-
} else if (isAndroid()) {
|
|
292
|
-
// Android numeric has both a decimal point and minus key.
|
|
293
|
-
// decimal does not have a minus key.
|
|
294
|
-
if (hasNegative) {
|
|
295
|
-
inputMode = 'numeric';
|
|
296
|
-
} else if (hasDecimals) {
|
|
297
|
-
inputMode = 'decimal';
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
let onChange = value => {
|
|
302
|
-
state.setInputValue(value);
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
let domProps = filterDOMProps(props);
|
|
306
|
-
let {
|
|
307
|
-
labelProps,
|
|
308
|
-
inputProps: textFieldProps,
|
|
309
|
-
descriptionProps,
|
|
310
|
-
errorMessageProps
|
|
311
|
-
} = useFormattedTextField(_babelRuntimeHelpersExtends({}, domProps, {
|
|
312
|
-
label,
|
|
313
|
-
autoFocus,
|
|
314
|
-
isDisabled,
|
|
315
|
-
isReadOnly,
|
|
316
|
-
isRequired,
|
|
317
|
-
validationState,
|
|
318
|
-
value: state.inputValue,
|
|
319
|
-
autoComplete: 'off',
|
|
320
|
-
'aria-label': props['aria-label'] || null,
|
|
321
|
-
'aria-labelledby': props['aria-labelledby'] || null,
|
|
322
|
-
id: inputId,
|
|
323
|
-
type: 'text',
|
|
324
|
-
// Can't use type="number" because then we can't have things like $ in the field.
|
|
325
|
-
inputMode,
|
|
326
|
-
onChange,
|
|
327
|
-
onBlur,
|
|
328
|
-
onFocus,
|
|
329
|
-
onFocusChange,
|
|
330
|
-
onKeyDown,
|
|
331
|
-
onKeyUp,
|
|
332
|
-
description,
|
|
333
|
-
errorMessage
|
|
334
|
-
}), state, inputRef);
|
|
335
|
-
let inputProps = mergeProps(spinButtonProps, textFieldProps, focusProps, {
|
|
336
|
-
// override the spinbutton role, we can't focus a spin button with VO
|
|
337
|
-
role: null,
|
|
338
|
-
// ignore aria-roledescription on iOS so that required state will announce when it is present
|
|
339
|
-
'aria-roledescription': !isIOS() ? formatMessage('numberField') : null,
|
|
340
|
-
'aria-valuemax': null,
|
|
341
|
-
'aria-valuemin': null,
|
|
342
|
-
'aria-valuenow': null,
|
|
343
|
-
'aria-valuetext': null,
|
|
344
|
-
autoCorrect: 'off',
|
|
345
|
-
spellCheck: 'false'
|
|
346
|
-
});
|
|
347
210
|
|
|
348
|
-
let onButtonPressStart = e => {
|
|
349
|
-
// If focus is already on the input, keep it there so we don't hide the
|
|
350
|
-
// software keyboard when tapping the increment/decrement buttons.
|
|
351
|
-
if (document.activeElement === inputRef.current) {
|
|
352
|
-
return;
|
|
353
|
-
} // Otherwise, when using a mouse, move focus to the input.
|
|
354
|
-
// On touch, or with a screen reader, focus the button so that the software
|
|
355
|
-
// keyboard does not appear and the screen reader cursor is not moved off the button.
|
|
356
211
|
|
|
357
212
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
function $fa863e9b015ae839$export$23f548e970bdf099(props, state, inputRef) {
|
|
216
|
+
let { id: id , decrementAriaLabel: decrementAriaLabel , incrementAriaLabel: incrementAriaLabel , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , minValue: minValue , maxValue: maxValue , autoFocus: autoFocus , validationState: validationState , label: label , formatOptions: formatOptions , onBlur: onBlur , onFocus: onFocus , onFocusChange: onFocusChange , onKeyDown: onKeyDown , onKeyUp: onKeyUp , description: description , errorMessage: errorMessage } = props;
|
|
217
|
+
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , commit: commit } = state;
|
|
218
|
+
const formatMessage = $2wEZH$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($1bcaad54abc442a2$exports)));
|
|
219
|
+
let inputId = $2wEZH$reactariautils.useId(id);
|
|
220
|
+
let { focusProps: focusProps } = $2wEZH$reactariainteractions.useFocus({
|
|
221
|
+
onBlur: ()=>{
|
|
222
|
+
// Set input value to normalized valid value
|
|
223
|
+
commit();
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
let { spinButtonProps: spinButtonProps , incrementButtonProps: incButtonProps , decrementButtonProps: decButtonProps } = $2wEZH$reactariaspinbutton.useSpinButton({
|
|
227
|
+
isDisabled: isDisabled,
|
|
228
|
+
isReadOnly: isReadOnly,
|
|
229
|
+
isRequired: isRequired,
|
|
230
|
+
maxValue: maxValue,
|
|
231
|
+
minValue: minValue,
|
|
232
|
+
onIncrement: increment,
|
|
233
|
+
onIncrementToMax: incrementToMax,
|
|
234
|
+
onDecrement: decrement,
|
|
235
|
+
onDecrementToMin: decrementToMin,
|
|
236
|
+
value: numberValue,
|
|
237
|
+
textValue: state.inputValue
|
|
238
|
+
});
|
|
239
|
+
let [focusWithin, setFocusWithin] = $2wEZH$react.useState(false);
|
|
240
|
+
let { focusWithinProps: focusWithinProps } = $2wEZH$reactariainteractions.useFocusWithin({
|
|
241
|
+
isDisabled: isDisabled,
|
|
242
|
+
onFocusWithinChange: setFocusWithin
|
|
243
|
+
});
|
|
244
|
+
let onWheel = $2wEZH$react.useCallback((e)=>{
|
|
245
|
+
// if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change
|
|
246
|
+
// if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec
|
|
247
|
+
// this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication
|
|
248
|
+
// especially if the user is scrolling near 45deg
|
|
249
|
+
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
250
|
+
if (e.deltaY > 0) increment();
|
|
251
|
+
else if (e.deltaY < 0) decrement();
|
|
252
|
+
}, [
|
|
253
|
+
decrement,
|
|
254
|
+
increment
|
|
255
|
+
]);
|
|
256
|
+
// If the input isn't supposed to receive input, disable scrolling.
|
|
257
|
+
let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;
|
|
258
|
+
$2wEZH$reactariainteractions.useScrollWheel({
|
|
259
|
+
onScroll: onWheel,
|
|
260
|
+
isDisabled: scrollingDisabled
|
|
261
|
+
}, inputRef);
|
|
262
|
+
// The inputMode attribute influences the software keyboard that is shown on touch devices.
|
|
263
|
+
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
264
|
+
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
265
|
+
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
266
|
+
let numberFormatter = $2wEZH$reactariai18n.useNumberFormatter(formatOptions);
|
|
267
|
+
let intlOptions = $2wEZH$react.useMemo(()=>numberFormatter.resolvedOptions()
|
|
268
|
+
, [
|
|
269
|
+
numberFormatter
|
|
270
|
+
]);
|
|
271
|
+
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
272
|
+
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
273
|
+
let inputMode = 'numeric';
|
|
274
|
+
if ($2wEZH$reactariautils.isIPhone()) {
|
|
275
|
+
// iPhone doesn't have a minus sign in either numeric or decimal.
|
|
276
|
+
// Note this is only for iPhone, not iPad, which always has both
|
|
277
|
+
// minus and decimal in numeric.
|
|
278
|
+
if (hasNegative) inputMode = 'text';
|
|
279
|
+
else if (hasDecimals) inputMode = 'decimal';
|
|
280
|
+
} else if ($2wEZH$reactariautils.isAndroid()) {
|
|
281
|
+
// Android numeric has both a decimal point and minus key.
|
|
282
|
+
// decimal does not have a minus key.
|
|
283
|
+
if (hasNegative) inputMode = 'numeric';
|
|
284
|
+
else if (hasDecimals) inputMode = 'decimal';
|
|
362
285
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
286
|
+
let onChange = (value)=>{
|
|
287
|
+
state.setInputValue(value);
|
|
288
|
+
};
|
|
289
|
+
let domProps = $2wEZH$reactariautils.filterDOMProps(props);
|
|
290
|
+
let { labelProps: labelProps , inputProps: textFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $2wEZH$reactariatextfield.useFormattedTextField({
|
|
291
|
+
...domProps,
|
|
292
|
+
label: label,
|
|
293
|
+
autoFocus: autoFocus,
|
|
294
|
+
isDisabled: isDisabled,
|
|
295
|
+
isReadOnly: isReadOnly,
|
|
296
|
+
isRequired: isRequired,
|
|
297
|
+
validationState: validationState,
|
|
298
|
+
value: state.inputValue,
|
|
299
|
+
autoComplete: 'off',
|
|
300
|
+
'aria-label': props['aria-label'] || null,
|
|
301
|
+
'aria-labelledby': props['aria-labelledby'] || null,
|
|
302
|
+
id: inputId,
|
|
303
|
+
type: 'text',
|
|
304
|
+
inputMode: inputMode,
|
|
305
|
+
onChange: onChange,
|
|
306
|
+
onBlur: onBlur,
|
|
307
|
+
onFocus: onFocus,
|
|
308
|
+
onFocusChange: onFocusChange,
|
|
309
|
+
onKeyDown: onKeyDown,
|
|
310
|
+
onKeyUp: onKeyUp,
|
|
311
|
+
description: description,
|
|
312
|
+
errorMessage: errorMessage
|
|
313
|
+
}, state, inputRef);
|
|
314
|
+
let inputProps = $2wEZH$reactariautils.mergeProps(spinButtonProps, textFieldProps, focusProps, {
|
|
315
|
+
// override the spinbutton role, we can't focus a spin button with VO
|
|
316
|
+
role: null,
|
|
317
|
+
// ignore aria-roledescription on iOS so that required state will announce when it is present
|
|
318
|
+
'aria-roledescription': !$2wEZH$reactariautils.isIOS() ? formatMessage('numberField') : null,
|
|
319
|
+
'aria-valuemax': null,
|
|
320
|
+
'aria-valuemin': null,
|
|
321
|
+
'aria-valuenow': null,
|
|
322
|
+
'aria-valuetext': null,
|
|
323
|
+
autoCorrect: 'off',
|
|
324
|
+
spellCheck: 'false'
|
|
325
|
+
});
|
|
326
|
+
let onButtonPressStart = (e)=>{
|
|
327
|
+
// If focus is already on the input, keep it there so we don't hide the
|
|
328
|
+
// software keyboard when tapping the increment/decrement buttons.
|
|
329
|
+
if (document.activeElement === inputRef.current) return;
|
|
330
|
+
// Otherwise, when using a mouse, move focus to the input.
|
|
331
|
+
// On touch, or with a screen reader, focus the button so that the software
|
|
332
|
+
// keyboard does not appear and the screen reader cursor is not moved off the button.
|
|
333
|
+
if (e.pointerType === 'mouse') inputRef.current.focus();
|
|
334
|
+
else e.target.focus();
|
|
335
|
+
};
|
|
336
|
+
// Determine the label for the increment and decrement buttons. There are 4 cases:
|
|
337
|
+
//
|
|
338
|
+
// 1. With a visible label that is a string: aria-label: `Increase ${props.label}`
|
|
339
|
+
// 2. With a visible label that is JSX: aria-label: 'Increase', aria-labelledby: '${incrementId} ${labelId}'
|
|
340
|
+
// 3. With an aria-label: aria-label: `Increase ${props['aria-label']}`
|
|
341
|
+
// 4. With an aria-labelledby: aria-label: 'Increase', aria-labelledby: `${incrementId} ${props['aria-labelledby']}`
|
|
342
|
+
//
|
|
343
|
+
// (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in
|
|
344
|
+
// the aria-label string rather than using aria-labelledby gives more flexibility to translators to change
|
|
345
|
+
// the order or add additional words around the label if needed.
|
|
346
|
+
let fieldLabel = props['aria-label'] || (typeof props.label === 'string' ? props.label : '');
|
|
347
|
+
let ariaLabelledby;
|
|
348
|
+
if (!fieldLabel) ariaLabelledby = props.label != null ? labelProps.id : props['aria-labelledby'];
|
|
349
|
+
let incrementId = $2wEZH$reactariautils.useId();
|
|
350
|
+
let decrementId = $2wEZH$reactariautils.useId();
|
|
351
|
+
let incrementButtonProps = $2wEZH$reactariautils.mergeProps(incButtonProps, {
|
|
352
|
+
'aria-label': incrementAriaLabel || formatMessage('increase', {
|
|
353
|
+
fieldLabel: fieldLabel
|
|
354
|
+
}).trim(),
|
|
355
|
+
id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,
|
|
356
|
+
'aria-labelledby': ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,
|
|
357
|
+
'aria-controls': inputId,
|
|
358
|
+
excludeFromTabOrder: true,
|
|
359
|
+
preventFocusOnPress: true,
|
|
360
|
+
allowFocusWhenDisabled: true,
|
|
361
|
+
isDisabled: !state.canIncrement,
|
|
362
|
+
onPressStart: onButtonPressStart
|
|
363
|
+
});
|
|
364
|
+
let decrementButtonProps = $2wEZH$reactariautils.mergeProps(decButtonProps, {
|
|
365
|
+
'aria-label': decrementAriaLabel || formatMessage('decrease', {
|
|
366
|
+
fieldLabel: fieldLabel
|
|
367
|
+
}).trim(),
|
|
368
|
+
id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,
|
|
369
|
+
'aria-labelledby': ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,
|
|
370
|
+
'aria-controls': inputId,
|
|
371
|
+
excludeFromTabOrder: true,
|
|
372
|
+
preventFocusOnPress: true,
|
|
373
|
+
allowFocusWhenDisabled: true,
|
|
374
|
+
isDisabled: !state.canDecrement,
|
|
375
|
+
onPressStart: onButtonPressStart
|
|
376
|
+
});
|
|
377
|
+
return {
|
|
378
|
+
groupProps: {
|
|
379
|
+
role: 'group',
|
|
380
|
+
'aria-disabled': isDisabled,
|
|
381
|
+
'aria-invalid': validationState === 'invalid' ? 'true' : undefined,
|
|
382
|
+
...focusWithinProps
|
|
383
|
+
},
|
|
384
|
+
labelProps: labelProps,
|
|
385
|
+
inputProps: inputProps,
|
|
386
|
+
incrementButtonProps: incrementButtonProps,
|
|
387
|
+
decrementButtonProps: decrementButtonProps,
|
|
388
|
+
errorMessageProps: errorMessageProps,
|
|
389
|
+
descriptionProps: descriptionProps
|
|
390
|
+
};
|
|
421
391
|
}
|
|
422
392
|
|
|
423
|
-
|
|
393
|
+
|
|
394
|
+
$parcel$exportWildcard(module.exports, $fa863e9b015ae839$exports);
|
|
395
|
+
|
|
396
|
+
|
|
424
397
|
//# sourceMappingURL=main.js.map
|