matcha-components 19.42.0 → 19.43.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.
|
@@ -658,35 +658,46 @@ const createAnimations = [
|
|
|
658
658
|
class MatchaAccordionItemComponent {
|
|
659
659
|
constructor() {
|
|
660
660
|
this._stretch = false;
|
|
661
|
+
this._isOpen = false;
|
|
661
662
|
this.toggle = new EventEmitter();
|
|
662
|
-
|
|
663
|
+
}
|
|
664
|
+
set stretch(value) {
|
|
665
|
+
this._stretch = value != null && `${value}` !== 'false';
|
|
663
666
|
}
|
|
664
667
|
get stretch() {
|
|
665
668
|
return this._stretch;
|
|
666
669
|
}
|
|
667
|
-
set
|
|
668
|
-
this.
|
|
670
|
+
set isOpen(value) {
|
|
671
|
+
this._isOpen = value != null && `${value}` !== 'false';
|
|
672
|
+
}
|
|
673
|
+
get isOpen() {
|
|
674
|
+
return this._isOpen;
|
|
675
|
+
}
|
|
676
|
+
ngOnInit() {
|
|
677
|
+
this.toggle.emit(this.isOpen);
|
|
669
678
|
}
|
|
670
679
|
toggleAccordion() {
|
|
671
680
|
this.isOpen = !this.isOpen;
|
|
672
681
|
this.toggle.emit(this.isOpen);
|
|
673
682
|
}
|
|
674
683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
675
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MatchaAccordionItemComponent, isStandalone: false, selector: "matcha-accordion-item", inputs: { stretch: "stretch" }, outputs: { toggle: "
|
|
684
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MatchaAccordionItemComponent, isStandalone: false, selector: "matcha-accordion-item", inputs: { stretch: "stretch", isOpen: "isOpen" }, outputs: { toggle: "toggle" }, 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] }); }
|
|
676
685
|
}
|
|
677
686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaAccordionItemComponent, decorators: [{
|
|
678
687
|
type: Component,
|
|
679
688
|
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" }]
|
|
680
689
|
}], propDecorators: { stretch: [{
|
|
681
690
|
type: Input
|
|
691
|
+
}], isOpen: [{
|
|
692
|
+
type: Input
|
|
682
693
|
}], toggle: [{
|
|
683
|
-
type: Output
|
|
684
|
-
args: ['openedChange']
|
|
694
|
+
type: Output
|
|
685
695
|
}] } });
|
|
686
696
|
|
|
687
697
|
class MatchaAccordionComponent {
|
|
688
698
|
constructor() {
|
|
689
699
|
this._multiple = false;
|
|
700
|
+
this.openedChange = new EventEmitter();
|
|
690
701
|
}
|
|
691
702
|
// Se multiple for true, permite abrir vários itens simultaneamente.
|
|
692
703
|
set multiple(value) {
|
|
@@ -698,8 +709,10 @@ class MatchaAccordionComponent {
|
|
|
698
709
|
}
|
|
699
710
|
ngAfterContentInit() {
|
|
700
711
|
this.items.forEach(item => {
|
|
701
|
-
item.toggle.subscribe(() => {
|
|
712
|
+
item.toggle.subscribe((isOpen) => {
|
|
713
|
+
console.log('Accordion: Item toggled, isOpen:', isOpen);
|
|
702
714
|
this.toggleItem(item);
|
|
715
|
+
this.openedChange.emit(isOpen);
|
|
703
716
|
});
|
|
704
717
|
});
|
|
705
718
|
}
|
|
@@ -714,13 +727,16 @@ class MatchaAccordionComponent {
|
|
|
714
727
|
}
|
|
715
728
|
}
|
|
716
729
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
717
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MatchaAccordionComponent, isStandalone: false, selector: "matcha-accordion", inputs: { multiple: "multiple" }, queries: [{ propertyName: "items", predicate: MatchaAccordionItemComponent }], ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
|
|
730
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MatchaAccordionComponent, isStandalone: false, selector: "matcha-accordion", inputs: { multiple: "multiple" }, outputs: { openedChange: "openedChange" }, queries: [{ propertyName: "items", predicate: MatchaAccordionItemComponent }], ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
|
|
718
731
|
}
|
|
719
732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaAccordionComponent, decorators: [{
|
|
720
733
|
type: Component,
|
|
721
734
|
args: [{ selector: 'matcha-accordion', standalone: false, template: "<ng-content></ng-content>\n" }]
|
|
722
735
|
}], propDecorators: { multiple: [{
|
|
723
736
|
type: Input
|
|
737
|
+
}], openedChange: [{
|
|
738
|
+
type: Output,
|
|
739
|
+
args: ['openedChange']
|
|
724
740
|
}], items: [{
|
|
725
741
|
type: ContentChildren,
|
|
726
742
|
args: [MatchaAccordionItemComponent]
|