@instructure/ui-menu 11.7.3 → 11.7.4-pr-snapshot-1781695314229
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 +44 -0
- package/LICENSE.md +1 -0
- package/{lib/Menu/v1/MenuItemSeparator/props.js → babel.config.cjs} +12 -10
- package/es/Menu/v1/MenuItem/index.js +5 -5
- package/es/Menu/v1/MenuItemGroup/index.js +5 -5
- package/es/Menu/v1/MenuItemSeparator/index.js +4 -4
- package/es/Menu/v1/index.js +8 -8
- package/es/Menu/v2/MenuItem/index.js +4 -7
- package/es/Menu/v2/MenuItemGroup/index.js +4 -4
- package/es/Menu/v2/MenuItemSeparator/index.js +3 -3
- package/es/Menu/v2/index.js +7 -7
- package/es/exports/a.js +1 -1
- package/es/exports/b.js +1 -1
- package/package.json +18 -23
- package/src/Menu/v1/MenuItem/index.tsx +5 -4
- package/src/Menu/v1/MenuItem/props.ts +1 -1
- package/src/Menu/v1/MenuItemGroup/index.tsx +6 -5
- package/src/Menu/v1/MenuItemGroup/props.ts +1 -1
- package/src/Menu/v1/MenuItemSeparator/index.tsx +4 -3
- package/src/Menu/v1/index.tsx +8 -7
- package/src/Menu/v1/props.ts +1 -1
- package/src/Menu/v2/MenuItem/index.tsx +4 -11
- package/src/Menu/v2/MenuItem/props.ts +1 -1
- package/src/Menu/v2/MenuItemGroup/index.tsx +5 -4
- package/src/Menu/v2/MenuItemGroup/props.ts +1 -1
- package/src/Menu/v2/MenuItemSeparator/index.tsx +3 -2
- package/src/Menu/v2/index.tsx +7 -6
- package/src/Menu/v2/props.ts +1 -1
- package/src/exports/a.ts +1 -1
- package/src/exports/b.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Menu/v1/MenuItem/index.d.ts +3 -2
- package/types/Menu/v1/MenuItem/index.d.ts.map +1 -1
- package/types/Menu/v1/MenuItem/props.d.ts +1 -1
- package/types/Menu/v1/MenuItem/props.d.ts.map +1 -1
- package/types/Menu/v1/MenuItemGroup/index.d.ts +3 -2
- package/types/Menu/v1/MenuItemGroup/index.d.ts.map +1 -1
- package/types/Menu/v1/MenuItemGroup/props.d.ts +1 -1
- package/types/Menu/v1/MenuItemGroup/props.d.ts.map +1 -1
- package/types/Menu/v1/MenuItemSeparator/index.d.ts +1 -0
- package/types/Menu/v1/MenuItemSeparator/index.d.ts.map +1 -1
- package/types/Menu/v1/index.d.ts +4 -3
- package/types/Menu/v1/index.d.ts.map +1 -1
- package/types/Menu/v1/props.d.ts +1 -1
- package/types/Menu/v1/props.d.ts.map +1 -1
- package/types/Menu/v2/MenuItem/index.d.ts +3 -3
- package/types/Menu/v2/MenuItem/index.d.ts.map +1 -1
- package/types/Menu/v2/MenuItem/props.d.ts +1 -1
- package/types/Menu/v2/MenuItem/props.d.ts.map +1 -1
- package/types/Menu/v2/MenuItemGroup/index.d.ts +3 -2
- package/types/Menu/v2/MenuItemGroup/index.d.ts.map +1 -1
- package/types/Menu/v2/MenuItemGroup/props.d.ts +1 -1
- package/types/Menu/v2/MenuItemGroup/props.d.ts.map +1 -1
- package/types/Menu/v2/MenuItemSeparator/index.d.ts +1 -0
- package/types/Menu/v2/MenuItemSeparator/index.d.ts.map +1 -1
- package/types/Menu/v2/index.d.ts +4 -3
- package/types/Menu/v2/index.d.ts.map +1 -1
- package/types/Menu/v2/props.d.ts +1 -1
- package/types/Menu/v2/props.d.ts.map +1 -1
- package/types/exports/a.d.ts +1 -1
- package/types/exports/a.d.ts.map +1 -1
- package/types/exports/b.d.ts +1 -1
- package/types/exports/b.d.ts.map +1 -1
- package/lib/Menu/v1/MenuItem/index.js +0 -235
- package/lib/Menu/v1/MenuItem/props.js +0 -31
- package/lib/Menu/v1/MenuItem/styles.js +0 -142
- package/lib/Menu/v1/MenuItem/theme.js +0 -71
- package/lib/Menu/v1/MenuItemGroup/index.js +0 -191
- package/lib/Menu/v1/MenuItemGroup/props.js +0 -31
- package/lib/Menu/v1/MenuItemGroup/styles.js +0 -66
- package/lib/Menu/v1/MenuItemGroup/theme.js +0 -61
- package/lib/Menu/v1/MenuItemSeparator/index.js +0 -73
- package/lib/Menu/v1/MenuItemSeparator/styles.js +0 -52
- package/lib/Menu/v1/MenuItemSeparator/theme.js +0 -51
- package/lib/Menu/v1/index.js +0 -438
- package/lib/Menu/v1/props.js +0 -31
- package/lib/Menu/v1/styles.js +0 -82
- package/lib/Menu/v1/theme.js +0 -56
- package/lib/Menu/v2/MenuItem/index.js +0 -277
- package/lib/Menu/v2/MenuItem/props.js +0 -31
- package/lib/Menu/v2/MenuItem/styles.js +0 -154
- package/lib/Menu/v2/MenuItemGroup/index.js +0 -190
- package/lib/Menu/v2/MenuItemGroup/props.js +0 -31
- package/lib/Menu/v2/MenuItemGroup/styles.js +0 -66
- package/lib/Menu/v2/MenuItemSeparator/index.js +0 -72
- package/lib/Menu/v2/MenuItemSeparator/props.js +0 -34
- package/lib/Menu/v2/MenuItemSeparator/styles.js +0 -52
- package/lib/Menu/v2/index.js +0 -437
- package/lib/Menu/v2/props.js +0 -31
- package/lib/Menu/v2/styles.js +0 -64
- package/lib/exports/a.js +0 -30
- package/lib/exports/b.js +0 -30
- package/lib/package.json +0 -1
- package/lib/utils/v1/MenuContext.js +0 -43
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,50 @@
|
|
|
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
|
+
## [11.7.4-pr-snapshot-1781695314229](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-pr-snapshot-1781695314229) (2026-06-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **many:** remove deprecated v2 items ([eaf8876](https://github.com/instructure/instructure-ui/commit/eaf88767c9beb95c4e09ee5705c387dfd79e4cb7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **many:** Removed FormFieldLabel component
|
|
17
|
+
|
|
18
|
+
Removed _content prop from DrawerLayout.Tray and DrawerLayout.Content
|
|
19
|
+
|
|
20
|
+
Removed _link prop from Link
|
|
21
|
+
|
|
22
|
+
Removed _node prop from Menu.Item
|
|
23
|
+
|
|
24
|
+
Removed _root prop from Pagination, TreeBrowser
|
|
25
|
+
|
|
26
|
+
Removed _select prop from SimpleSelect and TimeSelect
|
|
27
|
+
|
|
28
|
+
Removed _ref prop from TruncateText
|
|
29
|
+
|
|
30
|
+
Removed _element prop from View
|
|
31
|
+
|
|
32
|
+
Removed color="ai" from Heading
|
|
33
|
+
|
|
34
|
+
Removed variant="inline-small" and variant="standalone-small" from Link
|
|
35
|
+
|
|
36
|
+
Removed title prop from Tag
|
|
37
|
+
|
|
38
|
+
Removed focusRingBorderRadius prop from View
|
|
39
|
+
|
|
40
|
+
Removed hideActionsUserSeparator prop from TopNavBar.Layout
|
|
41
|
+
|
|
42
|
+
Removed handleFocusOutlineColor, handleFocusOutlineWidth, handleShadowColor from RangeInput
|
|
43
|
+
|
|
44
|
+
INSTUI-5025
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
6
50
|
## [11.7.3](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3) (2026-05-07)
|
|
7
51
|
|
|
8
52
|
|
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
1
|
/*
|
|
8
2
|
* The MIT License (MIT)
|
|
9
3
|
*
|
|
@@ -28,7 +22,15 @@ exports.allowedProps = void 0;
|
|
|
28
22
|
* SOFTWARE.
|
|
29
23
|
*/
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
module.exports = {
|
|
26
|
+
presets: [
|
|
27
|
+
[
|
|
28
|
+
require('@instructure/ui-babel-preset'),
|
|
29
|
+
{
|
|
30
|
+
esModules: Boolean(process.env.ES_MODULES),
|
|
31
|
+
removeConsole: process.env.NODE_ENV === 'production',
|
|
32
|
+
transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -30,10 +30,10 @@ import { omitProps, getElementType, withDeterministicId, callRenderProp } from '
|
|
|
30
30
|
import { createChainedFunction } from '@instructure/ui-utils';
|
|
31
31
|
import { isActiveElement, findDOMNode } from '@instructure/ui-dom-utils';
|
|
32
32
|
import { withStyle } from '@instructure/emotion';
|
|
33
|
-
import { MenuContext } from
|
|
34
|
-
import generateStyle from
|
|
35
|
-
import generateComponentTheme from
|
|
36
|
-
import { allowedProps } from
|
|
33
|
+
import { MenuContext } from '../../../utils/v1/MenuContext.js';
|
|
34
|
+
import generateStyle from './styles.js';
|
|
35
|
+
import generateComponentTheme from './theme.js';
|
|
36
|
+
import { allowedProps } from './props.js';
|
|
37
37
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
38
38
|
/**
|
|
39
39
|
---
|
|
@@ -42,7 +42,7 @@ id: Menu.Item
|
|
|
42
42
|
---
|
|
43
43
|
**/
|
|
44
44
|
let MenuItem = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class MenuItem extends Component {
|
|
45
|
-
static displayName =
|
|
45
|
+
static displayName = 'MenuItem';
|
|
46
46
|
static componentId = 'Menu.Item';
|
|
47
47
|
static allowedProps = allowedProps;
|
|
48
48
|
static defaultProps = {
|
|
@@ -27,10 +27,10 @@ import { Children, Component } from 'react';
|
|
|
27
27
|
import { withStyle } from '@instructure/emotion';
|
|
28
28
|
import { omitProps, safeCloneElement, matchComponentTypes, withDeterministicId } from '@instructure/ui-react-utils';
|
|
29
29
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
|
|
30
|
-
import { MenuItem } from
|
|
31
|
-
import generateStyle from
|
|
32
|
-
import generateComponentTheme from
|
|
33
|
-
import { allowedProps } from
|
|
30
|
+
import { MenuItem } from '../MenuItem/index.js';
|
|
31
|
+
import generateStyle from './styles.js';
|
|
32
|
+
import generateComponentTheme from './theme.js';
|
|
33
|
+
import { allowedProps } from './props.js';
|
|
34
34
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
35
35
|
/**
|
|
36
36
|
---
|
|
@@ -39,7 +39,7 @@ id: Menu.Group
|
|
|
39
39
|
---
|
|
40
40
|
**/
|
|
41
41
|
let MenuItemGroup = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class MenuItemGroup extends Component {
|
|
42
|
-
static displayName =
|
|
42
|
+
static displayName = 'MenuItemGroup';
|
|
43
43
|
static componentId = 'Menu.Group';
|
|
44
44
|
static allowedProps = allowedProps;
|
|
45
45
|
static defaultProps = {
|
|
@@ -26,9 +26,9 @@ var _dec, _class;
|
|
|
26
26
|
import { Component } from 'react';
|
|
27
27
|
import { withStyle } from '@instructure/emotion';
|
|
28
28
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
29
|
-
import generateStyle from
|
|
30
|
-
import generateComponentTheme from
|
|
31
|
-
import { allowedProps } from
|
|
29
|
+
import generateStyle from './styles.js';
|
|
30
|
+
import generateComponentTheme from './theme.js';
|
|
31
|
+
import { allowedProps } from './props.js';
|
|
32
32
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
33
33
|
/**
|
|
34
34
|
---
|
|
@@ -38,7 +38,7 @@ id: Menu.Separator
|
|
|
38
38
|
@module MenuItemSeparator
|
|
39
39
|
**/
|
|
40
40
|
let MenuItemSeparator = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class MenuItemSeparator extends Component {
|
|
41
|
-
static displayName =
|
|
41
|
+
static displayName = 'MenuItemSeparator';
|
|
42
42
|
static componentId = 'Menu.Separator';
|
|
43
43
|
static allowedProps = allowedProps;
|
|
44
44
|
ref = null;
|
package/es/Menu/v1/index.js
CHANGED
|
@@ -29,14 +29,14 @@ import { Popover } from '@instructure/ui-popover/v11_6';
|
|
|
29
29
|
import { safeCloneElement, matchComponentTypes, withDeterministicId } from '@instructure/ui-react-utils';
|
|
30
30
|
import { logError as error } from '@instructure/console';
|
|
31
31
|
import { containsActiveElement } from '@instructure/ui-dom-utils';
|
|
32
|
-
import { MenuContext } from
|
|
33
|
-
import { MenuItem } from
|
|
34
|
-
import { MenuItemGroup } from
|
|
35
|
-
import { MenuItemSeparator } from
|
|
32
|
+
import { MenuContext } from '../../utils/v1/MenuContext.js';
|
|
33
|
+
import { MenuItem } from './MenuItem/index.js';
|
|
34
|
+
import { MenuItemGroup } from './MenuItemGroup/index.js';
|
|
35
|
+
import { MenuItemSeparator } from './MenuItemSeparator/index.js';
|
|
36
36
|
import { withStyle } from '@instructure/emotion';
|
|
37
|
-
import generateStyle from
|
|
38
|
-
import generateComponentTheme from
|
|
39
|
-
import { allowedProps } from
|
|
37
|
+
import generateStyle from './styles.js';
|
|
38
|
+
import generateComponentTheme from './theme.js';
|
|
39
|
+
import { allowedProps } from './props.js';
|
|
40
40
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
41
41
|
/**
|
|
42
42
|
---
|
|
@@ -44,7 +44,7 @@ category: components
|
|
|
44
44
|
---
|
|
45
45
|
**/
|
|
46
46
|
let Menu = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class Menu extends Component {
|
|
47
|
-
static displayName =
|
|
47
|
+
static displayName = 'Menu';
|
|
48
48
|
static componentId = 'Menu';
|
|
49
49
|
static allowedProps = allowedProps;
|
|
50
50
|
static defaultProps = {
|
|
@@ -30,9 +30,9 @@ import { omitProps, getElementType, withDeterministicId, callRenderProp } from '
|
|
|
30
30
|
import { createChainedFunction } from '@instructure/ui-utils';
|
|
31
31
|
import { isActiveElement, findDOMNode } from '@instructure/ui-dom-utils';
|
|
32
32
|
import { withStyleNew } from '@instructure/emotion';
|
|
33
|
-
import { MenuContext } from
|
|
34
|
-
import generateStyle from
|
|
35
|
-
import { allowedProps } from
|
|
33
|
+
import { MenuContext } from '../../../utils/v1/MenuContext.js';
|
|
34
|
+
import generateStyle from './styles.js';
|
|
35
|
+
import { allowedProps } from './props.js';
|
|
36
36
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
37
37
|
/**
|
|
38
38
|
---
|
|
@@ -41,7 +41,7 @@ id: Menu.Item
|
|
|
41
41
|
---
|
|
42
42
|
**/
|
|
43
43
|
let MenuItem = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle), _dec(_class = _dec2(_class = class MenuItem extends Component {
|
|
44
|
-
static displayName =
|
|
44
|
+
static displayName = 'MenuItem';
|
|
45
45
|
static componentId = 'Menu.Item';
|
|
46
46
|
static allowedProps = allowedProps;
|
|
47
47
|
static defaultProps = {
|
|
@@ -61,9 +61,6 @@ let MenuItem = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle
|
|
|
61
61
|
this.state = state;
|
|
62
62
|
this.labelId = props.deterministicId('MenuItem__label');
|
|
63
63
|
}
|
|
64
|
-
get _node() {
|
|
65
|
-
return this.ref;
|
|
66
|
-
}
|
|
67
64
|
labelId;
|
|
68
65
|
ref = null;
|
|
69
66
|
handleRef = el => {
|
|
@@ -27,9 +27,9 @@ import { Children, Component } from 'react';
|
|
|
27
27
|
import { withStyleNew } from '@instructure/emotion';
|
|
28
28
|
import { omitProps, safeCloneElement, matchComponentTypes, withDeterministicId } from '@instructure/ui-react-utils';
|
|
29
29
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
|
|
30
|
-
import { MenuItem } from
|
|
31
|
-
import generateStyle from
|
|
32
|
-
import { allowedProps } from
|
|
30
|
+
import { MenuItem } from '../MenuItem/index.js';
|
|
31
|
+
import generateStyle from './styles.js';
|
|
32
|
+
import { allowedProps } from './props.js';
|
|
33
33
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
34
34
|
/**
|
|
35
35
|
---
|
|
@@ -38,7 +38,7 @@ id: Menu.Group
|
|
|
38
38
|
---
|
|
39
39
|
**/
|
|
40
40
|
let MenuItemGroup = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle), _dec(_class = _dec2(_class = class MenuItemGroup extends Component {
|
|
41
|
-
static displayName =
|
|
41
|
+
static displayName = 'MenuItemGroup';
|
|
42
42
|
static componentId = 'Menu.Group';
|
|
43
43
|
static allowedProps = allowedProps;
|
|
44
44
|
static defaultProps = {
|
|
@@ -26,8 +26,8 @@ var _dec, _class;
|
|
|
26
26
|
import { Component } from 'react';
|
|
27
27
|
import { withStyleNew } from '@instructure/emotion';
|
|
28
28
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
29
|
-
import generateStyle from
|
|
30
|
-
import { allowedProps } from
|
|
29
|
+
import generateStyle from './styles.js';
|
|
30
|
+
import { allowedProps } from './props.js';
|
|
31
31
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
32
32
|
/**
|
|
33
33
|
---
|
|
@@ -37,7 +37,7 @@ id: Menu.Separator
|
|
|
37
37
|
@module MenuItemSeparator
|
|
38
38
|
**/
|
|
39
39
|
let MenuItemSeparator = (_dec = withStyleNew(generateStyle), _dec(_class = class MenuItemSeparator extends Component {
|
|
40
|
-
static displayName =
|
|
40
|
+
static displayName = 'MenuItemSeparator';
|
|
41
41
|
static componentId = 'Menu.Separator';
|
|
42
42
|
static allowedProps = allowedProps;
|
|
43
43
|
ref = null;
|
package/es/Menu/v2/index.js
CHANGED
|
@@ -29,13 +29,13 @@ import { Popover } from '@instructure/ui-popover/latest';
|
|
|
29
29
|
import { safeCloneElement, matchComponentTypes, withDeterministicId } from '@instructure/ui-react-utils';
|
|
30
30
|
import { logError as error } from '@instructure/console';
|
|
31
31
|
import { containsActiveElement } from '@instructure/ui-dom-utils';
|
|
32
|
-
import { MenuContext } from
|
|
33
|
-
import { MenuItem } from
|
|
34
|
-
import { MenuItemGroup } from
|
|
35
|
-
import { MenuItemSeparator } from
|
|
32
|
+
import { MenuContext } from '../../utils/v1/MenuContext.js';
|
|
33
|
+
import { MenuItem } from './MenuItem/index.js';
|
|
34
|
+
import { MenuItemGroup } from './MenuItemGroup/index.js';
|
|
35
|
+
import { MenuItemSeparator } from './MenuItemSeparator/index.js';
|
|
36
36
|
import { withStyleNew } from '@instructure/emotion';
|
|
37
|
-
import generateStyle from
|
|
38
|
-
import { allowedProps } from
|
|
37
|
+
import generateStyle from './styles.js';
|
|
38
|
+
import { allowedProps } from './props.js';
|
|
39
39
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
40
40
|
/**
|
|
41
41
|
---
|
|
@@ -43,7 +43,7 @@ category: components
|
|
|
43
43
|
---
|
|
44
44
|
**/
|
|
45
45
|
let Menu = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle), _dec(_class = _dec2(_class = class Menu extends Component {
|
|
46
|
-
static displayName =
|
|
46
|
+
static displayName = 'Menu';
|
|
47
47
|
static componentId = 'Menu';
|
|
48
48
|
static allowedProps = allowedProps;
|
|
49
49
|
static defaultProps = {
|
package/es/exports/a.js
CHANGED
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
export { Menu, MenuItem, MenuItemGroup, MenuItemSeparator } from
|
|
24
|
+
export { Menu, MenuItem, MenuItemGroup, MenuItemSeparator } from '../Menu/v1/index.js';
|
package/es/exports/b.js
CHANGED
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
export { Menu, MenuItem, MenuItemGroup, MenuItemSeparator } from
|
|
24
|
+
export { Menu, MenuItem, MenuItemGroup, MenuItemSeparator } from '../Menu/v2/index.js';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-menu",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.4-pr-snapshot-1781695314229",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "A dropdown menu component",
|
|
5
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
7
|
"module": "./es/index.js",
|
|
7
|
-
"main": "./lib/index.js",
|
|
8
8
|
"types": "./types/index.d.ts",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.2",
|
|
18
18
|
"keycode": "^2",
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-position": "11.7.
|
|
27
|
-
"@instructure/ui-
|
|
28
|
-
"@instructure/ui-
|
|
29
|
-
"@instructure/ui-utils": "11.7.
|
|
30
|
-
"@instructure/ui-view": "11.7.
|
|
19
|
+
"@instructure/console": "11.7.4-pr-snapshot-1781695314229",
|
|
20
|
+
"@instructure/emotion": "11.7.4-pr-snapshot-1781695314229",
|
|
21
|
+
"@instructure/shared-types": "11.7.4-pr-snapshot-1781695314229",
|
|
22
|
+
"@instructure/ui-a11y-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
23
|
+
"@instructure/ui-dom-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
24
|
+
"@instructure/ui-popover": "11.7.4-pr-snapshot-1781695314229",
|
|
25
|
+
"@instructure/ui-icons": "11.7.4-pr-snapshot-1781695314229",
|
|
26
|
+
"@instructure/ui-position": "11.7.4-pr-snapshot-1781695314229",
|
|
27
|
+
"@instructure/ui-themes": "11.7.4-pr-snapshot-1781695314229",
|
|
28
|
+
"@instructure/ui-react-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
29
|
+
"@instructure/ui-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
30
|
+
"@instructure/ui-view": "11.7.4-pr-snapshot-1781695314229"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^6.6.3",
|
|
34
34
|
"@testing-library/react": "15.0.7",
|
|
35
35
|
"@testing-library/user-event": "^14.6.1",
|
|
36
36
|
"vitest": "^3.2.2",
|
|
37
|
-
"@instructure/ui-
|
|
38
|
-
"@instructure/ui-
|
|
39
|
-
"@instructure/ui-color-utils": "11.7.
|
|
37
|
+
"@instructure/ui-axe-check": "11.7.4-pr-snapshot-1781695314229",
|
|
38
|
+
"@instructure/ui-babel-preset": "11.7.4-pr-snapshot-1781695314229",
|
|
39
|
+
"@instructure/ui-color-utils": "11.7.4-pr-snapshot-1781695314229"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=18 <=19"
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"exports": {
|
|
49
|
-
"./lib/*": "./lib/*",
|
|
50
49
|
"./es/*": "./es/*",
|
|
51
50
|
"./types/*": "./types/*",
|
|
52
51
|
"./package.json": "./package.json",
|
|
@@ -55,28 +54,24 @@
|
|
|
55
54
|
"src": "./src/exports/a.ts",
|
|
56
55
|
"types": "./types/exports/a.d.ts",
|
|
57
56
|
"import": "./es/exports/a.js",
|
|
58
|
-
"require": "./lib/exports/a.js",
|
|
59
57
|
"default": "./es/exports/a.js"
|
|
60
58
|
},
|
|
61
59
|
"./v11_6": {
|
|
62
60
|
"src": "./src/exports/a.ts",
|
|
63
61
|
"types": "./types/exports/a.d.ts",
|
|
64
62
|
"import": "./es/exports/a.js",
|
|
65
|
-
"require": "./lib/exports/a.js",
|
|
66
63
|
"default": "./es/exports/a.js"
|
|
67
64
|
},
|
|
68
65
|
"./v11_7": {
|
|
69
66
|
"src": "./src/exports/b.ts",
|
|
70
67
|
"types": "./types/exports/b.d.ts",
|
|
71
68
|
"import": "./es/exports/b.js",
|
|
72
|
-
"require": "./lib/exports/b.js",
|
|
73
69
|
"default": "./es/exports/b.js"
|
|
74
70
|
},
|
|
75
71
|
"./latest": {
|
|
76
72
|
"src": "./src/exports/b.ts",
|
|
77
73
|
"types": "./types/exports/b.d.ts",
|
|
78
74
|
"import": "./es/exports/b.js",
|
|
79
|
-
"require": "./lib/exports/b.js",
|
|
80
75
|
"default": "./es/exports/b.js"
|
|
81
76
|
}
|
|
82
77
|
},
|
|
@@ -84,7 +79,7 @@
|
|
|
84
79
|
"lint": "ui-scripts lint",
|
|
85
80
|
"lint:fix": "ui-scripts lint --fix",
|
|
86
81
|
"clean": "ui-scripts clean",
|
|
87
|
-
"build": "ui-scripts build
|
|
82
|
+
"build": "ui-scripts build",
|
|
88
83
|
"build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
|
|
89
84
|
"build:types": "tsc -p tsconfig.build.json",
|
|
90
85
|
"ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
|
|
@@ -36,12 +36,12 @@ import { createChainedFunction } from '@instructure/ui-utils'
|
|
|
36
36
|
import { isActiveElement, findDOMNode } from '@instructure/ui-dom-utils'
|
|
37
37
|
import { withStyle } from '@instructure/emotion'
|
|
38
38
|
|
|
39
|
-
import { MenuContext } from '../../../utils/v1/MenuContext'
|
|
39
|
+
import { MenuContext } from '../../../utils/v1/MenuContext.js'
|
|
40
40
|
|
|
41
|
-
import generateStyle from './styles'
|
|
42
|
-
import generateComponentTheme from './theme'
|
|
41
|
+
import generateStyle from './styles.js'
|
|
42
|
+
import generateComponentTheme from './theme.js'
|
|
43
43
|
|
|
44
|
-
import { allowedProps } from './props'
|
|
44
|
+
import { allowedProps } from './props.js'
|
|
45
45
|
import type { MenuItemProps, MenuItemState } from './props'
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -53,6 +53,7 @@ id: Menu.Item
|
|
|
53
53
|
@withDeterministicId()
|
|
54
54
|
@withStyle(generateStyle, generateComponentTheme)
|
|
55
55
|
class MenuItem extends Component<MenuItemProps, MenuItemState> {
|
|
56
|
+
static displayName = 'MenuItem'
|
|
56
57
|
static readonly componentId = 'Menu.Item'
|
|
57
58
|
|
|
58
59
|
static allowedProps = allowedProps
|
|
@@ -33,15 +33,15 @@ import {
|
|
|
33
33
|
} from '@instructure/ui-react-utils'
|
|
34
34
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils'
|
|
35
35
|
|
|
36
|
-
import { MenuItem } from '../MenuItem'
|
|
36
|
+
import { MenuItem } from '../MenuItem/index.js'
|
|
37
37
|
import type { OnMenuItemSelect, MenuItemProps } from '../MenuItem/props'
|
|
38
|
-
import { MenuItemSeparator } from '../MenuItemSeparator'
|
|
38
|
+
import { MenuItemSeparator } from '../MenuItemSeparator/index.js'
|
|
39
39
|
import type { MenuSeparatorProps } from '../MenuItemSeparator/props'
|
|
40
40
|
|
|
41
|
-
import generateStyle from './styles'
|
|
42
|
-
import generateComponentTheme from './theme'
|
|
41
|
+
import generateStyle from './styles.js'
|
|
42
|
+
import generateComponentTheme from './theme.js'
|
|
43
43
|
|
|
44
|
-
import { allowedProps } from './props'
|
|
44
|
+
import { allowedProps } from './props.js'
|
|
45
45
|
import type { MenuGroupProps, MenuGroupState } from './props'
|
|
46
46
|
|
|
47
47
|
type MenuItemChild = ComponentElement<MenuItemProps, MenuItem>
|
|
@@ -59,6 +59,7 @@ id: Menu.Group
|
|
|
59
59
|
@withDeterministicId()
|
|
60
60
|
@withStyle(generateStyle, generateComponentTheme)
|
|
61
61
|
class MenuItemGroup extends Component<MenuGroupProps, MenuGroupState> {
|
|
62
|
+
static displayName = 'MenuItemGroup'
|
|
62
63
|
static readonly componentId = 'Menu.Group'
|
|
63
64
|
|
|
64
65
|
static allowedProps = allowedProps
|
|
@@ -27,10 +27,10 @@ import { Component } from 'react'
|
|
|
27
27
|
import { withStyle } from '@instructure/emotion'
|
|
28
28
|
import { omitProps } from '@instructure/ui-react-utils'
|
|
29
29
|
|
|
30
|
-
import generateStyle from './styles'
|
|
31
|
-
import generateComponentTheme from './theme'
|
|
30
|
+
import generateStyle from './styles.js'
|
|
31
|
+
import generateComponentTheme from './theme.js'
|
|
32
32
|
|
|
33
|
-
import { allowedProps } from './props'
|
|
33
|
+
import { allowedProps } from './props.js'
|
|
34
34
|
import type { MenuSeparatorProps } from './props'
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -42,6 +42,7 @@ id: Menu.Separator
|
|
|
42
42
|
**/
|
|
43
43
|
@withStyle(generateStyle, generateComponentTheme)
|
|
44
44
|
class MenuItemSeparator extends Component<MenuSeparatorProps> {
|
|
45
|
+
static displayName = 'MenuItemSeparator'
|
|
45
46
|
static readonly componentId = 'Menu.Separator'
|
|
46
47
|
|
|
47
48
|
static allowedProps = allowedProps
|
package/src/Menu/v1/index.tsx
CHANGED
|
@@ -34,19 +34,19 @@ import {
|
|
|
34
34
|
import { logError as error } from '@instructure/console'
|
|
35
35
|
import { containsActiveElement } from '@instructure/ui-dom-utils'
|
|
36
36
|
|
|
37
|
-
import { MenuContext } from '../../utils/v1/MenuContext'
|
|
38
|
-
import { MenuItem } from './MenuItem'
|
|
37
|
+
import { MenuContext } from '../../utils/v1/MenuContext.js'
|
|
38
|
+
import { MenuItem } from './MenuItem/index.js'
|
|
39
39
|
import type { MenuItemProps } from './MenuItem/props'
|
|
40
|
-
import { MenuItemGroup } from './MenuItemGroup'
|
|
40
|
+
import { MenuItemGroup } from './MenuItemGroup/index.js'
|
|
41
41
|
import type { MenuGroupProps } from './MenuItemGroup/props'
|
|
42
|
-
import { MenuItemSeparator } from './MenuItemSeparator'
|
|
42
|
+
import { MenuItemSeparator } from './MenuItemSeparator/index.js'
|
|
43
43
|
import type { MenuSeparatorProps } from './MenuItemSeparator/props'
|
|
44
44
|
import { withStyle } from '@instructure/emotion'
|
|
45
45
|
|
|
46
|
-
import generateStyle from './styles'
|
|
47
|
-
import generateComponentTheme from './theme'
|
|
46
|
+
import generateStyle from './styles.js'
|
|
47
|
+
import generateComponentTheme from './theme.js'
|
|
48
48
|
|
|
49
|
-
import { allowedProps } from './props'
|
|
49
|
+
import { allowedProps } from './props.js'
|
|
50
50
|
import type { MenuProps } from './props'
|
|
51
51
|
|
|
52
52
|
type MenuChild = ComponentElement<MenuProps, Menu>
|
|
@@ -65,6 +65,7 @@ category: components
|
|
|
65
65
|
@withDeterministicId()
|
|
66
66
|
@withStyle(generateStyle, generateComponentTheme)
|
|
67
67
|
class Menu extends Component<MenuProps> {
|
|
68
|
+
static displayName = 'Menu'
|
|
68
69
|
static readonly componentId = 'Menu'
|
|
69
70
|
static allowedProps = allowedProps
|
|
70
71
|
static defaultProps = {
|
package/src/Menu/v1/props.ts
CHANGED
|
@@ -34,7 +34,7 @@ import type {
|
|
|
34
34
|
import type { Popover } from '@instructure/ui-popover/v11_6'
|
|
35
35
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
36
36
|
|
|
37
|
-
import { MenuItem } from './MenuItem'
|
|
37
|
+
import { MenuItem } from './MenuItem/index.js'
|
|
38
38
|
import type { Menu } from './index'
|
|
39
39
|
import type { MenuItemProps } from './MenuItem/props'
|
|
40
40
|
|
|
@@ -36,11 +36,11 @@ import { createChainedFunction } from '@instructure/ui-utils'
|
|
|
36
36
|
import { isActiveElement, findDOMNode } from '@instructure/ui-dom-utils'
|
|
37
37
|
import { withStyleNew } from '@instructure/emotion'
|
|
38
38
|
|
|
39
|
-
import { MenuContext } from '../../../utils/v1/MenuContext'
|
|
39
|
+
import { MenuContext } from '../../../utils/v1/MenuContext.js'
|
|
40
40
|
|
|
41
|
-
import generateStyle from './styles'
|
|
41
|
+
import generateStyle from './styles.js'
|
|
42
42
|
|
|
43
|
-
import { allowedProps } from './props'
|
|
43
|
+
import { allowedProps } from './props.js'
|
|
44
44
|
import type { MenuItemProps, MenuItemState } from './props'
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -52,6 +52,7 @@ id: Menu.Item
|
|
|
52
52
|
@withDeterministicId()
|
|
53
53
|
@withStyleNew(generateStyle)
|
|
54
54
|
class MenuItem extends Component<MenuItemProps, MenuItemState> {
|
|
55
|
+
static displayName = 'MenuItem'
|
|
55
56
|
static readonly componentId = 'Menu.Item'
|
|
56
57
|
|
|
57
58
|
static allowedProps = allowedProps
|
|
@@ -79,14 +80,6 @@ class MenuItem extends Component<MenuItemProps, MenuItemState> {
|
|
|
79
80
|
this.labelId = props.deterministicId!('MenuItem__label')
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
get _node() {
|
|
83
|
-
console.warn(
|
|
84
|
-
'_node property is deprecated and will be removed in v9, please use ref instead'
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
return this.ref
|
|
88
|
-
}
|
|
89
|
-
|
|
90
83
|
labelId: string
|
|
91
84
|
ref: Element | null = null
|
|
92
85
|
|
|
@@ -33,14 +33,14 @@ import {
|
|
|
33
33
|
} from '@instructure/ui-react-utils'
|
|
34
34
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils'
|
|
35
35
|
|
|
36
|
-
import { MenuItem } from '../MenuItem'
|
|
36
|
+
import { MenuItem } from '../MenuItem/index.js'
|
|
37
37
|
import type { OnMenuItemSelect, MenuItemProps } from '../MenuItem/props'
|
|
38
|
-
import { MenuItemSeparator } from '../MenuItemSeparator'
|
|
38
|
+
import { MenuItemSeparator } from '../MenuItemSeparator/index.js'
|
|
39
39
|
import type { MenuSeparatorProps } from '../MenuItemSeparator/props'
|
|
40
40
|
|
|
41
|
-
import generateStyle from './styles'
|
|
41
|
+
import generateStyle from './styles.js'
|
|
42
42
|
|
|
43
|
-
import { allowedProps } from './props'
|
|
43
|
+
import { allowedProps } from './props.js'
|
|
44
44
|
import type { MenuGroupProps, MenuGroupState } from './props'
|
|
45
45
|
|
|
46
46
|
type MenuItemChild = ComponentElement<MenuItemProps, MenuItem>
|
|
@@ -58,6 +58,7 @@ id: Menu.Group
|
|
|
58
58
|
@withDeterministicId()
|
|
59
59
|
@withStyleNew(generateStyle)
|
|
60
60
|
class MenuItemGroup extends Component<MenuGroupProps, MenuGroupState> {
|
|
61
|
+
static displayName = 'MenuItemGroup'
|
|
61
62
|
static readonly componentId = 'Menu.Group'
|
|
62
63
|
|
|
63
64
|
static allowedProps = allowedProps
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import React from 'react'
|
|
26
26
|
|
|
27
|
-
import { MenuItem } from '../MenuItem'
|
|
27
|
+
import { MenuItem } from '../MenuItem/index.js'
|
|
28
28
|
|
|
29
29
|
import type { OtherHTMLAttributes } from '@instructure/shared-types'
|
|
30
30
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|