@instructure/ui-overlays 10.26.1 → 11.0.1-snapshot-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 +30 -1
- package/es/Mask/index.js +2 -2
- package/es/Mask/props.js +1 -9
- package/es/Overlay/index.js +8 -6
- package/es/Overlay/props.js +1 -32
- package/lib/Mask/index.js +1 -1
- package/lib/Mask/props.js +1 -10
- package/lib/Overlay/index.js +9 -6
- package/lib/Overlay/props.js +1 -33
- package/package.json +23 -26
- package/src/Mask/index.tsx +1 -2
- package/src/Mask/props.ts +2 -17
- package/src/Overlay/index.tsx +2 -4
- package/src/Overlay/props.ts +1 -36
- package/tsconfig.build.json +0 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Mask/index.d.ts +0 -7
- package/types/Mask/index.d.ts.map +1 -1
- package/types/Mask/props.d.ts +2 -3
- package/types/Mask/props.d.ts.map +1 -1
- package/types/Overlay/index.d.ts +0 -28
- package/types/Overlay/index.d.ts.map +1 -1
- package/types/Overlay/props.d.ts +2 -3
- package/types/Overlay/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
+
## [11.0.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-0) (2025-10-07)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-overlays
|
|
9
9
|
|
|
@@ -11,6 +11,35 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
# [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **many:** InstUI v11 contains the following breaking changes:
|
|
25
|
+
- React 16 and 17 are no longer supported
|
|
26
|
+
- remove `PropTypes` from all packages
|
|
27
|
+
- remove `CodeEditor` component
|
|
28
|
+
- remove `@instui/theme-registry` package
|
|
29
|
+
- remove `@testable`, `@experimental`, `@hack` decorators
|
|
30
|
+
- InstUISettingsProvider's `as` prop is removed
|
|
31
|
+
- `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
32
|
+
- `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
33
|
+
- `variables` field on theme objects are removed
|
|
34
|
+
- remove deprecated props from Table: Row's `isStacked`, Body's
|
|
35
|
+
`isStacked`, `hover`, and `headers`
|
|
36
|
+
- `Table`'s `caption` prop is now required
|
|
37
|
+
- `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
14
43
|
# [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
|
|
15
44
|
|
|
16
45
|
**Note:** Version bump only for package @instructure/ui-overlays
|
package/es/Mask/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import { withStyle } from '@instructure/emotion';
|
|
|
29
29
|
import { ensureSingleChild, omitProps } from '@instructure/ui-react-utils';
|
|
30
30
|
import generateStyle from './styles';
|
|
31
31
|
import generateComponentTheme from './theme';
|
|
32
|
-
import { allowedProps
|
|
32
|
+
import { allowedProps } from './props';
|
|
33
33
|
import MaskCounter from './MaskCounter';
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -94,7 +94,7 @@ let Mask = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
|
94
94
|
children: content
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
}, _Mask.displayName = "Mask", _Mask.componentId = 'Mask', _Mask.allowedProps = allowedProps, _Mask.
|
|
97
|
+
}, _Mask.displayName = "Mask", _Mask.componentId = 'Mask', _Mask.allowedProps = allowedProps, _Mask.defaultProps = {
|
|
98
98
|
placement: 'center',
|
|
99
99
|
fullscreen: false
|
|
100
100
|
}, _Mask)) || _class);
|
package/es/Mask/props.js
CHANGED
|
@@ -22,13 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
const propTypes = {
|
|
27
|
-
placement: PropTypes.oneOf(['top', 'center', 'bottom', 'stretch']),
|
|
28
|
-
fullscreen: PropTypes.bool,
|
|
29
|
-
children: PropTypes.node,
|
|
30
|
-
onClick: PropTypes.func,
|
|
31
|
-
elementRef: PropTypes.func
|
|
32
|
-
};
|
|
33
25
|
const allowedProps = ['placement', 'fullscreen', 'children', 'onClick', 'elementRef'];
|
|
34
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/es/Overlay/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _class, _Overlay;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -24,13 +23,12 @@ var _dec, _class, _Overlay;
|
|
|
24
23
|
*/
|
|
25
24
|
|
|
26
25
|
import { Component } from 'react';
|
|
27
|
-
import { testable } from '@instructure/ui-testable';
|
|
28
26
|
import { createChainedFunction } from '@instructure/ui-utils';
|
|
29
27
|
import { omitProps, pickProps } from '@instructure/ui-react-utils';
|
|
30
28
|
import { Dialog } from '@instructure/ui-dialog';
|
|
31
29
|
import { Portal } from '@instructure/ui-portal';
|
|
32
30
|
import { Transition } from '@instructure/ui-motion';
|
|
33
|
-
import { allowedProps
|
|
31
|
+
import { allowedProps } from './props';
|
|
34
32
|
|
|
35
33
|
/**
|
|
36
34
|
---
|
|
@@ -38,7 +36,7 @@ category: components
|
|
|
38
36
|
---
|
|
39
37
|
**/
|
|
40
38
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
41
|
-
|
|
39
|
+
class Overlay extends Component {
|
|
42
40
|
constructor(props) {
|
|
43
41
|
super(props);
|
|
44
42
|
this._timeouts = [];
|
|
@@ -117,10 +115,14 @@ let Overlay = (_dec = testable(), _dec(_class = (_Overlay = class Overlay extend
|
|
|
117
115
|
...pickProps(this.props, Portal.allowedProps),
|
|
118
116
|
open: this.props.open || this.state.transitioning,
|
|
119
117
|
onOpen: createChainedFunction(this.handlePortalOpen, this.props.onOpen),
|
|
118
|
+
"data-cid": "Overlay",
|
|
120
119
|
children: content
|
|
121
120
|
});
|
|
122
121
|
}
|
|
123
|
-
}
|
|
122
|
+
}
|
|
123
|
+
Overlay.displayName = "Overlay";
|
|
124
|
+
Overlay.allowedProps = allowedProps;
|
|
125
|
+
Overlay.defaultProps = {
|
|
124
126
|
open: false,
|
|
125
127
|
insertAt: 'bottom',
|
|
126
128
|
shouldContainFocus: false,
|
|
@@ -132,6 +134,6 @@ let Overlay = (_dec = testable(), _dec(_class = (_Overlay = class Overlay extend
|
|
|
132
134
|
transitionOnMount: false,
|
|
133
135
|
transitionEnter: true,
|
|
134
136
|
transitionExit: true
|
|
135
|
-
}
|
|
137
|
+
};
|
|
136
138
|
export default Overlay;
|
|
137
139
|
export { Overlay };
|
package/es/Overlay/props.js
CHANGED
|
@@ -22,36 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { element } from '@instructure/ui-prop-types';
|
|
27
|
-
import { transitionTypePropType } from '@instructure/ui-motion';
|
|
28
|
-
const propTypes = {
|
|
29
|
-
children: PropTypes.node,
|
|
30
|
-
open: PropTypes.bool,
|
|
31
|
-
onOpen: PropTypes.func,
|
|
32
|
-
onClose: PropTypes.func,
|
|
33
|
-
mountNode: PropTypes.oneOfType([element, PropTypes.func]),
|
|
34
|
-
insertAt: PropTypes.oneOf(['bottom', 'top']),
|
|
35
|
-
label: PropTypes.string.isRequired,
|
|
36
|
-
onDismiss: PropTypes.func,
|
|
37
|
-
defaultFocusElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
38
|
-
contentElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
39
|
-
shouldContainFocus: PropTypes.bool,
|
|
40
|
-
shouldReturnFocus: PropTypes.bool,
|
|
41
|
-
shouldCloseOnDocumentClick: PropTypes.bool,
|
|
42
|
-
shouldCloseOnEscape: PropTypes.bool,
|
|
43
|
-
transition: transitionTypePropType,
|
|
44
|
-
in: PropTypes.bool,
|
|
45
|
-
unmountOnExit: PropTypes.bool,
|
|
46
|
-
transitionOnMount: PropTypes.bool,
|
|
47
|
-
transitionEnter: PropTypes.bool,
|
|
48
|
-
transitionExit: PropTypes.bool,
|
|
49
|
-
onEnter: PropTypes.func,
|
|
50
|
-
onEntering: PropTypes.func,
|
|
51
|
-
onEntered: PropTypes.func,
|
|
52
|
-
onExit: PropTypes.func,
|
|
53
|
-
onExiting: PropTypes.func,
|
|
54
|
-
onExited: PropTypes.func
|
|
55
|
-
};
|
|
56
25
|
const allowedProps = ['children', 'open', 'onOpen', 'onClose', 'mountNode', 'insertAt', 'label', 'onDismiss', 'defaultFocusElement', 'contentElement', 'shouldReturnFocus', 'shouldCloseOnDocumentClick', 'shouldCloseOnEscape', 'transition', 'in', 'unmountOnExit', 'transitionOnMount', 'transitionEnter', 'transitionExit', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'];
|
|
57
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/lib/Mask/index.js
CHANGED
|
@@ -100,7 +100,7 @@ let Mask = exports.Mask = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
100
100
|
children: content
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
}, _Mask.displayName = "Mask", _Mask.componentId = 'Mask', _Mask.allowedProps = _props.allowedProps, _Mask.
|
|
103
|
+
}, _Mask.displayName = "Mask", _Mask.componentId = 'Mask', _Mask.allowedProps = _props.allowedProps, _Mask.defaultProps = {
|
|
104
104
|
placement: 'center',
|
|
105
105
|
fullscreen: false
|
|
106
106
|
}, _Mask)) || _class);
|
package/lib/Mask/props.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
+
exports.allowedProps = void 0;
|
|
9
7
|
/*
|
|
10
8
|
* The MIT License (MIT)
|
|
11
9
|
*
|
|
@@ -30,11 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
30
28
|
* SOFTWARE.
|
|
31
29
|
*/
|
|
32
30
|
|
|
33
|
-
const propTypes = exports.propTypes = {
|
|
34
|
-
placement: _propTypes.default.oneOf(['top', 'center', 'bottom', 'stretch']),
|
|
35
|
-
fullscreen: _propTypes.default.bool,
|
|
36
|
-
children: _propTypes.default.node,
|
|
37
|
-
onClick: _propTypes.default.func,
|
|
38
|
-
elementRef: _propTypes.default.func
|
|
39
|
-
};
|
|
40
31
|
const allowedProps = exports.allowedProps = ['placement', 'fullscreen', 'children', 'onClick', 'elementRef'];
|
package/lib/Overlay/index.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Overlay = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
9
8
|
var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
|
|
10
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
10
|
var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
|
|
@@ -14,7 +13,6 @@ var _Portal = require("@instructure/ui-portal/lib/Portal");
|
|
|
14
13
|
var _Transition = require("@instructure/ui-motion/lib/Transition");
|
|
15
14
|
var _props = require("./props");
|
|
16
15
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
|
-
var _dec, _class, _Overlay;
|
|
18
16
|
/*
|
|
19
17
|
* The MIT License (MIT)
|
|
20
18
|
*
|
|
@@ -38,12 +36,12 @@ var _dec, _class, _Overlay;
|
|
|
38
36
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
37
|
* SOFTWARE.
|
|
40
38
|
*/
|
|
39
|
+
|
|
41
40
|
/**
|
|
42
41
|
---
|
|
43
42
|
category: components
|
|
44
43
|
---
|
|
45
|
-
**/
|
|
46
|
-
let Overlay = exports.Overlay = (_dec = (0, _testable.testable)(), _dec(_class = (_Overlay = class Overlay extends _react.Component {
|
|
44
|
+
**/class Overlay extends _react.Component {
|
|
47
45
|
constructor(props) {
|
|
48
46
|
super(props);
|
|
49
47
|
this._timeouts = [];
|
|
@@ -122,10 +120,15 @@ let Overlay = exports.Overlay = (_dec = (0, _testable.testable)(), _dec(_class =
|
|
|
122
120
|
...(0, _pickProps.pickProps)(this.props, _Portal.Portal.allowedProps),
|
|
123
121
|
open: this.props.open || this.state.transitioning,
|
|
124
122
|
onOpen: (0, _createChainedFunction.createChainedFunction)(this.handlePortalOpen, this.props.onOpen),
|
|
123
|
+
"data-cid": "Overlay",
|
|
125
124
|
children: content
|
|
126
125
|
});
|
|
127
126
|
}
|
|
128
|
-
}
|
|
127
|
+
}
|
|
128
|
+
exports.Overlay = Overlay;
|
|
129
|
+
Overlay.displayName = "Overlay";
|
|
130
|
+
Overlay.allowedProps = _props.allowedProps;
|
|
131
|
+
Overlay.defaultProps = {
|
|
129
132
|
open: false,
|
|
130
133
|
insertAt: 'bottom',
|
|
131
134
|
shouldContainFocus: false,
|
|
@@ -137,5 +140,5 @@ let Overlay = exports.Overlay = (_dec = (0, _testable.testable)(), _dec(_class =
|
|
|
137
140
|
transitionOnMount: false,
|
|
138
141
|
transitionEnter: true,
|
|
139
142
|
transitionExit: true
|
|
140
|
-
}
|
|
143
|
+
};
|
|
141
144
|
var _default = exports.default = Overlay;
|
package/lib/Overlay/props.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _element = require("@instructure/ui-prop-types/lib/element.js");
|
|
10
|
-
var _uiMotion = require("@instructure/ui-motion");
|
|
6
|
+
exports.allowedProps = void 0;
|
|
11
7
|
/*
|
|
12
8
|
* The MIT License (MIT)
|
|
13
9
|
*
|
|
@@ -32,32 +28,4 @@ var _uiMotion = require("@instructure/ui-motion");
|
|
|
32
28
|
* SOFTWARE.
|
|
33
29
|
*/
|
|
34
30
|
|
|
35
|
-
const propTypes = exports.propTypes = {
|
|
36
|
-
children: _propTypes.default.node,
|
|
37
|
-
open: _propTypes.default.bool,
|
|
38
|
-
onOpen: _propTypes.default.func,
|
|
39
|
-
onClose: _propTypes.default.func,
|
|
40
|
-
mountNode: _propTypes.default.oneOfType([_element.element, _propTypes.default.func]),
|
|
41
|
-
insertAt: _propTypes.default.oneOf(['bottom', 'top']),
|
|
42
|
-
label: _propTypes.default.string.isRequired,
|
|
43
|
-
onDismiss: _propTypes.default.func,
|
|
44
|
-
defaultFocusElement: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]),
|
|
45
|
-
contentElement: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]),
|
|
46
|
-
shouldContainFocus: _propTypes.default.bool,
|
|
47
|
-
shouldReturnFocus: _propTypes.default.bool,
|
|
48
|
-
shouldCloseOnDocumentClick: _propTypes.default.bool,
|
|
49
|
-
shouldCloseOnEscape: _propTypes.default.bool,
|
|
50
|
-
transition: _uiMotion.transitionTypePropType,
|
|
51
|
-
in: _propTypes.default.bool,
|
|
52
|
-
unmountOnExit: _propTypes.default.bool,
|
|
53
|
-
transitionOnMount: _propTypes.default.bool,
|
|
54
|
-
transitionEnter: _propTypes.default.bool,
|
|
55
|
-
transitionExit: _propTypes.default.bool,
|
|
56
|
-
onEnter: _propTypes.default.func,
|
|
57
|
-
onEntering: _propTypes.default.func,
|
|
58
|
-
onEntered: _propTypes.default.func,
|
|
59
|
-
onExit: _propTypes.default.func,
|
|
60
|
-
onExiting: _propTypes.default.func,
|
|
61
|
-
onExited: _propTypes.default.func
|
|
62
|
-
};
|
|
63
31
|
const allowedProps = exports.allowedProps = ['children', 'open', 'onOpen', 'onClose', 'mountNode', 'insertAt', 'label', 'onDismiss', 'defaultFocusElement', 'contentElement', 'shouldReturnFocus', 'shouldCloseOnDocumentClick', 'shouldCloseOnEscape', 'transition', 'in', 'unmountOnExit', 'transitionOnMount', 'transitionEnter', 'transitionExit', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-overlays",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1-snapshot-0",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,40 +23,37 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "
|
|
27
|
-
"@instructure/ui-themes": "
|
|
26
|
+
"@instructure/ui-babel-preset": "11.0.1-snapshot-0",
|
|
27
|
+
"@instructure/ui-themes": "11.0.1-snapshot-0",
|
|
28
28
|
"@testing-library/jest-dom": "^6.6.3",
|
|
29
|
-
"@testing-library/react": "
|
|
29
|
+
"@testing-library/react": "15.0.7",
|
|
30
30
|
"@testing-library/user-event": "^14.6.1",
|
|
31
31
|
"@types/no-scroll": "^2.1.2",
|
|
32
32
|
"vitest": "^3.2.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/runtime": "^7.27.6",
|
|
36
|
-
"@instructure/console": "
|
|
37
|
-
"@instructure/emotion": "
|
|
38
|
-
"@instructure/shared-types": "
|
|
39
|
-
"@instructure/ui-buttons": "
|
|
40
|
-
"@instructure/ui-dialog": "
|
|
41
|
-
"@instructure/ui-dom-utils": "
|
|
42
|
-
"@instructure/ui-focusable": "
|
|
43
|
-
"@instructure/ui-i18n": "
|
|
44
|
-
"@instructure/ui-motion": "
|
|
45
|
-
"@instructure/ui-popover": "
|
|
46
|
-
"@instructure/ui-portal": "
|
|
47
|
-
"@instructure/ui-position": "
|
|
48
|
-
"@instructure/ui-
|
|
49
|
-
"@instructure/ui-
|
|
50
|
-
"@instructure/ui-
|
|
51
|
-
"@instructure/ui-
|
|
52
|
-
"@instructure/
|
|
53
|
-
"
|
|
54
|
-
"@instructure/uid": "10.26.1",
|
|
55
|
-
"no-scroll": "^2.1.1",
|
|
56
|
-
"prop-types": "^15.8.1"
|
|
36
|
+
"@instructure/console": "11.0.1-snapshot-0",
|
|
37
|
+
"@instructure/emotion": "11.0.1-snapshot-0",
|
|
38
|
+
"@instructure/shared-types": "11.0.1-snapshot-0",
|
|
39
|
+
"@instructure/ui-buttons": "11.0.1-snapshot-0",
|
|
40
|
+
"@instructure/ui-dialog": "11.0.1-snapshot-0",
|
|
41
|
+
"@instructure/ui-dom-utils": "11.0.1-snapshot-0",
|
|
42
|
+
"@instructure/ui-focusable": "11.0.1-snapshot-0",
|
|
43
|
+
"@instructure/ui-i18n": "11.0.1-snapshot-0",
|
|
44
|
+
"@instructure/ui-motion": "11.0.1-snapshot-0",
|
|
45
|
+
"@instructure/ui-popover": "11.0.1-snapshot-0",
|
|
46
|
+
"@instructure/ui-portal": "11.0.1-snapshot-0",
|
|
47
|
+
"@instructure/ui-position": "11.0.1-snapshot-0",
|
|
48
|
+
"@instructure/ui-react-utils": "11.0.1-snapshot-0",
|
|
49
|
+
"@instructure/ui-tooltip": "11.0.1-snapshot-0",
|
|
50
|
+
"@instructure/ui-utils": "11.0.1-snapshot-0",
|
|
51
|
+
"@instructure/ui-view": "11.0.1-snapshot-0",
|
|
52
|
+
"@instructure/uid": "11.0.1-snapshot-0",
|
|
53
|
+
"no-scroll": "^2.1.1"
|
|
57
54
|
},
|
|
58
55
|
"peerDependencies": {
|
|
59
|
-
"react": ">=
|
|
56
|
+
"react": ">=18 <=19"
|
|
60
57
|
},
|
|
61
58
|
"publishConfig": {
|
|
62
59
|
"access": "public"
|
package/src/Mask/index.tsx
CHANGED
|
@@ -33,7 +33,7 @@ import generateStyle from './styles'
|
|
|
33
33
|
import generateComponentTheme from './theme'
|
|
34
34
|
|
|
35
35
|
import type { MaskProps } from './props'
|
|
36
|
-
import { allowedProps
|
|
36
|
+
import { allowedProps } from './props'
|
|
37
37
|
import MaskCounter from './MaskCounter'
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -46,7 +46,6 @@ class Mask extends Component<MaskProps> {
|
|
|
46
46
|
static readonly componentId = 'Mask'
|
|
47
47
|
|
|
48
48
|
static allowedProps = allowedProps
|
|
49
|
-
static propTypes = propTypes
|
|
50
49
|
|
|
51
50
|
static defaultProps = {
|
|
52
51
|
placement: 'center',
|
package/src/Mask/props.ts
CHANGED
|
@@ -23,13 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import React from 'react'
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
import type {
|
|
29
|
-
PropValidators,
|
|
30
|
-
MaskTheme,
|
|
31
|
-
OtherHTMLAttributes
|
|
32
|
-
} from '@instructure/shared-types'
|
|
26
|
+
import type { MaskTheme, OtherHTMLAttributes } from '@instructure/shared-types'
|
|
33
27
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
34
28
|
|
|
35
29
|
type MaskOwnProps = {
|
|
@@ -52,15 +46,6 @@ type MaskProps = MaskOwnProps &
|
|
|
52
46
|
OtherHTMLAttributes<MaskOwnProps>
|
|
53
47
|
|
|
54
48
|
type MaskStyle = ComponentStyle<'mask'>
|
|
55
|
-
|
|
56
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
57
|
-
placement: PropTypes.oneOf(['top', 'center', 'bottom', 'stretch']),
|
|
58
|
-
fullscreen: PropTypes.bool,
|
|
59
|
-
children: PropTypes.node,
|
|
60
|
-
onClick: PropTypes.func,
|
|
61
|
-
elementRef: PropTypes.func
|
|
62
|
-
}
|
|
63
|
-
|
|
64
49
|
const allowedProps: AllowedPropKeys = [
|
|
65
50
|
'placement',
|
|
66
51
|
'fullscreen',
|
|
@@ -70,4 +55,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
70
55
|
]
|
|
71
56
|
|
|
72
57
|
export type { MaskProps, MaskStyle }
|
|
73
|
-
export {
|
|
58
|
+
export { allowedProps }
|
package/src/Overlay/index.tsx
CHANGED
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
import { Component, ComponentClass, ReactElement } from 'react'
|
|
26
26
|
|
|
27
|
-
import { testable } from '@instructure/ui-testable'
|
|
28
27
|
import { createChainedFunction } from '@instructure/ui-utils'
|
|
29
28
|
import { omitProps, pickProps } from '@instructure/ui-react-utils'
|
|
30
29
|
|
|
@@ -36,17 +35,15 @@ import { Transition } from '@instructure/ui-motion'
|
|
|
36
35
|
import type { TransitionType } from '@instructure/ui-motion'
|
|
37
36
|
|
|
38
37
|
import type { OverlayProps, OverlayState } from './props'
|
|
39
|
-
import { allowedProps
|
|
38
|
+
import { allowedProps } from './props'
|
|
40
39
|
|
|
41
40
|
/**
|
|
42
41
|
---
|
|
43
42
|
category: components
|
|
44
43
|
---
|
|
45
44
|
**/
|
|
46
|
-
@testable()
|
|
47
45
|
class Overlay extends Component<OverlayProps, OverlayState> {
|
|
48
46
|
static allowedProps = allowedProps
|
|
49
|
-
static propTypes = propTypes
|
|
50
47
|
|
|
51
48
|
static defaultProps = {
|
|
52
49
|
open: false,
|
|
@@ -170,6 +167,7 @@ class Overlay extends Component<OverlayProps, OverlayState> {
|
|
|
170
167
|
{...pickProps(this.props, Portal.allowedProps)}
|
|
171
168
|
open={this.props.open || this.state.transitioning}
|
|
172
169
|
onOpen={createChainedFunction(this.handlePortalOpen, this.props.onOpen)}
|
|
170
|
+
data-cid="Overlay"
|
|
173
171
|
>
|
|
174
172
|
{content}
|
|
175
173
|
</Portal>
|
package/src/Overlay/props.ts
CHANGED
|
@@ -23,10 +23,6 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import React from 'react'
|
|
26
|
-
import PropTypes from 'prop-types'
|
|
27
|
-
|
|
28
|
-
import { element } from '@instructure/ui-prop-types'
|
|
29
|
-
import { transitionTypePropType } from '@instructure/ui-motion'
|
|
30
26
|
|
|
31
27
|
import type { PortalNode, PortalProps } from '@instructure/ui-portal'
|
|
32
28
|
import type { PositionMountNode } from '@instructure/ui-position'
|
|
@@ -35,7 +31,6 @@ import type { DialogProps } from '@instructure/ui-dialog'
|
|
|
35
31
|
import type {
|
|
36
32
|
OtherHTMLAttributes,
|
|
37
33
|
PickPropsWithExceptions,
|
|
38
|
-
PropValidators,
|
|
39
34
|
UIElement
|
|
40
35
|
} from '@instructure/shared-types'
|
|
41
36
|
|
|
@@ -196,36 +191,6 @@ type OverlayState = {
|
|
|
196
191
|
open: boolean
|
|
197
192
|
transitioning: boolean
|
|
198
193
|
}
|
|
199
|
-
|
|
200
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
201
|
-
children: PropTypes.node,
|
|
202
|
-
open: PropTypes.bool,
|
|
203
|
-
onOpen: PropTypes.func,
|
|
204
|
-
onClose: PropTypes.func,
|
|
205
|
-
mountNode: PropTypes.oneOfType([element, PropTypes.func]),
|
|
206
|
-
insertAt: PropTypes.oneOf(['bottom', 'top']),
|
|
207
|
-
label: PropTypes.string.isRequired,
|
|
208
|
-
onDismiss: PropTypes.func,
|
|
209
|
-
defaultFocusElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
210
|
-
contentElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
211
|
-
shouldContainFocus: PropTypes.bool,
|
|
212
|
-
shouldReturnFocus: PropTypes.bool,
|
|
213
|
-
shouldCloseOnDocumentClick: PropTypes.bool,
|
|
214
|
-
shouldCloseOnEscape: PropTypes.bool,
|
|
215
|
-
transition: transitionTypePropType,
|
|
216
|
-
in: PropTypes.bool,
|
|
217
|
-
unmountOnExit: PropTypes.bool,
|
|
218
|
-
transitionOnMount: PropTypes.bool,
|
|
219
|
-
transitionEnter: PropTypes.bool,
|
|
220
|
-
transitionExit: PropTypes.bool,
|
|
221
|
-
onEnter: PropTypes.func,
|
|
222
|
-
onEntering: PropTypes.func,
|
|
223
|
-
onEntered: PropTypes.func,
|
|
224
|
-
onExit: PropTypes.func,
|
|
225
|
-
onExiting: PropTypes.func,
|
|
226
|
-
onExited: PropTypes.func
|
|
227
|
-
}
|
|
228
|
-
|
|
229
194
|
const allowedProps: AllowedPropKeys = [
|
|
230
195
|
'children',
|
|
231
196
|
'open',
|
|
@@ -255,4 +220,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
255
220
|
]
|
|
256
221
|
|
|
257
222
|
export type { OverlayProps, OverlayState }
|
|
258
|
-
export {
|
|
223
|
+
export { allowedProps }
|
package/tsconfig.build.json
CHANGED
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
{ "path": "../ui-popover/tsconfig.build.json" },
|
|
22
22
|
{ "path": "../ui-portal/tsconfig.build.json" },
|
|
23
23
|
{ "path": "../ui-position/tsconfig.build.json" },
|
|
24
|
-
{ "path": "../ui-prop-types/tsconfig.build.json" },
|
|
25
24
|
{ "path": "../ui-react-utils/tsconfig.build.json" },
|
|
26
|
-
{ "path": "../ui-testable/tsconfig.build.json" },
|
|
27
25
|
{ "path": "../ui-tooltip/tsconfig.build.json" },
|
|
28
26
|
{ "path": "../ui-utils/tsconfig.build.json" },
|
|
29
27
|
{ "path": "../ui-view/tsconfig.build.json" },
|