@react-aria/menu 3.4.1-nightly.3111 → 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 +145 -145
- package/dist/main.js.map +1 -1
- package/dist/module.js +142 -142
- package/dist/module.js.map +1 -1
- package/package.json +13 -13
package/dist/main.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
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,181 +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 $
|
|
30
|
+
var $6ffbef18191cf50e$exports = {};
|
|
31
31
|
|
|
32
|
-
$parcel$export($
|
|
33
|
-
var $
|
|
34
|
-
var $
|
|
35
|
-
$
|
|
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
|
-
var $
|
|
39
|
-
$
|
|
38
|
+
var $02a818d9662ba841$exports = {};
|
|
39
|
+
$02a818d9662ba841$exports = JSON.parse("{\"longPressMessage\":\"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\"}");
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var $
|
|
43
|
-
$
|
|
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
44
|
|
|
45
45
|
|
|
46
|
-
var $
|
|
47
|
-
$
|
|
46
|
+
var $96cf5b50416c94c5$exports = {};
|
|
47
|
+
$96cf5b50416c94c5$exports = JSON.parse("{\"longPressMessage\":\"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"}");
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var $
|
|
51
|
-
$
|
|
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
52
|
|
|
53
53
|
|
|
54
|
-
var $
|
|
55
|
-
$
|
|
54
|
+
var $84e753c80b498a4a$exports = {};
|
|
55
|
+
$84e753c80b498a4a$exports = JSON.parse("{\"longPressMessage\":\"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"}");
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var $
|
|
59
|
-
$
|
|
58
|
+
var $d20766e7bd7d91d0$exports = {};
|
|
59
|
+
$d20766e7bd7d91d0$exports = JSON.parse("{\"longPressMessage\":\"Long press or press Alt + ArrowDown to open menu\"}");
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var $
|
|
63
|
-
$
|
|
62
|
+
var $2788c42a720bbc5b$exports = {};
|
|
63
|
+
$2788c42a720bbc5b$exports = JSON.parse("{\"longPressMessage\":\"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\"}");
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var $
|
|
67
|
-
$
|
|
66
|
+
var $b4fc98cf53a50302$exports = {};
|
|
67
|
+
$b4fc98cf53a50302$exports = JSON.parse("{\"longPressMessage\":\"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\"}");
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var $
|
|
71
|
-
$
|
|
70
|
+
var $324411c6468e6a44$exports = {};
|
|
71
|
+
$324411c6468e6a44$exports = JSON.parse("{\"longPressMessage\":\"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"}");
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
var $
|
|
75
|
-
$
|
|
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
76
|
|
|
77
77
|
|
|
78
|
-
var $
|
|
79
|
-
$
|
|
78
|
+
var $429b0c5ee31de4c2$exports = {};
|
|
79
|
+
$429b0c5ee31de4c2$exports = JSON.parse("{\"longPressMessage\":\"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\"}");
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var $
|
|
83
|
-
$
|
|
82
|
+
var $c3974ce20cf32325$exports = {};
|
|
83
|
+
$c3974ce20cf32325$exports = JSON.parse("{\"longPressMessage\":\"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"}");
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var $
|
|
87
|
-
$
|
|
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
88
|
|
|
89
89
|
|
|
90
|
-
var $
|
|
91
|
-
$
|
|
90
|
+
var $deb131677e185eda$exports = {};
|
|
91
|
+
$deb131677e185eda$exports = JSON.parse("{\"longPressMessage\":\"Premere a lungo o premere Alt + Freccia giù per aprire il menu\"}");
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
var $
|
|
95
|
-
$
|
|
94
|
+
var $1a672653ee657739$exports = {};
|
|
95
|
+
$1a672653ee657739$exports = JSON.parse("{\"longPressMessage\":\"長押しまたは Alt+下矢印キーでメニューを開く\"}");
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var $
|
|
99
|
-
$
|
|
98
|
+
var $3c2c600cb7cba19b$exports = {};
|
|
99
|
+
$3c2c600cb7cba19b$exports = JSON.parse("{\"longPressMessage\":\"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\"}");
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
var $
|
|
103
|
-
$
|
|
102
|
+
var $1db0f589ec173b45$exports = {};
|
|
103
|
+
$1db0f589ec173b45$exports = JSON.parse("{\"longPressMessage\":\"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\"}");
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
var $
|
|
107
|
-
$
|
|
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
108
|
|
|
109
109
|
|
|
110
|
-
var $
|
|
111
|
-
$
|
|
110
|
+
var $5b30ea9def95deb7$exports = {};
|
|
111
|
+
$5b30ea9def95deb7$exports = JSON.parse("{\"longPressMessage\":\"Langt trykk eller trykk Alt + PilNed for å åpne menyen\"}");
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
var $
|
|
115
|
-
$
|
|
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
116
|
|
|
117
117
|
|
|
118
|
-
var $
|
|
119
|
-
$
|
|
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
120
|
|
|
121
121
|
|
|
122
|
-
var $
|
|
123
|
-
$
|
|
122
|
+
var $7185afda15938c1d$exports = {};
|
|
123
|
+
$7185afda15938c1d$exports = JSON.parse("{\"longPressMessage\":\"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\"}");
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
var $
|
|
127
|
-
$
|
|
126
|
+
var $f5ee82d2d2e387d1$exports = {};
|
|
127
|
+
$f5ee82d2d2e387d1$exports = JSON.parse("{\"longPressMessage\":\"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\"}");
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
var $
|
|
131
|
-
$
|
|
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
132
|
|
|
133
133
|
|
|
134
|
-
var $
|
|
135
|
-
$
|
|
134
|
+
var $bc8566c135ef45e7$exports = {};
|
|
135
|
+
$bc8566c135ef45e7$exports = JSON.parse("{\"longPressMessage\":\"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\"}");
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
var $
|
|
139
|
-
$
|
|
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
140
|
|
|
141
141
|
|
|
142
|
-
var $
|
|
143
|
-
$
|
|
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
144
|
|
|
145
145
|
|
|
146
|
-
var $
|
|
147
|
-
$
|
|
146
|
+
var $98c11fa64e0657cd$exports = {};
|
|
147
|
+
$98c11fa64e0657cd$exports = JSON.parse("{\"longPressMessage\":\"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\"}");
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
var $
|
|
151
|
-
$
|
|
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
152
|
|
|
153
153
|
|
|
154
|
-
var $
|
|
155
|
-
$
|
|
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
156
|
|
|
157
157
|
|
|
158
|
-
var $
|
|
159
|
-
$
|
|
158
|
+
var $ca0c4410f1dbdb12$exports = {};
|
|
159
|
+
$ca0c4410f1dbdb12$exports = JSON.parse("{\"longPressMessage\":\"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\"}");
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
var $
|
|
163
|
-
$
|
|
162
|
+
var $7870da185207c179$exports = {};
|
|
163
|
+
$7870da185207c179$exports = JSON.parse("{\"longPressMessage\":\"长按或按 Alt + 向下方向键以打开菜单\"}");
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
var $
|
|
167
|
-
$
|
|
166
|
+
var $70d49959231766d5$exports = {};
|
|
167
|
+
$70d49959231766d5$exports = JSON.parse("{\"longPressMessage\":\"長按或按 Alt+向下鍵以開啟功能表\"}");
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
$
|
|
171
|
-
"ar-AE": $
|
|
172
|
-
"bg-BG": $
|
|
173
|
-
"cs-CZ": $
|
|
174
|
-
"da-DK": $
|
|
175
|
-
"de-DE": $
|
|
176
|
-
"el-GR": $
|
|
177
|
-
"en-US": $
|
|
178
|
-
"es-ES": $
|
|
179
|
-
"et-EE": $
|
|
180
|
-
"fi-FI": $
|
|
181
|
-
"fr-FR": $
|
|
182
|
-
"he-IL": $
|
|
183
|
-
"hr-HR": $
|
|
184
|
-
"hu-HU": $
|
|
185
|
-
"it-IT": $
|
|
186
|
-
"ja-JP": $
|
|
187
|
-
"ko-KR": $
|
|
188
|
-
"lt-LT": $
|
|
189
|
-
"lv-LV": $
|
|
190
|
-
"nb-NO": $
|
|
191
|
-
"nl-NL": $
|
|
192
|
-
"pl-PL": $
|
|
193
|
-
"pt-BR": $
|
|
194
|
-
"pt-PT": $
|
|
195
|
-
"ro-RO": $
|
|
196
|
-
"ru-RU": $
|
|
197
|
-
"sk-SK": $
|
|
198
|
-
"sl-SI": $
|
|
199
|
-
"sr-SP": $
|
|
200
|
-
"sv-SE": $
|
|
201
|
-
"tr-TR": $
|
|
202
|
-
"uk-UA": $
|
|
203
|
-
"zh-CN": $
|
|
204
|
-
"zh-TW": $
|
|
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
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
|
|
@@ -209,10 +209,10 @@ $1d5711155cdf93a8$exports = {
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
function $
|
|
212
|
+
function $6ffbef18191cf50e$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
213
213
|
let { type: type = 'menu' , isDisabled: isDisabled , trigger: trigger = 'press' } = props;
|
|
214
|
-
let menuTriggerId = $
|
|
215
|
-
let { triggerProps: triggerProps , overlayProps: overlayProps } = $
|
|
214
|
+
let menuTriggerId = $cSfnK$reactariautils.useId();
|
|
215
|
+
let { triggerProps: triggerProps , overlayProps: overlayProps } = $cSfnK$reactariaoverlays.useOverlayTrigger({
|
|
216
216
|
type: type
|
|
217
217
|
}, state, ref);
|
|
218
218
|
let onKeyDown = (e)=>{
|
|
@@ -236,8 +236,8 @@ function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
238
|
};
|
|
239
|
-
let formatMessage = $
|
|
240
|
-
let { longPressProps: longPressProps } = $
|
|
239
|
+
let formatMessage = $cSfnK$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($853781387242d7cb$exports)));
|
|
240
|
+
let { longPressProps: longPressProps } = $cSfnK$reactariainteractions.useLongPress({
|
|
241
241
|
accessibilityDescription: formatMessage('longPressMessage'),
|
|
242
242
|
onLongPressStart () {
|
|
243
243
|
state.close();
|
|
@@ -257,7 +257,7 @@ function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
257
257
|
if (e.pointerType === 'touch' && !isDisabled) state.toggle();
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
|
-
triggerProps = $
|
|
260
|
+
triggerProps = $cSfnK$reactariautils.mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);
|
|
261
261
|
return {
|
|
262
262
|
menuTriggerProps: {
|
|
263
263
|
...triggerProps,
|
|
@@ -272,18 +272,18 @@ function $09e9a80ccce757b5$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
var $
|
|
275
|
+
var $e4bae9a72b1bc2fb$exports = {};
|
|
276
276
|
|
|
277
|
-
$parcel$export($
|
|
277
|
+
$parcel$export($e4bae9a72b1bc2fb$exports, "useMenu", () => $e4bae9a72b1bc2fb$export$38eaa17faae8f579);
|
|
278
278
|
|
|
279
279
|
|
|
280
|
-
function $
|
|
280
|
+
function $e4bae9a72b1bc2fb$export$38eaa17faae8f579(props, state, ref) {
|
|
281
281
|
let { shouldFocusWrap: shouldFocusWrap = true , ...otherProps } = props;
|
|
282
282
|
if (!props['aria-label'] && !props['aria-labelledby']) console.warn('An aria-label or aria-labelledby prop is required for accessibility.');
|
|
283
|
-
let domProps = $
|
|
283
|
+
let domProps = $cSfnK$reactariautils.filterDOMProps(props, {
|
|
284
284
|
labelable: true
|
|
285
285
|
});
|
|
286
|
-
let { listProps: listProps } = $
|
|
286
|
+
let { listProps: listProps } = $cSfnK$reactariaselection.useSelectableList({
|
|
287
287
|
...otherProps,
|
|
288
288
|
ref: ref,
|
|
289
289
|
selectionManager: state.selectionManager,
|
|
@@ -292,7 +292,7 @@ function $c8ded7c3bc67b89f$export$38eaa17faae8f579(props, state, ref) {
|
|
|
292
292
|
shouldFocusWrap: shouldFocusWrap
|
|
293
293
|
});
|
|
294
294
|
return {
|
|
295
|
-
menuProps: $
|
|
295
|
+
menuProps: $cSfnK$reactariautils.mergeProps(domProps, {
|
|
296
296
|
role: 'menu',
|
|
297
297
|
...listProps
|
|
298
298
|
})
|
|
@@ -300,21 +300,21 @@ function $c8ded7c3bc67b89f$export$38eaa17faae8f579(props, state, ref) {
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
|
|
303
|
-
var $
|
|
303
|
+
var $d81c28283babe418$exports = {};
|
|
304
304
|
|
|
305
|
-
$parcel$export($
|
|
305
|
+
$parcel$export($d81c28283babe418$exports, "useMenuItem", () => $d81c28283babe418$export$9d32628fc2aea7da);
|
|
306
306
|
|
|
307
307
|
|
|
308
308
|
|
|
309
309
|
|
|
310
|
-
function $
|
|
310
|
+
function $d81c28283babe418$export$9d32628fc2aea7da(props, state, ref) {
|
|
311
311
|
let { isSelected: isSelected , isDisabled: isDisabled , key: key , onClose: onClose , closeOnSelect: closeOnSelect , isVirtualized: isVirtualized , onAction: onAction } = props;
|
|
312
312
|
let role = 'menuitem';
|
|
313
313
|
if (state.selectionManager.selectionMode === 'single') role = 'menuitemradio';
|
|
314
314
|
else if (state.selectionManager.selectionMode === 'multiple') role = 'menuitemcheckbox';
|
|
315
|
-
let labelId = $
|
|
316
|
-
let descriptionId = $
|
|
317
|
-
let keyboardId = $
|
|
315
|
+
let labelId = $cSfnK$reactariautils.useSlotId();
|
|
316
|
+
let descriptionId = $cSfnK$reactariautils.useSlotId();
|
|
317
|
+
let keyboardId = $cSfnK$reactariautils.useSlotId();
|
|
318
318
|
let ariaProps = {
|
|
319
319
|
'aria-disabled': isDisabled,
|
|
320
320
|
role: role,
|
|
@@ -328,7 +328,7 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
328
328
|
if (state.selectionManager.selectionMode !== 'none') ariaProps['aria-checked'] = isSelected;
|
|
329
329
|
if (isVirtualized) {
|
|
330
330
|
ariaProps['aria-posinset'] = state.collection.getItem(key).index;
|
|
331
|
-
ariaProps['aria-setsize'] = $
|
|
331
|
+
ariaProps['aria-setsize'] = $cSfnK$reactstatelycollections.getItemCount(state.collection);
|
|
332
332
|
}
|
|
333
333
|
let onKeyDown = (e)=>{
|
|
334
334
|
// Ignore repeating events, which may have started on the menu trigger before moving
|
|
@@ -352,24 +352,24 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
352
352
|
if (onAction) onAction(key);
|
|
353
353
|
// Pressing a menu item should close by default in single selection mode but not multiple
|
|
354
354
|
// selection mode, except if overridden by the closeOnSelect prop.
|
|
355
|
-
if (onClose && (closeOnSelect
|
|
355
|
+
if (onClose && (closeOnSelect !== null && closeOnSelect !== void 0 ? closeOnSelect : state.selectionManager.selectionMode !== 'multiple')) onClose();
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
let { itemProps: itemProps } = $
|
|
358
|
+
let { itemProps: itemProps } = $cSfnK$reactariaselection.useSelectableItem({
|
|
359
359
|
selectionManager: state.selectionManager,
|
|
360
360
|
key: key,
|
|
361
361
|
ref: ref,
|
|
362
362
|
shouldSelectOnPressUp: true
|
|
363
363
|
});
|
|
364
|
-
let { pressProps: pressProps } = $
|
|
364
|
+
let { pressProps: pressProps } = $cSfnK$reactariainteractions.usePress({
|
|
365
365
|
onPressStart: onPressStart,
|
|
366
366
|
onPressUp: onPressUp,
|
|
367
367
|
isDisabled: isDisabled
|
|
368
368
|
});
|
|
369
|
-
let { hoverProps: hoverProps } = $
|
|
369
|
+
let { hoverProps: hoverProps } = $cSfnK$reactariainteractions.useHover({
|
|
370
370
|
isDisabled: isDisabled,
|
|
371
371
|
onHoverStart () {
|
|
372
|
-
if (!$
|
|
372
|
+
if (!$cSfnK$reactariainteractions.isFocusVisible()) {
|
|
373
373
|
state.selectionManager.setFocused(true);
|
|
374
374
|
state.selectionManager.setFocusedKey(key);
|
|
375
375
|
}
|
|
@@ -378,7 +378,7 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
378
378
|
return {
|
|
379
379
|
menuItemProps: {
|
|
380
380
|
...ariaProps,
|
|
381
|
-
...$
|
|
381
|
+
...$cSfnK$reactariautils.mergeProps(itemProps, pressProps, hoverProps, {
|
|
382
382
|
onKeyDown: onKeyDown
|
|
383
383
|
})
|
|
384
384
|
},
|
|
@@ -395,13 +395,13 @@ function $4124e6f4a4efab3d$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
|
|
398
|
-
var $
|
|
398
|
+
var $d1f36a3ac353172a$exports = {};
|
|
399
399
|
|
|
400
|
-
$parcel$export($
|
|
400
|
+
$parcel$export($d1f36a3ac353172a$exports, "useMenuSection", () => $d1f36a3ac353172a$export$73f7a44322579622);
|
|
401
401
|
|
|
402
|
-
function $
|
|
402
|
+
function $d1f36a3ac353172a$export$73f7a44322579622(props) {
|
|
403
403
|
let { heading: heading , 'aria-label': ariaLabel } = props;
|
|
404
|
-
let headingId = $
|
|
404
|
+
let headingId = $cSfnK$reactariautils.useId();
|
|
405
405
|
return {
|
|
406
406
|
itemProps: {
|
|
407
407
|
role: 'presentation'
|
|
@@ -423,10 +423,10 @@ function $09e5e649d8f56a83$export$73f7a44322579622(props) {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
|
|
426
|
-
$parcel$exportWildcard(module.exports, $
|
|
427
|
-
$parcel$exportWildcard(module.exports, $
|
|
428
|
-
$parcel$exportWildcard(module.exports, $
|
|
429
|
-
$parcel$exportWildcard(module.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);
|
|
430
430
|
|
|
431
431
|
|
|
432
432
|
//# sourceMappingURL=main.js.map
|