Socket
Socket
Sign inDemoInstall

@material/dom

Package Overview
Dependencies
Maintainers
14
Versions
1652
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/dom - npm Package Compare versions

Comparing version 15.0.0-canary.43f5323bc.0 to 15.0.0-canary.446734f27.0

3

announce.js

@@ -77,4 +77,3 @@ /**

var existingLiveRegion = documentLiveRegions.get(priority);
if (existingLiveRegion &&
ownerDocument.body.contains(existingLiveRegion)) {
if (existingLiveRegion && ownerDocument.body.contains(existingLiveRegion)) {
return existingLiveRegion;

@@ -81,0 +80,0 @@ }

@@ -6,3 +6,3 @@ # Change Log

# [15.0.0-canary.43f5323bc.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.43f5323bc.0) (2022-12-12)
# [15.0.0-canary.446734f27.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.446734f27.0) (2023-05-30)

@@ -9,0 +9,0 @@

@@ -250,3 +250,3 @@ /**

FocusTrap.prototype.releaseFocus = function () {
[].slice.call(this.root.querySelectorAll("." + FOCUS_SENTINEL_CLASS)).forEach(function (sentinelEl) {
Array.from(this.root.querySelectorAll("." + FOCUS_SENTINEL_CLASS)).forEach(function (sentinelEl) {
sentinelEl.parentElement.removeChild(sentinelEl);

@@ -296,3 +296,3 @@ });

FocusTrap.prototype.getFocusableElements = function (root) {
var focusableEls = [].slice.call(root.querySelectorAll('[autofocus], [tabindex], a, input, textarea, select, button'));
var focusableEls = Array.from(root.querySelectorAll('[autofocus], [tabindex], a, input, textarea, select, button'));
return focusableEls.filter(function (el) {

@@ -567,4 +567,5 @@ var isDisabledOrHidden = el.getAttribute('aria-disabled') === 'true' || el.getAttribute('disabled') != null || el.getAttribute('hidden') != null || el.getAttribute('aria-hidden') === 'true';

/**
* @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain.
* This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.
* @fileoverview A "ponyfill" is a polyfill that doesn't modify the global
* prototype chain. This makes ponyfills safer than traditional polyfills,
* especially for libraries like MDC.
*/

