@elxjs/ui 0.0.239 → 0.0.240

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.
@@ -1947,6 +1947,452 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
1947
1947
  type: Output
1948
1948
  }] } });
1949
1949
 
1950
+ class EluxCarouselD2CComponent {
1951
+ constructor(renderer) {
1952
+ this.renderer = renderer;
1953
+ this.itemsPerSlide = 4;
1954
+ this.gap = 16;
1955
+ this.title = '';
1956
+ this.theme = 'theme1';
1957
+ this.previousClickEventEmitter = new EventEmitter();
1958
+ this.nextClickEventEmitter = new EventEmitter();
1959
+ this.dotClickEventEmitter = new EventEmitter();
1960
+ this.currentStepIndex = 0;
1961
+ this.offset = 0;
1962
+ this.isDragging = false;
1963
+ this.startX = 0;
1964
+ this.currentX = 0;
1965
+ this.initialOffset = 0;
1966
+ this.dragOffset = 0;
1967
+ this.containerWidth = 0;
1968
+ this.maxOffset = 0;
1969
+ this.minOffset = 0;
1970
+ this.velocity = 0;
1971
+ this.lastMoveTime = 0;
1972
+ this.lastMoveX = 0;
1973
+ this.pointerStartTime = 0;
1974
+ this.pointerStartX = 0;
1975
+ this.pointerStartY = 0;
1976
+ this.pointerDownType = 'mouse';
1977
+ this.activePointerId = null;
1978
+ this.pointerCaptured = false;
1979
+ this.isVerticalScroll = false;
1980
+ this.clicksDisabled = false;
1981
+ this.clickListeners = [];
1982
+ this.itemsChangesSubscription = null;
1983
+ this.hasDragged = false;
1984
+ this.resizeHandler = () => this.onResize();
1985
+ this.windowPointerUpHandler = (event) => this.onWindowPointerUp(event);
1986
+ this.windowPointerCancelHandler = (event) => this.onWindowPointerCancel(event);
1987
+ this.transitionDuration = 'transform 0.4s ease-out';
1988
+ this.dragThresholdPx = 5;
1989
+ this.touchDragThresholdPx = 10;
1990
+ this.holdToDragThresholdMs = 200;
1991
+ this.touchDurationThresholdMs = 300;
1992
+ this.clickDisableDelayMs = 200;
1993
+ this.clearDraggedDelayMs = 250;
1994
+ this.slideChangeThresholdPx = 40;
1995
+ this.momentumThreshold = 0.3;
1996
+ this.edgeResistance = 0.3;
1997
+ }
1998
+ ngAfterContentInit() {
1999
+ this.refreshLayout();
2000
+ this.setupClickPrevention();
2001
+ this.itemsChangesSubscription = this.items.changes.subscribe(() => {
2002
+ this.refreshLayout();
2003
+ this.goToFirstSlide();
2004
+ this.setupClickPrevention();
2005
+ });
2006
+ // Listen for window resize to recalculate dimensions
2007
+ window.addEventListener('resize', this.resizeHandler);
2008
+ }
2009
+ ngOnDestroy() {
2010
+ this.itemsChangesSubscription?.unsubscribe();
2011
+ this.itemsChangesSubscription = null;
2012
+ this.removeWindowPointerListeners();
2013
+ // Clean up click listeners
2014
+ this.clickListeners.forEach(unlisten => unlisten());
2015
+ this.clickListeners = [];
2016
+ window.removeEventListener('resize', this.resizeHandler);
2017
+ }
2018
+ refreshLayout() {
2019
+ this.calculateDimensions();
2020
+ this.setItemWidths();
2021
+ this.updateLimits();
2022
+ }
2023
+ calculateDimensions() {
2024
+ if (this.slidesContainer) {
2025
+ this.containerWidth = this.slidesContainer.nativeElement.offsetWidth;
2026
+ }
2027
+ }
2028
+ updateLimits() {
2029
+ this.maxOffset = 0;
2030
+ this.minOffset = -((this.getTotalSteps() - 1) * this.getPageWidthPercent());
2031
+ }
2032
+ getPageWidthPercent() {
2033
+ if (!this.containerWidth)
2034
+ return 100;
2035
+ const gapPercent = (this.gap / this.containerWidth) * 100;
2036
+ return 100 + gapPercent;
2037
+ }
2038
+ getTotalSteps() {
2039
+ return Math.ceil(this.items.length / this.itemsPerSlide);
2040
+ }
2041
+ canGoNext() {
2042
+ return this.currentStepIndex < this.getTotalSteps() - 1;
2043
+ }
2044
+ canGoPrevious() {
2045
+ return this.currentStepIndex > 0;
2046
+ }
2047
+ onResize() {
2048
+ this.calculateDimensions();
2049
+ this.updateOffset();
2050
+ }
2051
+ setItemWidths() {
2052
+ const totalGap = Math.max(0, this.itemsPerSlide - 1) * this.gap;
2053
+ this.items.forEach((item) => {
2054
+ this.renderer.setStyle(item.nativeElement, 'box-sizing', 'border-box');
2055
+ const basis = `calc((100% - ${totalGap}px) / ${this.itemsPerSlide})`;
2056
+ this.renderer.setStyle(item.nativeElement, 'minWidth', basis);
2057
+ this.renderer.setStyle(item.nativeElement, 'flex', `0 0 ${basis}`);
2058
+ });
2059
+ }
2060
+ onPointerDown(event) {
2061
+ if (event.pointerType === 'mouse' && event.button !== 0)
2062
+ return;
2063
+ this.activePointerId = event.pointerId;
2064
+ this.pointerDownType = event.pointerType;
2065
+ this.pointerStartTime = Date.now();
2066
+ this.pointerStartX = event.clientX;
2067
+ this.pointerStartY = event.clientY;
2068
+ this.isVerticalScroll = false;
2069
+ this.addWindowPointerListeners();
2070
+ this.pointerCaptured = false;
2071
+ if (event.pointerType !== 'mouse' && this.slidesContainer?.nativeElement?.setPointerCapture) {
2072
+ this.slidesContainer.nativeElement.setPointerCapture(event.pointerId);
2073
+ this.pointerCaptured = true;
2074
+ }
2075
+ this.startDrag(event.clientX);
2076
+ }
2077
+ onPointerMove(event) {
2078
+ if (!this.isDragging || this.activePointerId !== event.pointerId)
2079
+ return;
2080
+ const deltaX = Math.abs(event.clientX - this.pointerStartX);
2081
+ const deltaY = Math.abs(event.clientY - this.pointerStartY);
2082
+ const isTouchLikePointer = this.pointerDownType !== 'mouse';
2083
+ const hasPassedThreshold = isTouchLikePointer
2084
+ ? deltaX > this.touchDragThresholdPx
2085
+ : deltaX > this.dragThresholdPx;
2086
+ if (isTouchLikePointer && deltaY > deltaX && deltaY > this.touchDragThresholdPx) {
2087
+ this.isVerticalScroll = true;
2088
+ this.isDragging = false;
2089
+ this.setSlidesTransition(true);
2090
+ return;
2091
+ }
2092
+ if (!hasPassedThreshold)
2093
+ return;
2094
+ event.preventDefault();
2095
+ this.updateDrag(event.clientX);
2096
+ }
2097
+ onPointerUp(event) {
2098
+ if (this.activePointerId !== event.pointerId)
2099
+ return;
2100
+ if (this.isVerticalScroll) {
2101
+ this.resetPointerState(event.pointerId);
2102
+ return;
2103
+ }
2104
+ const pressDuration = Date.now() - this.pointerStartTime;
2105
+ const pointerDistance = Math.abs(this.currentX - this.startX);
2106
+ if (this.pointerDownType === 'mouse') {
2107
+ if (pointerDistance > this.dragThresholdPx) {
2108
+ this.hasDragged = true;
2109
+ }
2110
+ }
2111
+ else if (pointerDistance > this.touchDragThresholdPx || pressDuration > this.touchDurationThresholdMs) {
2112
+ this.hasDragged = true;
2113
+ }
2114
+ if (this.isDragging) {
2115
+ this.endDrag();
2116
+ }
2117
+ this.resetPointerState(event.pointerId);
2118
+ }
2119
+ onPointerCancel(event) {
2120
+ if (this.activePointerId !== event.pointerId)
2121
+ return;
2122
+ if (this.isDragging) {
2123
+ this.cancelDrag();
2124
+ }
2125
+ this.resetPointerState(event.pointerId);
2126
+ }
2127
+ onWindowPointerUp(event) {
2128
+ if (this.activePointerId !== event.pointerId)
2129
+ return;
2130
+ if (!this.isDragging) {
2131
+ this.resetPointerState(event.pointerId);
2132
+ return;
2133
+ }
2134
+ if (this.isVerticalScroll) {
2135
+ this.resetPointerState(event.pointerId);
2136
+ return;
2137
+ }
2138
+ this.endDrag();
2139
+ this.resetPointerState(event.pointerId);
2140
+ }
2141
+ onWindowPointerCancel(event) {
2142
+ if (this.activePointerId !== event.pointerId)
2143
+ return;
2144
+ if (this.isDragging) {
2145
+ this.cancelDrag();
2146
+ }
2147
+ this.resetPointerState(event.pointerId);
2148
+ }
2149
+ onNativeDragStart(event) {
2150
+ event.preventDefault();
2151
+ }
2152
+ resetPointerState(pointerId) {
2153
+ if (this.pointerCaptured && this.slidesContainer?.nativeElement?.releasePointerCapture) {
2154
+ this.slidesContainer.nativeElement.releasePointerCapture(pointerId);
2155
+ }
2156
+ this.activePointerId = null;
2157
+ this.pointerCaptured = false;
2158
+ this.isVerticalScroll = false;
2159
+ this.removeWindowPointerListeners();
2160
+ }
2161
+ addWindowPointerListeners() {
2162
+ window.addEventListener('pointerup', this.windowPointerUpHandler, true);
2163
+ window.addEventListener('pointercancel', this.windowPointerCancelHandler, true);
2164
+ }
2165
+ removeWindowPointerListeners() {
2166
+ window.removeEventListener('pointerup', this.windowPointerUpHandler, true);
2167
+ window.removeEventListener('pointercancel', this.windowPointerCancelHandler, true);
2168
+ }
2169
+ setupClickPrevention() {
2170
+ // Clean up existing listeners
2171
+ this.clickListeners.forEach(unlisten => unlisten());
2172
+ this.clickListeners = [];
2173
+ this.items.forEach((item) => {
2174
+ // Only prevent click events, not mouseup which is needed for drag functionality
2175
+ const eventHandler = (event) => {
2176
+ if (event.type === 'click' && (this.hasDragged || this.clicksDisabled)) {
2177
+ event.preventDefault();
2178
+ event.stopPropagation();
2179
+ event.stopImmediatePropagation();
2180
+ return false;
2181
+ }
2182
+ return true;
2183
+ };
2184
+ // Use capture phase so click is blocked before card click handlers run
2185
+ item.nativeElement.addEventListener('click', eventHandler, true);
2186
+ this.clickListeners.push(() => {
2187
+ item.nativeElement.removeEventListener('click', eventHandler, true);
2188
+ });
2189
+ });
2190
+ }
2191
+ startDrag(clientX) {
2192
+ this.isDragging = true;
2193
+ this.hasDragged = false;
2194
+ this.clicksDisabled = false;
2195
+ this.startX = clientX;
2196
+ this.currentX = clientX;
2197
+ this.initialOffset = this.offset;
2198
+ this.dragOffset = 0;
2199
+ this.velocity = 0;
2200
+ this.lastMoveTime = Date.now();
2201
+ this.lastMoveX = clientX;
2202
+ this.calculateDimensions();
2203
+ // Disable CSS transitions during drag
2204
+ this.setSlidesTransition(false);
2205
+ }
2206
+ updateDrag(clientX) {
2207
+ if (!this.isDragging)
2208
+ return;
2209
+ this.currentX = clientX;
2210
+ const totalDeltaX = this.currentX - this.startX;
2211
+ // Mark as dragging if movement is significant
2212
+ if (Math.abs(totalDeltaX) > this.dragThresholdPx) {
2213
+ this.hasDragged = true;
2214
+ }
2215
+ // Calculate velocity for momentum
2216
+ const now = Date.now();
2217
+ const timeDelta = now - this.lastMoveTime;
2218
+ if (timeDelta > 0) {
2219
+ this.velocity = (clientX - this.lastMoveX) / timeDelta;
2220
+ }
2221
+ this.lastMoveTime = now;
2222
+ this.lastMoveX = clientX;
2223
+ // Convert pixel movement to percentage
2224
+ const dragPercentage = (totalDeltaX / this.containerWidth) * 100;
2225
+ if ((this.currentStepIndex === 0 && dragPercentage > 0) ||
2226
+ (!this.canGoNext() && dragPercentage < 0)) {
2227
+ this.updateOffset();
2228
+ return;
2229
+ }
2230
+ // Apply resistance at boundaries
2231
+ let resistedDragPercentage = dragPercentage;
2232
+ const potentialOffset = this.initialOffset + dragPercentage;
2233
+ if (potentialOffset > this.maxOffset) {
2234
+ const overDrag = potentialOffset - this.maxOffset;
2235
+ resistedDragPercentage = dragPercentage - (overDrag * this.edgeResistance);
2236
+ }
2237
+ else if (potentialOffset < this.minOffset) {
2238
+ const overDrag = this.minOffset - potentialOffset;
2239
+ resistedDragPercentage = dragPercentage + (overDrag * this.edgeResistance);
2240
+ }
2241
+ this.dragOffset = resistedDragPercentage;
2242
+ this.updateDragPosition();
2243
+ }
2244
+ updateDragPosition() {
2245
+ const newOffset = this.initialOffset + this.dragOffset;
2246
+ this.renderer.setStyle(this.slidesContainer.nativeElement, 'transform', `translateX(${newOffset}%)`);
2247
+ }
2248
+ endDrag() {
2249
+ if (!this.isDragging)
2250
+ return;
2251
+ this.isDragging = false;
2252
+ // Disable clicks temporarily after any drag
2253
+ if (this.hasDragged) {
2254
+ this.clicksDisabled = true;
2255
+ setTimeout(() => {
2256
+ this.clicksDisabled = false;
2257
+ }, this.clickDisableDelayMs);
2258
+ }
2259
+ // Clear the drag flag after a shorter delay
2260
+ setTimeout(() => {
2261
+ this.hasDragged = false;
2262
+ }, this.clearDraggedDelayMs);
2263
+ // Re-enable CSS transitions
2264
+ this.setSlidesTransition(true);
2265
+ const dragDistance = Math.abs(this.currentX - this.startX);
2266
+ // Check for momentum (velocity-based slide change)
2267
+ const hasSignificantVelocity = Math.abs(this.velocity) > this.momentumThreshold;
2268
+ if ((this.currentStepIndex === 0 && (this.dragOffset > 0 || this.velocity > 0)) ||
2269
+ (!this.canGoNext() && (this.dragOffset < 0 || this.velocity < 0))) {
2270
+ this.updateOffset();
2271
+ }
2272
+ else if (dragDistance > this.slideChangeThresholdPx || hasSignificantVelocity) {
2273
+ if (this.dragOffset > 0 || (hasSignificantVelocity && this.velocity > 0)) {
2274
+ // Dragged right or has positive velocity - go to previous slide
2275
+ this.prevSlide();
2276
+ }
2277
+ else if (this.dragOffset < 0 || (hasSignificantVelocity && this.velocity < 0)) {
2278
+ // Dragged left or has negative velocity - go to next slide
2279
+ this.nextSlide();
2280
+ }
2281
+ else {
2282
+ // Small drag, snap back to current position
2283
+ this.updateOffset();
2284
+ }
2285
+ }
2286
+ else {
2287
+ // Small drag, snap back to current position
2288
+ this.updateOffset();
2289
+ }
2290
+ // Reset drag state
2291
+ this.dragOffset = 0;
2292
+ this.velocity = 0;
2293
+ }
2294
+ cancelDrag() {
2295
+ if (!this.isDragging)
2296
+ return;
2297
+ this.isDragging = false;
2298
+ this.dragOffset = 0;
2299
+ this.velocity = 0;
2300
+ this.setSlidesTransition(true);
2301
+ this.updateOffset();
2302
+ }
2303
+ setSlidesTransition(enabled) {
2304
+ if (!this.slidesContainer)
2305
+ return;
2306
+ this.renderer.setStyle(this.slidesContainer.nativeElement, 'transition', enabled ? this.transitionDuration : 'none');
2307
+ }
2308
+ getStepIndexCount() {
2309
+ return Array.from({ length: this.getTotalSteps() }, (_, i) => i);
2310
+ }
2311
+ getCurrentStepIndex() {
2312
+ return this.currentStepIndex;
2313
+ }
2314
+ goToFirstSlide() {
2315
+ this.currentStepIndex = 0;
2316
+ this.updateOffset();
2317
+ this.scrollActiveDotIntoView(0);
2318
+ }
2319
+ goToSlide(index) {
2320
+ this.currentStepIndex = index;
2321
+ this.updateOffset();
2322
+ this.scrollActiveDotIntoView(index);
2323
+ this.dotClickEventEmitter.emit();
2324
+ }
2325
+ prevSlide() {
2326
+ if (!this.canGoPrevious())
2327
+ return;
2328
+ this.currentStepIndex--;
2329
+ this.updateOffset();
2330
+ this.scrollActiveDotIntoView(this.currentStepIndex);
2331
+ this.previousClickEventEmitter.emit();
2332
+ }
2333
+ nextSlide() {
2334
+ if (!this.canGoNext())
2335
+ return;
2336
+ this.currentStepIndex++;
2337
+ this.updateOffset();
2338
+ this.scrollActiveDotIntoView(this.currentStepIndex);
2339
+ this.nextClickEventEmitter.emit();
2340
+ }
2341
+ updateOffset() {
2342
+ this.offset = -(this.currentStepIndex * this.getPageWidthPercent());
2343
+ if (!this.isDragging && this.slidesContainer) {
2344
+ this.renderer.setStyle(this.slidesContainer.nativeElement, 'transform', `translateX(${this.offset}%)`);
2345
+ }
2346
+ }
2347
+ scrollActiveDotIntoView(index) {
2348
+ setTimeout(() => {
2349
+ const dotsContainer = this.dotsContainer?.nativeElement;
2350
+ if (!dotsContainer)
2351
+ return;
2352
+ const dots = dotsContainer.getElementsByClassName('dot');
2353
+ if (!dots || !dots[index])
2354
+ return;
2355
+ const activeDot = dots[index];
2356
+ const containerWidth = dotsContainer.offsetWidth;
2357
+ const dotWidth = activeDot.offsetWidth + 10;
2358
+ const scrollPosition = dotWidth * index - containerWidth / 2 + dotWidth / 2;
2359
+ dotsContainer.scrollTo({
2360
+ left: Math.max(0, scrollPosition),
2361
+ behavior: 'smooth',
2362
+ });
2363
+ });
2364
+ }
2365
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: EluxCarouselD2CComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
2366
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.30", type: EluxCarouselD2CComponent, isStandalone: true, selector: "lib-elux-carousel-d2c", 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 <div *ngIf=\"title\" class=\"c-carousel-header\">\n <div class=\"c-carousel-title\">{{ title }}</div>\n </div>\n\n <div class=\"c-carousel-body\">\n <button\n *ngIf=\"getStepIndexCount().length > 1\"\n class=\"c-carousel-nav prev\"\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\n <div class=\"c-carousel-viewport\">\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 </div>\n\n <button\n *ngIf=\"getStepIndexCount().length > 1\"\n class=\"c-carousel-nav next\"\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 </div>\n\n <div class=\"c-carousel-footer\" *ngIf=\"getStepIndexCount().length > 1\">\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 </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-header{margin-bottom:32px;text-align:center}@media(min-width:992px){.c-carousel-header{margin-bottom:40px}}.c-carousel-header .c-carousel-title{font-size:20px;font-weight:600;line-height:24px;color:#011e41}@media(min-width:992px){.c-carousel-header .c-carousel-title{font-size:32px;line-height:35px}}.c-carousel-body{position:relative;display:flex;align-items:center}.c-carousel-viewport{overflow:hidden;width:100%}.c-carousel-nav{position:absolute;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;width:48px;height:48px;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.prev{left:0;transform:translate(-50%,-50%)}.c-carousel-nav.next{right:0;transform:translate(50%,-50%)}.c-carousel-nav:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.2)}.c-carousel-nav:hover:not(:disabled).next{transform:translate(50%,-50%) 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:translate(-50%,-50%)}.c-carousel-nav:disabled:hover.next{transform:translate(50%,-50%)}.c-carousel-nav ::ng-deep span{display:block}.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:center;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}.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: "component", type: EluxIcon, selector: "lib-elux-icon", inputs: ["color", "useSubscription", "icon", "description", "size", "height", "width", "sizeType"] }] }); }
2367
+ }
2368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: EluxCarouselD2CComponent, decorators: [{
2369
+ type: Component,
2370
+ args: [{ selector: 'lib-elux-carousel-d2c', imports: [CommonModule, EluxIcon], template: "<div\n class=\"c-carousel-container\"\n [class.theme-1]=\"theme === 'theme1'\"\n [class.theme-2]=\"theme === 'theme2'\"\n>\n <div *ngIf=\"title\" class=\"c-carousel-header\">\n <div class=\"c-carousel-title\">{{ title }}</div>\n </div>\n\n <div class=\"c-carousel-body\">\n <button\n *ngIf=\"getStepIndexCount().length > 1\"\n class=\"c-carousel-nav prev\"\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\n <div class=\"c-carousel-viewport\">\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 </div>\n\n <button\n *ngIf=\"getStepIndexCount().length > 1\"\n class=\"c-carousel-nav next\"\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 </div>\n\n <div class=\"c-carousel-footer\" *ngIf=\"getStepIndexCount().length > 1\">\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 </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-header{margin-bottom:32px;text-align:center}@media(min-width:992px){.c-carousel-header{margin-bottom:40px}}.c-carousel-header .c-carousel-title{font-size:20px;font-weight:600;line-height:24px;color:#011e41}@media(min-width:992px){.c-carousel-header .c-carousel-title{font-size:32px;line-height:35px}}.c-carousel-body{position:relative;display:flex;align-items:center}.c-carousel-viewport{overflow:hidden;width:100%}.c-carousel-nav{position:absolute;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;width:48px;height:48px;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.prev{left:0;transform:translate(-50%,-50%)}.c-carousel-nav.next{right:0;transform:translate(50%,-50%)}.c-carousel-nav:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.2)}.c-carousel-nav:hover:not(:disabled).next{transform:translate(50%,-50%) 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:translate(-50%,-50%)}.c-carousel-nav:disabled:hover.next{transform:translate(50%,-50%)}.c-carousel-nav ::ng-deep span{display:block}.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:center;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}.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"] }]
2371
+ }], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { items: [{
2372
+ type: ContentChildren,
2373
+ args: ['carouselItem', { read: ElementRef }]
2374
+ }], dotsContainer: [{
2375
+ type: ViewChild,
2376
+ args: ['dotsContainer']
2377
+ }], slidesContainer: [{
2378
+ type: ViewChild,
2379
+ args: ['slidesContainer']
2380
+ }], itemsPerSlide: [{
2381
+ type: Input
2382
+ }], gap: [{
2383
+ type: Input
2384
+ }], title: [{
2385
+ type: Input
2386
+ }], theme: [{
2387
+ type: Input
2388
+ }], previousClickEventEmitter: [{
2389
+ type: Output
2390
+ }], nextClickEventEmitter: [{
2391
+ type: Output
2392
+ }], dotClickEventEmitter: [{
2393
+ type: Output
2394
+ }] } });
2395
+
1950
2396
  class EluxSwitch {
1951
2397
  constructor() {
1952
2398
  this.checked = false;
@@ -3816,6 +4262,7 @@ const ElectroluxComponents = [
3816
4262
  EluxLoading,
3817
4263
  EluxDropdownMultiple,
3818
4264
  EluxCarouselComponent,
4265
+ EluxCarouselD2CComponent,
3819
4266
  EluxSwitch,
3820
4267
  EluxChip,
3821
4268
  EluxPopover,
@@ -3823,8 +4270,8 @@ const ElectroluxComponents = [
3823
4270
 
3824
4271
  class ElectroluxDesignSystemModule {
3825
4272
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ElectroluxDesignSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3826
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: ElectroluxDesignSystemModule, imports: [CommonModule, EluxBreadcrumb, EluxButton, EluxDatepicker, EluxDropdown, EluxIcon, EluxPaginator, EluxStepBar, EluxToast, EluxDataTable, EluxAccordion, EluxModal, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxDropdownMultiple, EluxCarouselComponent, EluxSwitch, EluxChip, EluxPopover], exports: [EluxBreadcrumb, EluxButton, EluxDatepicker, EluxDropdown, EluxIcon, EluxPaginator, EluxStepBar, EluxToast, EluxDataTable, EluxAccordion, EluxModal, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxDropdownMultiple, EluxCarouselComponent, EluxSwitch, EluxChip, EluxPopover] }); }
3827
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ElectroluxDesignSystemModule, imports: [CommonModule, EluxBreadcrumb, EluxButton, EluxDatepicker, EluxDropdown, EluxIcon, EluxPaginator, EluxStepBar, EluxToast, EluxDataTable, EluxAccordion, EluxModal, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxDropdownMultiple, EluxCarouselComponent, EluxChip, EluxPopover] }); }
4273
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: ElectroluxDesignSystemModule, imports: [CommonModule, EluxBreadcrumb, EluxButton, EluxDatepicker, EluxDropdown, EluxIcon, EluxPaginator, EluxStepBar, EluxToast, EluxDataTable, EluxAccordion, EluxModal, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxDropdownMultiple, EluxCarouselComponent, EluxCarouselD2CComponent, EluxSwitch, EluxChip, EluxPopover], exports: [EluxBreadcrumb, EluxButton, EluxDatepicker, EluxDropdown, EluxIcon, EluxPaginator, EluxStepBar, EluxToast, EluxDataTable, EluxAccordion, EluxModal, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxDropdownMultiple, EluxCarouselComponent, EluxCarouselD2CComponent, EluxSwitch, EluxChip, EluxPopover] }); }
4274
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ElectroluxDesignSystemModule, imports: [CommonModule, EluxBreadcrumb, EluxButton, EluxDatepicker, EluxDropdown, EluxIcon, EluxPaginator, EluxStepBar, EluxToast, EluxDataTable, EluxAccordion, EluxModal, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxDropdownMultiple, EluxCarouselComponent, EluxCarouselD2CComponent, EluxChip, EluxPopover] }); }
3828
4275
  }
