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