@react-spectrum/menu 3.11.1-nightly.3856 → 3.11.1-nightly.3863

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
@@ -6,16 +6,18 @@ var $3ThwF$reactariainteractions = require("@react-aria/interactions");
6
6
  var $3ThwF$react = require("react");
7
7
  var $3ThwF$reactariamenu = require("@react-aria/menu");
8
8
  var $3ThwF$reactstatelymenu = require("@react-stately/menu");
9
+ var $3ThwF$reactariafocus = require("@react-aria/focus");
9
10
  var $3ThwF$reactariautils = require("@react-aria/utils");
10
11
  var $3ThwF$reactstatelytree = require("@react-stately/tree");
11
12
  var $3ThwF$spectrumiconsuiCheckmarkMedium = require("@spectrum-icons/ui/CheckmarkMedium");
12
- var $3ThwF$reactariafocus = require("@react-aria/focus");
13
13
  var $3ThwF$reactspectrumlayout = require("@react-spectrum/layout");
14
+ var $3ThwF$spectrumiconsworkflowInfoOutline = require("@spectrum-icons/workflow/InfoOutline");
14
15
  var $3ThwF$reactspectrumtext = require("@react-spectrum/text");
16
+ var $3ThwF$reactariai18n = require("@react-aria/i18n");
15
17
  var $3ThwF$reactariaseparator = require("@react-aria/separator");
16
18
  var $3ThwF$reactspectrumbutton = require("@react-spectrum/button");
17
19
  var $3ThwF$spectrumiconsworkflowMore = require("@spectrum-icons/workflow/More");
18
- var $3ThwF$reactariai18n = require("@react-aria/i18n");
20
+ var $3ThwF$reactstatelyoverlays = require("@react-stately/overlays");
19
21
 
