@sanity/ui 2.10.18 → 2.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/ui",
3
- "version": "2.10.18",
3
+ "version": "2.11.0",
4
4
  "keywords": [
5
5
  "sanity",
6
6
  "ui",
@@ -154,7 +154,7 @@
154
154
  "@typescript-eslint/eslint-plugin": "^7.18.0",
155
155
  "@typescript-eslint/parser": "^7.18.0",
156
156
  "@vitejs/plugin-react": "^4.3.4",
157
- "babel-plugin-react-compiler": "19.0.0-beta-55955c9-20241229",
157
+ "babel-plugin-react-compiler": "19.0.0-beta-63e3235-20250105",
158
158
  "babel-plugin-styled-components": "^2.1.4",
159
159
  "commitizen": "^4.3.1",
160
160
  "cypress": "^13.17.0",
@@ -166,7 +166,7 @@
166
166
  "eslint-plugin-import": "^2.31.0",
167
167
  "eslint-plugin-jsx-a11y": "^6.10.2",
168
168
  "eslint-plugin-react": "^7.37.3",
169
- "eslint-plugin-react-compiler": "19.0.0-beta-55955c9-20241229",
169
+ "eslint-plugin-react-compiler": "19.0.0-beta-63e3235-20250105",
170
170
  "eslint-plugin-react-hooks": "^5.1.0",
171
171
  "eslint-plugin-storybook": "^0.11.2",
172
172
  "http-server": "^14.1.1",
@@ -186,7 +186,7 @@
186
186
  "semantic-release": "^24.2.1",
187
187
  "start-server-and-test": "^2.0.9",
188
188
  "storybook": "^8.4.7",
189
- "styled-components": "^6.1.13",
189
+ "styled-components": "^6.1.14",
190
190
  "tsconfig-paths": "^4.2.0",
191
191
  "typescript": "5.7.2",
192
192
  "vite": "^5.4.11",
@@ -198,7 +198,7 @@
198
198
  "react-is": "^18 || >=19.0.0-0",
199
199
  "styled-components": "^5.2 || ^6"
200
200
  },
201
- "packageManager": "pnpm@9.15.2",
201
+ "packageManager": "pnpm@9.15.3",
202
202
  "engines": {
203
203
  "node": ">=14.0.0"
204
204
  },
@@ -6,7 +6,7 @@ import {Box, Flex, Popover, PopoverProps, Text} from '../../primitives'
6
6
  import {Selectable} from '../../primitives/_selectable'
7
7
  import {useRootTheme} from '../../theme'
8
8
  import {Radius, SelectableTone} from '../../types'
9
- import {Menu} from './menu'
9
+ import {Menu, MenuProps} from './menu'
10
10
  import {useMenu} from './useMenu'
11
11
 
12
12
  /**
@@ -16,6 +16,17 @@ export interface MenuGroupProps {
16
16
  as?: React.ElementType | keyof React.JSX.IntrinsicElements
17
17
  fontSize?: number | number[]
18
18
  icon?: React.ElementType | React.ReactNode
19
+ menu?: Omit<
20
+ MenuProps,
21
+ | 'onClickOutside'
22
+ | 'onEscape'
23
+ | 'onItemClick'
24
+ | 'onKeyDown'
25
+ | 'onMouseEnter'
26
+ | 'registerElement'
27
+ | 'shouldFocus'
28
+ | 'onBlurCapture'
29
+ >
19
30
  padding?: number | number[]
20
31
  popover?: Omit<PopoverProps, 'content' | 'open'>
21
32
  radius?: Radius | Radius[]
@@ -36,6 +47,7 @@ export function MenuGroup(
36
47
  children,
37
48
  fontSize = 1,
38
49
  icon: IconComponent,
50
+ menu: menuProps,
39
51
  onClick,
40
52
  padding = 3,
41
53
  popover,
@@ -129,6 +141,7 @@ export function MenuGroup(
129
141
 
130
142
  const childMenu = (
131
143
  <Menu
144
+ {...menuProps}
132
145
  onClickOutside={onClickOutside}
133
146
  onEscape={onEscape}
134
147
  onItemClick={handleChildItemClick}