@instructure/ui-overlays 8.56.0 → 9.0.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 CHANGED
@@ -3,6 +3,22 @@
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
+ # [9.0.0](https://github.com/instructure/instructure-ui/compare/v8.56.0...v9.0.0) (2024-05-09)
7
+
8
+
9
+ ### Features
10
+
11
+ * **ui-overlays:** remove deprecated props from Mask and Overlay ([e079b81](https://github.com/instructure/instructure-ui/commit/e079b81859dc9dfe69e16ba65a1e1f5c24740640))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **ui-overlays:** removed onDismiss prop from Mask and applicationElement from Overlay
17
+
18
+
19
+
20
+
21
+
6
22
  # [8.56.0](https://github.com/instructure/instructure-ui/compare/v8.55.1...v8.56.0) (2024-05-06)
7
23
 
8
24
  **Note:** Version bump only for package @instructure/ui-overlays
package/es/Mask/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class, _class2;
1
+ var _dec, _class, _class2;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -27,7 +27,7 @@ var _dec, _dec2, _class, _class2;
27
27
  import React, { Component } from 'react';
28
28
  import noScroll from 'no-scroll';
29
29
  import { withStyle, jsx } from '@instructure/emotion';
30
- import { ensureSingleChild, omitProps, deprecated } from '@instructure/ui-react-utils';
30
+ import { ensureSingleChild, omitProps } from '@instructure/ui-react-utils';
31
31
  import generateStyle from './styles';
32
32
  import generateComponentTheme from './theme';
33
33
  import { allowedProps, propTypes } from './props';
@@ -38,9 +38,7 @@ import MaskCounter from './MaskCounter';
38
38
  category: components/utilities
39
39
  ---
40
40
  **/
41
- let Mask = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = deprecated('9.0.0', {
42
- onDismiss: null
43
- }), _dec(_class = _dec2(_class = (_class2 = class Mask extends Component {
41
+ let Mask = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Mask extends Component {
44
42
  constructor(...args) {
45
43
  super(...args);
46
44
  this.ref = null;
@@ -96,6 +94,6 @@ let Mask = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = dep
96
94
  }, _class2.displayName = "Mask", _class2.componentId = 'Mask', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
97
95
  placement: 'center',
98
96
  fullscreen: false
99
- }, _class2)) || _class) || _class);
97
+ }, _class2)) || _class);
100
98
  export default Mask;
101
99
  export { Mask };
package/es/Mask/props.js CHANGED
@@ -28,11 +28,7 @@ const propTypes = {
28
28
  fullscreen: PropTypes.bool,
29
29
  children: PropTypes.node,
30
30
  onClick: PropTypes.func,
31
- elementRef: PropTypes.func,
32
- onDismiss: PropTypes.func // TODO: deprecated, remove in V9
31
+ elementRef: PropTypes.func
33
32
  };
34
-
35
- const allowedProps = ['placement', 'fullscreen', 'children', 'onClick', 'elementRef',
36
- // TODO: deprecated, remove in V9
37
- 'onDismiss'];
33
+ const allowedProps = ['placement', 'fullscreen', 'children', 'onClick', 'elementRef'];
38
34
  export { propTypes, allowedProps };
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class, _class2;
1
+ var _dec, _class, _class2;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -26,7 +26,7 @@ var _dec, _dec2, _class, _class2;
26
26
  import React, { Component } from 'react';
27
27
  import { testable } from '@instructure/ui-testable';
28
28
  import { createChainedFunction } from '@instructure/ui-utils';
29
- import { omitProps, pickProps, deprecated } from '@instructure/ui-react-utils';
29
+ import { omitProps, pickProps } from '@instructure/ui-react-utils';
30
30
  import { Dialog } from '@instructure/ui-dialog';
31
31
  import { Portal } from '@instructure/ui-portal';
32
32
  import { Transition } from '@instructure/ui-motion';
@@ -37,9 +37,7 @@ import { allowedProps, propTypes } from './props';
37
37
  category: components
38
38
  ---
39
39
  **/