20
22
  function $parcel$export(e, n, v, s) {
21
23
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
@@ -27,6 +29,7 @@ function $parcel$interopDefault(a) {
27
29
  $parcel$export(module.exports, "MenuTrigger", () => $e56311f7204399c7$export$27d2ad3c5815583e);
28
30
  $parcel$export(module.exports, "Menu", () => $63a7dff9cbe2d046$export$d9b273488cd8ce6f);
29
31
  $parcel$export(module.exports, "ActionMenu", () => $53a2f2636c97a561$export$ed57a210b9d13bb6);
32
+ $parcel$export(module.exports, "MenuDialogTrigger", () => $febd30f9f4b51dd6$export$5e604e335994e1d1);
30
33
  $parcel$export(module.exports, "Item", () => $3ThwF$reactstatelycollections.Item);
31
34
  $parcel$export(module.exports, "Section", () => $3ThwF$reactstatelycollections.Section);
32
35
  /*
@@ -66,6 +69,14 @@ const $cac834c4bc0a51d3$export$c7e742effb1c51e2 = (0, ($parcel$interopDefault($3
66
69
  function $cac834c4bc0a51d3$export$21c7ab35b39f78ec() {
67
70
  return (0, $3ThwF$react.useContext)($cac834c4bc0a51d3$export$c7e742effb1c51e2);
68
71
  }
72
+ const $cac834c4bc0a51d3$export$e239f1ef5b7afe1a = (0, ($parcel$interopDefault($3ThwF$react))).createContext(undefined);
73
+ function $cac834c4bc0a51d3$export$4bbcd0ebecc48abd() {
74
+ return (0, $3ThwF$react.useContext)($cac834c4bc0a51d3$export$e239f1ef5b7afe1a);
75
+ }
76
+ const $cac834c4bc0a51d3$export$24aad8519b95b41b = (0, ($parcel$interopDefault($3ThwF$react))).createContext({});
77
+ function $cac834c4bc0a51d3$export$efa3856fc0e85e7f() {
78
+ return (0, $3ThwF$react.useContext)($cac834c4bc0a51d3$export$24aad8519b95b41b);
79
+ }
69
80
 
70
81
 
71
82
 
@@ -176,6 +187,7 @@ function $e56311f7204399c7$var$MenuTrigger(props, ref) {
176
187
  let isMobile = (0, $3ThwF$reactspectrumutils.useIsMobileDevice)();
177
188
  let menuContext = {
178
189
  ...menuProps,
190
+ state: state,
179
191
  ref: menuRef,
180
192
  onClose: state.close,
181
193
  closeOnSelect: closeOnSelect,
@@ -233,90 +245,6 @@ function $e56311f7204399c7$var$MenuTrigger(props, ref) {
233
245
  * governing permissions and limitations under the License.
234
246
  */
235
247
 
236
- /*
237
- * Copyright 2020 Adobe. All rights reserved.
238
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
239
- * you may not use this file except in compliance with the License. You may obtain a copy
240
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
241
- *
242
- * Unless required by applicable law or agreed to in writing, software distributed under
243
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
244
- * OF ANY KIND, either express or implied. See the License for the specific language
245
- * governing permissions and limitations under the License.
246
- */
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
- function $1d718563708db5b5$export$2ce376c2cc3355c8(props) {
258
- let { item: item , state: state , isVirtualized: isVirtualized , onAction: onAction } = props;
259
- let { onClose: onClose , closeOnSelect: closeOnSelect } = (0, $cac834c4bc0a51d3$export$21c7ab35b39f78ec)();
260
- let { rendered: rendered , key: key } = item;
261
- let isSelected = state.selectionManager.isSelected(key);
262
- let isDisabled = state.disabledKeys.has(key);
263
- let ref = (0, $3ThwF$react.useRef)();
264
- let { menuItemProps: menuItemProps , labelProps: labelProps , descriptionProps: descriptionProps , keyboardShortcutProps: keyboardShortcutProps } = (0, $3ThwF$reactariamenu.useMenuItem)({
265
- isSelected: isSelected,
266
- isDisabled: isDisabled,
267
- "aria-label": item["aria-label"],
268
- key: key,
269
- onClose: onClose,
270
- closeOnSelect: closeOnSelect,
271
- isVirtualized: isVirtualized,
272
- onAction: onAction
273
- }, state, ref);
274
- let { hoverProps: hoverProps , isHovered: isHovered } = (0, $3ThwF$reactariainteractions.useHover)({
275
- isDisabled: isDisabled
276
- });
277
- let contents = typeof rendered === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumtext.Text), null, rendered) : rendered;
278
- return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactariafocus.FocusRing), {
279
- focusRingClass: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "focus-ring")
280
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("li", {
281
- ...(0, $3ThwF$reactariautils.mergeProps)(menuItemProps, hoverProps),
282
- ref: ref,
283
- className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-item", {
284
- "is-disabled": isDisabled,
285
- "is-selected": isSelected,
286
- "is-selectable": state.selectionManager.selectionMode !== "none",
287
- "is-hovered": isHovered
288
- })
289
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumlayout.Grid), {
290
- UNSAFE_className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-itemGrid")
291
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumutils.ClearSlots), null, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumutils.SlotProvider), {
292
- slots: {
293
- text: {
294
- UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-itemLabel"],
295
- ...labelProps
296
- },
297
- end: {
298
- UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-end"],
299
- ...descriptionProps
300
- },
301
- icon: {
302
- UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-icon"],
303
- size: "S"
304
- },
305
- description: {
306
- UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-description"],
307
- ...descriptionProps
308
- },
309
- keyboard: {
310
- UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-keyboard"],
311
- ...keyboardShortcutProps
312
- }
313
- }
314
- }, contents, isSelected && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, ($parcel$interopDefault($3ThwF$spectrumiconsuiCheckmarkMedium))), {
315
- slot: "checkmark",
316
- UNSAFE_className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-checkmark")
317
- }))))));
318
- }
319
-
320
248
 
