@yuuvis/material 2.16.0 → 2.18.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"yuuvis-material-panes.mjs","sources":["../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-aside/pane-aside.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-aside/pane-aside.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-body/pane-body.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-body/pane-body.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-header/pane-header.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-header/pane-header.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/fullscreen.directive.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-top-bar/pane-top-bar.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-top-bar/pane-top-bar.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-footer/pane-footer.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-footer/pane-footer.component.html","../../../../../libs/yuuvis/material/panes/src/lib/panes.module.ts","../../../../../libs/yuuvis/material/panes/src/yuuvis-material-panes.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-aside',\n imports: [CommonModule],\n templateUrl: './pane-aside.component.html',\n styleUrl: './pane-aside.component.scss'\n})\nexport class YmtPaneAsideComponent {}\n","<p>pane-aside works!</p>\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-body',\n imports: [CommonModule],\n templateUrl: './pane-body.component.html',\n styleUrl: './pane-body.component.scss'\n})\nexport class YmtPaneBodyComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, TemplateRef } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\n\n/**\n * Component for the pane header. It can be used to display a title,\n * subtitle and actions in the pane header.\n *\n * The title and subtitle can be set via the `title` and `subtitle` inputs\n * or via the `yuvPaneHeaderTitle` and `yuvPaneHeaderSubtitle` template refs:\n *\n * ```html\n * <!-- Using inputs -->\n * <ymt-pane-header [title]=\"'Pane Title'\" [subtitle]=\"'Pane Subtitle'\"></ymt-pane-header>\n * <!-- Using template refs -->\n * <ymt-pane-header>\n * <ng-template #yuvPaneHeaderTitle><h2>🦁Custom pane title</h2></ng-template>\n * <ng-template #yuvPaneHeaderSubtitle><ymt-badge severity=\"warning\">locked</ymt-badge></ng-template>\n * </ymt-pane-header>\n * ```\n */\n@Component({\n selector: 'ymt-pane-header',\n imports: [CommonModule, MatIconModule],\n templateUrl: './pane-header.component.html',\n styleUrl: './pane-header.component.scss'\n})\nexport class YmtPaneHeaderComponent {\n /**\n * Title of the pane\n */\n title = input<string>();\n /**\n * Icon of the pane\n */\n icon = input<string>();\n /**\n * Subtitle of the pane\n */\n subtitle = input<string>();\n /**\n * TemplateRef for actions area in the pane header.\n */\n actions = input<TemplateRef<any>>();\n\n titleSlot = contentChild<TemplateRef<any>>('yuvPaneHeaderTitle');\n subtitleSlot = contentChild<TemplateRef<any>>('yuvPaneHeaderSubtitle');\n}\n","<header>\n @if (icon()) {\n <div class=\"icon\">\n <mat-icon class=\"pane-icon\">{{ icon() }}</mat-icon>\n </div>\n }\n <h2>\n @let ts = titleSlot();\n @if (ts) {\n <ng-container *ngTemplateOutlet=\"ts\"></ng-container>\n } @else {\n {{ title() }}\n }\n </h2>\n <small>\n @let ss = subtitleSlot();\n @if (ss) {\n <ng-container *ngTemplateOutlet=\"ss\"></ng-container>\n } @else {\n {{ subtitle() }}\n }\n </small>\n @let a = actions();\n @if (a) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"a\"></ng-container>\n </div>\n }\n</header>\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n output,\n Renderer2,\n signal\n} from '@angular/core';\n\n/**\n * Directive that enables any host element to toggle into a fullscreen overlay\n * covering the entire viewport. Background content is made inert and body scroll\n * is locked while fullscreen is active.\n *\n * @example\n * ```html\n * <div yuvFullscreen #fs=\"yuvFullscreen\">\n * <button (click)=\"fs.toggle()\">Toggle</button>\n * <p>Content</p>\n * </div>\n * ```\n */\n@Directive({\n selector: '[yuvFullscreen]',\n exportAs: 'yuvFullscreen',\n host: {\n '[class.yuv-fullscreen-active]': 'active()',\n '(document:keydown.escape)': 'onEscape()'\n }\n})\nexport class FullscreenDirective implements OnDestroy {\n #elRef = inject(ElementRef);\n #renderer = inject(Renderer2);\n\n /** Whether the fullscreen toggle is disabled. */\n disabled = input<boolean>(false);\n\n /** Emitted when fullscreen mode is entered. */\n fullscreenEnter = output<void>();\n /** Emitted when fullscreen mode is exited. */\n fullscreenExit = output<void>();\n\n #isActive = signal(false);\n\n /** Read-only signal indicating whether fullscreen is currently active. */\n active = computed(() => this.#isActive());\n\n #originalStyles: Record<string, string> = {};\n #inertElements: HTMLElement[] = [];\n #originalBodyOverflow = '';\n\n /** Toggle fullscreen on/off. */\n toggle(): void {\n if (this.disabled()) return;\n if (this.#isActive()) {\n this.exit();\n } else {\n this.enter();\n }\n }\n\n /** Enter fullscreen mode. No-op if already active or disabled. */\n enter(): void {\n if (this.#isActive() || this.disabled()) return;\n this.#saveOriginalStyles();\n this.#applyFullscreenStyles();\n this.#makeBackgroundInert();\n this.#lockBodyScroll();\n this.#isActive.set(true);\n this.fullscreenEnter.emit();\n }\n\n /** Exit fullscreen mode. No-op if not active. */\n exit(): void {\n if (!this.#isActive()) return;\n this.#restoreOriginalStyles();\n this.#restoreBackground();\n this.#unlockBodyScroll();\n this.#isActive.set(false);\n this.fullscreenExit.emit();\n }\n\n /** @internal */\n onEscape(): void {\n if (this.#isActive()) {\n this.exit();\n }\n }\n\n #saveOriginalStyles(): void {\n const style = this.#elRef.nativeElement.style;\n this.#originalStyles = {\n position: style.position,\n inset: style.inset,\n zIndex: style.zIndex,\n width: style.width,\n height: style.height,\n overflow: style.overflow,\n backgroundColor: style.backgroundColor\n };\n }\n\n #applyFullscreenStyles(): void {\n const el = this.#elRef.nativeElement;\n this.#renderer.setStyle(el, 'position', 'fixed');\n this.#renderer.setStyle(el, 'inset', '0');\n this.#renderer.setStyle(el, 'z-index', '1000');\n this.#renderer.setStyle(el, 'width', '100vw');\n this.#renderer.setStyle(el, 'height', '100vh');\n this.#renderer.setStyle(el, 'overflow', 'auto');\n this.#renderer.setStyle(el, 'background-color', 'var(--ymt-surface, #fff)');\n }\n\n #restoreOriginalStyles(): void {\n const el = this.#elRef.nativeElement;\n for (const [prop, value] of Object.entries(this.#originalStyles)) {\n if (value) {\n this.#renderer.setStyle(el, prop, value);\n } else {\n this.#renderer.removeStyle(el, prop);\n }\n }\n this.#originalStyles = {};\n }\n\n #makeBackgroundInert(): void {\n this.#inertElements = [];\n let current: HTMLElement = this.#elRef.nativeElement;\n\n while (current.parentElement) {\n const parent = current.parentElement;\n for (let i = 0; i < parent.children.length; i++) {\n const sibling = parent.children[i] as HTMLElement;\n if (sibling !== current && !sibling.hasAttribute('inert')) {\n this.#renderer.setAttribute(sibling, 'inert', '');\n this.#inertElements.push(sibling);\n }\n }\n if (parent === document.body) break;\n current = parent;\n }\n }\n\n #restoreBackground(): void {\n for (const el of this.#inertElements) {\n this.#renderer.removeAttribute(el, 'inert');\n }\n this.#inertElements = [];\n }\n\n #lockBodyScroll(): void {\n this.#originalBodyOverflow = document.body.style.overflow;\n this.#renderer.setStyle(document.body, 'overflow', 'hidden');\n }\n\n #unlockBodyScroll(): void {\n if (this.#originalBodyOverflow) {\n this.#renderer.setStyle(document.body, 'overflow', this.#originalBodyOverflow);\n } else {\n this.#renderer.removeStyle(document.body, 'overflow');\n }\n this.#originalBodyOverflow = '';\n }\n\n ngOnDestroy(): void {\n if (this.#isActive()) {\n this.exit();\n }\n }\n}\n","import { Component, input, TemplateRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-top-bar',\n imports: [CommonModule],\n templateUrl: './pane-top-bar.component.html',\n styleUrl: './pane-top-bar.component.scss',\n})\nexport class YmtPaneTopBarComponent {\n /**\n * TemplateRef for actions area in the top bar.\n */\n actions = input<TemplateRef<any>>();\n}\n","@let ta = actions();\n@if (ta) {\n <div class=\"top-bar\">\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, TemplateRef } from '@angular/core';\nimport { FullscreenDirective } from './fullscreen.directive';\nimport { YmtPaneTopBarComponent } from './pane-top-bar/pane-top-bar.component';\n\n/**\n * Pane component.\n *\n * A pane has a header and a main area. You may choose to not show a header at all:\n *\n * ```html\n * <ymt-pane>\n * Pane content goes here.\n * </ymt-pane>\n * ```\n *\n * There are other components to be used within a pane:\n * - `ymt-pane-header`: Renders a pre-styled header area for the pane.\n * - `ymt-pane-body`: The main content area of the pane.\n * - `ymt-pane-footer`: A footer component to be used as footer area of the pane.\n *\n * You can change the appearance of the header area via CSS variables:\n * ```css\n * ymt-pane {\n * --header-area-background: var(--ymt-surface-container-low);\n * --header-area-border-color: var(--ymt-outline-variant);\n * }\n * ```\n *\n * The main area has a padding by default. You can customize or remove the padding via\n * CSS variables:\n * ```css\n * ymt-pane {\n * --main-area-padding: 0;\n * }\n * ```\n *\n * Add actions to a pane:\n * ```html\n * <ymt-pane title=\"My Pane\" subTitle=\"Pane Subtitle\">\n * <ng-template #yuvPaneActions>\n * <button ymt-icon-button><mat-icon>settings</mat-icon></button>\n * <button ymt-icon-button><mat-icon>more</mat-icon></button>\n * </ng-template>\n * </ymt-pane>\n * ```\n *\n * Toggle fullscreen mode:\n * ```html\n * <ymt-pane #pane>\n * <ymt-pane-body>\n * <button (click)=\"pane.toggleFullscreen()\">Fullscreen</button>\n * </ymt-pane-body>\n * </ymt-pane>\n * ```\n *\n */\n@Component({\n selector: 'ymt-pane',\n imports: [CommonModule, YmtPaneTopBarComponent],\n templateUrl: './pane.component.html',\n styleUrl: './pane.component.scss',\n hostDirectives: [\n {\n directive: FullscreenDirective,\n outputs: ['fullscreenEnter', 'fullscreenExit']\n }\n ],\n host: {\n '[class.plain]': 'plain()'\n }\n})\nexport class YmtPaneComponent {\n #fullscreen = inject(FullscreenDirective);\n\n /**\n * TemplateRef for actions area in the top bar. These actions will be placed at the end of\n * the top bar.\n *\n * ```html\n * <ymt-pane title=\"My Pane\" subTitle=\"Pane Subtitle\" [topBarActions]=\"topBarActions\"></ymt-pane>\n * <ng-template #topBarActions>\n * <button ymt-icon-button icon-button-size=\"small\"><mat-icon>settings</mat-icon></button>\n * </ng-template>\n * ```\n * Make sure to set the `icon-button-size=\"small\"` for proper alignment in the top bar.\n */\n topBarActions = input<TemplateRef<unknown>>();\n\n /**\n * Setting this to true will remove the default styles for the pane. So it will\n * render without border-radius, border and background color, but keep the inner\n * structure. This is useful when you want to use the pane inside another container\n * and want to apply custom styles to the pane.\n */\n plain = input<boolean>(false);\n\n /** Read-only signal indicating whether fullscreen is currently active. */\n fullscreenActive = this.#fullscreen.active;\n\n /** Toggle fullscreen mode on/off. */\n toggleFullscreen(): void {\n this.#fullscreen.toggle();\n }\n\n /** Enter fullscreen mode. */\n enterFullscreen(): void {\n this.#fullscreen.enter();\n }\n\n /** Exit fullscreen mode. */\n exitFullscreen(): void {\n this.#fullscreen.exit();\n }\n}\n","@if (topBarActions()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-footer',\n imports: [CommonModule],\n templateUrl: './pane-footer.component.html',\n styleUrl: './pane-footer.component.scss'\n})\nexport class YmtPaneFooterComponent {}\n","<footer><ng-content></ng-content></footer>\n","import { NgModule } from '@angular/core';\nimport { YmtPaneAsideComponent } from './pane/pane-aside/pane-aside.component';\nimport { YmtPaneBodyComponent } from './pane/pane-body/pane-body.component';\nimport { YmtPaneHeaderComponent } from './pane/pane-header/pane-header.component';\nimport { YmtPaneComponent } from './pane/pane.component';\nimport { YmtPaneFooterComponent } from './pane/pane-footer/pane-footer.component';\n\nconst cmp = [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneBodyComponent, YmtPaneFooterComponent, YmtPaneAsideComponent];\n\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YmtPanesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.FullscreenDirective"],"mappings":";;;;;;;MASa,qBAAqB,CAAA;wGAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTlC,4BACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDIY,YAAY,EAAA,CAAA,EAAA,CAAA;;4FAIX,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,4BAAA,EAAA;;;MEIZ,oBAAoB,CAAA;wGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTjC,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vis/material/panes/src/lib/pane/pane-aside/pane-aside.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-body/pane-body.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-body/pane-body.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-header/pane-header.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-header/pane-header.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/fullscreen.directive.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-top-bar/pane-top-bar.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-top-bar/pane-top-bar.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane.component.html","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-footer/pane-footer.component.ts","../../../../../libs/yuuvis/material/panes/src/lib/pane/pane-footer/pane-footer.component.html","../../../../../libs/yuuvis/material/panes/src/lib/panes.module.ts","../../../../../libs/yuuvis/material/panes/src/yuuvis-material-panes.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-aside',\n imports: [CommonModule],\n templateUrl: './pane-aside.component.html',\n styleUrl: './pane-aside.component.scss'\n})\nexport class YmtPaneAsideComponent {}\n","<p>pane-aside works!</p>\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-body',\n imports: [CommonModule],\n templateUrl: './pane-body.component.html',\n styleUrl: './pane-body.component.scss'\n})\nexport class YmtPaneBodyComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, TemplateRef } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\n\n/**\n * Component for the pane header. It can be used to display a title,\n * subtitle and actions in the pane header.\n *\n * The title and subtitle can be set via the `title` and `subtitle` inputs\n * or via the `yuvPaneHeaderTitle` and `yuvPaneHeaderSubtitle` template refs:\n *\n * ```html\n * <!-- Using inputs -->\n * <ymt-pane-header [title]=\"'Pane Title'\" [subtitle]=\"'Pane Subtitle'\"></ymt-pane-header>\n * <!-- Using template refs -->\n * <ymt-pane-header>\n * <ng-template #yuvPaneHeaderTitle><h2>🦁Custom pane title</h2></ng-template>\n * <ng-template #yuvPaneHeaderSubtitle><ymt-badge severity=\"warning\">locked</ymt-badge></ng-template>\n * </ymt-pane-header>\n * ```\n */\n@Component({\n selector: 'ymt-pane-header',\n imports: [CommonModule, MatIconModule],\n templateUrl: './pane-header.component.html',\n styleUrl: './pane-header.component.scss'\n})\nexport class YmtPaneHeaderComponent {\n /**\n * Title of the pane\n */\n title = input<string>();\n /**\n * Icon of the pane\n */\n icon = input<string>();\n /**\n * Subtitle of the pane\n */\n subtitle = input<string>();\n /**\n * TemplateRef for actions area in the pane header.\n */\n actions = input<TemplateRef<any>>();\n\n titleSlot = contentChild<TemplateRef<any>>('yuvPaneHeaderTitle');\n subtitleSlot = contentChild<TemplateRef<any>>('yuvPaneHeaderSubtitle');\n}\n","<header>\n @if (icon()) {\n <div class=\"icon\">\n <mat-icon class=\"pane-icon\">{{ icon() }}</mat-icon>\n </div>\n }\n <h2>\n @let ts = titleSlot();\n @if (ts) {\n <ng-container *ngTemplateOutlet=\"ts\"></ng-container>\n } @else {\n {{ title() }}\n }\n </h2>\n <small>\n @let ss = subtitleSlot();\n @if (ss) {\n <ng-container *ngTemplateOutlet=\"ss\"></ng-container>\n } @else {\n {{ subtitle() }}\n }\n </small>\n @let a = actions();\n @if (a) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"a\"></ng-container>\n </div>\n }\n</header>\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n output,\n Renderer2,\n signal\n} from '@angular/core';\n\n/**\n * Directive that enables any host element to toggle into a fullscreen overlay\n * covering the entire viewport. Background content is made inert and body scroll\n * is locked while fullscreen is active.\n *\n * @example\n * ```html\n * <div yuvFullscreen #fs=\"yuvFullscreen\">\n * <button (click)=\"fs.toggle()\">Toggle</button>\n * <p>Content</p>\n * </div>\n * ```\n */\n@Directive({\n selector: '[yuvFullscreen]',\n exportAs: 'yuvFullscreen',\n host: {\n '[class.yuv-fullscreen-active]': 'active()',\n '(document:keydown.escape)': 'onEscape()'\n }\n})\nexport class FullscreenDirective implements OnDestroy {\n #elRef = inject(ElementRef);\n #renderer = inject(Renderer2);\n\n /** Whether the fullscreen toggle is disabled. */\n disabled = input<boolean>(false);\n\n /** Emitted when fullscreen mode is entered. */\n fullscreenEnter = output<void>();\n /** Emitted when fullscreen mode is exited. */\n fullscreenExit = output<void>();\n\n #isActive = signal(false);\n\n /** Read-only signal indicating whether fullscreen is currently active. */\n active = computed(() => this.#isActive());\n\n #originalStyles: Record<string, string> = {};\n #inertElements: HTMLElement[] = [];\n #originalBodyOverflow = '';\n\n /** Toggle fullscreen on/off. */\n toggle(): void {\n if (this.disabled()) return;\n if (this.#isActive()) {\n this.exit();\n } else {\n this.enter();\n }\n }\n\n /** Enter fullscreen mode. No-op if already active or disabled. */\n enter(): void {\n if (this.#isActive() || this.disabled()) return;\n this.#saveOriginalStyles();\n this.#applyFullscreenStyles();\n this.#makeBackgroundInert();\n this.#lockBodyScroll();\n this.#isActive.set(true);\n this.fullscreenEnter.emit();\n }\n\n /** Exit fullscreen mode. No-op if not active. */\n exit(): void {\n if (!this.#isActive()) return;\n this.#restoreOriginalStyles();\n this.#restoreBackground();\n this.#unlockBodyScroll();\n this.#isActive.set(false);\n this.fullscreenExit.emit();\n }\n\n /** @internal */\n onEscape(): void {\n if (this.#isActive()) {\n this.exit();\n }\n }\n\n #saveOriginalStyles(): void {\n const style = this.#elRef.nativeElement.style;\n this.#originalStyles = {\n position: style.position,\n inset: style.inset,\n zIndex: style.zIndex,\n width: style.width,\n height: style.height,\n overflow: style.overflow,\n backgroundColor: style.backgroundColor\n };\n }\n\n #applyFullscreenStyles(): void {\n const el = this.#elRef.nativeElement;\n this.#renderer.setStyle(el, 'position', 'fixed');\n this.#renderer.setStyle(el, 'inset', '0');\n this.#renderer.setStyle(el, 'z-index', '1000');\n this.#renderer.setStyle(el, 'width', '100vw');\n this.#renderer.setStyle(el, 'height', '100vh');\n this.#renderer.setStyle(el, 'overflow', 'auto');\n this.#renderer.setStyle(el, 'background-color', 'var(--ymt-surface, #fff)');\n }\n\n #restoreOriginalStyles(): void {\n const el = this.#elRef.nativeElement;\n for (const [prop, value] of Object.entries(this.#originalStyles)) {\n if (value) {\n this.#renderer.setStyle(el, prop, value);\n } else {\n this.#renderer.removeStyle(el, prop);\n }\n }\n this.#originalStyles = {};\n }\n\n #makeBackgroundInert(): void {\n this.#inertElements = [];\n let current: HTMLElement = this.#elRef.nativeElement;\n\n while (current.parentElement) {\n const parent = current.parentElement;\n for (let i = 0; i < parent.children.length; i++) {\n const sibling = parent.children[i] as HTMLElement;\n if (sibling !== current && !sibling.hasAttribute('inert')) {\n this.#renderer.setAttribute(sibling, 'inert', '');\n this.#inertElements.push(sibling);\n }\n }\n if (parent === document.body) break;\n current = parent;\n }\n }\n\n #restoreBackground(): void {\n for (const el of this.#inertElements) {\n this.#renderer.removeAttribute(el, 'inert');\n }\n this.#inertElements = [];\n }\n\n #lockBodyScroll(): void {\n this.#originalBodyOverflow = document.body.style.overflow;\n this.#renderer.setStyle(document.body, 'overflow', 'hidden');\n }\n\n #unlockBodyScroll(): void {\n if (this.#originalBodyOverflow) {\n this.#renderer.setStyle(document.body, 'overflow', this.#originalBodyOverflow);\n } else {\n this.#renderer.removeStyle(document.body, 'overflow');\n }\n this.#originalBodyOverflow = '';\n }\n\n ngOnDestroy(): void {\n if (this.#isActive()) {\n this.exit();\n }\n }\n}\n","import { Component, input, TemplateRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-top-bar',\n imports: [CommonModule],\n templateUrl: './pane-top-bar.component.html',\n styleUrl: './pane-top-bar.component.scss',\n})\nexport class YmtPaneTopBarComponent {\n /**\n * TemplateRef for actions area in the top bar.\n */\n actions = input<TemplateRef<any>>();\n}\n","@let ta = actions();\n@if (ta) {\n <div class=\"top-bar\">\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, input, TemplateRef } from '@angular/core';\nimport { FullscreenDirective } from './fullscreen.directive';\nimport { YmtPaneTopBarComponent } from './pane-top-bar/pane-top-bar.component';\n\n/**\n * A pane is a container component that unifies the appearance and behavior of\n * content areas in an app. It renders as a bordered, rounded card with a grid\n * layout for its sub-components.\n *\n * ## Structure\n *\n * A pane uses a vertical grid layout with four areas. All sub-components are optional:\n *\n * | Area | Component | Description |\n * |----------|--------------------|----------------------------------------------------|\n * | top-bar | *(internal)* | Rendered automatically when `topBarActions` is set. |\n * | header | `ymt-pane-header` | Title, subtitle, icon, and custom header actions. |\n * | main | `ymt-pane-body` | Scrollable main content area. |\n * | footer | `ymt-pane-footer` | Right-aligned action bar with a top border. |\n *\n * ```html\n * <ymt-pane>\n * <ymt-pane-header title=\"Users\" subtitle=\"3 selected\" [actions]=\"headerActions\" />\n * <ymt-pane-body>Main content</ymt-pane-body>\n * <ymt-pane-footer>\n * <button ymt-button>Save</button>\n * </ymt-pane-footer>\n * </ymt-pane>\n * ```\n *\n * ### `ymt-pane-header`\n *\n * Accepts `title`, `subtitle`, and `icon` as string inputs. For richer content,\n * use the `#yuvPaneHeaderTitle` and `#yuvPaneHeaderSubtitle` template refs:\n *\n * ```html\n * <ymt-pane-header>\n * <ng-template #yuvPaneHeaderTitle><h2>Custom title</h2></ng-template>\n * <ng-template #yuvPaneHeaderSubtitle><ymt-badge severity=\"warning\">locked</ymt-badge></ng-template>\n * </ymt-pane-header>\n * ```\n *\n * Header actions can be projected via the `[actions]` input (TemplateRef).\n *\n * ### Top bar actions\n *\n * Pass a `TemplateRef` to the `[topBarActions]` input to render icon buttons\n * in a slim top bar above the header:\n *\n * ```html\n * <ymt-pane [topBarActions]=\"actions\">\n * <ymt-pane-body>Content</ymt-pane-body>\n * </ymt-pane>\n *\n * <ng-template #actions>\n * <button ymt-icon-button icon-button-size=\"small\"><mat-icon>settings</mat-icon></button>\n * </ng-template>\n * ```\n *\n * ## Fullscreen\n *\n * Every pane supports fullscreen mode. The pane expands to fill the viewport,\n * background content becomes inert, and pressing <kbd>Escape</kbd> exits.\n *\n * ```html\n * <ymt-pane #pane>\n * <ymt-pane-body>\n * <button (click)=\"pane.toggleFullscreen()\">Toggle fullscreen</button>\n * </ymt-pane-body>\n * </ymt-pane>\n * ```\n *\n * Programmatic API: `enterFullscreen()`, `exitFullscreen()`, `toggleFullscreen()`.\n * Read the current state via the `fullscreenActive` signal.\n * Listen to transitions via the `(fullscreenEnter)` and `(fullscreenExit)` outputs.\n *\n * ## Busy state\n *\n * Set `[busy]=\"true\"` to replace the static border with a rotating\n * conic-gradient border that signals a loading state:\n *\n * ```html\n * <ymt-pane [busy]=\"isLoading()\">\n * <ymt-pane-body>Content</ymt-pane-body>\n * </ymt-pane>\n * ```\n *\n * ## Enter animation\n *\n * Panes fade in on creation (0.15 s ease-out by default). Customize or delay\n * the animation via CSS variables, or disable it entirely with the\n * `[noAnimation]` input:\n *\n * ```css\n * ymt-pane {\n * --enter-animation-duration: 0.3s;\n * --enter-animation-delay: 0.1s;\n * }\n * ```\n *\n * ```html\n * <ymt-pane [noAnimation]=\"true\"> ... </ymt-pane>\n * ```\n *\n * ## Plain mode\n *\n * Set `[plain]=\"true\"` to strip the border, border-radius, and background\n * while keeping the inner grid structure. Useful when embedding a pane inside\n * another styled container.\n *\n * ## CSS custom properties\n *\n * | Property | Default | Description |\n * |-------------------------------|-------------------------------|--------------------------------------|\n * | `--header-area-padding` | `var(--ymt-spacing-xl)` | Padding of the header area. |\n * | `--header-area-background` | `transparent` | Background of the header area. |\n * | `--header-area-border-color` | `transparent` | Bottom border of the header area. |\n * | `--main-area-padding` | `0` | Padding of the body area. |\n * | `--pane-background-color` | `var(--ymt-surface)` | Background of the pane. |\n * | `--busy-border-width` | `2px` | Width of the busy indicator border. |\n * | `--busy-border-color` | `var(--ymt-primary)` | Color of the busy indicator border. |\n * | `--enter-animation-duration` | `0.15s` | Duration of the fade-in animation. |\n * | `--enter-animation-delay` | `0s` | Delay before the fade-in starts. |\n */\n@Component({\n selector: 'ymt-pane',\n imports: [CommonModule, YmtPaneTopBarComponent],\n templateUrl: './pane.component.html',\n styleUrl: './pane.component.scss',\n hostDirectives: [\n {\n directive: FullscreenDirective,\n outputs: ['fullscreenEnter', 'fullscreenExit']\n }\n ],\n host: {\n '[class.plain]': 'plain()',\n '[class.busy]': 'busy()',\n '[class.no-animation]': 'noAnimation()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YmtPaneComponent {\n /**\n * This static block runs once when the class is first loaded (not per instance).\n * It registers a custom CSS property (--busy-angle) with the browser's CSS engine via\n * CSS.registerProperty().\n * Why it's needed: Normally, CSS custom properties (e.g. --busy-angle) are just\n * strings — the browser can't interpolate them in animations. By registering the\n * property with syntax: '<angle>', the browser knows it's an angle value and can\n * smoothly animate it from 0deg to 360deg in the keyframe.\n * Why it's in JS instead of CSS: The standard CSS way is @property --busy-angle { ... }\n * (which was in the original SCSS). But Angular's emulated view encapsulation doesn't\n * pass @property at-rules through to the document correctly, so the property never got\n * registered and the animation was static. CSS.registerProperty() is the JavaScript\n * equivalent and works globally regardless of Angular's style scoping.\n * The try/catch: CSS.registerProperty() throws if the same property name is registered\n * twice. Since this component could be bundled in multiple chunks or the module re-evaluated,\n * the catch silently ignores the duplicate registration error.\n */\n static {\n try {\n CSS.registerProperty({\n name: '--busy-angle',\n syntax: '<angle>',\n initialValue: '0deg',\n inherits: false\n });\n } catch {\n // Already registered or unsupported\n }\n }\n\n #fullscreen = inject(FullscreenDirective);\n\n /**\n * Template for action buttons rendered in the top bar area of the pane.\n * Use `icon-button-size=\"small\"` or `icon-button-size=\"extra-small\"` on icon\n * buttons for proper alignment.\n *\n * ```html\n * <ymt-pane [topBarActions]=\"actions\">\n * <ymt-pane-body>Content</ymt-pane-body>\n * </ymt-pane>\n *\n * <ng-template #actions>\n * <button ymt-icon-button icon-button-size=\"small\"><mat-icon>settings</mat-icon></button>\n * </ng-template>\n * ```\n */\n topBarActions = input<TemplateRef<unknown>>();\n\n /**\n * When set to true, the pane border will be replaced with an animated\n * conic-gradient border to indicate a busy/loading state.\n */\n busy = input<boolean>(false);\n\n /**\n * Disable the default fade-in enter animation.\n */\n noAnimation = input<boolean>(false);\n\n /**\n * Setting this to true will remove the default styles for the pane. So it will\n * render without border-radius, border and background color, but keep the inner\n * structure. This is useful when you want to use the pane inside another container\n * and want to apply custom styles to the pane.\n */\n plain = input<boolean>(false);\n\n /** Read-only signal indicating whether fullscreen is currently active. */\n fullscreenActive = this.#fullscreen.active;\n\n /** Toggle fullscreen mode on/off. */\n toggleFullscreen(): void {\n this.#fullscreen.toggle();\n }\n\n /** Enter fullscreen mode. */\n enterFullscreen(): void {\n this.#fullscreen.enter();\n }\n\n /** Exit fullscreen mode. */\n exitFullscreen(): void {\n this.#fullscreen.exit();\n }\n}\n","@if (topBarActions()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ymt-pane-footer',\n imports: [CommonModule],\n templateUrl: './pane-footer.component.html',\n styleUrl: './pane-footer.component.scss'\n})\nexport class YmtPaneFooterComponent {}\n","<footer><ng-content></ng-content></footer>\n","import { NgModule } from '@angular/core';\nimport { YmtPaneAsideComponent } from './pane/pane-aside/pane-aside.component';\nimport { YmtPaneBodyComponent } from './pane/pane-body/pane-body.component';\nimport { YmtPaneHeaderComponent } from './pane/pane-header/pane-header.component';\nimport { YmtPaneComponent } from './pane/pane.component';\nimport { YmtPaneFooterComponent } from './pane/pane-footer/pane-footer.component';\n\nconst cmp = [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneBodyComponent, YmtPaneFooterComponent, YmtPaneAsideComponent];\n\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YmtPanesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.FullscreenDirective"],"mappings":";;;;;;;MASa,qBAAqB,CAAA;wGAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTlC,4BACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDIY,YAAY,EAAA,CAAA,EAAA,CAAA;;4FAIX,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,4BAAA,EAAA;;;MEIZ,oBAAoB,CAAA;wGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTjC,6BACA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDIY,YAAY,EAAA,CAAA,EAAA,CAAA;;4FAIX,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,6BAAA,EAAA,M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,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YANd,gBAAgB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAA7G,gBAAgB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,CAAA,EAAA,CAAA;AAM7G,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHhB,GAAG,CAAA,EAAA,CAAA;;4FAGD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Inject, Injectable, inject, signal, makeEnvironmentProviders, input, booleanAttribute, ElementRef, EnvironmentInjector, ApplicationRef, effect, createComponent, Directive, DestroyRef, viewChild, untracked, Input, HostBinding, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { Inject, Injectable, inject, signal, makeEnvironmentProviders, provideEnvironmentInitializer, input, booleanAttribute, ElementRef, EnvironmentInjector, ApplicationRef, effect, createComponent, Directive, DestroyRef, viewChild, untracked, Input, HostBinding, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { MAT_NATIVE_DATE_FORMATS, DateAdapter, MAT_DATE_FORMATS, NativeDateAdapter, MAT_DATE_LOCALE, MAT_RIPPLE_GLOBAL_OPTIONS, NativeDateModule } from '@angular/material/core';
4
+ import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
4
5
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormField, MatFormFieldControl } from '@angular/material/form-field';
5
6
  import { MatIconRegistry } from '@angular/material/icon';
