@tectra-ng/blocks 0.4.4 → 0.4.5
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/actions-menu/README.md +9 -1
- package/app-layout/README.md +3 -2
- package/command-palette/README.md +7 -0
- package/console-layout/README.md +24 -0
- package/cookie-notice/README.md +1 -1
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs +37 -15
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-app-layout.mjs +19 -2
- package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-command-palette.mjs +31 -8
- package/fesm2022/tectra-ng-blocks-command-palette.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-console-layout.mjs +89 -10
- package/fesm2022/tectra-ng-blocks-console-layout.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs +2 -2
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs +101 -12
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-kanban.mjs +102 -17
- package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-page-header.mjs +2 -2
- package/fesm2022/tectra-ng-blocks-page-header.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-public-header.mjs +17 -3
- package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-wizard.mjs +145 -8
- package/fesm2022/tectra-ng-blocks-wizard.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks.mjs +1 -1
- package/filters-panel/README.md +20 -1
- package/kanban/README.md +19 -1
- package/package.json +6 -6
- package/page-header/README.md +1 -1
- package/public-header/README.md +6 -0
- package/switch-language/README.md +1 -1
- package/topbar-preferences/README.md +1 -1
- package/types/tectra-ng-blocks-actions-menu.d.ts +9 -0
- package/types/tectra-ng-blocks-actions-menu.d.ts.map +1 -1
- package/types/tectra-ng-blocks-app-layout.d.ts +10 -3
- package/types/tectra-ng-blocks-app-layout.d.ts.map +1 -1
- package/types/tectra-ng-blocks-command-palette.d.ts +38 -5
- package/types/tectra-ng-blocks-command-palette.d.ts.map +1 -1
- package/types/tectra-ng-blocks-console-layout.d.ts +58 -9
- package/types/tectra-ng-blocks-console-layout.d.ts.map +1 -1
- package/types/tectra-ng-blocks-cookie-notice.d.ts +5 -5
- package/types/tectra-ng-blocks-filters-panel.d.ts +48 -4
- package/types/tectra-ng-blocks-filters-panel.d.ts.map +1 -1
- package/types/tectra-ng-blocks-kanban.d.ts +47 -7
- package/types/tectra-ng-blocks-kanban.d.ts.map +1 -1
- package/types/tectra-ng-blocks-public-header.d.ts +9 -2
- package/types/tectra-ng-blocks-public-header.d.ts.map +1 -1
- package/types/tectra-ng-blocks-wizard.d.ts +34 -6
- package/types/tectra-ng-blocks-wizard.d.ts.map +1 -1
- package/types/tectra-ng-blocks.d.ts +1 -1
- package/wizard/README.md +21 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, afterNextRender, booleanAttribute, computed, contentChild, inject, input, signal, viewChild } from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, afterNextRender, booleanAttribute, computed, contentChild, inject, input, output, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { NgTemplateOutlet } from "@angular/common";
|
|
4
4
|
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
|
|
5
5
|
import { uniqueId } from "@tectra-ng/core/a11y";
|
|
@@ -66,6 +66,8 @@ var TxPublicHeader = class TxPublicHeader {
|
|
|
66
66
|
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
67
67
|
transform: optionalBoolean
|
|
68
68
|
});
|
|
69
|
+
languageChange = output();
|
|
70
|
+
modeChange = output();
|
|
69
71
|
isUnstyled = injectUnstyled(this.unstyled);
|
|
70
72
|
passThrough = injectPassThrough("publicHeader", this, this.pt, this.ptOptions);
|
|
71
73
|
translations = injectTranslations();
|
|
@@ -226,6 +228,10 @@ var TxPublicHeader = class TxPublicHeader {
|
|
|
226
228
|
transformFunction: null
|
|
227
229
|
}
|
|
228
230
|
},
|
|
231
|
+
outputs: {
|
|
232
|
+
languageChange: "languageChange",
|
|
233
|
+
modeChange: "modeChange"
|
|
234
|
+
},
|
|
229
235
|
host: {
|
|
230
236
|
listeners: { "document:keydown.escape": "onEscape()" },
|
|
231
237
|
properties: {
|
|
@@ -253,7 +259,7 @@ var TxPublicHeader = class TxPublicHeader {
|
|
|
253
259
|
isSignal: true
|
|
254
260
|
}],
|
|
255
261
|
ngImport: i0,
|
|
256
|
-
template: "<ng-template #brandContent>\n @if (brandSlot()) {\n <ng-content select=\"[txPublicHeaderBrand]\" />\n } @else {\n @if (logo(); as logo) {\n <img class=\"tx-public-header__logo\" alt=\"\" [src]=\"logo\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n <span class=\"tx-public-header__name\">{{ brand() }}</span>\n }\n</ng-template>\n<header class=\"tx-public-header__bar\" [class]=\"passThrough().bar?.class\" [style]=\"passThrough().bar?.style\">\n <div class=\"tx-public-header__inner\">\n @if (router) {\n <a\n class=\"tx-public-header__brand\"\n [routerLink]=\"homeLink()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n (click)=\"close()\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n } @else {\n <a\n class=\"tx-public-header__brand\"\n [href]=\"homeHref()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- closes the menu after a link or a button inside was used; they handle the keyboard themselves -->\n <div class=\"tx-public-header__panel\" [id]=\"panelId\" [class]=\"passThrough().panel?.class\" [style]=\"passThrough().panel?.style\" (click)=\"onPanelClick($event)\" (animationend)=\"onPanelAnimationEnd($event)\">\n <div class=\"tx-public-header__nav\" [class]=\"passThrough().nav?.class\" [style]=\"passThrough().nav?.style\">\n <ng-content select=\"[txPublicHeaderNav]\" />\n </div>\n <div class=\"tx-public-header__end\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n @if (preferences()) {\n <tx-topbar-preferences
|
|
262
|
+
template: "<ng-template #brandContent>\n @if (brandSlot()) {\n <ng-content select=\"[txPublicHeaderBrand]\" />\n } @else {\n @if (logo(); as logo) {\n <img class=\"tx-public-header__logo\" alt=\"\" [src]=\"logo\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n <span class=\"tx-public-header__name\">{{ brand() }}</span>\n }\n</ng-template>\n<header class=\"tx-public-header__bar\" [class]=\"passThrough().bar?.class\" [style]=\"passThrough().bar?.style\">\n <div class=\"tx-public-header__inner\">\n @if (router) {\n <a\n class=\"tx-public-header__brand\"\n [routerLink]=\"homeLink()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n (click)=\"close()\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n } @else {\n <a\n class=\"tx-public-header__brand\"\n [href]=\"homeHref()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- closes the menu after a link or a button inside was used; they handle the keyboard themselves -->\n <div class=\"tx-public-header__panel\" [id]=\"panelId\" [class]=\"passThrough().panel?.class\" [style]=\"passThrough().panel?.style\" (click)=\"onPanelClick($event)\" (animationend)=\"onPanelAnimationEnd($event)\">\n <div class=\"tx-public-header__nav\" [class]=\"passThrough().nav?.class\" [style]=\"passThrough().nav?.style\">\n <ng-content select=\"[txPublicHeaderNav]\" />\n </div>\n <div class=\"tx-public-header__end\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n @if (preferences()) {\n <tx-topbar-preferences\n class=\"tx-public-header__preferences\"\n [layout]=\"compact() ? 'stacked' : 'inline'\"\n [unstyled]=\"isUnstyled()\"\n (languageChange)=\"languageChange.emit($event)\"\n (modeChange)=\"modeChange.emit($event)\"\n />\n }\n <div class=\"tx-public-header__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPublicHeaderActions]\" />\n </div>\n </div>\n </div>\n\n <button\n #menuButton\n type=\"button\"\n class=\"tx-public-header__toggle\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"open() ? translations().closeMenu : translations().openMenu\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n (click)=\"toggle()\"\n >\n <tx-icon aria-hidden=\"true\" [name]=\"open() ? 'times' : 'bars'\" />\n </button>\n </div>\n</header>\n",
|
|
257
263
|
styles: [":host{position:sticky;top:0;display:block}:host([data-responsive=container]){container:tx-public-header/inline-size;contain:layout}.tx-public-header__bar{position:relative}.tx-public-header__inner{display:flex;align-items:center;box-sizing:border-box;margin:0 auto}.tx-public-header__brand{display:flex;flex-shrink:0;align-items:center;color:inherit;text-decoration:none}.tx-public-header__logo{height:auto}.tx-public-header__name{text-box:trim-both cap alphabetic}.tx-public-header__panel{display:flex;flex:1;align-items:center;min-width:0}.tx-public-header__nav{display:flex;align-items:center;min-width:0}.tx-public-header__nav ::ng-deep [txPublicHeaderNav]{display:flex;align-items:center}.tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{text-decoration:none}.tx-public-header__end{display:flex;flex-shrink:0;align-items:center;margin-left:auto}.tx-public-header__actions{display:flex;flex-shrink:0;align-items:center}.tx-public-header__actions ::ng-deep [txPublicHeaderActions]{display:flex;align-items:center}.tx-public-header__toggle{display:none;place-items:center;margin:0 0 0 auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}:host([data-styled]){z-index:var(--tx-public-header-z-index);font-family:var(--tx-font-family)}:host([data-styled]) .tx-public-header__bar{border-bottom:1px solid var(--tx-public-header-border-color);background:var(--tx-public-header-background);-webkit-backdrop-filter:var(--tx-public-header-backdrop-filter);backdrop-filter:var(--tx-public-header-backdrop-filter)}:host([data-styled]) .tx-public-header__inner{gap:var(--tx-public-header-gap);max-width:var(--tx-public-header-max-width);height:var(--tx-public-header-height);padding:0 var(--tx-public-header-padding-x)}:host([data-styled]) .tx-public-header__brand{gap:var(--tx-public-header-brand-gap);border-radius:var(--tx-public-header-brand-border-radius);color:var(--tx-public-header-brand-color);font-size:var(--tx-public-header-brand-font-size);font-weight:var(--tx-public-header-brand-font-weight);letter-spacing:var(--tx-public-header-brand-letter-spacing)}:host([data-styled]) .tx-public-header__brand:focus-visible{outline:none;box-shadow:var(--tx-public-header-focus-ring-shadow)}:host([data-styled]) .tx-public-header__logo{width:var(--tx-public-header-brand-logo-width)}:host([data-styled]) .tx-public-header__panel{gap:var(--tx-public-header-gap)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{gap:var(--tx-public-header-nav-gap)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{padding:var(--tx-public-header-nav-link-padding-y) var(--tx-public-header-nav-link-padding-x);border-radius:var(--tx-public-header-nav-link-border-radius);color:var(--tx-public-header-nav-link-color);font-size:var(--tx-public-header-nav-link-font-size);transition:color var(--tx-public-header-panel-duration),background-color var(--tx-public-header-panel-duration)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a:hover{background:var(--tx-public-header-nav-link-hover-background);color:var(--tx-public-header-nav-link-hover-color)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a:focus-visible{outline:none;box-shadow:var(--tx-public-header-focus-ring-shadow)}:host([data-styled]) .tx-public-header__end{gap:var(--tx-public-header-end-gap)}:host([data-styled]) .tx-public-header__actions,:host([data-styled]) .tx-public-header__actions ::ng-deep [txPublicHeaderActions]{gap:var(--tx-public-header-end-actions-gap)}:host([data-styled]) .tx-public-header__toggle{width:var(--tx-public-header-toggle-size);height:var(--tx-public-header-toggle-size);border-radius:50%;box-shadow:inset 0 0 0 1px var(--tx-public-header-toggle-ring-color);color:var(--tx-public-header-toggle-color);font-size:var(--tx-public-header-toggle-icon-size);transition:background-color var(--tx-public-header-panel-duration)}:host([data-styled]) .tx-public-header__toggle:hover{background:var(--tx-public-header-toggle-hover-background)}:host([data-styled]) .tx-public-header__toggle:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--tx-public-header-toggle-ring-color),var(--tx-public-header-focus-ring-shadow)}@media(width<768px){:host([data-responsive=viewport]) .tx-public-header__toggle{display:grid}:host([data-responsive=viewport]) .tx-public-header__panel{position:absolute;top:100%;right:0;left:0;display:none;flex-direction:column;align-items:stretch}:host([data-responsive=viewport].tx-public-header--open) .tx-public-header__panel,:host([data-responsive=viewport].tx-public-header--closing) .tx-public-header__panel{display:flex}:host([data-responsive=viewport]) .tx-public-header__nav{flex-direction:column;align-items:stretch}:host([data-responsive=viewport]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{flex-direction:column;align-items:stretch}:host([data-responsive=viewport]) .tx-public-header__end{flex-direction:column;align-items:stretch;margin-left:0}:host([data-responsive=viewport]) .tx-public-header__actions,:host([data-responsive=viewport]) .tx-public-header__actions ::ng-deep [txPublicHeaderActions]{flex-direction:column;align-items:stretch}:host([data-responsive=viewport][data-styled]) .tx-public-header__panel{gap:var(--tx-public-header-panel-gap);padding:var(--tx-public-header-panel-padding);border-bottom:1px solid var(--tx-public-header-border-color);background:var(--tx-public-header-panel-background);box-shadow:var(--tx-public-header-panel-shadow)}:host([data-responsive=viewport][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{gap:0}:host([data-responsive=viewport][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{padding:var(--tx-public-header-panel-link-padding);border-bottom:1px solid var(--tx-public-header-border-color);border-radius:var(--tx-public-header-panel-link-border-radius);color:var(--tx-public-header-panel-link-color);font-size:var(--tx-public-header-panel-link-font-size)}:host([data-responsive=viewport][data-styled]) .tx-public-header__end{gap:var(--tx-public-header-panel-gap)}:host([data-responsive=viewport][data-styled].tx-public-header--open) .tx-public-header__panel{animation:tx-public-header-panel-in var(--tx-public-header-panel-duration) ease-out}:host([data-responsive=viewport][data-styled].tx-public-header--closing) .tx-public-header__panel{animation:tx-public-header-panel-out var(--tx-public-header-panel-duration) ease-in forwards}:host([data-responsive=viewport]) .tx-public-header__actions ::ng-deep .tx-button{justify-content:center;width:100%}}@container tx-public-header (width < 768px){:host([data-responsive=container]) .tx-public-header__toggle{display:grid}:host([data-responsive=container]) .tx-public-header__panel{position:absolute;top:100%;right:0;left:0;display:none;flex-direction:column;align-items:stretch}:host([data-responsive=container].tx-public-header--open) .tx-public-header__panel,:host([data-responsive=container].tx-public-header--closing) .tx-public-header__panel{display:flex}:host([data-responsive=container]) .tx-public-header__nav{flex-direction:column;align-items:stretch}:host([data-responsive=container]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{flex-direction:column;align-items:stretch}:host([data-responsive=container]) .tx-public-header__end{flex-direction:column;align-items:stretch;margin-left:0}:host([data-responsive=container]) .tx-public-header__actions,:host([data-responsive=container]) .tx-public-header__actions ::ng-deep [txPublicHeaderActions]{flex-direction:column;align-items:stretch}:host([data-responsive=container][data-styled]) .tx-public-header__panel{gap:var(--tx-public-header-panel-gap);padding:var(--tx-public-header-panel-padding);border-bottom:1px solid var(--tx-public-header-border-color);background:var(--tx-public-header-panel-background);box-shadow:var(--tx-public-header-panel-shadow)}:host([data-responsive=container][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{gap:0}:host([data-responsive=container][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{padding:var(--tx-public-header-panel-link-padding);border-bottom:1px solid var(--tx-public-header-border-color);border-radius:var(--tx-public-header-panel-link-border-radius);color:var(--tx-public-header-panel-link-color);font-size:var(--tx-public-header-panel-link-font-size)}:host([data-responsive=container][data-styled]) .tx-public-header__end{gap:var(--tx-public-header-panel-gap)}:host([data-responsive=container][data-styled].tx-public-header--open) .tx-public-header__panel{animation:tx-public-header-panel-in var(--tx-public-header-panel-duration) ease-out}:host([data-responsive=container][data-styled].tx-public-header--closing) .tx-public-header__panel{animation:tx-public-header-panel-out var(--tx-public-header-panel-duration) ease-in forwards}:host([data-responsive=container]) .tx-public-header__actions ::ng-deep .tx-button{justify-content:center;width:100%}}@keyframes tx-public-header-panel-in{0%{opacity:0;transform:translateY(-6px)}}@keyframes tx-public-header-panel-out{to{opacity:0;transform:translateY(-6px)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-public-header__panel{animation:none!important}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a,:host([data-styled]) .tx-public-header__toggle{transition:none}}\n"],
|
|
258
264
|
dependencies: [
|
|
259
265
|
{
|
|
@@ -339,7 +345,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
339
345
|
"(document:keydown.escape)": "onEscape()"
|
|
340
346
|
},
|
|
341
347
|
viewProviders: [provideTxIconDefaults(PUBLIC_HEADER_ICON_DEFAULTS)],
|
|
342
|
-
template: "<ng-template #brandContent>\n @if (brandSlot()) {\n <ng-content select=\"[txPublicHeaderBrand]\" />\n } @else {\n @if (logo(); as logo) {\n <img class=\"tx-public-header__logo\" alt=\"\" [src]=\"logo\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n <span class=\"tx-public-header__name\">{{ brand() }}</span>\n }\n</ng-template>\n<header class=\"tx-public-header__bar\" [class]=\"passThrough().bar?.class\" [style]=\"passThrough().bar?.style\">\n <div class=\"tx-public-header__inner\">\n @if (router) {\n <a\n class=\"tx-public-header__brand\"\n [routerLink]=\"homeLink()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n (click)=\"close()\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n } @else {\n <a\n class=\"tx-public-header__brand\"\n [href]=\"homeHref()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- closes the menu after a link or a button inside was used; they handle the keyboard themselves -->\n <div class=\"tx-public-header__panel\" [id]=\"panelId\" [class]=\"passThrough().panel?.class\" [style]=\"passThrough().panel?.style\" (click)=\"onPanelClick($event)\" (animationend)=\"onPanelAnimationEnd($event)\">\n <div class=\"tx-public-header__nav\" [class]=\"passThrough().nav?.class\" [style]=\"passThrough().nav?.style\">\n <ng-content select=\"[txPublicHeaderNav]\" />\n </div>\n <div class=\"tx-public-header__end\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n @if (preferences()) {\n <tx-topbar-preferences
|
|
348
|
+
template: "<ng-template #brandContent>\n @if (brandSlot()) {\n <ng-content select=\"[txPublicHeaderBrand]\" />\n } @else {\n @if (logo(); as logo) {\n <img class=\"tx-public-header__logo\" alt=\"\" [src]=\"logo\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n <span class=\"tx-public-header__name\">{{ brand() }}</span>\n }\n</ng-template>\n<header class=\"tx-public-header__bar\" [class]=\"passThrough().bar?.class\" [style]=\"passThrough().bar?.style\">\n <div class=\"tx-public-header__inner\">\n @if (router) {\n <a\n class=\"tx-public-header__brand\"\n [routerLink]=\"homeLink()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n (click)=\"close()\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n } @else {\n <a\n class=\"tx-public-header__brand\"\n [href]=\"homeHref()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- closes the menu after a link or a button inside was used; they handle the keyboard themselves -->\n <div class=\"tx-public-header__panel\" [id]=\"panelId\" [class]=\"passThrough().panel?.class\" [style]=\"passThrough().panel?.style\" (click)=\"onPanelClick($event)\" (animationend)=\"onPanelAnimationEnd($event)\">\n <div class=\"tx-public-header__nav\" [class]=\"passThrough().nav?.class\" [style]=\"passThrough().nav?.style\">\n <ng-content select=\"[txPublicHeaderNav]\" />\n </div>\n <div class=\"tx-public-header__end\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n @if (preferences()) {\n <tx-topbar-preferences\n class=\"tx-public-header__preferences\"\n [layout]=\"compact() ? 'stacked' : 'inline'\"\n [unstyled]=\"isUnstyled()\"\n (languageChange)=\"languageChange.emit($event)\"\n (modeChange)=\"modeChange.emit($event)\"\n />\n }\n <div class=\"tx-public-header__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPublicHeaderActions]\" />\n </div>\n </div>\n </div>\n\n <button\n #menuButton\n type=\"button\"\n class=\"tx-public-header__toggle\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"open() ? translations().closeMenu : translations().openMenu\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n (click)=\"toggle()\"\n >\n <tx-icon aria-hidden=\"true\" [name]=\"open() ? 'times' : 'bars'\" />\n </button>\n </div>\n</header>\n",
|
|
343
349
|
styles: [":host{position:sticky;top:0;display:block}:host([data-responsive=container]){container:tx-public-header/inline-size;contain:layout}.tx-public-header__bar{position:relative}.tx-public-header__inner{display:flex;align-items:center;box-sizing:border-box;margin:0 auto}.tx-public-header__brand{display:flex;flex-shrink:0;align-items:center;color:inherit;text-decoration:none}.tx-public-header__logo{height:auto}.tx-public-header__name{text-box:trim-both cap alphabetic}.tx-public-header__panel{display:flex;flex:1;align-items:center;min-width:0}.tx-public-header__nav{display:flex;align-items:center;min-width:0}.tx-public-header__nav ::ng-deep [txPublicHeaderNav]{display:flex;align-items:center}.tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{text-decoration:none}.tx-public-header__end{display:flex;flex-shrink:0;align-items:center;margin-left:auto}.tx-public-header__actions{display:flex;flex-shrink:0;align-items:center}.tx-public-header__actions ::ng-deep [txPublicHeaderActions]{display:flex;align-items:center}.tx-public-header__toggle{display:none;place-items:center;margin:0 0 0 auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}:host([data-styled]){z-index:var(--tx-public-header-z-index);font-family:var(--tx-font-family)}:host([data-styled]) .tx-public-header__bar{border-bottom:1px solid var(--tx-public-header-border-color);background:var(--tx-public-header-background);-webkit-backdrop-filter:var(--tx-public-header-backdrop-filter);backdrop-filter:var(--tx-public-header-backdrop-filter)}:host([data-styled]) .tx-public-header__inner{gap:var(--tx-public-header-gap);max-width:var(--tx-public-header-max-width);height:var(--tx-public-header-height);padding:0 var(--tx-public-header-padding-x)}:host([data-styled]) .tx-public-header__brand{gap:var(--tx-public-header-brand-gap);border-radius:var(--tx-public-header-brand-border-radius);color:var(--tx-public-header-brand-color);font-size:var(--tx-public-header-brand-font-size);font-weight:var(--tx-public-header-brand-font-weight);letter-spacing:var(--tx-public-header-brand-letter-spacing)}:host([data-styled]) .tx-public-header__brand:focus-visible{outline:none;box-shadow:var(--tx-public-header-focus-ring-shadow)}:host([data-styled]) .tx-public-header__logo{width:var(--tx-public-header-brand-logo-width)}:host([data-styled]) .tx-public-header__panel{gap:var(--tx-public-header-gap)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{gap:var(--tx-public-header-nav-gap)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{padding:var(--tx-public-header-nav-link-padding-y) var(--tx-public-header-nav-link-padding-x);border-radius:var(--tx-public-header-nav-link-border-radius);color:var(--tx-public-header-nav-link-color);font-size:var(--tx-public-header-nav-link-font-size);transition:color var(--tx-public-header-panel-duration),background-color var(--tx-public-header-panel-duration)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a:hover{background:var(--tx-public-header-nav-link-hover-background);color:var(--tx-public-header-nav-link-hover-color)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a:focus-visible{outline:none;box-shadow:var(--tx-public-header-focus-ring-shadow)}:host([data-styled]) .tx-public-header__end{gap:var(--tx-public-header-end-gap)}:host([data-styled]) .tx-public-header__actions,:host([data-styled]) .tx-public-header__actions ::ng-deep [txPublicHeaderActions]{gap:var(--tx-public-header-end-actions-gap)}:host([data-styled]) .tx-public-header__toggle{width:var(--tx-public-header-toggle-size);height:var(--tx-public-header-toggle-size);border-radius:50%;box-shadow:inset 0 0 0 1px var(--tx-public-header-toggle-ring-color);color:var(--tx-public-header-toggle-color);font-size:var(--tx-public-header-toggle-icon-size);transition:background-color var(--tx-public-header-panel-duration)}:host([data-styled]) .tx-public-header__toggle:hover{background:var(--tx-public-header-toggle-hover-background)}:host([data-styled]) .tx-public-header__toggle:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--tx-public-header-toggle-ring-color),var(--tx-public-header-focus-ring-shadow)}@media(width<768px){:host([data-responsive=viewport]) .tx-public-header__toggle{display:grid}:host([data-responsive=viewport]) .tx-public-header__panel{position:absolute;top:100%;right:0;left:0;display:none;flex-direction:column;align-items:stretch}:host([data-responsive=viewport].tx-public-header--open) .tx-public-header__panel,:host([data-responsive=viewport].tx-public-header--closing) .tx-public-header__panel{display:flex}:host([data-responsive=viewport]) .tx-public-header__nav{flex-direction:column;align-items:stretch}:host([data-responsive=viewport]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{flex-direction:column;align-items:stretch}:host([data-responsive=viewport]) .tx-public-header__end{flex-direction:column;align-items:stretch;margin-left:0}:host([data-responsive=viewport]) .tx-public-header__actions,:host([data-responsive=viewport]) .tx-public-header__actions ::ng-deep [txPublicHeaderActions]{flex-direction:column;align-items:stretch}:host([data-responsive=viewport][data-styled]) .tx-public-header__panel{gap:var(--tx-public-header-panel-gap);padding:var(--tx-public-header-panel-padding);border-bottom:1px solid var(--tx-public-header-border-color);background:var(--tx-public-header-panel-background);box-shadow:var(--tx-public-header-panel-shadow)}:host([data-responsive=viewport][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{gap:0}:host([data-responsive=viewport][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{padding:var(--tx-public-header-panel-link-padding);border-bottom:1px solid var(--tx-public-header-border-color);border-radius:var(--tx-public-header-panel-link-border-radius);color:var(--tx-public-header-panel-link-color);font-size:var(--tx-public-header-panel-link-font-size)}:host([data-responsive=viewport][data-styled]) .tx-public-header__end{gap:var(--tx-public-header-panel-gap)}:host([data-responsive=viewport][data-styled].tx-public-header--open) .tx-public-header__panel{animation:tx-public-header-panel-in var(--tx-public-header-panel-duration) ease-out}:host([data-responsive=viewport][data-styled].tx-public-header--closing) .tx-public-header__panel{animation:tx-public-header-panel-out var(--tx-public-header-panel-duration) ease-in forwards}:host([data-responsive=viewport]) .tx-public-header__actions ::ng-deep .tx-button{justify-content:center;width:100%}}@container tx-public-header (width < 768px){:host([data-responsive=container]) .tx-public-header__toggle{display:grid}:host([data-responsive=container]) .tx-public-header__panel{position:absolute;top:100%;right:0;left:0;display:none;flex-direction:column;align-items:stretch}:host([data-responsive=container].tx-public-header--open) .tx-public-header__panel,:host([data-responsive=container].tx-public-header--closing) .tx-public-header__panel{display:flex}:host([data-responsive=container]) .tx-public-header__nav{flex-direction:column;align-items:stretch}:host([data-responsive=container]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{flex-direction:column;align-items:stretch}:host([data-responsive=container]) .tx-public-header__end{flex-direction:column;align-items:stretch;margin-left:0}:host([data-responsive=container]) .tx-public-header__actions,:host([data-responsive=container]) .tx-public-header__actions ::ng-deep [txPublicHeaderActions]{flex-direction:column;align-items:stretch}:host([data-responsive=container][data-styled]) .tx-public-header__panel{gap:var(--tx-public-header-panel-gap);padding:var(--tx-public-header-panel-padding);border-bottom:1px solid var(--tx-public-header-border-color);background:var(--tx-public-header-panel-background);box-shadow:var(--tx-public-header-panel-shadow)}:host([data-responsive=container][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]{gap:0}:host([data-responsive=container][data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a{padding:var(--tx-public-header-panel-link-padding);border-bottom:1px solid var(--tx-public-header-border-color);border-radius:var(--tx-public-header-panel-link-border-radius);color:var(--tx-public-header-panel-link-color);font-size:var(--tx-public-header-panel-link-font-size)}:host([data-responsive=container][data-styled]) .tx-public-header__end{gap:var(--tx-public-header-panel-gap)}:host([data-responsive=container][data-styled].tx-public-header--open) .tx-public-header__panel{animation:tx-public-header-panel-in var(--tx-public-header-panel-duration) ease-out}:host([data-responsive=container][data-styled].tx-public-header--closing) .tx-public-header__panel{animation:tx-public-header-panel-out var(--tx-public-header-panel-duration) ease-in forwards}:host([data-responsive=container]) .tx-public-header__actions ::ng-deep .tx-button{justify-content:center;width:100%}}@keyframes tx-public-header-panel-in{0%{opacity:0;transform:translateY(-6px)}}@keyframes tx-public-header-panel-out{to{opacity:0;transform:translateY(-6px)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-public-header__panel{animation:none!important}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a,:host([data-styled]) .tx-public-header__toggle{transition:none}}\n"]
|
|
344
350
|
}]
|
|
345
351
|
}],
|
|
@@ -424,6 +430,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
424
430
|
alias: "unstyled",
|
|
425
431
|
required: false
|
|
426
432
|
}]
|
|
433
|
+
}],
|
|
434
|
+
languageChange: [{
|
|
435
|
+
type: i0.Output,
|
|
436
|
+
args: ["languageChange"]
|
|
437
|
+
}],
|
|
438
|
+
modeChange: [{
|
|
439
|
+
type: i0.Output,
|
|
440
|
+
args: ["modeChange"]
|
|
427
441
|
}]
|
|
428
442
|
}
|
|
429
443
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-public-header.mjs","names":[],"sources":["../../../../packages/blocks/public-header/src/public-header-brand.directive.ts","../../../../packages/blocks/public-header/src/public-header.icons.ts","../../../../packages/blocks/public-header/src/public-header.theme.ts","../../../../packages/blocks/public-header/src/public-header.component.ts","../../../../packages/blocks/public-header/src/public-header.component.html"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({ selector: '[txPublicHeaderBrand]' })\nexport class TxPublicHeaderBrand {}\n","import { TxIconSet, txIconBars, txIconTimes } from '@tectra-ng/icons';\n\nexport const PUBLIC_HEADER_ICON_DEFAULTS: TxIconSet = {\n bars: txIconBars,\n times: txIconTimes,\n};\n","import { publicHeaderTokens } from '@tectra-ng/themes';\n\nexport const PUBLIC_HEADER_THEME = {\n publicHeader: publicHeaderTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPublicHeaderTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTopbarPreferences } from '@tectra-ng/blocks/topbar-preferences';\nimport { TxPublicHeaderBrand } from './public-header-brand.directive';\nimport { TxPublicHeaderPart, TxPublicHeaderResponsive } from './public-header.types';\nimport { PUBLIC_HEADER_ICON_DEFAULTS } from './public-header.icons';\nimport { PUBLIC_HEADER_THEME } from './public-header.theme';\n\nconst COMPACT_WIDTH = 768;\nconst CLOSE_FALLBACK_MS = 600;\n\n@Component({\n selector: 'tx-public-header',\n imports: [NgTemplateOutlet, RouterLink, TxIcon, TxTopbarPreferences],\n templateUrl: './public-header.component.html',\n styleUrl: './public-header.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-public-header',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-responsive]': 'responsive()',\n '[class.tx-public-header--open]': 'open()',\n '[class.tx-public-header--closing]': 'closing()',\n '(document:keydown.escape)': 'onEscape()',\n },\n viewProviders: [provideTxIconDefaults(PUBLIC_HEADER_ICON_DEFAULTS)],\n})\nexport class TxPublicHeader {\n private readonly publicHeaderTheme = injectTokens(PUBLIC_HEADER_THEME);\n\n private readonly document = inject(DOCUMENT);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly toggleButton = viewChild<ElementRef<HTMLButtonElement>>('menuButton');\n protected readonly router = inject(ActivatedRoute, { optional: true }) ? inject(Router) : null;\n protected readonly brandSlot = contentChild(TxPublicHeaderBrand);\n\n readonly brand = input.required<string>();\n readonly logo = input<string | undefined>(undefined);\n readonly homeLink = input<string | readonly unknown[]>('/');\n readonly preferences = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly responsive = input<TxPublicHeaderResponsive>('viewport');\n readonly dt = input<TectraDeepPartial<TectraPublicHeaderTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPublicHeaderPart, TxPublicHeader> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('publicHeader', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly panelId = uniqueId('tx-public-header-panel');\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-public-header'), ...this.passThrough().root?.style }));\n protected readonly homeHref = computed(() => {\n const link = this.homeLink();\n return typeof link === 'string' ? link : '/' + link.join('/');\n });\n\n readonly open = signal(false);\n readonly compact = signal(false);\n protected readonly closing = signal(false);\n private closingTimer: ReturnType<typeof setTimeout> | undefined;\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => clearTimeout(this.closingTimer));\n afterNextRender(() => {\n const view = this.document.defaultView;\n if (!view) {\n return;\n }\n const update = (compact: boolean) => {\n this.compact.set(compact);\n if (!compact) {\n this.open.set(false);\n this.finishClosing();\n }\n };\n if (this.responsive() === 'container' && 'ResizeObserver' in view) {\n const observer = new view.ResizeObserver(([entry]) => update(entry.contentRect.width < COMPACT_WIDTH));\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n return;\n }\n const media = view.matchMedia?.(`(width < ${COMPACT_WIDTH}px)`);\n if (media) {\n const change = () => update(media.matches);\n change();\n media.addEventListener?.('change', change);\n destroyRef.onDestroy(() => media.removeEventListener?.('change', change));\n }\n });\n }\n\n toggle(): void {\n if (this.open()) {\n this.close();\n return;\n }\n this.finishClosing();\n this.open.set(true);\n }\n\n close(): void {\n if (!this.open()) {\n return;\n }\n this.open.set(false);\n if (this.compact() && !this.isUnstyled() && !this.reducedMotion()) {\n this.closing.set(true);\n clearTimeout(this.closingTimer);\n this.closingTimer = setTimeout(() => this.finishClosing(), CLOSE_FALLBACK_MS);\n }\n }\n\n protected onPanelAnimationEnd(event: AnimationEvent): void {\n if (event.target === event.currentTarget && this.closing()) {\n this.finishClosing();\n }\n }\n\n private finishClosing(): void {\n clearTimeout(this.closingTimer);\n this.closing.set(false);\n }\n\n private reducedMotion(): boolean {\n return !!this.document.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n this.toggleButton()?.nativeElement.focus();\n }\n }\n\n protected onPanelClick(event: MouseEvent): void {\n const target = event.target as HTMLElement | null;\n if (target?.closest('a, button') && !target.closest('.tx-public-header__preferences')) {\n this.close();\n }\n }\n}\n","<ng-template #brandContent>\n @if (brandSlot()) {\n <ng-content select=\"[txPublicHeaderBrand]\" />\n } @else {\n @if (logo(); as logo) {\n <img class=\"tx-public-header__logo\" alt=\"\" [src]=\"logo\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n <span class=\"tx-public-header__name\">{{ brand() }}</span>\n }\n</ng-template>\n<header class=\"tx-public-header__bar\" [class]=\"passThrough().bar?.class\" [style]=\"passThrough().bar?.style\">\n <div class=\"tx-public-header__inner\">\n @if (router) {\n <a\n class=\"tx-public-header__brand\"\n [routerLink]=\"homeLink()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n (click)=\"close()\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n } @else {\n <a\n class=\"tx-public-header__brand\"\n [href]=\"homeHref()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- closes the menu after a link or a button inside was used; they handle the keyboard themselves -->\n <div class=\"tx-public-header__panel\" [id]=\"panelId\" [class]=\"passThrough().panel?.class\" [style]=\"passThrough().panel?.style\" (click)=\"onPanelClick($event)\" (animationend)=\"onPanelAnimationEnd($event)\">\n <div class=\"tx-public-header__nav\" [class]=\"passThrough().nav?.class\" [style]=\"passThrough().nav?.style\">\n <ng-content select=\"[txPublicHeaderNav]\" />\n </div>\n <div class=\"tx-public-header__end\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n @if (preferences()) {\n <tx-topbar-preferences class=\"tx-public-header__preferences\" [layout]=\"compact() ? 'stacked' : 'inline'\" [unstyled]=\"isUnstyled()\" />\n }\n <div class=\"tx-public-header__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPublicHeaderActions]\" />\n </div>\n </div>\n </div>\n\n <button\n #menuButton\n type=\"button\"\n class=\"tx-public-header__toggle\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"open() ? translations().closeMenu : translations().openMenu\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n (click)=\"toggle()\"\n >\n <tx-icon aria-hidden=\"true\" [name]=\"open() ? 'times' : 'bars'\" />\n </button>\n </div>\n</header>\n"],"mappings":";;;;;;;;;;;AAGA,IAAa,sBAAb,MAAa,oBAAmB;CAAnB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAmB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAnB,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AA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-public-header.mjs","names":[],"sources":["../../../../packages/blocks/public-header/src/public-header-brand.directive.ts","../../../../packages/blocks/public-header/src/public-header.icons.ts","../../../../packages/blocks/public-header/src/public-header.theme.ts","../../../../packages/blocks/public-header/src/public-header.component.ts","../../../../packages/blocks/public-header/src/public-header.component.html"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({ selector: '[txPublicHeaderBrand]' })\nexport class TxPublicHeaderBrand {}\n","import { TxIconSet, txIconBars, txIconTimes } from '@tectra-ng/icons';\n\nexport const PUBLIC_HEADER_ICON_DEFAULTS: TxIconSet = {\n bars: txIconBars,\n times: txIconTimes,\n};\n","import { publicHeaderTokens } from '@tectra-ng/themes';\n\nexport const PUBLIC_HEADER_THEME = {\n publicHeader: publicHeaderTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions, TxThemeMode } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPublicHeaderTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTopbarPreferences } from '@tectra-ng/blocks/topbar-preferences';\nimport { TxPublicHeaderBrand } from './public-header-brand.directive';\nimport { TxPublicHeaderPart, TxPublicHeaderResponsive } from './public-header.types';\nimport { PUBLIC_HEADER_ICON_DEFAULTS } from './public-header.icons';\nimport { PUBLIC_HEADER_THEME } from './public-header.theme';\n\nconst COMPACT_WIDTH = 768;\nconst CLOSE_FALLBACK_MS = 600;\n\n@Component({\n selector: 'tx-public-header',\n imports: [NgTemplateOutlet, RouterLink, TxIcon, TxTopbarPreferences],\n templateUrl: './public-header.component.html',\n styleUrl: './public-header.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-public-header',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-responsive]': 'responsive()',\n '[class.tx-public-header--open]': 'open()',\n '[class.tx-public-header--closing]': 'closing()',\n '(document:keydown.escape)': 'onEscape()',\n },\n viewProviders: [provideTxIconDefaults(PUBLIC_HEADER_ICON_DEFAULTS)],\n})\nexport class TxPublicHeader {\n private readonly publicHeaderTheme = injectTokens(PUBLIC_HEADER_THEME);\n\n private readonly document = inject(DOCUMENT);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly toggleButton = viewChild<ElementRef<HTMLButtonElement>>('menuButton');\n protected readonly router = inject(ActivatedRoute, { optional: true }) ? inject(Router) : null;\n protected readonly brandSlot = contentChild(TxPublicHeaderBrand);\n\n readonly brand = input.required<string>();\n readonly logo = input<string | undefined>(undefined);\n readonly homeLink = input<string | readonly unknown[]>('/');\n readonly preferences = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly responsive = input<TxPublicHeaderResponsive>('viewport');\n readonly dt = input<TectraDeepPartial<TectraPublicHeaderTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPublicHeaderPart, TxPublicHeader> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly languageChange = output<string>();\n readonly modeChange = output<TxThemeMode>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('publicHeader', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly panelId = uniqueId('tx-public-header-panel');\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-public-header'), ...this.passThrough().root?.style }));\n protected readonly homeHref = computed(() => {\n const link = this.homeLink();\n return typeof link === 'string' ? link : '/' + link.join('/');\n });\n\n readonly open = signal(false);\n readonly compact = signal(false);\n protected readonly closing = signal(false);\n private closingTimer: ReturnType<typeof setTimeout> | undefined;\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => clearTimeout(this.closingTimer));\n afterNextRender(() => {\n const view = this.document.defaultView;\n if (!view) {\n return;\n }\n const update = (compact: boolean) => {\n this.compact.set(compact);\n if (!compact) {\n this.open.set(false);\n this.finishClosing();\n }\n };\n if (this.responsive() === 'container' && 'ResizeObserver' in view) {\n const observer = new view.ResizeObserver(([entry]) => update(entry.contentRect.width < COMPACT_WIDTH));\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n return;\n }\n const media = view.matchMedia?.(`(width < ${COMPACT_WIDTH}px)`);\n if (media) {\n const change = () => update(media.matches);\n change();\n media.addEventListener?.('change', change);\n destroyRef.onDestroy(() => media.removeEventListener?.('change', change));\n }\n });\n }\n\n toggle(): void {\n if (this.open()) {\n this.close();\n return;\n }\n this.finishClosing();\n this.open.set(true);\n }\n\n close(): void {\n if (!this.open()) {\n return;\n }\n this.open.set(false);\n if (this.compact() && !this.isUnstyled() && !this.reducedMotion()) {\n this.closing.set(true);\n clearTimeout(this.closingTimer);\n this.closingTimer = setTimeout(() => this.finishClosing(), CLOSE_FALLBACK_MS);\n }\n }\n\n protected onPanelAnimationEnd(event: AnimationEvent): void {\n if (event.target === event.currentTarget && this.closing()) {\n this.finishClosing();\n }\n }\n\n private finishClosing(): void {\n clearTimeout(this.closingTimer);\n this.closing.set(false);\n }\n\n private reducedMotion(): boolean {\n return !!this.document.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n this.toggleButton()?.nativeElement.focus();\n }\n }\n\n protected onPanelClick(event: MouseEvent): void {\n const target = event.target as HTMLElement | null;\n if (target?.closest('a, button') && !target.closest('.tx-public-header__preferences')) {\n this.close();\n }\n }\n}\n","<ng-template #brandContent>\n @if (brandSlot()) {\n <ng-content select=\"[txPublicHeaderBrand]\" />\n } @else {\n @if (logo(); as logo) {\n <img class=\"tx-public-header__logo\" alt=\"\" [src]=\"logo\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n <span class=\"tx-public-header__name\">{{ brand() }}</span>\n }\n</ng-template>\n<header class=\"tx-public-header__bar\" [class]=\"passThrough().bar?.class\" [style]=\"passThrough().bar?.style\">\n <div class=\"tx-public-header__inner\">\n @if (router) {\n <a\n class=\"tx-public-header__brand\"\n [routerLink]=\"homeLink()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n (click)=\"close()\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n } @else {\n <a\n class=\"tx-public-header__brand\"\n [href]=\"homeHref()\"\n [attr.aria-label]=\"brandSlot() ? brand() : null\"\n [class]=\"passThrough().brand?.class\"\n [style]=\"passThrough().brand?.style\"\n >\n <ng-container *ngTemplateOutlet=\"brandContent\" />\n </a>\n }\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- closes the menu after a link or a button inside was used; they handle the keyboard themselves -->\n <div class=\"tx-public-header__panel\" [id]=\"panelId\" [class]=\"passThrough().panel?.class\" [style]=\"passThrough().panel?.style\" (click)=\"onPanelClick($event)\" (animationend)=\"onPanelAnimationEnd($event)\">\n <div class=\"tx-public-header__nav\" [class]=\"passThrough().nav?.class\" [style]=\"passThrough().nav?.style\">\n <ng-content select=\"[txPublicHeaderNav]\" />\n </div>\n <div class=\"tx-public-header__end\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n @if (preferences()) {\n <tx-topbar-preferences\n class=\"tx-public-header__preferences\"\n [layout]=\"compact() ? 'stacked' : 'inline'\"\n [unstyled]=\"isUnstyled()\"\n (languageChange)=\"languageChange.emit($event)\"\n (modeChange)=\"modeChange.emit($event)\"\n />\n }\n <div class=\"tx-public-header__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPublicHeaderActions]\" />\n </div>\n </div>\n </div>\n\n <button\n #menuButton\n type=\"button\"\n class=\"tx-public-header__toggle\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"open() ? translations().closeMenu : translations().openMenu\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n (click)=\"toggle()\"\n >\n <tx-icon aria-hidden=\"true\" [name]=\"open() ? 'times' : 'bars'\" />\n </button>\n </div>\n</header>\n"],"mappings":";;;;;;;;;;;AAGA,IAAa,sBAAb,MAAa,oBAAmB;CAAnB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAmB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAnB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAmB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAD/B,MAAA;EAAU,MAAA,CAAA,EAAE,U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AA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,gBAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, afterRenderEffect, booleanAttribute, computed, inject, input, numberAttribute, output, viewChild } from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ViewEncapsulation, afterRenderEffect, booleanAttribute, computed, inject, input, numberAttribute, output, viewChild } from "@angular/core";
|
|
3
3
|
import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
|
|
4
4
|
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
5
5
|
import { toStyleObject, wizardTokens } from "@tectra-ng/themes";
|
|
@@ -7,6 +7,7 @@ import { TxIcon, provideTxIconDefaults, txIconArrowLeft, txIconArrowRight, txIco
|
|
|
7
7
|
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
8
8
|
import { TxPill } from "@tectra-ng/ui/pill";
|
|
9
9
|
import { DecimalPipe } from "@angular/common";
|
|
10
|
+
import { TxStyleLoader } from "@tectra-ng/core/styles";
|
|
10
11
|
import { TxButton } from "@tectra-ng/ui/button";
|
|
11
12
|
const WIZARD_ICON_DEFAULTS = {
|
|
12
13
|
"arrow-left": txIconArrowLeft,
|
|
@@ -699,6 +700,48 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
699
700
|
}]
|
|
700
701
|
}
|
|
701
702
|
});
|
|
703
|
+
var TxWizardSceneStyles = class TxWizardSceneStyles {
|
|
704
|
+
wizardTheme = injectTokens(WIZARD_THEME);
|
|
705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
706
|
+
minVersion: "12.0.0",
|
|
707
|
+
version: "22.2.6",
|
|
708
|
+
ngImport: i0,
|
|
709
|
+
type: TxWizardSceneStyles,
|
|
710
|
+
deps: [],
|
|
711
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
712
|
+
});
|
|
713
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
714
|
+
minVersion: "14.0.0",
|
|
715
|
+
version: "22.2.6",
|
|
716
|
+
type: TxWizardSceneStyles,
|
|
717
|
+
isStandalone: true,
|
|
718
|
+
selector: "tx-wizard-scene-styles",
|
|
719
|
+
ngImport: i0,
|
|
720
|
+
template: "",
|
|
721
|
+
isInline: true,
|
|
722
|
+
styles: [".tx-wizard-scene--enter:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]){animation:tx-wizard-scene-enter var(--tx-wizard-stage-scene-enter-duration) var(--tx-wizard-stage-scene-easing) both}.tx-wizard-scene--leave:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]){animation:tx-wizard-scene-leave var(--tx-wizard-stage-scene-leave-duration) ease-in both}@keyframes tx-wizard-scene-enter{0%{opacity:0;transform:translate(calc(var(--tx-wizard-direction, 1) * var(--tx-wizard-stage-scene-enter-shift))) scale(.96)}}@keyframes tx-wizard-scene-leave{to{opacity:0;transform:translate(calc(var(--tx-wizard-direction, 1) * -1 * var(--tx-wizard-stage-scene-leave-shift))) scale(.98)}}@media(prefers-reduced-motion:reduce){.tx-wizard-scene--enter:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]),.tx-wizard-scene--leave:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]){animation:none}}\n"],
|
|
723
|
+
viewProviders: [provideTxIconDefaults(WIZARD_ICON_DEFAULTS)],
|
|
724
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
725
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
729
|
+
minVersion: "12.0.0",
|
|
730
|
+
version: "22.2.6",
|
|
731
|
+
ngImport: i0,
|
|
732
|
+
type: TxWizardSceneStyles,
|
|
733
|
+
decorators: [{
|
|
734
|
+
type: Component,
|
|
735
|
+
args: [{
|
|
736
|
+
selector: "tx-wizard-scene-styles",
|
|
737
|
+
template: "",
|
|
738
|
+
encapsulation: ViewEncapsulation.None,
|
|
739
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
740
|
+
viewProviders: [provideTxIconDefaults(WIZARD_ICON_DEFAULTS)],
|
|
741
|
+
styles: [".tx-wizard-scene--enter:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]){animation:tx-wizard-scene-enter var(--tx-wizard-stage-scene-enter-duration) var(--tx-wizard-stage-scene-easing) both}.tx-wizard-scene--leave:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]){animation:tx-wizard-scene-leave var(--tx-wizard-stage-scene-leave-duration) ease-in both}@keyframes tx-wizard-scene-enter{0%{opacity:0;transform:translate(calc(var(--tx-wizard-direction, 1) * var(--tx-wizard-stage-scene-enter-shift))) scale(.96)}}@keyframes tx-wizard-scene-leave{to{opacity:0;transform:translate(calc(var(--tx-wizard-direction, 1) * -1 * var(--tx-wizard-stage-scene-leave-shift))) scale(.98)}}@media(prefers-reduced-motion:reduce){.tx-wizard-scene--enter:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]),.tx-wizard-scene--leave:is(.tx-wizard-stage[data-styled] *,.tx-wizard-scene[data-styled]){animation:none}}\n"]
|
|
742
|
+
}]
|
|
743
|
+
}]
|
|
744
|
+
});
|
|
702
745
|
var TxWizardStage = class TxWizardStage {
|
|
703
746
|
wizardTheme = injectTokens(WIZARD_THEME);
|
|
704
747
|
layout = inject(TxWizardLayout, { optional: true });
|
|
@@ -721,6 +764,7 @@ var TxWizardStage = class TxWizardStage {
|
|
|
721
764
|
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
722
765
|
captionElement = viewChild("captionElement", ...ngDevMode ? [{ debugName: "captionElement" }] : /* istanbul ignore next */ []);
|
|
723
766
|
constructor() {
|
|
767
|
+
inject(TxStyleLoader).load(TxWizardSceneStyles);
|
|
724
768
|
let shown;
|
|
725
769
|
afterRenderEffect(() => {
|
|
726
770
|
const text = this.caption();
|
|
@@ -829,7 +873,7 @@ var TxWizardStage = class TxWizardStage {
|
|
|
829
873
|
</div>
|
|
830
874
|
`,
|
|
831
875
|
isInline: true,
|
|
832
|
-
styles: [":host{--
|
|
876
|
+
styles: [":host{--tx-wizard-direction: 1;position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;height:100%;overflow:clip}.tx-wizard-stage__inner{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:100%}:host([data-direction=back]){--tx-wizard-direction: -1}.tx-wizard-stage__stage{display:grid;flex-shrink:0;place-items:center}.tx-wizard-stage__caption{display:none;flex-direction:column;align-items:center;text-align:center}:host ::ng-deep .tx-wizard-scene{display:block;grid-area:1/1;width:100%;height:100%}:host([data-styled]){min-height:var(--tx-wizard-stage-min-height);background:var(--tx-wizard-stage-background);font-family:var(--tx-font-family)}:host([data-styled]) .tx-wizard-stage__inner{gap:var(--tx-wizard-stage-gap);padding:var(--tx-wizard-stage-padding)}:host([data-styled]) .tx-wizard-stage__stage{width:var(--tx-wizard-stage-size);height:var(--tx-wizard-stage-size);margin-block:calc(var(--tx-wizard-stage-size) * (var(--tx-wizard-stage-narrow-scale) - 1) / 2);scale:var(--tx-wizard-stage-narrow-scale)}:host([data-styled]) .tx-wizard-stage__caption{gap:var(--tx-wizard-stage-caption-gap)}:host([data-styled]) .tx-wizard-stage__caption--enter{animation:tx-wizard-caption-in var(--tx-wizard-stage-caption-duration) var(--tx-wizard-stage-scene-easing) both}:host([data-styled]) .tx-wizard-stage__number{color:var(--tx-wizard-stage-number-color);font-size:var(--tx-wizard-stage-number-font-size);font-weight:var(--tx-wizard-stage-number-font-weight);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-wizard-stage__title{color:var(--tx-wizard-stage-title-color);font-size:var(--tx-wizard-stage-title-font-size);font-weight:var(--tx-wizard-stage-title-font-weight)}@media(width>=1024px){:host([data-responsive=viewport]) .tx-wizard-stage__caption{display:flex}:host([data-responsive=viewport]){justify-content:flex-start}:host([data-responsive=viewport]) .tx-wizard-stage__inner{position:sticky;top:0;height:var(--tx-wizard-layout-min-height);max-height:100%}:host([data-responsive=viewport][data-styled]) .tx-wizard-stage__inner{gap:var(--tx-wizard-stage-wide-gap);padding:var(--tx-wizard-stage-wide-padding)}:host([data-responsive=viewport][data-styled]) .tx-wizard-stage__stage{margin-block:0;scale:1}}@container tx-wizard (width >= 1024px){:host([data-responsive=container]) .tx-wizard-stage__caption{display:flex}:host([data-responsive=container]){justify-content:flex-start}:host([data-responsive=container]) .tx-wizard-stage__inner{position:sticky;top:0;height:var(--tx-wizard-layout-min-height);max-height:100%}:host([data-responsive=container][data-styled]) .tx-wizard-stage__inner{gap:var(--tx-wizard-stage-wide-gap);padding:var(--tx-wizard-stage-wide-padding)}:host([data-responsive=container][data-styled]) .tx-wizard-stage__stage{margin-block:0;scale:1}}@keyframes tx-wizard-caption-in{0%{opacity:0;transform:translateY(10px)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-wizard-stage__caption--enter{animation:none}}\n"],
|
|
833
877
|
dependencies: [{
|
|
834
878
|
kind: "pipe",
|
|
835
879
|
type: DecimalPipe,
|
|
@@ -875,7 +919,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
875
919
|
"[attr.data-responsive]": "responsive()"
|
|
876
920
|
},
|
|
877
921
|
viewProviders: [provideTxIconDefaults(WIZARD_ICON_DEFAULTS)],
|
|
878
|
-
styles: [":host{--
|
|
922
|
+
styles: [":host{--tx-wizard-direction: 1;position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;height:100%;overflow:clip}.tx-wizard-stage__inner{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:100%}:host([data-direction=back]){--tx-wizard-direction: -1}.tx-wizard-stage__stage{display:grid;flex-shrink:0;place-items:center}.tx-wizard-stage__caption{display:none;flex-direction:column;align-items:center;text-align:center}:host ::ng-deep .tx-wizard-scene{display:block;grid-area:1/1;width:100%;height:100%}:host([data-styled]){min-height:var(--tx-wizard-stage-min-height);background:var(--tx-wizard-stage-background);font-family:var(--tx-font-family)}:host([data-styled]) .tx-wizard-stage__inner{gap:var(--tx-wizard-stage-gap);padding:var(--tx-wizard-stage-padding)}:host([data-styled]) .tx-wizard-stage__stage{width:var(--tx-wizard-stage-size);height:var(--tx-wizard-stage-size);margin-block:calc(var(--tx-wizard-stage-size) * (var(--tx-wizard-stage-narrow-scale) - 1) / 2);scale:var(--tx-wizard-stage-narrow-scale)}:host([data-styled]) .tx-wizard-stage__caption{gap:var(--tx-wizard-stage-caption-gap)}:host([data-styled]) .tx-wizard-stage__caption--enter{animation:tx-wizard-caption-in var(--tx-wizard-stage-caption-duration) var(--tx-wizard-stage-scene-easing) both}:host([data-styled]) .tx-wizard-stage__number{color:var(--tx-wizard-stage-number-color);font-size:var(--tx-wizard-stage-number-font-size);font-weight:var(--tx-wizard-stage-number-font-weight);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-wizard-stage__title{color:var(--tx-wizard-stage-title-color);font-size:var(--tx-wizard-stage-title-font-size);font-weight:var(--tx-wizard-stage-title-font-weight)}@media(width>=1024px){:host([data-responsive=viewport]) .tx-wizard-stage__caption{display:flex}:host([data-responsive=viewport]){justify-content:flex-start}:host([data-responsive=viewport]) .tx-wizard-stage__inner{position:sticky;top:0;height:var(--tx-wizard-layout-min-height);max-height:100%}:host([data-responsive=viewport][data-styled]) .tx-wizard-stage__inner{gap:var(--tx-wizard-stage-wide-gap);padding:var(--tx-wizard-stage-wide-padding)}:host([data-responsive=viewport][data-styled]) .tx-wizard-stage__stage{margin-block:0;scale:1}}@container tx-wizard (width >= 1024px){:host([data-responsive=container]) .tx-wizard-stage__caption{display:flex}:host([data-responsive=container]){justify-content:flex-start}:host([data-responsive=container]) .tx-wizard-stage__inner{position:sticky;top:0;height:var(--tx-wizard-layout-min-height);max-height:100%}:host([data-responsive=container][data-styled]) .tx-wizard-stage__inner{gap:var(--tx-wizard-stage-wide-gap);padding:var(--tx-wizard-stage-wide-padding)}:host([data-responsive=container][data-styled]) .tx-wizard-stage__stage{margin-block:0;scale:1}}@keyframes tx-wizard-caption-in{0%{opacity:0;transform:translateY(10px)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-wizard-stage__caption--enter{animation:none}}\n"]
|
|
879
923
|
}]
|
|
880
924
|
}],
|
|
881
925
|
ctorParameters: () => [],
|
|
@@ -948,6 +992,99 @@ function replayCaption(element) {
|
|
|
948
992
|
element.getBoundingClientRect();
|
|
949
993
|
element.classList.add(CAPTION_ENTER);
|
|
950
994
|
}
|
|
995
|
+
var TxWizardScene = class TxWizardScene {
|
|
996
|
+
wizardTheme = injectTokens(WIZARD_THEME);
|
|
997
|
+
direction = input(void 0, ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
998
|
+
unstyled = input(void 0, {
|
|
999
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
1000
|
+
transform: optionalBoolean
|
|
1001
|
+
});
|
|
1002
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
1003
|
+
shift = computed(() => {
|
|
1004
|
+
const direction = this.direction();
|
|
1005
|
+
return direction ? direction === "back" ? -1 : 1 : null;
|
|
1006
|
+
}, ...ngDevMode ? [{ debugName: "shift" }] : /* istanbul ignore next */ []);
|
|
1007
|
+
constructor() {
|
|
1008
|
+
inject(TxStyleLoader).load(TxWizardSceneStyles);
|
|
1009
|
+
}
|
|
1010
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1011
|
+
minVersion: "12.0.0",
|
|
1012
|
+
version: "22.2.6",
|
|
1013
|
+
ngImport: i0,
|
|
1014
|
+
type: TxWizardScene,
|
|
1015
|
+
deps: [],
|
|
1016
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1017
|
+
});
|
|
1018
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1019
|
+
minVersion: "17.1.0",
|
|
1020
|
+
version: "22.2.6",
|
|
1021
|
+
type: TxWizardScene,
|
|
1022
|
+
isStandalone: true,
|
|
1023
|
+
selector: "[txWizardScene]",
|
|
1024
|
+
inputs: {
|
|
1025
|
+
direction: {
|
|
1026
|
+
classPropertyName: "direction",
|
|
1027
|
+
publicName: "direction",
|
|
1028
|
+
isSignal: true,
|
|
1029
|
+
isRequired: false,
|
|
1030
|
+
transformFunction: null
|
|
1031
|
+
},
|
|
1032
|
+
unstyled: {
|
|
1033
|
+
classPropertyName: "unstyled",
|
|
1034
|
+
publicName: "unstyled",
|
|
1035
|
+
isSignal: true,
|
|
1036
|
+
isRequired: false,
|
|
1037
|
+
transformFunction: null
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
host: {
|
|
1041
|
+
properties: {
|
|
1042
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
1043
|
+
"style.--tx-wizard-direction": "shift()"
|
|
1044
|
+
},
|
|
1045
|
+
classAttribute: "tx-wizard-scene"
|
|
1046
|
+
},
|
|
1047
|
+
providers: [provideTxIconDefaults(WIZARD_ICON_DEFAULTS)],
|
|
1048
|
+
ngImport: i0
|
|
1049
|
+
});
|
|
1050
|
+
};
|
|
1051
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1052
|
+
minVersion: "12.0.0",
|
|
1053
|
+
version: "22.2.6",
|
|
1054
|
+
ngImport: i0,
|
|
1055
|
+
type: TxWizardScene,
|
|
1056
|
+
decorators: [{
|
|
1057
|
+
type: Directive,
|
|
1058
|
+
args: [{
|
|
1059
|
+
selector: "[txWizardScene]",
|
|
1060
|
+
host: {
|
|
1061
|
+
class: "tx-wizard-scene",
|
|
1062
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
1063
|
+
"[style.--tx-wizard-direction]": "shift()"
|
|
1064
|
+
},
|
|
1065
|
+
providers: [provideTxIconDefaults(WIZARD_ICON_DEFAULTS)]
|
|
1066
|
+
}]
|
|
1067
|
+
}],
|
|
1068
|
+
ctorParameters: () => [],
|
|
1069
|
+
propDecorators: {
|
|
1070
|
+
direction: [{
|
|
1071
|
+
type: i0.Input,
|
|
1072
|
+
args: [{
|
|
1073
|
+
isSignal: true,
|
|
1074
|
+
alias: "direction",
|
|
1075
|
+
required: false
|
|
1076
|
+
}]
|
|
1077
|
+
}],
|
|
1078
|
+
unstyled: [{
|
|
1079
|
+
type: i0.Input,
|
|
1080
|
+
args: [{
|
|
1081
|
+
isSignal: true,
|
|
1082
|
+
alias: "unstyled",
|
|
1083
|
+
required: false
|
|
1084
|
+
}]
|
|
1085
|
+
}]
|
|
1086
|
+
}
|
|
1087
|
+
});
|
|
951
1088
|
var TxWizardFooter = class TxWizardFooter {
|
|
952
1089
|
wizardTheme = injectTokens(WIZARD_THEME);
|
|
953
1090
|
nextLabel = input(void 0, ...ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -1094,7 +1231,7 @@ var TxWizardFooter = class TxWizardFooter {
|
|
|
1094
1231
|
[style]="passThrough().back?.style"
|
|
1095
1232
|
(click)="back.emit()"
|
|
1096
1233
|
>
|
|
1097
|
-
{{ backLabel()
|
|
1234
|
+
{{ backLabel() || translations().wizardBack }}
|
|
1098
1235
|
</button>
|
|
1099
1236
|
}
|
|
1100
1237
|
<div class="tx-wizard-footer__end">
|
|
@@ -1124,7 +1261,7 @@ var TxWizardFooter = class TxWizardFooter {
|
|
|
1124
1261
|
[style]="passThrough().next?.style"
|
|
1125
1262
|
(click)="next.emit()"
|
|
1126
1263
|
>
|
|
1127
|
-
{{ nextLabel()
|
|
1264
|
+
{{ nextLabel() || translations().wizardNext }}
|
|
1128
1265
|
</button>
|
|
1129
1266
|
</div>
|
|
1130
1267
|
`,
|
|
@@ -1189,7 +1326,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1189
1326
|
[style]="passThrough().back?.style"
|
|
1190
1327
|
(click)="back.emit()"
|
|
1191
1328
|
>
|
|
1192
|
-
{{ backLabel()
|
|
1329
|
+
{{ backLabel() || translations().wizardBack }}
|
|
1193
1330
|
</button>
|
|
1194
1331
|
}
|
|
1195
1332
|
<div class="tx-wizard-footer__end">
|
|
@@ -1219,7 +1356,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1219
1356
|
[style]="passThrough().next?.style"
|
|
1220
1357
|
(click)="next.emit()"
|
|
1221
1358
|
>
|
|
1222
|
-
{{ nextLabel()
|
|
1359
|
+
{{ nextLabel() || translations().wizardNext }}
|
|
1223
1360
|
</button>
|
|
1224
1361
|
</div>
|
|
1225
1362
|
`,
|
|
@@ -1330,6 +1467,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1330
1467
|
}]
|
|
1331
1468
|
}
|
|
1332
1469
|
});
|
|
1333
|
-
export { TxWizardFooter, TxWizardLayout, TxWizardProgress, TxWizardStage, TxWizardStepHead };
|
|
1470
|
+
export { TxWizardFooter, TxWizardLayout, TxWizardProgress, TxWizardScene, TxWizardStage, TxWizardStepHead };
|
|
1334
1471
|
|
|
1335
1472
|
//# sourceMappingURL=tectra-ng-blocks-wizard.mjs.map
|