matcha-components 20.200.0 → 20.202.0

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.
@@ -3119,7 +3119,7 @@ class MatchaButtonComponent {
3119
3119
  ngOnDestroy() {
3120
3120
  const buttons = document.querySelectorAll('.matcha-button');
3121
3121
  buttons.forEach(button => {
3122
- button.removeEventListener('click', this.addRippleEffect, false);
3122
+ button.removeEventListener('mousedown', this.addRippleEffect, false);
3123
3123
  });
3124
3124
  }
3125
3125
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaButtonComponent, deps: [{ token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
@@ -8372,11 +8372,11 @@ class MatchaTabsComponent {
8372
8372
  }
8373
8373
  }
8374
8374
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTabsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
8375
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTabsComponent, isStandalone: false, selector: "matcha-tabs", inputs: { selectedIndex: "selectedIndex", activeTabIndex: "activeTabIndex" }, outputs: { selectedIndexChange: "selectedIndexChange", selectedTabChange: "selectedTabChange", tabSelected: "tabSelected" }, host: { listeners: { "keydown": "handleKeyboardEvent($event)" } }, queries: [{ propertyName: "tabs", predicate: MatchaTabItemComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex-column gap-24 w-100-p\">\n <nav class=\"button-group overflow-auto w-100-p flex-row gap-8 list-style-none pl-0 pb-4\" role=\"tablist\">\n <button *ngFor=\"let tab of tabs; let i = index\" (click)=\"selectTabByIndex(i)\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"'tab-content-' + i\"\n [ngClass]=\"{'active': tab.active}\"\n class=\"\n border-color-{{tab.active?'accent':'surface'}} background-surface\n cursor-pointer w-100-p min-w-128 b-2 radius-8 p-8 flex-column flex-align-center gap-4 flex-space-between\"\n role=\"tab\"\n tabindex=\"{{tab.active ? 0 : -1}}\">\n <matcha-icon [name]=\"tab.icon\" color=\"accent\" size=\"md\"></matcha-icon>\n <span class=\"color-fg fw-900 fs-14 lh-16 line-clamp-2\">\n {{ tab.title }}\n </span>\n </button>\n </nav>\n\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: MatchaIconComponent, selector: "matcha-icon", inputs: ["name", "size", "color", "class", "loading"] }], animations: [...createAnimations] }); }
8375
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTabsComponent, isStandalone: false, selector: "matcha-tabs", inputs: { selectedIndex: "selectedIndex", activeTabIndex: "activeTabIndex" }, outputs: { selectedIndexChange: "selectedIndexChange", selectedTabChange: "selectedTabChange", tabSelected: "tabSelected" }, host: { listeners: { "keydown": "handleKeyboardEvent($event)" } }, queries: [{ propertyName: "tabs", predicate: MatchaTabItemComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex-column gap-outside w-100-p\">\n <nav class=\"button-group overflow-auto w-100-p flex-row gap-8 list-style-none pl-0\" role=\"tablist\">\n <button *ngFor=\"let tab of tabs; let i = index\" (click)=\"selectTabByIndex(i)\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"'tab-content-' + i\"\n [ngClass]=\"{'active': tab.active}\"\n class=\"\n border-color-{{tab.active?'accent':'surface'}} background-surface\n cursor-pointer w-100-p min-w-128 b-2 radius-8 p-8 flex-column flex-align-center gap-4 flex-space-between\"\n role=\"tab\"\n tabindex=\"{{tab.active ? 0 : -1}}\">\n <matcha-icon [name]=\"tab.icon\" color=\"accent\" size=\"md\"></matcha-icon>\n <span class=\"color-fg fw-900 fs-14 lh-16 line-clamp-2\">\n {{ tab.title }}\n </span>\n </button>\n </nav>\n\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: MatchaIconComponent, selector: "matcha-icon", inputs: ["name", "size", "color", "class", "loading"] }], animations: [...createAnimations] }); }
8376
8376
  }
8377
8377
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTabsComponent, decorators: [{
8378
8378
  type: Component,
8379
- args: [{ selector: 'matcha-tabs', animations: [...createAnimations], standalone: false, template: "<div class=\"flex-column gap-24 w-100-p\">\n <nav class=\"button-group overflow-auto w-100-p flex-row gap-8 list-style-none pl-0 pb-4\" role=\"tablist\">\n <button *ngFor=\"let tab of tabs; let i = index\" (click)=\"selectTabByIndex(i)\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"'tab-content-' + i\"\n [ngClass]=\"{'active': tab.active}\"\n class=\"\n border-color-{{tab.active?'accent':'surface'}} background-surface\n cursor-pointer w-100-p min-w-128 b-2 radius-8 p-8 flex-column flex-align-center gap-4 flex-space-between\"\n role=\"tab\"\n tabindex=\"{{tab.active ? 0 : -1}}\">\n <matcha-icon [name]=\"tab.icon\" color=\"accent\" size=\"md\"></matcha-icon>\n <span class=\"color-fg fw-900 fs-14 lh-16 line-clamp-2\">\n {{ tab.title }}\n </span>\n </button>\n </nav>\n\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
8379
+ args: [{ selector: 'matcha-tabs', animations: [...createAnimations], standalone: false, template: "<div class=\"flex-column gap-outside w-100-p\">\n <nav class=\"button-group overflow-auto w-100-p flex-row gap-8 list-style-none pl-0\" role=\"tablist\">\n <button *ngFor=\"let tab of tabs; let i = index\" (click)=\"selectTabByIndex(i)\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"'tab-content-' + i\"\n [ngClass]=\"{'active': tab.active}\"\n class=\"\n border-color-{{tab.active?'accent':'surface'}} background-surface\n cursor-pointer w-100-p min-w-128 b-2 radius-8 p-8 flex-column flex-align-center gap-4 flex-space-between\"\n role=\"tab\"\n tabindex=\"{{tab.active ? 0 : -1}}\">\n <matcha-icon [name]=\"tab.icon\" color=\"accent\" size=\"md\"></matcha-icon>\n <span class=\"color-fg fw-900 fs-14 lh-16 line-clamp-2\">\n {{ tab.title }}\n </span>\n </button>\n </nav>\n\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
8380
8380
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { tabs: [{
8381
8381
  type: ContentChildren,
8382
8382
  args: [MatchaTabItemComponent]
@@ -9081,27 +9081,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
9081
9081
  }] });
9082
9082
 
9083
9083
  class MatchaStepperControllerComponent {
9084
- constructor(stepperState) {
9084
+ constructor(stepperState, cdr) {
9085
9085
  this.stepperState = stepperState;
9086
+ this.cdr = cdr;
9086
9087
  this.steps = [];
9087
9088
  this.activeStep = 0;
9088
9089
  }
9089
9090
  ngOnInit() {
9090
- this.stepperState.steps$.subscribe((steps) => this.steps = steps);
9091
- this.stepperState.activeStep$.subscribe(step => this.activeStep = step);
9091
+ this.stepperState.steps$.subscribe((steps) => {
9092
+ this.steps = steps;
9093
+ this.cdr.detectChanges();
9094
+ });
9095
+ this.stepperState.activeStep$.subscribe(step => {
9096
+ this.activeStep = step;
9097
+ this.cdr.detectChanges();
9098
+ });
9092
9099
  }
9093
9100
  goToStep(index) {
9094
9101
  if (this.disableNext && this.activeStep < index)
9095
9102
  return;
9096
9103
  this.stepperState.setActiveStep(index);
9097
9104
  }
9098
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaStepperControllerComponent, deps: [{ token: MatchaStepperStateService }], target: i0.ɵɵFactoryTarget.Component }); }
9105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaStepperControllerComponent, deps: [{ token: MatchaStepperStateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
9099
9106
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaStepperControllerComponent, isStandalone: false, selector: "matcha-stepper-controller", inputs: { disableNext: "disableNext" }, providers: [], ngImport: i0, template: "<div class=\"flex-column flex-align-end gap-16\">\n <span class=\"fw-900 fs-12 lh-12\">{{steps[activeStep]}}</span>\n <div class=\"d-flex align-center gap-8\">\n <ng-container *ngFor=\"let step of steps; let i = index\">\n <div (click)=\"goToStep(i)\" class=\"cursor-pointer w-32 h-8 radius-8\" [class.background-accent]=\"i <= activeStep\" [class.background-disabled]=\"i > activeStep\"></div> \n </ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
9100
9107
  }
9101
9108
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaStepperControllerComponent, decorators: [{
9102
9109
  type: Component,
9103
9110
  args: [{ selector: 'matcha-stepper-controller', providers: [], standalone: false, template: "<div class=\"flex-column flex-align-end gap-16\">\n <span class=\"fw-900 fs-12 lh-12\">{{steps[activeStep]}}</span>\n <div class=\"d-flex align-center gap-8\">\n <ng-container *ngFor=\"let step of steps; let i = index\">\n <div (click)=\"goToStep(i)\" class=\"cursor-pointer w-32 h-8 radius-8\" [class.background-accent]=\"i <= activeStep\" [class.background-disabled]=\"i > activeStep\"></div> \n </ng-container>\n </div>\n</div>\n" }]
9104
- }], ctorParameters: () => [{ type: MatchaStepperStateService }], propDecorators: { disableNext: [{
9111
+ }], ctorParameters: () => [{ type: MatchaStepperStateService }, { type: i0.ChangeDetectorRef }], propDecorators: { disableNext: [{
9105
9112
  type: Input
9106
9113
  }] } });
9107
9114
 
@@ -9150,8 +9157,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
9150
9157
  }] } });
9151
9158
 
9152
9159
  class MatchaStepperContentComponent {
9153
- constructor(stepperState) {
9160
+ constructor(stepperState, cdr) {
9154
9161
  this.stepperState = stepperState;
9162
+ this.cdr = cdr;
9155
9163
  this.stepsArray = [];
9156
9164
  this.activeStep = 0;
9157
9165
  }
@@ -9160,7 +9168,10 @@ class MatchaStepperContentComponent {
9160
9168
  this.stepsSubscription = this.steps.changes.subscribe(() => {
9161
9169
  this.updateSteps();
9162
9170
  });
9163
- this.stepperState.activeStep$.subscribe(step => this.activeStep = step);
9171
+ this.stepperState.activeStep$.subscribe(step => {
9172
+ this.activeStep = step;
9173
+ this.cdr.detectChanges();
9174
+ });
9164
9175
  }
9165
9176
  ngOnDestroy() {
9166
9177
  if (this.stepsSubscription) {
@@ -9181,7 +9192,7 @@ class MatchaStepperContentComponent {
9181
9192
  prevStep() {
9182
9193
  this.stepperState.prevStep();
9183
9194
  }
9184
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaStepperContentComponent, deps: [{ token: MatchaStepperStateService }], target: i0.ɵɵFactoryTarget.Component }); }
9195
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaStepperContentComponent, deps: [{ token: MatchaStepperStateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
9185
9196
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaStepperContentComponent, isStandalone: false, selector: "matcha-stepper-content", queries: [{ propertyName: "steps", predicate: StepComponent }], ngImport: i0, template: `
9186
9197
  <ng-container *ngIf="stepsArray.length">
9187
9198
  <ng-container *ngTemplateOutlet="stepsArray[activeStep]?.template || null"></ng-container>
@@ -9199,7 +9210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
9199
9210
  `,
9200
9211
  standalone: false
9201
9212
  }]
9202
- }], ctorParameters: () => [{ type: MatchaStepperStateService }], propDecorators: { steps: [{
9213
+ }], ctorParameters: () => [{ type: MatchaStepperStateService }, { type: i0.ChangeDetectorRef }], propDecorators: { steps: [{
9203
9214
  type: ContentChildren,
9204
9215
  args: [StepComponent]
9205
9216
  }] } });