matcha-components 20.9.0 → 20.13.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,13 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, Component, ContentChildren, ElementRef, Renderer2, HostBinding, Inject, HostListener, ContentChild, Directive, forwardRef, Injectable, ChangeDetectionStrategy, TemplateRef, ViewChild, NgModule, createComponent } from '@angular/core';
2
+ import { EventEmitter, Output, HostBinding, Input, Component, ContentChildren, ElementRef, Renderer2, Inject, ViewChild, ContentChild, HostListener, Directive, forwardRef, ChangeDetectionStrategy, TemplateRef, Injectable, Optional, ViewEncapsulation, NgModule, createComponent } from '@angular/core';
3
3
  import { animation, style, animate, trigger, transition, useAnimation, state, query, stagger, animateChild, sequence, group } from '@angular/animations';
4
- import { Subscription, Subject, BehaviorSubject } from 'rxjs';
5
- import { debounceTime } from 'rxjs/operators';
4
+ import { Subscription, Subject, BehaviorSubject, fromEvent } from 'rxjs';
5
+ import { debounceTime, filter } from 'rxjs/operators';
6
6
  import * as i1 from '@angular/common';
7
7
  import { CommonModule } from '@angular/common';
8
- import * as i1$1 from '@angular/forms';
9
8
  import { FormControlName, NG_VALUE_ACCESSOR, NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
10
9
 
10
+ /**
11
+ * Token de injeção para MatchaOptionParent
12
+ * Usado para injetar o componente pai no matcha-option
13
+ */
14
+ const MATCHA_OPTION_PARENT = Symbol('MatchaOptionParent');
15
+
11
16
  const customAnimation = animation([
12
17
  style({
13
18
  opacity: '{{opacity}}',
@@ -363,7 +368,9 @@ class MatchaAccordionItemComponent {
363
368
  constructor() {
364
369
  this._stretch = false;
365
370
  this._isOpen = false;
371
+ this._clickableHeader = true;
366
372
  this.opened = new EventEmitter();
373
+ this.toggleRequested = new EventEmitter();
367
374
  }
368
375
  set stretch(value) {
369
376
  this._stretch = value != null && `${value}` !== 'false';
@@ -371,37 +378,65 @@ class MatchaAccordionItemComponent {
371
378
  get stretch() {
372
379
  return this._stretch;
373
380
  }
381
+ get stretchClass() {
382
+ return this._stretch;
383
+ }
384
+ set clickableHeader(value) {
385
+ this._clickableHeader = value != null && `${value}` !== 'false';
386
+ }
387
+ get clickableHeader() {
388
+ return this._clickableHeader;
389
+ }
374
390
  set isOpen(value) {
375
391
  this._isOpen = value != null && `${value}` !== 'false';
376
392
  }
377
393
  get isOpen() {
378
394
  return this._isOpen;
379
395
  }
396
+ get isOpenClass() {
397
+ return this._isOpen;
398
+ }
380
399
  ngOnInit() {
381
400
  this.opened.emit(this.isOpen);
382
401
  }
402
+ ngOnChanges(changes) {
403
+ if (changes['isOpen']) {
404
+ this.opened.emit(this.isOpen);
405
+ }
406
+ }
383
407
  toggleAccordion() {
384
- this.isOpen = !this.isOpen;
385
- this.opened.emit(this.isOpen);
408
+ // Emite evento para o accordion pai controlar o estado
409
+ this.toggleRequested.emit();
386
410
  }
387
411
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
388
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaAccordionItemComponent, isStandalone: false, selector: "matcha-accordion-item", inputs: { stretch: "stretch", isOpen: "isOpen" }, outputs: { opened: "opened" }, ngImport: i0, template: "<div class=\"accordion-item flex-column overflow-hidden\">\n <div class=\"accordion-header d-flex\">\n <div class=\"d-flex accordion-header-wrapper\" (click)=\"toggleAccordion()\">\n <ng-content select=\"matcha-accordion-header\"></ng-content>\n </div>\n </div>\n <div class=\"accordion-content overflow-hidden\" [@expandCollapse]=\"isOpen ? '*' : 'void'\">\n <ng-content select=\"matcha-accordion-content\"></ng-content>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], animations: [...createAnimations] }); }
412
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaAccordionItemComponent, isStandalone: false, selector: "matcha-accordion-item", inputs: { stretch: "stretch", clickableHeader: "clickableHeader", isOpen: "isOpen" }, outputs: { opened: "opened", toggleRequested: "toggleRequested" }, host: { properties: { "class.stretch": "this.stretchClass", "class.is-open": "this.isOpenClass" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"accordion-item flex-column overflow-hidden\">\n <div class=\"accordion-header d-flex\">\n <div class=\"d-flex accordion-header-wrapper\"\n [class.cursor-pointer]=\"clickableHeader\"\n (click)=\"clickableHeader ? toggleAccordion() : null\">\n <ng-content select=\"matcha-accordion-header\"></ng-content>\n </div>\n </div>\n <div class=\"accordion-content overflow-hidden\" [@expandCollapse]=\"isOpen ? '*' : 'void'\">\n <ng-content select=\"matcha-accordion-content\"></ng-content>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], animations: [...createAnimations] }); }
389
413
  }
390
414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAccordionItemComponent, decorators: [{
391
415
  type: Component,
392
- args: [{ selector: 'matcha-accordion-item', standalone: false, animations: [...createAnimations], template: "<div class=\"accordion-item flex-column overflow-hidden\">\n <div class=\"accordion-header d-flex\">\n <div class=\"d-flex accordion-header-wrapper\" (click)=\"toggleAccordion()\">\n <ng-content select=\"matcha-accordion-header\"></ng-content>\n </div>\n </div>\n <div class=\"accordion-content overflow-hidden\" [@expandCollapse]=\"isOpen ? '*' : 'void'\">\n <ng-content select=\"matcha-accordion-content\"></ng-content>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
416
+ args: [{ selector: 'matcha-accordion-item', standalone: false, animations: [...createAnimations], template: "<div class=\"accordion-item flex-column overflow-hidden\">\n <div class=\"accordion-header d-flex\">\n <div class=\"d-flex accordion-header-wrapper\"\n [class.cursor-pointer]=\"clickableHeader\"\n (click)=\"clickableHeader ? toggleAccordion() : null\">\n <ng-content select=\"matcha-accordion-header\"></ng-content>\n </div>\n </div>\n <div class=\"accordion-content overflow-hidden\" [@expandCollapse]=\"isOpen ? '*' : 'void'\">\n <ng-content select=\"matcha-accordion-content\"></ng-content>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
393
417
  }], propDecorators: { stretch: [{
394
418
  type: Input
419
+ }], stretchClass: [{
420
+ type: HostBinding,
421
+ args: ['class.stretch']
422
+ }], clickableHeader: [{
423
+ type: Input
395
424
  }], isOpen: [{
396
425
  type: Input
426
+ }], isOpenClass: [{
427
+ type: HostBinding,
428
+ args: ['class.is-open']
397
429
  }], opened: [{
398
430
  type: Output
431
+ }], toggleRequested: [{
432
+ type: Output
399
433
  }] } });
400
434
 
401
435
  class MatchaAccordionComponent {
402
436
  constructor() {
403
437
  this._multiple = false;
404
438
  this.openedChange = new EventEmitter();
439
+ this.subscriptions = [];
405
440
  }
406
441
  set multiple(value) {
407
442
  // Converte 'false' (string) ou false (boolean) para false, e qualquer outro valor para true.
@@ -411,15 +446,34 @@ class MatchaAccordionComponent {
411
446
  return this._multiple;
412
447
  }
413
448
  ngAfterContentInit() {
449
+ this.setupItems();
450
+ // Escuta mudanças na lista de itens (para casos dinâmicos)
451
+ this.items.changes.subscribe(() => {
452
+ this.setupItems();
453
+ });
454
+ }
455
+ ngOnDestroy() {
456
+ this.subscriptions.forEach(sub => sub.unsubscribe());
457
+ }
458
+ setupItems() {
459
+ // Limpa subscriptions anteriores
460
+ this.subscriptions.forEach(sub => sub.unsubscribe());
461
+ this.subscriptions = [];
414
462
  this.items.forEach(item => {
415
- item.opened.subscribe((isOpen) => {
463
+ const toggleSub = item.toggleRequested.subscribe(() => {
416
464
  this.toggleItem(item);
465
+ });
466
+ this.subscriptions.push(toggleSub);
467
+ const openedSub = item.opened.subscribe((isOpen) => {
417
468
  this.openedChange.emit(isOpen);
418
469
  });
470
+ this.subscriptions.push(openedSub);
419
471
  });
420
472
  }
421
473
  toggleItem(selectedItem) {
422
- // Se não permite múltiplos itens abertos e o item selecionado foi aberto, fecha os demais.
474
+ // Toggle o item selecionado
475
+ selectedItem.isOpen = !selectedItem.isOpen;
476
+ // Se não permite múltiplos itens abertos e o item foi aberto, fecha os demais
423
477
  if (!this.multiple && selectedItem.isOpen) {
424
478
  this.items.forEach(item => {
425
479
  if (item !== selectedItem) {
@@ -1044,8 +1098,14 @@ class MatchaCardComponent {
1044
1098
  }
1045
1099
  get alpha() { return this._alpha; }
1046
1100
  set alpha(v) { this._alpha = v === 'false' ? false : !!v; }
1101
+ get alphaAttr() {
1102
+ return this.alpha ? 'true' : 'false';
1103
+ }
1047
1104
  get tint() { return this._tint; }
1048
1105
  set tint(v) { this._tint = v === 'false' ? false : !!v; }
1106
+ get tintAttr() {
1107
+ return this.tint ? 'true' : 'false';
1108
+ }
1049
1109
  get loading() { return this._loading; }
1050
1110
  set loading(v) { this._loading = v === 'false' ? false : !!v; }
1051
1111
  get classes() {
@@ -1079,7 +1139,7 @@ class MatchaCardComponent {
1079
1139
  return this.blockquote === 'left' || this.blockquote === 'right';
1080
1140
  }
1081
1141
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1082
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaCardComponent, isStandalone: false, selector: "matcha-card", inputs: { color: "color", blockquote: "blockquote", blockquoteColor: "blockquoteColor", class: "class", alpha: "alpha", tint: "tint", loading: "loading" }, host: { properties: { "attr.color": "this.colorAttr", "class": "this.classes" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
1142
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaCardComponent, isStandalone: false, selector: "matcha-card", inputs: { color: "color", blockquote: "blockquote", blockquoteColor: "blockquoteColor", class: "class", alpha: "alpha", tint: "tint", loading: "loading" }, host: { properties: { "attr.color": "this.colorAttr", "attr.alpha": "this.alphaAttr", "attr.tint": "this.tintAttr", "class": "this.classes" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
1083
1143
  }
1084
1144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaCardComponent, decorators: [{
1085
1145
  type: Component,
@@ -1097,8 +1157,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
1097
1157
  type: Input
1098
1158
  }], alpha: [{
1099
1159
  type: Input
1160
+ }], alphaAttr: [{
1161
+ type: HostBinding,
1162
+ args: ['attr.alpha']
1100
1163
  }], tint: [{
1101
1164
  type: Input
1165
+ }], tintAttr: [{
1166
+ type: HostBinding,
1167
+ args: ['attr.tint']
1102
1168
  }], loading: [{
1103
1169
  type: Input
1104
1170
  }], classes: [{
@@ -1234,6 +1300,288 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
1234
1300
  type: Output
1235
1301
  }] } });
1236
1302
 
1303
+ class MatchaDrawerComponent {
1304
+ get drawerClasses() {
1305
+ return `matcha-drawer matcha-drawer-${this.mode} matcha-drawer-${this.position} ${this.isOpen ? 'matcha-drawer-open' : 'matcha-drawer-closed'}`;
1306
+ }
1307
+ get drawerWidth() {
1308
+ if (this.mode === 'overlay') {
1309
+ // Modo overlay: sempre 0px para não empurrar o conteúdo
1310
+ return '0px';
1311
+ }
1312
+ // Modo push: ocupa espaço apenas quando aberto
1313
+ return this.isOpen ? this.width : '0px';
1314
+ }
1315
+ get drawerHeight() {
1316
+ return '100vh';
1317
+ }
1318
+ constructor(elementRef, renderer, cdr) {
1319
+ this.elementRef = elementRef;
1320
+ this.renderer = renderer;
1321
+ this.cdr = cdr;
1322
+ this.isOpen = false;
1323
+ this.mode = 'push';
1324
+ this.position = 'left';
1325
+ this.width = '300px';
1326
+ this.hasBackdrop = true;
1327
+ this.disableClose = false;
1328
+ this.autoCloseOnMobile = true;
1329
+ this.breakpoint = 1024;
1330
+ this.elevation = 8;
1331
+ this.hasFooter = false;
1332
+ this.isOpenChange = new EventEmitter();
1333
+ this.drawerToggle = new EventEmitter();
1334
+ this.drawerOpened = new EventEmitter();
1335
+ this.drawerClosed = new EventEmitter();
1336
+ this.isMobile = false;
1337
+ this.bodyScrollLocked = false;
1338
+ this.setupResizeObserver();
1339
+ }
1340
+ ngOnInit() {
1341
+ this.checkScreenSize();
1342
+ this.setupBodyScrollLock();
1343
+ }
1344
+ ngOnDestroy() {
1345
+ if (this.resizeObserver) {
1346
+ this.resizeObserver.disconnect();
1347
+ }
1348
+ this.unlockBodyScroll();
1349
+ }
1350
+ setupResizeObserver() {
1351
+ if (typeof ResizeObserver !== 'undefined') {
1352
+ this.resizeObserver = new ResizeObserver(() => {
1353
+ this.checkScreenSize();
1354
+ });
1355
+ if (this.elementRef.nativeElement.parentElement) {
1356
+ this.resizeObserver.observe(this.elementRef.nativeElement.parentElement);
1357
+ }
1358
+ }
1359
+ }
1360
+ checkScreenSize() {
1361
+ const wasMobile = this.isMobile;
1362
+ this.isMobile = window.innerWidth < this.breakpoint;
1363
+ if (wasMobile !== this.isMobile) {
1364
+ this.cdr.detectChanges();
1365
+ if (!this.isMobile && this.autoCloseOnMobile && this.isOpen) {
1366
+ this.close();
1367
+ }
1368
+ }
1369
+ }
1370
+ setupBodyScrollLock() {
1371
+ if (this.mode === 'overlay' && this.isOpen) {
1372
+ this.lockBodyScroll();
1373
+ }
1374
+ }
1375
+ lockBodyScroll() {
1376
+ if (!this.bodyScrollLocked) {
1377
+ document.body.style.overflow = 'hidden';
1378
+ this.bodyScrollLocked = true;
1379
+ }
1380
+ }
1381
+ unlockBodyScroll() {
1382
+ if (this.bodyScrollLocked) {
1383
+ document.body.style.overflow = '';
1384
+ this.bodyScrollLocked = false;
1385
+ }
1386
+ }
1387
+ toggle() {
1388
+ if (this.disableClose && this.isOpen) {
1389
+ return;
1390
+ }
1391
+ this.isOpen = !this.isOpen;
1392
+ this.isOpenChange.emit(this.isOpen);
1393
+ this.drawerToggle.emit();
1394
+ if (this.isOpen) {
1395
+ this.drawerOpened.emit();
1396
+ if (this.mode === 'overlay') {
1397
+ this.lockBodyScroll();
1398
+ }
1399
+ }
1400
+ else {
1401
+ this.drawerClosed.emit();
1402
+ this.unlockBodyScroll();
1403
+ }
1404
+ if (this.isMobile && this.autoCloseOnMobile && this.isOpen) {
1405
+ setTimeout(() => this.close(), 300);
1406
+ }
1407
+ }
1408
+ open() {
1409
+ if (!this.isOpen && !this.disableClose) {
1410
+ this.isOpen = true;
1411
+ this.isOpenChange.emit(this.isOpen);
1412
+ this.drawerToggle.emit();
1413
+ this.drawerOpened.emit();
1414
+ if (this.mode === 'overlay') {
1415
+ this.lockBodyScroll();
1416
+ }
1417
+ }
1418
+ }
1419
+ close() {
1420
+ if (this.isOpen && !this.disableClose) {
1421
+ this.isOpen = false;
1422
+ this.isOpenChange.emit(this.isOpen);
1423
+ this.drawerToggle.emit();
1424
+ this.drawerClosed.emit();
1425
+ this.unlockBodyScroll();
1426
+ }
1427
+ }
1428
+ onBackdropClick() {
1429
+ if (this.hasBackdrop && this.mode === 'overlay' && !this.disableClose) {
1430
+ this.close();
1431
+ }
1432
+ }
1433
+ onKeyDown(event) {
1434
+ if (event.key === 'Escape' && this.isOpen && !this.disableClose) {
1435
+ this.close();
1436
+ }
1437
+ }
1438
+ getDrawerTransform() {
1439
+ // Centralização em telas grandes
1440
+ if (window.innerWidth >= 1920) {
1441
+ return `translateX(calc(50vw - 960px))`;
1442
+ }
1443
+ return 'none';
1444
+ }
1445
+ get animationState() {
1446
+ return this.isOpen ? 'open' : 'closed';
1447
+ }
1448
+ get isOverlayMode() {
1449
+ return this.mode === 'overlay';
1450
+ }
1451
+ get isPushMode() {
1452
+ return this.mode === 'push';
1453
+ }
1454
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1455
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaDrawerComponent, isStandalone: false, selector: "matcha-drawer", inputs: { isOpen: "isOpen", mode: "mode", position: "position", width: "width", hasBackdrop: "hasBackdrop", disableClose: "disableClose", autoCloseOnMobile: "autoCloseOnMobile", breakpoint: "breakpoint", elevation: "elevation", hasFooter: "hasFooter" }, outputs: { isOpenChange: "isOpenChange", drawerToggle: "drawerToggle", drawerOpened: "drawerOpened", drawerClosed: "drawerClosed" }, host: { properties: { "class": "this.drawerClasses", "style.width": "this.drawerWidth", "style.height": "this.drawerHeight" } }, viewQueries: [{ propertyName: "drawerContent", first: true, predicate: ["drawerContent"], descendants: true }], ngImport: i0, template: "<!-- Backdrop para modo overlay -->\n<div *ngIf=\"isOverlayMode && isOpen && hasBackdrop\"\n class=\"matcha-backdrop\"\n [@fadeInOut]=\"isOpen ? '1' : '0'\"\n (click)=\"onBackdropClick()\">\n</div>\n\n<!-- Drawer Container Principal -->\n<div *ngIf=\"(isOpen && mode === 'overlay') || mode === 'push'\"\n class=\"matcha-drawer-container\"\n [class.matcha-drawer-overlay-mode]=\"isOverlayMode\"\n [class.matcha-drawer-push-mode]=\"isPushMode\"\n [class.matcha-drawer-left]=\"position === 'left'\"\n [class.matcha-drawer-right]=\"position === 'right'\"\n [@slideInLeft]=\"animationState\"\n [style.transform]=\"getDrawerTransform()\"\n [style.width]=\"drawerWidth\"\n [style.overflow]=\"isOpen ? 'visible' : 'hidden'\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\">\n\n <!-- Drawer Content -->\n <div class=\"matcha-drawer-content\"\n [style.min-width]=\"width\">\n\n <!-- Header do drawer -->\n <div class=\"matcha-drawer-header\">\n <ng-content select=\"[drawer-header]\"></ng-content>\n\n </div>\n\n <!-- Conte\u00FAdo principal do drawer -->\n <div class=\"matcha-drawer-main-content\">\n <ng-content select=\"[drawer-content]\"></ng-content>\n <ng-content></ng-content>\n </div>\n\n <!-- Footer do drawer -->\n <div *ngIf=\"hasFooter\" class=\"matcha-drawer-footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: createAnimations }); }
1456
+ }
1457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerComponent, decorators: [{
1458
+ type: Component,
1459
+ args: [{ selector: 'matcha-drawer', animations: createAnimations, standalone: false, template: "<!-- Backdrop para modo overlay -->\n<div *ngIf=\"isOverlayMode && isOpen && hasBackdrop\"\n class=\"matcha-backdrop\"\n [@fadeInOut]=\"isOpen ? '1' : '0'\"\n (click)=\"onBackdropClick()\">\n</div>\n\n<!-- Drawer Container Principal -->\n<div *ngIf=\"(isOpen && mode === 'overlay') || mode === 'push'\"\n class=\"matcha-drawer-container\"\n [class.matcha-drawer-overlay-mode]=\"isOverlayMode\"\n [class.matcha-drawer-push-mode]=\"isPushMode\"\n [class.matcha-drawer-left]=\"position === 'left'\"\n [class.matcha-drawer-right]=\"position === 'right'\"\n [@slideInLeft]=\"animationState\"\n [style.transform]=\"getDrawerTransform()\"\n [style.width]=\"drawerWidth\"\n [style.overflow]=\"isOpen ? 'visible' : 'hidden'\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\">\n\n <!-- Drawer Content -->\n <div class=\"matcha-drawer-content\"\n [style.min-width]=\"width\">\n\n <!-- Header do drawer -->\n <div class=\"matcha-drawer-header\">\n <ng-content select=\"[drawer-header]\"></ng-content>\n\n </div>\n\n <!-- Conte\u00FAdo principal do drawer -->\n <div class=\"matcha-drawer-main-content\">\n <ng-content select=\"[drawer-content]\"></ng-content>\n <ng-content></ng-content>\n </div>\n\n <!-- Footer do drawer -->\n <div *ngIf=\"hasFooter\" class=\"matcha-drawer-footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n</div>\n" }]
1460
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { isOpen: [{
1461
+ type: Input
1462
+ }], mode: [{
1463
+ type: Input
1464
+ }], position: [{
1465
+ type: Input
1466
+ }], width: [{
1467
+ type: Input
1468
+ }], hasBackdrop: [{
1469
+ type: Input
1470
+ }], disableClose: [{
1471
+ type: Input
1472
+ }], autoCloseOnMobile: [{
1473
+ type: Input
1474
+ }], breakpoint: [{
1475
+ type: Input
1476
+ }], elevation: [{
1477
+ type: Input
1478
+ }], hasFooter: [{
1479
+ type: Input
1480
+ }], isOpenChange: [{
1481
+ type: Output
1482
+ }], drawerToggle: [{
1483
+ type: Output
1484
+ }], drawerOpened: [{
1485
+ type: Output
1486
+ }], drawerClosed: [{
1487
+ type: Output
1488
+ }], drawerContent: [{
1489
+ type: ViewChild,
1490
+ args: ['drawerContent', { static: false }]
1491
+ }], drawerClasses: [{
1492
+ type: HostBinding,
1493
+ args: ['class']
1494
+ }], drawerWidth: [{
1495
+ type: HostBinding,
1496
+ args: ['style.width']
1497
+ }], drawerHeight: [{
1498
+ type: HostBinding,
1499
+ args: ['style.height']
1500
+ }] } });
1501
+
1502
+ class MatchaDrawerContainerComponent {
1503
+ constructor() {
1504
+ this.hasBackdrop = true;
1505
+ this.autoFocus = true;
1506
+ }
1507
+ ngOnInit() {
1508
+ if (this.drawer) {
1509
+ this.setupDrawerEvents();
1510
+ }
1511
+ }
1512
+ ngOnDestroy() {
1513
+ // Cleanup se necessário
1514
+ }
1515
+ setupDrawerEvents() {
1516
+ if (this.drawer) {
1517
+ this.drawer.drawerOpened.subscribe(() => {
1518
+ if (this.autoFocus) {
1519
+ setTimeout(() => {
1520
+ // Focus será gerenciado pelo próprio drawer component
1521
+ }, 100);
1522
+ }
1523
+ });
1524
+ }
1525
+ }
1526
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1527
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaDrawerContainerComponent, isStandalone: false, selector: "matcha-drawer-container", inputs: { hasBackdrop: "hasBackdrop", autoFocus: "autoFocus" }, queries: [{ propertyName: "drawer", first: true, predicate: MatchaDrawerComponent, descendants: true }], ngImport: i0, template: "<div class=\"matcha-drawer-container-wrapper\">\n <ng-content></ng-content>\n</div>\n" }); }
1528
+ }
1529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerContainerComponent, decorators: [{
1530
+ type: Component,
1531
+ args: [{ selector: 'matcha-drawer-container', standalone: false, template: "<div class=\"matcha-drawer-container-wrapper\">\n <ng-content></ng-content>\n</div>\n" }]
1532
+ }], propDecorators: { hasBackdrop: [{
1533
+ type: Input
1534
+ }], autoFocus: [{
1535
+ type: Input
1536
+ }], drawer: [{
1537
+ type: ContentChild,
1538
+ args: [MatchaDrawerComponent]
1539
+ }] } });
1540
+
1541
+ class MatchaDrawerContentComponent {
1542
+ constructor() {
1543
+ this.padding = '24px';
1544
+ this.scrollable = true;
1545
+ this.maxHeight = 'auto';
1546
+ }
1547
+ get contentClasses() {
1548
+ return `matcha-drawer-content ${this.scrollable ? 'scrollable' : 'no-scroll'}`;
1549
+ }
1550
+ get maxHeightStyle() {
1551
+ return this.maxHeight;
1552
+ }
1553
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1554
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaDrawerContentComponent, isStandalone: false, selector: "matcha-drawer-content", inputs: { padding: "padding", scrollable: "scrollable", maxHeight: "maxHeight" }, host: { properties: { "class": "this.contentClasses", "style.max-height": "this.maxHeightStyle" } }, ngImport: i0, template: `
1555
+ <div class="matcha-drawer-content-wrapper">
1556
+ <ng-content></ng-content>
1557
+ </div>
1558
+ `, isInline: true }); }
1559
+ }
1560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerContentComponent, decorators: [{
1561
+ type: Component,
1562
+ args: [{
1563
+ selector: 'matcha-drawer-content',
1564
+ template: `
1565
+ <div class="matcha-drawer-content-wrapper">
1566
+ <ng-content></ng-content>
1567
+ </div>
1568
+ `,
1569
+ standalone: false
1570
+ }]
1571
+ }], propDecorators: { padding: [{
1572
+ type: Input
1573
+ }], scrollable: [{
1574
+ type: Input
1575
+ }], maxHeight: [{
1576
+ type: Input
1577
+ }], contentClasses: [{
1578
+ type: HostBinding,
1579
+ args: ['class']
1580
+ }], maxHeightStyle: [{
1581
+ type: HostBinding,
1582
+ args: ['style.max-height']
1583
+ }] } });
1584
+
1237
1585
  class MatchaIconComponent {
1238
1586
  constructor() {
1239
1587
  this.name = '';
@@ -1650,9 +1998,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
1650
1998
 
1651
1999
  class MatchaToolbarComponent {
1652
2000
  constructor() {
2001
+ this.elevation = 1;
1653
2002
  this.isMobileScreen = false;
1654
2003
  this.mobileBreakpoint = 1024;
1655
2004
  }
2005
+ get elevationClass() {
2006
+ return `elevation-z-${this.elevation}`;
2007
+ }
1656
2008
  ngOnInit() {
1657
2009
  this.checkScreenWidth();
1658
2010
  }
@@ -1669,12 +2021,14 @@ class MatchaToolbarComponent {
1669
2021
  clearTimeout(this.resizeTimeout);
1670
2022
  }
1671
2023
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1672
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaToolbarComponent, isStandalone: false, selector: "matcha-toolbar", host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0, template: "<!-- HOW TO USE:\n<matcha-toolbar>\n <matcha-title type=\"icon\" icon=\"settings-out\" (iconClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-NO-ICONE-AQUI\">\n {{'FINANCIAL.CATEGORY.TITLE' | translate}}\n </matcha-title>\n <search-form toolbar-form-field (searchText)=\"searchText($event)\"></search-form>\n <matcha-toolbar-button icon=\"home-out\" (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-button>\n <matcha-toolbar-content>\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-content>\n <matcha-toolbar-main-button (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-main-button>\n QUALQUER OUTRA FUNCIONALIDADE AQUI\n</matcha-toolbar>\n-->\n<ng-template #toolbarMainButton>\n <ng-content select=\"matcha-toolbar-main-button\"></ng-content>\n</ng-template>\n\n<ng-template #toolbarCustomButton>\n <ng-content select=\"matcha-toolbar-custom-button\"></ng-content>\n</ng-template>\n<!-- CONTENT HEADER -->\n<div class=\"flex-column background-surface radius-8 matcha-elevation-z1\">\n <div class=\"flex-column flex-md-row flex-wrap p-16 flex-align-center flex-space-between h-auto min-h-40 flex-wrap\">\n <div class=\"w-100-p--force w-md-auto--force flex-space-between flex-wrap\">\n <div class=\"min-h-32 flex-center-center\">\n <ng-content select=\"matcha-title\"></ng-content>\n </div>\n <ng-container *ngIf=\"isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n <div class=\"w-100-p--force w-md-auto--force flex-row flex-end gap-8\">\n <!-- ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <ng-content select=\"search-form\"></ng-content>\n <!-- /ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <div class=\"flex-row gap-8\">\n <ng-content select=\"matcha-toolbar-button\"></ng-content>\n <ng-content select=\"matcha-toolbar-content\"></ng-content>\n <ng-content></ng-content>\n <ng-container *ngIf=\"!isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n<!-- / CONTENT HEADER -->\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
2024
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaToolbarComponent, isStandalone: false, selector: "matcha-toolbar", inputs: { elevation: "elevation" }, host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0, template: "<!-- HOW TO USE:\n<matcha-toolbar>\n <matcha-title type=\"icon\" icon=\"settings-out\" (iconClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-NO-ICONE-AQUI\">\n {{'FINANCIAL.CATEGORY.TITLE' | translate}}\n </matcha-title>\n <search-form toolbar-form-field (searchText)=\"searchText($event)\"></search-form>\n <matcha-toolbar-button icon=\"home-out\" (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-button>\n <matcha-toolbar-content>\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-content>\n <matcha-toolbar-main-button (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-main-button>\n QUALQUER OUTRA FUNCIONALIDADE AQUI\n</matcha-toolbar>\n-->\n<ng-template #toolbarMainButton>\n <ng-content select=\"matcha-toolbar-main-button\"></ng-content>\n</ng-template>\n\n<ng-template #toolbarCustomButton>\n <ng-content select=\"matcha-toolbar-custom-button\"></ng-content>\n</ng-template>\n<!-- CONTENT HEADER -->\n<div class=\"flex-column background-surface radius-8\" [ngClass]=\"elevationClass\">\n <div class=\"flex-column flex-md-row flex-wrap p-16 flex-align-center flex-space-between h-auto min-h-40 flex-wrap\">\n <div class=\"w-100-p--force w-md-auto--force flex-space-between flex-wrap\">\n <div class=\"min-h-32 flex-center-center\">\n <ng-content select=\"matcha-title\"></ng-content>\n </div>\n <ng-container *ngIf=\"isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n <div class=\"w-100-p--force w-md-auto--force flex-row flex-end gap-8\">\n <!-- ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <ng-content select=\"search-form\"></ng-content>\n <!-- /ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <div class=\"flex-row gap-8\">\n <ng-content select=\"matcha-toolbar-button\"></ng-content>\n <ng-content select=\"matcha-toolbar-content\"></ng-content>\n <ng-content></ng-content>\n <ng-container *ngIf=\"!isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n<!-- / CONTENT HEADER -->\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
1673
2025
  }
1674
2026
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaToolbarComponent, decorators: [{
1675
2027
  type: Component,
1676
- args: [{ selector: 'matcha-toolbar', standalone: false, template: "<!-- HOW TO USE:\n<matcha-toolbar>\n <matcha-title type=\"icon\" icon=\"settings-out\" (iconClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-NO-ICONE-AQUI\">\n {{'FINANCIAL.CATEGORY.TITLE' | translate}}\n </matcha-title>\n <search-form toolbar-form-field (searchText)=\"searchText($event)\"></search-form>\n <matcha-toolbar-button icon=\"home-out\" (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-button>\n <matcha-toolbar-content>\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-content>\n <matcha-toolbar-main-button (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-main-button>\n QUALQUER OUTRA FUNCIONALIDADE AQUI\n</matcha-toolbar>\n-->\n<ng-template #toolbarMainButton>\n <ng-content select=\"matcha-toolbar-main-button\"></ng-content>\n</ng-template>\n\n<ng-template #toolbarCustomButton>\n <ng-content select=\"matcha-toolbar-custom-button\"></ng-content>\n</ng-template>\n<!-- CONTENT HEADER -->\n<div class=\"flex-column background-surface radius-8 matcha-elevation-z1\">\n <div class=\"flex-column flex-md-row flex-wrap p-16 flex-align-center flex-space-between h-auto min-h-40 flex-wrap\">\n <div class=\"w-100-p--force w-md-auto--force flex-space-between flex-wrap\">\n <div class=\"min-h-32 flex-center-center\">\n <ng-content select=\"matcha-title\"></ng-content>\n </div>\n <ng-container *ngIf=\"isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n <div class=\"w-100-p--force w-md-auto--force flex-row flex-end gap-8\">\n <!-- ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <ng-content select=\"search-form\"></ng-content>\n <!-- /ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <div class=\"flex-row gap-8\">\n <ng-content select=\"matcha-toolbar-button\"></ng-content>\n <ng-content select=\"matcha-toolbar-content\"></ng-content>\n <ng-content></ng-content>\n <ng-container *ngIf=\"!isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n<!-- / CONTENT HEADER -->\n" }]
1677
- }], propDecorators: { onResize: [{
2028
+ args: [{ selector: 'matcha-toolbar', standalone: false, template: "<!-- HOW TO USE:\n<matcha-toolbar>\n <matcha-title type=\"icon\" icon=\"settings-out\" (iconClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-NO-ICONE-AQUI\">\n {{'FINANCIAL.CATEGORY.TITLE' | translate}}\n </matcha-title>\n <search-form toolbar-form-field (searchText)=\"searchText($event)\"></search-form>\n <matcha-toolbar-button icon=\"home-out\" (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-button>\n <matcha-toolbar-content>\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-content>\n <matcha-toolbar-main-button (buttonClick)=\"FUN\u00C7\u00C3O-AO-CLICAR-AQUI\">\n TEXTO DO BOT\u00C3O AQUI\n </matcha-toolbar-main-button>\n QUALQUER OUTRA FUNCIONALIDADE AQUI\n</matcha-toolbar>\n-->\n<ng-template #toolbarMainButton>\n <ng-content select=\"matcha-toolbar-main-button\"></ng-content>\n</ng-template>\n\n<ng-template #toolbarCustomButton>\n <ng-content select=\"matcha-toolbar-custom-button\"></ng-content>\n</ng-template>\n<!-- CONTENT HEADER -->\n<div class=\"flex-column background-surface radius-8\" [ngClass]=\"elevationClass\">\n <div class=\"flex-column flex-md-row flex-wrap p-16 flex-align-center flex-space-between h-auto min-h-40 flex-wrap\">\n <div class=\"w-100-p--force w-md-auto--force flex-space-between flex-wrap\">\n <div class=\"min-h-32 flex-center-center\">\n <ng-content select=\"matcha-title\"></ng-content>\n </div>\n <ng-container *ngIf=\"isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n <div class=\"w-100-p--force w-md-auto--force flex-row flex-end gap-8\">\n <!-- ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <ng-content select=\"search-form\"></ng-content>\n <!-- /ISSO DEVE SER SUBSTITUIDO PELO matcha-input-search FOR IMPLEMENTADO -->\n <div class=\"flex-row gap-8\">\n <ng-content select=\"matcha-toolbar-button\"></ng-content>\n <ng-content select=\"matcha-toolbar-content\"></ng-content>\n <ng-content></ng-content>\n <ng-container *ngIf=\"!isMobileScreen\">\n <ng-container *ngTemplateOutlet=\"toolbarMainButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"toolbarCustomButton\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n<!-- / CONTENT HEADER -->\n" }]
2029
+ }], propDecorators: { elevation: [{
2030
+ type: Input
2031
+ }], onResize: [{
1678
2032
  type: HostListener,
1679
2033
  args: ['window:resize', []]
1680
2034
  }] } });
@@ -1756,11 +2110,11 @@ class MatchaFormFieldComponent {
1756
2110
  return !!this.control?.invalid && (this.control?.touched || this.control?.dirty);
1757
2111
  }
1758
2112
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1759
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaFormFieldComponent, isStandalone: false, selector: "matcha-form-field", inputs: { color: "color", size: "size", sizeXs: ["size-xs", "sizeXs"], sizeSm: ["size-sm", "sizeSm"], sizeMd: ["size-md", "sizeMd"], sizeLg: ["size-lg", "sizeLg"], sizeXl: ["size-xl", "sizeXl"] }, queries: [{ propertyName: "controlDir", first: true, predicate: FormControlName, descendants: true }], ngImport: i0, template: "<div class=\"flex-column gap-4\">\n <div class=\"matcha-form-field position-relative w-100-p min-h-40 flex-align-center\" #inputSelector>\n <div class=\"flex-row position-absolute w-100-p min-h-40 h-100-p\">\n <div class=\"bl-2 bt-2 bb-2 radius-left-8 min-w-8 border-color-{{color}}\"></div>\n <div class=\"bb-2 w-auto border-color-{{color}}\">\n <ng-content select=\"matcha-label\"></ng-content>\n </div>\n <div class=\"br-2 bt-2 bb-2 radius-right-8 w-100-p border-color-{{color}}\"></div>\n </div>\n <div class=\"flex-row position-relative py-8 px-12 gap-8 w-100-p\">\n <ng-content></ng-content>\n </div>\n </div>\n <ng-container *ngIf=\"showError\">\n <ng-content select=\"matcha-error\"></ng-content>\n </ng-container>\n <ng-content select=\"matcha-autocomplete\"></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2113
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaFormFieldComponent, isStandalone: false, selector: "matcha-form-field", inputs: { color: "color", size: "size", sizeXs: ["size-xs", "sizeXs"], sizeSm: ["size-sm", "sizeSm"], sizeMd: ["size-md", "sizeMd"], sizeLg: ["size-lg", "sizeLg"], sizeXl: ["size-xl", "sizeXl"] }, queries: [{ propertyName: "controlDir", first: true, predicate: FormControlName, descendants: true }], ngImport: i0, template: "<div class=\"flex-column gap-4\">\n <div class=\"matcha-form-field position-relative w-100-p min-h-40 flex-align-center\" #inputSelector>\n <div class=\"flex-row position-absolute w-100-p min-h-40 h-100-p\">\n <div class=\"bl-2 bt-2 bb-2 radius-left-8 min-w-8 border-color-{{color}}\"></div>\n <div class=\"bb-2 w-auto border-color-{{color}}\">\n <ng-content select=\"matcha-label\"></ng-content>\n </div>\n <div class=\"br-2 bt-2 bb-2 radius-right-8 w-100-p border-color-{{color}}\"></div>\n </div>\n <div class=\"flex-row position-relative py-8 px-12 gap-8 w-100-p\">\n <ng-content></ng-content>\n </div>\n </div>\n <ng-container *ngIf=\"showError\">\n <ng-content select=\"matcha-error\"></ng-content>\n </ng-container>\n <ng-content select=\"matcha-autocomplete\"></ng-content>\n</div>\n<ng-content select=\"matcha-hint-text\"></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1760
2114
  }
1761
2115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaFormFieldComponent, decorators: [{
1762
2116
  type: Component,
1763
- args: [{ selector: 'matcha-form-field', standalone: false, template: "<div class=\"flex-column gap-4\">\n <div class=\"matcha-form-field position-relative w-100-p min-h-40 flex-align-center\" #inputSelector>\n <div class=\"flex-row position-absolute w-100-p min-h-40 h-100-p\">\n <div class=\"bl-2 bt-2 bb-2 radius-left-8 min-w-8 border-color-{{color}}\"></div>\n <div class=\"bb-2 w-auto border-color-{{color}}\">\n <ng-content select=\"matcha-label\"></ng-content>\n </div>\n <div class=\"br-2 bt-2 bb-2 radius-right-8 w-100-p border-color-{{color}}\"></div>\n </div>\n <div class=\"flex-row position-relative py-8 px-12 gap-8 w-100-p\">\n <ng-content></ng-content>\n </div>\n </div>\n <ng-container *ngIf=\"showError\">\n <ng-content select=\"matcha-error\"></ng-content>\n </ng-container>\n <ng-content select=\"matcha-autocomplete\"></ng-content>\n</div>\n" }]
2117
+ args: [{ selector: 'matcha-form-field', standalone: false, template: "<div class=\"flex-column gap-4\">\n <div class=\"matcha-form-field position-relative w-100-p min-h-40 flex-align-center\" #inputSelector>\n <div class=\"flex-row position-absolute w-100-p min-h-40 h-100-p\">\n <div class=\"bl-2 bt-2 bb-2 radius-left-8 min-w-8 border-color-{{color}}\"></div>\n <div class=\"bb-2 w-auto border-color-{{color}}\">\n <ng-content select=\"matcha-label\"></ng-content>\n </div>\n <div class=\"br-2 bt-2 bb-2 radius-right-8 w-100-p border-color-{{color}}\"></div>\n </div>\n <div class=\"flex-row position-relative py-8 px-12 gap-8 w-100-p\">\n <ng-content></ng-content>\n </div>\n </div>\n <ng-container *ngIf=\"showError\">\n <ng-content select=\"matcha-error\"></ng-content>\n </ng-container>\n <ng-content select=\"matcha-autocomplete\"></ng-content>\n</div>\n<ng-content select=\"matcha-hint-text\"></ng-content>\n" }]
1764
2118
  }], propDecorators: { color: [{
1765
2119
  type: Input
1766
2120
  }], size: [{
@@ -1890,19 +2244,21 @@ class MatchaCheckboxComponent {
1890
2244
  this.onChange = () => { };
1891
2245
  this.onTouched = () => { };
1892
2246
  }
2247
+ get disabled() {
2248
+ return this._disabled;
2249
+ }
1893
2250
  set disabled(value) {
1894
2251
  // Converte 'false' (string) ou false (boolean) para false, e qualquer outro valor para true.
1895
2252
  this._disabled = value != null && `${value}` !== 'false';
1896
2253
  }
1897
- get disabled() {
1898
- return this._disabled;
1899
- }
1900
2254
  get checked() {
1901
2255
  return this._checked;
1902
2256
  }
1903
2257
  set checked(value) {
1904
- if (value !== this._checked) {
1905
- this._checked = value;
2258
+ // Converte string para boolean: 'false' (string) ou false (boolean) para false, qualquer outro valor para true
2259
+ const booleanValue = value != null && `${value}` !== 'false';
2260
+ if (booleanValue !== this._checked) {
2261
+ this._checked = booleanValue;
1906
2262
  this.onChange(this._checked);
1907
2263
  }
1908
2264
  }
@@ -2131,15 +2487,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2131
2487
 
2132
2488
  class MatchaSpinnerComponent {
2133
2489
  set progress(value) {
2134
- this._progress = Number(value);
2490
+ this._progressValue = Number(value);
2135
2491
  }
2136
2492
  get progress() {
2137
- return this._progress;
2493
+ return this._progressValue;
2494
+ }
2495
+ get _progress() { return this.progress; }
2496
+ get _color() { return this.color; }
2497
+ get hostSize() {
2498
+ return this.size;
2138
2499
  }
2139
2500
  constructor(_elementRef, _renderer) {
2140
2501
  this._elementRef = _elementRef;
2141
2502
  this._renderer = _renderer;
2142
- this._progress = 0;
2503
+ this._progressValue = 0;
2143
2504
  this.color = 'accent';
2144
2505
  this.size = null;
2145
2506
  this.sizeXs = null;
@@ -2174,7 +2535,7 @@ class MatchaSpinnerComponent {
2174
2535
  return this.circumference - (progress / 100) * this.circumference;
2175
2536
  }
2176
2537
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSpinnerComponent, deps: [{ token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
2177
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaSpinnerComponent, isStandalone: false, selector: "matcha-spinner", inputs: { progress: "progress", color: "color", size: "size", sizeXs: ["size-xs", "sizeXs"], sizeSm: ["size-sm", "sizeSm"], sizeMd: ["size-md", "sizeMd"], sizeLg: ["size-lg", "sizeLg"], sizeXl: ["size-xl", "sizeXl"] }, ngImport: i0, template: "<div\n class=\"matcha-spinner\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"progress\"\n>\n <svg [attr.viewBox]=\"'0 0 ' + diameter + ' ' + diameter\" class=\"spinner\">\n <circle\n class=\"spinner-placeholder\"\n [attr.cx]=\"center\"\n [attr.cy]=\"center\"\n [attr.r]=\"radius\"\n [attr.stroke-width]=\"strokeWidth\"\n stroke-linecap=\"round\"\n />\n <circle\n class=\"spinner-progress path\"\n [attr.cx]=\"center\"\n [attr.cy]=\"center\"\n [attr.r]=\"radius\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke]=\"color\"\n [attr.stroke-dasharray]=\"circumference\"\n [attr.stroke-dashoffset]=\"dashOffset\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [""] }); }
2538
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaSpinnerComponent, isStandalone: false, selector: "matcha-spinner", inputs: { progress: "progress", color: "color", size: "size", sizeXs: ["size-xs", "sizeXs"], sizeSm: ["size-sm", "sizeSm"], sizeMd: ["size-md", "sizeMd"], sizeLg: ["size-lg", "sizeLg"], sizeXl: ["size-xl", "sizeXl"] }, host: { properties: { "attr.progress": "this._progress", "attr.color": "this._color", "attr.size": "this.hostSize" } }, ngImport: i0, template: "<div\n class=\"matcha-spinner\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"progress\"\n>\n <svg [attr.viewBox]=\"'0 0 ' + diameter + ' ' + diameter\" class=\"spinner\">\n <circle\n class=\"spinner-placeholder\"\n [attr.cx]=\"center\"\n [attr.cy]=\"center\"\n [attr.r]=\"radius\"\n [attr.stroke-width]=\"strokeWidth\"\n stroke-linecap=\"round\"\n />\n <circle\n class=\"spinner-progress path\"\n [attr.cx]=\"center\"\n [attr.cy]=\"center\"\n [attr.r]=\"radius\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke]=\"color\"\n [attr.stroke-dasharray]=\"circumference\"\n [attr.stroke-dashoffset]=\"dashOffset\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [""] }); }
2178
2539
  }
2179
2540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSpinnerComponent, decorators: [{
2180
2541
  type: Component,
@@ -2187,11 +2548,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2187
2548
  args: [Renderer2]
2188
2549
  }] }], propDecorators: { progress: [{
2189
2550
  type: Input
2551
+ }], _progress: [{
2552
+ type: HostBinding,
2553
+ args: ['attr.progress']
2190
2554
  }], color: [{
2191
2555
  type: Input
2556
+ }], _color: [{
2557
+ type: HostBinding,
2558
+ args: ['attr.color']
2192
2559
  }], size: [{
2193
2560
  type: Input,
2194
2561
  args: ['size']
2562
+ }], hostSize: [{
2563
+ type: HostBinding,
2564
+ args: ['attr.size']
2195
2565
  }], sizeXs: [{
2196
2566
  type: Input,
2197
2567
  args: ['size-xs']
@@ -2231,11 +2601,11 @@ class MatchaHintTextComponent {
2231
2601
  }
2232
2602
  }
2233
2603
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaHintTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2234
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaHintTextComponent, isStandalone: false, selector: "matcha-hint-text", inputs: { type: "type", size: "size" }, ngImport: i0, template: "<div class=\"d-flex gap-4\">\n <matcha-icon color=\"{{ iconColor }}\" name=\"{{ iconName }}\"> </matcha-icon>\n <span class=\"text\"><ng-content></ng-content></span>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatchaIconComponent, selector: "matcha-icon", inputs: ["name", "size", "color", "class", "loading"] }] }); }
2604
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaHintTextComponent, isStandalone: false, selector: "matcha-hint-text", inputs: { type: "type", size: "size" }, ngImport: i0, template: "<div class=\"d-flex flex-align-center gap-4\">\n <matcha-icon color=\"{{ iconColor }}\" name=\"{{ iconName }}\"> </matcha-icon>\n <span class=\"text\"><ng-content></ng-content></span>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatchaIconComponent, selector: "matcha-icon", inputs: ["name", "size", "color", "class", "loading"] }] }); }
2235
2605
  }
2236
2606
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaHintTextComponent, decorators: [{
2237
2607
  type: Component,
2238
- args: [{ selector: 'matcha-hint-text', standalone: false, template: "<div class=\"d-flex gap-4\">\n <matcha-icon color=\"{{ iconColor }}\" name=\"{{ iconName }}\"> </matcha-icon>\n <span class=\"text\"><ng-content></ng-content></span>\n</div>\n" }]
2608
+ args: [{ selector: 'matcha-hint-text', standalone: false, template: "<div class=\"d-flex flex-align-center gap-4\">\n <matcha-icon color=\"{{ iconColor }}\" name=\"{{ iconName }}\"> </matcha-icon>\n <span class=\"text\"><ng-content></ng-content></span>\n</div>\n" }]
2239
2609
  }], propDecorators: { type: [{
2240
2610
  type: Input,
2241
2611
  args: ['type']
@@ -2282,147 +2652,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2282
2652
  type: Input
2283
2653
  }] } });
2284
2654
 
2285
- class MatchaOptionService {
2286
- constructor() {
2287
- this._optionsSubject = new BehaviorSubject([]);
2288
- this.options$ = this._optionsSubject.asObservable();
2289
- this._activeOptionSubject = new BehaviorSubject(0);
2290
- this.activeOption$ = this._activeOptionSubject.asObservable();
2291
- this._canShowOptionsSubject = new BehaviorSubject(false);
2292
- this.canShowOptions$ = this._canShowOptionsSubject.asObservable();
2293
- this._selectedOptionSubject = new Subject();
2294
- this.selectedOption$ = this._selectedOptionSubject.asObservable();
2295
- }
2296
- setSelectedOption(selectedOption) {
2297
- this._selectedOptionSubject.next(selectedOption);
2298
- }
2299
- getCanShowOptions() {
2300
- return this._canShowOptionsSubject.value;
2301
- }
2302
- setCanShowOptions(canShowOptions) {
2303
- this._canShowOptionsSubject.next(canShowOptions);
2304
- }
2305
- updateOptions(options) {
2306
- this._optionsSubject.next(options);
2307
- }
2308
- updateActiveOption(activeOption) {
2309
- this._activeOptionSubject.next(activeOption);
2310
- }
2311
- resetActiveOption() {
2312
- this.updateActiveOption(0);
2313
- const currentOptions = this._optionsSubject.value;
2314
- const activeOption = this._activeOptionSubject.value;
2315
- currentOptions.forEach((option, index) => {
2316
- index === activeOption ? option.setIsOptionActive(true, false) : option.setIsOptionActive(false, false);
2317
- });
2318
- return;
2319
- }
2320
- removeActiveOption() {
2321
- const currentOptions = this._optionsSubject.value;
2322
- currentOptions.forEach((option) => {
2323
- option.isOptionActive = false;
2324
- });
2325
- this.updateActiveOption(-1);
2326
- return;
2327
- }
2328
- changeActiveOption(stepsToMove) {
2329
- const currentOptions = this._optionsSubject.value;
2330
- const lastActiveOption = this._activeOptionSubject.value;
2331
- this.updateActiveOption(Math.max(0, Math.min(currentOptions.length - 1, lastActiveOption + stepsToMove)));
2332
- const currentActiveOption = this._activeOptionSubject.value;
2333
- currentOptions.forEach((option, index) => {
2334
- option.setIsOptionActive(index === currentActiveOption, false);
2335
- });
2336
- return;
2337
- }
2338
- selectActiveOption() {
2339
- const currentOptions = this._optionsSubject.value;
2340
- const activeOption = this._activeOptionSubject.value;
2341
- if (currentOptions[activeOption]) {
2342
- currentOptions[activeOption].selectOption();
2343
- }
2344
- }
2345
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2346
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionService, providedIn: 'root' }); }
2347
- }
2348
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionService, decorators: [{
2349
- type: Injectable,
2350
- args: [{
2351
- providedIn: 'root',
2352
- }]
2353
- }], ctorParameters: () => [] });
2354
-
2355
- class MatchaOptionComponent {
2356
- constructor(changeDetectorRef, matchaOptionService) {
2357
- this.changeDetectorRef = changeDetectorRef;
2358
- this.matchaOptionService = matchaOptionService;
2359
- this.isOptionActive = false;
2360
- }
2361
- selectOption() {
2362
- this.matchaOptionService.setCanShowOptions(true);
2363
- this.matchaOptionService.setSelectedOption(this.value);
2364
- setTimeout(() => {
2365
- this.matchaOptionService.setCanShowOptions(false);
2366
- }, 300);
2367
- }
2368
- setIsOptionActive(isOptionActive, isMouseEvent) {
2369
- if (isMouseEvent) {
2370
- this.matchaOptionService.removeActiveOption();
2371
- }
2372
- this.isOptionActive = isOptionActive;
2373
- this.changeDetectorRef.detectChanges();
2374
- }
2375
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: MatchaOptionService }], target: i0.ɵɵFactoryTarget.Component }); }
2376
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaOptionComponent, isStandalone: false, selector: "matcha-option", inputs: { value: "value" }, ngImport: i0, template: "<span\n (click)=\"selectOption()\"\n (mouseenter)=\"setIsOptionActive(true, true)\"\n (mouseleave)=\"setIsOptionActive(false, true)\"\n [class.background-bg]=\"isOptionActive\"\n class=\"d-block py-8 cursor-pointer px-16 w-100-p\">\n <ng-content></ng-content>\n</span>\n", styles: [""] }); }
2377
- }
2378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionComponent, decorators: [{
2379
- type: Component,
2380
- args: [{ selector: 'matcha-option', standalone: false, template: "<span\n (click)=\"selectOption()\"\n (mouseenter)=\"setIsOptionActive(true, true)\"\n (mouseleave)=\"setIsOptionActive(false, true)\"\n [class.background-bg]=\"isOptionActive\"\n class=\"d-block py-8 cursor-pointer px-16 w-100-p\">\n <ng-content></ng-content>\n</span>\n" }]
2381
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: MatchaOptionService }], propDecorators: { value: [{
2382
- type: Input
2383
- }] } });
2384
-
2385
- class MatchaAutocompleteComponent {
2386
- constructor(changeDetectorRef, matchaOptionService) {
2387
- this.changeDetectorRef = changeDetectorRef;
2388
- this.matchaOptionService = matchaOptionService;
2389
- this.isDisplayAutocomplete = false;
2390
- this.activeOption = 0;
2391
- }
2392
- ngOnInit() {
2393
- this.matchaOptionService.canShowOptions$.subscribe((canShowOptions) => {
2394
- if (!canShowOptions) {
2395
- this.matchaOptionService.resetActiveOption();
2396
- }
2397
- this.isDisplayAutocomplete = canShowOptions;
2398
- });
2399
- }
2400
- ngAfterContentInit() {
2401
- const options = this.options.toArray();
2402
- if (options.length > 0) {
2403
- options[0].setIsOptionActive(true, false);
2404
- }
2405
- this.matchaOptionService.updateOptions(options);
2406
- this.options.changes.subscribe((newOptions) => {
2407
- this.matchaOptionService.updateOptions(newOptions.toArray());
2408
- this.matchaOptionService.resetActiveOption();
2409
- });
2410
- this.matchaOptionService.activeOption$.subscribe((currentActiveOption) => {
2411
- this.activeOption = currentActiveOption;
2412
- this.changeDetectorRef.detectChanges();
2413
- });
2414
- }
2415
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: MatchaOptionService }], target: i0.ɵɵFactoryTarget.Component }); }
2416
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaAutocompleteComponent, isStandalone: false, selector: "matcha-autocomplete", queries: [{ propertyName: "options", predicate: MatchaOptionComponent }], ngImport: i0, template: "<ng-container *ngIf=\"isDisplayAutocomplete\">\n <div class=\"background-bg pt-24 position-absolute z-index-2 w-100-p\">\n <ul class=\"background-surface m-0 radius-8 elevation-z-1 p-0\">\n <ng-content></ng-content>\n </ul>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2417
- }
2418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteComponent, decorators: [{
2419
- type: Component,
2420
- args: [{ selector: 'matcha-autocomplete', standalone: false, template: "<ng-container *ngIf=\"isDisplayAutocomplete\">\n <div class=\"background-bg pt-24 position-absolute z-index-2 w-100-p\">\n <ul class=\"background-surface m-0 radius-8 elevation-z-1 p-0\">\n <ng-content></ng-content>\n </ul>\n </div>\n</ng-container>\n" }]
2421
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: MatchaOptionService }], propDecorators: { options: [{
2422
- type: ContentChildren,
2423
- args: [MatchaOptionComponent]
2424
- }] } });
2425
-
2426
2655
  class MatchaSlideToggleComponent {
2427
2656
  set checked(value) {
2428
2657
  const newCheckedState = value === '' ? true : !!value;
@@ -2670,11 +2899,11 @@ class MatchaTabsComponent {
2670
2899
  }
2671
2900
  }
2672
2901
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2673
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaTabsComponent, isStandalone: false, selector: "matcha-tabs", inputs: { activeTabIndex: "activeTabIndex" }, outputs: { tabSelected: "tabSelected" }, host: { listeners: { "keydown": "handleKeyboardEvent($event)" } }, queries: [{ propertyName: "tabs", predicate: MatchaTabItemComponent }], 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-88 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=\"text-label 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] }); }
2902
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaTabsComponent, isStandalone: false, selector: "matcha-tabs", inputs: { activeTabIndex: "activeTabIndex" }, outputs: { tabSelected: "tabSelected" }, host: { listeners: { "keydown": "handleKeyboardEvent($event)" } }, queries: [{ propertyName: "tabs", predicate: MatchaTabItemComponent }], 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-88 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] }); }
2674
2903
  }
