@instructure/ui-dom-utils 11.7.3 → 11.7.4-pr-snapshot-1781695314229

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.md +1 -0
  3. package/{lib/canUseDOM.js → babel.config.cjs} +12 -17
  4. package/es/InputModeListener.js +2 -2
  5. package/es/addEventListener.js +2 -1
  6. package/es/addInputModeListener.js +3 -2
  7. package/es/addPositionChangeListener.js +4 -3
  8. package/es/contains.js +3 -2
  9. package/es/containsActiveElement.js +4 -3
  10. package/es/findFocusable.js +2 -2
  11. package/es/findTabbable.js +2 -1
  12. package/es/getActiveElement.js +3 -1
  13. package/es/getBoundingClientRect.js +5 -4
  14. package/es/getCSSStyleDeclaration.js +4 -3
  15. package/es/getClassList.js +2 -1
  16. package/es/getFontSize.js +3 -5
  17. package/es/getOffsetParents.js +5 -4
  18. package/es/getScrollParents.js +4 -3
  19. package/es/handleMouseOverOut.js +3 -1
  20. package/es/index.js +25 -24
  21. package/es/isActiveElement.js +3 -2
  22. package/es/isDefinedCustomElement.js +0 -1
  23. package/es/isVisible.js +3 -2
  24. package/es/matchMedia.js +4 -3
  25. package/es/ownerDocument.js +4 -2
  26. package/es/ownerWindow.js +3 -2
  27. package/es/requestAnimationFrame.js +2 -1
  28. package/package.json +6 -8
  29. package/src/InputModeListener.ts +2 -2
  30. package/src/addEventListener.ts +1 -1
  31. package/src/addInputModeListener.ts +2 -2
  32. package/src/addPositionChangeListener.ts +3 -3
  33. package/src/contains.ts +2 -2
  34. package/src/containsActiveElement.ts +3 -3
  35. package/src/findFocusable.ts +1 -1
  36. package/src/findTabbable.ts +1 -1
  37. package/src/getActiveElement.ts +1 -1
  38. package/src/getBoundingClientRect.ts +4 -4
  39. package/src/getCSSStyleDeclaration.ts +3 -3
  40. package/src/getClassList.ts +1 -1
  41. package/src/getFontSize.ts +3 -3
  42. package/src/getOffsetParents.ts +4 -4
  43. package/src/getScrollParents.ts +3 -3
  44. package/src/handleMouseOverOut.ts +1 -1
  45. package/src/index.ts +24 -24
  46. package/src/isActiveElement.ts +2 -2
  47. package/src/isVisible.ts +2 -2
  48. package/src/matchMedia.ts +3 -3
  49. package/src/ownerDocument.ts +2 -2
  50. package/src/ownerWindow.ts +2 -2
  51. package/src/requestAnimationFrame.ts +1 -1
  52. package/tsconfig.build.tsbuildinfo +1 -1
  53. package/types/index.d.ts +24 -24
  54. package/types/index.d.ts.map +1 -1
  55. package/lib/InputModeListener.js +0 -91
  56. package/lib/addEventListener.js +0 -54
  57. package/lib/addInputModeListener.js +0 -115
  58. package/lib/addPositionChangeListener.js +0 -70
  59. package/lib/contains.js +0 -69
  60. package/lib/containsActiveElement.js +0 -50
  61. package/lib/findDOMNode.js +0 -96
  62. package/lib/findFocusable.js +0 -119
  63. package/lib/findTabbable.js +0 -58
  64. package/lib/getActiveElement.js +0 -52
  65. package/lib/getBoundingClientRect.js +0 -103
  66. package/lib/getCSSStyleDeclaration.js +0 -63
  67. package/lib/getClassList.js +0 -76
  68. package/lib/getFontSize.js +0 -68
  69. package/lib/getOffsetParents.js +0 -70
  70. package/lib/getScrollParents.js +0 -98
  71. package/lib/handleMouseOverOut.js +0 -54
  72. package/lib/index.js +0 -173
  73. package/lib/isActiveElement.js +0 -48
  74. package/lib/isDefinedCustomElement.js +0 -46
  75. package/lib/isVisible.js +0 -88
  76. package/lib/matchMedia.js +0 -56
  77. package/lib/ownerDocument.js +0 -54
  78. package/lib/ownerWindow.js +0 -49
  79. package/lib/package.json +0 -1
  80. package/lib/requestAnimationFrame.js +0 -70
  81. package/lib/transformSelection.js +0 -85
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+ ## [11.7.4-pr-snapshot-1781695314229](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-pr-snapshot-1781695314229) (2026-06-17)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-dom-utils
9
+
10
+
11
+
12
+
13
+
6
14
  ## [11.7.3](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3) (2026-05-07)