321
249
  /*
322
250
  * Copyright 2020 Adobe. All rights reserved.
@@ -333,103 +261,11 @@ function $1d718563708db5b5$export$2ce376c2cc3355c8(props) {
333
261
 
334
262
 
335
263
 
336
-
337
-
338
- function $5793ff412227d2fc$export$4b1545b4f2016d26(props) {
339
- let { item: item , state: state , onAction: onAction } = props;
340
- let { itemProps: itemProps , headingProps: headingProps , groupProps: groupProps } = (0, $3ThwF$reactariamenu.useMenuSection)({
341
- heading: item.rendered,
342
- "aria-label": item["aria-label"]
343
- });
344
- let { separatorProps: separatorProps } = (0, $3ThwF$reactariaseparator.useSeparator)({
345
- elementType: "li"
346
- });
347
- return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$react.Fragment), null, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("li", {
348
- ...separatorProps,
349
- className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-divider")
350
- }), /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("li", itemProps, item.rendered && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("span", {
351
- ...headingProps,
352
- className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-sectionHeading")
353
- }, item.rendered), /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("ul", {
354
- ...groupProps,
355
- className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu")
356
- }, [
357
- ...(0, $3ThwF$reactstatelycollections.getChildNodes)(item, state.collection)
358
- ].map((node)=>{
359
- let item = /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $1d718563708db5b5$export$2ce376c2cc3355c8), {
360
- key: node.key,
361
- item: node,
362
- state: state,
363
- onAction: onAction
364
- });
365
- if (node.wrapper) item = node.wrapper(item);
366
- return item;
367
- }))));
368
- }
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
- function $63a7dff9cbe2d046$var$Menu(props, ref) {
377
- let contextProps = (0, $3ThwF$react.useContext)((0, $cac834c4bc0a51d3$export$c7e742effb1c51e2));
378
- let completeProps = {
379
- ...(0, $3ThwF$reactariautils.mergeProps)(contextProps, props)
380
- };
381
- let domRef = (0, $3ThwF$reactspectrumutils.useDOMRef)(ref);
382
- let state = (0, $3ThwF$reactstatelytree.useTreeState)(completeProps);
383
- let { menuProps: menuProps } = (0, $3ThwF$reactariamenu.useMenu)(completeProps, state, domRef);
384
- let { styleProps: styleProps } = (0, $3ThwF$reactspectrumutils.useStyleProps)(completeProps);
385
- (0, $3ThwF$reactariautils.useSyncRef)(contextProps, domRef);
386
- return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("ul", {
387
- ...menuProps,
388
- ...styleProps,
389
- ref: domRef,
390
- className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu", styleProps.className)
391
- }, [
392
- ...state.collection
393
- ].map((item)=>{
394
- if (item.type === "section") return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $5793ff412227d2fc$export$4b1545b4f2016d26), {
395
- key: item.key,
396
- item: item,
397
- state: state,
398
- onAction: completeProps.onAction
399
- });
400
- let menuItem = /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $1d718563708db5b5$export$2ce376c2cc3355c8), {
401
- key: item.key,
402
- item: item,
403
- state: state,
404
- onAction: completeProps.onAction
405
- });
406
- if (item.wrapper) menuItem = item.wrapper(menuItem);
407
- return menuItem;
408
- }));
409
- }
410
- /**
411
- * Menus display a list of actions or options that a user can choose.
412
- */ // forwardRef doesn't support generic parameters, so cast the result to the correct type
413
- // https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
414
- const $63a7dff9cbe2d046$export$d9b273488cd8ce6f = /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).forwardRef($63a7dff9cbe2d046$var$Menu);
415
-
416
-
417
- /*
418
- * Copyright 2021 Adobe. All rights reserved.
419
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
420
- * you may not use this file except in compliance with the License. You may obtain a copy
421
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
422
- *
423
- * Unless required by applicable law or agreed to in writing, software distributed under
424
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
425
- * OF ANY KIND, either express or implied. See the License for the specific language
426
- * governing permissions and limitations under the License.
427
- */
428
-
429
264
  var $cfd196bf3743d29c$exports = {};
430
265
  var $517603d8c7b8e5e5$exports = {};