2675
2904
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaTabsComponent, decorators: [{
2676
2905
  type: Component,
2677
- 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-88 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=\"text-label 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" }]
2906
+ 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-88 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" }]
2678
2907
  }], propDecorators: { tabs: [{
2679
2908
  type: ContentChildren,
2680
2909
  args: [MatchaTabItemComponent]
@@ -3769,66 +3998,721 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3769
3998
  type: Input
3770
3999
  }] } });
3771
4000
 
3772
- class MatchaTooltipDirective {
3773
- constructor(el, renderer) {
3774
- this.el = el;
3775
- this.renderer = renderer;
3776
- this.tooltipText = '';
3777
- this.tooltipDisabled = false;
3778
- this.preferAbove = false;
3779
- this.preferBelow = false;
3780
- this.preferLeft = false;
3781
- this.preferRight = false;
3782
- this.tooltipEnableClose = false;
3783
- this.tooltipElement = null;
3784
- this.documentClickListener = null;
4001
+ class MatchaOptionComponent {
4002
+ constructor(parent, elRef) {
4003
+ this.parent = parent;
4004
+ this.elRef = elRef;
4005
+ this.disabled = false;
4006
+ this.selected = false;
4007
+ // EventEmitters para uso standalone
4008
+ this.optionClick = new EventEmitter();
4009
+ this.optionSelect = new EventEmitter();
3785
4010
  }
3786
- onMouseEnter() {
3787
- if (this.tooltipEnableClose) {
3788
- // Em modo de clique/tap, não abre via hover
4011
+ onClick() {
4012
+ if (this.disabled)
3789
4013
  return;
4014
+ console.log('MatchaOption: Clique na opção', {
4015
+ value: this.value,
4016
+ parent: this.parent,
4017
+ disabled: this.disabled
4018
+ });
4019
+ // ✅ Notifica o pai (se houver) - qualquer componente que implemente MatchaOptionParent
4020
+ if (this.parent) {
4021
+ console.log('MatchaOption: Usando parent.selectOption');
4022
+ this.parent.selectOption(this);
3790
4023
  }
3791
- if (this.tooltipDisabled || this.tooltipElement || !this.tooltipText) {
3792
- return;
4024
+ else {
4025
+ console.log('MatchaOption: Usando fallback findParentAndSelect');
4026
+ // Fallback: busca o pai via DOM
4027
+ this.findParentAndSelect();
4028
+ }
4029
+ // ✅ Emite eventos para uso standalone
4030
+ this.optionClick.emit(this.value);
4031
+ this.optionSelect.emit(this);
4032
+ }
4033
+ findParentAndSelect() {
4034
+ // Busca o elemento pai matcha-autocomplete
4035
+ const autocompleteEl = this.elRef.nativeElement.closest('matcha-autocomplete');
4036
+ if (autocompleteEl) {
4037
+ console.log('MatchaOption: Encontrou autocomplete element', autocompleteEl);
4038
+ // Dispara um evento customizado que o autocomplete pode escutar
4039
+ const event = new CustomEvent('matcha-option-selected', {
4040
+ detail: { option: this, value: this.value },
4041
+ bubbles: true
4042
+ });
4043
+ autocompleteEl.dispatchEvent(event);
4044
+ console.log('MatchaOption: Evento customizado disparado', event);
3793
4045
  }
3794
- this.createTooltip();
3795
- }
3796
- onMouseLeave() {
3797
- if (!this.tooltipEnableClose && this.tooltipElement) {
3798
- this.destroyTooltip();
4046
+ else {
4047
+ console.log('MatchaOption: Não encontrou elemento matcha-autocomplete');
3799
4048
  }
3800
4049
  }
3801
- onClick(event) {
3802
- if (!this.tooltipEnableClose) {
3803
- return;
3804
- }
3805
- event.stopPropagation();
3806
- if (!this.tooltipElement && !this.tooltipDisabled && this.tooltipText) {
3807
- this.createTooltip();
4050
+ onKeydown(ev) {
4051
+ if (ev.key === 'Enter' || ev.key === ' ') {
4052
+ ev.preventDefault();
4053
+ this.onClick();
3808
4054
  }
3809
4055
  }
3810
- createTooltip() {
3811
- // Cria o tooltip e adiciona a classe base
3812
- this.tooltipElement = this.renderer.createElement('div');
3813
- this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content');
3814
- // Define o conteúdo do tooltip
3815
- this.tooltipElement.textContent = this.tooltipText;
3816
- // Define estilos iniciais para medição
3817
- this.renderer.setStyle(this.tooltipElement, 'position', 'absolute');
3818
- this.renderer.setStyle(this.tooltipElement, 'top', '0');
3819
- this.renderer.setStyle(this.tooltipElement, 'left', '0');
3820
- this.renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
3821
- this.renderer.appendChild(document.body, this.tooltipElement);
3822
- // Se tooltipEnableClose estiver ativo, adiciona o botão de fechar
3823
- if (this.tooltipEnableClose) {
3824
- const closeButton = this.renderer.createElement('div');
3825
- this.renderer.addClass(closeButton, 'matcha-tooltip-close');
3826
- this.renderer.appendChild(this.tooltipElement, closeButton);
3827
- this.renderer.listen(closeButton, 'click', (e) => {
3828
- e.stopPropagation();
3829
- this.destroyTooltip();
3830
- });
3831
- this.documentClickListener = this.renderer.listen('document', 'click', (e) => {
4056
+ // Getter para acessar o elemento nativo (usado para scroll)
4057
+ get nativeElement() {
4058
+ return this.elRef.nativeElement;
4059
+ }
4060
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionComponent, deps: [{ token: MATCHA_OPTION_PARENT, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
4061
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaOptionComponent, isStandalone: false, selector: "matcha-option", inputs: { value: "value", disabled: "disabled" }, outputs: { optionClick: "optionClick", optionSelect: "optionSelect" }, host: { attributes: { "role": "option", "tabindex": "0" }, listeners: { "click": "onClick()", "keydown": "onKeydown($event)" }, properties: { "attr.aria-selected": "this.selected" }, classAttribute: "matcha-option" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
4062
+ }
4063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionComponent, decorators: [{
4064
+ type: Component,
4065
+ args: [{
4066
+ selector: 'matcha-option',
4067
+ template: `<ng-content></ng-content>`,
4068
+ host: {
4069
+ class: 'matcha-option',
4070
+ role: 'option',
4071
+ tabindex: '0'
4072
+ },
4073
+ standalone: false,
4074
+ }]
4075
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4076
+ type: Optional
4077
+ }, {
4078
+ type: Inject,
4079
+ args: [MATCHA_OPTION_PARENT]
4080
+ }] }, { type: i0.ElementRef }], propDecorators: { value: [{
4081
+ type: Input
4082
+ }], disabled: [{
4083
+ type: Input
4084
+ }], selected: [{
4085
+ type: HostBinding,
4086
+ args: ['attr.aria-selected']
4087
+ }], optionClick: [{
4088
+ type: Output
4089
+ }], optionSelect: [{
4090
+ type: Output
4091
+ }], onClick: [{
4092
+ type: HostListener,
4093
+ args: ['click']
4094
+ }], onKeydown: [{
4095
+ type: HostListener,
4096
+ args: ['keydown', ['$event']]
4097
+ }] } });
4098
+
4099
+ class MatchaPanelComponent {
4100
+ constructor(elRef, cdr) {
4101
+ this.elRef = elRef;
4102
+ this.cdr = cdr;
4103
+ this.placement = 'auto';
4104
+ this.maxHeight = 280;
4105
+ this.minWidth = 160;
4106
+ this.offset = 4; // Espaçamento entre trigger e painel
4107
+ this.open = false;
4108
+ this.opened = new EventEmitter();
4109
+ this.closed = new EventEmitter();
4110
+ this.panelStyle = {};
4111
+ this.destroy$ = new Subject();
4112
+ }
4113
+ ngOnInit() {
4114
+ // Inicialização básica
4115
+ }
4116
+ ngOnDestroy() {
4117
+ this.destroy$.next();
4118
+ this.destroy$.complete();
4119
+ this.cleanupListeners();
4120
+ }
4121
+ /**
4122
+ * Anexa o painel a um elemento trigger
4123
+ */
4124
+ attachTo(trigger) {
4125
+ this.triggerElement = trigger;
4126
+ }
4127
+ ngAfterViewInit() {
4128
+ // Aguarda a view ser inicializada antes de calcular posição
4129
+ if (this.triggerElement && this.open) {
4130
+ this.cdr.detectChanges();
4131
+ this.updatePosition();
4132
+ }
4133
+ }
4134
+ /**
4135
+ * Lifecycle hook para detectar mudanças no triggerElement
4136
+ */
4137
+ ngOnChanges() {
4138
+ // Só logar quando há mudanças significativas
4139
+ if (this.triggerElement && this.open) {
4140
+ console.log('MatchaPanel: ngOnChanges - painel aberto, atualizando posição');
4141
+ // Usar detectChanges para forçar a detecção de mudanças
4142
+ this.cdr.detectChanges();
4143
+ this.updatePosition();
4144
+ }
4145
+ }
4146
+ /**
4147
+ * Abre o painel
4148
+ */
4149
+ openPanel() {
4150
+ if (!this.triggerElement) {
4151
+ console.log('MatchaPanel: triggerElement não encontrado');
4152
+ return;
4153
+ }
4154
+ // Força a detecção de mudanças antes de atualizar a posição
4155
+ this.cdr.detectChanges();
4156
+ this.updatePosition();
4157
+ this.setupListeners();
4158
+ this.opened.emit();
4159
+ }
4160
+ /**
4161
+ * Fecha o painel
4162
+ */
4163
+ closePanel() {
4164
+ console.log('MatchaPanel: Fechando painel', {
4165
+ open: this.open,
4166
+ triggerElement: this.triggerElement,
4167
+ stackTrace: new Error().stack
4168
+ });
4169
+ this.cleanupListeners();
4170
+ this.closed.emit();
4171
+ }
4172
+ /**
4173
+ * Alterna o estado do painel
4174
+ */
4175
+ togglePanel() {
4176
+ this.open ? this.closePanel() : this.openPanel();
4177
+ }
4178
+ /**
4179
+ * Atualiza a posição do painel (simplificado para absolute)
4180
+ */
4181
+ updatePosition() {
4182
+ if (!this.triggerElement) {
4183
+ console.log('MatchaPanel: updatePosition - triggerElement não encontrado');
4184
+ return;
4185
+ }
4186
+ const position = this.calculatePosition();
4187
+ this.panelStyle = {
4188
+ top: `${position.top}px`,
4189
+ left: `${position.left}px`,
4190
+ minWidth: `${position.width}px`,
4191
+ maxHeight: `${position.maxHeight || this.maxHeight}px`,
4192
+ zIndex: 1003
4193
+ };
4194
+ console.log('MatchaPanel: Posição calculada (absolute)', {
4195
+ position,
4196
+ panelStyle: this.panelStyle
4197
+ });
4198
+ }
4199
+ /**
4200
+ * Calcula a posição ideal do painel (simplificado para absolute)
4201
+ */
4202
+ calculatePosition() {
4203
+ if (!this.triggerElement) {
4204
+ return { top: 0, left: 0, width: this.minWidth };
4205
+ }
4206
+ const rect = this.triggerElement.getBoundingClientRect();
4207
+ const containerRect = this.triggerElement.offsetParent?.getBoundingClientRect() || { top: 0, left: 0 };
4208
+ let top;
4209
+ let left;
4210
+ let width = Math.max(rect.width, this.minWidth);
4211
+ let maxHeight = this.maxHeight;
4212
+ // Calcular posição horizontal (relativa ao container)
4213
+ left = rect.left - containerRect.left;
4214
+ // Calcular posição vertical (relativa ao container)
4215
+ if (this.placement === 'top') {
4216
+ // Posicionar acima
4217
+ top = rect.top - containerRect.top - this.maxHeight - this.offset;
4218
+ }
4219
+ else {
4220
+ // Posicionar abaixo (padrão)
4221
+ top = rect.bottom - containerRect.top + this.offset;
4222
+ }
4223
+ return { top, left, width, maxHeight };
4224
+ }
4225
+ /**
4226
+ * Configura listeners para scroll e resize
4227
+ */
4228
+ setupListeners() {
4229
+ // Com position absolute, não precisamos de listeners de scroll/resize
4230
+ console.log('MatchaPanel: setupListeners - position absolute, sem listeners necessários');
4231
+ }
4232
+ /**
4233
+ * Remove listeners
4234
+ */
4235
+ cleanupListeners() {
4236
+ if (this.scrollListener) {
4237
+ window.removeEventListener('scroll', this.scrollListener);
4238
+ this.scrollListener = undefined;
4239
+ }
4240
+ if (this.resizeListener) {
4241
+ window.removeEventListener('resize', this.resizeListener);
4242
+ this.resizeListener = undefined;
4243
+ }
4244
+ }
4245
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPanelComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4246
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaPanelComponent, isStandalone: false, selector: "matcha-panel", inputs: { placement: "placement", maxHeight: "maxHeight", minWidth: "minWidth", offset: "offset", triggerElement: "triggerElement", open: "open" }, outputs: { opened: "opened", closed: "closed" }, viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
4247
+ <div class="matcha-panel-container" style="position: relative;">
4248
+ <ng-container *ngIf="open">
4249
+ <!-- Painel -->
4250
+ <div
4251
+ #panel
4252
+ class="matcha-panel"
4253
+ [class.matcha-panel-top]="placement === 'top'"
4254
+ [class.matcha-panel-bottom]="placement === 'bottom'"
4255
+ [ngStyle]="panelStyle"
4256
+ role="listbox"
4257
+ [attr.aria-expanded]="open"
4258
+ [attr.aria-hidden]="!open">
4259
+ <ng-content></ng-content>
4260
+ </div>
4261
+ </ng-container>
4262
+ </div>
4263
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
4264
+ }
4265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPanelComponent, decorators: [{
4266
+ type: Component,
4267
+ args: [{
4268
+ selector: 'matcha-panel',
4269
+ template: `
4270
+ <div class="matcha-panel-container" style="position: relative;">
4271
+ <ng-container *ngIf="open">
4272
+ <!-- Painel -->
4273
+ <div
4274
+ #panel
4275
+ class="matcha-panel"
4276
+ [class.matcha-panel-top]="placement === 'top'"
4277
+ [class.matcha-panel-bottom]="placement === 'bottom'"
4278
+ [ngStyle]="panelStyle"
4279
+ role="listbox"
4280
+ [attr.aria-expanded]="open"
4281
+ [attr.aria-hidden]="!open">
4282
+ <ng-content></ng-content>
4283
+ </div>
4284
+ </ng-container>
4285
+ </div>
4286
+ `,
4287
+ standalone: false
4288
+ }]
4289
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { placement: [{
4290
+ type: Input
4291
+ }], maxHeight: [{
4292
+ type: Input
4293
+ }], minWidth: [{
4294
+ type: Input
4295
+ }], offset: [{
4296
+ type: Input
4297
+ }], triggerElement: [{
4298
+ type: Input
4299
+ }], open: [{
4300
+ type: Input
4301
+ }], opened: [{
4302
+ type: Output
4303
+ }], closed: [{
4304
+ type: Output
4305
+ }], panelRef: [{
4306
+ type: ViewChild,
4307
+ args: ['panel', { static: false }]
4308
+ }] } });
4309
+
4310
+ class MatchaAutocompleteComponent {
4311
+ constructor(elRef, renderer, cdr) {
4312
+ this.elRef = elRef;
4313
+ this.renderer = renderer;
4314
+ this.cdr = cdr;
4315
+ // Armazenar o valor selecionado independente da QueryList
4316
+ this.selectedValue = undefined;
4317
+ // Configurações do painel
4318
+ this.placement = 'auto';
4319
+ this.maxHeight = 280;
4320
+ this.minWidth = 160;
4321
+ this.opened = new EventEmitter();
4322
+ this.closed = new EventEmitter();
4323
+ this.open = false;
4324
+ this.activeIndex = -1;
4325
+ }
4326
+ ngAfterContentInit() {
4327
+ // quando options mudarem, resetamos estado relevante
4328
+ this.options.changes.subscribe(() => {
4329
+ if (this.open) {
4330
+ this.resetActive();
4331
+ this.cdr.detectChanges();
4332
+ }
4333
+ });
4334
+ }
4335
+ ngAfterViewInit() {
4336
+ // Aguarda a view ser inicializada
4337
+ this.cdr.detectChanges();
4338
+ // Escuta eventos customizados das opções
4339
+ this.elRef.nativeElement.addEventListener('matcha-option-selected', (event) => {
4340
+ console.log('MatchaAutocomplete: Evento matcha-option-selected recebido', event.detail);
4341
+ const { option, value } = event.detail;
4342
+ this.selectOption(option);
4343
+ });
4344
+ }
4345
+ attachTo(input) {
4346
+ this.triggerElement = input;
4347
+ }
4348
+ openPanel() {
4349
+ if (!this.triggerElement) {
4350
+ console.log('MatchaAutocomplete: triggerElement não encontrado');
4351
+ return;
4352
+ }
4353
+ console.log('MatchaAutocomplete: Abrindo painel', {
4354
+ triggerElement: this.triggerElement,
4355
+ panel: this.panel,
4356
+ open: this.open
4357
+ });
4358
+ this.open = true;
4359
+ this.cdr.detectChanges(); // Força detecção de mudanças
4360
+ this.panel.attachTo(this.triggerElement);
4361
+ this.panel.openPanel();
4362
+ this.resetActive();
4363
+ this.opened.emit();
4364
+ }
4365
+ closePanel() {
4366
+ console.log('MatchaAutocomplete: Fechando painel', {
4367
+ open: this.open,
4368
+ stackTrace: new Error().stack
4369
+ });
4370
+ this.open = false;
4371
+ this.activeIndex = -1;
4372
+ this.updateSelectedStates();
4373
+ this.panel.closePanel();
4374
+ this.closed.emit();
4375
+ }
4376
+ togglePanel() {
4377
+ this.open ? this.closePanel() : this.openPanel();
4378
+ }
4379
+ resetActive() {
4380
+ this.activeIndex = -1;
4381
+ this.updateSelectedStates();
4382
+ }
4383
+ updateSelectedStates() {
4384
+ const items = this.options.toArray();
4385
+ items.forEach((opt, i) => opt.selected = i === this.activeIndex);
4386
+ }
4387
+ highlightNext() {
4388
+ const length = this.options.length;
4389
+ if (!length)
4390
+ return;
4391
+ this.activeIndex = (this.activeIndex + 1) % length;
4392
+ this.updateSelectedStates();
4393
+ this.scrollToActive();
4394
+ }
4395
+ highlightPrevious() {
4396
+ const length = this.options.length;
4397
+ if (!length)
4398
+ return;
4399
+ this.activeIndex = (this.activeIndex - 1 + length) % length;
4400
+ this.updateSelectedStates();
4401
+ this.scrollToActive();
4402
+ }
4403
+ scrollToActive() {
4404
+ const opts = this.options.toArray();
4405
+ if (this.activeIndex < 0 || this.activeIndex >= opts.length)
4406
+ return;
4407
+ const host = opts[this.activeIndex].nativeElement;
4408
+ if (host && host.scrollIntoView) {
4409
+ host.scrollIntoView({ block: 'nearest' });
4410
+ }
4411
+ }
4412
+ selectActive() {
4413
+ if (this.activeIndex < 0)
4414
+ return;
4415
+ const opt = this.options.toArray()[this.activeIndex];
4416
+ if (opt?.disabled)
4417
+ return;
4418
+ this.selectOption(opt);
4419
+ }
4420
+ // chamado por matcha-option quando clicado
4421
+ selectOption(option) {
4422
+ console.log('MatchaAutocomplete: Opção selecionada', {
4423
+ option,
4424
+ value: option.value,
4425
+ selected: option.selected,
4426
+ optionsLength: this.options.length,
4427
+ allOptions: this.options.toArray()
4428
+ });
4429
+ // Armazenar o valor selecionado
4430
+ this.selectedValue = option.value;
4431
+ // Marcar a opção como selecionada diretamente
4432
+ option.selected = true;
4433
+ // Marcar todas as outras como não selecionadas
4434
+ this.options.forEach(o => {
4435
+ if (o !== option) {
4436
+ o.selected = false;
4437
+ }
4438
+ });
4439
+ console.log('MatchaAutocomplete: Após marcar seleção', {
4440
+ selectedOption: option,
4441
+ selected: option.selected,
4442
+ selectedValue: this.selectedValue,
4443
+ allOptions: this.options.toArray().map(o => ({ value: o.value, selected: o.selected }))
4444
+ });
4445
+ // Fechamos painel automaticamente
4446
+ console.log('MatchaAutocomplete: Fechando painel após seleção');
4447
+ this.closePanel();
4448
+ // indireto: a directive pode ler o value via getSelectedValue()
4449
+ }
4450
+ getSelectedValue() {
4451
+ // Usar o valor armazenado se disponível, senão buscar na QueryList
4452
+ const value = this.selectedValue !== undefined ? this.selectedValue : this.options.find(o => o.selected)?.value;
4453
+ console.log('MatchaAutocomplete: getSelectedValue chamado', {
4454
+ selectedValue: this.selectedValue,
4455
+ value,
4456
+ allOptions: this.options.toArray().map(o => ({ value: o.value, selected: o.selected }))
4457
+ });
4458
+ return value;
4459
+ }
4460
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4461
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaAutocompleteComponent, isStandalone: false, selector: "matcha-autocomplete", inputs: { placement: "placement", maxHeight: "maxHeight", minWidth: "minWidth" }, outputs: { opened: "opened", closed: "closed" }, queries: [{ propertyName: "options", predicate: MatchaOptionComponent, descendants: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: MatchaPanelComponent, descendants: true }], ngImport: i0, template: "<matcha-panel\n #panel\n [open]=\"open\"\n [placement]=\"placement\"\n [maxHeight]=\"maxHeight\"\n [minWidth]=\"minWidth\"\n [triggerElement]=\"triggerElement\"\n (opened)=\"opened.emit()\"\n (closed)=\"closed.emit()\">\n <div class=\"matcha-panel-content flex-column\">\n <ng-content></ng-content>\n </div>\n</matcha-panel>\n", dependencies: [{ kind: "component", type: MatchaPanelComponent, selector: "matcha-panel", inputs: ["placement", "maxHeight", "minWidth", "offset", "triggerElement", "open"], outputs: ["opened", "closed"] }], encapsulation: i0.ViewEncapsulation.None }); }
4462
+ }
4463
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteComponent, decorators: [{
4464
+ type: Component,
4465
+ args: [{ selector: 'matcha-autocomplete', encapsulation: ViewEncapsulation.None, standalone: false, template: "<matcha-panel\n #panel\n [open]=\"open\"\n [placement]=\"placement\"\n [maxHeight]=\"maxHeight\"\n [minWidth]=\"minWidth\"\n [triggerElement]=\"triggerElement\"\n (opened)=\"opened.emit()\"\n (closed)=\"closed.emit()\">\n <div class=\"matcha-panel-content flex-column\">\n <ng-content></ng-content>\n </div>\n</matcha-panel>\n" }]
4466
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { options: [{
4467
+ type: ContentChildren,
4468
+ args: [MatchaOptionComponent, { descendants: true }]
4469
+ }], panel: [{
4470
+ type: ViewChild,
4471
+ args: [MatchaPanelComponent]
4472
+ }], placement: [{
4473
+ type: Input
4474
+ }], maxHeight: [{
4475
+ type: Input
4476
+ }], minWidth: [{
4477
+ type: Input
4478
+ }], opened: [{
4479
+ type: Output
4480
+ }], closed: [{
4481
+ type: Output
4482
+ }] } });
4483
+
4484
+ /**
4485
+ * Service to internationalize the paginator component.
4486
+ * Based on Angular Material's MatPaginatorIntl
4487
+ */
4488
+ class MatchaPaginatorIntl {
4489
+ constructor() {
4490
+ /** Stream to emit from when labels are changed. Used by the paginator to update the labels. */
4491
+ this.changes = new Subject();
4492
+ /** A label for the page size selector. */
4493
+ this.itemsPerPageLabel = 'Itens por página:';
4494
+ /** A label for the button that increments the current page. */
4495
+ this.nextPageLabel = 'Próxima página';
4496
+ /** A label for the button that decrements the current page. */
4497
+ this.previousPageLabel = 'Página anterior';
4498
+ /** A label for the button that moves to the first page. */
4499
+ this.firstPageLabel = 'Primeira página';
4500
+ /** A label for the button that moves to the last page. */
4501
+ this.lastPageLabel = 'Última página';
4502
+ /**
4503
+ * A label for the range of items within the current page and the length of the whole list.
4504
+ */
4505
+ this.getRangeLabel = (page, pageSize, length) => {
4506
+ if (length === 0) {
4507
+ return `0 de 0`;
4508
+ }
4509
+ const amountPages = Math.ceil(length / pageSize);
4510
+ return `Página ${page + 1} de ${amountPages}`;
4511
+ };
4512
+ }
4513
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4514
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorIntl, providedIn: 'root' }); }
4515
+ }
4516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorIntl, decorators: [{
4517
+ type: Injectable,
4518
+ args: [{ providedIn: 'root' }]
4519
+ }] });
4520
+
4521
+ class MatchaPaginatorComponent {
4522
+ constructor(_intl, _changeDetectorRef) {
4523
+ this._intl = _intl;
4524
+ this._changeDetectorRef = _changeDetectorRef;
4525
+ this.pageIndex = 0;
4526
+ this.length = 0;
4527
+ this.pageSize = 50;
4528
+ this.pageSizeOptions = [];
4529
+ /** Color theme for active page button. Defaults to 'accent' */
4530
+ this.color = 'accent';
4531
+ this.page = new EventEmitter();
4532
+ this._intlChanges = _intl.changes.subscribe(() => {
4533
+ // Trigger change detection when labels change
4534
+ this._changeDetectorRef.markForCheck();
4535
+ });
4536
+ }
4537
+ ngOnDestroy() {
4538
+ this._intlChanges.unsubscribe();
4539
+ }
4540
+ get currentPage() {
4541
+ return this.pageIndex + 1;
4542
+ }
4543
+ get totalPages() {
4544
+ if (this.pageSize === 0)
4545
+ return 0;
4546
+ return Math.ceil(this.length / this.pageSize);
4547
+ }
4548
+ get hasPreviousPage() {
4549
+ return this.pageIndex > 0;
4550
+ }
4551
+ get hasNextPage() {
4552
+ return this.pageIndex < this.totalPages - 1;
4553
+ }
4554
+ get displayPages() {
4555
+ const current = this.currentPage;
4556
+ const total = this.totalPages;
4557
+ const pages = [];
4558
+ if (total <= 1) {
4559
+ if (total === 1) {
4560
+ pages.push(1);
4561
+ }
4562
+ return pages;
4563
+ }
4564
+ if (total <= 5) {
4565
+ for (let i = 1; i <= total; i++) {
4566
+ pages.push(i);
4567
+ }
4568
+ }
4569
+ else {
4570
+ if (current <= 3) {
4571
+ pages.push(1, 2, 3, '...', total);
4572
+ }
4573
+ else if (current >= total - 2) {
4574
+ for (let i = total - 4; i <= total; i++) {
4575
+ pages.push(i);
4576
+ }
4577
+ }
4578
+ else {
4579
+ const startPage = current - 1;
4580
+ for (let i = startPage; i <= current + 2 && i <= total; i++) {
4581
+ pages.push(i);
4582
+ }
4583
+ if (current + 2 < total - 1) {
4584
+ pages.push('...');
4585
+ }
4586
+ if (current + 2 < total) {
4587
+ pages.push(total);
4588
+ }
4589
+ }
4590
+ }
4591
+ return pages;
4592
+ }
4593
+ trackByPage(index, item) {
4594
+ return item;
4595
+ }
4596
+ /** Check if item is a number (for template use only) */
4597
+ typeof(value) {
4598
+ return typeof value;
4599
+ }
4600
+ /** Navigate to previous page */
4601
+ previousPage() {
4602
+ if (this.hasPreviousPage) {
4603
+ this.changePage(this.pageIndex - 1);
4604
+ }
4605
+ }
4606
+ /** Navigate to next page */
4607
+ nextPage() {
4608
+ if (this.hasNextPage) {
4609
+ this.changePage(this.pageIndex + 1);
4610
+ }
4611
+ }
4612
+ /** Navigate to specific page */
4613
+ goToPage(page) {
4614
+ if (typeof page === 'number' && page >= 1 && page <= this.totalPages) {
4615
+ this.changePage(page - 1);
4616
+ }
4617
+ }
4618
+ /** Handle page size change */
4619
+ onPageSizeChange(event) {
4620
+ const target = event.target;
4621
+ const newPageSize = parseInt(target.value, 10);
4622
+ if (newPageSize !== this.pageSize) {
4623
+ this.changePage(0, newPageSize);
4624
+ }
4625
+ }
4626
+ changePage(pageIndex, pageSize) {
4627
+ const previousPageIndex = this.pageIndex;
4628
+ const event = {
4629
+ pageIndex,
4630
+ previousPageIndex,
4631
+ pageSize: pageSize || this.pageSize,
4632
+ length: this.length
4633
+ };
4634
+ this.page.emit(event);
4635
+ }
4636
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorComponent, deps: [{ token: MatchaPaginatorIntl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4637
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: MatchaPaginatorComponent, isStandalone: false, selector: "matcha-paginator", inputs: { pageIndex: "pageIndex", length: "length", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", color: "color" }, outputs: { page: "page" }, ngImport: i0, template: "<div class=\"matcha-paginator flex-row flex-align-center gap-16\">\n <!-- Items per page selector -->\n <div class=\"flex-row flex-align-center gap-8\" *ngIf=\"pageSizeOptions && pageSizeOptions.length > 0\">\n <span class=\"text-sm color-placeholder\">{{ _intl.itemsPerPageLabel }}</span>\n <div class=\"page-size-selector\">\n <select \n class=\"page-size-select radius-8\" \n [value]=\"pageSize\" \n (change)=\"onPageSizeChange($event)\">\n <option *ngFor=\"let option of pageSizeOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n <div class=\"select-icon\">\n <matcha-icon name=\"action_arrow_down\" size=\"sm\" color=\"fg\"></matcha-icon>\n </div>\n </div>\n </div>\n \n <!-- Page navigation -->\n <div class=\"flex-row flex-align-center gap-8\">\n <!-- Previous page button -->\n <button \n class=\"nav-button\" \n [disabled]=\"!hasPreviousPage\"\n (click)=\"previousPage()\"\n [attr.aria-label]=\"_intl.previousPageLabel\">\n <matcha-icon name=\"action_arrow_left\" size=\"sm\"></matcha-icon>\n </button>\n \n <!-- Page numbers -->\n <div class=\"flex-row flex-align-center gap-4\">\n <ng-container *ngFor=\"let page of displayPages; trackBy: trackByPage\">\n <button \n *ngIf=\"typeof page === 'number'; else ellipsis\"\n class=\"page-button\"\n [class.active]=\"page === currentPage\"\n [class.radius-full]=\"page === currentPage\"\n [ngClass]=\"page === currentPage ? color : ''\"\n (click)=\"goToPage(page)\"\n [attr.aria-label]=\"'Ir para p\u00E1gina ' + page\">\n {{ page }}\n </button>\n <ng-template #ellipsis>\n <span class=\"ellipsis\">{{ page }}</span>\n </ng-template>\n </ng-container>\n </div>\n \n <!-- Next page button -->\n <button \n class=\"nav-button\" \n [disabled]=\"!hasNextPage\"\n (click)=\"nextPage()\"\n [attr.aria-label]=\"_intl.nextPageLabel\">\n <matcha-icon name=\"action_arrow_right\" size=\"sm\"></matcha-icon>\n </button>\n </div>\n </div>", 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: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatchaIconComponent, selector: "matcha-icon", inputs: ["name", "size", "color", "class", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4638
+ }
4639
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorComponent, decorators: [{
4640
+ type: Component,
4641
+ args: [{ selector: 'matcha-paginator', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"matcha-paginator flex-row flex-align-center gap-16\">\n <!-- Items per page selector -->\n <div class=\"flex-row flex-align-center gap-8\" *ngIf=\"pageSizeOptions && pageSizeOptions.length > 0\">\n <span class=\"text-sm color-placeholder\">{{ _intl.itemsPerPageLabel }}</span>\n <div class=\"page-size-selector\">\n <select \n class=\"page-size-select radius-8\" \n [value]=\"pageSize\" \n (change)=\"onPageSizeChange($event)\">\n <option *ngFor=\"let option of pageSizeOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n <div class=\"select-icon\">\n <matcha-icon name=\"action_arrow_down\" size=\"sm\" color=\"fg\"></matcha-icon>\n </div>\n </div>\n </div>\n \n <!-- Page navigation -->\n <div class=\"flex-row flex-align-center gap-8\">\n <!-- Previous page button -->\n <button \n class=\"nav-button\" \n [disabled]=\"!hasPreviousPage\"\n (click)=\"previousPage()\"\n [attr.aria-label]=\"_intl.previousPageLabel\">\n <matcha-icon name=\"action_arrow_left\" size=\"sm\"></matcha-icon>\n </button>\n \n <!-- Page numbers -->\n <div class=\"flex-row flex-align-center gap-4\">\n <ng-container *ngFor=\"let page of displayPages; trackBy: trackByPage\">\n <button \n *ngIf=\"typeof page === 'number'; else ellipsis\"\n class=\"page-button\"\n [class.active]=\"page === currentPage\"\n [class.radius-full]=\"page === currentPage\"\n [ngClass]=\"page === currentPage ? color : ''\"\n (click)=\"goToPage(page)\"\n [attr.aria-label]=\"'Ir para p\u00E1gina ' + page\">\n {{ page }}\n </button>\n <ng-template #ellipsis>\n <span class=\"ellipsis\">{{ page }}</span>\n </ng-template>\n </ng-container>\n </div>\n \n <!-- Next page button -->\n <button \n class=\"nav-button\" \n [disabled]=\"!hasNextPage\"\n (click)=\"nextPage()\"\n [attr.aria-label]=\"_intl.nextPageLabel\">\n <matcha-icon name=\"action_arrow_right\" size=\"sm\"></matcha-icon>\n </button>\n </div>\n </div>" }]
4642
+ }], ctorParameters: () => [{ type: MatchaPaginatorIntl }, { type: i0.ChangeDetectorRef }], propDecorators: { pageIndex: [{
4643
+ type: Input
4644
+ }], length: [{
4645
+ type: Input
4646
+ }], pageSize: [{
4647
+ type: Input
4648
+ }], pageSizeOptions: [{
4649
+ type: Input
4650
+ }], color: [{
4651
+ type: Input
4652
+ }], page: [{
4653
+ type: Output
4654
+ }] } });
4655
+
4656
+ class MatchaTooltipDirective {
4657
+ constructor(el, renderer) {
4658
+ this.el = el;
4659
+ this.renderer = renderer;
4660
+ this.tooltipText = '';
4661
+ this.tooltipDisabled = false;
4662
+ this.preferAbove = false;
4663
+ this.preferBelow = false;
4664
+ this.preferLeft = false;
4665
+ this.preferRight = false;
4666
+ this.tooltipEnableClose = false;
4667
+ this.tooltipElement = null;
4668
+ this.documentClickListener = null;
4669
+ }
4670
+ onMouseEnter() {
4671
+ if (this.tooltipEnableClose) {
4672
+ // Em modo de clique/tap, não abre via hover
4673
+ return;
4674
+ }
4675
+ if (this.tooltipDisabled || this.tooltipElement || !this.tooltipText) {
4676
+ return;
4677
+ }
4678
+ this.createTooltip();
4679
+ }
4680
+ onMouseLeave() {
4681
+ if (!this.tooltipEnableClose && this.tooltipElement) {
4682
+ this.destroyTooltip();
4683
+ }
4684
+ }
4685
+ onClick(event) {
4686
+ if (!this.tooltipEnableClose) {
4687
+ return;
4688
+ }
4689
+ event.stopPropagation();
4690
+ if (!this.tooltipElement && !this.tooltipDisabled && this.tooltipText) {
4691
+ this.createTooltip();
4692
+ }
4693
+ }
4694
+ createTooltip() {
4695
+ // Cria o tooltip e adiciona a classe base
4696
+ this.tooltipElement = this.renderer.createElement('div');
4697
+ this.renderer.addClass(this.tooltipElement, 'matcha-tooltip-content');
4698
+ // Define o conteúdo do tooltip
4699
+ this.tooltipElement.textContent = this.tooltipText;
4700
+ // Define estilos iniciais para medição
4701
+ this.renderer.setStyle(this.tooltipElement, 'position', 'absolute');
4702
+ this.renderer.setStyle(this.tooltipElement, 'top', '0');
4703
+ this.renderer.setStyle(this.tooltipElement, 'left', '0');
4704
+ this.renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
4705
+ this.renderer.appendChild(document.body, this.tooltipElement);
4706
+ // Se tooltipEnableClose estiver ativo, adiciona o botão de fechar
4707
+ if (this.tooltipEnableClose) {
4708
+ const closeButton = this.renderer.createElement('div');
4709
+ this.renderer.addClass(closeButton, 'matcha-tooltip-close');
4710
+ this.renderer.appendChild(this.tooltipElement, closeButton);
4711
+ this.renderer.listen(closeButton, 'click', (e) => {
4712
+ e.stopPropagation();
4713
+ this.destroyTooltip();
4714
+ });
4715
+ this.documentClickListener = this.renderer.listen('document', 'click', (e) => {
3832
4716
  if (this.tooltipElement && !this.tooltipElement.contains(e.target)) {
3833
4717
  this.destroyTooltip();
3834
4718
  }
@@ -4520,98 +5404,217 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4520
5404
  }]
4521
5405
  }] });
4522
5406
 
4523
- class MatchaOptionModule {
4524
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4525
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, declarations: [MatchaOptionComponent], imports: [CommonModule], exports: [MatchaOptionComponent] }); }
4526
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, imports: [CommonModule] }); }
4527
- }
4528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, decorators: [{
4529
- type: NgModule,
4530
- args: [{
4531
- declarations: [MatchaOptionComponent],
4532
- imports: [CommonModule],
4533
- exports: [MatchaOptionComponent],
4534
- }]
4535
- }] });
4536
-
4537
- class MatchaAutocompleteDirective {
4538
- displayAutocomplete() {
4539
- this.matchaOptionService.setCanShowOptions(true);
5407
+ class MatchaAutocompleteTriggerDirective {
5408
+ constructor(el) {
5409
+ this.el = el;
5410
+ this.subs = new Subscription();
4540
5411
  }
4541
- hideAutocomplete() {
4542
- setTimeout(() => {
4543
- const canShowAutocomplete = this.matchaOptionService.getCanShowOptions();
4544
- if (canShowAutocomplete) {
4545
- this.matchaOptionService.setCanShowOptions(false);
4546
- }
4547
- }, 300);
5412
+ ngAfterViewInit() {
5413
+ if (!this.panel) {
5414
+ throw new Error('Você precisa passar uma referência para <matcha-autocomplete> ex: [matchaAutocomplete]="auto"');
5415
+ }
5416
+ this.panel.attachTo(this.el.nativeElement);
5417
+ // close panel ao clicar fora - usando click para evitar conflito com focus
5418
+ const clickSub = fromEvent(document, 'click').pipe(filter((ev) => {
5419
+ const target = ev.target;
5420
+ const isInsideInput = this.el.nativeElement.contains(target) || this.el.nativeElement === target;
5421
+ const isInsidePanel = this.panel?.elRef?.nativeElement?.contains?.(target);
5422
+ console.log('MatchaAutocomplete: Click outside check', {
5423
+ target: target,
5424
+ inputElement: this.el.nativeElement,
5425
+ isInsideInput,
5426
+ isInsidePanel,
5427
+ shouldClose: !isInsideInput && !isInsidePanel
5428
+ });
5429
+ // Não fechar se clicou no input ou painel
5430
+ return !isInsideInput && !isInsidePanel;
5431
+ })).subscribe(() => {
5432
+ console.log('MatchaAutocomplete: Fechando painel por click outside');
5433
+ this.panel.closePanel();
5434
+ });
5435
+ this.subs.add(clickSub);
5436
+ }
5437
+ ngOnDestroy() {
5438
+ this.subs.unsubscribe();
5439
+ }
5440
+ writeValueToInput(value) {
5441
+ console.log('MatchaAutocomplete: writeValueToInput chamado', {
5442
+ value,
5443
+ input: this.el.nativeElement
5444
+ });
5445
+ const input = this.el.nativeElement;
5446
+ input.value = value == null ? '' : value;
5447
+ // dispatch input event para Angular Forms
5448
+ const ev = new Event('input', { bubbles: true });
5449
+ input.dispatchEvent(ev);
5450
+ console.log('MatchaAutocomplete: Valor escrito no input', input.value);
5451
+ }
5452
+ onClick() {
5453
+ // Abrir painel quando clicar no input
5454
+ this.panel.openPanel();
5455
+ }
5456
+ onFocus() {
5457
+ // Não abrir automaticamente no focus para evitar conflito com click outside
5458
+ // O painel será aberto apenas quando o usuário clicar ou digitar
4548
5459
  }
4549
- onArrowDown(event) {
4550
- switch (event.key) {
5460
+ onInput(e) {
5461
+ // se o usuário digitar, apenas reabre painel. O filtro de opções geralmente é controlado pelo componente pai
5462
+ if (!this.panel.open)
5463
+ this.panel.openPanel();
5464
+ }
5465
+ onKeydown(ev) {
5466
+ if (!this.panel)
5467
+ return;
5468
+ switch (ev.key) {
4551
5469
  case 'ArrowDown':
4552
- this.matchaOptionService.changeActiveOption(1);
5470
+ ev.preventDefault();
5471
+ this.panel.highlightNext();
4553
5472
  break;
4554
5473
  case 'ArrowUp':
4555
- this.matchaOptionService.changeActiveOption(-1);
5474
+ ev.preventDefault();
5475
+ this.panel.highlightPrevious();
4556
5476
  break;
4557
5477
  case 'Enter':
4558
- this.matchaOptionService.selectActiveOption();
5478
+ ev.preventDefault();
5479
+ this.panel.selectActive();
5480
+ // pega o value escolhido e escreve no input
5481
+ setTimeout(() => {
5482
+ const val = this.panel.getSelectedValue();
5483
+ if (val !== undefined)
5484
+ this.writeValueToInput(val);
5485
+ });
4559
5486
  break;
4560
- default:
5487
+ case 'Escape':
5488
+ ev.preventDefault();
5489
+ this.panel.closePanel();
4561
5490
  break;
4562
5491
  }
4563
5492
  }
4564
- constructor(ngControl, _elementRef, matchaOptionService) {
4565
- this.ngControl = ngControl;
4566
- this._elementRef = _elementRef;
4567
- this.matchaOptionService = matchaOptionService;
4568
- }
4569
- ngOnInit() {
4570
- this.matchaOptionService.selectedOption$.subscribe((option) => {
4571
- this._updateInputValue(option);
4572
- });
4573
- }
4574
- _updateInputValue(selectedOption) {
4575
- if (this.ngControl.control) {
4576
- this.ngControl.control.setValue(selectedOption);
4577
- this.ngControl.control.markAsDirty();
4578
- this.matchaOptionService.setCanShowOptions(false);
4579
- this._elementRef.nativeElement.blur();
5493
+ // Se uma opção for selecionada via click (o matcha-option notifica o pai que faz close),
5494
+ // lemos selectedValue e escrevemos no input. Como o selectOption do painel fecha imediatamente,
5495
+ // precisamos observar mudanças no DOM/QueryList ou checar logo após close.
5496
+ // Simples solução: observar clicks nas options via delegation:
5497
+ onDocClick(ev) {
5498
+ const target = ev.target;
5499
+ // if clicked inside an option that belongs to this panel
5500
+ if (!this.panel || !this.panel.open) {
5501
+ // se painel fechado, pode ter sido selecionado; então buscarmos selected value
5502
+ setTimeout(() => {
5503
+ if (this.panel && typeof this.panel.getSelectedValue === 'function') {
5504
+ const val = this.panel.getSelectedValue();
5505
+ if (val !== undefined)
5506
+ this.writeValueToInput(val);
5507
+ }
5508
+ }, 10);
4580
5509
  }
4581
5510
  }
4582
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteDirective, deps: [{ token: i1$1.NgControl }, { token: i0.ElementRef }, { token: MatchaOptionService }], target: i0.ɵɵFactoryTarget.Directive }); }
4583
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: MatchaAutocompleteDirective, isStandalone: false, selector: "[matchaAutocomplete]", inputs: { matchaAutocomplete: "matchaAutocomplete" }, host: { listeners: { "focus": "displayAutocomplete()", "focusout": "hideAutocomplete()", "keydown": "onArrowDown($event)" } }, ngImport: i0 }); }
5511
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteTriggerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
5512
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: MatchaAutocompleteTriggerDirective, isStandalone: false, selector: "[matchaAutocomplete]", inputs: { panel: ["matchaAutocomplete", "panel"] }, host: { listeners: { "click": "onClick()", "focus": "onFocus()", "input": "onInput($event)", "keydown": "onKeydown($event)", "document:click": "onDocClick($event)" } }, ngImport: i0 }); }
4584
5513
  }
