@react-spectrum/menu 3.8.3-nightly.3539 → 3.8.3-nightly.3547

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,8 +1,6 @@
1
1
  require("./main.css");
2
2
  var $3ThwF$reactstatelycollections = require("@react-stately/collections");
3
3
  var $3ThwF$reactspectrumutils = require("@react-spectrum/utils");
4
- var $3ThwF$reactariaoverlays = require("@react-aria/overlays");
5
- var $3ThwF$reactariafocus = require("@react-aria/focus");
6
4
  var $3ThwF$reactspectrumoverlays = require("@react-spectrum/overlays");
7
5
  var $3ThwF$reactariainteractions = require("@react-aria/interactions");
8
6
  var $3ThwF$react = require("react");
@@ -11,6 +9,7 @@ var $3ThwF$reactstatelymenu = require("@react-stately/menu");
11
9
  var $3ThwF$reactariautils = require("@react-aria/utils");
12
10
  var $3ThwF$reactstatelytree = require("@react-stately/tree");
13
11
  var $3ThwF$spectrumiconsuiCheckmarkMedium = require("@spectrum-icons/ui/CheckmarkMedium");
12
+ var $3ThwF$reactariafocus = require("@react-aria/focus");
14
13
  var $3ThwF$reactspectrumlayout = require("@react-spectrum/layout");
15
14
  var $3ThwF$reactspectrumtext = require("@react-spectrum/text");
16
15
  var $3ThwF$reactariaseparator = require("@react-aria/separator");