6
- import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
7
7
  import { MatPaginatorIntl } from '@angular/material/paginator';
8
8
  import { MAT_TABS_CONFIG } from '@angular/material/tabs';
9
9
  import { MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip';
@@ -15,7 +15,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
15
15
  import { MatDatepickerIntl, MatDatepicker, MatDatepickerInput, MatDateRangeInput, MatDateRangePicker, MatEndDate, MatStartDate } from '@angular/material/datepicker';
16
16
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
17
17
  import { DeviceDetectorService } from 'ngx-device-detector';
18
- import { fromEvent, debounceTime, ReplaySubject, Subject } from 'rxjs';
18
+ import { fromEvent, debounceTime, ReplaySubject, BehaviorSubject, Subject } from 'rxjs';
19
19
  import { MatIconButton, MatButton } from '@angular/material/button';
20
20
  import { MatInput } from '@angular/material/input';
21
21
  import * as i1$1 from '@angular/forms';
@@ -174,35 +174,54 @@ var DeviceScreenOrientation;
174
174
  })(DeviceScreenOrientation || (DeviceScreenOrientation = {}));
175
175
 
176
176
  /**
177
- * This service is used to adapt styles and designs of the client to
178
- * different devices and screen sizes.
179
- *
180
- * Using `screenChange$` observable you are able to monitor changes to
181
- * the screen size and act upon it.
182
- *
183
- * This service will also adds attributes to the body tag that reflect the
184
- * current screen/device state. This way you can apply secific styles in your
185
- * css files for different screen resolutions and orientations.
177
+ * Service that adapts the application layout and behavior to different devices,
178
+ * screen sizes, orientations, and browser zoom levels.
186
179
  *
187
- * Attributes applied to the body tag are:
180
+ * This service operates globally as a singleton, listening to window resize events
181
+ * and maintaining reactive state about the current screen and zoom conditions.
182
+ * It also writes attributes to the `<body>` element so that CSS rules can respond
183
+ * to screen state without requiring Angular bindings.
188
184
  *
189
- * - `data-screen` - [s, m, l, xl] - for different screen sizes
190
- * (s: for mobile phone like screen sizes, m: for tablet like screen
191
- * sizes, 'l': for desktop like screen sizes, 'xl': for screen sizes exceeding
192
- * the desktop screen size).
185
+ * **Key Features:**
186
+ * - Screen size classification (s / m / l / xl) based on viewport dimensions
187
+ * - Orientation detection (portrait / landscape), with native API fallback on mobile
188
+ * - Small-screen layout signal for toggling compact UI modes
189
+ * - Browser zoom level tracking via `pageZoomPercentage$`
190
+ * - Automatic `<body>` attribute management for CSS-driven responsive styles
193
191
  *
194
- * - `data-orientation` - [portrait, landscape] - for the current screen orientation
192
+ * **Usage:**
193
+ * 1. `DeviceService` is initialized automatically by `provideYmtMaterial()` in `app.config.ts`
194
+ * 2. Pass `{ supportsSmallScreens: true }` to `provideYmtMaterial()` if the app has a dedicated compact layout
195
+ * 3. Inject `DeviceService` wherever needed — it is already initialized
196
+ * 4. Subscribe to `screenChange$` or `pageZoomPercentage$` to react to changes
195
197
  *
196
- * - `data-touch-enabled` - [true] - if the device has touch capabilities (won't be added if the device doesn't have touch capabilities)
198
+ * **Body attributes written by this service:**
199
+ * - `data-screen-size` — current size bucket: `s` | `m` | `l` | `xl`
200
+ * - `data-screen-orientation` — `portrait` | `landscape`
201
+ * - `data-touch-enabled` — present only when the device supports touch input
197
202
  *
198
203
  * ```html
199
- * <body data-screen-size="s" data-screen-orientation="portrait" data-touch-enabled="true">
200
- * ...
204
+ * <body data-screen-size="l" data-screen-orientation="landscape">
205
+ * ...
201
206
  * </body>
202
207
  * ```
208
+ *
209
+ * **Screen size boundaries:**
210
+ *
211
+ * | Size | Range | Device |
212
+ * |------|----------------------------|-----------------------------------|
213
+ * | `s` | < 600px | mobile phone |
214
+ * | `m` | 600px – 900/1200px | tablet (upper bound by orientation) |
215
+ * | `l` | 900/1200px – 1800px | desktop |
216
+ * | `xl` | ≥ 1800px | wide / large desktop |
217
+ *
218
+ * @see {@link DeviceScreen} for the screen state shape emitted by `screenChange$`
203
219
  */