4585
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteDirective, decorators: [{
5514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteTriggerDirective, decorators: [{
4586
5515
  type: Directive,
4587
5516
  args: [{
4588
5517
  selector: '[matchaAutocomplete]',
4589
5518
  standalone: false,
4590
5519
  }]
4591
- }], ctorParameters: () => [{ type: i1$1.NgControl }, { type: i0.ElementRef }, { type: MatchaOptionService }], propDecorators: { matchaAutocomplete: [{
4592
- type: Input
4593
- }], displayAutocomplete: [{
5520
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { panel: [{
5521
+ type: Input,
5522
+ args: ['matchaAutocomplete']
5523
+ }], onClick: [{
5524
+ type: HostListener,
5525
+ args: ['click']
5526
+ }], onFocus: [{
4594
5527
  type: HostListener,
4595
5528
  args: ['focus']
4596
- }], hideAutocomplete: [{
5529
+ }], onInput: [{
4597
5530
  type: HostListener,
4598
- args: ['focusout']
4599
- }], onArrowDown: [{
5531
+ args: ['input', ['$event']]
5532
+ }], onKeydown: [{
4600
5533
  type: HostListener,
4601
5534
  args: ['keydown', ['$event']]
5535
+ }], onDocClick: [{
5536
+ type: HostListener,
5537
+ args: ['document:click', ['$event']]
4602
5538
  }] } });
4603
5539
 
5540
+ class MatchaOptionModule {
5541
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5542
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, declarations: [MatchaOptionComponent], imports: [CommonModule], exports: [MatchaOptionComponent] }); }
5543
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, imports: [CommonModule] }); }
5544
+ }
5545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaOptionModule, decorators: [{
5546
+ type: NgModule,
5547
+ args: [{
5548
+ declarations: [
5549
+ MatchaOptionComponent
5550
+ ],
5551
+ imports: [
5552
+ CommonModule
5553
+ ],
5554
+ exports: [
5555
+ MatchaOptionComponent
5556
+ ]
5557
+ }]
5558
+ }] });
5559
+
5560
+ class MatchaPanelModule {
5561
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5562
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaPanelModule, declarations: [MatchaPanelComponent], imports: [CommonModule], exports: [MatchaPanelComponent] }); }
5563
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPanelModule, imports: [CommonModule] }); }
5564
+ }
5565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPanelModule, decorators: [{
5566
+ type: NgModule,
5567
+ args: [{
5568
+ declarations: [
5569
+ MatchaPanelComponent
5570
+ ],
5571
+ imports: [
5572
+ CommonModule
5573
+ ],
5574
+ exports: [
5575
+ MatchaPanelComponent
5576
+ ]
5577
+ }]
5578
+ }] });
5579
+
4604
5580
  class MatchaAutocompleteModule {
4605
5581
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4606
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteModule, declarations: [MatchaAutocompleteComponent, MatchaAutocompleteDirective], imports: [CommonModule, FormsModule, MatchaOptionModule], exports: [MatchaAutocompleteComponent, MatchaAutocompleteDirective] }); }
4607
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteModule, imports: [CommonModule, FormsModule, MatchaOptionModule] }); }
5582
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteModule, declarations: [MatchaAutocompleteComponent,
5583
+ MatchaAutocompleteTriggerDirective], imports: [CommonModule,
5584
+ MatchaOptionModule,
5585
+ MatchaPanelModule], exports: [MatchaAutocompleteComponent,
5586
+ MatchaAutocompleteTriggerDirective,
5587
+ MatchaOptionModule // Re-exporta para conveniência
5588
+ ] }); }
5589
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteModule, providers: [
5590
+ // Provider para permitir injeção da interface MatchaOptionParent
5591
+ { provide: MATCHA_OPTION_PARENT, useExisting: MatchaAutocompleteComponent }
5592
+ ], imports: [CommonModule,
5593
+ MatchaOptionModule,
5594
+ MatchaPanelModule, MatchaOptionModule // Re-exporta para conveniência
5595
+ ] }); }
4608
5596
  }
