@instructure/ui-dom-utils 8.55.2-snapshot-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.
@@ -1,45 +0,0 @@
1
- import { UIElement } from '@instructure/shared-types';
2
- type ResizeListenerType = {
3
- remove: () => void;
4
- };
5
- type DimensionTypes = 'width' | 'height';
6
- /**
7
- * ---
8
- * category: utilities/DOM
9
- * ---
10
- * ### This utility is deprecated since version __8.0__ and will be permanently deleted in version 9.0.
11
- * *Please use the native [DOM ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) instead of this.*
12
- *
13
- *
14
- * Example usage of the `ResizeObserver`:
15
- * ```js-code
16
- * const observer = new ResizeObserver((entries) => {
17
- * for (let entry of entries) {
18
- * const size = {
19
- * width: entry.contentRect.width
20
- * }
21
- *
22
- * if (size.width !== origSize.width) {
23
- * // call your handler function here
24
- * this._debounced(size)
25
- * }
26
- * }
27
- * })
28
- *
29
- * observer.observe(content)
30
- * ```
31
- *
32
- * Adds a listener to an element and calls a specified handler function whenever the size changes.
33
- * @deprecated since version 8.0
34
- * @module
35
- *
36
- *
37
- * @param { Node | Window | React.ReactElement | React.Component | function } el - component or DOM node
38
- * @param {function} handler - function to run when resize occurs
39
- * @param dimensions
40
- * @returns {function} remove - cancel the listener and no longer execute the handler function
41
- */
42
- declare function addResizeListener(el: UIElement, handler: (dimensions: Record<DimensionTypes, number>) => any, dimensions?: DimensionTypes[]): ResizeListenerType;
43
- export default addResizeListener;
44
- export { addResizeListener };
45
- //# sourceMappingURL=addResizeListener.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addResizeListener.d.ts","sourceRoot":"","sources":["../src/addResizeListener.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,KAAK,kBAAkB,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAAA;AAChD,KAAK,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,iBAAS,iBAAiB,CACxB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,KAAK,GAAG,EAC5D,UAAU,GAAE,cAAc,EAAc,GACvC,kBAAkB,CAqCpB;AAED,eAAe,iBAAiB,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,17 +0,0 @@
1
- import type { UIElement } from '@instructure/shared-types';
2
- /**
3
- * ---
4
- * category: utilities/DOM
5
- * ---
6
- *
7
- * Polyfill for Element.matches (https://developer.mozilla.org/en-US/docs/Web/API/Element/matches)
8
- * DEPRECATED This polyfill is only needed for old browsers and will be removed in InstUI v9
9
- * @module elementMatches
10
- * @param el - component or DOM node
11
- * @param selectorString - a string representing the selector to test
12
- * @returns if the element would be selected by the specified selector string
13
- */
14
- declare function elementMatches(el: UIElement, selectorString: string): boolean;
15
- export default elementMatches;
16
- export { elementMatches };
17
- //# sourceMappingURL=elementMatches.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"elementMatches.d.ts","sourceRoot":"","sources":["../src/elementMatches.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D;;;;;;;;;;;GAWG;AACH,iBAAS,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAM5D;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}