204
220
  class DeviceService {
221
+ //#region Dependencies
205
222
  #deviceDetectorService = inject(DeviceDetectorService);
223
+ //#endregion
224
+ //#region Properties
206
225
  #upperScreenBoundary = {
207
226
  small: 600,
208
227
  mediumPortrait: 900,
@@ -212,36 +231,126 @@ class DeviceService {
212
231
  #resize$ = fromEvent(window, 'resize').pipe(debounceTime(this.#getDebounceTime()));
213
232
  #screen;
214
233
  #screenSource = new ReplaySubject(1);
234
+ /**
235
+ * Emits the current {@link DeviceScreen} state whenever the window is resized.
236
+ *
237
+ * The emitted value includes the size bucket (`s` | `m` | `l` | `xl`), orientation,
238
+ * and the raw viewport dimensions in pixels. Use this stream to reactively adapt
239
+ * layout or behavior whenever the screen state changes.
240
+ *
241
+ * Replay buffer of 1 — late subscribers always receive the most recent value
242
+ * without waiting for the next resize event.
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * deviceService.screenChange$.subscribe(screen => {
247
+ * console.log(screen.size); // 'l'
248
+ * console.log(screen.orientation); // 'landscape'
249
+ * console.log(screen.width); // 1440
250
+ * });
251
+ * ```
252
+ */
215
253
  screenChange$ = this.#screenSource.asObservable();
216
254
  /**
217
- * Signal to indicate if the screen size is small (e.g. mobile phone).
218
- * This will only be triggered if `supportsSmallScreens` is set to true.
219
- * Major components will use this metric to adapt to 'small screen behavior' and so can you
255
+ * Signal that indicates whether the app should render in a compact small-screen layout.
256
+ *
257
+ * This is `true` only when all three conditions are met:
258
+ * 1. `supportsSmallScreens` was passed as `true` to {@link init}
259
+ * 2. The current screen size bucket is `s` (< 600px viewport width)
260
+ * 3. The current orientation is `portrait`
261
+ *
262
+ * Components that have a dedicated compact mode should read this signal
263
+ * and switch their layout accordingly.
264
+ *
265
+ * @default false
220
266
  */
221
267
  smallScreenLayout = signal(false);
222
268
  #supportsSmallScreens = signal(false);
223
269
  /**
224
- * if the device is a mobile device (android / iPhone / windows-phone etc)
270
+ * `true` if the current device is a mobile phone (Android, iPhone, Windows Phone, etc.).
271
+ * Populated once at service creation from `ngx-device-detector`.
225
272
  */
226
273
  isMobile = this.#deviceDetectorService.isMobile();
227
274
  /**
228
- * if the device us a tablet (iPad etc)
275
+ * `true` if the current device is a tablet (e.g. iPad).
276
+ * Populated once at service creation from `ngx-device-detector`.
229
277
  */
230
278
  isTablet = this.#deviceDetectorService.isTablet();
231
279
  /**
232
- * if the app is running on a Desktop browser
280
+ * `true` if the app is running in a desktop browser.
281
+ * Populated once at service creation from `ngx-device-detector`.
233
282
  */
234
283
  isDesktop = this.#deviceDetectorService.isDesktop();
284
+ /**
285
+ * Detailed device and browser information provided by `ngx-device-detector`.
286
+ * Includes OS, browser name and version, device type, and user agent.
287
+ */
235
288
  info = this.#deviceDetectorService.getDeviceInfo();
289
+ /**
290
+ * `true` if the device supports touch input.
291
+ * Detected via `ontouchstart` presence or `navigator.maxTouchPoints > 0`.
292
+ */
236
293
  isTouchEnabled = this.#isTouchEnabled();
237
- constructor() {
238
- this.#resize$.subscribe((e) => {
239
- this.#setScreen();
240
- });
241
- }
294
+ #pageZoom$ = new BehaviorSubject(0);
295
+ /**
296
+ * Emits the current browser zoom level as a percentage whenever it changes.
297
+ *
298
+ * The value is derived from `window.outerWidth / window.innerWidth * 100`.
299
+ * At 100% zoom the value is `100`, at 150% it is `150`, and so on.
300
+ *
301
+ * Emits only when the value actually changes (no duplicate emissions).
302
+ * Updates are driven by the window `resize` event, which all major browsers
303
+ * fire when the user changes the zoom level via Ctrl+/- or Ctrl+scroll.
304
+ * On desktop there is a 500ms debounce; on mobile, no debounce is applied.
305
+ *
306
+ * @example
307
+ * ```ts
308
+ * deviceService.pageZoomPercentage$.subscribe(zoom => {
309
+ * console.log(`Current zoom: ${zoom}%`); // e.g. "Current zoom: 150%"
310
+ * });
311
+ * ```
312
+ */
313
+ pageZoomPercentage$ = this.#pageZoom$.asObservable();
314
+ //#endregion
315
+ //#region Public APIs
316
+ /**
317
+ * Initializes the service and performs the first screen state evaluation.
318
+ *
319
+ * Called automatically by `provideYmtMaterial()` during application startup.
320
+ *
321
+ * Immediately evaluates the current viewport dimensions, classifies the screen size
322
+ * and orientation, writes the result to the `<body>` attributes, and emits the initial
323
+ * value on `screenChange$`. Subsequent updates are handled automatically via the
324
+ * internal resize listener.
325
+ *
326
+ * @param supportsSmallScreens - Set to `true` if the application has a dedicated compact
327
+ * layout for small portrait screens. When `true`, the {@link smallScreenLayout} signal
328
+ * will be set to `true` whenever the screen bucket is `s` and orientation is `portrait`.
329
+ * Defaults to `false`.
330
+ */
242
331
  init(supportsSmallScreens = false) {
243
332
  this.#supportsSmallScreens.set(supportsSmallScreens);
244
333
  this.#setScreen();
334
+ this.#setPageZoom();
335
+ this.#handleScreenResize();
336
+ }
337
+ //#endregion
338
+ //#region Utilities
339
+ #getPageZoom() {
340
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
341
+ return (window.outerWidth / window.innerWidth) * 100;
342
+ }
343
+ #setPageZoom() {
344
+ const zoom = this.#getPageZoom();
345
+ if (zoom !== this.#pageZoom$.value) {
346
+ this.#pageZoom$.next(zoom);
347
+ }
348
+ }
349
+ #handleScreenResize() {
350
+ this.#resize$.subscribe(() => {
351
+ this.#setScreen();
352
+ this.#setPageZoom();
353
+ });
245
354
  }
