matcha-components 18.0.46 → 18.2.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.
@@ -736,6 +736,202 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
736
736
  args: ['mouseleave', ['$event']]
737
737
  }] } });
738
738
 
739
+ class MatchaTooltipComponent {
740
+ constructor(el, renderer) {
741
+ this.el = el;
742
+ this.renderer = renderer;
743
+ this.tooltipText = '';
744
+ this.tooltipDisabled = false;
745
+ // Inputs para displayência de posição (true = displayência ativa)
746
+ this.displayAbove = false;
747
+ this.displayBelow = false;
748
+ this.displayLeft = false;
749
+ this.displayRight = false;
750
+ // Input para exibir botão de fechar (útil para mobile)
751
+ this.tooltipEnableClose = false;
752
+ this.tooltipElement = null;
753
+ this.documentClickListener = null;
754
+ }
755
+ // Para desktop: usamos mouseenter se não estivermos no modo "close-enabled"
756
+ onMouseEnter() {
757
+ if (this.tooltipEnableClose) {
758
+ // Se estiver em modo de clique/tap para mobile, não abre via hover.
759
+ return;
760
+ }
761
+ if (this.tooltipDisabled || this.tooltipElement || !this.tooltipText) {
762
+ return;
763
+ }
764
+ this.createTooltip();
765
+ }
766
+ // Em modo desktop, fecha ao sair do hover, exceto se tooltipEnableClose for true
767
+ onMouseLeave() {
768
+ if (!this.tooltipEnableClose && this.tooltipElement) {
769
+ this.destroyTooltip();
770
+ }
771
+ }
772
+ // Para mobile ou quando tooltipEnableClose está ativo, abrimos o tooltip com clique/tap
773
+ onClick(event) {
774
+ if (!this.tooltipEnableClose) {
775
+ // Se não estiver no modo de fechar com clique, ignora o click
776
+ return;
777
+ }
778
+ event.stopPropagation();
779
+ // Se o tooltip já estiver aberto, não faz nada (ou pode implementar toggle)
780
+ if (!this.tooltipElement && !this.tooltipDisabled && this.tooltipText) {
781
+ this.createTooltip();
782
+ }
783
+ }
784
+ createTooltip() {
785
+ // Cria o tooltip e adiciona a classe base
786
+ this.tooltipElement = this.renderer.createElement('div');
787
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content');
788
+ // Define o texto do tooltip (aqui não usamos innerHTML, permitindo que o botão seja inserido depois)
789
+ this.tooltipElement.textContent = this.tooltipText;
790
+ // Define estilos iniciais para posicionamento e medição
791
+ this.renderer.setStyle(this.tooltipElement, 'position', 'absolute');
792
+ this.renderer.setStyle(this.tooltipElement, 'top', '0');
793
+ this.renderer.setStyle(this.tooltipElement, 'left', '0');
794
+ this.renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
795
+ this.renderer.appendChild(document.body, this.tooltipElement);
796
+ // Se tooltipEnableClose estiver true, adiciona o botão de fechar
797
+ if (this.tooltipEnableClose) {
798
+ const closeButton = this.renderer.createElement('div');
799
+ this.renderer.addClass(closeButton, 'matcha-tooltip-close');
800
+ // O botão de fechar fica dentro do tooltip
801
+ this.renderer.appendChild(this.tooltipElement, closeButton);
802
+ // Ao clicar no botão X, fecha o tooltip
803
+ this.renderer.listen(closeButton, 'click', (e) => {
804
+ e.stopPropagation();
805
+ this.destroyTooltip();
806
+ });
807
+ // Adiciona listener global para fechar o tooltip quando clicar fora dele
808
+ this.documentClickListener = this.renderer.listen('document', 'click', (e) => {
809
+ if (this.tooltipElement && !this.tooltipElement.contains(e.target)) {
810
+ this.destroyTooltip();
811
+ }
812
+ });
813
+ }
814
+ // Medidas para posicionamento
815
+ const margin = 8;
816
+ const hostRect = this.el.nativeElement.getBoundingClientRect();
817
+ const tooltipRect = this.tooltipElement.getBoundingClientRect();
818
+ // Verifica se há espaço suficiente para cada posição
819
+ const hasSpaceAbove = hostRect.top >= tooltipRect.height + margin;
820
+ const hasSpaceBelow = (window.innerHeight - hostRect.bottom) >= tooltipRect.height + margin;
821
+ const hasSpaceLeft = hostRect.left >= tooltipRect.width + margin;
822
+ const hasSpaceRight = (window.innerWidth - hostRect.right) >= tooltipRect.width + margin;
823
+ // Determina a posição desejada com base na displayência do usuário e disponibilidade
824
+ let chosenPosition = 'above';
825
+ if (this.displayAbove && hasSpaceAbove) {
826
+ chosenPosition = 'above';
827
+ }
828
+ else if (this.displayBelow && hasSpaceBelow) {
829
+ chosenPosition = 'below';
830
+ }
831
+ else if (this.displayLeft && hasSpaceLeft) {
832
+ chosenPosition = 'left';
833
+ }
834
+ else if (this.displayRight && hasSpaceRight) {
835
+ chosenPosition = 'right';
836
+ }
837
+ else {
838
+ chosenPosition = hasSpaceAbove ? 'above' : (hasSpaceBelow ? 'below' : 'above');
839
+ }
840
+ // Calcula a posição (top e left) de acordo com a posição escolhida
841
+ let top = 0;
842
+ let left = 0;
843
+ switch (chosenPosition) {
844
+ case 'above':
845
+ top = hostRect.top + window.scrollY - tooltipRect.height - margin;
846
+ left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
847
+ break;
848
+ case 'below':
849
+ top = hostRect.bottom + window.scrollY + margin;
850
+ left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
851
+ break;
852
+ case 'left':
853
+ top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
854
+ left = hostRect.left + window.scrollX - tooltipRect.width - margin;
855
+ break;
856
+ case 'right':
857
+ top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
858
+ left = hostRect.right + window.scrollX + margin;
859
+ break;
860
+ }
861
+ // Ajusta horizontalmente para não ultrapassar os limites da tela
862
+ if (left < margin) {
863
+ left = margin;
864
+ }
865
+ else if (left + tooltipRect.width > window.innerWidth - margin) {
866
+ left = window.innerWidth - tooltipRect.width - margin;
867
+ }
868
+ // Aplica os estilos calculados e torna o tooltip visível
869
+ this.renderer.setStyle(this.tooltipElement, 'top', `${top}px`);
870
+ this.renderer.setStyle(this.tooltipElement, 'left', `${left}px`);
871
+ this.renderer.setStyle(this.tooltipElement, 'visibility', 'visible');
872
+ // Adiciona classes específicas para customizar a seta de acordo com a posição
873
+ this.renderer.removeClass(this.tooltipElement, 'matcha-tooltip-content_below');
874
+ this.renderer.removeClass(this.tooltipElement, 'matcha-tooltip-content_left');
875
+ this.renderer.removeClass(this.tooltipElement, 'matcha-tooltip-content_right');
876
+ if (chosenPosition === 'below') {
877
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content_below');
878
+ }
879
+ else if (chosenPosition === 'left') {
880
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content_left');
881
+ }
882
+ else if (chosenPosition === 'right') {
883
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content_right');
884
+ }
885
+ // Para a posição 'above', mantém o estilo padrão
886
+ }
887
+ destroyTooltip() {
888
+ if (this.tooltipElement) {
889
+ this.renderer.removeChild(document.body, this.tooltipElement);
890
+ this.tooltipElement = null;
891
+ }
892
+ if (this.documentClickListener) {
893
+ this.documentClickListener(); // Remove o listener global
894
+ this.documentClickListener = null;
895
+ }
896
+ }
897
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
898
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MatchaTooltipComponent, selector: "matcha-tooltip", inputs: { tooltipText: ["matcha-tooltip", "tooltipText"], tooltipDisabled: ["tooltip-disabled", "tooltipDisabled"], displayAbove: ["display-above", "displayAbove"], displayBelow: ["display-below", "displayBelow"], displayLeft: ["display-left", "displayLeft"], displayRight: ["display-right", "displayRight"], tooltipEnableClose: ["tooltip-enable-close", "tooltipEnableClose"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick($event)" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
899
+ }
900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipComponent, decorators: [{
901
+ type: Component,
902
+ args: [{ selector: 'matcha-tooltip', template: "<ng-content></ng-content>\n" }]
903
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { tooltipText: [{
904
+ type: Input,
905
+ args: ['matcha-tooltip']
906
+ }], tooltipDisabled: [{
907
+ type: Input,
908
+ args: ['tooltip-disabled']
909
+ }], displayAbove: [{
910
+ type: Input,
911
+ args: ['display-above']
912
+ }], displayBelow: [{
913
+ type: Input,
914
+ args: ['display-below']
915
+ }], displayLeft: [{
916
+ type: Input,
917
+ args: ['display-left']
918
+ }], displayRight: [{
919
+ type: Input,
920
+ args: ['display-right']
921
+ }], tooltipEnableClose: [{
922
+ type: Input,
923
+ args: ['tooltip-enable-close']
924
+ }], onMouseEnter: [{
925
+ type: HostListener,
926
+ args: ['mouseenter']
927
+ }], onMouseLeave: [{
928
+ type: HostListener,
929
+ args: ['mouseleave']
930
+ }], onClick: [{
931
+ type: HostListener,
932
+ args: ['click', ['$event']]
933
+ }] } });
934
+
739
935
  class MatchaIconModule {
740
936
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
741
937
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaIconModule, declarations: [MatchaIconComponent], imports: [CommonModule], exports: [MatchaIconComponent] }); }
@@ -869,6 +1065,261 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
869
1065
  }]
