@tedi-design-system/angular 3.0.0 → 3.1.0-rc.1
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/fesm2022/tedi-design-system-angular-tedi.mjs +465 -5
- package/fesm2022/tedi-design-system-angular-tedi.mjs.map +1 -1
- package/package.json +1 -1
- package/tedi/components/content/carousel/carousel-content/carousel-content.component.d.ts +58 -0
- package/tedi/components/content/carousel/carousel-content/carousel-content.component.d.ts.map +1 -0
- package/tedi/components/content/carousel/carousel-footer/carousel-footer.component.d.ts +6 -0
- package/tedi/components/content/carousel/carousel-footer/carousel-footer.component.d.ts.map +1 -0
- package/tedi/components/content/carousel/carousel-header/carousel-header.component.d.ts +6 -0
- package/tedi/components/content/carousel/carousel-header/carousel-header.component.d.ts.map +1 -0
- package/tedi/components/content/carousel/carousel-indicators/carousel-indicators.component.d.ts +23 -0
- package/tedi/components/content/carousel/carousel-indicators/carousel-indicators.component.d.ts.map +1 -0
- package/tedi/components/content/carousel/carousel-navigation/carousel-navigation.component.d.ts +11 -0
- package/tedi/components/content/carousel/carousel-navigation/carousel-navigation.component.d.ts.map +1 -0
- package/tedi/components/content/carousel/carousel-slide.directive.d.ts +8 -0
- package/tedi/components/content/carousel/carousel-slide.directive.d.ts.map +1 -0
- package/tedi/components/content/carousel/carousel.component.d.ts +8 -0
- package/tedi/components/content/carousel/carousel.component.d.ts.map +1 -0
- package/tedi/components/content/carousel/index.d.ts +8 -0
- package/tedi/components/content/carousel/index.d.ts.map +1 -0
- package/tedi/components/content/index.d.ts +1 -0
- package/tedi/components/content/index.d.ts.map +1 -1
- package/tedi/components/notifications/alert/alert.component.d.ts +1 -1
- package/tedi/components/overlay/popover/popover.component.d.ts +1 -1
- package/tedi/services/breakpoint/breakpoint.service.d.ts +5 -0
- package/tedi/services/breakpoint/breakpoint.service.d.ts.map +1 -1
- package/tedi/services/translation/translation.service.d.ts +1 -1
- package/tedi/services/translation/translation.service.d.ts.map +1 -1
- package/tedi/services/translation/translations.d.ts +35 -0
- package/tedi/services/translation/translations.d.ts.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, ElementRef, signal, isSignal, Injectable, Pipe, Renderer2, model, forwardRef, ViewChild, HostBinding, Attribute, Injector, ViewContainerRef, runInInjectionContext, effect, ContentChildren, output,
|
|
2
|
+
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, ElementRef, signal, isSignal, Injectable, Pipe, Renderer2, TemplateRef, Directive, viewChild, contentChildren, HostListener, contentChild, model, forwardRef, ViewChild, HostBinding, Attribute, Injector, ViewContainerRef, runInInjectionContext, effect, ContentChildren, output, ContentChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/cdk/layout';
|
|
4
|
+
import { NgTemplateOutlet, NgClass, DOCUMENT, NgFor, NgIf } from '@angular/common';
|
|
4
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
-
import { NgClass, DOCUMENT, NgTemplateOutlet, NgFor, NgIf } from '@angular/common';
|
|
6
6
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
7
7
|
import * as i1$1 from 'ngx-float-ui';
|
|
8
8
|
import { NgxFloatUiModule } from 'ngx-float-ui';
|
|
@@ -748,6 +748,41 @@ const translationsMap = {
|
|
|
748
748
|
en: (isOpen) => (isOpen ? "Close menu" : "Open menu"),
|
|
749
749
|
ru: (isOpen) => (isOpen ? "Закрыть меню" : "Открыть меню"),
|
|
750
750
|
},
|
|
751
|
+
carousel: {
|
|
752
|
+
description: "Label for carousel",
|
|
753
|
+
components: ["CarouselContent"],
|
|
754
|
+
et: "Karussell",
|
|
755
|
+
en: "Carousel",
|
|
756
|
+
ru: "Карусель",
|
|
757
|
+
},
|
|
758
|
+
"carousel.slide": {
|
|
759
|
+
description: "Label for carousel slide",
|
|
760
|
+
components: ["CarouselContent"],
|
|
761
|
+
et: (slideNumber, totalNumber) => `Slaid ${slideNumber} / ${totalNumber}`,
|
|
762
|
+
en: (slideNumber, totalNumber) => `Slide ${slideNumber} of ${totalNumber}`,
|
|
763
|
+
ru: (slideNumber, totalNumber) => `Слайд ${slideNumber} из ${totalNumber}`,
|
|
764
|
+
},
|
|
765
|
+
"carousel.moveForward": {
|
|
766
|
+
description: "Label for carousel next button",
|
|
767
|
+
components: ["CarouselIndicators", "CarouselNavigation"],
|
|
768
|
+
et: "Liigu edasi",
|
|
769
|
+
en: "Move forward",
|
|
770
|
+
ru: "Двигаться вперед",
|
|
771
|
+
},
|
|
772
|
+
"carousel.moveBack": {
|
|
773
|
+
description: "Label for carousel previous button",
|
|
774
|
+
components: ["CarouselIndicators", "CarouselNavigation"],
|
|
775
|
+
et: "Liigu tagasi",
|
|
776
|
+
en: "Move back",
|
|
777
|
+
ru: "Двигаться назад",
|
|
778
|
+
},
|
|
779
|
+
"carousel.showSlide": {
|
|
780
|
+
description: "Label for carousel slide indicator",
|
|
781
|
+
components: ["CarouselIndicators"],
|
|
782
|
+
et: (slideNumber) => `Vaata slaidi ${slideNumber}`,
|
|
783
|
+
en: (slideNumber) => `Show slide ${slideNumber}`,
|
|
784
|
+
ru: (slideNumber) => `Показать слайд ${slideNumber}`,
|
|
785
|
+
},
|
|
751
786
|
};
|
|
752
787
|
|
|
753
788
|
class TediTranslationService {
|
|
@@ -771,12 +806,12 @@ class TediTranslationService {
|
|
|
771
806
|
}
|
|
772
807
|
track(key, ...args) {
|
|
773
808
|
return computed(() => {
|
|
774
|
-
const resolvedArgs = args.map(arg => isSignal(arg) ? arg() : arg);
|
|
809
|
+
const resolvedArgs = args.map((arg) => isSignal(arg) ? arg() : arg);
|
|
775
810
|
return this.translate(key, ...resolvedArgs);
|
|
776
811
|
});
|
|
777
812
|
}
|
|
778
813
|
addTranslations(newTranslations) {
|
|
779
|
-
this.translations.update(prev => ({ ...prev, ...newTranslations }));
|
|
814
|
+
this.translations.update((prev) => ({ ...prev, ...newTranslations }));
|
|
780
815
|
}
|
|
781
816
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TediTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
782
817
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TediTranslationService, providedIn: "root" });
|
|
@@ -1020,6 +1055,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
1020
1055
|
providedIn: "root",
|
|
1021
1056
|
}]
|
|
1022
1057
|
}], ctorParameters: () => [{ type: i1.BreakpointObserver }] });
|
|
1058
|
+
function breakpointInput(input) {
|
|
1059
|
+
if (typeof input === "object" && input !== null && "xs" in input) {
|
|
1060
|
+
return input;
|
|
1061
|
+
}
|
|
1062
|
+
return { xs: input };
|
|
1063
|
+
}
|
|
1023
1064
|
|
|
1024
1065
|
class TextGroupComponent {
|
|
1025
1066
|
type = input("horizontal");
|
|
@@ -1079,6 +1120,425 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
1079
1120
|
args: [{ selector: "tedi-text-group-value", template: `<ng-content />`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["tedi-text-group{display:block}.tedi-text-group--horizontal{display:flex;gap:1rem;align-items:flex-start}tedi-text-group-label{display:flex;width:var(--_label-width);flex-shrink:0}tedi-text-group-value{display:flex;align-items:center}tedi-text-group-value{gap:var(--text-group-value-inner-spacing-mobile)}@media (min-width: 576px){tedi-text-group-value{gap:var(--text-group-value-inner-spacing-tablet)}}@media (min-width: 992px){tedi-text-group-value{gap:var(--text-group-value-inner-spacing-desktop)}}\n"] }]
|
|
1080
1121
|
}] });
|
|
1081
1122
|
|
|
1123
|
+
class CarouselSlideDirective {
|
|
1124
|
+
template = inject(TemplateRef);
|
|
1125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselSlideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1126
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: CarouselSlideDirective, isStandalone: true, selector: "[tediCarouselSlide]", ngImport: i0 });
|
|
1127
|
+
}
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselSlideDirective, decorators: [{
|
|
1129
|
+
type: Directive,
|
|
1130
|
+
args: [{
|
|
1131
|
+
selector: "[tediCarouselSlide]",
|
|
1132
|
+
standalone: true,
|
|
1133
|
+
}]
|
|
1134
|
+
}] });
|
|
1135
|
+
|
|
1136
|
+
class CarouselContentComponent {
|
|
1137
|
+
/** Slides per view (minimum 1, can be fractional, e.g. 1.25 for peeking) */
|
|
1138
|
+
slidesPerView = input({ xs: 1 }, { transform: (v) => breakpointInput(v) });
|
|
1139
|
+
/** Gap between slides in px */
|
|
1140
|
+
gap = input({ xs: 16 }, { transform: (v) => breakpointInput(v) });
|
|
1141
|
+
/** Should carousel have fade? In mobile both left and right, in desktop only right. */
|
|
1142
|
+
fade = input(false);
|
|
1143
|
+
/** Transition duration in ms */
|
|
1144
|
+
transitionMs = input(400);
|
|
1145
|
+
translationService = inject(TediTranslationService);
|
|
1146
|
+
breakpointService = inject(BreakpointService);
|
|
1147
|
+
host = inject(ElementRef);
|
|
1148
|
+
track = viewChild.required("track");
|
|
1149
|
+
slides = contentChildren(CarouselSlideDirective);
|
|
1150
|
+
trackIndex = signal(0);
|
|
1151
|
+
animate = signal(false);
|
|
1152
|
+
viewportWidth = signal(0);
|
|
1153
|
+
windowBase = signal(0);
|
|
1154
|
+
currentSlidesPerView = computed(() => {
|
|
1155
|
+
if (this.slidesPerView().xxl &&
|
|
1156
|
+
this.breakpointService.isAboveBreakpoint("xxl")()) {
|
|
1157
|
+
return this.slidesPerView().xxl;
|
|
1158
|
+
}
|
|
1159
|
+
else if (this.slidesPerView().xl &&
|
|
1160
|
+
this.breakpointService.isAboveBreakpoint("xl")()) {
|
|
1161
|
+
return this.slidesPerView().xl;
|
|
1162
|
+
}
|
|
1163
|
+
else if (this.slidesPerView().lg &&
|
|
1164
|
+
this.breakpointService.isAboveBreakpoint("lg")()) {
|
|
1165
|
+
return this.slidesPerView().lg;
|
|
1166
|
+
}
|
|
1167
|
+
else if (this.slidesPerView().md &&
|
|
1168
|
+
this.breakpointService.isAboveBreakpoint("md")()) {
|
|
1169
|
+
return this.slidesPerView().md;
|
|
1170
|
+
}
|
|
1171
|
+
else if (this.slidesPerView().sm &&
|
|
1172
|
+
this.breakpointService.isAboveBreakpoint("sm")()) {
|
|
1173
|
+
return this.slidesPerView().sm;
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
return this.slidesPerView().xs;
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
currentGap = computed(() => {
|
|
1180
|
+
if (this.gap().xxl && this.breakpointService.isAboveBreakpoint("xxl")()) {
|
|
1181
|
+
return this.gap().xxl;
|
|
1182
|
+
}
|
|
1183
|
+
else if (this.gap().xl &&
|
|
1184
|
+
this.breakpointService.isAboveBreakpoint("xl")()) {
|
|
1185
|
+
return this.gap().xl;
|
|
1186
|
+
}
|
|
1187
|
+
else if (this.gap().lg &&
|
|
1188
|
+
this.breakpointService.isAboveBreakpoint("lg")()) {
|
|
1189
|
+
return this.gap().lg;
|
|
1190
|
+
}
|
|
1191
|
+
else if (this.gap().md &&
|
|
1192
|
+
this.breakpointService.isAboveBreakpoint("md")()) {
|
|
1193
|
+
return this.gap().md;
|
|
1194
|
+
}
|
|
1195
|
+
else if (this.gap().sm &&
|
|
1196
|
+
this.breakpointService.isAboveBreakpoint("sm")()) {
|
|
1197
|
+
return this.gap().sm;
|
|
1198
|
+
}
|
|
1199
|
+
else {
|
|
1200
|
+
return this.gap().xs;
|
|
1201
|
+
}
|
|
1202
|
+
});
|
|
1203
|
+
buffer = computed(() => this.slides().length);
|
|
1204
|
+
slideIndex = computed(() => {
|
|
1205
|
+
const slidesCount = this.slides().length;
|
|
1206
|
+
if (slidesCount === 0) {
|
|
1207
|
+
return 0;
|
|
1208
|
+
}
|
|
1209
|
+
const i = Math.floor(this.trackIndex());
|
|
1210
|
+
return ((i % slidesCount) + slidesCount) % slidesCount;
|
|
1211
|
+
});
|
|
1212
|
+
renderedIndices = computed(() => {
|
|
1213
|
+
const slidesCount = this.slides().length;
|
|
1214
|
+
if (!slidesCount) {
|
|
1215
|
+
return [];
|
|
1216
|
+
}
|
|
1217
|
+
const total = 2 * this.buffer() + Math.ceil(this.currentSlidesPerView());
|
|
1218
|
+
const start = this.windowBase() - this.buffer();
|
|
1219
|
+
return Array.from({ length: total }, (_, i) => (((start + i) % slidesCount) + slidesCount) % slidesCount);
|
|
1220
|
+
});
|
|
1221
|
+
slideFlex = computed(() => {
|
|
1222
|
+
const slidesPerView = this.currentSlidesPerView();
|
|
1223
|
+
const gap = this.currentGap();
|
|
1224
|
+
return `0 0 calc((100% - ${(slidesPerView - 1) * gap}px) / ${slidesPerView})`;
|
|
1225
|
+
});
|
|
1226
|
+
classes = computed(() => {
|
|
1227
|
+
const classList = ["tedi-carousel__content"];
|
|
1228
|
+
if (this.fade() && this.currentSlidesPerView() > 1) {
|
|
1229
|
+
classList.push("tedi-carousel__content--fade-right");
|
|
1230
|
+
}
|
|
1231
|
+
else if (this.fade() && this.currentSlidesPerView() <= 1) {
|
|
1232
|
+
classList.push("tedi-carousel__content--fade-x");
|
|
1233
|
+
}
|
|
1234
|
+
return classList.join(" ");
|
|
1235
|
+
});
|
|
1236
|
+
trackStyle = computed(() => {
|
|
1237
|
+
const slidesPerView = this.currentSlidesPerView();
|
|
1238
|
+
const gap = this.currentGap();
|
|
1239
|
+
const viewportWidth = this.viewportWidth();
|
|
1240
|
+
if (!viewportWidth) {
|
|
1241
|
+
return {
|
|
1242
|
+
gap: `${gap}px`,
|
|
1243
|
+
transform: "translate3d(0,0,0)",
|
|
1244
|
+
transition: "none",
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
const totalGapWidth = gap * (slidesPerView - 1);
|
|
1248
|
+
const slideWidth = (viewportWidth - totalGapWidth) / slidesPerView;
|
|
1249
|
+
const offsetSlides = this.trackIndex() - this.windowBase() + this.buffer();
|
|
1250
|
+
const translateX = -offsetSlides * (slideWidth + gap);
|
|
1251
|
+
return {
|
|
1252
|
+
gap: `${gap}px`,
|
|
1253
|
+
transform: `translate3d(${translateX}px, 0, 0)`,
|
|
1254
|
+
transition: this.animate()
|
|
1255
|
+
? `transform ${this.transitionMs()}ms ease`
|
|
1256
|
+
: "none",
|
|
1257
|
+
};
|
|
1258
|
+
});
|
|
1259
|
+
locked = false;
|
|
1260
|
+
dragging = false;
|
|
1261
|
+
startX = 0;
|
|
1262
|
+
startIndex = 0;
|
|
1263
|
+
ro;
|
|
1264
|
+
wheelTimeout;
|
|
1265
|
+
scrollDelta = 0;
|
|
1266
|
+
onWheel(event) {
|
|
1267
|
+
const slidesCount = this.slides().length;
|
|
1268
|
+
if (!slidesCount) {
|
|
1269
|
+
return;
|
|
1270
|
+
}
|
|
1271
|
+
const delta = Math.abs(event.deltaX) > Math.abs(event.deltaY)
|
|
1272
|
+
? event.deltaX
|
|
1273
|
+
: event.shiftKey
|
|
1274
|
+
? event.deltaY
|
|
1275
|
+
: 0;
|
|
1276
|
+
if (!delta) {
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1279
|
+
event.preventDefault();
|
|
1280
|
+
const cellWidth = (this.viewportWidth() -
|
|
1281
|
+
this.currentGap() * (this.currentSlidesPerView() - 1)) /
|
|
1282
|
+
this.currentSlidesPerView() +
|
|
1283
|
+
this.currentGap();
|
|
1284
|
+
if (!cellWidth) {
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
const deltaSlides = delta / cellWidth;
|
|
1288
|
+
this.scrollDelta += deltaSlides;
|
|
1289
|
+
const maxDelta = this.buffer() * 0.9;
|
|
1290
|
+
const min = this.windowBase() - maxDelta;
|
|
1291
|
+
const max = this.windowBase() + maxDelta;
|
|
1292
|
+
const unclamped = this.trackIndex() + deltaSlides;
|
|
1293
|
+
const clamped = Math.min(Math.max(unclamped, min), max);
|
|
1294
|
+
const wasClamped = clamped !== unclamped;
|
|
1295
|
+
this.animate.set(false);
|
|
1296
|
+
this.trackIndex.set(clamped);
|
|
1297
|
+
clearTimeout(this.wheelTimeout);
|
|
1298
|
+
this.wheelTimeout = setTimeout(() => {
|
|
1299
|
+
this.animate.set(true);
|
|
1300
|
+
const direction = Math.sign(this.scrollDelta);
|
|
1301
|
+
const current = this.trackIndex();
|
|
1302
|
+
let snapIndex = Math.round(current);
|
|
1303
|
+
if (Math.abs(this.scrollDelta) > 0.3) {
|
|
1304
|
+
snapIndex = direction > 0 ? Math.ceil(current) : Math.floor(current);
|
|
1305
|
+
}
|
|
1306
|
+
if (wasClamped) {
|
|
1307
|
+
if (current <= min)
|
|
1308
|
+
snapIndex = Math.ceil(min);
|
|
1309
|
+
if (current >= max)
|
|
1310
|
+
snapIndex = Math.floor(max);
|
|
1311
|
+
}
|
|
1312
|
+
const finalIndex = Math.min(Math.max(snapIndex, min), max);
|
|
1313
|
+
this.trackIndex.set(finalIndex);
|
|
1314
|
+
this.scrollDelta = 0;
|
|
1315
|
+
}, 120);
|
|
1316
|
+
}
|
|
1317
|
+
onKeyDown(event) {
|
|
1318
|
+
switch (event.key) {
|
|
1319
|
+
case "ArrowRight":
|
|
1320
|
+
case "PageDown":
|
|
1321
|
+
event.preventDefault();
|
|
1322
|
+
this.next();
|
|
1323
|
+
break;
|
|
1324
|
+
case "ArrowLeft":
|
|
1325
|
+
case "PageUp":
|
|
1326
|
+
event.preventDefault();
|
|
1327
|
+
this.prev();
|
|
1328
|
+
break;
|
|
1329
|
+
case "Home":
|
|
1330
|
+
event.preventDefault();
|
|
1331
|
+
this.goToIndex(0);
|
|
1332
|
+
break;
|
|
1333
|
+
case "End": {
|
|
1334
|
+
event.preventDefault();
|
|
1335
|
+
this.goToIndex(this.slides().length - 1);
|
|
1336
|
+
break;
|
|
1337
|
+
}
|
|
1338
|
+
default:
|
|
1339
|
+
break;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
onPointerDown(ev) {
|
|
1343
|
+
if (!this.slides().length) {
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
this.host.nativeElement.setPointerCapture(ev.pointerId);
|
|
1347
|
+
this.dragging = true;
|
|
1348
|
+
this.animate.set(false);
|
|
1349
|
+
this.startX = ev.clientX;
|
|
1350
|
+
this.startIndex = this.trackIndex();
|
|
1351
|
+
this.windowBase.set(Math.floor(this.startIndex));
|
|
1352
|
+
}
|
|
1353
|
+
onPointerMove(ev) {
|
|
1354
|
+
if (!this.dragging) {
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
const dx = ev.clientX - this.startX;
|
|
1358
|
+
const cellWidth = (this.viewportWidth() -
|
|
1359
|
+
this.currentGap() * (this.currentSlidesPerView() - 1)) /
|
|
1360
|
+
this.currentSlidesPerView() +
|
|
1361
|
+
this.currentGap();
|
|
1362
|
+
if (!cellWidth) {
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
const deltaSlides = dx / cellWidth;
|
|
1366
|
+
const targetIndex = this.startIndex - deltaSlides;
|
|
1367
|
+
const maxDelta = this.buffer() * 0.9;
|
|
1368
|
+
const min = this.windowBase() - maxDelta;
|
|
1369
|
+
const max = this.windowBase() + maxDelta;
|
|
1370
|
+
const clamped = Math.min(Math.max(targetIndex, min), max);
|
|
1371
|
+
this.trackIndex.set(clamped);
|
|
1372
|
+
}
|
|
1373
|
+
onPointerUp() {
|
|
1374
|
+
if (!this.dragging) {
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1377
|
+
this.dragging = false;
|
|
1378
|
+
this.animate.set(true);
|
|
1379
|
+
this.trackIndex.set(Math.round(this.trackIndex()));
|
|
1380
|
+
}
|
|
1381
|
+
ngAfterViewInit() {
|
|
1382
|
+
const viewport = this.host.nativeElement;
|
|
1383
|
+
this.viewportWidth.set(viewport.clientWidth);
|
|
1384
|
+
this.ro = new ResizeObserver(() => {
|
|
1385
|
+
this.viewportWidth.set(viewport.clientWidth);
|
|
1386
|
+
});
|
|
1387
|
+
this.ro.observe(viewport);
|
|
1388
|
+
}
|
|
1389
|
+
ngOnDestroy() {
|
|
1390
|
+
this.ro?.disconnect();
|
|
1391
|
+
}
|
|
1392
|
+
next() {
|
|
1393
|
+
if (!this.slides().length || this.locked) {
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
this.animate.set(true);
|
|
1397
|
+
this.trackIndex.update((i) => i + 1);
|
|
1398
|
+
this.lockNavigation();
|
|
1399
|
+
}
|
|
1400
|
+
prev() {
|
|
1401
|
+
if (!this.slides().length || this.locked) {
|
|
1402
|
+
return;
|
|
1403
|
+
}
|
|
1404
|
+
this.animate.set(true);
|
|
1405
|
+
this.trackIndex.update((i) => i - 1);
|
|
1406
|
+
this.lockNavigation();
|
|
1407
|
+
}
|
|
1408
|
+
goToIndex(index) {
|
|
1409
|
+
const slidesCount = this.slides().length;
|
|
1410
|
+
if (!slidesCount || this.locked) {
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
const current = this.slideIndex();
|
|
1414
|
+
const normalized = ((index % slidesCount) + slidesCount) % slidesCount;
|
|
1415
|
+
const delta = normalized - current;
|
|
1416
|
+
this.animate.set(true);
|
|
1417
|
+
this.trackIndex.update((i) => i + delta);
|
|
1418
|
+
}
|
|
1419
|
+
onTransitionEnd(e) {
|
|
1420
|
+
if (e.target !== this.track().nativeElement ||
|
|
1421
|
+
e.propertyName !== "transform" ||
|
|
1422
|
+
this.dragging) {
|
|
1423
|
+
return;
|
|
1424
|
+
}
|
|
1425
|
+
this.animate.set(false);
|
|
1426
|
+
this.windowBase.set(Math.floor(this.trackIndex()));
|
|
1427
|
+
}
|
|
1428
|
+
lockNavigation() {
|
|
1429
|
+
this.locked = true;
|
|
1430
|
+
setTimeout(() => (this.locked = false), this.transitionMs());
|
|
1431
|
+
}
|
|
1432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1433
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: CarouselContentComponent, isStandalone: true, selector: "tedi-carousel-content", inputs: { slidesPerView: { classPropertyName: "slidesPerView", publicName: "slidesPerView", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, fade: { classPropertyName: "fade", publicName: "fade", isSignal: true, isRequired: false, transformFunction: null }, transitionMs: { classPropertyName: "transitionMs", publicName: "transitionMs", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tabindex": "0", "role": "region", "aria-roledescription": "carousel", "aria-live": "off" }, listeners: { "wheel": "onWheel($event)", "keydown": "onKeyDown($event)", "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "onPointerUp()", "pointercancel": "onPointerUp()", "lostpointercapture": "onPointerUp()" }, properties: { "attr.aria-label": "translationService.track('carousel')()", "class": "classes()" } }, queries: [{ propertyName: "slides", predicate: CarouselSlideDirective, isSignal: true }], viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #track\n class=\"tedi-carousel__track\"\n [style]=\"trackStyle()\"\n (transitionend)=\"onTransitionEnd($event)\"\n>\n @for (idx of renderedIndices(); track $index) {\n <div\n class=\"tedi-carousel__slide\"\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"\n translationService.track('carousel.slide', idx + 1, slides().length)()\n \"\n [attr.aria-current]=\"idx === slideIndex() ? 'true' : null\"\n [style.flex]=\"slideFlex()\"\n >\n <ng-container *ngTemplateOutlet=\"slides()[idx].template\"></ng-container>\n </div>\n }\n</div>\n", styles: [".tedi-carousel__content{width:100%;position:relative;overflow:hidden;touch-action:pan-y;cursor:grab}.tedi-carousel__content:focus-visible{outline:var(--borders-02) solid var(--primary-500);outline-offset:calc(-1 * var(--borders-03))}.tedi-carousel__content:active{cursor:grabbing}.tedi-carousel__content--fade-right{mask-image:linear-gradient(to right,black 90%,transparent 100%)}.tedi-carousel__content--fade-x{mask-image:linear-gradient(to right,black 85%,transparent 100%),linear-gradient(to left,black 85%,transparent 100%);mask-composite:intersect}.tedi-carousel__track{display:flex;will-change:transform}.tedi-carousel__slide{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1434
|
+
}
|
|
1435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselContentComponent, decorators: [{
|
|
1436
|
+
type: Component,
|
|
1437
|
+
args: [{ standalone: true, selector: "tedi-carousel-content", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet], host: {
|
|
1438
|
+
tabindex: "0",
|
|
1439
|
+
role: "region",
|
|
1440
|
+
"aria-roledescription": "carousel",
|
|
1441
|
+
"[attr.aria-label]": "translationService.track('carousel')()",
|
|
1442
|
+
"aria-live": "off",
|
|
1443
|
+
"[class]": "classes()",
|
|
1444
|
+
}, template: "<div\n #track\n class=\"tedi-carousel__track\"\n [style]=\"trackStyle()\"\n (transitionend)=\"onTransitionEnd($event)\"\n>\n @for (idx of renderedIndices(); track $index) {\n <div\n class=\"tedi-carousel__slide\"\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"\n translationService.track('carousel.slide', idx + 1, slides().length)()\n \"\n [attr.aria-current]=\"idx === slideIndex() ? 'true' : null\"\n [style.flex]=\"slideFlex()\"\n >\n <ng-container *ngTemplateOutlet=\"slides()[idx].template\"></ng-container>\n </div>\n }\n</div>\n", styles: [".tedi-carousel__content{width:100%;position:relative;overflow:hidden;touch-action:pan-y;cursor:grab}.tedi-carousel__content:focus-visible{outline:var(--borders-02) solid var(--primary-500);outline-offset:calc(-1 * var(--borders-03))}.tedi-carousel__content:active{cursor:grabbing}.tedi-carousel__content--fade-right{mask-image:linear-gradient(to right,black 90%,transparent 100%)}.tedi-carousel__content--fade-x{mask-image:linear-gradient(to right,black 85%,transparent 100%),linear-gradient(to left,black 85%,transparent 100%);mask-composite:intersect}.tedi-carousel__track{display:flex;will-change:transform}.tedi-carousel__slide{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}\n"] }]
|
|
1445
|
+
}], propDecorators: { onWheel: [{
|
|
1446
|
+
type: HostListener,
|
|
1447
|
+
args: ["wheel", ["$event"]]
|
|
1448
|
+
}], onKeyDown: [{
|
|
1449
|
+
type: HostListener,
|
|
1450
|
+
args: ["keydown", ["$event"]]
|
|
1451
|
+
}], onPointerDown: [{
|
|
1452
|
+
type: HostListener,
|
|
1453
|
+
args: ["pointerdown", ["$event"]]
|
|
1454
|
+
}], onPointerMove: [{
|
|
1455
|
+
type: HostListener,
|
|
1456
|
+
args: ["pointermove", ["$event"]]
|
|
1457
|
+
}], onPointerUp: [{
|
|
1458
|
+
type: HostListener,
|
|
1459
|
+
args: ["pointerup"]
|
|
1460
|
+
}, {
|
|
1461
|
+
type: HostListener,
|
|
1462
|
+
args: ["pointercancel"]
|
|
1463
|
+
}, {
|
|
1464
|
+
type: HostListener,
|
|
1465
|
+
args: ["lostpointercapture"]
|
|
1466
|
+
}] } });
|
|
1467
|
+
|
|
1468
|
+
class CarouselComponent {
|
|
1469
|
+
carouselContent = contentChild.required(CarouselContentComponent);
|
|
1470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: CarouselComponent, isStandalone: true, selector: "tedi-carousel", queries: [{ propertyName: "carouselContent", first: true, predicate: CarouselContentComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content select=\"tedi-carousel-header\" />\n<ng-content select=\"tedi-carousel-content\" />\n<ng-content select=\"tedi-carousel-footer\" />\n", styles: ["tedi-carousel{display:flex;flex-direction:column}tedi-carousel{gap:var(--layout-grid-gutters-08-mobile)}@media (min-width: 576px){tedi-carousel{gap:var(--layout-grid-gutters-08-tablet)}}@media (min-width: 992px){tedi-carousel{gap:var(--layout-grid-gutters-08-desktop)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1472
|
+
}
|
|
1473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
1474
|
+
type: Component,
|
|
1475
|
+
args: [{ standalone: true, selector: "tedi-carousel", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"tedi-carousel-header\" />\n<ng-content select=\"tedi-carousel-content\" />\n<ng-content select=\"tedi-carousel-footer\" />\n", styles: ["tedi-carousel{display:flex;flex-direction:column}tedi-carousel{gap:var(--layout-grid-gutters-08-mobile)}@media (min-width: 576px){tedi-carousel{gap:var(--layout-grid-gutters-08-tablet)}}@media (min-width: 992px){tedi-carousel{gap:var(--layout-grid-gutters-08-desktop)}}\n"] }]
|
|
1476
|
+
}] });
|
|
1477
|
+
|
|
1478
|
+
class CarouselFooterComponent {
|
|
1479
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1480
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: CarouselFooterComponent, isStandalone: true, selector: "tedi-carousel-footer", ngImport: i0, template: "<ng-content />", isInline: true, styles: ["tedi-carousel-footer{display:flex;align-items:center;justify-content:space-between}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1481
|
+
}
|
|
1482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselFooterComponent, decorators: [{
|
|
1483
|
+
type: Component,
|
|
1484
|
+
args: [{ standalone: true, selector: "tedi-carousel-footer", template: "<ng-content />", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["tedi-carousel-footer{display:flex;align-items:center;justify-content:space-between}\n"] }]
|
|
1485
|
+
}] });
|
|
1486
|
+
|
|
1487
|
+
class CarouselHeaderComponent {
|
|
1488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1489
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: CarouselHeaderComponent, isStandalone: true, selector: "tedi-carousel-header", ngImport: i0, template: "<ng-content />", isInline: true, styles: ["tedi-carousel-header{display:flex;align-items:flex-end;justify-content:space-between}tedi-carousel-header{gap:var(--layout-grid-gutters-16-mobile)}@media (min-width: 576px){tedi-carousel-header{gap:var(--layout-grid-gutters-16-tablet)}}@media (min-width: 992px){tedi-carousel-header{gap:var(--layout-grid-gutters-16-desktop)}}tedi-carousel-header{padding-bottom:var(--layout-grid-gutters-08-mobile)}@media (min-width: 576px){tedi-carousel-header{padding-bottom:var(--layout-grid-gutters-08-tablet)}}@media (min-width: 992px){tedi-carousel-header{padding-bottom:var(--layout-grid-gutters-08-desktop)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1490
|
+
}
|
|
1491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselHeaderComponent, decorators: [{
|
|
1492
|
+
type: Component,
|
|
1493
|
+
args: [{ standalone: true, selector: "tedi-carousel-header", template: "<ng-content />", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["tedi-carousel-header{display:flex;align-items:flex-end;justify-content:space-between}tedi-carousel-header{gap:var(--layout-grid-gutters-16-mobile)}@media (min-width: 576px){tedi-carousel-header{gap:var(--layout-grid-gutters-16-tablet)}}@media (min-width: 992px){tedi-carousel-header{gap:var(--layout-grid-gutters-16-desktop)}}tedi-carousel-header{padding-bottom:var(--layout-grid-gutters-08-mobile)}@media (min-width: 576px){tedi-carousel-header{padding-bottom:var(--layout-grid-gutters-08-tablet)}}@media (min-width: 992px){tedi-carousel-header{padding-bottom:var(--layout-grid-gutters-08-desktop)}}\n"] }]
|
|
1494
|
+
}] });
|
|
1495
|
+
|
|
1496
|
+
class CarouselIndicatorsComponent {
|
|
1497
|
+
/** Should show indicators with arrows? If yes, don't use carousel-navigation component */
|
|
1498
|
+
withArrows = input(false);
|
|
1499
|
+
/** Variant of indicators (dots and numbers) */
|
|
1500
|
+
variant = input("dots");
|
|
1501
|
+
translationService = inject(TediTranslationService);
|
|
1502
|
+
carousel = inject(CarouselComponent);
|
|
1503
|
+
indicatorsArray = computed(() => Array.from({ length: this.carousel.carouselContent().slides().length }, (_, i) => ({
|
|
1504
|
+
index: i,
|
|
1505
|
+
active: this.carousel.carouselContent().slideIndex() === i,
|
|
1506
|
+
})));
|
|
1507
|
+
activeSlideNumber = computed(() => this.carousel.carouselContent().slideIndex() + 1);
|
|
1508
|
+
handleNext() {
|
|
1509
|
+
this.carousel.carouselContent().next();
|
|
1510
|
+
}
|
|
1511
|
+
handlePrev() {
|
|
1512
|
+
this.carousel.carouselContent().prev();
|
|
1513
|
+
}
|
|
1514
|
+
handleIndicatorClick(index) {
|
|
1515
|
+
this.carousel.carouselContent().goToIndex(index);
|
|
1516
|
+
}
|
|
1517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselIndicatorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1518
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: CarouselIndicatorsComponent, isStandalone: true, selector: "tedi-carousel-indicators", inputs: { withArrows: { classPropertyName: "withArrows", publicName: "withArrows", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (withArrows()) {\n <button\n tedi-button\n type=\"button\"\n variant=\"neutral\"\n [attr.aria-label]=\"translationService.track('carousel.moveBack')()\"\n (click)=\"handlePrev()\"\n >\n <tedi-icon name=\"arrow_back\" [size]=\"18\" />\n </button>\n}\n\n@if (variant() === \"dots\") {\n @for (indicator of indicatorsArray(); track indicator.index) {\n <button\n type=\"button\"\n class=\"tedi-carousel__indicator\"\n [attr.aria-label]=\"\n translationService.track('carousel.showSlide', indicator.index + 1)()\n \"\n [ngClass]=\"indicator.active ? 'tedi-carousel__indicator--active' : null\"\n (click)=\"handleIndicatorClick(indicator.index)\"\n ></button>\n }\n} @else if (activeSlideNumber()) {\n <div>\n <b tedi-text color=\"brand\">{{ activeSlideNumber() }}</b>\n <span tedi-text color=\"tertiary\"> / {{ indicatorsArray().length }}</span>\n </div>\n}\n\n@if (withArrows()) {\n <button\n tedi-button\n type=\"button\"\n variant=\"neutral\"\n [attr.aria-label]=\"translationService.track('carousel.moveForward')()\"\n (click)=\"handleNext()\"\n >\n <tedi-icon name=\"arrow_forward\" [size]=\"18\" />\n </button>\n}\n", styles: ["tedi-carousel-indicators{display:flex;align-items:center;min-height:24px}tedi-carousel-indicators{gap:var(--layout-grid-gutters-04-mobile)}@media (min-width: 576px){tedi-carousel-indicators{gap:var(--layout-grid-gutters-04-tablet)}}@media (min-width: 992px){tedi-carousel-indicators{gap:var(--layout-grid-gutters-04-desktop)}}.tedi-carousel__indicator{width:22px;height:8px;border-radius:100px;border:1px solid var(--primary-600);background-color:transparent;cursor:pointer}.tedi-carousel__indicator:hover{border-color:var(--primary-700)}.tedi-carousel__indicator:active{border-color:var(--primary-800);background-color:var(--primary-800)}.tedi-carousel__indicator:focus-visible{outline:var(--borders-02) solid var(--primary-500);outline-offset:var(--borders-01)}.tedi-carousel__indicator--active{background-color:var(--primary-600)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "[tedi-button]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "tedi-icon", inputs: ["name", "size", "color", "background", "variant", "type", "label"] }, { kind: "component", type: TextComponent, selector: "[tedi-text]", inputs: ["modifiers", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1519
|
+
}
|
|
1520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselIndicatorsComponent, decorators: [{
|
|
1521
|
+
type: Component,
|
|
1522
|
+
args: [{ standalone: true, selector: "tedi-carousel-indicators", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgClass, ButtonComponent, IconComponent, TextComponent], template: "@if (withArrows()) {\n <button\n tedi-button\n type=\"button\"\n variant=\"neutral\"\n [attr.aria-label]=\"translationService.track('carousel.moveBack')()\"\n (click)=\"handlePrev()\"\n >\n <tedi-icon name=\"arrow_back\" [size]=\"18\" />\n </button>\n}\n\n@if (variant() === \"dots\") {\n @for (indicator of indicatorsArray(); track indicator.index) {\n <button\n type=\"button\"\n class=\"tedi-carousel__indicator\"\n [attr.aria-label]=\"\n translationService.track('carousel.showSlide', indicator.index + 1)()\n \"\n [ngClass]=\"indicator.active ? 'tedi-carousel__indicator--active' : null\"\n (click)=\"handleIndicatorClick(indicator.index)\"\n ></button>\n }\n} @else if (activeSlideNumber()) {\n <div>\n <b tedi-text color=\"brand\">{{ activeSlideNumber() }}</b>\n <span tedi-text color=\"tertiary\"> / {{ indicatorsArray().length }}</span>\n </div>\n}\n\n@if (withArrows()) {\n <button\n tedi-button\n type=\"button\"\n variant=\"neutral\"\n [attr.aria-label]=\"translationService.track('carousel.moveForward')()\"\n (click)=\"handleNext()\"\n >\n <tedi-icon name=\"arrow_forward\" [size]=\"18\" />\n </button>\n}\n", styles: ["tedi-carousel-indicators{display:flex;align-items:center;min-height:24px}tedi-carousel-indicators{gap:var(--layout-grid-gutters-04-mobile)}@media (min-width: 576px){tedi-carousel-indicators{gap:var(--layout-grid-gutters-04-tablet)}}@media (min-width: 992px){tedi-carousel-indicators{gap:var(--layout-grid-gutters-04-desktop)}}.tedi-carousel__indicator{width:22px;height:8px;border-radius:100px;border:1px solid var(--primary-600);background-color:transparent;cursor:pointer}.tedi-carousel__indicator:hover{border-color:var(--primary-700)}.tedi-carousel__indicator:active{border-color:var(--primary-800);background-color:var(--primary-800)}.tedi-carousel__indicator:focus-visible{outline:var(--borders-02) solid var(--primary-500);outline-offset:var(--borders-01)}.tedi-carousel__indicator--active{background-color:var(--primary-600)}\n"] }]
|
|
1523
|
+
}] });
|
|
1524
|
+
|
|
1525
|
+
class CarouselNavigationComponent {
|
|
1526
|
+
translationService = inject(TediTranslationService);
|
|
1527
|
+
carousel = inject(CarouselComponent);
|
|
1528
|
+
handleNext() {
|
|
1529
|
+
this.carousel.carouselContent().next();
|
|
1530
|
+
}
|
|
1531
|
+
handlePrev() {
|
|
1532
|
+
this.carousel.carouselContent().prev();
|
|
1533
|
+
}
|
|
1534
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1535
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: CarouselNavigationComponent, isStandalone: true, selector: "tedi-carousel-navigation", ngImport: i0, template: "<button\n tedi-button\n type=\"button\"\n variant=\"secondary\"\n [attr.aria-label]=\"translationService.track('carousel.moveBack')()\"\n (click)=\"handlePrev()\"\n>\n <tedi-icon name=\"arrow_back\" [size]=\"18\" />\n</button>\n<button\n tedi-button\n type=\"button\"\n variant=\"secondary\"\n [attr.aria-label]=\"translationService.track('carousel.moveForward')()\"\n (click)=\"handleNext()\"\n>\n <tedi-icon name=\"arrow_forward\" [size]=\"18\" />\n</button>\n", styles: ["tedi-carousel-navigation{display:flex;align-items:center}tedi-carousel-navigation{gap:var(--layout-grid-gutters-08-mobile)}@media (min-width: 576px){tedi-carousel-navigation{gap:var(--layout-grid-gutters-08-tablet)}}@media (min-width: 992px){tedi-carousel-navigation{gap:var(--layout-grid-gutters-08-desktop)}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "[tedi-button]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "tedi-icon", inputs: ["name", "size", "color", "background", "variant", "type", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1536
|
+
}
|
|
1537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CarouselNavigationComponent, decorators: [{
|
|
1538
|
+
type: Component,
|
|
1539
|
+
args: [{ standalone: true, selector: "tedi-carousel-navigation", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ButtonComponent, IconComponent], template: "<button\n tedi-button\n type=\"button\"\n variant=\"secondary\"\n [attr.aria-label]=\"translationService.track('carousel.moveBack')()\"\n (click)=\"handlePrev()\"\n>\n <tedi-icon name=\"arrow_back\" [size]=\"18\" />\n</button>\n<button\n tedi-button\n type=\"button\"\n variant=\"secondary\"\n [attr.aria-label]=\"translationService.track('carousel.moveForward')()\"\n (click)=\"handleNext()\"\n>\n <tedi-icon name=\"arrow_forward\" [size]=\"18\" />\n</button>\n", styles: ["tedi-carousel-navigation{display:flex;align-items:center}tedi-carousel-navigation{gap:var(--layout-grid-gutters-08-mobile)}@media (min-width: 576px){tedi-carousel-navigation{gap:var(--layout-grid-gutters-08-tablet)}}@media (min-width: 992px){tedi-carousel-navigation{gap:var(--layout-grid-gutters-08-desktop)}}\n"] }]
|
|
1540
|
+
}] });
|
|
1541
|
+
|
|
1082
1542
|
class FeedbackTextComponent {
|
|
1083
1543
|
/**
|
|
1084
1544
|
* Helper text
|
|
@@ -3131,5 +3591,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
3131
3591
|
* Generated bundle index. Do not edit.
|
|
3132
3592
|
*/
|
|
3133
3593
|
|
|
3134
|
-
export { AlertComponent, BREAKPOINTS, BreakpointService, ButtonComponent, ClosingButtonComponent, ColComponent, CollapseComponent, FeedbackTextComponent, FooterBodyComponent, FooterBottomComponent, FooterComponent, FooterSectionComponent, FooterSideComponent, HeaderActionsComponent, HeaderComponent, HeaderContentComponent, HeaderLanguageComponent, HeaderLoginComponent, HeaderLogoutComponent, HeaderProfileComponent, HeaderRoleComponent, HideAtDirective, IconComponent, InfoButtonComponent, LabelComponent, LinkComponent, ListComponent, NumberFieldComponent, PopoverComponent, PopoverContentComponent, PopoverTriggerComponent, RowComponent, SeparatorComponent, ShowAtDirective, SideNavComponent, SideNavDropdownComponent, SideNavDropdownGroupComponent, SideNavDropdownItemComponent, SideNavGroupTitleComponent, SideNavItemComponent, SideNavOverlayComponent, SideNavToggleComponent, SpinnerComponent, TOOLTIP_ARROW_OFFSET, TOOLTIP_TIMEOUT_MS, TediTranslationPipe, TediTranslationService, TextComponent, TextGroupComponent, TextGroupLabelComponent, TextGroupValueComponent, TimelineComponent, TimelineDescriptionComponent, TimelineItemComponent, TimelineTitleComponent, ToggleComponent, TooltipComponent, TooltipContentComponent, TooltipTriggerComponent, VerticalSpacingDirective, VerticalSpacingItemDirective, generateUUID };
|
|
3594
|
+
export { AlertComponent, BREAKPOINTS, BreakpointService, ButtonComponent, CarouselComponent, CarouselContentComponent, CarouselFooterComponent, CarouselHeaderComponent, CarouselIndicatorsComponent, CarouselNavigationComponent, CarouselSlideDirective, ClosingButtonComponent, ColComponent, CollapseComponent, FeedbackTextComponent, FooterBodyComponent, FooterBottomComponent, FooterComponent, FooterSectionComponent, FooterSideComponent, HeaderActionsComponent, HeaderComponent, HeaderContentComponent, HeaderLanguageComponent, HeaderLoginComponent, HeaderLogoutComponent, HeaderProfileComponent, HeaderRoleComponent, HideAtDirective, IconComponent, InfoButtonComponent, LabelComponent, LinkComponent, ListComponent, NumberFieldComponent, PopoverComponent, PopoverContentComponent, PopoverTriggerComponent, RowComponent, SeparatorComponent, ShowAtDirective, SideNavComponent, SideNavDropdownComponent, SideNavDropdownGroupComponent, SideNavDropdownItemComponent, SideNavGroupTitleComponent, SideNavItemComponent, SideNavOverlayComponent, SideNavToggleComponent, SpinnerComponent, TOOLTIP_ARROW_OFFSET, TOOLTIP_TIMEOUT_MS, TediTranslationPipe, TediTranslationService, TextComponent, TextGroupComponent, TextGroupLabelComponent, TextGroupValueComponent, TimelineComponent, TimelineDescriptionComponent, TimelineItemComponent, TimelineTitleComponent, ToggleComponent, TooltipComponent, TooltipContentComponent, TooltipTriggerComponent, VerticalSpacingDirective, VerticalSpacingItemDirective, breakpointInput, generateUUID };
|
|
3135
3595
|
//# sourceMappingURL=tedi-design-system-angular-tedi.mjs.map
|