@instructure/ui-react-utils 10.26.1-snapshot-1 → 11.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,9 +3,30 @@
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
- ## [10.26.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1-snapshot-1) (2025-10-06)
6
+ # [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-react-utils
8
+
9
+ ### Features
10
+
11
+ * **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **many:** InstUI v11 contains the following breaking changes:
17
+ - React 16 and 17 are no longer supported
18
+ - remove `PropTypes` from all packages
19
+ - remove `CodeEditor` component
20
+ - remove `@instui/theme-registry` package
21
+ - remove `@testable`, `@experimental`, `@hack` decorators
22
+ - InstUISettingsProvider's `as` prop is removed
23
+ - `canvas.use()`, `canvasHighContrast.use()` functions are removed
24
+ - `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
25
+ - `variables` field on theme objects are removed
26
+ - remove deprecated props from Table: Row's `isStacked`, Body's
27
+ `isStacked`, `hover`, and `headers`
28
+ - `Table`'s `caption` prop is now required
29
+ - `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
9
30
 
10
31
 
11
32
 
@@ -52,12 +52,6 @@ const withDeterministicId = decorator(ComposedComponent => {
52
52
  });
53
53
  hoistNonReactStatics(WithDeterministicId, ComposedComponent);
54
54
 
55
- // we have to pass these on, because sometimes users
56
- // access propTypes of the component in other components
57
- // eslint-disable-next-line react/forbid-foreign-prop-types
58
- WithDeterministicId.propTypes = ComposedComponent.propTypes;
59
- WithDeterministicId.defaultProps = ComposedComponent.defaultProps;
60
-
61
55
  // These static fields exist on InstUI components
62
56
  //@ts-expect-error fix this
63
57
  WithDeterministicId.allowedProps = ComposedComponent.allowedProps;
package/es/index.js CHANGED
@@ -24,10 +24,7 @@
24
24
 
25
25
  /* list utils in alphabetical order */
26
26
  export { callRenderProp } from './callRenderProp';
27
- export { deprecated } from './deprecated';
28
27
  export { ensureSingleChild } from './ensureSingleChild';
29
- export { experimental } from './experimental';
30
- export { hack } from './hack';
31
28
  export { getDisplayName } from './getDisplayName';
32
29
  export { getElementType } from './getElementType';
33
30
  export { getInteraction } from './getInteraction';
@@ -60,12 +60,6 @@ const withDeterministicId = exports.withDeterministicId = (0, _decorator.decorat
60
60
  });
61
61
  (0, _hoistNonReactStatics.default)(WithDeterministicId, ComposedComponent);
62
62
 
63
- // we have to pass these on, because sometimes users
64
- // access propTypes of the component in other components
65
- // eslint-disable-next-line react/forbid-foreign-prop-types
66
- WithDeterministicId.propTypes = ComposedComponent.propTypes;
67
- WithDeterministicId.defaultProps = ComposedComponent.defaultProps;
68
-
69
63
  // These static fields exist on InstUI components
70
64
  //@ts-expect-error fix this
71
65
  WithDeterministicId.allowedProps = ComposedComponent.allowedProps;
package/lib/index.js CHANGED
@@ -21,24 +21,12 @@ Object.defineProperty(exports, "callRenderProp", {
21
21
  return _callRenderProp.callRenderProp;
22
22
  }
23
23
  });
24
- Object.defineProperty(exports, "deprecated", {
25
- enumerable: true,
26
- get: function () {
27
- return _deprecated.deprecated;
28
- }
29
- });
30
24
  Object.defineProperty(exports, "ensureSingleChild", {
31
25
  enumerable: true,
32
26
  get: function () {
33
27
  return _ensureSingleChild.ensureSingleChild;
34
28
  }
35
29
  });