870
1066
  }] });
871
1067
 
1068
+ class MatchaTooltipDirective {
1069
+ constructor(el, renderer) {
1070
+ this.el = el;
1071
+ this.renderer = renderer;
1072
+ this.tooltipText = '';
1073
+ this.tooltipDisabled = false;
1074
+ this.preferAbove = false;
1075
+ this.preferBelow = false;
1076
+ this.preferLeft = false;
1077
+ this.preferRight = false;
1078
+ this.tooltipEnableClose = false;
1079
+ this.tooltipElement = null;
1080
+ this.documentClickListener = null;
1081
+ }
1082
+ onMouseEnter() {
1083
+ if (this.tooltipEnableClose) {
1084
+ // Em modo de clique/tap, não abre via hover
1085
+ return;
1086
+ }
1087
+ if (this.tooltipDisabled || this.tooltipElement || !this.tooltipText) {
1088
+ return;
1089
+ }
1090
+ this.createTooltip();
1091
+ }
1092
+ onMouseLeave() {
1093
+ if (!this.tooltipEnableClose && this.tooltipElement) {
1094
+ this.destroyTooltip();
1095
+ }
1096
+ }
1097
+ onClick(event) {
1098
+ if (!this.tooltipEnableClose) {
1099
+ return;
1100
+ }
1101
+ event.stopPropagation();
1102
+ if (!this.tooltipElement && !this.tooltipDisabled && this.tooltipText) {
1103
+ this.createTooltip();
1104
+ }
1105
+ }
1106
+ createTooltip() {
1107
+ // Cria o tooltip e adiciona a classe base
1108
+ this.tooltipElement = this.renderer.createElement('div');
1109
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content');
1110
+ // Define o conteúdo do tooltip
1111
+ this.tooltipElement.textContent = this.tooltipText;
1112
+ // Define estilos iniciais para medição
1113
+ this.renderer.setStyle(this.tooltipElement, 'position', 'absolute');
1114
+ this.renderer.setStyle(this.tooltipElement, 'top', '0');
1115
+ this.renderer.setStyle(this.tooltipElement, 'left', '0');
1116
+ this.renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
1117
+ this.renderer.appendChild(document.body, this.tooltipElement);
1118
+ // Se tooltipEnableClose estiver ativo, adiciona o botão de fechar
1119
+ if (this.tooltipEnableClose) {
1120
+ const closeButton = this.renderer.createElement('div');
1121
+ this.renderer.addClass(closeButton, 'matcha-tooltip-close');
1122
+ this.renderer.appendChild(this.tooltipElement, closeButton);
1123
+ this.renderer.listen(closeButton, 'click', (e) => {
1124
+ e.stopPropagation();
1125
+ this.destroyTooltip();
1126
+ });
1127
+ this.documentClickListener = this.renderer.listen('document', 'click', (e) => {
1128
+ if (this.tooltipElement && !this.tooltipElement.contains(e.target)) {
1129
+ this.destroyTooltip();
1130
+ }
1131
+ });
1132
+ }
1133
+ // Medidas e cálculo de posição
1134
+ const margin = 8;
1135
+ const hostRect = this.el.nativeElement.getBoundingClientRect();
1136
+ const tooltipRect = this.tooltipElement.getBoundingClientRect();
1137
+ const hasSpaceAbove = hostRect.top >= tooltipRect.height + margin;
1138
+ const hasSpaceBelow = (window.innerHeight - hostRect.bottom) >= tooltipRect.height + margin;
1139
+ const hasSpaceLeft = hostRect.left >= tooltipRect.width + margin;
1140
+ const hasSpaceRight = (window.innerWidth - hostRect.right) >= tooltipRect.width + margin;
1141
+ let chosenPosition = 'above';
1142
+ if (this.preferAbove && hasSpaceAbove) {
1143
+ chosenPosition = 'above';
1144
+ }
1145
+ else if (this.preferBelow && hasSpaceBelow) {
1146
+ chosenPosition = 'below';
1147
+ }
1148
+ else if (this.preferLeft && hasSpaceLeft) {
1149
+ chosenPosition = 'left';
1150
+ }
1151
+ else if (this.preferRight && hasSpaceRight) {
1152
+ chosenPosition = 'right';
1153
+ }
1154
+ else {
1155
+ chosenPosition = hasSpaceAbove ? 'above' : (hasSpaceBelow ? 'below' : 'above');
1156
+ }
1157
+ let top = 0;
1158
+ let left = 0;
1159
+ switch (chosenPosition) {
1160
+ case 'above':
1161
+ top = hostRect.top + window.scrollY - tooltipRect.height - margin;
1162
+ left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
1163
+ break;
1164
+ case 'below':
1165
+ top = hostRect.bottom + window.scrollY + margin;
1166
+ left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
1167
+ break;
1168
+ case 'left':
1169
+ top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
1170
+ left = hostRect.left + window.scrollX - tooltipRect.width - margin;
1171
+ break;
1172
+ case 'right':
1173
+ top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
1174
+ left = hostRect.right + window.scrollX + margin;
1175
+ break;
1176
+ }
1177
+ if (left < margin) {
1178
+ left = margin;
1179
+ }
1180
+ else if (left + tooltipRect.width > window.innerWidth - margin) {
1181
+ left = window.innerWidth - tooltipRect.width - margin;
1182
+ }
1183
+ this.renderer.setStyle(this.tooltipElement, 'top', `${top}px`);
1184
+ this.renderer.setStyle(this.tooltipElement, 'left', `${left}px`);
1185
+ this.renderer.setStyle(this.tooltipElement, 'visibility', 'visible');
1186
+ this.renderer.removeClass(this.tooltipElement, 'matcha-tooltip-content_below');
1187
+ this.renderer.removeClass(this.tooltipElement, 'matcha-tooltip-content_left');
1188
+ this.renderer.removeClass(this.tooltipElement, 'matcha-tooltip-content_right');
1189
+ if (chosenPosition === 'below') {
1190
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content_below');
1191
+ }
1192
+ else if (chosenPosition === 'left') {
1193
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content_left');
1194
+ }
1195
+ else if (chosenPosition === 'right') {
1196
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content_right');
1197
+ }
1198
+ }
1199
+ destroyTooltip() {
1200
+ if (this.tooltipElement) {
1201
+ this.renderer.removeChild(document.body, this.tooltipElement);
1202
+ this.tooltipElement = null;
1203
+ }
1204
+ if (this.documentClickListener) {
1205
+ this.documentClickListener();
1206
+ this.documentClickListener = null;
1207
+ }
1208
+ }
1209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1210
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MatchaTooltipDirective, selector: "[matcha-tooltip]", inputs: { tooltipText: ["matcha-tooltip", "tooltipText"], tooltipDisabled: ["tooltip-disabled", "tooltipDisabled"], preferAbove: ["display-above", "preferAbove"], preferBelow: ["display-below", "preferBelow"], preferLeft: ["display-left", "preferLeft"], preferRight: ["display-right", "preferRight"], tooltipEnableClose: ["tooltip-enable-close", "tooltipEnableClose"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick($event)" } }, ngImport: i0 }); }
1211
+ }
1212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipDirective, decorators: [{
1213
+ type: Directive,
1214
+ args: [{
1215
+ selector: '[matcha-tooltip]' // Usado como atributo
1216
+ }]
1217
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { tooltipText: [{
1218
+ type: Input,
1219
+ args: ['matcha-tooltip']
1220
+ }], tooltipDisabled: [{
1221
+ type: Input,
1222
+ args: ['tooltip-disabled']
1223
+ }], preferAbove: [{
1224
+ type: Input,
1225
+ args: ['display-above']
1226
+ }], preferBelow: [{
1227
+ type: Input,
1228
+ args: ['display-below']
1229
+ }], preferLeft: [{
1230
+ type: Input,
1231
+ args: ['display-left']
1232
+ }], preferRight: [{
1233
+ type: Input,
1234
+ args: ['display-right']
1235
+ }], tooltipEnableClose: [{
1236
+ type: Input,
1237
+ args: ['tooltip-enable-close']
1238
+ }], onMouseEnter: [{
1239
+ type: HostListener,
1240
+ args: ['mouseenter']
1241
+ }], onMouseLeave: [{
1242
+ type: HostListener,
1243
+ args: ['mouseleave']
1244
+ }], onClick: [{
1245
+ type: HostListener,
1246
+ args: ['click', ['$event']]
1247
+ }] } });
1248
+
1249
+ class MatchaTooltipModule {
1250
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1251
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, declarations: [MatchaTooltipComponent, MatchaTooltipDirective], imports: [CommonModule], exports: [MatchaTooltipComponent, MatchaTooltipDirective] }); }
1252
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, imports: [CommonModule] }); }
1253
+ }
1254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, decorators: [{
1255
+ type: NgModule,
1256
+ args: [{
1257
+ declarations: [MatchaTooltipComponent, MatchaTooltipDirective],
1258
+ imports: [CommonModule],
1259
+ exports: [MatchaTooltipComponent, MatchaTooltipDirective],
1260
+ }]
1261
+ }] });
1262
+
1263
+ class MatchaElevationDirective {
1264
+ constructor(_elementRef, _renderer) {
1265
+ this._elementRef = _elementRef;
1266
+ this._renderer = _renderer;
1267
+ this.elevation = 0; // Valor padrão para elevação é 0
1268
+ }
1269
+ ngOnChanges() {
1270
+ // Remove qualquer classe de elevação existente
1271
+ for (let i = 0; i <= 24; i++) {
1272
+ this._renderer.removeClass(this._elementRef.nativeElement, `elevation-z-${i}`);
1273
+ }
1274
+ // Adiciona a classe de elevação correspondente
1275
+ if (this.elevation >= 1 && this.elevation <= 24) {
1276
+ this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-${this.elevation}`);
1277
+ }
1278
+ else {
1279
+ this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-0`);
1280
+ }
1281
+ }
1282
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1283
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MatchaElevationDirective, selector: "[elevation]", inputs: { elevation: "elevation" }, usesOnChanges: true, ngImport: i0 }); }
1284
+ }
1285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationDirective, decorators: [{
1286
+ type: Directive,
1287
+ args: [{
1288
+ selector: '[elevation]',
1289
+ }]
1290
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { elevation: [{
1291
+ type: Input,
1292
+ args: ['elevation']
1293
+ }] } });
1294
+
1295
+ class MatchaElevationModule {
1296
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1297
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, declarations: [MatchaElevationDirective], imports: [CommonModule], exports: [MatchaElevationDirective] }); }
1298
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, imports: [CommonModule] }); }
1299
+ }
1300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, decorators: [{
1301
+ type: NgModule,
1302
+ args: [{
1303
+ declarations: [MatchaElevationDirective],
1304
+ imports: [CommonModule],
1305
+ exports: [MatchaElevationDirective],
1306
+ }]
1307
+ }] });
1308
+
1309
+ class MatchaGridModule {
1310
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1311
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, declarations: [MatchaGridComponent], imports: [CommonModule], exports: [MatchaGridComponent] }); }
1312
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, imports: [CommonModule] }); }
1313
+ }
1314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, decorators: [{
1315
+ type: NgModule,
1316
+ args: [{
1317
+ declarations: [MatchaGridComponent],
1318
+ imports: [CommonModule],
1319
+ exports: [MatchaGridComponent],
1320
+ }]
1321
+ }] });
1322
+
872
1323
  class MatchaAutocompleteDirective {
873
1324
  constructor(_elementRef, _renderer) {
874
1325
  this._elementRef = _elementRef;
@@ -1142,52 +1593,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1142
1593
  }]