3829
4276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ElectroluxDesignSystemModule, decorators: [{
3830
4277
  type: NgModule,
@@ -3838,5 +4285,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
3838
4285
  * Generated bundle index. Do not edit.
3839
4286
  */
3840
4287
 
3841
- export { ElectroluxComponents, ElectroluxDesignSystemModule, EluxAccordion, EluxArrowLink, EluxBreadcrumb, EluxButton, EluxCard1, EluxCard2, EluxCard3, EluxCard4, EluxCardArticle, EluxCardBenefit, EluxCardEcommerce, EluxCardEcommerceVertical, EluxCardManual, EluxCardProduct, EluxCardProduct2, EluxCardRoutine, EluxCardServiceOrder, EluxCarouselBleedComponent, EluxCarouselComponent, EluxCarouselFixedComponent, EluxChip, EluxDataTable, EluxDatepicker, EluxDropdown, EluxDropdownMultiple, EluxIcon, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxLoading2, EluxModal, EluxPaginator, EluxPopover, EluxStepBar, EluxSwitch, EluxToDoList, EluxToast, ToasterService };
4288
+ export { ElectroluxComponents, ElectroluxDesignSystemModule, EluxAccordion, EluxArrowLink, EluxBreadcrumb, EluxButton, EluxCard1, EluxCard2, EluxCard3, EluxCard4, EluxCardArticle, EluxCardBenefit, EluxCardEcommerce, EluxCardEcommerceVertical, EluxCardManual, EluxCardProduct, EluxCardProduct2, EluxCardRoutine, EluxCardServiceOrder, EluxCarouselBleedComponent, EluxCarouselComponent, EluxCarouselD2CComponent, EluxCarouselFixedComponent, EluxChip, EluxDataTable, EluxDatepicker, EluxDropdown, EluxDropdownMultiple, EluxIcon, EluxInputSearchComponent, EluxInputSearchModalComponent, EluxLoading, EluxLoading2, EluxModal, EluxPaginator, EluxPopover, EluxStepBar, EluxSwitch, EluxToDoList, EluxToast, ToasterService };
3842
4289
  //# sourceMappingURL=elxjs-ui.mjs.map