@@ -32,8 +31,6 @@ $parcel$export(module.exports, "Item", () => $3ThwF$reactstatelycollections.Item
32
31
  $parcel$export(module.exports, "Section", () => $3ThwF$reactstatelycollections.Section);
33
32
 
34
33
 
35
-
36
-
37
34
  const $cac834c4bc0a51d3$export$c7e742effb1c51e2 = ($parcel$interopDefault($3ThwF$react)).createContext({
38
35
  });
39
36
  function $cac834c4bc0a51d3$export$21c7ab35b39f78ec() {
@@ -123,7 +120,6 @@ $3deee0fd2b46e64f$export$d35bc1e505d1ebbf = "is-disabled_7ea47c";
123
120
 
124
121
 
125
122
  function $e56311f7204399c7$var$MenuTrigger(props, ref) {
126
- let menuPopoverRef = $3ThwF$react.useRef();
127
123
  let triggerRef = $3ThwF$react.useRef();
128
124
  let domRef = $3ThwF$reactspectrumutils.useDOMRef(ref);
129
125
  let menuTriggerRef = domRef || triggerRef;
@@ -148,15 +144,6 @@ function $e56311f7204399c7$var$MenuTrigger(props, ref) {
148
144
  initialPlacement = `${direction} ${align}`;
149
145
  }
150
146
  let isMobile = $3ThwF$reactspectrumutils.useIsMobileDevice();
151
- let { overlayProps: positionProps , placement: placement } = $3ThwF$reactariaoverlays.useOverlayPosition({
152
- targetRef: menuTriggerRef,
153
- overlayRef: $3ThwF$reactspectrumutils.unwrapDOMRef(menuPopoverRef),
154
- scrollRef: menuRef,
155
- placement: initialPlacement,
156
- shouldFlip: shouldFlip,
157
- isOpen: state.isOpen && !isMobile,
158
- onClose: state.close
159
- });
160
147
  let menuContext = {
161
148
  ...menuProps,
162
149
  ref: menuRef,
@@ -171,31 +158,19 @@ function $e56311f7204399c7$var$MenuTrigger(props, ref) {
171
158
  'spectrum-Menu-popover': !isMobile
172
159
  })
173
160
  };
174
- // Only contain focus while the menu is open. There is a fade out transition during which we may try to move focus.
175
- // If we contain, then focus will be pulled back into the menu.
176
- let contents = /*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$reactariafocus.FocusScope, {
177
- restoreFocus: true,
178
- contain: isMobile && state.isOpen
179
- }, /*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$reactariaoverlays.DismissButton, {
180
- onDismiss: state.close
181
- }), menu, /*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$reactariaoverlays.DismissButton, {
182
- onDismiss: state.close
183
- }));
184
161
  // On small screen devices, the menu is rendered in a tray, otherwise a popover.
185
162
  let overlay;
186
163
  if (isMobile) overlay = /*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$reactspectrumoverlays.Tray, {
187
- isOpen: state.isOpen,
188
- onClose: state.close
189
- }, contents);
164
+ state: state
165
+ }, menu);
190
166
  else overlay = /*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$reactspectrumoverlays.Popover, {
191
- isOpen: state.isOpen,
192
- UNSAFE_style: positionProps.style,
193
- ref: menuPopoverRef,
194
- placement: placement,
167
+ state: state,
168
+ triggerRef: menuTriggerRef,
169
+ scrollRef: menuRef,
170
+ placement: initialPlacement,
195
171
  hideArrow: true,
196
- onClose: state.close,
197
- shouldCloseOnBlur: true
198
- }, contents);
172
+ shouldFlip: shouldFlip
173
+ }, menu);
199
174
  return(/*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$react.Fragment, null, /*#__PURE__*/ ($parcel$interopDefault($3ThwF$react)).createElement($3ThwF$reactspectrumutils.SlotProvider, {
200
175
  slots: {
201
176
  actionButton: {
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEuBO,KAAK,CAAC,yCAAW,GAAG,sCAAK,CAAC,aAAa,CAAmB,CAAC;AAAA,CAAC;SAEnD,yCAAc,GAAqB,CAAC;IAClD,MAAM,CAAC,uBAAU,CAAC,yCAAW;AAC/B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BD,GAAuC;AACvC,GAA+B;AAC/B,GAA8C;AAC9C,GAAyC;AACzC,GAAoC;AACpC,GAA6B;AAC7B,GAA+B;AAC/B,GAAyC;AACzC,GAAwC;AACxC,GAAmD;AACnD,GAAuC;AACvC,GAAwC;AACxC,GAA+B;AAC/B,GAAmC;AACnC,GAAoC;AACpC,GAA2C;AAC3C,GAAwC;AACxC,GAA4B;AAC5B,GAA4B;AAC5B,GAA4B;AAC5B,GAAgC;AAChC,GAAyB;AACzB,GAA2B;AAC3B,GAA6B;AAvB7B,uCAAuC,GAAG,CAA8B;AACxE,yCAA+B,GAAG,CAAsB;AACxD,yCAA8C,GAAG,CAAqC;AACtF,yCAAyC,GAAG,CAAgC;AAC5E,yCAA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AO;IAChB,CAAO,QAAE,yBAAO;IAChB,CAAO,QAAE,yBAAO;IAChB,CAAO,QAAE,yBAAO;IAChB,CAAO,QAAE,yBAAO;IAChB,CAAO,QAAE,yBAAO;IAChB,CAAO,QAAE,yBAAO;AAClB,CAAC;;;;;;;;;SD5CQ,gCAAU,CAAmB,KAAiC,EAAE,GAAoC,EAAE,CAAC;IAC9G,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAY;IACxC,GAAG,CAAC,eAAe,GAAG,gDAA2B,CAAC,gEAAY;IAC9D,GAAG,CAAC,WAAW,GAAG,oCAAc,CAAC,KAAK,EAAE,CAAC;QAAA,SAAS,EAAE,IAAI;IAAA,CAAC;IACzD,EAAE,EAAE,WAAW,CAAC,CAAY,iBAAM,SAAS,EACzC,WAAW,CAAC,CAAY,eAAI,eAAe,CAAC,MAAM,CAAC,CAAa;IAGlE,MAAM,oEACH,yCAAW;QACV,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;0EAC3B,uCAAY;QACX,GAAG,EAAE,GAAG;WACJ,KAAK;WACL,WAAW;0EACd,0DAAI,6EAEN,yCAAI;QACH,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;;AAGhC,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,uBAAU,CAAC,gCAAU;","sources":["packages/@react-spectrum/menu/src/index.ts","packages/@react-spectrum/menu/src/MenuTrigger.tsx","packages/@react-spectrum/menu/src/context.ts","packages/@adobe/spectrum-css-temp/components/menu/vars.css","packages/@react-spectrum/menu/src/Menu.tsx","packages/@react-spectrum/menu/src/MenuItem.tsx","packages/@react-spectrum/menu/src/MenuSection.tsx","packages/@react-spectrum/menu/src/ActionMenu.tsx","packages/@react-spectrum/menu/intl/*.js","packages/@react-spectrum/menu/intl/ar-AE.json","packages/@react-spectrum/menu/intl/bg-BG.json","packages/@react-spectrum/menu/intl/cs-CZ.json","packages/@react-spectrum/menu/intl/da-DK.json","packages/@react-spectrum/menu/intl/de-DE.json","packages/@react-spectrum/menu/intl/el-GR.json","packages/@react-spectrum/menu/intl/en-US.json","packages/@react-spectrum/menu/intl/es-ES.json","packages/@react-spectrum/menu/intl/et-EE.json","packages/@react-spectrum/menu/intl/fi-FI.json","packages/@react-spectrum/menu/intl/fr-FR.json","packages/@react-spectrum/menu/intl/he-IL.json","packages/@react-spectrum/menu/intl/hr-HR.json","packages/@react-spectrum/menu/intl/hu-HU.json","packages/@react-spectrum/menu/intl/it-IT.json","packages/@react-spectrum/menu/intl/ja-JP.json","packages/@react-spectrum/menu/intl/ko-KR.json","packages/@react-spectrum/menu/intl/lt-LT.json","packages/@react-spectrum/menu/intl/lv-LV.json","packages/@react-spectrum/menu/intl/nb-NO.json","packages/@react-spectrum/menu/intl/nl-NL.json","packages/@react-spectrum/menu/intl/pl-PL.json","packages/@react-spectrum/menu/intl/pt-BR.json","packages/@react-spectrum/menu/intl/pt-PT.json","packages/@react-spectrum/menu/intl/ro-RO.json","packages/@react-spectrum/menu/intl/ru-RU.json","packages/@react-spectrum/menu/intl/sk-SK.json","packages/@react-spectrum/menu/intl/sl-SI.json","packages/@react-spectrum/menu/intl/sr-SP.json","packages/@react-spectrum/menu/intl/sv-SE.json","packages/@react-spectrum/menu/intl/tr-TR.json","packages/@react-spectrum/menu/intl/uk-UA.json","packages/@react-spectrum/menu/intl/zh-CN.json","packages/@react-spectrum/menu/intl/zh-TW.json"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {MenuTrigger} from './MenuTrigger';\nexport {Menu} from './Menu';\nexport {ActionMenu} from './ActionMenu';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumMenuTriggerProps} from '@react-types/menu';\nexport type {SpectrumActionMenuProps, SpectrumMenuProps} from '@react-types/menu';\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 {classNames, SlotProvider, unwrapDOMRef, useDOMRef, useIsMobileDevice} from '@react-spectrum/utils';\nimport {DismissButton, useOverlayPosition} from '@react-aria/overlays';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {FocusScope} from '@react-aria/focus';\nimport {MenuContext} from './context';\nimport {Placement} from '@react-types/overlays';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {forwardRef, Fragment, useRef} from 'react';\nimport {SpectrumMenuTriggerProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenuTrigger} from '@react-aria/menu';\nimport {useMenuTriggerState} from '@react-stately/menu';\n\nfunction MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>) {\n let menuPopoverRef = useRef<DOMRefValue<HTMLDivElement>>();\n let triggerRef = useRef<HTMLElement>();\n let domRef = useDOMRef(ref);\n let menuTriggerRef = domRef || triggerRef;\n let menuRef = useRef<HTMLUListElement>();\n let {\n children,\n align = 'start',\n shouldFlip = true,\n direction = 'bottom',\n closeOnSelect,\n trigger = 'press'\n } = props;\n\n let [menuTrigger, menu] = React.Children.toArray(children);\n let state = useMenuTriggerState(props);\n\n let {menuTriggerProps, menuProps} = useMenuTrigger({trigger}, state, menuTriggerRef);\n\n let initialPlacement: Placement;\n switch (direction) {\n case 'left':\n case 'right':\n case 'start':\n case 'end':\n initialPlacement = `${direction} ${align === 'end' ? 'bottom' : 'top'}` as Placement;\n break;\n case 'bottom':\n case 'top':\n default:\n initialPlacement = `${direction} ${align}` as Placement;\n }\n\n let isMobile = useIsMobileDevice();\n let {overlayProps: positionProps, placement} = useOverlayPosition({\n targetRef: menuTriggerRef,\n overlayRef: unwrapDOMRef(menuPopoverRef),\n scrollRef: menuRef,\n placement: initialPlacement,\n shouldFlip: shouldFlip,\n isOpen: state.isOpen && !isMobile,\n onClose: state.close\n });\n\n let menuContext = {\n ...menuProps,\n ref: menuRef,\n onClose: state.close,\n closeOnSelect,\n autoFocus: state.focusStrategy || true,\n UNSAFE_style: isMobile ? {\n width: '100%',\n maxHeight: 'inherit'\n } : undefined,\n UNSAFE_className: classNames(styles, {'spectrum-Menu-popover': !isMobile})\n };\n\n // Only contain focus while the menu is open. There is a fade out transition during which we may try to move focus.\n // If we contain, then focus will be pulled back into the menu.\n let contents = (\n <FocusScope restoreFocus contain={isMobile && state.isOpen}>\n <DismissButton onDismiss={state.close} />\n {menu}\n <DismissButton onDismiss={state.close} />\n </FocusScope>\n );\n\n // On small screen devices, the menu is rendered in a tray, otherwise a popover.\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray isOpen={state.isOpen} onClose={state.close}>\n {contents}\n </Tray>\n );\n } else {\n overlay = (\n <Popover\n isOpen={state.isOpen}\n UNSAFE_style={positionProps.style}\n ref={menuPopoverRef}\n placement={placement}\n hideArrow\n onClose={state.close}\n shouldCloseOnBlur>\n {contents}\n </Popover>\n );\n }\n\n return (\n <Fragment>\n <SlotProvider slots={{actionButton: {holdAffordance: trigger === 'longPress'}}}>\n <PressResponder {...menuTriggerProps} ref={menuTriggerRef} isPressed={state.isOpen}>\n {menuTrigger}\n </PressResponder>\n </SlotProvider>\n <MenuContext.Provider value={menuContext}>\n {overlay}\n </MenuContext.Provider>\n </Fragment>\n );\n}\n\n/**\n * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,\n * linking the Menu's open state with the trigger's press state.\n */\nlet _MenuTrigger = forwardRef(MenuTrigger);\nexport {_MenuTrigger as MenuTrigger};\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 {FocusStrategy} from '@react-types/shared';\nimport React, {HTMLAttributes, MutableRefObject, useContext} from 'react';\n\nexport interface MenuContextValue extends HTMLAttributes<HTMLElement> {\n onClose?: () => void,\n closeOnSelect?: boolean,\n shouldFocusWrap?: boolean,\n autoFocus?: boolean | FocusStrategy,\n ref?: MutableRefObject<HTMLUListElement>\n}\n\nexport const MenuContext = React.createContext<MenuContextValue>({});\n\nexport function useMenuContext(): MenuContextValue {\n return useContext(MenuContext);\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\n@import './index.css';\n@import './skin.css';\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {MenuContext} from './context';\nimport {MenuItem} from './MenuItem';\nimport {MenuSection} from './MenuSection';\nimport {mergeProps, useSyncRef} from '@react-aria/utils';\nimport React, {ReactElement, useContext} from 'react';\nimport {SpectrumMenuProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenu} from '@react-aria/menu';\nimport {useTreeState} from '@react-stately/tree';\n\nfunction Menu<T extends object>(props: SpectrumMenuProps<T>, ref: DOMRef<HTMLUListElement>) {\n let contextProps = useContext(MenuContext);\n let completeProps = {\n ...mergeProps(contextProps, props)\n };\n\n let domRef = useDOMRef(ref);\n let state = useTreeState(completeProps);\n let {menuProps} = useMenu(completeProps, state, domRef);\n let {styleProps} = useStyleProps(completeProps);\n useSyncRef(contextProps, domRef);\n\n return (\n <ul\n {...menuProps}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }>\n {[...state.collection].map(item => {\n if (item.type === 'section') {\n return (\n <MenuSection\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n }\n\n let menuItem = (\n <MenuItem\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n\n if (item.wrapper) {\n menuItem = item.wrapper(menuItem);\n }\n\n return menuItem;\n })}\n </ul>\n );\n}\n\n/**\n * Menus display a list of actions or options that a user can choose.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Menu = React.forwardRef(Menu) as <T>(props: SpectrumMenuProps<T> & {ref?: DOMRef<HTMLUListElement>}) => ReactElement;\nexport {_Menu as Menu};\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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {Key, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {TreeState} from '@react-stately/tree';\nimport {useHover} from '@react-aria/interactions';\nimport {useMenuContext} from './context';\nimport {useMenuItem} from '@react-aria/menu';\n\ninterface MenuItemProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n isVirtualized?: boolean,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuItem<T>(props: MenuItemProps<T>) {\n let {\n item,\n state,\n isVirtualized,\n onAction\n } = props;\n\n let {\n onClose,\n closeOnSelect\n } = useMenuContext();\n\n let {\n rendered,\n key\n } = item;\n\n let isSelected = state.selectionManager.isSelected(key);\n let isDisabled = state.disabledKeys.has(key);\n\n let ref = useRef<HTMLLIElement>();\n let {menuItemProps, labelProps, descriptionProps, keyboardShortcutProps} = useMenuItem(\n {\n isSelected,\n isDisabled,\n 'aria-label': item['aria-label'],\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <li\n {...mergeProps(menuItemProps, hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n 'is-hovered': isHovered\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n end: {UNSAFE_className: styles['spectrum-Menu-end'], ...descriptionProps},\n icon: {UNSAFE_className: styles['spectrum-Menu-icon'], size: 'S'},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps},\n keyboard: {UNSAFE_className: styles['spectrum-Menu-keyboard'], ...keyboardShortcutProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </li>\n </FocusRing>\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 {classNames} from '@react-spectrum/utils';\nimport {MenuItem} from './MenuItem';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, Key} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {TreeState} from '@react-stately/tree';\nimport {useMenuSection} from '@react-aria/menu';\nimport {useSeparator} from '@react-aria/separator';\n\ninterface MenuSectionProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuSection<T>(props: MenuSectionProps<T>) {\n let {item, state, onAction} = props;\n let {itemProps, headingProps, groupProps} = useMenuSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let {separatorProps} = useSeparator({\n elementType: 'li'\n });\n\n return (\n <Fragment>\n {item.key !== state.collection.getFirstKey() &&\n <li\n {...separatorProps}\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n <li {...itemProps}>\n {item.rendered &&\n <span\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </span>\n }\n <ul\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {[...item.childNodes].map(node => {\n let item = (\n <MenuItem\n key={node.key}\n item={node}\n state={state}\n onAction={onAction} />\n );\n\n if (node.wrapper) {\n item = node.wrapper(item);\n }\n\n return item;\n })}\n </ul>\n </li>\n </Fragment>\n );\n}\n","/*\n * Copyright 2021 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 {ActionButton} from '@react-spectrum/button';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusableRef} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu} from './Menu';\nimport {MenuTrigger} from './MenuTrigger';\nimport More from '@spectrum-icons/workflow/More';\nimport React, {forwardRef, ReactElement} from 'react';\nimport {SpectrumActionMenuProps} from '@react-types/menu';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSlotProps} from '@react-spectrum/utils';\n\nfunction ActionMenu<T extends object>(props: SpectrumActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n props = useSlotProps(props, 'actionMenu');\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n {...props}\n {...buttonProps}>\n <More />\n </ActionButton>\n <Menu\n children={props.children}\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction} />\n </MenuTrigger>\n );\n}\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nconst _ActionMenu = forwardRef(ActionMenu) as <T>(props: SpectrumActionMenuProps<T> & {ref?: FocusableRef<HTMLButtonElement>}) => ReactElement;\nexport {_ActionMenu as ActionMenu};\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 \"moreActions\": \"المزيد من الإجراءات\"\n}\n","{\n \"moreActions\": \"Повече действия\"\n}\n","{\n \"moreActions\": \"Další akce\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Mehr Aktionen\"\n}\n","{\n \"moreActions\": \"Περισσότερες ενέργειες\"\n}\n","{\n \"moreActions\": \"More actions\"\n}","{\n \"moreActions\": \"Más acciones\"\n}\n","{\n \"moreActions\": \"Veel toiminguid\"\n}\n","{\n \"moreActions\": \"Lisää toimintoja\"\n}\n","{\n \"moreActions\": \"Autres actions\"\n}\n","{\n \"moreActions\": \"פעולות נוספות\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"További lehetőségek\"\n}\n","{\n \"moreActions\": \"Altre azioni\"\n}\n","{\n \"moreActions\": \"その他のアクション\"\n}\n","{\n \"moreActions\": \"기타 작업\"\n}\n","{\n \"moreActions\": \"Daugiau veiksmų\"\n}\n","{\n \"moreActions\": \"Citas darbības\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Meer handelingen\"\n}\n","{\n \"moreActions\": \"Więcej akcji\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mai multe acțiuni\"\n}\n","{\n \"moreActions\": \"Дополнительные действия\"\n}\n","{\n \"moreActions\": \"Ďalšie akcie\"\n}\n","{\n \"moreActions\": \"Več možnosti\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"Fler åtgärder\"\n}\n","{\n \"moreActions\": \"Daha fazla eylem\"\n}\n","{\n \"moreActions\": \"Більше дій\"\n}\n","{\n \"moreActions\": \"更多操作\"\n}\n","{\n \"moreActions\": \"更多動作\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEuBO,KAAK,CAAC,yCAAW,GAAG,sCAAK,CAAC,aAAa,CAAmB,CAAC;AAAA,CAAC;SAEnD,yCAAc,GAAqB,CAAC;IAClD,MAAM,CAAC,uBAAU,CAAC,yCAAW;AAC/B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BD,GAAuC;AACvC,GAA+B;AAC/B,GAA8C;AAC9C,GAAyC;AACzC,GAAoC;AACpC,GAA6B;AAC7B,GAA+B;AAC/B,GAAyC;AACzC,GAAwC;AACxC,GAAmD;AACnD,GAAuC;AACvC,GAAwC;AACxC,GAA+B;AAC/B,GAAmC;AACnC,GAAoC;AACpC,GAA2C;AAC3C,GAAwC;AACxC,GAA4B;AAC5B,GAA4B;AAC5B,GAA4B;AAC5B,GAAgC;AAChC,GAAyB;AACzB,GAA2B;AAC3B,GAA6B;AAvB7B,uCAAuC,GAAG,CAA8B;AACxE,yCAA+B,GAAG,CAAsB;AACxD,yCAA8C,GAAG,CAAqC;AACtF,yCAAyC,GAAG,CAAgC;AAC5E,yCAAoC,GAAG,CAA2B;AAClE,yCAA6B,GAAG,CAAoB;AACpD,yCAA+B,GAAG,CAAsB;AACxD,yCAAyC,GAAG,CAAgC;AAC5E,yCAAwC,GAAG,CAA+B;AAC1E,yCAAmD,GAAG,CAA0C;AAChG,yCAAuC,GAAG,CAA8B;AACxE,yCAAwC,GAAG,CAA+B;AAC1E,yCAA+B,GAAG,CAAsB;AACxD,yCAAmC,GAAG,CAA0B;AAChE,yCAAoC,GAAG,CAA2B;AAClE,yCAA2C,GAAG,CAAkC;AAChF,yCAAwC,GAAG,CAA+B;AAC1E,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;A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rigger.tsx","packages/@react-spectrum/menu/src/context.ts","packages/@adobe/spectrum-css-temp/components/menu/vars.css","packages/@react-spectrum/menu/src/Menu.tsx","packages/@react-spectrum/menu/src/MenuItem.tsx","packages/@react-spectrum/menu/src/MenuSection.tsx","packages/@react-spectrum/menu/src/ActionMenu.tsx","packages/@react-spectrum/menu/intl/*.js","packages/@react-spectrum/menu/intl/ar-AE.json","packages/@react-spectrum/menu/intl/bg-BG.json","packages/@react-spectrum/menu/intl/cs-CZ.json","packages/@react-spectrum/menu/intl/da-DK.json","packages/@react-spectrum/menu/intl/de-DE.json","packages/@react-spectrum/menu/intl/el-GR.json","packages/@react-spectrum/menu/intl/en-US.json","packages/@react-spectrum/menu/intl/es-ES.json","packages/@react-spectrum/menu/intl/et-EE.json","packages/@react-spectrum/menu/intl/fi-FI.json","packages/@react-spectrum/menu/intl/fr-FR.json","packages/@react-spectrum/menu/intl/he-IL.json","packages/@react-spectrum/menu/intl/hr-HR.json","packages/@react-spectrum/menu/intl/hu-HU.json","packages/@react-spectrum/menu/intl/it-IT.json","packages/@react-spectrum/menu/intl/ja-JP.json","packages/@react-spectrum/menu/intl/ko-KR.json","packages/@react-spectrum/menu/intl/lt-LT.json","packages/@react-spectrum/menu/intl/lv-LV.json","packages/@react-spectrum/menu/intl/nb-NO.json","packages/@react-spectrum/menu/intl/nl-NL.json","packages/@react-spectrum/menu/intl/pl-PL.json","packages/@react-spectrum/menu/intl/pt-BR.json","packages/@react-spectrum/menu/intl/pt-PT.json","packages/@react-spectrum/menu/intl/ro-RO.json","packages/@react-spectrum/menu/intl/ru-RU.json","packages/@react-spectrum/menu/intl/sk-SK.json","packages/@react-spectrum/menu/intl/sl-SI.json","packages/@react-spectrum/menu/intl/sr-SP.json","packages/@react-spectrum/menu/intl/sv-SE.json","packages/@react-spectrum/menu/intl/tr-TR.json","packages/@react-spectrum/menu/intl/uk-UA.json","packages/@react-spectrum/menu/intl/zh-CN.json","packages/@react-spectrum/menu/intl/zh-TW.json"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {MenuTrigger} from './MenuTrigger';\nexport {Menu} from './Menu';\nexport {ActionMenu} from './ActionMenu';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumMenuTriggerProps} from '@react-types/menu';\nexport type {SpectrumActionMenuProps, SpectrumMenuProps} from '@react-types/menu';\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 {classNames, SlotProvider, useDOMRef, useIsMobileDevice} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {MenuContext} from './context';\nimport {Placement} from '@react-types/overlays';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {forwardRef, Fragment, useRef} from 'react';\nimport {SpectrumMenuTriggerProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenuTrigger} from '@react-aria/menu';\nimport {useMenuTriggerState} from '@react-stately/menu';\n\nfunction MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>) {\n let triggerRef = useRef<HTMLElement>();\n let domRef = useDOMRef(ref);\n let menuTriggerRef = domRef || triggerRef;\n let menuRef = useRef<HTMLUListElement>();\n let {\n children,\n align = 'start',\n shouldFlip = true,\n direction = 'bottom',\n closeOnSelect,\n trigger = 'press'\n } = props;\n\n let [menuTrigger, menu] = React.Children.toArray(children);\n let state = useMenuTriggerState(props);\n\n let {menuTriggerProps, menuProps} = useMenuTrigger({trigger}, state, menuTriggerRef);\n\n let initialPlacement: Placement;\n switch (direction) {\n case 'left':\n case 'right':\n case 'start':\n case 'end':\n initialPlacement = `${direction} ${align === 'end' ? 'bottom' : 'top'}` as Placement;\n break;\n case 'bottom':\n case 'top':\n default:\n initialPlacement = `${direction} ${align}` as Placement;\n }\n\n let isMobile = useIsMobileDevice();\n let menuContext = {\n ...menuProps,\n ref: menuRef,\n onClose: state.close,\n closeOnSelect,\n autoFocus: state.focusStrategy || true,\n UNSAFE_style: isMobile ? {\n width: '100%',\n maxHeight: 'inherit'\n } : undefined,\n UNSAFE_className: classNames(styles, {'spectrum-Menu-popover': !isMobile})\n };\n\n // On small screen devices, the menu is rendered in a tray, otherwise a popover.\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray state={state}>\n {menu}\n </Tray>\n );\n } else {\n overlay = (\n <Popover\n state={state}\n triggerRef={menuTriggerRef}\n scrollRef={menuRef}\n placement={initialPlacement}\n hideArrow\n shouldFlip={shouldFlip}>\n {menu}\n </Popover>\n );\n }\n\n return (\n <Fragment>\n <SlotProvider slots={{actionButton: {holdAffordance: trigger === 'longPress'}}}>\n <PressResponder {...menuTriggerProps} ref={menuTriggerRef} isPressed={state.isOpen}>\n {menuTrigger}\n </PressResponder>\n </SlotProvider>\n <MenuContext.Provider value={menuContext}>\n {overlay}\n </MenuContext.Provider>\n </Fragment>\n );\n}\n\n/**\n * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,\n * linking the Menu's open state with the trigger's press state.\n */\nlet _MenuTrigger = forwardRef(MenuTrigger);\nexport {_MenuTrigger as MenuTrigger};\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 {FocusStrategy} from '@react-types/shared';\nimport React, {HTMLAttributes, MutableRefObject, useContext} from 'react';\n\nexport interface MenuContextValue extends HTMLAttributes<HTMLElement> {\n onClose?: () => void,\n closeOnSelect?: boolean,\n shouldFocusWrap?: boolean,\n autoFocus?: boolean | FocusStrategy,\n ref?: MutableRefObject<HTMLUListElement>\n}\n\nexport const MenuContext = React.createContext<MenuContextValue>({});\n\nexport function useMenuContext(): MenuContextValue {\n return useContext(MenuContext);\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\n@import './index.css';\n@import './skin.css';\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {MenuContext} from './context';\nimport {MenuItem} from './MenuItem';\nimport {MenuSection} from './MenuSection';\nimport {mergeProps, useSyncRef} from '@react-aria/utils';\nimport React, {ReactElement, useContext} from 'react';\nimport {SpectrumMenuProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenu} from '@react-aria/menu';\nimport {useTreeState} from '@react-stately/tree';\n\nfunction Menu<T extends object>(props: SpectrumMenuProps<T>, ref: DOMRef<HTMLUListElement>) {\n let contextProps = useContext(MenuContext);\n let completeProps = {\n ...mergeProps(contextProps, props)\n };\n\n let domRef = useDOMRef(ref);\n let state = useTreeState(completeProps);\n let {menuProps} = useMenu(completeProps, state, domRef);\n let {styleProps} = useStyleProps(completeProps);\n useSyncRef(contextProps, domRef);\n\n return (\n <ul\n {...menuProps}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }>\n {[...state.collection].map(item => {\n if (item.type === 'section') {\n return (\n <MenuSection\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n }\n\n let menuItem = (\n <MenuItem\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n\n if (item.wrapper) {\n menuItem = item.wrapper(menuItem);\n }\n\n return menuItem;\n })}\n </ul>\n );\n}\n\n/**\n * Menus display a list of actions or options that a user can choose.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Menu = React.forwardRef(Menu) as <T>(props: SpectrumMenuProps<T> & {ref?: DOMRef<HTMLUListElement>}) => ReactElement;\nexport {_Menu as Menu};\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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {Key, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {TreeState} from '@react-stately/tree';\nimport {useHover} from '@react-aria/interactions';\nimport {useMenuContext} from './context';\nimport {useMenuItem} from '@react-aria/menu';\n\ninterface MenuItemProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n isVirtualized?: boolean,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuItem<T>(props: MenuItemProps<T>) {\n let {\n item,\n state,\n isVirtualized,\n onAction\n } = props;\n\n let {\n onClose,\n closeOnSelect\n } = useMenuContext();\n\n let {\n rendered,\n key\n } = item;\n\n let isSelected = state.selectionManager.isSelected(key);\n let isDisabled = state.disabledKeys.has(key);\n\n let ref = useRef<HTMLLIElement>();\n let {menuItemProps, labelProps, descriptionProps, keyboardShortcutProps} = useMenuItem(\n {\n isSelected,\n isDisabled,\n 'aria-label': item['aria-label'],\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <li\n {...mergeProps(menuItemProps, hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n 'is-hovered': isHovered\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n end: {UNSAFE_className: styles['spectrum-Menu-end'], ...descriptionProps},\n icon: {UNSAFE_className: styles['spectrum-Menu-icon'], size: 'S'},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps},\n keyboard: {UNSAFE_className: styles['spectrum-Menu-keyboard'], ...keyboardShortcutProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </li>\n </FocusRing>\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 {classNames} from '@react-spectrum/utils';\nimport {MenuItem} from './MenuItem';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, Key} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {TreeState} from '@react-stately/tree';\nimport {useMenuSection} from '@react-aria/menu';\nimport {useSeparator} from '@react-aria/separator';\n\ninterface MenuSectionProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuSection<T>(props: MenuSectionProps<T>) {\n let {item, state, onAction} = props;\n let {itemProps, headingProps, groupProps} = useMenuSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let {separatorProps} = useSeparator({\n elementType: 'li'\n });\n\n return (\n <Fragment>\n {item.key !== state.collection.getFirstKey() &&\n <li\n {...separatorProps}\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n <li {...itemProps}>\n {item.rendered &&\n <span\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </span>\n }\n <ul\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {[...item.childNodes].map(node => {\n let item = (\n <MenuItem\n key={node.key}\n item={node}\n state={state}\n onAction={onAction} />\n );\n\n if (node.wrapper) {\n item = node.wrapper(item);\n }\n\n return item;\n })}\n </ul>\n </li>\n </Fragment>\n );\n}\n","/*\n * Copyright 2021 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 {ActionButton} from '@react-spectrum/button';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusableRef} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu} from './Menu';\nimport {MenuTrigger} from './MenuTrigger';\nimport More from '@spectrum-icons/workflow/More';\nimport React, {forwardRef, ReactElement} from 'react';\nimport {SpectrumActionMenuProps} from '@react-types/menu';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSlotProps} from '@react-spectrum/utils';\n\nfunction ActionMenu<T extends object>(props: SpectrumActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n props = useSlotProps(props, 'actionMenu');\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n {...props}\n {...buttonProps}>\n <More />\n </ActionButton>\n <Menu\n children={props.children}\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction} />\n </MenuTrigger>\n );\n}\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nconst _ActionMenu = forwardRef(ActionMenu) as <T>(props: SpectrumActionMenuProps<T> & {ref?: FocusableRef<HTMLButtonElement>}) => ReactElement;\nexport {_ActionMenu as ActionMenu};\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 \"moreActions\": \"المزيد من الإجراءات\"\n}\n","{\n \"moreActions\": \"Повече действия\"\n}\n","{\n \"moreActions\": \"Další akce\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Mehr Aktionen\"\n}\n","{\n \"moreActions\": \"Περισσότερες ενέργειες\"\n}\n","{\n \"moreActions\": \"More actions\"\n}","{\n \"moreActions\": \"Más acciones\"\n}\n","{\n \"moreActions\": \"Veel toiminguid\"\n}\n","{\n \"moreActions\": \"Lisää toimintoja\"\n}\n","{\n \"moreActions\": \"Autres actions\"\n}\n","{\n \"moreActions\": \"פעולות נוספות\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"További lehetőségek\"\n}\n","{\n \"moreActions\": \"Altre azioni\"\n}\n","{\n \"moreActions\": \"その他のアクション\"\n}\n","{\n \"moreActions\": \"기타 작업\"\n}\n","{\n \"moreActions\": \"Daugiau veiksmų\"\n}\n","{\n \"moreActions\": \"Citas darbības\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Meer handelingen\"\n}\n","{\n \"moreActions\": \"Więcej akcji\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mai multe acțiuni\"\n}\n","{\n \"moreActions\": \"Дополнительные действия\"\n}\n","{\n \"moreActions\": \"Ďalšie akcie\"\n}\n","{\n \"moreActions\": \"Več možnosti\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"Fler åtgärder\"\n}\n","{\n \"moreActions\": \"Daha fazla eylem\"\n}\n","{\n \"moreActions\": \"Більше дій\"\n}\n","{\n \"moreActions\": \"更多操作\"\n}\n","{\n \"moreActions\": \"更多動作\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import "./main.css";
2
2
  import {Item as $5ae296f2d6923e14$re_export$Item, Section as $5ae296f2d6923e14$re_export$Section} from "@react-stately/collections";
3
- import {useDOMRef as $9SHwR$useDOMRef, useIsMobileDevice as $9SHwR$useIsMobileDevice, unwrapDOMRef as $9SHwR$unwrapDOMRef, classNames as $9SHwR$classNames, SlotProvider as $9SHwR$SlotProvider, useStyleProps as $9SHwR$useStyleProps, ClearSlots as $9SHwR$ClearSlots, useSlotProps as $9SHwR$useSlotProps} from "@react-spectrum/utils";
4
- import {useOverlayPosition as $9SHwR$useOverlayPosition, DismissButton as $9SHwR$DismissButton} from "@react-aria/overlays";
5
- import {FocusScope as $9SHwR$FocusScope, FocusRing as $9SHwR$FocusRing} from "@react-aria/focus";
3
+ import {useDOMRef as $9SHwR$useDOMRef, useIsMobileDevice as $9SHwR$useIsMobileDevice, classNames as $9SHwR$classNames, SlotProvider as $9SHwR$SlotProvider, useStyleProps as $9SHwR$useStyleProps, ClearSlots as $9SHwR$ClearSlots, useSlotProps as $9SHwR$useSlotProps} from "@react-spectrum/utils";
6
4
  import {Tray as $9SHwR$Tray, Popover as $9SHwR$Popover} from "@react-spectrum/overlays";
7
5
  import {PressResponder as $9SHwR$PressResponder, useHover as $9SHwR$useHover} from "@react-aria/interactions";
8
6
  import $9SHwR$react, {useRef as $9SHwR$useRef, Fragment as $9SHwR$Fragment, forwardRef as $9SHwR$forwardRef, useContext as $9SHwR$useContext} from "react";
@@ -11,6 +9,7 @@ import {useMenuTriggerState as $9SHwR$useMenuTriggerState} from "@react-stately/
11
9
  import {mergeProps as $9SHwR$mergeProps, useSyncRef as $9SHwR$useSyncRef, filterDOMProps as $9SHwR$filterDOMProps} from "@react-aria/utils";
12
10
  import {useTreeState as $9SHwR$useTreeState} from "@react-stately/tree";
13
11
  import $9SHwR$spectrumiconsuiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
12
+ import {FocusRing as $9SHwR$FocusRing} from "@react-aria/focus";
14
13
  import {Grid as $9SHwR$Grid} from "@react-spectrum/layout";
15
14
  import {Text as $9SHwR$Text} from "@react-spectrum/text";
16
15
  import {useSeparator as $9SHwR$useSeparator} from "@react-aria/separator";
@@ -26,8 +25,6 @@ function $parcel$export(e, n, v, s) {
26
25
  }
27
26
 
28
27
 
29
-
30
-
31
28
  const $d94604d52c3e3feb$export$c7e742effb1c51e2 = $9SHwR$react.createContext({
32
29
  });
33
30
  function $d94604d52c3e3feb$export$21c7ab35b39f78ec() {
@@ -117,7 +114,6 @@ $286d1cb34bb7dc84$export$d35bc1e505d1ebbf = "is-disabled_7ea47c";
117
114
 
118
115
 
119
116
  function $aa0b855f135b86e3$var$MenuTrigger(props, ref) {
120
- let menuPopoverRef = $9SHwR$useRef();
121
117
  let triggerRef = $9SHwR$useRef();
122
118
  let domRef = $9SHwR$useDOMRef(ref);
123
119
  let menuTriggerRef = domRef || triggerRef;
@@ -142,15 +138,6 @@ function $aa0b855f135b86e3$var$MenuTrigger(props, ref) {
142
138
  initialPlacement = `${direction} ${align}`;
143
139
  }
144
140
  let isMobile = $9SHwR$useIsMobileDevice();
145
- let { overlayProps: positionProps , placement: placement } = $9SHwR$useOverlayPosition({
146
- targetRef: menuTriggerRef,
147
- overlayRef: $9SHwR$unwrapDOMRef(menuPopoverRef),
148
- scrollRef: menuRef,
149
- placement: initialPlacement,
150
- shouldFlip: shouldFlip,
151
- isOpen: state.isOpen && !isMobile,
152
- onClose: state.close
153
- });
154
141
  let menuContext = {
155
142
  ...menuProps,
156
143
  ref: menuRef,
@@ -165,31 +152,19 @@ function $aa0b855f135b86e3$var$MenuTrigger(props, ref) {
165
152
  'spectrum-Menu-popover': !isMobile
166
153
  })
167
154
  };
168
- // Only contain focus while the menu is open. There is a fade out transition during which we may try to move focus.
169
- // If we contain, then focus will be pulled back into the menu.
170
- let contents = /*#__PURE__*/ $9SHwR$react.createElement($9SHwR$FocusScope, {
171
- restoreFocus: true,
172
- contain: isMobile && state.isOpen
173
- }, /*#__PURE__*/ $9SHwR$react.createElement($9SHwR$DismissButton, {
174
- onDismiss: state.close
175
- }), menu, /*#__PURE__*/ $9SHwR$react.createElement($9SHwR$DismissButton, {
176
- onDismiss: state.close
177
- }));
178
155
  // On small screen devices, the menu is rendered in a tray, otherwise a popover.
179
156
  let overlay;
180
157
  if (isMobile) overlay = /*#__PURE__*/ $9SHwR$react.createElement($9SHwR$Tray, {
181
- isOpen: state.isOpen,
182
- onClose: state.close
183
- }, contents);
158
+ state: state
159
+ }, menu);
184
160
  else overlay = /*#__PURE__*/ $9SHwR$react.createElement($9SHwR$Popover, {
185
- isOpen: state.isOpen,
186
- UNSAFE_style: positionProps.style,
187
- ref: menuPopoverRef,
188
- placement: placement,
161
+ state: state,
162
+ triggerRef: menuTriggerRef,
163
+ scrollRef: menuRef,
164
+ placement: initialPlacement,
189
165
  hideArrow: true,
190
- onClose: state.close,
191
- shouldCloseOnBlur: true
192
- }, contents);
166
+ shouldFlip: shouldFlip
167
+ }, menu);
193
168
  return(/*#__PURE__*/ $9SHwR$react.createElement($9SHwR$Fragment, null, /*#__PURE__*/ $9SHwR$react.createElement($9SHwR$SlotProvider, {
194
169
  slots: {
195
170
  actionButton: {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEuBO,KAAK,CAAC,yCAAW,GAAG,YAAK,CAAC,aAAa,CAAmB,CAAC;AAAA,CAAC;SAEnD,yCAAc,GAAqB,CAAC;IAClD,MAAM,CAAC,iBAAU,CAAC,yCAAW;AAC/B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BD,GAAuC;AACvC,GAA+B;AAC/B,GAA8C;AAC9C,GAAyC;AACzC,GAAoC;AACpC,GAA6B;AAC7B,GAA+B;AAC/B,GAAyC;AACzC,GAAwC;AACxC,GAAmD;AACnD,GAAuC;AACvC,GAAwC;AACxC,GAA+B;AAC/B,GAAmC;AACnC,GAAoC;AACpC,GAA2C;AAC3C,GAAwC;AACxC,GAA4B;AAC5B,GAA4B;AAC5B,GAA4B;AAC5B,GAAgC;AAChC,GAAyB;AACzB,GAA2B;AAC3B,GAA6B;AAvB7B,uCAAuC,GAAG,CAA8B;AACxE,yCAA+B,GAAG,CAAsB;AACxD,yCAA8C,GAAG,CAAqC;AACtF,yCAAyC,GAAG,CAAgC;AAC5E,yCAAoC,GAAG,CAA2B;AAClE,yCAA6B,GAAG,CAAoB;AACpD,yCAA+B,GAAG,CAAsB;AACxD,yCAAyC,GAAG,CAAgC;AAC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E,yBAAO;IAChB,CAAO,QAAE,yBAAO;AAClB,CAAC;;;;;;;;;SD5CQ,gCAAU,CAAmB,KAAiC,EAAE,GAAoC,EAAE,CAAC;IAC9G,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAY;IACxC,GAAG,CAAC,eAAe,GAAG,kCAA2B,CAAC,gEAAY;IAC9D,GAAG,CAAC,WAAW,GAAG,qBAAc,CAAC,KAAK,EAAE,CAAC;QAAA,SAAS,EAAE,IAAI;IAAA,CAAC;IACzD,EAAE,EAAE,WAAW,CAAC,CAAY,iBAAM,SAAS,EACzC,WAAW,CAAC,CAAY,eAAI,eAAe,CAAC,MAAM,CAAC,CAAa;IAGlE,MAAM,0CACH,yCAAW;QACV,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;gDAC3B,mBAAY;QACX,GAAG,EAAE,GAAG;WACJ,KAAK;WACL,WAAW;gDACd,gCAAI,mDAEN,yCAAI;QACH,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;;AAGhC,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,iBAAU,CAAC,gCAAU;","sources":["packages/@react-spectrum/menu/src/index.ts","packages/@react-spectrum/menu/src/MenuTrigger.tsx","packages/@react-spectrum/menu/src/context.ts","packages/@adobe/spectrum-css-temp/components/menu/vars.css","packages/@react-spectrum/menu/src/Menu.tsx","packages/@react-spectrum/menu/src/MenuItem.tsx","packages/@react-spectrum/menu/src/MenuSection.tsx","packages/@react-spectrum/menu/src/ActionMenu.tsx","packages/@react-spectrum/menu/intl/*.js","packages/@react-spectrum/menu/intl/ar-AE.json","packages/@react-spectrum/menu/intl/bg-BG.json","packages/@react-spectrum/menu/intl/cs-CZ.json","packages/@react-spectrum/menu/intl/da-DK.json","packages/@react-spectrum/menu/intl/de-DE.json","packages/@react-spectrum/menu/intl/el-GR.json","packages/@react-spectrum/menu/intl/en-US.json","packages/@react-spectrum/menu/intl/es-ES.json","packages/@react-spectrum/menu/intl/et-EE.json","packages/@react-spectrum/menu/intl/fi-FI.json","packages/@react-spectrum/menu/intl/fr-FR.json","packages/@react-spectrum/menu/intl/he-IL.json","packages/@react-spectrum/menu/intl/hr-HR.json","packages/@react-spectrum/menu/intl/hu-HU.json","packages/@react-spectrum/menu/intl/it-IT.json","packages/@react-spectrum/menu/intl/ja-JP.json","packages/@react-spectrum/menu/intl/ko-KR.json","packages/@react-spectrum/menu/intl/lt-LT.json","packages/@react-spectrum/menu/intl/lv-LV.json","packages/@react-spectrum/menu/intl/nb-NO.json","packages/@react-spectrum/menu/intl/nl-NL.json","packages/@react-spectrum/menu/intl/pl-PL.json","packages/@react-spectrum/menu/intl/pt-BR.json","packages/@react-spectrum/menu/intl/pt-PT.json","packages/@react-spectrum/menu/intl/ro-RO.json","packages/@react-spectrum/menu/intl/ru-RU.json","packages/@react-spectrum/menu/intl/sk-SK.json","packages/@react-spectrum/menu/intl/sl-SI.json","packages/@react-spectrum/menu/intl/sr-SP.json","packages/@react-spectrum/menu/intl/sv-SE.json","packages/@react-spectrum/menu/intl/tr-TR.json","packages/@react-spectrum/menu/intl/uk-UA.json","packages/@react-spectrum/menu/intl/zh-CN.json","packages/@react-spectrum/menu/intl/zh-TW.json"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {MenuTrigger} from './MenuTrigger';\nexport {Menu} from './Menu';\nexport {ActionMenu} from './ActionMenu';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumMenuTriggerProps} from '@react-types/menu';\nexport type {SpectrumActionMenuProps, SpectrumMenuProps} from '@react-types/menu';\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 {classNames, SlotProvider, unwrapDOMRef, useDOMRef, useIsMobileDevice} from '@react-spectrum/utils';\nimport {DismissButton, useOverlayPosition} from '@react-aria/overlays';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {FocusScope} from '@react-aria/focus';\nimport {MenuContext} from './context';\nimport {Placement} from '@react-types/overlays';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {forwardRef, Fragment, useRef} from 'react';\nimport {SpectrumMenuTriggerProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenuTrigger} from '@react-aria/menu';\nimport {useMenuTriggerState} from '@react-stately/menu';\n\nfunction MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>) {\n let menuPopoverRef = useRef<DOMRefValue<HTMLDivElement>>();\n let triggerRef = useRef<HTMLElement>();\n let domRef = useDOMRef(ref);\n let menuTriggerRef = domRef || triggerRef;\n let menuRef = useRef<HTMLUListElement>();\n let {\n children,\n align = 'start',\n shouldFlip = true,\n direction = 'bottom',\n closeOnSelect,\n trigger = 'press'\n } = props;\n\n let [menuTrigger, menu] = React.Children.toArray(children);\n let state = useMenuTriggerState(props);\n\n let {menuTriggerProps, menuProps} = useMenuTrigger({trigger}, state, menuTriggerRef);\n\n let initialPlacement: Placement;\n switch (direction) {\n case 'left':\n case 'right':\n case 'start':\n case 'end':\n initialPlacement = `${direction} ${align === 'end' ? 'bottom' : 'top'}` as Placement;\n break;\n case 'bottom':\n case 'top':\n default:\n initialPlacement = `${direction} ${align}` as Placement;\n }\n\n let isMobile = useIsMobileDevice();\n let {overlayProps: positionProps, placement} = useOverlayPosition({\n targetRef: menuTriggerRef,\n overlayRef: unwrapDOMRef(menuPopoverRef),\n scrollRef: menuRef,\n placement: initialPlacement,\n shouldFlip: shouldFlip,\n isOpen: state.isOpen && !isMobile,\n onClose: state.close\n });\n\n let menuContext = {\n ...menuProps,\n ref: menuRef,\n onClose: state.close,\n closeOnSelect,\n autoFocus: state.focusStrategy || true,\n UNSAFE_style: isMobile ? {\n width: '100%',\n maxHeight: 'inherit'\n } : undefined,\n UNSAFE_className: classNames(styles, {'spectrum-Menu-popover': !isMobile})\n };\n\n // Only contain focus while the menu is open. There is a fade out transition during which we may try to move focus.\n // If we contain, then focus will be pulled back into the menu.\n let contents = (\n <FocusScope restoreFocus contain={isMobile && state.isOpen}>\n <DismissButton onDismiss={state.close} />\n {menu}\n <DismissButton onDismiss={state.close} />\n </FocusScope>\n );\n\n // On small screen devices, the menu is rendered in a tray, otherwise a popover.\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray isOpen={state.isOpen} onClose={state.close}>\n {contents}\n </Tray>\n );\n } else {\n overlay = (\n <Popover\n isOpen={state.isOpen}\n UNSAFE_style={positionProps.style}\n ref={menuPopoverRef}\n placement={placement}\n hideArrow\n onClose={state.close}\n shouldCloseOnBlur>\n {contents}\n </Popover>\n );\n }\n\n return (\n <Fragment>\n <SlotProvider slots={{actionButton: {holdAffordance: trigger === 'longPress'}}}>\n <PressResponder {...menuTriggerProps} ref={menuTriggerRef} isPressed={state.isOpen}>\n {menuTrigger}\n </PressResponder>\n </SlotProvider>\n <MenuContext.Provider value={menuContext}>\n {overlay}\n </MenuContext.Provider>\n </Fragment>\n );\n}\n\n/**\n * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,\n * linking the Menu's open state with the trigger's press state.\n */\nlet _MenuTrigger = forwardRef(MenuTrigger);\nexport {_MenuTrigger as MenuTrigger};\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 {FocusStrategy} from '@react-types/shared';\nimport React, {HTMLAttributes, MutableRefObject, useContext} from 'react';\n\nexport interface MenuContextValue extends HTMLAttributes<HTMLElement> {\n onClose?: () => void,\n closeOnSelect?: boolean,\n shouldFocusWrap?: boolean,\n autoFocus?: boolean | FocusStrategy,\n ref?: MutableRefObject<HTMLUListElement>\n}\n\nexport const MenuContext = React.createContext<MenuContextValue>({});\n\nexport function useMenuContext(): MenuContextValue {\n return useContext(MenuContext);\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\n@import './index.css';\n@import './skin.css';\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {MenuContext} from './context';\nimport {MenuItem} from './MenuItem';\nimport {MenuSection} from './MenuSection';\nimport {mergeProps, useSyncRef} from '@react-aria/utils';\nimport React, {ReactElement, useContext} from 'react';\nimport {SpectrumMenuProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenu} from '@react-aria/menu';\nimport {useTreeState} from '@react-stately/tree';\n\nfunction Menu<T extends object>(props: SpectrumMenuProps<T>, ref: DOMRef<HTMLUListElement>) {\n let contextProps = useContext(MenuContext);\n let completeProps = {\n ...mergeProps(contextProps, props)\n };\n\n let domRef = useDOMRef(ref);\n let state = useTreeState(completeProps);\n let {menuProps} = useMenu(completeProps, state, domRef);\n let {styleProps} = useStyleProps(completeProps);\n useSyncRef(contextProps, domRef);\n\n return (\n <ul\n {...menuProps}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }>\n {[...state.collection].map(item => {\n if (item.type === 'section') {\n return (\n <MenuSection\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n }\n\n let menuItem = (\n <MenuItem\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n\n if (item.wrapper) {\n menuItem = item.wrapper(menuItem);\n }\n\n return menuItem;\n })}\n </ul>\n );\n}\n\n/**\n * Menus display a list of actions or options that a user can choose.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Menu = React.forwardRef(Menu) as <T>(props: SpectrumMenuProps<T> & {ref?: DOMRef<HTMLUListElement>}) => ReactElement;\nexport {_Menu as Menu};\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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {Key, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {TreeState} from '@react-stately/tree';\nimport {useHover} from '@react-aria/interactions';\nimport {useMenuContext} from './context';\nimport {useMenuItem} from '@react-aria/menu';\n\ninterface MenuItemProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n isVirtualized?: boolean,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuItem<T>(props: MenuItemProps<T>) {\n let {\n item,\n state,\n isVirtualized,\n onAction\n } = props;\n\n let {\n onClose,\n closeOnSelect\n } = useMenuContext();\n\n let {\n rendered,\n key\n } = item;\n\n let isSelected = state.selectionManager.isSelected(key);\n let isDisabled = state.disabledKeys.has(key);\n\n let ref = useRef<HTMLLIElement>();\n let {menuItemProps, labelProps, descriptionProps, keyboardShortcutProps} = useMenuItem(\n {\n isSelected,\n isDisabled,\n 'aria-label': item['aria-label'],\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <li\n {...mergeProps(menuItemProps, hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n 'is-hovered': isHovered\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n end: {UNSAFE_className: styles['spectrum-Menu-end'], ...descriptionProps},\n icon: {UNSAFE_className: styles['spectrum-Menu-icon'], size: 'S'},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps},\n keyboard: {UNSAFE_className: styles['spectrum-Menu-keyboard'], ...keyboardShortcutProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </li>\n </FocusRing>\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 {classNames} from '@react-spectrum/utils';\nimport {MenuItem} from './MenuItem';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, Key} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {TreeState} from '@react-stately/tree';\nimport {useMenuSection} from '@react-aria/menu';\nimport {useSeparator} from '@react-aria/separator';\n\ninterface MenuSectionProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuSection<T>(props: MenuSectionProps<T>) {\n let {item, state, onAction} = props;\n let {itemProps, headingProps, groupProps} = useMenuSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let {separatorProps} = useSeparator({\n elementType: 'li'\n });\n\n return (\n <Fragment>\n {item.key !== state.collection.getFirstKey() &&\n <li\n {...separatorProps}\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n <li {...itemProps}>\n {item.rendered &&\n <span\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </span>\n }\n <ul\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {[...item.childNodes].map(node => {\n let item = (\n <MenuItem\n key={node.key}\n item={node}\n state={state}\n onAction={onAction} />\n );\n\n if (node.wrapper) {\n item = node.wrapper(item);\n }\n\n return item;\n })}\n </ul>\n </li>\n </Fragment>\n );\n}\n","/*\n * Copyright 2021 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 {ActionButton} from '@react-spectrum/button';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusableRef} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu} from './Menu';\nimport {MenuTrigger} from './MenuTrigger';\nimport More from '@spectrum-icons/workflow/More';\nimport React, {forwardRef, ReactElement} from 'react';\nimport {SpectrumActionMenuProps} from '@react-types/menu';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSlotProps} from '@react-spectrum/utils';\n\nfunction ActionMenu<T extends object>(props: SpectrumActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n props = useSlotProps(props, 'actionMenu');\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n {...props}\n {...buttonProps}>\n <More />\n </ActionButton>\n <Menu\n children={props.children}\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction} />\n </MenuTrigger>\n );\n}\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nconst _ActionMenu = forwardRef(ActionMenu) as <T>(props: SpectrumActionMenuProps<T> & {ref?: FocusableRef<HTMLButtonElement>}) => ReactElement;\nexport {_ActionMenu as ActionMenu};\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 \"moreActions\": \"المزيد من الإجراءات\"\n}\n","{\n \"moreActions\": \"Повече действия\"\n}\n","{\n \"moreActions\": \"Další akce\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Mehr Aktionen\"\n}\n","{\n \"moreActions\": \"Περισσότερες ενέργειες\"\n}\n","{\n \"moreActions\": \"More actions\"\n}","{\n \"moreActions\": \"Más acciones\"\n}\n","{\n \"moreActions\": \"Veel toiminguid\"\n}\n","{\n \"moreActions\": \"Lisää toimintoja\"\n}\n","{\n \"moreActions\": \"Autres actions\"\n}\n","{\n \"moreActions\": \"פעולות נוספות\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"További lehetőségek\"\n}\n","{\n \"moreActions\": \"Altre azioni\"\n}\n","{\n \"moreActions\": \"その他のアクション\"\n}\n","{\n \"moreActions\": \"기타 작업\"\n}\n","{\n \"moreActions\": \"Daugiau veiksmų\"\n}\n","{\n \"moreActions\": \"Citas darbības\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Meer handelingen\"\n}\n","{\n \"moreActions\": \"Więcej akcji\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mai multe acțiuni\"\n}\n","{\n \"moreActions\": \"Дополнительные действия\"\n}\n","{\n \"moreActions\": \"Ďalšie akcie\"\n}\n","{\n \"moreActions\": \"Več možnosti\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"Fler åtgärder\"\n}\n","{\n \"moreActions\": \"Daha fazla eylem\"\n}\n","{\n \"moreActions\": \"Більше дій\"\n}\n","{\n \"moreActions\": \"更多操作\"\n}\n","{\n \"moreActions\": \"更多動作\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
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AE,yBAAO;IAChB,CAAO,QAAE,yBAAO;IAChB,CAAO,QAAE,yBAAO;AAClB,CAAC;;;;;;;;;SD5CQ,gCAAU,CAAmB,KAAiC,EAAE,GAAoC,EAAE,CAAC;IAC9G,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAY;IACxC,GAAG,CAAC,eAAe,GAAG,kCAA2B,CAAC,gEAAY;IAC9D,GAAG,CAAC,WAAW,GAAG,qBAAc,CAAC,KAAK,EAAE,CAAC;QAAA,SAAS,EAAE,IAAI;IAAA,CAAC;IACzD,EAAE,EAAE,WAAW,CAAC,CAAY,iBAAM,SAAS,EACzC,WAAW,CAAC,CAAY,eAAI,eAAe,CAAC,MAAM,CAAC,CAAa;IAGlE,MAAM,0CACH,yCAAW;QACV,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;gDAC3B,mBAAY;QACX,GAAG,EAAE,GAAG;WACJ,KAAK;WACL,WAAW;gDACd,gCAAI,mDAEN,yCAAI;QACH,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;;AAGhC,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,iBAAU,CAAC,gCAAU;","sources":["packages/@react-spectrum/menu/src/index.ts","packages/@react-spectrum/menu/src/MenuTrigger.tsx","packages/@react-spectrum/menu/src/context.ts","packages/@adobe/spectrum-css-temp/components/menu/vars.css","packages/@react-spectrum/menu/src/Menu.tsx","packages/@react-spectrum/menu/src/MenuItem.tsx","packages/@react-spectrum/menu/src/MenuSection.tsx","packages/@react-spectrum/menu/src/ActionMenu.tsx","packages/@react-spectrum/menu/intl/*.js","packages/@react-spectrum/menu/intl/ar-AE.json","packages/@react-spectrum/menu/intl/bg-BG.json","packages/@react-spectrum/menu/intl/cs-CZ.json","packages/@react-spectrum/menu/intl/da-DK.json","packages/@react-spectrum/menu/intl/de-DE.json","packages/@react-spectrum/menu/intl/el-GR.json","packages/@react-spectrum/menu/intl/en-US.json","packages/@react-spectrum/menu/intl/es-ES.json","packages/@react-spectrum/menu/intl/et-EE.json","packages/@react-spectrum/menu/intl/fi-FI.json","packages/@react-spectrum/menu/intl/fr-FR.json","packages/@react-spectrum/menu/intl/he-IL.json","packages/@react-spectrum/menu/intl/hr-HR.json","packages/@react-spectrum/menu/intl/hu-HU.json","packages/@react-spectrum/menu/intl/it-IT.json","packages/@react-spectrum/menu/intl/ja-JP.json","packages/@react-spectrum/menu/intl/ko-KR.json","packages/@react-spectrum/menu/intl/lt-LT.json","packages/@react-spectrum/menu/intl/lv-LV.json","packages/@react-spectrum/menu/intl/nb-NO.json","packages/@react-spectrum/menu/intl/nl-NL.json","packages/@react-spectrum/menu/intl/pl-PL.json","packages/@react-spectrum/menu/intl/pt-BR.json","packages/@react-spectrum/menu/intl/pt-PT.json","packages/@react-spectrum/menu/intl/ro-RO.json","packages/@react-spectrum/menu/intl/ru-RU.json","packages/@react-spectrum/menu/intl/sk-SK.json","packages/@react-spectrum/menu/intl/sl-SI.json","packages/@react-spectrum/menu/intl/sr-SP.json","packages/@react-spectrum/menu/intl/sv-SE.json","packages/@react-spectrum/menu/intl/tr-TR.json","packages/@react-spectrum/menu/intl/uk-UA.json","packages/@react-spectrum/menu/intl/zh-CN.json","packages/@react-spectrum/menu/intl/zh-TW.json"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {MenuTrigger} from './MenuTrigger';\nexport {Menu} from './Menu';\nexport {ActionMenu} from './ActionMenu';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumMenuTriggerProps} from '@react-types/menu';\nexport type {SpectrumActionMenuProps, SpectrumMenuProps} from '@react-types/menu';\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 {classNames, SlotProvider, useDOMRef, useIsMobileDevice} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {MenuContext} from './context';\nimport {Placement} from '@react-types/overlays';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {forwardRef, Fragment, useRef} from 'react';\nimport {SpectrumMenuTriggerProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenuTrigger} from '@react-aria/menu';\nimport {useMenuTriggerState} from '@react-stately/menu';\n\nfunction MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>) {\n let triggerRef = useRef<HTMLElement>();\n let domRef = useDOMRef(ref);\n let menuTriggerRef = domRef || triggerRef;\n let menuRef = useRef<HTMLUListElement>();\n let {\n children,\n align = 'start',\n shouldFlip = true,\n direction = 'bottom',\n closeOnSelect,\n trigger = 'press'\n } = props;\n\n let [menuTrigger, menu] = React.Children.toArray(children);\n let state = useMenuTriggerState(props);\n\n let {menuTriggerProps, menuProps} = useMenuTrigger({trigger}, state, menuTriggerRef);\n\n let initialPlacement: Placement;\n switch (direction) {\n case 'left':\n case 'right':\n case 'start':\n case 'end':\n initialPlacement = `${direction} ${align === 'end' ? 'bottom' : 'top'}` as Placement;\n break;\n case 'bottom':\n case 'top':\n default:\n initialPlacement = `${direction} ${align}` as Placement;\n }\n\n let isMobile = useIsMobileDevice();\n let menuContext = {\n ...menuProps,\n ref: menuRef,\n onClose: state.close,\n closeOnSelect,\n autoFocus: state.focusStrategy || true,\n UNSAFE_style: isMobile ? {\n width: '100%',\n maxHeight: 'inherit'\n } : undefined,\n UNSAFE_className: classNames(styles, {'spectrum-Menu-popover': !isMobile})\n };\n\n // On small screen devices, the menu is rendered in a tray, otherwise a popover.\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray state={state}>\n {menu}\n </Tray>\n );\n } else {\n overlay = (\n <Popover\n state={state}\n triggerRef={menuTriggerRef}\n scrollRef={menuRef}\n placement={initialPlacement}\n hideArrow\n shouldFlip={shouldFlip}>\n {menu}\n </Popover>\n );\n }\n\n return (\n <Fragment>\n <SlotProvider slots={{actionButton: {holdAffordance: trigger === 'longPress'}}}>\n <PressResponder {...menuTriggerProps} ref={menuTriggerRef} isPressed={state.isOpen}>\n {menuTrigger}\n </PressResponder>\n </SlotProvider>\n <MenuContext.Provider value={menuContext}>\n {overlay}\n </MenuContext.Provider>\n </Fragment>\n );\n}\n\n/**\n * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,\n * linking the Menu's open state with the trigger's press state.\n */\nlet _MenuTrigger = forwardRef(MenuTrigger);\nexport {_MenuTrigger as MenuTrigger};\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 {FocusStrategy} from '@react-types/shared';\nimport React, {HTMLAttributes, MutableRefObject, useContext} from 'react';\n\nexport interface MenuContextValue extends HTMLAttributes<HTMLElement> {\n onClose?: () => void,\n closeOnSelect?: boolean,\n shouldFocusWrap?: boolean,\n autoFocus?: boolean | FocusStrategy,\n ref?: MutableRefObject<HTMLUListElement>\n}\n\nexport const MenuContext = React.createContext<MenuContextValue>({});\n\nexport function useMenuContext(): MenuContextValue {\n return useContext(MenuContext);\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\n@import './index.css';\n@import './skin.css';\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {MenuContext} from './context';\nimport {MenuItem} from './MenuItem';\nimport {MenuSection} from './MenuSection';\nimport {mergeProps, useSyncRef} from '@react-aria/utils';\nimport React, {ReactElement, useContext} from 'react';\nimport {SpectrumMenuProps} from '@react-types/menu';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useMenu} from '@react-aria/menu';\nimport {useTreeState} from '@react-stately/tree';\n\nfunction Menu<T extends object>(props: SpectrumMenuProps<T>, ref: DOMRef<HTMLUListElement>) {\n let contextProps = useContext(MenuContext);\n let completeProps = {\n ...mergeProps(contextProps, props)\n };\n\n let domRef = useDOMRef(ref);\n let state = useTreeState(completeProps);\n let {menuProps} = useMenu(completeProps, state, domRef);\n let {styleProps} = useStyleProps(completeProps);\n useSyncRef(contextProps, domRef);\n\n return (\n <ul\n {...menuProps}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }>\n {[...state.collection].map(item => {\n if (item.type === 'section') {\n return (\n <MenuSection\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n }\n\n let menuItem = (\n <MenuItem\n key={item.key}\n item={item}\n state={state}\n onAction={completeProps.onAction} />\n );\n\n if (item.wrapper) {\n menuItem = item.wrapper(menuItem);\n }\n\n return menuItem;\n })}\n </ul>\n );\n}\n\n/**\n * Menus display a list of actions or options that a user can choose.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Menu = React.forwardRef(Menu) as <T>(props: SpectrumMenuProps<T> & {ref?: DOMRef<HTMLUListElement>}) => ReactElement;\nexport {_Menu as Menu};\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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {Key, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {TreeState} from '@react-stately/tree';\nimport {useHover} from '@react-aria/interactions';\nimport {useMenuContext} from './context';\nimport {useMenuItem} from '@react-aria/menu';\n\ninterface MenuItemProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n isVirtualized?: boolean,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuItem<T>(props: MenuItemProps<T>) {\n let {\n item,\n state,\n isVirtualized,\n onAction\n } = props;\n\n let {\n onClose,\n closeOnSelect\n } = useMenuContext();\n\n let {\n rendered,\n key\n } = item;\n\n let isSelected = state.selectionManager.isSelected(key);\n let isDisabled = state.disabledKeys.has(key);\n\n let ref = useRef<HTMLLIElement>();\n let {menuItemProps, labelProps, descriptionProps, keyboardShortcutProps} = useMenuItem(\n {\n isSelected,\n isDisabled,\n 'aria-label': item['aria-label'],\n key,\n onClose,\n closeOnSelect,\n isVirtualized,\n onAction\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <li\n {...mergeProps(menuItemProps, hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n 'is-hovered': isHovered\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n end: {UNSAFE_className: styles['spectrum-Menu-end'], ...descriptionProps},\n icon: {UNSAFE_className: styles['spectrum-Menu-icon'], size: 'S'},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps},\n keyboard: {UNSAFE_className: styles['spectrum-Menu-keyboard'], ...keyboardShortcutProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </li>\n </FocusRing>\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 {classNames} from '@react-spectrum/utils';\nimport {MenuItem} from './MenuItem';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, Key} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {TreeState} from '@react-stately/tree';\nimport {useMenuSection} from '@react-aria/menu';\nimport {useSeparator} from '@react-aria/separator';\n\ninterface MenuSectionProps<T> {\n item: Node<T>,\n state: TreeState<T>,\n onAction?: (key: Key) => void\n}\n\n/** @private */\nexport function MenuSection<T>(props: MenuSectionProps<T>) {\n let {item, state, onAction} = props;\n let {itemProps, headingProps, groupProps} = useMenuSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let {separatorProps} = useSeparator({\n elementType: 'li'\n });\n\n return (\n <Fragment>\n {item.key !== state.collection.getFirstKey() &&\n <li\n {...separatorProps}\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n <li {...itemProps}>\n {item.rendered &&\n <span\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </span>\n }\n <ul\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {[...item.childNodes].map(node => {\n let item = (\n <MenuItem\n key={node.key}\n item={node}\n state={state}\n onAction={onAction} />\n );\n\n if (node.wrapper) {\n item = node.wrapper(item);\n }\n\n return item;\n })}\n </ul>\n </li>\n </Fragment>\n );\n}\n","/*\n * Copyright 2021 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 {ActionButton} from '@react-spectrum/button';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusableRef} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu} from './Menu';\nimport {MenuTrigger} from './MenuTrigger';\nimport More from '@spectrum-icons/workflow/More';\nimport React, {forwardRef, ReactElement} from 'react';\nimport {SpectrumActionMenuProps} from '@react-types/menu';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSlotProps} from '@react-spectrum/utils';\n\nfunction ActionMenu<T extends object>(props: SpectrumActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n props = useSlotProps(props, 'actionMenu');\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n {...props}\n {...buttonProps}>\n <More />\n </ActionButton>\n <Menu\n children={props.children}\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction} />\n </MenuTrigger>\n );\n}\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nconst _ActionMenu = forwardRef(ActionMenu) as <T>(props: SpectrumActionMenuProps<T> & {ref?: FocusableRef<HTMLButtonElement>}) => ReactElement;\nexport {_ActionMenu as ActionMenu};\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 \"moreActions\": \"المزيد من الإجراءات\"\n}\n","{\n \"moreActions\": \"Повече действия\"\n}\n","{\n \"moreActions\": \"Další akce\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Mehr Aktionen\"\n}\n","{\n \"moreActions\": \"Περισσότερες ενέργειες\"\n}\n","{\n \"moreActions\": \"More actions\"\n}","{\n \"moreActions\": \"Más acciones\"\n}\n","{\n \"moreActions\": \"Veel toiminguid\"\n}\n","{\n \"moreActions\": \"Lisää toimintoja\"\n}\n","{\n \"moreActions\": \"Autres actions\"\n}\n","{\n \"moreActions\": \"פעולות נוספות\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"További lehetőségek\"\n}\n","{\n \"moreActions\": \"Altre azioni\"\n}\n","{\n \"moreActions\": \"その他のアクション\"\n}\n","{\n \"moreActions\": \"기타 작업\"\n}\n","{\n \"moreActions\": \"Daugiau veiksmų\"\n}\n","{\n \"moreActions\": \"Citas darbības\"\n}\n","{\n \"moreActions\": \"Flere handlinger\"\n}\n","{\n \"moreActions\": \"Meer handelingen\"\n}\n","{\n \"moreActions\": \"Więcej akcji\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mais ações\"\n}\n","{\n \"moreActions\": \"Mai multe acțiuni\"\n}\n","{\n \"moreActions\": \"Дополнительные действия\"\n}\n","{\n \"moreActions\": \"Ďalšie akcie\"\n}\n","{\n \"moreActions\": \"Več možnosti\"\n}\n","{\n \"moreActions\": \"Dodatne radnje\"\n}\n","{\n \"moreActions\": \"Fler åtgärder\"\n}\n","{\n \"moreActions\": \"Daha fazla eylem\"\n}\n","{\n \"moreActions\": \"Більше дій\"\n}\n","{\n \"moreActions\": \"更多操作\"\n}\n","{\n \"moreActions\": \"更多動作\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { DOMRefValue, DOMRef, FocusableRef } from "@react-types/shared";
2
1
  import React, { ReactElement } from "react";
3
2
  import { SpectrumMenuTriggerProps, SpectrumMenuProps, SpectrumActionMenuProps } from "@react-types/menu";
3
+ import { DOMRef, FocusableRef } from "@react-types/shared";
4
4
  /**
5
5
  * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,
6
6
  * linking the Menu's open state with the trigger's press state.
7
7
  */
8
- export let MenuTrigger: React.ForwardRefExoticComponent<SpectrumMenuTriggerProps & React.RefAttributes<DOMRefValue<HTMLElement>>>;
8
+ export let MenuTrigger: React.ForwardRefExoticComponent<SpectrumMenuTriggerProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLElement>>>;
9
9
  /**
10
10
  * Menus display a list of actions or options that a user can choose.
11
11
  */
@@ -1 +1 @@
1
- {"mappings":";;;ACmIA;;;GAGG;AACH,OAAA,IAAI,sHAAsC,CAAC;AG1D3C;;GAEG;AAGH,OAAA,MAAM;UAA2E,OAAO,gBAAgB,CAAC;MAAM,YAAY,CAAC;AC1B5H;;GAEG;AACH,OAAA,MAAM;UAAuF,aAAa,iBAAiB,CAAC;MAAM,YAAY,CAAC;AC1C/I,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAC,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC","sources":["packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/context.ts","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/MenuTrigger.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/MenuItem.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/MenuSection.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/Menu.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/ActionMenu.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/index.ts","packages/@react-spectrum/menu/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\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\n/// <reference types=\"css-module-types\" />\n\nexport {MenuTrigger} from './MenuTrigger';\nexport {Menu} from './Menu';\nexport {ActionMenu} from './ActionMenu';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumMenuTriggerProps} from '@react-types/menu';\nexport type {SpectrumActionMenuProps, SpectrumMenuProps} from '@react-types/menu';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AC2GA;;;GAGG;AACH,OAAA,IAAI,oJAAsC,CAAC;AGlC3C;;GAEG;AAGH,OAAA,MAAM;UAA2E,OAAO,gBAAgB,CAAC;MAAM,YAAY,CAAC;AC1B5H;;GAEG;AACH,OAAA,MAAM;UAAuF,aAAa,iBAAiB,CAAC;MAAM,YAAY,CAAC;AC1C/I,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAC,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC","sources":["packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/context.ts","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/MenuTrigger.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/MenuItem.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/MenuSection.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/Menu.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/ActionMenu.tsx","packages/@react-spectrum/menu/src/packages/@react-spectrum/menu/src/index.ts","packages/@react-spectrum/menu/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\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\n/// <reference types=\"css-module-types\" />\n\nexport {MenuTrigger} from './MenuTrigger';\nexport {Menu} from './Menu';\nexport {ActionMenu} from './ActionMenu';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumMenuTriggerProps} from '@react-types/menu';\nexport type {SpectrumActionMenuProps, SpectrumMenuProps} from '@react-types/menu';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/menu",
3
- "version": "3.8.3-nightly.3539+86367a392",
3
+ "version": "3.8.3-nightly.3547+3f7bb5095",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,34 +32,34 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "3.0.0-nightly.1839+86367a392",
36
- "@react-aria/i18n": "3.0.0-nightly.1839+86367a392",
37
- "@react-aria/interactions": "3.0.0-nightly.1839+86367a392",
38
- "@react-aria/menu": "3.6.3-nightly.3539+86367a392",
39
- "@react-aria/overlays": "3.0.0-nightly.1839+86367a392",
40
- "@react-aria/selection": "3.0.0-nightly.1839+86367a392",
41
- "@react-aria/separator": "3.0.0-nightly.1839+86367a392",
42
- "@react-aria/utils": "3.0.0-nightly.1839+86367a392",
43
- "@react-aria/virtualizer": "3.5.2-nightly.3539+86367a392",
44
- "@react-spectrum/button": "3.0.0-nightly.1839+86367a392",
45
- "@react-spectrum/checkbox": "3.0.0-nightly.1839+86367a392",
46
- "@react-spectrum/divider": "3.0.0-nightly.1839+86367a392",
47
- "@react-spectrum/layout": "3.4.3-nightly.3539+86367a392",
48
- "@react-spectrum/overlays": "3.0.0-nightly.1839+86367a392",
49
- "@react-spectrum/text": "3.3.3-nightly.3539+86367a392",
50
- "@react-spectrum/utils": "3.0.0-nightly.1839+86367a392",
51
- "@react-stately/collections": "3.0.0-nightly.1839+86367a392",
52
- "@react-stately/menu": "3.4.3-nightly.3539+86367a392",
53
- "@react-stately/tree": "3.0.0-nightly.1839+86367a392",
54
- "@react-stately/utils": "3.0.0-nightly.1839+86367a392",
55
- "@react-types/menu": "3.7.3-nightly.3539+86367a392",
56
- "@react-types/overlays": "3.6.5-nightly.3539+86367a392",
57
- "@react-types/shared": "3.0.0-nightly.1839+86367a392",
58
- "@spectrum-icons/ui": "3.0.0-nightly.1839+86367a392",
59
- "@spectrum-icons/workflow": "3.0.0-nightly.1839+86367a392"
35
+ "@react-aria/focus": "3.0.0-nightly.1847+3f7bb5095",
36
+ "@react-aria/i18n": "3.0.0-nightly.1847+3f7bb5095",
37
+ "@react-aria/interactions": "3.0.0-nightly.1847+3f7bb5095",
38
+ "@react-aria/menu": "3.6.3-nightly.3547+3f7bb5095",
39
+ "@react-aria/overlays": "3.0.0-nightly.1847+3f7bb5095",
40
+ "@react-aria/selection": "3.0.0-nightly.1847+3f7bb5095",
41
+ "@react-aria/separator": "3.0.0-nightly.1847+3f7bb5095",
42
+ "@react-aria/utils": "3.0.0-nightly.1847+3f7bb5095",
43
+ "@react-aria/virtualizer": "3.5.2-nightly.3547+3f7bb5095",
44
+ "@react-spectrum/button": "3.0.0-nightly.1847+3f7bb5095",
45
+ "@react-spectrum/checkbox": "3.0.0-nightly.1847+3f7bb5095",
46
+ "@react-spectrum/divider": "3.0.0-nightly.1847+3f7bb5095",
47
+ "@react-spectrum/layout": "3.4.3-nightly.3547+3f7bb5095",
48
+ "@react-spectrum/overlays": "3.0.0-nightly.1847+3f7bb5095",
49
+ "@react-spectrum/text": "3.3.3-nightly.3547+3f7bb5095",
50
+ "@react-spectrum/utils": "3.0.0-nightly.1847+3f7bb5095",
51
+ "@react-stately/collections": "3.0.0-nightly.1847+3f7bb5095",
52
+ "@react-stately/menu": "3.4.3-nightly.3547+3f7bb5095",
53
+ "@react-stately/tree": "3.0.0-nightly.1847+3f7bb5095",
54
+ "@react-stately/utils": "3.0.0-nightly.1847+3f7bb5095",
55
+ "@react-types/menu": "3.7.3-nightly.3547+3f7bb5095",
56
+ "@react-types/overlays": "3.6.5-nightly.3547+3f7bb5095",
57
+ "@react-types/shared": "3.0.0-nightly.1847+3f7bb5095",
58
+ "@spectrum-icons/ui": "3.0.0-nightly.1847+3f7bb5095",
59
+ "@spectrum-icons/workflow": "3.0.0-nightly.1847+3f7bb5095"
60
60
  },
61
61
  "devDependencies": {
62
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1839+86367a392"
62
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1847+3f7bb5095"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@react-spectrum/provider": "^3.0.0",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "86367a392284544e160eb489cd9019eac73a6738"
72
+ "gitHead": "3f7bb509509cf7236633731202ccde8906b560ac"
73
73
  }
@@ -10,10 +10,8 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {classNames, SlotProvider, unwrapDOMRef, useDOMRef, useIsMobileDevice} from '@react-spectrum/utils';
14
- import {DismissButton, useOverlayPosition} from '@react-aria/overlays';
15
- import {DOMRef, DOMRefValue} from '@react-types/shared';
16
- import {FocusScope} from '@react-aria/focus';
13
+ import {classNames, SlotProvider, useDOMRef, useIsMobileDevice} from '@react-spectrum/utils';
14
+ import {DOMRef} from '@react-types/shared';
17
15
  import {MenuContext} from './context';
18
16
  import {Placement} from '@react-types/overlays';
19
17
  import {Popover, Tray} from '@react-spectrum/overlays';
@@ -25,7 +23,6 @@ import {useMenuTrigger} from '@react-aria/menu';
25
23
  import {useMenuTriggerState} from '@react-stately/menu';
26
24
 
27
25
  function MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>) {
28
- let menuPopoverRef = useRef<DOMRefValue<HTMLDivElement>>();
29
26
  let triggerRef = useRef<HTMLElement>();
30
27
  let domRef = useDOMRef(ref);
31
28
  let menuTriggerRef = domRef || triggerRef;
@@ -59,16 +56,6 @@ function MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>)
59
56
  }
60
57
 
61
58
  let isMobile = useIsMobileDevice();
62
- let {overlayProps: positionProps, placement} = useOverlayPosition({
63
- targetRef: menuTriggerRef,
64
- overlayRef: unwrapDOMRef(menuPopoverRef),
65
- scrollRef: menuRef,
66
- placement: initialPlacement,
67
- shouldFlip: shouldFlip,
68
- isOpen: state.isOpen && !isMobile,
69
- onClose: state.close
70
- });
71
-
72
59
  let menuContext = {
73
60
  ...menuProps,
74
61
  ref: menuRef,
@@ -82,35 +69,24 @@ function MenuTrigger(props: SpectrumMenuTriggerProps, ref: DOMRef<HTMLElement>)
82
69
  UNSAFE_className: classNames(styles, {'spectrum-Menu-popover': !isMobile})
83
70
  };
84
71
 
85
- // Only contain focus while the menu is open. There is a fade out transition during which we may try to move focus.
86
- // If we contain, then focus will be pulled back into the menu.
87
- let contents = (
88
- <FocusScope restoreFocus contain={isMobile && state.isOpen}>
89
- <DismissButton onDismiss={state.close} />
90
- {menu}
91
- <DismissButton onDismiss={state.close} />
92
- </FocusScope>
93
- );
94
-
95
72
  // On small screen devices, the menu is rendered in a tray, otherwise a popover.
96
73
  let overlay;
97
74
  if (isMobile) {
98
75
  overlay = (
99
- <Tray isOpen={state.isOpen} onClose={state.close}>
100
- {contents}
76
+ <Tray state={state}>
77
+ {menu}
101
78
  </Tray>
102
79
  );
103
80
  } else {
104
81
  overlay = (
105
82
  <Popover
106
- isOpen={state.isOpen}
107
- UNSAFE_style={positionProps.style}
108
- ref={menuPopoverRef}
109
- placement={placement}
83
+ state={state}
84
+ triggerRef={menuTriggerRef}
85
+ scrollRef={menuRef}
86
+ placement={initialPlacement}
110
87
  hideArrow
111
- onClose={state.close}
112
- shouldCloseOnBlur>
113
- {contents}
88
+ shouldFlip={shouldFlip}>
89
+ {menu}
114
90
  </Popover>
115
91
  );
116
92
  }