7
15
 
8
16
 
package/LICENSE.md CHANGED
@@ -2,6 +2,7 @@
2
2
  title: The MIT License (MIT)
3
3
  category: Getting Started
4
4
  order: 9
5
+ isWIP: true
5
6
  ---
6
7
 
7
8
  # The MIT License (MIT)
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.canUseDOM = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,14 +22,15 @@ exports.default = exports.canUseDOM = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- /**
32
- * ---
33
- * category: utilities/DOM
34
- * ---
35
- *
36
- * Performs simple test to determine if DOM can be accessed
37
- * @module
38
- * @returns {boolean} whether the dom can be used
39
- */
40
- const canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
41
- var _default = exports.default = canUseDOM;
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ esModules: Boolean(process.env.ES_MODULES),
31
+ removeConsole: process.env.NODE_ENV === 'production',
32
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
33
+ }
34
+ ]
35
+ ]
36
+ }
@@ -23,8 +23,8 @@
23
23
  */
24
24
 
25
25
  import { logWarn as warn } from '@instructure/console';
26
- import { addEventListener } from "./addEventListener.js";
27
- import { canUseDOM } from "./canUseDOM.js";
26
+ import { addEventListener } from './addEventListener.js';
27
+ import { canUseDOM } from './canUseDOM.js';
28
28
  export const MODES = {
29
29
  keyboard: 'keyboard',
30
30
  pointer: 'pointer'
@@ -21,7 +21,8 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
25
26
  /**
26
27
  * ---
27
28
  * category: utilities/DOM
@@ -21,8 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { addEventListener } from "./addEventListener.js";
25
- import { canUseDOM } from "./canUseDOM.js";
24
+
25
+ import { addEventListener } from './addEventListener.js';
26
+ import { canUseDOM } from './canUseDOM.js';
26
27
  const MODES = {
27
28
  keyboard: 'keyboard',
28
29
  pointer: 'pointer'
@@ -21,9 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { getBoundingClientRect } from "./getBoundingClientRect.js";
26
- import { requestAnimationFrame } from "./requestAnimationFrame.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { getBoundingClientRect } from './getBoundingClientRect.js';
27
+ import { requestAnimationFrame } from './requestAnimationFrame.js';
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/DOM
package/es/contains.js CHANGED
@@ -21,8 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { canUseDOM } from "./canUseDOM.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { canUseDOM } from './canUseDOM.js';
26
27
  function containsWithDOM(context, el) {
27
28
  const container = context && findDOMNode(context);
28
29
  const node = el && findDOMNode(el);
@@ -21,9 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { contains } from "./contains.js";
26
- import { getActiveElement } from "./getActiveElement.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { contains } from './contains.js';
27
+ import { getActiveElement } from './getActiveElement.js';
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/DOM
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.array.includes.js";
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -22,6 +21,7 @@ import "core-js/modules/es.array.includes.js";
22
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
22
  * SOFTWARE.
24
23
  */
24
+
25
25
  /**
26
26
  * Adapted from jQuery UI core
27
27
  *
@@ -37,7 +37,7 @@ import "core-js/modules/es.array.includes.js";
37
37
  // or even better use the native <dialog> component.
38
38
  // tabbable has issues with scrollable containers, e.g.
39
39
  // https://github.com/focus-trap/tabbable/issues/167
40
- import { getCSSStyleDeclaration, findDOMNode } from "./index.js";
40
+ import { getCSSStyleDeclaration, findDOMNode } from './index.js';
41
41
  const focusableSelector = ['a[href]', 'frame', 'iframe', 'object', 'input:not([type=hidden])', 'select', 'textarea', 'button', '*[tabindex]', '[contenteditable="true"]'].join(',');
42
42
  function hasQuerySelectorAll(el) {
43
43
  if (!el || typeof el.querySelectorAll !== 'function') {
@@ -21,7 +21,8 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findFocusable } from "./findFocusable.js";
24
+
25
+ import { findFocusable } from './findFocusable.js';
25
26
  /**
26
27
  * ---
27
28
  * category: utilities/a11y
@@ -21,7 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { isDefinedCustomElement } from "./isDefinedCustomElement.js";
24
+
25
+ import { isDefinedCustomElement } from './isDefinedCustomElement.js';
26
+
25
27
  /**
26
28
  * ---
27
29
  * category: utilities/DOM
@@ -21,10 +21,11 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { canUseDOM } from "./canUseDOM.js";
26
- import { contains } from "./contains.js";
27
- import { ownerDocument } from "./ownerDocument.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { canUseDOM } from './canUseDOM.js';
27
+ import { contains } from './contains.js';
28
+ import { ownerDocument } from './ownerDocument.js';
28
29
  /**
29
30
  * ---
30
31
  * category: utilities/DOM
@@ -21,9 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { ownerWindow } from "./ownerWindow.js";
26
- import { canUseDOM } from "./canUseDOM.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { ownerWindow } from './ownerWindow.js';
27
+ import { canUseDOM } from './canUseDOM.js';
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/DOM
@@ -21,7 +21,8 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
25
26
  const apiForEmptyNode = {
26
27
  toArray: () => [],
27
28
  contains: () => false,
package/es/getFontSize.js CHANGED
@@ -1,5 +1,3 @@
1
- import "core-js/modules/es.weak-map.get-or-insert.js";
2
- import "core-js/modules/es.weak-map.get-or-insert-computed.js";
3
1
  /*
4
2
  * The MIT License (MIT)
5
3
  *
@@ -23,9 +21,9 @@ import "core-js/modules/es.weak-map.get-or-insert-computed.js";
23
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
22
  * SOFTWARE.
25
23
  */
26
- import { canUseDOM } from "./canUseDOM.js";
27
- import { ownerDocument } from "./ownerDocument.js";
28
- import { getCSSStyleDeclaration } from "./getCSSStyleDeclaration.js";
24
+ import { canUseDOM } from './canUseDOM.js';
25
+ import { ownerDocument } from './ownerDocument.js';
26
+ import { getCSSStyleDeclaration } from './getCSSStyleDeclaration.js';
29
27
  const COMPUTED_CACHE = new WeakMap();
30
28
 
31
29
  /**
@@ -21,10 +21,11 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { canUseDOM } from "./canUseDOM.js";
26
- import { getCSSStyleDeclaration } from "./getCSSStyleDeclaration.js";
27
- import { ownerDocument } from "./ownerDocument.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { canUseDOM } from './canUseDOM.js';
27
+ import { getCSSStyleDeclaration } from './getCSSStyleDeclaration.js';
28
+ import { ownerDocument } from './ownerDocument.js';
28
29
  /**
29
30
  * ---
30
31
  * category: utilities/DOM
@@ -21,9 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { canUseDOM } from "./canUseDOM.js";
26
- import { getCSSStyleDeclaration } from "./getCSSStyleDeclaration.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { canUseDOM } from './canUseDOM.js';
27
+ import { getCSSStyleDeclaration } from './getCSSStyleDeclaration.js';
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/DOM
@@ -21,7 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { contains } from "./contains.js";
24
+
25
+ import { contains } from './contains.js';
26
+
25
27
  /**
26
28
  * ---
27
29
  * category: utilities/DOM
package/es/index.js CHANGED
@@ -21,28 +21,29 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
+
24
25
  /* list utils in alphabetical order */
25
- export { addEventListener } from "./addEventListener.js";
26
- export { addInputModeListener } from "./addInputModeListener.js";
27
- export { addPositionChangeListener } from "./addPositionChangeListener.js";
28
- export { canUseDOM } from "./canUseDOM.js";
29
- export { contains } from "./contains.js";
30
- export { containsActiveElement } from "./containsActiveElement.js";
31
- export { findDOMNode } from "./findDOMNode.js";
32
- export { findFocusable } from "./findFocusable.js";
33
- export { findTabbable } from "./findTabbable.js";
34
- export { getActiveElement } from "./getActiveElement.js";
35
- export { getBoundingClientRect } from "./getBoundingClientRect.js";
36
- export { getClassList } from "./getClassList.js";
37
- export { getCSSStyleDeclaration } from "./getCSSStyleDeclaration.js";
38
- export { getFontSize } from "./getFontSize.js";
39
- export { getOffsetParents } from "./getOffsetParents.js";
40
- export { getScrollParents } from "./getScrollParents.js";
41
- export { handleMouseOverOut } from "./handleMouseOverOut.js";
42
- export { isActiveElement } from "./isActiveElement.js";
43
- export { isVisible } from "./isVisible.js";
44
- export { ownerDocument } from "./ownerDocument.js";
45
- export { ownerWindow } from "./ownerWindow.js";
46
- export { requestAnimationFrame } from "./requestAnimationFrame.js";
47
- export { transformSelection } from "./transformSelection.js";
48
- export { matchMedia } from "./matchMedia.js";
26
+ export { addEventListener } from './addEventListener.js';
27
+ export { addInputModeListener } from './addInputModeListener.js';
28
+ export { addPositionChangeListener } from './addPositionChangeListener.js';
29
+ export { canUseDOM } from './canUseDOM.js';
30
+ export { contains } from './contains.js';
31
+ export { containsActiveElement } from './containsActiveElement.js';
32
+ export { findDOMNode } from './findDOMNode.js';
33
+ export { findFocusable } from './findFocusable.js';
34
+ export { findTabbable } from './findTabbable.js';
35
+ export { getActiveElement } from './getActiveElement.js';
36
+ export { getBoundingClientRect } from './getBoundingClientRect.js';
37
+ export { getClassList } from './getClassList.js';
38
+ export { getCSSStyleDeclaration } from './getCSSStyleDeclaration.js';
39
+ export { getFontSize } from './getFontSize.js';
40
+ export { getOffsetParents } from './getOffsetParents.js';
41
+ export { getScrollParents } from './getScrollParents.js';
42
+ export { handleMouseOverOut } from './handleMouseOverOut.js';
43
+ export { isActiveElement } from './isActiveElement.js';
44
+ export { isVisible } from './isVisible.js';
45
+ export { ownerDocument } from './ownerDocument.js';
46
+ export { ownerWindow } from './ownerWindow.js';
47
+ export { requestAnimationFrame } from './requestAnimationFrame.js';
48
+ export { transformSelection } from './transformSelection.js';
49
+ export { matchMedia } from './matchMedia.js';
@@ -21,8 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { getActiveElement } from "./getActiveElement.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { getActiveElement } from './getActiveElement.js';
26
27
  /**
27
28
  * ---
28
29
  * category: utilities/DOM
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.array.includes.js";
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
package/es/isVisible.js CHANGED
@@ -21,8 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { getCSSStyleDeclaration } from "./getCSSStyleDeclaration.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { getCSSStyleDeclaration } from './getCSSStyleDeclaration.js';
26
27
  /**
27
28
  * ---
28
29
  * category: utilities/DOM
package/es/matchMedia.js CHANGED
@@ -21,9 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { canUseDOM } from "./canUseDOM.js";
25
- import { findDOMNode } from "./findDOMNode.js";
26
- import { ownerWindow } from "./ownerWindow.js";
24
+
25
+ import { canUseDOM } from './canUseDOM.js';
26
+ import { findDOMNode } from './findDOMNode.js';
27
+ import { ownerWindow } from './ownerWindow.js';
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/DOM
@@ -21,8 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import canUseDOM from "./canUseDOM.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import canUseDOM from './canUseDOM.js';
27
+
26
28
  /**
27
29
  * ---
28
30
  * category: utilities/DOM
package/es/ownerWindow.js CHANGED
@@ -21,8 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { findDOMNode } from "./findDOMNode.js";
25
- import { ownerDocument } from "./ownerDocument.js";
24
+
25
+ import { findDOMNode } from './findDOMNode.js';
26
+ import { ownerDocument } from './ownerDocument.js';
26
27
  /**
27
28
  * ---
28
29
  * category: utilities/DOM
@@ -21,7 +21,8 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { canUseDOM } from "./canUseDOM.js";
24
+
25
+ import { canUseDOM } from './canUseDOM.js';
25
26
  /**
26
27
  * ---
27
28
  * category: utilities/DOM
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-dom-utils",
3
- "version": "11.7.3",
3
+ "version": "11.7.4-pr-snapshot-1781695314229",
4
+ "type": "module",
4
5
  "description": "A DOM utility library made by Instructure Inc.",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,14 +15,14 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.2",
18
- "@instructure/console": "11.7.3",
19
- "@instructure/shared-types": "11.7.3"
18
+ "@instructure/console": "11.7.4-pr-snapshot-1781695314229",
19
+ "@instructure/shared-types": "11.7.4-pr-snapshot-1781695314229"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@testing-library/jest-dom": "^6.6.3",
23
23
  "@testing-library/react": "15.0.7",
24
24
  "vitest": "^3.2.2",
25
- "@instructure/ui-babel-preset": "11.7.3"
25
+ "@instructure/ui-babel-preset": "11.7.4-pr-snapshot-1781695314229"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=18 <=19",
@@ -37,10 +37,8 @@
37
37
  "src": "./src/index.ts",
38
38
  "types": "./types/index.d.ts",
39
39
  "import": "./es/index.js",
40
- "require": "./lib/index.js",
41
40
  "default": "./es/index.js"
42
41
  },
43
- "./lib/*": "./lib/*",
44
42
  "./es/*": "./es/*",
45
43
  "./types/*": "./types/*",
46
44
  "./package.json": "./package.json",
@@ -50,7 +48,7 @@
50
48
  "lint": "ui-scripts lint",
51
49
  "lint:fix": "ui-scripts lint --fix",
52
50
  "clean": "ui-scripts clean",
53
- "build": "ui-scripts build --modules es,cjs",
51
+ "build": "ui-scripts build",
54
52
  "build:watch": "ui-scripts build --watch",
55
53
  "build:types": "tsc -p tsconfig.build.json"
56
54
  }
@@ -23,8 +23,8 @@
23
23
  */
24
24
 
25
25
  import { logWarn as warn } from '@instructure/console'
26
- import { addEventListener } from './addEventListener'
27
- import { canUseDOM } from './canUseDOM'
26
+ import { addEventListener } from './addEventListener.js'
27
+ import { canUseDOM } from './canUseDOM.js'
28
28
 
29
29
  import type { MouseEvent, PointerEvent, TouchEvent } from 'react'
30
30
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  import React from 'react'
26
26
 
27
- import { findDOMNode } from './findDOMNode'
27
+ import { findDOMNode } from './findDOMNode.js'
28
28
 
29
29
  type ReactEvent = <T extends Event>(event: T) => void
30
30
 
@@ -22,8 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { addEventListener } from './addEventListener'
26
- import { canUseDOM } from './canUseDOM'
25
+ import { addEventListener } from './addEventListener.js'
26
+ import { canUseDOM } from './canUseDOM.js'
27
27
 
28
28
  import type { MouseEvent, PointerEvent, TouchEvent } from 'react'
29
29
 
@@ -22,12 +22,12 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findDOMNode } from './findDOMNode'
26
- import { getBoundingClientRect } from './getBoundingClientRect'
25
+ import { findDOMNode } from './findDOMNode.js'
26
+ import { getBoundingClientRect } from './getBoundingClientRect.js'
27
27
  import {
28
28
  requestAnimationFrame,
29
29
  RequestAnimationFrameType
30
- } from './requestAnimationFrame'
30
+ } from './requestAnimationFrame.js'
31
31
  import { UIElement } from '@instructure/shared-types'