4609
5597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaAutocompleteModule, decorators: [{
4610
5598
  type: NgModule,
4611
5599
  args: [{
4612
- declarations: [MatchaAutocompleteComponent, MatchaAutocompleteDirective],
4613
- imports: [CommonModule, FormsModule, MatchaOptionModule],
4614
- exports: [MatchaAutocompleteComponent, MatchaAutocompleteDirective],
5600
+ declarations: [
5601
+ MatchaAutocompleteComponent,
5602
+ MatchaAutocompleteTriggerDirective
5603
+ ],
5604
+ imports: [
5605
+ CommonModule,
5606
+ MatchaOptionModule,
5607
+ MatchaPanelModule
5608
+ ],
5609
+ exports: [
5610
+ MatchaAutocompleteComponent,
5611
+ MatchaAutocompleteTriggerDirective,
5612
+ MatchaOptionModule // Re-exporta para conveniência
5613
+ ],
5614
+ providers: [
5615
+ // Provider para permitir injeção da interface MatchaOptionParent
5616
+ { provide: MATCHA_OPTION_PARENT, useExisting: MatchaAutocompleteComponent }
5617
+ ]
4615
5618
  }]
4616
5619
  }] });
4617
5620
 
@@ -4713,41 +5716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4713
5716
  args: [{
4714
5717
  declarations: [MatchaChipsDirective],
4715
5718
  imports: [],
4716
- exports: [
4717
- MatchaChipsDirective
4718
- ]
4719
- }]
4720
- }] });
4721
-
4722
- class MatchaDatepickerDirective {
4723
- constructor(_elementRef, _renderer) {
4724
- this._elementRef = _elementRef;
4725
- this._renderer = _renderer;
4726
- //this._elementRef.nativeElement.style.backgroundColor = 'grey';
4727
- this._renderer.addClass(this._elementRef.nativeElement, 'matcha-datepicker');
4728
- }
4729
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDatepickerDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
4730
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: MatchaDatepickerDirective, isStandalone: false, selector: "[matcha-datepicker]", ngImport: i0 }); }
4731
- }
4732
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDatepickerDirective, decorators: [{
4733
- type: Directive,
4734
- args: [{
4735
- selector: '[matcha-datepicker]',
4736
- standalone: false
4737
- }]
4738
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
4739
-
4740
- class MatchaDatepickerModule {
4741
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4742
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaDatepickerModule, declarations: [MatchaDatepickerDirective], exports: [MatchaDatepickerDirective] }); }
4743
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDatepickerModule }); }
4744
- }
4745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDatepickerModule, decorators: [{
4746
- type: NgModule,
4747
- args: [{
4748
- declarations: [MatchaDatepickerDirective],
4749
- imports: [],
4750
- exports: [MatchaDatepickerDirective],
5719
+ exports: [MatchaChipsDirective]
4751
5720
  }]
4752
5721
  }] });