36
- Object.defineProperty(exports, "experimental", {
37
- enumerable: true,
38
- get: function () {
39
- return _experimental.experimental;
40
- }
41
- });
42
30
  Object.defineProperty(exports, "getDisplayName", {
43
31
  enumerable: true,
44
32
  get: function () {
@@ -57,12 +45,6 @@ Object.defineProperty(exports, "getInteraction", {
57
45
  return _getInteraction.getInteraction;
58
46
  }
59
47
  });
60
- Object.defineProperty(exports, "hack", {
61
- enumerable: true,
62
- get: function () {
63
- return _hack.hack;
64
- }
65
- });
66
48
  Object.defineProperty(exports, "matchComponentTypes", {
67
49
  enumerable: true,
68
50
  get: function () {
@@ -106,10 +88,7 @@ Object.defineProperty(exports, "withDeterministicId", {
106
88
  }
107
89
  });
108
90
  var _callRenderProp = require("./callRenderProp");
109
- var _deprecated = require("./deprecated");
110
91
  var _ensureSingleChild = require("./ensureSingleChild");
111
- var _experimental = require("./experimental");
112
- var _hack = require("./hack");
113
92
  var _getDisplayName = require("./getDisplayName");
114
93
  var _getElementType = require("./getElementType");
115
94
  var _getInteraction = require("./getInteraction");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-react-utils",
3
- "version": "10.26.1-snapshot-1",
3
+ "version": "11.0.0",
4
4
  "description": "A React utility library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -22,25 +22,24 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "devDependencies": {
25
- "@instructure/ui-babel-preset": "10.26.1-snapshot-1",
25
+ "@instructure/ui-babel-preset": "11.0.0",
26
26
  "@testing-library/jest-dom": "^6.6.3",
27
- "@testing-library/react": "^16.0.1",
27
+ "@testing-library/react": "15.0.7",
28
28
  "vitest": "^3.2.2"
29
29
  },
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.27.6",
32
32
  "@emotion/is-prop-valid": "^1.3.1",
33
- "@instructure/console": "10.26.1-snapshot-1",
34
- "@instructure/shared-types": "10.26.1-snapshot-1",
35
- "@instructure/ui-decorator": "10.26.1-snapshot-1",
36
- "@instructure/ui-dom-utils": "10.26.1-snapshot-1",
37
- "@instructure/ui-utils": "10.26.1-snapshot-1",
38
- "hoist-non-react-statics": "^3.3.2",
39
- "prop-types": "^15.8.1"
33
+ "@instructure/console": "11.0.0",
34
+ "@instructure/shared-types": "11.0.0",
35
+ "@instructure/ui-decorator": "11.0.0",
36
+ "@instructure/ui-dom-utils": "11.0.0",
37
+ "@instructure/ui-utils": "11.0.0",
38
+ "hoist-non-react-statics": "^3.3.2"
40
39
  },
41
40
  "peerDependencies": {
42
- "react": ">=16.14 <=18",
43
- "react-dom": ">=16.14 <=18"
41
+ "react": ">=18 <=19",
42
+ "react-dom": ">=18 <=19"
44
43
  },
45
44
  "publishConfig": {
46
45
  "access": "public"
@@ -79,12 +79,6 @@ const withDeterministicId = decorator((ComposedComponent: InstUIComponent) => {
79
79
 
80
80
  hoistNonReactStatics(WithDeterministicId, ComposedComponent)
81
81
 
82
- // we have to pass these on, because sometimes users
83
- // access propTypes of the component in other components
84
- // eslint-disable-next-line react/forbid-foreign-prop-types
85
- WithDeterministicId.propTypes = ComposedComponent.propTypes
86
- WithDeterministicId.defaultProps = ComposedComponent.defaultProps
87
-
88
82
  // These static fields exist on InstUI components
89
83
  //@ts-expect-error fix this
90
84
  WithDeterministicId.allowedProps = ComposedComponent.allowedProps
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { ComponentType } from 'react'
25
+ import type { ComponentClass } from 'react'
26
26
  import { logWarn as warn } from '@instructure/console'
27
27
  import { AsElementType } from '@instructure/shared-types'
28
28
 
@@ -56,7 +56,7 @@ interface PropsObject {
56
56
  * @returns the element type
57
57
  */
58
58
  function getElementType<T extends PropsObject>(
59
- Component: Omit<ComponentType<T>, 'propTypes'>,
59
+ Component: ComponentClass<T>,
60
60
  props: T,
61
61
  getDefault?: () => AsElementType<T>
62
62
  ) {
package/src/index.ts CHANGED
@@ -24,10 +24,7 @@
24
24
 
25
25
  /* list utils in alphabetical order */
26
26
  export { callRenderProp } from './callRenderProp'
27
- export { deprecated } from './deprecated'
28
27
  export { ensureSingleChild } from './ensureSingleChild'
29
- export { experimental } from './experimental'
30
- export { hack } from './hack'
31
28
  export { getDisplayName } from './getDisplayName'
32
29
  export { getElementType } from './getElementType'
33
30
  export { getInteraction } from './getInteraction'
@@ -42,6 +39,7 @@ export {
42
39
  DeterministicIdContextProvider,
43
40
  withDeterministicId
44
41
  } from './DeterministicIdContext'
42
+
45
43
  export type { GetInteractionOptions } from './getInteraction'
46
44
  export type { InteractionType } from './getInteraction'
47
45
  export type {
@@ -53,7 +53,7 @@ type GetProps<E extends ReactElement = ReactElement> = E extends
53
53
  * @param children
54
54
  */
55
55
  function safeCloneElement<
56
- E extends ReactElement = ReactElement,
56
+ E extends ReactElement<any> = ReactElement,
57
57
  P extends GetProps<E> = GetProps<E>
58
58
  >(
59
59
  element: { ref?: any } & E,
@@ -122,11 +122,10 @@ Ignoring ref: ${originalRef}`
122
122
  ...mergedProps,
123
123
  ref(component: E) {
124
124
  if (cloneRefIsFunction) {
125
- ;(cloneRef as (instance: any) => void)(component)
125
+ ;(cloneRef as (instance: unknown) => void)(component)
126
126
  } else {
127
127
  cloneRef.current = component
128
128
  }
129
-
130
129
  originalRefIsAFunction && originalRef(component)
131
130
  }
132
131
  },