@sanity/ui 2.3.3 → 2.3.4

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/index.js CHANGED
@@ -5608,17 +5608,20 @@ const Root$5 = styledComponents.styled(Box)`
5608
5608
  shouldFocus
5609
5609
  ]
5610
5610
  ), menu = menuProp && react.cloneElement(menuProp, menuProps), ref = react.useRef(null), button = react.useMemo(
5611
- () => buttonProp && react.cloneElement(buttonProp, {
5612
- "data-ui": "MenuButton",
5613
- id,
5614
- onClick: handleButtonClick,
5615
- onKeyDown: handleButtonKeyDown,
5616
- onMouseDown: handleMouseDown,
5617
- "aria-haspopup": !0,
5618
- "aria-expanded": open,
5619
- ref,
5620
- selected: open
5621
- }),
5611
+ () => {
5612
+ var _a;
5613
+ return buttonProp && react.cloneElement(buttonProp, {
5614
+ "data-ui": "MenuButton",
5615
+ id,
5616
+ onClick: handleButtonClick,
5617
+ onKeyDown: handleButtonKeyDown,
5618
+ onMouseDown: handleMouseDown,
5619
+ "aria-haspopup": !0,
5620
+ "aria-expanded": open,
5621
+ ref,
5622
+ selected: (_a = buttonProp.props.selected) != null ? _a : open
5623
+ });
5624
+ },
5622
5625
  [buttonProp, handleButtonClick, handleButtonKeyDown, handleMouseDown, id, open]
5623
5626
  );
5624
5627
  react.useImperativeHandle(