matcha-components 20.188.0 → 20.190.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.
@@ -11606,6 +11606,129 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
11606
11606
  type: Output
11607
11607
  }] } });
11608
11608
 
11609
+ class MatchaProgressBarComponent {
11610
+ set progress(value) {
11611
+ this._progressValue = Number(value);
11612
+ }
11613
+ get progress() {
11614
+ return this._progressValue;
11615
+ }
11616
+ get _progress() { return this.progress; }
11617
+ get _color() { return this.color; }
11618
+ get _isInformative() { return this.hasContent; }
11619
+ get hostSize() {
11620
+ return this.size;
11621
+ }
11622
+ constructor(_elementRef, _renderer, _cdr) {
11623
+ this._elementRef = _elementRef;
11624
+ this._renderer = _renderer;
11625
+ this._cdr = _cdr;
11626
+ this._progressValue = 0;
11627
+ this.color = 'accent';
11628
+ this.size = 'tiny';
11629
+ this.text = null;
11630
+ this.sizeXs = null;
11631
+ this.sizeSm = null;
11632
+ this.sizeMd = null;
11633
+ this.sizeLg = null;
11634
+ this.sizeXl = null;
11635
+ this.hasContent = false;
11636
+ }
11637
+ ngOnInit() {
11638
+ this._renderer.addClass(this._elementRef.nativeElement, 'matcha-progress-bar');
11639
+ this.setSize();
11640
+ }
11641
+ ngAfterViewInit() {
11642
+ this.checkContent();
11643
+ }
11644
+ ngAfterViewChecked() {
11645
+ this.checkContent();
11646
+ }
11647
+ checkContent() {
11648
+ if (this.contentWrapper && this.contentWrapper.nativeElement) {
11649
+ const hasNodes = this.contentWrapper.nativeElement.childNodes.length > 0;
11650
+ const hasText = this.contentWrapper.nativeElement.innerText.trim().length > 0;
11651
+ const hasChildren = this.contentWrapper.nativeElement.children.length > 0;
11652
+ // Check if there is actual content (elements or non-empty text)
11653
+ const newHasContent = hasChildren || hasText;
11654
+ if (this.hasContent !== newHasContent) {
11655
+ // Prevent ExpressionChangedAfterItHasBeenCheckedError
11656
+ Promise.resolve().then(() => {
11657
+ this.hasContent = newHasContent;
11658
+ this._cdr.detectChanges(); // Use injected CDR if implicit detection isn't enough
11659
+ });
11660
+ }
11661
+ }
11662
+ }
11663
+ setSize() {
11664
+ const sizes = ['tiny', 'small', 'medium', 'large', 'huge'];
11665
+ sizes.forEach(size => {
11666
+ this._renderer.removeClass(this._elementRef.nativeElement, `matcha-progress-bar-${size}`);
11667
+ });
11668
+ if (this.size) {
11669
+ this._renderer.addClass(this._elementRef.nativeElement, `matcha-progress-bar-${this.size}`);
11670
+ }
11671
+ }
11672
+ get isIndeterminate() {
11673
+ return !this.progress || Number(this.progress) === 0;
11674
+ }
11675
+ get progressWidth() {
11676
+ const progress = Math.min(Math.max(Number(this.progress), 0), 100);
11677
+ return `${progress}%`;
11678
+ }
11679
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaProgressBarComponent, deps: [{ token: ElementRef }, { token: Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
11680
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaProgressBarComponent, isStandalone: false, selector: "matcha-progress-bar", inputs: { progress: "progress", color: "color", size: "size", text: "text", 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.is-informative": "this._isInformative", "attr.size": "this.hostSize" } }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "<div class=\"matcha-progress-bar\" role=\"progressbar\" [attr.aria-valuemin]=\"0\" [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"progress\">\n\n <!-- Barra de progresso com card informativo (aparece se tiver conte\u00FAdo projetado) -->\n <matcha-card class=\"progress-info-card\" [style.display]=\"hasContent ? '' : 'none'\" [hidden]=\"!hasContent\">\n <div #contentWrapper>\n <ng-content></ng-content>\n </div>\n </matcha-card>\n\n <!-- Barra de progresso (aparece texto caso tenha text=\"texto\") -->\n <div class=\"progress\">\n <div *ngIf=\"text\" class=\"progress-text progress-text-bg\">\n {{ text }}\n </div>\n\n <div *ngIf=\"isIndeterminate\" [class]=\"color + ' indeterminate' \"></div>\n\n <div *ngIf=\"!isIndeterminate\" [class]=\"color + ' determinate' \" [style.width]=\"progressWidth\"\n [class.radius-bottom-8]=\"hasContent\"></div>\n\n <div *ngIf=\"text\" class=\"progress-text progress-text-fg\"\n [style.clip-path]=\"'inset(0 calc(100% - ' + progressWidth + ') 0 0)'\">\n {{ text }}\n </div>\n </div>\n\n\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatchaCardComponent, selector: "matcha-card", inputs: ["color", "blockquote", "blockquoteColor", "class", "alpha", "tint", "loading"] }] }); }
11681
+ }
11682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaProgressBarComponent, decorators: [{
11683
+ type: Component,
11684
+ args: [{ selector: 'matcha-progress-bar', standalone: false, template: "<div class=\"matcha-progress-bar\" role=\"progressbar\" [attr.aria-valuemin]=\"0\" [attr.aria-valuemax]=\"100\"\n [attr.aria-valuenow]=\"progress\">\n\n <!-- Barra de progresso com card informativo (aparece se tiver conte\u00FAdo projetado) -->\n <matcha-card class=\"progress-info-card\" [style.display]=\"hasContent ? '' : 'none'\" [hidden]=\"!hasContent\">\n <div #contentWrapper>\n <ng-content></ng-content>\n </div>\n </matcha-card>\n\n <!-- Barra de progresso (aparece texto caso tenha text=\"texto\") -->\n <div class=\"progress\">\n <div *ngIf=\"text\" class=\"progress-text progress-text-bg\">\n {{ text }}\n </div>\n\n <div *ngIf=\"isIndeterminate\" [class]=\"color + ' indeterminate' \"></div>\n\n <div *ngIf=\"!isIndeterminate\" [class]=\"color + ' determinate' \" [style.width]=\"progressWidth\"\n [class.radius-bottom-8]=\"hasContent\"></div>\n\n <div *ngIf=\"text\" class=\"progress-text progress-text-fg\"\n [style.clip-path]=\"'inset(0 calc(100% - ' + progressWidth + ') 0 0)'\">\n {{ text }}\n </div>\n </div>\n\n\n</div>" }]
11685
+ }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
11686
+ type: Inject,
11687
+ args: [ElementRef]
11688
+ }] }, { type: i0.Renderer2, decorators: [{
11689
+ type: Inject,
11690
+ args: [Renderer2]
11691
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { progress: [{
11692
+ type: Input
11693
+ }], _progress: [{
11694
+ type: HostBinding,
11695
+ args: ['attr.progress']
11696
+ }], color: [{
11697
+ type: Input
11698
+ }], _color: [{
11699
+ type: HostBinding,
11700
+ args: ['attr.color']
11701
+ }], _isInformative: [{
11702
+ type: HostBinding,
11703
+ args: ['attr.is-informative']
11704
+ }], size: [{
11705
+ type: Input,
11706
+ args: ['size']
11707
+ }], text: [{
11708
+ type: Input
11709
+ }], hostSize: [{
11710
+ type: HostBinding,
11711
+ args: ['attr.size']
11712
+ }], sizeXs: [{
11713
+ type: Input,
11714
+ args: ['size-xs']
11715
+ }], sizeSm: [{
11716
+ type: Input,
11717
+ args: ['size-sm']
11718
+ }], sizeMd: [{
11719
+ type: Input,
11720
+ args: ['size-md']
11721
+ }], sizeLg: [{
11722
+ type: Input,
11723
+ args: ['size-lg']
11724
+ }], sizeXl: [{
11725
+ type: Input,
11726
+ args: ['size-xl']
11727
+ }], contentWrapper: [{
11728
+ type: ViewChild,
11729
+ args: ['contentWrapper']
11730
+ }] } });
11731
+
11609
11732
  class MatchaTooltipDirective {
11610
11733
  get tooltipText() { return this._tooltipText; }
11611
11734
  set tooltipText(v) {
@@ -13479,6 +13602,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
13479
13602
  }]
13480
13603
  }] });