431
266
  $517603d8c7b8e5e5$exports = {
432
- "moreActions": `المزيد من الإجراءات`
267
+ "moreActions": `المزيد من الإجراءات`,
268
+ "unavailable": `Unavailable`
433
269
  };
434
270
 
435
271
 
@@ -465,7 +301,8 @@ $a79ffc3f42b40ea0$exports = {
465
301
 
466
302
  var $2b0d2ea968c3f427$exports = {};
467
303
  $2b0d2ea968c3f427$exports = {
468
- "moreActions": `More actions`
304
+ "moreActions": `More actions`,
305
+ "unavailable": `Unavailable`
469
306
  };
470
307
 
471
308
 
@@ -675,6 +512,208 @@ $cfd196bf3743d29c$exports = {
675
512
 
676
513
 
677
514
 
515
+
516
+ function $1d718563708db5b5$export$2ce376c2cc3355c8(props) {
517
+ let { item: item , state: state , isVirtualized: isVirtualized , onAction: onAction } = props;
518
+ let stringFormatter = (0, $3ThwF$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($cfd196bf3743d29c$exports))));
519
+ let menuDialogContext = (0, $cac834c4bc0a51d3$export$4bbcd0ebecc48abd)();
520
+ let { triggerRef: triggerRef } = menuDialogContext || {};
521
+ let isMenuDialogTrigger = !!menuDialogContext;
522
+ let isUnavailable = false;
523
+ if (isMenuDialogTrigger) isUnavailable = menuDialogContext.isUnavailable;
524
+ let { onClose: onClose , closeOnSelect: closeOnSelect } = (0, $cac834c4bc0a51d3$export$21c7ab35b39f78ec)();
525
+ let { rendered: rendered , key: key } = item;
526
+ let isSelected = state.selectionManager.isSelected(key);
527
+ let isDisabled = state.disabledKeys.has(key);
528
+ let ref = (0, $3ThwF$react.useRef)(null);
529
+ if (triggerRef) ref = triggerRef;
530
+ let { menuItemProps: menuItemProps , labelProps: labelProps , descriptionProps: descriptionProps , keyboardShortcutProps: keyboardShortcutProps } = (0, $3ThwF$reactariamenu.useMenuItem)({
531
+ isSelected: isSelected,
532
+ isDisabled: isDisabled,
533
+ "aria-label": item["aria-label"],
534
+ key: key,
535
+ onClose: onClose,
536
+ closeOnSelect: closeOnSelect,
537
+ isVirtualized: isVirtualized,
538
+ onAction: onAction,
539
+ "aria-haspopup": isMenuDialogTrigger ? "dialog" : undefined
540
+ }, state, ref);
541
+ let endId = (0, $3ThwF$reactariautils.useSlotId)();
542
+ let endProps = {};
543
+ if (endId) {
544
+ endProps.id = endId;
545
+ menuItemProps["aria-describedby"] = menuItemProps["aria-describedby"] + " " + endId;
546
+ }
547
+ let contents = typeof rendered === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumtext.Text), null, rendered) : rendered;
548
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactariafocus.FocusRing), {
549
+ focusRingClass: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "focus-ring")
550
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("li", {
551
+ ...(0, $3ThwF$reactariautils.mergeProps)(menuItemProps),
552
+ ref: ref,
553
+ className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-item", {
554
+ "is-disabled": isDisabled,
555
+ "is-selected": isSelected,
556
+ "is-selectable": state.selectionManager.selectionMode !== "none",
557
+ "is-open": state.expandedKeys.has(key)
558
+ })
559
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumlayout.Grid), {
560
+ UNSAFE_className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-itemGrid")
561
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumutils.ClearSlots), null, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumutils.SlotProvider), {
562
+ slots: {
563
+ text: {
564
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-itemLabel"],
565
+ ...labelProps
566
+ },
567
+ end: {
568
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-end"],
569
+ ...endProps
570
+ },
571
+ icon: {
572
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-icon"],
573
+ size: "S"
574
+ },
575
+ description: {
576
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-description"],
577
+ ...descriptionProps
578
+ },
579
+ keyboard: {
580
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports)))["spectrum-Menu-keyboard"],
581
+ ...keyboardShortcutProps
582
+ }
583
+ }
584
+ }, contents, isSelected && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, ($parcel$interopDefault($3ThwF$spectrumiconsuiCheckmarkMedium))), {
585
+ slot: "checkmark",
586
+ UNSAFE_className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-checkmark")
587
+ }), isUnavailable && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, ($parcel$interopDefault($3ThwF$spectrumiconsworkflowInfoOutline))), {
588
+ slot: "end",
589
+ size: "XS",
590
+ alignSelf: "center",
591
+ "aria-label": stringFormatter.format("unavailable")
592
+ }))))));
593
+ }
594
+
595
+
596
+ /*
597
+ * Copyright 2020 Adobe. All rights reserved.
598
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
599
+ * you may not use this file except in compliance with the License. You may obtain a copy
600
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
601
+ *
602
+ * Unless required by applicable law or agreed to in writing, software distributed under
603
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
604
+ * OF ANY KIND, either express or implied. See the License for the specific language
605
+ * governing permissions and limitations under the License.
606
+ */
607
+
608
+
609
+
610
+
611
+
612
+
613
+ function $5793ff412227d2fc$export$4b1545b4f2016d26(props) {
614
+ let { item: item , state: state , onAction: onAction } = props;
615
+ let { itemProps: itemProps , headingProps: headingProps , groupProps: groupProps } = (0, $3ThwF$reactariamenu.useMenuSection)({
616
+ heading: item.rendered,
617
+ "aria-label": item["aria-label"]
618
+ });
619
+ let { separatorProps: separatorProps } = (0, $3ThwF$reactariaseparator.useSeparator)({
620
+ elementType: "li"
621
+ });
622
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$react.Fragment), null, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("li", {
623
+ ...separatorProps,
624
+ className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-divider")
625
+ }), /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("li", itemProps, item.rendered && /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("span", {
626
+ ...headingProps,
627
+ className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-sectionHeading")
628
+ }, item.rendered), /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("ul", {
629
+ ...groupProps,
630
+ className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu")
631
+ }, [
632
+ ...(0, $3ThwF$reactstatelycollections.getChildNodes)(item, state.collection)
633
+ ].map((node)=>{
634
+ let item = /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $1d718563708db5b5$export$2ce376c2cc3355c8), {
635
+ key: node.key,
636
+ item: node,
637
+ state: state,
638
+ onAction: onAction
639
+ });
640
+ if (node.wrapper) item = node.wrapper(item);
641
+ return item;
642
+ }))));
643
+ }
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+ function $63a7dff9cbe2d046$var$Menu(props, ref) {
652
+ let contextProps = (0, $3ThwF$react.useContext)((0, $cac834c4bc0a51d3$export$c7e742effb1c51e2));
653
+ let completeProps = {
654
+ ...(0, $3ThwF$reactariautils.mergeProps)(contextProps, props)
655
+ };
656
+ let domRef = (0, $3ThwF$reactspectrumutils.useDOMRef)(ref);
657
+ let state = (0, $3ThwF$reactstatelytree.useTreeState)(completeProps);
658
+ let { menuProps: menuProps } = (0, $3ThwF$reactariamenu.useMenu)(completeProps, state, domRef);
659
+ let { styleProps: styleProps } = (0, $3ThwF$reactspectrumutils.useStyleProps)(completeProps);
660
+ (0, $3ThwF$reactariautils.useSyncRef)(contextProps, domRef);
661
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $cac834c4bc0a51d3$export$24aad8519b95b41b).Provider, {
662
+ value: {
663
+ state: state
664
+ }
665
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactariafocus.FocusScope), {
666
+ contain: state.expandedKeys.size > 0
667
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement("ul", {
668
+ ...menuProps,
669
+ ...styleProps,
670
+ ref: domRef,
671
+ className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu", styleProps.className)
672
+ }, [
673
+ ...state.collection
674
+ ].map((item)=>{
675
+ if (item.type === "section") return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $5793ff412227d2fc$export$4b1545b4f2016d26), {
676
+ key: item.key,
677
+ item: item,
678
+ state: state,
679
+ onAction: completeProps.onAction
680
+ });
681
+ let menuItem = /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $1d718563708db5b5$export$2ce376c2cc3355c8), {
682
+ key: item.key,
683
+ item: item,
684
+ state: state,
685
+ onAction: completeProps.onAction
686
+ });
687
+ if (item.wrapper) menuItem = item.wrapper(menuItem);
688
+ return menuItem;
689
+ }))));
690
+ }
691
+ /**
692
+ * Menus display a list of actions or options that a user can choose.
693
+ */ // forwardRef doesn't support generic parameters, so cast the result to the correct type
694
+ // https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
695
+ const $63a7dff9cbe2d046$export$d9b273488cd8ce6f = /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).forwardRef($63a7dff9cbe2d046$var$Menu);
696
+
697
+
698
+ /*
699
+ * Copyright 2021 Adobe. All rights reserved.
700
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
701
+ * you may not use this file except in compliance with the License. You may obtain a copy
702
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
703
+ *
704
+ * Unless required by applicable law or agreed to in writing, software distributed under
705
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
706
+ * OF ANY KIND, either express or implied. See the License for the specific language
707
+ * governing permissions and limitations under the License.
708
+ */
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
678
717
  function $53a2f2636c97a561$var$ActionMenu(props, ref) {
679
718
  props = (0, $3ThwF$reactspectrumutils.useSlotProps)(props, "actionMenu");
680
719
  let stringFormatter = (0, $3ThwF$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($cfd196bf3743d29c$exports))));