@@ -571,0 +572,0 @@ function closest(element, selector) {

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@material/dom",[],t):"object"==typeof exports?exports.dom=t():(e.mdc=e.mdc||{},e.mdc.dom=t())}(this,function(){return o={},r.m=n={13:function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.isNavigationEvent=o.normalizeKey=o.KEY=void 0,o.KEY={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"};var r=new Set;r.add(o.KEY.BACKSPACE),r.add(o.KEY.ENTER),r.add(o.KEY.SPACEBAR),r.add(o.KEY.PAGE_UP),r.add(o.KEY.PAGE_DOWN),r.add(o.KEY.END),r.add(o.KEY.HOME),r.add(o.KEY.ARROW_LEFT),r.add(o.KEY.ARROW_UP),r.add(o.KEY.ARROW_RIGHT),r.add(o.KEY.ARROW_DOWN),r.add(o.KEY.DELETE),r.add(o.KEY.ESCAPE),r.add(o.KEY.TAB);var n=8,i=13,a=32,s=33,u=34,c=35,d=36,l=37,f=38,E=39,p=40,v=46,m=27,h=9,b=new Map;b.set(n,o.KEY.BACKSPACE),b.set(i,o.KEY.ENTER),b.set(a,o.KEY.SPACEBAR),b.set(s,o.KEY.PAGE_UP),b.set(u,o.KEY.PAGE_DOWN),b.set(c,o.KEY.END),b.set(d,o.KEY.HOME),b.set(l,o.KEY.ARROW_LEFT),b.set(f,o.KEY.ARROW_UP),b.set(E,o.KEY.ARROW_RIGHT),b.set(p,o.KEY.ARROW_DOWN),b.set(v,o.KEY.DELETE),b.set(m,o.KEY.ESCAPE),b.set(h,o.KEY.TAB);var A=new Set;function y(e){var t=e.key;if(r.has(t))return t;var n=b.get(e.keyCode);return n||o.KEY.UNKNOWN}A.add(o.KEY.PAGE_UP),A.add(o.KEY.PAGE_DOWN),A.add(o.KEY.END),A.add(o.KEY.HOME),A.add(o.KEY.ARROW_LEFT),A.add(o.KEY.ARROW_UP),A.add(o.KEY.ARROW_RIGHT),A.add(o.KEY.ARROW_DOWN),o.normalizeKey=y,o.isNavigationEvent=function(e){return A.has(y(e))}},2:function(e,t,n){"use strict";function o(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.estimateScrollWidth=t.matches=t.closest=void 0,t.closest=function(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(o(n,t))return n;n=n.parentElement}return null},t.matches=o,t.estimateScrollWidth=function(e){var t=e;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var o=n.scrollWidth;return document.documentElement.removeChild(n),o}},226:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ponyfill=t.keyboard=t.focusTrap=t.events=void 0;var a=i(n(6));t.events=a;var s=i(n(36));t.focusTrap=s;var u=i(n(13));t.keyboard=u;var c=i(n(2));t.ponyfill=c},36:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FocusTrap=void 0;var i="mdc-dom-focus-sentinel",o=(r.prototype.trapFocus=function(){var e=this.getFocusableElements(this.root);if(0===e.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root),this.options.skipInitialFocus||this.focusInitialElement(e,this.options.initialFocusEl)},r.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+i)).forEach(function(e){e.parentElement.removeChild(e)}),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},r.prototype.wrapTabFocus=function(t){var n=this,e=this.createSentinel(),o=this.createSentinel();e.addEventListener("focus",function(){var e=n.getFocusableElements(t);0<e.length&&e[e.length-1].focus()}),o.addEventListener("focus",function(){var e=n.getFocusableElements(t);0<e.length&&e[0].focus()}),t.insertBefore(e,t.children[0]),t.appendChild(o)},r.prototype.focusInitialElement=function(e,t){var n=0;t&&(n=Math.max(e.indexOf(t),0)),e[n].focus()},r.prototype.getFocusableElements=function(e){return[].slice.call(e.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter(function(e){var t="true"===e.getAttribute("aria-disabled")||null!=e.getAttribute("disabled")||null!=e.getAttribute("hidden")||"true"===e.getAttribute("aria-hidden"),n=0<=e.tabIndex&&0<e.getBoundingClientRect().width&&!e.classList.contains(i)&&!t,o=!1;if(n){var r=getComputedStyle(e);o="none"===r.display||"hidden"===r.visibility}return n&&!o})},r.prototype.createSentinel=function(){var e=document.createElement("div");return e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","true"),e.classList.add(i),e},r);function r(e,t){void 0===t&&(t={}),this.root=e,this.options=t,this.elFocusedBeforeTrapFocus=null}t.FocusTrap=o},6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyPassive=void 0,t.applyPassive=function(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return!(t=!0)}},o=function(){};e.document.addEventListener("test",o,n),e.document.removeEventListener("test",o,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}}},r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=226);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@material/dom",[],t):"object"==typeof exports?exports.dom=t():(e.mdc=e.mdc||{},e.mdc.dom=t())}(this,function(){return r={},o.m=n={226:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ponyfill=t.keyboard=t.focusTrap=t.events=void 0;var a=i(n(52));t.events=a;var s=i(n(68));t.focusTrap=s;var u=i(n(55));t.keyboard=u;var c=i(n(49));t.ponyfill=c},49:function(e,t,n){"use strict";function r(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.estimateScrollWidth=t.matches=t.closest=void 0,t.closest=function(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(r(n,t))return n;n=n.parentElement}return null},t.matches=r,t.estimateScrollWidth=function(e){var t=e;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var r=n.scrollWidth;return document.documentElement.removeChild(n),r}},52:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyPassive=void 0,t.applyPassive=function(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return!(t=!0)}},r=function(){};e.document.addEventListener("test",r,n),e.document.removeEventListener("test",r,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}},55:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isNavigationEvent=r.normalizeKey=r.KEY=void 0,r.KEY={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"};var o=new Set;o.add(r.KEY.BACKSPACE),o.add(r.KEY.ENTER),o.add(r.KEY.SPACEBAR),o.add(r.KEY.PAGE_UP),o.add(r.KEY.PAGE_DOWN),o.add(r.KEY.END),o.add(r.KEY.HOME),o.add(r.KEY.ARROW_LEFT),o.add(r.KEY.ARROW_UP),o.add(r.KEY.ARROW_RIGHT),o.add(r.KEY.ARROW_DOWN),o.add(r.KEY.DELETE),o.add(r.KEY.ESCAPE),o.add(r.KEY.TAB);var n=8,i=13,a=32,s=33,u=34,c=35,d=36,l=37,f=38,E=39,p=40,v=46,m=27,h=9,A=new Map;A.set(n,r.KEY.BACKSPACE),A.set(i,r.KEY.ENTER),A.set(a,r.KEY.SPACEBAR),A.set(s,r.KEY.PAGE_UP),A.set(u,r.KEY.PAGE_DOWN),A.set(c,r.KEY.END),A.set(d,r.KEY.HOME),A.set(l,r.KEY.ARROW_LEFT),A.set(f,r.KEY.ARROW_UP),A.set(E,r.KEY.ARROW_RIGHT),A.set(p,r.KEY.ARROW_DOWN),A.set(v,r.KEY.DELETE),A.set(m,r.KEY.ESCAPE),A.set(h,r.KEY.TAB);var b=new Set;function y(e){var t=e.key;if(o.has(t))return t;var n=A.get(e.keyCode);return n||r.KEY.UNKNOWN}b.add(r.KEY.PAGE_UP),b.add(r.KEY.PAGE_DOWN),b.add(r.KEY.END),b.add(r.KEY.HOME),b.add(r.KEY.ARROW_LEFT),b.add(r.KEY.ARROW_UP),b.add(r.KEY.ARROW_RIGHT),b.add(r.KEY.ARROW_DOWN),r.normalizeKey=y,r.isNavigationEvent=function(e){return b.has(y(e))}},68:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FocusTrap=void 0;var i="mdc-dom-focus-sentinel",r=(o.prototype.trapFocus=function(){var e=this.getFocusableElements(this.root);if(0===e.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root),this.options.skipInitialFocus||this.focusInitialElement(e,this.options.initialFocusEl)},o.prototype.releaseFocus=function(){Array.from(this.root.querySelectorAll("."+i)).forEach(function(e){e.parentElement.removeChild(e)}),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},o.prototype.wrapTabFocus=function(t){var n=this,e=this.createSentinel(),r=this.createSentinel();e.addEventListener("focus",function(){var e=n.getFocusableElements(t);0<e.length&&e[e.length-1].focus()}),r.addEventListener("focus",function(){var e=n.getFocusableElements(t);0<e.length&&e[0].focus()}),t.insertBefore(e,t.children[0]),t.appendChild(r)},o.prototype.focusInitialElement=function(e,t){var n=0;t&&(n=Math.max(e.indexOf(t),0)),e[n].focus()},o.prototype.getFocusableElements=function(e){return Array.from(e.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter(function(e){var t="true"===e.getAttribute("aria-disabled")||null!=e.getAttribute("disabled")||null!=e.getAttribute("hidden")||"true"===e.getAttribute("aria-hidden"),n=0<=e.tabIndex&&0<e.getBoundingClientRect().width&&!e.classList.contains(i)&&!t,r=!1;if(n){var o=getComputedStyle(e);r="none"===o.display||"hidden"===o.visibility}return n&&!r})},o.prototype.createSentinel=function(){var e=document.createElement("div");return e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","true"),e.classList.add(i),e},o);function o(e,t){void 0===t&&(t={}),this.root=e,this.options=t,this.elFocusedBeforeTrapFocus=null}t.FocusTrap=r}},o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=226);function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,r});

