@react-aria/numberfield 3.3.3 → 3.4.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/import.mjs +532 -0
- package/dist/main.js +137 -187
- package/dist/main.js.map +1 -1
- package/dist/module.js +137 -187
- package/dist/module.js.map +1 -1
- package/package.json +19 -14
package/dist/module.js
CHANGED
|
@@ -8,345 +8,297 @@ import {useSpinButton as $gfhJl$useSpinButton} from "@react-aria/spinbutton";
|
|
|
8
8
|
function $parcel$interopDefault(a) {
|
|
9
9
|
return a && a.__esModule ? a.default : a;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
/*
|
|
12
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
13
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/ /*
|
|
22
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
23
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
24
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
25
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
*
|
|
27
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
28
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
29
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
30
|
+
* governing permissions and limitations under the License.
|
|
31
|
+
*/
|
|
12
32
|
|
|
13
33
|
var $c3ef0f8b54adbb57$exports = {};
|
|
14
34
|
var $fb78e0f6ab6349ed$exports = {};
|
|
15
35
|
$fb78e0f6ab6349ed$exports = {
|
|
16
|
-
"decrease": (args)=>`خفض ${args.fieldLabel}
|
|
17
|
-
|
|
18
|
-
"increase": (args)=>`زيادة ${args.fieldLabel}`
|
|
19
|
-
,
|
|
36
|
+
"decrease": (args)=>`خفض ${args.fieldLabel}`,
|
|
37
|
+
"increase": (args)=>`زيادة ${args.fieldLabel}`,
|
|
20
38
|
"numberField": `حقل رقمي`
|
|
21
39
|
};
|
|
22
40
|
|
|
23
41
|
|
|
24
42
|
var $2776acdd9959a647$exports = {};
|
|
25
43
|
$2776acdd9959a647$exports = {
|
|
26
|
-
"decrease": (args)=>`Намаляване ${args.fieldLabel}
|
|
27
|
-
|
|
28
|
-
"increase": (args)=>`Усилване ${args.fieldLabel}`
|
|
29
|
-
,
|
|
44
|
+
"decrease": (args)=>`Намаляване ${args.fieldLabel}`,
|
|
45
|
+
"increase": (args)=>`Усилване ${args.fieldLabel}`,
|
|
30
46
|
"numberField": `Номер на полето`
|
|
31
47
|
};
|
|
32
48
|
|
|
33
49
|
|
|
34
50
|
var $741954410a365ad3$exports = {};
|
|
35
51
|
$741954410a365ad3$exports = {
|
|
36
|
-
"decrease": (args)=>`Snížit ${args.fieldLabel}
|
|
37
|
-
|
|
38
|
-
"increase": (args)=>`Zvýšit ${args.fieldLabel}`
|
|
39
|
-
,
|
|
52
|
+
"decrease": (args)=>`Snížit ${args.fieldLabel}`,
|
|
53
|
+
"increase": (args)=>`Zvýšit ${args.fieldLabel}`,
|
|
40
54
|
"numberField": `Číselné pole`
|
|
41
55
|
};
|
|
42
56
|
|
|
43
57
|
|
|
44
58
|
var $8321ed0f8ab642f0$exports = {};
|
|
45
59
|
$8321ed0f8ab642f0$exports = {
|
|
46
|
-
"decrease": (args)=>`Reducer ${args.fieldLabel}
|
|
47
|
-
|
|
48
|
-
"increase": (args)=>`Øg ${args.fieldLabel}`
|
|
49
|
-
,
|
|
60
|
+
"decrease": (args)=>`Reducer ${args.fieldLabel}`,
|
|
61
|
+
"increase": (args)=>`Øg ${args.fieldLabel}`,
|
|
50
62
|
"numberField": `Talfelt`
|
|
51
63
|
};
|
|
52
64
|
|
|
53
65
|
|
|
54
66
|
var $92978e0c4ecafa32$exports = {};
|
|
55
67
|
$92978e0c4ecafa32$exports = {
|
|
56
|
-
"decrease": (args)=>`${args.fieldLabel} verringern
|
|
57
|
-
|
|
58
|
-
"increase": (args)=>`${args.fieldLabel} erhöhen`
|
|
59
|
-
,
|
|
68
|
+
"decrease": (args)=>`${args.fieldLabel} verringern`,
|
|
69
|
+
"increase": (args)=>`${args.fieldLabel} erhöhen`,
|
|
60
70
|
"numberField": `Nummernfeld`
|
|
61
71
|
};
|
|
62
72
|
|
|
63
73
|
|
|
64
74
|
var $ac5ff71962864a84$exports = {};
|
|
65
75
|
$ac5ff71962864a84$exports = {
|
|
66
|
-
"decrease": (args)=>`Μείωση ${args.fieldLabel}
|
|
67
|
-
|
|
68
|
-
"increase": (args)=>`Αύξηση ${args.fieldLabel}`
|
|
69
|
-
,
|
|
76
|
+
"decrease": (args)=>`Μείωση ${args.fieldLabel}`,
|
|
77
|
+
"increase": (args)=>`Αύξηση ${args.fieldLabel}`,
|
|
70
78
|
"numberField": `Πεδίο αριθμού`
|
|
71
79
|
};
|
|
72
80
|
|
|
73
81
|
|
|
74
82
|
var $efe4685e2440d8be$exports = {};
|
|
75
83
|
$efe4685e2440d8be$exports = {
|
|
76
|
-
"decrease": (args)=>`Decrease ${args.fieldLabel}
|
|
77
|
-
|
|
78
|
-
"increase": (args)=>`Increase ${args.fieldLabel}`
|
|
79
|
-
,
|
|
84
|
+
"decrease": (args)=>`Decrease ${args.fieldLabel}`,
|
|
85
|
+
"increase": (args)=>`Increase ${args.fieldLabel}`,
|
|
80
86
|
"numberField": `Number field`
|
|
81
87
|
};
|
|
82
88
|
|
|
83
89
|
|
|
84
90
|
var $e50a9a48739b90e1$exports = {};
|
|
85
91
|
$e50a9a48739b90e1$exports = {
|
|
86
|
-
"decrease": (args)=>`Reducir ${args.fieldLabel}
|
|
87
|
-
|
|
88
|
-
"increase": (args)=>`Aumentar ${args.fieldLabel}`
|
|
89
|
-
,
|
|
92
|
+
"decrease": (args)=>`Reducir ${args.fieldLabel}`,
|
|
93
|
+
"increase": (args)=>`Aumentar ${args.fieldLabel}`,
|
|
90
94
|
"numberField": `Campo de número`
|
|
91
95
|
};
|
|
92
96
|
|
|
93
97
|
|
|
94
98
|
var $6e0d5294ecbb8ab6$exports = {};
|
|
95
99
|
$6e0d5294ecbb8ab6$exports = {
|
|
96
|
-
"decrease": (args)=>`Vähenda ${args.fieldLabel}
|
|
97
|
-
|
|
98
|
-
"increase": (args)=>`Suurenda ${args.fieldLabel}`
|
|
99
|
-
,
|
|
100
|
+
"decrease": (args)=>`Vähenda ${args.fieldLabel}`,
|
|
101
|
+
"increase": (args)=>`Suurenda ${args.fieldLabel}`,
|
|
100
102
|
"numberField": `Numbri väli`
|
|
101
103
|
};
|
|
102
104
|
|
|
103
105
|
|
|
104
106
|
var $e7129d65f607f77f$exports = {};
|
|
105
107
|
$e7129d65f607f77f$exports = {
|
|
106
|
-
"decrease": (args)=>`Vähennä ${args.fieldLabel}
|
|
107
|
-
|
|
108
|
-
"increase": (args)=>`Lisää ${args.fieldLabel}`
|
|
109
|
-
,
|
|
108
|
+
"decrease": (args)=>`Vähennä ${args.fieldLabel}`,
|
|
109
|
+
"increase": (args)=>`Lisää ${args.fieldLabel}`,
|
|
110
110
|
"numberField": `Numerokenttä`
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
var $d72adf5b20573e34$exports = {};
|
|
115
115
|
$d72adf5b20573e34$exports = {
|
|
116
|
-
"decrease": (args)=>`Diminuer ${args.fieldLabel}
|
|
117
|
-
|
|
118
|
-
"increase": (args)=>`Augmenter ${args.fieldLabel}`
|
|
119
|
-
,
|
|
116
|
+
"decrease": (args)=>`Diminuer ${args.fieldLabel}`,
|
|
117
|
+
"increase": (args)=>`Augmenter ${args.fieldLabel}`,
|
|
120
118
|
"numberField": `Champ de nombre`
|
|
121
119
|
};
|
|
122
120
|
|
|
123
121
|
|
|
124
122
|
var $a25c707e88b844a7$exports = {};
|
|
125
123
|
$a25c707e88b844a7$exports = {
|
|
126
|
-
"decrease": (args)=>`הקטן ${args.fieldLabel}
|
|
127
|
-
|
|
128
|
-
"increase": (args)=>`הגדל ${args.fieldLabel}`
|
|
129
|
-
,
|
|
124
|
+
"decrease": (args)=>`הקטן ${args.fieldLabel}`,
|
|
125
|
+
"increase": (args)=>`הגדל ${args.fieldLabel}`,
|
|
130
126
|
"numberField": `שדה מספר`
|
|
131
127
|
};
|
|
132
128
|
|
|
133
129
|
|
|
134
130
|
var $69b41140b9a4ca54$exports = {};
|
|
135
131
|
$69b41140b9a4ca54$exports = {
|
|
136
|
-
"decrease": (args)=>`Smanji ${args.fieldLabel}
|
|
137
|
-
|
|
138
|
-
"increase": (args)=>`Povećaj ${args.fieldLabel}`
|
|
139
|
-
,
|
|
132
|
+
"decrease": (args)=>`Smanji ${args.fieldLabel}`,
|
|
133
|
+
"increase": (args)=>`Povećaj ${args.fieldLabel}`,
|
|
140
134
|
"numberField": `Polje broja`
|
|
141
135
|
};
|
|
142
136
|
|
|
143
137
|
|
|
144
138
|
var $81dab28f37f59d1a$exports = {};
|
|
145
139
|
$81dab28f37f59d1a$exports = {
|
|
146
|
-
"decrease": (args)=>`${args.fieldLabel} csökkentése
|
|
147
|
-
|
|
148
|
-
"increase": (args)=>`${args.fieldLabel} növelése`
|
|
149
|
-
,
|
|
140
|
+
"decrease": (args)=>`${args.fieldLabel} csökkentése`,
|
|
141
|
+
"increase": (args)=>`${args.fieldLabel} növelése`,
|
|
150
142
|
"numberField": `Számmező`
|
|
151
143
|
};
|
|
152
144
|
|
|
153
145
|
|
|
154
146
|
var $866555b31f2d7711$exports = {};
|
|
155
147
|
$866555b31f2d7711$exports = {
|
|
156
|
-
"decrease": (args)=>`Riduci ${args.fieldLabel}
|
|
157
|
-
|
|
158
|
-
"increase": (args)=>`Aumenta ${args.fieldLabel}`
|
|
159
|
-
,
|
|
148
|
+
"decrease": (args)=>`Riduci ${args.fieldLabel}`,
|
|
149
|
+
"increase": (args)=>`Aumenta ${args.fieldLabel}`,
|
|
160
150
|
"numberField": `Campo numero`
|
|
161
151
|
};
|
|
162
152
|
|
|
163
153
|
|
|
164
154
|
var $dafcd55d52b9d371$exports = {};
|
|
165
155
|
$dafcd55d52b9d371$exports = {
|
|
166
|
-
"decrease": (args)=>`${args.fieldLabel}
|
|
167
|
-
|
|
168
|
-
"increase": (args)=>`${args.fieldLabel}を拡大`
|
|
169
|
-
,
|
|
156
|
+
"decrease": (args)=>`${args.fieldLabel}を縮小`,
|
|
157
|
+
"increase": (args)=>`${args.fieldLabel}を拡大`,
|
|
170
158
|
"numberField": `数値フィールド`
|
|
171
159
|
};
|
|
172
160
|
|
|
173
161
|
|
|
174
162
|
var $f090c1f8c5da0145$exports = {};
|
|
175
163
|
$f090c1f8c5da0145$exports = {
|
|
176
|
-
"decrease": (args)=>`${args.fieldLabel}
|
|
177
|
-
|
|
178
|
-
"increase": (args)=>`${args.fieldLabel} 증가`
|
|
179
|
-
,
|
|
164
|
+
"decrease": (args)=>`${args.fieldLabel} 감소`,
|
|
165
|
+
"increase": (args)=>`${args.fieldLabel} 증가`,
|
|
180
166
|
"numberField": `번호 필드`
|
|
181
167
|
};
|
|
182
168
|
|
|
183
169
|
|
|
184
170
|
var $6f10f3a13360a75c$exports = {};
|
|
185
171
|
$6f10f3a13360a75c$exports = {
|
|
186
|
-
"decrease": (args)=>`Sumažinti ${args.fieldLabel}
|
|
187
|
-
|
|
188
|
-
"increase": (args)=>`Padidinti ${args.fieldLabel}`
|
|
189
|
-
,
|
|
172
|
+
"decrease": (args)=>`Sumažinti ${args.fieldLabel}`,
|
|
173
|
+
"increase": (args)=>`Padidinti ${args.fieldLabel}`,
|
|
190
174
|
"numberField": `Numerio laukas`
|
|
191
175
|
};
|
|
192
176
|
|
|
193
177
|
|
|
194
178
|
var $47432cefd4b7bd1b$exports = {};
|
|
195
179
|
$47432cefd4b7bd1b$exports = {
|
|
196
|
-
"decrease": (args)=>`Samazināšana ${args.fieldLabel}
|
|
197
|
-
|
|
198
|
-
"increase": (args)=>`Palielināšana ${args.fieldLabel}`
|
|
199
|
-
,
|
|
180
|
+
"decrease": (args)=>`Samazināšana ${args.fieldLabel}`,
|
|
181
|
+
"increase": (args)=>`Palielināšana ${args.fieldLabel}`,
|
|
200
182
|
"numberField": `Skaitļu lauks`
|
|
201
183
|
};
|
|
202
184
|
|
|
203
185
|
|
|
204
186
|
var $dc578a950a2bf23d$exports = {};
|
|
205
187
|
$dc578a950a2bf23d$exports = {
|
|
206
|
-
"decrease": (args)=>`Reduser ${args.fieldLabel}
|
|
207
|
-
|
|
208
|
-
"increase": (args)=>`Øk ${args.fieldLabel}`
|
|
209
|
-
,
|
|
188
|
+
"decrease": (args)=>`Reduser ${args.fieldLabel}`,
|
|
189
|
+
"increase": (args)=>`Øk ${args.fieldLabel}`,
|
|
210
190
|
"numberField": `Tallfelt`
|
|
211
191
|
};
|
|
212
192
|
|
|
213
193
|
|
|
214
194
|
var $353f1bfca4dc395a$exports = {};
|
|
215
195
|
$353f1bfca4dc395a$exports = {
|
|
216
|
-
"decrease": (args)=>`${args.fieldLabel} verlagen
|
|
217
|
-
|
|
218
|
-
"increase": (args)=>`${args.fieldLabel} verhogen`
|
|
219
|
-
,
|
|
196
|
+
"decrease": (args)=>`${args.fieldLabel} verlagen`,
|
|
197
|
+
"increase": (args)=>`${args.fieldLabel} verhogen`,
|
|
220
198
|
"numberField": `Getalveld`
|
|
221
199
|
};
|
|
222
200
|
|
|
223
201
|
|
|
224
202
|
var $241bc0bbd870e982$exports = {};
|
|
225
203
|
$241bc0bbd870e982$exports = {
|
|
226
|
-
"decrease": (args)=>`Zmniejsz ${args.fieldLabel}
|
|
227
|
-
|
|
228
|
-
"increase": (args)=>`Zwiększ ${args.fieldLabel}`
|
|
229
|
-
,
|
|
204
|
+
"decrease": (args)=>`Zmniejsz ${args.fieldLabel}`,
|
|
205
|
+
"increase": (args)=>`Zwiększ ${args.fieldLabel}`,
|
|
230
206
|
"numberField": `Pole numeru`
|
|
231
207
|
};
|
|
232
208
|
|
|
233
209
|
|
|
234
210
|
var $da3005c7bd72b0a8$exports = {};
|
|
235
211
|
$da3005c7bd72b0a8$exports = {
|
|
236
|
-
"decrease": (args)=>`Diminuir ${args.fieldLabel}
|
|
237
|
-
|
|
238
|
-
"increase": (args)=>`Aumentar ${args.fieldLabel}`
|
|
239
|
-
,
|
|
212
|
+
"decrease": (args)=>`Diminuir ${args.fieldLabel}`,
|
|
213
|
+
"increase": (args)=>`Aumentar ${args.fieldLabel}`,
|
|
240
214
|
"numberField": `Campo de número`
|
|
241
215
|
};
|
|
242
216
|
|
|
243
217
|
|
|
244
218
|
var $cf48bfc540882310$exports = {};
|
|
245
219
|
$cf48bfc540882310$exports = {
|
|
246
|
-
"decrease": (args)=>`Diminuir ${args.fieldLabel}
|
|
247
|
-
|
|
248
|
-
"increase": (args)=>`Aumentar ${args.fieldLabel}`
|
|
249
|
-
,
|
|
220
|
+
"decrease": (args)=>`Diminuir ${args.fieldLabel}`,
|
|
221
|
+
"increase": (args)=>`Aumentar ${args.fieldLabel}`,
|
|
250
222
|
"numberField": `Campo numérico`
|
|
251
223
|
};
|
|
252
224
|
|
|
253
225
|
|
|
254
226
|
var $b63a28c481ab9ee3$exports = {};
|
|
255
227
|
$b63a28c481ab9ee3$exports = {
|
|
256
|
-
"decrease": (args)=>`Scădere ${args.fieldLabel}
|
|
257
|
-
|
|
258
|
-
"increase": (args)=>`Creștere ${args.fieldLabel}`
|
|
259
|
-
,
|
|
228
|
+
"decrease": (args)=>`Scădere ${args.fieldLabel}`,
|
|
229
|
+
"increase": (args)=>`Creștere ${args.fieldLabel}`,
|
|
260
230
|
"numberField": `Câmp numeric`
|
|
261
231
|
};
|
|
262
232
|
|
|
263
233
|
|
|
264
234
|
var $19f9df95c2464ab6$exports = {};
|
|
265
235
|
$19f9df95c2464ab6$exports = {
|
|
266
|
-
"decrease": (args)=>`Уменьшение ${args.fieldLabel}
|
|
267
|
-
|
|
268
|
-
"increase": (args)=>`Увеличение ${args.fieldLabel}`
|
|
269
|
-
,
|
|
236
|
+
"decrease": (args)=>`Уменьшение ${args.fieldLabel}`,
|
|
237
|
+
"increase": (args)=>`Увеличение ${args.fieldLabel}`,
|
|
270
238
|
"numberField": `Числовое поле`
|
|
271
239
|
};
|
|
272
240
|
|
|
273
241
|
|
|
274
242
|
var $b272932a685e8482$exports = {};
|
|
275
243
|
$b272932a685e8482$exports = {
|
|
276
|
-
"decrease": (args)=>`Znížiť ${args.fieldLabel}
|
|
277
|
-
|
|
278
|
-
"increase": (args)=>`Zvýšiť ${args.fieldLabel}`
|
|
279
|
-
,
|
|
244
|
+
"decrease": (args)=>`Znížiť ${args.fieldLabel}`,
|
|
245
|
+
"increase": (args)=>`Zvýšiť ${args.fieldLabel}`,
|
|
280
246
|
"numberField": `Číselné pole`
|
|
281
247
|
};
|
|
282
248
|
|
|
283
249
|
|
|
284
250
|
var $cbaf8b5b61f9e544$exports = {};
|
|
285
251
|
$cbaf8b5b61f9e544$exports = {
|
|
286
|
-
"decrease": (args)=>`Upadati ${args.fieldLabel}
|
|
287
|
-
|
|
288
|
-
"increase": (args)=>`Povečajte ${args.fieldLabel}`
|
|
289
|
-
,
|
|
252
|
+
"decrease": (args)=>`Upadati ${args.fieldLabel}`,
|
|
253
|
+
"increase": (args)=>`Povečajte ${args.fieldLabel}`,
|
|
290
254
|
"numberField": `Številčno polje`
|
|
291
255
|
};
|
|
292
256
|
|
|
293
257
|
|
|
294
258
|
var $e0a3af6ac1449b2f$exports = {};
|
|
295
259
|
$e0a3af6ac1449b2f$exports = {
|
|
296
|
-
"decrease": (args)=>`Decrease ${args.fieldLabel}
|
|
297
|
-
|
|
298
|
-
"increase": (args)=>`Increase ${args.fieldLabel}`
|
|
299
|
-
,
|
|
260
|
+
"decrease": (args)=>`Decrease ${args.fieldLabel}`,
|
|
261
|
+
"increase": (args)=>`Increase ${args.fieldLabel}`,
|
|
300
262
|
"numberField": `Number field`
|
|
301
263
|
};
|
|
302
264
|
|
|
303
265
|
|
|
304
266
|
var $71e167d2458a6019$exports = {};
|
|
305
267
|
$71e167d2458a6019$exports = {
|
|
306
|
-
"decrease": (args)=>`Minska ${args.fieldLabel}
|
|
307
|
-
|
|
308
|
-
"increase": (args)=>`Öka ${args.fieldLabel}`
|
|
309
|
-
,
|
|
268
|
+
"decrease": (args)=>`Minska ${args.fieldLabel}`,
|
|
269
|
+
"increase": (args)=>`Öka ${args.fieldLabel}`,
|
|
310
270
|
"numberField": `Nummerfält`
|
|
311
271
|
};
|
|
312
272
|
|
|
313
273
|
|
|
314
274
|
var $3719245abc082946$exports = {};
|
|
315
275
|
$3719245abc082946$exports = {
|
|
316
|
-
"decrease": (args)=>`${args.fieldLabel} azalt
|
|
317
|
-
|
|
318
|
-
"increase": (args)=>`${args.fieldLabel} arttır`
|
|
319
|
-
,
|
|
276
|
+
"decrease": (args)=>`${args.fieldLabel} azalt`,
|
|
277
|
+
"increase": (args)=>`${args.fieldLabel} arttır`,
|
|
320
278
|
"numberField": `Sayı alanı`
|
|
321
279
|
};
|
|
322
280
|
|
|
323
281
|
|
|
324
282
|
var $2ccc589e2f51824d$exports = {};
|
|
325
283
|
$2ccc589e2f51824d$exports = {
|
|
326
|
-
"decrease": (args)=>`Зменшити ${args.fieldLabel}
|
|
327
|
-
|
|
328
|
-
"increase": (args)=>`Збільшити ${args.fieldLabel}`
|
|
329
|
-
,
|
|
284
|
+
"decrease": (args)=>`Зменшити ${args.fieldLabel}`,
|
|
285
|
+
"increase": (args)=>`Збільшити ${args.fieldLabel}`,
|
|
330
286
|
"numberField": `Поле номера`
|
|
331
287
|
};
|
|
332
288
|
|
|
333
289
|
|
|
334
290
|
var $e1103cb9b4c13942$exports = {};
|
|
335
291
|
$e1103cb9b4c13942$exports = {
|
|
336
|
-
"decrease": (args)=>`降低 ${args.fieldLabel}
|
|
337
|
-
|
|
338
|
-
"increase": (args)=>`提高 ${args.fieldLabel}`
|
|
339
|
-
,
|
|
292
|
+
"decrease": (args)=>`降低 ${args.fieldLabel}`,
|
|
293
|
+
"increase": (args)=>`提高 ${args.fieldLabel}`,
|
|
340
294
|
"numberField": `数字字段`
|
|
341
295
|
};
|
|
342
296
|
|
|
343
297
|
|
|
344
298
|
var $448607634f80dccb$exports = {};
|
|
345
299
|
$448607634f80dccb$exports = {
|
|
346
|
-
"decrease": (args)=>`縮小 ${args.fieldLabel}
|
|
347
|
-
|
|
348
|
-
"increase": (args)=>`放大 ${args.fieldLabel}`
|
|
349
|
-
,
|
|
300
|
+
"decrease": (args)=>`縮小 ${args.fieldLabel}`,
|
|
301
|
+
"increase": (args)=>`放大 ${args.fieldLabel}`,
|
|
350
302
|
"numberField": `數字欄位`
|
|
351
303
|
};
|
|
352
304
|
|
|
@@ -395,18 +347,17 @@ $c3ef0f8b54adbb57$exports = {
|
|
|
395
347
|
|
|
396
348
|
|
|
397
349
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
398
|
-
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 = ()=>{
|
|
399
|
-
} , onFocus: onFocus , onFocusChange: onFocusChange , onKeyDown: onKeyDown , onKeyUp: onKeyUp , description: description , errorMessage: errorMessage , ...otherProps } = props;
|
|
350
|
+
let { id: id , decrementAriaLabel: decrementAriaLabel , incrementAriaLabel: incrementAriaLabel , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , minValue: minValue , maxValue: maxValue , autoFocus: autoFocus , validationState: validationState , label: label , formatOptions: formatOptions , onBlur: onBlur = ()=>{} , onFocus: onFocus , onFocusChange: onFocusChange , onKeyDown: onKeyDown , onKeyUp: onKeyUp , description: description , errorMessage: errorMessage , ...otherProps } = props;
|
|
400
351
|
let { increment: increment , incrementToMax: incrementToMax , decrement: decrement , decrementToMin: decrementToMin , numberValue: numberValue , commit: commit } = state;
|
|
401
|
-
const stringFormatter = $gfhJl$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($c3ef0f8b54adbb57$exports)));
|
|
402
|
-
let inputId = $gfhJl$useId(id);
|
|
403
|
-
let { focusProps: focusProps } = $gfhJl$useFocus({
|
|
352
|
+
const stringFormatter = (0, $gfhJl$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c3ef0f8b54adbb57$exports))));
|
|
353
|
+
let inputId = (0, $gfhJl$useId)(id);
|
|
354
|
+
let { focusProps: focusProps } = (0, $gfhJl$useFocus)({
|
|
404
355
|
onBlur: ()=>{
|
|
405
356
|
// Set input value to normalized valid value
|
|
406
357
|
commit();
|
|
407
358
|
}
|
|
408
359
|
});
|
|
409
|
-
let { spinButtonProps: spinButtonProps , incrementButtonProps: incButtonProps , decrementButtonProps: decButtonProps } = $gfhJl$useSpinButton({
|
|
360
|
+
let { spinButtonProps: spinButtonProps , incrementButtonProps: incButtonProps , decrementButtonProps: decButtonProps } = (0, $gfhJl$useSpinButton)({
|
|
410
361
|
isDisabled: isDisabled,
|
|
411
362
|
isReadOnly: isReadOnly,
|
|
412
363
|
isRequired: isRequired,
|
|
@@ -419,12 +370,12 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
419
370
|
value: numberValue,
|
|
420
371
|
textValue: state.inputValue
|
|
421
372
|
});
|
|
422
|
-
let [focusWithin, setFocusWithin] = $gfhJl$useState(false);
|
|
423
|
-
let { focusWithinProps: focusWithinProps } = $gfhJl$useFocusWithin({
|
|
373
|
+
let [focusWithin, setFocusWithin] = (0, $gfhJl$useState)(false);
|
|
374
|
+
let { focusWithinProps: focusWithinProps } = (0, $gfhJl$useFocusWithin)({
|
|
424
375
|
isDisabled: isDisabled,
|
|
425
376
|
onFocusWithinChange: setFocusWithin
|
|
426
377
|
});
|
|
427
|
-
let onWheel = $gfhJl$useCallback((e)=>{
|
|
378
|
+
let onWheel = (0, $gfhJl$useCallback)((e)=>{
|
|
428
379
|
// if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change
|
|
429
380
|
// if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec
|
|
430
381
|
// this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication
|
|
@@ -438,7 +389,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
438
389
|
]);
|
|
439
390
|
// If the input isn't supposed to receive input, disable scrolling.
|
|
440
391
|
let scrollingDisabled = isDisabled || isReadOnly || !focusWithin;
|
|
441
|
-
$gfhJl$useScrollWheel({
|
|
392
|
+
(0, $gfhJl$useScrollWheel)({
|
|
442
393
|
onScroll: onWheel,
|
|
443
394
|
isDisabled: scrollingDisabled
|
|
444
395
|
}, inputRef);
|
|
@@ -446,31 +397,30 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
446
397
|
// Browsers and operating systems are quite inconsistent about what keys are available, however.
|
|
447
398
|
// We choose between numeric and decimal based on whether we allow negative and fractional numbers,
|
|
448
399
|
// and based on testing on various devices to determine what keys are available in each inputMode.
|
|
449
|
-
let numberFormatter = $gfhJl$useNumberFormatter(formatOptions);
|
|
450
|
-
let intlOptions = $gfhJl$useMemo(()=>numberFormatter.resolvedOptions()
|
|
451
|
-
, [
|
|
400
|
+
let numberFormatter = (0, $gfhJl$useNumberFormatter)(formatOptions);
|
|
401
|
+
let intlOptions = (0, $gfhJl$useMemo)(()=>numberFormatter.resolvedOptions(), [
|
|
452
402
|
numberFormatter
|
|
453
403
|
]);
|
|
454
404
|
let hasDecimals = intlOptions.maximumFractionDigits > 0;
|
|
455
405
|
let hasNegative = isNaN(state.minValue) || state.minValue < 0;
|
|
456
|
-
let inputMode =
|
|
457
|
-
if ($gfhJl$isIPhone()) {
|
|
406
|
+
let inputMode = "numeric";
|
|
407
|
+
if ((0, $gfhJl$isIPhone)()) {
|
|
458
408
|
// iPhone doesn't have a minus sign in either numeric or decimal.
|
|
459
409
|
// Note this is only for iPhone, not iPad, which always has both
|
|
460
410
|
// minus and decimal in numeric.
|
|
461
|
-
if (hasNegative) inputMode =
|
|
462
|
-
else if (hasDecimals) inputMode =
|
|
463
|
-
} else if ($gfhJl$isAndroid()) {
|
|
411
|
+
if (hasNegative) inputMode = "text";
|
|
412
|
+
else if (hasDecimals) inputMode = "decimal";
|
|
413
|
+
} else if ((0, $gfhJl$isAndroid)()) {
|
|
464
414
|
// Android numeric has both a decimal point and minus key.
|
|
465
415
|
// decimal does not have a minus key.
|
|
466
|
-
if (hasNegative) inputMode =
|
|
467
|
-
else if (hasDecimals) inputMode =
|
|
416
|
+
if (hasNegative) inputMode = "numeric";
|
|
417
|
+
else if (hasDecimals) inputMode = "decimal";
|
|
468
418
|
}
|
|
469
419
|
let onChange = (value)=>{
|
|
470
420
|
state.setInputValue(value);
|
|
471
421
|
};
|
|
472
|
-
let domProps = $gfhJl$filterDOMProps(props);
|
|
473
|
-
let { labelProps: labelProps , inputProps: textFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $gfhJl$useFormattedTextField({
|
|
422
|
+
let domProps = (0, $gfhJl$filterDOMProps)(props);
|
|
423
|
+
let { labelProps: labelProps , inputProps: textFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $gfhJl$useFormattedTextField)({
|
|
474
424
|
...otherProps,
|
|
475
425
|
...domProps,
|
|
476
426
|
label: label,
|
|
@@ -481,11 +431,11 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
481
431
|
validationState: validationState,
|
|
482
432
|
value: state.inputValue,
|
|
483
433
|
defaultValue: undefined,
|
|
484
|
-
autoComplete:
|
|
485
|
-
|
|
486
|
-
|
|
434
|
+
autoComplete: "off",
|
|
435
|
+
"aria-label": props["aria-label"] || null,
|
|
436
|
+
"aria-labelledby": props["aria-labelledby"] || null,
|
|
487
437
|
id: inputId,
|
|
488
|
-
type:
|
|
438
|
+
type: "text",
|
|
489
439
|
inputMode: inputMode,
|
|
490
440
|
onChange: onChange,
|
|
491
441
|
onBlur: onBlur,
|
|
@@ -496,17 +446,17 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
496
446
|
description: description,
|
|
497
447
|
errorMessage: errorMessage
|
|
498
448
|
}, state, inputRef);
|
|
499
|
-
let inputProps = $gfhJl$mergeProps(spinButtonProps, focusProps, textFieldProps, {
|
|
449
|
+
let inputProps = (0, $gfhJl$mergeProps)(spinButtonProps, focusProps, textFieldProps, {
|
|
500
450
|
// override the spinbutton role, we can't focus a spin button with VO
|
|
501
451
|
role: null,
|
|
502
452
|
// ignore aria-roledescription on iOS so that required state will announce when it is present
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
autoCorrect:
|
|
509
|
-
spellCheck:
|
|
453
|
+
"aria-roledescription": !(0, $gfhJl$isIOS)() ? stringFormatter.format("numberField") : null,
|
|
454
|
+
"aria-valuemax": null,
|
|
455
|
+
"aria-valuemin": null,
|
|
456
|
+
"aria-valuenow": null,
|
|
457
|
+
"aria-valuetext": null,
|
|
458
|
+
autoCorrect: "off",
|
|
459
|
+
spellCheck: "false"
|
|
510
460
|
});
|
|
511
461
|
let onButtonPressStart = (e)=>{
|
|
512
462
|
// If focus is already on the input, keep it there so we don't hide the
|
|
@@ -515,7 +465,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
515
465
|
// Otherwise, when using a mouse, move focus to the input.
|
|
516
466
|
// On touch, or with a screen reader, focus the button so that the software
|
|
517
467
|
// keyboard does not appear and the screen reader cursor is not moved off the button.
|
|
518
|
-
if (e.pointerType ===
|
|
468
|
+
if (e.pointerType === "mouse") inputRef.current.focus();
|
|
519
469
|
else e.target.focus();
|
|
520
470
|
};
|
|
521
471
|
// Determine the label for the increment and decrement buttons. There are 4 cases:
|
|
@@ -528,31 +478,31 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
528
478
|
// (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in
|
|
529
479
|
// the aria-label string rather than using aria-labelledby gives more flexibility to translators to change
|
|
530
480
|
// the order or add additional words around the label if needed.
|
|
531
|
-
let fieldLabel = props[
|
|
481
|
+
let fieldLabel = props["aria-label"] || (typeof props.label === "string" ? props.label : "");
|
|
532
482
|
let ariaLabelledby;
|
|
533
|
-
if (!fieldLabel) ariaLabelledby = props.label != null ? labelProps.id : props[
|
|
534
|
-
let incrementId = $gfhJl$useId();
|
|
535
|
-
let decrementId = $gfhJl$useId();
|
|
536
|
-
let incrementButtonProps = $gfhJl$mergeProps(incButtonProps, {
|
|
537
|
-
|
|
483
|
+
if (!fieldLabel) ariaLabelledby = props.label != null ? labelProps.id : props["aria-labelledby"];
|
|
484
|
+
let incrementId = (0, $gfhJl$useId)();
|
|
485
|
+
let decrementId = (0, $gfhJl$useId)();
|
|
486
|
+
let incrementButtonProps = (0, $gfhJl$mergeProps)(incButtonProps, {
|
|
487
|
+
"aria-label": incrementAriaLabel || stringFormatter.format("increase", {
|
|
538
488
|
fieldLabel: fieldLabel
|
|
539
489
|
}).trim(),
|
|
540
490
|
id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,
|
|
541
|
-
|
|
542
|
-
|
|
491
|
+
"aria-labelledby": ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,
|
|
492
|
+
"aria-controls": inputId,
|
|
543
493
|
excludeFromTabOrder: true,
|
|
544
494
|
preventFocusOnPress: true,
|
|
545
495
|
allowFocusWhenDisabled: true,
|
|
546
496
|
isDisabled: !state.canIncrement,
|
|
547
497
|
onPressStart: onButtonPressStart
|
|
548
498
|
});
|
|
549
|
-
let decrementButtonProps = $gfhJl$mergeProps(decButtonProps, {
|
|
550
|
-
|
|
499
|
+
let decrementButtonProps = (0, $gfhJl$mergeProps)(decButtonProps, {
|
|
500
|
+
"aria-label": decrementAriaLabel || stringFormatter.format("decrease", {
|
|
551
501
|
fieldLabel: fieldLabel
|
|
552
502
|
}).trim(),
|
|
553
503
|
id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,
|
|
554
|
-
|
|
555
|
-
|
|
504
|
+
"aria-labelledby": ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,
|
|
505
|
+
"aria-controls": inputId,
|
|
556
506
|
excludeFromTabOrder: true,
|
|
557
507
|
preventFocusOnPress: true,
|
|
558
508
|
allowFocusWhenDisabled: true,
|
|
@@ -561,9 +511,9 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
561
511
|
});
|
|
562
512
|
return {
|
|
563
513
|
groupProps: {
|
|
564
|
-
role:
|
|
565
|
-
|
|
566
|
-
|
|
514
|
+
role: "group",
|
|
515
|
+
"aria-disabled": isDisabled,
|
|
516
|
+
"aria-invalid": validationState === "invalid" ? "true" : undefined,
|
|
567
517
|
...focusWithinProps
|
|
568
518
|
},
|
|
569
519
|
labelProps: labelProps,
|