4753
5722
 
@@ -4929,35 +5898,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4929
5898
  type: Input
4930
5899
  }] } });
4931
5900
 
4932
- class MatchaPaginatorDirective {
4933
- constructor(_elementRef, _renderer) {
4934
- this._elementRef = _elementRef;
4935
- this._renderer = _renderer;
4936
- //this._elementRef.nativeElement.style.backgroundColor = 'grey';
4937
- this._renderer.addClass(this._elementRef.nativeElement, 'matcha-paginator');
4938
- }
4939
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
4940
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: MatchaPaginatorDirective, isStandalone: false, selector: "[matchaPaginator]", ngImport: i0 }); }
4941
- }
4942
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorDirective, decorators: [{
4943
- type: Directive,
4944
- args: [{
4945
- selector: '[matchaPaginator]',
4946
- standalone: false
4947
- }]
4948
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
4949
-
4950
5901
  class MatchaPaginatorModule {
4951
5902
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4952
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorModule, declarations: [MatchaPaginatorDirective], imports: [CommonModule], exports: [MatchaPaginatorDirective] }); }
4953
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorModule, imports: [CommonModule] }); }
5903
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorModule, declarations: [MatchaPaginatorComponent], imports: [CommonModule, MatchaIconModule], exports: [MatchaPaginatorComponent] }); }
5904
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorModule, providers: [MatchaPaginatorIntl], imports: [CommonModule, MatchaIconModule] }); }
4954
5905
  }
