matcha-components 19.26.0 → 19.28.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
@@ -909,29 +916,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
909
916
 
910
917
  class MatchaCardComponent {
911
918
  constructor() {
912
- this.elevation = 0;
913
919
  this.blockquote = 'none';
914
920
  this.color = 'surface';
915
921
  this.blockquoteColor = null;
916
922
  this.class = '';
917
923
  this.alpha = false;
924
+ this.tint = false;
918
925
  this.loading = false;
919
926
  }
920
- hasBlockquotePosition() {
921
- return this.blockquote === 'left' || this.blockquote === 'right';
922
- }
923
927
  get classes() {
924
- const elevation = `elevation-z-${this.elevation}`;
925
928
  let backgroundColor = '';
926
929
  let blockquoteColor = '';
927
930
  let blockquotePosition = null;
928
931
  if (this.color === 'bg' || this.color === 'surface') {
929
- if (this.alpha) {
930
- backgroundColor = `background-${this.color}-alpha`;
931
- }
932
- else {
933
- backgroundColor = `background-${this.color}`;
934
- }
935
932
  if (this.hasBlockquotePosition()) {
936
933
  blockquotePosition = `matcha-card-border-${this.blockquote}`;
937
934
  blockquoteColor = this.blockquoteColor ? `border-color-${this.blockquoteColor}` : '';
@@ -942,12 +939,6 @@ class MatchaCardComponent {
942
939
  }
943
940
  }
944
941
  else {
945
- if (this.alpha) {
946
- backgroundColor = `background-${this.color}-alpha`;
947
- }
948
- else {
949
- backgroundColor = `${this.color}`;
950
- }
951
942
  if (this.hasBlockquotePosition()) {
952
943
  blockquotePosition = `matcha-card-border-${this.blockquote}`;
953
944
  blockquoteColor = this.color ? `border-color-${this.blockquoteColor}` : '';
@@ -957,18 +948,19 @@ class MatchaCardComponent {
957
948
  blockquoteColor = '';
958
949
  }
959
950
  }
960
- const activeClasses = `matcha-card ${elevation} ${blockquotePosition} ${blockquoteColor} ${backgroundColor} ${this.loading ? 'loading' : ''} ${this.class}`;
951
+ const activeClasses = `matcha-card ${blockquotePosition} ${blockquoteColor} ${backgroundColor} ${this.loading ? 'loading' : ''} ${this.class}`;
961
952
  return activeClasses;
962
953
  }
954
+ hasBlockquotePosition() {
955
+ return this.blockquote === 'left' || this.blockquote === 'right';
956
+ }
963
957
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
964
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: MatchaCardComponent, isStandalone: false, selector: "matcha-card", inputs: { elevation: "elevation", blockquote: "blockquote", color: "color", blockquoteColor: "blockquoteColor", class: "class", alpha: "alpha", loading: "loading" }, ngImport: i0, template: "<div [class]=\"classes\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }); }
958
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: MatchaCardComponent, isStandalone: false, selector: "matcha-card", inputs: { blockquote: "blockquote", color: "color", blockquoteColor: "blockquoteColor", class: "class", alpha: "alpha", tint: "tint", loading: "loading" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
965
959
  }
966
960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardComponent, decorators: [{
967
961
  type: Component,
968
- args: [{ selector: 'matcha-card', standalone: false, template: "<div [class]=\"classes\">\n <ng-content></ng-content>\n</div>\n" }]
969
- }], propDecorators: { elevation: [{
970
- type: Input
971
- }], blockquote: [{
962
+ args: [{ selector: 'matcha-card', standalone: false, template: "<ng-content></ng-content>\n" }]
963
+ }], propDecorators: { blockquote: [{
972
964
  type: Input
973
965
  }], color: [{
974
966
  type: Input
@@ -978,8 +970,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
978
970
  type: Input
979
971
  }], alpha: [{
980
972
  type: Input
973
+ }], tint: [{
974
+ type: Input
981
975
  }], loading: [{
982
976
  type: Input
977
+ }], classes: [{
978
+ type: HostBinding,
979
+ args: ['class']
983
980
  }] } });
984
981
 
985
982
  class MatchaDividerComponent {
@@ -1388,24 +1385,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1388
1385
 
1389
1386
  class MatchaModalComponent {
1390
1387
  constructor() {
1391
- this.elevation = 0;
1392
1388
  this.class = '';
1393
1389
  }
1394
1390
  get classes() {
1395
- const elevation = `elevation-z-${this.elevation}`;
1396
- const activeClasses = `background-surface radius-8 ${elevation} ${this.class}`;
1391
+ const activeClasses = `background-surface radius-8 flex-column ${this.class}`;
1397
1392
  return activeClasses;
1398
1393
  }
1399
1394
  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: [""] }); }
1395
+ 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
1396
  }
1402
1397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalComponent, decorators: [{
1403
1398
  type: Component,
1404
1399
  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: [{
1400
+ }], propDecorators: { class: [{
1408
1401
  type: Input
1402
+ }], classes: [{
1403
+ type: HostBinding,
1404
+ args: ['class']
1409
1405
  }] } });
1410
1406
 
1411
1407
  class MatchaMenuComponent {
@@ -1916,6 +1912,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1916
1912
  }]
1917
1913
  }] });
1918
1914
 
