@instructure/ui-menu 9.3.1-snapshot-5 → 9.5.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/CHANGELOG.md +16 -2
- package/package.json +19 -19
- package/src/Menu/MenuItem/index.tsx +2 -2
- package/src/Menu/MenuItem/props.ts +14 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Menu/MenuItem/index.d.ts.map +1 -1
- package/types/Menu/MenuItem/props.d.ts +13 -1
- package/types/Menu/MenuItem/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [9.5.0](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.5.0) (2024-07-26)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-menu:** menuItem's onSelect type did not expose its value and selected types ([c58fff8](https://github.com/instructure/instructure-ui/commit/c58fff8736ac430a8992bce1caa11bf3a1f3f5b7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [9.4.0](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.4.0) (2024-07-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **ui-menu:** menuItem's onSelect type did not expose its value and selected types ([c58fff8](https://github.com/instructure/instructure-ui/commit/c58fff8736ac430a8992bce1caa11bf3a1f3f5b7))
|
|
9
23
|
|
|
10
24
|
|
|
11
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-menu",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"description": "A dropdown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "9.
|
|
27
|
-
"@instructure/ui-babel-preset": "9.
|
|
28
|
-
"@instructure/ui-color-utils": "9.
|
|
29
|
-
"@instructure/ui-test-utils": "9.
|
|
30
|
-
"@instructure/ui-themes": "9.
|
|
26
|
+
"@instructure/ui-axe-check": "9.5.0",
|
|
27
|
+
"@instructure/ui-babel-preset": "9.5.0",
|
|
28
|
+
"@instructure/ui-color-utils": "9.5.0",
|
|
29
|
+
"@instructure/ui-test-utils": "9.5.0",
|
|
30
|
+
"@instructure/ui-themes": "9.5.0",
|
|
31
31
|
"@testing-library/jest-dom": "^6.4.6",
|
|
32
32
|
"@testing-library/react": "^15.0.7",
|
|
33
33
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.24.5",
|
|
38
|
-
"@instructure/console": "9.
|
|
39
|
-
"@instructure/emotion": "9.
|
|
40
|
-
"@instructure/shared-types": "9.
|
|
41
|
-
"@instructure/ui-a11y-utils": "9.
|
|
42
|
-
"@instructure/ui-dom-utils": "9.
|
|
43
|
-
"@instructure/ui-icons": "9.
|
|
44
|
-
"@instructure/ui-popover": "9.
|
|
45
|
-
"@instructure/ui-position": "9.
|
|
46
|
-
"@instructure/ui-prop-types": "9.
|
|
47
|
-
"@instructure/ui-react-utils": "9.
|
|
48
|
-
"@instructure/ui-testable": "9.
|
|
49
|
-
"@instructure/ui-utils": "9.
|
|
50
|
-
"@instructure/ui-view": "9.
|
|
38
|
+
"@instructure/console": "9.5.0",
|
|
39
|
+
"@instructure/emotion": "9.5.0",
|
|
40
|
+
"@instructure/shared-types": "9.5.0",
|
|
41
|
+
"@instructure/ui-a11y-utils": "9.5.0",
|
|
42
|
+
"@instructure/ui-dom-utils": "9.5.0",
|
|
43
|
+
"@instructure/ui-icons": "9.5.0",
|
|
44
|
+
"@instructure/ui-popover": "9.5.0",
|
|
45
|
+
"@instructure/ui-position": "9.5.0",
|
|
46
|
+
"@instructure/ui-prop-types": "9.5.0",
|
|
47
|
+
"@instructure/ui-react-utils": "9.5.0",
|
|
48
|
+
"@instructure/ui-testable": "9.5.0",
|
|
49
|
+
"@instructure/ui-utils": "9.5.0",
|
|
50
|
+
"@instructure/ui-view": "9.5.0",
|
|
51
51
|
"keycode": "^2",
|
|
52
52
|
"prop-types": "^15.8.1"
|
|
53
53
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
/** @jsx jsx */
|
|
25
|
-
import React, { Component
|
|
25
|
+
import React, { Component } from 'react'
|
|
26
26
|
import keycode from 'keycode'
|
|
27
27
|
|
|
28
28
|
import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons'
|
|
@@ -252,7 +252,7 @@ class MenuItem extends Component<MenuItemProps, MenuItemState> {
|
|
|
252
252
|
: 'false'
|
|
253
253
|
: undefined
|
|
254
254
|
}
|
|
255
|
-
onClick={this.handleClick
|
|
255
|
+
onClick={this.handleClick}
|
|
256
256
|
onKeyUp={createChainedFunction(onKeyUp, this.handleKeyUp)}
|
|
257
257
|
onKeyDown={createChainedFunction(onKeyDown, this.handleKeyDown)}
|
|
258
258
|
ref={this.handleRef}
|
|
@@ -38,8 +38,8 @@ import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
|
38
38
|
|
|
39
39
|
type OnMenuItemSelect = (
|
|
40
40
|
e: React.MouseEvent,
|
|
41
|
-
value:
|
|
42
|
-
selected:
|
|
41
|
+
value: MenuItemProps['value'],
|
|
42
|
+
selected: MenuItemProps['selected'],
|
|
43
43
|
args: MenuItem
|
|
44
44
|
) => void
|
|
45
45
|
|
|
@@ -73,8 +73,20 @@ type MenuItemOwnProps = {
|
|
|
73
73
|
* the element type to render as (will default to `<a>` if href is provided)
|
|
74
74
|
*/
|
|
75
75
|
as?: AsElementType
|
|
76
|
+
/**
|
|
77
|
+
* How this component should be rendered. If it's `checkbox` or `radio` it will
|
|
78
|
+
* display a checkmark based on its own 'selected' state, if it's `flyout` it will
|
|
79
|
+
* render an arrow after the label.
|
|
80
|
+
*/
|
|
76
81
|
type?: 'button' | 'checkbox' | 'radio' | 'flyout'
|
|
82
|
+
/**
|
|
83
|
+
* Arbitrary value that you can store in this component. Is sent out by the
|
|
84
|
+
* `onSelect` event
|
|
85
|
+
*/
|
|
77
86
|
value?: string | number
|
|
87
|
+
/**
|
|
88
|
+
* Value of the `href` prop that will be put on the underlying DOM element.
|
|
89
|
+
*/
|
|
78
90
|
href?: string
|
|
79
91
|
}
|
|
80
92
|
|