246
355
  #isTouchEnabled() {
247
356
  return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
@@ -252,10 +361,12 @@ class DeviceService {
252
361
  height: window.innerHeight
253
362
  };
254
363
  let orientation = bounds.width >= bounds.height ? DeviceScreenOrientation.LANDSCAPE : DeviceScreenOrientation.PORTRAIT;
364
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
255
365
  if (this.isMobile && window.screen['orientation']) {
256
366
  const screenOrientation = window.screen['orientation'].type;
257
367
  if (screenOrientation === 'landscape-primary' || screenOrientation === 'landscape-secondary') {
258
368
  orientation = DeviceScreenOrientation.LANDSCAPE;
369
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
259
370
  }
260
371
  else if (screenOrientation === 'portrait-primary' || screenOrientation === 'portrait-secondary') {
261
372
  orientation = DeviceScreenOrientation.PORTRAIT;
@@ -288,7 +399,9 @@ class DeviceService {
288
399
  if (this.#isBelow(this.#upperScreenBoundary.small, bounds)) {
289
400
  return 's';
290
401
  }
291
- else if (this.#isBelow(orientation === 'landscape' ? this.#upperScreenBoundary.mediumLandscape : this.#upperScreenBoundary.mediumPortrait, bounds)) {
402
+ else if (this.#isBelow(orientation === 'landscape'
403
+ ? this.#upperScreenBoundary.mediumLandscape
404
+ : this.#upperScreenBoundary.mediumPortrait, bounds)) {
292
405
  return 'm';
293
406
  }
294
407
  else if (this.#isBelow(this.#upperScreenBoundary.large, bounds)) {
@@ -304,7 +417,7 @@ class DeviceService {
304
417
  }
305
418
  #getDebounceTime() {
306
419
  // on mobile devices resize only happens when rotating the device or when
307
- // keyboard appears, so we dont't need to debounce
420
+ // keyboard appears, so we don't need to debounce
308
421
  return this.isMobile ? 0 : 500;
309
422
  }
310
423
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DeviceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -315,7 +428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
315
428
  args: [{
316
429
  providedIn: 'root'
317
430
  }]
318
- }], ctorParameters: () => [] });
431
+ }] });
319
432
 
