@react-aria/menu 3.3.1-nightly.3100 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,9 +1,9 @@
1
- var $6RQwO$reactariautils = require("@react-aria/utils");
2
- var $6RQwO$reactariainteractions = require("@react-aria/interactions");
3
- var $6RQwO$reactariai18n = require("@react-aria/i18n");
4
- var $6RQwO$reactariaoverlays = require("@react-aria/overlays");
5
- var $6RQwO$reactariaselection = require("@react-aria/selection");
6
- var $6RQwO$reactstatelycollections = require("@react-stately/collections");
1
+ var $cSfnK$reactariautils = require("@react-aria/utils");
2
+ var $cSfnK$reactariainteractions = require("@react-aria/interactions");
3
+ var $cSfnK$reactariai18n = require("@react-aria/i18n");
4
+ var $cSfnK$reactariaoverlays = require("@react-aria/overlays");
5
+ var $cSfnK$reactariaselection = require("@react-aria/selection");
6
+ var $cSfnK$reactstatelycollections = require("@react-stately/collections");
7
7
 
8
8
  function $parcel$exportWildcard(dest, source) {
9
9
  Object.keys(source).forEach(function(key) {
@@ -27,16 +27,181 @@ function $parcel$interopDefault(a) {
27
27
  function $parcel$export(e, n, v, s) {
28
28
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
29
29
  }
30
- var $09e9a80ccce757b5$exports = {};
30
+ var $6ffbef18191cf50e$exports = {};
31
31
 
32
- $parcel$export($09e9a80ccce757b5$exports, "useMenuTrigger", () => $09e9a80ccce757b5$export$dc9c12ed27dd1b49);
33
- var $07bcec7f8562b490$exports = {};
34
- var $c9938238586151ac$exports = {};
35
- $c9938238586151ac$exports = JSON.parse("{\"longPressMessage\":\"Long press or press Alt + ArrowDown to open menu\"}");
32
+ $parcel$export($6ffbef18191cf50e$exports, "useMenuTrigger", () => $6ffbef18191cf50e$export$dc9c12ed27dd1b49);
33
+ var $853781387242d7cb$exports = {};
34
+ var $f47f0979a691ab25$exports = {};
35
+ $f47f0979a691ab25$exports = JSON.parse("{\"longPressMessage\":\"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة\"}");
36
36
 
37
37
 
38
- $07bcec7f8562b490$exports = {
39
- "en-US": $c9938238586151ac$exports
38
+ var $02a818d9662ba841$exports = {};
39
+ $02a818d9662ba841$exports = JSON.parse("{\"longPressMessage\":\"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\"}");
40
+
41
+
42
+ var $b5ec5e34fd60606b$exports = {};
43
+ $b5ec5e34fd60606b$exports = JSON.parse("{\"longPressMessage\":\"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku\"}");
44
+
45
+
46
+ var $96cf5b50416c94c5$exports = {};
47
+ $96cf5b50416c94c5$exports = JSON.parse("{\"longPressMessage\":\"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"}");
48
+
49
+
50
+ var $a0d65d51668f332f$exports = {};
51
+ $a0d65d51668f332f$exports = JSON.parse("{\"longPressMessage\":\"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen\"}");
52
+
53
+
54
+ var $84e753c80b498a4a$exports = {};
55
+ $84e753c80b498a4a$exports = JSON.parse("{\"longPressMessage\":\"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"}");
56
+
57
+
58
+ var $d20766e7bd7d91d0$exports = {};
59
+ $d20766e7bd7d91d0$exports = JSON.parse("{\"longPressMessage\":\"Long press or press Alt + ArrowDown to open menu\"}");
60
+
61
+
62
+ var $2788c42a720bbc5b$exports = {};
63
+ $2788c42a720bbc5b$exports = JSON.parse("{\"longPressMessage\":\"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\"}");
64
+
65
+
66
+ var $b4fc98cf53a50302$exports = {};
67
+ $b4fc98cf53a50302$exports = JSON.parse("{\"longPressMessage\":\"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\"}");
68
+
69
+
70
+ var $324411c6468e6a44$exports = {};
71
+ $324411c6468e6a44$exports = JSON.parse("{\"longPressMessage\":\"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"}");
72
+
73
+
74
+ var $fe08364f6aba5fa8$exports = {};
75
+ $fe08364f6aba5fa8$exports = JSON.parse("{\"longPressMessage\":\"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.\"}");
76
+
77
+
78
+ var $429b0c5ee31de4c2$exports = {};
79
+ $429b0c5ee31de4c2$exports = JSON.parse("{\"longPressMessage\":\"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\"}");
80
+
81
+
82
+ var $c3974ce20cf32325$exports = {};
83
+ $c3974ce20cf32325$exports = JSON.parse("{\"longPressMessage\":\"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"}");
84
+
85
+
86
+ var $8f89584581dae3a5$exports = {};
87
+ $8f89584581dae3a5$exports = JSON.parse("{\"longPressMessage\":\"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához\"}");
88
+
89
+
90
+ var $deb131677e185eda$exports = {};
91
+ $deb131677e185eda$exports = JSON.parse("{\"longPressMessage\":\"Premere a lungo o premere Alt + Freccia giù per aprire il menu\"}");
92
+
93
+
94
+ var $1a672653ee657739$exports = {};
95
+ $1a672653ee657739$exports = JSON.parse("{\"longPressMessage\":\"長押しまたは Alt+下矢印キーでメニューを開く\"}");
96
+
97
+
98
+ var $3c2c600cb7cba19b$exports = {};
99
+ $3c2c600cb7cba19b$exports = JSON.parse("{\"longPressMessage\":\"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\"}");
100
+
101
+
102
+ var $1db0f589ec173b45$exports = {};
103
+ $1db0f589ec173b45$exports = JSON.parse("{\"longPressMessage\":\"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\"}");
104
+
105
+
106
+ var $85e6bf975d1094b1$exports = {};
107
+ $85e6bf975d1094b1$exports = JSON.parse("{\"longPressMessage\":\"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa\"}");
108
+
109
+
110
+ var $5b30ea9def95deb7$exports = {};
111
+ $5b30ea9def95deb7$exports = JSON.parse("{\"longPressMessage\":\"Langt trykk eller trykk Alt + PilNed for å åpne menyen\"}");
112
+
113
+
114
+ var $36fc082ae9b07cd9$exports = {};
115
+ $36fc082ae9b07cd9$exports = JSON.parse("{\"longPressMessage\":\"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\"}");
116
+
117
+
118
+ var $004ca257219ad5e5$exports = {};
119
+ $004ca257219ad5e5$exports = JSON.parse("{\"longPressMessage\":\"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\"}");
120
+
121
+
122
+ var $7185afda15938c1d$exports = {};
123
+ $7185afda15938c1d$exports = JSON.parse("{\"longPressMessage\":\"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\"}");
124
+
125
+
126
+ var $f5ee82d2d2e387d1$exports = {};
127
+ $f5ee82d2d2e387d1$exports = JSON.parse("{\"longPressMessage\":\"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\"}");
128
+
129
+
130
+ var $9d73bbece95c54da$exports = {};
131
+ $9d73bbece95c54da$exports = JSON.parse("{\"longPressMessage\":\"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul\"}");
132
+
133
+
134
+ var $bc8566c135ef45e7$exports = {};
135
+ $bc8566c135ef45e7$exports = JSON.parse("{\"longPressMessage\":\"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\"}");
136
+
137
+
138
+ var $505ac5577c8e9202$exports = {};
139
+ $505ac5577c8e9202$exports = JSON.parse("{\"longPressMessage\":\"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol\"}");
140
+
141
+
142
+ var $4331407d77582ee6$exports = {};
143
+ $4331407d77582ee6$exports = JSON.parse("{\"longPressMessage\":\"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\"}");
144
+
145
+
146
+ var $98c11fa64e0657cd$exports = {};
147
+ $98c11fa64e0657cd$exports = JSON.parse("{\"longPressMessage\":\"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\"}");
148
+
149
+
150
+ var $1b7323508a8d2b62$exports = {};
151
+ $1b7323508a8d2b62$exports = JSON.parse("{\"longPressMessage\":\"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn\"}");
152
+
153
+
154
+ var $61acf1b05216a392$exports = {};
155
+ $61acf1b05216a392$exports = JSON.parse("{\"longPressMessage\":\"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\"}");
156
+
157
+
158
+ var $ca0c4410f1dbdb12$exports = {};
159
+ $ca0c4410f1dbdb12$exports = JSON.parse("{\"longPressMessage\":\"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\"}");
160
+
161
+
162
+ var $7870da185207c179$exports = {};
163
+ $7870da185207c179$exports = JSON.parse("{\"longPressMessage\":\"长按或按 Alt + 向下方向键以打开菜单\"}");
164
+
165
+
166
+ var $70d49959231766d5$exports = {};
167
+ $70d49959231766d5$exports = JSON.parse("{\"longPressMessage\":\"長按或按 Alt+向下鍵以開啟功能表\"}");
168
+
169
+
170
+ $853781387242d7cb$exports = {
171
+ "ar-AE": $f47f0979a691ab25$exports,
172
+ "bg-BG": $02a818d9662ba841$exports,
173
+ "cs-CZ": $b5ec5e34fd60606b$exports,
174
+ "da-DK": $96cf5b50416c94c5$exports,
175
+ "de-DE": $a0d65d51668f332f$exports,
176
+ "el-GR": $84e753c80b498a4a$exports,
177
+ "en-US": $d20766e7bd7d91d0$exports,
178
+ "es-ES": $2788c42a720bbc5b$exports,
179
+ "et-EE": $b4fc98cf53a50302$exports,
180
+ "fi-FI": $324411c6468e6a44$exports,
181
+ "fr-FR": $fe08364f6aba5fa8$exports,
182
+ "he-IL": $429b0c5ee31de4c2$exports,
183
+ "hr-HR": $c3974ce20cf32325$exports,
184
+ "hu-HU": $8f89584581dae3a5$exports,
185
+ "it-IT": $deb131677e185eda$exports,
186
+ "ja-JP": $1a672653ee657739$exports,
187
+ "ko-KR": $3c2c600cb7cba19b$exports,
188
+ "lt-LT": $1db0f589ec173b45$exports,
189
+ "lv-LV": $85e6bf975d1094b1$exports,
190
+ "nb-NO": $5b30ea9def95deb7$exports,
191
+ "nl-NL": $36fc082ae9b07cd9$exports,
192
+ "pl-PL": $004ca257219ad5e5$exports,
193
+ "pt-BR": $7185afda15938c1d$exports,
194
+ "pt-PT": $f5ee82d2d2e387d1$exports,
195
+ "ro-RO": $9d73bbece95c54da$exports,
196
+ "ru-RU": $bc8566c135ef45e7$exports,
197
+ "sk-SK": $505ac5577c8e9202$exports,
198
+ "sl-SI": $4331407d77582ee6$exports,
199
+ "sr-SP": $98c11fa64e0657cd$exports,
200
+ "sv-SE": $1b7323508a8d2b62$exports,
201
+ "tr-TR": $61acf1b05216a392$exports,
202
+ "uk-UA": $ca0c4410f1dbdb12$exports,
203
+ "zh-CN": $7870da185207c179$exports,
204
+ "zh-TW": $70d49959231766d5$exports
40
205
  };
41
206
 
42
207
 
@@ -44,10 +209,10 @@ $07bcec7f8562b490$exports = {
44
209
 
45
210
 
46
211
 
47
- function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
212
+ function $6ffbef18191cf50e$export$dc9c12ed27dd1b49(props, state, ref) {
48
213
  let { type: type = 'menu' , isDisabled: isDisabled , trigger: trigger = 'press' } = props;
49
- let menuTriggerId = $6RQwO$reactariautils.useId();
50
- let { triggerProps: triggerProps , overlayProps: overlayProps } = $6RQwO$reactariaoverlays.useOverlayTrigger({
214
+ let menuTriggerId = $cSfnK$reactariautils.useId();
215
+ let { triggerProps: triggerProps , overlayProps: overlayProps } = $cSfnK$reactariaoverlays.useOverlayTrigger({
51
216
  type: type
52
217
  }, state, ref);
53
218
  let onKeyDown = (e)=>{
@@ -71,8 +236,8 @@ function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
71
236
  break;
72
237
  }
73
238
  };
74
- let formatMessage = $6RQwO$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($07bcec7f8562b490$exports)));
75
- let { longPressProps: longPressProps } = $6RQwO$reactariainteractions.useLongPress({
239
+ let formatMessage = $cSfnK$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($853781387242d7cb$exports)));
240
+ let { longPressProps: longPressProps } = $cSfnK$reactariainteractions.useLongPress({
76
241
  accessibilityDescription: formatMessage('longPressMessage'),
77
242
  onLongPressStart () {
78
243
  state.close();
@@ -92,7 +257,7 @@ function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
92
257
  if (e.pointerType === 'touch' && !isDisabled) state.toggle();
93
258
  }
94
259
  };
95
- triggerProps = $6RQwO$reactariautils.mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);
260
+ triggerProps = $cSfnK$reactariautils.mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);
96
261
  return {
97
262
  menuTriggerProps: {
98
263
  ...triggerProps,
@@ -107,18 +272,18 @@ function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
107
272
  }
108
273
 
109
274
 
110
- var $c8ded7c3bc67b89f$exports = {};
275
+ var $e4bae9a72b1bc2fb$exports = {};
111
276
 
112
- $parcel$export($c8ded7c3bc67b89f$exports, "useMenu", () => $c8ded7c3bc67b89f$export$38eaa17faae8f579);
277
+ $parcel$export($e4bae9a72b1bc2fb$exports, "useMenu", () => $e4bae9a72b1bc2fb$export$38eaa17faae8f579);
113
278
 
114
279
 
115
- function $c8ded7c3bc67b89f$export$38eaa17faae8f579(props, state, ref) {
280
+ function $e4bae9a72b1bc2fb$export$38eaa17faae8f579(props, state, ref) {
116
281
  let { shouldFocusWrap: shouldFocusWrap = true , ...otherProps } = props;
117
282
  if (!props['aria-label'] && !props['aria-labelledby']) console.warn('An aria-label or aria-labelledby prop is required for accessibility.');
118
- let domProps = $6RQwO$reactariautils.filterDOMProps(props, {
283
+ let domProps = $cSfnK$reactariautils.filterDOMProps(props, {
119
284
  labelable: true
120
285
  });
121
- let { listProps: listProps } = $6RQwO$reactariaselection.useSelectableList({
286
+ let { listProps: listProps } = $cSfnK$reactariaselection.useSelectableList({
122
287
  ...otherProps,
123
288
  ref: ref,
124
289
  selectionManager: state.selectionManager,
@@ -127,7 +292,7 @@ function $c8ded7c3bc67b89f$export$38eaa17faae8f579(props, state, ref) {
127
292
  shouldFocusWrap: shouldFocusWrap
128
293
  });
129
294
  return {
130
- menuProps: $6RQwO$reactariautils.mergeProps(domProps, {
295
+ menuProps: $cSfnK$reactariautils.mergeProps(domProps, {
131
296
  role: 'menu',
132
297
  ...listProps
133
298
  })
@@ -135,21 +300,21 @@ function $c8ded7c3bc67b89f$export$38eaa17faae8f579(props, state, ref) {
135
300
  }
136
301
 
137
302
 
138
- var $4124e6f4a4efab3d$exports = {};
303
+ var $d81c28283babe418$exports = {};
139
304
 
140
- $parcel$export($4124e6f4a4efab3d$exports, "useMenuItem", () => $4124e6f4a4efab3d$export$9d32628fc2aea7da);
305
+ $parcel$export($d81c28283babe418$exports, "useMenuItem", () => $d81c28283babe418$export$9d32628fc2aea7da);
141
306
 
142
307
 
143
308
 
144
309
 
145
- function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
310
+ function $d81c28283babe418$export$9d32628fc2aea7da(props, state, ref) {
146
311
  let { isSelected: isSelected , isDisabled: isDisabled , key: key , onClose: onClose , closeOnSelect: closeOnSelect , isVirtualized: isVirtualized , onAction: onAction } = props;
147
312
  let role = 'menuitem';
148
313
  if (state.selectionManager.selectionMode === 'single') role = 'menuitemradio';
149
314
  else if (state.selectionManager.selectionMode === 'multiple') role = 'menuitemcheckbox';
150
- let labelId = $6RQwO$reactariautils.useSlotId();
151
- let descriptionId = $6RQwO$reactariautils.useSlotId();
152
- let keyboardId = $6RQwO$reactariautils.useSlotId();
315
+ let labelId = $cSfnK$reactariautils.useSlotId();
316
+ let descriptionId = $cSfnK$reactariautils.useSlotId();
317
+ let keyboardId = $cSfnK$reactariautils.useSlotId();
153
318
  let ariaProps = {
154
319
  'aria-disabled': isDisabled,
155
320
  role: role,
@@ -163,7 +328,7 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
163
328
  if (state.selectionManager.selectionMode !== 'none') ariaProps['aria-checked'] = isSelected;
164
329
  if (isVirtualized) {
165
330
  ariaProps['aria-posinset'] = state.collection.getItem(key).index;
166
- ariaProps['aria-setsize'] = $6RQwO$reactstatelycollections.getItemCount(state.collection);
331
+ ariaProps['aria-setsize'] = $cSfnK$reactstatelycollections.getItemCount(state.collection);
167
332
  }
168
333
  let onKeyDown = (e)=>{
169
334
  // Ignore repeating events, which may have started on the menu trigger before moving
@@ -187,24 +352,24 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
187
352
  if (onAction) onAction(key);
188
353
  // Pressing a menu item should close by default in single selection mode but not multiple
189
354
  // selection mode, except if overridden by the closeOnSelect prop.
190
- if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) onClose();
355
+ if (onClose && (closeOnSelect !== null && closeOnSelect !== void 0 ? closeOnSelect : state.selectionManager.selectionMode !== 'multiple')) onClose();
191
356
  }
192
357
  };
193
- let { itemProps: itemProps } = $6RQwO$reactariaselection.useSelectableItem({
358
+ let { itemProps: itemProps } = $cSfnK$reactariaselection.useSelectableItem({
194
359
  selectionManager: state.selectionManager,
195
360
  key: key,
196
361
  ref: ref,
197
362
  shouldSelectOnPressUp: true
198
363
  });
199
- let { pressProps: pressProps } = $6RQwO$reactariainteractions.usePress({
364
+ let { pressProps: pressProps } = $cSfnK$reactariainteractions.usePress({
200
365
  onPressStart: onPressStart,
201
366
  onPressUp: onPressUp,
202
367
  isDisabled: isDisabled
203
368
  });
204
- let { hoverProps: hoverProps } = $6RQwO$reactariainteractions.useHover({
369
+ let { hoverProps: hoverProps } = $cSfnK$reactariainteractions.useHover({
205
370
  isDisabled: isDisabled,
206
371
  onHoverStart () {
207
- if (!$6RQwO$reactariainteractions.isFocusVisible()) {
372
+ if (!$cSfnK$reactariainteractions.isFocusVisible()) {
208
373
  state.selectionManager.setFocused(true);
209
374
  state.selectionManager.setFocusedKey(key);
210
375
  }
@@ -213,7 +378,7 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
213
378
  return {
214
379
  menuItemProps: {
215
380
  ...ariaProps,
216
- ...$6RQwO$reactariautils.mergeProps(itemProps, pressProps, hoverProps, {
381
+ ...$cSfnK$reactariautils.mergeProps(itemProps, pressProps, hoverProps, {
217
382
  onKeyDown: onKeyDown
218
383
  })
219
384
  },
@@ -230,13 +395,13 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
230
395
  }
231
396
 
232
397
 
233
- var $09e5e649d8f56a83$exports = {};
398
+ var $d1f36a3ac353172a$exports = {};
234
399
 
235
- $parcel$export($09e5e649d8f56a83$exports, "useMenuSection", () => $09e5e649d8f56a83$export$73f7a44322579622);
400
+ $parcel$export($d1f36a3ac353172a$exports, "useMenuSection", () => $d1f36a3ac353172a$export$73f7a44322579622);
236
401
 
237
- function $09e5e649d8f56a83$export$73f7a44322579622(props) {
402
+ function $d1f36a3ac353172a$export$73f7a44322579622(props) {
238
403
  let { heading: heading , 'aria-label': ariaLabel } = props;
239
- let headingId = $6RQwO$reactariautils.useId();
404
+ let headingId = $cSfnK$reactariautils.useId();
240
405
  return {
241
406
  itemProps: {
242
407
  role: 'presentation'
@@ -258,10 +423,10 @@ function $09e5e649d8f56a83$export$73f7a44322579622(props) {
258
423
  }
259
424
 
260
425
 
261
- $parcel$exportWildcard(module.exports, $09e9a80ccce757b5$exports);
262
- $parcel$exportWildcard(module.exports, $c8ded7c3bc67b89f$exports);
263
- $parcel$exportWildcard(module.exports, $4124e6f4a4efab3d$exports);
264
- $parcel$exportWildcard(module.exports, $09e5e649d8f56a83$exports);
426
+ $parcel$exportWildcard(module.exports, $6ffbef18191cf50e$exports);
427
+ $parcel$exportWildcard(module.exports, $e4bae9a72b1bc2fb$exports);
428
+ $parcel$exportWildcard(module.exports, $d81c28283babe418$exports);
429
+ $parcel$exportWildcard(module.exports, $d1f36a3ac353172a$exports);
265
430
 
266
431
 
267
432
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAA6E;;;ADCzG,yBAAc,GAAG,CAAC;IAChB,CAAO,QAAE,yBAAM;AACjB,CAAC;;;;;;;SD0Ce,yCAAc,CAAC,KAA2B,EAAE,KAAuB,EAAE,GAA2B,EAAmB,CAAC;IAClI,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAM,oBACb,UAAU,YACV,OAAO,GAAG,CAAO,QACnB,CAAC,GAAG,KAAK;IAET,GAAG,CAAC,aAAa,GAAG,2BAAK;IACzB,GAAG,CAAC,CAAC,eAAA,YAAY,iBAAE,YAAY,EAAA,CAAC,GAAG,0CAAiB,CAAC,CAAC;cAAA,IAAI;IAAA,CAAC,EAAE,KAAK,EAAE,GAAG;IAEvE,GAAG,CAAC,SAAS,IAAI,CAAC,GAAK,CAAC;QACtB,EAAE,EAAE,UAAU,EACZ,MAAM;QAGR,EAAE,EAAE,OAAO,KAAK,CAAW,eAAK,CAAC,CAAC,MAAM,EACtC,MAAM;QAGR,EAAE,EAAE,GAAG,IAAI,GAAG,CAAC,OAAO,EACpB,MAAM,CAAE,CAAC,CAAC,GAAG;YACX,IAAI,CAAC,CAAO;YACZ,IAAI,CAAC,CAAG;gBACN,EAAE,EAAE,OAAO,KAAK,CAAW,YACzB,MAAM;YAER,EAAc,AAAd,YAAc;YAChB,IAAI,CAAC,CAAW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AAU,EAAE,UAAU,EAAE,CAAC;2BAAA,SAAS;YAAA,CAAC;QAC9D,CAAC;QACD,UAAU,EAAE,CAAC;YACX,EAAE,EAAE,OAAO;QACb,CAAC;QACD,gBAAgB,EAAE,CAAC;YACjB,EAAE,EAAE,aAAa;QACnB,CAAC;QACD,qBAAqB,EAAE,CAAC;YACtB,EAAE,EAAE,UAAU;QAChB,CAAC;IACH,CAAC;AACH,CAAC;;;;;;;SCjJe,yCAAc,CAAC,KAA2B,EAAmB,CAAC;IAC5E,GAAG,CAAC,CAAC,UAAA,OAAO,GAAE,CAAY,aAAE,SAAS,EAAA,CAAC,GAAG,KAAK;IAC9C,GAAG,CAAC,SAAS,GAAG,2BAAK;IAErB,MAAM,CAAC,CAAC;QACN,SAAS,EAAE,CAAC;YACV,IAAI,EAAE,CAAc;QACtB,CAAC;QACD,YAAY,EAAE,OAAO,GAAG,CAAC;YACvB,EAAgE,AAAhE,8DAAgE;YAChE,EAAiE,AAAjE,+DAAiE;YACjE,EAAmC,AAAnC,iCAAmC;YACnC,EAAE,EAAE,SAAS;YACb,CAAa,cAAE,IAAI;QACrB,CAAC,GAAG,CAAC;QAAA,CAAC;QACN,UAAU,EAAE,CAAC;YACX,IAAI,EAAE,CAAO;YACb,CAAY,aAAE,SAAS;YACvB,CAAiB,kBAAE,OAAO,GAAG,SAAS,GAAG,SAAS;QACpD,CAAC;IACH,CAAC;AACH,CAAC;;","sources":["packages/@react-aria/menu/src/index.ts","packages/@react-aria/menu/src/useMenuTrigger.ts","packages/@react-aria/menu/intl/*.js","packages/@react-aria/menu/intl/en-US.json","packages/@react-aria/menu/src/useMenu.ts","packages/@react-aria/menu/src/useMenuItem.ts","packages/@react-aria/menu/src/useMenuSection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './useMenuTrigger';\nexport * from './useMenu';\nexport * from './useMenuItem';\nexport * from './useMenuSection';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MenuTriggerState} from '@react-stately/menu';\nimport {MenuTriggerType} from '@react-types/menu';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport {useLongPress} from '@react-aria/interactions';\nimport {useMessageFormatter} from '@react-aria/i18n';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\ninterface MenuTriggerAriaProps {\n /** The type of menu that the menu trigger opens. */\n type?: 'menu' | 'listbox',\n /** Whether menu trigger is disabled. */\n isDisabled?: boolean,\n /** How menu is triggered. */\n trigger?: MenuTriggerType\n}\n\ninterface MenuTriggerAria {\n /** Props for the menu trigger element. */\n menuTriggerProps: AriaButtonProps,\n\n /** Props for the menu. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu trigger.\n * @param props - Props for the menu trigger.\n * @param state - State for the menu trigger.\n */\nexport function useMenuTrigger(props: MenuTriggerAriaProps, state: MenuTriggerState, ref: RefObject<HTMLElement>): MenuTriggerAria {\n let {\n type = 'menu' as MenuTriggerAriaProps['type'],\n isDisabled,\n trigger = 'press'\n } = props;\n\n let menuTriggerId = useId();\n let {triggerProps, overlayProps} = useOverlayTrigger({type}, state, ref);\n\n let onKeyDown = (e) => {\n if (isDisabled) {\n return;\n }\n\n if (trigger === 'longPress' && !e.altKey) {\n return;\n }\n\n if (ref && ref.current) {\n switch (e.key) {\n case 'Enter':\n case ' ':\n if (trigger === 'longPress') {\n return;\n }\n // fallthrough\n case 'ArrowDown':\n // Stop propagation, unless it would already be handled by useKeyboard.\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('first');\n break;\n case 'ArrowUp':\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('last');\n break;\n }\n }\n };\n\n let formatMessage = useMessageFormatter(intlMessages);\n let {longPressProps} = useLongPress({\n accessibilityDescription: formatMessage('longPressMessage'),\n onLongPressStart() {\n state.close();\n },\n onLongPress() {\n state.open('first');\n }\n });\n\n let pressProps = {\n onPressStart(e) {\n // For consistency with native, open the menu on mouse/key down, but touch up.\n if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {\n // If opened with a screen reader, auto focus the first item.\n // Otherwise, the menu itself will be focused.\n state.toggle(e.pointerType === 'virtual' ? 'first' : null);\n }\n },\n onPress(e) {\n if (e.pointerType === 'touch' && !isDisabled) {\n state.toggle();\n }\n }\n };\n\n triggerProps = mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);\n\n return {\n menuTriggerProps: {\n ...triggerProps,\n id: menuTriggerId,\n onKeyDown\n },\n menuProps: {\n ...overlayProps,\n 'aria-labelledby': menuTriggerId\n }\n };\n}\n","const _temp0 = require(\"./en-US.json\");\nmodule.exports = {\n \"en-US\": _temp0\n}","{\n \"longPressMessage\": \"Long press or press Alt + ArrowDown to open menu\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaMenuProps} from '@react-types/menu';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {KeyboardDelegate} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableList} from '@react-aria/selection';\n\ninterface MenuAria {\n /** Props for the menu element. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuOptions<T> extends AriaMenuProps<T> {\n /** Whether the menu uses virtual scrolling. */\n isVirtualized?: boolean,\n\n /**\n * An optional keyboard delegate implementation for type to select,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu component.\n * A menu displays a list of actions or options that a user can choose.\n * @param props - Props for the menu.\n * @param state - State for the menu, as returned by `useListState`.\n */\nexport function useMenu<T>(props: AriaMenuOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuAria {\n let {\n shouldFocusWrap = true,\n ...otherProps\n } = props;\n\n if (!props['aria-label'] && !props['aria-labelledby']) {\n console.warn('An aria-label or aria-labelledby prop is required for accessibility.');\n }\n\n let domProps = filterDOMProps(props, {labelable: true});\n let {listProps} = useSelectableList({\n ...otherProps,\n ref,\n selectionManager: state.selectionManager,\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n shouldFocusWrap\n });\n\n return {\n menuProps: mergeProps(domProps, {\n role: 'menu',\n ...listProps\n })\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getItemCount} from '@react-stately/collections';\nimport {HTMLAttributes, Key, RefObject} from 'react';\nimport {isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\nimport {PressEvent} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableItem} from '@react-aria/selection';\n\ninterface MenuItemAria {\n /** Props for the menu item element. */\n menuItemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the main text element inside the menu item. */\n labelProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the description text element inside the menu item, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the keyboard shortcut text element inside the item, if any. */\n keyboardShortcutProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuItemProps {\n /** Whether the menu item is disabled. */\n isDisabled?: boolean,\n\n /** Whether the menu item is selected. */\n isSelected?: boolean,\n\n /** A screen reader only label for the menu item. */\n 'aria-label'?: string,\n\n /** The unique key for the menu item. */\n key?: Key,\n\n /** Handler that is called when the menu should close after selecting an item. */\n onClose?: () => void,\n\n /**\n * Whether the menu should close when the menu item is selected.\n * @default true\n */\n closeOnSelect?: boolean,\n\n /** Whether the menu item is contained in a virtual scrolling menu. */\n isVirtualized?: boolean,\n\n /** Handler that is called when the user activates the item. */\n onAction?: (key: Key) => void\n}\n\n/**\n * Provides the behavior and accessibility implementation for an item in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the item.\n * @param state - State for the menu, as returned by `useTreeState`.\n */\nexport function useMenuItem<T>(props: AriaMenuItemProps, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuItemAria {\n let {\n isSelected,\n isDisabled,\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n } = props;\n\n let role = 'menuitem';\n if (state.selectionManager.selectionMode === 'single') {\n role = 'menuitemradio';\n } else if (state.selectionManager.selectionMode === 'multiple') {\n role = 'menuitemcheckbox';\n }\n\n let labelId = useSlotId();\n let descriptionId = useSlotId();\n let keyboardId = useSlotId();\n\n let ariaProps = {\n 'aria-disabled': isDisabled,\n role,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': labelId,\n 'aria-describedby': [descriptionId, keyboardId].filter(Boolean).join(' ') || undefined\n };\n\n if (state.selectionManager.selectionMode !== 'none') {\n ariaProps['aria-checked'] = isSelected;\n }\n\n if (isVirtualized) {\n ariaProps['aria-posinset'] = state.collection.getItem(key).index;\n ariaProps['aria-setsize'] = getItemCount(state.collection);\n }\n\n let onKeyDown = (e: KeyboardEvent) => {\n // Ignore repeating events, which may have started on the menu trigger before moving\n // focus to the menu item. We want to wait for a second complete key press sequence.\n if (e.repeat) {\n return;\n }\n\n switch (e.key) {\n case ' ':\n if (!isDisabled && state.selectionManager.selectionMode === 'none' && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n case 'Enter':\n // The Enter key should always close on select, except if overridden.\n if (!isDisabled && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n }\n };\n\n let onPressStart = (e: PressEvent) => {\n if (e.pointerType === 'keyboard' && onAction) {\n onAction(key);\n }\n };\n\n let onPressUp = (e: PressEvent) => {\n if (e.pointerType !== 'keyboard') {\n if (onAction) {\n onAction(key);\n }\n\n // Pressing a menu item should close by default in single selection mode but not multiple\n // selection mode, except if overridden by the closeOnSelect prop.\n if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) {\n onClose();\n }\n }\n };\n\n let {itemProps} = useSelectableItem({\n selectionManager: state.selectionManager,\n key,\n ref,\n shouldSelectOnPressUp: true\n });\n\n let {pressProps} = usePress({onPressStart, onPressUp, isDisabled});\n let {hoverProps} = useHover({\n isDisabled,\n onHoverStart() {\n if (!isFocusVisible()) {\n state.selectionManager.setFocused(true);\n state.selectionManager.setFocusedKey(key);\n }\n }\n });\n\n return {\n menuItemProps: {\n ...ariaProps,\n ...mergeProps(itemProps, pressProps, hoverProps, {onKeyDown})\n },\n labelProps: {\n id: labelId\n },\n descriptionProps: {\n id: descriptionId\n },\n keyboardShortcutProps: {\n id: keyboardId\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, ReactNode} from 'react';\nimport {useId} from '@react-aria/utils';\n\ninterface AriaMenuSectionProps {\n /** The heading for the section. */\n heading?: ReactNode,\n /** An accessibility label for the section. Required if `heading` is not present. */\n 'aria-label'?: string\n}\n\ninterface MenuSectionAria {\n /** Props for the wrapper list item. */\n itemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the heading element, if any. */\n headingProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the group element. */\n groupProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the section.\n */\nexport function useMenuSection(props: AriaMenuSectionProps): MenuSectionAria {\n let {heading, 'aria-label': ariaLabel} = props;\n let headingId = useId();\n\n return {\n itemProps: {\n role: 'presentation'\n },\n headingProps: heading ? {\n // Techincally, menus cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, and only use it\n // as a label for the nested group.\n id: headingId,\n 'aria-hidden': true\n } : {},\n groupProps: {\n role: 'group',\n 'aria-label': ariaLabel,\n 'aria-labelledby': heading ? headingId : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;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B,EAAE,EAAE,aAAa;QACnB,CAAC;QACD,qBAAqB,EAAE,CAAC;YACtB,EAAE,EAAE,UAAU;QAChB,CAAC;IACH,CAAC;AACH,CAAC;;;;;;;SCjJe,yCAAc,CAAC,KAA2B,EAAmB,CAAC;IAC5E,GAAG,CAAC,CAAC,UAAA,OAAO,GAAE,CAAY,aAAE,SAAS,EAAA,CAAC,GAAG,KAAK;IAC9C,GAAG,CAAC,SAAS,GAAG,2BAAK;IAErB,MAAM,CAAC,CAAC;QACN,SAAS,EAAE,CAAC;YACV,IAAI,EAAE,CAAc;QACtB,CAAC;QACD,YAAY,EAAE,OAAO,GAAG,CAAC;YACvB,EAAgE,AAAhE,8DAAgE;YAChE,EAAiE,AAAjE,+DAAiE;YACjE,EAAmC,AAAnC,iCAAmC;YACnC,EAAE,EAAE,SAAS;YACb,CAAa,cAAE,IAAI;QACrB,CAAC,GAAG,CAAC;QAAA,CAAC;QACN,UAAU,EAAE,CAAC;YACX,IAAI,EAAE,CAAO;YACb,CAAY,aAAE,SAAS;YACvB,CAAiB,kBAAE,OAAO,GAAG,SAAS,GAAG,SAAS;QACpD,CAAC;IACH,CAAC;AACH,CAAC;;","sources":["packages/@react-aria/menu/src/index.ts","packages/@react-aria/menu/src/useMenuTrigger.ts","packages/@react-aria/menu/intl/*.js","packages/@react-aria/menu/intl/ar-AE.json","packages/@react-aria/menu/intl/bg-BG.json","packages/@react-aria/menu/intl/cs-CZ.json","packages/@react-aria/menu/intl/da-DK.json","packages/@react-aria/menu/intl/de-DE.json","packages/@react-aria/menu/intl/el-GR.json","packages/@react-aria/menu/intl/en-US.json","packages/@react-aria/menu/intl/es-ES.json","packages/@react-aria/menu/intl/et-EE.json","packages/@react-aria/menu/intl/fi-FI.json","packages/@react-aria/menu/intl/fr-FR.json","packages/@react-aria/menu/intl/he-IL.json","packages/@react-aria/menu/intl/hr-HR.json","packages/@react-aria/menu/intl/hu-HU.json","packages/@react-aria/menu/intl/it-IT.json","packages/@react-aria/menu/intl/ja-JP.json","packages/@react-aria/menu/intl/ko-KR.json","packages/@react-aria/menu/intl/lt-LT.json","packages/@react-aria/menu/intl/lv-LV.json","packages/@react-aria/menu/intl/nb-NO.json","packages/@react-aria/menu/intl/nl-NL.json","packages/@react-aria/menu/intl/pl-PL.json","packages/@react-aria/menu/intl/pt-BR.json","packages/@react-aria/menu/intl/pt-PT.json","packages/@react-aria/menu/intl/ro-RO.json","packages/@react-aria/menu/intl/ru-RU.json","packages/@react-aria/menu/intl/sk-SK.json","packages/@react-aria/menu/intl/sl-SI.json","packages/@react-aria/menu/intl/sr-SP.json","packages/@react-aria/menu/intl/sv-SE.json","packages/@react-aria/menu/intl/tr-TR.json","packages/@react-aria/menu/intl/uk-UA.json","packages/@react-aria/menu/intl/zh-CN.json","packages/@react-aria/menu/intl/zh-TW.json","packages/@react-aria/menu/src/useMenu.ts","packages/@react-aria/menu/src/useMenuItem.ts","packages/@react-aria/menu/src/useMenuSection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './useMenuTrigger';\nexport * from './useMenu';\nexport * from './useMenuItem';\nexport * from './useMenuSection';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MenuTriggerState} from '@react-stately/menu';\nimport {MenuTriggerType} from '@react-types/menu';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport {useLongPress} from '@react-aria/interactions';\nimport {useMessageFormatter} from '@react-aria/i18n';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\ninterface MenuTriggerAriaProps {\n /** The type of menu that the menu trigger opens. */\n type?: 'menu' | 'listbox',\n /** Whether menu trigger is disabled. */\n isDisabled?: boolean,\n /** How menu is triggered. */\n trigger?: MenuTriggerType\n}\n\ninterface MenuTriggerAria {\n /** Props for the menu trigger element. */\n menuTriggerProps: AriaButtonProps,\n\n /** Props for the menu. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu trigger.\n * @param props - Props for the menu trigger.\n * @param state - State for the menu trigger.\n */\nexport function useMenuTrigger(props: MenuTriggerAriaProps, state: MenuTriggerState, ref: RefObject<HTMLElement>): MenuTriggerAria {\n let {\n type = 'menu' as MenuTriggerAriaProps['type'],\n isDisabled,\n trigger = 'press'\n } = props;\n\n let menuTriggerId = useId();\n let {triggerProps, overlayProps} = useOverlayTrigger({type}, state, ref);\n\n let onKeyDown = (e) => {\n if (isDisabled) {\n return;\n }\n\n if (trigger === 'longPress' && !e.altKey) {\n return;\n }\n\n if (ref && ref.current) {\n switch (e.key) {\n case 'Enter':\n case ' ':\n if (trigger === 'longPress') {\n return;\n }\n // fallthrough\n case 'ArrowDown':\n // Stop propagation, unless it would already be handled by useKeyboard.\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('first');\n break;\n case 'ArrowUp':\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('last');\n break;\n }\n }\n };\n\n let formatMessage = useMessageFormatter(intlMessages);\n let {longPressProps} = useLongPress({\n accessibilityDescription: formatMessage('longPressMessage'),\n onLongPressStart() {\n state.close();\n },\n onLongPress() {\n state.open('first');\n }\n });\n\n let pressProps = {\n onPressStart(e) {\n // For consistency with native, open the menu on mouse/key down, but touch up.\n if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {\n // If opened with a screen reader, auto focus the first item.\n // Otherwise, the menu itself will be focused.\n state.toggle(e.pointerType === 'virtual' ? 'first' : null);\n }\n },\n onPress(e) {\n if (e.pointerType === 'touch' && !isDisabled) {\n state.toggle();\n }\n }\n };\n\n triggerProps = mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);\n\n return {\n menuTriggerProps: {\n ...triggerProps,\n id: menuTriggerId,\n onKeyDown\n },\n menuProps: {\n ...overlayProps,\n 'aria-labelledby': menuTriggerId\n }\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"longPressMessage\": \"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة\"\n}\n","{\n \"longPressMessage\": \"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\"\n}\n","{\n \"longPressMessage\": \"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku\"\n}\n","{\n \"longPressMessage\": \"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"\n}\n","{\n \"longPressMessage\": \"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen\"\n}\n","{\n \"longPressMessage\": \"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"\n}\n","{\n \"longPressMessage\": \"Long press or press Alt + ArrowDown to open menu\"\n}\n","{\n \"longPressMessage\": \"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\"\n}\n","{\n \"longPressMessage\": \"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\"\n}\n","{\n \"longPressMessage\": \"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"\n}\n","{\n \"longPressMessage\": \"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.\"\n}\n","{\n \"longPressMessage\": \"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\"\n}\n","{\n \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"\n}\n","{\n \"longPressMessage\": \"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához\"\n}\n","{\n \"longPressMessage\": \"Premere a lungo o premere Alt + Freccia giù per aprire il menu\"\n}\n","{\n \"longPressMessage\": \"長押しまたは Alt+下矢印キーでメニューを開く\"\n}\n","{\n \"longPressMessage\": \"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\"\n}\n","{\n \"longPressMessage\": \"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\"\n}\n","{\n \"longPressMessage\": \"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa\"\n}\n","{\n \"longPressMessage\": \"Langt trykk eller trykk Alt + PilNed for å åpne menyen\"\n}\n","{\n \"longPressMessage\": \"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\"\n}\n","{\n \"longPressMessage\": \"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\"\n}\n","{\n \"longPressMessage\": \"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\"\n}\n","{\n \"longPressMessage\": \"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\"\n}\n","{\n \"longPressMessage\": \"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul\"\n}\n","{\n \"longPressMessage\": \"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\"\n}\n","{\n \"longPressMessage\": \"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol\"\n}\n","{\n \"longPressMessage\": \"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\"\n}\n","{\n \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\"\n}\n","{\n \"longPressMessage\": \"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn\"\n}\n","{\n \"longPressMessage\": \"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\"\n}\n","{\n \"longPressMessage\": \"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\"\n}\n","{\n \"longPressMessage\": \"长按或按 Alt + 向下方向键以打开菜单\"\n}\n","{\n \"longPressMessage\": \"長按或按 Alt+向下鍵以開啟功能表\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaMenuProps} from '@react-types/menu';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {KeyboardDelegate} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableList} from '@react-aria/selection';\n\ninterface MenuAria {\n /** Props for the menu element. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuOptions<T> extends AriaMenuProps<T> {\n /** Whether the menu uses virtual scrolling. */\n isVirtualized?: boolean,\n\n /**\n * An optional keyboard delegate implementation for type to select,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu component.\n * A menu displays a list of actions or options that a user can choose.\n * @param props - Props for the menu.\n * @param state - State for the menu, as returned by `useListState`.\n */\nexport function useMenu<T>(props: AriaMenuOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuAria {\n let {\n shouldFocusWrap = true,\n ...otherProps\n } = props;\n\n if (!props['aria-label'] && !props['aria-labelledby']) {\n console.warn('An aria-label or aria-labelledby prop is required for accessibility.');\n }\n\n let domProps = filterDOMProps(props, {labelable: true});\n let {listProps} = useSelectableList({\n ...otherProps,\n ref,\n selectionManager: state.selectionManager,\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n shouldFocusWrap\n });\n\n return {\n menuProps: mergeProps(domProps, {\n role: 'menu',\n ...listProps\n })\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getItemCount} from '@react-stately/collections';\nimport {HTMLAttributes, Key, RefObject} from 'react';\nimport {isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\nimport {PressEvent} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableItem} from '@react-aria/selection';\n\ninterface MenuItemAria {\n /** Props for the menu item element. */\n menuItemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the main text element inside the menu item. */\n labelProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the description text element inside the menu item, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the keyboard shortcut text element inside the item, if any. */\n keyboardShortcutProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuItemProps {\n /** Whether the menu item is disabled. */\n isDisabled?: boolean,\n\n /** Whether the menu item is selected. */\n isSelected?: boolean,\n\n /** A screen reader only label for the menu item. */\n 'aria-label'?: string,\n\n /** The unique key for the menu item. */\n key?: Key,\n\n /** Handler that is called when the menu should close after selecting an item. */\n onClose?: () => void,\n\n /**\n * Whether the menu should close when the menu item is selected.\n * @default true\n */\n closeOnSelect?: boolean,\n\n /** Whether the menu item is contained in a virtual scrolling menu. */\n isVirtualized?: boolean,\n\n /** Handler that is called when the user activates the item. */\n onAction?: (key: Key) => void\n}\n\n/**\n * Provides the behavior and accessibility implementation for an item in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the item.\n * @param state - State for the menu, as returned by `useTreeState`.\n */\nexport function useMenuItem<T>(props: AriaMenuItemProps, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuItemAria {\n let {\n isSelected,\n isDisabled,\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n } = props;\n\n let role = 'menuitem';\n if (state.selectionManager.selectionMode === 'single') {\n role = 'menuitemradio';\n } else if (state.selectionManager.selectionMode === 'multiple') {\n role = 'menuitemcheckbox';\n }\n\n let labelId = useSlotId();\n let descriptionId = useSlotId();\n let keyboardId = useSlotId();\n\n let ariaProps = {\n 'aria-disabled': isDisabled,\n role,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': labelId,\n 'aria-describedby': [descriptionId, keyboardId].filter(Boolean).join(' ') || undefined\n };\n\n if (state.selectionManager.selectionMode !== 'none') {\n ariaProps['aria-checked'] = isSelected;\n }\n\n if (isVirtualized) {\n ariaProps['aria-posinset'] = state.collection.getItem(key).index;\n ariaProps['aria-setsize'] = getItemCount(state.collection);\n }\n\n let onKeyDown = (e: KeyboardEvent) => {\n // Ignore repeating events, which may have started on the menu trigger before moving\n // focus to the menu item. We want to wait for a second complete key press sequence.\n if (e.repeat) {\n return;\n }\n\n switch (e.key) {\n case ' ':\n if (!isDisabled && state.selectionManager.selectionMode === 'none' && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n case 'Enter':\n // The Enter key should always close on select, except if overridden.\n if (!isDisabled && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n }\n };\n\n let onPressStart = (e: PressEvent) => {\n if (e.pointerType === 'keyboard' && onAction) {\n onAction(key);\n }\n };\n\n let onPressUp = (e: PressEvent) => {\n if (e.pointerType !== 'keyboard') {\n if (onAction) {\n onAction(key);\n }\n\n // Pressing a menu item should close by default in single selection mode but not multiple\n // selection mode, except if overridden by the closeOnSelect prop.\n if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) {\n onClose();\n }\n }\n };\n\n let {itemProps} = useSelectableItem({\n selectionManager: state.selectionManager,\n key,\n ref,\n shouldSelectOnPressUp: true\n });\n\n let {pressProps} = usePress({onPressStart, onPressUp, isDisabled});\n let {hoverProps} = useHover({\n isDisabled,\n onHoverStart() {\n if (!isFocusVisible()) {\n state.selectionManager.setFocused(true);\n state.selectionManager.setFocusedKey(key);\n }\n }\n });\n\n return {\n menuItemProps: {\n ...ariaProps,\n ...mergeProps(itemProps, pressProps, hoverProps, {onKeyDown})\n },\n labelProps: {\n id: labelId\n },\n descriptionProps: {\n id: descriptionId\n },\n keyboardShortcutProps: {\n id: keyboardId\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, ReactNode} from 'react';\nimport {useId} from '@react-aria/utils';\n\ninterface AriaMenuSectionProps {\n /** The heading for the section. */\n heading?: ReactNode,\n /** An accessibility label for the section. Required if `heading` is not present. */\n 'aria-label'?: string\n}\n\ninterface MenuSectionAria {\n /** Props for the wrapper list item. */\n itemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the heading element, if any. */\n headingProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the group element. */\n groupProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the section.\n */\nexport function useMenuSection(props: AriaMenuSectionProps): MenuSectionAria {\n let {heading, 'aria-label': ariaLabel} = props;\n let headingId = useId();\n\n return {\n itemProps: {\n role: 'presentation'\n },\n headingProps: heading ? {\n // Techincally, menus cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, and only use it\n // as a label for the nested group.\n id: headingId,\n 'aria-hidden': true\n } : {},\n groupProps: {\n role: 'group',\n 'aria-label': ariaLabel,\n 'aria-labelledby': heading ? headingId : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,9 +1,9 @@
1
- import {useId as $d6bQb$useId, mergeProps as $d6bQb$mergeProps, filterDOMProps as $d6bQb$filterDOMProps, useSlotId as $d6bQb$useSlotId} from "@react-aria/utils";
2
- import {useLongPress as $d6bQb$useLongPress, usePress as $d6bQb$usePress, useHover as $d6bQb$useHover, isFocusVisible as $d6bQb$isFocusVisible} from "@react-aria/interactions";
3
- import {useMessageFormatter as $d6bQb$useMessageFormatter} from "@react-aria/i18n";
4
- import {useOverlayTrigger as $d6bQb$useOverlayTrigger} from "@react-aria/overlays";
5
- import {useSelectableList as $d6bQb$useSelectableList, useSelectableItem as $d6bQb$useSelectableItem} from "@react-aria/selection";
6
- import {getItemCount as $d6bQb$getItemCount} from "@react-stately/collections";
1
+ import {useId as $lVGRk$useId, mergeProps as $lVGRk$mergeProps, filterDOMProps as $lVGRk$filterDOMProps, useSlotId as $lVGRk$useSlotId} from "@react-aria/utils";
2
+ import {useLongPress as $lVGRk$useLongPress, usePress as $lVGRk$usePress, useHover as $lVGRk$useHover, isFocusVisible as $lVGRk$isFocusVisible} from "@react-aria/interactions";
3
+ import {useMessageFormatter as $lVGRk$useMessageFormatter} from "@react-aria/i18n";
4
+ import {useOverlayTrigger as $lVGRk$useOverlayTrigger} from "@react-aria/overlays";
5
+ import {useSelectableList as $lVGRk$useSelectableList, useSelectableItem as $lVGRk$useSelectableItem} from "@react-aria/selection";
6
+ import {getItemCount as $lVGRk$getItemCount} from "@react-stately/collections";
7
7
 
8
8
  function $parcel$interopDefault(a) {
9
9
  return a && a.__esModule ? a.default : a;
@@ -11,16 +11,181 @@ function $parcel$interopDefault(a) {
11
11
  function $parcel$export(e, n, v, s) {
12
12
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
13
  }
14
- var $f00d7b16b5e8d6e2$exports = {};
14
+ var $235cea8b956832d5$exports = {};
15
15
 
16
- $parcel$export($f00d7b16b5e8d6e2$exports, "useMenuTrigger", () => $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49);
17
- var $21f97af299284af0$exports = {};
18
- var $1aba034f8273c2ea$exports = {};
19
- $1aba034f8273c2ea$exports = JSON.parse("{\"longPressMessage\":\"Long press or press Alt + ArrowDown to open menu\"}");
16
+ $parcel$export($235cea8b956832d5$exports, "useMenuTrigger", () => $235cea8b956832d5$export$dc9c12ed27dd1b49);
17
+ var $96dc1c2244700b52$exports = {};
18
+ var $1a8690630e322ec6$exports = {};
19
+ $1a8690630e322ec6$exports = JSON.parse("{\"longPressMessage\":\"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة\"}");
20
20
 
21
21
 
22
- $21f97af299284af0$exports = {
23
- "en-US": $1aba034f8273c2ea$exports
22
+ var $fc3ddb23f24e2eea$exports = {};
23
+ $fc3ddb23f24e2eea$exports = JSON.parse("{\"longPressMessage\":\"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\"}");
24
+
25
+
26
+ var $eb1dc9b603d71109$exports = {};
27
+ $eb1dc9b603d71109$exports = JSON.parse("{\"longPressMessage\":\"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku\"}");
28
+
29
+
30
+ var $2d95ec734354bc1d$exports = {};
31
+ $2d95ec734354bc1d$exports = JSON.parse("{\"longPressMessage\":\"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"}");
32
+
33
+
34
+ var $e5cd075746034abd$exports = {};
35
+ $e5cd075746034abd$exports = JSON.parse("{\"longPressMessage\":\"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen\"}");
36
+
37
+
38
+ var $74fe177ce68f16a7$exports = {};
39
+ $74fe177ce68f16a7$exports = JSON.parse("{\"longPressMessage\":\"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"}");
40
+
41
+
42
+ var $a59d721fbb9df903$exports = {};
43
+ $a59d721fbb9df903$exports = JSON.parse("{\"longPressMessage\":\"Long press or press Alt + ArrowDown to open menu\"}");
44
+
45
+
46
+ var $617e1630a7dd16ea$exports = {};
47
+ $617e1630a7dd16ea$exports = JSON.parse("{\"longPressMessage\":\"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\"}");
48
+
49
+
50
+ var $3218d8c72495e96b$exports = {};
51
+ $3218d8c72495e96b$exports = JSON.parse("{\"longPressMessage\":\"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\"}");
52
+
53
+
54
+ var $f2f412c97ede0995$exports = {};
55
+ $f2f412c97ede0995$exports = JSON.parse("{\"longPressMessage\":\"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"}");
56
+
57
+
58
+ var $7640150678ab200d$exports = {};
59
+ $7640150678ab200d$exports = JSON.parse("{\"longPressMessage\":\"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.\"}");
60
+
61
+
62
+ var $84c642b6d2ee0f06$exports = {};
63
+ $84c642b6d2ee0f06$exports = JSON.parse("{\"longPressMessage\":\"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\"}");
64
+
65
+
66
+ var $57727cf256b928dd$exports = {};
67
+ $57727cf256b928dd$exports = JSON.parse("{\"longPressMessage\":\"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"}");
68
+
69
+
70
+ var $05114af5675ffd82$exports = {};
71
+ $05114af5675ffd82$exports = JSON.parse("{\"longPressMessage\":\"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához\"}");
72
+
73
+
74
+ var $38a13f141610baa6$exports = {};
75
+ $38a13f141610baa6$exports = JSON.parse("{\"longPressMessage\":\"Premere a lungo o premere Alt + Freccia giù per aprire il menu\"}");
76
+
77
+
78
+ var $02ea00ed085de6ca$exports = {};
79
+ $02ea00ed085de6ca$exports = JSON.parse("{\"longPressMessage\":\"長押しまたは Alt+下矢印キーでメニューを開く\"}");
80
+
81
+
82
+ var $220ff1248b85a717$exports = {};
83
+ $220ff1248b85a717$exports = JSON.parse("{\"longPressMessage\":\"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\"}");
84
+
85
+
86
+ var $bf5ad8f2c050e288$exports = {};
87
+ $bf5ad8f2c050e288$exports = JSON.parse("{\"longPressMessage\":\"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\"}");
88
+
89
+
90
+ var $f3bc8e284003309a$exports = {};
91
+ $f3bc8e284003309a$exports = JSON.parse("{\"longPressMessage\":\"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa\"}");
92
+
93
+
94
+ var $7cb4a85cce2978c1$exports = {};
95
+ $7cb4a85cce2978c1$exports = JSON.parse("{\"longPressMessage\":\"Langt trykk eller trykk Alt + PilNed for å åpne menyen\"}");
96
+
97
+
98
+ var $4bbc2c2d2f167f68$exports = {};
99
+ $4bbc2c2d2f167f68$exports = JSON.parse("{\"longPressMessage\":\"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\"}");
100
+
101
+
102
+ var $ed008113cc0b674e$exports = {};
103
+ $ed008113cc0b674e$exports = JSON.parse("{\"longPressMessage\":\"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\"}");
104
+
105
+
106
+ var $62bfb2a2daab045d$exports = {};
107
+ $62bfb2a2daab045d$exports = JSON.parse("{\"longPressMessage\":\"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\"}");
108
+
109
+
110
+ var $856d8cc1d19b4c06$exports = {};
111
+ $856d8cc1d19b4c06$exports = JSON.parse("{\"longPressMessage\":\"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\"}");
112
+
113
+
114
+ var $a46dcfaf580fda03$exports = {};
115
+ $a46dcfaf580fda03$exports = JSON.parse("{\"longPressMessage\":\"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul\"}");
116
+
117
+
118
+ var $d919ca79cce015eb$exports = {};
119
+ $d919ca79cce015eb$exports = JSON.parse("{\"longPressMessage\":\"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\"}");
120
+
121
+
122
+ var $dcee2f03ab5d79f4$exports = {};
123
+ $dcee2f03ab5d79f4$exports = JSON.parse("{\"longPressMessage\":\"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol\"}");
124
+
125
+
126
+ var $ec308c4d4a31d7ef$exports = {};
127
+ $ec308c4d4a31d7ef$exports = JSON.parse("{\"longPressMessage\":\"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\"}");
128
+
129
+
130
+ var $639001ec689e223b$exports = {};
131
+ $639001ec689e223b$exports = JSON.parse("{\"longPressMessage\":\"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\"}");
132
+
133
+
134
+ var $37090bf5b661009a$exports = {};
135
+ $37090bf5b661009a$exports = JSON.parse("{\"longPressMessage\":\"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn\"}");
136
+
137
+
138
+ var $4ca70371ce142708$exports = {};
139
+ $4ca70371ce142708$exports = JSON.parse("{\"longPressMessage\":\"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\"}");
140
+
141
+
142
+ var $772cc5075c4120ad$exports = {};
143
+ $772cc5075c4120ad$exports = JSON.parse("{\"longPressMessage\":\"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\"}");
144
+
145
+
146
+ var $a280148193f17e0f$exports = {};
147
+ $a280148193f17e0f$exports = JSON.parse("{\"longPressMessage\":\"长按或按 Alt + 向下方向键以打开菜单\"}");
148
+
149
+
150
+ var $08dca4706d9e39f3$exports = {};
151
+ $08dca4706d9e39f3$exports = JSON.parse("{\"longPressMessage\":\"長按或按 Alt+向下鍵以開啟功能表\"}");
152
+
153
+
154
+ $96dc1c2244700b52$exports = {
155
+ "ar-AE": $1a8690630e322ec6$exports,
156
+ "bg-BG": $fc3ddb23f24e2eea$exports,
157
+ "cs-CZ": $eb1dc9b603d71109$exports,
158
+ "da-DK": $2d95ec734354bc1d$exports,
159
+ "de-DE": $e5cd075746034abd$exports,
160
+ "el-GR": $74fe177ce68f16a7$exports,
161
+ "en-US": $a59d721fbb9df903$exports,
162
+ "es-ES": $617e1630a7dd16ea$exports,
163
+ "et-EE": $3218d8c72495e96b$exports,
164
+ "fi-FI": $f2f412c97ede0995$exports,
165
+ "fr-FR": $7640150678ab200d$exports,
166
+ "he-IL": $84c642b6d2ee0f06$exports,
167
+ "hr-HR": $57727cf256b928dd$exports,
168
+ "hu-HU": $05114af5675ffd82$exports,
169
+ "it-IT": $38a13f141610baa6$exports,
170
+ "ja-JP": $02ea00ed085de6ca$exports,
171
+ "ko-KR": $220ff1248b85a717$exports,
172
+ "lt-LT": $bf5ad8f2c050e288$exports,
173
+ "lv-LV": $f3bc8e284003309a$exports,
174
+ "nb-NO": $7cb4a85cce2978c1$exports,
175
+ "nl-NL": $4bbc2c2d2f167f68$exports,
176
+ "pl-PL": $ed008113cc0b674e$exports,
177
+ "pt-BR": $62bfb2a2daab045d$exports,
178
+ "pt-PT": $856d8cc1d19b4c06$exports,
179
+ "ro-RO": $a46dcfaf580fda03$exports,
180
+ "ru-RU": $d919ca79cce015eb$exports,
181
+ "sk-SK": $dcee2f03ab5d79f4$exports,
182
+ "sl-SI": $ec308c4d4a31d7ef$exports,
183
+ "sr-SP": $639001ec689e223b$exports,
184
+ "sv-SE": $37090bf5b661009a$exports,
185
+ "tr-TR": $4ca70371ce142708$exports,
186
+ "uk-UA": $772cc5075c4120ad$exports,
187
+ "zh-CN": $a280148193f17e0f$exports,
188
+ "zh-TW": $08dca4706d9e39f3$exports
24
189
  };
25
190
 
26
191
 
@@ -28,10 +193,10 @@ $21f97af299284af0$exports = {
28
193
 
29
194
 
30
195
 
31
- function $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49(props, state, ref) {
196
+ function $235cea8b956832d5$export$dc9c12ed27dd1b49(props, state, ref) {
32
197
  let { type: type = 'menu' , isDisabled: isDisabled , trigger: trigger = 'press' } = props;
33
- let menuTriggerId = $d6bQb$useId();
34
- let { triggerProps: triggerProps , overlayProps: overlayProps } = $d6bQb$useOverlayTrigger({
198
+ let menuTriggerId = $lVGRk$useId();
199
+ let { triggerProps: triggerProps , overlayProps: overlayProps } = $lVGRk$useOverlayTrigger({
35
200
  type: type
36
201
  }, state, ref);
37
202
  let onKeyDown = (e)=>{
@@ -55,8 +220,8 @@ function $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49(props, state, ref) {
55
220
  break;
56
221
  }
57
222
  };
58
- let formatMessage = $d6bQb$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($21f97af299284af0$exports)));
59
- let { longPressProps: longPressProps } = $d6bQb$useLongPress({
223
+ let formatMessage = $lVGRk$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($96dc1c2244700b52$exports)));
224
+ let { longPressProps: longPressProps } = $lVGRk$useLongPress({
60
225
  accessibilityDescription: formatMessage('longPressMessage'),
61
226
  onLongPressStart () {
62
227
  state.close();
@@ -76,7 +241,7 @@ function $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49(props, state, ref) {
76
241
  if (e.pointerType === 'touch' && !isDisabled) state.toggle();
77
242
  }
78
243
  };
79
- triggerProps = $d6bQb$mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);
244
+ triggerProps = $lVGRk$mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);
80
245
  return {
81
246
  menuTriggerProps: {
82
247
  ...triggerProps,
@@ -91,18 +256,18 @@ function $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49(props, state, ref) {
91
256
  }
92
257
 
93
258
 
94
- var $c227569f61491ba9$exports = {};
259
+ var $9e81e1e13d86f3bd$exports = {};
95
260
 
96
- $parcel$export($c227569f61491ba9$exports, "useMenu", () => $c227569f61491ba9$export$38eaa17faae8f579);
261
+ $parcel$export($9e81e1e13d86f3bd$exports, "useMenu", () => $9e81e1e13d86f3bd$export$38eaa17faae8f579);
97
262
 
98
263
 
99
- function $c227569f61491ba9$export$38eaa17faae8f579(props, state, ref) {
264
+ function $9e81e1e13d86f3bd$export$38eaa17faae8f579(props, state, ref) {
100
265
  let { shouldFocusWrap: shouldFocusWrap = true , ...otherProps } = props;
101
266
  if (!props['aria-label'] && !props['aria-labelledby']) console.warn('An aria-label or aria-labelledby prop is required for accessibility.');
102
- let domProps = $d6bQb$filterDOMProps(props, {
267
+ let domProps = $lVGRk$filterDOMProps(props, {
103
268
  labelable: true
104
269
  });
105
- let { listProps: listProps } = $d6bQb$useSelectableList({
270
+ let { listProps: listProps } = $lVGRk$useSelectableList({
106
271
  ...otherProps,
107
272
  ref: ref,
108
273
  selectionManager: state.selectionManager,
@@ -111,7 +276,7 @@ function $c227569f61491ba9$export$38eaa17faae8f579(props, state, ref) {
111
276
  shouldFocusWrap: shouldFocusWrap
112
277
  });
113
278
  return {
114
- menuProps: $d6bQb$mergeProps(domProps, {
279
+ menuProps: $lVGRk$mergeProps(domProps, {
115
280
  role: 'menu',
116
281
  ...listProps
117
282
  })
@@ -119,21 +284,21 @@ function $c227569f61491ba9$export$38eaa17faae8f579(props, state, ref) {
119
284
  }
120
285
 
121
286
 
122
- var $f9449620c639d150$exports = {};
287
+ var $c5d816999d2ff723$exports = {};
123
288
 
124
- $parcel$export($f9449620c639d150$exports, "useMenuItem", () => $f9449620c639d150$export$9d32628fc2aea7da);
289
+ $parcel$export($c5d816999d2ff723$exports, "useMenuItem", () => $c5d816999d2ff723$export$9d32628fc2aea7da);
125
290
 
126
291
 
127
292
 
128
293
 
129
- function $f9449620c639d150$export$9d32628fc2aea7da(props, state, ref) {
294
+ function $c5d816999d2ff723$export$9d32628fc2aea7da(props, state, ref) {
130
295
  let { isSelected: isSelected , isDisabled: isDisabled , key: key , onClose: onClose , closeOnSelect: closeOnSelect , isVirtualized: isVirtualized , onAction: onAction } = props;
131
296
  let role = 'menuitem';
132
297
  if (state.selectionManager.selectionMode === 'single') role = 'menuitemradio';
133
298
  else if (state.selectionManager.selectionMode === 'multiple') role = 'menuitemcheckbox';
134
- let labelId = $d6bQb$useSlotId();
135
- let descriptionId = $d6bQb$useSlotId();
136
- let keyboardId = $d6bQb$useSlotId();
299
+ let labelId = $lVGRk$useSlotId();
300
+ let descriptionId = $lVGRk$useSlotId();
301
+ let keyboardId = $lVGRk$useSlotId();
137
302
  let ariaProps = {
138
303
  'aria-disabled': isDisabled,
139
304
  role: role,
@@ -147,7 +312,7 @@ function $f9449620c639d150$export$9d32628fc2aea7da(props, state, ref) {
147
312
  if (state.selectionManager.selectionMode !== 'none') ariaProps['aria-checked'] = isSelected;
148
313
  if (isVirtualized) {
149
314
  ariaProps['aria-posinset'] = state.collection.getItem(key).index;
150
- ariaProps['aria-setsize'] = $d6bQb$getItemCount(state.collection);
315
+ ariaProps['aria-setsize'] = $lVGRk$getItemCount(state.collection);
151
316
  }
152
317
  let onKeyDown = (e)=>{
153
318
  // Ignore repeating events, which may have started on the menu trigger before moving
@@ -171,24 +336,24 @@ function $f9449620c639d150$export$9d32628fc2aea7da(props, state, ref) {
171
336
  if (onAction) onAction(key);
172
337
  // Pressing a menu item should close by default in single selection mode but not multiple
173
338
  // selection mode, except if overridden by the closeOnSelect prop.
174
- if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) onClose();
339
+ if (onClose && (closeOnSelect !== null && closeOnSelect !== void 0 ? closeOnSelect : state.selectionManager.selectionMode !== 'multiple')) onClose();
175
340
  }
176
341
  };
177
- let { itemProps: itemProps } = $d6bQb$useSelectableItem({
342
+ let { itemProps: itemProps } = $lVGRk$useSelectableItem({
178
343
  selectionManager: state.selectionManager,
179
344
  key: key,
180
345
  ref: ref,
181
346
  shouldSelectOnPressUp: true
182
347
  });
183
- let { pressProps: pressProps } = $d6bQb$usePress({
348
+ let { pressProps: pressProps } = $lVGRk$usePress({
184
349
  onPressStart: onPressStart,
185
350
  onPressUp: onPressUp,
186
351
  isDisabled: isDisabled
187
352
  });
188
- let { hoverProps: hoverProps } = $d6bQb$useHover({
353
+ let { hoverProps: hoverProps } = $lVGRk$useHover({
189
354
  isDisabled: isDisabled,
190
355
  onHoverStart () {
191
- if (!$d6bQb$isFocusVisible()) {
356
+ if (!$lVGRk$isFocusVisible()) {
192
357
  state.selectionManager.setFocused(true);
193
358
  state.selectionManager.setFocusedKey(key);
194
359
  }
@@ -197,7 +362,7 @@ function $f9449620c639d150$export$9d32628fc2aea7da(props, state, ref) {
197
362
  return {
198
363
  menuItemProps: {
199
364
  ...ariaProps,
200
- ...$d6bQb$mergeProps(itemProps, pressProps, hoverProps, {
365
+ ...$lVGRk$mergeProps(itemProps, pressProps, hoverProps, {
201
366
  onKeyDown: onKeyDown
202
367
  })
203
368
  },
@@ -214,13 +379,13 @@ function $f9449620c639d150$export$9d32628fc2aea7da(props, state, ref) {
214
379
  }
215
380
 
216
381
 
217
- var $eb7748cf1d7e6885$exports = {};
382
+ var $2e6444d9033828ce$exports = {};
218
383
 
219
- $parcel$export($eb7748cf1d7e6885$exports, "useMenuSection", () => $eb7748cf1d7e6885$export$73f7a44322579622);
384
+ $parcel$export($2e6444d9033828ce$exports, "useMenuSection", () => $2e6444d9033828ce$export$73f7a44322579622);
220
385
 
221
- function $eb7748cf1d7e6885$export$73f7a44322579622(props) {
386
+ function $2e6444d9033828ce$export$73f7a44322579622(props) {
222
387
  let { heading: heading , 'aria-label': ariaLabel } = props;
223
- let headingId = $d6bQb$useId();
388
+ let headingId = $lVGRk$useId();
224
389
  return {
225
390
  itemProps: {
226
391
  role: 'presentation'
@@ -244,5 +409,5 @@ function $eb7748cf1d7e6885$export$73f7a44322579622(props) {
244
409
 
245
410
 
246
411
 
247
- export {$f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49 as useMenuTrigger, $c227569f61491ba9$export$38eaa17faae8f579 as useMenu, $f9449620c639d150$export$9d32628fc2aea7da as useMenuItem, $eb7748cf1d7e6885$export$73f7a44322579622 as useMenuSection};
412
+ export {$235cea8b956832d5$export$dc9c12ed27dd1b49 as useMenuTrigger, $9e81e1e13d86f3bd$export$38eaa17faae8f579 as useMenu, $c5d816999d2ff723$export$9d32628fc2aea7da as useMenuItem, $2e6444d9033828ce$export$73f7a44322579622 as useMenuSection};
248
413
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AGAA,yBAAc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,KAAK;IAC9C,GAAG,CAAC,SAAS,GAAG,YAAK;IAErB,MAAM,CAAC,CAAC;QACN,SAAS,EAAE,CAAC;YACV,IAAI,EAAE,CAAc;QACtB,CAAC;QACD,YAAY,EAAE,OAAO,GAAG,CAAC;YACvB,EAAgE,AAAhE,8DAAgE;YAChE,EAAiE,AAAjE,+DAAiE;YACjE,EAAmC,AAAnC,iCAAmC;YACnC,EAAE,EAAE,SAAS;YACb,CAAa,cAAE,IAAI;QACrB,CAAC,GAAG,CAAC;QAAA,CAAC;QACN,UAAU,EAAE,CAAC;YACX,IAAI,EAAE,CAAO;YACb,CAAY,aAAE,SAAS;YACvB,CAAiB,kBAAE,OAAO,GAAG,SAAS,GAAG,SAAS;QACpD,CAAC;IACH,CAAC;AACH,CAAC;;","sources":["packages/@react-aria/menu/src/index.ts","packages/@react-aria/menu/src/useMenuTrigger.ts","packages/@react-aria/menu/intl/*.js","packages/@react-aria/menu/intl/en-US.json","packages/@react-aria/menu/src/useMenu.ts","packages/@react-aria/menu/src/useMenuItem.ts","packages/@react-aria/menu/src/useMenuSection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './useMenuTrigger';\nexport * from './useMenu';\nexport * from './useMenuItem';\nexport * from './useMenuSection';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MenuTriggerState} from '@react-stately/menu';\nimport {MenuTriggerType} from '@react-types/menu';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport {useLongPress} from '@react-aria/interactions';\nimport {useMessageFormatter} from '@react-aria/i18n';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\ninterface MenuTriggerAriaProps {\n /** The type of menu that the menu trigger opens. */\n type?: 'menu' | 'listbox',\n /** Whether menu trigger is disabled. */\n isDisabled?: boolean,\n /** How menu is triggered. */\n trigger?: MenuTriggerType\n}\n\ninterface MenuTriggerAria {\n /** Props for the menu trigger element. */\n menuTriggerProps: AriaButtonProps,\n\n /** Props for the menu. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu trigger.\n * @param props - Props for the menu trigger.\n * @param state - State for the menu trigger.\n */\nexport function useMenuTrigger(props: MenuTriggerAriaProps, state: MenuTriggerState, ref: RefObject<HTMLElement>): MenuTriggerAria {\n let {\n type = 'menu' as MenuTriggerAriaProps['type'],\n isDisabled,\n trigger = 'press'\n } = props;\n\n let menuTriggerId = useId();\n let {triggerProps, overlayProps} = useOverlayTrigger({type}, state, ref);\n\n let onKeyDown = (e) => {\n if (isDisabled) {\n return;\n }\n\n if (trigger === 'longPress' && !e.altKey) {\n return;\n }\n\n if (ref && ref.current) {\n switch (e.key) {\n case 'Enter':\n case ' ':\n if (trigger === 'longPress') {\n return;\n }\n // fallthrough\n case 'ArrowDown':\n // Stop propagation, unless it would already be handled by useKeyboard.\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('first');\n break;\n case 'ArrowUp':\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('last');\n break;\n }\n }\n };\n\n let formatMessage = useMessageFormatter(intlMessages);\n let {longPressProps} = useLongPress({\n accessibilityDescription: formatMessage('longPressMessage'),\n onLongPressStart() {\n state.close();\n },\n onLongPress() {\n state.open('first');\n }\n });\n\n let pressProps = {\n onPressStart(e) {\n // For consistency with native, open the menu on mouse/key down, but touch up.\n if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {\n // If opened with a screen reader, auto focus the first item.\n // Otherwise, the menu itself will be focused.\n state.toggle(e.pointerType === 'virtual' ? 'first' : null);\n }\n },\n onPress(e) {\n if (e.pointerType === 'touch' && !isDisabled) {\n state.toggle();\n }\n }\n };\n\n triggerProps = mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);\n\n return {\n menuTriggerProps: {\n ...triggerProps,\n id: menuTriggerId,\n onKeyDown\n },\n menuProps: {\n ...overlayProps,\n 'aria-labelledby': menuTriggerId\n }\n };\n}\n","const _temp0 = require(\"./en-US.json\");\nmodule.exports = {\n \"en-US\": _temp0\n}","{\n \"longPressMessage\": \"Long press or press Alt + ArrowDown to open menu\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaMenuProps} from '@react-types/menu';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {KeyboardDelegate} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableList} from '@react-aria/selection';\n\ninterface MenuAria {\n /** Props for the menu element. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuOptions<T> extends AriaMenuProps<T> {\n /** Whether the menu uses virtual scrolling. */\n isVirtualized?: boolean,\n\n /**\n * An optional keyboard delegate implementation for type to select,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu component.\n * A menu displays a list of actions or options that a user can choose.\n * @param props - Props for the menu.\n * @param state - State for the menu, as returned by `useListState`.\n */\nexport function useMenu<T>(props: AriaMenuOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuAria {\n let {\n shouldFocusWrap = true,\n ...otherProps\n } = props;\n\n if (!props['aria-label'] && !props['aria-labelledby']) {\n console.warn('An aria-label or aria-labelledby prop is required for accessibility.');\n }\n\n let domProps = filterDOMProps(props, {labelable: true});\n let {listProps} = useSelectableList({\n ...otherProps,\n ref,\n selectionManager: state.selectionManager,\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n shouldFocusWrap\n });\n\n return {\n menuProps: mergeProps(domProps, {\n role: 'menu',\n ...listProps\n })\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getItemCount} from '@react-stately/collections';\nimport {HTMLAttributes, Key, RefObject} from 'react';\nimport {isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\nimport {PressEvent} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableItem} from '@react-aria/selection';\n\ninterface MenuItemAria {\n /** Props for the menu item element. */\n menuItemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the main text element inside the menu item. */\n labelProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the description text element inside the menu item, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the keyboard shortcut text element inside the item, if any. */\n keyboardShortcutProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuItemProps {\n /** Whether the menu item is disabled. */\n isDisabled?: boolean,\n\n /** Whether the menu item is selected. */\n isSelected?: boolean,\n\n /** A screen reader only label for the menu item. */\n 'aria-label'?: string,\n\n /** The unique key for the menu item. */\n key?: Key,\n\n /** Handler that is called when the menu should close after selecting an item. */\n onClose?: () => void,\n\n /**\n * Whether the menu should close when the menu item is selected.\n * @default true\n */\n closeOnSelect?: boolean,\n\n /** Whether the menu item is contained in a virtual scrolling menu. */\n isVirtualized?: boolean,\n\n /** Handler that is called when the user activates the item. */\n onAction?: (key: Key) => void\n}\n\n/**\n * Provides the behavior and accessibility implementation for an item in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the item.\n * @param state - State for the menu, as returned by `useTreeState`.\n */\nexport function useMenuItem<T>(props: AriaMenuItemProps, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuItemAria {\n let {\n isSelected,\n isDisabled,\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n } = props;\n\n let role = 'menuitem';\n if (state.selectionManager.selectionMode === 'single') {\n role = 'menuitemradio';\n } else if (state.selectionManager.selectionMode === 'multiple') {\n role = 'menuitemcheckbox';\n }\n\n let labelId = useSlotId();\n let descriptionId = useSlotId();\n let keyboardId = useSlotId();\n\n let ariaProps = {\n 'aria-disabled': isDisabled,\n role,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': labelId,\n 'aria-describedby': [descriptionId, keyboardId].filter(Boolean).join(' ') || undefined\n };\n\n if (state.selectionManager.selectionMode !== 'none') {\n ariaProps['aria-checked'] = isSelected;\n }\n\n if (isVirtualized) {\n ariaProps['aria-posinset'] = state.collection.getItem(key).index;\n ariaProps['aria-setsize'] = getItemCount(state.collection);\n }\n\n let onKeyDown = (e: KeyboardEvent) => {\n // Ignore repeating events, which may have started on the menu trigger before moving\n // focus to the menu item. We want to wait for a second complete key press sequence.\n if (e.repeat) {\n return;\n }\n\n switch (e.key) {\n case ' ':\n if (!isDisabled && state.selectionManager.selectionMode === 'none' && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n case 'Enter':\n // The Enter key should always close on select, except if overridden.\n if (!isDisabled && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n }\n };\n\n let onPressStart = (e: PressEvent) => {\n if (e.pointerType === 'keyboard' && onAction) {\n onAction(key);\n }\n };\n\n let onPressUp = (e: PressEvent) => {\n if (e.pointerType !== 'keyboard') {\n if (onAction) {\n onAction(key);\n }\n\n // Pressing a menu item should close by default in single selection mode but not multiple\n // selection mode, except if overridden by the closeOnSelect prop.\n if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) {\n onClose();\n }\n }\n };\n\n let {itemProps} = useSelectableItem({\n selectionManager: state.selectionManager,\n key,\n ref,\n shouldSelectOnPressUp: true\n });\n\n let {pressProps} = usePress({onPressStart, onPressUp, isDisabled});\n let {hoverProps} = useHover({\n isDisabled,\n onHoverStart() {\n if (!isFocusVisible()) {\n state.selectionManager.setFocused(true);\n state.selectionManager.setFocusedKey(key);\n }\n }\n });\n\n return {\n menuItemProps: {\n ...ariaProps,\n ...mergeProps(itemProps, pressProps, hoverProps, {onKeyDown})\n },\n labelProps: {\n id: labelId\n },\n descriptionProps: {\n id: descriptionId\n },\n keyboardShortcutProps: {\n id: keyboardId\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, ReactNode} from 'react';\nimport {useId} from '@react-aria/utils';\n\ninterface AriaMenuSectionProps {\n /** The heading for the section. */\n heading?: ReactNode,\n /** An accessibility label for the section. Required if `heading` is not present. */\n 'aria-label'?: string\n}\n\ninterface MenuSectionAria {\n /** Props for the wrapper list item. */\n itemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the heading element, if any. */\n headingProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the group element. */\n groupProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the section.\n */\nexport function useMenuSection(props: AriaMenuSectionProps): MenuSectionAria {\n let {heading, 'aria-label': ariaLabel} = props;\n let headingId = useId();\n\n return {\n itemProps: {\n role: 'presentation'\n },\n headingProps: heading ? {\n // Techincally, menus cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, and only use it\n // as a label for the nested group.\n id: headingId,\n 'aria-hidden': true\n } : {},\n groupProps: {\n role: 'group',\n 'aria-label': ariaLabel,\n 'aria-labelledby': heading ? headingId : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AGAA,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAmF;;;;ACA/G,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAA6G;;;;ACAzI,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAqG;;;;ACAjI,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAsF;;;;ACAlH,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAuG;;;;ACAnI,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAoG;;;;ACAhI,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAA6E;;;;ACAzG,yBAAc,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AhE,8DAAgE;YAChE,EAAiE,AAAjE,+DAAiE;YACjE,EAAmC,AAAnC,iCAAmC;YACnC,EAAE,EAAE,SAAS;YACb,CAAa,cAAE,IAAI;QACrB,CAAC,GAAG,CAAC;QAAA,CAAC;QACN,UAAU,EAAE,CAAC;YACX,IAAI,EAAE,CAAO;YACb,CAAY,aAAE,SAAS;YACvB,CAAiB,kBAAE,OAAO,GAAG,SAAS,GAAG,SAAS;QACpD,CAAC;IACH,CAAC;AACH,CAAC;;","sources":["packages/@react-aria/menu/src/index.ts","packages/@react-aria/menu/src/useMenuTrigger.ts","packages/@react-aria/menu/intl/*.js","packages/@react-aria/menu/intl/ar-AE.json","packages/@react-aria/menu/intl/bg-BG.json","packages/@react-aria/menu/intl/cs-CZ.json","packages/@react-aria/menu/intl/da-DK.json","packages/@react-aria/menu/intl/de-DE.json","packages/@react-aria/menu/intl/el-GR.json","packages/@react-aria/menu/intl/en-US.json","packages/@react-aria/menu/intl/es-ES.json","packages/@react-aria/menu/intl/et-EE.json","packages/@react-aria/menu/intl/fi-FI.json","packages/@react-aria/menu/intl/fr-FR.json","packages/@react-aria/menu/intl/he-IL.json","packages/@react-aria/menu/intl/hr-HR.json","packages/@react-aria/menu/intl/hu-HU.json","packages/@react-aria/menu/intl/it-IT.json","packages/@react-aria/menu/intl/ja-JP.json","packages/@react-aria/menu/intl/ko-KR.json","packages/@react-aria/menu/intl/lt-LT.json","packages/@react-aria/menu/intl/lv-LV.json","packages/@react-aria/menu/intl/nb-NO.json","packages/@react-aria/menu/intl/nl-NL.json","packages/@react-aria/menu/intl/pl-PL.json","packages/@react-aria/menu/intl/pt-BR.json","packages/@react-aria/menu/intl/pt-PT.json","packages/@react-aria/menu/intl/ro-RO.json","packages/@react-aria/menu/intl/ru-RU.json","packages/@react-aria/menu/intl/sk-SK.json","packages/@react-aria/menu/intl/sl-SI.json","packages/@react-aria/menu/intl/sr-SP.json","packages/@react-aria/menu/intl/sv-SE.json","packages/@react-aria/menu/intl/tr-TR.json","packages/@react-aria/menu/intl/uk-UA.json","packages/@react-aria/menu/intl/zh-CN.json","packages/@react-aria/menu/intl/zh-TW.json","packages/@react-aria/menu/src/useMenu.ts","packages/@react-aria/menu/src/useMenuItem.ts","packages/@react-aria/menu/src/useMenuSection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './useMenuTrigger';\nexport * from './useMenu';\nexport * from './useMenuItem';\nexport * from './useMenuSection';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MenuTriggerState} from '@react-stately/menu';\nimport {MenuTriggerType} from '@react-types/menu';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport {useLongPress} from '@react-aria/interactions';\nimport {useMessageFormatter} from '@react-aria/i18n';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\ninterface MenuTriggerAriaProps {\n /** The type of menu that the menu trigger opens. */\n type?: 'menu' | 'listbox',\n /** Whether menu trigger is disabled. */\n isDisabled?: boolean,\n /** How menu is triggered. */\n trigger?: MenuTriggerType\n}\n\ninterface MenuTriggerAria {\n /** Props for the menu trigger element. */\n menuTriggerProps: AriaButtonProps,\n\n /** Props for the menu. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu trigger.\n * @param props - Props for the menu trigger.\n * @param state - State for the menu trigger.\n */\nexport function useMenuTrigger(props: MenuTriggerAriaProps, state: MenuTriggerState, ref: RefObject<HTMLElement>): MenuTriggerAria {\n let {\n type = 'menu' as MenuTriggerAriaProps['type'],\n isDisabled,\n trigger = 'press'\n } = props;\n\n let menuTriggerId = useId();\n let {triggerProps, overlayProps} = useOverlayTrigger({type}, state, ref);\n\n let onKeyDown = (e) => {\n if (isDisabled) {\n return;\n }\n\n if (trigger === 'longPress' && !e.altKey) {\n return;\n }\n\n if (ref && ref.current) {\n switch (e.key) {\n case 'Enter':\n case ' ':\n if (trigger === 'longPress') {\n return;\n }\n // fallthrough\n case 'ArrowDown':\n // Stop propagation, unless it would already be handled by useKeyboard.\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('first');\n break;\n case 'ArrowUp':\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('last');\n break;\n }\n }\n };\n\n let formatMessage = useMessageFormatter(intlMessages);\n let {longPressProps} = useLongPress({\n accessibilityDescription: formatMessage('longPressMessage'),\n onLongPressStart() {\n state.close();\n },\n onLongPress() {\n state.open('first');\n }\n });\n\n let pressProps = {\n onPressStart(e) {\n // For consistency with native, open the menu on mouse/key down, but touch up.\n if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {\n // If opened with a screen reader, auto focus the first item.\n // Otherwise, the menu itself will be focused.\n state.toggle(e.pointerType === 'virtual' ? 'first' : null);\n }\n },\n onPress(e) {\n if (e.pointerType === 'touch' && !isDisabled) {\n state.toggle();\n }\n }\n };\n\n triggerProps = mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);\n\n return {\n menuTriggerProps: {\n ...triggerProps,\n id: menuTriggerId,\n onKeyDown\n },\n menuProps: {\n ...overlayProps,\n 'aria-labelledby': menuTriggerId\n }\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"longPressMessage\": \"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة\"\n}\n","{\n \"longPressMessage\": \"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\"\n}\n","{\n \"longPressMessage\": \"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku\"\n}\n","{\n \"longPressMessage\": \"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"\n}\n","{\n \"longPressMessage\": \"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen\"\n}\n","{\n \"longPressMessage\": \"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"\n}\n","{\n \"longPressMessage\": \"Long press or press Alt + ArrowDown to open menu\"\n}\n","{\n \"longPressMessage\": \"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\"\n}\n","{\n \"longPressMessage\": \"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\"\n}\n","{\n \"longPressMessage\": \"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"\n}\n","{\n \"longPressMessage\": \"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.\"\n}\n","{\n \"longPressMessage\": \"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\"\n}\n","{\n \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"\n}\n","{\n \"longPressMessage\": \"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához\"\n}\n","{\n \"longPressMessage\": \"Premere a lungo o premere Alt + Freccia giù per aprire il menu\"\n}\n","{\n \"longPressMessage\": \"長押しまたは Alt+下矢印キーでメニューを開く\"\n}\n","{\n \"longPressMessage\": \"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\"\n}\n","{\n \"longPressMessage\": \"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\"\n}\n","{\n \"longPressMessage\": \"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa\"\n}\n","{\n \"longPressMessage\": \"Langt trykk eller trykk Alt + PilNed for å åpne menyen\"\n}\n","{\n \"longPressMessage\": \"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\"\n}\n","{\n \"longPressMessage\": \"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\"\n}\n","{\n \"longPressMessage\": \"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\"\n}\n","{\n \"longPressMessage\": \"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\"\n}\n","{\n \"longPressMessage\": \"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul\"\n}\n","{\n \"longPressMessage\": \"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\"\n}\n","{\n \"longPressMessage\": \"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol\"\n}\n","{\n \"longPressMessage\": \"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\"\n}\n","{\n \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\"\n}\n","{\n \"longPressMessage\": \"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn\"\n}\n","{\n \"longPressMessage\": \"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\"\n}\n","{\n \"longPressMessage\": \"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\"\n}\n","{\n \"longPressMessage\": \"长按或按 Alt + 向下方向键以打开菜单\"\n}\n","{\n \"longPressMessage\": \"長按或按 Alt+向下鍵以開啟功能表\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaMenuProps} from '@react-types/menu';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {KeyboardDelegate} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableList} from '@react-aria/selection';\n\ninterface MenuAria {\n /** Props for the menu element. */\n menuProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuOptions<T> extends AriaMenuProps<T> {\n /** Whether the menu uses virtual scrolling. */\n isVirtualized?: boolean,\n\n /**\n * An optional keyboard delegate implementation for type to select,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu component.\n * A menu displays a list of actions or options that a user can choose.\n * @param props - Props for the menu.\n * @param state - State for the menu, as returned by `useListState`.\n */\nexport function useMenu<T>(props: AriaMenuOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuAria {\n let {\n shouldFocusWrap = true,\n ...otherProps\n } = props;\n\n if (!props['aria-label'] && !props['aria-labelledby']) {\n console.warn('An aria-label or aria-labelledby prop is required for accessibility.');\n }\n\n let domProps = filterDOMProps(props, {labelable: true});\n let {listProps} = useSelectableList({\n ...otherProps,\n ref,\n selectionManager: state.selectionManager,\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n shouldFocusWrap\n });\n\n return {\n menuProps: mergeProps(domProps, {\n role: 'menu',\n ...listProps\n })\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getItemCount} from '@react-stately/collections';\nimport {HTMLAttributes, Key, RefObject} from 'react';\nimport {isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\nimport {PressEvent} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableItem} from '@react-aria/selection';\n\ninterface MenuItemAria {\n /** Props for the menu item element. */\n menuItemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the main text element inside the menu item. */\n labelProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the description text element inside the menu item, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the keyboard shortcut text element inside the item, if any. */\n keyboardShortcutProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuItemProps {\n /** Whether the menu item is disabled. */\n isDisabled?: boolean,\n\n /** Whether the menu item is selected. */\n isSelected?: boolean,\n\n /** A screen reader only label for the menu item. */\n 'aria-label'?: string,\n\n /** The unique key for the menu item. */\n key?: Key,\n\n /** Handler that is called when the menu should close after selecting an item. */\n onClose?: () => void,\n\n /**\n * Whether the menu should close when the menu item is selected.\n * @default true\n */\n closeOnSelect?: boolean,\n\n /** Whether the menu item is contained in a virtual scrolling menu. */\n isVirtualized?: boolean,\n\n /** Handler that is called when the user activates the item. */\n onAction?: (key: Key) => void\n}\n\n/**\n * Provides the behavior and accessibility implementation for an item in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the item.\n * @param state - State for the menu, as returned by `useTreeState`.\n */\nexport function useMenuItem<T>(props: AriaMenuItemProps, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuItemAria {\n let {\n isSelected,\n isDisabled,\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n } = props;\n\n let role = 'menuitem';\n if (state.selectionManager.selectionMode === 'single') {\n role = 'menuitemradio';\n } else if (state.selectionManager.selectionMode === 'multiple') {\n role = 'menuitemcheckbox';\n }\n\n let labelId = useSlotId();\n let descriptionId = useSlotId();\n let keyboardId = useSlotId();\n\n let ariaProps = {\n 'aria-disabled': isDisabled,\n role,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': labelId,\n 'aria-describedby': [descriptionId, keyboardId].filter(Boolean).join(' ') || undefined\n };\n\n if (state.selectionManager.selectionMode !== 'none') {\n ariaProps['aria-checked'] = isSelected;\n }\n\n if (isVirtualized) {\n ariaProps['aria-posinset'] = state.collection.getItem(key).index;\n ariaProps['aria-setsize'] = getItemCount(state.collection);\n }\n\n let onKeyDown = (e: KeyboardEvent) => {\n // Ignore repeating events, which may have started on the menu trigger before moving\n // focus to the menu item. We want to wait for a second complete key press sequence.\n if (e.repeat) {\n return;\n }\n\n switch (e.key) {\n case ' ':\n if (!isDisabled && state.selectionManager.selectionMode === 'none' && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n case 'Enter':\n // The Enter key should always close on select, except if overridden.\n if (!isDisabled && closeOnSelect !== false && onClose) {\n onClose();\n }\n break;\n }\n };\n\n let onPressStart = (e: PressEvent) => {\n if (e.pointerType === 'keyboard' && onAction) {\n onAction(key);\n }\n };\n\n let onPressUp = (e: PressEvent) => {\n if (e.pointerType !== 'keyboard') {\n if (onAction) {\n onAction(key);\n }\n\n // Pressing a menu item should close by default in single selection mode but not multiple\n // selection mode, except if overridden by the closeOnSelect prop.\n if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) {\n onClose();\n }\n }\n };\n\n let {itemProps} = useSelectableItem({\n selectionManager: state.selectionManager,\n key,\n ref,\n shouldSelectOnPressUp: true\n });\n\n let {pressProps} = usePress({onPressStart, onPressUp, isDisabled});\n let {hoverProps} = useHover({\n isDisabled,\n onHoverStart() {\n if (!isFocusVisible()) {\n state.selectionManager.setFocused(true);\n state.selectionManager.setFocusedKey(key);\n }\n }\n });\n\n return {\n menuItemProps: {\n ...ariaProps,\n ...mergeProps(itemProps, pressProps, hoverProps, {onKeyDown})\n },\n labelProps: {\n id: labelId\n },\n descriptionProps: {\n id: descriptionId\n },\n keyboardShortcutProps: {\n id: keyboardId\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, ReactNode} from 'react';\nimport {useId} from '@react-aria/utils';\n\ninterface AriaMenuSectionProps {\n /** The heading for the section. */\n heading?: ReactNode,\n /** An accessibility label for the section. Required if `heading` is not present. */\n 'aria-label'?: string\n}\n\ninterface MenuSectionAria {\n /** Props for the wrapper list item. */\n itemProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the heading element, if any. */\n headingProps: HTMLAttributes<HTMLElement>,\n\n /** Props for the group element. */\n groupProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the section.\n */\nexport function useMenuSection(props: AriaMenuSectionProps): MenuSectionAria {\n let {heading, 'aria-label': ariaLabel} = props;\n let headingId = useId();\n\n return {\n itemProps: {\n role: 'presentation'\n },\n headingProps: heading ? {\n // Techincally, menus cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, and only use it\n // as a label for the nested group.\n id: headingId,\n 'aria-hidden': true\n } : {},\n groupProps: {\n role: 'group',\n 'aria-label': ariaLabel,\n 'aria-labelledby': heading ? headingId : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/menu",
3
- "version": "3.3.1-nightly.3100+da2aa7467",
3
+ "version": "3.4.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,17 +18,17 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-aria/i18n": "3.0.0-nightly.1409+da2aa7467",
22
- "@react-aria/interactions": "3.0.0-nightly.1409+da2aa7467",
23
- "@react-aria/overlays": "3.0.0-nightly.1409+da2aa7467",
24
- "@react-aria/selection": "3.0.0-nightly.1409+da2aa7467",
25
- "@react-aria/utils": "3.0.0-nightly.1409+da2aa7467",
26
- "@react-stately/collections": "3.0.0-nightly.1409+da2aa7467",
27
- "@react-stately/menu": "3.2.4-nightly.3100+da2aa7467",
28
- "@react-stately/tree": "3.0.0-nightly.1409+da2aa7467",
29
- "@react-types/button": "3.4.2-nightly.3100+da2aa7467",
30
- "@react-types/menu": "3.4.2-nightly.3100+da2aa7467",
31
- "@react-types/shared": "3.0.0-nightly.1409+da2aa7467"
21
+ "@react-aria/i18n": "^3.3.6",
22
+ "@react-aria/interactions": "^3.8.1",
23
+ "@react-aria/overlays": "^3.7.5",
24
+ "@react-aria/selection": "^3.7.3",
25
+ "@react-aria/utils": "^3.11.2",
26
+ "@react-stately/collections": "^3.3.6",
27
+ "@react-stately/menu": "^3.2.5",
28
+ "@react-stately/tree": "^3.2.2",
29
+ "@react-types/button": "^3.4.3",
30
+ "@react-types/menu": "^3.5.1",
31
+ "@react-types/shared": "^3.11.1"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^16.8.0 || ^17.0.0-rc.1",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "da2aa74670fbd93335ff01401ca53826b3602777"
40
+ "gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
41
41
  }