1915
+ class MatchaElevationDirective {
1916
+ constructor(_elementRef, _renderer) {
1917
+ this._elementRef = _elementRef;
1918
+ this._renderer = _renderer;
1919
+ this.elevation = 0; // Valor padrão para elevação é 0
1920
+ }
1921
+ ngOnChanges() {
1922
+ // Remove qualquer classe de elevação existente
1923
+ for (let i = 0; i <= 24; i++) {
1924
+ this._renderer.removeClass(this._elementRef.nativeElement, `elevation-z-${i}`);
1925
+ }
1926
+ // Converte para número se for string
1927
+ const elevationValue = typeof this.elevation === 'string'
1928
+ ? parseInt(this.elevation, 10)
1929
+ : this.elevation;
1930
+ // Adiciona a classe de elevação correspondente
1931
+ if (elevationValue >= 1 && elevationValue <= 24) {
1932
+ this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-${elevationValue}`);
1933
+ }
1934
+ else {
1935
+ this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-0`);
1936
+ }
1937
+ }
1938
+ 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 }); }
1939
+ 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 }); }
1940
+ }
1941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationDirective, decorators: [{
1942
+ type: Directive,
1943
+ args: [{
1944
+ selector: '[elevation]',
1945
+ standalone: false
1946
+ }]
1947
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { elevation: [{
1948
+ type: Input,
1949
+ args: ['elevation']
1950
+ }] } });
1951
+
1952
+ class MatchaElevationModule {
1953
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1954
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, declarations: [MatchaElevationDirective], imports: [CommonModule], exports: [MatchaElevationDirective] }); }
1955
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, imports: [CommonModule] }); }
1956
+ }
1957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaElevationModule, decorators: [{
1958
+ type: NgModule,
1959
+ args: [{
1960
+ declarations: [MatchaElevationDirective],
1961
+ imports: [CommonModule],
1962
+ exports: [MatchaElevationDirective],
1963
+ }]
1964
+ }] });
1965
+
1919
1966
  class MatchaModalModule {
1920
1967
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1921
1968
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalModule, declarations: [MatchaModalHeaderComponent,
@@ -1926,7 +1973,8 @@ class MatchaModalModule {
1926
1973
  MatchaIconModule,
1927
1974
  MatchaTitleModule,
1928
1975
  MatchaDividerModule,
1929
- MatchaTooltipModule], exports: [MatchaModalHeaderComponent,
1976
+ MatchaTooltipModule,
1977
+ MatchaElevationModule], exports: [MatchaModalHeaderComponent,
1930
1978
  MatchaModalContentComponent,
1931
1979
  MatchaModalFooterComponent,
1932
1980
  MatchaModalOptionsComponent,
@@ -1935,7 +1983,8 @@ class MatchaModalModule {
1935
1983
  MatchaIconModule,
1936
1984
  MatchaTitleModule,
1937
1985
  MatchaDividerModule,
1938
- MatchaTooltipModule] }); }
1986
+ MatchaTooltipModule,
1987
+ MatchaElevationModule] }); }
1939
1988
  }
1940
1989
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaModalModule, decorators: [{
1941
1990
  type: NgModule,
@@ -1952,7 +2001,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1952
2001
  MatchaIconModule,
1953
2002
  MatchaTitleModule,
1954
2003
  MatchaDividerModule,
1955
- MatchaTooltipModule
2004
+ MatchaTooltipModule,
2005
+ MatchaElevationModule
1956
2006
  ],
1957
2007
  exports: [
1958
2008
  MatchaModalHeaderComponent,
@@ -1966,14 +2016,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1966
2016
 
1967
2017
  class MatchaCardModule {
1968
2018
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1969
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardModule, declarations: [MatchaCardComponent], imports: [CommonModule], exports: [MatchaCardComponent] }); }
1970
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardModule, imports: [CommonModule] }); }
2019
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardModule, declarations: [MatchaCardComponent], imports: [CommonModule,
2020
+ MatchaElevationModule,
2021
+ MatchaIconModule,
2022
+ MatchaTitleModule,
2023
+ MatchaDividerModule,
2024
+ MatchaTooltipModule], exports: [MatchaCardComponent] }); }
2025
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardModule, imports: [CommonModule,
2026
+ MatchaElevationModule,
2027
+ MatchaIconModule,
2028
+ MatchaTitleModule,
2029
+ MatchaDividerModule,
2030
+ MatchaTooltipModule] }); }
1971
2031
  }
1972
2032
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaCardModule, decorators: [{
1973
2033
  type: NgModule,
1974
2034
  args: [{
1975
2035
  declarations: [MatchaCardComponent],
1976
- imports: [CommonModule],
2036
+ imports: [
2037
+ CommonModule,
2038
+ MatchaElevationModule,
2039
+ MatchaIconModule,
2040
+ MatchaTitleModule,
2041
+ MatchaDividerModule,
2042
+ MatchaTooltipModule,
2043
+ ],
1977
2044
  exports: [MatchaCardComponent],
1978
2045
  }]
1979
2046
  }] });
@@ -2035,53 +2102,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
2035
2102
  }]
2036
2103
  }] });
2037
2104
 
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
2105
  class MatchaGridModule {
2086
2106
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: MatchaGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2087
2107
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: MatchaGridModule, declarations: [MatchaGridComponent], imports: [CommonModule], exports: [MatchaGridComponent] }); }