@instructure/ui-menu 11.6.0 → 11.6.1-snapshot-129
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 +41 -297
- package/es/Menu/{MenuItem → v1/MenuItem}/index.js +2 -2
- package/es/Menu/{MenuItemGroup → v1/MenuItemGroup}/index.js +1 -1
- package/es/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/index.js +1 -1
- package/es/Menu/{index.js → v1/index.js} +3 -3
- package/es/Menu/v2/MenuItem/index.js +262 -0
- package/es/Menu/v2/MenuItem/props.js +26 -0
- package/es/Menu/v2/MenuItem/styles.js +146 -0
- package/es/Menu/v2/MenuItemGroup/index.js +175 -0
- package/es/Menu/v2/MenuItemGroup/props.js +26 -0
- package/es/Menu/v2/MenuItemGroup/styles.js +60 -0
- package/es/Menu/v2/MenuItemSeparator/index.js +70 -0
- package/es/Menu/v2/MenuItemSeparator/props.js +29 -0
- package/es/Menu/v2/MenuItemSeparator/styles.js +46 -0
- package/es/Menu/v2/index.js +405 -0
- package/es/Menu/v2/props.js +26 -0
- package/es/Menu/v2/styles.js +61 -0
- package/es/{index.js → exports/a.js} +1 -1
- package/es/exports/b.js +24 -0
- package/es/{MenuContext.js → utils/v1/MenuContext.js} +2 -0
- package/lib/Menu/{MenuItem → v1/MenuItem}/index.js +4 -4
- package/lib/Menu/{MenuItemGroup → v1/MenuItemGroup}/index.js +1 -1
- package/lib/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/index.js +1 -1
- package/lib/Menu/v1/index.js +432 -0
- package/lib/Menu/v2/MenuItem/index.js +271 -0
- package/lib/Menu/v2/MenuItem/props.js +31 -0
- package/lib/Menu/v2/MenuItem/styles.js +152 -0
- package/lib/Menu/v2/MenuItemGroup/index.js +183 -0
- package/lib/Menu/v2/MenuItemGroup/props.js +31 -0
- package/lib/Menu/v2/MenuItemGroup/styles.js +66 -0
- package/lib/Menu/v2/MenuItemSeparator/index.js +75 -0
- package/lib/Menu/v2/MenuItemSeparator/props.js +34 -0
- package/lib/Menu/v2/MenuItemSeparator/styles.js +52 -0
- package/lib/Menu/{index.js → v2/index.js} +4 -5
- package/lib/Menu/v2/props.js +31 -0
- package/lib/Menu/v2/styles.js +66 -0
- package/lib/{index.js → exports/a.js} +5 -5
- package/lib/exports/b.js +30 -0
- package/lib/{MenuContext.js → utils/v1/MenuContext.js} +1 -0
- package/package.json +45 -23
- package/src/Menu/{MenuItem → v1/MenuItem}/index.tsx +2 -2
- package/src/Menu/{MenuItemGroup → v1/MenuItemGroup}/index.tsx +1 -1
- package/src/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/index.tsx +1 -1
- package/src/Menu/{index.tsx → v1/index.tsx} +3 -3
- package/src/Menu/{props.ts → v1/props.ts} +1 -1
- package/src/Menu/v2/MenuItem/index.tsx +318 -0
- package/src/Menu/v2/MenuItem/props.ts +132 -0
- package/src/Menu/v2/MenuItem/styles.ts +172 -0
- package/src/Menu/v2/MenuItemGroup/index.tsx +245 -0
- package/src/Menu/v2/MenuItemGroup/props.ts +105 -0
- package/src/Menu/v2/MenuItemGroup/styles.ts +66 -0
- package/src/Menu/v2/MenuItemSeparator/index.tsx +79 -0
- package/src/Menu/v2/MenuItemSeparator/props.ts +48 -0
- package/src/Menu/v2/MenuItemSeparator/styles.ts +52 -0
- package/src/Menu/v2/README.md +104 -0
- package/src/Menu/v2/index.tsx +514 -0
- package/src/Menu/v2/props.ts +213 -0
- package/src/Menu/v2/styles.ts +68 -0
- package/src/{index.ts → exports/a.ts} +5 -5
- package/src/exports/b.ts +29 -0
- package/src/{MenuContext.ts → utils/v1/MenuContext.ts} +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Menu/{MenuItem → v1/MenuItem}/index.d.ts +3 -3
- package/types/Menu/v1/MenuItem/index.d.ts.map +1 -0
- package/types/Menu/v1/MenuItem/props.d.ts.map +1 -0
- package/types/Menu/v1/MenuItem/styles.d.ts.map +1 -0
- package/types/Menu/v1/MenuItem/theme.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemGroup/index.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemGroup/props.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemGroup/styles.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemGroup/theme.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemSeparator/index.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemSeparator/props.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemSeparator/styles.d.ts.map +1 -0
- package/types/Menu/v1/MenuItemSeparator/theme.d.ts.map +1 -0
- package/types/Menu/{index.d.ts → v1/index.d.ts} +3 -3
- package/types/Menu/v1/index.d.ts.map +1 -0
- package/types/Menu/{props.d.ts → v1/props.d.ts} +1 -1
- package/types/Menu/v1/props.d.ts.map +1 -0
- package/types/Menu/v1/styles.d.ts.map +1 -0
- package/types/Menu/v1/theme.d.ts.map +1 -0
- package/types/Menu/v2/MenuItem/index.d.ts +66 -0
- package/types/Menu/v2/MenuItem/index.d.ts.map +1 -0
- package/types/Menu/v2/MenuItem/props.d.ts +73 -0
- package/types/Menu/v2/MenuItem/props.d.ts.map +1 -0
- package/types/Menu/v2/MenuItem/styles.d.ts +15 -0
- package/types/Menu/v2/MenuItem/styles.d.ts.map +1 -0
- package/types/Menu/v2/MenuItemGroup/index.d.ts +52 -0
- package/types/Menu/v2/MenuItemGroup/index.d.ts.map +1 -0
- package/types/Menu/v2/MenuItemGroup/props.d.ts +51 -0
- package/types/Menu/v2/MenuItemGroup/props.d.ts.map +1 -0
- package/types/Menu/v2/MenuItemGroup/styles.d.ts +15 -0
- package/types/Menu/v2/MenuItemGroup/styles.d.ts.map +1 -0
- package/types/Menu/v2/MenuItemSeparator/index.d.ts +21 -0
- package/types/Menu/v2/MenuItemSeparator/index.d.ts.map +1 -0
- package/types/Menu/v2/MenuItemSeparator/props.d.ts +11 -0
- package/types/Menu/v2/MenuItemSeparator/props.d.ts.map +1 -0
- package/types/Menu/v2/MenuItemSeparator/styles.d.ts +15 -0
- package/types/Menu/v2/MenuItemSeparator/styles.d.ts.map +1 -0
- package/types/Menu/v2/index.d.ts +118 -0
- package/types/Menu/v2/index.d.ts.map +1 -0
- package/types/Menu/v2/props.d.ts +138 -0
- package/types/Menu/v2/props.d.ts.map +1 -0
- package/types/Menu/v2/styles.d.ts +15 -0
- package/types/Menu/v2/styles.d.ts.map +1 -0
- package/types/exports/a.d.ts +6 -0
- package/types/exports/a.d.ts.map +1 -0
- package/types/exports/b.d.ts +6 -0
- package/types/exports/b.d.ts.map +1 -0
- package/types/utils/v1/MenuContext.d.ts +13 -0
- package/types/utils/v1/MenuContext.d.ts.map +1 -0
- package/types/Menu/MenuItem/index.d.ts.map +0 -1
- package/types/Menu/MenuItem/props.d.ts.map +0 -1
- package/types/Menu/MenuItem/styles.d.ts.map +0 -1
- package/types/Menu/MenuItem/theme.d.ts.map +0 -1
- package/types/Menu/MenuItemGroup/index.d.ts.map +0 -1
- package/types/Menu/MenuItemGroup/props.d.ts.map +0 -1
- package/types/Menu/MenuItemGroup/styles.d.ts.map +0 -1
- package/types/Menu/MenuItemGroup/theme.d.ts.map +0 -1
- package/types/Menu/MenuItemSeparator/index.d.ts.map +0 -1
- package/types/Menu/MenuItemSeparator/props.d.ts.map +0 -1
- package/types/Menu/MenuItemSeparator/styles.d.ts.map +0 -1
- package/types/Menu/MenuItemSeparator/theme.d.ts.map +0 -1
- package/types/Menu/index.d.ts.map +0 -1
- package/types/Menu/props.d.ts.map +0 -1
- package/types/Menu/styles.d.ts.map +0 -1
- package/types/Menu/theme.d.ts.map +0 -1
- package/types/MenuContext.d.ts +0 -14
- package/types/MenuContext.d.ts.map +0 -1
- package/types/index.d.ts +0 -6
- package/types/index.d.ts.map +0 -1
- /package/es/Menu/{MenuItem → v1/MenuItem}/props.js +0 -0
- /package/es/Menu/{MenuItem → v1/MenuItem}/styles.js +0 -0
- /package/es/Menu/{MenuItem → v1/MenuItem}/theme.js +0 -0
- /package/es/Menu/{MenuItemGroup → v1/MenuItemGroup}/props.js +0 -0
- /package/es/Menu/{MenuItemGroup → v1/MenuItemGroup}/styles.js +0 -0
- /package/es/Menu/{MenuItemGroup → v1/MenuItemGroup}/theme.js +0 -0
- /package/es/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/props.js +0 -0
- /package/es/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/styles.js +0 -0
- /package/es/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/theme.js +0 -0
- /package/es/Menu/{props.js → v1/props.js} +0 -0
- /package/es/Menu/{styles.js → v1/styles.js} +0 -0
- /package/es/Menu/{theme.js → v1/theme.js} +0 -0
- /package/lib/Menu/{MenuItem → v1/MenuItem}/props.js +0 -0
- /package/lib/Menu/{MenuItem → v1/MenuItem}/styles.js +0 -0
- /package/lib/Menu/{MenuItem → v1/MenuItem}/theme.js +0 -0
- /package/lib/Menu/{MenuItemGroup → v1/MenuItemGroup}/props.js +0 -0
- /package/lib/Menu/{MenuItemGroup → v1/MenuItemGroup}/styles.js +0 -0
- /package/lib/Menu/{MenuItemGroup → v1/MenuItemGroup}/theme.js +0 -0
- /package/lib/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/props.js +0 -0
- /package/lib/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/styles.js +0 -0
- /package/lib/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/theme.js +0 -0
- /package/lib/Menu/{props.js → v1/props.js} +0 -0
- /package/lib/Menu/{styles.js → v1/styles.js} +0 -0
- /package/lib/Menu/{theme.js → v1/theme.js} +0 -0
- /package/src/Menu/{MenuItem → v1/MenuItem}/props.ts +0 -0
- /package/src/Menu/{MenuItem → v1/MenuItem}/styles.ts +0 -0
- /package/src/Menu/{MenuItem → v1/MenuItem}/theme.ts +0 -0
- /package/src/Menu/{MenuItemGroup → v1/MenuItemGroup}/props.ts +0 -0
- /package/src/Menu/{MenuItemGroup → v1/MenuItemGroup}/styles.ts +0 -0
- /package/src/Menu/{MenuItemGroup → v1/MenuItemGroup}/theme.ts +0 -0
- /package/src/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/props.ts +0 -0
- /package/src/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/styles.ts +0 -0
- /package/src/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/theme.ts +0 -0
- /package/src/Menu/{README.md → v1/README.md} +0 -0
- /package/src/Menu/{styles.ts → v1/styles.ts} +0 -0
- /package/src/Menu/{theme.ts → v1/theme.ts} +0 -0
- /package/types/Menu/{MenuItem → v1/MenuItem}/props.d.ts +0 -0
- /package/types/Menu/{MenuItem → v1/MenuItem}/styles.d.ts +0 -0
- /package/types/Menu/{MenuItem → v1/MenuItem}/theme.d.ts +0 -0
- /package/types/Menu/{MenuItemGroup → v1/MenuItemGroup}/index.d.ts +0 -0
- /package/types/Menu/{MenuItemGroup → v1/MenuItemGroup}/props.d.ts +0 -0
- /package/types/Menu/{MenuItemGroup → v1/MenuItemGroup}/styles.d.ts +0 -0
- /package/types/Menu/{MenuItemGroup → v1/MenuItemGroup}/theme.d.ts +0 -0
- /package/types/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/index.d.ts +0 -0
- /package/types/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/props.d.ts +0 -0
- /package/types/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/styles.d.ts +0 -0
- /package/types/Menu/{MenuItemSeparator → v1/MenuItemSeparator}/theme.d.ts +0 -0
- /package/types/Menu/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/Menu/{theme.d.ts → v1/theme.d.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* ---
|
|
33
|
+
* private: true
|
|
34
|
+
* ---
|
|
35
|
+
* Generates the style object from the theme and provided additional information
|
|
36
|
+
* @param {Object} componentTheme The theme variable object.
|
|
37
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
38
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
39
|
+
* @return {Object} The final style object, which will be used in the component
|
|
40
|
+
*/
|
|
41
|
+
const generateStyle = componentTheme => {
|
|
42
|
+
return {
|
|
43
|
+
menuItemGroup: {
|
|
44
|
+
label: 'menuItemGroup',
|
|
45
|
+
display: 'block'
|
|
46
|
+
},
|
|
47
|
+
label: {
|
|
48
|
+
label: 'menuItemGroup__label',
|
|
49
|
+
background: componentTheme.background,
|
|
50
|
+
padding: `${componentTheme.paddingVertical} ${componentTheme.paddingHorizontal}`,
|
|
51
|
+
display: 'block',
|
|
52
|
+
fontSize: componentTheme.fontSize,
|
|
53
|
+
fontFamily: componentTheme.fontFamily,
|
|
54
|
+
fontWeight: componentTheme.fontWeight,
|
|
55
|
+
color: componentTheme.color,
|
|
56
|
+
textAlign: 'start'
|
|
57
|
+
},
|
|
58
|
+
items: {
|
|
59
|
+
label: 'menuItemGroup__items',
|
|
60
|
+
padding: '0',
|
|
61
|
+
margin: '0 0 0 0',
|
|
62
|
+
listStyleType: 'none'
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
var _default = exports.default = generateStyle;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.MenuItemSeparator = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _emotion = require("@instructure/emotion");
|
|
10
|
+
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
12
|
+
var _props = require("./props");
|
|
13
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
+
var _dec, _class, _MenuItemSeparator;
|
|
15
|
+
/*
|
|
16
|
+
* The MIT License (MIT)
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
19
|
+
*
|
|
20
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
* in the Software without restriction, including without limitation the rights
|
|
23
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
* furnished to do so, subject to the following conditions:
|
|
26
|
+
*
|
|
27
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
* copies or substantial portions of the Software.
|
|
29
|
+
*
|
|
30
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
+
* SOFTWARE.
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
---
|
|
40
|
+
parent: Menu
|
|
41
|
+
id: Menu.Separator
|
|
42
|
+
---
|
|
43
|
+
@module MenuItemSeparator
|
|
44
|
+
**/
|
|
45
|
+
let MenuItemSeparator = exports.MenuItemSeparator = (_dec = (0, _emotion.withStyle)(_styles.default), _dec(_class = (_MenuItemSeparator = class MenuItemSeparator extends _react.Component {
|
|
46
|
+
constructor(...args) {
|
|
47
|
+
super(...args);
|
|
48
|
+
this.ref = null;
|
|
49
|
+
this.handleRef = el => {
|
|
50
|
+
this.ref = el;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
componentDidMount() {
|
|
54
|
+
var _this$props$makeStyle, _this$props;
|
|
55
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
56
|
+
}
|
|
57
|
+
componentDidUpdate() {
|
|
58
|
+
var _this$props$makeStyle2, _this$props2;
|
|
59
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
var _this$props$styles;
|
|
63
|
+
const props = (0, _omitProps.omitProps)(this.props, MenuItemSeparator.allowedProps);
|
|
64
|
+
// role="separator" would fit better here, but it causes NVDA to stop the
|
|
65
|
+
// MenuItem count after it
|
|
66
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
67
|
+
...props,
|
|
68
|
+
role: "presentation",
|
|
69
|
+
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.menuItemSeparator,
|
|
70
|
+
ref: this.handleRef,
|
|
71
|
+
"data-cid": "MenuItemSeparator"
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}, _MenuItemSeparator.displayName = "MenuItemSeparator", _MenuItemSeparator.componentId = 'Menu.Separator', _MenuItemSeparator.allowedProps = _props.allowedProps, _MenuItemSeparator)) || _class);
|
|
75
|
+
var _default = exports.default = MenuItemSeparator;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.allowedProps = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// keeping here to keep the structure of props.ts
|
|
32
|
+
// eslint-disable-next-line
|
|
33
|
+
|
|
34
|
+
const allowedProps = exports.allowedProps = [];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* ---
|
|
33
|
+
* private: true
|
|
34
|
+
* ---
|
|
35
|
+
* Generates the style object from the theme and provided additional information
|
|
36
|
+
* @param {Object} componentTheme The theme variable object.
|
|
37
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
38
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
39
|
+
* @return {Object} The final style object, which will be used in the component
|
|
40
|
+
*/
|
|
41
|
+
const generateStyle = componentTheme => {
|
|
42
|
+
return {
|
|
43
|
+
menuItemSeparator: {
|
|
44
|
+
label: 'menuItemSeparator',
|
|
45
|
+
height: componentTheme.height,
|
|
46
|
+
margin: `${componentTheme.marginVertical} ${componentTheme.marginHorizontal}`,
|
|
47
|
+
overflow: 'hidden',
|
|
48
|
+
background: componentTheme.background
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
var _default = exports.default = generateStyle;
|
|
@@ -26,19 +26,18 @@ Object.defineProperty(exports, "MenuItemSeparator", {
|
|
|
26
26
|
exports.default = void 0;
|
|
27
27
|
var _react = require("react");
|
|
28
28
|
var _keycode = _interopRequireDefault(require("keycode"));
|
|
29
|
-
var
|
|
29
|
+
var _latest = require("@instructure/ui-popover/latest");
|
|
30
30
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
31
31
|
var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
|
|
32
32
|
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
33
33
|
var _console = require("@instructure/console");
|
|
34
34
|
var _containsActiveElement = require("@instructure/ui-dom-utils/lib/containsActiveElement.js");
|
|
35
|
-
var _MenuContext = require("
|
|
35
|
+
var _MenuContext = require("../../utils/v1/MenuContext");
|
|
36
36
|
var _MenuItem = require("./MenuItem");
|
|
37
37
|
var _MenuItemGroup = require("./MenuItemGroup");
|
|
38
38
|
var _MenuItemSeparator = require("./MenuItemSeparator");
|
|
39
39
|
var _emotion = require("@instructure/emotion");
|
|
40
40
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
41
|
-
var _theme = _interopRequireDefault(require("./theme"));
|
|
42
41
|
var _props = require("./props");
|
|
43
42
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
44
43
|
var _dec, _dec2, _class, _Menu;
|
|
@@ -70,7 +69,7 @@ var _dec, _dec2, _class, _Menu;
|
|
|
70
69
|
category: components
|
|
71
70
|
---
|
|
72
71
|
**/
|
|
73
|
-
let Menu = exports.Menu = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default
|
|
72
|
+
let Menu = exports.Menu = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default), _dec(_class = _dec2(_class = (_Menu = class Menu extends _react.Component {
|
|
74
73
|
constructor(props) {
|
|
75
74
|
super(props);
|
|
76
75
|
this.state = {
|
|
@@ -364,7 +363,7 @@ let Menu = exports.Menu = (_dec = (0, _withDeterministicId.withDeterministicId)(
|
|
|
364
363
|
positionContainerDisplay = _this$props5.positionContainerDisplay,
|
|
365
364
|
offsetX = _this$props5.offsetX,
|
|
366
365
|
offsetY = _this$props5.offsetY;
|
|
367
|
-
return trigger ? (0, _jsxRuntime.jsx)(
|
|
366
|
+
return trigger ? (0, _jsxRuntime.jsx)(_latest.Popover, {
|
|
368
367
|
"data-cid": "Menu",
|
|
369
368
|
isShowingContent: show,
|
|
370
369
|
defaultIsShowingContent: defaultShow,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.allowedProps = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const allowedProps = exports.allowedProps = ['children', 'label', 'disabled', 'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'onKeyDown', 'onKeyUp', 'menuRef', 'popoverRef', 'mountNode', 'constrain', 'shouldHideOnSelect', 'shouldFocusTriggerOnClose', 'positionContainerDisplay', 'type', 'id', 'withArrow', 'offsetX', 'offsetY', 'maxHeight', 'renderLabelInfo'];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _emotion = require("@instructure/emotion");
|
|
8
|
+
/*
|
|
9
|
+
* The MIT License (MIT)
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
* in the Software without restriction, including without limitation the rights
|
|
16
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
* furnished to do so, subject to the following conditions:
|
|
19
|
+
*
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
* copies or substantial portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
* SOFTWARE.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* ---
|
|
34
|
+
* private: true
|
|
35
|
+
* ---
|
|
36
|
+
* Generates the style object from the theme and provided additional information
|
|
37
|
+
* @param {Object} componentTheme The theme variable object.
|
|
38
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
39
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
40
|
+
* @return {Object} The final style object, which will be used in the component
|
|
41
|
+
*/
|
|
42
|
+
const generateStyle = (componentTheme, props, sharedTokens) => {
|
|
43
|
+
const maxHeight = props.maxHeight ? {
|
|
44
|
+
maxHeight: props.maxHeight,
|
|
45
|
+
overflow: 'auto'
|
|
46
|
+
} : {};
|
|
47
|
+
return {
|
|
48
|
+
menu: {
|
|
49
|
+
label: 'menu',
|
|
50
|
+
minWidth: componentTheme.minWidth,
|
|
51
|
+
maxWidth: componentTheme.maxWidth,
|
|
52
|
+
listStyleType: 'none',
|
|
53
|
+
margin: '0',
|
|
54
|
+
padding: '0.25rem 0',
|
|
55
|
+
// TODO-rework
|
|
56
|
+
//background: componentTheme.background,
|
|
57
|
+
//borderRadius: componentTheme.borderRadius,
|
|
58
|
+
display: 'block',
|
|
59
|
+
position: 'relative',
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
...maxHeight,
|
|
62
|
+
...(0, _emotion.calcFocusOutlineStyles)(sharedTokens.focusOutline)
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
var _default = exports.default = generateStyle;
|
|
@@ -6,25 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "Menu", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _v.Menu;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "MenuItem", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _v.MenuItem;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "MenuItemGroup", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _v.MenuItemGroup;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "MenuItemSeparator", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _v.MenuItemSeparator;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
var
|
|
30
|
+
var _v = require("../Menu/v1");
|
package/lib/exports/b.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Menu", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _v.Menu;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "MenuItem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _v.MenuItem;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "MenuItemGroup", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _v.MenuItemGroup;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "MenuItemSeparator", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _v.MenuItemSeparator;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var _v = require("../Menu/v2");
|
|
@@ -36,6 +36,7 @@ private: true
|
|
|
36
36
|
@module MenuContext
|
|
37
37
|
**/
|
|
38
38
|
const MenuContext = exports.MenuContext = /*#__PURE__*/(0, _react.createContext)({
|
|
39
|
+
// This is actually a `MenuItem`, but we dont want to version this one
|
|
39
40
|
registerMenuItem: _value => {},
|
|
40
41
|
removeMenuItem: _value => {}
|
|
41
42
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-menu",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.1-snapshot-129",
|
|
4
4
|
"description": "A dropdown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.27.6",
|
|
18
18
|
"keycode": "^2",
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/
|
|
23
|
-
"@instructure/ui-a11y-utils": "11.6.
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-react-utils": "11.6.
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-
|
|
28
|
-
"@instructure/ui-
|
|
29
|
-
"@instructure/ui-
|
|
19
|
+
"@instructure/emotion": "11.6.1-snapshot-129",
|
|
20
|
+
"@instructure/shared-types": "11.6.1-snapshot-129",
|
|
21
|
+
"@instructure/ui-dom-utils": "11.6.1-snapshot-129",
|
|
22
|
+
"@instructure/console": "11.6.1-snapshot-129",
|
|
23
|
+
"@instructure/ui-a11y-utils": "11.6.1-snapshot-129",
|
|
24
|
+
"@instructure/ui-popover": "11.6.1-snapshot-129",
|
|
25
|
+
"@instructure/ui-react-utils": "11.6.1-snapshot-129",
|
|
26
|
+
"@instructure/ui-position": "11.6.1-snapshot-129",
|
|
27
|
+
"@instructure/ui-utils": "11.6.1-snapshot-129",
|
|
28
|
+
"@instructure/ui-icons": "11.6.1-snapshot-129",
|
|
29
|
+
"@instructure/ui-view": "11.6.1-snapshot-129"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@testing-library/jest-dom": "^6.6.3",
|
|
33
33
|
"@testing-library/react": "15.0.7",
|
|
34
34
|
"@testing-library/user-event": "^14.6.1",
|
|
35
35
|
"vitest": "^3.2.2",
|
|
36
|
-
"@instructure/ui-axe-check": "11.6.
|
|
37
|
-
"@instructure/ui-color-utils": "11.6.
|
|
38
|
-
"@instructure/ui-babel-preset": "11.6.
|
|
39
|
-
"@instructure/ui-themes": "11.6.
|
|
36
|
+
"@instructure/ui-axe-check": "11.6.1-snapshot-129",
|
|
37
|
+
"@instructure/ui-color-utils": "11.6.1-snapshot-129",
|
|
38
|
+
"@instructure/ui-babel-preset": "11.6.1-snapshot-129",
|
|
39
|
+
"@instructure/ui-themes": "11.6.1-snapshot-129"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=18 <=19"
|
|
@@ -46,17 +46,39 @@
|
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"exports": {
|
|
49
|
-
".": {
|
|
50
|
-
"types": "./types/index.d.ts",
|
|
51
|
-
"import": "./es/index.js",
|
|
52
|
-
"require": "./lib/index.js",
|
|
53
|
-
"default": "./es/index.js"
|
|
54
|
-
},
|
|
55
49
|
"./lib/*": "./lib/*",
|
|
56
50
|
"./es/*": "./es/*",
|
|
57
51
|
"./types/*": "./types/*",
|
|
58
52
|
"./package.json": "./package.json",
|
|
59
|
-
"./src/*": "./src/*"
|
|
53
|
+
"./src/*": "./src/*",
|
|
54
|
+
".": {
|
|
55
|
+
"src": "./src/exports/a.ts",
|
|
56
|
+
"types": "./types/exports/a.d.ts",
|
|
57
|
+
"import": "./es/exports/a.js",
|
|
58
|
+
"require": "./lib/exports/a.js",
|
|
59
|
+
"default": "./es/exports/a.js"
|
|
60
|
+
},
|
|
61
|
+
"./v11_6": {
|
|
62
|
+
"src": "./src/exports/a.ts",
|
|
63
|
+
"types": "./types/exports/a.d.ts",
|
|
64
|
+
"import": "./es/exports/a.js",
|
|
65
|
+
"require": "./lib/exports/a.js",
|
|
66
|
+
"default": "./es/exports/a.js"
|
|
67
|
+
},
|
|
68
|
+
"./v11_7": {
|
|
69
|
+
"src": "./src/exports/b.ts",
|
|
70
|
+
"types": "./types/exports/b.d.ts",
|
|
71
|
+
"import": "./es/exports/b.js",
|
|
72
|
+
"require": "./lib/exports/b.js",
|
|
73
|
+
"default": "./es/exports/b.js"
|
|
74
|
+
},
|
|
75
|
+
"./latest": {
|
|
76
|
+
"src": "./src/exports/b.ts",
|
|
77
|
+
"types": "./types/exports/b.d.ts",
|
|
78
|
+
"import": "./es/exports/b.js",
|
|
79
|
+
"require": "./lib/exports/b.js",
|
|
80
|
+
"default": "./es/exports/b.js"
|
|
81
|
+
}
|
|
60
82
|
},
|
|
61
83
|
"scripts": {
|
|
62
84
|
"lint": "ui-scripts lint",
|
|
@@ -34,9 +34,9 @@ import {
|
|
|
34
34
|
} from '@instructure/ui-react-utils'
|
|
35
35
|
import { createChainedFunction } from '@instructure/ui-utils'
|
|
36
36
|
import { isActiveElement, findDOMNode } from '@instructure/ui-dom-utils'
|
|
37
|
-
import { withStyle } from '@instructure/emotion'
|
|
37
|
+
import { withStyleLegacy as withStyle } from '@instructure/emotion'
|
|
38
38
|
|
|
39
|
-
import { MenuContext } from '
|
|
39
|
+
import { MenuContext } from '../../../utils/v1/MenuContext'
|
|
40
40
|
|
|
41
41
|
import generateStyle from './styles'
|
|
42
42
|
import generateComponentTheme from './theme'
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import { Component } from 'react'
|
|
26
26
|
|
|
27
|
-
import { withStyle } from '@instructure/emotion'
|
|
27
|
+
import { withStyleLegacy as withStyle } from '@instructure/emotion'
|
|
28
28
|
import { omitProps } from '@instructure/ui-react-utils'
|
|
29
29
|
|
|
30
30
|
import generateStyle from './styles'
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { ComponentElement, Children, Component, ReactElement } from 'react'
|
|
26
26
|
import keycode from 'keycode'
|
|
27
27
|
|
|
28
|
-
import { Popover } from '@instructure/ui-popover'
|
|
28
|
+
import { Popover } from '@instructure/ui-popover/v11_6'
|
|
29
29
|
import {
|
|
30
30
|
safeCloneElement,
|
|
31
31
|
matchComponentTypes,
|
|
@@ -34,14 +34,14 @@ 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 '
|
|
37
|
+
import { MenuContext } from '../../utils/v1/MenuContext'
|
|
38
38
|
import { MenuItem } from './MenuItem'
|
|
39
39
|
import type { MenuItemProps } from './MenuItem/props'
|
|
40
40
|
import { MenuItemGroup } from './MenuItemGroup'
|
|
41
41
|
import type { MenuGroupProps } from './MenuItemGroup/props'
|
|
42
42
|
import { MenuItemSeparator } from './MenuItemSeparator'
|
|
43
43
|
import type { MenuSeparatorProps } from './MenuItemSeparator/props'
|
|
44
|
-
import { withStyle } from '@instructure/emotion'
|
|
44
|
+
import { withStyleLegacy as withStyle } from '@instructure/emotion'
|
|
45
45
|
|
|
46
46
|
import generateStyle from './styles'
|
|
47
47
|
import generateComponentTheme from './theme'
|
|
@@ -31,7 +31,7 @@ import type {
|
|
|
31
31
|
PositionConstraint,
|
|
32
32
|
PositionMountNode
|
|
33
33
|
} from '@instructure/ui-position'
|
|
34
|
-
import type { Popover } from '@instructure/ui-popover'
|
|
34
|
+
import type { Popover } from '@instructure/ui-popover/v11_6'
|
|
35
35
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
36
36
|
|
|
37
37
|
import { MenuItem } from './MenuItem'
|