40
- let Overlay = (_dec = testable(), _dec2 = deprecated('9.0.0', {
41
- applicationElement: null
42
- }), _dec(_class = _dec2(_class = (_class2 = class Overlay extends Component {
40
+ let Overlay = (_dec = testable(), _dec(_class = (_class2 = class Overlay extends Component {
43
41
  constructor(props) {
44
42
  super(props);
45
43
  this._timeouts = [];
@@ -126,6 +124,6 @@ let Overlay = (_dec = testable(), _dec2 = deprecated('9.0.0', {
126
124
  transitionOnMount: false,
127
125
  transitionEnter: true,
128
126
  transitionExit: true
129
- }, _class2)) || _class) || _class);
127
+ }, _class2)) || _class);
130
128
  export default Overlay;
131
129
  export { Overlay };
@@ -51,11 +51,7 @@ const propTypes = {
51
51
  onEntered: PropTypes.func,
52
52
  onExit: PropTypes.func,
53
53
  onExiting: PropTypes.func,
54
- onExited: PropTypes.func,
55
- // TODO: deprecated, remove in V9
56
- applicationElement: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.func])
54
+ onExited: PropTypes.func
57
55
  };
58
- 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',
59
- // TODO: deprecated, remove in V9
60
- 'applicationElement'];
56
+ 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'];
61
57
  export { propTypes, allowedProps };
package/lib/Mask/index.js CHANGED
@@ -11,12 +11,11 @@ var _noScroll = _interopRequireDefault(require("no-scroll"));
11
11
  var _emotion = require("@instructure/emotion");
12
12
  var _ensureSingleChild = require("@instructure/ui-react-utils/lib/ensureSingleChild.js");
13
13
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
14
- var _deprecated = require("@instructure/ui-react-utils/lib/deprecated.js");
15
14
  var _styles = _interopRequireDefault(require("./styles"));
16
15
  var _theme = _interopRequireDefault(require("./theme"));
17
16
  var _props = require("./props");
18
17
  var _MaskCounter = _interopRequireDefault(require("./MaskCounter"));
19
- var _dec, _dec2, _class, _class2;
18
+ var _dec, _class, _class2;
20
19
  /*
21
20
  * The MIT License (MIT)
22
21
  *
@@ -46,9 +45,7 @@ var _dec, _dec2, _class, _class2;
46
45
  category: components/utilities
47
46
  ---
48
47
  **/
49
- let Mask = exports.Mask = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _deprecated.deprecated)('9.0.0', {
50
- onDismiss: null
51
- }), _dec(_class = _dec2(_class = (_class2 = class Mask extends _react.Component {
48
+ let Mask = exports.Mask = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Mask extends _react.Component {
52
49
  constructor(...args) {
53
50
  super(...args);
54
51
  this.ref = null;
@@ -104,5 +101,5 @@ let Mask = exports.Mask = (_dec = (0, _emotion.withStyle)(_styles.default, _them
104
101
  }, _class2.displayName = "Mask", _class2.componentId = 'Mask', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
105
102
  placement: 'center',
106
103
  fullscreen: false
107
- }, _class2)) || _class) || _class);
104
+ }, _class2)) || _class);
108
105
  var _default = exports.default = Mask;
package/lib/Mask/props.js CHANGED
@@ -35,10 +35,6 @@ const propTypes = exports.propTypes = {
35
35
  fullscreen: _propTypes.default.bool,
36
36
  children: _propTypes.default.node,
37
37
  onClick: _propTypes.default.func,
38
- elementRef: _propTypes.default.func,
39
- onDismiss: _propTypes.default.func // TODO: deprecated, remove in V9
38
+ elementRef: _propTypes.default.func
40
39
  };
41
-
42
- const allowedProps = exports.allowedProps = ['placement', 'fullscreen', 'children', 'onClick', 'elementRef',
43
- // TODO: deprecated, remove in V9
44
- 'onDismiss'];
40
+ const allowedProps = exports.allowedProps = ['placement', 'fullscreen', 'children', 'onClick', 'elementRef'];
@@ -10,12 +10,11 @@ var _testable = require("@instructure/ui-testable/lib/testable.js");
10
10
  var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
11
11
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
12
12
  var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
13
- var _deprecated = require("@instructure/ui-react-utils/lib/deprecated.js");
14
13
  var _Dialog = require("@instructure/ui-dialog/lib/Dialog");
15
14
  var _Portal = require("@instructure/ui-portal/lib/Portal");
16
15
  var _Transition = require("@instructure/ui-motion/lib/Transition");
17
16
  var _props = require("./props");
18
- var _dec, _dec2, _class, _class2;
17
+ var _dec, _class, _class2;
19
18
  /*
20
19
  * The MIT License (MIT)
21
20
  *
@@ -44,9 +43,7 @@ var _dec, _dec2, _class, _class2;
44
43
  category: components
45
44
  ---
46
45
  **/
