@litigiovirtual/ius-design-components 1.0.176 → 1.0.177
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.
|
@@ -1,22 +1,36 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export class CalificationComponent {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.rating = 0;
|
|
6
|
+
this.ratingChange = new EventEmitter();
|
|
6
7
|
this.stars = [1, 2, 3, 4, 5];
|
|
8
|
+
this.hoveredRating = 0;
|
|
7
9
|
}
|
|
8
10
|
ngOnChanges() {
|
|
9
11
|
if (this.rating == null || isNaN(this.rating))
|
|
10
12
|
this.rating = 0;
|
|
11
13
|
this.rating = Math.max(0, Math.min(5, Math.round(this.rating)));
|
|
12
14
|
}
|
|
15
|
+
onStarHover(star) {
|
|
16
|
+
this.hoveredRating = star;
|
|
17
|
+
}
|
|
18
|
+
onMouseLeave() {
|
|
19
|
+
this.hoveredRating = 0;
|
|
20
|
+
}
|
|
21
|
+
onStarClick(star) {
|
|
22
|
+
this.rating = star;
|
|
23
|
+
this.ratingChange.emit(this.rating);
|
|
24
|
+
}
|
|
13
25
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CalificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CalificationComponent, isStandalone: true, selector: "ius-calification", inputs: { rating: "rating" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" [class.filled]=\"s <= rating\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty)}.star.filled{fill:var(--star-color-filled)}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }); }
|
|
26
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CalificationComponent, isStandalone: true, selector: "ius-calification", inputs: { rating: "rating" }, outputs: { ratingChange: "ratingChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\" (mouseleave)=\"onMouseLeave()\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" \r\n [class.filled]=\"s <= rating\" \r\n [class.hovered]=\"s <= hoveredRating\"\r\n (mouseenter)=\"onStarHover(s)\"\r\n (click)=\"onStarClick(s)\"\r\n viewBox=\"0 0 24 24\" \r\n aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty);cursor:pointer;transition:fill .2s ease}.star.filled{fill:var(--star-color-filled)}.star.hovered{fill:#79acff}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }); }
|
|
15
27
|
}
|
|
16
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CalificationComponent, decorators: [{
|
|
17
29
|
type: Component,
|
|
18
|
-
args: [{ selector: 'ius-calification', standalone: true, imports: [], template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" [class.filled]=\"s <= rating\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty)}.star.filled{fill:var(--star-color-filled)}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }]
|
|
30
|
+
args: [{ selector: 'ius-calification', standalone: true, imports: [], template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\" (mouseleave)=\"onMouseLeave()\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" \r\n [class.filled]=\"s <= rating\" \r\n [class.hovered]=\"s <= hoveredRating\"\r\n (mouseenter)=\"onStarHover(s)\"\r\n (click)=\"onStarClick(s)\"\r\n viewBox=\"0 0 24 24\" \r\n aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty);cursor:pointer;transition:fill .2s ease}.star.filled{fill:var(--star-color-filled)}.star.hovered{fill:#79acff}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }]
|
|
19
31
|
}], propDecorators: { rating: [{
|
|
20
32
|
type: Input
|
|
33
|
+
}], ratingChange: [{
|
|
34
|
+
type: Output
|
|
21
35
|
}] } });
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsaWZpY2F0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2l1cy1kZXNpZ24tY29tcG9uZW50cy9zcmMvbGliL2NhbGlmaWNhdGlvbi9jYWxpZmljYXRpb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvaXVzLWRlc2lnbi1jb21wb25lbnRzL3NyYy9saWIvY2FsaWZpY2F0aW9uL2NhbGlmaWNhdGlvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVN2RSxNQUFNLE9BQU8scUJBQXFCO0lBUGxDO1FBU1csV0FBTSxHQUFXLENBQUMsQ0FBQztRQUNsQixpQkFBWSxHQUFHLElBQUksWUFB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JlZFJhdGluZyA9IDA7XHJcbiAgfVxyXG5cclxuICBvblN0YXJDbGljayhzdGFyOiBudW1iZXIpOiB2b2lkIHtcclxuICAgIHRoaXMucmF0aW5nID0gc3RhcjtcclxuICAgIHRoaXMucmF0aW5nQ2hhbmdlLmVtaXQodGhpcy5yYXRpbmcpO1xyXG4gIH1cclxufVxyXG4iLCI8ZGl2IGNsYXNzPVwiZ2VuZXJhbC1jb250YWluZXJcIj5cclxuICAgIDxkaXYgY2xhc3M9XCJyYXRpbmdcIj5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzdGFyc1wiIHJvbGU9XCJpbWdcIiBbYXR0ci5hcmlhLWxhYmVsXT1cInJhdGluZyArICcgZGUgNSBlc3RyZWxsYXMnXCIgKG1vdXNlbGVhdmUpPVwib25Nb3VzZUxlYXZlKClcIj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgQGZvciAocyBvZiBzdGFyczsgdHJhY2sgcykge1xyXG4gICAgICAgICAgICAgICAgICAgIDxzdmcgY2xhc3M9XCJzdGFyXCIgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICBbY2xhc3MuZmlsbGVkXT1cInMgPD0gcmF0aW5nXCIgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICBbY2xhc3MuaG92ZXJlZF09XCJzIDw9IGhvdmVyZWRSYXRpbmdcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgKG1vdXNlZW50ZXIpPVwib25TdGFySG92ZXIocylcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgKGNsaWNrKT1cIm9uU3RhckNsaWNrKHMpXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBcclxuICAgICAgICAgICAgICAgICAgICAgICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8cGF0aFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZD1cIk0xMiAyLjVsMi45NiA2IDYuNjQuOTctNC44IDQuNjggMS4xMyA2LjZMMTIgMTcuNzcgNi4wNyAyMC43NWwxLjEzLTYuNi00LjgtNC42OCA2LjY0LS45N0wxMiAyLjV6XCIgLz5cclxuICAgICAgICAgICAgICAgICAgICA8L3N2Zz5cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -6633,21 +6633,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
6633
6633
|
class CalificationComponent {
|
|
6634
6634
|
constructor() {
|
|
6635
6635
|
this.rating = 0;
|
|
6636
|
+
this.ratingChange = new EventEmitter();
|
|
6636
6637
|
this.stars = [1, 2, 3, 4, 5];
|
|
6638
|
+
this.hoveredRating = 0;
|
|
6637
6639
|
}
|
|
6638
6640
|
ngOnChanges() {
|
|
6639
6641
|
if (this.rating == null || isNaN(this.rating))
|
|
6640
6642
|
this.rating = 0;
|
|
6641
6643
|
this.rating = Math.max(0, Math.min(5, Math.round(this.rating)));
|
|
6642
6644
|
}
|
|
6645
|
+
onStarHover(star) {
|
|
6646
|
+
this.hoveredRating = star;
|
|
6647
|
+
}
|
|
6648
|
+
onMouseLeave() {
|
|
6649
|
+
this.hoveredRating = 0;
|
|
6650
|
+
}
|
|
6651
|
+
onStarClick(star) {
|
|
6652
|
+
this.rating = star;
|
|
6653
|
+
this.ratingChange.emit(this.rating);
|
|
6654
|
+
}
|
|
6643
6655
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CalificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6644
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CalificationComponent, isStandalone: true, selector: "ius-calification", inputs: { rating: "rating" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" [class.filled]=\"s <= rating\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty)}.star.filled{fill:var(--star-color-filled)}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }); }
|
|
6656
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CalificationComponent, isStandalone: true, selector: "ius-calification", inputs: { rating: "rating" }, outputs: { ratingChange: "ratingChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\" (mouseleave)=\"onMouseLeave()\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" \r\n [class.filled]=\"s <= rating\" \r\n [class.hovered]=\"s <= hoveredRating\"\r\n (mouseenter)=\"onStarHover(s)\"\r\n (click)=\"onStarClick(s)\"\r\n viewBox=\"0 0 24 24\" \r\n aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty);cursor:pointer;transition:fill .2s ease}.star.filled{fill:var(--star-color-filled)}.star.hovered{fill:#79acff}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }); }
|
|
6645
6657
|
}
|
|
6646
6658
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CalificationComponent, decorators: [{
|
|
6647
6659
|
type: Component,
|
|
6648
|
-
args: [{ selector: 'ius-calification', standalone: true, imports: [], template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" [class.filled]=\"s <= rating\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty)}.star.filled{fill:var(--star-color-filled)}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }]
|
|
6660
|
+
args: [{ selector: 'ius-calification', standalone: true, imports: [], template: "<div class=\"general-container\">\r\n <div class=\"rating\">\r\n <div class=\"stars\" role=\"img\" [attr.aria-label]=\"rating + ' de 5 estrellas'\" (mouseleave)=\"onMouseLeave()\">\r\n\r\n @for (s of stars; track s) {\r\n <svg class=\"star\" \r\n [class.filled]=\"s <= rating\" \r\n [class.hovered]=\"s <= hoveredRating\"\r\n (mouseenter)=\"onStarHover(s)\"\r\n (click)=\"onStarClick(s)\"\r\n viewBox=\"0 0 24 24\" \r\n aria-hidden=\"true\">\r\n <path\r\n d=\"M12 2.5l2.96 6 6.64.97-4.8 4.68 1.13 6.6L12 17.77 6.07 20.75l1.13-6.6-4.8-4.68 6.64-.97L12 2.5z\" />\r\n </svg>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}:host{--star-size: 25px;--star-gap: 4px;--star-color-filled: #2167FF;--star-color-empty: $neutral-5;--comment-color: #000000;display:block}.rating{font-family:Rubik,sans-serif}.stars{display:flex;align-items:center;gap:var(--star-gap);margin-bottom:6px}.star{width:var(--star-size);height:var(--star-size);fill:var(--star-color-empty);cursor:pointer;transition:fill .2s ease}.star.filled{fill:var(--star-color-filled)}.star.hovered{fill:#79acff}.comment{margin:0;color:var(--comment-color);font-weight:400}\n"] }]
|
|
6649
6661
|
}], propDecorators: { rating: [{
|
|
6650
6662
|
type: Input
|
|
6663
|
+
}], ratingChange: [{
|
|
6664
|
+
type: Output
|
|
6651
6665
|
}] } });
|
|
6652
6666
|
|
|
6653
6667
|
class AlertComponent {
|