@material/dialog
Advanced tools
Comparing version 15.0.0-canary.16fbd30ff.0 to 15.0.0-canary.1728a6dcf.0
@@ -40,3 +40,3 @@ /** | ||
areButtonsStacked(): boolean; | ||
getActionFromEvent(evt: Event): string | null; | ||
getActionFromEvent(event: Event): string | null; | ||
trapFocus(focusElement: HTMLElement | null): void; | ||
@@ -55,7 +55,7 @@ releaseFocus(): void; | ||
*/ | ||
registerContentEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void; | ||
registerContentEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void; | ||
/** | ||
* Deregisters an event listener on the dialog's content element. | ||
*/ | ||
deregisterContentEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void; | ||
deregisterContentEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void; | ||
/** | ||
@@ -78,7 +78,7 @@ * @return true if the content has been scrolled (that is, for | ||
*/ | ||
registerWindowEventHandler<K extends WindowEventType>(evtType: K, handler: SpecificWindowEventListener<K>): void; | ||
registerWindowEventHandler<K extends WindowEventType>(eventType: K, handler: SpecificWindowEventListener<K>): void; | ||
/** | ||
* Deregisters an event listener to the window. | ||
*/ | ||
deregisterWindowEventHandler<K extends WindowEventType>(evtType: K, handler: SpecificWindowEventListener<K>): void; | ||
deregisterWindowEventHandler<K extends WindowEventType>(eventType: K, handler: SpecificWindowEventListener<K>): void; | ||
} |
@@ -6,3 +6,3 @@ # Change Log | ||
# [15.0.0-canary.16fbd30ff.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.16fbd30ff.0) (2023-01-26) | ||
# [15.0.0-canary.1728a6dcf.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.1728a6dcf.0) (2023-09-26) | ||
@@ -12,2 +12,4 @@ | ||
* **dialog:** Add tabindex=-1 to dialog surface and set its outline to 0 ([4e840d6](https://github.com/material-components/material-components-web/commit/4e840d68533ef04e438c0b10f1047627a1d01e0c)) | ||
* **dialog:** fix dialog close button z-index in dark mode ([26bacc3](https://github.com/material-components/material-components-web/commit/26bacc3feee6ea39c95b35b73c99040399b0f530)) | ||
* **dialog:** Fix fullscreen scrim z-index during animation ([39f9424](https://github.com/material-components/material-components-web/commit/39f9424b3806fe8d5b45f1f0cc02fb5b4a7a6998)) | ||
@@ -18,3 +20,5 @@ | ||
* **dialog:** Add `z-indez` token to dialog theme styles mixin ([93fc524](https://github.com/material-components/material-components-web/commit/93fc524b7889f5789096c9be8799ed5b619aed43)) | ||
* **dialog:** add a scrim-less dialog, that does not block interaction with the page ([2a6ddc1](https://github.com/material-components/material-components-web/commit/2a6ddc1cff903da5e17766a214d76fc8cb3904d8)) | ||
* **dialog:** Add display mixin ([bebf5bf](https://github.com/material-components/material-components-web/commit/bebf5bfdf0ca880e6ce4a4b8c2f13f62bf433abe)) | ||
* **dialog:** Adding container-surface-tint as supported token for theme-API. ([446734f](https://github.com/material-components/material-components-web/commit/446734f27bf1f7eadbf9d30c248649f46dd52cda)) |
@@ -168,7 +168,7 @@ /** | ||
}, | ||
getActionFromEvent: function (evt) { | ||
if (!evt.target) { | ||
getActionFromEvent: function (event) { | ||
if (!event.target) { | ||
return ''; | ||
} | ||
var element = closest(evt.target, "[" + strings.ACTION_ATTRIBUTE + "]"); | ||
var element = closest(event.target, "[" + strings.ACTION_ATTRIBUTE + "]"); | ||
return element && element.getAttribute(strings.ACTION_ATTRIBUTE); | ||
@@ -209,10 +209,10 @@ }, | ||
}, | ||
registerContentEventHandler: function (evt, handler) { | ||
registerContentEventHandler: function (event, handler) { | ||
if (_this.content instanceof HTMLElement) { | ||
_this.content.addEventListener(evt, handler); | ||
_this.content.addEventListener(event, handler); | ||
} | ||
}, | ||
deregisterContentEventHandler: function (evt, handler) { | ||
deregisterContentEventHandler: function (event, handler) { | ||
if (_this.content instanceof HTMLElement) { | ||
_this.content.removeEventListener(evt, handler); | ||
_this.content.removeEventListener(event, handler); | ||
} | ||
@@ -226,7 +226,7 @@ }, | ||
}, | ||
registerWindowEventHandler: function (evt, handler) { | ||
window.addEventListener(evt, handler); | ||
registerWindowEventHandler: function (event, handler) { | ||
window.addEventListener(event, handler); | ||
}, | ||
deregisterWindowEventHandler: function (evt, handler) { | ||
window.removeEventListener(evt, handler); | ||
deregisterWindowEventHandler: function (event, handler) { | ||
window.removeEventListener(event, handler); | ||
}, | ||
@@ -233,0 +233,0 @@ }; |
@@ -109,7 +109,7 @@ /** | ||
/** Handles click on the dialog root element. */ | ||
handleClick(evt: MouseEvent): void; | ||
handleClick(event: MouseEvent): void; | ||
/** Handles keydown on the dialog root element. */ | ||
handleKeydown(evt: KeyboardEvent): void; | ||
handleKeydown(event: KeyboardEvent): void; | ||
/** Handles keydown on the document. */ | ||
handleDocumentKeydown(evt: KeyboardEvent): void; | ||
handleDocumentKeydown(event: KeyboardEvent): void; | ||
/** | ||
@@ -116,0 +116,0 @@ * Handles scroll event on the dialog's content element -- showing a scroll |
@@ -248,4 +248,4 @@ /** | ||
/** Handles click on the dialog root element. */ | ||
MDCDialogFoundation.prototype.handleClick = function (evt) { | ||
var isScrim = this.adapter.eventTargetMatches(evt.target, strings.SCRIM_SELECTOR); | ||
MDCDialogFoundation.prototype.handleClick = function (event) { | ||
var isScrim = this.adapter.eventTargetMatches(event.target, strings.SCRIM_SELECTOR); | ||
// Check for scrim click first since it doesn't require querying ancestors. | ||
@@ -256,3 +256,3 @@ if (isScrim && this.scrimClickAction !== '') { | ||
else { | ||
var action = this.adapter.getActionFromEvent(evt); | ||
var action = this.adapter.getActionFromEvent(event); | ||
if (action) { | ||
@@ -264,8 +264,8 @@ this.close(action); | ||
/** Handles keydown on the dialog root element. */ | ||
MDCDialogFoundation.prototype.handleKeydown = function (evt) { | ||
var isEnter = evt.key === 'Enter' || evt.keyCode === 13; | ||
MDCDialogFoundation.prototype.handleKeydown = function (event) { | ||
var isEnter = event.key === 'Enter' || event.keyCode === 13; | ||
if (!isEnter) { | ||
return; | ||
} | ||
var action = this.adapter.getActionFromEvent(evt); | ||
var action = this.adapter.getActionFromEvent(event); | ||
if (action) { | ||
@@ -289,3 +289,3 @@ // Action button callback is handled in `handleClick`, | ||
// </mwc-dialog> | ||
var target = evt.composedPath ? evt.composedPath()[0] : evt.target; | ||
var target = event.composedPath ? event.composedPath()[0] : event.target; | ||
var isDefault = this.suppressDefaultPressSelector ? | ||
@@ -299,4 +299,4 @@ !this.adapter.eventTargetMatches(target, this.suppressDefaultPressSelector) : | ||
/** Handles keydown on the document. */ | ||
MDCDialogFoundation.prototype.handleDocumentKeydown = function (evt) { | ||
var isEscape = evt.key === 'Escape' || evt.keyCode === 27; | ||
MDCDialogFoundation.prototype.handleDocumentKeydown = function (event) { | ||
var isEscape = event.key === 'Escape' || event.keyCode === 27; | ||
if (isEscape && this.escapeKeyAction !== '') { | ||
@@ -303,0 +303,0 @@ this.close(this.escapeKeyAction); |
{ | ||
"name": "@material/dialog", | ||
"version": "15.0.0-canary.16fbd30ff.0", | ||
"version": "15.0.0-canary.1728a6dcf.0", | ||
"description": "The Material Components Web dialog component", | ||
@@ -21,16 +21,16 @@ "license": "MIT", | ||
"dependencies": { | ||
"@material/animation": "15.0.0-canary.16fbd30ff.0", | ||
"@material/base": "15.0.0-canary.16fbd30ff.0", | ||
"@material/button": "15.0.0-canary.16fbd30ff.0", | ||
"@material/dom": "15.0.0-canary.16fbd30ff.0", | ||
"@material/elevation": "15.0.0-canary.16fbd30ff.0", | ||
"@material/feature-targeting": "15.0.0-canary.16fbd30ff.0", | ||
"@material/icon-button": "15.0.0-canary.16fbd30ff.0", | ||
"@material/ripple": "15.0.0-canary.16fbd30ff.0", | ||
"@material/rtl": "15.0.0-canary.16fbd30ff.0", | ||
"@material/shape": "15.0.0-canary.16fbd30ff.0", | ||
"@material/theme": "15.0.0-canary.16fbd30ff.0", | ||
"@material/tokens": "15.0.0-canary.16fbd30ff.0", | ||
"@material/touch-target": "15.0.0-canary.16fbd30ff.0", | ||
"@material/typography": "15.0.0-canary.16fbd30ff.0", | ||
"@material/animation": "15.0.0-canary.1728a6dcf.0", | ||
"@material/base": "15.0.0-canary.1728a6dcf.0", | ||
"@material/button": "15.0.0-canary.1728a6dcf.0", | ||
"@material/dom": "15.0.0-canary.1728a6dcf.0", | ||
"@material/elevation": "15.0.0-canary.1728a6dcf.0", | ||
"@material/feature-targeting": "15.0.0-canary.1728a6dcf.0", | ||
"@material/icon-button": "15.0.0-canary.1728a6dcf.0", | ||
"@material/ripple": "15.0.0-canary.1728a6dcf.0", | ||
"@material/rtl": "15.0.0-canary.1728a6dcf.0", | ||
"@material/shape": "15.0.0-canary.1728a6dcf.0", | ||
"@material/theme": "15.0.0-canary.1728a6dcf.0", | ||
"@material/tokens": "15.0.0-canary.1728a6dcf.0", | ||
"@material/touch-target": "15.0.0-canary.1728a6dcf.0", | ||
"@material/typography": "15.0.0-canary.1728a6dcf.0", | ||
"tslib": "^2.1.0" | ||
@@ -41,3 +41,3 @@ }, | ||
}, | ||
"gitHead": "f4c39ff05bbd1045563670b4ea50b0be51a91d01" | ||
"gitHead": "3828aedf4f344a948780a69956ca4f069cef3daa" | ||
} |
@@ -110,3 +110,4 @@ <!--docs: | ||
aria-labelledby="my-dialog-title" | ||
aria-describedby="my-dialog-content"> | ||
aria-describedby="my-dialog-content" | ||
tabindex="-1"> | ||
<div class="mdc-dialog__content" id="my-dialog-content"> | ||
@@ -148,3 +149,4 @@ Discard draft? | ||
aria-labelledby="my-dialog-title" | ||
aria-describedby="my-dialog-content"> | ||
aria-describedby="my-dialog-content" | ||
tabindex="-1"> | ||
<!-- Title cannot contain leading whitespace due to mdc-typography-baseline-top() --> | ||
@@ -190,3 +192,4 @@ <h2 class="mdc-dialog__title" id="my-dialog-title"><!-- | ||
aria-labelledby="my-dialog-title" | ||
aria-describedby="my-dialog-content"> | ||
aria-describedby="my-dialog-content" | ||
tabindex="-1"> | ||
<!-- Title cannot contain leading whitespace due to mdc-typography-baseline-top() --> | ||
@@ -254,3 +257,4 @@ <h2 class="mdc-dialog__title" id="my-dialog-title"><!-- | ||
aria-labelledby="my-dialog-title" | ||
aria-describedby="my-dialog-content"> | ||
aria-describedby="my-dialog-content" | ||
tabindex="-1"> | ||
<div class="mdc-dialog__header"> | ||
@@ -310,3 +314,3 @@ <h2 class="mdc-dialog__title" id="my-dialog-title"> | ||
<div class="mdc-dialog__container"> | ||
<div class="mdc-dialog__surface"> | ||
<div class="mdc-dialog__surface" tabindex="-1"> | ||
<button class="mdc-icon-button material-icons mdc-dialog__close" data-mdc-dialog-action="close"> | ||
@@ -313,0 +317,0 @@ close |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1653150
7993
589
+ Added@material/animation@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/base@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/button@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/density@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/dom@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/elevation@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/feature-targeting@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/focus-ring@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/icon-button@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/ripple@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/rtl@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/shape@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/theme@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/tokens@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/touch-target@15.0.0-canary.1728a6dcf.0(transitive)
+ Added@material/typography@15.0.0-canary.1728a6dcf.0(transitive)
- Removed@material/animation@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/base@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/button@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/density@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/dom@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/elevation@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/feature-targeting@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/focus-ring@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/icon-button@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/ripple@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/rtl@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/shape@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/theme@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/tokens@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/touch-target@15.0.0-canary.16fbd30ff.0(transitive)
- Removed@material/typography@15.0.0-canary.16fbd30ff.0(transitive)
Updated@material/feature-targeting@15.0.0-canary.1728a6dcf.0