matcha-components 19.26.0 → 19.27.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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ElementRef, Renderer2, Component, Inject, Input, EventEmitter, Output, ContentChild, ContentChildren, HostListener, Directive, NgModule } from '@angular/core';
2
+ import { ElementRef, Renderer2, Component, Inject, Input, EventEmitter, Output, ContentChild, ContentChildren, HostBinding, HostListener, Directive, NgModule } from '@angular/core';
3
3
  import { animation, style, animate, trigger, transition, useAnimation, state, query, stagger, animateChild, sequence, group } from '@angular/animations';
4
4
  import { Subscription, Subject } from 'rxjs';
5
5
  import { debounceTime } from 'rxjs/operators';
@@ -248,12 +248,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
248
248
  // button-group.component.ts
249
249
  class MatchaButtonGroupComponent {
250
250
  constructor() {
251
- // Define se é possível selecionar múltiplos botões
252
- this.multiple = false;
251
+ this._multiple = false;
253
252
  // Cores para os estados ativo e inativo
254
253
  this.activeColor = 'blue';
255
254
  this.inactiveColor = 'grey';
256
255
  }
256
+ get multiple() {
257
+ return this._multiple;
258
+ }
259
+ set multiple(value) {
260
+ // Converte string 'false' para boolean false
261
+ // Qualquer outro valor string será convertido para true
262
+ this._multiple = value === 'false' ? false : Boolean(value);
263
+ }
257
264
  ngAfterContentInit() {
258
265
  console.log(this.buttonItems, 'estou funcionando');
259
266
  // Inicializa cada button-item com o estado inativo
@@ -1388,24 +1395,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1388
1395
 
1389
1396
  class MatchaModalComponent {
1390
1397
  constructor() {
1391
- this.elevation = 0;
1392
1398
  this.class = '';
1393
1399
  }
1394
1400
  get classes() {
1395
- const elevation = `elevation-z-${this.elevation}`;
1396
- const activeClasses = `background-surface radius-8 ${elevation} ${this.class}`;
1401
+ const activeClasses = `background-surface radius-8 flex-column ${this.class}`;
1397
1402
  return activeClasses;
1398
1403
  }
1399
1404
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1400
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: MatchaModalComponent, isStandalone: false, selector: "matcha-modal", inputs: { elevation: "elevation", class: "class" }, ngImport: i0, template: "<div [class]=\"classes\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }); }
1405
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: MatchaModalComponent, isStandalone: false, selector: "matcha-modal", inputs: { class: "class" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<div [class]=\"classes\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }); }
1401
1406
  }
1402
1407
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalComponent, decorators: [{
1403
1408
  type: Component,
1404
1409
  args: [{ selector: 'matcha-modal', standalone: false, template: "<div [class]=\"classes\">\n <ng-content></ng-content>\n</div>\n" }]
1405
- }], propDecorators: { elevation: [{
1406
- type: Input
1407
- }], class: [{
1410
+ }], propDecorators: { class: [{
1408
1411
  type: Input
1412
+ }], classes: [{
1413
+ type: HostBinding,
1414
+ args: ['class']
1409
1415
  }] } });
1410
1416
 
1411
1417
  class MatchaMenuComponent {
@@ -1916,6 +1922,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1916
1922
  }]
1917
1923
  }] });
1918
1924
 
