@instructure/ui-menu 8.27.0 → 8.27.1-snapshot-13
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 +11 -0
- package/es/Menu/index.js +2 -0
- package/es/Menu/props.js +2 -1
- package/lib/Menu/index.js +2 -0
- package/lib/Menu/props.js +2 -1
- package/package.json +19 -19
- package/src/Menu/index.tsx +2 -0
- package/src/Menu/props.ts +6 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Menu/index.d.ts +2 -0
- package/types/Menu/index.d.ts.map +1 -1
- package/types/Menu/props.d.ts +4 -0
- package/types/Menu/props.d.ts.map +1 -1
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.27.1-snapshot-13](https://github.com/instructure/instructure-ui/compare/v8.27.0...v8.27.1-snapshot-13) (2022-08-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui-menu:** add `positionContainerDisplay` prop to Menu ([e8ed689](https://github.com/instructure/instructure-ui/commit/e8ed689bacb82b88bde3be3db1ade6ea6ee6ed89))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.27.0](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.27.0) (2022-07-25)
|
|
7
18
|
|
|
8
19
|
### Features
|
package/es/Menu/index.js
CHANGED
|
@@ -393,6 +393,7 @@ let Menu = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gener
|
|
|
393
393
|
onDismiss = _this$props5.onDismiss,
|
|
394
394
|
onFocus = _this$props5.onFocus,
|
|
395
395
|
onMouseOver = _this$props5.onMouseOver,
|
|
396
|
+
positionContainerDisplay = _this$props5.positionContainerDisplay,
|
|
396
397
|
offsetX = _this$props5.offsetX,
|
|
397
398
|
offsetY = _this$props5.offsetY;
|
|
398
399
|
return trigger ? jsx(Popover, {
|
|
@@ -417,6 +418,7 @@ let Menu = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gener
|
|
|
417
418
|
shouldReturnFocus: true,
|
|
418
419
|
onFocus: onFocus,
|
|
419
420
|
onMouseOver: onMouseOver,
|
|
421
|
+
positionContainerDisplay: positionContainerDisplay,
|
|
420
422
|
offsetX: offsetX,
|
|
421
423
|
offsetY: offsetY,
|
|
422
424
|
elementRef: element => {
|
package/es/Menu/props.js
CHANGED
|
@@ -45,11 +45,12 @@ const propTypes = {
|
|
|
45
45
|
constrain: PositionPropTypes.constrain,
|
|
46
46
|
shouldHideOnSelect: PropTypes.bool,
|
|
47
47
|
shouldFocusTriggerOnClose: PropTypes.bool,
|
|
48
|
+
positionContainerDisplay: PropTypes.oneOf(['inline-block', 'block']),
|
|
48
49
|
type: PropTypes.oneOf(['flyout']),
|
|
49
50
|
id: PropTypes.string,
|
|
50
51
|
withArrow: PropTypes.bool,
|
|
51
52
|
offsetX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
52
53
|
offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
53
54
|
};
|
|
54
|
-
const allowedProps = ['children', 'label', 'disabled', 'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'onKeyDown', 'onKeyUp', 'menuRef', 'popoverRef', 'mountNode', 'constrain', 'shouldHideOnSelect', 'shouldFocusTriggerOnClose', 'type', 'id', 'withArrow', 'offsetX', 'offsetY'];
|
|
55
|
+
const 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'];
|
|
55
56
|
export { propTypes, allowedProps };
|
package/lib/Menu/index.js
CHANGED
|
@@ -416,6 +416,7 @@ let Menu = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0,
|
|
|
416
416
|
onDismiss = _this$props5.onDismiss,
|
|
417
417
|
onFocus = _this$props5.onFocus,
|
|
418
418
|
onMouseOver = _this$props5.onMouseOver,
|
|
419
|
+
positionContainerDisplay = _this$props5.positionContainerDisplay,
|
|
419
420
|
offsetX = _this$props5.offsetX,
|
|
420
421
|
offsetY = _this$props5.offsetY;
|
|
421
422
|
return trigger ? (0, _emotion.jsx)(_Popover.Popover, {
|
|
@@ -440,6 +441,7 @@ let Menu = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0,
|
|
|
440
441
|
shouldReturnFocus: true,
|
|
441
442
|
onFocus: onFocus,
|
|
442
443
|
onMouseOver: onMouseOver,
|
|
444
|
+
positionContainerDisplay: positionContainerDisplay,
|
|
443
445
|
offsetX: offsetX,
|
|
444
446
|
offsetY: offsetY,
|
|
445
447
|
elementRef: element => {
|
package/lib/Menu/props.js
CHANGED
|
@@ -59,6 +59,7 @@ const propTypes = {
|
|
|
59
59
|
constrain: _PositionPropTypes.PositionPropTypes.constrain,
|
|
60
60
|
shouldHideOnSelect: _propTypes.default.bool,
|
|
61
61
|
shouldFocusTriggerOnClose: _propTypes.default.bool,
|
|
62
|
+
positionContainerDisplay: _propTypes.default.oneOf(['inline-block', 'block']),
|
|
62
63
|
type: _propTypes.default.oneOf(['flyout']),
|
|
63
64
|
id: _propTypes.default.string,
|
|
64
65
|
withArrow: _propTypes.default.bool,
|
|
@@ -66,5 +67,5 @@ const propTypes = {
|
|
|
66
67
|
offsetY: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])
|
|
67
68
|
};
|
|
68
69
|
exports.propTypes = propTypes;
|
|
69
|
-
const allowedProps = ['children', 'label', 'disabled', 'trigger', 'placement', 'defaultShow', 'show', 'onToggle', 'onSelect', 'onDismiss', 'onFocus', 'onMouseOver', 'onKeyDown', 'onKeyUp', 'menuRef', 'popoverRef', 'mountNode', 'constrain', 'shouldHideOnSelect', 'shouldFocusTriggerOnClose', 'type', 'id', 'withArrow', 'offsetX', 'offsetY'];
|
|
70
|
+
const 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'];
|
|
70
71
|
exports.allowedProps = allowedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-menu",
|
|
3
|
-
"version": "8.27.
|
|
3
|
+
"version": "8.27.1-snapshot-13",
|
|
4
4
|
"description": "A dropdown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,27 +23,27 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.27.
|
|
27
|
-
"@instructure/ui-color-utils": "8.27.
|
|
28
|
-
"@instructure/ui-test-locator": "8.27.
|
|
29
|
-
"@instructure/ui-test-queries": "8.27.
|
|
30
|
-
"@instructure/ui-test-utils": "8.27.
|
|
31
|
-
"@instructure/ui-themes": "8.27.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.27.1-snapshot-13",
|
|
27
|
+
"@instructure/ui-color-utils": "8.27.1-snapshot-13",
|
|
28
|
+
"@instructure/ui-test-locator": "8.27.1-snapshot-13",
|
|
29
|
+
"@instructure/ui-test-queries": "8.27.1-snapshot-13",
|
|
30
|
+
"@instructure/ui-test-utils": "8.27.1-snapshot-13",
|
|
31
|
+
"@instructure/ui-themes": "8.27.1-snapshot-13"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.13.10",
|
|
35
|
-
"@instructure/console": "8.27.
|
|
36
|
-
"@instructure/emotion": "8.27.
|
|
37
|
-
"@instructure/shared-types": "8.27.
|
|
38
|
-
"@instructure/ui-a11y-utils": "8.27.
|
|
39
|
-
"@instructure/ui-dom-utils": "8.27.
|
|
40
|
-
"@instructure/ui-icons": "8.27.
|
|
41
|
-
"@instructure/ui-popover": "8.27.
|
|
42
|
-
"@instructure/ui-position": "8.27.
|
|
43
|
-
"@instructure/ui-prop-types": "8.27.
|
|
44
|
-
"@instructure/ui-react-utils": "8.27.
|
|
45
|
-
"@instructure/ui-testable": "8.27.
|
|
46
|
-
"@instructure/ui-utils": "8.27.
|
|
35
|
+
"@instructure/console": "8.27.1-snapshot-13",
|
|
36
|
+
"@instructure/emotion": "8.27.1-snapshot-13",
|
|
37
|
+
"@instructure/shared-types": "8.27.1-snapshot-13",
|
|
38
|
+
"@instructure/ui-a11y-utils": "8.27.1-snapshot-13",
|
|
39
|
+
"@instructure/ui-dom-utils": "8.27.1-snapshot-13",
|
|
40
|
+
"@instructure/ui-icons": "8.27.1-snapshot-13",
|
|
41
|
+
"@instructure/ui-popover": "8.27.1-snapshot-13",
|
|
42
|
+
"@instructure/ui-position": "8.27.1-snapshot-13",
|
|
43
|
+
"@instructure/ui-prop-types": "8.27.1-snapshot-13",
|
|
44
|
+
"@instructure/ui-react-utils": "8.27.1-snapshot-13",
|
|
45
|
+
"@instructure/ui-testable": "8.27.1-snapshot-13",
|
|
46
|
+
"@instructure/ui-utils": "8.27.1-snapshot-13",
|
|
47
47
|
"keycode": "^2",
|
|
48
48
|
"prop-types": "^15"
|
|
49
49
|
},
|
package/src/Menu/index.tsx
CHANGED
|
@@ -465,6 +465,7 @@ class Menu extends Component<MenuProps> {
|
|
|
465
465
|
onDismiss,
|
|
466
466
|
onFocus,
|
|
467
467
|
onMouseOver,
|
|
468
|
+
positionContainerDisplay,
|
|
468
469
|
offsetX,
|
|
469
470
|
offsetY
|
|
470
471
|
} = this.props
|
|
@@ -489,6 +490,7 @@ class Menu extends Component<MenuProps> {
|
|
|
489
490
|
shouldReturnFocus
|
|
490
491
|
onFocus={onFocus}
|
|
491
492
|
onMouseOver={onMouseOver}
|
|
493
|
+
positionContainerDisplay={positionContainerDisplay}
|
|
492
494
|
offsetX={offsetX}
|
|
493
495
|
offsetY={offsetY}
|
|
494
496
|
elementRef={(element) => {
|
package/src/Menu/props.ts
CHANGED
|
@@ -143,6 +143,10 @@ type MenuOwnProps = {
|
|
|
143
143
|
* If a trigger is supplied, should the `<Menu />` focus the trigger on after closing
|
|
144
144
|
*/
|
|
145
145
|
shouldFocusTriggerOnClose?: boolean
|
|
146
|
+
/**
|
|
147
|
+
* If a trigger is supplied, this prop can set the CSS `display` property on the `<span>` container element of the underlying Position component
|
|
148
|
+
*/
|
|
149
|
+
positionContainerDisplay?: 'inline-block' | 'block'
|
|
146
150
|
/**
|
|
147
151
|
* The type of `<Menu />`
|
|
148
152
|
*/
|
|
@@ -203,6 +207,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
203
207
|
constrain: PositionPropTypes.constrain,
|
|
204
208
|
shouldHideOnSelect: PropTypes.bool,
|
|
205
209
|
shouldFocusTriggerOnClose: PropTypes.bool,
|
|
210
|
+
positionContainerDisplay: PropTypes.oneOf(['inline-block', 'block']),
|
|
206
211
|
type: PropTypes.oneOf(['flyout']),
|
|
207
212
|
id: PropTypes.string,
|
|
208
213
|
withArrow: PropTypes.bool,
|
|
@@ -231,6 +236,7 @@ const allowedProps: AllowedPropKeys = [
|
|
|
231
236
|
'constrain',
|
|
232
237
|
'shouldHideOnSelect',
|
|
233
238
|
'shouldFocusTriggerOnClose',
|
|
239
|
+
'positionContainerDisplay',
|
|
234
240
|
'type',
|
|
235
241
|
'id',
|
|
236
242
|
'withArrow',
|