@instructure/ui-menu 8.56.1 → 8.56.2-snapshot-2

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 CHANGED
@@ -3,6 +3,17 @@
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
+ ## [8.56.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-snapshot-2) (2024-08-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-menu:** menuItem's onSelect type did not expose its value and selected types ([98ca20e](https://github.com/instructure/instructure-ui/commit/98ca20e215808283b891b13a47b2bb54e12967e2))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [8.56.1](https://github.com/instructure/instructure-ui/compare/v8.56.0...v8.56.1) (2024-06-13)
7
18
 
8
19
  **Note:** Version bump only for package @instructure/ui-menu
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-menu",
3
- "version": "8.56.1",
3
+ "version": "8.56.2-snapshot-2",
4
4
  "description": "A dropdown menu component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,29 +23,29 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "8.56.1",
27
- "@instructure/ui-babel-preset": "8.56.1",
28
- "@instructure/ui-color-utils": "8.56.1",
29
- "@instructure/ui-test-utils": "8.56.1",
30
- "@instructure/ui-themes": "8.56.1",
26
+ "@instructure/ui-axe-check": "8.56.2-snapshot-2",
27
+ "@instructure/ui-babel-preset": "8.56.2-snapshot-2",
28
+ "@instructure/ui-color-utils": "8.56.2-snapshot-2",
29
+ "@instructure/ui-test-utils": "8.56.2-snapshot-2",
30
+ "@instructure/ui-themes": "8.56.2-snapshot-2",
31
31
  "@testing-library/jest-dom": "^6.1.4",
32
32
  "@testing-library/react": "^14.0.0",
33
33
  "@testing-library/user-event": "^14.5.1"
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.23.2",
37
- "@instructure/console": "8.56.1",
38
- "@instructure/emotion": "8.56.1",
39
- "@instructure/shared-types": "8.56.1",
40
- "@instructure/ui-a11y-utils": "8.56.1",
41
- "@instructure/ui-dom-utils": "8.56.1",
42
- "@instructure/ui-icons": "8.56.1",
43
- "@instructure/ui-popover": "8.56.1",
44
- "@instructure/ui-position": "8.56.1",
45
- "@instructure/ui-prop-types": "8.56.1",
46
- "@instructure/ui-react-utils": "8.56.1",
47
- "@instructure/ui-testable": "8.56.1",
48
- "@instructure/ui-utils": "8.56.1",
37
+ "@instructure/console": "8.56.2-snapshot-2",
38
+ "@instructure/emotion": "8.56.2-snapshot-2",
39
+ "@instructure/shared-types": "8.56.2-snapshot-2",
40
+ "@instructure/ui-a11y-utils": "8.56.2-snapshot-2",
41
+ "@instructure/ui-dom-utils": "8.56.2-snapshot-2",
42
+ "@instructure/ui-icons": "8.56.2-snapshot-2",
43
+ "@instructure/ui-popover": "8.56.2-snapshot-2",
44
+ "@instructure/ui-position": "8.56.2-snapshot-2",
45
+ "@instructure/ui-prop-types": "8.56.2-snapshot-2",
46
+ "@instructure/ui-react-utils": "8.56.2-snapshot-2",
47
+ "@instructure/ui-testable": "8.56.2-snapshot-2",
48
+ "@instructure/ui-utils": "8.56.2-snapshot-2",
49
49
  "keycode": "^2.2.1",
50
50
  "prop-types": "^15.8.1"
51
51
  },
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  /** @jsx jsx */
25
- import React, { Component, MouseEventHandler } from 'react'
25
+ import React, { Component } from 'react'
26
26
  import keycode from 'keycode'
27
27
 
28
28
  import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons'
@@ -253,7 +253,7 @@ class MenuItem extends Component<MenuItemProps, MenuItemState> {
253
253
  : 'false'
254
254
  : undefined
255
255
  }
256
- onClick={this.handleClick as MouseEventHandler}
256
+ onClick={this.handleClick}
257
257
  onKeyUp={createChainedFunction(onKeyUp, this.handleKeyUp)}
258
258
  onKeyDown={createChainedFunction(onKeyDown, this.handleKeyDown)}
259
259
  ref={this.handleRef}
@@ -39,8 +39,8 @@ import type { ViewOwnProps } from '@instructure/ui-view'
39
39
 
40
40
  type OnMenuItemSelect = (
41
41
  e: React.MouseEvent<ViewOwnProps>,
42
- value: MenuItemOwnProps['value'],
43
- selected: MenuItemOwnProps['selected'],
42
+ value: MenuItemProps['value'],
43
+ selected: MenuItemProps['selected'],
44
44
  args: MenuItem
45
45
  ) => void
46
46
 
@@ -74,8 +74,20 @@ type MenuItemOwnProps = {
74
74
  * the element type to render as (will default to `<a>` if href is provided)
75
75
  */
76
76
  as?: AsElementType
77
+ /**
78
+ * How this component should be rendered. If it's `checkbox` or `radio` it will
79
+ * display a checkmark based on its own 'selected' state, if it's `flyout` it will
80
+ * render an arrow after the label.
81
+ */
77
82
  type?: 'button' | 'checkbox' | 'radio' | 'flyout'
83
+ /**
84
+ * Arbitrary value that you can store in this component. Is sent out by the
85
+ * `onSelect` event
86
+ */
78
87
  value?: string | number
88
+ /**
89
+ * Value of the `href` prop that will be put on the underlying DOM element.
90
+ */
79
91
  href?: string
80
92
  }
81
93