@elxjs/ui 0.0.252 → 0.0.253
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/elxjs-ui.mjs +41 -3
- package/fesm2022/elxjs-ui.mjs.map +1 -1
- package/index.d.ts +8 -1
- package/package.json +1 -1
package/fesm2022/elxjs-ui.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
|
5
5
|
import { ReactiveFormsModule, NgControl, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
6
|
import * as i1$1 from '@angular/router';
|
|
7
7
|
import { RouterModule, RouterLink } from '@angular/router';
|
|
8
|
-
import { Subject, debounceTime, Subscription } from 'rxjs';
|
|
8
|
+
import { Subject, debounceTime, interval, Subscription } from 'rxjs';
|
|
9
9
|
import * as i1$2 from '@angular/platform-browser';
|
|
10
10
|
|
|
11
11
|
class EluxIcon {
|
|
@@ -1579,6 +1579,8 @@ class EluxCarouselComponent {
|
|
|
1579
1579
|
this.gap = 16;
|
|
1580
1580
|
this.title = '';
|
|
1581
1581
|
this.theme = 'theme1';
|
|
1582
|
+
this.autoplay = false;
|
|
1583
|
+
this.autoplayInterval = 10000;
|
|
1582
1584
|
this.previousClickEventEmitter = new EventEmitter();
|
|
1583
1585
|
this.nextClickEventEmitter = new EventEmitter();
|
|
1584
1586
|
this.dotClickEventEmitter = new EventEmitter();
|
|
@@ -1599,12 +1601,14 @@ class EluxCarouselComponent {
|
|
|
1599
1601
|
this.pointerStartX = 0;
|
|
1600
1602
|
this.pointerStartY = 0;
|
|
1601
1603
|
this.pointerDownType = 'mouse';
|
|
1604
|
+
this.isHovered = false;
|
|
1602
1605
|
this.activePointerId = null;
|
|
1603
1606
|
this.pointerCaptured = false;
|
|
1604
1607
|
this.isVerticalScroll = false;
|
|
1605
1608
|
this.clicksDisabled = false;
|
|
1606
1609
|
this.clickListeners = [];
|
|
1607
1610
|
this.itemsChangesSubscription = null;
|
|
1611
|
+
this.autoplaySubscription = null;
|
|
1608
1612
|
this.hasDragged = false;
|
|
1609
1613
|
this.resizeHandler = () => this.onResize();
|
|
1610
1614
|
this.windowPointerUpHandler = (event) => this.onWindowPointerUp(event);
|
|
@@ -1620,8 +1624,25 @@ class EluxCarouselComponent {
|
|
|
1620
1624
|
this.momentumThreshold = 0.3;
|
|
1621
1625
|
this.edgeResistance = 0.3;
|
|
1622
1626
|
}
|
|
1627
|
+
configureAutoplay() {
|
|
1628
|
+
this.autoplaySubscription?.unsubscribe();
|
|
1629
|
+
this.autoplaySubscription = null;
|
|
1630
|
+
if (!this.autoplay || this.isHovered)
|
|
1631
|
+
return;
|
|
1632
|
+
this.autoplaySubscription = interval(this.autoplayInterval).subscribe(() => {
|
|
1633
|
+
if (this.getTotalSteps() <= 1)
|
|
1634
|
+
return;
|
|
1635
|
+
if (this.canGoNext()) {
|
|
1636
|
+
this.nextSlide();
|
|
1637
|
+
}
|
|
1638
|
+
else {
|
|
1639
|
+
this.goToFirstSlide();
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1623
1643
|
ngAfterContentInit() {
|
|
1624
1644
|
this.refreshLayout();
|
|
1645
|
+
this.configureAutoplay();
|
|
1625
1646
|
this.setupClickPrevention();
|
|
1626
1647
|
this.itemsChangesSubscription = this.items.changes.subscribe(() => {
|
|
1627
1648
|
this.refreshLayout();
|
|
@@ -1638,6 +1659,7 @@ class EluxCarouselComponent {
|
|
|
1638
1659
|
// Clean up click listeners
|
|
1639
1660
|
this.clickListeners.forEach(unlisten => unlisten());
|
|
1640
1661
|
this.clickListeners = [];
|
|
1662
|
+
this.autoplaySubscription?.unsubscribe();
|
|
1641
1663
|
window.removeEventListener('resize', this.resizeHandler);
|
|
1642
1664
|
}
|
|
1643
1665
|
refreshLayout() {
|
|
@@ -1682,6 +1704,18 @@ class EluxCarouselComponent {
|
|
|
1682
1704
|
this.renderer.setStyle(item.nativeElement, 'flex', `0 0 ${basis}`);
|
|
1683
1705
|
});
|
|
1684
1706
|
}
|
|
1707
|
+
onPointerEnter(event) {
|
|
1708
|
+
if (event.pointerType !== 'mouse')
|
|
1709
|
+
return;
|
|
1710
|
+
this.isHovered = true;
|
|
1711
|
+
this.configureAutoplay();
|
|
1712
|
+
}
|
|
1713
|
+
onPointerLeave(event) {
|
|
1714
|
+
if (event.pointerType !== 'mouse')
|
|
1715
|
+
return;
|
|
1716
|
+
this.isHovered = false;
|
|
1717
|
+
this.configureAutoplay();
|
|
1718
|
+
}
|
|
1685
1719
|
onPointerDown(event) {
|
|
1686
1720
|
if (event.pointerType === 'mouse' && event.button !== 0)
|
|
1687
1721
|
return;
|
|
@@ -1988,11 +2022,11 @@ class EluxCarouselComponent {
|
|
|
1988
2022
|
});
|
|
1989
2023
|
}
|
|
1990
2024
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.35", ngImport: i0, type: EluxCarouselComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1991
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.35", type: EluxCarouselComponent, isStandalone: true, selector: "lib-elux-carousel", inputs: { itemsPerSlide: "itemsPerSlide", gap: "gap", title: "title", theme: "theme" }, outputs: { previousClickEventEmitter: "previousClickEventEmitter", nextClickEventEmitter: "nextClickEventEmitter", dotClickEventEmitter: "dotClickEventEmitter" }, queries: [{ propertyName: "items", predicate: ["carouselItem"], read: ElementRef }], viewQueries: [{ propertyName: "dotsContainer", first: true, predicate: ["dotsContainer"], descendants: true }, { propertyName: "slidesContainer", first: true, predicate: ["slidesContainer"], descendants: true }], ngImport: i0, template: "<div\n class=\"c-carousel-container\"\n [class.theme-1]=\"theme === 'theme1'\"\n [class.theme-2]=\"theme === 'theme2'\"\n>\n <ng-template #prevNav>\n <button\n class=\"c-carousel-nav\"\n [class.prev]=\"true\"\n [disabled]=\"!canGoPrevious()\"\n title=\"Slide anterior\"\n aria-label=\"Slide anterior\"\n (click)=\"prevSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Left.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <ng-template #nextNav>\n <button\n class=\"c-carousel-nav\"\n [class.next]=\"true\"\n [disabled]=\"!canGoNext()\"\n title=\"Pr\u00F3ximo slide\"\n aria-label=\"Pr\u00F3ximo slide\"\n (click)=\"nextSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Right.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <div *ngIf=\"title\" class=\"c-carousel-header\">\n <div class=\"c-carousel-header-inner\">\n <div class=\"c-carousel-title\">{{ title }}</div>\n <div class=\"c-carousel-controls\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </div>\n </div>\n </div>\n <div \n class=\"c-carousel-slides\" \n #slidesContainer\n [style.transform]=\"'translateX(' + offset + '%)'\" \n [style.gap.px]=\"gap\"\n (dragstart)=\"onNativeDragStart($event)\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel($event)\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"c-carousel-footer\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n </ng-container>\n\n <div class=\"c-carousel-dots-container\">\n <div class=\"c-carousel-dots\" #dotsContainer>\n <span\n role=\"button\"\n class=\"dot\"\n *ngFor=\"let index of getStepIndexCount()\"\n (click)=\"goToSlide(index)\"\n (keyup)=\"goToSlide(index)\"\n [class.active]=\"index === getCurrentStepIndex()\"\n [attr.aria-disabled]=\"true\"\n [attr.aria-label]=\"'pagina' + (index + 1)\"\n >\n </span>\n </div>\n </div>\n\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width:768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}.c-carousel-container{position:relative;width:100%;--carousel-nav-inactive-bg: #DCE3E7;--carousel-nav-active-bg: #D6DEE3;--carousel-dot-active: #3D5275;--carousel-dot-inactive: #6F7F99}.c-carousel-container.theme-2{--carousel-nav-inactive-bg: #F0F1F2;--carousel-nav-active-bg: #E9EBED;--carousel-dot-active: #6A6A6A;--carousel-dot-inactive: #8D8D8D}.c-carousel-controls{display:flex;align-items:center;gap:12px}.c-carousel-nav{background:none;border:none;cursor:pointer;width:24px;height:24px;padding:0;border-radius:50%;background-color:var(--carousel-nav-active-bg);transition:all ease-in-out .2s;z-index:2;display:inline-flex;align-items:center;justify-content:center}.c-carousel-nav:hover:not(:disabled){transform:scale(1.2)}.c-carousel-nav:disabled{opacity:1;background-color:var(--carousel-nav-inactive-bg);cursor:not-allowed}.c-carousel-nav:disabled ::ng-deep span{opacity:.3}.c-carousel-nav:disabled:hover{transform:none}.c-carousel-nav ::ng-deep span{display:block}.c-carousel-header{margin-bottom:32px}@media(min-width:992px){.c-carousel-header{margin-bottom:40px}}.c-carousel-header .c-carousel-header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:20px;font-weight:600;line-height:24px;color:#011e41}@media(min-width:992px){.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:32px;line-height:35px}}.c-carousel-slides{display:flex;transition:transform .4s ease-out;touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none;will-change:transform}.c-carousel-slides:active{cursor:grabbing}.c-carousel-item{display:flex;flex-direction:column;text-align:center;align-items:center;justify-content:center;gap:16px;height:150px;margin:6px;border:1px solid #dee7ea;border-radius:2px;cursor:pointer;pointer-events:auto}.c-carousel-item .c-span{font-weight:400;font-size:18px;color:#011e41}.c-carousel-footer{width:min-content;margin:32px auto 0;display:flex;align-items:center;justify-content:space-between;padding:0}@media(min-width:992px){.c-carousel-footer{margin:40px auto 0}}.c-carousel-footer .c-carousel-dots-container{display:flex;align-items:center;background-color:#fff;border-radius:16px;margin:0 12px}.c-carousel-footer .c-carousel-dots{padding:6px;display:flex;align-items:center;text-align:center;max-width:120px;overflow:hidden;position:relative}@media(max-width:768px){.c-carousel-footer .c-carousel-dots{margin:0 12px;max-width:100px}}.c-carousel-footer .dot{height:7px;width:7px;margin:0 5px;background-color:var(--carousel-dot-inactive);border-radius:50%;display:inline-block;cursor:pointer;transition:all ease-in-out .2s;flex-shrink:0}.c-carousel-footer .dot:hover{background-color:#011e41}.c-carousel-footer .dot.active{width:10px;height:10px;background-color:var(--carousel-dot-active)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: EluxIcon, selector: "lib-elux-icon", inputs: ["color", "useSubscription", "icon", "description", "size", "height", "width", "sizeType"] }] }); }
|
|
2025
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.35", type: EluxCarouselComponent, isStandalone: true, selector: "lib-elux-carousel", inputs: { itemsPerSlide: "itemsPerSlide", gap: "gap", title: "title", theme: "theme", autoplay: "autoplay", autoplayInterval: "autoplayInterval" }, outputs: { previousClickEventEmitter: "previousClickEventEmitter", nextClickEventEmitter: "nextClickEventEmitter", dotClickEventEmitter: "dotClickEventEmitter" }, queries: [{ propertyName: "items", predicate: ["carouselItem"], read: ElementRef }], viewQueries: [{ propertyName: "dotsContainer", first: true, predicate: ["dotsContainer"], descendants: true }, { propertyName: "slidesContainer", first: true, predicate: ["slidesContainer"], descendants: true }], ngImport: i0, template: "<div\n class=\"c-carousel-container\"\n [class.theme-1]=\"theme === 'theme1'\"\n [class.theme-2]=\"theme === 'theme2'\"\n (pointerenter)=\"onPointerEnter($event)\"\n (pointerleave)=\"onPointerLeave($event)\"\n>\n <ng-template #prevNav>\n <button\n class=\"c-carousel-nav\"\n [class.prev]=\"true\"\n [disabled]=\"!canGoPrevious()\"\n title=\"Slide anterior\"\n aria-label=\"Slide anterior\"\n (click)=\"prevSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Left.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <ng-template #nextNav>\n <button\n class=\"c-carousel-nav\"\n [class.next]=\"true\"\n [disabled]=\"!canGoNext()\"\n title=\"Pr\u00F3ximo slide\"\n aria-label=\"Pr\u00F3ximo slide\"\n (click)=\"nextSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Right.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <div *ngIf=\"title\" class=\"c-carousel-header\">\n <div class=\"c-carousel-header-inner\">\n <div class=\"c-carousel-title\">{{ title }}</div>\n <div class=\"c-carousel-controls\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </div>\n </div>\n </div>\n <div \n class=\"c-carousel-slides\" \n #slidesContainer\n [style.transform]=\"'translateX(' + offset + '%)'\" \n [style.gap.px]=\"gap\"\n (dragstart)=\"onNativeDragStart($event)\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel($event)\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"c-carousel-footer\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n </ng-container>\n\n <div class=\"c-carousel-dots-container\">\n <div class=\"c-carousel-dots\" #dotsContainer>\n <span\n role=\"button\"\n class=\"dot\"\n *ngFor=\"let index of getStepIndexCount()\"\n (click)=\"goToSlide(index)\"\n (keyup)=\"goToSlide(index)\"\n [class.active]=\"index === getCurrentStepIndex()\"\n [attr.aria-disabled]=\"true\"\n [attr.aria-label]=\"'pagina' + (index + 1)\"\n >\n </span>\n </div>\n </div>\n\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width:768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}.c-carousel-container{position:relative;width:100%;--carousel-nav-inactive-bg: #DCE3E7;--carousel-nav-active-bg: #D6DEE3;--carousel-dot-active: #3D5275;--carousel-dot-inactive: #6F7F99}.c-carousel-container.theme-2{--carousel-nav-inactive-bg: #F0F1F2;--carousel-nav-active-bg: #E9EBED;--carousel-dot-active: #6A6A6A;--carousel-dot-inactive: #8D8D8D}.c-carousel-controls{display:flex;align-items:center;gap:12px}.c-carousel-nav{background:none;border:none;cursor:pointer;width:24px;height:24px;padding:0;border-radius:50%;background-color:var(--carousel-nav-active-bg);transition:all ease-in-out .2s;z-index:2;display:inline-flex;align-items:center;justify-content:center}.c-carousel-nav:hover:not(:disabled){transform:scale(1.2)}.c-carousel-nav:disabled{opacity:1;background-color:var(--carousel-nav-inactive-bg);cursor:not-allowed}.c-carousel-nav:disabled ::ng-deep span{opacity:.3}.c-carousel-nav:disabled:hover{transform:none}.c-carousel-nav ::ng-deep span{display:block}.c-carousel-header{margin-bottom:32px}@media(min-width:992px){.c-carousel-header{margin-bottom:40px}}.c-carousel-header .c-carousel-header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:20px;font-weight:600;line-height:24px;color:#011e41}@media(min-width:992px){.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:32px;line-height:35px}}.c-carousel-slides{display:flex;transition:transform .4s ease-out;touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none;will-change:transform}.c-carousel-slides:active{cursor:grabbing}.c-carousel-item{display:flex;flex-direction:column;text-align:center;align-items:center;justify-content:center;gap:16px;height:150px;margin:6px;border:1px solid #dee7ea;border-radius:2px;cursor:pointer;pointer-events:auto}.c-carousel-item .c-span{font-weight:400;font-size:18px;color:#011e41}.c-carousel-footer{width:min-content;margin:32px auto 0;display:flex;align-items:center;justify-content:space-between;padding:0}@media(min-width:992px){.c-carousel-footer{margin:40px auto 0}}.c-carousel-footer .c-carousel-dots-container{display:flex;align-items:center;background-color:#fff;border-radius:16px;margin:0 12px}.c-carousel-footer .c-carousel-dots{padding:6px;display:flex;align-items:center;text-align:center;max-width:120px;overflow:hidden;position:relative}@media(max-width:768px){.c-carousel-footer .c-carousel-dots{margin:0 12px;max-width:100px}}.c-carousel-footer .dot{height:7px;width:7px;margin:0 5px;background-color:var(--carousel-dot-inactive);border-radius:50%;display:inline-block;cursor:pointer;transition:all ease-in-out .2s;flex-shrink:0}.c-carousel-footer .dot:hover{background-color:#011e41}.c-carousel-footer .dot.active{width:10px;height:10px;background-color:var(--carousel-dot-active)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: EluxIcon, selector: "lib-elux-icon", inputs: ["color", "useSubscription", "icon", "description", "size", "height", "width", "sizeType"] }] }); }
|
|
1992
2026
|
}
|
|
1993
2027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.35", ngImport: i0, type: EluxCarouselComponent, decorators: [{
|
|
1994
2028
|
type: Component,
|
|
1995
|
-
args: [{ selector: 'lib-elux-carousel', imports: [CommonModule, EluxIcon], template: "<div\n class=\"c-carousel-container\"\n [class.theme-1]=\"theme === 'theme1'\"\n [class.theme-2]=\"theme === 'theme2'\"\n>\n <ng-template #prevNav>\n <button\n class=\"c-carousel-nav\"\n [class.prev]=\"true\"\n [disabled]=\"!canGoPrevious()\"\n title=\"Slide anterior\"\n aria-label=\"Slide anterior\"\n (click)=\"prevSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Left.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <ng-template #nextNav>\n <button\n class=\"c-carousel-nav\"\n [class.next]=\"true\"\n [disabled]=\"!canGoNext()\"\n title=\"Pr\u00F3ximo slide\"\n aria-label=\"Pr\u00F3ximo slide\"\n (click)=\"nextSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Right.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <div *ngIf=\"title\" class=\"c-carousel-header\">\n <div class=\"c-carousel-header-inner\">\n <div class=\"c-carousel-title\">{{ title }}</div>\n <div class=\"c-carousel-controls\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </div>\n </div>\n </div>\n <div \n class=\"c-carousel-slides\" \n #slidesContainer\n [style.transform]=\"'translateX(' + offset + '%)'\" \n [style.gap.px]=\"gap\"\n (dragstart)=\"onNativeDragStart($event)\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel($event)\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"c-carousel-footer\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n </ng-container>\n\n <div class=\"c-carousel-dots-container\">\n <div class=\"c-carousel-dots\" #dotsContainer>\n <span\n role=\"button\"\n class=\"dot\"\n *ngFor=\"let index of getStepIndexCount()\"\n (click)=\"goToSlide(index)\"\n (keyup)=\"goToSlide(index)\"\n [class.active]=\"index === getCurrentStepIndex()\"\n [attr.aria-disabled]=\"true\"\n [attr.aria-label]=\"'pagina' + (index + 1)\"\n >\n </span>\n </div>\n </div>\n\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width:768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}.c-carousel-container{position:relative;width:100%;--carousel-nav-inactive-bg: #DCE3E7;--carousel-nav-active-bg: #D6DEE3;--carousel-dot-active: #3D5275;--carousel-dot-inactive: #6F7F99}.c-carousel-container.theme-2{--carousel-nav-inactive-bg: #F0F1F2;--carousel-nav-active-bg: #E9EBED;--carousel-dot-active: #6A6A6A;--carousel-dot-inactive: #8D8D8D}.c-carousel-controls{display:flex;align-items:center;gap:12px}.c-carousel-nav{background:none;border:none;cursor:pointer;width:24px;height:24px;padding:0;border-radius:50%;background-color:var(--carousel-nav-active-bg);transition:all ease-in-out .2s;z-index:2;display:inline-flex;align-items:center;justify-content:center}.c-carousel-nav:hover:not(:disabled){transform:scale(1.2)}.c-carousel-nav:disabled{opacity:1;background-color:var(--carousel-nav-inactive-bg);cursor:not-allowed}.c-carousel-nav:disabled ::ng-deep span{opacity:.3}.c-carousel-nav:disabled:hover{transform:none}.c-carousel-nav ::ng-deep span{display:block}.c-carousel-header{margin-bottom:32px}@media(min-width:992px){.c-carousel-header{margin-bottom:40px}}.c-carousel-header .c-carousel-header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:20px;font-weight:600;line-height:24px;color:#011e41}@media(min-width:992px){.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:32px;line-height:35px}}.c-carousel-slides{display:flex;transition:transform .4s ease-out;touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none;will-change:transform}.c-carousel-slides:active{cursor:grabbing}.c-carousel-item{display:flex;flex-direction:column;text-align:center;align-items:center;justify-content:center;gap:16px;height:150px;margin:6px;border:1px solid #dee7ea;border-radius:2px;cursor:pointer;pointer-events:auto}.c-carousel-item .c-span{font-weight:400;font-size:18px;color:#011e41}.c-carousel-footer{width:min-content;margin:32px auto 0;display:flex;align-items:center;justify-content:space-between;padding:0}@media(min-width:992px){.c-carousel-footer{margin:40px auto 0}}.c-carousel-footer .c-carousel-dots-container{display:flex;align-items:center;background-color:#fff;border-radius:16px;margin:0 12px}.c-carousel-footer .c-carousel-dots{padding:6px;display:flex;align-items:center;text-align:center;max-width:120px;overflow:hidden;position:relative}@media(max-width:768px){.c-carousel-footer .c-carousel-dots{margin:0 12px;max-width:100px}}.c-carousel-footer .dot{height:7px;width:7px;margin:0 5px;background-color:var(--carousel-dot-inactive);border-radius:50%;display:inline-block;cursor:pointer;transition:all ease-in-out .2s;flex-shrink:0}.c-carousel-footer .dot:hover{background-color:#011e41}.c-carousel-footer .dot.active{width:10px;height:10px;background-color:var(--carousel-dot-active)}\n"] }]
|
|
2029
|
+
args: [{ selector: 'lib-elux-carousel', imports: [CommonModule, EluxIcon], template: "<div\n class=\"c-carousel-container\"\n [class.theme-1]=\"theme === 'theme1'\"\n [class.theme-2]=\"theme === 'theme2'\"\n (pointerenter)=\"onPointerEnter($event)\"\n (pointerleave)=\"onPointerLeave($event)\"\n>\n <ng-template #prevNav>\n <button\n class=\"c-carousel-nav\"\n [class.prev]=\"true\"\n [disabled]=\"!canGoPrevious()\"\n title=\"Slide anterior\"\n aria-label=\"Slide anterior\"\n (click)=\"prevSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Left.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <ng-template #nextNav>\n <button\n class=\"c-carousel-nav\"\n [class.next]=\"true\"\n [disabled]=\"!canGoNext()\"\n title=\"Pr\u00F3ximo slide\"\n aria-label=\"Pr\u00F3ximo slide\"\n (click)=\"nextSlide()\"\n >\n <lib-elux-icon\n [icon]=\"'Chevron_Right.svg'\"\n [size]=\"'16'\"\n [sizeType]=\"'px'\"\n [color]=\"'#020F2E'\"\n ></lib-elux-icon>\n </button>\n </ng-template>\n\n <div *ngIf=\"title\" class=\"c-carousel-header\">\n <div class=\"c-carousel-header-inner\">\n <div class=\"c-carousel-title\">{{ title }}</div>\n <div class=\"c-carousel-controls\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </div>\n </div>\n </div>\n <div \n class=\"c-carousel-slides\" \n #slidesContainer\n [style.transform]=\"'translateX(' + offset + '%)'\" \n [style.gap.px]=\"gap\"\n (dragstart)=\"onNativeDragStart($event)\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel($event)\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"c-carousel-footer\" *ngIf=\"getStepIndexCount().length > 1\">\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"prevNav\"\n ></ng-container>\n </ng-container>\n\n <div class=\"c-carousel-dots-container\">\n <div class=\"c-carousel-dots\" #dotsContainer>\n <span\n role=\"button\"\n class=\"dot\"\n *ngFor=\"let index of getStepIndexCount()\"\n (click)=\"goToSlide(index)\"\n (keyup)=\"goToSlide(index)\"\n [class.active]=\"index === getCurrentStepIndex()\"\n [attr.aria-disabled]=\"true\"\n [attr.aria-label]=\"'pagina' + (index + 1)\"\n >\n </span>\n </div>\n </div>\n\n <ng-container *ngIf=\"!title\">\n <ng-container\n *ngTemplateOutlet=\"nextNav\"\n ></ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width:768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}.c-carousel-container{position:relative;width:100%;--carousel-nav-inactive-bg: #DCE3E7;--carousel-nav-active-bg: #D6DEE3;--carousel-dot-active: #3D5275;--carousel-dot-inactive: #6F7F99}.c-carousel-container.theme-2{--carousel-nav-inactive-bg: #F0F1F2;--carousel-nav-active-bg: #E9EBED;--carousel-dot-active: #6A6A6A;--carousel-dot-inactive: #8D8D8D}.c-carousel-controls{display:flex;align-items:center;gap:12px}.c-carousel-nav{background:none;border:none;cursor:pointer;width:24px;height:24px;padding:0;border-radius:50%;background-color:var(--carousel-nav-active-bg);transition:all ease-in-out .2s;z-index:2;display:inline-flex;align-items:center;justify-content:center}.c-carousel-nav:hover:not(:disabled){transform:scale(1.2)}.c-carousel-nav:disabled{opacity:1;background-color:var(--carousel-nav-inactive-bg);cursor:not-allowed}.c-carousel-nav:disabled ::ng-deep span{opacity:.3}.c-carousel-nav:disabled:hover{transform:none}.c-carousel-nav ::ng-deep span{display:block}.c-carousel-header{margin-bottom:32px}@media(min-width:992px){.c-carousel-header{margin-bottom:40px}}.c-carousel-header .c-carousel-header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:20px;font-weight:600;line-height:24px;color:#011e41}@media(min-width:992px){.c-carousel-header .c-carousel-header-inner .c-carousel-title{font-size:32px;line-height:35px}}.c-carousel-slides{display:flex;transition:transform .4s ease-out;touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none;will-change:transform}.c-carousel-slides:active{cursor:grabbing}.c-carousel-item{display:flex;flex-direction:column;text-align:center;align-items:center;justify-content:center;gap:16px;height:150px;margin:6px;border:1px solid #dee7ea;border-radius:2px;cursor:pointer;pointer-events:auto}.c-carousel-item .c-span{font-weight:400;font-size:18px;color:#011e41}.c-carousel-footer{width:min-content;margin:32px auto 0;display:flex;align-items:center;justify-content:space-between;padding:0}@media(min-width:992px){.c-carousel-footer{margin:40px auto 0}}.c-carousel-footer .c-carousel-dots-container{display:flex;align-items:center;background-color:#fff;border-radius:16px;margin:0 12px}.c-carousel-footer .c-carousel-dots{padding:6px;display:flex;align-items:center;text-align:center;max-width:120px;overflow:hidden;position:relative}@media(max-width:768px){.c-carousel-footer .c-carousel-dots{margin:0 12px;max-width:100px}}.c-carousel-footer .dot{height:7px;width:7px;margin:0 5px;background-color:var(--carousel-dot-inactive);border-radius:50%;display:inline-block;cursor:pointer;transition:all ease-in-out .2s;flex-shrink:0}.c-carousel-footer .dot:hover{background-color:#011e41}.c-carousel-footer .dot.active{width:10px;height:10px;background-color:var(--carousel-dot-active)}\n"] }]
|
|
1996
2030
|
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { items: [{
|
|
1997
2031
|
type: ContentChildren,
|
|
1998
2032
|
args: ['carouselItem', { read: ElementRef }]
|
|
@@ -2010,6 +2044,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.35", ngImpo
|
|
|
2010
2044
|
type: Input
|
|
2011
2045
|
}], theme: [{
|
|
2012
2046
|
type: Input
|
|
2047
|
+
}], autoplay: [{
|
|
2048
|
+
type: Input
|
|
2049
|
+
}], autoplayInterval: [{
|
|
2050
|
+
type: Input
|
|
2013
2051
|
}], previousClickEventEmitter: [{
|
|
2014
2052
|
type: Output
|
|
2015
2053
|
}], nextClickEventEmitter: [{
|