@@ -705,6 +744,102 @@ function $53a2f2636c97a561$var$ActionMenu(props, ref) {
705
744
  */ const $53a2f2636c97a561$export$ed57a210b9d13bb6 = /*#__PURE__*/ (0, $3ThwF$react.forwardRef)($53a2f2636c97a561$var$ActionMenu);
706
745
 
707
746
 
747
+ /*
748
+ * Copyright 2023 Adobe. All rights reserved.
749
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
750
+ * you may not use this file except in compliance with the License. You may obtain a copy
751
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
752
+ *
753
+ * Unless required by applicable law or agreed to in writing, software distributed under
754
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
755
+ * OF ANY KIND, either express or implied. See the License for the specific language
756
+ * governing permissions and limitations under the License.
757
+ */
758
+ var $a10e565ec42bcf96$exports = {};
759
+
760
+ $parcel$export($a10e565ec42bcf96$exports, "react-spectrum-ContextualHelp-button", () => $a10e565ec42bcf96$export$20d9583c9f1529c1, (v) => $a10e565ec42bcf96$export$20d9583c9f1529c1 = v);
761
+ $parcel$export($a10e565ec42bcf96$exports, "react-spectrum-ContextualHelp-dialog", () => $a10e565ec42bcf96$export$ab2d873674d20d28, (v) => $a10e565ec42bcf96$export$ab2d873674d20d28 = v);
762
+ $parcel$export($a10e565ec42bcf96$exports, "react-spectrum-ContextualHelp-content", () => $a10e565ec42bcf96$export$a1f805890cf58c4, (v) => $a10e565ec42bcf96$export$a1f805890cf58c4 = v);
763
+ $parcel$export($a10e565ec42bcf96$exports, "react-spectrum-ContextualHelp-footer", () => $a10e565ec42bcf96$export$d901bc3fa82b87a6, (v) => $a10e565ec42bcf96$export$d901bc3fa82b87a6 = v);
764
+ var $a10e565ec42bcf96$export$20d9583c9f1529c1;
765
+ var $a10e565ec42bcf96$export$ab2d873674d20d28;
766
+ var $a10e565ec42bcf96$export$a1f805890cf58c4;
767
+ var $a10e565ec42bcf96$export$d901bc3fa82b87a6;
768
+ $a10e565ec42bcf96$export$20d9583c9f1529c1 = "react-spectrum-ContextualHelp-button_0cd31c";
769
+ $a10e565ec42bcf96$export$ab2d873674d20d28 = "react-spectrum-ContextualHelp-dialog_0cd31c";
770
+ $a10e565ec42bcf96$export$a1f805890cf58c4 = "react-spectrum-ContextualHelp-content_0cd31c";
771
+ $a10e565ec42bcf96$export$d901bc3fa82b87a6 = "react-spectrum-ContextualHelp-footer_0cd31c";
772
+
773
+
774
+
775
+
776
+
777
+
778
+ function $febd30f9f4b51dd6$var$MenuDialogTrigger(props) {
779
+ let { isUnavailable: isUnavailable } = props;
780
+ let { state: menuState } = (0, $cac834c4bc0a51d3$export$efa3856fc0e85e7f)();
781
+ let state = (0, $3ThwF$reactstatelyoverlays.useOverlayTriggerState)({
782
+ isOpen: menuState.expandedKeys.has(props.targetKey),
783
+ onOpenChange: (val)=>{
784
+ if (!val) {
785
+ if (menuState.expandedKeys.has(props.targetKey)) menuState.toggleKey(props.targetKey);
786
+ }
787
+ }
788
+ });
789
+ let slots = {};
790
+ if (isUnavailable) slots = {
791
+ dialog: {
792
+ UNSAFE_className: (0, $3ThwF$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a10e565ec42bcf96$exports))), "react-spectrum-ContextualHelp-dialog")
793
+ },
794
+ content: {
795
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($a10e565ec42bcf96$exports)))["react-spectrum-ContextualHelp-content"]
796
+ },
797
+ footer: {
798
+ UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($a10e565ec42bcf96$exports)))["react-spectrum-ContextualHelp-footer"]
799
+ }
800
+ };
801
+ let [trigger] = (0, ($parcel$interopDefault($3ThwF$react))).Children.toArray(props.children);
802
+ let [, content] = props.children;
803
+ let isMobile = (0, $3ThwF$reactspectrumutils.useIsMobileDevice)();
804
+ let triggerRef = (0, $3ThwF$react.useRef)(null);
805
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, ($parcel$interopDefault($3ThwF$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $cac834c4bc0a51d3$export$e239f1ef5b7afe1a).Provider, {
806
+ value: {
807
+ isUnavailable: isUnavailable,
808
+ triggerRef: triggerRef
809
+ }
810
+ }, trigger), /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumutils.SlotProvider), {
811
+ slots: slots
812
+ }, isMobile ? /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumoverlays.Modal), {
813
+ state: state,
814
+ isDismissable: true
815
+ }, content) : /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement((0, $3ThwF$reactspectrumoverlays.Popover), {
816
+ state: state,
817
+ triggerRef: triggerRef,
818
+ placement: "end top",
819
+ hideArrow: true,
820
+ offset: -10,
821
+ isNonModal: true,
822
+ shouldContainFocus: false
823
+ }, content)));
824
+ }
825
+ $febd30f9f4b51dd6$var$MenuDialogTrigger.getCollectionNode = function* getCollectionNode(props) {
826
+ let [trigger] = (0, ($parcel$interopDefault($3ThwF$react))).Children.toArray(props.children);
827
+ let [, content] = props.children;
828
+ yield {
829
+ element: /*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).cloneElement(trigger, {
830
+ ...trigger.props,
831
+ hasChildItems: true
832
+ }),
833
+ wrapper: (element)=>/*#__PURE__*/ (0, ($parcel$interopDefault($3ThwF$react))).createElement($febd30f9f4b51dd6$var$MenuDialogTrigger, {
834
+ key: element.key,
835
+ targetKey: element.key,
836
+ ...props
837
+ }, element, content)
838
+ };
839
+ };
840
+ let $febd30f9f4b51dd6$export$5e604e335994e1d1 = $febd30f9f4b51dd6$var$MenuDialogTrigger;
841
+
842
+
708
843
 
709
844
 
710
845