13481
13604
 
13605
+ class MatchaProgressBarModule {
13606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
13607
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaProgressBarModule, declarations: [MatchaProgressBarComponent], imports: [CommonModule,
13608
+ MatchaCardModule], exports: [MatchaProgressBarComponent] }); }
13609
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaProgressBarModule, imports: [CommonModule,
13610
+ MatchaCardModule] }); }
13611
+ }
13612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaProgressBarModule, decorators: [{
13613
+ type: NgModule,
13614
+ args: [{
13615
+ declarations: [MatchaProgressBarComponent],
13616
+ imports: [
13617
+ CommonModule,
13618
+ MatchaCardModule
13619
+ ],
13620
+ exports: [MatchaProgressBarComponent]
13621
+ }]
13622
+ }] });
13623
+
13482
13624
  class MatchaTabsModule {
13483
13625
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
13484
13626
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaTabsModule, declarations: [MatchaTabsComponent,
@@ -14118,6 +14260,7 @@ class MatchaComponentsModule {
14118
14260
  MatchaSliderModule,
14119
14261
  MatchaSpinModule,
14120
14262
  MatchaSpinnerModule,
14263
+ MatchaProgressBarModule,
14121
14264
  MatchaStepperModule,
14122
14265
  MatchaTabsModule,
14123
14266
  MatchaTitleModule,
@@ -14156,6 +14299,7 @@ class MatchaComponentsModule {
14156
14299
  MatchaSliderModule,
14157
14300
  MatchaSpinModule,
14158
14301
  MatchaSpinnerModule,
14302
+ MatchaProgressBarModule,
14159
14303
  MatchaStepperModule,
14160
14304
  MatchaTabsModule,
14161
14305
  MatchaTitleModule,
@@ -14199,6 +14343,7 @@ class MatchaComponentsModule {
14199
14343
  MatchaSliderModule,
14200
14344
  MatchaSpinModule,
14201
14345
  MatchaSpinnerModule,
14346
+ MatchaProgressBarModule,
14202
14347
  MatchaStepperModule,
14203
14348
  MatchaTabsModule,
14204
14349
  MatchaTitleModule,
@@ -14237,6 +14382,7 @@ class MatchaComponentsModule {
14237
14382
  MatchaSliderModule,
14238
14383
  MatchaSpinModule,
14239
14384
  MatchaSpinnerModule,
14385
+ MatchaProgressBarModule,
14240
14386
  MatchaStepperModule,
14241
14387
  MatchaTabsModule,
14242
14388
  MatchaTitleModule,
@@ -14286,6 +14432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
14286
14432
  MatchaSliderModule,
14287
14433
  MatchaSpinModule,
14288
14434
  MatchaSpinnerModule,
14435
+ MatchaProgressBarModule,
14289
14436
  MatchaStepperModule,
14290
14437
  MatchaTabsModule,
14291
14438
  MatchaTitleModule,
@@ -14326,6 +14473,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
14326
14473
  MatchaSliderModule,
14327
14474
  MatchaSpinModule,
14328
14475
  MatchaSpinnerModule,
14476
+ MatchaProgressBarModule,
14329
14477
  MatchaStepperModule,
14330
14478
  MatchaTabsModule,
14331
14479
  MatchaTitleModule,
@@ -14435,5 +14583,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
14435
14583
  * Generated bundle index. Do not edit.
14436
14584
  */
14437
14585
 
14438
- export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
14586
+ export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
14439
14587
  //# sourceMappingURL=matcha-components.mjs.map