matcha-components 19.134.0 → 19.135.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.
@@ -1858,6 +1858,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1858
1858
  args: ['size-xl']
1859
1859
  }] } });
1860
1860
 
1861
+ class MatchaSpinnerComponent {
1862
+ set progress(value) {
1863
+ this._progress = Number(value);
1864
+ }
1865
+ get progress() {
1866
+ return this._progress;
1867
+ }
1868
+ constructor(_elementRef, _renderer) {
1869
+ this._elementRef = _elementRef;
1870
+ this._renderer = _renderer;
1871
+ this._progress = 0;
1872
+ this.color = 'accent';
1873
+ this.size = null;
1874
+ this.sizeXs = null;
1875
+ this.sizeSm = null;
1876
+ this.sizeMd = null;
1877
+ this.sizeLg = null;
1878
+ this.sizeXl = null;
1879
+ // Valores fixos baseados no hard coded que funciona
1880
+ this.diameter = 66;
1881
+ this.center = 33;
1882
+ this.radius = 30;
1883
+ this.strokeWidth = 5;
1884
+ }
1885
+ ngOnInit() {
1886
+ this._renderer.addClass(this._elementRef.nativeElement, 'matcha-spinner');
1887
+ this.setSize();
1888
+ }
1889
+ setSize() {
1890
+ const sizes = ['tiny', 'small', 'medium', 'large', 'huge'];
1891
+ sizes.forEach(size => {
1892
+ this._renderer.removeClass(this._elementRef.nativeElement, `matcha-spinner-${size}`);
1893
+ });
1894
+ if (this.size) {
1895
+ this._renderer.addClass(this._elementRef.nativeElement, `matcha-spinner-${this.size}`);
1896
+ }
1897
+ }
1898
+ get circumference() {
1899
+ return 2 * Math.PI * this.radius;
1900
+ }
1901
+ get dashOffset() {
1902
+ const progress = Math.min(Math.max(Number(this.progress), 0), 100);
1903
+ return this.circumference - (progress / 100) * this.circumference;
1904
+ }
1905
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MatchaSpinnerComponent, deps: [{ token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
1906
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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: [""] }); }
1907
+ }
1908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MatchaSpinnerComponent, decorators: [{
1909
+ type: Component,
1910
+ args: [{ selector: 'matcha-spinner', standalone: false, 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" }]
1911
+ }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
1912
+ type: Inject,
1913
+ args: [ElementRef]
1914
+ }] }, { type: i0.Renderer2, decorators: [{
1915
+ type: Inject,
1916
+ args: [Renderer2]
1917
+ }] }], propDecorators: { progress: [{
1918
+ type: Input
1919
+ }], color: [{
1920
+ type: Input
1921
+ }], size: [{
1922
+ type: Input,
1923
+ args: ['size']
1924
+ }], sizeXs: [{
1925
+ type: Input,
1926
+ args: ['size-xs']
1927
+ }], sizeSm: [{
1928
+ type: Input,
1929
+ args: ['size-sm']
1930
+ }], sizeMd: [{
1931
+ type: Input,
1932
+ args: ['size-md']
1933
+ }], sizeLg: [{
1934
+ type: Input,
1935
+ args: ['size-lg']
1936
+ }], sizeXl: [{
1937
+ type: Input,
1938
+ args: ['size-xl']
1939
+ }] } });
1940
+
1861
1941
  class MatchaHintTextComponent {
1862
1942
  constructor() {
1863
1943
  this.type = 'error';
@@ -4759,6 +4839,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4759
4839
  }]
4760
4840
  }] });
4761
4841
 
4842
+ class MatchaSpinnerModule {
4843
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MatchaSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4844
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: MatchaSpinnerModule, declarations: [MatchaSpinnerComponent], imports: [CommonModule], exports: [MatchaSpinnerComponent] }); }
4845
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MatchaSpinnerModule, imports: [CommonModule] }); }
4846
+ }
4847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MatchaSpinnerModule, decorators: [{
4848
+ type: NgModule,
4849
+ args: [{
4850
+ declarations: [MatchaSpinnerComponent],
4851
+ imports: [
4852
+ CommonModule
4853
+ ],
4854
+ exports: [MatchaSpinnerComponent]
4855
+ }]
4856
+ }] });
4857
+
4762
4858
  class MatchaTableDirective {
4763
4859
  constructor(_elementRef, _renderer) {
4764
4860
  this._elementRef = _elementRef;
@@ -5052,6 +5148,7 @@ class MatchaComponentsModule {
5052
5148
  MatchaSnackBarModule,
5053
5149
  MatchaSortHeaderModule,
5054
5150
  MatchaSpinModule,
5151
+ MatchaSpinnerModule,
5055
5152
  MatchaStepperModule,
5056
5153
  MatchaTableModule,
5057
5154
  MatchaTabsModule,
@@ -5092,6 +5189,7 @@ class MatchaComponentsModule {
5092
5189
  MatchaSnackBarModule,
5093
5190
  MatchaSortHeaderModule,
5094
5191
  MatchaSpinModule,
5192
+ MatchaSpinnerModule,
5095
5193
  MatchaStepperModule,
5096
5194
  MatchaTableModule,
5097
5195
  MatchaTabsModule,
@@ -5136,6 +5234,7 @@ class MatchaComponentsModule {
5136
5234
  MatchaSnackBarModule,
5137
5235
  MatchaSortHeaderModule,
5138
5236
  MatchaSpinModule,
5237
+ MatchaSpinnerModule,
5139
5238
  MatchaStepperModule,
5140
5239
  MatchaTableModule,
5141
5240
  MatchaTabsModule,
@@ -5176,6 +5275,7 @@ class MatchaComponentsModule {
5176
5275
  MatchaSnackBarModule,
5177
5276
  MatchaSortHeaderModule,
5178
5277
  MatchaSpinModule,
5278
+ MatchaSpinnerModule,
5179
5279
  MatchaStepperModule,
5180
5280
  MatchaTableModule,
5181
5281
  MatchaTabsModule,
@@ -5226,6 +5326,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5226
5326
  MatchaSnackBarModule,
5227
5327
  MatchaSortHeaderModule,
5228
5328
  MatchaSpinModule,
5329
+ MatchaSpinnerModule,
5229
5330
  MatchaStepperModule,
5230
5331
  MatchaTableModule,
5231
5332
  MatchaTabsModule,
@@ -5268,6 +5369,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5268
5369
  MatchaSnackBarModule,
5269
5370
  MatchaSortHeaderModule,
5270
5371
  MatchaSpinModule,
5372
+ MatchaSpinnerModule,
5271
5373
  MatchaStepperModule,
5272
5374
  MatchaTableModule,
5273
5375
  MatchaTabsModule,
@@ -5344,5 +5446,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5344
5446
  * Generated bundle index. Do not edit.
5345
5447
  */
5346
5448
 
5347
- export { MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteDirective, MatchaAutocompleteModule, 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, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOptionService, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioButtonDirective, MatchaRadioButtonModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectDirective, MatchaSelectModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, 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 };
5449
+ export { MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteDirective, MatchaAutocompleteModule, 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, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOptionService, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioButtonDirective, MatchaRadioButtonModule, 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 };
5348
5450
  //# sourceMappingURL=matcha-components.mjs.map