47
- let Overlay = exports.Overlay = (_dec = (0, _testable.testable)(), _dec2 = (0, _deprecated.deprecated)('9.0.0', {
48
- applicationElement: null
49
- }), _dec(_class = _dec2(_class = (_class2 = class Overlay extends _react.Component {
46
+ let Overlay = exports.Overlay = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 = class Overlay extends _react.Component {
50
47
  constructor(props) {
51
48
  super(props);
52
49
  this._timeouts = [];
@@ -133,5 +130,5 @@ let Overlay = exports.Overlay = (_dec = (0, _testable.testable)(), _dec2 = (0, _
133
130
  transitionOnMount: false,
134
131
  transitionEnter: true,
135
132
  transitionExit: true
136
- }, _class2)) || _class) || _class);
133
+ }, _class2)) || _class);
137
134
  var _default = exports.default = Overlay;
@@ -58,10 +58,6 @@ const propTypes = exports.propTypes = {
58
58
  onEntered: _propTypes.default.func,
59
59
  onExit: _propTypes.default.func,
60
60
  onExiting: _propTypes.default.func,
61
- onExited: _propTypes.default.func,
62
- // TODO: deprecated, remove in V9
63
- applicationElement: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.element), _propTypes.default.element, _propTypes.default.func])
61
+ onExited: _propTypes.default.func
64
62
  };
65
- 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',
66
- // TODO: deprecated, remove in V9
67
- 'applicationElement'];
63
+ 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": "8.56.0",
3
+ "version": "9.0.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,8 +23,8 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.56.0",
27
- "@instructure/ui-themes": "8.56.0",
26
+ "@instructure/ui-babel-preset": "9.0.0",
27
+ "@instructure/ui-themes": "9.0.0",
28
28
  "@testing-library/jest-dom": "^6.1.4",
29
29
  "@testing-library/react": "^14.1.2",
30
30
  "@testing-library/user-event": "^14.5.1",
@@ -32,25 +32,25 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.23.2",
35
- "@instructure/console": "8.56.0",
36
- "@instructure/emotion": "8.56.0",
37
- "@instructure/shared-types": "8.56.0",
38
- "@instructure/ui-buttons": "8.56.0",
39
- "@instructure/ui-dialog": "8.56.0",
40
- "@instructure/ui-dom-utils": "8.56.0",
41
- "@instructure/ui-focusable": "8.56.0",
42
- "@instructure/ui-i18n": "8.56.0",
43
- "@instructure/ui-motion": "8.56.0",
44
- "@instructure/ui-popover": "8.56.0",
45
- "@instructure/ui-portal": "8.56.0",
46
- "@instructure/ui-position": "8.56.0",
47
- "@instructure/ui-prop-types": "8.56.0",
48
- "@instructure/ui-react-utils": "8.56.0",
49
- "@instructure/ui-testable": "8.56.0",
50
- "@instructure/ui-tooltip": "8.56.0",
51
- "@instructure/ui-utils": "8.56.0",
52
- "@instructure/ui-view": "8.56.0",
53
- "@instructure/uid": "8.56.0",
35
+ "@instructure/console": "9.0.0",
36
+ "@instructure/emotion": "9.0.0",
37
+ "@instructure/shared-types": "9.0.0",
38
+ "@instructure/ui-buttons": "9.0.0",
39
+ "@instructure/ui-dialog": "9.0.0",
40
+ "@instructure/ui-dom-utils": "9.0.0",
41
+ "@instructure/ui-focusable": "9.0.0",
42
+ "@instructure/ui-i18n": "9.0.0",
43
+ "@instructure/ui-motion": "9.0.0",
44
+ "@instructure/ui-popover": "9.0.0",
45
+ "@instructure/ui-portal": "9.0.0",
46
+ "@instructure/ui-position": "9.0.0",
47
+ "@instructure/ui-prop-types": "9.0.0",
48
+ "@instructure/ui-react-utils": "9.0.0",
49
+ "@instructure/ui-testable": "9.0.0",
50
+ "@instructure/ui-tooltip": "9.0.0",
51
+ "@instructure/ui-utils": "9.0.0",
52
+ "@instructure/ui-view": "9.0.0",
53
+ "@instructure/uid": "9.0.0",
54
54
  "no-scroll": "^2.1.1",
55
55
  "prop-types": "^15.8.1"
56
56
  },
@@ -28,11 +28,7 @@ import noScroll from 'no-scroll'
28
28
 
29
29
  import { withStyle, jsx } from '@instructure/emotion'
30
30
  import type { ComponentStyle } from '@instructure/emotion'
31
- import {
32
- ensureSingleChild,
33
- omitProps,
34
- deprecated
35
- } from '@instructure/ui-react-utils'
31
+ import { ensureSingleChild, omitProps } from '@instructure/ui-react-utils'
36
32
 