@@ -61,3 +61,4 @@ /**

FocusTrap.prototype.releaseFocus = function () {
[].slice.call(this.root.querySelectorAll("." + FOCUS_SENTINEL_CLASS))
Array
.from(this.root.querySelectorAll("." + FOCUS_SENTINEL_CLASS))
.forEach(function (sentinelEl) {

@@ -108,3 +109,3 @@ sentinelEl.parentElement.removeChild(sentinelEl);

FocusTrap.prototype.getFocusableElements = function (root) {
var focusableEls = [].slice.call(root.querySelectorAll('[autofocus], [tabindex], a, input, textarea, select, button'));
var focusableEls = Array.from(root.querySelectorAll('[autofocus], [tabindex], a, input, textarea, select, button'));
return focusableEls.filter(function (el) {

@@ -111,0 +112,0 @@ var isDisabledOrHidden = el.getAttribute('aria-disabled') === 'true' ||

{
"name": "@material/dom",
"description": "DOM manipulation utilities for Material Components for the web",
"version": "15.0.0-canary.43f5323bc.0",
"version": "15.0.0-canary.446734f27.0",
"license": "MIT",

@@ -18,7 +18,7 @@ "main": "dist/mdc.dom.js",

"dependencies": {
"@material/feature-targeting": "15.0.0-canary.43f5323bc.0",
"@material/rtl": "15.0.0-canary.43f5323bc.0",
"@material/feature-targeting": "15.0.0-canary.446734f27.0",
"@material/rtl": "15.0.0-canary.446734f27.0",
"tslib": "^2.1.0"
},
"gitHead": "00be798d56184d5daa74ad6f53d4992db90688bc"
"gitHead": "a2536a849aada5f06aa85deaa7be06f44f620023"
}

@@ -24,4 +24,5 @@ /**

/**
* @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain.
* This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.
* @fileoverview A "ponyfill" is a polyfill that doesn't modify the global
* prototype chain. This makes ponyfills safer than traditional polyfills,
* especially for libraries like MDC.
*/

@@ -28,0 +29,0 @@ export declare function closest(element: Element, selector: string): Element | null;

@@ -24,4 +24,5 @@ /**

/**
* @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain.
* This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.
* @fileoverview A "ponyfill" is a polyfill that doesn't modify the global
* prototype chain. This makes ponyfills safer than traditional polyfills,
* especially for libraries like MDC.
*/

@@ -43,5 +44,4 @@ export function closest(element, selector) {

export function matches(element, selector) {
var nativeMatches = element.matches
|| element.webkitMatchesSelector
|| element.msMatchesSelector;
var nativeMatches = element.matches || element.webkitMatchesSelector ||
element.msMatchesSelector;
return nativeMatches.call(element, selector);

@@ -48,0 +48,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc