matcha-components 19.43.0 → 19.45.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.
|
@@ -659,7 +659,7 @@ class MatchaAccordionItemComponent {
|
|
|
659
659
|
constructor() {
|
|
660
660
|
this._stretch = false;
|
|
661
661
|
this._isOpen = false;
|
|
662
|
-
this.
|
|
662
|
+
this.opened = new EventEmitter();
|
|
663
663
|
}
|
|
664
664
|
set stretch(value) {
|
|
665
665
|
this._stretch = value != null && `${value}` !== 'false';
|
|
@@ -674,14 +674,14 @@ class MatchaAccordionItemComponent {
|
|
|
674
674
|
return this._isOpen;
|
|
675
675
|
}
|
|
676
676
|
ngOnInit() {
|
|
677
|
-
this.
|
|
677
|
+
this.opened.emit(this.isOpen);
|
|
678
678
|
}
|
|
679
679
|
toggleAccordion() {
|
|
680
680
|
this.isOpen = !this.isOpen;
|
|
681
|
-
this.
|
|
681
|
+
this.opened.emit(this.isOpen);
|
|
682
682
|
}
|
|
683
683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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: {
|
|
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: { 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] }); }
|
|
685
685
|
}
|
|
686
686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaAccordionItemComponent, decorators: [{
|
|
687
687
|
type: Component,
|
|
@@ -690,7 +690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
690
690
|
type: Input
|
|
691
691
|
}], isOpen: [{
|
|
692
692
|
type: Input
|
|
693
|
-
}],
|
|
693
|
+
}], opened: [{
|
|
694
694
|
type: Output
|
|
695
695
|
}] } });
|
|
696
696
|
|
|
@@ -699,7 +699,6 @@ class MatchaAccordionComponent {
|
|
|
699
699
|
this._multiple = false;
|
|
700
700
|
this.openedChange = new EventEmitter();
|
|
701
701
|
}
|
|
702
|
-
// Se multiple for true, permite abrir vários itens simultaneamente.
|
|
703
702
|
set multiple(value) {
|
|
704
703
|
// Converte 'false' (string) ou false (boolean) para false, e qualquer outro valor para true.
|
|
705
704
|
this._multiple = value != null && `${value}` !== 'false';
|
|
@@ -709,8 +708,7 @@ class MatchaAccordionComponent {
|
|
|
709
708
|
}
|
|
710
709
|
ngAfterContentInit() {
|
|
711
710
|
this.items.forEach(item => {
|
|
712
|
-
item.
|
|
713
|
-
console.log('Accordion: Item toggled, isOpen:', isOpen);
|
|
711
|
+
item.opened.subscribe((isOpen) => {
|
|
714
712
|
this.toggleItem(item);
|
|
715
713
|
this.openedChange.emit(isOpen);
|
|
716
714
|
});
|
|
@@ -1744,13 +1742,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1744
1742
|
}] } });
|
|
1745
1743
|
|
|
1746
1744
|
class MatchaSpinComponent {
|
|
1745
|
+
constructor() {
|
|
1746
|
+
this._progress = 0;
|
|
1747
|
+
this.color = 'accent';
|
|
1748
|
+
this.diameter = 60;
|
|
1749
|
+
this.strokeWidth = 5;
|
|
1750
|
+
}
|
|
1751
|
+
set progress(value) {
|
|
1752
|
+
this._progress = Number(value);
|
|
1753
|
+
}
|
|
1754
|
+
get progress() {
|
|
1755
|
+
return this._progress;
|
|
1756
|
+
}
|
|
1757
|
+
get radius() {
|
|
1758
|
+
return (this.diameter - this.strokeWidth) / 2;
|
|
1759
|
+
}
|
|
1760
|
+
get circumference() {
|
|
1761
|
+
return 2 * Math.PI * this.radius;
|
|
1762
|
+
}
|
|
1763
|
+
get dashOffset() {
|
|
1764
|
+
const progress = Math.min(Math.max(Number(this.progress), 0), 100);
|
|
1765
|
+
return this.circumference - (progress / 100) * this.circumference;
|
|
1766
|
+
}
|
|
1747
1767
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaSpinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1748
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MatchaSpinComponent, isStandalone: false, selector: "matcha-spin", ngImport: i0, template: "<
|
|
1768
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MatchaSpinComponent, isStandalone: false, selector: "matcha-spin", inputs: { progress: "progress", color: "color" }, ngImport: i0, template: "<div\n class=\"matcha-spin\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"progress\"\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n>\n <svg [attr.viewBox]=\"'0 0 ' + diameter + ' ' + diameter\">\n\n <circle\n class=\"spin-placeholder\"\n [attr.cx]=\"diameter / 2\"\n [attr.cy]=\"diameter / 2\"\n [attr.r]=\"radius\"\n [attr.stroke-width]=\"strokeWidth\"\n />\n\n <circle\n class=\"spin-progress\"\n [attr.cx]=\"diameter / 2\"\n [attr.cy]=\"diameter / 2\"\n [attr.r]=\"radius\"\n [attr.stroke]=\"color\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke-dasharray]=\"circumference\"\n [attr.stroke-dashoffset]=\"progress ? dashOffset:null\"\n />\n </svg>\n\n</div>\n\n", styles: [""] }); }
|
|
1749
1769
|
}
|
|
1750
1770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatchaSpinComponent, decorators: [{
|
|
1751
1771
|
type: Component,
|
|
1752
|
-
args: [{ selector: 'matcha-spin', standalone: false, template: "<
|
|
1753
|
-
}]
|
|
1772
|
+
args: [{ selector: 'matcha-spin', standalone: false, template: "<div\n class=\"matcha-spin\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"progress\"\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n>\n <svg [attr.viewBox]=\"'0 0 ' + diameter + ' ' + diameter\">\n\n <circle\n class=\"spin-placeholder\"\n [attr.cx]=\"diameter / 2\"\n [attr.cy]=\"diameter / 2\"\n [attr.r]=\"radius\"\n [attr.stroke-width]=\"strokeWidth\"\n />\n\n <circle\n class=\"spin-progress\"\n [attr.cx]=\"diameter / 2\"\n [attr.cy]=\"diameter / 2\"\n [attr.r]=\"radius\"\n [attr.stroke]=\"color\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke-dasharray]=\"circumference\"\n [attr.stroke-dashoffset]=\"progress ? dashOffset:null\"\n />\n </svg>\n\n</div>\n\n" }]
|
|
1773
|
+
}], propDecorators: { progress: [{
|
|
1774
|
+
type: Input
|
|
1775
|
+
}], color: [{
|
|
1776
|
+
type: Input
|
|
1777
|
+
}] } });
|
|
1754
1778
|
|
|
1755
1779
|
class MatchaTooltipDirective {
|
|
1756
1780
|
constructor(el, renderer) {
|