@camaradesuk/m3e-angular 0.2.0-alpha.4 → 0.2.0-alpha.6
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/fesm2022/camaradesuk-m3e-angular.mjs +58 -11
- package/fesm2022/camaradesuk-m3e-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/styles/components/dialog/_index.scss +6 -1
- package/src/styles/styles.css +3 -1
- package/src/styles/styles.css.map +1 -1
- package/types/camaradesuk-m3e-angular.d.ts +42 -2
|
@@ -5193,6 +5193,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
|
|
|
5193
5193
|
const options$1 = matExpCreateOptions({
|
|
5194
5194
|
motion: 'system',
|
|
5195
5195
|
closeLabel: 'Close dialog',
|
|
5196
|
+
adaptiveWidth: undefined,
|
|
5197
|
+
compactActions: 'header',
|
|
5196
5198
|
});
|
|
5197
5199
|
const MAT_EXP_DIALOG_OPTIONS = options$1.token;
|
|
5198
5200
|
const provideMatExpDialogOptions = options$1.provide;
|
|
@@ -5943,7 +5945,10 @@ class MatExpDialogRef {
|
|
|
5943
5945
|
get componentRef() {
|
|
5944
5946
|
return this._cdk.componentRef;
|
|
5945
5947
|
}
|
|
5946
|
-
/**
|
|
5948
|
+
/**
|
|
5949
|
+
* Blocks the user's dismissal gestures: Escape, backdrop clicks and the adaptive layout's close
|
|
5950
|
+
* button. Application close actions (`matExpDialogClose`, `close()`) still close.
|
|
5951
|
+
*/
|
|
5947
5952
|
disableClose;
|
|
5948
5953
|
/** @internal */
|
|
5949
5954
|
_state = MatDialogState.OPEN;
|
|
@@ -5956,6 +5961,8 @@ class MatExpDialogRef {
|
|
|
5956
5961
|
/** @internal */
|
|
5957
5962
|
_closing = new ReplaySubject(1);
|
|
5958
5963
|
/** @internal */
|
|
5964
|
+
_closeButtonClicks = new Subject();
|
|
5965
|
+
/** @internal */
|
|
5959
5966
|
constructor(
|
|
5960
5967
|
/** @internal */
|
|
5961
5968
|
_cdk,
|
|
@@ -5981,6 +5988,7 @@ class MatExpDialogRef {
|
|
|
5981
5988
|
this._state = MatDialogState.CLOSED;
|
|
5982
5989
|
this._opened.complete();
|
|
5983
5990
|
this._closing.complete();
|
|
5991
|
+
this._closeButtonClicks.complete();
|
|
5984
5992
|
});
|
|
5985
5993
|
_cdk.backdropClick.subscribe(() => {
|
|
5986
5994
|
if (!this.disableClose)
|
|
@@ -6031,6 +6039,19 @@ class MatExpDialogRef {
|
|
|
6031
6039
|
backdropClick() {
|
|
6032
6040
|
return this._cdk.backdropClick;
|
|
6033
6041
|
}
|
|
6042
|
+
/**
|
|
6043
|
+
* Clicks on the adaptive layout's close button. Like `backdropClick()`, it emits whether or not
|
|
6044
|
+
* `disableClose` blocked the close, so an app can route a blocked click to its own handler.
|
|
6045
|
+
*/
|
|
6046
|
+
closeButtonClick() {
|
|
6047
|
+
return this._closeButtonClicks.asObservable();
|
|
6048
|
+
}
|
|
6049
|
+
/** @internal The adaptive close button is a dismissal gesture, like Escape and the backdrop. */
|
|
6050
|
+
_closeButtonClick(event) {
|
|
6051
|
+
this._closeButtonClicks.next(event);
|
|
6052
|
+
if (!this.disableClose)
|
|
6053
|
+
this._close(undefined, event.detail ? 'mouse' : 'keyboard');
|
|
6054
|
+
}
|
|
6034
6055
|
/** Native overlay keyboard events. */
|
|
6035
6056
|
keydownEvents() {
|
|
6036
6057
|
return this._cdk.keydownEvents;
|
|
@@ -6499,6 +6520,13 @@ class MatExpDialogContainer extends CdkDialogContainer {
|
|
|
6499
6520
|
/* Capture after the spring completes. */
|
|
6500
6521
|
}
|
|
6501
6522
|
_contentAttached() {
|
|
6523
|
+
const width = this._context.mode === 'adaptive' ? this._context.adaptiveWidth : undefined;
|
|
6524
|
+
if (width) {
|
|
6525
|
+
const pane = this._cdkRef.overlayRef.overlayElement.style;
|
|
6526
|
+
pane.setProperty('--mat-exp-dialog-adaptive-width', width);
|
|
6527
|
+
// An explicit width also wins over the stepper's own wider dialog default.
|
|
6528
|
+
pane.setProperty('--mat-exp-stepper-dialog-width', width);
|
|
6529
|
+
}
|
|
6502
6530
|
super._contentAttached();
|
|
6503
6531
|
afterNextRender(() => {
|
|
6504
6532
|
if (this._destroyed || this._closing)
|
|
@@ -6550,11 +6578,11 @@ class MatExpDialogContainer extends CdkDialogContainer {
|
|
|
6550
6578
|
super.ngOnDestroy();
|
|
6551
6579
|
}
|
|
6552
6580
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6553
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.3", type: MatExpDialogContainer, isStandalone: true, selector: "mat-exp-dialog-container", host: { styleAttribute: "visibility: hidden", classAttribute: "mat-exp-dialog-container" }, usesInheritance: true, ngImport: i0, template: '<div class="mat-exp-dialog-surface"><div class="mat-exp-dialog-content-viewport"><ng-template cdkPortalOutlet /></div></div>', isInline: true, styles: [".mat-exp-dialog-panel{--mat-dialog-container-color: var(--mat-sys-surface-container-high);--mat-dialog-container-min-width: min(280px, 100vw - 32px);--mat-dialog-actions-padding: 1.5rem;--mat-dialog-content-padding: 1.5rem;--mat-dialog-with-actions-content-padding: 1.5rem 1.5rem 0;max-height:calc(100dvh - 48px)}.mat-exp-dialog-panel.mat-exp-dialog-adaptive{width:min(560px,100% - 32px)}@media(max-width:599px){.mat-exp-dialog-panel.mat-exp-dialog-adaptive{--mat-dialog-container-shape: 0;--mat-dialog-container-min-width: 0;--mat-dialog-container-max-width: 100%;--mat-dialog-container-small-max-width: 100%;width:100%;min-width:0;max-width:100%;height:100dvh;max-height:100dvh}}.mat-exp-dialog-no-motion *{transition-duration:0s!important;animation-duration:0s!important}@media(prefers-reduced-motion:reduce){.mat-exp-dialog-panel *,.mat-exp-dialog-backdrop{transition-duration:0s!important;animation-duration:0s!important}}.mat-exp-dialog-panel{min-width:var(--mat-dialog-container-min-width, min(280px, 100vw - 32px));max-width:var(--mat-dialog-container-max-width, min(560px, 100vw - 32px))}.mat-exp-dialog-container,.mat-exp-dialog-surface,.mat-exp-dialog-content-viewport{display:block;box-sizing:border-box;width:100%;height:100%;max-height:inherit;min-height:0}.mat-exp-dialog-container{outline:none}.mat-exp-dialog-surface{position:relative;overflow:hidden;background:var(--mat-dialog-container-color, var(--mat-sys-surface-container-high));color:var(--mat-sys-on-surface);border-radius:var(--mat-dialog-container-shape, 28px);transform-origin:top left;box-shadow:var(--mat-sys-level3)}.mat-exp-dialog-component-host{display:contents}.mat-exp-dialog-content-viewport{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6581
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.3", type: MatExpDialogContainer, isStandalone: true, selector: "mat-exp-dialog-container", host: { styleAttribute: "visibility: hidden", classAttribute: "mat-exp-dialog-container" }, usesInheritance: true, ngImport: i0, template: '<div class="mat-exp-dialog-surface"><div class="mat-exp-dialog-content-viewport"><ng-template cdkPortalOutlet /></div></div>', isInline: true, styles: [".mat-exp-dialog-panel{--mat-dialog-container-color: var(--mat-sys-surface-container-high);--mat-dialog-container-shape: var(--mat-sys-corner-extra-large);--mat-dialog-container-min-width: min(280px, 100vw - 32px);--mat-dialog-actions-padding: 1.5rem;--mat-dialog-content-padding: 1.5rem;--mat-dialog-with-actions-content-padding: 1.5rem 1.5rem 0;max-height:calc(100dvh - 48px)}.mat-exp-dialog-panel.mat-exp-dialog-adaptive{width:min(var(--mat-exp-dialog-adaptive-width, 560px),100% - 32px);max-width:calc(100% - 32px)}@media(max-width:599px){.mat-exp-dialog-panel.mat-exp-dialog-adaptive{--mat-dialog-container-shape: 0;--mat-dialog-container-min-width: 0;--mat-dialog-container-max-width: 100%;--mat-dialog-container-small-max-width: 100%;width:100%;min-width:0;max-width:100%;height:100dvh;max-height:100dvh}}.mat-exp-dialog-no-motion *{transition-duration:0s!important;animation-duration:0s!important}@media(prefers-reduced-motion:reduce){.mat-exp-dialog-panel *,.mat-exp-dialog-backdrop{transition-duration:0s!important;animation-duration:0s!important}}.mat-exp-dialog-panel{min-width:var(--mat-dialog-container-min-width, min(280px, 100vw - 32px));max-width:var(--mat-dialog-container-max-width, min(560px, 100vw - 32px))}.mat-exp-dialog-container,.mat-exp-dialog-surface,.mat-exp-dialog-content-viewport{display:block;box-sizing:border-box;width:100%;height:100%;max-height:inherit;min-height:0}.mat-exp-dialog-container{outline:none}.mat-exp-dialog-surface{position:relative;overflow:hidden;background:var(--mat-dialog-container-color, var(--mat-sys-surface-container-high));color:var(--mat-sys-on-surface);border-radius:var(--mat-dialog-container-shape, 28px);transform-origin:top left;box-shadow:var(--mat-sys-level3)}.mat-exp-dialog-component-host{display:contents}.mat-exp-dialog-content-viewport{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6554
6582
|
}
|
|
6555
6583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogContainer, decorators: [{
|
|
6556
6584
|
type: Component,
|
|
6557
|
-
args: [{ selector: 'mat-exp-dialog-container', imports: [CdkPortalOutlet], template: '<div class="mat-exp-dialog-surface"><div class="mat-exp-dialog-content-viewport"><ng-template cdkPortalOutlet /></div></div>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mat-exp-dialog-container', style: 'visibility: hidden' }, styles: [".mat-exp-dialog-panel{--mat-dialog-container-color: var(--mat-sys-surface-container-high);--mat-dialog-container-min-width: min(280px, 100vw - 32px);--mat-dialog-actions-padding: 1.5rem;--mat-dialog-content-padding: 1.5rem;--mat-dialog-with-actions-content-padding: 1.5rem 1.5rem 0;max-height:calc(100dvh - 48px)}.mat-exp-dialog-panel.mat-exp-dialog-adaptive{width:min(560px,100% - 32px)}@media(max-width:599px){.mat-exp-dialog-panel.mat-exp-dialog-adaptive{--mat-dialog-container-shape: 0;--mat-dialog-container-min-width: 0;--mat-dialog-container-max-width: 100%;--mat-dialog-container-small-max-width: 100%;width:100%;min-width:0;max-width:100%;height:100dvh;max-height:100dvh}}.mat-exp-dialog-no-motion *{transition-duration:0s!important;animation-duration:0s!important}@media(prefers-reduced-motion:reduce){.mat-exp-dialog-panel *,.mat-exp-dialog-backdrop{transition-duration:0s!important;animation-duration:0s!important}}.mat-exp-dialog-panel{min-width:var(--mat-dialog-container-min-width, min(280px, 100vw - 32px));max-width:var(--mat-dialog-container-max-width, min(560px, 100vw - 32px))}.mat-exp-dialog-container,.mat-exp-dialog-surface,.mat-exp-dialog-content-viewport{display:block;box-sizing:border-box;width:100%;height:100%;max-height:inherit;min-height:0}.mat-exp-dialog-container{outline:none}.mat-exp-dialog-surface{position:relative;overflow:hidden;background:var(--mat-dialog-container-color, var(--mat-sys-surface-container-high));color:var(--mat-sys-on-surface);border-radius:var(--mat-dialog-container-shape, 28px);transform-origin:top left;box-shadow:var(--mat-sys-level3)}.mat-exp-dialog-component-host{display:contents}.mat-exp-dialog-content-viewport{display:flex;flex-direction:column}\n"] }]
|
|
6585
|
+
args: [{ selector: 'mat-exp-dialog-container', imports: [CdkPortalOutlet], template: '<div class="mat-exp-dialog-surface"><div class="mat-exp-dialog-content-viewport"><ng-template cdkPortalOutlet /></div></div>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mat-exp-dialog-container', style: 'visibility: hidden' }, styles: [".mat-exp-dialog-panel{--mat-dialog-container-color: var(--mat-sys-surface-container-high);--mat-dialog-container-shape: var(--mat-sys-corner-extra-large);--mat-dialog-container-min-width: min(280px, 100vw - 32px);--mat-dialog-actions-padding: 1.5rem;--mat-dialog-content-padding: 1.5rem;--mat-dialog-with-actions-content-padding: 1.5rem 1.5rem 0;max-height:calc(100dvh - 48px)}.mat-exp-dialog-panel.mat-exp-dialog-adaptive{width:min(var(--mat-exp-dialog-adaptive-width, 560px),100% - 32px);max-width:calc(100% - 32px)}@media(max-width:599px){.mat-exp-dialog-panel.mat-exp-dialog-adaptive{--mat-dialog-container-shape: 0;--mat-dialog-container-min-width: 0;--mat-dialog-container-max-width: 100%;--mat-dialog-container-small-max-width: 100%;width:100%;min-width:0;max-width:100%;height:100dvh;max-height:100dvh}}.mat-exp-dialog-no-motion *{transition-duration:0s!important;animation-duration:0s!important}@media(prefers-reduced-motion:reduce){.mat-exp-dialog-panel *,.mat-exp-dialog-backdrop{transition-duration:0s!important;animation-duration:0s!important}}.mat-exp-dialog-panel{min-width:var(--mat-dialog-container-min-width, min(280px, 100vw - 32px));max-width:var(--mat-dialog-container-max-width, min(560px, 100vw - 32px))}.mat-exp-dialog-container,.mat-exp-dialog-surface,.mat-exp-dialog-content-viewport{display:block;box-sizing:border-box;width:100%;height:100%;max-height:inherit;min-height:0}.mat-exp-dialog-container{outline:none}.mat-exp-dialog-surface{position:relative;overflow:hidden;background:var(--mat-dialog-container-color, var(--mat-sys-surface-container-high));color:var(--mat-sys-on-surface);border-radius:var(--mat-dialog-container-shape, 28px);transform-origin:top left;box-shadow:var(--mat-sys-level3)}.mat-exp-dialog-component-host{display:contents}.mat-exp-dialog-content-viewport{display:flex;flex-direction:column}\n"] }]
|
|
6558
6586
|
}] });
|
|
6559
6587
|
|
|
6560
6588
|
/** Explicit close action for content opened by MatExpDialog. */
|
|
@@ -6604,16 +6632,18 @@ class MatExpDialogLayout {
|
|
|
6604
6632
|
/** @internal */
|
|
6605
6633
|
_context = inject(MAT_EXP_DIALOG_CONTEXT);
|
|
6606
6634
|
/** @internal */
|
|
6635
|
+
_ref = inject(MatExpDialogRef);
|
|
6636
|
+
/** @internal */
|
|
6607
6637
|
_actions = contentChild(MatExpDialogActions, /* @ts-ignore */
|
|
6608
6638
|
...(ngDevMode ? [{ debugName: "_actions" }] : /* istanbul ignore next */ []));
|
|
6609
6639
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6610
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpDialogLayout, isStandalone: true, selector: "mat-exp-dialog-layout", host: { properties: { "attr.data-mode": "_context.mode" } }, queries: [{ propertyName: "_actions", first: true, predicate: MatExpDialogActions, descendants: true, isSignal: true }], exportAs: ["matExpDialogLayout"], ngImport: i0, template: `
|
|
6640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpDialogLayout, isStandalone: true, selector: "mat-exp-dialog-layout", host: { properties: { "attr.data-mode": "_context.mode", "attr.data-compact-actions": "_context.mode === 'adaptive' ? _context.compactActions : null" } }, queries: [{ propertyName: "_actions", first: true, predicate: MatExpDialogActions, descendants: true, isSignal: true }], exportAs: ["matExpDialogLayout"], ngImport: i0, template: `
|
|
6611
6641
|
@if (_context.mode === 'adaptive') {
|
|
6612
6642
|
<button
|
|
6613
6643
|
type="button"
|
|
6614
6644
|
matIconButton
|
|
6615
|
-
matExpDialogClose
|
|
6616
6645
|
class="mat-exp-dialog-close"
|
|
6646
|
+
(click)="_ref._closeButtonClick($event)"
|
|
6617
6647
|
[attr.aria-label]="_context.closeLabel"
|
|
6618
6648
|
>
|
|
6619
6649
|
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24">
|
|
@@ -6631,17 +6661,17 @@ class MatExpDialogLayout {
|
|
|
6631
6661
|
<ng-container [ngTemplateOutlet]="actions.template" />
|
|
6632
6662
|
</div>
|
|
6633
6663
|
}
|
|
6634
|
-
`, isInline: true, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"], dependencies: [{ kind: "
|
|
6664
|
+
`, isInline: true, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6635
6665
|
}
|
|
6636
6666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogLayout, decorators: [{
|
|
6637
6667
|
type: Component,
|
|
6638
|
-
args: [{ selector: 'mat-exp-dialog-layout', exportAs: 'matExpDialogLayout', imports: [
|
|
6668
|
+
args: [{ selector: 'mat-exp-dialog-layout', exportAs: 'matExpDialogLayout', imports: [MatButtonModule, NgTemplateOutlet], template: `
|
|
6639
6669
|
@if (_context.mode === 'adaptive') {
|
|
6640
6670
|
<button
|
|
6641
6671
|
type="button"
|
|
6642
6672
|
matIconButton
|
|
6643
|
-
matExpDialogClose
|
|
6644
6673
|
class="mat-exp-dialog-close"
|
|
6674
|
+
(click)="_ref._closeButtonClick($event)"
|
|
6645
6675
|
[attr.aria-label]="_context.closeLabel"
|
|
6646
6676
|
>
|
|
6647
6677
|
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24">
|
|
@@ -6659,7 +6689,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
|
|
|
6659
6689
|
<ng-container [ngTemplateOutlet]="actions.template" />
|
|
6660
6690
|
</div>
|
|
6661
6691
|
}
|
|
6662
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6692
|
+
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6693
|
+
'[attr.data-mode]': '_context.mode',
|
|
6694
|
+
'[attr.data-compact-actions]': "_context.mode === 'adaptive' ? _context.compactActions : null",
|
|
6695
|
+
}, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"] }]
|
|
6663
6696
|
}], propDecorators: { _actions: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MatExpDialogActions), { isSignal: true }] }] } });
|
|
6664
6697
|
|
|
6665
6698
|
/** @internal Built-in content for the one-call plain-text confirmation. */
|
|
@@ -6698,6 +6731,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
|
|
|
6698
6731
|
}] });
|
|
6699
6732
|
|
|
6700
6733
|
let nextConfirmationId = 0;
|
|
6734
|
+
/** Width keywords that are valid CSS but not a <length-percentage> inside min(). */
|
|
6735
|
+
const NON_LENGTH_WIDTH = /^(?:auto|inherit|initial|unset|revert(?:-layer)?|stretch|(?:min-|max-|fit-)content)$|^fit-content\(/i;
|
|
6701
6736
|
/** Opens CDK-backed spring-driven dialogs with a typed alert/adaptive presentation contract. */
|
|
6702
6737
|
class MatExpDialog {
|
|
6703
6738
|
/** @internal */
|
|
@@ -6758,9 +6793,20 @@ class MatExpDialog {
|
|
|
6758
6793
|
if (config.mode === 'alert' && (!config.role || !config.ariaDescribedBy?.trim())) {
|
|
6759
6794
|
throw new Error('Alert mode requires an explicit role and ariaDescribedBy.');
|
|
6760
6795
|
}
|
|
6761
|
-
const { mode, title, motion = this._options.motion, closeLabel = this._options.closeLabel, origin, ...native } = config;
|
|
6796
|
+
const { mode, title, motion = this._options.motion, closeLabel = this._options.closeLabel, origin, adaptiveWidth = this._options.adaptiveWidth, compactActions = this._options.compactActions, ...native } = config;
|
|
6762
6797
|
if (mode === 'adaptive' && !closeLabel.trim())
|
|
6763
6798
|
throw new Error('Adaptive mode requires a non-empty closeLabel.');
|
|
6799
|
+
if (mode === 'adaptive' &&
|
|
6800
|
+
adaptiveWidth !== undefined &&
|
|
6801
|
+
(!adaptiveWidth.trim() ||
|
|
6802
|
+
NON_LENGTH_WIDTH.test(adaptiveWidth.trim()) ||
|
|
6803
|
+
// Inside min() only a <length-percentage> is valid; 'auto' or 'inherit' are not.
|
|
6804
|
+
(typeof CSS !== 'undefined' &&
|
|
6805
|
+
!(CSS.supports('width', adaptiveWidth) &&
|
|
6806
|
+
CSS.supports('width', `min(${adaptiveWidth}, 1px)`)))))
|
|
6807
|
+
throw new Error('Adaptive mode requires a valid CSS adaptiveWidth.');
|
|
6808
|
+
if (compactActions !== 'header' && compactActions !== 'footer')
|
|
6809
|
+
throw new Error("compactActions must be 'header' or 'footer'.");
|
|
6764
6810
|
const effective = { ...this._nativeDefaults, ...native };
|
|
6765
6811
|
const classes = (value) => typeof value === 'string' ? [value] : (value ?? []);
|
|
6766
6812
|
const injector = Injector.create({
|
|
@@ -6768,7 +6814,7 @@ class MatExpDialog {
|
|
|
6768
6814
|
providers: [
|
|
6769
6815
|
{
|
|
6770
6816
|
provide: MAT_EXP_DIALOG_CONTEXT,
|
|
6771
|
-
useValue: { mode, title, closeLabel, motion, origin },
|
|
6817
|
+
useValue: { mode, title, closeLabel, motion, adaptiveWidth, origin, compactActions },
|
|
6772
6818
|
},
|
|
6773
6819
|
],
|
|
6774
6820
|
});
|
|
@@ -6782,6 +6828,7 @@ class MatExpDialog {
|
|
|
6782
6828
|
motion,
|
|
6783
6829
|
closeLabel,
|
|
6784
6830
|
origin,
|
|
6831
|
+
...(mode === 'adaptive' ? { adaptiveWidth, compactActions } : {}),
|
|
6785
6832
|
};
|
|
6786
6833
|
this._dialog.open(component, {
|
|
6787
6834
|
...effective,
|