@tectra-ng/blocks 0.1.7 → 0.1.9
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/confetti/README.md +34 -0
- package/fesm2022/tectra-ng-blocks-confetti.mjs +272 -0
- package/fesm2022/tectra-ng-blocks-confetti.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-hover-effect.mjs +250 -0
- package/fesm2022/tectra-ng-blocks-hover-effect.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-mascot.mjs +288 -0
- package/fesm2022/tectra-ng-blocks-mascot.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-public-header.mjs +58 -6
- package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -1
- package/hover-effect/README.md +31 -0
- package/mascot/README.md +26 -0
- package/package.json +18 -6
- package/public-header/README.md +1 -0
- package/types/tectra-ng-blocks-confetti.d.ts +79 -0
- package/types/tectra-ng-blocks-confetti.d.ts.map +1 -0
- package/types/tectra-ng-blocks-hover-effect.d.ts +68 -0
- package/types/tectra-ng-blocks-hover-effect.d.ts.map +1 -0
- package/types/tectra-ng-blocks-mascot.d.ts +96 -0
- package/types/tectra-ng-blocks-mascot.d.ts.map +1 -0
- package/types/tectra-ng-blocks-public-header.d.ts +8 -2
- package/types/tectra-ng-blocks-public-header.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-public-header.mjs","names":[],"sources":["../../../../packages/blocks/public-header/src/public-header.component.ts","../../../../packages/blocks/public-header/src/public-header.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPublicHeaderTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTopbarPreferences } from '@tectra-ng/blocks/topbar-preferences';\nimport { TxPublicHeaderPart, TxPublicHeaderResponsive } from './public-header.types';\n\nconst COMPACT_WIDTH = 768;\nconst CLOSE_FALLBACK_MS = 600;\n\n@Component({\n selector: 'tx-public-header',\n imports: [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})\nexport class TxPublicHeader {\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(Router, { optional: true });\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","<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 class=\"tx-public-header__brand\" [routerLink]=\"homeLink()\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\" (click)=\"close()\">\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>{{ brand() }}</span>\n </a>\n } @else {\n <a class=\"tx-public-header__brand\" [href]=\"homeHref()\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\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>{{ brand() }}</span>\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":";;;;;;;;;;AAwBA,MAAM,gBAAgB;AACtB,MAAM,oBAAoB;AAmB1B,IAAa,iBAAb,MAAa,eAAc;CACR,WAAW,OAAO,QAAQ;CAC1B,OAAO,OAAgC,UAAU;CACjD,eAAe,UAAyC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACnE,SAAS,OAAO,QAAQ,EAAE,UAAU,KAAI,CAAE;CAEpD,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,OAAO,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC3C,WAAW,MAAmC,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,cAAc,MAAwB,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACzE,aAAa,MAAgC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACxD,KAAK,MAA+D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA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A,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,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;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,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.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 {\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 { Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { 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';\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})\nexport class TxPublicHeader {\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(Router, { optional: true });\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>{{ 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,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAmB,cAAA;EAAA,UAAA;EAAA,UAAA;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wrap a card, a plan or a picture and it leans towards the pointer, then settles back smoothly when the pointer leaves.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-hover-effect>
|
|
7
|
+
<tx-card title="Pro" subtitle="For growing teams" />
|
|
8
|
+
</tx-hover-effect>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Only a mouse tilts it — touch and pens leave it still, and so does reduced motion. The tilt is the distance from the middle divided by `constrain`, in degrees: a smaller `constrain` tilts more.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
| Name | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| constrain | How much the pointer distance is divided by — larger is calmer (default 100) |
|
|
17
|
+
| disabled | Turns the tilt off |
|
|
18
|
+
| dt | Design tokens of this instance (`hoverEffect`) |
|
|
19
|
+
| pt | Classes and styles of the parts: `root`, `layer` |
|
|
20
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
21
|
+
| unstyled | Removes the smooth return (the tilt stays) |
|
|
22
|
+
|
|
23
|
+
## Slots
|
|
24
|
+
| Name | Description |
|
|
25
|
+
|---|---|
|
|
26
|
+
| default | What tilts |
|
|
27
|
+
|
|
28
|
+
## Methods
|
|
29
|
+
| Name | Description |
|
|
30
|
+
|---|---|
|
|
31
|
+
| reset() | Puts the content straight again |
|
package/mascot/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Mascot
|
|
2
|
+
|
|
3
|
+
A pixel-art mascot drawn as SVG in the accent colour, with animated states: idle, thinking, happy, sleeping, walking and short tricks (waving, looking, hopping, dancing, stretching). For assistants, empty states and onboarding. While idle it plays a random trick from time to time.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-mascot [state]="thinking() ? 'thinking' : 'idle'" label="Assistant" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| state | `idle`, `thinking`, `happy`, `sleeping`, `walking`, or a trick: `waving`, `looking`, `hopping`, `dancing`, `stretching` |
|
|
13
|
+
| label | Accessible name; empty makes the mascot decorative (`aria-hidden`) |
|
|
14
|
+
| playful | While `state` is `idle`, plays a random trick every 9 seconds; `false` keeps it plain idle |
|
|
15
|
+
| size | Width as a number of px or any CSS length; the height follows (15 : 12). 48px by default |
|
|
16
|
+
| dt | Design tokens of this instance (`mascot`): size and the body, shade, glow and eye colours |
|
|
17
|
+
| pt | Classes and styles of the parts: `root`, `svg` |
|
|
18
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
19
|
+
| unstyled | Removes the tectra styles (colours and motion) |
|
|
20
|
+
|
|
21
|
+
## Sprite
|
|
22
|
+
The figure is `TX_MASCOT_SPRITE`, rows of characters on a 15 × 12 grid; `txMascotLayers(parts, sprite)` turns it into pixels per part.
|
|
23
|
+
|
|
24
|
+
## Notes
|
|
25
|
+
- The animations step pixel by pixel and stop under `prefers-reduced-motion`.
|
|
26
|
+
- The first paint is always the given `state`, also on the server; tricks start in the browser.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/blocks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Ready page blocks for Angular consoles and admin apps on the tectra components: filters panel, page header, empty state, layouts, wizard, command palette and more.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@angular/common": "^22.0.0",
|
|
29
29
|
"@angular/core": "^22.0.0",
|
|
30
30
|
"@angular/router": "^22.0.0",
|
|
31
|
-
"@tectra-ng/core": "^0.1.
|
|
32
|
-
"@tectra-ng/icons": "^0.1.
|
|
33
|
-
"@tectra-ng/qr": "^0.1.
|
|
34
|
-
"@tectra-ng/themes": "^0.1.
|
|
35
|
-
"@tectra-ng/ui": "^0.1.
|
|
31
|
+
"@tectra-ng/core": "^0.1.9",
|
|
32
|
+
"@tectra-ng/icons": "^0.1.9",
|
|
33
|
+
"@tectra-ng/qr": "^0.1.9",
|
|
34
|
+
"@tectra-ng/themes": "^0.1.9",
|
|
35
|
+
"@tectra-ng/ui": "^0.1.9"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"@angular/router": {
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"types": "./types/tectra-ng-blocks-command-palette.d.ts",
|
|
76
76
|
"default": "./fesm2022/tectra-ng-blocks-command-palette.mjs"
|
|
77
77
|
},
|
|
78
|
+
"./confetti": {
|
|
79
|
+
"types": "./types/tectra-ng-blocks-confetti.d.ts",
|
|
80
|
+
"default": "./fesm2022/tectra-ng-blocks-confetti.mjs"
|
|
81
|
+
},
|
|
78
82
|
"./console-layout": {
|
|
79
83
|
"types": "./types/tectra-ng-blocks-console-layout.d.ts",
|
|
80
84
|
"default": "./fesm2022/tectra-ng-blocks-console-layout.mjs"
|
|
@@ -91,10 +95,18 @@
|
|
|
91
95
|
"types": "./types/tectra-ng-blocks-filters-panel.d.ts",
|
|
92
96
|
"default": "./fesm2022/tectra-ng-blocks-filters-panel.mjs"
|
|
93
97
|
},
|
|
98
|
+
"./hover-effect": {
|
|
99
|
+
"types": "./types/tectra-ng-blocks-hover-effect.d.ts",
|
|
100
|
+
"default": "./fesm2022/tectra-ng-blocks-hover-effect.mjs"
|
|
101
|
+
},
|
|
94
102
|
"./kanban": {
|
|
95
103
|
"types": "./types/tectra-ng-blocks-kanban.d.ts",
|
|
96
104
|
"default": "./fesm2022/tectra-ng-blocks-kanban.mjs"
|
|
97
105
|
},
|
|
106
|
+
"./mascot": {
|
|
107
|
+
"types": "./types/tectra-ng-blocks-mascot.d.ts",
|
|
108
|
+
"default": "./fesm2022/tectra-ng-blocks-mascot.mjs"
|
|
109
|
+
},
|
|
98
110
|
"./network-status": {
|
|
99
111
|
"types": "./types/tectra-ng-blocks-network-status.d.ts",
|
|
100
112
|
"default": "./fesm2022/tectra-ng-blocks-network-status.mjs"
|
package/public-header/README.md
CHANGED
|
@@ -33,6 +33,7 @@ The panel closes on a link or a button inside, on Escape (the focus goes back to
|
|
|
33
33
|
## Slots
|
|
34
34
|
| Name | Description |
|
|
35
35
|
|---|---|
|
|
36
|
+
| txPublicHeaderBrand | `<span txPublicHeaderBrand>` — own brand content (an animated logo, a wordmark) instead of `logo` and the `brand` text; `brand` stays the link's accessible name |
|
|
36
37
|
| txPublicHeaderNav | `<nav txPublicHeaderNav>` — the links; direct `a` children get the link look |
|
|
37
38
|
| txPublicHeaderActions | `<div txPublicHeaderActions>` — buttons at the end, e.g. sign in and sign up |
|
|
38
39
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { TxPassThroughOptions } from "@tectra-ng/core/config";
|
|
2
|
+
import { TectraDeepPartial } from "@tectra-ng/themes";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type TxConfettiTone = 'accent' | 'neutral' | 'success';
|
|
5
|
+
export interface TxConfettiPiece {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
rotate: number;
|
|
9
|
+
tone: TxConfettiTone;
|
|
10
|
+
}
|
|
11
|
+
export type TxConfettiPart = 'root' | 'piece';
|
|
12
|
+
export declare const TX_CONFETTI_PIECES: readonly TxConfettiPiece[];
|
|
13
|
+
export declare class TxConfetti {
|
|
14
|
+
readonly pieces: import("@angular/core").InputSignal<readonly TxConfettiPiece[]>;
|
|
15
|
+
readonly delay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
16
|
+
readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
|
|
17
|
+
piece: {
|
|
18
|
+
size: string;
|
|
19
|
+
borderRadius: string;
|
|
20
|
+
neutralWidth: string;
|
|
21
|
+
neutralHeight: string;
|
|
22
|
+
};
|
|
23
|
+
colors: {
|
|
24
|
+
accent: string;
|
|
25
|
+
neutral: string;
|
|
26
|
+
success: string;
|
|
27
|
+
};
|
|
28
|
+
motion: {
|
|
29
|
+
duration: string;
|
|
30
|
+
easing: string;
|
|
31
|
+
stagger: string;
|
|
32
|
+
};
|
|
33
|
+
}> | undefined>;
|
|
34
|
+
readonly pt: import("@angular/core").InputSignal<Partial<Record<TxConfettiPart, import("@tectra-ng/core/config").TxPassThroughValue<TxConfetti>>> | undefined>;
|
|
35
|
+
readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
|
|
36
|
+
readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
37
|
+
readonly isUnstyled: import("@angular/core").Signal<boolean>;
|
|
38
|
+
readonly passThrough: import("@angular/core").Signal<Partial<Record<TxConfettiPart, import("@tectra-ng/core/config").TxPassThroughPart>>>;
|
|
39
|
+
readonly hostStyle: import("@angular/core").Signal<{
|
|
40
|
+
[x: string]: string;
|
|
41
|
+
}>;
|
|
42
|
+
private readonly run;
|
|
43
|
+
protected readonly runs: import("@angular/core").Signal<number[]>;
|
|
44
|
+
play(): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxConfetti, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TxConfetti, "tx-confetti", never, {
|
|
47
|
+
"pieces": {
|
|
48
|
+
"alias": "pieces";
|
|
49
|
+
"required": false;
|
|
50
|
+
"isSignal": true;
|
|
51
|
+
};
|
|
52
|
+
"delay": {
|
|
53
|
+
"alias": "delay";
|
|
54
|
+
"required": false;
|
|
55
|
+
"isSignal": true;
|
|
56
|
+
};
|
|
57
|
+
"dt": {
|
|
58
|
+
"alias": "dt";
|
|
59
|
+
"required": false;
|
|
60
|
+
"isSignal": true;
|
|
61
|
+
};
|
|
62
|
+
"pt": {
|
|
63
|
+
"alias": "pt";
|
|
64
|
+
"required": false;
|
|
65
|
+
"isSignal": true;
|
|
66
|
+
};
|
|
67
|
+
"ptOptions": {
|
|
68
|
+
"alias": "ptOptions";
|
|
69
|
+
"required": false;
|
|
70
|
+
"isSignal": true;
|
|
71
|
+
};
|
|
72
|
+
"unstyled": {
|
|
73
|
+
"alias": "unstyled";
|
|
74
|
+
"required": false;
|
|
75
|
+
"isSignal": true;
|
|
76
|
+
};
|
|
77
|
+
}, {}, never, never, true, never>;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=tectra-ng-blocks-confetti.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-confetti.d.ts","names":[],"sources":["../../../../packages/blocks/confetti/src/confetti.types.ts","../../../../packages/blocks/confetti/src/confetti.component.ts"],"mappings":";;;YAAY;iBAEK;EACf;EACA;EACA;EACA,MAAM;;YAGI;qBAEC,6BAA6B;qBCwB7B;WACF,gCAAM,qBAAA;WACN,+BAAK;WACL,4BAAE,YAAA;;;;;;;;;;;;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,iDAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,oCAAU;WACV,qCAAW,OAAA,QAAA,OAAA,iDAAA;WACX,mCAAS;;;mBAED;qBACE,8BAAI;EAEvB;SAfW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAU;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { TxPassThroughOptions } from "@tectra-ng/core/config";
|
|
2
|
+
import { TectraDeepPartial } from "@tectra-ng/themes";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type TxHoverEffectPart = 'root' | 'layer';
|
|
5
|
+
export declare class TxHoverEffect {
|
|
6
|
+
private readonly document;
|
|
7
|
+
private readonly layer;
|
|
8
|
+
private frame;
|
|
9
|
+
readonly constrain: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
10
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
11
|
+
readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
|
|
12
|
+
root: {
|
|
13
|
+
perspective: string;
|
|
14
|
+
resetDuration: string;
|
|
15
|
+
resetEasing: string;
|
|
16
|
+
};
|
|
17
|
+
}> | undefined>;
|
|
18
|
+
readonly pt: import("@angular/core").InputSignal<Partial<Record<TxHoverEffectPart, import("@tectra-ng/core/config").TxPassThroughValue<TxHoverEffect>>> | undefined>;
|
|
19
|
+
readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
|
|
20
|
+
readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
21
|
+
readonly isUnstyled: import("@angular/core").Signal<boolean>;
|
|
22
|
+
readonly passThrough: import("@angular/core").Signal<Partial<Record<TxHoverEffectPart, import("@tectra-ng/core/config").TxPassThroughPart>>>;
|
|
23
|
+
readonly hostStyle: import("@angular/core").Signal<{
|
|
24
|
+
[x: string]: string;
|
|
25
|
+
}>;
|
|
26
|
+
readonly tilt: import("@angular/core").WritableSignal<{
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
}>;
|
|
30
|
+
protected readonly active: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
constructor();
|
|
32
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
33
|
+
reset(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxHoverEffect, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TxHoverEffect, "tx-hover-effect", never, {
|
|
36
|
+
"constrain": {
|
|
37
|
+
"alias": "constrain";
|
|
38
|
+
"required": false;
|
|
39
|
+
"isSignal": true;
|
|
40
|
+
};
|
|
41
|
+
"disabled": {
|
|
42
|
+
"alias": "disabled";
|
|
43
|
+
"required": false;
|
|
44
|
+
"isSignal": true;
|
|
45
|
+
};
|
|
46
|
+
"dt": {
|
|
47
|
+
"alias": "dt";
|
|
48
|
+
"required": false;
|
|
49
|
+
"isSignal": true;
|
|
50
|
+
};
|
|
51
|
+
"pt": {
|
|
52
|
+
"alias": "pt";
|
|
53
|
+
"required": false;
|
|
54
|
+
"isSignal": true;
|
|
55
|
+
};
|
|
56
|
+
"ptOptions": {
|
|
57
|
+
"alias": "ptOptions";
|
|
58
|
+
"required": false;
|
|
59
|
+
"isSignal": true;
|
|
60
|
+
};
|
|
61
|
+
"unstyled": {
|
|
62
|
+
"alias": "unstyled";
|
|
63
|
+
"required": false;
|
|
64
|
+
"isSignal": true;
|
|
65
|
+
};
|
|
66
|
+
}, {}, never, ["*"], true, never>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=tectra-ng-blocks-hover-effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-hover-effect.d.ts","names":[],"sources":["../../../../packages/blocks/hover-effect/src/hover-effect.types.ts","../../../../packages/blocks/hover-effect/src/hover-effect.component.ts"],"mappings":";;;YAAY;qBCgCC;mBACM;mBACA;UACT;WAEC,mCAAS;WACT,kCAAQ;WACR,4BAAE,YAAA;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,oDAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,oCAAU;WACV,qCAAW,OAAA,QAAA,OAAA,oDAAA;WACX,mCAAS;;;WAET,8BAAI;;;;qBACM,gCAAM;;YAMf,cAAc,OAAO;EAkB/B;SAzCW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAa;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { TxPassThroughOptions } from "@tectra-ng/core/config";
|
|
2
|
+
import { TectraDeepPartial } from "@tectra-ng/themes";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type TxMascotTrick = 'waving' | 'looking' | 'hopping' | 'dancing' | 'stretching';
|
|
5
|
+
export type TxMascotState = 'idle' | 'thinking' | 'happy' | 'sleeping' | 'walking' | TxMascotTrick;
|
|
6
|
+
export type TxMascotBodyPart = 'antenna' | 'stem' | 'body' | 'eye' | 'mouth' | 'arm-left' | 'arm-right' | 'leg-left' | 'leg-right';
|
|
7
|
+
export type TxMascotPart = 'root' | 'svg';
|
|
8
|
+
export interface TxMascotPixel {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
export interface TxMascotLayer {
|
|
13
|
+
part: TxMascotBodyPart;
|
|
14
|
+
pixels: TxMascotPixel[];
|
|
15
|
+
}
|
|
16
|
+
export declare const TX_MASCOT_SPRITE: readonly string[];
|
|
17
|
+
export declare const TX_MASCOT_TRICKS: readonly TxMascotTrick[];
|
|
18
|
+
export declare const TX_MASCOT_TRICK_SLOT_MS = 3000;
|
|
19
|
+
export declare const TX_MASCOT_TRICK_EVERY_SLOTS = 3;
|
|
20
|
+
export declare function txMascotLayers(parts: TxMascotBodyPart[], sprite?: readonly string[]): TxMascotLayer[];
|
|
21
|
+
export declare const TX_MASCOT_UPPER_LAYERS: TxMascotLayer[];
|
|
22
|
+
export declare const TX_MASCOT_LEG_LAYERS: TxMascotLayer[];
|
|
23
|
+
export declare class TxMascot {
|
|
24
|
+
readonly state: import("@angular/core").InputSignal<TxMascotState>;
|
|
25
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
26
|
+
readonly playful: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
27
|
+
readonly size: import("@angular/core").InputSignal<string | number | undefined>;
|
|
28
|
+
readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
|
|
29
|
+
root: {
|
|
30
|
+
size: string;
|
|
31
|
+
bodyColor: string;
|
|
32
|
+
shadeColor: string;
|
|
33
|
+
glowColor: string;
|
|
34
|
+
eyeColor: string;
|
|
35
|
+
};
|
|
36
|
+
}> | undefined>;
|
|
37
|
+
readonly pt: import("@angular/core").InputSignal<Partial<Record<TxMascotPart, import("@tectra-ng/core/config").TxPassThroughValue<TxMascot>>> | undefined>;
|
|
38
|
+
readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
|
|
39
|
+
readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
40
|
+
readonly isUnstyled: import("@angular/core").Signal<boolean>;
|
|
41
|
+
readonly passThrough: import("@angular/core").Signal<Partial<Record<TxMascotPart, import("@tectra-ng/core/config").TxPassThroughPart>>>;
|
|
42
|
+
readonly viewBox: string;
|
|
43
|
+
readonly upperLayers: import("@tectra-ng/blocks/mascot").TxMascotLayer[];
|
|
44
|
+
readonly legLayers: import("@tectra-ng/blocks/mascot").TxMascotLayer[];
|
|
45
|
+
private readonly slot;
|
|
46
|
+
private readonly trickOffset;
|
|
47
|
+
readonly displayState: import("@angular/core").Signal<TxMascotState>;
|
|
48
|
+
readonly hostStyle: import("@angular/core").Signal<{
|
|
49
|
+
'--tx-mascot-size'?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
constructor();
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxMascot, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TxMascot, "tx-mascot", never, {
|
|
54
|
+
"state": {
|
|
55
|
+
"alias": "state";
|
|
56
|
+
"required": false;
|
|
57
|
+
"isSignal": true;
|
|
58
|
+
};
|
|
59
|
+
"label": {
|
|
60
|
+
"alias": "label";
|
|
61
|
+
"required": false;
|
|
62
|
+
"isSignal": true;
|
|
63
|
+
};
|
|
64
|
+
"playful": {
|
|
65
|
+
"alias": "playful";
|
|
66
|
+
"required": false;
|
|
67
|
+
"isSignal": true;
|
|
68
|
+
};
|
|
69
|
+
"size": {
|
|
70
|
+
"alias": "size";
|
|
71
|
+
"required": false;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
74
|
+
"dt": {
|
|
75
|
+
"alias": "dt";
|
|
76
|
+
"required": false;
|
|
77
|
+
"isSignal": true;
|
|
78
|
+
};
|
|
79
|
+
"pt": {
|
|
80
|
+
"alias": "pt";
|
|
81
|
+
"required": false;
|
|
82
|
+
"isSignal": true;
|
|
83
|
+
};
|
|
84
|
+
"ptOptions": {
|
|
85
|
+
"alias": "ptOptions";
|
|
86
|
+
"required": false;
|
|
87
|
+
"isSignal": true;
|
|
88
|
+
};
|
|
89
|
+
"unstyled": {
|
|
90
|
+
"alias": "unstyled";
|
|
91
|
+
"required": false;
|
|
92
|
+
"isSignal": true;
|
|
93
|
+
};
|
|
94
|
+
}, {}, never, never, true, never>;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=tectra-ng-blocks-mascot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-mascot.d.ts","names":[],"sources":["../../../../packages/blocks/mascot/src/mascot.types.ts","../../../../packages/blocks/mascot/src/mascot.data.ts","../../../../packages/blocks/mascot/src/mascot.component.ts"],"mappings":";;;YAAY;YACA,yEAAyE;YACzE;YACA;iBAEK;EACf;EACA;;iBAGe;EACf,MAAM;EACN,QAAQ;;qBCVG;qBAeA,2BAA2B;qBAiB3B;qBACA;wBAEG,eAAe,OAAO,oBAAoB,6BAA+C;qBAO5F,wBAAsB;qBACtB,sBAAoB;qBCtBpB;WACF,+BAAK,YAAA;WACL,+BAAK;WACL,iCAAO;WACP,8BAAI;WACJ,4BAAE,YAAA;;;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,+CAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,oCAAU;WACV,qCAAW,OAAA,QAAA,OAAA,+CAAA;WACX;WACA,gDAAW;WACX,8CAAS;mBAED;mBACA;WAER,sCAAY,OAAA;WAQZ,mCAAS;;;;SA3BP,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAQ;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
import { Router } from "@angular/router";
|
|
2
3
|
import { TxPassThroughOptions } from "@tectra-ng/core/config";
|
|
3
4
|
import { TectraDeepPartial } from "@tectra-ng/themes";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
5
|
export type TxPublicHeaderResponsive = 'viewport' | 'container';
|
|
6
6
|
export type TxPublicHeaderPart = 'root' | 'bar' | 'brand' | 'logo' | 'panel' | 'nav' | 'end' | 'actions' | 'toggle';
|
|
7
|
+
export declare class TxPublicHeaderBrand {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxPublicHeaderBrand, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TxPublicHeaderBrand, "[txPublicHeaderBrand]", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
7
11
|
export declare class TxPublicHeader {
|
|
8
12
|
private readonly document;
|
|
9
13
|
private readonly host;
|
|
10
14
|
private readonly toggleButton;
|
|
11
15
|
protected readonly router: Router | null;
|
|
16
|
+
protected readonly brandSlot: import("@angular/core").Signal<TxPublicHeaderBrand | undefined>;
|
|
12
17
|
readonly brand: import("@angular/core").InputSignal<string>;
|
|
13
18
|
readonly logo: import("@angular/core").InputSignal<string | undefined>;
|
|
14
19
|
readonly homeLink: import("@angular/core").InputSignal<string | readonly unknown[]>;
|
|
@@ -43,6 +48,7 @@ export declare class TxPublicHeader {
|
|
|
43
48
|
linkFontSize: string;
|
|
44
49
|
linkColor: string;
|
|
45
50
|
linkHoverColor: string;
|
|
51
|
+
linkHoverBackground: string;
|
|
46
52
|
};
|
|
47
53
|
end: {
|
|
48
54
|
gap: string;
|
|
@@ -137,6 +143,6 @@ export declare class TxPublicHeader {
|
|
|
137
143
|
"required": false;
|
|
138
144
|
"isSignal": true;
|
|
139
145
|
};
|
|
140
|
-
}, {},
|
|
146
|
+
}, {}, ["brandSlot"], ["[txPublicHeaderBrand]", "[txPublicHeaderNav]", "[txPublicHeaderActions]"], true, never>;
|
|
141
147
|
}
|
|
142
148
|
//# sourceMappingURL=tectra-ng-blocks-public-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-public-header.d.ts","names":[],"sources":["../../../../packages/blocks/public-header/src/public-header.types.ts","../../../../packages/blocks/public-header/src/public-header.component.ts"],"mappings":";;;;YAAY;YAEA;
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-public-header.d.ts","names":[],"sources":["../../../../packages/blocks/public-header/src/public-header.types.ts","../../../../packages/blocks/public-header/src/public-header-brand.directive.ts","../../../../packages/blocks/public-header/src/public-header.component.ts"],"mappings":";;;;YAAY;YAEA;qBCCC;SAAA,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;qBC4CA;mBACM;mBACA;mBACA;qBACE,QAAM;qBACN,mCAAS,OAAA;WAEnB,+BAAK;WACL,8BAAI;WACJ,kCAAQ;WACR,qCAAW;WACX,oCAAU,YAAA;WACV,4BAAE,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,qDAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,oCAAU;WACV,qCAAW,OAAA,QAAA,OAAA,qDAAA;qBACD,sCAAY,wCAAA;qBACZ;WACV,mCAAS;;;qBACC,kCAAQ;WAKlB,8BAAI;WACJ,iCAAO;qBACG,iCAAO;UAClB;;EAiCR;EASA;YAYU,oBAAoB,OAAO;UAM7B;UAKA;YAIE;YAOA,aAAa,OAAO;SA1GnB,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAc;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
|