4955
5906
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaPaginatorModule, decorators: [{
4956
5907
  type: NgModule,
4957
5908
  args: [{
4958
- declarations: [MatchaPaginatorDirective],
4959
- imports: [CommonModule],
4960
- exports: [MatchaPaginatorDirective],
5909
+ declarations: [MatchaPaginatorComponent],
5910
+ imports: [CommonModule, MatchaIconModule],
5911
+ exports: [MatchaPaginatorComponent],
5912
+ providers: [MatchaPaginatorIntl]
4961
5913
  }]
4962
5914
  }] });
4963
5915
 
@@ -4997,38 +5949,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4997
5949
  }]
4998
5950
  }] });
4999
5951
 
5000
- class MatchaSelectDirective {
5001
- constructor(_elementRef, _renderer) {
5002
- this._elementRef = _elementRef;
5003
- this._renderer = _renderer;
5004
- //this._elementRef.nativeElement.style.backgroundColor = 'grey';
5005
- this._renderer.addClass(this._elementRef.nativeElement, 'matcha-select');
5006
- }
5007
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSelectDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
5008
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: MatchaSelectDirective, isStandalone: false, selector: "[matcha-select]", ngImport: i0 }); }
5009
- }
5010
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSelectDirective, decorators: [{
5011
- type: Directive,
5012
- args: [{
5013
- selector: '[matcha-select]',
5014
- standalone: false
5015
- }]
5016
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
5017
-
5018
- class MatchaSelectModule {
5019
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5020
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaSelectModule, declarations: [MatchaSelectDirective], imports: [CommonModule], exports: [MatchaSelectDirective] }); }
5021
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSelectModule, imports: [CommonModule] }); }
5022
- }
5023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaSelectModule, decorators: [{
5024
- type: NgModule,
5025
- args: [{
5026
- declarations: [MatchaSelectDirective],
5027
- imports: [CommonModule],
5028
- exports: [MatchaSelectDirective],
5029
- }]
5030
- }] });
5031
-
5032
5952
  class MatchaSidenavDirective {
5033
5953
  constructor(_elementRef, _renderer) {
5034
5954
  this._elementRef = _elementRef;
@@ -5497,14 +6417,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5497
6417
  }]
