ud-components 0.7.6 → 0.7.7

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1$2 from '@angular/common';
2
2
  import { CommonModule, formatDate, NgTemplateOutlet, DOCUMENT, NgClass, AsyncPipe, NgStyle, DatePipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { ViewChild, Input, CUSTOM_ELEMENTS_SCHEMA, Component, inject, EventEmitter, forwardRef, Output, HostBinding, Inject, Pipe, input, computed, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, ViewContainerRef, effect, Directive, Optional, Injectable, DestroyRef, isSignal, ContentChild, ContentChildren, output, viewChild, signal, ViewChildren, HostListener } from '@angular/core';
4
+ import { ViewChild, Input, CUSTOM_ELEMENTS_SCHEMA, Component, inject, EventEmitter, forwardRef, Output, HostBinding, signal, Inject, Pipe, input, computed, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, ViewContainerRef, effect, Directive, Optional, Injectable, DestroyRef, isSignal, ContentChild, ContentChildren, output, viewChild, ViewChildren, HostListener } from '@angular/core';
5
5
  import * as i1 from '@angular/forms';
6
6
  import { ControlContainer, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormControl, FormGroupDirective, FormGroup, Validators } from '@angular/forms';
7
7
  import { Subject, startWith, takeUntil, interval, isObservable, of, debounceTime, distinctUntilChanged, filter, map as map$1 } from 'rxjs';
@@ -320,7 +320,8 @@ var SnackbarType;
320
320
  class CustomSnackbarComponent {
321
321
  data;
322
322
  snackBarRef;
323
- progress = 100;
323
+ /** A signal so each tick schedules change detection in zoneless apps too. */
324
+ progress = signal(100);
324
325
  subscription;
325
326
  isPaused = false;
326
327
  elapsedTime = 0;
@@ -342,7 +343,7 @@ class CustomSnackbarComponent {
342
343
  if (!this.isPaused) {
343
344
  this.elapsedTime += tickInterval;
344
345
  // Calculate progress
345
- this.progress = 100 - (this.elapsedTime / this.data.duration) * 100;
346
+ this.progress.set(100 - (this.elapsedTime / this.data.duration) * 100);
346
347
  // Dismiss when time runs out
347
348
  if (this.elapsedTime >= this.data.duration) {
348
349
  this.subscription?.unsubscribe();
@@ -363,11 +364,11 @@ class CustomSnackbarComponent {
363
364
  }
364
365
  SnackbarType = SnackbarType;
365
366
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$1.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
366
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CustomSnackbarComponent, isStandalone: true, selector: "ud-custom-snackbar", ngImport: i0, template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
367
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CustomSnackbarComponent, isStandalone: true, selector: "ud-custom-snackbar", ngImport: i0, template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
367
368
  }
368
369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, decorators: [{
369
370
  type: Component,
370
- args: [{ selector: 'ud-custom-snackbar', standalone: true, imports: [CommonModule], template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"] }]
371
+ args: [{ selector: 'ud-custom-snackbar', standalone: true, imports: [CommonModule], template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"] }]
371
372
  }], ctorParameters: () => [{ type: undefined, decorators: [{
372
373
  type: Inject,
373
374
  args: [MAT_SNACK_BAR_DATA]