matcha-components 20.117.0 → 20.120.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.
- package/README.md +0 -6
- package/fesm2022/matcha-components.mjs +14 -7
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -158,11 +158,6 @@ Run the serve command:
|
|
|
158
158
|
> Terminal: `ng s`
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
### Storybook
|
|
164
|
-
Run `ng run matcha-components:storybook` or `npm run storybook`to execute the storybook aplication and see the documentation of all components via [storybook](https://storybook.js.org/tutorials/intro-to-storybook/angular/en/get-started/).
|
|
165
|
-
|
|
166
161
|
---
|
|
167
162
|
|
|
168
163
|
### Scaffold
|
|
@@ -322,7 +317,6 @@ $matcha-default-theme: matcha.dark-theme($default-dark-primary, $default-dark-ac
|
|
|
322
317
|
## Further help
|
|
323
318
|
|
|
324
319
|
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
325
|
-
To get more help on the Storybook [stories](https://github.com/geromegrignon/angular-material-storybook/blob/main/stories/components/progress-bar/progress-bar.stories.ts)
|
|
326
320
|
|
|
327
321
|
## Roadmap
|
|
328
322
|
|
|
@@ -2781,21 +2781,28 @@ class MatchaSkeletonComponent {
|
|
|
2781
2781
|
this.model = 'empty';
|
|
2782
2782
|
this.gap = 16;
|
|
2783
2783
|
}
|
|
2784
|
+
// Getters privados para conversão sem modificar os inputs
|
|
2785
|
+
get amountNumber() {
|
|
2786
|
+
return typeof this.amount === 'string' ? parseInt(this.amount, 10) : this.amount;
|
|
2787
|
+
}
|
|
2788
|
+
get gridNumber() {
|
|
2789
|
+
return typeof this.grid === 'string' ? parseInt(this.grid, 10) : this.grid;
|
|
2790
|
+
}
|
|
2784
2791
|
get classes() {
|
|
2785
|
-
//
|
|
2786
|
-
|
|
2787
|
-
|
|
2792
|
+
// Usa os valores convertidos sem modificar os inputs
|
|
2793
|
+
const amountValue = this.amountNumber;
|
|
2794
|
+
const gridValue = this.gridNumber;
|
|
2788
2795
|
let classes = `gap-${this.gap} `;
|
|
2789
|
-
|
|
2790
|
-
|
|
2796
|
+
amountValue > 1 ? classes += `grid-sm-${gridValue - 1} ` : classes;
|
|
2797
|
+
amountValue > 2 ? classes += `grid-md-${gridValue} ` : classes;
|
|
2791
2798
|
return classes;
|
|
2792
2799
|
}
|
|
2793
2800
|
get heightClass() {
|
|
2794
2801
|
return `h-${this.height}`;
|
|
2795
2802
|
}
|
|
2796
2803
|
get amountArray() {
|
|
2797
|
-
const
|
|
2798
|
-
return Array(
|
|
2804
|
+
const amountValue = this.amountNumber;
|
|
2805
|
+
return Array(amountValue).fill(0).map((_, index) => index);
|
|
2799
2806
|
}
|
|
2800
2807
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2801
2808
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaSkeletonComponent, isStandalone: false, selector: "matcha-skeleton", inputs: { amount: "amount", grid: "grid", height: "height", model: "model", gap: "gap" }, host: { properties: { "attr.amount": "this.amount", "attr.grid": "this.grid", "attr.height": "this.height", "attr.model": "this.model", "attr.gap": "this.gap" } }, ngImport: i0, template: "<ng-content></ng-content>\n<!-- CARD SKELETON -->\n<div [class]=\"classes\" *ngIf=\"model !== 'table'\">\n <div class=\"skeleton-animated-background flex-column--force p-0 radius-8 user-select-none overflow-hidden\" *ngFor=\"let i of amountArray\">\n\n <ng-container *ngIf=\"model === 'profile'\"><span class=\"h8 title p-16 m-0\"> <span class=\"radius-full background-surface-alpha h-48 w-48\"></span> </span></ng-container>\n\n <div [class]=\"'h-'+ height + ' flex-column--force p-16'\"></div>\n\n <ng-container *ngIf=\"model === 'profile'\">\n <div class=\"flex-column--force\">\n <div class=\"flex-column--force p-16 gap-16\">\n <div class=\"w-100-p h-16 background-surface-alpha radius-full\"></div>\n <div class=\"w-100-p h-16 background-surface-alpha radius-full\"></div>\n </div>\n </div>\n </ng-container>\n\n </div>\n</div>\n<!-- CARD SKELETON -->\n\n<!-- TABLE SKELETON -->\n<div class=\"skeleton-animated-background w-100-p mr-16 flex-column--force p-0 radius-8 user-select-none\" *ngIf=\"model === 'table'\">\n\n <div class=\"flex-column--force h-64 background-surface-alpha\">\n <ng-container> </ng-container>\n </div>\n\n <ng-container *ngFor=\"let i of amountArray\">\n <div class=\"grid-4 h-80 px-16 gap-16 flex-align-center--force\">\n <div class=\"w-100-p flex-row--force gap-16\">\n <div class=\"min-h-48 min-w-48 h-48 w-48 background-surface-alpha radius-full\"></div>\n <div class=\"w-100-p flex-column--force flex-center--force gap-16\">\n <div class=\"h-16 w-60-p background-surface-alpha radius-full\"></div>\n <div class=\"h-16 w-100-p background-surface-alpha radius-full\"></div>\n </div>\n </div>\n <div class=\"h-16 w-100-p flex-column--force background-surface-alpha radius-full\"></div>\n <div class=\"w-100-p flex-row--force gap-16\">\n <div class=\"w-100-p flex-column--force flex-center--force gap-16\">\n <div class=\"h-16 w-60-p background-surface-alpha radius-full\"></div>\n <div class=\"h-16 w-100-p background-surface-alpha radius-full\"></div>\n </div>\n </div>\n <div class=\"h-16 w-100-p flex-column--force background-surface-alpha radius-full\"></div>\n </div>\n\n <div class=\"grid-4 h-80 px-16 gap-16 flex-align-center--force background-bg-alpha\">\n <div class=\"w-100-p flex-row--force gap-16\">\n <div class=\"min-h-48 min-w-48 h-48 w-48 background-surface-alpha radius-full\"></div>\n <div class=\"w-100-p flex-column--force flex-center--force gap-16\">\n <div class=\"h-16 w-100-p background-surface-alpha radius-full\"></div>\n <div class=\"h-16 w-30-p background-surface-alpha radius-full\"></div>\n </div>\n </div>\n <div class=\"h-16 w-100-p flex-column--force background-surface-alpha radius-full\"></div>\n <div class=\"w-100-p flex-row--force gap-16\">\n <div class=\"w-100-p flex-column--force flex-center--force gap-16\">\n <div class=\"h-16 w-60-p background-surface-alpha radius-full\"></div>\n <div class=\"h-16 w-100-p background-surface-alpha radius-full\"></div>\n </div>\n </div>\n <div class=\"h-16 w-100-p flex-column--force background-surface-alpha radius-full\"></div>\n </div>\n\n </ng-container>\n\n</div>\n<!-- TABLE SKELETON -->\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|