1925
+ class MatchaElevationDirective {
1926
+ constructor(_elementRef, _renderer) {
1927
+ this._elementRef = _elementRef;
1928
+ this._renderer = _renderer;
1929
+ this.elevation = 0; // Valor padrão para elevação é 0
1930
+ }
1931
+ ngOnChanges() {
1932
+ // Remove qualquer classe de elevação existente
1933
+ for (let i = 0; i <= 24; i++) {
1934
+ this._renderer.removeClass(this._elementRef.nativeElement, `elevation-z-${i}`);
1935
+ }
1936
+ // Converte para número se for string
1937
+ const elevationValue = typeof this.elevation === 'string'
1938
+ ? parseInt(this.elevation, 10)
1939
+ : this.elevation;
1940
+ // Adiciona a classe de elevação correspondente
1941
+ if (elevationValue >= 1 && elevationValue <= 24) {
1942
+ this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-${elevationValue}`);
1943
+ }
1944
+ else {
1945
+ this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-0`);
1946
+ }
1947
+ }
1948
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1949
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: MatchaElevationDirective, isStandalone: false, selector: "[elevation]", inputs: { elevation: "elevation" }, usesOnChanges: true, ngImport: i0 }); }
1950
+ }
1951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationDirective, decorators: [{
1952
+ type: Directive,
1953
+ args: [{
1954
+ selector: '[elevation]',
1955
+ standalone: false
1956
+ }]
1957
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { elevation: [{
1958
+ type: Input,
1959
+ args: ['elevation']
1960
+ }] } });
1961
+
1962
+ class MatchaElevationModule {
1963
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1964
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, declarations: [MatchaElevationDirective], imports: [CommonModule], exports: [MatchaElevationDirective] }); }
1965
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, imports: [CommonModule] }); }
1966
+ }
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, decorators: [{
1968
+ type: NgModule,
1969
+ args: [{
1970
+ declarations: [MatchaElevationDirective],
1971
+ imports: [CommonModule],
1972
+ exports: [MatchaElevationDirective],
1973
+ }]
1974
+ }] });
1975
+
1919
1976
  class MatchaModalModule {
1920
1977
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1921
1978
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalModule, declarations: [MatchaModalHeaderComponent,
@@ -1926,7 +1983,8 @@ class MatchaModalModule {
1926
1983
  MatchaIconModule,
1927
1984
  MatchaTitleModule,
1928
1985
  MatchaDividerModule,
1929
- MatchaTooltipModule], exports: [MatchaModalHeaderComponent,
1986
+ MatchaTooltipModule,
1987
+ MatchaElevationModule], exports: [MatchaModalHeaderComponent,
1930
1988
  MatchaModalContentComponent,
1931
1989
  MatchaModalFooterComponent,
1932
1990
  MatchaModalOptionsComponent,
@@ -1935,7 +1993,8 @@ class MatchaModalModule {
1935
1993
  MatchaIconModule,
1936
1994
  MatchaTitleModule,
1937
1995
  MatchaDividerModule,
1938
- MatchaTooltipModule] }); }
1996
+ MatchaTooltipModule,
1997
+ MatchaElevationModule] }); }
1939
1998
  }
1940
1999
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalModule, decorators: [{
1941
2000
  type: NgModule,
@@ -1952,7 +2011,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1952
2011
  MatchaIconModule,
1953
2012
  MatchaTitleModule,
1954
2013
  MatchaDividerModule,
1955
- MatchaTooltipModule
2014
+ MatchaTooltipModule,
2015
+ MatchaElevationModule
1956
2016
  ],
1957
2017
  exports: [
1958
2018
  MatchaModalHeaderComponent,
@@ -2035,53 +2095,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
2035
2095
  }]
2036
2096
  }] });
2037
2097
 
2038
- class MatchaElevationDirective {
2039
- constructor(_elementRef, _renderer) {
2040
- this._elementRef = _elementRef;
2041
- this._renderer = _renderer;
2042
- this.elevation = 0; // Valor padrão para elevação é 0
2043
- }
2044
- ngOnChanges() {
2045
- // Remove qualquer classe de elevação existente
2046
- for (let i = 0; i <= 24; i++) {
2047
- this._renderer.removeClass(this._elementRef.nativeElement, `elevation-z-${i}`);
2048
- }
2049
- // Adiciona a classe de elevação correspondente
2050
- if (this.elevation >= 1 && this.elevation <= 24) {
2051
- this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-${this.elevation}`);
2052
- }
2053
- else {
2054
- this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-0`);
2055
- }
2056
- }
2057
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2058
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: MatchaElevationDirective, isStandalone: false, selector: "[elevation]", inputs: { elevation: "elevation" }, usesOnChanges: true, ngImport: i0 }); }
2059
- }
2060
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationDirective, decorators: [{
2061
- type: Directive,
2062
- args: [{
2063
- selector: '[elevation]',
2064
- standalone: false
2065
- }]
2066
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { elevation: [{
2067
- type: Input,
2068
- args: ['elevation']
2069
- }] } });
2070
-
2071
- class MatchaElevationModule {
2072
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2073
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, declarations: [MatchaElevationDirective], imports: [CommonModule], exports: [MatchaElevationDirective] }); }
2074
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, imports: [CommonModule] }); }
2075
- }
2076
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, decorators: [{
2077
- type: NgModule,
2078
- args: [{
2079
- declarations: [MatchaElevationDirective],
2080
- imports: [CommonModule],
2081
- exports: [MatchaElevationDirective],
2082
- }]
2083
- }] });
2084
-
2085
2098
  class MatchaGridModule {
2086
2099
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2087
2100
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaGridModule, declarations: [MatchaGridComponent], imports: [CommonModule], exports: [MatchaGridComponent] }); }