@camaradesuk/m3e-angular 0.2.0-alpha.5 → 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 +24 -5
- package/fesm2022/camaradesuk-m3e-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/styles/components/dialog/_index.scss +4 -1
- package/src/styles/styles.css +2 -1
- package/src/styles/styles.css.map +1 -1
- package/types/camaradesuk-m3e-angular.d.ts +15 -0
|
@@ -5193,6 +5193,7 @@ 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,
|
|
5196
5197
|
compactActions: 'header',
|
|
5197
5198
|
});
|
|
5198
5199
|
const MAT_EXP_DIALOG_OPTIONS = options$1.token;
|
|
@@ -6519,6 +6520,13 @@ class MatExpDialogContainer extends CdkDialogContainer {
|
|
|
6519
6520
|
/* Capture after the spring completes. */
|
|
6520
6521
|
}
|
|
6521
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
|
+
}
|
|
6522
6530
|
super._contentAttached();
|
|
6523
6531
|
afterNextRender(() => {
|
|
6524
6532
|
if (this._destroyed || this._closing)
|
|
@@ -6570,11 +6578,11 @@ class MatExpDialogContainer extends CdkDialogContainer {
|
|
|
6570
6578
|
super.ngOnDestroy();
|
|
6571
6579
|
}
|
|
6572
6580
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6573
|
-
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(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 });
|
|
6574
6582
|
}
|
|
6575
6583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogContainer, decorators: [{
|
|
6576
6584
|
type: Component,
|
|
6577
|
-
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(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"] }]
|
|
6578
6586
|
}] });
|
|
6579
6587
|
|
|
6580
6588
|
/** Explicit close action for content opened by MatExpDialog. */
|
|
@@ -6723,6 +6731,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
|
|
|
6723
6731
|
}] });
|
|
6724
6732
|
|
|
6725
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;
|
|
6726
6736
|
/** Opens CDK-backed spring-driven dialogs with a typed alert/adaptive presentation contract. */
|
|
6727
6737
|
class MatExpDialog {
|
|
6728
6738
|
/** @internal */
|
|
@@ -6783,9 +6793,18 @@ class MatExpDialog {
|
|
|
6783
6793
|
if (config.mode === 'alert' && (!config.role || !config.ariaDescribedBy?.trim())) {
|
|
6784
6794
|
throw new Error('Alert mode requires an explicit role and ariaDescribedBy.');
|
|
6785
6795
|
}
|
|
6786
|
-
const { mode, title, motion = this._options.motion, closeLabel = this._options.closeLabel, origin, compactActions = this._options.compactActions, ...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;
|
|
6787
6797
|
if (mode === 'adaptive' && !closeLabel.trim())
|
|
6788
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.');
|
|
6789
6808
|
if (compactActions !== 'header' && compactActions !== 'footer')
|
|
6790
6809
|
throw new Error("compactActions must be 'header' or 'footer'.");
|
|
6791
6810
|
const effective = { ...this._nativeDefaults, ...native };
|
|
@@ -6795,7 +6814,7 @@ class MatExpDialog {
|
|
|
6795
6814
|
providers: [
|
|
6796
6815
|
{
|
|
6797
6816
|
provide: MAT_EXP_DIALOG_CONTEXT,
|
|
6798
|
-
useValue: { mode, title, closeLabel, motion, origin, compactActions },
|
|
6817
|
+
useValue: { mode, title, closeLabel, motion, adaptiveWidth, origin, compactActions },
|
|
6799
6818
|
},
|
|
6800
6819
|
],
|
|
6801
6820
|
});
|
|
@@ -6809,7 +6828,7 @@ class MatExpDialog {
|
|
|
6809
6828
|
motion,
|
|
6810
6829
|
closeLabel,
|
|
6811
6830
|
origin,
|
|
6812
|
-
...(mode === 'adaptive' ? { compactActions } : {}),
|
|
6831
|
+
...(mode === 'adaptive' ? { adaptiveWidth, compactActions } : {}),
|
|
6813
6832
|
};
|
|
6814
6833
|
this._dialog.open(component, {
|
|
6815
6834
|
...effective,
|