320
433
  /* Draft */
321
434
  class YmtMatPaginatorIntlService extends MatPaginatorIntl {
@@ -357,12 +470,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
357
470
  type: Injectable
358
471
  }] });
359
472
 
360
- const provideYmtMaterial = (customTheme) => {
473
+ const provideYmtMaterial = (customTheme, options) => {
361
474
  const providers = [
362
475
  /**
363
476
  * Material Date Locale Default
364
477
  */
365
- { provide: MAT_DATE_LOCALE, useFactory: (translate) => translate.defaultLang, deps: [TranslateService] },
478
+ {
479
+ provide: MAT_DATE_LOCALE,
480
+ useFactory: (translate) => translate.defaultLang,
481
+ deps: [TranslateService]
482
+ },
366
483
  { provide: MAT_DATE_FORMATS, useValue: YMT_DATE_FORMATS },
367
484
  /**
368
485
  * Material Datepicker Internationalization Service Override
@@ -444,11 +561,17 @@ const provideYmtMaterial = (customTheme) => {
444
561
  }
445
562
  }
446
563
  ];
447
- return makeEnvironmentProviders(providers);
564
+ return makeEnvironmentProviders([
565
+ ...providers,
566
+ provideEnvironmentInitializer(() => {
567
+ inject(DeviceService).init(options?.supportsSmallScreens);
568
+ })
569
+ ]);
448
570
  };
449
571
 
450
572
  var YMT_ICON_BUTTON_SIZE;
451
573
  (function (YMT_ICON_BUTTON_SIZE) {
574
+ YMT_ICON_BUTTON_SIZE["extraSmall"] = "extra-small";
452
575
  YMT_ICON_BUTTON_SIZE["small"] = "small";
453
576
  YMT_ICON_BUTTON_SIZE["medium"] = "medium";
454
577
  })(YMT_ICON_BUTTON_SIZE || (YMT_ICON_BUTTON_SIZE = {}));
@@ -479,8 +602,11 @@ class YmtIconButtonDirective {
479
602
  this.#setMaterialInputs();
480
603
  }
481
604
  #applySizeClass() {
482
- this.size() === YMT_ICON_BUTTON_SIZE.small ? this.#host.classList.add(`ymt-icon-button--size-s`) : this.#host.classList.remove(`ymt-icon-button--size-s`);
483
- this.size() === YMT_ICON_BUTTON_SIZE.medium ? this.#host.classList.add(`ymt-icon-button--size-m`) : this.#host.classList.remove(`ymt-icon-button--size-m`);
605
+ const size = this.size();
606
+ const host = this.#host.classList;
607
+ host.toggle('ymt-icon-button--size-xs', size === YMT_ICON_BUTTON_SIZE.extraSmall);
608
+ host.toggle('ymt-icon-button--size-s', size === YMT_ICON_BUTTON_SIZE.small);
609
+ host.toggle('ymt-icon-button--size-m', size === YMT_ICON_BUTTON_SIZE.medium);
484
610
  }
485
611
  #setMaterialInputs() {
486
612
  const inputs = this.#materialIconButtonInputs.map(({ name, signal }) => ({ name, value: signal() }));
@@ -517,12 +643,12 @@ var YMT_BUTTON_SIZE;
517
643
  YMT_BUTTON_SIZE["medium"] = "medium";
518
644
  })(YMT_BUTTON_SIZE || (YMT_BUTTON_SIZE = {}));
519
645
 
520
- var MatButtonAttributeEnum;
521
- (function (MatButtonAttributeEnum) {
522
- MatButtonAttributeEnum["primary"] = "mat-flat-button";
523
- MatButtonAttributeEnum["secondary"] = "mat-stroked-button";
524
- MatButtonAttributeEnum["tertiary"] = "mat-button";
525
- })(MatButtonAttributeEnum || (MatButtonAttributeEnum = {}));
646
+ const MatButtonAttributeMap = {
647
+ primary: 'mat-flat-button',
648
+ secondary: 'mat-stroked-button',
649
+ tertiary: 'mat-button',
650
+ danger: 'mat-flat-button'
651
+ };
526
652
  class YmtButtonDirective {
527
653
  ymtButton = input('primary');
528
654
  disabled = input(false, { transform: booleanAttribute });
@@ -538,7 +664,7 @@ class YmtButtonDirective {
538
664
  #iconPrefix = [];
539
665
  #noneIconNodes = [];
540
666
  #iconSuffix = [];
541
- #matButtonAttribute = MatButtonAttributeEnum;
667
+ #matButtonAttribute = MatButtonAttributeMap;
542
668
  constructor() {
543
669
  effect(() => {
544
670
  const disabled = this.disabled();
@@ -579,6 +705,9 @@ class YmtButtonDirective {
579
705
  }
580
706
  #setInitialAttributesToHost() {
581
707
  this.#hostElement.setAttribute(this.#matButtonAttribute[this.ymtButton()], '');
708
+ if (this.ymtButton() === 'danger') {
709
+ this.#hostElement.classList.add('ymt-button--danger');
710
+ }
582
711
  }
583
712
  #getIconPrefixElements() {
584
713
  return Array.from(this.#hostElement.querySelectorAll('mat-icon:not([iconPositionEnd])'));