5498
6418
  }] });
5499
6419
 
6420
+ class MatchaDrawerModule {
6421
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6422
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerModule, declarations: [MatchaDrawerComponent,
6423
+ MatchaDrawerContainerComponent,
6424
+ MatchaDrawerContentComponent], imports: [CommonModule,
6425
+ MatchaButtonModule], exports: [MatchaDrawerComponent,
6426
+ MatchaDrawerContainerComponent,
6427
+ MatchaDrawerContentComponent] }); }
6428
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerModule, imports: [CommonModule,
6429
+ MatchaButtonModule] }); }
6430
+ }
6431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaDrawerModule, decorators: [{
6432
+ type: NgModule,
6433
+ args: [{
6434
+ declarations: [
6435
+ MatchaDrawerComponent,
6436
+ MatchaDrawerContainerComponent,
6437
+ MatchaDrawerContentComponent
6438
+ ],
6439
+ imports: [
6440
+ CommonModule,
6441
+ MatchaButtonModule
6442
+ ],
6443
+ exports: [
6444
+ MatchaDrawerComponent,
6445
+ MatchaDrawerContainerComponent,
6446
+ MatchaDrawerContentComponent
6447
+ ]
6448
+ }]
6449
+ }] });
6450
+
5500
6451
  class MatchaComponentsModule {
5501
6452
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5502
6453
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MatchaComponentsModule, declarations: [MatchaOverflowDraggableComponent], imports: [CommonModule,
5503
6454
  FormsModule,
5504
6455
  ReactiveFormsModule,
5505
6456
  MatchaAccordionModule,
5506
- MatchaOptionModule,
5507
6457
  MatchaAutocompleteModule,
6458
+ MatchaOptionModule,
6459
+ MatchaPanelModule,
5508
6460
  MatchaBadgeModule,
5509
6461
  MatchaButtonModule,
5510
6462
  MatchaButtonToggleModule,
@@ -5512,7 +6464,6 @@ class MatchaComponentsModule {
5512
6464
  MatchaCheckboxModule,
5513
6465
  MatchaRadioModule,
5514
6466
  MatchaChipsModule,
5515
- MatchaDatepickerModule,
5516
6467
  MatchaDividerModule,
5517
6468
  MatchaElevationModule,
5518
6469
  MatchaFormFieldModule,
@@ -5528,7 +6479,6 @@ class MatchaComponentsModule {
5528
6479
  MatchaPaginatorModule,
5529
6480
  MatchaProgressBarModule,
5530
6481
  MatchaRippleModule,
5531
- MatchaSelectModule,
5532
6482
  MatchaSidenavModule,
5533
6483
  MatchaSlideToggleModule,
5534
6484
  MatchaSliderModule,
@@ -5544,8 +6494,11 @@ class MatchaComponentsModule {
5544
6494
  MatchaDateModule,
5545
6495
  MatchaTimeModule,
5546
6496
  MatchaDropListModule,
5547
- MatchaPageLayoutModule], exports: [MatchaAccordionModule,
6497
+ MatchaPageLayoutModule,
6498
+ MatchaDrawerModule], exports: [MatchaAccordionModule,
5548
6499
  MatchaAutocompleteModule,
6500
+ MatchaOptionModule,
6501
+ MatchaPanelModule,
5549
6502
  MatchaBadgeModule,
5550
6503
  MatchaButtonModule,
5551
6504
  MatchaButtonToggleModule,
@@ -5553,7 +6506,6 @@ class MatchaComponentsModule {
5553
6506
  MatchaCheckboxModule,
5554
6507
  MatchaRadioModule,
5555
6508
  MatchaChipsModule,
5556
- MatchaDatepickerModule,
5557
6509
  MatchaDividerModule,
5558
6510
  MatchaElevationModule,
5559
6511
  MatchaFormFieldModule,
@@ -5566,11 +6518,9 @@ class MatchaComponentsModule {
5566
6518
  MatchaMasonryModule,
5567
6519
  MatchaMenuModule,
5568
6520
  MatchaModalModule,
5569
- MatchaOptionModule,
5570
6521
  MatchaPaginatorModule,
5571
6522
  MatchaProgressBarModule,
5572
6523
  MatchaRippleModule,
5573
- MatchaSelectModule,
5574
6524
  MatchaSidenavModule,
5575
6525
  MatchaSlideToggleModule,
5576
6526
  MatchaSliderModule,
@@ -5587,13 +6537,15 @@ class MatchaComponentsModule {
5587
6537
  MatchaTimeModule,
5588
6538
  MatchaDropListModule,
5589
6539
  MatchaPageLayoutModule,
5590
- MatchaAvatarModule] }); }
6540
+ MatchaAvatarModule,
6541
+ MatchaDrawerModule] }); }
5591
6542
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaComponentsModule, imports: [CommonModule,
5592
6543
  FormsModule,
5593
6544
  ReactiveFormsModule,
5594
6545
  MatchaAccordionModule,
5595
- MatchaOptionModule,
5596
6546
  MatchaAutocompleteModule,
6547
+ MatchaOptionModule,
6548
+ MatchaPanelModule,
5597
6549
  MatchaBadgeModule,
5598
6550
  MatchaButtonModule,
5599
6551
  MatchaButtonToggleModule,
@@ -5601,7 +6553,6 @@ class MatchaComponentsModule {
5601
6553
  MatchaCheckboxModule,
5602
6554
  MatchaRadioModule,
5603
6555
  MatchaChipsModule,
5604
- MatchaDatepickerModule,
5605
6556
  MatchaDividerModule,
5606
6557
  MatchaElevationModule,
5607
6558
  MatchaFormFieldModule,
@@ -5617,7 +6568,6 @@ class MatchaComponentsModule {
5617
6568
  MatchaPaginatorModule,
5618
6569
  MatchaProgressBarModule,
5619
6570
  MatchaRippleModule,
5620
- MatchaSelectModule,
5621
6571
  MatchaSidenavModule,
5622
6572
  MatchaSlideToggleModule,
5623
6573
  MatchaSliderModule,
@@ -5633,8 +6583,11 @@ class MatchaComponentsModule {
5633
6583
  MatchaDateModule,
5634
6584
  MatchaTimeModule,
5635
6585
  MatchaDropListModule,
5636
- MatchaPageLayoutModule, MatchaAccordionModule,
6586
+ MatchaPageLayoutModule,
6587
+ MatchaDrawerModule, MatchaAccordionModule,
5637
6588
  MatchaAutocompleteModule,
6589
+ MatchaOptionModule,
6590
+ MatchaPanelModule,
5638
6591
  MatchaBadgeModule,
5639
6592
  MatchaButtonModule,
5640
6593
  MatchaButtonToggleModule,
@@ -5642,7 +6595,6 @@ class MatchaComponentsModule {
5642
6595
  MatchaCheckboxModule,
5643
6596
  MatchaRadioModule,
5644
6597
  MatchaChipsModule,
5645
- MatchaDatepickerModule,
5646
6598
  MatchaDividerModule,
5647
6599
  MatchaElevationModule,
5648
6600
  MatchaFormFieldModule,
@@ -5655,11 +6607,9 @@ class MatchaComponentsModule {
5655
6607
  MatchaMasonryModule,
5656
6608
  MatchaMenuModule,
5657
6609
  MatchaModalModule,
5658
- MatchaOptionModule,
5659
6610
  MatchaPaginatorModule,
5660
6611
  MatchaProgressBarModule,
5661
6612
  MatchaRippleModule,
5662
- MatchaSelectModule,
5663
6613
  MatchaSidenavModule,
5664
6614
  MatchaSlideToggleModule,
5665
6615
  MatchaSliderModule,
@@ -5676,7 +6626,8 @@ class MatchaComponentsModule {
5676
6626
  MatchaTimeModule,
5677
6627
  MatchaDropListModule,
5678
6628
  MatchaPageLayoutModule,
5679
- MatchaAvatarModule] }); }
6629
+ MatchaAvatarModule,
6630
+ MatchaDrawerModule] }); }
5680
6631
  }
