@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.esm.js +14 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +38 -0
- package/src/core/components/menu/__workshop__/index.ts +5 -0
- package/src/core/components/menu/menuButton.tsx +1 -1
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
|
-
() =>
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
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(
|