@digital-realty/ix-dialog 1.3.6 → 1.3.7
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/dist/IxDialog.js +6 -1
- package/dist/IxDialog.js.map +1 -1
- package/dist/ix-dialog.min.js +2 -2
- package/package.json +2 -2
package/dist/IxDialog.js
CHANGED
|
@@ -363,10 +363,15 @@ export class IxDialog extends ixDialogBaseClass {
|
|
|
363
363
|
from { transform: translateY(0) scaleY(1); opacity: 1; }
|
|
364
364
|
to { transform: translateY(-0.5rem) scaleY(0.98); opacity: 0; }
|
|
365
365
|
}
|
|
366
|
+
/* 'backwards' (not 'both') so the finished animation does not leave a
|
|
367
|
+
transform on the container. A retained transform, even an identity one,
|
|
368
|
+
turns the container into the containing block for position: fixed
|
|
369
|
+
descendants (e.g. md-menu with menu-positioning="fixed"), which then
|
|
370
|
+
render offset by the container's position and get clipped. */
|
|
366
371
|
dialog[open] > .container:not(.closing) {
|
|
367
372
|
transform-origin: top center;
|
|
368
373
|
animation: ix-portal-fold-in var(--ix-dialog-in-dur, 500ms)
|
|
369
|
-
cubic-bezier(0.2, 0.7, 0.3, 1)
|
|
374
|
+
cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
|
|
370
375
|
}
|
|
371
376
|
.container.closing {
|
|
372
377
|
animation: ix-portal-fold-out var(--ix-dialog-out-dur, 250ms)
|
package/dist/IxDialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxDialog.js","sourceRoot":"","sources":["../src/IxDialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAkB,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8GF;CACF,CAAC;AAEc,0BAAiB,GAAG;IAClC,GAAG,UAAU,CAAC,iBAAiB;IAC/B,cAAc,EAAE,IAAI;CACrB,CAAC;AAEgB;IAAjB,KAAK,CAAC,SAAS,CAAC;2CAA6B;AAEF;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAc;AAEC;IAAzD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+CACjD;AAEqB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DAAkC;AAEjC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+DAAuC;AAGnE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;iDACnD;AAEK;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CAAuB;AAKvB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAgC;AAElD;IAAR,KAAK,EAAE;+CAA+B","sourcesContent":["import { mixinElementInternals } from '@material/web/labs/behaviors/element-internals.js';\nimport { AriaForwardMixin } from '@digital-realty/ix-shared-fns/aria-forward-mixin.js';\nimport { spread } from '@open-wc/lit-helpers';\nimport { css, CSSResultGroup, html, LitElement, nothing, render } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { createRef, ref, Ref } from 'lit/directives/ref.js';\nimport { Dialog } from './internal/dialog.js';\nimport { IxDialogStyles } from './ix-dialog-styles.js';\nimport './md-dialog.js';\n\nconst ixDialogBaseClass = AriaForwardMixin(mixinElementInternals(LitElement));\n\nexport class IxDialog extends ixDialogBaseClass {\n /** @nocollapse */\n static styles: CSSResultGroup = [\n IxDialogStyles,\n css`\n :host([use-native-dialog]) dialog[open],\n :host([use-native-dialog][closing]) dialog {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n display: block;\n inline-size: 100vw;\n block-size: 100dvh;\n pointer-events: none;\n z-index: 99;\n overscroll-behavior: contain;\n }\n\n :host([use-native-dialog]) dialog[open] .scrim,\n :host([use-native-dialog][closing]) .scrim,\n :host([use-native-dialog]) dialog[open] > .container,\n :host([use-native-dialog][closing]) dialog > .container {\n pointer-events: auto;\n }\n\n :host([use-native-dialog]) dialog[open] .scrim,\n :host([use-native-dialog][closing]) .scrim {\n position: fixed;\n inset: 0;\n background: var(--ix-dialog-scrim, rgba(0, 0, 0, 0.32));\n }\n\n :host([use-native-dialog]) dialog[open] .scrim {\n overscroll-behavior: contain;\n touch-action: none;\n }\n\n :host([use-native-dialog]) dialog[open] > .container,\n :host([use-native-dialog][closing]) dialog > .container {\n transform: translate(-50%, -50%);\n width: auto;\n height: auto;\n max-block-size: var(--ix-dialog-max-height, 90dvh);\n border-radius: 0.75rem;\n background: var(--ix-dialog-bg, #fff);\n box-shadow: var(\n --ix-dialog-shadow,\n 0 0.625rem 1.875rem rgba(0, 0, 0, 0.25)\n );\n display: grid;\n grid-template-rows: auto 1fr auto;\n overflow: hidden;\n z-index: 9;\n transform-origin: top center;\n will-change: transform, opacity;\n }\n\n :host([use-native-dialog]) .headline,\n :host([use-native-dialog]) .content,\n :host([use-native-dialog]) .actions {\n padding: var(--ix-dialog-section-padding, 1rem);\n }\n\n :host([use-native-dialog]) .content {\n overflow: auto;\n }\n\n :host([use-native-dialog]) .actions {\n display: inline-flex;\n gap: var(--ix-dialog-actions-gap, 0.5rem);\n justify-content: flex-end;\n align-items: center;\n padding: 0;\n border-top: 0;\n }\n\n @keyframes ix-fold-in {\n from {\n transform: translate(-50%, -50%) translateY(-0.5rem) scaleY(0.92);\n opacity: 0;\n }\n to {\n transform: translate(-50%, -50%) translateY(0) scaleY(1);\n opacity: 1;\n }\n }\n @keyframes ix-fold-out {\n from {\n transform: translate(-50%, -50%) translateY(0) scaleY(1);\n opacity: 1;\n }\n to {\n transform: translate(-50%, -50%) translateY(-0.5rem) scaleY(0.98);\n opacity: 0;\n }\n }\n\n :host([use-native-dialog]:not([closing])) dialog[open] > .container {\n animation: ix-fold-in var(--ix-dialog-in-dur, 1000ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n :host([use-native-dialog][closing]) dialog > .container {\n animation: ix-fold-out var(--ix-dialog-out-dur, 250ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host([use-native-dialog]) dialog > .container {\n animation: none !important;\n }\n }\n `,\n ];\n\n static override shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n @query('.dialog') readonly component!: Dialog;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, attribute: 'prevent-cancel' }) preventCancel =\n false;\n\n @property({ type: Boolean }) preventCloseOnScrimClick = false;\n\n @property({ type: Boolean }) disableNextClickIsFromContent = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'use-native-dialog' })\n useNativeDialog = false;\n\n @property({ type: Boolean }) allowOverflow = false;\n\n /**\n * Used in conjunction with `useNativeDialog`\n */\n @property({ type: Object }) contentStyles?: CSSResultGroup;\n\n @state() private nativeClosing = false;\n\n private dialogRef: Ref<HTMLDialogElement> = createRef();\n\n private containerRef: Ref<HTMLDivElement> = createRef();\n\n private portalHost?: HTMLElement;\n\n private portalRoot?: ShadowRoot;\n\n private portalStyleEl?: HTMLStyleElement;\n\n private pointerDownInside = false;\n\n private isScrollLocked = false;\n\n private scrollYBackup = 0;\n\n private removeScrollHandlers?: () => void;\n\n private nativeOnEnd?: (event?: AnimationEvent) => void;\n\n private nativeShowRaf?: number;\n\n private nativeOpenedRaf?: number;\n\n private nativeCloseFallback?: number;\n\n private mo?: MutationObserver;\n\n private get forwardedAriaAttributes() {\n const ariaAttributes = { ...this.ariaAttributes };\n for (const attr of Array.from(this.attributes)) {\n if (attr.name.startsWith('aria-')) {\n ariaAttributes[attr.name] = attr.value;\n }\n }\n return ariaAttributes;\n }\n\n private get nativeDialog(): HTMLDialogElement | null {\n return this.dialogRef.value ?? null;\n }\n\n private get nativeDialogContainer(): HTMLDivElement | null {\n return this.containerRef.value ?? null;\n }\n\n private get hasPortalHeadline() {\n return Array.from(this.children).some(\n child => child instanceof HTMLElement && child.slot === 'headline'\n );\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.mo = new MutationObserver(() => {\n if (this.useNativeDialog && this.open) this.populatePortal();\n });\n this.mo.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n characterData: true,\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.mo?.disconnect();\n this.cancelNativeOpenSchedule();\n this.cancelNativeCloseSchedule();\n this.unlockScroll();\n this.moveNodesBackFromPortal();\n this.teardownPortal();\n }\n\n updated(changed: Map<string, unknown>) {\n if (!this.useNativeDialog) return;\n if (changed.has('open')) {\n if (this.open) {\n this.cancelNativeOpenSchedule();\n this.cancelNativeCloseSchedule();\n this.ensurePortal();\n if (this.portalRoot) {\n this.attachPortalStyles();\n render(this.portalTemplate(), this.portalRoot);\n this.populatePortal();\n }\n if (this.nativeClosing) {\n this.nativeClosing = false;\n }\n this.dispatchEvent(\n new Event('open', { bubbles: true, composed: true })\n );\n this.lockScroll();\n this.nativeShowRaf = requestAnimationFrame(() => {\n this.nativeShowRaf = undefined;\n const dialog = this.nativeDialog;\n if (!this.open || this.nativeClosing || !dialog?.isConnected) return;\n if (!dialog.open) dialog.show();\n // Use a deterministic initial focus target until the consumer's\n // opened handler moves focus to the first meaningful control.\n this.nativeDialogContainer?.focus();\n this.nativeOpenedRaf = requestAnimationFrame(() => {\n this.nativeOpenedRaf = undefined;\n if (!this.open || this.nativeClosing || !dialog.open) {\n return;\n }\n this.dispatchEvent(\n new Event('opened', { bubbles: true, composed: true })\n );\n });\n });\n } else if (changed.get('open') === true || this.portalHost) {\n this.startNativeCloseAnimation();\n }\n }\n }\n\n public dismiss() {\n if (!this.open) return;\n Promise.resolve().then(() => {\n this.requestClose();\n });\n }\n\n private startNativeCloseAnimation() {\n if (this.nativeClosing) return;\n this.cancelNativeOpenSchedule();\n this.nativeClosing = true;\n this.dispatchEvent(new Event('close', { bubbles: true, composed: true }));\n\n const finish = () => {\n this.nativeDialogContainer?.classList.remove('closing');\n this.nativeClosing = false;\n this.nativeDialog?.close();\n this.unlockScroll();\n this.dispatchEvent(\n new Event('closed', { bubbles: true, composed: true })\n );\n this.moveNodesBackFromPortal();\n this.teardownPortal();\n };\n\n const container = this.nativeDialogContainer;\n if (!container) {\n finish();\n return;\n }\n\n container.classList.add('closing');\n\n let done = false;\n const onEnd = (event?: AnimationEvent) => {\n if (event && event.target !== container) return;\n if (done) return;\n done = true;\n container.removeEventListener('animationend', onEnd);\n if (this.nativeCloseFallback !== undefined) {\n window.clearTimeout(this.nativeCloseFallback);\n this.nativeCloseFallback = undefined;\n }\n this.nativeOnEnd = undefined;\n finish();\n };\n this.nativeOnEnd = onEnd;\n container.addEventListener('animationend', onEnd);\n\n // `animationend` does not fire when animation is disabled (for example by\n // reduced-motion styles). Fall back just after the computed animation\n // duration so a custom duration is not truncated.\n const style = getComputedStyle(container);\n const parseTime = (value: string) => {\n const trimmed = value.trim();\n if (trimmed.endsWith('ms')) return Number.parseFloat(trimmed) || 0;\n if (trimmed.endsWith('s'))\n return (Number.parseFloat(trimmed) || 0) * 1000;\n return 0;\n };\n const durations = style.animationDuration.split(',').map(parseTime);\n const delays = style.animationDelay.split(',').map(parseTime);\n const animationMs = durations.reduce(\n (max, duration, index) =>\n Math.max(max, duration + (delays[index % delays.length] ?? 0)),\n 0\n );\n this.nativeCloseFallback = window.setTimeout(\n onEnd,\n animationMs > 0 ? animationMs + 100 : 0\n );\n }\n\n private cancelNativeOpenSchedule() {\n if (this.nativeShowRaf !== undefined) {\n cancelAnimationFrame(this.nativeShowRaf);\n this.nativeShowRaf = undefined;\n }\n if (this.nativeOpenedRaf !== undefined) {\n cancelAnimationFrame(this.nativeOpenedRaf);\n this.nativeOpenedRaf = undefined;\n }\n }\n\n private cancelNativeCloseSchedule() {\n if (this.nativeCloseFallback !== undefined) {\n window.clearTimeout(this.nativeCloseFallback);\n this.nativeCloseFallback = undefined;\n }\n if (this.nativeOnEnd && this.nativeDialogContainer) {\n this.nativeDialogContainer.removeEventListener(\n 'animationend',\n this.nativeOnEnd\n );\n }\n this.nativeOnEnd = undefined;\n this.nativeDialogContainer?.classList.remove('closing');\n }\n\n private ensurePortal() {\n if (this.portalRoot) return;\n const host = document.createElement('ix-dialog-portal-host');\n const root = host.attachShadow({ mode: 'open' });\n if (this.shadowRoot && 'adoptedStyleSheets' in this.shadowRoot) {\n (root as any).adoptedStyleSheets = (\n this.shadowRoot as any\n ).adoptedStyleSheets;\n }\n document.body.appendChild(host);\n this.portalHost = host;\n this.portalRoot = root;\n }\n\n private attachPortalStyles() {\n if (!this.portalRoot || this.portalStyleEl) return;\n const style = document.createElement('style');\n\n const portalLayoutStyles = `\n dialog {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n display: grid;\n place-items: center;\n pointer-events: none;\n z-index: 1000;\n max-width: none !important;\n max-height: none !important;\n }\n dialog:not([open]) {\n display: none;\n }\n .scrim {\n position: fixed;\n inset: 0;\n background: var(--ix-dialog-scrim, rgba(0,0,0,0.5));\n pointer-events: auto;\n z-index: 1000;\n touch-action: none;\n border: 0;\n padding: 0;\n appearance: none;\n }\n .container {\n position: relative;\n border-radius: 0.75rem;\n background: var(--ix-dialog-bg, #fff);\n box-shadow: var(--ix-dialog-shadow, 0 10px 30px rgba(0,0,0,0.25));\n display: grid;\n grid-template-rows: auto 1fr auto;\n overflow: visible;\n pointer-events: auto;\n z-index: 1001;\n max-width: none!important;\n }\n .container .content {\n overflow: visible;\n }\n .scrim:focus:not(:focus-visible) {\n outline: none;\n }\n /* The programmatically focused container is not an interactive control. */\n .container:focus {\n outline: none;\n }\n .container > .headline,\n .container > .content,\n .container > .actions {\n padding: var(--ix-dialog-section-padding, 1rem);\n }\n .container > .actions {\n display: flex;\n gap: var(--ix-dialog-actions-gap, 0.5rem);\n justify-content: flex-end;\n align-items: center;\n padding: 0;\n border-top: 0;\n }\n @keyframes ix-portal-fold-in {\n from { transform: translateY(-0.5rem) scaleY(0.92); opacity: 0; }\n to { transform: translateY(0) scaleY(1); opacity: 1; }\n }\n @keyframes ix-portal-fold-out {\n from { transform: translateY(0) scaleY(1); opacity: 1; }\n to { transform: translateY(-0.5rem) scaleY(0.98); opacity: 0; }\n }\n dialog[open] > .container:not(.closing) {\n transform-origin: top center;\n animation: ix-portal-fold-in var(--ix-dialog-in-dur, 500ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n .container.closing {\n animation: ix-portal-fold-out var(--ix-dialog-out-dur, 250ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n @media (prefers-reduced-motion: reduce) {\n dialog > .container { animation: none !important; }\n }\n `;\n\n if (this.contentStyles) {\n const stylesArray: CSSResultGroup[] = Array.isArray(this.contentStyles)\n ? this.contentStyles\n : [this.contentStyles];\n const customContentStyles = stylesArray\n .map(contentStyle => {\n if (typeof contentStyle === 'object' && 'cssText' in contentStyle) {\n return contentStyle.cssText;\n }\n return '';\n })\n .join('\\n');\n\n style.textContent = customContentStyles + portalLayoutStyles;\n } else {\n style.textContent = portalLayoutStyles;\n }\n\n this.portalRoot.append(style);\n this.portalStyleEl = style;\n }\n\n private teardownPortal() {\n if (!this.portalHost) return;\n if (this.portalRoot) render(nothing, this.portalRoot);\n this.portalStyleEl?.remove();\n this.portalStyleEl = undefined;\n this.portalHost.remove();\n this.portalRoot = undefined;\n this.portalHost = undefined;\n }\n\n private moveNodesToPortal(slotName: string, targetSelector: string) {\n if (!this.nativeDialogContainer) return;\n const target = this.nativeDialogContainer.querySelector(targetSelector);\n if (!target) return;\n const nodes = Array.from(this.children).filter(\n el => el instanceof HTMLElement && el.slot === slotName\n );\n nodes.forEach(n => target.appendChild(n));\n }\n\n private moveNodesBackFromPortal() {\n if (!this.nativeDialogContainer) return;\n const h = this.nativeDialogContainer.querySelector('.headline');\n const b = this.nativeDialogContainer.querySelector('.content');\n const a = this.nativeDialogContainer.querySelector('.actions');\n [h, b, a].forEach(container => {\n if (!container) return;\n const children = Array.from(container.childNodes);\n children.forEach(n => this.appendChild(n));\n });\n }\n\n private populatePortal() {\n this.moveNodesToPortal('headline', '.headline');\n this.moveNodesToPortal('content', '.content');\n this.moveNodesToPortal('actions', '.actions');\n }\n\n private static getComposedParent(node: HTMLElement): HTMLElement | null {\n if (node.assignedSlot) return node.assignedSlot;\n if (node.parentElement) return node.parentElement;\n const { host } = node.getRootNode() as ShadowRoot;\n return host instanceof HTMLElement ? host : null;\n }\n\n private static isHiddenOrDisabled(node: HTMLElement): boolean {\n if (\n node.hasAttribute('disabled') ||\n node.hasAttribute('hidden') ||\n node.hasAttribute('inert') ||\n node.getAttribute('aria-disabled') === 'true' ||\n node.getAttribute('aria-hidden') === 'true' ||\n (\n node as\n | HTMLButtonElement\n | HTMLInputElement\n | HTMLSelectElement\n | HTMLTextAreaElement\n ).disabled\n ) {\n return true;\n }\n\n const style = node.ownerDocument?.defaultView?.getComputedStyle?.(node);\n return !!(\n style &&\n (style.display === 'none' ||\n style.visibility === 'hidden' ||\n style.visibility === 'collapse')\n );\n }\n\n private static isEligibleComposedFocusTarget(target: HTMLElement): boolean {\n if (!target.isConnected) return false;\n\n const seen = new Set<Node>();\n let node: HTMLElement | null = target;\n while (node && !seen.has(node)) {\n seen.add(node);\n if (IxDialog.isHiddenOrDisabled(node)) return false;\n node = IxDialog.getComposedParent(node);\n }\n return true;\n }\n\n private getNativeFocusableElements(): HTMLElement[] {\n const dialog = this.nativeDialog;\n if (!dialog) return [];\n\n const focusable: HTMLElement[] = [];\n const seen = new Set<Node>();\n const visit = (root: Element | ShadowRoot) => {\n if (seen.has(root)) return;\n seen.add(root);\n\n if (\n root instanceof HTMLElement &&\n root.tabIndex >= 0 &&\n IxDialog.isEligibleComposedFocusTarget(root)\n ) {\n focusable.push(root);\n }\n if (root instanceof HTMLSlotElement) {\n // Decide assignment presence on the flattened assigned *nodes* (which\n // include text nodes), not just assigned elements: a slot assigned\n // only text has zero assigned elements but must still suppress its\n // fallback content. Traverse only the element nodes of whichever set\n // is in effect, so text-only assignment keeps non-rendered fallback\n // controls out of the focus order, while genuine fallback (no\n // assignment) and shadow children are still walked.\n const assigned = root.assignedNodes({ flatten: true });\n const nodes =\n assigned.length > 0\n ? assigned.filter(\n (node): node is Element => node instanceof Element\n )\n : Array.from(root.children);\n nodes.forEach(visit);\n return;\n }\n if (root instanceof Element && root.shadowRoot) {\n Array.from(root.shadowRoot.children).forEach(visit);\n return;\n }\n Array.from(root.children).forEach(visit);\n };\n\n Array.from(dialog.children).forEach(visit);\n return focusable;\n }\n\n private onNativeKeydown = (e: KeyboardEvent) => {\n if (e.defaultPrevented) return;\n if (e.key === 'Escape') {\n this.onNativeCancel(e);\n return;\n }\n if (e.key !== 'Tab') return;\n\n const focusable = this.getNativeFocusableElements();\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n if (!first || !last) {\n e.preventDefault();\n return;\n }\n\n const path = Array.from(e.composedPath());\n const inPath = (element: HTMLElement) => path.includes(element);\n if (e.shiftKey) {\n if (inPath(first) || !focusable.some(inPath)) {\n e.preventDefault();\n last.focus();\n }\n } else if (inPath(last)) {\n e.preventDefault();\n first.focus();\n }\n };\n\n private onNativeCancel = (e: Event) => {\n // The component owns the close animation/lifecycle. Suppress the native\n // dialog's immediate default close, then forward exactly one cancel event\n // and update `open` only when cancellation is permitted.\n e.preventDefault();\n if (this.preventCancel) return;\n\n const forwarded = new Event('cancel', {\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n const prevented = !this.dispatchEvent(forwarded);\n if (prevented) return;\n this.requestClose();\n };\n\n private onNativeClose = () => {\n // The native dialog can close itself, such as from a method=\"dialog\"\n // form submission. Synchronize the component state in that case.\n if (this.open) this.requestClose();\n };\n\n private onNativeSubmit = (e: SubmitEvent) => {\n if (e.defaultPrevented) return;\n\n const { target: form, submitter } = e;\n if (!(form instanceof HTMLFormElement)) return;\n\n const isSubmitControl =\n submitter instanceof HTMLButtonElement ||\n submitter instanceof HTMLInputElement;\n const effectiveMethod =\n isSubmitControl && submitter.hasAttribute('formmethod')\n ? submitter.formMethod\n : form.method;\n if (effectiveMethod.toLowerCase() !== 'dialog') return;\n\n // Native method=\"dialog\" submission closes synchronously, before the\n // `close` event. Own that default action so the dialog stays modal and\n // visible while the component's fold-out lifecycle runs. Preserve the\n // native returnValue contract for callers that inspect the chosen action.\n e.preventDefault();\n if (this.nativeDialog) {\n this.nativeDialog.returnValue =\n isSubmitControl && submitter ? submitter.value : '';\n }\n this.requestClose();\n };\n\n private requestClose() {\n this.open = false;\n }\n\n private onScrimClick = () => {\n if (!this.preventCloseOnScrimClick) this.requestClose();\n };\n\n private lockScroll() {\n if (this.isScrollLocked) return;\n this.isScrollLocked = true;\n this.scrollYBackup =\n window.scrollY || document.documentElement.scrollTop || 0;\n const { body } = document;\n const scrollbarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n if (scrollbarWidth > 0) {\n body.style.paddingRight = `${scrollbarWidth}px`;\n }\n body.style.overflow = 'hidden';\n body.style.position = 'fixed';\n body.style.top = `-${this.scrollYBackup}px`;\n body.style.left = '0';\n body.style.right = '0';\n body.style.width = '100%';\n const isInsideNativeDialog = (ev: Event) => {\n const container = this.nativeDialogContainer;\n if (!container) return false;\n return ev\n .composedPath()\n .some(\n entry =>\n entry instanceof Node &&\n (entry === container || container.contains(entry))\n );\n };\n const stopIfOutside = (ev: Event) => {\n if (!this.nativeDialogContainer) return;\n if (!isInsideNativeDialog(ev)) ev.preventDefault();\n };\n const onTouchMove = (e: TouchEvent) => stopIfOutside(e);\n const onKeyDown = (e: KeyboardEvent) => {\n const keys = [\n 'PageUp',\n 'PageDown',\n 'Home',\n 'End',\n 'ArrowUp',\n 'ArrowDown',\n ' ',\n ];\n if (!keys.includes(e.key)) return;\n if (!this.nativeDialogContainer) return;\n if (!isInsideNativeDialog(e)) e.preventDefault();\n };\n window.addEventListener('touchmove', onTouchMove, { passive: false });\n window.addEventListener('keydown', onKeyDown, { passive: false });\n this.removeScrollHandlers = () => {\n window.removeEventListener('touchmove', onTouchMove as any);\n window.removeEventListener('keydown', onKeyDown as any);\n };\n }\n\n private unlockScroll() {\n if (!this.isScrollLocked) return;\n this.isScrollLocked = false;\n if (this.removeScrollHandlers) {\n this.removeScrollHandlers();\n this.removeScrollHandlers = undefined;\n }\n const { body } = document;\n body.style.paddingRight = '';\n body.style.position = '';\n body.style.top = '';\n body.style.left = '';\n body.style.right = '';\n body.style.overflow = '';\n body.style.width = '';\n window.scrollTo(0, this.scrollYBackup || 0);\n }\n\n onOpen() {\n this.dispatchEvent(new Event('open'));\n this.lockScroll();\n }\n\n onOpened() {\n this.dispatchEvent(new Event('opened'));\n }\n\n onClose() {\n // md-dialog can close itself (Escape, backdrop click, or a dialog-method\n // form submission). Keep the public state synchronized so setting `open`\n // to true later is a real transition and can reopen the dialog.\n this.open = false;\n this.dispatchEvent(new Event('close'));\n }\n\n onClosed() {\n this.dispatchEvent(new Event('closed'));\n this.unlockScroll();\n }\n\n onCancel(e: Event) {\n if (this.preventCancel) e.preventDefault();\n this.dispatchEvent(new Event('cancel', { bubbles: true, composed: true }));\n }\n\n private portalTemplate() {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...portalAriaAttributes\n } = this.forwardedAriaAttributes;\n // Modal semantics are owned by this component even though the native\n // dialog intentionally remains outside the browser top layer.\n delete portalAriaAttributes['aria-modal'];\n\n return html`\n <dialog\n ${ref(this.dialogRef)}\n @cancel=${this.onNativeCancel}\n @close=${this.onNativeClose}\n @submit=${this.onNativeSubmit}\n @keydown=${this.onNativeKeydown}\n aria-modal=\"true\"\n aria-label=${ariaLabel || nothing}\n aria-labelledby=${ariaLabel\n ? nothing\n : ariaLabelledBy || (this.hasPortalHeadline ? 'headline' : nothing)}\n ${spread(portalAriaAttributes)}\n >\n <div class=\"scrim\" aria-hidden=\"true\" @click=${this.onScrimClick}></div>\n <div class=\"container\" tabindex=\"-1\" ${ref(this.containerRef)}>\n <div class=\"headline\" id=\"headline\"></div>\n <div class=\"content\"></div>\n <div class=\"actions\"></div>\n </div>\n </dialog>\n `;\n }\n\n private renderMdDialog() {\n if (this.portalHost) {\n this.moveNodesBackFromPortal();\n this.teardownPortal();\n }\n return html`<md-dialog\n ?open=${this.open}\n class=\"dialog\"\n ?preventCloseOnScrimClick=${this.preventCloseOnScrimClick}\n ?disableNextClickIsFromContent=${this.disableNextClickIsFromContent}\n ?allowOverflow=${this.allowOverflow}\n ${spread(this.forwardedAriaAttributes)}\n @open=${this.onOpen}\n @opened=${this.onOpened}\n @close=${this.onClose}\n @closed=${this.onClosed}\n @cancel=${this.onCancel}\n >\n <slot slot=\"headline\" name=\"headline\"></slot>\n <slot slot=\"content\" name=\"content\"></slot>\n <slot slot=\"actions\" name=\"actions\"></slot>\n </md-dialog>`;\n }\n\n private renderNativeDialog() {\n if (this.portalRoot) {\n render(this.portalTemplate(), this.portalRoot);\n this.populatePortal();\n }\n return nothing;\n }\n\n render() {\n return this.useNativeDialog\n ? this.renderNativeDialog()\n : this.renderMdDialog();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IxDialog.js","sourceRoot":"","sources":["../src/IxDialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE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AA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8GF;CACF,CAAC;AAEc,0BAAiB,GAAG;IAClC,GAAG,UAAU,CAAC,iBAAiB;IAC/B,cAAc,EAAE,IAAI;CACrB,CAAC;AAEgB;IAAjB,KAAK,CAAC,SAAS,CAAC;2CAA6B;AAEF;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAc;AAEC;IAAzD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+CACjD;AAEqB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DAAkC;AAEjC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+DAAuC;AAGnE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;iDACnD;AAEK;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CAAuB;AAKvB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAgC;AAElD;IAAR,KAAK,EAAE;+CAA+B","sourcesContent":["import { mixinElementInternals } from '@material/web/labs/behaviors/element-internals.js';\nimport { AriaForwardMixin } from '@digital-realty/ix-shared-fns/aria-forward-mixin.js';\nimport { spread } from '@open-wc/lit-helpers';\nimport { css, CSSResultGroup, html, LitElement, nothing, render } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { createRef, ref, Ref } from 'lit/directives/ref.js';\nimport { Dialog } from './internal/dialog.js';\nimport { IxDialogStyles } from './ix-dialog-styles.js';\nimport './md-dialog.js';\n\nconst ixDialogBaseClass = AriaForwardMixin(mixinElementInternals(LitElement));\n\nexport class IxDialog extends ixDialogBaseClass {\n /** @nocollapse */\n static styles: CSSResultGroup = [\n IxDialogStyles,\n css`\n :host([use-native-dialog]) dialog[open],\n :host([use-native-dialog][closing]) dialog {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n display: block;\n inline-size: 100vw;\n block-size: 100dvh;\n pointer-events: none;\n z-index: 99;\n overscroll-behavior: contain;\n }\n\n :host([use-native-dialog]) dialog[open] .scrim,\n :host([use-native-dialog][closing]) .scrim,\n :host([use-native-dialog]) dialog[open] > .container,\n :host([use-native-dialog][closing]) dialog > .container {\n pointer-events: auto;\n }\n\n :host([use-native-dialog]) dialog[open] .scrim,\n :host([use-native-dialog][closing]) .scrim {\n position: fixed;\n inset: 0;\n background: var(--ix-dialog-scrim, rgba(0, 0, 0, 0.32));\n }\n\n :host([use-native-dialog]) dialog[open] .scrim {\n overscroll-behavior: contain;\n touch-action: none;\n }\n\n :host([use-native-dialog]) dialog[open] > .container,\n :host([use-native-dialog][closing]) dialog > .container {\n transform: translate(-50%, -50%);\n width: auto;\n height: auto;\n max-block-size: var(--ix-dialog-max-height, 90dvh);\n border-radius: 0.75rem;\n background: var(--ix-dialog-bg, #fff);\n box-shadow: var(\n --ix-dialog-shadow,\n 0 0.625rem 1.875rem rgba(0, 0, 0, 0.25)\n );\n display: grid;\n grid-template-rows: auto 1fr auto;\n overflow: hidden;\n z-index: 9;\n transform-origin: top center;\n will-change: transform, opacity;\n }\n\n :host([use-native-dialog]) .headline,\n :host([use-native-dialog]) .content,\n :host([use-native-dialog]) .actions {\n padding: var(--ix-dialog-section-padding, 1rem);\n }\n\n :host([use-native-dialog]) .content {\n overflow: auto;\n }\n\n :host([use-native-dialog]) .actions {\n display: inline-flex;\n gap: var(--ix-dialog-actions-gap, 0.5rem);\n justify-content: flex-end;\n align-items: center;\n padding: 0;\n border-top: 0;\n }\n\n @keyframes ix-fold-in {\n from {\n transform: translate(-50%, -50%) translateY(-0.5rem) scaleY(0.92);\n opacity: 0;\n }\n to {\n transform: translate(-50%, -50%) translateY(0) scaleY(1);\n opacity: 1;\n }\n }\n @keyframes ix-fold-out {\n from {\n transform: translate(-50%, -50%) translateY(0) scaleY(1);\n opacity: 1;\n }\n to {\n transform: translate(-50%, -50%) translateY(-0.5rem) scaleY(0.98);\n opacity: 0;\n }\n }\n\n :host([use-native-dialog]:not([closing])) dialog[open] > .container {\n animation: ix-fold-in var(--ix-dialog-in-dur, 1000ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n :host([use-native-dialog][closing]) dialog > .container {\n animation: ix-fold-out var(--ix-dialog-out-dur, 250ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host([use-native-dialog]) dialog > .container {\n animation: none !important;\n }\n }\n `,\n ];\n\n static override shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n @query('.dialog') readonly component!: Dialog;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, attribute: 'prevent-cancel' }) preventCancel =\n false;\n\n @property({ type: Boolean }) preventCloseOnScrimClick = false;\n\n @property({ type: Boolean }) disableNextClickIsFromContent = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'use-native-dialog' })\n useNativeDialog = false;\n\n @property({ type: Boolean }) allowOverflow = false;\n\n /**\n * Used in conjunction with `useNativeDialog`\n */\n @property({ type: Object }) contentStyles?: CSSResultGroup;\n\n @state() private nativeClosing = false;\n\n private dialogRef: Ref<HTMLDialogElement> = createRef();\n\n private containerRef: Ref<HTMLDivElement> = createRef();\n\n private portalHost?: HTMLElement;\n\n private portalRoot?: ShadowRoot;\n\n private portalStyleEl?: HTMLStyleElement;\n\n private pointerDownInside = false;\n\n private isScrollLocked = false;\n\n private scrollYBackup = 0;\n\n private removeScrollHandlers?: () => void;\n\n private nativeOnEnd?: (event?: AnimationEvent) => void;\n\n private nativeShowRaf?: number;\n\n private nativeOpenedRaf?: number;\n\n private nativeCloseFallback?: number;\n\n private mo?: MutationObserver;\n\n private get forwardedAriaAttributes() {\n const ariaAttributes = { ...this.ariaAttributes };\n for (const attr of Array.from(this.attributes)) {\n if (attr.name.startsWith('aria-')) {\n ariaAttributes[attr.name] = attr.value;\n }\n }\n return ariaAttributes;\n }\n\n private get nativeDialog(): HTMLDialogElement | null {\n return this.dialogRef.value ?? null;\n }\n\n private get nativeDialogContainer(): HTMLDivElement | null {\n return this.containerRef.value ?? null;\n }\n\n private get hasPortalHeadline() {\n return Array.from(this.children).some(\n child => child instanceof HTMLElement && child.slot === 'headline'\n );\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.mo = new MutationObserver(() => {\n if (this.useNativeDialog && this.open) this.populatePortal();\n });\n this.mo.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n characterData: true,\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.mo?.disconnect();\n this.cancelNativeOpenSchedule();\n this.cancelNativeCloseSchedule();\n this.unlockScroll();\n this.moveNodesBackFromPortal();\n this.teardownPortal();\n }\n\n updated(changed: Map<string, unknown>) {\n if (!this.useNativeDialog) return;\n if (changed.has('open')) {\n if (this.open) {\n this.cancelNativeOpenSchedule();\n this.cancelNativeCloseSchedule();\n this.ensurePortal();\n if (this.portalRoot) {\n this.attachPortalStyles();\n render(this.portalTemplate(), this.portalRoot);\n this.populatePortal();\n }\n if (this.nativeClosing) {\n this.nativeClosing = false;\n }\n this.dispatchEvent(\n new Event('open', { bubbles: true, composed: true })\n );\n this.lockScroll();\n this.nativeShowRaf = requestAnimationFrame(() => {\n this.nativeShowRaf = undefined;\n const dialog = this.nativeDialog;\n if (!this.open || this.nativeClosing || !dialog?.isConnected) return;\n if (!dialog.open) dialog.show();\n // Use a deterministic initial focus target until the consumer's\n // opened handler moves focus to the first meaningful control.\n this.nativeDialogContainer?.focus();\n this.nativeOpenedRaf = requestAnimationFrame(() => {\n this.nativeOpenedRaf = undefined;\n if (!this.open || this.nativeClosing || !dialog.open) {\n return;\n }\n this.dispatchEvent(\n new Event('opened', { bubbles: true, composed: true })\n );\n });\n });\n } else if (changed.get('open') === true || this.portalHost) {\n this.startNativeCloseAnimation();\n }\n }\n }\n\n public dismiss() {\n if (!this.open) return;\n Promise.resolve().then(() => {\n this.requestClose();\n });\n }\n\n private startNativeCloseAnimation() {\n if (this.nativeClosing) return;\n this.cancelNativeOpenSchedule();\n this.nativeClosing = true;\n this.dispatchEvent(new Event('close', { bubbles: true, composed: true }));\n\n const finish = () => {\n this.nativeDialogContainer?.classList.remove('closing');\n this.nativeClosing = false;\n this.nativeDialog?.close();\n this.unlockScroll();\n this.dispatchEvent(\n new Event('closed', { bubbles: true, composed: true })\n );\n this.moveNodesBackFromPortal();\n this.teardownPortal();\n };\n\n const container = this.nativeDialogContainer;\n if (!container) {\n finish();\n return;\n }\n\n container.classList.add('closing');\n\n let done = false;\n const onEnd = (event?: AnimationEvent) => {\n if (event && event.target !== container) return;\n if (done) return;\n done = true;\n container.removeEventListener('animationend', onEnd);\n if (this.nativeCloseFallback !== undefined) {\n window.clearTimeout(this.nativeCloseFallback);\n this.nativeCloseFallback = undefined;\n }\n this.nativeOnEnd = undefined;\n finish();\n };\n this.nativeOnEnd = onEnd;\n container.addEventListener('animationend', onEnd);\n\n // `animationend` does not fire when animation is disabled (for example by\n // reduced-motion styles). Fall back just after the computed animation\n // duration so a custom duration is not truncated.\n const style = getComputedStyle(container);\n const parseTime = (value: string) => {\n const trimmed = value.trim();\n if (trimmed.endsWith('ms')) return Number.parseFloat(trimmed) || 0;\n if (trimmed.endsWith('s'))\n return (Number.parseFloat(trimmed) || 0) * 1000;\n return 0;\n };\n const durations = style.animationDuration.split(',').map(parseTime);\n const delays = style.animationDelay.split(',').map(parseTime);\n const animationMs = durations.reduce(\n (max, duration, index) =>\n Math.max(max, duration + (delays[index % delays.length] ?? 0)),\n 0\n );\n this.nativeCloseFallback = window.setTimeout(\n onEnd,\n animationMs > 0 ? animationMs + 100 : 0\n );\n }\n\n private cancelNativeOpenSchedule() {\n if (this.nativeShowRaf !== undefined) {\n cancelAnimationFrame(this.nativeShowRaf);\n this.nativeShowRaf = undefined;\n }\n if (this.nativeOpenedRaf !== undefined) {\n cancelAnimationFrame(this.nativeOpenedRaf);\n this.nativeOpenedRaf = undefined;\n }\n }\n\n private cancelNativeCloseSchedule() {\n if (this.nativeCloseFallback !== undefined) {\n window.clearTimeout(this.nativeCloseFallback);\n this.nativeCloseFallback = undefined;\n }\n if (this.nativeOnEnd && this.nativeDialogContainer) {\n this.nativeDialogContainer.removeEventListener(\n 'animationend',\n this.nativeOnEnd\n );\n }\n this.nativeOnEnd = undefined;\n this.nativeDialogContainer?.classList.remove('closing');\n }\n\n private ensurePortal() {\n if (this.portalRoot) return;\n const host = document.createElement('ix-dialog-portal-host');\n const root = host.attachShadow({ mode: 'open' });\n if (this.shadowRoot && 'adoptedStyleSheets' in this.shadowRoot) {\n (root as any).adoptedStyleSheets = (\n this.shadowRoot as any\n ).adoptedStyleSheets;\n }\n document.body.appendChild(host);\n this.portalHost = host;\n this.portalRoot = root;\n }\n\n private attachPortalStyles() {\n if (!this.portalRoot || this.portalStyleEl) return;\n const style = document.createElement('style');\n\n const portalLayoutStyles = `\n dialog {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n display: grid;\n place-items: center;\n pointer-events: none;\n z-index: 1000;\n max-width: none !important;\n max-height: none !important;\n }\n dialog:not([open]) {\n display: none;\n }\n .scrim {\n position: fixed;\n inset: 0;\n background: var(--ix-dialog-scrim, rgba(0,0,0,0.5));\n pointer-events: auto;\n z-index: 1000;\n touch-action: none;\n border: 0;\n padding: 0;\n appearance: none;\n }\n .container {\n position: relative;\n border-radius: 0.75rem;\n background: var(--ix-dialog-bg, #fff);\n box-shadow: var(--ix-dialog-shadow, 0 10px 30px rgba(0,0,0,0.25));\n display: grid;\n grid-template-rows: auto 1fr auto;\n overflow: visible;\n pointer-events: auto;\n z-index: 1001;\n max-width: none!important;\n }\n .container .content {\n overflow: visible;\n }\n .scrim:focus:not(:focus-visible) {\n outline: none;\n }\n /* The programmatically focused container is not an interactive control. */\n .container:focus {\n outline: none;\n }\n .container > .headline,\n .container > .content,\n .container > .actions {\n padding: var(--ix-dialog-section-padding, 1rem);\n }\n .container > .actions {\n display: flex;\n gap: var(--ix-dialog-actions-gap, 0.5rem);\n justify-content: flex-end;\n align-items: center;\n padding: 0;\n border-top: 0;\n }\n @keyframes ix-portal-fold-in {\n from { transform: translateY(-0.5rem) scaleY(0.92); opacity: 0; }\n to { transform: translateY(0) scaleY(1); opacity: 1; }\n }\n @keyframes ix-portal-fold-out {\n from { transform: translateY(0) scaleY(1); opacity: 1; }\n to { transform: translateY(-0.5rem) scaleY(0.98); opacity: 0; }\n }\n /* 'backwards' (not 'both') so the finished animation does not leave a\n transform on the container. A retained transform, even an identity one,\n turns the container into the containing block for position: fixed\n descendants (e.g. md-menu with menu-positioning=\"fixed\"), which then\n render offset by the container's position and get clipped. */\n dialog[open] > .container:not(.closing) {\n transform-origin: top center;\n animation: ix-portal-fold-in var(--ix-dialog-in-dur, 500ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) backwards;\n }\n .container.closing {\n animation: ix-portal-fold-out var(--ix-dialog-out-dur, 250ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n @media (prefers-reduced-motion: reduce) {\n dialog > .container { animation: none !important; }\n }\n `;\n\n if (this.contentStyles) {\n const stylesArray: CSSResultGroup[] = Array.isArray(this.contentStyles)\n ? this.contentStyles\n : [this.contentStyles];\n const customContentStyles = stylesArray\n .map(contentStyle => {\n if (typeof contentStyle === 'object' && 'cssText' in contentStyle) {\n return contentStyle.cssText;\n }\n return '';\n })\n .join('\\n');\n\n style.textContent = customContentStyles + portalLayoutStyles;\n } else {\n style.textContent = portalLayoutStyles;\n }\n\n this.portalRoot.append(style);\n this.portalStyleEl = style;\n }\n\n private teardownPortal() {\n if (!this.portalHost) return;\n if (this.portalRoot) render(nothing, this.portalRoot);\n this.portalStyleEl?.remove();\n this.portalStyleEl = undefined;\n this.portalHost.remove();\n this.portalRoot = undefined;\n this.portalHost = undefined;\n }\n\n private moveNodesToPortal(slotName: string, targetSelector: string) {\n if (!this.nativeDialogContainer) return;\n const target = this.nativeDialogContainer.querySelector(targetSelector);\n if (!target) return;\n const nodes = Array.from(this.children).filter(\n el => el instanceof HTMLElement && el.slot === slotName\n );\n nodes.forEach(n => target.appendChild(n));\n }\n\n private moveNodesBackFromPortal() {\n if (!this.nativeDialogContainer) return;\n const h = this.nativeDialogContainer.querySelector('.headline');\n const b = this.nativeDialogContainer.querySelector('.content');\n const a = this.nativeDialogContainer.querySelector('.actions');\n [h, b, a].forEach(container => {\n if (!container) return;\n const children = Array.from(container.childNodes);\n children.forEach(n => this.appendChild(n));\n });\n }\n\n private populatePortal() {\n this.moveNodesToPortal('headline', '.headline');\n this.moveNodesToPortal('content', '.content');\n this.moveNodesToPortal('actions', '.actions');\n }\n\n private static getComposedParent(node: HTMLElement): HTMLElement | null {\n if (node.assignedSlot) return node.assignedSlot;\n if (node.parentElement) return node.parentElement;\n const { host } = node.getRootNode() as ShadowRoot;\n return host instanceof HTMLElement ? host : null;\n }\n\n private static isHiddenOrDisabled(node: HTMLElement): boolean {\n if (\n node.hasAttribute('disabled') ||\n node.hasAttribute('hidden') ||\n node.hasAttribute('inert') ||\n node.getAttribute('aria-disabled') === 'true' ||\n node.getAttribute('aria-hidden') === 'true' ||\n (\n node as\n | HTMLButtonElement\n | HTMLInputElement\n | HTMLSelectElement\n | HTMLTextAreaElement\n ).disabled\n ) {\n return true;\n }\n\n const style = node.ownerDocument?.defaultView?.getComputedStyle?.(node);\n return !!(\n style &&\n (style.display === 'none' ||\n style.visibility === 'hidden' ||\n style.visibility === 'collapse')\n );\n }\n\n private static isEligibleComposedFocusTarget(target: HTMLElement): boolean {\n if (!target.isConnected) return false;\n\n const seen = new Set<Node>();\n let node: HTMLElement | null = target;\n while (node && !seen.has(node)) {\n seen.add(node);\n if (IxDialog.isHiddenOrDisabled(node)) return false;\n node = IxDialog.getComposedParent(node);\n }\n return true;\n }\n\n private getNativeFocusableElements(): HTMLElement[] {\n const dialog = this.nativeDialog;\n if (!dialog) return [];\n\n const focusable: HTMLElement[] = [];\n const seen = new Set<Node>();\n const visit = (root: Element | ShadowRoot) => {\n if (seen.has(root)) return;\n seen.add(root);\n\n if (\n root instanceof HTMLElement &&\n root.tabIndex >= 0 &&\n IxDialog.isEligibleComposedFocusTarget(root)\n ) {\n focusable.push(root);\n }\n if (root instanceof HTMLSlotElement) {\n // Decide assignment presence on the flattened assigned *nodes* (which\n // include text nodes), not just assigned elements: a slot assigned\n // only text has zero assigned elements but must still suppress its\n // fallback content. Traverse only the element nodes of whichever set\n // is in effect, so text-only assignment keeps non-rendered fallback\n // controls out of the focus order, while genuine fallback (no\n // assignment) and shadow children are still walked.\n const assigned = root.assignedNodes({ flatten: true });\n const nodes =\n assigned.length > 0\n ? assigned.filter(\n (node): node is Element => node instanceof Element\n )\n : Array.from(root.children);\n nodes.forEach(visit);\n return;\n }\n if (root instanceof Element && root.shadowRoot) {\n Array.from(root.shadowRoot.children).forEach(visit);\n return;\n }\n Array.from(root.children).forEach(visit);\n };\n\n Array.from(dialog.children).forEach(visit);\n return focusable;\n }\n\n private onNativeKeydown = (e: KeyboardEvent) => {\n if (e.defaultPrevented) return;\n if (e.key === 'Escape') {\n this.onNativeCancel(e);\n return;\n }\n if (e.key !== 'Tab') return;\n\n const focusable = this.getNativeFocusableElements();\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n if (!first || !last) {\n e.preventDefault();\n return;\n }\n\n const path = Array.from(e.composedPath());\n const inPath = (element: HTMLElement) => path.includes(element);\n if (e.shiftKey) {\n if (inPath(first) || !focusable.some(inPath)) {\n e.preventDefault();\n last.focus();\n }\n } else if (inPath(last)) {\n e.preventDefault();\n first.focus();\n }\n };\n\n private onNativeCancel = (e: Event) => {\n // The component owns the close animation/lifecycle. Suppress the native\n // dialog's immediate default close, then forward exactly one cancel event\n // and update `open` only when cancellation is permitted.\n e.preventDefault();\n if (this.preventCancel) return;\n\n const forwarded = new Event('cancel', {\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n const prevented = !this.dispatchEvent(forwarded);\n if (prevented) return;\n this.requestClose();\n };\n\n private onNativeClose = () => {\n // The native dialog can close itself, such as from a method=\"dialog\"\n // form submission. Synchronize the component state in that case.\n if (this.open) this.requestClose();\n };\n\n private onNativeSubmit = (e: SubmitEvent) => {\n if (e.defaultPrevented) return;\n\n const { target: form, submitter } = e;\n if (!(form instanceof HTMLFormElement)) return;\n\n const isSubmitControl =\n submitter instanceof HTMLButtonElement ||\n submitter instanceof HTMLInputElement;\n const effectiveMethod =\n isSubmitControl && submitter.hasAttribute('formmethod')\n ? submitter.formMethod\n : form.method;\n if (effectiveMethod.toLowerCase() !== 'dialog') return;\n\n // Native method=\"dialog\" submission closes synchronously, before the\n // `close` event. Own that default action so the dialog stays modal and\n // visible while the component's fold-out lifecycle runs. Preserve the\n // native returnValue contract for callers that inspect the chosen action.\n e.preventDefault();\n if (this.nativeDialog) {\n this.nativeDialog.returnValue =\n isSubmitControl && submitter ? submitter.value : '';\n }\n this.requestClose();\n };\n\n private requestClose() {\n this.open = false;\n }\n\n private onScrimClick = () => {\n if (!this.preventCloseOnScrimClick) this.requestClose();\n };\n\n private lockScroll() {\n if (this.isScrollLocked) return;\n this.isScrollLocked = true;\n this.scrollYBackup =\n window.scrollY || document.documentElement.scrollTop || 0;\n const { body } = document;\n const scrollbarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n if (scrollbarWidth > 0) {\n body.style.paddingRight = `${scrollbarWidth}px`;\n }\n body.style.overflow = 'hidden';\n body.style.position = 'fixed';\n body.style.top = `-${this.scrollYBackup}px`;\n body.style.left = '0';\n body.style.right = '0';\n body.style.width = '100%';\n const isInsideNativeDialog = (ev: Event) => {\n const container = this.nativeDialogContainer;\n if (!container) return false;\n return ev\n .composedPath()\n .some(\n entry =>\n entry instanceof Node &&\n (entry === container || container.contains(entry))\n );\n };\n const stopIfOutside = (ev: Event) => {\n if (!this.nativeDialogContainer) return;\n if (!isInsideNativeDialog(ev)) ev.preventDefault();\n };\n const onTouchMove = (e: TouchEvent) => stopIfOutside(e);\n const onKeyDown = (e: KeyboardEvent) => {\n const keys = [\n 'PageUp',\n 'PageDown',\n 'Home',\n 'End',\n 'ArrowUp',\n 'ArrowDown',\n ' ',\n ];\n if (!keys.includes(e.key)) return;\n if (!this.nativeDialogContainer) return;\n if (!isInsideNativeDialog(e)) e.preventDefault();\n };\n window.addEventListener('touchmove', onTouchMove, { passive: false });\n window.addEventListener('keydown', onKeyDown, { passive: false });\n this.removeScrollHandlers = () => {\n window.removeEventListener('touchmove', onTouchMove as any);\n window.removeEventListener('keydown', onKeyDown as any);\n };\n }\n\n private unlockScroll() {\n if (!this.isScrollLocked) return;\n this.isScrollLocked = false;\n if (this.removeScrollHandlers) {\n this.removeScrollHandlers();\n this.removeScrollHandlers = undefined;\n }\n const { body } = document;\n body.style.paddingRight = '';\n body.style.position = '';\n body.style.top = '';\n body.style.left = '';\n body.style.right = '';\n body.style.overflow = '';\n body.style.width = '';\n window.scrollTo(0, this.scrollYBackup || 0);\n }\n\n onOpen() {\n this.dispatchEvent(new Event('open'));\n this.lockScroll();\n }\n\n onOpened() {\n this.dispatchEvent(new Event('opened'));\n }\n\n onClose() {\n // md-dialog can close itself (Escape, backdrop click, or a dialog-method\n // form submission). Keep the public state synchronized so setting `open`\n // to true later is a real transition and can reopen the dialog.\n this.open = false;\n this.dispatchEvent(new Event('close'));\n }\n\n onClosed() {\n this.dispatchEvent(new Event('closed'));\n this.unlockScroll();\n }\n\n onCancel(e: Event) {\n if (this.preventCancel) e.preventDefault();\n this.dispatchEvent(new Event('cancel', { bubbles: true, composed: true }));\n }\n\n private portalTemplate() {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...portalAriaAttributes\n } = this.forwardedAriaAttributes;\n // Modal semantics are owned by this component even though the native\n // dialog intentionally remains outside the browser top layer.\n delete portalAriaAttributes['aria-modal'];\n\n return html`\n <dialog\n ${ref(this.dialogRef)}\n @cancel=${this.onNativeCancel}\n @close=${this.onNativeClose}\n @submit=${this.onNativeSubmit}\n @keydown=${this.onNativeKeydown}\n aria-modal=\"true\"\n aria-label=${ariaLabel || nothing}\n aria-labelledby=${ariaLabel\n ? nothing\n : ariaLabelledBy || (this.hasPortalHeadline ? 'headline' : nothing)}\n ${spread(portalAriaAttributes)}\n >\n <div class=\"scrim\" aria-hidden=\"true\" @click=${this.onScrimClick}></div>\n <div class=\"container\" tabindex=\"-1\" ${ref(this.containerRef)}>\n <div class=\"headline\" id=\"headline\"></div>\n <div class=\"content\"></div>\n <div class=\"actions\"></div>\n </div>\n </dialog>\n `;\n }\n\n private renderMdDialog() {\n if (this.portalHost) {\n this.moveNodesBackFromPortal();\n this.teardownPortal();\n }\n return html`<md-dialog\n ?open=${this.open}\n class=\"dialog\"\n ?preventCloseOnScrimClick=${this.preventCloseOnScrimClick}\n ?disableNextClickIsFromContent=${this.disableNextClickIsFromContent}\n ?allowOverflow=${this.allowOverflow}\n ${spread(this.forwardedAriaAttributes)}\n @open=${this.onOpen}\n @opened=${this.onOpened}\n @close=${this.onClose}\n @closed=${this.onClosed}\n @cancel=${this.onCancel}\n >\n <slot slot=\"headline\" name=\"headline\"></slot>\n <slot slot=\"content\" name=\"content\"></slot>\n <slot slot=\"actions\" name=\"actions\"></slot>\n </md-dialog>`;\n }\n\n private renderNativeDialog() {\n if (this.portalRoot) {\n render(this.portalTemplate(), this.portalRoot);\n this.populatePortal();\n }\n return nothing;\n }\n\n render() {\n return this.useNativeDialog\n ? this.renderNativeDialog()\n : this.renderMdDialog();\n }\n}\n"]}
|
package/dist/ix-dialog.min.js
CHANGED
|
@@ -100,7 +100,7 @@ import{css as e,LitElement as t,isServer as i,html as o,nothing as n,render as a
|
|
|
100
100
|
</div>
|
|
101
101
|
${i?a:n}
|
|
102
102
|
</dialog>
|
|
103
|
-
`}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent)return void(this.nextClickIsFromContent=!1);!this.dispatchEvent(new Event("cancel",{cancelable:!0}))||this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){var t;const i=e.target,{submitter:o}=e;"dialog"===i.getAttribute("method")&&o&&this.close(null!==(t=o.getAttribute("value"))&&void 0!==t?t:this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const t=!f(this,e);e.preventDefault(),t||this.close()}handleClose(){var e;this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,null===(e=this.dialog)||void 0===e||e.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){"Escape"===e.key&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){var t;if(null===(t=this.cancelAnimations)||void 0===t||t.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:i,scrim:o,container:n,headline:a,content:s,actions:r}=this;if(!(i&&o&&n&&a&&s&&r))return;const{container:l,dialog:d,scrim:c,headline:h,content:p,actions:v}=e,m=[[i,null!=d?d:[]],[o,null!=c?c:[]],[n,null!=l?l:[]],[a,null!=h?h:[]],[s,null!=p?p:[]],[r,null!=v?v:[]]],u=[];for(const[e,t]of m)for(const i of t){const t=e.animate(...i);this.cancelAnimations.signal.addEventListener("abort",()=>{t.cancel()}),u.push(t)}await Promise.all(u.map(e=>e.finished.catch(()=>{})))}handleHeadlineChange(e){const t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){const t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements().length>0}handleAnchorIntersection(e){const{target:t,isIntersecting:i}=e;t===this.topAnchor&&(this.isAtScrollTop=i),t===this.bottomAnchor&&(this.isAtScrollBottom=i)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){var t;const[i,o]=this.getFirstAndLastFocusableChildren();if(!i||!o)return void(null===(t=this.dialog)||void 0===t||t.focus());const n=e.target===this.firstFocusTrap,a=!n,s=e.relatedTarget===i,r=e.relatedTarget===o,l=!s&&!r;if(a&&r||n&&l)return void i.focus();(n&&s||a&&l)&&o.focus()}getFirstAndLastFocusableChildren(){const e=this.getFocusableChildren(),t=e[0],i=e[e.length-1];return t&&i?[t,i]:[null,null]}getFocusableChildren(){const e=[],t=new Set,i=o=>{if(t.has(o))return;t.add(o);const n=o instanceof HTMLElement&&function(e){var t,i;const o=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",n=":not(:disabled,[disabled])",a=':not([tabindex^="-"])';if(e.matches(o+n+a))return!0;if(!e.localName.includes("-"))return!1;if(!e.matches(n))return!1;return null!==(i=null===(t=e.shadowRoot)||void 0===t?void 0:t.delegatesFocus)&&void 0!==i&&i}(o);if(n&&e.push(o),o instanceof HTMLSlotElement){const e=o.assignedElements({flatten:!0});if(e.length)return void e.forEach(i)}o instanceof Element&&o.shadowRoot&&!o.shadowRoot.delegatesFocus&&Array.from(o.shadowRoot.children).forEach(i),Array.from(o.children).forEach(i)};return Array.from(this.children).forEach(i),e}}s([c({type:Boolean})],C.prototype,"open",null),s([c({type:Boolean})],C.prototype,"quick",void 0),s([c({attribute:!1})],C.prototype,"returnValue",void 0),s([c()],C.prototype,"type",void 0),s([c({type:Boolean,attribute:"no-focus-trap"})],C.prototype,"noFocusTrap",void 0),s([c({type:Boolean})],C.prototype,"allowOverflow",void 0),s([h("dialog")],C.prototype,"dialog",void 0),s([h(".scrim")],C.prototype,"scrim",void 0),s([h(".container")],C.prototype,"container",void 0),s([h(".headline")],C.prototype,"headline",void 0),s([h(".content")],C.prototype,"content",void 0),s([h(".actions")],C.prototype,"actions",void 0),s([p()],C.prototype,"isAtScrollTop",void 0),s([p()],C.prototype,"isAtScrollBottom",void 0),s([h(".scroller")],C.prototype,"scroller",void 0),s([h(".top.anchor")],C.prototype,"topAnchor",void 0),s([h(".bottom.anchor")],C.prototype,"bottomAnchor",void 0),s([h(".focus-trap")],C.prototype,"firstFocusTrap",void 0),s([p()],C.prototype,"hasHeadline",void 0),s([p()],C.prototype,"hasActions",void 0),s([p()],C.prototype,"hasIcon",void 0);const
|
|
103
|
+
`}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent)return void(this.nextClickIsFromContent=!1);!this.dispatchEvent(new Event("cancel",{cancelable:!0}))||this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){var t;const i=e.target,{submitter:o}=e;"dialog"===i.getAttribute("method")&&o&&this.close(null!==(t=o.getAttribute("value"))&&void 0!==t?t:this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const t=!f(this,e);e.preventDefault(),t||this.close()}handleClose(){var e;this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,null===(e=this.dialog)||void 0===e||e.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){"Escape"===e.key&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){var t;if(null===(t=this.cancelAnimations)||void 0===t||t.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:i,scrim:o,container:n,headline:a,content:s,actions:r}=this;if(!(i&&o&&n&&a&&s&&r))return;const{container:l,dialog:d,scrim:c,headline:h,content:p,actions:v}=e,m=[[i,null!=d?d:[]],[o,null!=c?c:[]],[n,null!=l?l:[]],[a,null!=h?h:[]],[s,null!=p?p:[]],[r,null!=v?v:[]]],u=[];for(const[e,t]of m)for(const i of t){const t=e.animate(...i);this.cancelAnimations.signal.addEventListener("abort",()=>{t.cancel()}),u.push(t)}await Promise.all(u.map(e=>e.finished.catch(()=>{})))}handleHeadlineChange(e){const t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){const t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements().length>0}handleAnchorIntersection(e){const{target:t,isIntersecting:i}=e;t===this.topAnchor&&(this.isAtScrollTop=i),t===this.bottomAnchor&&(this.isAtScrollBottom=i)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){var t;const[i,o]=this.getFirstAndLastFocusableChildren();if(!i||!o)return void(null===(t=this.dialog)||void 0===t||t.focus());const n=e.target===this.firstFocusTrap,a=!n,s=e.relatedTarget===i,r=e.relatedTarget===o,l=!s&&!r;if(a&&r||n&&l)return void i.focus();(n&&s||a&&l)&&o.focus()}getFirstAndLastFocusableChildren(){const e=this.getFocusableChildren(),t=e[0],i=e[e.length-1];return t&&i?[t,i]:[null,null]}getFocusableChildren(){const e=[],t=new Set,i=o=>{if(t.has(o))return;t.add(o);const n=o instanceof HTMLElement&&function(e){var t,i;const o=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",n=":not(:disabled,[disabled])",a=':not([tabindex^="-"])';if(e.matches(o+n+a))return!0;if(!e.localName.includes("-"))return!1;if(!e.matches(n))return!1;return null!==(i=null===(t=e.shadowRoot)||void 0===t?void 0:t.delegatesFocus)&&void 0!==i&&i}(o);if(n&&e.push(o),o instanceof HTMLSlotElement){const e=o.assignedElements({flatten:!0});if(e.length)return void e.forEach(i)}o instanceof Element&&o.shadowRoot&&!o.shadowRoot.delegatesFocus&&Array.from(o.shadowRoot.children).forEach(i),Array.from(o.children).forEach(i)};return Array.from(this.children).forEach(i),e}}s([c({type:Boolean})],C.prototype,"open",null),s([c({type:Boolean})],C.prototype,"quick",void 0),s([c({attribute:!1})],C.prototype,"returnValue",void 0),s([c()],C.prototype,"type",void 0),s([c({type:Boolean,attribute:"no-focus-trap"})],C.prototype,"noFocusTrap",void 0),s([c({type:Boolean})],C.prototype,"allowOverflow",void 0),s([h("dialog")],C.prototype,"dialog",void 0),s([h(".scrim")],C.prototype,"scrim",void 0),s([h(".container")],C.prototype,"container",void 0),s([h(".headline")],C.prototype,"headline",void 0),s([h(".content")],C.prototype,"content",void 0),s([h(".actions")],C.prototype,"actions",void 0),s([p()],C.prototype,"isAtScrollTop",void 0),s([p()],C.prototype,"isAtScrollBottom",void 0),s([h(".scroller")],C.prototype,"scroller",void 0),s([h(".top.anchor")],C.prototype,"topAnchor",void 0),s([h(".bottom.anchor")],C.prototype,"bottomAnchor",void 0),s([h(".focus-trap")],C.prototype,"firstFocusTrap",void 0),s([p()],C.prototype,"hasHeadline",void 0),s([p()],C.prototype,"hasActions",void 0),s([p()],C.prototype,"hasIcon",void 0);const k=e`
|
|
104
104
|
:host {
|
|
105
105
|
border-start-start-radius: var(
|
|
106
106
|
--md-dialog-container-shape-start-start,
|
|
@@ -345,7 +345,7 @@ import{css as e,LitElement as t,isServer as i,html as o,nothing as n,render as a
|
|
|
345
345
|
outline: 2px solid WindowText;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
`;class k extends C{}k.styles=[E],window.customElements.define("md-dialog",k);const S=l(r(t));class A extends S{constructor(){super(...arguments),this.open=!1,this.preventCancel=!1,this.preventCloseOnScrimClick=!1,this.disableNextClickIsFromContent=!1,this.useNativeDialog=!1,this.allowOverflow=!1,this.nativeClosing=!1,this.dialogRef=v(),this.containerRef=v(),this.pointerDownInside=!1,this.isScrollLocked=!1,this.scrollYBackup=0,this.onNativeKeydown=e=>{if(e.defaultPrevented)return;if("Escape"===e.key)return void this.onNativeCancel(e);if("Tab"!==e.key)return;const t=this.getNativeFocusableElements(),i=t[0],o=t[t.length-1];if(!i||!o)return void e.preventDefault();const n=Array.from(e.composedPath()),a=e=>n.includes(e);e.shiftKey?!a(i)&&t.some(a)||(e.preventDefault(),o.focus()):a(o)&&(e.preventDefault(),i.focus())},this.onNativeCancel=e=>{if(e.preventDefault(),this.preventCancel)return;const t=new Event("cancel",{bubbles:!0,composed:!0,cancelable:!0});!this.dispatchEvent(t)||this.requestClose()},this.onNativeClose=()=>{this.open&&this.requestClose()},this.onNativeSubmit=e=>{if(e.defaultPrevented)return;const{target:t,submitter:i}=e;if(!(t instanceof HTMLFormElement))return;const o=i instanceof HTMLButtonElement||i instanceof HTMLInputElement;"dialog"===(o&&i.hasAttribute("formmethod")?i.formMethod:t.method).toLowerCase()&&(e.preventDefault(),this.nativeDialog&&(this.nativeDialog.returnValue=o&&i?i.value:""),this.requestClose())},this.onScrimClick=()=>{this.preventCloseOnScrimClick||this.requestClose()}}get forwardedAriaAttributes(){const e={...this.ariaAttributes};for(const t of Array.from(this.attributes))t.name.startsWith("aria-")&&(e[t.name]=t.value);return e}get nativeDialog(){var e;return null!==(e=this.dialogRef.value)&&void 0!==e?e:null}get nativeDialogContainer(){var e;return null!==(e=this.containerRef.value)&&void 0!==e?e:null}get hasPortalHeadline(){return Array.from(this.children).some(e=>e instanceof HTMLElement&&"headline"===e.slot)}connectedCallback(){super.connectedCallback(),this.mo=new MutationObserver(()=>{this.useNativeDialog&&this.open&&this.populatePortal()}),this.mo.observe(this,{childList:!0,subtree:!0,attributes:!0,characterData:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.mo)||void 0===e||e.disconnect(),this.cancelNativeOpenSchedule(),this.cancelNativeCloseSchedule(),this.unlockScroll(),this.moveNodesBackFromPortal(),this.teardownPortal()}updated(e){this.useNativeDialog&&e.has("open")&&(this.open?(this.cancelNativeOpenSchedule(),this.cancelNativeCloseSchedule(),this.ensurePortal(),this.portalRoot&&(this.attachPortalStyles(),a(this.portalTemplate(),this.portalRoot),this.populatePortal()),this.nativeClosing&&(this.nativeClosing=!1),this.dispatchEvent(new Event("open",{bubbles:!0,composed:!0})),this.lockScroll(),this.nativeShowRaf=requestAnimationFrame(()=>{var e;this.nativeShowRaf=void 0;const t=this.nativeDialog;this.open&&!this.nativeClosing&&(null==t?void 0:t.isConnected)&&(t.open||t.show(),null===(e=this.nativeDialogContainer)||void 0===e||e.focus(),this.nativeOpenedRaf=requestAnimationFrame(()=>{this.nativeOpenedRaf=void 0,this.open&&!this.nativeClosing&&t.open&&this.dispatchEvent(new Event("opened",{bubbles:!0,composed:!0}))}))})):(!0===e.get("open")||this.portalHost)&&this.startNativeCloseAnimation())}dismiss(){this.open&&Promise.resolve().then(()=>{this.requestClose()})}startNativeCloseAnimation(){if(this.nativeClosing)return;this.cancelNativeOpenSchedule(),this.nativeClosing=!0,this.dispatchEvent(new Event("close",{bubbles:!0,composed:!0}));const e=()=>{var e,t;null===(e=this.nativeDialogContainer)||void 0===e||e.classList.remove("closing"),this.nativeClosing=!1,null===(t=this.nativeDialog)||void 0===t||t.close(),this.unlockScroll(),this.dispatchEvent(new Event("closed",{bubbles:!0,composed:!0})),this.moveNodesBackFromPortal(),this.teardownPortal()},t=this.nativeDialogContainer;if(!t)return void e();t.classList.add("closing");let i=!1;const o=n=>{n&&n.target!==t||i||(i=!0,t.removeEventListener("animationend",o),void 0!==this.nativeCloseFallback&&(window.clearTimeout(this.nativeCloseFallback),this.nativeCloseFallback=void 0),this.nativeOnEnd=void 0,e())};this.nativeOnEnd=o,t.addEventListener("animationend",o);const n=getComputedStyle(t),a=e=>{const t=e.trim();return t.endsWith("ms")?Number.parseFloat(t)||0:t.endsWith("s")?1e3*(Number.parseFloat(t)||0):0},s=n.animationDuration.split(",").map(a),r=n.animationDelay.split(",").map(a),l=s.reduce((e,t,i)=>{var o;return Math.max(e,t+(null!==(o=r[i%r.length])&&void 0!==o?o:0))},0);this.nativeCloseFallback=window.setTimeout(o,l>0?l+100:0)}cancelNativeOpenSchedule(){void 0!==this.nativeShowRaf&&(cancelAnimationFrame(this.nativeShowRaf),this.nativeShowRaf=void 0),void 0!==this.nativeOpenedRaf&&(cancelAnimationFrame(this.nativeOpenedRaf),this.nativeOpenedRaf=void 0)}cancelNativeCloseSchedule(){var e;void 0!==this.nativeCloseFallback&&(window.clearTimeout(this.nativeCloseFallback),this.nativeCloseFallback=void 0),this.nativeOnEnd&&this.nativeDialogContainer&&this.nativeDialogContainer.removeEventListener("animationend",this.nativeOnEnd),this.nativeOnEnd=void 0,null===(e=this.nativeDialogContainer)||void 0===e||e.classList.remove("closing")}ensurePortal(){if(this.portalRoot)return;const e=document.createElement("ix-dialog-portal-host"),t=e.attachShadow({mode:"open"});this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot&&(t.adoptedStyleSheets=this.shadowRoot.adoptedStyleSheets),document.body.appendChild(e),this.portalHost=e,this.portalRoot=t}attachPortalStyles(){if(!this.portalRoot||this.portalStyleEl)return;const e=document.createElement("style"),t="\n dialog {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n display: grid;\n place-items: center;\n pointer-events: none;\n z-index: 1000;\n max-width: none !important;\n max-height: none !important;\n }\n dialog:not([open]) {\n display: none;\n }\n .scrim {\n position: fixed;\n inset: 0;\n background: var(--ix-dialog-scrim, rgba(0,0,0,0.5));\n pointer-events: auto;\n z-index: 1000;\n touch-action: none;\n border: 0;\n padding: 0;\n appearance: none;\n }\n .container {\n position: relative;\n border-radius: 0.75rem;\n background: var(--ix-dialog-bg, #fff);\n box-shadow: var(--ix-dialog-shadow, 0 10px 30px rgba(0,0,0,0.25));\n display: grid;\n grid-template-rows: auto 1fr auto;\n overflow: visible;\n pointer-events: auto;\n z-index: 1001;\n max-width: none!important;\n }\n .container .content {\n overflow: visible;\n }\n .scrim:focus:not(:focus-visible) {\n outline: none;\n }\n /* The programmatically focused container is not an interactive control. */\n .container:focus {\n outline: none;\n }\n .container > .headline,\n .container > .content,\n .container > .actions {\n padding: var(--ix-dialog-section-padding, 1rem);\n }\n .container > .actions {\n display: flex;\n gap: var(--ix-dialog-actions-gap, 0.5rem);\n justify-content: flex-end;\n align-items: center;\n padding: 0;\n border-top: 0;\n }\n @keyframes ix-portal-fold-in {\n from { transform: translateY(-0.5rem) scaleY(0.92); opacity: 0; }\n to { transform: translateY(0) scaleY(1); opacity: 1; }\n }\n @keyframes ix-portal-fold-out {\n from { transform: translateY(0) scaleY(1); opacity: 1; }\n to { transform: translateY(-0.5rem) scaleY(0.98); opacity: 0; }\n }\n dialog[open] > .container:not(.closing) {\n transform-origin: top center;\n animation: ix-portal-fold-in var(--ix-dialog-in-dur, 500ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n .container.closing {\n animation: ix-portal-fold-out var(--ix-dialog-out-dur, 250ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n @media (prefers-reduced-motion: reduce) {\n dialog > .container { animation: none !important; }\n }\n ";if(this.contentStyles){const i=(Array.isArray(this.contentStyles)?this.contentStyles:[this.contentStyles]).map(e=>"object"==typeof e&&"cssText"in e?e.cssText:"").join("\n");e.textContent=i+t}else e.textContent=t;this.portalRoot.append(e),this.portalStyleEl=e}teardownPortal(){var e;this.portalHost&&(this.portalRoot&&a(n,this.portalRoot),null===(e=this.portalStyleEl)||void 0===e||e.remove(),this.portalStyleEl=void 0,this.portalHost.remove(),this.portalRoot=void 0,this.portalHost=void 0)}moveNodesToPortal(e,t){if(!this.nativeDialogContainer)return;const i=this.nativeDialogContainer.querySelector(t);if(!i)return;Array.from(this.children).filter(t=>t instanceof HTMLElement&&t.slot===e).forEach(e=>i.appendChild(e))}moveNodesBackFromPortal(){if(!this.nativeDialogContainer)return;[this.nativeDialogContainer.querySelector(".headline"),this.nativeDialogContainer.querySelector(".content"),this.nativeDialogContainer.querySelector(".actions")].forEach(e=>{if(!e)return;Array.from(e.childNodes).forEach(e=>this.appendChild(e))})}populatePortal(){this.moveNodesToPortal("headline",".headline"),this.moveNodesToPortal("content",".content"),this.moveNodesToPortal("actions",".actions")}static getComposedParent(e){if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;const{host:t}=e.getRootNode();return t instanceof HTMLElement?t:null}static isHiddenOrDisabled(e){var t,i,o;if(e.hasAttribute("disabled")||e.hasAttribute("hidden")||e.hasAttribute("inert")||"true"===e.getAttribute("aria-disabled")||"true"===e.getAttribute("aria-hidden")||e.disabled)return!0;const n=null===(o=null===(i=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===i?void 0:i.getComputedStyle)||void 0===o?void 0:o.call(i,e);return!(!n||"none"!==n.display&&"hidden"!==n.visibility&&"collapse"!==n.visibility)}static isEligibleComposedFocusTarget(e){if(!e.isConnected)return!1;const t=new Set;let i=e;for(;i&&!t.has(i);){if(t.add(i),A.isHiddenOrDisabled(i))return!1;i=A.getComposedParent(i)}return!0}getNativeFocusableElements(){const e=this.nativeDialog;if(!e)return[];const t=[],i=new Set,o=e=>{if(!i.has(e)){if(i.add(e),e instanceof HTMLElement&&e.tabIndex>=0&&A.isEligibleComposedFocusTarget(e)&&t.push(e),e instanceof HTMLSlotElement){const t=e.assignedNodes({flatten:!0});return void(t.length>0?t.filter(e=>e instanceof Element):Array.from(e.children)).forEach(o)}e instanceof Element&&e.shadowRoot?Array.from(e.shadowRoot.children).forEach(o):Array.from(e.children).forEach(o)}};return Array.from(e.children).forEach(o),t}requestClose(){this.open=!1}lockScroll(){if(this.isScrollLocked)return;this.isScrollLocked=!0,this.scrollYBackup=window.scrollY||document.documentElement.scrollTop||0;const{body:e}=document,t=window.innerWidth-document.documentElement.clientWidth;t>0&&(e.style.paddingRight=`${t}px`),e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${this.scrollYBackup}px`,e.style.left="0",e.style.right="0",e.style.width="100%";const i=e=>{const t=this.nativeDialogContainer;return!!t&&e.composedPath().some(e=>e instanceof Node&&(e===t||t.contains(e)))},o=e=>{this.nativeDialogContainer&&(i(e)||e.preventDefault())},n=e=>o(e),a=e=>{["PageUp","PageDown","Home","End","ArrowUp","ArrowDown"," "].includes(e.key)&&this.nativeDialogContainer&&(i(e)||e.preventDefault())};window.addEventListener("touchmove",n,{passive:!1}),window.addEventListener("keydown",a,{passive:!1}),this.removeScrollHandlers=()=>{window.removeEventListener("touchmove",n),window.removeEventListener("keydown",a)}}unlockScroll(){if(!this.isScrollLocked)return;this.isScrollLocked=!1,this.removeScrollHandlers&&(this.removeScrollHandlers(),this.removeScrollHandlers=void 0);const{body:e}=document;e.style.paddingRight="",e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.overflow="",e.style.width="",window.scrollTo(0,this.scrollYBackup||0)}onOpen(){this.dispatchEvent(new Event("open")),this.lockScroll()}onOpened(){this.dispatchEvent(new Event("opened"))}onClose(){this.open=!1,this.dispatchEvent(new Event("close"))}onClosed(){this.dispatchEvent(new Event("closed")),this.unlockScroll()}onCancel(e){this.preventCancel&&e.preventDefault(),this.dispatchEvent(new Event("cancel",{bubbles:!0,composed:!0}))}portalTemplate(){const{"aria-label":e,"aria-labelledby":t,...i}=this.forwardedAriaAttributes;return delete i["aria-modal"],o`
|
|
348
|
+
`;class E extends C{}E.styles=[k],window.customElements.define("md-dialog",E);const S=l(r(t));class A extends S{constructor(){super(...arguments),this.open=!1,this.preventCancel=!1,this.preventCloseOnScrimClick=!1,this.disableNextClickIsFromContent=!1,this.useNativeDialog=!1,this.allowOverflow=!1,this.nativeClosing=!1,this.dialogRef=v(),this.containerRef=v(),this.pointerDownInside=!1,this.isScrollLocked=!1,this.scrollYBackup=0,this.onNativeKeydown=e=>{if(e.defaultPrevented)return;if("Escape"===e.key)return void this.onNativeCancel(e);if("Tab"!==e.key)return;const t=this.getNativeFocusableElements(),i=t[0],o=t[t.length-1];if(!i||!o)return void e.preventDefault();const n=Array.from(e.composedPath()),a=e=>n.includes(e);e.shiftKey?!a(i)&&t.some(a)||(e.preventDefault(),o.focus()):a(o)&&(e.preventDefault(),i.focus())},this.onNativeCancel=e=>{if(e.preventDefault(),this.preventCancel)return;const t=new Event("cancel",{bubbles:!0,composed:!0,cancelable:!0});!this.dispatchEvent(t)||this.requestClose()},this.onNativeClose=()=>{this.open&&this.requestClose()},this.onNativeSubmit=e=>{if(e.defaultPrevented)return;const{target:t,submitter:i}=e;if(!(t instanceof HTMLFormElement))return;const o=i instanceof HTMLButtonElement||i instanceof HTMLInputElement;"dialog"===(o&&i.hasAttribute("formmethod")?i.formMethod:t.method).toLowerCase()&&(e.preventDefault(),this.nativeDialog&&(this.nativeDialog.returnValue=o&&i?i.value:""),this.requestClose())},this.onScrimClick=()=>{this.preventCloseOnScrimClick||this.requestClose()}}get forwardedAriaAttributes(){const e={...this.ariaAttributes};for(const t of Array.from(this.attributes))t.name.startsWith("aria-")&&(e[t.name]=t.value);return e}get nativeDialog(){var e;return null!==(e=this.dialogRef.value)&&void 0!==e?e:null}get nativeDialogContainer(){var e;return null!==(e=this.containerRef.value)&&void 0!==e?e:null}get hasPortalHeadline(){return Array.from(this.children).some(e=>e instanceof HTMLElement&&"headline"===e.slot)}connectedCallback(){super.connectedCallback(),this.mo=new MutationObserver(()=>{this.useNativeDialog&&this.open&&this.populatePortal()}),this.mo.observe(this,{childList:!0,subtree:!0,attributes:!0,characterData:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.mo)||void 0===e||e.disconnect(),this.cancelNativeOpenSchedule(),this.cancelNativeCloseSchedule(),this.unlockScroll(),this.moveNodesBackFromPortal(),this.teardownPortal()}updated(e){this.useNativeDialog&&e.has("open")&&(this.open?(this.cancelNativeOpenSchedule(),this.cancelNativeCloseSchedule(),this.ensurePortal(),this.portalRoot&&(this.attachPortalStyles(),a(this.portalTemplate(),this.portalRoot),this.populatePortal()),this.nativeClosing&&(this.nativeClosing=!1),this.dispatchEvent(new Event("open",{bubbles:!0,composed:!0})),this.lockScroll(),this.nativeShowRaf=requestAnimationFrame(()=>{var e;this.nativeShowRaf=void 0;const t=this.nativeDialog;this.open&&!this.nativeClosing&&(null==t?void 0:t.isConnected)&&(t.open||t.show(),null===(e=this.nativeDialogContainer)||void 0===e||e.focus(),this.nativeOpenedRaf=requestAnimationFrame(()=>{this.nativeOpenedRaf=void 0,this.open&&!this.nativeClosing&&t.open&&this.dispatchEvent(new Event("opened",{bubbles:!0,composed:!0}))}))})):(!0===e.get("open")||this.portalHost)&&this.startNativeCloseAnimation())}dismiss(){this.open&&Promise.resolve().then(()=>{this.requestClose()})}startNativeCloseAnimation(){if(this.nativeClosing)return;this.cancelNativeOpenSchedule(),this.nativeClosing=!0,this.dispatchEvent(new Event("close",{bubbles:!0,composed:!0}));const e=()=>{var e,t;null===(e=this.nativeDialogContainer)||void 0===e||e.classList.remove("closing"),this.nativeClosing=!1,null===(t=this.nativeDialog)||void 0===t||t.close(),this.unlockScroll(),this.dispatchEvent(new Event("closed",{bubbles:!0,composed:!0})),this.moveNodesBackFromPortal(),this.teardownPortal()},t=this.nativeDialogContainer;if(!t)return void e();t.classList.add("closing");let i=!1;const o=n=>{n&&n.target!==t||i||(i=!0,t.removeEventListener("animationend",o),void 0!==this.nativeCloseFallback&&(window.clearTimeout(this.nativeCloseFallback),this.nativeCloseFallback=void 0),this.nativeOnEnd=void 0,e())};this.nativeOnEnd=o,t.addEventListener("animationend",o);const n=getComputedStyle(t),a=e=>{const t=e.trim();return t.endsWith("ms")?Number.parseFloat(t)||0:t.endsWith("s")?1e3*(Number.parseFloat(t)||0):0},s=n.animationDuration.split(",").map(a),r=n.animationDelay.split(",").map(a),l=s.reduce((e,t,i)=>{var o;return Math.max(e,t+(null!==(o=r[i%r.length])&&void 0!==o?o:0))},0);this.nativeCloseFallback=window.setTimeout(o,l>0?l+100:0)}cancelNativeOpenSchedule(){void 0!==this.nativeShowRaf&&(cancelAnimationFrame(this.nativeShowRaf),this.nativeShowRaf=void 0),void 0!==this.nativeOpenedRaf&&(cancelAnimationFrame(this.nativeOpenedRaf),this.nativeOpenedRaf=void 0)}cancelNativeCloseSchedule(){var e;void 0!==this.nativeCloseFallback&&(window.clearTimeout(this.nativeCloseFallback),this.nativeCloseFallback=void 0),this.nativeOnEnd&&this.nativeDialogContainer&&this.nativeDialogContainer.removeEventListener("animationend",this.nativeOnEnd),this.nativeOnEnd=void 0,null===(e=this.nativeDialogContainer)||void 0===e||e.classList.remove("closing")}ensurePortal(){if(this.portalRoot)return;const e=document.createElement("ix-dialog-portal-host"),t=e.attachShadow({mode:"open"});this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot&&(t.adoptedStyleSheets=this.shadowRoot.adoptedStyleSheets),document.body.appendChild(e),this.portalHost=e,this.portalRoot=t}attachPortalStyles(){if(!this.portalRoot||this.portalStyleEl)return;const e=document.createElement("style"),t="\n dialog {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n display: grid;\n place-items: center;\n pointer-events: none;\n z-index: 1000;\n max-width: none !important;\n max-height: none !important;\n }\n dialog:not([open]) {\n display: none;\n }\n .scrim {\n position: fixed;\n inset: 0;\n background: var(--ix-dialog-scrim, rgba(0,0,0,0.5));\n pointer-events: auto;\n z-index: 1000;\n touch-action: none;\n border: 0;\n padding: 0;\n appearance: none;\n }\n .container {\n position: relative;\n border-radius: 0.75rem;\n background: var(--ix-dialog-bg, #fff);\n box-shadow: var(--ix-dialog-shadow, 0 10px 30px rgba(0,0,0,0.25));\n display: grid;\n grid-template-rows: auto 1fr auto;\n overflow: visible;\n pointer-events: auto;\n z-index: 1001;\n max-width: none!important;\n }\n .container .content {\n overflow: visible;\n }\n .scrim:focus:not(:focus-visible) {\n outline: none;\n }\n /* The programmatically focused container is not an interactive control. */\n .container:focus {\n outline: none;\n }\n .container > .headline,\n .container > .content,\n .container > .actions {\n padding: var(--ix-dialog-section-padding, 1rem);\n }\n .container > .actions {\n display: flex;\n gap: var(--ix-dialog-actions-gap, 0.5rem);\n justify-content: flex-end;\n align-items: center;\n padding: 0;\n border-top: 0;\n }\n @keyframes ix-portal-fold-in {\n from { transform: translateY(-0.5rem) scaleY(0.92); opacity: 0; }\n to { transform: translateY(0) scaleY(1); opacity: 1; }\n }\n @keyframes ix-portal-fold-out {\n from { transform: translateY(0) scaleY(1); opacity: 1; }\n to { transform: translateY(-0.5rem) scaleY(0.98); opacity: 0; }\n }\n /* 'backwards' (not 'both') so the finished animation does not leave a\n transform on the container. A retained transform, even an identity one,\n turns the container into the containing block for position: fixed\n descendants (e.g. md-menu with menu-positioning=\"fixed\"), which then\n render offset by the container's position and get clipped. */\n dialog[open] > .container:not(.closing) {\n transform-origin: top center;\n animation: ix-portal-fold-in var(--ix-dialog-in-dur, 500ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) backwards;\n }\n .container.closing {\n animation: ix-portal-fold-out var(--ix-dialog-out-dur, 250ms)\n cubic-bezier(0.2, 0.7, 0.3, 1) both;\n }\n @media (prefers-reduced-motion: reduce) {\n dialog > .container { animation: none !important; }\n }\n ";if(this.contentStyles){const i=(Array.isArray(this.contentStyles)?this.contentStyles:[this.contentStyles]).map(e=>"object"==typeof e&&"cssText"in e?e.cssText:"").join("\n");e.textContent=i+t}else e.textContent=t;this.portalRoot.append(e),this.portalStyleEl=e}teardownPortal(){var e;this.portalHost&&(this.portalRoot&&a(n,this.portalRoot),null===(e=this.portalStyleEl)||void 0===e||e.remove(),this.portalStyleEl=void 0,this.portalHost.remove(),this.portalRoot=void 0,this.portalHost=void 0)}moveNodesToPortal(e,t){if(!this.nativeDialogContainer)return;const i=this.nativeDialogContainer.querySelector(t);if(!i)return;Array.from(this.children).filter(t=>t instanceof HTMLElement&&t.slot===e).forEach(e=>i.appendChild(e))}moveNodesBackFromPortal(){if(!this.nativeDialogContainer)return;[this.nativeDialogContainer.querySelector(".headline"),this.nativeDialogContainer.querySelector(".content"),this.nativeDialogContainer.querySelector(".actions")].forEach(e=>{if(!e)return;Array.from(e.childNodes).forEach(e=>this.appendChild(e))})}populatePortal(){this.moveNodesToPortal("headline",".headline"),this.moveNodesToPortal("content",".content"),this.moveNodesToPortal("actions",".actions")}static getComposedParent(e){if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;const{host:t}=e.getRootNode();return t instanceof HTMLElement?t:null}static isHiddenOrDisabled(e){var t,i,o;if(e.hasAttribute("disabled")||e.hasAttribute("hidden")||e.hasAttribute("inert")||"true"===e.getAttribute("aria-disabled")||"true"===e.getAttribute("aria-hidden")||e.disabled)return!0;const n=null===(o=null===(i=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===i?void 0:i.getComputedStyle)||void 0===o?void 0:o.call(i,e);return!(!n||"none"!==n.display&&"hidden"!==n.visibility&&"collapse"!==n.visibility)}static isEligibleComposedFocusTarget(e){if(!e.isConnected)return!1;const t=new Set;let i=e;for(;i&&!t.has(i);){if(t.add(i),A.isHiddenOrDisabled(i))return!1;i=A.getComposedParent(i)}return!0}getNativeFocusableElements(){const e=this.nativeDialog;if(!e)return[];const t=[],i=new Set,o=e=>{if(!i.has(e)){if(i.add(e),e instanceof HTMLElement&&e.tabIndex>=0&&A.isEligibleComposedFocusTarget(e)&&t.push(e),e instanceof HTMLSlotElement){const t=e.assignedNodes({flatten:!0});return void(t.length>0?t.filter(e=>e instanceof Element):Array.from(e.children)).forEach(o)}e instanceof Element&&e.shadowRoot?Array.from(e.shadowRoot.children).forEach(o):Array.from(e.children).forEach(o)}};return Array.from(e.children).forEach(o),t}requestClose(){this.open=!1}lockScroll(){if(this.isScrollLocked)return;this.isScrollLocked=!0,this.scrollYBackup=window.scrollY||document.documentElement.scrollTop||0;const{body:e}=document,t=window.innerWidth-document.documentElement.clientWidth;t>0&&(e.style.paddingRight=`${t}px`),e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${this.scrollYBackup}px`,e.style.left="0",e.style.right="0",e.style.width="100%";const i=e=>{const t=this.nativeDialogContainer;return!!t&&e.composedPath().some(e=>e instanceof Node&&(e===t||t.contains(e)))},o=e=>{this.nativeDialogContainer&&(i(e)||e.preventDefault())},n=e=>o(e),a=e=>{["PageUp","PageDown","Home","End","ArrowUp","ArrowDown"," "].includes(e.key)&&this.nativeDialogContainer&&(i(e)||e.preventDefault())};window.addEventListener("touchmove",n,{passive:!1}),window.addEventListener("keydown",a,{passive:!1}),this.removeScrollHandlers=()=>{window.removeEventListener("touchmove",n),window.removeEventListener("keydown",a)}}unlockScroll(){if(!this.isScrollLocked)return;this.isScrollLocked=!1,this.removeScrollHandlers&&(this.removeScrollHandlers(),this.removeScrollHandlers=void 0);const{body:e}=document;e.style.paddingRight="",e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.overflow="",e.style.width="",window.scrollTo(0,this.scrollYBackup||0)}onOpen(){this.dispatchEvent(new Event("open")),this.lockScroll()}onOpened(){this.dispatchEvent(new Event("opened"))}onClose(){this.open=!1,this.dispatchEvent(new Event("close"))}onClosed(){this.dispatchEvent(new Event("closed")),this.unlockScroll()}onCancel(e){this.preventCancel&&e.preventDefault(),this.dispatchEvent(new Event("cancel",{bubbles:!0,composed:!0}))}portalTemplate(){const{"aria-label":e,"aria-labelledby":t,...i}=this.forwardedAriaAttributes;return delete i["aria-modal"],o`
|
|
349
349
|
<dialog
|
|
350
350
|
${m(this.dialogRef)}
|
|
351
351
|
@cancel=${this.onNativeCancel}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-dialog following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "1.3.
|
|
6
|
+
"version": "1.3.7",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"README.md",
|
|
97
97
|
"LICENSE"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "008b6dc7c075803152aee8e72d3fb4399410e495"
|
|
100
100
|
}
|