37
33
  import generateStyle from './styles'
38
34
  import generateComponentTheme from './theme'
@@ -47,7 +43,6 @@ category: components/utilities
47
43
  ---
48
44
  **/
49
45
  @withStyle(generateStyle, generateComponentTheme)
50
- @deprecated('9.0.0', { onDismiss: null })
51
46
  class Mask extends Component<MaskProps> {
52
47
  static readonly componentId = 'Mask'
53
48
 
package/src/Mask/props.ts CHANGED
@@ -41,11 +41,6 @@ type MaskOwnProps = {
41
41
  * provides a reference to the underlying html root element
42
42
  */
43
43
  elementRef?: (element: Element | null) => void
44
-
45
- /**
46
- * __Deprecated__: The component doesn't use onDismiss internally, will be removed in V9.
47
- */
48
- onDismiss?: () => void
49
44
  }
50
45
 
51
46
  type PropKeys = keyof MaskOwnProps
@@ -63,8 +58,7 @@ const propTypes: PropValidators<PropKeys> = {
63
58
  fullscreen: PropTypes.bool,
64
59
  children: PropTypes.node,
65
60
  onClick: PropTypes.func,
66
- elementRef: PropTypes.func,
67
- onDismiss: PropTypes.func // TODO: deprecated, remove in V9
61
+ elementRef: PropTypes.func
68
62
  }
69
63
 
70
64
  const allowedProps: AllowedPropKeys = [
@@ -72,10 +66,7 @@ const allowedProps: AllowedPropKeys = [
72
66
  'fullscreen',
73
67
  'children',
74
68
  'onClick',
75
- 'elementRef',
76
-
77
- // TODO: deprecated, remove in V9
78
- 'onDismiss'
69
+ 'elementRef'
79
70
  ]
80
71
 
81
72
  export type { MaskProps, MaskStyle }
@@ -26,7 +26,7 @@ import React, { Component, ComponentClass, ReactElement } from 'react'
26
26
 
27
27
  import { testable } from '@instructure/ui-testable'
28
28
  import { createChainedFunction } from '@instructure/ui-utils'
29
- import { omitProps, pickProps, deprecated } from '@instructure/ui-react-utils'
29
+ import { omitProps, pickProps } from '@instructure/ui-react-utils'
30
30
 
31
31
  import { Dialog } from '@instructure/ui-dialog'
32
32
  import type { DialogProps } from '@instructure/ui-dialog'
@@ -44,7 +44,6 @@ category: components
44
44
  ---
45
45
  **/
46
46
  @testable()
47
- @deprecated('9.0.0', { applicationElement: null })
48
47
  class Overlay extends Component<OverlayProps, OverlayState> {
49
48
  static allowedProps = allowedProps
50
49
  static propTypes = propTypes
@@ -49,15 +49,6 @@ type OverlayOwnProps = {
49
49
  * The type of `<Transition />` to use for animating in/out
50
50
  */
51
51
  transition?: TransitionType // passed as to Transition as `type`
52
-
53
- // TODO: remove applicationElement in V9, it was removed from Dialog in v6
54
- /**
55
- * __Deprecated__: An element or a function returning an element to apply `aria-hidden` to
56
- */
57
- applicationElement?:
58
- | React.ReactElement[]
59
- | React.ReactElement
60
- | (() => React.ReactElement[] | React.ReactElement)
61
52
  } & PropsForPortal &
62
53
  PropsForDialog &
63
54
  PropsForTransition
@@ -232,14 +223,7 @@ const propTypes: PropValidators<PropKeys> = {
232
223
  onEntered: PropTypes.func,
233
224
  onExit: PropTypes.func,
234
225
  onExiting: PropTypes.func,
235
- onExited: PropTypes.func,
236
-
237
- // TODO: deprecated, remove in V9
238
- applicationElement: PropTypes.oneOfType([
239
- PropTypes.arrayOf(PropTypes.element),
240
- PropTypes.element,
241
- PropTypes.func
242
- ])
226
+ onExited: PropTypes.func
243
227
  }
244
228
 
245
229
  const allowedProps: AllowedPropKeys = [
@@ -267,10 +251,7 @@ const allowedProps: AllowedPropKeys = [
267
251
  'onEntered',
268
252
  'onExit',
269
253
  'onExiting',
270
- 'onExited',
271
-
272
- // TODO: deprecated, remove in V9
273
- 'applicationElement'
254
+ 'onExited'
274
255
  ]
275
256
 
276
257
  export type { OverlayProps, OverlayState }