@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
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, afterNextRender, booleanAttribute, computed, inject, input, signal } from "@angular/core";
|
|
3
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
4
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
5
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
6
|
+
const TX_MASCOT_SPRITE = [
|
|
7
|
+
".......A.......",
|
|
8
|
+
".......S.......",
|
|
9
|
+
"....#######....",
|
|
10
|
+
"...#########...",
|
|
11
|
+
"..###########..",
|
|
12
|
+
"..##EE###EE##..",
|
|
13
|
+
"hh##EE###EE##HH",
|
|
14
|
+
"..###########..",
|
|
15
|
+
"..####MMM####..",
|
|
16
|
+
"...#########...",
|
|
17
|
+
"...ll.....LL...",
|
|
18
|
+
"...ll.....LL..."
|
|
19
|
+
];
|
|
20
|
+
const TX_MASCOT_TRICKS = [
|
|
21
|
+
"waving",
|
|
22
|
+
"looking",
|
|
23
|
+
"hopping",
|
|
24
|
+
"dancing",
|
|
25
|
+
"stretching"
|
|
26
|
+
];
|
|
27
|
+
const PART_CHARS = {
|
|
28
|
+
stem: "S",
|
|
29
|
+
antenna: "A",
|
|
30
|
+
"arm-left": "h",
|
|
31
|
+
"arm-right": "H",
|
|
32
|
+
body: "#EM",
|
|
33
|
+
eye: "E",
|
|
34
|
+
mouth: "M",
|
|
35
|
+
"leg-left": "l",
|
|
36
|
+
"leg-right": "L"
|
|
37
|
+
};
|
|
38
|
+
const UPPER_PARTS = [
|
|
39
|
+
"stem",
|
|
40
|
+
"antenna",
|
|
41
|
+
"arm-left",
|
|
42
|
+
"arm-right",
|
|
43
|
+
"body",
|
|
44
|
+
"eye",
|
|
45
|
+
"mouth"
|
|
46
|
+
];
|
|
47
|
+
const LEG_PARTS = ["leg-left", "leg-right"];
|
|
48
|
+
const TX_MASCOT_TRICK_SLOT_MS = 3e3;
|
|
49
|
+
const TX_MASCOT_TRICK_EVERY_SLOTS = 3;
|
|
50
|
+
function txMascotLayers(parts, sprite = TX_MASCOT_SPRITE) {
|
|
51
|
+
return parts.map((part) => ({
|
|
52
|
+
part,
|
|
53
|
+
pixels: sprite.flatMap((row, y) => [...row].flatMap((char, x) => PART_CHARS[part].includes(char) ? [{
|
|
54
|
+
x,
|
|
55
|
+
y
|
|
56
|
+
}] : []))
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
const TX_MASCOT_UPPER_LAYERS = txMascotLayers(UPPER_PARTS);
|
|
60
|
+
const TX_MASCOT_LEG_LAYERS = txMascotLayers(LEG_PARTS);
|
|
61
|
+
var TxMascot = class TxMascot {
|
|
62
|
+
state = input("idle", ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
63
|
+
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
64
|
+
playful = input(true, {
|
|
65
|
+
...ngDevMode ? { debugName: "playful" } : /* istanbul ignore next */ {},
|
|
66
|
+
transform: booleanAttribute
|
|
67
|
+
});
|
|
68
|
+
size = input(void 0, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
69
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
70
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
71
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
72
|
+
unstyled = input(void 0, {
|
|
73
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
74
|
+
transform: optionalBoolean
|
|
75
|
+
});
|
|
76
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
77
|
+
passThrough = injectPassThrough("mascot", this, this.pt, this.ptOptions);
|
|
78
|
+
viewBox = `0 0 ${TX_MASCOT_SPRITE[0].length} ${TX_MASCOT_SPRITE.length}`;
|
|
79
|
+
upperLayers = TX_MASCOT_UPPER_LAYERS;
|
|
80
|
+
legLayers = TX_MASCOT_LEG_LAYERS;
|
|
81
|
+
slot = signal(1, ...ngDevMode ? [{ debugName: "slot" }] : /* istanbul ignore next */ []);
|
|
82
|
+
trickOffset = Math.floor(Math.random() * TX_MASCOT_TRICKS.length);
|
|
83
|
+
displayState = computed(() => {
|
|
84
|
+
const state = this.state();
|
|
85
|
+
const slot = this.slot();
|
|
86
|
+
if (state !== "idle" || !this.playful() || slot % 3 !== 0) return state;
|
|
87
|
+
return TX_MASCOT_TRICKS[(Math.floor(slot / 3) + this.trickOffset) % TX_MASCOT_TRICKS.length];
|
|
88
|
+
}, ...ngDevMode ? [{ debugName: "displayState" }] : /* istanbul ignore next */ []);
|
|
89
|
+
hostStyle = computed(() => {
|
|
90
|
+
const size = this.size();
|
|
91
|
+
return {
|
|
92
|
+
...toStyleObject(this.dt(), "--tx-mascot"),
|
|
93
|
+
...size !== void 0 ? { "--tx-mascot-size": typeof size === "number" ? `${size}px` : size } : {},
|
|
94
|
+
...this.passThrough().root?.style
|
|
95
|
+
};
|
|
96
|
+
}, ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
97
|
+
constructor() {
|
|
98
|
+
const destroyRef = inject(DestroyRef);
|
|
99
|
+
afterNextRender(() => {
|
|
100
|
+
const timer = setInterval(() => this.slot.update((slot) => slot + 1), TX_MASCOT_TRICK_SLOT_MS);
|
|
101
|
+
destroyRef.onDestroy(() => clearInterval(timer));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
105
|
+
minVersion: "12.0.0",
|
|
106
|
+
version: "22.2.3",
|
|
107
|
+
ngImport: i0,
|
|
108
|
+
type: TxMascot,
|
|
109
|
+
deps: [],
|
|
110
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
111
|
+
});
|
|
112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
113
|
+
minVersion: "17.0.0",
|
|
114
|
+
version: "22.2.3",
|
|
115
|
+
type: TxMascot,
|
|
116
|
+
isStandalone: true,
|
|
117
|
+
selector: "tx-mascot",
|
|
118
|
+
inputs: {
|
|
119
|
+
state: {
|
|
120
|
+
classPropertyName: "state",
|
|
121
|
+
publicName: "state",
|
|
122
|
+
isSignal: true,
|
|
123
|
+
isRequired: false,
|
|
124
|
+
transformFunction: null
|
|
125
|
+
},
|
|
126
|
+
label: {
|
|
127
|
+
classPropertyName: "label",
|
|
128
|
+
publicName: "label",
|
|
129
|
+
isSignal: true,
|
|
130
|
+
isRequired: false,
|
|
131
|
+
transformFunction: null
|
|
132
|
+
},
|
|
133
|
+
playful: {
|
|
134
|
+
classPropertyName: "playful",
|
|
135
|
+
publicName: "playful",
|
|
136
|
+
isSignal: true,
|
|
137
|
+
isRequired: false,
|
|
138
|
+
transformFunction: null
|
|
139
|
+
},
|
|
140
|
+
size: {
|
|
141
|
+
classPropertyName: "size",
|
|
142
|
+
publicName: "size",
|
|
143
|
+
isSignal: true,
|
|
144
|
+
isRequired: false,
|
|
145
|
+
transformFunction: null
|
|
146
|
+
},
|
|
147
|
+
dt: {
|
|
148
|
+
classPropertyName: "dt",
|
|
149
|
+
publicName: "dt",
|
|
150
|
+
isSignal: true,
|
|
151
|
+
isRequired: false,
|
|
152
|
+
transformFunction: null
|
|
153
|
+
},
|
|
154
|
+
pt: {
|
|
155
|
+
classPropertyName: "pt",
|
|
156
|
+
publicName: "pt",
|
|
157
|
+
isSignal: true,
|
|
158
|
+
isRequired: false,
|
|
159
|
+
transformFunction: null
|
|
160
|
+
},
|
|
161
|
+
ptOptions: {
|
|
162
|
+
classPropertyName: "ptOptions",
|
|
163
|
+
publicName: "ptOptions",
|
|
164
|
+
isSignal: true,
|
|
165
|
+
isRequired: false,
|
|
166
|
+
transformFunction: null
|
|
167
|
+
},
|
|
168
|
+
unstyled: {
|
|
169
|
+
classPropertyName: "unstyled",
|
|
170
|
+
publicName: "unstyled",
|
|
171
|
+
isSignal: true,
|
|
172
|
+
isRequired: false,
|
|
173
|
+
transformFunction: null
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
host: {
|
|
177
|
+
attributes: { "role": "img" },
|
|
178
|
+
properties: {
|
|
179
|
+
"class": "passThrough().root?.class",
|
|
180
|
+
"style": "hostStyle()",
|
|
181
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
182
|
+
"attr.data-state": "displayState()",
|
|
183
|
+
"attr.aria-label": "label() || null",
|
|
184
|
+
"attr.aria-hidden": "label() ? null : \"true\""
|
|
185
|
+
},
|
|
186
|
+
classAttribute: "tx-mascot"
|
|
187
|
+
},
|
|
188
|
+
ngImport: i0,
|
|
189
|
+
template: "<svg class=\"tx-mascot__svg\" shape-rendering=\"crispEdges\" aria-hidden=\"true\" [attr.viewBox]=\"viewBox\" [class]=\"passThrough().svg?.class\" [style]=\"passThrough().svg?.style\">\n <g class=\"tx-mascot__figure\">\n @for (layer of legLayers; track layer.part) {\n <g [attr.class]=\"'tx-mascot__part tx-mascot__part--' + layer.part\">\n @for (pixel of layer.pixels; track $index) {\n <rect width=\"1\" height=\"1\" [attr.x]=\"pixel.x\" [attr.y]=\"pixel.y\" />\n }\n </g>\n }\n <g class=\"tx-mascot__upper\">\n @for (layer of upperLayers; track layer.part) {\n <g [attr.class]=\"'tx-mascot__part tx-mascot__part--' + layer.part\">\n @for (pixel of layer.pixels; track $index) {\n <rect width=\"1\" height=\"1\" [attr.x]=\"pixel.x\" [attr.y]=\"pixel.y\" />\n }\n </g>\n }\n </g>\n </g>\n</svg>\n",
|
|
190
|
+
styles: [":host{display:inline-block;flex-shrink:0;aspect-ratio:15/12}.tx-mascot__svg{display:block;width:100%;height:100%;overflow:visible}.tx-mascot__figure,.tx-mascot__upper,.tx-mascot__part{transform-box:fill-box;transform-origin:center}:host([data-styled]){width:var(--tx-mascot-size)}:host([data-styled]) .tx-mascot__part--body,:host([data-styled]) .tx-mascot__part--arm-left,:host([data-styled]) .tx-mascot__part--arm-right{fill:var(--tx-mascot-body-color)}:host([data-styled]) .tx-mascot__part--stem,:host([data-styled]) .tx-mascot__part--leg-left,:host([data-styled]) .tx-mascot__part--leg-right{fill:var(--tx-mascot-shade-color)}:host([data-styled]) .tx-mascot__part--antenna{fill:var(--tx-mascot-glow-color)}:host([data-styled]) .tx-mascot__part--eye,:host([data-styled]) .tx-mascot__part--mouth{fill:var(--tx-mascot-eye-color)}:host([data-styled]) .tx-mascot__part--mouth{opacity:0}:host([data-styled][data-state=idle]) .tx-mascot__upper{animation:tx-mascot-bob 1.8s steps(1) infinite}:host([data-styled][data-state=idle]) .tx-mascot__part--eye{animation:tx-mascot-blink 4.2s steps(1) infinite}:host([data-styled][data-state=idle]) .tx-mascot__part--antenna{animation:tx-mascot-glow 2.4s ease-in-out infinite}:host([data-styled][data-state=thinking]) .tx-mascot__upper{animation:tx-mascot-bob .9s steps(1) infinite}:host([data-styled][data-state=thinking]) .tx-mascot__part--eye{animation:tx-mascot-look 2.4s steps(1) infinite}:host([data-styled][data-state=thinking]) .tx-mascot__part--antenna{animation:tx-mascot-glow .6s ease-in-out infinite}:host([data-styled][data-state=thinking]) .tx-mascot__part--arm-left{animation:tx-mascot-arm .9s steps(1) infinite}:host([data-styled][data-state=happy]) .tx-mascot__figure{animation:tx-mascot-jump .9s steps(1) infinite}:host([data-styled][data-state=happy]) .tx-mascot__part--arm-left,:host([data-styled][data-state=happy]) .tx-mascot__part--arm-right{animation:tx-mascot-arm .45s steps(1) infinite}:host([data-styled][data-state=happy]) .tx-mascot__part--mouth{opacity:1}:host([data-styled][data-state=sleeping]) .tx-mascot__upper{animation:tx-mascot-bob 3.2s steps(1) infinite}:host([data-styled][data-state=sleeping]) .tx-mascot__part--eye{transform:scaleY(.34)}:host([data-styled][data-state=sleeping]) .tx-mascot__part--antenna{opacity:.3}:host([data-styled][data-state=walking]) .tx-mascot__upper{animation:tx-mascot-bob .5s steps(1) infinite}:host([data-styled][data-state=walking]) .tx-mascot__part--leg-left{animation:tx-mascot-step .5s steps(1) infinite}:host([data-styled][data-state=walking]) .tx-mascot__part--leg-right{animation:tx-mascot-step .5s steps(1) -.25s infinite}:host([data-styled][data-state=walking]) .tx-mascot__part--eye{animation:tx-mascot-blink 3s steps(1) infinite}:host([data-styled][data-state=waving]) .tx-mascot__upper{animation:tx-mascot-bob 1.5s steps(1) infinite}:host([data-styled][data-state=waving]) .tx-mascot__part--arm-right{animation:tx-mascot-wave .5s steps(1) infinite}:host([data-styled][data-state=waving]) .tx-mascot__part--mouth{opacity:1}:host([data-styled][data-state=looking]) .tx-mascot__part--eye{animation:tx-mascot-glance 3s steps(1) both}:host([data-styled][data-state=looking]) .tx-mascot__part--antenna{animation:tx-mascot-glow 1.5s ease-in-out infinite}:host([data-styled][data-state=hopping]) .tx-mascot__figure{animation:tx-mascot-hop 1.4s steps(1) 2 both}:host([data-styled][data-state=hopping]) .tx-mascot__part--arm-left,:host([data-styled][data-state=hopping]) .tx-mascot__part--arm-right{animation:tx-mascot-arm .35s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__upper{animation:tx-mascot-sway .6s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--arm-left{animation:tx-mascot-arm .6s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--arm-right{animation:tx-mascot-arm .6s steps(1) -.3s infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--leg-left{animation:tx-mascot-step .6s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--leg-right{animation:tx-mascot-step .6s steps(1) -.3s infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--mouth{opacity:1}:host([data-styled][data-state=stretching]) .tx-mascot__upper{animation:tx-mascot-stretch 3s steps(1) both}:host([data-styled][data-state=stretching]) .tx-mascot__part--arm-left,:host([data-styled][data-state=stretching]) .tx-mascot__part--arm-right{animation:tx-mascot-reach 3s steps(1) both}:host([data-styled][data-state=stretching]) .tx-mascot__part--eye{animation:tx-mascot-yawn 3s steps(1) both}@keyframes tx-mascot-wave{0%{transform:translateY(-1px)}50%{transform:translateY(-3px)}}@keyframes tx-mascot-glance{0%{transform:translate(0)}15%{transform:translate(-1px)}50%{transform:translate(1px)}85%{transform:translate(0)}}@keyframes tx-mascot-hop{0%{transform:translateY(0)}20%{transform:translateY(-2px)}35%{transform:translateY(-3px)}50%{transform:translateY(-2px)}65%{transform:translateY(0)}}@keyframes tx-mascot-sway{0%{transform:translate(-1px)}50%{transform:translate(1px)}}@keyframes tx-mascot-stretch{0%{transform:translateY(0)}20%{transform:translateY(-1px)}75%{transform:translateY(0)}}@keyframes tx-mascot-reach{0%{transform:translateY(0)}15%{transform:translateY(-2px)}30%{transform:translateY(-4px)}70%{transform:translateY(-2px)}80%{transform:translateY(0)}}@keyframes tx-mascot-yawn{0%{transform:scaleY(1)}25%{transform:scaleY(.34)}75%{transform:scaleY(1)}}@keyframes tx-mascot-bob{0%{transform:translateY(0)}50%{transform:translateY(-1px)}}@keyframes tx-mascot-blink{0%{transform:scaleY(1)}92%{transform:scaleY(.34)}96%{transform:scaleY(1)}}@keyframes tx-mascot-look{0%{transform:translate(0)}25%{transform:translate(-1px)}50%{transform:translate(0)}75%{transform:translate(1px)}}@keyframes tx-mascot-glow{0%,to{opacity:1}50%{opacity:.35}}@keyframes tx-mascot-jump{0%{transform:translateY(0)}25%{transform:translateY(-2px)}50%{transform:translateY(-1px)}75%{transform:translateY(0)}}@keyframes tx-mascot-arm{0%{transform:translateY(0)}50%{transform:translateY(-1px)}}@keyframes tx-mascot-step{0%{transform:translateY(0)}50%{transform:translateY(-1px)}}@media(prefers-reduced-motion:reduce){.tx-mascot__figure,.tx-mascot__upper,.tx-mascot__part{animation:none!important}}\n"],
|
|
191
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
195
|
+
minVersion: "12.0.0",
|
|
196
|
+
version: "22.2.3",
|
|
197
|
+
ngImport: i0,
|
|
198
|
+
type: TxMascot,
|
|
199
|
+
decorators: [{
|
|
200
|
+
type: Component,
|
|
201
|
+
args: [{
|
|
202
|
+
selector: "tx-mascot",
|
|
203
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
204
|
+
host: {
|
|
205
|
+
class: "tx-mascot",
|
|
206
|
+
role: "img",
|
|
207
|
+
"[class]": "passThrough().root?.class",
|
|
208
|
+
"[style]": "hostStyle()",
|
|
209
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
210
|
+
"[attr.data-state]": "displayState()",
|
|
211
|
+
"[attr.aria-label]": "label() || null",
|
|
212
|
+
"[attr.aria-hidden]": "label() ? null : \"true\""
|
|
213
|
+
},
|
|
214
|
+
template: "<svg class=\"tx-mascot__svg\" shape-rendering=\"crispEdges\" aria-hidden=\"true\" [attr.viewBox]=\"viewBox\" [class]=\"passThrough().svg?.class\" [style]=\"passThrough().svg?.style\">\n <g class=\"tx-mascot__figure\">\n @for (layer of legLayers; track layer.part) {\n <g [attr.class]=\"'tx-mascot__part tx-mascot__part--' + layer.part\">\n @for (pixel of layer.pixels; track $index) {\n <rect width=\"1\" height=\"1\" [attr.x]=\"pixel.x\" [attr.y]=\"pixel.y\" />\n }\n </g>\n }\n <g class=\"tx-mascot__upper\">\n @for (layer of upperLayers; track layer.part) {\n <g [attr.class]=\"'tx-mascot__part tx-mascot__part--' + layer.part\">\n @for (pixel of layer.pixels; track $index) {\n <rect width=\"1\" height=\"1\" [attr.x]=\"pixel.x\" [attr.y]=\"pixel.y\" />\n }\n </g>\n }\n </g>\n </g>\n</svg>\n",
|
|
215
|
+
styles: [":host{display:inline-block;flex-shrink:0;aspect-ratio:15/12}.tx-mascot__svg{display:block;width:100%;height:100%;overflow:visible}.tx-mascot__figure,.tx-mascot__upper,.tx-mascot__part{transform-box:fill-box;transform-origin:center}:host([data-styled]){width:var(--tx-mascot-size)}:host([data-styled]) .tx-mascot__part--body,:host([data-styled]) .tx-mascot__part--arm-left,:host([data-styled]) .tx-mascot__part--arm-right{fill:var(--tx-mascot-body-color)}:host([data-styled]) .tx-mascot__part--stem,:host([data-styled]) .tx-mascot__part--leg-left,:host([data-styled]) .tx-mascot__part--leg-right{fill:var(--tx-mascot-shade-color)}:host([data-styled]) .tx-mascot__part--antenna{fill:var(--tx-mascot-glow-color)}:host([data-styled]) .tx-mascot__part--eye,:host([data-styled]) .tx-mascot__part--mouth{fill:var(--tx-mascot-eye-color)}:host([data-styled]) .tx-mascot__part--mouth{opacity:0}:host([data-styled][data-state=idle]) .tx-mascot__upper{animation:tx-mascot-bob 1.8s steps(1) infinite}:host([data-styled][data-state=idle]) .tx-mascot__part--eye{animation:tx-mascot-blink 4.2s steps(1) infinite}:host([data-styled][data-state=idle]) .tx-mascot__part--antenna{animation:tx-mascot-glow 2.4s ease-in-out infinite}:host([data-styled][data-state=thinking]) .tx-mascot__upper{animation:tx-mascot-bob .9s steps(1) infinite}:host([data-styled][data-state=thinking]) .tx-mascot__part--eye{animation:tx-mascot-look 2.4s steps(1) infinite}:host([data-styled][data-state=thinking]) .tx-mascot__part--antenna{animation:tx-mascot-glow .6s ease-in-out infinite}:host([data-styled][data-state=thinking]) .tx-mascot__part--arm-left{animation:tx-mascot-arm .9s steps(1) infinite}:host([data-styled][data-state=happy]) .tx-mascot__figure{animation:tx-mascot-jump .9s steps(1) infinite}:host([data-styled][data-state=happy]) .tx-mascot__part--arm-left,:host([data-styled][data-state=happy]) .tx-mascot__part--arm-right{animation:tx-mascot-arm .45s steps(1) infinite}:host([data-styled][data-state=happy]) .tx-mascot__part--mouth{opacity:1}:host([data-styled][data-state=sleeping]) .tx-mascot__upper{animation:tx-mascot-bob 3.2s steps(1) infinite}:host([data-styled][data-state=sleeping]) .tx-mascot__part--eye{transform:scaleY(.34)}:host([data-styled][data-state=sleeping]) .tx-mascot__part--antenna{opacity:.3}:host([data-styled][data-state=walking]) .tx-mascot__upper{animation:tx-mascot-bob .5s steps(1) infinite}:host([data-styled][data-state=walking]) .tx-mascot__part--leg-left{animation:tx-mascot-step .5s steps(1) infinite}:host([data-styled][data-state=walking]) .tx-mascot__part--leg-right{animation:tx-mascot-step .5s steps(1) -.25s infinite}:host([data-styled][data-state=walking]) .tx-mascot__part--eye{animation:tx-mascot-blink 3s steps(1) infinite}:host([data-styled][data-state=waving]) .tx-mascot__upper{animation:tx-mascot-bob 1.5s steps(1) infinite}:host([data-styled][data-state=waving]) .tx-mascot__part--arm-right{animation:tx-mascot-wave .5s steps(1) infinite}:host([data-styled][data-state=waving]) .tx-mascot__part--mouth{opacity:1}:host([data-styled][data-state=looking]) .tx-mascot__part--eye{animation:tx-mascot-glance 3s steps(1) both}:host([data-styled][data-state=looking]) .tx-mascot__part--antenna{animation:tx-mascot-glow 1.5s ease-in-out infinite}:host([data-styled][data-state=hopping]) .tx-mascot__figure{animation:tx-mascot-hop 1.4s steps(1) 2 both}:host([data-styled][data-state=hopping]) .tx-mascot__part--arm-left,:host([data-styled][data-state=hopping]) .tx-mascot__part--arm-right{animation:tx-mascot-arm .35s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__upper{animation:tx-mascot-sway .6s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--arm-left{animation:tx-mascot-arm .6s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--arm-right{animation:tx-mascot-arm .6s steps(1) -.3s infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--leg-left{animation:tx-mascot-step .6s steps(1) infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--leg-right{animation:tx-mascot-step .6s steps(1) -.3s infinite}:host([data-styled][data-state=dancing]) .tx-mascot__part--mouth{opacity:1}:host([data-styled][data-state=stretching]) .tx-mascot__upper{animation:tx-mascot-stretch 3s steps(1) both}:host([data-styled][data-state=stretching]) .tx-mascot__part--arm-left,:host([data-styled][data-state=stretching]) .tx-mascot__part--arm-right{animation:tx-mascot-reach 3s steps(1) both}:host([data-styled][data-state=stretching]) .tx-mascot__part--eye{animation:tx-mascot-yawn 3s steps(1) both}@keyframes tx-mascot-wave{0%{transform:translateY(-1px)}50%{transform:translateY(-3px)}}@keyframes tx-mascot-glance{0%{transform:translate(0)}15%{transform:translate(-1px)}50%{transform:translate(1px)}85%{transform:translate(0)}}@keyframes tx-mascot-hop{0%{transform:translateY(0)}20%{transform:translateY(-2px)}35%{transform:translateY(-3px)}50%{transform:translateY(-2px)}65%{transform:translateY(0)}}@keyframes tx-mascot-sway{0%{transform:translate(-1px)}50%{transform:translate(1px)}}@keyframes tx-mascot-stretch{0%{transform:translateY(0)}20%{transform:translateY(-1px)}75%{transform:translateY(0)}}@keyframes tx-mascot-reach{0%{transform:translateY(0)}15%{transform:translateY(-2px)}30%{transform:translateY(-4px)}70%{transform:translateY(-2px)}80%{transform:translateY(0)}}@keyframes tx-mascot-yawn{0%{transform:scaleY(1)}25%{transform:scaleY(.34)}75%{transform:scaleY(1)}}@keyframes tx-mascot-bob{0%{transform:translateY(0)}50%{transform:translateY(-1px)}}@keyframes tx-mascot-blink{0%{transform:scaleY(1)}92%{transform:scaleY(.34)}96%{transform:scaleY(1)}}@keyframes tx-mascot-look{0%{transform:translate(0)}25%{transform:translate(-1px)}50%{transform:translate(0)}75%{transform:translate(1px)}}@keyframes tx-mascot-glow{0%,to{opacity:1}50%{opacity:.35}}@keyframes tx-mascot-jump{0%{transform:translateY(0)}25%{transform:translateY(-2px)}50%{transform:translateY(-1px)}75%{transform:translateY(0)}}@keyframes tx-mascot-arm{0%{transform:translateY(0)}50%{transform:translateY(-1px)}}@keyframes tx-mascot-step{0%{transform:translateY(0)}50%{transform:translateY(-1px)}}@media(prefers-reduced-motion:reduce){.tx-mascot__figure,.tx-mascot__upper,.tx-mascot__part{animation:none!important}}\n"]
|
|
216
|
+
}]
|
|
217
|
+
}],
|
|
218
|
+
ctorParameters: () => [],
|
|
219
|
+
propDecorators: {
|
|
220
|
+
state: [{
|
|
221
|
+
type: i0.Input,
|
|
222
|
+
args: [{
|
|
223
|
+
isSignal: true,
|
|
224
|
+
alias: "state",
|
|
225
|
+
required: false
|
|
226
|
+
}]
|
|
227
|
+
}],
|
|
228
|
+
label: [{
|
|
229
|
+
type: i0.Input,
|
|
230
|
+
args: [{
|
|
231
|
+
isSignal: true,
|
|
232
|
+
alias: "label",
|
|
233
|
+
required: false
|
|
234
|
+
}]
|
|
235
|
+
}],
|
|
236
|
+
playful: [{
|
|
237
|
+
type: i0.Input,
|
|
238
|
+
args: [{
|
|
239
|
+
isSignal: true,
|
|
240
|
+
alias: "playful",
|
|
241
|
+
required: false
|
|
242
|
+
}]
|
|
243
|
+
}],
|
|
244
|
+
size: [{
|
|
245
|
+
type: i0.Input,
|
|
246
|
+
args: [{
|
|
247
|
+
isSignal: true,
|
|
248
|
+
alias: "size",
|
|
249
|
+
required: false
|
|
250
|
+
}]
|
|
251
|
+
}],
|
|
252
|
+
dt: [{
|
|
253
|
+
type: i0.Input,
|
|
254
|
+
args: [{
|
|
255
|
+
isSignal: true,
|
|
256
|
+
alias: "dt",
|
|
257
|
+
required: false
|
|
258
|
+
}]
|
|
259
|
+
}],
|
|
260
|
+
pt: [{
|
|
261
|
+
type: i0.Input,
|
|
262
|
+
args: [{
|
|
263
|
+
isSignal: true,
|
|
264
|
+
alias: "pt",
|
|
265
|
+
required: false
|
|
266
|
+
}]
|
|
267
|
+
}],
|
|
268
|
+
ptOptions: [{
|
|
269
|
+
type: i0.Input,
|
|
270
|
+
args: [{
|
|
271
|
+
isSignal: true,
|
|
272
|
+
alias: "ptOptions",
|
|
273
|
+
required: false
|
|
274
|
+
}]
|
|
275
|
+
}],
|
|
276
|
+
unstyled: [{
|
|
277
|
+
type: i0.Input,
|
|
278
|
+
args: [{
|
|
279
|
+
isSignal: true,
|
|
280
|
+
alias: "unstyled",
|
|
281
|
+
required: false
|
|
282
|
+
}]
|
|
283
|
+
}]
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
export { TX_MASCOT_LEG_LAYERS, TX_MASCOT_SPRITE, TX_MASCOT_TRICKS, TX_MASCOT_TRICK_EVERY_SLOTS, TX_MASCOT_TRICK_SLOT_MS, TX_MASCOT_UPPER_LAYERS, TxMascot, txMascotLayers };
|
|
287
|
+
|
|
288
|
+
//# sourceMappingURL=tectra-ng-blocks-mascot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-mascot.mjs","names":[],"sources":["../../../../packages/blocks/mascot/src/mascot.data.ts","../../../../packages/blocks/mascot/src/mascot.component.ts","../../../../packages/blocks/mascot/src/mascot.component.html"],"sourcesContent":["import { TxMascotBodyPart, TxMascotLayer, TxMascotTrick } from './mascot.types';\n\nexport const TX_MASCOT_SPRITE: readonly string[] = [\n '.......A.......',\n '.......S.......',\n '....#######....',\n '...#########...',\n '..###########..',\n '..##EE###EE##..',\n 'hh##EE###EE##HH',\n '..###########..',\n '..####MMM####..',\n '...#########...',\n '...ll.....LL...',\n '...ll.....LL...',\n];\n\nexport const TX_MASCOT_TRICKS: readonly TxMascotTrick[] = ['waving', 'looking', 'hopping', 'dancing', 'stretching'];\n\nconst PART_CHARS: Record<TxMascotBodyPart, string> = {\n stem: 'S',\n antenna: 'A',\n 'arm-left': 'h',\n 'arm-right': 'H',\n body: '#EM',\n eye: 'E',\n mouth: 'M',\n 'leg-left': 'l',\n 'leg-right': 'L',\n};\n\nconst UPPER_PARTS: TxMascotBodyPart[] = ['stem', 'antenna', 'arm-left', 'arm-right', 'body', 'eye', 'mouth'];\nconst LEG_PARTS: TxMascotBodyPart[] = ['leg-left', 'leg-right'];\n\nexport const TX_MASCOT_TRICK_SLOT_MS = 3000;\nexport const TX_MASCOT_TRICK_EVERY_SLOTS = 3;\n\nexport function txMascotLayers(parts: TxMascotBodyPart[], sprite: readonly string[] = TX_MASCOT_SPRITE): TxMascotLayer[] {\n return parts.map((part) => ({\n part,\n pixels: sprite.flatMap((row, y) => [...row].flatMap((char, x) => (PART_CHARS[part].includes(char) ? [{ x, y }] : []))),\n }));\n}\n\nexport const TX_MASCOT_UPPER_LAYERS = txMascotLayers(UPPER_PARTS);\nexport const TX_MASCOT_LEG_LAYERS = txMascotLayers(LEG_PARTS);\n","import { ChangeDetectionStrategy, Component, DestroyRef, afterNextRender, booleanAttribute, computed, inject, input, signal } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraMascotTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TX_MASCOT_LEG_LAYERS, TX_MASCOT_SPRITE, TX_MASCOT_TRICKS, TX_MASCOT_TRICK_EVERY_SLOTS, TX_MASCOT_TRICK_SLOT_MS, TX_MASCOT_UPPER_LAYERS } from './mascot.data';\nimport { TxMascotPart, TxMascotState } from './mascot.types';\n\n@Component({\n selector: 'tx-mascot',\n templateUrl: './mascot.component.html',\n styleUrl: './mascot.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-mascot',\n role: 'img',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-state]': 'displayState()',\n '[attr.aria-label]': 'label() || null',\n '[attr.aria-hidden]': 'label() ? null : \"true\"',\n },\n})\nexport class TxMascot {\n readonly state = input<TxMascotState>('idle');\n readonly label = input<string>('');\n readonly playful = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly size = input<number | string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraMascotTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxMascotPart, TxMascot> | 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('mascot', this, this.pt, this.ptOptions);\n readonly viewBox = `0 0 ${TX_MASCOT_SPRITE[0].length} ${TX_MASCOT_SPRITE.length}`;\n readonly upperLayers = TX_MASCOT_UPPER_LAYERS;\n readonly legLayers = TX_MASCOT_LEG_LAYERS;\n\n private readonly slot = signal(1);\n private readonly trickOffset = Math.floor(Math.random() * TX_MASCOT_TRICKS.length);\n\n readonly displayState = computed<TxMascotState>(() => {\n const state = this.state();\n const slot = this.slot();\n if (state !== 'idle' || !this.playful() || slot % TX_MASCOT_TRICK_EVERY_SLOTS !== 0) {\n return state;\n }\n return TX_MASCOT_TRICKS[(Math.floor(slot / TX_MASCOT_TRICK_EVERY_SLOTS) + this.trickOffset) % TX_MASCOT_TRICKS.length];\n });\n readonly hostStyle = computed(() => {\n const size = this.size();\n return {\n ...toStyleObject(this.dt(), '--tx-mascot'),\n ...(size !== undefined ? { '--tx-mascot-size': typeof size === 'number' ? `${size}px` : size } : {}),\n ...this.passThrough().root?.style,\n };\n });\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const timer = setInterval(() => this.slot.update((slot) => slot + 1), TX_MASCOT_TRICK_SLOT_MS);\n destroyRef.onDestroy(() => clearInterval(timer));\n });\n }\n}\n","<svg class=\"tx-mascot__svg\" shape-rendering=\"crispEdges\" aria-hidden=\"true\" [attr.viewBox]=\"viewBox\" [class]=\"passThrough().svg?.class\" [style]=\"passThrough().svg?.style\">\n <g class=\"tx-mascot__figure\">\n @for (layer of legLayers; track layer.part) {\n <g [attr.class]=\"'tx-mascot__part tx-mascot__part--' + layer.part\">\n @for (pixel of layer.pixels; track $index) {\n <rect width=\"1\" height=\"1\" [attr.x]=\"pixel.x\" [attr.y]=\"pixel.y\" />\n }\n </g>\n }\n <g class=\"tx-mascot__upper\">\n @for (layer of upperLayers; track layer.part) {\n <g [attr.class]=\"'tx-mascot__part tx-mascot__part--' + layer.part\">\n @for (pixel of layer.pixels; track $index) {\n <rect width=\"1\" height=\"1\" [attr.x]=\"pixel.x\" [attr.y]=\"pixel.y\" />\n }\n </g>\n }\n </g>\n </g>\n</svg>\n"],"mappings":"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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, afterNextRender, booleanAttribute, computed, inject, input, signal, viewChild } from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, afterNextRender, booleanAttribute, computed, contentChild, inject, input, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
3
4
|
import { Router, RouterLink } from "@angular/router";
|
|
4
5
|
import { uniqueId } from "@tectra-ng/core/a11y";
|
|
5
6
|
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
@@ -8,6 +9,34 @@ import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
|
8
9
|
import { TxIcon } from "@tectra-ng/icons";
|
|
9
10
|
import { toStyleObject } from "@tectra-ng/themes";
|
|
10
11
|
import { TxTopbarPreferences } from "@tectra-ng/blocks/topbar-preferences";
|
|
12
|
+
var TxPublicHeaderBrand = class TxPublicHeaderBrand {
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
14
|
+
minVersion: "12.0.0",
|
|
15
|
+
version: "22.2.3",
|
|
16
|
+
ngImport: i0,
|
|
17
|
+
type: TxPublicHeaderBrand,
|
|
18
|
+
deps: [],
|
|
19
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
20
|
+
});
|
|
21
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
22
|
+
minVersion: "14.0.0",
|
|
23
|
+
version: "22.2.3",
|
|
24
|
+
type: TxPublicHeaderBrand,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "[txPublicHeaderBrand]",
|
|
27
|
+
ngImport: i0
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "22.2.3",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: TxPublicHeaderBrand,
|
|
35
|
+
decorators: [{
|
|
36
|
+
type: Directive,
|
|
37
|
+
args: [{ selector: "[txPublicHeaderBrand]" }]
|
|
38
|
+
}]
|
|
39
|
+
});
|
|
11
40
|
const COMPACT_WIDTH = 768;
|
|
12
41
|
const CLOSE_FALLBACK_MS = 600;
|
|
13
42
|
var TxPublicHeader = class TxPublicHeader {
|
|
@@ -15,6 +44,7 @@ var TxPublicHeader = class TxPublicHeader {
|
|
|
15
44
|
host = inject(ElementRef);
|
|
16
45
|
toggleButton = viewChild("menuButton", ...ngDevMode ? [{ debugName: "toggleButton" }] : /* istanbul ignore next */ []);
|
|
17
46
|
router = inject(Router, { optional: true });
|
|
47
|
+
brandSlot = contentChild(TxPublicHeaderBrand, ...ngDevMode ? [{ debugName: "brandSlot" }] : /* istanbul ignore next */ []);
|
|
18
48
|
brand = input.required(...ngDevMode ? [{ debugName: "brand" }] : /* istanbul ignore next */ []);
|
|
19
49
|
logo = input(void 0, ...ngDevMode ? [{ debugName: "logo" }] : /* istanbul ignore next */ []);
|
|
20
50
|
homeLink = input("/", ...ngDevMode ? [{ debugName: "homeLink" }] : /* istanbul ignore next */ []);
|
|
@@ -202,6 +232,13 @@ var TxPublicHeader = class TxPublicHeader {
|
|
|
202
232
|
},
|
|
203
233
|
classAttribute: "tx-public-header"
|
|
204
234
|
},
|
|
235
|
+
queries: [{
|
|
236
|
+
propertyName: "brandSlot",
|
|
237
|
+
first: true,
|
|
238
|
+
predicate: TxPublicHeaderBrand,
|
|
239
|
+
descendants: true,
|
|
240
|
+
isSignal: true
|
|
241
|
+
}],
|
|
205
242
|
viewQueries: [{
|
|
206
243
|
propertyName: "toggleButton",
|
|
207
244
|
first: true,
|
|
@@ -210,9 +247,19 @@ var TxPublicHeader = class TxPublicHeader {
|
|
|
210
247
|
isSignal: true
|
|
211
248
|
}],
|
|
212
249
|
ngImport: i0,
|
|
213
|
-
template: "<
|
|
214
|
-
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__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)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a:hover{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"],
|
|
250
|
+
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>{{ 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",
|
|
251
|
+
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__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"],
|
|
215
252
|
dependencies: [
|
|
253
|
+
{
|
|
254
|
+
kind: "directive",
|
|
255
|
+
type: NgTemplateOutlet,
|
|
256
|
+
selector: "[ngTemplateOutlet]",
|
|
257
|
+
inputs: [
|
|
258
|
+
"ngTemplateOutletContext",
|
|
259
|
+
"ngTemplateOutlet",
|
|
260
|
+
"ngTemplateOutletInjector"
|
|
261
|
+
]
|
|
262
|
+
},
|
|
216
263
|
{
|
|
217
264
|
kind: "directive",
|
|
218
265
|
type: RouterLink,
|
|
@@ -268,6 +315,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
268
315
|
args: [{
|
|
269
316
|
selector: "tx-public-header",
|
|
270
317
|
imports: [
|
|
318
|
+
NgTemplateOutlet,
|
|
271
319
|
RouterLink,
|
|
272
320
|
TxIcon,
|
|
273
321
|
TxTopbarPreferences
|
|
@@ -283,8 +331,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
283
331
|
"[class.tx-public-header--closing]": "closing()",
|
|
284
332
|
"(document:keydown.escape)": "onEscape()"
|
|
285
333
|
},
|
|
286
|
-
template: "<
|
|
287
|
-
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__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)}:host([data-styled]) .tx-public-header__nav ::ng-deep [txPublicHeaderNav]>a:hover{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"]
|
|
334
|
+
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>{{ 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",
|
|
335
|
+
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__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"]
|
|
288
336
|
}]
|
|
289
337
|
}],
|
|
290
338
|
ctorParameters: () => [],
|
|
@@ -293,6 +341,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
293
341
|
type: i0.ViewChild,
|
|
294
342
|
args: ["menuButton", { isSignal: true }]
|
|
295
343
|
}],
|
|
344
|
+
brandSlot: [{
|
|
345
|
+
type: i0.ContentChild,
|
|
346
|
+
args: [i0.forwardRef(() => TxPublicHeaderBrand), { isSignal: true }]
|
|
347
|
+
}],
|
|
296
348
|
brand: [{
|
|
297
349
|
type: i0.Input,
|
|
298
350
|
args: [{
|
|
@@ -367,6 +419,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
367
419
|
}]
|
|
368
420
|
}
|
|
369
421
|
});
|
|
370
|
-
export { TxPublicHeader };
|
|
422
|
+
export { TxPublicHeader, TxPublicHeaderBrand };
|
|
371
423
|
|
|
372
424
|
//# sourceMappingURL=tectra-ng-blocks-public-header.mjs.map
|