@tectra-ng/blocks 0.1.7 → 0.1.8
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-public-header.mjs +58 -6
- package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -1
- package/hover-effect/README.md +31 -0
- package/package.json +14 -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-public-header.d.ts +8 -2
- package/types/tectra-ng-blocks-public-header.d.ts.map +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Confetti
|
|
2
|
+
|
|
3
|
+
A one-time burst of confetti from the middle of its box — for a finished onboarding, a confirmed e-mail, a changed password. It covers its positioned parent and takes no clicks.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<div class="done">
|
|
7
|
+
@if (saved()) {
|
|
8
|
+
<tx-confetti [delay]="380" />
|
|
9
|
+
}
|
|
10
|
+
</div>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
.done {
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The burst plays once when it appears; `play()` plays it again. Ten pieces fly out in the primary, muted and success colours; give your own with `pieces`. It is decorative (`aria-hidden`); with reduced motion the pieces stand still at their places.
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
| Name | Description |
|
|
23
|
+
|---|---|
|
|
24
|
+
| pieces | Pieces (`TxConfettiPiece[]`: `x`, `y` — where it lands from the middle in px, `rotate` in degrees, `tone` `accent` / `neutral` / `success`); ten by default |
|
|
25
|
+
| delay | Wait before the burst in ms, e.g. until a check mark is drawn (default 0) |
|
|
26
|
+
| dt | Design tokens of this instance (`confetti`) |
|
|
27
|
+
| pt | Classes and styles of the parts: `root`, `piece` |
|
|
28
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
29
|
+
| unstyled | Removes the tectra styles |
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
| Name | Description |
|
|
33
|
+
|---|---|
|
|
34
|
+
| play() | Plays the burst again |
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input, numberAttribute, 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_CONFETTI_PIECES = [
|
|
7
|
+
{
|
|
8
|
+
x: -150,
|
|
9
|
+
y: -90,
|
|
10
|
+
rotate: 25,
|
|
11
|
+
tone: "accent"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
x: 140,
|
|
15
|
+
y: -110,
|
|
16
|
+
rotate: -35,
|
|
17
|
+
tone: "neutral"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
x: -120,
|
|
21
|
+
y: 120,
|
|
22
|
+
rotate: 60,
|
|
23
|
+
tone: "neutral"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
x: 160,
|
|
27
|
+
y: 80,
|
|
28
|
+
rotate: -15,
|
|
29
|
+
tone: "accent"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
x: -40,
|
|
33
|
+
y: -160,
|
|
34
|
+
rotate: 45,
|
|
35
|
+
tone: "success"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
x: 60,
|
|
39
|
+
y: 160,
|
|
40
|
+
rotate: -50,
|
|
41
|
+
tone: "success"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
x: -180,
|
|
45
|
+
y: 10,
|
|
46
|
+
rotate: 10,
|
|
47
|
+
tone: "accent"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
x: 190,
|
|
51
|
+
y: -20,
|
|
52
|
+
rotate: 80,
|
|
53
|
+
tone: "neutral"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
x: 90,
|
|
57
|
+
y: -170,
|
|
58
|
+
rotate: -70,
|
|
59
|
+
tone: "accent"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
x: -90,
|
|
63
|
+
y: 175,
|
|
64
|
+
rotate: 35,
|
|
65
|
+
tone: "success"
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
var TxConfetti = class TxConfetti {
|
|
69
|
+
pieces = input(TX_CONFETTI_PIECES, ...ngDevMode ? [{ debugName: "pieces" }] : /* istanbul ignore next */ []);
|
|
70
|
+
delay = input(0, {
|
|
71
|
+
...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
|
|
72
|
+
transform: numberAttribute
|
|
73
|
+
});
|
|
74
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
75
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
76
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
77
|
+
unstyled = input(void 0, {
|
|
78
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
79
|
+
transform: optionalBoolean
|
|
80
|
+
});
|
|
81
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
82
|
+
passThrough = injectPassThrough("confetti", this, this.pt, this.ptOptions);
|
|
83
|
+
hostStyle = computed(() => ({
|
|
84
|
+
...toStyleObject(this.dt(), "--tx-confetti"),
|
|
85
|
+
...this.passThrough().root?.style
|
|
86
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
87
|
+
run = signal(0, ...ngDevMode ? [{ debugName: "run" }] : /* istanbul ignore next */ []);
|
|
88
|
+
runs = computed(() => [this.run()], ...ngDevMode ? [{ debugName: "runs" }] : /* istanbul ignore next */ []);
|
|
89
|
+
play() {
|
|
90
|
+
this.run.update((run) => run + 1);
|
|
91
|
+
}
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
93
|
+
minVersion: "12.0.0",
|
|
94
|
+
version: "22.2.3",
|
|
95
|
+
ngImport: i0,
|
|
96
|
+
type: TxConfetti,
|
|
97
|
+
deps: [],
|
|
98
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
99
|
+
});
|
|
100
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
101
|
+
minVersion: "17.0.0",
|
|
102
|
+
version: "22.2.3",
|
|
103
|
+
type: TxConfetti,
|
|
104
|
+
isStandalone: true,
|
|
105
|
+
selector: "tx-confetti",
|
|
106
|
+
inputs: {
|
|
107
|
+
pieces: {
|
|
108
|
+
classPropertyName: "pieces",
|
|
109
|
+
publicName: "pieces",
|
|
110
|
+
isSignal: true,
|
|
111
|
+
isRequired: false,
|
|
112
|
+
transformFunction: null
|
|
113
|
+
},
|
|
114
|
+
delay: {
|
|
115
|
+
classPropertyName: "delay",
|
|
116
|
+
publicName: "delay",
|
|
117
|
+
isSignal: true,
|
|
118
|
+
isRequired: false,
|
|
119
|
+
transformFunction: null
|
|
120
|
+
},
|
|
121
|
+
dt: {
|
|
122
|
+
classPropertyName: "dt",
|
|
123
|
+
publicName: "dt",
|
|
124
|
+
isSignal: true,
|
|
125
|
+
isRequired: false,
|
|
126
|
+
transformFunction: null
|
|
127
|
+
},
|
|
128
|
+
pt: {
|
|
129
|
+
classPropertyName: "pt",
|
|
130
|
+
publicName: "pt",
|
|
131
|
+
isSignal: true,
|
|
132
|
+
isRequired: false,
|
|
133
|
+
transformFunction: null
|
|
134
|
+
},
|
|
135
|
+
ptOptions: {
|
|
136
|
+
classPropertyName: "ptOptions",
|
|
137
|
+
publicName: "ptOptions",
|
|
138
|
+
isSignal: true,
|
|
139
|
+
isRequired: false,
|
|
140
|
+
transformFunction: null
|
|
141
|
+
},
|
|
142
|
+
unstyled: {
|
|
143
|
+
classPropertyName: "unstyled",
|
|
144
|
+
publicName: "unstyled",
|
|
145
|
+
isSignal: true,
|
|
146
|
+
isRequired: false,
|
|
147
|
+
transformFunction: null
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
host: {
|
|
151
|
+
attributes: { "aria-hidden": "true" },
|
|
152
|
+
properties: {
|
|
153
|
+
"class": "passThrough().root?.class",
|
|
154
|
+
"style": "hostStyle()",
|
|
155
|
+
"style.--tx-confetti-delay.ms": "delay()",
|
|
156
|
+
"attr.data-styled": "!isUnstyled() || null"
|
|
157
|
+
},
|
|
158
|
+
classAttribute: "tx-confetti"
|
|
159
|
+
},
|
|
160
|
+
ngImport: i0,
|
|
161
|
+
template: `
|
|
162
|
+
@for (run of runs(); track run) {
|
|
163
|
+
@for (piece of pieces(); track $index; let index = $index) {
|
|
164
|
+
<span
|
|
165
|
+
class="tx-confetti__piece"
|
|
166
|
+
[attr.data-tone]="piece.tone"
|
|
167
|
+
[style.--tx-confetti-x.px]="piece.x"
|
|
168
|
+
[style.--tx-confetti-y.px]="piece.y"
|
|
169
|
+
[style.--tx-confetti-r.deg]="piece.rotate"
|
|
170
|
+
[style.--tx-confetti-i]="index"
|
|
171
|
+
[class]="passThrough().piece?.class"
|
|
172
|
+
[style]="passThrough().piece?.style"
|
|
173
|
+
></span>
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
`,
|
|
177
|
+
isInline: true,
|
|
178
|
+
styles: [":host{position:absolute;inset:0;overflow:visible;pointer-events:none}.tx-confetti__piece{position:absolute;top:50%;left:50%}:host([data-styled]) .tx-confetti__piece{width:var(--tx-confetti-piece-size);height:var(--tx-confetti-piece-size);margin:calc(var(--tx-confetti-piece-size) / -2) 0 0 calc(var(--tx-confetti-piece-size) / -2);border-radius:var(--tx-confetti-piece-border-radius);background:var(--tx-confetti-colors-accent);animation:tx-confetti-burst var(--tx-confetti-motion-duration) var(--tx-confetti-motion-easing) both;animation-delay:calc(var(--tx-confetti-i) * var(--tx-confetti-motion-stagger) + var(--tx-confetti-delay, 0ms))}:host([data-styled]) .tx-confetti__piece[data-tone=neutral]{width:var(--tx-confetti-piece-neutral-width);height:var(--tx-confetti-piece-neutral-height);margin:calc(var(--tx-confetti-piece-neutral-height) / -2) 0 0 calc(var(--tx-confetti-piece-neutral-width) / -2);background:var(--tx-confetti-colors-neutral)}:host([data-styled]) .tx-confetti__piece[data-tone=success]{border-radius:50%;background:var(--tx-confetti-colors-success)}@keyframes tx-confetti-burst{0%{opacity:0;transform:translate(0) rotate(0) scale(.4)}30%{opacity:1}to{opacity:1;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r)) scale(1)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-confetti__piece{animation:none;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r))}}\n"],
|
|
179
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
183
|
+
minVersion: "12.0.0",
|
|
184
|
+
version: "22.2.3",
|
|
185
|
+
ngImport: i0,
|
|
186
|
+
type: TxConfetti,
|
|
187
|
+
decorators: [{
|
|
188
|
+
type: Component,
|
|
189
|
+
args: [{
|
|
190
|
+
selector: "tx-confetti",
|
|
191
|
+
template: `
|
|
192
|
+
@for (run of runs(); track run) {
|
|
193
|
+
@for (piece of pieces(); track $index; let index = $index) {
|
|
194
|
+
<span
|
|
195
|
+
class="tx-confetti__piece"
|
|
196
|
+
[attr.data-tone]="piece.tone"
|
|
197
|
+
[style.--tx-confetti-x.px]="piece.x"
|
|
198
|
+
[style.--tx-confetti-y.px]="piece.y"
|
|
199
|
+
[style.--tx-confetti-r.deg]="piece.rotate"
|
|
200
|
+
[style.--tx-confetti-i]="index"
|
|
201
|
+
[class]="passThrough().piece?.class"
|
|
202
|
+
[style]="passThrough().piece?.style"
|
|
203
|
+
></span>
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
`,
|
|
207
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
208
|
+
host: {
|
|
209
|
+
class: "tx-confetti",
|
|
210
|
+
"aria-hidden": "true",
|
|
211
|
+
"[class]": "passThrough().root?.class",
|
|
212
|
+
"[style]": "hostStyle()",
|
|
213
|
+
"[style.--tx-confetti-delay.ms]": "delay()",
|
|
214
|
+
"[attr.data-styled]": "!isUnstyled() || null"
|
|
215
|
+
},
|
|
216
|
+
styles: [":host{position:absolute;inset:0;overflow:visible;pointer-events:none}.tx-confetti__piece{position:absolute;top:50%;left:50%}:host([data-styled]) .tx-confetti__piece{width:var(--tx-confetti-piece-size);height:var(--tx-confetti-piece-size);margin:calc(var(--tx-confetti-piece-size) / -2) 0 0 calc(var(--tx-confetti-piece-size) / -2);border-radius:var(--tx-confetti-piece-border-radius);background:var(--tx-confetti-colors-accent);animation:tx-confetti-burst var(--tx-confetti-motion-duration) var(--tx-confetti-motion-easing) both;animation-delay:calc(var(--tx-confetti-i) * var(--tx-confetti-motion-stagger) + var(--tx-confetti-delay, 0ms))}:host([data-styled]) .tx-confetti__piece[data-tone=neutral]{width:var(--tx-confetti-piece-neutral-width);height:var(--tx-confetti-piece-neutral-height);margin:calc(var(--tx-confetti-piece-neutral-height) / -2) 0 0 calc(var(--tx-confetti-piece-neutral-width) / -2);background:var(--tx-confetti-colors-neutral)}:host([data-styled]) .tx-confetti__piece[data-tone=success]{border-radius:50%;background:var(--tx-confetti-colors-success)}@keyframes tx-confetti-burst{0%{opacity:0;transform:translate(0) rotate(0) scale(.4)}30%{opacity:1}to{opacity:1;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r)) scale(1)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-confetti__piece{animation:none;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r))}}\n"]
|
|
217
|
+
}]
|
|
218
|
+
}],
|
|
219
|
+
propDecorators: {
|
|
220
|
+
pieces: [{
|
|
221
|
+
type: i0.Input,
|
|
222
|
+
args: [{
|
|
223
|
+
isSignal: true,
|
|
224
|
+
alias: "pieces",
|
|
225
|
+
required: false
|
|
226
|
+
}]
|
|
227
|
+
}],
|
|
228
|
+
delay: [{
|
|
229
|
+
type: i0.Input,
|
|
230
|
+
args: [{
|
|
231
|
+
isSignal: true,
|
|
232
|
+
alias: "delay",
|
|
233
|
+
required: false
|
|
234
|
+
}]
|
|
235
|
+
}],
|
|
236
|
+
dt: [{
|
|
237
|
+
type: i0.Input,
|
|
238
|
+
args: [{
|
|
239
|
+
isSignal: true,
|
|
240
|
+
alias: "dt",
|
|
241
|
+
required: false
|
|
242
|
+
}]
|
|
243
|
+
}],
|
|
244
|
+
pt: [{
|
|
245
|
+
type: i0.Input,
|
|
246
|
+
args: [{
|
|
247
|
+
isSignal: true,
|
|
248
|
+
alias: "pt",
|
|
249
|
+
required: false
|
|
250
|
+
}]
|
|
251
|
+
}],
|
|
252
|
+
ptOptions: [{
|
|
253
|
+
type: i0.Input,
|
|
254
|
+
args: [{
|
|
255
|
+
isSignal: true,
|
|
256
|
+
alias: "ptOptions",
|
|
257
|
+
required: false
|
|
258
|
+
}]
|
|
259
|
+
}],
|
|
260
|
+
unstyled: [{
|
|
261
|
+
type: i0.Input,
|
|
262
|
+
args: [{
|
|
263
|
+
isSignal: true,
|
|
264
|
+
alias: "unstyled",
|
|
265
|
+
required: false
|
|
266
|
+
}]
|
|
267
|
+
}]
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
export { TX_CONFETTI_PIECES, TxConfetti };
|
|
271
|
+
|
|
272
|
+
//# sourceMappingURL=tectra-ng-blocks-confetti.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-confetti.mjs","names":[],"sources":["../../../../packages/blocks/confetti/src/confetti.types.ts","../../../../packages/blocks/confetti/src/confetti.component.ts"],"sourcesContent":["export type TxConfettiTone = 'accent' | 'neutral' | 'success';\n\nexport interface TxConfettiPiece {\n x: number;\n y: number;\n rotate: number;\n tone: TxConfettiTone;\n}\n\nexport type TxConfettiPart = 'root' | 'piece';\n\nexport const TX_CONFETTI_PIECES: readonly TxConfettiPiece[] = [\n { x: -150, y: -90, rotate: 25, tone: 'accent' },\n { x: 140, y: -110, rotate: -35, tone: 'neutral' },\n { x: -120, y: 120, rotate: 60, tone: 'neutral' },\n { x: 160, y: 80, rotate: -15, tone: 'accent' },\n { x: -40, y: -160, rotate: 45, tone: 'success' },\n { x: 60, y: 160, rotate: -50, tone: 'success' },\n { x: -180, y: 10, rotate: 10, tone: 'accent' },\n { x: 190, y: -20, rotate: 80, tone: 'neutral' },\n { x: 90, y: -170, rotate: -70, tone: 'accent' },\n { x: -90, y: 175, rotate: 35, tone: 'success' },\n];\n","import { ChangeDetectionStrategy, Component, computed, input, numberAttribute, signal } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraConfettiTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TX_CONFETTI_PIECES, TxConfettiPart, TxConfettiPiece } from './confetti.types';\n\n@Component({\n selector: 'tx-confetti',\n template: `\n @for (run of runs(); track run) {\n @for (piece of pieces(); track $index; let index = $index) {\n <span\n class=\"tx-confetti__piece\"\n [attr.data-tone]=\"piece.tone\"\n [style.--tx-confetti-x.px]=\"piece.x\"\n [style.--tx-confetti-y.px]=\"piece.y\"\n [style.--tx-confetti-r.deg]=\"piece.rotate\"\n [style.--tx-confetti-i]=\"index\"\n [class]=\"passThrough().piece?.class\"\n [style]=\"passThrough().piece?.style\"\n ></span>\n }\n }\n `,\n styleUrl: './confetti.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-confetti',\n 'aria-hidden': 'true',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[style.--tx-confetti-delay.ms]': 'delay()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxConfetti {\n readonly pieces = input<readonly TxConfettiPiece[]>(TX_CONFETTI_PIECES);\n readonly delay = input<number, unknown>(0, { transform: numberAttribute });\n readonly dt = input<TectraDeepPartial<TectraConfettiTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxConfettiPart, TxConfetti> | 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('confetti', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-confetti'), ...this.passThrough().root?.style }));\n\n private readonly run = signal(0);\n protected readonly runs = computed(() => [this.run()]);\n\n play(): void {\n this.run.update((run) => run + 1);\n }\n}\n"],"mappings":";;;;;AAWA,MAAa,qBAAiD;CAC5D;EAAE,GAAG;EAAM,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAQ;CAC7C;EAAE,GAAG;EAAK,GAAG;EAAM,QAAQ;EAAK,MAAM;CAAS;CAC/C;EAAE,GAAG;EAAM,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;CAC9C;EAAE,GAAG;EAAK,GAAG;EAAI,QAAQ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AA,GAAA,wBAAA;CAAA,CAAA;;AAYU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EA7BtB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,UACb;;;;;;;;;;;;;;;;GAeT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,eAAe;IACf,WAAW;IACX,WAAW;IACX,kCAAkC;IAClC,sBAAsB;GACvB;GAAA,QAAA,CAAA,q8CAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, numberAttribute, signal, viewChild } 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
|
+
var TxHoverEffect = class TxHoverEffect {
|
|
7
|
+
document = inject(DOCUMENT);
|
|
8
|
+
layer = viewChild.required("layer", ...ngDevMode ? [{ debugName: "layer" }] : /* istanbul ignore next */ []);
|
|
9
|
+
frame = 0;
|
|
10
|
+
constrain = input(100, {
|
|
11
|
+
...ngDevMode ? { debugName: "constrain" } : /* istanbul ignore next */ {},
|
|
12
|
+
transform: numberAttribute
|
|
13
|
+
});
|
|
14
|
+
disabled = input(false, {
|
|
15
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
16
|
+
transform: booleanAttribute
|
|
17
|
+
});
|
|
18
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
19
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
20
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
21
|
+
unstyled = input(void 0, {
|
|
22
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
23
|
+
transform: optionalBoolean
|
|
24
|
+
});
|
|
25
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
26
|
+
passThrough = injectPassThrough("hoverEffect", this, this.pt, this.ptOptions);
|
|
27
|
+
hostStyle = computed(() => ({
|
|
28
|
+
...toStyleObject(this.dt(), "--tx-hover-effect"),
|
|
29
|
+
...this.passThrough().root?.style
|
|
30
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
31
|
+
tilt = signal({
|
|
32
|
+
x: 0,
|
|
33
|
+
y: 0
|
|
34
|
+
}, ...ngDevMode ? [{ debugName: "tilt" }] : /* istanbul ignore next */ []);
|
|
35
|
+
active = signal(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
36
|
+
constructor() {
|
|
37
|
+
inject(DestroyRef).onDestroy(() => this.document.defaultView?.cancelAnimationFrame?.(this.frame));
|
|
38
|
+
}
|
|
39
|
+
onPointerMove(event) {
|
|
40
|
+
const view = this.document.defaultView;
|
|
41
|
+
if (this.disabled() || event.pointerType !== "mouse" || !view || view.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
42
|
+
const { clientX, clientY } = event;
|
|
43
|
+
view.cancelAnimationFrame(this.frame);
|
|
44
|
+
this.frame = view.requestAnimationFrame(() => {
|
|
45
|
+
const box = this.layer().nativeElement.getBoundingClientRect();
|
|
46
|
+
const constrain = this.constrain() || 1;
|
|
47
|
+
this.active.set(true);
|
|
48
|
+
this.tilt.set({
|
|
49
|
+
x: -(clientY - box.y - box.height / 2) / constrain,
|
|
50
|
+
y: (clientX - box.x - box.width / 2) / constrain
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
reset() {
|
|
55
|
+
this.document.defaultView?.cancelAnimationFrame?.(this.frame);
|
|
56
|
+
this.active.set(false);
|
|
57
|
+
this.tilt.set({
|
|
58
|
+
x: 0,
|
|
59
|
+
y: 0
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
63
|
+
minVersion: "12.0.0",
|
|
64
|
+
version: "22.2.3",
|
|
65
|
+
ngImport: i0,
|
|
66
|
+
type: TxHoverEffect,
|
|
67
|
+
deps: [],
|
|
68
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
69
|
+
});
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
71
|
+
minVersion: "17.2.0",
|
|
72
|
+
version: "22.2.3",
|
|
73
|
+
type: TxHoverEffect,
|
|
74
|
+
isStandalone: true,
|
|
75
|
+
selector: "tx-hover-effect",
|
|
76
|
+
inputs: {
|
|
77
|
+
constrain: {
|
|
78
|
+
classPropertyName: "constrain",
|
|
79
|
+
publicName: "constrain",
|
|
80
|
+
isSignal: true,
|
|
81
|
+
isRequired: false,
|
|
82
|
+
transformFunction: null
|
|
83
|
+
},
|
|
84
|
+
disabled: {
|
|
85
|
+
classPropertyName: "disabled",
|
|
86
|
+
publicName: "disabled",
|
|
87
|
+
isSignal: true,
|
|
88
|
+
isRequired: false,
|
|
89
|
+
transformFunction: null
|
|
90
|
+
},
|
|
91
|
+
dt: {
|
|
92
|
+
classPropertyName: "dt",
|
|
93
|
+
publicName: "dt",
|
|
94
|
+
isSignal: true,
|
|
95
|
+
isRequired: false,
|
|
96
|
+
transformFunction: null
|
|
97
|
+
},
|
|
98
|
+
pt: {
|
|
99
|
+
classPropertyName: "pt",
|
|
100
|
+
publicName: "pt",
|
|
101
|
+
isSignal: true,
|
|
102
|
+
isRequired: false,
|
|
103
|
+
transformFunction: null
|
|
104
|
+
},
|
|
105
|
+
ptOptions: {
|
|
106
|
+
classPropertyName: "ptOptions",
|
|
107
|
+
publicName: "ptOptions",
|
|
108
|
+
isSignal: true,
|
|
109
|
+
isRequired: false,
|
|
110
|
+
transformFunction: null
|
|
111
|
+
},
|
|
112
|
+
unstyled: {
|
|
113
|
+
classPropertyName: "unstyled",
|
|
114
|
+
publicName: "unstyled",
|
|
115
|
+
isSignal: true,
|
|
116
|
+
isRequired: false,
|
|
117
|
+
transformFunction: null
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
host: {
|
|
121
|
+
listeners: {
|
|
122
|
+
"pointermove": "onPointerMove($event)",
|
|
123
|
+
"pointerleave": "reset()"
|
|
124
|
+
},
|
|
125
|
+
properties: {
|
|
126
|
+
"class": "passThrough().root?.class",
|
|
127
|
+
"style": "hostStyle()",
|
|
128
|
+
"attr.data-styled": "!isUnstyled() || null"
|
|
129
|
+
},
|
|
130
|
+
classAttribute: "tx-hover-effect"
|
|
131
|
+
},
|
|
132
|
+
viewQueries: [{
|
|
133
|
+
propertyName: "layer",
|
|
134
|
+
first: true,
|
|
135
|
+
predicate: ["layer"],
|
|
136
|
+
descendants: true,
|
|
137
|
+
isSignal: true
|
|
138
|
+
}],
|
|
139
|
+
ngImport: i0,
|
|
140
|
+
template: `
|
|
141
|
+
<div
|
|
142
|
+
#layer
|
|
143
|
+
class="tx-hover-effect__layer"
|
|
144
|
+
[class.tx-hover-effect__layer--resting]="!active()"
|
|
145
|
+
[style.--tx-hover-effect-x.deg]="tilt().x"
|
|
146
|
+
[style.--tx-hover-effect-y.deg]="tilt().y"
|
|
147
|
+
[class]="passThrough().layer?.class"
|
|
148
|
+
[style]="passThrough().layer?.style"
|
|
149
|
+
>
|
|
150
|
+
<ng-content />
|
|
151
|
+
</div>
|
|
152
|
+
`,
|
|
153
|
+
isInline: true,
|
|
154
|
+
styles: [":host{display:block}.tx-hover-effect__layer{transform:perspective(var(--tx-hover-effect-perspective, 100px)) rotateX(var(--tx-hover-effect-x, 0deg)) rotateY(var(--tx-hover-effect-y, 0deg));will-change:transform}:host([data-styled]) .tx-hover-effect__layer--resting{transition:transform var(--tx-hover-effect-reset-duration) var(--tx-hover-effect-reset-easing)}@media(prefers-reduced-motion:reduce){.tx-hover-effect__layer{transform:none}}\n"],
|
|
155
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
159
|
+
minVersion: "12.0.0",
|
|
160
|
+
version: "22.2.3",
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
type: TxHoverEffect,
|
|
163
|
+
decorators: [{
|
|
164
|
+
type: Component,
|
|
165
|
+
args: [{
|
|
166
|
+
selector: "tx-hover-effect",
|
|
167
|
+
template: `
|
|
168
|
+
<div
|
|
169
|
+
#layer
|
|
170
|
+
class="tx-hover-effect__layer"
|
|
171
|
+
[class.tx-hover-effect__layer--resting]="!active()"
|
|
172
|
+
[style.--tx-hover-effect-x.deg]="tilt().x"
|
|
173
|
+
[style.--tx-hover-effect-y.deg]="tilt().y"
|
|
174
|
+
[class]="passThrough().layer?.class"
|
|
175
|
+
[style]="passThrough().layer?.style"
|
|
176
|
+
>
|
|
177
|
+
<ng-content />
|
|
178
|
+
</div>
|
|
179
|
+
`,
|
|
180
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
181
|
+
host: {
|
|
182
|
+
class: "tx-hover-effect",
|
|
183
|
+
"[class]": "passThrough().root?.class",
|
|
184
|
+
"[style]": "hostStyle()",
|
|
185
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
186
|
+
"(pointermove)": "onPointerMove($event)",
|
|
187
|
+
"(pointerleave)": "reset()"
|
|
188
|
+
},
|
|
189
|
+
styles: [":host{display:block}.tx-hover-effect__layer{transform:perspective(var(--tx-hover-effect-perspective, 100px)) rotateX(var(--tx-hover-effect-x, 0deg)) rotateY(var(--tx-hover-effect-y, 0deg));will-change:transform}:host([data-styled]) .tx-hover-effect__layer--resting{transition:transform var(--tx-hover-effect-reset-duration) var(--tx-hover-effect-reset-easing)}@media(prefers-reduced-motion:reduce){.tx-hover-effect__layer{transform:none}}\n"]
|
|
190
|
+
}]
|
|
191
|
+
}],
|
|
192
|
+
ctorParameters: () => [],
|
|
193
|
+
propDecorators: {
|
|
194
|
+
layer: [{
|
|
195
|
+
type: i0.ViewChild,
|
|
196
|
+
args: ["layer", { isSignal: true }]
|
|
197
|
+
}],
|
|
198
|
+
constrain: [{
|
|
199
|
+
type: i0.Input,
|
|
200
|
+
args: [{
|
|
201
|
+
isSignal: true,
|
|
202
|
+
alias: "constrain",
|
|
203
|
+
required: false
|
|
204
|
+
}]
|
|
205
|
+
}],
|
|
206
|
+
disabled: [{
|
|
207
|
+
type: i0.Input,
|
|
208
|
+
args: [{
|
|
209
|
+
isSignal: true,
|
|
210
|
+
alias: "disabled",
|
|
211
|
+
required: false
|
|
212
|
+
}]
|
|
213
|
+
}],
|
|
214
|
+
dt: [{
|
|
215
|
+
type: i0.Input,
|
|
216
|
+
args: [{
|
|
217
|
+
isSignal: true,
|
|
218
|
+
alias: "dt",
|
|
219
|
+
required: false
|
|
220
|
+
}]
|
|
221
|
+
}],
|
|
222
|
+
pt: [{
|
|
223
|
+
type: i0.Input,
|
|
224
|
+
args: [{
|
|
225
|
+
isSignal: true,
|
|
226
|
+
alias: "pt",
|
|
227
|
+
required: false
|
|
228
|
+
}]
|
|
229
|
+
}],
|
|
230
|
+
ptOptions: [{
|
|
231
|
+
type: i0.Input,
|
|
232
|
+
args: [{
|
|
233
|
+
isSignal: true,
|
|
234
|
+
alias: "ptOptions",
|
|
235
|
+
required: false
|
|
236
|
+
}]
|
|
237
|
+
}],
|
|
238
|
+
unstyled: [{
|
|
239
|
+
type: i0.Input,
|
|
240
|
+
args: [{
|
|
241
|
+
isSignal: true,
|
|
242
|
+
alias: "unstyled",
|
|
243
|
+
required: false
|
|
244
|
+
}]
|
|
245
|
+
}]
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
export { TxHoverEffect };
|
|
249
|
+
|
|
250
|
+
//# sourceMappingURL=tectra-ng-blocks-hover-effect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-hover-effect.mjs","names":[],"sources":["../../../../packages/blocks/hover-effect/src/hover-effect.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, numberAttribute, signal, viewChild } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraHoverEffectTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxHoverEffectPart } from './hover-effect.types';\n\n@Component({\n selector: 'tx-hover-effect',\n template: `\n <div\n #layer\n class=\"tx-hover-effect__layer\"\n [class.tx-hover-effect__layer--resting]=\"!active()\"\n [style.--tx-hover-effect-x.deg]=\"tilt().x\"\n [style.--tx-hover-effect-y.deg]=\"tilt().y\"\n [class]=\"passThrough().layer?.class\"\n [style]=\"passThrough().layer?.style\"\n >\n <ng-content />\n </div>\n `,\n styleUrl: './hover-effect.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-hover-effect',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '(pointermove)': 'onPointerMove($event)',\n '(pointerleave)': 'reset()',\n },\n})\nexport class TxHoverEffect {\n private readonly document = inject(DOCUMENT);\n private readonly layer = viewChild.required<ElementRef<HTMLElement>>('layer');\n private frame = 0;\n\n readonly constrain = input<number, unknown>(100, { transform: numberAttribute });\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraHoverEffectTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxHoverEffectPart, TxHoverEffect> | 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('hoverEffect', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-hover-effect'), ...this.passThrough().root?.style }));\n\n readonly tilt = signal({ x: 0, y: 0 });\n protected readonly active = signal(false);\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.document.defaultView?.cancelAnimationFrame?.(this.frame));\n }\n\n protected onPointerMove(event: PointerEvent): void {\n const view = this.document.defaultView;\n if (this.disabled() || event.pointerType !== 'mouse' || !view || view.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {\n return;\n }\n const { clientX, clientY } = event;\n view.cancelAnimationFrame(this.frame);\n this.frame = view.requestAnimationFrame(() => {\n const box = this.layer().nativeElement.getBoundingClientRect();\n const constrain = this.constrain() || 1;\n this.active.set(true);\n this.tilt.set({\n x: -(clientY - box.y - box.height / 2) / constrain,\n y: (clientX - box.x - box.width / 2) / constrain,\n });\n });\n }\n\n reset(): void {\n this.document.defaultView?.cancelAnimationFrame?.(this.frame);\n this.active.set(false);\n this.tilt.set({ x: 0, y: 0 });\n }\n}\n"],"mappings":";;;;;AAgCA,IAAa,gBAAb,MAAa,cAAa;CACP,WAAW,OAAO,QAAQ;CAC1B,QAAQ,UAAU,SAAkC,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrE,QAAQ;CAEP,YAAY,MAAuB,KAAG;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CACpE,WAAW,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACvE,KAAK,MAA8D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC7E,KAAK,MAAmE,QAAU,GAAA,YAAA,CAAA,E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,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -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
|
|
@@ -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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AA,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;CAAA,CAAA;;AAAnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAD/B,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,wBAAuB,CAAE;;;ACyBhD,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,CAA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AAA;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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Hover effect
|
|
2
|
+
|
|
3
|
+
A 3D tilt that follows the mouse: 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/blocks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
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.8",
|
|
32
|
+
"@tectra-ng/icons": "^0.1.8",
|
|
33
|
+
"@tectra-ng/qr": "^0.1.8",
|
|
34
|
+
"@tectra-ng/themes": "^0.1.8",
|
|
35
|
+
"@tectra-ng/ui": "^0.1.8"
|
|
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,6 +95,10 @@
|
|
|
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"
|
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"}
|
|
@@ -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"}
|