1143
1594
  }] });
1144
1595
 
1145
- class MatchaElevationDirective {
1146
- constructor(_elementRef, _renderer) {
1147
- this._elementRef = _elementRef;
1148
- this._renderer = _renderer;
1149
- this.elevation = 0; // Valor padrão para elevação é 0
1150
- }
1151
- ngOnChanges() {
1152
- // Remove qualquer classe de elevação existente
1153
- for (let i = 0; i <= 24; i++) {
1154
- this._renderer.removeClass(this._elementRef.nativeElement, `elevation-z-${i}`);
1155
- }
1156
- // Adiciona a classe de elevação correspondente
1157
- if (this.elevation >= 1 && this.elevation <= 24) {
1158
- this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-${this.elevation}`);
1159
- }
1160
- else {
1161
- this._renderer.addClass(this._elementRef.nativeElement, `elevation-z-0`);
1162
- }
1163
- }
1164
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1165
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MatchaElevationDirective, selector: "[elevation]", inputs: { elevation: "elevation" }, usesOnChanges: true, ngImport: i0 }); }
1166
- }
1167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationDirective, decorators: [{
1168
- type: Directive,
1169
- args: [{
1170
- selector: '[elevation]',
1171
- }]
1172
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { elevation: [{
1173
- type: Input,
1174
- args: ['elevation']
1175
- }] } });
1176
-
1177
- class MatchaElevationModule {
1178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1179
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, declarations: [MatchaElevationDirective], imports: [CommonModule], exports: [MatchaElevationDirective] }); }
1180
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, imports: [CommonModule] }); }
1181
- }
1182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaElevationModule, decorators: [{
1183
- type: NgModule,
1184
- args: [{
1185
- declarations: [MatchaElevationDirective],
1186
- imports: [CommonModule],
1187
- exports: [MatchaElevationDirective],
1188
- }]
1189
- }] });
1190
-
1191
1596
  class MatchaExpansionDirective {
1192
1597
  constructor(_elementRef, _renderer) {
1193
1598
  this._elementRef = _elementRef;
@@ -1772,37 +2177,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1772
2177
  }]
1773
2178
  }] });
1774
2179
 
1775
- class MatchaTooltipDirective {
1776
- constructor(_elementRef, _renderer) {
1777
- this._elementRef = _elementRef;
1778
- this._renderer = _renderer;
1779
- //this._elementRef.nativeElement.style.backgroundColor = 'grey';
1780
- this._renderer.addClass(this._elementRef.nativeElement, 'matcha-tooltip');
1781
- }
1782
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1783
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MatchaTooltipDirective, selector: "[matchaTooltip]", ngImport: i0 }); }
1784
- }
1785
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipDirective, decorators: [{
1786
- type: Directive,
1787
- args: [{
1788
- selector: '[matchaTooltip]'
1789
- }]
1790
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
1791
-
1792
- class MatchaTooltipModule {
1793
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1794
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, declarations: [MatchaTooltipDirective], imports: [CommonModule], exports: [MatchaTooltipDirective] }); }
1795
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, imports: [CommonModule] }); }
1796
- }
1797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaTooltipModule, decorators: [{
1798
- type: NgModule,
1799
- args: [{
1800
- declarations: [MatchaTooltipDirective],
1801
- imports: [CommonModule],
1802
- exports: [MatchaTooltipDirective],
1803
- }]
1804
- }] });
1805
-
1806
2180
  class MatchaTreeDirective {
1807
2181
  constructor(_elementRef, _renderer) {
1808
2182
  this._elementRef = _elementRef;
@@ -2116,20 +2490,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2116
2490
  }]
2117
2491
  }] });
2118
2492
 
2119
- class MatchaGridModule {
2120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2121
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, declarations: [MatchaGridComponent], imports: [CommonModule], exports: [MatchaGridComponent] }); }
2122
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, imports: [CommonModule] }); }
2123
- }
2124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatchaGridModule, decorators: [{
2125
- type: NgModule,
2126
- args: [{
2127
- declarations: [MatchaGridComponent],
2128
- imports: [CommonModule],
2129
- exports: [MatchaGridComponent],
2130
- }]
2131
- }] });
2132
-
2133
2493
  /*
2134
2494
  * Public API Surface of matcha-components
2135
2495
  */
@@ -2149,5 +2509,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2149
2509
  * Generated bundle index. Do not edit.
2150
2510
  */
2151
2511
 
2152
- export { MatchaAutocompleteDirective, MatchaAutocompleteModule, MatchaAutocompleteOverviewDirective, MatchaBadgeDirective, MatchaBadgeModule, MatchaBottomSheetDirective, MatchaBottomSheetModule, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleDirective, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxDirective, MatchaCheckboxModule, MatchaChipsDirective, MatchaChipsModule, MatchaComponentsModule, MatchaDatepickerDirective, MatchaDatepickerModule, MatchaDividerComponent, MatchaDividerModule, MatchaElevationDirective, MatchaElevationModule, MatchaExpansionDirective, MatchaExpansionModule, MatchaFormFieldDirective, MatchaFormsModule, MatchaGridComponent, MatchaGridModule, MatchaIconComponent, MatchaIconModule, MatchaInputDirective, MatchaInputModule, MatchaListDirective, MatchaListModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaProgressSpinnerDirective, MatchaProgressSpinnerModule, MatchaRadioButtonDirective, MatchaRadioButtonModule, MatchaSelectDirective, MatchaSelectModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSlideToggleDirective, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaStepperDirective, MatchaStepperModule, MatchaTableDirective, MatchaTableModule, MatchaTabsDirective, MatchaTabsModule, MatchaTitleComponent, MatchaTitleModule, MatchaTooltipDirective, MatchaTooltipModule, MatchaTreeDirective, MatchaTreeModule };
2512
+ export { MatchaAutocompleteDirective, MatchaAutocompleteModule, MatchaAutocompleteOverviewDirective, MatchaBadgeDirective, MatchaBadgeModule, MatchaBottomSheetDirective, MatchaBottomSheetModule, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleDirective, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxDirective, MatchaCheckboxModule, MatchaChipsDirective, MatchaChipsModule, MatchaComponentsModule, MatchaDatepickerDirective, MatchaDatepickerModule, MatchaDividerComponent, MatchaDividerModule, MatchaElevationDirective, MatchaElevationModule, MatchaExpansionDirective, MatchaExpansionModule, MatchaFormFieldDirective, MatchaFormsModule, MatchaGridComponent, MatchaGridModule, MatchaIconComponent, MatchaIconModule, MatchaInputDirective, MatchaInputModule, MatchaListDirective, MatchaListModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaProgressSpinnerDirective, MatchaProgressSpinnerModule, MatchaRadioButtonDirective, MatchaRadioButtonModule, MatchaSelectDirective, MatchaSelectModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSlideToggleDirective, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaStepperDirective, MatchaStepperModule, MatchaTableDirective, MatchaTableModule, MatchaTabsDirective, MatchaTabsModule, MatchaTitleComponent, MatchaTitleModule, MatchaTooltipComponent, MatchaTooltipDirective, MatchaTooltipModule, MatchaTreeDirective, MatchaTreeModule };
2153
2513
  //# sourceMappingURL=matcha-components.mjs.map