32
32
 
33
33
  type PositionChangeListenerType = { remove: () => void }
package/src/contains.ts CHANGED
@@ -22,8 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findDOMNode } from './findDOMNode'
26
- import { canUseDOM } from './canUseDOM'
25
+ import { findDOMNode } from './findDOMNode.js'
26
+ import { canUseDOM } from './canUseDOM.js'
27
27
  import { UIElement } from '@instructure/shared-types'
28
28
 
29
29
  function containsWithDOM(context: UIElement, el: UIElement) {
@@ -22,9 +22,9 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findDOMNode } from './findDOMNode'
26
- import { contains } from './contains'
27
- import { getActiveElement } from './getActiveElement'
25
+ import { findDOMNode } from './findDOMNode.js'
26
+ import { contains } from './contains.js'
27
+ import { getActiveElement } from './getActiveElement.js'
28
28
  import { UIElement } from '@instructure/shared-types'
29
29
 
30
30
  /**
@@ -37,7 +37,7 @@
37
37
  // or even better use the native <dialog> component.
38
38
  // tabbable has issues with scrollable containers, e.g.
39
39
  // https://github.com/focus-trap/tabbable/issues/167
40
- import { getCSSStyleDeclaration, findDOMNode } from './'
40
+ import { getCSSStyleDeclaration, findDOMNode } from './index.js'
41
41
  import type { UIElement } from '@instructure/shared-types'
42
42
 
43
43
  const focusableSelector = [
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findFocusable } from './findFocusable'
25
+ import { findFocusable } from './findFocusable.js'
26
26
  import { UIElement } from '@instructure/shared-types'
27
27
 
28
28
  /**
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { isDefinedCustomElement } from './isDefinedCustomElement'
25
+ import { isDefinedCustomElement } from './isDefinedCustomElement.js'
26
26
 
27
27
  /**
28
28
  * ---
@@ -22,10 +22,10 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findDOMNode } from './findDOMNode'
26
- import { canUseDOM } from './canUseDOM'
27
- import { contains } from './contains'
28
- import { ownerDocument } from './ownerDocument'
25
+ import { findDOMNode } from './findDOMNode.js'
26
+ import { canUseDOM } from './canUseDOM.js'
27
+ import { contains } from './contains.js'
28
+ import { ownerDocument } from './ownerDocument.js'
29
29
  import { UIElement } from '@instructure/shared-types'
30
30
 
31
31
  type RectType = {
@@ -22,9 +22,9 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findDOMNode } from './findDOMNode'
26
- import { ownerWindow } from './ownerWindow'
27
- import { canUseDOM } from './canUseDOM'
25
+ import { findDOMNode } from './findDOMNode.js'
26
+ import { ownerWindow } from './ownerWindow.js'
27
+ import { canUseDOM } from './canUseDOM.js'
28
28
  import type { UIElement } from '@instructure/shared-types'
29
29
 
30
30
  /**
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { findDOMNode } from './findDOMNode'
25
+ import { findDOMNode } from './findDOMNode.js'
26
26
  import { UIElement } from '@instructure/shared-types'
27
27
 
28
28
  type ClassListApi = {