mn-angular-lib 1.0.180 → 2.0.1
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/mn-angular-lib-alert.mjs +11 -10
- package/fesm2022/mn-angular-lib-alert.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs +15 -14
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-button.mjs +9 -9
- package/fesm2022/mn-angular-lib-button.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar-core.mjs +6 -6
- package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar.mjs +118 -81
- package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-collection.mjs +36 -28
- package/fesm2022/mn-angular-lib-collection.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-core.mjs +17 -16
- package/fesm2022/mn-angular-lib-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-display.mjs +45 -37
- package/fesm2022/mn-angular-lib-display.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-forms.mjs +243 -99
- package/fesm2022/mn-angular-lib-forms.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-keyboard.mjs +3 -3
- package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-ui.mjs +158 -100
- package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal.mjs +3 -3
- package/fesm2022/mn-angular-lib-modal.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs +21 -12
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-segmented.mjs +3 -3
- package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-tab.mjs +14 -6
- package/fesm2022/mn-angular-lib-tab.mjs.map +1 -1
- package/package.json +4 -4
- package/types/mn-angular-lib-alert.d.ts +2 -2
- package/types/mn-angular-lib-calendar-core.d.ts +2 -2
- package/types/mn-angular-lib-calendar.d.ts +2 -0
- package/types/mn-angular-lib-core.d.ts +2 -2
- package/types/mn-angular-lib-display.d.ts +5 -0
- package/types/mn-angular-lib-forms.d.ts +10 -0
- package/types/mn-angular-lib-modal.d.ts +1 -1
- package/types/mn-angular-lib-tab.d.ts +7 -0
|
@@ -90,10 +90,10 @@ class MnAlertStore {
|
|
|
90
90
|
this.timers.delete(id);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
94
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertStore, providedIn: 'root' });
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertStore, decorators: [{
|
|
97
97
|
type: Injectable,
|
|
98
98
|
args: [{ providedIn: 'root' }]
|
|
99
99
|
}] });
|
|
@@ -184,10 +184,10 @@ class MnAlertService {
|
|
|
184
184
|
const variant = extra?.variant;
|
|
185
185
|
return this.show({ title, subTitle, duration: duration, cssClass, icon, meta: extra?.meta, kind: kind, variant });
|
|
186
186
|
}
|
|
187
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
188
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
188
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertService, providedIn: 'root' });
|
|
189
189
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertService, decorators: [{
|
|
191
191
|
type: Injectable,
|
|
192
192
|
args: [{ providedIn: 'root' }]
|
|
193
193
|
}], ctorParameters: () => [] });
|
|
@@ -294,7 +294,8 @@ class MnAlertOutletComponent {
|
|
|
294
294
|
/** The view-layer mirror of the store's alerts, retaining alerts mid-leave. A signal so
|
|
295
295
|
* writes from the (external) store subscription and leave timers schedule change
|
|
296
296
|
* detection in a zoneless app. */
|
|
297
|
-
views = signal([],
|
|
297
|
+
views = signal([], /* @ts-ignore */
|
|
298
|
+
...(ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []));
|
|
298
299
|
/**
|
|
299
300
|
* `touch-action` for the swipe wrapper: reserve the swipe axis for our gesture while
|
|
300
301
|
* leaving the cross-axis to the browser. Vertical swipe (Apple) claims the Y axis
|
|
@@ -507,10 +508,10 @@ class MnAlertOutletComponent {
|
|
|
507
508
|
&& typeof window.matchMedia === 'function'
|
|
508
509
|
&& window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
509
510
|
}
|
|
510
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
511
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
512
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: MnAlertOutletComponent, isStandalone: true, selector: "mn-alert-outlet", inputs: { swipeAxis: "swipeAxis", template: "template" }, ngImport: i0, template: "<!-- The stack is a polite live region so every toast is announced; an error toast upgrades itself to an alert. -->\n<div aria-live=\"polite\" role=\"status\" class=\"fixed top-4 left-0 right-0 z-[9999] flex flex-col w-full px-2 sm:px-0 sm:left-auto sm:right-4 sm:max-w-sm\">\n @for (v of views(); track trackById($index, v)) {\n <div\n class=\"mn-alert-item\"\n [attr.role]=\"v.alert.kind === 'error' ? 'alert' : null\"\n [class.dragging]=\"v.dragging\"\n [class.leaving]=\"v.leaving\"\n [style.touch-action]=\"touchAction\"\n [style.transform]=\"itemTransform(v)\"\n [style.opacity]=\"itemOpacity(v)\"\n (pointerdown)=\"onPointerDown($event, v)\"\n (pointermove)=\"onPointerMove($event, v)\"\n (pointerup)=\"onPointerUp($event, v)\"\n (pointercancel)=\"onPointerUp($event, v)\"\n >\n <div class=\"mn-alert-inner\">\n @if (template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(v.alert)\">\n </ng-container>\n } @else {\n <div [class.extra]=\"v.alert.cssClass\" [class]=\"getAlertClasses(v.alert)\" class=\"relative overflow-hidden\">\n <div class=\"flex-1 min-w-0 pr-8\">\n <h4 class=\"font-semibold text-sm\">{{ v.alert.title }}</h4>\n @if (v.alert.subTitle) {\n <p class=\"text-sm mt-1 opacity-90 leading-tight\">{{ v.alert.subTitle }}</p>\n }\n </div>\n <button\n [attr.aria-label]=\"closeLabel\"\n mnButton\n [data]=\"{ size: 'md', variant: 'text' }\"\n (click)=\"dismissAlert(v.alert.id)\"\n class=\"absolute top-2 right-2 shrink-0 !text-current hover:!bg-current/10\"\n type=\"button\"\n >\n ×\n </button>\n @if (countdownDuration(v); as ms) {\n <span aria-hidden=\"true\" class=\"mn-alert-progress\">\n <span [style.animation-duration.ms]=\"ms\" class=\"mn-alert-progress-bar\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{--mn-alert-exit: .32s}.mn-alert-item{display:grid;grid-template-rows:1fr;margin-bottom:.75rem;touch-action:pan-y;cursor:grab;transition:transform .28s cubic-bezier(.22,1,.36,1),opacity var(--mn-alert-exit) ease,grid-template-rows var(--mn-alert-exit) cubic-bezier(.4,0,.2,1),margin-bottom var(--mn-alert-exit) cubic-bezier(.4,0,.2,1)}.mn-alert-item:last-child{margin-bottom:0}.mn-alert-item.dragging{transition:none;cursor:grabbing;-webkit-user-select:none;user-select:none}.mn-alert-inner{min-height:0}.mn-alert-item.leaving{grid-template-rows:0fr;opacity:0;margin-bottom:0;pointer-events:none}.mn-alert-item.leaving .mn-alert-inner{overflow:hidden}.mn-alert-progress{position:absolute;left:0;right:0;bottom:0;height:3px;overflow:hidden;background-color:color-mix(in srgb,currentColor 18%,transparent);pointer-events:none}.mn-alert-progress-bar{display:block;height:100%;background-color:currentColor;opacity:.55;transform-origin:left center;animation-name:mn-alert-countdown;animation-timing-function:linear;animation-fill-mode:forwards}@keyframes mn-alert-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){.mn-alert-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MnButton, selector: "button[mnButton], a[mnButton]", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
512
513
|
}
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnAlertOutletComponent, decorators: [{
|
|
514
515
|
type: Component,
|
|
515
516
|
args: [{ selector: 'mn-alert-outlet', standalone: true, imports: [CommonModule, MnButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- The stack is a polite live region so every toast is announced; an error toast upgrades itself to an alert. -->\n<div aria-live=\"polite\" role=\"status\" class=\"fixed top-4 left-0 right-0 z-[9999] flex flex-col w-full px-2 sm:px-0 sm:left-auto sm:right-4 sm:max-w-sm\">\n @for (v of views(); track trackById($index, v)) {\n <div\n class=\"mn-alert-item\"\n [attr.role]=\"v.alert.kind === 'error' ? 'alert' : null\"\n [class.dragging]=\"v.dragging\"\n [class.leaving]=\"v.leaving\"\n [style.touch-action]=\"touchAction\"\n [style.transform]=\"itemTransform(v)\"\n [style.opacity]=\"itemOpacity(v)\"\n (pointerdown)=\"onPointerDown($event, v)\"\n (pointermove)=\"onPointerMove($event, v)\"\n (pointerup)=\"onPointerUp($event, v)\"\n (pointercancel)=\"onPointerUp($event, v)\"\n >\n <div class=\"mn-alert-inner\">\n @if (template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(v.alert)\">\n </ng-container>\n } @else {\n <div [class.extra]=\"v.alert.cssClass\" [class]=\"getAlertClasses(v.alert)\" class=\"relative overflow-hidden\">\n <div class=\"flex-1 min-w-0 pr-8\">\n <h4 class=\"font-semibold text-sm\">{{ v.alert.title }}</h4>\n @if (v.alert.subTitle) {\n <p class=\"text-sm mt-1 opacity-90 leading-tight\">{{ v.alert.subTitle }}</p>\n }\n </div>\n <button\n [attr.aria-label]=\"closeLabel\"\n mnButton\n [data]=\"{ size: 'md', variant: 'text' }\"\n (click)=\"dismissAlert(v.alert.id)\"\n class=\"absolute top-2 right-2 shrink-0 !text-current hover:!bg-current/10\"\n type=\"button\"\n >\n ×\n </button>\n @if (countdownDuration(v); as ms) {\n <span aria-hidden=\"true\" class=\"mn-alert-progress\">\n <span [style.animation-duration.ms]=\"ms\" class=\"mn-alert-progress-bar\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{--mn-alert-exit: .32s}.mn-alert-item{display:grid;grid-template-rows:1fr;margin-bottom:.75rem;touch-action:pan-y;cursor:grab;transition:transform .28s cubic-bezier(.22,1,.36,1),opacity var(--mn-alert-exit) ease,grid-template-rows var(--mn-alert-exit) cubic-bezier(.4,0,.2,1),margin-bottom var(--mn-alert-exit) cubic-bezier(.4,0,.2,1)}.mn-alert-item:last-child{margin-bottom:0}.mn-alert-item.dragging{transition:none;cursor:grabbing;-webkit-user-select:none;user-select:none}.mn-alert-inner{min-height:0}.mn-alert-item.leaving{grid-template-rows:0fr;opacity:0;margin-bottom:0;pointer-events:none}.mn-alert-item.leaving .mn-alert-inner{overflow:hidden}.mn-alert-progress{position:absolute;left:0;right:0;bottom:0;height:3px;overflow:hidden;background-color:color-mix(in srgb,currentColor 18%,transparent);pointer-events:none}.mn-alert-progress-bar{display:block;height:100%;background-color:currentColor;opacity:.55;transform-origin:left center;animation-name:mn-alert-countdown;animation-timing-function:linear;animation-fill-mode:forwards}@keyframes mn-alert-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){.mn-alert-item{transition:none}}\n"] }]
|
|
516
517
|
}], ctorParameters: () => [], propDecorators: { swipeAxis: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mn-angular-lib-alert.mjs","sources":["../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.tokens.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.providers.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.store.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.service.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alertVariants.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.html","../../../projects/mn-angular-lib/alert/public-api.ts","../../../projects/mn-angular-lib/alert/mn-angular-lib-alert.ts"],"sourcesContent":["// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.tokens.ts\nimport {InjectionToken} from '@angular/core';\nimport {MnAlert} from './mn-alert.types';\n\nexport type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';\n\nexport type MnAlertConfig = {\n durations?: Partial<Record<MnAlertKind, number | null>>;\n cssClasses?: Partial<Record<MnAlertKind, string>>;\n icons?: Partial<Record<MnAlertKind, unknown>>;\n fallbackDuration?: number | null;\n /**\n * How many alerts may be on screen at once. Showing one past this cap drops the oldest\n * alert still visible, so a burst of alerts never grows into an unreadable stack.\n */\n maxVisible?: number;\n finalize?: (a: MnAlert) => MnAlert;\n}\n\nexport const MN_ALERT_CONFIG = new InjectionToken<MnAlertConfig>('MN_ALERT_CONFIG');\n\nexport const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig> = {\n durations: { success: 3000, info: 4000, warning: 5000, error: 7000, default: 4000 },\n cssClasses: {\n success: 'mn-alert-success',\n info: 'mn-alert-info',\n warning: 'mn-alert-warning',\n error: 'mn-alert-error',\n default: 'alert'\n },\n icons: {},\n fallbackDuration: 4000,\n maxVisible: 3,\n finalize: (a) => a\n};\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.providers.ts\nimport { Provider } from '@angular/core';\nimport { MN_ALERT_CONFIG, MnAlertConfig, DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nexport function provideMnAlerts(config: MnAlertConfig = {}): Provider {\n const merged: MnAlertConfig = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...config,\n durations: { ...DEFAULT_MN_ALERT_CONFIG.durations, ...(config.durations ?? {}) },\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(config.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(config.icons ?? {}) }\n };\n return { provide: MN_ALERT_CONFIG, useValue: merged };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {MnAlert, MnAlertId} from './mn-alert.types';\nimport {DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MnAlertConfig} from './mn-alert.tokens';\n\nlet COUNTER = 0;\nconst uid = () => `mn_${++COUNTER}`;\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertStore {\n private readonly _alerts$ = new BehaviorSubject<MnAlert[]>([]);\n readonly alerts$ = this._alerts$.asObservable();\n\n /** Host configuration, when the app provided one. Only `maxVisible` is read here — the\n * per-kind durations are resolved by {@link MnAlertService} before an alert reaches the store. */\n private readonly cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n /** In-flight auto-dismiss timers keyed by alert id, so an alert that leaves early (dismissed\n * by hand, or pushed out by the visible cap) never fires a stale timeout later. */\n private readonly timers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** How many alerts stay on screen at once; showing more drops the oldest ones. */\n private get maxVisible(): number {\n const configured = this.cfg?.maxVisible;\n return typeof configured === 'number' && configured > 0\n ? configured\n : DEFAULT_MN_ALERT_CONFIG.maxVisible;\n }\n\n show(partial: Omit<MnAlert, 'id'>): MnAlertId {\n // Ensure every alert has a numeric duration: use provided or fall back to per-kind default\n const computedDuration = (partial as {\n duration?: number\n }).duration ?? (DEFAULT_MN_ALERT_CONFIG.durations as Record<string, number>)[(partial as {\n kind?: string\n }).kind ?? ''] ?? DEFAULT_MN_ALERT_CONFIG.fallbackDuration;\n const a: MnAlert = { id: uid(), ...partial, duration: computedDuration } as MnAlert;\n\n // Newest alert last; anything beyond the cap is trimmed off the front (the oldest still\n // visible), so a burst of alerts scrolls rather than piling up.\n const queued = [...this._alerts$.value, a];\n const overflow = queued.length - this.maxVisible;\n if (overflow > 0) {\n queued.splice(0, overflow).forEach(dropped => this.clearTimer(dropped.id));\n }\n this._alerts$.next(queued);\n\n if (typeof a.duration === 'number' && a.duration > 0) {\n this.timers.set(a.id, setTimeout(() => this.dismiss(a.id), a.duration));\n }\n return a.id;\n }\n\n dismiss(id: MnAlertId) {\n const list = this._alerts$.value;\n if (list.some(x => x.id === id)) {\n this.clearTimer(id);\n this._alerts$.next(list.filter(x => x.id !== id));\n }\n }\n\n clear() {\n this.timers.forEach(t => clearTimeout(t));\n this.timers.clear();\n this._alerts$.next([]);\n }\n\n private clearTimer(id: MnAlertId) {\n const timer = this.timers.get(id);\n if (timer !== undefined) {\n clearTimeout(timer);\n this.timers.delete(id);\n }\n }\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.service.ts\nimport {Injectable, inject} from '@angular/core';\nimport { MnAlertStore } from './mn-alert.store';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { MN_ALERT_CONFIG, DEFAULT_MN_ALERT_CONFIG, MnAlertConfig, MnAlertKind } from './mn-alert.tokens';\nimport { MnAlertVariants } from './mn-alertVariants';\n\nexport type MnShowInput = {\n title: string;\n subTitle?: string;\n duration?: number;\n icon?: unknown;\n cssClass?: string;\n meta?: Record<string, unknown>;\n kind: MnAlertKind;\n variant?: MnAlertVariants['variant'];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertService {\n private readonly store = inject(MnAlertStore);\n\n private readonly cfg: Required<MnAlertConfig>;\n private readonly userDurations?: Partial<Record<MnAlertKind, number | null>>;\n private readonly hasUserDurations: boolean;\n\n constructor() {\n const cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n this.userDurations = cfg?.durations;\n this.hasUserDurations = !!cfg?.durations;\n this.cfg = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...(cfg ?? {}),\n // Do not pre-merge durations; keep defaults separate and use logic in kind()\n durations: DEFAULT_MN_ALERT_CONFIG.durations,\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(cfg?.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(cfg?.icons ?? {}) }\n };\n }\n\n show(input: MnShowInput): MnAlertId {\n // Always ensure a numeric duration is set\n let duration = input.duration;\n if (duration == null) {\n // Prefer user defaultDuration if provided and not null, otherwise use library per-kind default\n const userDefault = this.cfg.fallbackDuration;\n if (typeof userDefault === 'number') {\n duration = userDefault;\n } else {\n duration = DEFAULT_MN_ALERT_CONFIG.durations[input.kind as keyof typeof DEFAULT_MN_ALERT_CONFIG.durations] as number;\n }\n }\n\n const a: Omit<MnAlert, 'id'> = {\n title: input.title,\n subTitle: input.subTitle,\n duration,\n icon: input.icon,\n cssClass: input.cssClass,\n meta: input.meta,\n kind: input.kind,\n variant: input.variant\n };\n return this.store.show(this.cfg.finalize(a as MnAlert));\n }\n\n success(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('success', title, subTitle, extra);\n }\n info(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('info', title, subTitle, extra);\n }\n warning(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('warning', title, subTitle, extra);\n }\n error(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('error', title, subTitle, extra);\n }\n\n dismiss(id: MnAlertId) { this.store.dismiss(id); }\n clear() { this.store.clear(); }\n\n private kind(kind: MnAlertKind, title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n let duration: number | null | undefined = extra?.duration;\n\n if (duration == null) {\n if (this.hasUserDurations) {\n const userDur = this.userDurations?.[kind];\n if (typeof userDur === 'number') {\n duration = userDur;\n } else {\n // userDur is undefined or null -> fallback to user defaultDuration if numeric\n if (typeof this.cfg.fallbackDuration === 'number') {\n duration = this.cfg.fallbackDuration;\n } else {\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n } else {\n // No user durations provided at all; use library defaults per kind\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n\n const cssClass = extra?.cssClass ?? this.cfg.cssClasses[kind];\n const icon = (extra?.icon ?? this.cfg.icons[kind]) as unknown;\n const variant = extra?.variant;\n\n return this.show({ title, subTitle, duration: duration as number, cssClass, icon, meta: extra?.meta , kind: kind, variant});\n }\n}\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnAlertVariants = tv({\n base: 'flex items-start gap-3 p-4 border rounded-xl shadow-sm transition-all duration-300 w-full ',\n variants: {\n kind: {\n success: 'bg-success/10 border-success/30 text-success',\n info: 'bg-info/10 border-info/30 text-info',\n warning: 'bg-warning/10 border-warning/30 text-warning',\n error: 'bg-error/10 border-error/30 text-error',\n default: 'bg-base-100 border-base-300 text-base-content',\n accent: 'bg-accent/10 border-accent/30 text-accent',\n },\n variant: {\n fill: '',\n outline: 'bg-base-200 border-2',\n soft: 'border-none shadow-none',\n }\n },\n compoundVariants: [\n {\n kind: 'success',\n variant: 'fill',\n class: 'bg-success border-success text-success-content'\n },\n {\n kind: 'info',\n variant: 'fill',\n class: 'bg-info border-info text-info-content'\n },\n {\n kind: 'warning',\n variant: 'fill',\n class: 'bg-warning border-warning text-warning-content'\n },\n {\n kind: 'error',\n variant: 'fill',\n class: 'bg-error border-error text-error-content'\n },\n {\n kind: 'accent',\n variant: 'fill',\n class: 'bg-accent border-accent text-accent-content'\n },\n ],\n defaultVariants: {\n kind: 'info',\n variant: 'soft'\n }\n});\n\nexport type MnAlertVariants = VariantProps<typeof mnAlertVariants>;\n","import {ChangeDetectionStrategy, Component, DestroyRef, inject, Input, signal, TemplateRef,} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {CommonModule} from '@angular/common';\nimport {MnAlertStore} from '../mn-alert.store';\nimport {MnAlert, MnAlertId} from '../mn-alert.types';\nimport {mnAlertVariants} from '../mn-alertVariants';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnLanguageService} from 'mn-angular-lib/core';\n\nexport type MnAlertTemplateContext = {\n $implicit: MnAlert;\n alert: MnAlert;\n dismiss: () => void;\n}\n\n/**\n * A view-owned wrapper around a single {@link MnAlert}. The store's list is the source\n * of truth for which alerts *exist*; this outlet mirrors it into `views` so a removed\n * alert can play a leave animation (swipe-fling or fade + height-collapse) before its\n * node is actually dropped, rather than vanishing instantly.\n */\ntype MnAlertView = {\n alert: MnAlert;\n /** True once the alert has left the store — the node is animating out and will be removed. */\n leaving: boolean;\n /** True while the user is actively dragging this card (disables the snap transition). */\n dragging: boolean;\n /** Live drag offset (px) along the active swipe axis while swiping. */\n drag: number;\n /** Final offset (px) along the swipe axis the card flings to when a swipe dismisses it. */\n fling: number;\n};\n\n@Component({\n selector: 'mn-alert-outlet',\n standalone: true,\n imports: [CommonModule, MnButton],\n templateUrl: './mn-alert-outlet.html',\n styleUrl: './mn-alert-outlet.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MnAlertOutletComponent {\n private readonly lang = inject(MnLanguageService);\n private readonly store = inject(MnAlertStore);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Drag distance (px) past which a release dismisses regardless of speed. */\n private static readonly SWIPE_DISMISS_THRESHOLD = 96;\n /** Release speed (px/ms) above which a short drag still dismisses — a \"flick\". */\n private static readonly FLICK_VELOCITY = 0.4;\n /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */\n private static readonly FLICK_MIN_DISTANCE = 24;\n /** Upper bound for the leave wait; kept a touch longer than the CSS exit so removal never\n * preempts the animation. Mirrored by the `--mn-alert-exit` duration in the stylesheet. */\n private static readonly EXIT_MS = 320;\n /** Opacity floor a card fades to at the dismiss threshold, for drag feedback. */\n private static readonly DRAG_OPACITY_FLOOR = 0.35;\n\n /**\n * How the dismiss swipe is oriented:\n * - `'auto'` (default) matches the host platform's convention — Apple platforms\n * (iOS/iPadOS/macOS) flick a top banner *upward*, so we swipe vertically; Android (and\n * every other platform) dismisses toasts *to the right*, so we swipe horizontally.\n *\n * Either axis is one-directional: only an upward (vertical) or rightward (horizontal)\n * drag dismisses; dragging the opposite way springs the card back.\n * - `'vertical'` / `'horizontal'` force the axis regardless of platform. Useful when the\n * host can't be sniffed reliably (e.g. Chrome DevTools *Responsive* mode does not spoof\n * the user agent, so `'auto'` there resolves to the desktop/Android horizontal axis).\n */\n @Input() swipeAxis: 'auto' | 'vertical' | 'horizontal' = 'auto';\n\n /** Whether the running device is an Apple platform. Sniffed once from `navigator` at\n * construction (the UA is read at page load and does not change mid-session). */\n private readonly isApple = this.detectApple();\n\n /** The resolved swipe axis: the explicit {@link swipeAxis} override, or the platform\n * default when left on `'auto'`. */\n private get vertical(): boolean {\n if (this.swipeAxis === 'vertical') return true;\n if (this.swipeAxis === 'horizontal') return false;\n return this.isApple;\n }\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnAlert.close` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get closeLabel(): string {\n return this.lang.translateIfPresent('mnAlert.close') ?? 'Close';\n }\n\n @Input() template?: TemplateRef<MnAlertTemplateContext>;\n\n /** The view-layer mirror of the store's alerts, retaining alerts mid-leave. A signal so\n * writes from the (external) store subscription and leave timers schedule change\n * detection in a zoneless app. */\n readonly views = signal<MnAlertView[]>([]);\n\n /**\n * `touch-action` for the swipe wrapper: reserve the swipe axis for our gesture while\n * leaving the cross-axis to the browser. Vertical swipe (Apple) claims the Y axis\n * (`pan-x`); horizontal swipe (Android/other) claims the X axis (`pan-y`).\n */\n get touchAction(): string {\n return this.vertical ? 'pan-x' : 'pan-y';\n }\n\n /** In-flight leave-removal timers, keyed by alert id, cleared on destroy so a fired\n * timer never touches a torn-down view. */\n private readonly exitTimers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** The single active swipe, or null. Only one card is dragged at a time. `startCoord`\n * and the samples are taken along the active axis (Y when vertical, else X). */\n private activeDrag: {\n view: MnAlertView;\n startCoord: number;\n lastSample: { c: number; t: number };\n prevSample: { c: number; t: number };\n } | null = null;\n\n constructor() {\n this.store.alerts$\n .pipe(takeUntilDestroyed())\n .subscribe(alerts => this.sync(alerts));\n\n this.destroyRef.onDestroy(() => {\n this.exitTimers.forEach(t => clearTimeout(t));\n this.exitTimers.clear();\n });\n }\n\n trackById = (_: number, v: MnAlertView) => v.alert.id;\n\n getAlertClasses(a: MnAlert) {\n return mnAlertVariants({kind: a.kind, variant: a.variant});\n }\n\n /**\n * The lifetime (ms) to run the countdown bar over, or null when no bar should show: an alert\n * that never auto-dismisses has nothing to count down, and one already leaving would only\n * restart the animation mid-exit.\n */\n countdownDuration(v: MnAlertView): number | null {\n if (v.leaving) return null;\n const duration = v.alert.duration;\n return typeof duration === 'number' && duration > 0 ? duration : null;\n }\n\n contextFor(a: MnAlert) {\n return {\n $implicit: a,\n alert: a,\n dismiss: () => this.dismissAlert(a.id)\n } as const;\n }\n\n /** Dismisses via the store; the store's removal is turned into a leave animation by\n * {@link sync}. Used by the close button and the custom-template `dismiss` context. */\n dismissAlert(id: MnAlertId) {\n this.store.dismiss(id);\n }\n\n // =========================\n // Store → view reconciliation\n // =========================\n\n /** Reconciles the view list against the store: appends new alerts, updates the alert\n * reference for still-present ones, and marks vanished ones as leaving (they stay in the\n * list, animating out, until their removal timer fires). */\n private sync(alerts: MnAlert[]): void {\n const current = this.views();\n const existing = new Set(current.map(v => v.alert.id));\n const storeById = new Map(alerts.map(a => [a.id, a]));\n\n const next: MnAlertView[] = [];\n for (const v of current) {\n const fresh = storeById.get(v.alert.id);\n if (fresh) {\n v.alert = fresh;\n } else if (!v.leaving) {\n this.beginLeave(v);\n }\n next.push(v);\n }\n for (const a of alerts) {\n if (!existing.has(a.id)) {\n next.push({alert: a, leaving: false, dragging: false, drag: 0, fling: 0});\n }\n }\n this.views.set(next);\n }\n\n /** Flags a view as leaving and schedules its removal once the exit animation has run.\n * Idempotent: a card already leaving (e.g. flung by a swipe) is left untouched, so a\n * synchronous store re-emit cannot overwrite the swipe direction with the default fade. */\n private beginLeave(v: MnAlertView, fling?: number): void {\n if (v.leaving) return;\n v.leaving = true;\n v.dragging = false;\n if (fling !== undefined) v.fling = fling;\n\n const delay = this.prefersReducedMotion() ? 0 : MnAlertOutletComponent.EXIT_MS;\n const timer = setTimeout(() => this.removeView(v.alert.id), delay);\n this.exitTimers.set(v.alert.id, timer);\n }\n\n private removeView(id: MnAlertId): void {\n const timer = this.exitTimers.get(id);\n if (timer) {\n clearTimeout(timer);\n this.exitTimers.delete(id);\n }\n this.views.update(list => list.filter(v => v.alert.id !== id));\n }\n\n // =========================\n // Swipe-to-dismiss\n // =========================\n\n onPointerDown(event: PointerEvent, v: MnAlertView): void {\n if (v.leaving) return;\n // Don't hijack a press that begins on an interactive control inside the alert.\n if ((event.target as HTMLElement).closest('button, a, input, textarea, select')) return;\n if (event.button !== undefined && event.button !== 0) return;\n\n const coord = this.axisCoord(event);\n this.activeDrag = {\n view: v,\n startCoord: coord,\n lastSample: {c: coord, t: event.timeStamp},\n prevSample: {c: coord, t: event.timeStamp},\n };\n v.dragging = true;\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n }\n\n onPointerMove(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n const delta = this.axisCoord(event) - drag.startCoord;\n // Dismissal is one-directional: vertical (Apple) tracks upward only (clamp ≤ 0),\n // horizontal (Android/other) tracks rightward only (clamp ≥ 0). A drag the other way\n // rests at 0 and springs back.\n v.drag = this.vertical ? Math.min(0, delta) : Math.max(0, delta);\n drag.prevSample = drag.lastSample;\n drag.lastSample = {c: this.axisCoord(event), t: event.timeStamp};\n }\n\n onPointerUp(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n this.activeDrag = null;\n v.dragging = false;\n\n if (this.shouldDismiss(drag, v)) {\n // Fling the card the rest of the way off its edge, then dismiss through the store.\n // Vertical flings upward (off the top); horizontal flings rightward (off the right).\n const extent = this.viewportExtent() + Math.abs(v.drag);\n const fling = this.vertical ? -extent : extent;\n this.beginLeave(v, fling);\n this.store.dismiss(v.alert.id);\n } else {\n // Snap back to rest; the wrapper's transition eases the offset → 0.\n v.drag = 0;\n }\n // Notify: pointerup is template-bound (schedules CD), but the leave/snap mutations live\n // on the view object — re-set the signal so the new transform is reflected reliably.\n this.views.update(list => [...list]);\n }\n\n private shouldDismiss(\n drag: NonNullable<typeof this.activeDrag>,\n v: MnAlertView\n ): boolean {\n if (Math.abs(v.drag) > MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD) return true;\n const dt = drag.lastSample.t - drag.prevSample.t;\n const velocity = dt > 0 ? Math.abs(drag.lastSample.c - drag.prevSample.c) / dt : 0;\n return velocity > MnAlertOutletComponent.FLICK_VELOCITY\n && Math.abs(v.drag) > MnAlertOutletComponent.FLICK_MIN_DISTANCE;\n }\n\n // =========================\n // Template style helpers\n // =========================\n\n /** Offset transform for a card: the fling target while leaving via swipe, otherwise the\n * live drag offset, translated along the active axis. Returns null when neither applies,\n * letting the stylesheet own the default (fade-in-place) leave. */\n itemTransform(v: MnAlertView): string | null {\n if (v.leaving) {\n return v.fling !== 0 ? this.translate(v.fling) : null;\n }\n return v.drag !== 0 ? this.translate(v.drag) : null;\n }\n\n /** Fades a card toward a floor as it is dragged toward the dismiss threshold. Null (CSS\n * owns opacity) when at rest or leaving. */\n itemOpacity(v: MnAlertView): number | null {\n if (v.leaving || !v.dragging || v.drag === 0) return null;\n const progress = Math.min(Math.abs(v.drag) / MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD, 1);\n return 1 - progress * (1 - MnAlertOutletComponent.DRAG_OPACITY_FLOOR);\n }\n\n private translate(px: number): string {\n return this.vertical ? `translateY(${px}px)` : `translateX(${px}px)`;\n }\n\n private axisCoord(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private viewportExtent(): number {\n if (typeof window === 'undefined') return 400;\n return this.vertical ? window.innerHeight : window.innerWidth;\n }\n\n /** Whether the current device runs an Apple OS (iOS/iPadOS/macOS). iPadOS 13+ masquerades\n * as a Mac, so it is caught by the touch-capable-Mac branch. */\n private detectApple(): boolean {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent ?? '';\n const platform = navigator.platform ?? '';\n const isIOS = /iP(hone|ad|od)/.test(platform) || /iPad|iPhone|iPod/.test(ua);\n const isTouchMac = /Mac/.test(platform + ' ' + ua)\n && typeof document !== 'undefined' && 'ontouchend' in document;\n const isMac = /Mac/.test(ua);\n return isIOS || isTouchMac || isMac;\n }\n\n private prefersReducedMotion(): boolean {\n return typeof window !== 'undefined'\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n}\n","<!-- The stack is a polite live region so every toast is announced; an error toast upgrades itself to an alert. -->\n<div aria-live=\"polite\" role=\"status\" class=\"fixed top-4 left-0 right-0 z-[9999] flex flex-col w-full px-2 sm:px-0 sm:left-auto sm:right-4 sm:max-w-sm\">\n @for (v of views(); track trackById($index, v)) {\n <div\n class=\"mn-alert-item\"\n [attr.role]=\"v.alert.kind === 'error' ? 'alert' : null\"\n [class.dragging]=\"v.dragging\"\n [class.leaving]=\"v.leaving\"\n [style.touch-action]=\"touchAction\"\n [style.transform]=\"itemTransform(v)\"\n [style.opacity]=\"itemOpacity(v)\"\n (pointerdown)=\"onPointerDown($event, v)\"\n (pointermove)=\"onPointerMove($event, v)\"\n (pointerup)=\"onPointerUp($event, v)\"\n (pointercancel)=\"onPointerUp($event, v)\"\n >\n <div class=\"mn-alert-inner\">\n @if (template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(v.alert)\">\n </ng-container>\n } @else {\n <div [class.extra]=\"v.alert.cssClass\" [class]=\"getAlertClasses(v.alert)\" class=\"relative overflow-hidden\">\n <div class=\"flex-1 min-w-0 pr-8\">\n <h4 class=\"font-semibold text-sm\">{{ v.alert.title }}</h4>\n @if (v.alert.subTitle) {\n <p class=\"text-sm mt-1 opacity-90 leading-tight\">{{ v.alert.subTitle }}</p>\n }\n </div>\n <button\n [attr.aria-label]=\"closeLabel\"\n mnButton\n [data]=\"{ size: 'md', variant: 'text' }\"\n (click)=\"dismissAlert(v.alert.id)\"\n class=\"absolute top-2 right-2 shrink-0 !text-current hover:!bg-current/10\"\n type=\"button\"\n >\n ×\n </button>\n @if (countdownDuration(v); as ms) {\n <span aria-hidden=\"true\" class=\"mn-alert-progress\">\n <span [style.animation-duration.ms]=\"ms\" class=\"mn-alert-progress-bar\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n</div>\n","/**\n * Public API of the `mn-angular-lib/alert` entry point: toast alerts.\n *\n * Each entry point is its own module in the published package, so a consumer's bundler\n * splits it into the chunk that uses it instead of loading the whole library at startup.\n * The root `mn-angular-lib` entry re-exports every entry point.\n */\nexport * from './src/mn-alert';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;MAmBa,eAAe,GAAG,IAAI,cAAc,CAAgB,iBAAiB;AAE3E,MAAM,uBAAuB,GAA4B;IAC9D,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;AACnF,IAAA,UAAU,EAAE;AACV,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,OAAO,EAAE;AACV,KAAA;AACD,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,QAAQ,EAAE,CAAC,CAAC,KAAK;;;AC7Bb,SAAU,eAAe,CAAC,MAAA,GAAwB,EAAE,EAAA;AACxD,IAAA,MAAM,MAAM,GAA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C7B,eAAA,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC,OAAO;IACpE;uGAtSW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzCnC,mrEAmDA,EAAA,MAAA,EAAA,CAAA,4qCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDfY,YAAY,sMAAE,QAAQ,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAKrB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA,eAAA,EAGhB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mrEAAA,EAAA,MAAA,EAAA,CAAA,4qCAAA,CAAA,EAAA;;sBA+B9C;;sBAuBA;;;AE7FH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mn-angular-lib-alert.mjs","sources":["../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.tokens.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.providers.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.store.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.service.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alertVariants.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.html","../../../projects/mn-angular-lib/alert/public-api.ts","../../../projects/mn-angular-lib/alert/mn-angular-lib-alert.ts"],"sourcesContent":["// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.tokens.ts\nimport {InjectionToken} from '@angular/core';\nimport {MnAlert} from './mn-alert.types';\n\nexport type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';\n\nexport type MnAlertConfig = {\n durations?: Partial<Record<MnAlertKind, number | null>>;\n cssClasses?: Partial<Record<MnAlertKind, string>>;\n icons?: Partial<Record<MnAlertKind, unknown>>;\n fallbackDuration?: number | null;\n /**\n * How many alerts may be on screen at once. Showing one past this cap drops the oldest\n * alert still visible, so a burst of alerts never grows into an unreadable stack.\n */\n maxVisible?: number;\n finalize?: (a: MnAlert) => MnAlert;\n}\n\nexport const MN_ALERT_CONFIG = new InjectionToken<MnAlertConfig>('MN_ALERT_CONFIG');\n\nexport const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig> = {\n durations: { success: 3000, info: 4000, warning: 5000, error: 7000, default: 4000 },\n cssClasses: {\n success: 'mn-alert-success',\n info: 'mn-alert-info',\n warning: 'mn-alert-warning',\n error: 'mn-alert-error',\n default: 'alert'\n },\n icons: {},\n fallbackDuration: 4000,\n maxVisible: 3,\n finalize: (a) => a\n};\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.providers.ts\nimport { Provider } from '@angular/core';\nimport { MN_ALERT_CONFIG, MnAlertConfig, DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nexport function provideMnAlerts(config: MnAlertConfig = {}): Provider {\n const merged: MnAlertConfig = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...config,\n durations: { ...DEFAULT_MN_ALERT_CONFIG.durations, ...(config.durations ?? {}) },\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(config.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(config.icons ?? {}) }\n };\n return { provide: MN_ALERT_CONFIG, useValue: merged };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {MnAlert, MnAlertId} from './mn-alert.types';\nimport {DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MnAlertConfig} from './mn-alert.tokens';\n\nlet COUNTER = 0;\nconst uid = () => `mn_${++COUNTER}`;\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertStore {\n private readonly _alerts$ = new BehaviorSubject<MnAlert[]>([]);\n readonly alerts$ = this._alerts$.asObservable();\n\n /** Host configuration, when the app provided one. Only `maxVisible` is read here — the\n * per-kind durations are resolved by {@link MnAlertService} before an alert reaches the store. */\n private readonly cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n /** In-flight auto-dismiss timers keyed by alert id, so an alert that leaves early (dismissed\n * by hand, or pushed out by the visible cap) never fires a stale timeout later. */\n private readonly timers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** How many alerts stay on screen at once; showing more drops the oldest ones. */\n private get maxVisible(): number {\n const configured = this.cfg?.maxVisible;\n return typeof configured === 'number' && configured > 0\n ? configured\n : DEFAULT_MN_ALERT_CONFIG.maxVisible;\n }\n\n show(partial: Omit<MnAlert, 'id'>): MnAlertId {\n // Ensure every alert has a numeric duration: use provided or fall back to per-kind default\n const computedDuration = (partial as {\n duration?: number\n }).duration ?? (DEFAULT_MN_ALERT_CONFIG.durations as Record<string, number>)[(partial as {\n kind?: string\n }).kind ?? ''] ?? DEFAULT_MN_ALERT_CONFIG.fallbackDuration;\n const a: MnAlert = { id: uid(), ...partial, duration: computedDuration } as MnAlert;\n\n // Newest alert last; anything beyond the cap is trimmed off the front (the oldest still\n // visible), so a burst of alerts scrolls rather than piling up.\n const queued = [...this._alerts$.value, a];\n const overflow = queued.length - this.maxVisible;\n if (overflow > 0) {\n queued.splice(0, overflow).forEach(dropped => this.clearTimer(dropped.id));\n }\n this._alerts$.next(queued);\n\n if (typeof a.duration === 'number' && a.duration > 0) {\n this.timers.set(a.id, setTimeout(() => this.dismiss(a.id), a.duration));\n }\n return a.id;\n }\n\n dismiss(id: MnAlertId) {\n const list = this._alerts$.value;\n if (list.some(x => x.id === id)) {\n this.clearTimer(id);\n this._alerts$.next(list.filter(x => x.id !== id));\n }\n }\n\n clear() {\n this.timers.forEach(t => clearTimeout(t));\n this.timers.clear();\n this._alerts$.next([]);\n }\n\n private clearTimer(id: MnAlertId) {\n const timer = this.timers.get(id);\n if (timer !== undefined) {\n clearTimeout(timer);\n this.timers.delete(id);\n }\n }\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.service.ts\nimport {Injectable, inject} from '@angular/core';\nimport { MnAlertStore } from './mn-alert.store';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { MN_ALERT_CONFIG, DEFAULT_MN_ALERT_CONFIG, MnAlertConfig, MnAlertKind } from './mn-alert.tokens';\nimport { MnAlertVariants } from './mn-alertVariants';\n\nexport type MnShowInput = {\n title: string;\n subTitle?: string;\n duration?: number;\n icon?: unknown;\n cssClass?: string;\n meta?: Record<string, unknown>;\n kind: MnAlertKind;\n variant?: MnAlertVariants['variant'];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertService {\n private readonly store = inject(MnAlertStore);\n\n private readonly cfg: Required<MnAlertConfig>;\n private readonly userDurations?: Partial<Record<MnAlertKind, number | null>>;\n private readonly hasUserDurations: boolean;\n\n constructor() {\n const cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n this.userDurations = cfg?.durations;\n this.hasUserDurations = !!cfg?.durations;\n this.cfg = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...(cfg ?? {}),\n // Do not pre-merge durations; keep defaults separate and use logic in kind()\n durations: DEFAULT_MN_ALERT_CONFIG.durations,\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(cfg?.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(cfg?.icons ?? {}) }\n };\n }\n\n show(input: MnShowInput): MnAlertId {\n // Always ensure a numeric duration is set\n let duration = input.duration;\n if (duration == null) {\n // Prefer user defaultDuration if provided and not null, otherwise use library per-kind default\n const userDefault = this.cfg.fallbackDuration;\n if (typeof userDefault === 'number') {\n duration = userDefault;\n } else {\n duration = DEFAULT_MN_ALERT_CONFIG.durations[input.kind as keyof typeof DEFAULT_MN_ALERT_CONFIG.durations] as number;\n }\n }\n\n const a: Omit<MnAlert, 'id'> = {\n title: input.title,\n subTitle: input.subTitle,\n duration,\n icon: input.icon,\n cssClass: input.cssClass,\n meta: input.meta,\n kind: input.kind,\n variant: input.variant\n };\n return this.store.show(this.cfg.finalize(a as MnAlert));\n }\n\n success(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('success', title, subTitle, extra);\n }\n info(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('info', title, subTitle, extra);\n }\n warning(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('warning', title, subTitle, extra);\n }\n error(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('error', title, subTitle, extra);\n }\n\n dismiss(id: MnAlertId) { this.store.dismiss(id); }\n clear() { this.store.clear(); }\n\n private kind(kind: MnAlertKind, title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n let duration: number | null | undefined = extra?.duration;\n\n if (duration == null) {\n if (this.hasUserDurations) {\n const userDur = this.userDurations?.[kind];\n if (typeof userDur === 'number') {\n duration = userDur;\n } else {\n // userDur is undefined or null -> fallback to user defaultDuration if numeric\n if (typeof this.cfg.fallbackDuration === 'number') {\n duration = this.cfg.fallbackDuration;\n } else {\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n } else {\n // No user durations provided at all; use library defaults per kind\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n\n const cssClass = extra?.cssClass ?? this.cfg.cssClasses[kind];\n const icon = (extra?.icon ?? this.cfg.icons[kind]) as unknown;\n const variant = extra?.variant;\n\n return this.show({ title, subTitle, duration: duration as number, cssClass, icon, meta: extra?.meta , kind: kind, variant});\n }\n}\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnAlertVariants = tv({\n base: 'flex items-start gap-3 p-4 border rounded-xl shadow-sm transition-all duration-300 w-full ',\n variants: {\n kind: {\n success: 'bg-success/10 border-success/30 text-success',\n info: 'bg-info/10 border-info/30 text-info',\n warning: 'bg-warning/10 border-warning/30 text-warning',\n error: 'bg-error/10 border-error/30 text-error',\n default: 'bg-base-100 border-base-300 text-base-content',\n accent: 'bg-accent/10 border-accent/30 text-accent',\n },\n variant: {\n fill: '',\n outline: 'bg-base-200 border-2',\n soft: 'border-none shadow-none',\n }\n },\n compoundVariants: [\n {\n kind: 'success',\n variant: 'fill',\n class: 'bg-success border-success text-success-content'\n },\n {\n kind: 'info',\n variant: 'fill',\n class: 'bg-info border-info text-info-content'\n },\n {\n kind: 'warning',\n variant: 'fill',\n class: 'bg-warning border-warning text-warning-content'\n },\n {\n kind: 'error',\n variant: 'fill',\n class: 'bg-error border-error text-error-content'\n },\n {\n kind: 'accent',\n variant: 'fill',\n class: 'bg-accent border-accent text-accent-content'\n },\n ],\n defaultVariants: {\n kind: 'info',\n variant: 'soft'\n }\n});\n\nexport type MnAlertVariants = VariantProps<typeof mnAlertVariants>;\n","import {ChangeDetectionStrategy, Component, DestroyRef, inject, Input, signal, TemplateRef,} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {CommonModule} from '@angular/common';\nimport {MnAlertStore} from '../mn-alert.store';\nimport {MnAlert, MnAlertId} from '../mn-alert.types';\nimport {mnAlertVariants} from '../mn-alertVariants';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnLanguageService} from 'mn-angular-lib/core';\n\nexport type MnAlertTemplateContext = {\n $implicit: MnAlert;\n alert: MnAlert;\n dismiss: () => void;\n}\n\n/**\n * A view-owned wrapper around a single {@link MnAlert}. The store's list is the source\n * of truth for which alerts *exist*; this outlet mirrors it into `views` so a removed\n * alert can play a leave animation (swipe-fling or fade + height-collapse) before its\n * node is actually dropped, rather than vanishing instantly.\n */\ntype MnAlertView = {\n alert: MnAlert;\n /** True once the alert has left the store — the node is animating out and will be removed. */\n leaving: boolean;\n /** True while the user is actively dragging this card (disables the snap transition). */\n dragging: boolean;\n /** Live drag offset (px) along the active swipe axis while swiping. */\n drag: number;\n /** Final offset (px) along the swipe axis the card flings to when a swipe dismisses it. */\n fling: number;\n};\n\n@Component({\n selector: 'mn-alert-outlet',\n standalone: true,\n imports: [CommonModule, MnButton],\n templateUrl: './mn-alert-outlet.html',\n styleUrl: './mn-alert-outlet.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MnAlertOutletComponent {\n private readonly lang = inject(MnLanguageService);\n private readonly store = inject(MnAlertStore);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Drag distance (px) past which a release dismisses regardless of speed. */\n private static readonly SWIPE_DISMISS_THRESHOLD = 96;\n /** Release speed (px/ms) above which a short drag still dismisses — a \"flick\". */\n private static readonly FLICK_VELOCITY = 0.4;\n /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */\n private static readonly FLICK_MIN_DISTANCE = 24;\n /** Upper bound for the leave wait; kept a touch longer than the CSS exit so removal never\n * preempts the animation. Mirrored by the `--mn-alert-exit` duration in the stylesheet. */\n private static readonly EXIT_MS = 320;\n /** Opacity floor a card fades to at the dismiss threshold, for drag feedback. */\n private static readonly DRAG_OPACITY_FLOOR = 0.35;\n\n /**\n * How the dismiss swipe is oriented:\n * - `'auto'` (default) matches the host platform's convention — Apple platforms\n * (iOS/iPadOS/macOS) flick a top banner *upward*, so we swipe vertically; Android (and\n * every other platform) dismisses toasts *to the right*, so we swipe horizontally.\n *\n * Either axis is one-directional: only an upward (vertical) or rightward (horizontal)\n * drag dismisses; dragging the opposite way springs the card back.\n * - `'vertical'` / `'horizontal'` force the axis regardless of platform. Useful when the\n * host can't be sniffed reliably (e.g. Chrome DevTools *Responsive* mode does not spoof\n * the user agent, so `'auto'` there resolves to the desktop/Android horizontal axis).\n */\n @Input() swipeAxis: 'auto' | 'vertical' | 'horizontal' = 'auto';\n\n /** Whether the running device is an Apple platform. Sniffed once from `navigator` at\n * construction (the UA is read at page load and does not change mid-session). */\n private readonly isApple = this.detectApple();\n\n /** The resolved swipe axis: the explicit {@link swipeAxis} override, or the platform\n * default when left on `'auto'`. */\n private get vertical(): boolean {\n if (this.swipeAxis === 'vertical') return true;\n if (this.swipeAxis === 'horizontal') return false;\n return this.isApple;\n }\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnAlert.close` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get closeLabel(): string {\n return this.lang.translateIfPresent('mnAlert.close') ?? 'Close';\n }\n\n @Input() template?: TemplateRef<MnAlertTemplateContext>;\n\n /** The view-layer mirror of the store's alerts, retaining alerts mid-leave. A signal so\n * writes from the (external) store subscription and leave timers schedule change\n * detection in a zoneless app. */\n readonly views = signal<MnAlertView[]>([]);\n\n /**\n * `touch-action` for the swipe wrapper: reserve the swipe axis for our gesture while\n * leaving the cross-axis to the browser. Vertical swipe (Apple) claims the Y axis\n * (`pan-x`); horizontal swipe (Android/other) claims the X axis (`pan-y`).\n */\n get touchAction(): string {\n return this.vertical ? 'pan-x' : 'pan-y';\n }\n\n /** In-flight leave-removal timers, keyed by alert id, cleared on destroy so a fired\n * timer never touches a torn-down view. */\n private readonly exitTimers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** The single active swipe, or null. Only one card is dragged at a time. `startCoord`\n * and the samples are taken along the active axis (Y when vertical, else X). */\n private activeDrag: {\n view: MnAlertView;\n startCoord: number;\n lastSample: { c: number; t: number };\n prevSample: { c: number; t: number };\n } | null = null;\n\n constructor() {\n this.store.alerts$\n .pipe(takeUntilDestroyed())\n .subscribe(alerts => this.sync(alerts));\n\n this.destroyRef.onDestroy(() => {\n this.exitTimers.forEach(t => clearTimeout(t));\n this.exitTimers.clear();\n });\n }\n\n trackById = (_: number, v: MnAlertView) => v.alert.id;\n\n getAlertClasses(a: MnAlert) {\n return mnAlertVariants({kind: a.kind, variant: a.variant});\n }\n\n /**\n * The lifetime (ms) to run the countdown bar over, or null when no bar should show: an alert\n * that never auto-dismisses has nothing to count down, and one already leaving would only\n * restart the animation mid-exit.\n */\n countdownDuration(v: MnAlertView): number | null {\n if (v.leaving) return null;\n const duration = v.alert.duration;\n return typeof duration === 'number' && duration > 0 ? duration : null;\n }\n\n contextFor(a: MnAlert) {\n return {\n $implicit: a,\n alert: a,\n dismiss: () => this.dismissAlert(a.id)\n } as const;\n }\n\n /** Dismisses via the store; the store's removal is turned into a leave animation by\n * {@link sync}. Used by the close button and the custom-template `dismiss` context. */\n dismissAlert(id: MnAlertId) {\n this.store.dismiss(id);\n }\n\n // =========================\n // Store → view reconciliation\n // =========================\n\n /** Reconciles the view list against the store: appends new alerts, updates the alert\n * reference for still-present ones, and marks vanished ones as leaving (they stay in the\n * list, animating out, until their removal timer fires). */\n private sync(alerts: MnAlert[]): void {\n const current = this.views();\n const existing = new Set(current.map(v => v.alert.id));\n const storeById = new Map(alerts.map(a => [a.id, a]));\n\n const next: MnAlertView[] = [];\n for (const v of current) {\n const fresh = storeById.get(v.alert.id);\n if (fresh) {\n v.alert = fresh;\n } else if (!v.leaving) {\n this.beginLeave(v);\n }\n next.push(v);\n }\n for (const a of alerts) {\n if (!existing.has(a.id)) {\n next.push({alert: a, leaving: false, dragging: false, drag: 0, fling: 0});\n }\n }\n this.views.set(next);\n }\n\n /** Flags a view as leaving and schedules its removal once the exit animation has run.\n * Idempotent: a card already leaving (e.g. flung by a swipe) is left untouched, so a\n * synchronous store re-emit cannot overwrite the swipe direction with the default fade. */\n private beginLeave(v: MnAlertView, fling?: number): void {\n if (v.leaving) return;\n v.leaving = true;\n v.dragging = false;\n if (fling !== undefined) v.fling = fling;\n\n const delay = this.prefersReducedMotion() ? 0 : MnAlertOutletComponent.EXIT_MS;\n const timer = setTimeout(() => this.removeView(v.alert.id), delay);\n this.exitTimers.set(v.alert.id, timer);\n }\n\n private removeView(id: MnAlertId): void {\n const timer = this.exitTimers.get(id);\n if (timer) {\n clearTimeout(timer);\n this.exitTimers.delete(id);\n }\n this.views.update(list => list.filter(v => v.alert.id !== id));\n }\n\n // =========================\n // Swipe-to-dismiss\n // =========================\n\n onPointerDown(event: PointerEvent, v: MnAlertView): void {\n if (v.leaving) return;\n // Don't hijack a press that begins on an interactive control inside the alert.\n if ((event.target as HTMLElement).closest('button, a, input, textarea, select')) return;\n if (event.button !== undefined && event.button !== 0) return;\n\n const coord = this.axisCoord(event);\n this.activeDrag = {\n view: v,\n startCoord: coord,\n lastSample: {c: coord, t: event.timeStamp},\n prevSample: {c: coord, t: event.timeStamp},\n };\n v.dragging = true;\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n }\n\n onPointerMove(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n const delta = this.axisCoord(event) - drag.startCoord;\n // Dismissal is one-directional: vertical (Apple) tracks upward only (clamp ≤ 0),\n // horizontal (Android/other) tracks rightward only (clamp ≥ 0). A drag the other way\n // rests at 0 and springs back.\n v.drag = this.vertical ? Math.min(0, delta) : Math.max(0, delta);\n drag.prevSample = drag.lastSample;\n drag.lastSample = {c: this.axisCoord(event), t: event.timeStamp};\n }\n\n onPointerUp(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n this.activeDrag = null;\n v.dragging = false;\n\n if (this.shouldDismiss(drag, v)) {\n // Fling the card the rest of the way off its edge, then dismiss through the store.\n // Vertical flings upward (off the top); horizontal flings rightward (off the right).\n const extent = this.viewportExtent() + Math.abs(v.drag);\n const fling = this.vertical ? -extent : extent;\n this.beginLeave(v, fling);\n this.store.dismiss(v.alert.id);\n } else {\n // Snap back to rest; the wrapper's transition eases the offset → 0.\n v.drag = 0;\n }\n // Notify: pointerup is template-bound (schedules CD), but the leave/snap mutations live\n // on the view object — re-set the signal so the new transform is reflected reliably.\n this.views.update(list => [...list]);\n }\n\n private shouldDismiss(\n drag: NonNullable<typeof this.activeDrag>,\n v: MnAlertView\n ): boolean {\n if (Math.abs(v.drag) > MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD) return true;\n const dt = drag.lastSample.t - drag.prevSample.t;\n const velocity = dt > 0 ? Math.abs(drag.lastSample.c - drag.prevSample.c) / dt : 0;\n return velocity > MnAlertOutletComponent.FLICK_VELOCITY\n && Math.abs(v.drag) > MnAlertOutletComponent.FLICK_MIN_DISTANCE;\n }\n\n // =========================\n // Template style helpers\n // =========================\n\n /** Offset transform for a card: the fling target while leaving via swipe, otherwise the\n * live drag offset, translated along the active axis. Returns null when neither applies,\n * letting the stylesheet own the default (fade-in-place) leave. */\n itemTransform(v: MnAlertView): string | null {\n if (v.leaving) {\n return v.fling !== 0 ? this.translate(v.fling) : null;\n }\n return v.drag !== 0 ? this.translate(v.drag) : null;\n }\n\n /** Fades a card toward a floor as it is dragged toward the dismiss threshold. Null (CSS\n * owns opacity) when at rest or leaving. */\n itemOpacity(v: MnAlertView): number | null {\n if (v.leaving || !v.dragging || v.drag === 0) return null;\n const progress = Math.min(Math.abs(v.drag) / MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD, 1);\n return 1 - progress * (1 - MnAlertOutletComponent.DRAG_OPACITY_FLOOR);\n }\n\n private translate(px: number): string {\n return this.vertical ? `translateY(${px}px)` : `translateX(${px}px)`;\n }\n\n private axisCoord(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private viewportExtent(): number {\n if (typeof window === 'undefined') return 400;\n return this.vertical ? window.innerHeight : window.innerWidth;\n }\n\n /** Whether the current device runs an Apple OS (iOS/iPadOS/macOS). iPadOS 13+ masquerades\n * as a Mac, so it is caught by the touch-capable-Mac branch. */\n private detectApple(): boolean {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent ?? '';\n const platform = navigator.platform ?? '';\n const isIOS = /iP(hone|ad|od)/.test(platform) || /iPad|iPhone|iPod/.test(ua);\n const isTouchMac = /Mac/.test(platform + ' ' + ua)\n && typeof document !== 'undefined' && 'ontouchend' in document;\n const isMac = /Mac/.test(ua);\n return isIOS || isTouchMac || isMac;\n }\n\n private prefersReducedMotion(): boolean {\n return typeof window !== 'undefined'\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n}\n","<!-- The stack is a polite live region so every toast is announced; an error toast upgrades itself to an alert. -->\n<div aria-live=\"polite\" role=\"status\" class=\"fixed top-4 left-0 right-0 z-[9999] flex flex-col w-full px-2 sm:px-0 sm:left-auto sm:right-4 sm:max-w-sm\">\n @for (v of views(); track trackById($index, v)) {\n <div\n class=\"mn-alert-item\"\n [attr.role]=\"v.alert.kind === 'error' ? 'alert' : null\"\n [class.dragging]=\"v.dragging\"\n [class.leaving]=\"v.leaving\"\n [style.touch-action]=\"touchAction\"\n [style.transform]=\"itemTransform(v)\"\n [style.opacity]=\"itemOpacity(v)\"\n (pointerdown)=\"onPointerDown($event, v)\"\n (pointermove)=\"onPointerMove($event, v)\"\n (pointerup)=\"onPointerUp($event, v)\"\n (pointercancel)=\"onPointerUp($event, v)\"\n >\n <div class=\"mn-alert-inner\">\n @if (template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(v.alert)\">\n </ng-container>\n } @else {\n <div [class.extra]=\"v.alert.cssClass\" [class]=\"getAlertClasses(v.alert)\" class=\"relative overflow-hidden\">\n <div class=\"flex-1 min-w-0 pr-8\">\n <h4 class=\"font-semibold text-sm\">{{ v.alert.title }}</h4>\n @if (v.alert.subTitle) {\n <p class=\"text-sm mt-1 opacity-90 leading-tight\">{{ v.alert.subTitle }}</p>\n }\n </div>\n <button\n [attr.aria-label]=\"closeLabel\"\n mnButton\n [data]=\"{ size: 'md', variant: 'text' }\"\n (click)=\"dismissAlert(v.alert.id)\"\n class=\"absolute top-2 right-2 shrink-0 !text-current hover:!bg-current/10\"\n type=\"button\"\n >\n ×\n </button>\n @if (countdownDuration(v); as ms) {\n <span aria-hidden=\"true\" class=\"mn-alert-progress\">\n <span [style.animation-duration.ms]=\"ms\" class=\"mn-alert-progress-bar\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n</div>\n","/**\n * Public API of the `mn-angular-lib/alert` entry point: toast alerts.\n *\n * Each entry point is its own module in the published package, so a consumer's bundler\n * splits it into the chunk that uses it instead of loading the whole library at startup.\n * The root `mn-angular-lib` entry re-exports every entry point.\n */\nexport * from './src/mn-alert';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;MAmBa,eAAe,GAAG,IAAI,cAAc,CAAgB,iBAAiB;AAE3E,MAAM,uBAAuB,GAA4B;IAC9D,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;AACnF,IAAA,UAAU,EAAE;AACV,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,OAAO,EAAE;AACV,KAAA;AACD,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,gBAAgB,EAAE,IAAI;A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|
|
|
86
86
|
cdr = inject(ChangeDetectorRef);
|
|
87
87
|
el = inject(ElementRef);
|
|
88
88
|
/** The sheet container element, used to measure its height and drive the exit. */
|
|
89
|
-
containerRef = viewChild('container',
|
|
89
|
+
containerRef = viewChild('container', /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "containerRef" }] : /* istanbul ignore next */ []));
|
|
90
91
|
dragStartY = 0;
|
|
91
92
|
/** The two most recent (y, timestamp) pointer samples, for estimating flick velocity.
|
|
92
93
|
* `t` uses the event timestamp (monotonic), so no wall-clock is read. */
|
|
@@ -161,8 +162,8 @@ class MnBottomSheet {
|
|
|
161
162
|
this.portalledHost = null;
|
|
162
163
|
}
|
|
163
164
|
get hostClasses() {
|
|
164
|
-
return `mn-bottom-sheet${this.isDismissing ? ' is-dismissing' : ''}`
|
|
165
|
-
|
|
165
|
+
return (`mn-bottom-sheet${this.isDismissing ? ' is-dismissing' : ''}` +
|
|
166
|
+
`${this.growWithKeyboard ? ' grow-with-keyboard' : ''}`);
|
|
166
167
|
}
|
|
167
168
|
/** Whether the viewport is currently narrow enough for the sheet to accept a swipe. */
|
|
168
169
|
get isNarrow() {
|
|
@@ -237,8 +238,8 @@ class MnBottomSheet {
|
|
|
237
238
|
if (this.sheetDragY > MnBottomSheet.SWIPE_DISMISS_THRESHOLD) {
|
|
238
239
|
return true;
|
|
239
240
|
}
|
|
240
|
-
return this.releaseVelocity() > MnBottomSheet.FLICK_VELOCITY
|
|
241
|
-
|
|
241
|
+
return (this.releaseVelocity() > MnBottomSheet.FLICK_VELOCITY &&
|
|
242
|
+
this.sheetDragY > MnBottomSheet.FLICK_MIN_DISTANCE);
|
|
242
243
|
}
|
|
243
244
|
/** Downward release speed (px/ms) from the last two pointer samples; 0 when unusable. */
|
|
244
245
|
releaseVelocity() {
|
|
@@ -275,13 +276,13 @@ class MnBottomSheet {
|
|
|
275
276
|
/** Waits for the container's exit transition to end, with a reduced-motion short-circuit
|
|
276
277
|
* and a fallback timeout so it always resolves. */
|
|
277
278
|
awaitExit() {
|
|
278
|
-
return new Promise(resolve => {
|
|
279
|
+
return new Promise((resolve) => {
|
|
279
280
|
if (this.prefersReducedMotion()) {
|
|
280
281
|
resolve();
|
|
281
282
|
return;
|
|
282
283
|
}
|
|
283
|
-
const container = this.containerRef()?.nativeElement
|
|
284
|
-
|
|
284
|
+
const container = this.containerRef()?.nativeElement ??
|
|
285
|
+
this.el.nativeElement.querySelector('.mn-sheet-container');
|
|
285
286
|
if (!container) {
|
|
286
287
|
resolve();
|
|
287
288
|
return;
|
|
@@ -303,14 +304,14 @@ class MnBottomSheet {
|
|
|
303
304
|
});
|
|
304
305
|
}
|
|
305
306
|
prefersReducedMotion() {
|
|
306
|
-
return typeof window !== 'undefined'
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
return (typeof window !== 'undefined' &&
|
|
308
|
+
typeof window.matchMedia === 'function' &&
|
|
309
|
+
window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
309
310
|
}
|
|
310
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
311
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
311
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnBottomSheet, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
312
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: MnBottomSheet, isStandalone: true, selector: "mn-bottom-sheet", inputs: { showBackdrop: "showBackdrop", showGrabber: "showGrabber", dismissible: "dismissible", minHeightPx: "minHeightPx", maxHeightVh: "maxHeightVh", containerClass: "containerClass", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", growWithKeyboard: "growWithKeyboard", dismissGuard: "dismissGuard" }, outputs: { dismiss: "dismiss" }, host: { properties: { "class": "this.hostClasses" } }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (showBackdrop) {\n <!-- Dims the page behind the sheet. Tapping it dismisses when the sheet is dismissible. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div (click)=\"onBackdropClick()\" class=\"mn-sheet-backdrop fixed inset-0 z-9998 bg-black/40\"></div>\n}\n\n<div\n #container\n [attr.aria-label]=\"ariaLabelledby ? null : (ariaLabel || null)\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [class.sheet-dragging]=\"isDraggingSheet\"\n [ngClass]=\"containerClass\"\n [style.--mn-sheet-max]=\"maxHeightVh + 'vh'\"\n [style.max-height.vh]=\"maxHeightVh\"\n [style.min-height.px]=\"minHeightPx\"\n [style.transform]=\"sheetDragY ? 'translateY(' + sheetDragY + 'px)' : null\"\n aria-modal=\"true\"\n class=\"mn-sheet-container fixed inset-x-0 bottom-0 z-9999 flex flex-col bg-base-100 border-t border-base-300 rounded-t-2xl shadow-lg\"\n role=\"dialog\"\n tabindex=\"-1\"\n>\n @if (showGrabber) {\n <!-- Drag handle for swipe-to-dismiss. The gesture is armed on the whole handle;\n drags starting on a control inside the projected content are ignored. -->\n <div\n (pointercancel)=\"onSheetPointerUp()\"\n (pointerdown)=\"onSheetPointerDown($event)\"\n (pointermove)=\"onSheetPointerMove($event)\"\n (pointerup)=\"onSheetPointerUp()\"\n class=\"flex justify-center pt-2 pb-1 touch-none cursor-grab shrink-0\"\n >\n <div class=\"h-1.5 w-10 rounded-full bg-base-300\"></div>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{--mn-sheet-ease: cubic-bezier(.32, .72, 0, 1);display:contents}.mn-sheet-container{padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:contain;min-height:0;transition:transform .35s var(--mn-sheet-ease),min-height .25s var(--mn-sheet-ease);animation:mn-sheet-in .35s var(--mn-sheet-ease)}:host(.grow-with-keyboard):host-context(.mn-keyboard-open) .mn-sheet-container{min-height:var(--mn-sheet-max, 92vh)}.mn-sheet-container.sheet-dragging{transition:none}.mn-sheet-backdrop{animation:mn-sheet-backdrop-in .2s ease-out}:host(.is-dismissing) .mn-sheet-container{animation:none}@keyframes mn-sheet-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes mn-sheet-backdrop-in{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.mn-sheet-container,.mn-sheet-backdrop{animation-duration:.01ms!important;transition-duration:.01ms!important}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
312
313
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnBottomSheet, decorators: [{
|
|
314
315
|
type: Component,
|
|
315
316
|
args: [{ selector: 'mn-bottom-sheet', standalone: true, imports: [NgClass], template: "@if (showBackdrop) {\n <!-- Dims the page behind the sheet. Tapping it dismisses when the sheet is dismissible. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div (click)=\"onBackdropClick()\" class=\"mn-sheet-backdrop fixed inset-0 z-9998 bg-black/40\"></div>\n}\n\n<div\n #container\n [attr.aria-label]=\"ariaLabelledby ? null : (ariaLabel || null)\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [class.sheet-dragging]=\"isDraggingSheet\"\n [ngClass]=\"containerClass\"\n [style.--mn-sheet-max]=\"maxHeightVh + 'vh'\"\n [style.max-height.vh]=\"maxHeightVh\"\n [style.min-height.px]=\"minHeightPx\"\n [style.transform]=\"sheetDragY ? 'translateY(' + sheetDragY + 'px)' : null\"\n aria-modal=\"true\"\n class=\"mn-sheet-container fixed inset-x-0 bottom-0 z-9999 flex flex-col bg-base-100 border-t border-base-300 rounded-t-2xl shadow-lg\"\n role=\"dialog\"\n tabindex=\"-1\"\n>\n @if (showGrabber) {\n <!-- Drag handle for swipe-to-dismiss. The gesture is armed on the whole handle;\n drags starting on a control inside the projected content are ignored. -->\n <div\n (pointercancel)=\"onSheetPointerUp()\"\n (pointerdown)=\"onSheetPointerDown($event)\"\n (pointermove)=\"onSheetPointerMove($event)\"\n (pointerup)=\"onSheetPointerUp()\"\n class=\"flex justify-center pt-2 pb-1 touch-none cursor-grab shrink-0\"\n >\n <div class=\"h-1.5 w-10 rounded-full bg-base-300\"></div>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{--mn-sheet-ease: cubic-bezier(.32, .72, 0, 1);display:contents}.mn-sheet-container{padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:contain;min-height:0;transition:transform .35s var(--mn-sheet-ease),min-height .25s var(--mn-sheet-ease);animation:mn-sheet-in .35s var(--mn-sheet-ease)}:host(.grow-with-keyboard):host-context(.mn-keyboard-open) .mn-sheet-container{min-height:var(--mn-sheet-max, 92vh)}.mn-sheet-container.sheet-dragging{transition:none}.mn-sheet-backdrop{animation:mn-sheet-backdrop-in .2s ease-out}:host(.is-dismissing) .mn-sheet-container{animation:none}@keyframes mn-sheet-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes mn-sheet-backdrop-in{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.mn-sheet-container,.mn-sheet-backdrop{animation-duration:.01ms!important;transition-duration:.01ms!important}}\n"] }]
|
|
316
317
|
}], propDecorators: { showBackdrop: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mn-angular-lib-bottom-sheet.mjs","sources":["../../../projects/mn-angular-lib/bottom-sheet/src/mn-bottom-sheet/mn-bottom-sheet.component.ts","../../../projects/mn-angular-lib/bottom-sheet/src/mn-bottom-sheet/mn-bottom-sheet.component.html","../../../projects/mn-angular-lib/bottom-sheet/public-api.ts","../../../projects/mn-angular-lib/bottom-sheet/mn-angular-lib-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n viewChild,\n} from '@angular/core';\nimport {NgClass} from '@angular/common';\n\n/**\n * A viewport-anchored bottom sheet — the mobile presentation shared by the modal\n * shell and the multi-select dropdown.\n *\n * It owns only the sheet *chrome and gestures*: a bottom-anchored, full-width,\n * rounded-top surface with an optional dimming backdrop and drag grabber, a\n * slide-up entrance, swipe/flick-to-dismiss, and a promise-based slide-down exit.\n * It is deliberately presentational: the body is projected via `<ng-content>`, and\n * dismissal is reported through {@link dismiss} for the host to act on (run a close\n * guard, tear down its overlay, …) rather than being handled here.\n *\n * Positioning is `position: fixed` against the viewport, so the host relocates itself\n * to `document.body` on init and blocks scrolling behind it while open. Both are\n * unconditional: rendering viewport-fixed chrome in place made correctness depend on\n * where a consumer happened to write the tag. A `transform`/`filter`/`contain`\n * ancestor becomes the containing block and pushes the sheet to the middle of the\n * screen — which a *stacked* modal did to its own sheet — and, because `position:\n * fixed` moves where an element paints but not where it sits in the DOM, a gesture on\n * the backdrop still scrolled whichever ancestor was the scroll container.\n *\n * The multi-select and dropdown used to do the relocating themselves; that is why the\n * behaviour reads as new here but is not new to them.\n */\n@Component({\n selector: 'mn-bottom-sheet',\n standalone: true,\n imports: [NgClass],\n templateUrl: './mn-bottom-sheet.component.html',\n styleUrl: './mn-bottom-sheet.component.css',\n})\nexport class MnBottomSheet implements OnInit, OnDestroy {\n /** Tailwind's `sm` breakpoint — at or below this the swipe gesture is armed.\n * Kept in step with the same constant in the modal shell and multi-select. */\n private static readonly SHEET_MAX_WIDTH = 639.98;\n /** Drag distance (px) past which a release dismisses regardless of speed. */\n private static readonly SWIPE_DISMISS_THRESHOLD = 150;\n /** Downward release speed (px/ms) above which a short drag still dismisses — a \"flick\". */\n private static readonly FLICK_VELOCITY = 0.5;\n /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */\n private static readonly FLICK_MIN_DISTANCE = 32;\n /** Upper bound for the exit wait if no `transitionend` fires (e.g. animation suppressed). */\n private static readonly CLOSE_FALLBACK_MS = 700;\n /** Whether to render the dimming backdrop behind the sheet (default: true).\n * A host that already paints its own backdrop (the modal shell) sets this false. */\n @Input() showBackdrop = true;\n /** Whether to render the drag grabber handle that arms swipe-to-dismiss (default: true). */\n @Input() showGrabber = true;\n /** Whether the sheet can be dismissed by the user via swipe/flick or backdrop tap\n * (default: true). When false the gestures are inert and the backdrop is non-closing. */\n @Input() dismissible = true;\n /** Optional `min-height` floor (px) for the container, so filtering its content\n * shorter cannot shrink the sheet mid-interaction. Null leaves it content-sized. */\n @Input() minHeightPx: number | null = null;\n /** Cap on the sheet height as a fraction of the viewport, in vh (default: 80). */\n @Input() maxHeightVh = 80;\n /** Extra class(es) applied to the sheet container, so a host can attach the hooks\n * its own CSS depends on (e.g. the modal shell's `modal-container`). */\n @Input() containerClass = '';\n /** Accessible name for the sheet dialog. */\n @Input() ariaLabel?: string;\n /** Id of the element that labels this dialog (takes precedence over `ariaLabel`). */\n @Input() ariaLabelledby?: string;\n /**\n * When true, the sheet grows to its `maxHeightVh` while the host app marks the soft\n * keyboard open (a `.mn-keyboard-open` class on a document ancestor), guaranteeing\n * scroll room to lift a focused field above an overlaying keyboard. Off by default so\n * a keyboard opened over an unrelated sheet (a multi-select search) does not resize it.\n */\n @Input() growWithKeyboard = false;\n /**\n * Optional async gate consulted before a user-initiated dismissal (swipe/flick/backdrop\n * tap) is committed. Resolving false aborts the dismissal and springs the sheet back —\n * used by the modal to run its close guard (e.g. an unsaved-changes prompt). A\n * programmatic {@link startClosing} bypasses it.\n */\n @Input() dismissGuard?: () => boolean | Promise<boolean>;\n /**\n * Emitted once the user has dismissed the sheet — after the slide-down exit has\n * finished, so the host can remove the sheet from the DOM without cutting the\n * animation short. The host decides what dismissal means (close, run a guard, …).\n */\n @Output() dismiss = new EventEmitter<void>();\n /** Current downward drag offset (px) applied to the sheet while swiping. */\n sheetDragY = 0;\n /** True while the user is actively dragging the grabber (disables the snap transition). */\n isDraggingSheet = false;\n /** True once a dismissal has committed — the sheet glides off-screen via its transition. */\n isDismissing = false;\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n /** The sheet container element, used to measure its height and drive the exit. */\n private readonly containerRef = viewChild<ElementRef<HTMLElement>>('container');\n private dragStartY = 0;\n\n /** The two most recent (y, timestamp) pointer samples, for estimating flick velocity.\n * `t` uses the event timestamp (monotonic), so no wall-clock is read. */\n private lastSample: { y: number; t: number } | null = null;\n private prevSample: { y: number; t: number } | null = null;\n\n /** In-flight exit animation, so a swipe-dismiss and a follow-up programmatic\n * {@link startClosing} share one glide instead of re-triggering it. */\n private exitPromise: Promise<void> | null = null;\n\n /** The host node once moved to `document.body`, so it is only detached if we moved it. */\n private portalledHost: HTMLElement | null = null;\n\n /** Blocks scroll gestures aimed at anything behind the sheet, while it is open. */\n private scrollGuard: ((event: Event) => void) | null = null;\n\n /** Moves the host out to `document.body` and stops the page behind scrolling. */\n ngOnInit(): void {\n if (typeof document === 'undefined') return;\n const host = this.el.nativeElement;\n document.body.appendChild(host);\n this.portalledHost = host;\n this.lockScroll();\n }\n\n /**\n * Stops pointer scrolling behind the sheet for as long as it is open.\n *\n * Cancels the gesture rather than setting `overflow: hidden` on `document.body`: an\n * app whose scroll container is a layout element (a `<main>`, a drawer body) leaves\n * `body` unscrollable, so locking it there is a no-op and the page still slides about\n * under the sheet. Cancelling `wheel` and `touchmove` before anything acts on them\n * holds regardless of which element does the scrolling.\n *\n * Gestures that begin inside the sheet are let through so its own content still\n * scrolls; `overscroll-behavior: contain` keeps those from chaining out at the ends.\n *\n * Pointer input only. Page Down and the arrows still reach the page behind when focus\n * is left there — closing that needs either a key filter or moving focus into the\n * sheet, and neither belongs in this change.\n */\n private lockScroll(): void {\n const guard = (event: Event): void => {\n const target = event.target as Node | null;\n const container = this.containerRef()?.nativeElement;\n if (container && target && container.contains(target)) return;\n // Only cancellable events can be stopped; a passive listener elsewhere in the\n // chain would otherwise log a console error for a no-op preventDefault.\n if (event.cancelable) event.preventDefault();\n };\n // Capture phase, so the gesture is cancelled before any scroller sees it.\n document.addEventListener('wheel', guard, {capture: true, passive: false});\n document.addEventListener('touchmove', guard, {capture: true, passive: false});\n this.scrollGuard = guard;\n }\n\n /** Releases the scroll guard. Idempotent. */\n private unlockScroll(): void {\n if (!this.scrollGuard) return;\n document.removeEventListener('wheel', this.scrollGuard, {capture: true});\n document.removeEventListener('touchmove', this.scrollGuard, {capture: true});\n this.scrollGuard = null;\n }\n\n /**\n * Detaches the relocated host.\n *\n * Angular tears a view down by removing the nodes it created from their parent; a\n * host we moved to `body` is no longer among the parent's children, so without\n * this the sheet would outlive the view that declared it.\n */\n ngOnDestroy(): void {\n this.unlockScroll();\n this.portalledHost?.remove();\n this.portalledHost = null;\n }\n\n @HostBinding('class') get hostClasses(): string {\n return `mn-bottom-sheet${this.isDismissing ? ' is-dismissing' : ''}`\n + `${this.growWithKeyboard ? ' grow-with-keyboard' : ''}`;\n }\n\n /** Whether the viewport is currently narrow enough for the sheet to accept a swipe. */\n private get isNarrow(): boolean {\n return typeof window === 'undefined' || window.innerWidth <= MnBottomSheet.SHEET_MAX_WIDTH;\n }\n\n onSheetPointerDown(event: PointerEvent): void {\n if (!this.dismissible || !this.isNarrow) return;\n // Don't hijack drags that begin on an interactive control inside the sheet.\n if ((event.target as HTMLElement).closest('button, input, textarea, select, a')) return;\n this.isDraggingSheet = true;\n this.dragStartY = event.clientY;\n // Seed the velocity window so a fast flick that releases on the first move still measures.\n this.lastSample = {y: event.clientY, t: event.timeStamp};\n this.prevSample = this.lastSample;\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n }\n\n onSheetPointerMove(event: PointerEvent): void {\n if (!this.isDraggingSheet) return;\n // Only track downward movement.\n this.sheetDragY = Math.max(0, event.clientY - this.dragStartY);\n this.prevSample = this.lastSample;\n this.lastSample = {y: event.clientY, t: event.timeStamp};\n }\n\n onSheetPointerUp(): void {\n if (!this.isDraggingSheet) return;\n this.isDraggingSheet = false;\n\n if (this.shouldDismiss()) {\n void this.attemptDismiss();\n } else {\n this.snapBack();\n }\n\n this.lastSample = null;\n this.prevSample = null;\n }\n\n onBackdropClick(): void {\n void this.attemptDismiss();\n }\n\n /**\n * Plays the slide-down exit and resolves once it has finished. Exposed so a host that\n * dismisses the sheet programmatically (not via a gesture) can await the same exit\n * before tearing the sheet down. Idempotent: a swipe-dismiss already in flight and a\n * subsequent programmatic close share the one glide rather than restarting it.\n */\n startClosing(): Promise<void> {\n return this.playExit();\n }\n\n /**\n * Runs the optional {@link dismissGuard}, then either commits the dismissal (glide out\n * + emit) or springs the sheet back if the guard rejects. A non-dismissible sheet never\n * gets here from a gesture, but the guard is still short-circuited defensively.\n */\n private async attemptDismiss(): Promise<void> {\n if (!this.dismissible) return;\n if (this.dismissGuard) {\n const allowed = await this.dismissGuard();\n if (!allowed) {\n this.snapBack();\n this.cdr.detectChanges();\n return;\n }\n }\n this.commitDismiss();\n }\n\n /** Whether the release should dismiss: a long-enough drag OR a fast downward flick. */\n private shouldDismiss(): boolean {\n if (this.sheetDragY > MnBottomSheet.SWIPE_DISMISS_THRESHOLD) {\n return true;\n }\n return this.releaseVelocity() > MnBottomSheet.FLICK_VELOCITY\n && this.sheetDragY > MnBottomSheet.FLICK_MIN_DISTANCE;\n }\n\n /** Downward release speed (px/ms) from the last two pointer samples; 0 when unusable. */\n private releaseVelocity(): number {\n if (!this.lastSample || !this.prevSample) return 0;\n const dt = this.lastSample.t - this.prevSample.t;\n if (dt <= 0) return 0;\n return (this.lastSample.y - this.prevSample.y) / dt;\n }\n\n /** Springs the sheet back to its resting position after a drag that didn't dismiss. */\n private snapBack(): void {\n this.sheetDragY = 0;\n }\n\n /**\n * Commits a dismissal: glides the sheet the rest of the way off-screen, then emits\n * {@link dismiss} once the exit animation settles. Continuing the gesture (rather than\n * snapping back to 0 first) keeps a swipe feeling like one unbroken motion.\n */\n private commitDismiss(): void {\n void this.playExit().then(() => this.dismiss.emit());\n }\n\n /** Commits the exit animation exactly once and returns the shared in-flight promise.\n * Short-circuits under reduced motion and falls back to a timeout if no event fires. */\n private playExit(): Promise<void> {\n if (this.exitPromise) return this.exitPromise;\n this.isDismissing = true;\n this.sheetDragY = window.innerHeight;\n this.cdr.detectChanges();\n this.exitPromise = this.awaitExit();\n return this.exitPromise;\n }\n\n /** Waits for the container's exit transition to end, with a reduced-motion short-circuit\n * and a fallback timeout so it always resolves. */\n private awaitExit(): Promise<void> {\n return new Promise(resolve => {\n if (this.prefersReducedMotion()) {\n resolve();\n return;\n }\n const container = this.containerRef()?.nativeElement\n ?? this.el.nativeElement.querySelector<HTMLElement>('.mn-sheet-container');\n if (!container) {\n resolve();\n return;\n }\n let settled = false;\n const done = (event?: Event): void => {\n // Ignore end events bubbling up from descendant transitions.\n if (event && event.target !== container) return;\n if (settled) return;\n settled = true;\n container.removeEventListener('transitionend', done);\n clearTimeout(fallback);\n resolve();\n };\n container.addEventListener('transitionend', done);\n const fallback = setTimeout(done, MnBottomSheet.CLOSE_FALLBACK_MS);\n });\n }\n\n private prefersReducedMotion(): boolean {\n return typeof window !== 'undefined'\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n}\n","@if (showBackdrop) {\n <!-- Dims the page behind the sheet. Tapping it dismisses when the sheet is dismissible. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div (click)=\"onBackdropClick()\" class=\"mn-sheet-backdrop fixed inset-0 z-9998 bg-black/40\"></div>\n}\n\n<div\n #container\n [attr.aria-label]=\"ariaLabelledby ? null : (ariaLabel || null)\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [class.sheet-dragging]=\"isDraggingSheet\"\n [ngClass]=\"containerClass\"\n [style.--mn-sheet-max]=\"maxHeightVh + 'vh'\"\n [style.max-height.vh]=\"maxHeightVh\"\n [style.min-height.px]=\"minHeightPx\"\n [style.transform]=\"sheetDragY ? 'translateY(' + sheetDragY + 'px)' : null\"\n aria-modal=\"true\"\n class=\"mn-sheet-container fixed inset-x-0 bottom-0 z-9999 flex flex-col bg-base-100 border-t border-base-300 rounded-t-2xl shadow-lg\"\n role=\"dialog\"\n tabindex=\"-1\"\n>\n @if (showGrabber) {\n <!-- Drag handle for swipe-to-dismiss. The gesture is armed on the whole handle;\n drags starting on a control inside the projected content are ignored. -->\n <div\n (pointercancel)=\"onSheetPointerUp()\"\n (pointerdown)=\"onSheetPointerDown($event)\"\n (pointermove)=\"onSheetPointerMove($event)\"\n (pointerup)=\"onSheetPointerUp()\"\n class=\"flex justify-center pt-2 pb-1 touch-none cursor-grab shrink-0\"\n >\n <div class=\"h-1.5 w-10 rounded-full bg-base-300\"></div>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n","/**\n * Public API of the `mn-angular-lib/bottom-sheet` entry point: the bottom sheet.\n *\n * Each entry point is its own module in the published package, so a consumer's bundler\n * splits it into the chunk that uses it instead of loading the whole library at startup.\n * The root `mn-angular-lib` entry re-exports every entry point.\n */\nexport * from './src/mn-bottom-sheet';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAeA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MAQU,aAAa,CAAA;AACxB;AAC+E;AACvE,IAAA,OAAgB,eAAe,GAAG,MAAM;;AAExC,IAAA,OAAgB,uBAAuB,GAAG,GAAG;;AAE7C,IAAA,OAAgB,cAAc,GAAG,GAAG;;AAEpC,IAAA,OAAgB,kBAAkB,GAAG,EAAE;;AAEvC,IAAA,OAAgB,iBAAiB,GAAG,GAAG;AAC/C;AACqF;IAC5E,YAAY,GAAG,IAAI;;IAEnB,WAAW,GAAG,IAAI;AAC3B;AAC0F;IACjF,WAAW,GAAG,IAAI;AAC3B;AACqF;IAC5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EAAA,CAAA;kBAPzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,OAAO,CAAC,EAAA,QAAA,EAAA,4kDAAA,EAAA,MAAA,EAAA,CAAA,q3BAAA,CAAA,EAAA;;sBAkBjB;;sBAEA;;sBAGA;;sBAGA;;sBAEA;;sBAGA;;sBAEA;;sBAEA;;sBAOA;;sBAOA;;sBAMA;4DAUkE,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA;sBA+E7E,WAAW;uBAAC,OAAO;;;AEzLtB;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mn-angular-lib-bottom-sheet.mjs","sources":["../../../projects/mn-angular-lib/bottom-sheet/src/mn-bottom-sheet/mn-bottom-sheet.component.ts","../../../projects/mn-angular-lib/bottom-sheet/src/mn-bottom-sheet/mn-bottom-sheet.component.html","../../../projects/mn-angular-lib/bottom-sheet/public-api.ts","../../../projects/mn-angular-lib/bottom-sheet/mn-angular-lib-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n viewChild,\n} from '@angular/core';\nimport { NgClass } from '@angular/common';\n\n/**\n * A viewport-anchored bottom sheet — the mobile presentation shared by the modal\n * shell and the multi-select dropdown.\n *\n * It owns only the sheet *chrome and gestures*: a bottom-anchored, full-width,\n * rounded-top surface with an optional dimming backdrop and drag grabber, a\n * slide-up entrance, swipe/flick-to-dismiss, and a promise-based slide-down exit.\n * It is deliberately presentational: the body is projected via `<ng-content>`, and\n * dismissal is reported through {@link dismiss} for the host to act on (run a close\n * guard, tear down its overlay, …) rather than being handled here.\n *\n * Positioning is `position: fixed` against the viewport, so the host relocates itself\n * to `document.body` on init and blocks scrolling behind it while open. Both are\n * unconditional: rendering viewport-fixed chrome in place made correctness depend on\n * where a consumer happened to write the tag. A `transform`/`filter`/`contain`\n * ancestor becomes the containing block and pushes the sheet to the middle of the\n * screen — which a *stacked* modal did to its own sheet — and, because `position:\n * fixed` moves where an element paints but not where it sits in the DOM, a gesture on\n * the backdrop still scrolled whichever ancestor was the scroll container.\n *\n * The multi-select and dropdown used to do the relocating themselves; that is why the\n * behaviour reads as new here but is not new to them.\n */\n@Component({\n selector: 'mn-bottom-sheet',\n standalone: true,\n imports: [NgClass],\n templateUrl: './mn-bottom-sheet.component.html',\n styleUrl: './mn-bottom-sheet.component.css',\n})\nexport class MnBottomSheet implements OnInit, OnDestroy {\n /** Tailwind's `sm` breakpoint — at or below this the swipe gesture is armed.\n * Kept in step with the same constant in the modal shell and multi-select. */\n private static readonly SHEET_MAX_WIDTH = 639.98;\n /** Drag distance (px) past which a release dismisses regardless of speed. */\n private static readonly SWIPE_DISMISS_THRESHOLD = 150;\n /** Downward release speed (px/ms) above which a short drag still dismisses — a \"flick\". */\n private static readonly FLICK_VELOCITY = 0.5;\n /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */\n private static readonly FLICK_MIN_DISTANCE = 32;\n /** Upper bound for the exit wait if no `transitionend` fires (e.g. animation suppressed). */\n private static readonly CLOSE_FALLBACK_MS = 700;\n /** Whether to render the dimming backdrop behind the sheet (default: true).\n * A host that already paints its own backdrop (the modal shell) sets this false. */\n @Input() showBackdrop = true;\n /** Whether to render the drag grabber handle that arms swipe-to-dismiss (default: true). */\n @Input() showGrabber = true;\n /** Whether the sheet can be dismissed by the user via swipe/flick or backdrop tap\n * (default: true). When false the gestures are inert and the backdrop is non-closing. */\n @Input() dismissible = true;\n /** Optional `min-height` floor (px) for the container, so filtering its content\n * shorter cannot shrink the sheet mid-interaction. Null leaves it content-sized. */\n @Input() minHeightPx: number | null = null;\n /** Cap on the sheet height as a fraction of the viewport, in vh (default: 80). */\n @Input() maxHeightVh = 80;\n /** Extra class(es) applied to the sheet container, so a host can attach the hooks\n * its own CSS depends on (e.g. the modal shell's `modal-container`). */\n @Input() containerClass = '';\n /** Accessible name for the sheet dialog. */\n @Input() ariaLabel?: string;\n /** Id of the element that labels this dialog (takes precedence over `ariaLabel`). */\n @Input() ariaLabelledby?: string;\n /**\n * When true, the sheet grows to its `maxHeightVh` while the host app marks the soft\n * keyboard open (a `.mn-keyboard-open` class on a document ancestor), guaranteeing\n * scroll room to lift a focused field above an overlaying keyboard. Off by default so\n * a keyboard opened over an unrelated sheet (a multi-select search) does not resize it.\n */\n @Input() growWithKeyboard = false;\n /**\n * Optional async gate consulted before a user-initiated dismissal (swipe/flick/backdrop\n * tap) is committed. Resolving false aborts the dismissal and springs the sheet back —\n * used by the modal to run its close guard (e.g. an unsaved-changes prompt). A\n * programmatic {@link startClosing} bypasses it.\n */\n @Input() dismissGuard?: () => boolean | Promise<boolean>;\n /**\n * Emitted once the user has dismissed the sheet — after the slide-down exit has\n * finished, so the host can remove the sheet from the DOM without cutting the\n * animation short. The host decides what dismissal means (close, run a guard, …).\n */\n @Output() dismiss = new EventEmitter<void>();\n /** Current downward drag offset (px) applied to the sheet while swiping. */\n sheetDragY = 0;\n /** True while the user is actively dragging the grabber (disables the snap transition). */\n isDraggingSheet = false;\n /** True once a dismissal has committed — the sheet glides off-screen via its transition. */\n isDismissing = false;\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n /** The sheet container element, used to measure its height and drive the exit. */\n private readonly containerRef = viewChild<ElementRef<HTMLElement>>('container');\n private dragStartY = 0;\n\n /** The two most recent (y, timestamp) pointer samples, for estimating flick velocity.\n * `t` uses the event timestamp (monotonic), so no wall-clock is read. */\n private lastSample: { y: number; t: number } | null = null;\n private prevSample: { y: number; t: number } | null = null;\n\n /** In-flight exit animation, so a swipe-dismiss and a follow-up programmatic\n * {@link startClosing} share one glide instead of re-triggering it. */\n private exitPromise: Promise<void> | null = null;\n\n /** The host node once moved to `document.body`, so it is only detached if we moved it. */\n private portalledHost: HTMLElement | null = null;\n\n /** Blocks scroll gestures aimed at anything behind the sheet, while it is open. */\n private scrollGuard: ((event: Event) => void) | null = null;\n\n /** Moves the host out to `document.body` and stops the page behind scrolling. */\n ngOnInit(): void {\n if (typeof document === 'undefined') return;\n const host = this.el.nativeElement;\n document.body.appendChild(host);\n this.portalledHost = host;\n this.lockScroll();\n }\n\n /**\n * Stops pointer scrolling behind the sheet for as long as it is open.\n *\n * Cancels the gesture rather than setting `overflow: hidden` on `document.body`: an\n * app whose scroll container is a layout element (a `<main>`, a drawer body) leaves\n * `body` unscrollable, so locking it there is a no-op and the page still slides about\n * under the sheet. Cancelling `wheel` and `touchmove` before anything acts on them\n * holds regardless of which element does the scrolling.\n *\n * Gestures that begin inside the sheet are let through so its own content still\n * scrolls; `overscroll-behavior: contain` keeps those from chaining out at the ends.\n *\n * Pointer input only. Page Down and the arrows still reach the page behind when focus\n * is left there — closing that needs either a key filter or moving focus into the\n * sheet, and neither belongs in this change.\n */\n private lockScroll(): void {\n const guard = (event: Event): void => {\n const target = event.target as Node | null;\n const container = this.containerRef()?.nativeElement;\n if (container && target && container.contains(target)) return;\n // Only cancellable events can be stopped; a passive listener elsewhere in the\n // chain would otherwise log a console error for a no-op preventDefault.\n if (event.cancelable) event.preventDefault();\n };\n // Capture phase, so the gesture is cancelled before any scroller sees it.\n document.addEventListener('wheel', guard, { capture: true, passive: false });\n document.addEventListener('touchmove', guard, { capture: true, passive: false });\n this.scrollGuard = guard;\n }\n\n /** Releases the scroll guard. Idempotent. */\n private unlockScroll(): void {\n if (!this.scrollGuard) return;\n document.removeEventListener('wheel', this.scrollGuard, { capture: true });\n document.removeEventListener('touchmove', this.scrollGuard, { capture: true });\n this.scrollGuard = null;\n }\n\n /**\n * Detaches the relocated host.\n *\n * Angular tears a view down by removing the nodes it created from their parent; a\n * host we moved to `body` is no longer among the parent's children, so without\n * this the sheet would outlive the view that declared it.\n */\n ngOnDestroy(): void {\n this.unlockScroll();\n this.portalledHost?.remove();\n this.portalledHost = null;\n }\n\n @HostBinding('class') get hostClasses(): string {\n return (\n `mn-bottom-sheet${this.isDismissing ? ' is-dismissing' : ''}` +\n `${this.growWithKeyboard ? ' grow-with-keyboard' : ''}`\n );\n }\n\n /** Whether the viewport is currently narrow enough for the sheet to accept a swipe. */\n private get isNarrow(): boolean {\n return typeof window === 'undefined' || window.innerWidth <= MnBottomSheet.SHEET_MAX_WIDTH;\n }\n\n onSheetPointerDown(event: PointerEvent): void {\n if (!this.dismissible || !this.isNarrow) return;\n // Don't hijack drags that begin on an interactive control inside the sheet.\n if ((event.target as HTMLElement).closest('button, input, textarea, select, a')) return;\n this.isDraggingSheet = true;\n this.dragStartY = event.clientY;\n // Seed the velocity window so a fast flick that releases on the first move still measures.\n this.lastSample = { y: event.clientY, t: event.timeStamp };\n this.prevSample = this.lastSample;\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n }\n\n onSheetPointerMove(event: PointerEvent): void {\n if (!this.isDraggingSheet) return;\n // Only track downward movement.\n this.sheetDragY = Math.max(0, event.clientY - this.dragStartY);\n this.prevSample = this.lastSample;\n this.lastSample = { y: event.clientY, t: event.timeStamp };\n }\n\n onSheetPointerUp(): void {\n if (!this.isDraggingSheet) return;\n this.isDraggingSheet = false;\n\n if (this.shouldDismiss()) {\n void this.attemptDismiss();\n } else {\n this.snapBack();\n }\n\n this.lastSample = null;\n this.prevSample = null;\n }\n\n onBackdropClick(): void {\n void this.attemptDismiss();\n }\n\n /**\n * Plays the slide-down exit and resolves once it has finished. Exposed so a host that\n * dismisses the sheet programmatically (not via a gesture) can await the same exit\n * before tearing the sheet down. Idempotent: a swipe-dismiss already in flight and a\n * subsequent programmatic close share the one glide rather than restarting it.\n */\n startClosing(): Promise<void> {\n return this.playExit();\n }\n\n /**\n * Runs the optional {@link dismissGuard}, then either commits the dismissal (glide out\n * + emit) or springs the sheet back if the guard rejects. A non-dismissible sheet never\n * gets here from a gesture, but the guard is still short-circuited defensively.\n */\n private async attemptDismiss(): Promise<void> {\n if (!this.dismissible) return;\n if (this.dismissGuard) {\n const allowed = await this.dismissGuard();\n if (!allowed) {\n this.snapBack();\n this.cdr.detectChanges();\n return;\n }\n }\n this.commitDismiss();\n }\n\n /** Whether the release should dismiss: a long-enough drag OR a fast downward flick. */\n private shouldDismiss(): boolean {\n if (this.sheetDragY > MnBottomSheet.SWIPE_DISMISS_THRESHOLD) {\n return true;\n }\n return (\n this.releaseVelocity() > MnBottomSheet.FLICK_VELOCITY &&\n this.sheetDragY > MnBottomSheet.FLICK_MIN_DISTANCE\n );\n }\n\n /** Downward release speed (px/ms) from the last two pointer samples; 0 when unusable. */\n private releaseVelocity(): number {\n if (!this.lastSample || !this.prevSample) return 0;\n const dt = this.lastSample.t - this.prevSample.t;\n if (dt <= 0) return 0;\n return (this.lastSample.y - this.prevSample.y) / dt;\n }\n\n /** Springs the sheet back to its resting position after a drag that didn't dismiss. */\n private snapBack(): void {\n this.sheetDragY = 0;\n }\n\n /**\n * Commits a dismissal: glides the sheet the rest of the way off-screen, then emits\n * {@link dismiss} once the exit animation settles. Continuing the gesture (rather than\n * snapping back to 0 first) keeps a swipe feeling like one unbroken motion.\n */\n private commitDismiss(): void {\n void this.playExit().then(() => this.dismiss.emit());\n }\n\n /** Commits the exit animation exactly once and returns the shared in-flight promise.\n * Short-circuits under reduced motion and falls back to a timeout if no event fires. */\n private playExit(): Promise<void> {\n if (this.exitPromise) return this.exitPromise;\n this.isDismissing = true;\n this.sheetDragY = window.innerHeight;\n this.cdr.detectChanges();\n this.exitPromise = this.awaitExit();\n return this.exitPromise;\n }\n\n /** Waits for the container's exit transition to end, with a reduced-motion short-circuit\n * and a fallback timeout so it always resolves. */\n private awaitExit(): Promise<void> {\n return new Promise((resolve) => {\n if (this.prefersReducedMotion()) {\n resolve();\n return;\n }\n const container =\n this.containerRef()?.nativeElement ??\n this.el.nativeElement.querySelector<HTMLElement>('.mn-sheet-container');\n if (!container) {\n resolve();\n return;\n }\n let settled = false;\n const done = (event?: Event): void => {\n // Ignore end events bubbling up from descendant transitions.\n if (event && event.target !== container) return;\n if (settled) return;\n settled = true;\n container.removeEventListener('transitionend', done);\n clearTimeout(fallback);\n resolve();\n };\n container.addEventListener('transitionend', done);\n const fallback = setTimeout(done, MnBottomSheet.CLOSE_FALLBACK_MS);\n });\n }\n\n private prefersReducedMotion(): boolean {\n return (\n typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches\n );\n }\n}\n","@if (showBackdrop) {\n <!-- Dims the page behind the sheet. Tapping it dismisses when the sheet is dismissible. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div (click)=\"onBackdropClick()\" class=\"mn-sheet-backdrop fixed inset-0 z-9998 bg-black/40\"></div>\n}\n\n<div\n #container\n [attr.aria-label]=\"ariaLabelledby ? null : (ariaLabel || null)\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [class.sheet-dragging]=\"isDraggingSheet\"\n [ngClass]=\"containerClass\"\n [style.--mn-sheet-max]=\"maxHeightVh + 'vh'\"\n [style.max-height.vh]=\"maxHeightVh\"\n [style.min-height.px]=\"minHeightPx\"\n [style.transform]=\"sheetDragY ? 'translateY(' + sheetDragY + 'px)' : null\"\n aria-modal=\"true\"\n class=\"mn-sheet-container fixed inset-x-0 bottom-0 z-9999 flex flex-col bg-base-100 border-t border-base-300 rounded-t-2xl shadow-lg\"\n role=\"dialog\"\n tabindex=\"-1\"\n>\n @if (showGrabber) {\n <!-- Drag handle for swipe-to-dismiss. The gesture is armed on the whole handle;\n drags starting on a control inside the projected content are ignored. -->\n <div\n (pointercancel)=\"onSheetPointerUp()\"\n (pointerdown)=\"onSheetPointerDown($event)\"\n (pointermove)=\"onSheetPointerMove($event)\"\n (pointerup)=\"onSheetPointerUp()\"\n class=\"flex justify-center pt-2 pb-1 touch-none cursor-grab shrink-0\"\n >\n <div class=\"h-1.5 w-10 rounded-full bg-base-300\"></div>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n","/**\n * Public API of the `mn-angular-lib/bottom-sheet` entry point: the bottom sheet.\n *\n * Each entry point is its own module in the published package, so a consumer's bundler\n * splits it into the chunk that uses it instead of loading the whole library at startup.\n * The root `mn-angular-lib` entry re-exports every entry point.\n */\nexport * from './src/mn-bottom-sheet';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAeA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MAQU,aAAa,CAAA;AACxB;AAC+E;AACvE,IAAA,OAAgB,eAAe,GAAG,MAAM;;AAExC,IAAA,OAAgB,uBAAuB,GAAG,GAAG;;AAE7C,IAAA,OAAgB,cAAc,GAAG,GAAG;;AAEpC,IAAA,OAAgB,kBAAkB,GAAG,EAAE;;AAEvC,IAAA,OAAgB,iBAAiB,GAAG,GAAG;AAC/C;AACqF;IAC5E,YAAY,GAAG,IAAI;;IAEnB,WAAW,GAAG,IAAI;AAC3B;AAC0F;IACjF,WAAW,GAAG,IAAI;AAC3B;AACqF;IAC5E,WAAW,GAAkB,IAAI;;IAEjC,WAAW,GAAG,EAAE;AACzB;AACyE;IAChE,cAAc,GAAG,EAAE;;AAEnB,IAAA,SAAS;;AAET,IAAA,cAAc;AACvB;;;;;AAKG;IACM,gBAAgB,GAAG,KAAK;AACjC;;;;;AAKG;AACM,IAAA,YAAY;AACrB;;;;AAIG;AACO,IAAA,OAAO,GAAG,IAAI,YAAY,EAAQ;;IAE5C,UAAU,GAAG,CAAC;;IAEd,eAAe,GAAG,KAAK;;IAEvB,YAAY,GAAG,KAAK;AACH,IAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;;IAEhD,YAAY,GAAG,SAAS,CAA0B,WAAW;qFAAC;IACvE,UAAU,GAAG,C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206,10 +206,10 @@ class MnButton {
|
|
|
206
206
|
get isBlocked() {
|
|
207
207
|
return !!(this.data.disabled || this.data.loading);
|
|
208
208
|
}
|
|
209
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
210
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
209
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
210
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: MnButton, isStandalone: true, selector: "button[mnButton], a[mnButton]", inputs: { data: "data" }, host: { properties: { "class": "this.hostClasses", "attr.aria-busy": "this.ariaBusy", "attr.aria-disabled": "this.ariaDisabled", "attr.disabled": "this.disabledAttr", "attr.tabindex": "this.tabIndex" } }, ngImport: i0, template: "@if (data.loading) {\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-4 w-4 shrink-0 mr-2 animate-spin rounded-full border-2 border-current border-r-transparent\"\n ></span>\n}\n<ng-content></ng-content>\n" });
|
|
211
211
|
}
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnButton, decorators: [{
|
|
213
213
|
type: Component,
|
|
214
214
|
args: [{ selector: 'button[mnButton], a[mnButton]', standalone: true, template: "@if (data.loading) {\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-4 w-4 shrink-0 mr-2 animate-spin rounded-full border-2 border-current border-r-transparent\"\n ></span>\n}\n<ng-content></ng-content>\n" }]
|
|
215
215
|
}], propDecorators: { data: [{
|
|
@@ -297,10 +297,10 @@ class MnBadge {
|
|
|
297
297
|
wrap: this.data.wrap,
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
300
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
301
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: MnBadge, isStandalone: true, selector: "span[mnBadge]", inputs: { data: "data" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
302
302
|
}
|
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnBadge, decorators: [{
|
|
304
304
|
type: Component,
|
|
305
305
|
args: [{ selector: 'span[mnBadge]', standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
306
306
|
}], propDecorators: { data: [{
|
|
@@ -344,10 +344,10 @@ class MnSkeleton {
|
|
|
344
344
|
get isAnimated() {
|
|
345
345
|
return this.data.animated !== false;
|
|
346
346
|
}
|
|
347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
348
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
348
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: MnSkeleton, isStandalone: true, selector: "mn-skeleton", inputs: { data: "data" }, host: { properties: { "attr.aria-hidden": "this.ariaHidden", "class": "this.hostClasses", "style.width": "this.width", "style.height": "this.height" } }, ngImport: i0, template: "@if (isAnimated) {\n <span class=\"mn-skeleton-shimmer-bar\"></span>\n}\n", styles: [":host{display:block}@keyframes mn-skeleton-shimmer{0%{transform:translate(-150%)}to{transform:translate(150%)}}.mn-skeleton-shimmer-bar{position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--color-base-100) 65%,transparent) 50%,transparent 100%);animation:mn-skeleton-shimmer 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.mn-skeleton-shimmer-bar{animation:none}}\n"] });
|
|
349
349
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MnSkeleton, decorators: [{
|
|
351
351
|
type: Component,
|
|
352
352
|
args: [{ selector: 'mn-skeleton', standalone: true, template: "@if (isAnimated) {\n <span class=\"mn-skeleton-shimmer-bar\"></span>\n}\n", styles: [":host{display:block}@keyframes mn-skeleton-shimmer{0%{transform:translate(-150%)}to{transform:translate(150%)}}.mn-skeleton-shimmer-bar{position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--color-base-100) 65%,transparent) 50%,transparent 100%);animation:mn-skeleton-shimmer 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.mn-skeleton-shimmer-bar{animation:none}}\n"] }]
|
|
353
353
|
}], propDecorators: { data: [{
|