5681
6632
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MatchaComponentsModule, decorators: [{
5682
6633
  type: NgModule,
@@ -5687,8 +6638,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5687
6638
  FormsModule,
5688
6639
  ReactiveFormsModule,
5689
6640
  MatchaAccordionModule,
5690
- MatchaOptionModule,
5691
6641
  MatchaAutocompleteModule,
6642
+ MatchaOptionModule,
6643
+ MatchaPanelModule,
5692
6644
  MatchaBadgeModule,
5693
6645
  MatchaButtonModule,
5694
6646
  MatchaButtonToggleModule,
@@ -5696,7 +6648,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5696
6648
  MatchaCheckboxModule,
5697
6649
  MatchaRadioModule,
5698
6650
  MatchaChipsModule,
5699
- MatchaDatepickerModule,
5700
6651
  MatchaDividerModule,
5701
6652
  MatchaElevationModule,
5702
6653
  MatchaFormFieldModule,
@@ -5712,7 +6663,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5712
6663
  MatchaPaginatorModule,
5713
6664
  MatchaProgressBarModule,
5714
6665
  MatchaRippleModule,
5715
- MatchaSelectModule,
5716
6666
  MatchaSidenavModule,
5717
6667
  MatchaSlideToggleModule,
5718
6668
  MatchaSliderModule,
@@ -5728,10 +6678,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5728
6678
  MatchaDateModule,
5729
6679
  MatchaTimeModule,
5730
6680
  MatchaDropListModule,
5731
- MatchaPageLayoutModule
6681
+ MatchaPageLayoutModule,
6682
+ MatchaDrawerModule
5732
6683
  ],
5733
6684
  exports: [MatchaAccordionModule,
5734
6685
  MatchaAutocompleteModule,
6686
+ MatchaOptionModule,
6687
+ MatchaPanelModule,
5735
6688
  MatchaBadgeModule,
5736
6689
  MatchaButtonModule,
5737
6690
  MatchaButtonToggleModule,
@@ -5739,7 +6692,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5739
6692
  MatchaCheckboxModule,
5740
6693
  MatchaRadioModule,
5741
6694
  MatchaChipsModule,
5742
- MatchaDatepickerModule,
5743
6695
  MatchaDividerModule,
5744
6696
  MatchaElevationModule,
5745
6697
  MatchaFormFieldModule,
@@ -5752,11 +6704,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5752
6704
  MatchaMasonryModule,
5753
6705
  MatchaMenuModule,
5754
6706
  MatchaModalModule,
5755
- MatchaOptionModule,
5756
6707
  MatchaPaginatorModule,
5757
6708
  MatchaProgressBarModule,
5758
6709
  MatchaRippleModule,
5759
- MatchaSelectModule,
5760
6710
  MatchaSidenavModule,
5761
6711
  MatchaSlideToggleModule,
5762
6712
  MatchaSliderModule,
@@ -5773,7 +6723,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5773
6723
  MatchaTimeModule,
5774
6724
  MatchaDropListModule,
5775
6725
  MatchaPageLayoutModule,
5776
- MatchaAvatarModule
6726
+ MatchaAvatarModule,
6727
+ MatchaDrawerModule
5777
6728
  ],
5778
6729
  }]
5779
6730
  }] });
@@ -5815,18 +6766,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5815
6766
  * Public API Surface of matcha-components
5816
6767
  */
5817
6768
  // -----------------------------------------------------------
5818
- // COMPONENTS
6769
+ // INTERFACES
5819
6770
  // -----------------------------------------------------------
5820
- // // ATOMIC COMPONENTS
5821
- // export * from './lib/matcha-button/matcha-button.component';
5822
- // // BASE COMPONENT
5823
- // export * from './lib/matcha-title/matcha-title.component';
5824
- //
5825
6771
  // -----------------------------------------------------------
5826
- // COMPONENTS
6772
+ // PIPES
5827
6773
  // -----------------------------------------------------------
5828
6774
  // -----------------------------------------------------------
5829
6775
  // VENDORS
6776
+ // -----------------------------------------------------------
5830
6777
  // export * from './lib/matcha-input-phone/lib/ngx-mask-applier.service';
5831
6778
  // export * from './lib/matcha-input-phone/lib/ngx-mask.directive';
5832
6779
  // export * from './lib/matcha-input-phone/lib/ngx-mask.module';
@@ -5841,5 +6788,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5841
6788
  * Generated bundle index. Do not edit.
5842
6789
  */
5843
6790
 
5844
- export { MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteDirective, MatchaAutocompleteModule, MatchaAvatarComponent, MatchaAvatarModule, MatchaBadgeDirective, MatchaBadgeModule, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipsDirective, MatchaChipsModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDatepickerDirective, MatchaDatepickerModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputDirective, MatchaInputModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOptionService, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectDirective, MatchaSelectModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableDirective, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective };
6791
+ export { MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBadgeDirective, MatchaBadgeModule, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipsDirective, MatchaChipsModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputDirective, MatchaInputModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableDirective, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective };
5845
6792
  //# sourceMappingURL=matcha-components.mjs.map