@tectra-ng/ui 0.1.4 → 0.1.6
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/carousel/README.md +53 -0
- package/datepicker/README.md +1 -1
- package/fesm2022/tectra-ng-ui-button.mjs +9 -3
- package/fesm2022/tectra-ng-ui-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-carousel.mjs +939 -0
- package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-galleria.mjs +1140 -0
- package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-icon-field.mjs +24 -8
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-image.mjs +759 -0
- package/fesm2022/tectra-ng-ui-image.mjs.map +1 -0
- package/galleria/README.md +62 -0
- package/image/README.md +54 -0
- package/package.json +55 -8
- package/types/tectra-ng-ui-button.d.ts +4 -2
- package/types/tectra-ng-ui-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-carousel.d.ts +263 -0
- package/types/tectra-ng-ui-carousel.d.ts.map +1 -0
- package/types/tectra-ng-ui-galleria.d.ts +407 -0
- package/types/tectra-ng-ui-galleria.d.ts.map +1 -0
- package/types/tectra-ng-ui-icon-field.d.ts +9 -4
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
- package/types/tectra-ng-ui-image.d.ts +259 -0
- package/types/tectra-ng-ui-image.d.ts.map +1 -0
|
@@ -0,0 +1,1140 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, inject, input, model, numberAttribute, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
|
+
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
6
|
+
import { optionalBoolean, txCanAnimate, txCssTime, txSwapMotion } from "@tectra-ng/core/utils";
|
|
7
|
+
import { TxIcon } from "@tectra-ng/icons";
|
|
8
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
9
|
+
import { openImageLayer } from "@tectra-ng/ui/image";
|
|
10
|
+
var TxGalleriaItemTemplate = class TxGalleriaItemTemplate {
|
|
11
|
+
template = inject(TemplateRef);
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.2.3",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: TxGalleriaItemTemplate,
|
|
17
|
+
deps: [],
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
19
|
+
});
|
|
20
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
21
|
+
minVersion: "14.0.0",
|
|
22
|
+
version: "22.2.3",
|
|
23
|
+
type: TxGalleriaItemTemplate,
|
|
24
|
+
isStandalone: true,
|
|
25
|
+
selector: "ng-template[txGalleriaItem]",
|
|
26
|
+
ngImport: i0
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
30
|
+
minVersion: "12.0.0",
|
|
31
|
+
version: "22.2.3",
|
|
32
|
+
ngImport: i0,
|
|
33
|
+
type: TxGalleriaItemTemplate,
|
|
34
|
+
decorators: [{
|
|
35
|
+
type: Directive,
|
|
36
|
+
args: [{ selector: "ng-template[txGalleriaItem]" }]
|
|
37
|
+
}]
|
|
38
|
+
});
|
|
39
|
+
var TxGalleriaThumbnailTemplate = class TxGalleriaThumbnailTemplate {
|
|
40
|
+
template = inject(TemplateRef);
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
42
|
+
minVersion: "12.0.0",
|
|
43
|
+
version: "22.2.3",
|
|
44
|
+
ngImport: i0,
|
|
45
|
+
type: TxGalleriaThumbnailTemplate,
|
|
46
|
+
deps: [],
|
|
47
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
48
|
+
});
|
|
49
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
50
|
+
minVersion: "14.0.0",
|
|
51
|
+
version: "22.2.3",
|
|
52
|
+
type: TxGalleriaThumbnailTemplate,
|
|
53
|
+
isStandalone: true,
|
|
54
|
+
selector: "ng-template[txGalleriaThumbnail]",
|
|
55
|
+
ngImport: i0
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
59
|
+
minVersion: "12.0.0",
|
|
60
|
+
version: "22.2.3",
|
|
61
|
+
ngImport: i0,
|
|
62
|
+
type: TxGalleriaThumbnailTemplate,
|
|
63
|
+
decorators: [{
|
|
64
|
+
type: Directive,
|
|
65
|
+
args: [{ selector: "ng-template[txGalleriaThumbnail]" }]
|
|
66
|
+
}]
|
|
67
|
+
});
|
|
68
|
+
var TxGalleriaCaptionTemplate = class TxGalleriaCaptionTemplate {
|
|
69
|
+
template = inject(TemplateRef);
|
|
70
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
71
|
+
minVersion: "12.0.0",
|
|
72
|
+
version: "22.2.3",
|
|
73
|
+
ngImport: i0,
|
|
74
|
+
type: TxGalleriaCaptionTemplate,
|
|
75
|
+
deps: [],
|
|
76
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
77
|
+
});
|
|
78
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
79
|
+
minVersion: "14.0.0",
|
|
80
|
+
version: "22.2.3",
|
|
81
|
+
type: TxGalleriaCaptionTemplate,
|
|
82
|
+
isStandalone: true,
|
|
83
|
+
selector: "ng-template[txGalleriaCaption]",
|
|
84
|
+
ngImport: i0
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
88
|
+
minVersion: "12.0.0",
|
|
89
|
+
version: "22.2.3",
|
|
90
|
+
ngImport: i0,
|
|
91
|
+
type: TxGalleriaCaptionTemplate,
|
|
92
|
+
decorators: [{
|
|
93
|
+
type: Directive,
|
|
94
|
+
args: [{ selector: "ng-template[txGalleriaCaption]" }]
|
|
95
|
+
}]
|
|
96
|
+
});
|
|
97
|
+
var TxGalleriaIndicatorTemplate = class TxGalleriaIndicatorTemplate {
|
|
98
|
+
template = inject(TemplateRef);
|
|
99
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
100
|
+
return !!context;
|
|
101
|
+
}
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
103
|
+
minVersion: "12.0.0",
|
|
104
|
+
version: "22.2.3",
|
|
105
|
+
ngImport: i0,
|
|
106
|
+
type: TxGalleriaIndicatorTemplate,
|
|
107
|
+
deps: [],
|
|
108
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
109
|
+
});
|
|
110
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
111
|
+
minVersion: "14.0.0",
|
|
112
|
+
version: "22.2.3",
|
|
113
|
+
type: TxGalleriaIndicatorTemplate,
|
|
114
|
+
isStandalone: true,
|
|
115
|
+
selector: "ng-template[txGalleriaIndicator]",
|
|
116
|
+
ngImport: i0
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
120
|
+
minVersion: "12.0.0",
|
|
121
|
+
version: "22.2.3",
|
|
122
|
+
ngImport: i0,
|
|
123
|
+
type: TxGalleriaIndicatorTemplate,
|
|
124
|
+
decorators: [{
|
|
125
|
+
type: Directive,
|
|
126
|
+
args: [{ selector: "ng-template[txGalleriaIndicator]" }]
|
|
127
|
+
}]
|
|
128
|
+
});
|
|
129
|
+
var TxGalleriaHeader = class TxGalleriaHeader {
|
|
130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
131
|
+
minVersion: "12.0.0",
|
|
132
|
+
version: "22.2.3",
|
|
133
|
+
ngImport: i0,
|
|
134
|
+
type: TxGalleriaHeader,
|
|
135
|
+
deps: [],
|
|
136
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
137
|
+
});
|
|
138
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
139
|
+
minVersion: "14.0.0",
|
|
140
|
+
version: "22.2.3",
|
|
141
|
+
type: TxGalleriaHeader,
|
|
142
|
+
isStandalone: true,
|
|
143
|
+
selector: "[txGalleriaHeader]",
|
|
144
|
+
ngImport: i0
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
148
|
+
minVersion: "12.0.0",
|
|
149
|
+
version: "22.2.3",
|
|
150
|
+
ngImport: i0,
|
|
151
|
+
type: TxGalleriaHeader,
|
|
152
|
+
decorators: [{
|
|
153
|
+
type: Directive,
|
|
154
|
+
args: [{ selector: "[txGalleriaHeader]" }]
|
|
155
|
+
}]
|
|
156
|
+
});
|
|
157
|
+
var TxGalleriaFooter = class TxGalleriaFooter {
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
159
|
+
minVersion: "12.0.0",
|
|
160
|
+
version: "22.2.3",
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
type: TxGalleriaFooter,
|
|
163
|
+
deps: [],
|
|
164
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
165
|
+
});
|
|
166
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
167
|
+
minVersion: "14.0.0",
|
|
168
|
+
version: "22.2.3",
|
|
169
|
+
type: TxGalleriaFooter,
|
|
170
|
+
isStandalone: true,
|
|
171
|
+
selector: "[txGalleriaFooter]",
|
|
172
|
+
ngImport: i0
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
176
|
+
minVersion: "12.0.0",
|
|
177
|
+
version: "22.2.3",
|
|
178
|
+
ngImport: i0,
|
|
179
|
+
type: TxGalleriaFooter,
|
|
180
|
+
decorators: [{
|
|
181
|
+
type: Directive,
|
|
182
|
+
args: [{ selector: "[txGalleriaFooter]" }]
|
|
183
|
+
}]
|
|
184
|
+
});
|
|
185
|
+
const SWIPE_MIN = 40;
|
|
186
|
+
const SWAP_DURATION = 450;
|
|
187
|
+
function percent(value) {
|
|
188
|
+
return `${Math.round(value * 1e4) / 1e4}%`;
|
|
189
|
+
}
|
|
190
|
+
function galleriaImage(item) {
|
|
191
|
+
return typeof item === "object" && item !== null && typeof item.src === "string" ? item : null;
|
|
192
|
+
}
|
|
193
|
+
var TxGalleria = class TxGalleria {
|
|
194
|
+
injector = inject(Injector);
|
|
195
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
196
|
+
document = inject(DOCUMENT);
|
|
197
|
+
layer = null;
|
|
198
|
+
host = inject(ElementRef);
|
|
199
|
+
swipeStart = null;
|
|
200
|
+
value = input([], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
201
|
+
activeIndex = model(0, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
202
|
+
visible = model(false, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
|
|
203
|
+
fullScreen = input(false, {
|
|
204
|
+
...ngDevMode ? { debugName: "fullScreen" } : /* istanbul ignore next */ {},
|
|
205
|
+
transform: booleanAttribute
|
|
206
|
+
});
|
|
207
|
+
numVisible = input(3, {
|
|
208
|
+
...ngDevMode ? { debugName: "numVisible" } : /* istanbul ignore next */ {},
|
|
209
|
+
transform: numberAttribute
|
|
210
|
+
});
|
|
211
|
+
responsiveOptions = input(void 0, ...ngDevMode ? [{ debugName: "responsiveOptions" }] : /* istanbul ignore next */ []);
|
|
212
|
+
showItemNavigators = input(false, {
|
|
213
|
+
...ngDevMode ? { debugName: "showItemNavigators" } : /* istanbul ignore next */ {},
|
|
214
|
+
transform: booleanAttribute
|
|
215
|
+
});
|
|
216
|
+
showItemNavigatorsOnHover = input(false, {
|
|
217
|
+
...ngDevMode ? { debugName: "showItemNavigatorsOnHover" } : /* istanbul ignore next */ {},
|
|
218
|
+
transform: booleanAttribute
|
|
219
|
+
});
|
|
220
|
+
showThumbnailNavigators = input(true, {
|
|
221
|
+
...ngDevMode ? { debugName: "showThumbnailNavigators" } : /* istanbul ignore next */ {},
|
|
222
|
+
transform: booleanAttribute
|
|
223
|
+
});
|
|
224
|
+
showThumbnails = input(true, {
|
|
225
|
+
...ngDevMode ? { debugName: "showThumbnails" } : /* istanbul ignore next */ {},
|
|
226
|
+
transform: booleanAttribute
|
|
227
|
+
});
|
|
228
|
+
thumbnailsPosition = input("bottom", ...ngDevMode ? [{ debugName: "thumbnailsPosition" }] : /* istanbul ignore next */ []);
|
|
229
|
+
verticalThumbnailViewPortHeight = input("300px", ...ngDevMode ? [{ debugName: "verticalThumbnailViewPortHeight" }] : /* istanbul ignore next */ []);
|
|
230
|
+
showIndicators = input(false, {
|
|
231
|
+
...ngDevMode ? { debugName: "showIndicators" } : /* istanbul ignore next */ {},
|
|
232
|
+
transform: booleanAttribute
|
|
233
|
+
});
|
|
234
|
+
showIndicatorsOnItem = input(false, {
|
|
235
|
+
...ngDevMode ? { debugName: "showIndicatorsOnItem" } : /* istanbul ignore next */ {},
|
|
236
|
+
transform: booleanAttribute
|
|
237
|
+
});
|
|
238
|
+
indicatorsPosition = input("bottom", ...ngDevMode ? [{ debugName: "indicatorsPosition" }] : /* istanbul ignore next */ []);
|
|
239
|
+
changeItemOnIndicatorHover = input(false, {
|
|
240
|
+
...ngDevMode ? { debugName: "changeItemOnIndicatorHover" } : /* istanbul ignore next */ {},
|
|
241
|
+
transform: booleanAttribute
|
|
242
|
+
});
|
|
243
|
+
circular = input(false, {
|
|
244
|
+
...ngDevMode ? { debugName: "circular" } : /* istanbul ignore next */ {},
|
|
245
|
+
transform: booleanAttribute
|
|
246
|
+
});
|
|
247
|
+
autoPlay = input(false, {
|
|
248
|
+
...ngDevMode ? { debugName: "autoPlay" } : /* istanbul ignore next */ {},
|
|
249
|
+
transform: booleanAttribute
|
|
250
|
+
});
|
|
251
|
+
transitionInterval = input(4e3, {
|
|
252
|
+
...ngDevMode ? { debugName: "transitionInterval" } : /* istanbul ignore next */ {},
|
|
253
|
+
transform: numberAttribute
|
|
254
|
+
});
|
|
255
|
+
shouldStopAutoplayByClick = input(true, {
|
|
256
|
+
...ngDevMode ? { debugName: "shouldStopAutoplayByClick" } : /* istanbul ignore next */ {},
|
|
257
|
+
transform: booleanAttribute
|
|
258
|
+
});
|
|
259
|
+
swipe = input(true, {
|
|
260
|
+
...ngDevMode ? { debugName: "swipe" } : /* istanbul ignore next */ {},
|
|
261
|
+
transform: booleanAttribute
|
|
262
|
+
});
|
|
263
|
+
effect = input("slide", ...ngDevMode ? [{ debugName: "effect" }] : /* istanbul ignore next */ []);
|
|
264
|
+
prevIcon = input("chevron-left", ...ngDevMode ? [{ debugName: "prevIcon" }] : /* istanbul ignore next */ []);
|
|
265
|
+
nextIcon = input("chevron-right", ...ngDevMode ? [{ debugName: "nextIcon" }] : /* istanbul ignore next */ []);
|
|
266
|
+
closeIcon = input("times", ...ngDevMode ? [{ debugName: "closeIcon" }] : /* istanbul ignore next */ []);
|
|
267
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
268
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
269
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
270
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
271
|
+
unstyled = input(void 0, {
|
|
272
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
273
|
+
transform: optionalBoolean
|
|
274
|
+
});
|
|
275
|
+
translations = injectTranslations();
|
|
276
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
277
|
+
passThrough = injectPassThrough("galleria", this, this.pt, this.ptOptions);
|
|
278
|
+
tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-galleria"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
|
|
279
|
+
frameStyle = computed(() => ({
|
|
280
|
+
...this.tokenStyle(),
|
|
281
|
+
...this.passThrough().root?.style
|
|
282
|
+
}), ...ngDevMode ? [{ debugName: "frameStyle" }] : /* istanbul ignore next */ []);
|
|
283
|
+
maskStyle = computed(() => ({
|
|
284
|
+
...this.tokenStyle(),
|
|
285
|
+
...this.passThrough().mask?.style
|
|
286
|
+
}), ...ngDevMode ? [{ debugName: "maskStyle" }] : /* istanbul ignore next */ []);
|
|
287
|
+
itemTemplate = contentChild(TxGalleriaItemTemplate, ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
288
|
+
thumbnailTemplate = contentChild(TxGalleriaThumbnailTemplate, ...ngDevMode ? [{ debugName: "thumbnailTemplate" }] : /* istanbul ignore next */ []);
|
|
289
|
+
captionTemplate = contentChild(TxGalleriaCaptionTemplate, ...ngDevMode ? [{ debugName: "captionTemplate" }] : /* istanbul ignore next */ []);
|
|
290
|
+
indicatorTemplate = contentChild(TxGalleriaIndicatorTemplate, ...ngDevMode ? [{ debugName: "indicatorTemplate" }] : /* istanbul ignore next */ []);
|
|
291
|
+
header = contentChild(TxGalleriaHeader, ...ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []);
|
|
292
|
+
footer = contentChild(TxGalleriaFooter, ...ngDevMode ? [{ debugName: "footer" }] : /* istanbul ignore next */ []);
|
|
293
|
+
layerTemplate = viewChild.required("layer", ...ngDevMode ? [{ debugName: "layerTemplate" }] : /* istanbul ignore next */ []);
|
|
294
|
+
playing = signal(false, ...ngDevMode ? [{ debugName: "playing" }] : /* istanbul ignore next */ []);
|
|
295
|
+
leaving = signal(null, ...ngDevMode ? [{ debugName: "leaving" }] : /* istanbul ignore next */ []);
|
|
296
|
+
shownIndex = null;
|
|
297
|
+
lastDirection = null;
|
|
298
|
+
swapToken = 0;
|
|
299
|
+
hovered = signal(false, ...ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []);
|
|
300
|
+
focused = signal(false, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
301
|
+
responsive = signal(null, ...ngDevMode ? [{ debugName: "responsive" }] : /* istanbul ignore next */ []);
|
|
302
|
+
items = computed(() => this.value() ?? [], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
303
|
+
count = computed(() => this.items().length, ...ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []);
|
|
304
|
+
current = computed(() => Math.min(Math.max(Math.floor(this.activeIndex()), 0), Math.max(this.count() - 1, 0)), ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
|
|
305
|
+
activeItem = computed(() => this.items()[this.current()], ...ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []);
|
|
306
|
+
activeImage = computed(() => galleriaImage(this.activeItem()), ...ngDevMode ? [{ debugName: "activeImage" }] : /* istanbul ignore next */ []);
|
|
307
|
+
thumbnailsVertical = computed(() => this.thumbnailsPosition() === "left" || this.thumbnailsPosition() === "right", ...ngDevMode ? [{ debugName: "thumbnailsVertical" }] : /* istanbul ignore next */ []);
|
|
308
|
+
visibleThumbnails = computed(() => Math.max(1, Math.min(Math.floor(this.responsive()?.numVisible ?? this.numVisible()), Math.max(this.count(), 1))), ...ngDevMode ? [{ debugName: "visibleThumbnails" }] : /* istanbul ignore next */ []);
|
|
309
|
+
thumbnailStart = computed(() => {
|
|
310
|
+
const visible = this.visibleThumbnails();
|
|
311
|
+
const start = this.current() - Math.floor(visible / 2);
|
|
312
|
+
return Math.min(Math.max(start, 0), Math.max(this.count() - visible, 0));
|
|
313
|
+
}, ...ngDevMode ? [{ debugName: "thumbnailStart" }] : /* istanbul ignore next */ []);
|
|
314
|
+
thumbnailBasis = computed(() => percent(100 / this.visibleThumbnails()), ...ngDevMode ? [{ debugName: "thumbnailBasis" }] : /* istanbul ignore next */ []);
|
|
315
|
+
thumbnailTransform = computed(() => {
|
|
316
|
+
const shift = percent(-this.thumbnailStart() * 100 / this.visibleThumbnails());
|
|
317
|
+
return this.thumbnailsVertical() ? `translate3d(0, ${shift}, 0)` : `translate3d(${shift}, 0, 0)`;
|
|
318
|
+
}, ...ngDevMode ? [{ debugName: "thumbnailTransform" }] : /* istanbul ignore next */ []);
|
|
319
|
+
canPrev = computed(() => this.count() > 1 && (this.circular() || this.current() > 0), ...ngDevMode ? [{ debugName: "canPrev" }] : /* istanbul ignore next */ []);
|
|
320
|
+
canNext = computed(() => this.count() > 1 && (this.circular() || this.current() < this.count() - 1), ...ngDevMode ? [{ debugName: "canNext" }] : /* istanbul ignore next */ []);
|
|
321
|
+
indexes = computed(() => Array.from({ length: this.count() }, (_, index) => index), ...ngDevMode ? [{ debugName: "indexes" }] : /* istanbul ignore next */ []);
|
|
322
|
+
hasCaption = computed(() => !!this.captionTemplate() || !!this.activeImage()?.title || !!this.activeImage()?.description, ...ngDevMode ? [{ debugName: "hasCaption" }] : /* istanbul ignore next */ []);
|
|
323
|
+
label = computed(() => this.ariaLabel() ?? this.translations().gallery, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
324
|
+
constructor() {
|
|
325
|
+
effect(() => {
|
|
326
|
+
const auto = this.autoPlay();
|
|
327
|
+
untracked(() => this.playing.set(auto));
|
|
328
|
+
});
|
|
329
|
+
effect((onCleanup) => {
|
|
330
|
+
const options = this.responsiveOptions();
|
|
331
|
+
const view = this.document.defaultView;
|
|
332
|
+
if (!options?.length || !view?.matchMedia) {
|
|
333
|
+
this.responsive.set(null);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
const entries = [...options].sort((a, b) => parseFloat(a.breakpoint) - parseFloat(b.breakpoint)).map((option) => ({
|
|
337
|
+
option,
|
|
338
|
+
query: view.matchMedia(`(max-width: ${option.breakpoint})`)
|
|
339
|
+
}));
|
|
340
|
+
const pick = () => this.responsive.set(entries.find((entry) => entry.query.matches)?.option ?? null);
|
|
341
|
+
pick();
|
|
342
|
+
entries.forEach((entry) => entry.query.addEventListener("change", pick));
|
|
343
|
+
onCleanup(() => entries.forEach((entry) => entry.query.removeEventListener("change", pick)));
|
|
344
|
+
});
|
|
345
|
+
effect((onCleanup) => {
|
|
346
|
+
const interval = this.transitionInterval();
|
|
347
|
+
const shown = !this.fullScreen() || this.visible();
|
|
348
|
+
if (!this.playing() || !shown || this.count() < 2 || this.hovered() || this.focused()) return;
|
|
349
|
+
const timer = setInterval(() => this.move(1, true), interval);
|
|
350
|
+
onCleanup(() => clearInterval(timer));
|
|
351
|
+
});
|
|
352
|
+
effect(() => {
|
|
353
|
+
const index = this.current();
|
|
354
|
+
untracked(() => this.swapTo(index));
|
|
355
|
+
});
|
|
356
|
+
effect(() => {
|
|
357
|
+
const wanted = this.fullScreen() && this.visible();
|
|
358
|
+
untracked(() => wanted ? this.openLayer() : this.closeLayer());
|
|
359
|
+
});
|
|
360
|
+
inject(DestroyRef).onDestroy(() => {
|
|
361
|
+
const layer = this.layer;
|
|
362
|
+
this.layer = null;
|
|
363
|
+
layer?.close();
|
|
364
|
+
this.releaseSwipe();
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
next() {
|
|
368
|
+
this.move(1, false);
|
|
369
|
+
}
|
|
370
|
+
prev() {
|
|
371
|
+
this.move(-1, false);
|
|
372
|
+
}
|
|
373
|
+
show(index) {
|
|
374
|
+
this.lastDirection = index < this.current() ? -1 : 1;
|
|
375
|
+
this.activeIndex.set(Math.min(Math.max(index, 0), Math.max(this.count() - 1, 0)));
|
|
376
|
+
}
|
|
377
|
+
startAutoplay() {
|
|
378
|
+
this.playing.set(true);
|
|
379
|
+
}
|
|
380
|
+
stopAutoplay() {
|
|
381
|
+
this.playing.set(false);
|
|
382
|
+
}
|
|
383
|
+
isAutoPlayActive() {
|
|
384
|
+
return this.playing();
|
|
385
|
+
}
|
|
386
|
+
close() {
|
|
387
|
+
this.visible.set(false);
|
|
388
|
+
}
|
|
389
|
+
imageLabel(index) {
|
|
390
|
+
return this.translations().galleryImage.replace("{index}", String(index + 1));
|
|
391
|
+
}
|
|
392
|
+
slideLabel(index) {
|
|
393
|
+
return this.translations().slideOf.replace("{index}", String(index + 1)).replace("{total}", String(this.count()));
|
|
394
|
+
}
|
|
395
|
+
imageOf(item) {
|
|
396
|
+
return galleriaImage(item);
|
|
397
|
+
}
|
|
398
|
+
onUserMove(direction) {
|
|
399
|
+
this.move(direction, false);
|
|
400
|
+
this.stopByClick();
|
|
401
|
+
}
|
|
402
|
+
onSelect(index) {
|
|
403
|
+
this.show(index);
|
|
404
|
+
this.stopByClick();
|
|
405
|
+
}
|
|
406
|
+
onIndicatorHover(index) {
|
|
407
|
+
if (this.changeItemOnIndicatorHover()) this.onSelect(index);
|
|
408
|
+
}
|
|
409
|
+
onListKeydown(event, selector) {
|
|
410
|
+
const last = this.count() - 1;
|
|
411
|
+
const target = ["ArrowRight", "ArrowDown"].includes(event.key) ? this.current() + 1 : ["ArrowLeft", "ArrowUp"].includes(event.key) ? this.current() - 1 : event.key === "Home" ? 0 : event.key === "End" ? last : null;
|
|
412
|
+
if (target === null || last < 0) return;
|
|
413
|
+
event.preventDefault();
|
|
414
|
+
const index = target > last ? this.circular() ? 0 : last : target < 0 ? this.circular() ? last : 0 : target;
|
|
415
|
+
this.onSelect(index);
|
|
416
|
+
const list = event.currentTarget.closest("ul");
|
|
417
|
+
queueMicrotask(() => list?.querySelectorAll(selector)[index]?.focus());
|
|
418
|
+
}
|
|
419
|
+
onItemsKeydown(event) {
|
|
420
|
+
if (event.target !== event.currentTarget) return;
|
|
421
|
+
if (event.key === "ArrowRight" || event.key === "ArrowLeft") {
|
|
422
|
+
event.preventDefault();
|
|
423
|
+
this.onUserMove(event.key === "ArrowRight" ? 1 : -1);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
onFocusOut(event) {
|
|
427
|
+
if (!event.currentTarget.contains(event.relatedTarget)) this.focused.set(false);
|
|
428
|
+
}
|
|
429
|
+
onSwipeStart(event) {
|
|
430
|
+
if (!this.swipe() || this.count() < 2 || event.pointerType === "mouse" && event.button !== 0) return;
|
|
431
|
+
if (event.target.closest("button, a, input, select, textarea")) return;
|
|
432
|
+
this.swipeStart = {
|
|
433
|
+
pointerId: event.pointerId,
|
|
434
|
+
x: event.clientX,
|
|
435
|
+
y: event.clientY
|
|
436
|
+
};
|
|
437
|
+
this.document.addEventListener("pointerup", this.onSwipeEnd);
|
|
438
|
+
this.document.addEventListener("pointercancel", this.onSwipeCancel);
|
|
439
|
+
}
|
|
440
|
+
onSwipeEnd = (event) => {
|
|
441
|
+
const start = this.swipeStart;
|
|
442
|
+
this.releaseSwipe();
|
|
443
|
+
if (!start || event.pointerId !== start.pointerId) return;
|
|
444
|
+
const dx = event.clientX - start.x;
|
|
445
|
+
const dy = event.clientY - start.y;
|
|
446
|
+
if (Math.abs(dx) >= SWIPE_MIN && Math.abs(dx) > Math.abs(dy)) this.onUserMove(dx < 0 ? 1 : -1);
|
|
447
|
+
};
|
|
448
|
+
onSwipeCancel = () => {
|
|
449
|
+
this.releaseSwipe();
|
|
450
|
+
};
|
|
451
|
+
releaseSwipe() {
|
|
452
|
+
this.swipeStart = null;
|
|
453
|
+
this.document.removeEventListener("pointerup", this.onSwipeEnd);
|
|
454
|
+
this.document.removeEventListener("pointercancel", this.onSwipeCancel);
|
|
455
|
+
}
|
|
456
|
+
stopByClick() {
|
|
457
|
+
if (this.shouldStopAutoplayByClick()) this.stopAutoplay();
|
|
458
|
+
}
|
|
459
|
+
move(direction, wrap) {
|
|
460
|
+
const count = this.count();
|
|
461
|
+
if (count < 2) return;
|
|
462
|
+
const next = this.current() + direction;
|
|
463
|
+
this.lastDirection = direction;
|
|
464
|
+
if (next >= 0 && next < count) this.activeIndex.set(next);
|
|
465
|
+
else if (this.circular() || wrap) this.activeIndex.set(next < 0 ? count - 1 : 0);
|
|
466
|
+
else if (this.playing()) this.stopAutoplay();
|
|
467
|
+
}
|
|
468
|
+
swapTo(index) {
|
|
469
|
+
const previous = this.shownIndex;
|
|
470
|
+
this.shownIndex = index;
|
|
471
|
+
const token = ++this.swapToken;
|
|
472
|
+
const direction = this.lastDirection ?? (previous !== null && index < previous ? -1 : 1);
|
|
473
|
+
this.lastDirection = null;
|
|
474
|
+
if (previous === null || previous === index || previous >= this.count()) {
|
|
475
|
+
this.leaving.set(null);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
const motion = txSwapMotion(this.effect(), direction, "x");
|
|
479
|
+
if (!motion) {
|
|
480
|
+
this.leaving.set(null);
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this.leaving.set(previous);
|
|
484
|
+
afterNextRender(() => {
|
|
485
|
+
if (token !== this.swapToken) return;
|
|
486
|
+
const stage = (this.fullScreen() ? this.layer?.element ?? null : this.host.nativeElement)?.querySelector(".tx-galleria__stage") ?? null;
|
|
487
|
+
const incoming = stage?.querySelector(`.tx-galleria__item[data-index="${index}"]`) ?? null;
|
|
488
|
+
const outgoing = stage?.querySelector(`.tx-galleria__item[data-index="${previous}"]`) ?? null;
|
|
489
|
+
if (!stage || !txCanAnimate(incoming) || !outgoing) {
|
|
490
|
+
this.leaving.set(null);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
stage.querySelectorAll(".tx-galleria__item").forEach((item) => item.getAnimations().forEach((animation) => animation.cancel()));
|
|
494
|
+
const duration = txCssTime(stage, "--tx-galleria-slide-duration", SWAP_DURATION);
|
|
495
|
+
const easing = (stage.ownerDocument.defaultView?.getComputedStyle(stage).getPropertyValue("--tx-galleria-slide-easing") ?? "").trim() || "ease";
|
|
496
|
+
const part = motion.sequential ? duration / 2 : duration;
|
|
497
|
+
const leave = outgoing.animate(motion.leave, {
|
|
498
|
+
duration: part,
|
|
499
|
+
easing,
|
|
500
|
+
fill: "forwards"
|
|
501
|
+
});
|
|
502
|
+
incoming.animate(motion.enter, {
|
|
503
|
+
duration: part,
|
|
504
|
+
easing,
|
|
505
|
+
delay: motion.sequential ? part : 0,
|
|
506
|
+
fill: "backwards"
|
|
507
|
+
});
|
|
508
|
+
leave.finished.catch(() => void 0).then(() => {
|
|
509
|
+
if (token === this.swapToken) {
|
|
510
|
+
this.leaving.set(null);
|
|
511
|
+
leave.cancel();
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
}, { injector: this.injector });
|
|
515
|
+
}
|
|
516
|
+
openLayer() {
|
|
517
|
+
if (this.layer) return;
|
|
518
|
+
this.layer = openImageLayer(this.layerTemplate(), {
|
|
519
|
+
injector: this.injector,
|
|
520
|
+
viewContainerRef: this.viewContainerRef,
|
|
521
|
+
focus: ".tx-galleria__close",
|
|
522
|
+
onEscape: () => this.close(),
|
|
523
|
+
onDetach: () => this.close()
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
closeLayer() {
|
|
527
|
+
const layer = this.layer;
|
|
528
|
+
this.layer = null;
|
|
529
|
+
layer?.close();
|
|
530
|
+
}
|
|
531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
532
|
+
minVersion: "12.0.0",
|
|
533
|
+
version: "22.2.3",
|
|
534
|
+
ngImport: i0,
|
|
535
|
+
type: TxGalleria,
|
|
536
|
+
deps: [],
|
|
537
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
538
|
+
});
|
|
539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
540
|
+
minVersion: "17.0.0",
|
|
541
|
+
version: "22.2.3",
|
|
542
|
+
type: TxGalleria,
|
|
543
|
+
isStandalone: true,
|
|
544
|
+
selector: "tx-galleria",
|
|
545
|
+
inputs: {
|
|
546
|
+
value: {
|
|
547
|
+
classPropertyName: "value",
|
|
548
|
+
publicName: "value",
|
|
549
|
+
isSignal: true,
|
|
550
|
+
isRequired: false,
|
|
551
|
+
transformFunction: null
|
|
552
|
+
},
|
|
553
|
+
activeIndex: {
|
|
554
|
+
classPropertyName: "activeIndex",
|
|
555
|
+
publicName: "activeIndex",
|
|
556
|
+
isSignal: true,
|
|
557
|
+
isRequired: false,
|
|
558
|
+
transformFunction: null
|
|
559
|
+
},
|
|
560
|
+
visible: {
|
|
561
|
+
classPropertyName: "visible",
|
|
562
|
+
publicName: "visible",
|
|
563
|
+
isSignal: true,
|
|
564
|
+
isRequired: false,
|
|
565
|
+
transformFunction: null
|
|
566
|
+
},
|
|
567
|
+
fullScreen: {
|
|
568
|
+
classPropertyName: "fullScreen",
|
|
569
|
+
publicName: "fullScreen",
|
|
570
|
+
isSignal: true,
|
|
571
|
+
isRequired: false,
|
|
572
|
+
transformFunction: null
|
|
573
|
+
},
|
|
574
|
+
numVisible: {
|
|
575
|
+
classPropertyName: "numVisible",
|
|
576
|
+
publicName: "numVisible",
|
|
577
|
+
isSignal: true,
|
|
578
|
+
isRequired: false,
|
|
579
|
+
transformFunction: null
|
|
580
|
+
},
|
|
581
|
+
responsiveOptions: {
|
|
582
|
+
classPropertyName: "responsiveOptions",
|
|
583
|
+
publicName: "responsiveOptions",
|
|
584
|
+
isSignal: true,
|
|
585
|
+
isRequired: false,
|
|
586
|
+
transformFunction: null
|
|
587
|
+
},
|
|
588
|
+
showItemNavigators: {
|
|
589
|
+
classPropertyName: "showItemNavigators",
|
|
590
|
+
publicName: "showItemNavigators",
|
|
591
|
+
isSignal: true,
|
|
592
|
+
isRequired: false,
|
|
593
|
+
transformFunction: null
|
|
594
|
+
},
|
|
595
|
+
showItemNavigatorsOnHover: {
|
|
596
|
+
classPropertyName: "showItemNavigatorsOnHover",
|
|
597
|
+
publicName: "showItemNavigatorsOnHover",
|
|
598
|
+
isSignal: true,
|
|
599
|
+
isRequired: false,
|
|
600
|
+
transformFunction: null
|
|
601
|
+
},
|
|
602
|
+
showThumbnailNavigators: {
|
|
603
|
+
classPropertyName: "showThumbnailNavigators",
|
|
604
|
+
publicName: "showThumbnailNavigators",
|
|
605
|
+
isSignal: true,
|
|
606
|
+
isRequired: false,
|
|
607
|
+
transformFunction: null
|
|
608
|
+
},
|
|
609
|
+
showThumbnails: {
|
|
610
|
+
classPropertyName: "showThumbnails",
|
|
611
|
+
publicName: "showThumbnails",
|
|
612
|
+
isSignal: true,
|
|
613
|
+
isRequired: false,
|
|
614
|
+
transformFunction: null
|
|
615
|
+
},
|
|
616
|
+
thumbnailsPosition: {
|
|
617
|
+
classPropertyName: "thumbnailsPosition",
|
|
618
|
+
publicName: "thumbnailsPosition",
|
|
619
|
+
isSignal: true,
|
|
620
|
+
isRequired: false,
|
|
621
|
+
transformFunction: null
|
|
622
|
+
},
|
|
623
|
+
verticalThumbnailViewPortHeight: {
|
|
624
|
+
classPropertyName: "verticalThumbnailViewPortHeight",
|
|
625
|
+
publicName: "verticalThumbnailViewPortHeight",
|
|
626
|
+
isSignal: true,
|
|
627
|
+
isRequired: false,
|
|
628
|
+
transformFunction: null
|
|
629
|
+
},
|
|
630
|
+
showIndicators: {
|
|
631
|
+
classPropertyName: "showIndicators",
|
|
632
|
+
publicName: "showIndicators",
|
|
633
|
+
isSignal: true,
|
|
634
|
+
isRequired: false,
|
|
635
|
+
transformFunction: null
|
|
636
|
+
},
|
|
637
|
+
showIndicatorsOnItem: {
|
|
638
|
+
classPropertyName: "showIndicatorsOnItem",
|
|
639
|
+
publicName: "showIndicatorsOnItem",
|
|
640
|
+
isSignal: true,
|
|
641
|
+
isRequired: false,
|
|
642
|
+
transformFunction: null
|
|
643
|
+
},
|
|
644
|
+
indicatorsPosition: {
|
|
645
|
+
classPropertyName: "indicatorsPosition",
|
|
646
|
+
publicName: "indicatorsPosition",
|
|
647
|
+
isSignal: true,
|
|
648
|
+
isRequired: false,
|
|
649
|
+
transformFunction: null
|
|
650
|
+
},
|
|
651
|
+
changeItemOnIndicatorHover: {
|
|
652
|
+
classPropertyName: "changeItemOnIndicatorHover",
|
|
653
|
+
publicName: "changeItemOnIndicatorHover",
|
|
654
|
+
isSignal: true,
|
|
655
|
+
isRequired: false,
|
|
656
|
+
transformFunction: null
|
|
657
|
+
},
|
|
658
|
+
circular: {
|
|
659
|
+
classPropertyName: "circular",
|
|
660
|
+
publicName: "circular",
|
|
661
|
+
isSignal: true,
|
|
662
|
+
isRequired: false,
|
|
663
|
+
transformFunction: null
|
|
664
|
+
},
|
|
665
|
+
autoPlay: {
|
|
666
|
+
classPropertyName: "autoPlay",
|
|
667
|
+
publicName: "autoPlay",
|
|
668
|
+
isSignal: true,
|
|
669
|
+
isRequired: false,
|
|
670
|
+
transformFunction: null
|
|
671
|
+
},
|
|
672
|
+
transitionInterval: {
|
|
673
|
+
classPropertyName: "transitionInterval",
|
|
674
|
+
publicName: "transitionInterval",
|
|
675
|
+
isSignal: true,
|
|
676
|
+
isRequired: false,
|
|
677
|
+
transformFunction: null
|
|
678
|
+
},
|
|
679
|
+
shouldStopAutoplayByClick: {
|
|
680
|
+
classPropertyName: "shouldStopAutoplayByClick",
|
|
681
|
+
publicName: "shouldStopAutoplayByClick",
|
|
682
|
+
isSignal: true,
|
|
683
|
+
isRequired: false,
|
|
684
|
+
transformFunction: null
|
|
685
|
+
},
|
|
686
|
+
swipe: {
|
|
687
|
+
classPropertyName: "swipe",
|
|
688
|
+
publicName: "swipe",
|
|
689
|
+
isSignal: true,
|
|
690
|
+
isRequired: false,
|
|
691
|
+
transformFunction: null
|
|
692
|
+
},
|
|
693
|
+
effect: {
|
|
694
|
+
classPropertyName: "effect",
|
|
695
|
+
publicName: "effect",
|
|
696
|
+
isSignal: true,
|
|
697
|
+
isRequired: false,
|
|
698
|
+
transformFunction: null
|
|
699
|
+
},
|
|
700
|
+
prevIcon: {
|
|
701
|
+
classPropertyName: "prevIcon",
|
|
702
|
+
publicName: "prevIcon",
|
|
703
|
+
isSignal: true,
|
|
704
|
+
isRequired: false,
|
|
705
|
+
transformFunction: null
|
|
706
|
+
},
|
|
707
|
+
nextIcon: {
|
|
708
|
+
classPropertyName: "nextIcon",
|
|
709
|
+
publicName: "nextIcon",
|
|
710
|
+
isSignal: true,
|
|
711
|
+
isRequired: false,
|
|
712
|
+
transformFunction: null
|
|
713
|
+
},
|
|
714
|
+
closeIcon: {
|
|
715
|
+
classPropertyName: "closeIcon",
|
|
716
|
+
publicName: "closeIcon",
|
|
717
|
+
isSignal: true,
|
|
718
|
+
isRequired: false,
|
|
719
|
+
transformFunction: null
|
|
720
|
+
},
|
|
721
|
+
ariaLabel: {
|
|
722
|
+
classPropertyName: "ariaLabel",
|
|
723
|
+
publicName: "ariaLabel",
|
|
724
|
+
isSignal: true,
|
|
725
|
+
isRequired: false,
|
|
726
|
+
transformFunction: null
|
|
727
|
+
},
|
|
728
|
+
dt: {
|
|
729
|
+
classPropertyName: "dt",
|
|
730
|
+
publicName: "dt",
|
|
731
|
+
isSignal: true,
|
|
732
|
+
isRequired: false,
|
|
733
|
+
transformFunction: null
|
|
734
|
+
},
|
|
735
|
+
pt: {
|
|
736
|
+
classPropertyName: "pt",
|
|
737
|
+
publicName: "pt",
|
|
738
|
+
isSignal: true,
|
|
739
|
+
isRequired: false,
|
|
740
|
+
transformFunction: null
|
|
741
|
+
},
|
|
742
|
+
ptOptions: {
|
|
743
|
+
classPropertyName: "ptOptions",
|
|
744
|
+
publicName: "ptOptions",
|
|
745
|
+
isSignal: true,
|
|
746
|
+
isRequired: false,
|
|
747
|
+
transformFunction: null
|
|
748
|
+
},
|
|
749
|
+
unstyled: {
|
|
750
|
+
classPropertyName: "unstyled",
|
|
751
|
+
publicName: "unstyled",
|
|
752
|
+
isSignal: true,
|
|
753
|
+
isRequired: false,
|
|
754
|
+
transformFunction: null
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
outputs: {
|
|
758
|
+
activeIndex: "activeIndexChange",
|
|
759
|
+
visible: "visibleChange"
|
|
760
|
+
},
|
|
761
|
+
host: {
|
|
762
|
+
properties: {
|
|
763
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
764
|
+
"class.tx-galleria--fullscreen": "fullScreen()"
|
|
765
|
+
},
|
|
766
|
+
classAttribute: "tx-galleria"
|
|
767
|
+
},
|
|
768
|
+
queries: [
|
|
769
|
+
{
|
|
770
|
+
propertyName: "itemTemplate",
|
|
771
|
+
first: true,
|
|
772
|
+
predicate: TxGalleriaItemTemplate,
|
|
773
|
+
descendants: true,
|
|
774
|
+
isSignal: true
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
propertyName: "thumbnailTemplate",
|
|
778
|
+
first: true,
|
|
779
|
+
predicate: TxGalleriaThumbnailTemplate,
|
|
780
|
+
descendants: true,
|
|
781
|
+
isSignal: true
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
propertyName: "captionTemplate",
|
|
785
|
+
first: true,
|
|
786
|
+
predicate: TxGalleriaCaptionTemplate,
|
|
787
|
+
descendants: true,
|
|
788
|
+
isSignal: true
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
propertyName: "indicatorTemplate",
|
|
792
|
+
first: true,
|
|
793
|
+
predicate: TxGalleriaIndicatorTemplate,
|
|
794
|
+
descendants: true,
|
|
795
|
+
isSignal: true
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
propertyName: "header",
|
|
799
|
+
first: true,
|
|
800
|
+
predicate: TxGalleriaHeader,
|
|
801
|
+
descendants: true,
|
|
802
|
+
isSignal: true
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
propertyName: "footer",
|
|
806
|
+
first: true,
|
|
807
|
+
predicate: TxGalleriaFooter,
|
|
808
|
+
descendants: true,
|
|
809
|
+
isSignal: true
|
|
810
|
+
}
|
|
811
|
+
],
|
|
812
|
+
viewQueries: [{
|
|
813
|
+
propertyName: "layerTemplate",
|
|
814
|
+
first: true,
|
|
815
|
+
predicate: ["layer"],
|
|
816
|
+
descendants: true,
|
|
817
|
+
isSignal: true
|
|
818
|
+
}],
|
|
819
|
+
ngImport: i0,
|
|
820
|
+
template: "<ng-template #frame>\n <div\n class=\"tx-galleria__frame\"\n role=\"region\"\n [class]=\"passThrough().root?.class\"\n [style]=\"frameStyle()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [attr.data-thumbnails]=\"showThumbnails() ? thumbnailsPosition() : null\"\n [attr.data-indicators]=\"showIndicators() ? indicatorsPosition() : null\"\n [attr.aria-roledescription]=\"translations().gallery\"\n [attr.aria-label]=\"label()\"\n [class.tx-galleria__frame--fullscreen]=\"fullScreen()\"\n [class.tx-galleria__frame--hover-navigators]=\"showItemNavigatorsOnHover()\"\n [class.tx-galleria__frame--inset-indicators]=\"showIndicators() && showIndicatorsOnItem()\"\n (mouseenter)=\"hovered.set(true)\"\n (mouseleave)=\"hovered.set(false)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"onFocusOut($event)\"\n >\n @if (header()) {\n <div class=\"tx-galleria__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <ng-content select=\"[txGalleriaHeader]\" />\n </div>\n }\n <div class=\"tx-galleria__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <div class=\"tx-galleria__items-container\">\n <div\n class=\"tx-galleria__items\"\n tabindex=\"0\"\n [class]=\"passThrough().items?.class\"\n [style]=\"passThrough().items?.style\"\n [attr.aria-live]=\"playing() ? 'off' : 'polite'\"\n (keydown)=\"onItemsKeydown($event)\"\n (pointerdown)=\"onSwipeStart($event)\"\n (dragstart)=\"$event.preventDefault()\"\n >\n <div class=\"tx-galleria__stage\">\n @for (item of items(); track $index) {\n @let index = $index;\n @let shown = index === current();\n @let image = imageOf(item);\n <div\n class=\"tx-galleria__item\"\n role=\"group\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [class.tx-galleria__item--active]=\"shown\"\n [class.tx-galleria__item--leaving]=\"index === leaving()\"\n [attr.data-index]=\"index\"\n [attr.aria-roledescription]=\"translations().slide\"\n [attr.aria-label]=\"slideLabel(index)\"\n [attr.aria-hidden]=\"shown ? null : 'true'\"\n [attr.inert]=\"shown ? null : ''\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: item, index }\" />\n } @else if (image) {\n <img\n class=\"tx-galleria__image\"\n [src]=\"image.src\"\n [attr.alt]=\"image.alt ?? image.title ?? ''\"\n [attr.width]=\"image.width ?? null\"\n [attr.height]=\"image.height ?? null\"\n />\n }\n </div>\n }\n </div>\n @if (showItemNavigators()) {\n <button\n type=\"button\"\n class=\"tx-galleria__navigator tx-galleria__prev\"\n [class]=\"passThrough().navigator?.class\"\n [style]=\"passThrough().navigator?.style\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"translations().previousImage\"\n (click)=\"onUserMove(-1)\"\n >\n <tx-icon [name]=\"prevIcon()\" />\n </button>\n <button\n type=\"button\"\n class=\"tx-galleria__navigator tx-galleria__next\"\n [class]=\"passThrough().navigator?.class\"\n [style]=\"passThrough().navigator?.style\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"translations().nextImage\"\n (click)=\"onUserMove(1)\"\n >\n <tx-icon [name]=\"nextIcon()\" />\n </button>\n }\n @if (hasCaption() && count()) {\n <div class=\"tx-galleria__caption\" [class]=\"passThrough().caption?.class\" [style]=\"passThrough().caption?.style\">\n @if (captionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: activeItem(), index: current() }\" />\n } @else if (activeImage(); as image) {\n @if (image.title) {\n <div class=\"tx-galleria__caption-title\">{{ image.title }}</div>\n }\n @if (image.description) {\n <div class=\"tx-galleria__caption-text\">{{ image.description }}</div>\n }\n }\n </div>\n }\n </div>\n @if (showIndicators() && count() > 1) {\n <ul\n class=\"tx-galleria__indicators\"\n [class]=\"passThrough().indicators?.class\"\n [style]=\"passThrough().indicators?.style\"\n [attr.aria-label]=\"label()\"\n >\n @for (dot of indexes(); track dot) {\n @let active = dot === current();\n <li class=\"tx-galleria__indicator\" [class]=\"passThrough().indicator?.class\" [style]=\"passThrough().indicator?.style\" [class.tx-galleria__indicator--active]=\"active\">\n <button\n type=\"button\"\n class=\"tx-galleria__indicator-button\"\n [attr.aria-label]=\"imageLabel(dot)\"\n [attr.aria-current]=\"active ? 'true' : null\"\n [tabIndex]=\"active ? 0 : -1\"\n (click)=\"onSelect(dot)\"\n (keydown)=\"onListKeydown($event, '.tx-galleria__indicator-button')\"\n (mouseenter)=\"onIndicatorHover(dot)\"\n >\n @if (indicatorTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: dot, active }\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n </div>\n @if (showThumbnails() && count()) {\n <div class=\"tx-galleria__thumbnails\" [class]=\"passThrough().thumbnails?.class\" [style]=\"passThrough().thumbnails?.style\">\n @if (showThumbnailNavigators()) {\n <button\n type=\"button\"\n class=\"tx-galleria__thumbnail-navigator\"\n [class]=\"passThrough().thumbnailNavigator?.class\"\n [style]=\"passThrough().thumbnailNavigator?.style\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"translations().previousThumbnails\"\n (click)=\"onUserMove(-1)\"\n >\n <tx-icon [name]=\"thumbnailsVertical() ? 'chevron-up' : prevIcon()\" />\n </button>\n }\n <div class=\"tx-galleria__thumbnails-viewport\" [style.height]=\"thumbnailsVertical() ? verticalThumbnailViewPortHeight() : null\">\n <ul\n class=\"tx-galleria__thumbnail-items\"\n [attr.aria-label]=\"translations().thumbnails\"\n [style.transform]=\"thumbnailTransform()\"\n >\n @for (item of items(); track $index) {\n @let active = $index === current();\n @let image = imageOf(item);\n <li class=\"tx-galleria__thumbnail-item\" [class.tx-galleria__thumbnail-item--active]=\"active\" [style.flex-basis]=\"thumbnailBasis()\">\n <button\n type=\"button\"\n class=\"tx-galleria__thumbnail\"\n [class]=\"passThrough().thumbnail?.class\"\n [style]=\"passThrough().thumbnail?.style\"\n [attr.aria-label]=\"thumbnailTemplate() ? null : imageLabel($index)\"\n [attr.aria-current]=\"active ? 'true' : null\"\n [tabIndex]=\"active ? 0 : -1\"\n (click)=\"onSelect($index)\"\n (keydown)=\"onListKeydown($event, '.tx-galleria__thumbnail')\"\n >\n @if (thumbnailTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index, active }\" />\n } @else if (image) {\n <img\n class=\"tx-galleria__thumbnail-image\"\n alt=\"\"\n [src]=\"image.thumbnailSrc ?? image.src\"\n [attr.width]=\"image.width ?? null\"\n [attr.height]=\"image.height ?? null\"\n />\n }\n </button>\n </li>\n }\n </ul>\n </div>\n @if (showThumbnailNavigators()) {\n <button\n type=\"button\"\n class=\"tx-galleria__thumbnail-navigator\"\n [class]=\"passThrough().thumbnailNavigator?.class\"\n [style]=\"passThrough().thumbnailNavigator?.style\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"translations().nextThumbnails\"\n (click)=\"onUserMove(1)\"\n >\n <tx-icon [name]=\"thumbnailsVertical() ? 'chevron-down' : nextIcon()\" />\n </button>\n }\n </div>\n }\n </div>\n @if (footer()) {\n <div class=\"tx-galleria__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\">\n <ng-content select=\"[txGalleriaFooter]\" />\n </div>\n }\n </div>\n</ng-template>\n\n@if (!fullScreen()) {\n <ng-container [ngTemplateOutlet]=\"frame\" />\n}\n\n<ng-template #layer>\n <div\n class=\"tx-galleria-mask\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class]=\"passThrough().mask?.class\"\n [style]=\"maskStyle()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [attr.aria-label]=\"label()\"\n >\n <div class=\"tx-galleria-mask__backdrop\" aria-hidden=\"true\" (click)=\"close()\"></div>\n <button\n type=\"button\"\n class=\"tx-galleria__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close()\"\n >\n <tx-icon [name]=\"closeIcon()\" />\n </button>\n <ng-container [ngTemplateOutlet]=\"frame\" />\n </div>\n</ng-template>\n",
|
|
821
|
+
styles: [":host{display:block;min-width:0}:host(.tx-galleria--fullscreen){display:contents}.tx-galleria__frame{display:flex;flex-direction:column;min-width:0;overflow:hidden}.tx-galleria__content{display:flex;flex-direction:column;min-width:0}.tx-galleria__frame[data-thumbnails=left] .tx-galleria__content,.tx-galleria__frame[data-thumbnails=right] .tx-galleria__content{flex-direction:row;align-items:center}.tx-galleria__items-container{position:relative;display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.tx-galleria__frame[data-thumbnails=top] .tx-galleria__items-container,.tx-galleria__frame[data-thumbnails=left] .tx-galleria__items-container{order:2}.tx-galleria__frame[data-indicators=left] .tx-galleria__items-container,.tx-galleria__frame[data-indicators=right] .tx-galleria__items-container{flex-direction:row}.tx-galleria__items{position:relative;display:flex;flex:1 1 auto;align-items:center;justify-content:center;min-width:0;overflow:hidden;outline:none;touch-action:pan-y pinch-zoom;isolation:isolate}.tx-galleria__stage{display:grid;width:100%;height:100%}.tx-galleria__item{display:flex;grid-area:1/1;align-items:center;justify-content:center;min-width:0}.tx-galleria__item:not(.tx-galleria__item--active,.tx-galleria__item--leaving){visibility:hidden}.tx-galleria__item--active{z-index:1}.tx-galleria__image{display:block;width:100%;height:auto;-webkit-user-select:none;user-select:none}.tx-galleria__navigator,.tx-galleria__close,.tx-galleria__thumbnail-navigator,.tx-galleria__indicator-button,.tx-galleria__thumbnail{margin:0;padding:0;border:0;font:inherit;cursor:pointer}.tx-galleria__navigator:disabled,.tx-galleria__close:disabled,.tx-galleria__thumbnail-navigator:disabled,.tx-galleria__indicator-button:disabled,.tx-galleria__thumbnail:disabled{cursor:default}.tx-galleria__navigator{position:absolute;z-index:2;top:50%;display:inline-flex;align-items:center;justify-content:center;translate:0 -50%}.tx-galleria__prev{left:0}.tx-galleria__next{right:0}.tx-galleria__caption{position:absolute;z-index:2;bottom:0;left:0;box-sizing:border-box;width:100%}.tx-galleria__indicators{display:flex;align-items:center;justify-content:center;margin:0;list-style:none}.tx-galleria__frame[data-indicators=top] .tx-galleria__indicators,.tx-galleria__frame[data-indicators=left] .tx-galleria__indicators{order:-1}.tx-galleria__frame[data-indicators=left] .tx-galleria__indicators,.tx-galleria__frame[data-indicators=right] .tx-galleria__indicators{flex-direction:column}.tx-galleria__frame--inset-indicators .tx-galleria__indicators{position:absolute;z-index:1;box-sizing:border-box}.tx-galleria__frame--inset-indicators[data-indicators=bottom] .tx-galleria__indicators{inset:auto 0 0}.tx-galleria__frame--inset-indicators[data-indicators=top] .tx-galleria__indicators{inset:0 0 auto}.tx-galleria__frame--inset-indicators[data-indicators=left] .tx-galleria__indicators{inset:0 auto 0 0}.tx-galleria__frame--inset-indicators[data-indicators=right] .tx-galleria__indicators{inset:0 0 0 auto}.tx-galleria__indicator-button{display:block}.tx-galleria__thumbnails{display:flex;flex-shrink:0;align-items:center;min-width:0}.tx-galleria__frame[data-thumbnails=left] .tx-galleria__thumbnails,.tx-galleria__frame[data-thumbnails=right] .tx-galleria__thumbnails{flex-direction:column}.tx-galleria__thumbnail-navigator{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.tx-galleria__thumbnails-viewport{flex:1 1 auto;min-width:0;overflow:hidden}.tx-galleria__thumbnail-items{display:flex;height:100%;margin:0;padding:0;list-style:none}.tx-galleria__frame[data-thumbnails=left] .tx-galleria__thumbnail-items,.tx-galleria__frame[data-thumbnails=right] .tx-galleria__thumbnail-items{flex-direction:column}.tx-galleria__thumbnail-item{display:flex;flex-grow:0;flex-shrink:0;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.tx-galleria__thumbnail{display:block;width:100%;max-height:100%;background:none}.tx-galleria__thumbnail-image{display:block;width:100%;height:auto;max-height:100%;object-fit:cover}.tx-galleria-mask{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.tx-galleria-mask__backdrop{position:absolute;inset:0}.tx-galleria-mask .tx-galleria__frame{position:relative}.tx-galleria__close{position:absolute;z-index:1;display:inline-flex;align-items:center;justify-content:center}.tx-galleria__frame[data-styled]{border:var(--tx-galleria-border-width) solid var(--tx-galleria-border-color);border-radius:var(--tx-galleria-border-radius);background:var(--tx-galleria-background)}.tx-galleria__frame[data-styled] .tx-galleria__items:focus-visible{outline:var(--tx-galleria-focus-ring-width) solid var(--tx-galleria-focus-ring-color);outline-offset:calc(var(--tx-galleria-focus-ring-width) * -1)}.tx-galleria__frame[data-styled] .tx-galleria__navigator{width:var(--tx-galleria-nav-button-size);height:var(--tx-galleria-nav-button-size);margin:0 var(--tx-galleria-nav-button-gutter);border-radius:var(--tx-galleria-nav-button-border-radius);background:var(--tx-galleria-nav-button-background);color:var(--tx-galleria-nav-button-color);font-size:var(--tx-galleria-nav-button-icon-size);transition:background-color var(--tx-galleria-transition-duration),color var(--tx-galleria-transition-duration),opacity var(--tx-galleria-transition-duration)}.tx-galleria__frame[data-styled] .tx-galleria__navigator:not(:disabled):hover{background:var(--tx-galleria-nav-button-hover-background);color:var(--tx-galleria-nav-button-hover-color)}.tx-galleria__frame[data-styled] .tx-galleria__navigator:disabled{opacity:.5}.tx-galleria__frame[data-styled].tx-galleria__frame--hover-navigators .tx-galleria__navigator{opacity:0;pointer-events:none}.tx-galleria__frame[data-styled].tx-galleria__frame--hover-navigators .tx-galleria__items-container:is(:hover,:focus-within) .tx-galleria__navigator:not(:disabled){opacity:1;pointer-events:auto}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators[data-indicators=bottom] .tx-galleria__caption{bottom:calc(var(--tx-galleria-indicator-size) + var(--tx-galleria-indicator-list-padding) * 2)}.tx-galleria__frame[data-styled] .tx-galleria__caption{padding:var(--tx-galleria-caption-padding);background:var(--tx-galleria-caption-background);color:var(--tx-galleria-caption-color)}.tx-galleria__frame[data-styled] .tx-galleria__caption-title{font-weight:var(--tx-font-weight-semibold)}.tx-galleria__frame[data-styled] .tx-galleria__indicators{gap:var(--tx-galleria-indicator-list-gap);padding:var(--tx-galleria-indicator-list-padding)}.tx-galleria__frame[data-styled] .tx-galleria__indicator-button{width:var(--tx-galleria-indicator-size);height:var(--tx-galleria-indicator-size);border-radius:var(--tx-galleria-indicator-border-radius);background:var(--tx-galleria-indicator-background);transition:background-color var(--tx-galleria-transition-duration)}.tx-galleria__frame[data-styled] .tx-galleria__indicator-button:hover{background:var(--tx-galleria-indicator-hover-background)}.tx-galleria__frame[data-styled] .tx-galleria__indicator--active .tx-galleria__indicator-button{background:var(--tx-galleria-indicator-active-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicators{background:var(--tx-galleria-inset-indicator-list-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicator-button{background:var(--tx-galleria-inset-indicator-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicator-button:hover{background:var(--tx-galleria-inset-indicator-hover-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicator--active .tx-galleria__indicator-button{background:var(--tx-galleria-inset-indicator-active-background)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnails{padding:var(--tx-galleria-thumbnails-padding);background:var(--tx-galleria-thumbnails-background)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-navigator{width:var(--tx-galleria-thumbnail-nav-button-size);height:var(--tx-galleria-thumbnail-nav-button-size);margin:0 var(--tx-galleria-thumbnail-nav-button-gutter);border-radius:var(--tx-galleria-thumbnail-nav-button-border-radius);background:transparent;color:var(--tx-galleria-thumbnail-nav-button-color);font-size:var(--tx-galleria-thumbnail-nav-button-icon-size);transition:background-color var(--tx-galleria-transition-duration),color var(--tx-galleria-transition-duration)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-navigator:not(:disabled):hover{background:var(--tx-galleria-thumbnail-nav-button-hover-background);color:var(--tx-galleria-thumbnail-nav-button-hover-color)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-navigator:disabled{opacity:.5}.tx-galleria__frame[data-styled][data-thumbnails=left] .tx-galleria__thumbnails,.tx-galleria__frame[data-styled][data-thumbnails=right] .tx-galleria__thumbnails{width:var(--tx-galleria-thumbnails-vertical-width)}.tx-galleria__frame[data-styled][data-thumbnails=left] .tx-galleria__thumbnail-navigator,.tx-galleria__frame[data-styled][data-thumbnails=right] .tx-galleria__thumbnail-navigator{margin:var(--tx-galleria-thumbnail-nav-button-gutter) 0}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-items{transition:transform calc(var(--tx-galleria-transition-duration) * 2) var(--tx-galleria-easing)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-item{padding:var(--tx-galleria-thumbnails-gap);opacity:var(--tx-galleria-thumbnails-item-opacity);transition:opacity calc(var(--tx-galleria-transition-duration) * 2)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-item:hover,.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-item.tx-galleria__thumbnail-item--active{opacity:1}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail{border-radius:var(--tx-galleria-thumbnails-item-border-radius)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-image{border-radius:inherit}.tx-galleria__frame[data-styled] :is(.tx-galleria__navigator,.tx-galleria__thumbnail-navigator,.tx-galleria__indicator-button,.tx-galleria__thumbnail):focus-visible{outline:var(--tx-galleria-focus-ring-width) solid var(--tx-galleria-focus-ring-color);outline-offset:var(--tx-galleria-focus-ring-offset)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail:focus-visible{outline-offset:calc(var(--tx-galleria-focus-ring-width) * -1)}.tx-galleria-mask[data-styled]{background:var(--tx-galleria-mask-background);animation:tx-galleria-fade calc(var(--tx-galleria-transition-duration) * 1.5) var(--tx-galleria-easing)}.tx-galleria-mask[data-styled].tx-image-layer--leaving{animation:tx-galleria-fade-out var(--tx-galleria-transition-duration) ease-in forwards}.tx-galleria-mask[data-styled] .tx-galleria__close{top:var(--tx-galleria-close-button-gutter);right:var(--tx-galleria-close-button-gutter);width:var(--tx-galleria-close-button-size);height:var(--tx-galleria-close-button-size);border-radius:var(--tx-galleria-close-button-border-radius);background:var(--tx-galleria-close-button-background);color:var(--tx-galleria-close-button-color);font-size:var(--tx-galleria-close-button-icon-size);transition:background-color var(--tx-galleria-transition-duration),color var(--tx-galleria-transition-duration)}.tx-galleria-mask[data-styled] .tx-galleria__close:hover{background:var(--tx-galleria-close-button-hover-background);color:var(--tx-galleria-close-button-hover-color)}.tx-galleria-mask[data-styled] .tx-galleria__close:focus-visible{outline:var(--tx-galleria-focus-ring-width) solid var(--tx-galleria-focus-ring-color);outline-offset:var(--tx-galleria-focus-ring-offset)}.tx-galleria-mask[data-styled] .tx-galleria__frame{width:var(--tx-galleria-mask-frame-width);border:0;background:transparent;animation:tx-galleria-zoom calc(var(--tx-galleria-transition-duration) * 2) cubic-bezier(.16,1,.3,1)}.tx-galleria-mask[data-styled].tx-image-layer--leaving .tx-galleria__frame{animation:tx-galleria-zoom-out var(--tx-galleria-transition-duration) ease-in forwards}.tx-galleria-mask[data-styled] .tx-galleria__image{max-height:var(--tx-galleria-mask-image-max-height);object-fit:contain}.tx-galleria-mask[data-styled] .tx-galleria__thumbnails{background:transparent}.tx-galleria-mask[data-styled] .tx-galleria__thumbnail-navigator{color:var(--tx-galleria-mask-thumbnail-nav-color)}.tx-galleria-mask[data-styled] .tx-galleria__thumbnail-navigator:not(:disabled):hover{background:var(--tx-galleria-mask-thumbnail-nav-hover-background);color:var(--tx-galleria-close-button-hover-color)}@keyframes tx-galleria-fade{0%{opacity:0}}@keyframes tx-galleria-fade-out{to{opacity:0}}@keyframes tx-galleria-zoom{0%{opacity:0;scale:.7}}@keyframes tx-galleria-zoom-out{to{opacity:0;scale:.7}}@media(prefers-reduced-motion:reduce){.tx-galleria__frame[data-styled],.tx-galleria__frame[data-styled] *,.tx-galleria-mask[data-styled],.tx-galleria-mask[data-styled] *{transition:none!important;animation:none!important}}\n"],
|
|
822
|
+
dependencies: [{
|
|
823
|
+
kind: "directive",
|
|
824
|
+
type: NgTemplateOutlet,
|
|
825
|
+
selector: "[ngTemplateOutlet]",
|
|
826
|
+
inputs: [
|
|
827
|
+
"ngTemplateOutletContext",
|
|
828
|
+
"ngTemplateOutlet",
|
|
829
|
+
"ngTemplateOutletInjector"
|
|
830
|
+
]
|
|
831
|
+
}, {
|
|
832
|
+
kind: "component",
|
|
833
|
+
type: TxIcon,
|
|
834
|
+
selector: "tx-icon",
|
|
835
|
+
inputs: ["name"]
|
|
836
|
+
}],
|
|
837
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
838
|
+
});
|
|
839
|
+
};
|
|
840
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
841
|
+
minVersion: "12.0.0",
|
|
842
|
+
version: "22.2.3",
|
|
843
|
+
ngImport: i0,
|
|
844
|
+
type: TxGalleria,
|
|
845
|
+
decorators: [{
|
|
846
|
+
type: Component,
|
|
847
|
+
args: [{
|
|
848
|
+
selector: "tx-galleria",
|
|
849
|
+
imports: [NgTemplateOutlet, TxIcon],
|
|
850
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
851
|
+
host: {
|
|
852
|
+
class: "tx-galleria",
|
|
853
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
854
|
+
"[class.tx-galleria--fullscreen]": "fullScreen()"
|
|
855
|
+
},
|
|
856
|
+
template: "<ng-template #frame>\n <div\n class=\"tx-galleria__frame\"\n role=\"region\"\n [class]=\"passThrough().root?.class\"\n [style]=\"frameStyle()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [attr.data-thumbnails]=\"showThumbnails() ? thumbnailsPosition() : null\"\n [attr.data-indicators]=\"showIndicators() ? indicatorsPosition() : null\"\n [attr.aria-roledescription]=\"translations().gallery\"\n [attr.aria-label]=\"label()\"\n [class.tx-galleria__frame--fullscreen]=\"fullScreen()\"\n [class.tx-galleria__frame--hover-navigators]=\"showItemNavigatorsOnHover()\"\n [class.tx-galleria__frame--inset-indicators]=\"showIndicators() && showIndicatorsOnItem()\"\n (mouseenter)=\"hovered.set(true)\"\n (mouseleave)=\"hovered.set(false)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"onFocusOut($event)\"\n >\n @if (header()) {\n <div class=\"tx-galleria__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <ng-content select=\"[txGalleriaHeader]\" />\n </div>\n }\n <div class=\"tx-galleria__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <div class=\"tx-galleria__items-container\">\n <div\n class=\"tx-galleria__items\"\n tabindex=\"0\"\n [class]=\"passThrough().items?.class\"\n [style]=\"passThrough().items?.style\"\n [attr.aria-live]=\"playing() ? 'off' : 'polite'\"\n (keydown)=\"onItemsKeydown($event)\"\n (pointerdown)=\"onSwipeStart($event)\"\n (dragstart)=\"$event.preventDefault()\"\n >\n <div class=\"tx-galleria__stage\">\n @for (item of items(); track $index) {\n @let index = $index;\n @let shown = index === current();\n @let image = imageOf(item);\n <div\n class=\"tx-galleria__item\"\n role=\"group\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [class.tx-galleria__item--active]=\"shown\"\n [class.tx-galleria__item--leaving]=\"index === leaving()\"\n [attr.data-index]=\"index\"\n [attr.aria-roledescription]=\"translations().slide\"\n [attr.aria-label]=\"slideLabel(index)\"\n [attr.aria-hidden]=\"shown ? null : 'true'\"\n [attr.inert]=\"shown ? null : ''\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: item, index }\" />\n } @else if (image) {\n <img\n class=\"tx-galleria__image\"\n [src]=\"image.src\"\n [attr.alt]=\"image.alt ?? image.title ?? ''\"\n [attr.width]=\"image.width ?? null\"\n [attr.height]=\"image.height ?? null\"\n />\n }\n </div>\n }\n </div>\n @if (showItemNavigators()) {\n <button\n type=\"button\"\n class=\"tx-galleria__navigator tx-galleria__prev\"\n [class]=\"passThrough().navigator?.class\"\n [style]=\"passThrough().navigator?.style\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"translations().previousImage\"\n (click)=\"onUserMove(-1)\"\n >\n <tx-icon [name]=\"prevIcon()\" />\n </button>\n <button\n type=\"button\"\n class=\"tx-galleria__navigator tx-galleria__next\"\n [class]=\"passThrough().navigator?.class\"\n [style]=\"passThrough().navigator?.style\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"translations().nextImage\"\n (click)=\"onUserMove(1)\"\n >\n <tx-icon [name]=\"nextIcon()\" />\n </button>\n }\n @if (hasCaption() && count()) {\n <div class=\"tx-galleria__caption\" [class]=\"passThrough().caption?.class\" [style]=\"passThrough().caption?.style\">\n @if (captionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: activeItem(), index: current() }\" />\n } @else if (activeImage(); as image) {\n @if (image.title) {\n <div class=\"tx-galleria__caption-title\">{{ image.title }}</div>\n }\n @if (image.description) {\n <div class=\"tx-galleria__caption-text\">{{ image.description }}</div>\n }\n }\n </div>\n }\n </div>\n @if (showIndicators() && count() > 1) {\n <ul\n class=\"tx-galleria__indicators\"\n [class]=\"passThrough().indicators?.class\"\n [style]=\"passThrough().indicators?.style\"\n [attr.aria-label]=\"label()\"\n >\n @for (dot of indexes(); track dot) {\n @let active = dot === current();\n <li class=\"tx-galleria__indicator\" [class]=\"passThrough().indicator?.class\" [style]=\"passThrough().indicator?.style\" [class.tx-galleria__indicator--active]=\"active\">\n <button\n type=\"button\"\n class=\"tx-galleria__indicator-button\"\n [attr.aria-label]=\"imageLabel(dot)\"\n [attr.aria-current]=\"active ? 'true' : null\"\n [tabIndex]=\"active ? 0 : -1\"\n (click)=\"onSelect(dot)\"\n (keydown)=\"onListKeydown($event, '.tx-galleria__indicator-button')\"\n (mouseenter)=\"onIndicatorHover(dot)\"\n >\n @if (indicatorTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: dot, active }\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n </div>\n @if (showThumbnails() && count()) {\n <div class=\"tx-galleria__thumbnails\" [class]=\"passThrough().thumbnails?.class\" [style]=\"passThrough().thumbnails?.style\">\n @if (showThumbnailNavigators()) {\n <button\n type=\"button\"\n class=\"tx-galleria__thumbnail-navigator\"\n [class]=\"passThrough().thumbnailNavigator?.class\"\n [style]=\"passThrough().thumbnailNavigator?.style\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"translations().previousThumbnails\"\n (click)=\"onUserMove(-1)\"\n >\n <tx-icon [name]=\"thumbnailsVertical() ? 'chevron-up' : prevIcon()\" />\n </button>\n }\n <div class=\"tx-galleria__thumbnails-viewport\" [style.height]=\"thumbnailsVertical() ? verticalThumbnailViewPortHeight() : null\">\n <ul\n class=\"tx-galleria__thumbnail-items\"\n [attr.aria-label]=\"translations().thumbnails\"\n [style.transform]=\"thumbnailTransform()\"\n >\n @for (item of items(); track $index) {\n @let active = $index === current();\n @let image = imageOf(item);\n <li class=\"tx-galleria__thumbnail-item\" [class.tx-galleria__thumbnail-item--active]=\"active\" [style.flex-basis]=\"thumbnailBasis()\">\n <button\n type=\"button\"\n class=\"tx-galleria__thumbnail\"\n [class]=\"passThrough().thumbnail?.class\"\n [style]=\"passThrough().thumbnail?.style\"\n [attr.aria-label]=\"thumbnailTemplate() ? null : imageLabel($index)\"\n [attr.aria-current]=\"active ? 'true' : null\"\n [tabIndex]=\"active ? 0 : -1\"\n (click)=\"onSelect($index)\"\n (keydown)=\"onListKeydown($event, '.tx-galleria__thumbnail')\"\n >\n @if (thumbnailTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index, active }\" />\n } @else if (image) {\n <img\n class=\"tx-galleria__thumbnail-image\"\n alt=\"\"\n [src]=\"image.thumbnailSrc ?? image.src\"\n [attr.width]=\"image.width ?? null\"\n [attr.height]=\"image.height ?? null\"\n />\n }\n </button>\n </li>\n }\n </ul>\n </div>\n @if (showThumbnailNavigators()) {\n <button\n type=\"button\"\n class=\"tx-galleria__thumbnail-navigator\"\n [class]=\"passThrough().thumbnailNavigator?.class\"\n [style]=\"passThrough().thumbnailNavigator?.style\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"translations().nextThumbnails\"\n (click)=\"onUserMove(1)\"\n >\n <tx-icon [name]=\"thumbnailsVertical() ? 'chevron-down' : nextIcon()\" />\n </button>\n }\n </div>\n }\n </div>\n @if (footer()) {\n <div class=\"tx-galleria__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\">\n <ng-content select=\"[txGalleriaFooter]\" />\n </div>\n }\n </div>\n</ng-template>\n\n@if (!fullScreen()) {\n <ng-container [ngTemplateOutlet]=\"frame\" />\n}\n\n<ng-template #layer>\n <div\n class=\"tx-galleria-mask\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class]=\"passThrough().mask?.class\"\n [style]=\"maskStyle()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [attr.aria-label]=\"label()\"\n >\n <div class=\"tx-galleria-mask__backdrop\" aria-hidden=\"true\" (click)=\"close()\"></div>\n <button\n type=\"button\"\n class=\"tx-galleria__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close()\"\n >\n <tx-icon [name]=\"closeIcon()\" />\n </button>\n <ng-container [ngTemplateOutlet]=\"frame\" />\n </div>\n</ng-template>\n",
|
|
857
|
+
styles: [":host{display:block;min-width:0}:host(.tx-galleria--fullscreen){display:contents}.tx-galleria__frame{display:flex;flex-direction:column;min-width:0;overflow:hidden}.tx-galleria__content{display:flex;flex-direction:column;min-width:0}.tx-galleria__frame[data-thumbnails=left] .tx-galleria__content,.tx-galleria__frame[data-thumbnails=right] .tx-galleria__content{flex-direction:row;align-items:center}.tx-galleria__items-container{position:relative;display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.tx-galleria__frame[data-thumbnails=top] .tx-galleria__items-container,.tx-galleria__frame[data-thumbnails=left] .tx-galleria__items-container{order:2}.tx-galleria__frame[data-indicators=left] .tx-galleria__items-container,.tx-galleria__frame[data-indicators=right] .tx-galleria__items-container{flex-direction:row}.tx-galleria__items{position:relative;display:flex;flex:1 1 auto;align-items:center;justify-content:center;min-width:0;overflow:hidden;outline:none;touch-action:pan-y pinch-zoom;isolation:isolate}.tx-galleria__stage{display:grid;width:100%;height:100%}.tx-galleria__item{display:flex;grid-area:1/1;align-items:center;justify-content:center;min-width:0}.tx-galleria__item:not(.tx-galleria__item--active,.tx-galleria__item--leaving){visibility:hidden}.tx-galleria__item--active{z-index:1}.tx-galleria__image{display:block;width:100%;height:auto;-webkit-user-select:none;user-select:none}.tx-galleria__navigator,.tx-galleria__close,.tx-galleria__thumbnail-navigator,.tx-galleria__indicator-button,.tx-galleria__thumbnail{margin:0;padding:0;border:0;font:inherit;cursor:pointer}.tx-galleria__navigator:disabled,.tx-galleria__close:disabled,.tx-galleria__thumbnail-navigator:disabled,.tx-galleria__indicator-button:disabled,.tx-galleria__thumbnail:disabled{cursor:default}.tx-galleria__navigator{position:absolute;z-index:2;top:50%;display:inline-flex;align-items:center;justify-content:center;translate:0 -50%}.tx-galleria__prev{left:0}.tx-galleria__next{right:0}.tx-galleria__caption{position:absolute;z-index:2;bottom:0;left:0;box-sizing:border-box;width:100%}.tx-galleria__indicators{display:flex;align-items:center;justify-content:center;margin:0;list-style:none}.tx-galleria__frame[data-indicators=top] .tx-galleria__indicators,.tx-galleria__frame[data-indicators=left] .tx-galleria__indicators{order:-1}.tx-galleria__frame[data-indicators=left] .tx-galleria__indicators,.tx-galleria__frame[data-indicators=right] .tx-galleria__indicators{flex-direction:column}.tx-galleria__frame--inset-indicators .tx-galleria__indicators{position:absolute;z-index:1;box-sizing:border-box}.tx-galleria__frame--inset-indicators[data-indicators=bottom] .tx-galleria__indicators{inset:auto 0 0}.tx-galleria__frame--inset-indicators[data-indicators=top] .tx-galleria__indicators{inset:0 0 auto}.tx-galleria__frame--inset-indicators[data-indicators=left] .tx-galleria__indicators{inset:0 auto 0 0}.tx-galleria__frame--inset-indicators[data-indicators=right] .tx-galleria__indicators{inset:0 0 0 auto}.tx-galleria__indicator-button{display:block}.tx-galleria__thumbnails{display:flex;flex-shrink:0;align-items:center;min-width:0}.tx-galleria__frame[data-thumbnails=left] .tx-galleria__thumbnails,.tx-galleria__frame[data-thumbnails=right] .tx-galleria__thumbnails{flex-direction:column}.tx-galleria__thumbnail-navigator{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.tx-galleria__thumbnails-viewport{flex:1 1 auto;min-width:0;overflow:hidden}.tx-galleria__thumbnail-items{display:flex;height:100%;margin:0;padding:0;list-style:none}.tx-galleria__frame[data-thumbnails=left] .tx-galleria__thumbnail-items,.tx-galleria__frame[data-thumbnails=right] .tx-galleria__thumbnail-items{flex-direction:column}.tx-galleria__thumbnail-item{display:flex;flex-grow:0;flex-shrink:0;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.tx-galleria__thumbnail{display:block;width:100%;max-height:100%;background:none}.tx-galleria__thumbnail-image{display:block;width:100%;height:auto;max-height:100%;object-fit:cover}.tx-galleria-mask{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.tx-galleria-mask__backdrop{position:absolute;inset:0}.tx-galleria-mask .tx-galleria__frame{position:relative}.tx-galleria__close{position:absolute;z-index:1;display:inline-flex;align-items:center;justify-content:center}.tx-galleria__frame[data-styled]{border:var(--tx-galleria-border-width) solid var(--tx-galleria-border-color);border-radius:var(--tx-galleria-border-radius);background:var(--tx-galleria-background)}.tx-galleria__frame[data-styled] .tx-galleria__items:focus-visible{outline:var(--tx-galleria-focus-ring-width) solid var(--tx-galleria-focus-ring-color);outline-offset:calc(var(--tx-galleria-focus-ring-width) * -1)}.tx-galleria__frame[data-styled] .tx-galleria__navigator{width:var(--tx-galleria-nav-button-size);height:var(--tx-galleria-nav-button-size);margin:0 var(--tx-galleria-nav-button-gutter);border-radius:var(--tx-galleria-nav-button-border-radius);background:var(--tx-galleria-nav-button-background);color:var(--tx-galleria-nav-button-color);font-size:var(--tx-galleria-nav-button-icon-size);transition:background-color var(--tx-galleria-transition-duration),color var(--tx-galleria-transition-duration),opacity var(--tx-galleria-transition-duration)}.tx-galleria__frame[data-styled] .tx-galleria__navigator:not(:disabled):hover{background:var(--tx-galleria-nav-button-hover-background);color:var(--tx-galleria-nav-button-hover-color)}.tx-galleria__frame[data-styled] .tx-galleria__navigator:disabled{opacity:.5}.tx-galleria__frame[data-styled].tx-galleria__frame--hover-navigators .tx-galleria__navigator{opacity:0;pointer-events:none}.tx-galleria__frame[data-styled].tx-galleria__frame--hover-navigators .tx-galleria__items-container:is(:hover,:focus-within) .tx-galleria__navigator:not(:disabled){opacity:1;pointer-events:auto}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators[data-indicators=bottom] .tx-galleria__caption{bottom:calc(var(--tx-galleria-indicator-size) + var(--tx-galleria-indicator-list-padding) * 2)}.tx-galleria__frame[data-styled] .tx-galleria__caption{padding:var(--tx-galleria-caption-padding);background:var(--tx-galleria-caption-background);color:var(--tx-galleria-caption-color)}.tx-galleria__frame[data-styled] .tx-galleria__caption-title{font-weight:var(--tx-font-weight-semibold)}.tx-galleria__frame[data-styled] .tx-galleria__indicators{gap:var(--tx-galleria-indicator-list-gap);padding:var(--tx-galleria-indicator-list-padding)}.tx-galleria__frame[data-styled] .tx-galleria__indicator-button{width:var(--tx-galleria-indicator-size);height:var(--tx-galleria-indicator-size);border-radius:var(--tx-galleria-indicator-border-radius);background:var(--tx-galleria-indicator-background);transition:background-color var(--tx-galleria-transition-duration)}.tx-galleria__frame[data-styled] .tx-galleria__indicator-button:hover{background:var(--tx-galleria-indicator-hover-background)}.tx-galleria__frame[data-styled] .tx-galleria__indicator--active .tx-galleria__indicator-button{background:var(--tx-galleria-indicator-active-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicators{background:var(--tx-galleria-inset-indicator-list-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicator-button{background:var(--tx-galleria-inset-indicator-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicator-button:hover{background:var(--tx-galleria-inset-indicator-hover-background)}.tx-galleria__frame[data-styled].tx-galleria__frame--inset-indicators .tx-galleria__indicator--active .tx-galleria__indicator-button{background:var(--tx-galleria-inset-indicator-active-background)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnails{padding:var(--tx-galleria-thumbnails-padding);background:var(--tx-galleria-thumbnails-background)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-navigator{width:var(--tx-galleria-thumbnail-nav-button-size);height:var(--tx-galleria-thumbnail-nav-button-size);margin:0 var(--tx-galleria-thumbnail-nav-button-gutter);border-radius:var(--tx-galleria-thumbnail-nav-button-border-radius);background:transparent;color:var(--tx-galleria-thumbnail-nav-button-color);font-size:var(--tx-galleria-thumbnail-nav-button-icon-size);transition:background-color var(--tx-galleria-transition-duration),color var(--tx-galleria-transition-duration)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-navigator:not(:disabled):hover{background:var(--tx-galleria-thumbnail-nav-button-hover-background);color:var(--tx-galleria-thumbnail-nav-button-hover-color)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-navigator:disabled{opacity:.5}.tx-galleria__frame[data-styled][data-thumbnails=left] .tx-galleria__thumbnails,.tx-galleria__frame[data-styled][data-thumbnails=right] .tx-galleria__thumbnails{width:var(--tx-galleria-thumbnails-vertical-width)}.tx-galleria__frame[data-styled][data-thumbnails=left] .tx-galleria__thumbnail-navigator,.tx-galleria__frame[data-styled][data-thumbnails=right] .tx-galleria__thumbnail-navigator{margin:var(--tx-galleria-thumbnail-nav-button-gutter) 0}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-items{transition:transform calc(var(--tx-galleria-transition-duration) * 2) var(--tx-galleria-easing)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-item{padding:var(--tx-galleria-thumbnails-gap);opacity:var(--tx-galleria-thumbnails-item-opacity);transition:opacity calc(var(--tx-galleria-transition-duration) * 2)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-item:hover,.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-item.tx-galleria__thumbnail-item--active{opacity:1}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail{border-radius:var(--tx-galleria-thumbnails-item-border-radius)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail-image{border-radius:inherit}.tx-galleria__frame[data-styled] :is(.tx-galleria__navigator,.tx-galleria__thumbnail-navigator,.tx-galleria__indicator-button,.tx-galleria__thumbnail):focus-visible{outline:var(--tx-galleria-focus-ring-width) solid var(--tx-galleria-focus-ring-color);outline-offset:var(--tx-galleria-focus-ring-offset)}.tx-galleria__frame[data-styled] .tx-galleria__thumbnail:focus-visible{outline-offset:calc(var(--tx-galleria-focus-ring-width) * -1)}.tx-galleria-mask[data-styled]{background:var(--tx-galleria-mask-background);animation:tx-galleria-fade calc(var(--tx-galleria-transition-duration) * 1.5) var(--tx-galleria-easing)}.tx-galleria-mask[data-styled].tx-image-layer--leaving{animation:tx-galleria-fade-out var(--tx-galleria-transition-duration) ease-in forwards}.tx-galleria-mask[data-styled] .tx-galleria__close{top:var(--tx-galleria-close-button-gutter);right:var(--tx-galleria-close-button-gutter);width:var(--tx-galleria-close-button-size);height:var(--tx-galleria-close-button-size);border-radius:var(--tx-galleria-close-button-border-radius);background:var(--tx-galleria-close-button-background);color:var(--tx-galleria-close-button-color);font-size:var(--tx-galleria-close-button-icon-size);transition:background-color var(--tx-galleria-transition-duration),color var(--tx-galleria-transition-duration)}.tx-galleria-mask[data-styled] .tx-galleria__close:hover{background:var(--tx-galleria-close-button-hover-background);color:var(--tx-galleria-close-button-hover-color)}.tx-galleria-mask[data-styled] .tx-galleria__close:focus-visible{outline:var(--tx-galleria-focus-ring-width) solid var(--tx-galleria-focus-ring-color);outline-offset:var(--tx-galleria-focus-ring-offset)}.tx-galleria-mask[data-styled] .tx-galleria__frame{width:var(--tx-galleria-mask-frame-width);border:0;background:transparent;animation:tx-galleria-zoom calc(var(--tx-galleria-transition-duration) * 2) cubic-bezier(.16,1,.3,1)}.tx-galleria-mask[data-styled].tx-image-layer--leaving .tx-galleria__frame{animation:tx-galleria-zoom-out var(--tx-galleria-transition-duration) ease-in forwards}.tx-galleria-mask[data-styled] .tx-galleria__image{max-height:var(--tx-galleria-mask-image-max-height);object-fit:contain}.tx-galleria-mask[data-styled] .tx-galleria__thumbnails{background:transparent}.tx-galleria-mask[data-styled] .tx-galleria__thumbnail-navigator{color:var(--tx-galleria-mask-thumbnail-nav-color)}.tx-galleria-mask[data-styled] .tx-galleria__thumbnail-navigator:not(:disabled):hover{background:var(--tx-galleria-mask-thumbnail-nav-hover-background);color:var(--tx-galleria-close-button-hover-color)}@keyframes tx-galleria-fade{0%{opacity:0}}@keyframes tx-galleria-fade-out{to{opacity:0}}@keyframes tx-galleria-zoom{0%{opacity:0;scale:.7}}@keyframes tx-galleria-zoom-out{to{opacity:0;scale:.7}}@media(prefers-reduced-motion:reduce){.tx-galleria__frame[data-styled],.tx-galleria__frame[data-styled] *,.tx-galleria-mask[data-styled],.tx-galleria-mask[data-styled] *{transition:none!important;animation:none!important}}\n"]
|
|
858
|
+
}]
|
|
859
|
+
}],
|
|
860
|
+
ctorParameters: () => [],
|
|
861
|
+
propDecorators: {
|
|
862
|
+
value: [{
|
|
863
|
+
type: i0.Input,
|
|
864
|
+
args: [{
|
|
865
|
+
isSignal: true,
|
|
866
|
+
alias: "value",
|
|
867
|
+
required: false
|
|
868
|
+
}]
|
|
869
|
+
}],
|
|
870
|
+
activeIndex: [{
|
|
871
|
+
type: i0.Input,
|
|
872
|
+
args: [{
|
|
873
|
+
isSignal: true,
|
|
874
|
+
alias: "activeIndex",
|
|
875
|
+
required: false
|
|
876
|
+
}]
|
|
877
|
+
}, {
|
|
878
|
+
type: i0.Output,
|
|
879
|
+
args: ["activeIndexChange"]
|
|
880
|
+
}],
|
|
881
|
+
visible: [{
|
|
882
|
+
type: i0.Input,
|
|
883
|
+
args: [{
|
|
884
|
+
isSignal: true,
|
|
885
|
+
alias: "visible",
|
|
886
|
+
required: false
|
|
887
|
+
}]
|
|
888
|
+
}, {
|
|
889
|
+
type: i0.Output,
|
|
890
|
+
args: ["visibleChange"]
|
|
891
|
+
}],
|
|
892
|
+
fullScreen: [{
|
|
893
|
+
type: i0.Input,
|
|
894
|
+
args: [{
|
|
895
|
+
isSignal: true,
|
|
896
|
+
alias: "fullScreen",
|
|
897
|
+
required: false
|
|
898
|
+
}]
|
|
899
|
+
}],
|
|
900
|
+
numVisible: [{
|
|
901
|
+
type: i0.Input,
|
|
902
|
+
args: [{
|
|
903
|
+
isSignal: true,
|
|
904
|
+
alias: "numVisible",
|
|
905
|
+
required: false
|
|
906
|
+
}]
|
|
907
|
+
}],
|
|
908
|
+
responsiveOptions: [{
|
|
909
|
+
type: i0.Input,
|
|
910
|
+
args: [{
|
|
911
|
+
isSignal: true,
|
|
912
|
+
alias: "responsiveOptions",
|
|
913
|
+
required: false
|
|
914
|
+
}]
|
|
915
|
+
}],
|
|
916
|
+
showItemNavigators: [{
|
|
917
|
+
type: i0.Input,
|
|
918
|
+
args: [{
|
|
919
|
+
isSignal: true,
|
|
920
|
+
alias: "showItemNavigators",
|
|
921
|
+
required: false
|
|
922
|
+
}]
|
|
923
|
+
}],
|
|
924
|
+
showItemNavigatorsOnHover: [{
|
|
925
|
+
type: i0.Input,
|
|
926
|
+
args: [{
|
|
927
|
+
isSignal: true,
|
|
928
|
+
alias: "showItemNavigatorsOnHover",
|
|
929
|
+
required: false
|
|
930
|
+
}]
|
|
931
|
+
}],
|
|
932
|
+
showThumbnailNavigators: [{
|
|
933
|
+
type: i0.Input,
|
|
934
|
+
args: [{
|
|
935
|
+
isSignal: true,
|
|
936
|
+
alias: "showThumbnailNavigators",
|
|
937
|
+
required: false
|
|
938
|
+
}]
|
|
939
|
+
}],
|
|
940
|
+
showThumbnails: [{
|
|
941
|
+
type: i0.Input,
|
|
942
|
+
args: [{
|
|
943
|
+
isSignal: true,
|
|
944
|
+
alias: "showThumbnails",
|
|
945
|
+
required: false
|
|
946
|
+
}]
|
|
947
|
+
}],
|
|
948
|
+
thumbnailsPosition: [{
|
|
949
|
+
type: i0.Input,
|
|
950
|
+
args: [{
|
|
951
|
+
isSignal: true,
|
|
952
|
+
alias: "thumbnailsPosition",
|
|
953
|
+
required: false
|
|
954
|
+
}]
|
|
955
|
+
}],
|
|
956
|
+
verticalThumbnailViewPortHeight: [{
|
|
957
|
+
type: i0.Input,
|
|
958
|
+
args: [{
|
|
959
|
+
isSignal: true,
|
|
960
|
+
alias: "verticalThumbnailViewPortHeight",
|
|
961
|
+
required: false
|
|
962
|
+
}]
|
|
963
|
+
}],
|
|
964
|
+
showIndicators: [{
|
|
965
|
+
type: i0.Input,
|
|
966
|
+
args: [{
|
|
967
|
+
isSignal: true,
|
|
968
|
+
alias: "showIndicators",
|
|
969
|
+
required: false
|
|
970
|
+
}]
|
|
971
|
+
}],
|
|
972
|
+
showIndicatorsOnItem: [{
|
|
973
|
+
type: i0.Input,
|
|
974
|
+
args: [{
|
|
975
|
+
isSignal: true,
|
|
976
|
+
alias: "showIndicatorsOnItem",
|
|
977
|
+
required: false
|
|
978
|
+
}]
|
|
979
|
+
}],
|
|
980
|
+
indicatorsPosition: [{
|
|
981
|
+
type: i0.Input,
|
|
982
|
+
args: [{
|
|
983
|
+
isSignal: true,
|
|
984
|
+
alias: "indicatorsPosition",
|
|
985
|
+
required: false
|
|
986
|
+
}]
|
|
987
|
+
}],
|
|
988
|
+
changeItemOnIndicatorHover: [{
|
|
989
|
+
type: i0.Input,
|
|
990
|
+
args: [{
|
|
991
|
+
isSignal: true,
|
|
992
|
+
alias: "changeItemOnIndicatorHover",
|
|
993
|
+
required: false
|
|
994
|
+
}]
|
|
995
|
+
}],
|
|
996
|
+
circular: [{
|
|
997
|
+
type: i0.Input,
|
|
998
|
+
args: [{
|
|
999
|
+
isSignal: true,
|
|
1000
|
+
alias: "circular",
|
|
1001
|
+
required: false
|
|
1002
|
+
}]
|
|
1003
|
+
}],
|
|
1004
|
+
autoPlay: [{
|
|
1005
|
+
type: i0.Input,
|
|
1006
|
+
args: [{
|
|
1007
|
+
isSignal: true,
|
|
1008
|
+
alias: "autoPlay",
|
|
1009
|
+
required: false
|
|
1010
|
+
}]
|
|
1011
|
+
}],
|
|
1012
|
+
transitionInterval: [{
|
|
1013
|
+
type: i0.Input,
|
|
1014
|
+
args: [{
|
|
1015
|
+
isSignal: true,
|
|
1016
|
+
alias: "transitionInterval",
|
|
1017
|
+
required: false
|
|
1018
|
+
}]
|
|
1019
|
+
}],
|
|
1020
|
+
shouldStopAutoplayByClick: [{
|
|
1021
|
+
type: i0.Input,
|
|
1022
|
+
args: [{
|
|
1023
|
+
isSignal: true,
|
|
1024
|
+
alias: "shouldStopAutoplayByClick",
|
|
1025
|
+
required: false
|
|
1026
|
+
}]
|
|
1027
|
+
}],
|
|
1028
|
+
swipe: [{
|
|
1029
|
+
type: i0.Input,
|
|
1030
|
+
args: [{
|
|
1031
|
+
isSignal: true,
|
|
1032
|
+
alias: "swipe",
|
|
1033
|
+
required: false
|
|
1034
|
+
}]
|
|
1035
|
+
}],
|
|
1036
|
+
effect: [{
|
|
1037
|
+
type: i0.Input,
|
|
1038
|
+
args: [{
|
|
1039
|
+
isSignal: true,
|
|
1040
|
+
alias: "effect",
|
|
1041
|
+
required: false
|
|
1042
|
+
}]
|
|
1043
|
+
}],
|
|
1044
|
+
prevIcon: [{
|
|
1045
|
+
type: i0.Input,
|
|
1046
|
+
args: [{
|
|
1047
|
+
isSignal: true,
|
|
1048
|
+
alias: "prevIcon",
|
|
1049
|
+
required: false
|
|
1050
|
+
}]
|
|
1051
|
+
}],
|
|
1052
|
+
nextIcon: [{
|
|
1053
|
+
type: i0.Input,
|
|
1054
|
+
args: [{
|
|
1055
|
+
isSignal: true,
|
|
1056
|
+
alias: "nextIcon",
|
|
1057
|
+
required: false
|
|
1058
|
+
}]
|
|
1059
|
+
}],
|
|
1060
|
+
closeIcon: [{
|
|
1061
|
+
type: i0.Input,
|
|
1062
|
+
args: [{
|
|
1063
|
+
isSignal: true,
|
|
1064
|
+
alias: "closeIcon",
|
|
1065
|
+
required: false
|
|
1066
|
+
}]
|
|
1067
|
+
}],
|
|
1068
|
+
ariaLabel: [{
|
|
1069
|
+
type: i0.Input,
|
|
1070
|
+
args: [{
|
|
1071
|
+
isSignal: true,
|
|
1072
|
+
alias: "ariaLabel",
|
|
1073
|
+
required: false
|
|
1074
|
+
}]
|
|
1075
|
+
}],
|
|
1076
|
+
dt: [{
|
|
1077
|
+
type: i0.Input,
|
|
1078
|
+
args: [{
|
|
1079
|
+
isSignal: true,
|
|
1080
|
+
alias: "dt",
|
|
1081
|
+
required: false
|
|
1082
|
+
}]
|
|
1083
|
+
}],
|
|
1084
|
+
pt: [{
|
|
1085
|
+
type: i0.Input,
|
|
1086
|
+
args: [{
|
|
1087
|
+
isSignal: true,
|
|
1088
|
+
alias: "pt",
|
|
1089
|
+
required: false
|
|
1090
|
+
}]
|
|
1091
|
+
}],
|
|
1092
|
+
ptOptions: [{
|
|
1093
|
+
type: i0.Input,
|
|
1094
|
+
args: [{
|
|
1095
|
+
isSignal: true,
|
|
1096
|
+
alias: "ptOptions",
|
|
1097
|
+
required: false
|
|
1098
|
+
}]
|
|
1099
|
+
}],
|
|
1100
|
+
unstyled: [{
|
|
1101
|
+
type: i0.Input,
|
|
1102
|
+
args: [{
|
|
1103
|
+
isSignal: true,
|
|
1104
|
+
alias: "unstyled",
|
|
1105
|
+
required: false
|
|
1106
|
+
}]
|
|
1107
|
+
}],
|
|
1108
|
+
itemTemplate: [{
|
|
1109
|
+
type: i0.ContentChild,
|
|
1110
|
+
args: [i0.forwardRef(() => TxGalleriaItemTemplate), { isSignal: true }]
|
|
1111
|
+
}],
|
|
1112
|
+
thumbnailTemplate: [{
|
|
1113
|
+
type: i0.ContentChild,
|
|
1114
|
+
args: [i0.forwardRef(() => TxGalleriaThumbnailTemplate), { isSignal: true }]
|
|
1115
|
+
}],
|
|
1116
|
+
captionTemplate: [{
|
|
1117
|
+
type: i0.ContentChild,
|
|
1118
|
+
args: [i0.forwardRef(() => TxGalleriaCaptionTemplate), { isSignal: true }]
|
|
1119
|
+
}],
|
|
1120
|
+
indicatorTemplate: [{
|
|
1121
|
+
type: i0.ContentChild,
|
|
1122
|
+
args: [i0.forwardRef(() => TxGalleriaIndicatorTemplate), { isSignal: true }]
|
|
1123
|
+
}],
|
|
1124
|
+
header: [{
|
|
1125
|
+
type: i0.ContentChild,
|
|
1126
|
+
args: [i0.forwardRef(() => TxGalleriaHeader), { isSignal: true }]
|
|
1127
|
+
}],
|
|
1128
|
+
footer: [{
|
|
1129
|
+
type: i0.ContentChild,
|
|
1130
|
+
args: [i0.forwardRef(() => TxGalleriaFooter), { isSignal: true }]
|
|
1131
|
+
}],
|
|
1132
|
+
layerTemplate: [{
|
|
1133
|
+
type: i0.ViewChild,
|
|
1134
|
+
args: ["layer", { isSignal: true }]
|
|
1135
|
+
}]
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
export { TxGalleria, TxGalleriaCaptionTemplate, TxGalleriaFooter, TxGalleriaHeader, TxGalleriaIndicatorTemplate, TxGalleriaItemTemplate, TxGalleriaThumbnailTemplate, galleriaImage };
|
|
1139
|
+
|
|
1140
|
+
//# sourceMappingURL=tectra-ng-ui-galleria.mjs.map
|