@juligc99/loro-ui 0.0.14 → 0.0.16
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/fesm2022/juligc99-loro-ui.mjs +174 -1925
- package/fesm2022/juligc99-loro-ui.mjs.map +1 -1
- package/package.json +12 -10
- package/types/juligc99-loro-ui.d.ts +132 -3
|
@@ -8,35 +8,11 @@ import { RouterLink, Router } from '@angular/router';
|
|
|
8
8
|
|
|
9
9
|
class Footer {
|
|
10
10
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: Footer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: Footer, isStandalone: true, selector: "loro-footer", ngImport: i0, template:
|
|
12
|
-
<footer class="loro-footer">
|
|
13
|
-
<div class="loro-footer__meta">
|
|
14
|
-
<span class="loro-footer__dot"></span>
|
|
15
|
-
<p>© 2026 Al Loro App. Todos los derechos reservados.</p>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="loro-footer__links">
|
|
18
|
-
<a href="#">Términos</a>
|
|
19
|
-
<a href="#">Privacidad</a>
|
|
20
|
-
<a href="#">Soporte</a>
|
|
21
|
-
</div>
|
|
22
|
-
</footer>
|
|
23
|
-
`, isInline: true, styles: [".loro-footer{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.75rem;padding-block:1.25rem;border-top:1px solid var(--loro-border-subtle);color:var(--loro-muted);font-size:.75rem}.loro-footer__meta,.loro-footer__links{display:flex;align-items:center;gap:.75rem}.loro-footer__meta{justify-content:center;text-align:center}.loro-footer__dot{width:.375rem;height:.375rem;flex:0 0 auto;border-radius:999px;background:var(--loro-primary-500)}.loro-footer__links{flex-wrap:wrap;justify-content:center;font-weight:600}.loro-footer__links a{color:inherit;text-decoration:none;transition:color .18s ease}.loro-footer__links a:hover{color:var(--loro-primary-500)}.loro-footer p{margin:0}@media(min-width:640px){.loro-footer{flex-direction:row}.loro-footer__meta{text-align:left}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: Footer, isStandalone: true, selector: "loro-footer", ngImport: i0, template: "<footer class=\"loro-footer\">\n <div class=\"loro-footer__meta\">\n <span class=\"loro-footer__dot\"></span>\n <p>\u00A9 2026 Al Loro App. Todos los derechos reservados.</p>\n </div>\n <div class=\"loro-footer__links\">\n <a href=\"#\">T\u00E9rminos</a>\n <a href=\"#\">Privacidad</a>\n <a href=\"#\">Soporte</a>\n </div>\n </footer>", styles: [".loro-footer{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.75rem;padding-block:1.25rem;border-top:1px solid var(--loro-border-subtle);color:var(--loro-muted);font-size:.75rem}.loro-footer__meta,.loro-footer__links{display:flex;align-items:center;gap:.75rem}.loro-footer__meta{justify-content:center;text-align:center}.loro-footer__dot{width:.375rem;height:.375rem;flex:0 0 auto;border-radius:999px;background:var(--loro-primary-500)}.loro-footer__links{flex-wrap:wrap;justify-content:center;font-weight:600}.loro-footer__links a{color:inherit;text-decoration:none;transition:color .18s ease}.loro-footer__links a:hover{color:var(--loro-primary-500)}.loro-footer p{margin:0}@media(min-width:640px){.loro-footer{flex-direction:row}.loro-footer__meta{text-align:left}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24
12
|
}
|
|
25
13
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: Footer, decorators: [{
|
|
26
14
|
type: Component,
|
|
27
|
-
args: [{ selector: 'loro-footer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
28
|
-
<footer class="loro-footer">
|
|
29
|
-
<div class="loro-footer__meta">
|
|
30
|
-
<span class="loro-footer__dot"></span>
|
|
31
|
-
<p>© 2026 Al Loro App. Todos los derechos reservados.</p>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="loro-footer__links">
|
|
34
|
-
<a href="#">Términos</a>
|
|
35
|
-
<a href="#">Privacidad</a>
|
|
36
|
-
<a href="#">Soporte</a>
|
|
37
|
-
</div>
|
|
38
|
-
</footer>
|
|
39
|
-
`, styles: [".loro-footer{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.75rem;padding-block:1.25rem;border-top:1px solid var(--loro-border-subtle);color:var(--loro-muted);font-size:.75rem}.loro-footer__meta,.loro-footer__links{display:flex;align-items:center;gap:.75rem}.loro-footer__meta{justify-content:center;text-align:center}.loro-footer__dot{width:.375rem;height:.375rem;flex:0 0 auto;border-radius:999px;background:var(--loro-primary-500)}.loro-footer__links{flex-wrap:wrap;justify-content:center;font-weight:600}.loro-footer__links a{color:inherit;text-decoration:none;transition:color .18s ease}.loro-footer__links a:hover{color:var(--loro-primary-500)}.loro-footer p{margin:0}@media(min-width:640px){.loro-footer{flex-direction:row}.loro-footer__meta{text-align:left}}\n"] }]
|
|
15
|
+
args: [{ selector: 'loro-footer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<footer class=\"loro-footer\">\n <div class=\"loro-footer__meta\">\n <span class=\"loro-footer__dot\"></span>\n <p>\u00A9 2026 Al Loro App. Todos los derechos reservados.</p>\n </div>\n <div class=\"loro-footer__links\">\n <a href=\"#\">T\u00E9rminos</a>\n <a href=\"#\">Privacidad</a>\n <a href=\"#\">Soporte</a>\n </div>\n </footer>", styles: [".loro-footer{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.75rem;padding-block:1.25rem;border-top:1px solid var(--loro-border-subtle);color:var(--loro-muted);font-size:.75rem}.loro-footer__meta,.loro-footer__links{display:flex;align-items:center;gap:.75rem}.loro-footer__meta{justify-content:center;text-align:center}.loro-footer__dot{width:.375rem;height:.375rem;flex:0 0 auto;border-radius:999px;background:var(--loro-primary-500)}.loro-footer__links{flex-wrap:wrap;justify-content:center;font-weight:600}.loro-footer__links a{color:inherit;text-decoration:none;transition:color .18s ease}.loro-footer__links a:hover{color:var(--loro-primary-500)}.loro-footer p{margin:0}@media(min-width:640px){.loro-footer{flex-direction:row}.loro-footer__meta{text-align:left}}\n"] }]
|
|
40
16
|
}] });
|
|
41
17
|
|
|
42
18
|
/* This file is generated by projects/loro-ui/scripts/generate-asset-manifest.mjs. */
|
|
@@ -1045,49 +1021,11 @@ class LoroIcon {
|
|
|
1045
1021
|
: color;
|
|
1046
1022
|
}, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
|
|
1047
1023
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1048
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroIcon, isStandalone: true, selector: "loro-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, renderMode: { classPropertyName: "renderMode", publicName: "renderMode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
1049
|
-
<span
|
|
1050
|
-
class="loro-icon"
|
|
1051
|
-
role="img"
|
|
1052
|
-
[attr.aria-label]="decorative() ? null : altText()"
|
|
1053
|
-
[attr.aria-hidden]="decorative() ? 'true' : null"
|
|
1054
|
-
[style.width]="resolvedSize()"
|
|
1055
|
-
[style.height]="resolvedSize()"
|
|
1056
|
-
>
|
|
1057
|
-
@if (renderMode() === 'origin') {
|
|
1058
|
-
<img class="loro-icon__origin" [src]="src()" alt="" aria-hidden="true" />
|
|
1059
|
-
} @else {
|
|
1060
|
-
<span
|
|
1061
|
-
class="loro-icon__mask"
|
|
1062
|
-
[style.--loro-icon-mask]="'url(' + src() + ')'"
|
|
1063
|
-
[style.--loro-icon-color]="resolvedColor()"
|
|
1064
|
-
></span>
|
|
1065
|
-
}
|
|
1066
|
-
</span>
|
|
1067
|
-
`, isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0;flex:0 0 auto}.loro-icon{display:inline-flex;width:100%;height:100%}.loro-icon__origin,.loro-icon__mask{display:block;width:100%;height:100%}.loro-icon__origin{object-fit:contain}.loro-icon__mask{background-color:var(--loro-icon-color);mask-image:var(--loro-icon-mask);mask-repeat:no-repeat;mask-position:center;mask-size:contain;-webkit-mask-image:var(--loro-icon-mask);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;-webkit-mask-size:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1024
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroIcon, isStandalone: true, selector: "loro-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, renderMode: { classPropertyName: "renderMode", publicName: "renderMode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n class=\"loro-icon\"\n role=\"img\"\n [attr.aria-label]=\"decorative() ? null : altText()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [style.width]=\"resolvedSize()\"\n [style.height]=\"resolvedSize()\"\n >\n @if (renderMode() === 'origin') {\n <img class=\"loro-icon__origin\" [src]=\"src()\" alt=\"\" aria-hidden=\"true\" />\n } @else {\n <span\n class=\"loro-icon__mask\"\n [style.--loro-icon-mask]=\"'url(' + src() + ')'\"\n [style.--loro-icon-color]=\"resolvedColor()\"\n ></span>\n }\n </span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0;flex:0 0 auto}.loro-icon{display:inline-flex;width:100%;height:100%}.loro-icon__origin,.loro-icon__mask{display:block;width:100%;height:100%}.loro-icon__origin{object-fit:contain}.loro-icon__mask{background-color:var(--loro-icon-color);mask-image:var(--loro-icon-mask);mask-repeat:no-repeat;mask-position:center;mask-size:contain;-webkit-mask-image:var(--loro-icon-mask);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;-webkit-mask-size:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1068
1025
|
}
|
|
1069
1026
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroIcon, decorators: [{
|
|
1070
1027
|
type: Component,
|
|
1071
|
-
args: [{ selector: 'loro-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1072
|
-
<span
|
|
1073
|
-
class="loro-icon"
|
|
1074
|
-
role="img"
|
|
1075
|
-
[attr.aria-label]="decorative() ? null : altText()"
|
|
1076
|
-
[attr.aria-hidden]="decorative() ? 'true' : null"
|
|
1077
|
-
[style.width]="resolvedSize()"
|
|
1078
|
-
[style.height]="resolvedSize()"
|
|
1079
|
-
>
|
|
1080
|
-
@if (renderMode() === 'origin') {
|
|
1081
|
-
<img class="loro-icon__origin" [src]="src()" alt="" aria-hidden="true" />
|
|
1082
|
-
} @else {
|
|
1083
|
-
<span
|
|
1084
|
-
class="loro-icon__mask"
|
|
1085
|
-
[style.--loro-icon-mask]="'url(' + src() + ')'"
|
|
1086
|
-
[style.--loro-icon-color]="resolvedColor()"
|
|
1087
|
-
></span>
|
|
1088
|
-
}
|
|
1089
|
-
</span>
|
|
1090
|
-
`, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0;flex:0 0 auto}.loro-icon{display:inline-flex;width:100%;height:100%}.loro-icon__origin,.loro-icon__mask{display:block;width:100%;height:100%}.loro-icon__origin{object-fit:contain}.loro-icon__mask{background-color:var(--loro-icon-color);mask-image:var(--loro-icon-mask);mask-repeat:no-repeat;mask-position:center;mask-size:contain;-webkit-mask-image:var(--loro-icon-mask);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;-webkit-mask-size:contain}\n"] }]
|
|
1028
|
+
args: [{ selector: 'loro-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"loro-icon\"\n role=\"img\"\n [attr.aria-label]=\"decorative() ? null : altText()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [style.width]=\"resolvedSize()\"\n [style.height]=\"resolvedSize()\"\n >\n @if (renderMode() === 'origin') {\n <img class=\"loro-icon__origin\" [src]=\"src()\" alt=\"\" aria-hidden=\"true\" />\n } @else {\n <span\n class=\"loro-icon__mask\"\n [style.--loro-icon-mask]=\"'url(' + src() + ')'\"\n [style.--loro-icon-color]=\"resolvedColor()\"\n ></span>\n }\n </span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0;flex:0 0 auto}.loro-icon{display:inline-flex;width:100%;height:100%}.loro-icon__origin,.loro-icon__mask{display:block;width:100%;height:100%}.loro-icon__origin{object-fit:contain}.loro-icon__mask{background-color:var(--loro-icon-color);mask-image:var(--loro-icon-mask);mask-repeat:no-repeat;mask-position:center;mask-size:contain;-webkit-mask-image:var(--loro-icon-mask);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;-webkit-mask-size:contain}\n"] }]
|
|
1091
1029
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], renderMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderMode", required: false }] }] } });
|
|
1092
1030
|
|
|
1093
1031
|
class LoroAccordion {
|
|
@@ -1096,45 +1034,11 @@ class LoroAccordion {
|
|
|
1096
1034
|
expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
1097
1035
|
expandedChange = output();
|
|
1098
1036
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAccordion, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1099
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAccordion, isStandalone: true, selector: "loro-accordion", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template:
|
|
1100
|
-
<article class="loro-accordion" [class.loro-accordion--open]="expanded()">
|
|
1101
|
-
<button type="button" class="loro-accordion__header" (click)="expandedChange.emit(!expanded())">
|
|
1102
|
-
@if (icon()) {
|
|
1103
|
-
<span class="loro-accordion__icon">
|
|
1104
|
-
<loro-icon [name]="icon()!" [size]="24" [alt]="title()" color="primary" />
|
|
1105
|
-
</span>
|
|
1106
|
-
}
|
|
1107
|
-
<span class="loro-accordion__title">{{ title() }}</span>
|
|
1108
|
-
<loro-icon [name]="expanded() ? 'chevron-up' : 'chevron-down'" [size]="22" alt="Expandir" color="primary" />
|
|
1109
|
-
</button>
|
|
1110
|
-
@if (expanded()) {
|
|
1111
|
-
<div class="loro-accordion__body">
|
|
1112
|
-
<ng-content />
|
|
1113
|
-
</div>
|
|
1114
|
-
}
|
|
1115
|
-
</article>
|
|
1116
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-accordion{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-soft)}.loro-accordion--open{border-color:#6c3cff57}.loro-accordion__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.9rem;width:100%;min-height:4.3rem;padding:0 1.1rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-accordion__icon{display:grid;width:2.6rem;height:2.6rem;place-items:center;border-radius:50%;background:var(--loro-brand-tint-surface)}.loro-accordion__title{font-size:1rem;font-weight:900;line-height:1.25}.loro-accordion__body{padding:0 1.35rem 1.35rem;color:var(--loro-muted-strong);font-size:.94rem;font-weight:600;line-height:1.65}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1037
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAccordion, isStandalone: true, selector: "loro-accordion", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<article class=\"loro-accordion\" [class.loro-accordion--open]=\"expanded()\">\n <button type=\"button\" class=\"loro-accordion__header\" (click)=\"expandedChange.emit(!expanded())\">\n @if (icon()) {\n <span class=\"loro-accordion__icon\">\n <loro-icon [name]=\"icon()!\" [size]=\"24\" [alt]=\"title()\" color=\"primary\" />\n </span>\n }\n <span class=\"loro-accordion__title\">{{ title() }}</span>\n <loro-icon [name]=\"expanded() ? 'chevron-up' : 'chevron-down'\" [size]=\"22\" alt=\"Expandir\" color=\"primary\" />\n </button>\n @if (expanded()) {\n <div class=\"loro-accordion__body\">\n <ng-content />\n </div>\n }\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-accordion{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-soft)}.loro-accordion--open{border-color:#6c3cff57}.loro-accordion__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.9rem;width:100%;min-height:4.3rem;padding:0 1.1rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-accordion__icon{display:grid;width:2.6rem;height:2.6rem;place-items:center;border-radius:50%;background:var(--loro-brand-tint-surface)}.loro-accordion__title{font-size:1rem;font-weight:900;line-height:1.25}.loro-accordion__body{padding:0 1.35rem 1.35rem;color:var(--loro-muted-strong);font-size:.94rem;font-weight:600;line-height:1.65}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1117
1038
|
}
|
|
1118
1039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAccordion, decorators: [{
|
|
1119
1040
|
type: Component,
|
|
1120
|
-
args: [{ selector: 'loro-accordion', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1121
|
-
<article class="loro-accordion" [class.loro-accordion--open]="expanded()">
|
|
1122
|
-
<button type="button" class="loro-accordion__header" (click)="expandedChange.emit(!expanded())">
|
|
1123
|
-
@if (icon()) {
|
|
1124
|
-
<span class="loro-accordion__icon">
|
|
1125
|
-
<loro-icon [name]="icon()!" [size]="24" [alt]="title()" color="primary" />
|
|
1126
|
-
</span>
|
|
1127
|
-
}
|
|
1128
|
-
<span class="loro-accordion__title">{{ title() }}</span>
|
|
1129
|
-
<loro-icon [name]="expanded() ? 'chevron-up' : 'chevron-down'" [size]="22" alt="Expandir" color="primary" />
|
|
1130
|
-
</button>
|
|
1131
|
-
@if (expanded()) {
|
|
1132
|
-
<div class="loro-accordion__body">
|
|
1133
|
-
<ng-content />
|
|
1134
|
-
</div>
|
|
1135
|
-
}
|
|
1136
|
-
</article>
|
|
1137
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-accordion{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-soft)}.loro-accordion--open{border-color:#6c3cff57}.loro-accordion__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.9rem;width:100%;min-height:4.3rem;padding:0 1.1rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-accordion__icon{display:grid;width:2.6rem;height:2.6rem;place-items:center;border-radius:50%;background:var(--loro-brand-tint-surface)}.loro-accordion__title{font-size:1rem;font-weight:900;line-height:1.25}.loro-accordion__body{padding:0 1.35rem 1.35rem;color:var(--loro-muted-strong);font-size:.94rem;font-weight:600;line-height:1.65}\n"] }]
|
|
1041
|
+
args: [{ selector: 'loro-accordion', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<article class=\"loro-accordion\" [class.loro-accordion--open]=\"expanded()\">\n <button type=\"button\" class=\"loro-accordion__header\" (click)=\"expandedChange.emit(!expanded())\">\n @if (icon()) {\n <span class=\"loro-accordion__icon\">\n <loro-icon [name]=\"icon()!\" [size]=\"24\" [alt]=\"title()\" color=\"primary\" />\n </span>\n }\n <span class=\"loro-accordion__title\">{{ title() }}</span>\n <loro-icon [name]=\"expanded() ? 'chevron-up' : 'chevron-down'\" [size]=\"22\" alt=\"Expandir\" color=\"primary\" />\n </button>\n @if (expanded()) {\n <div class=\"loro-accordion__body\">\n <ng-content />\n </div>\n }\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-accordion{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-soft)}.loro-accordion--open{border-color:#6c3cff57}.loro-accordion__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.9rem;width:100%;min-height:4.3rem;padding:0 1.1rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-accordion__icon{display:grid;width:2.6rem;height:2.6rem;place-items:center;border-radius:50%;background:var(--loro-brand-tint-surface)}.loro-accordion__title{font-size:1rem;font-weight:900;line-height:1.25}.loro-accordion__body{padding:0 1.35rem 1.35rem;color:var(--loro-muted-strong);font-size:.94rem;font-weight:600;line-height:1.65}\n"] }]
|
|
1138
1042
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
|
|
1139
1043
|
|
|
1140
1044
|
class LoroImage {
|
|
@@ -1155,31 +1059,11 @@ class LoroImage {
|
|
|
1155
1059
|
resolvedWidth = computed(() => this.size() || this.width(), ...(ngDevMode ? [{ debugName: "resolvedWidth" }] : /* istanbul ignore next */ []));
|
|
1156
1060
|
resolvedHeight = computed(() => this.size() || this.height(), ...(ngDevMode ? [{ debugName: "resolvedHeight" }] : /* istanbul ignore next */ []));
|
|
1157
1061
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroImage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1158
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: LoroImage, isStandalone: true, selector: "loro-image", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, fit: { classPropertyName: "fit", publicName: "fit", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
1159
|
-
<img
|
|
1160
|
-
class="loro-image"
|
|
1161
|
-
[src]="src()"
|
|
1162
|
-
[alt]="altText()"
|
|
1163
|
-
[style.width]="resolvedWidth()"
|
|
1164
|
-
[style.height]="resolvedHeight()"
|
|
1165
|
-
[style.object-fit]="fit()"
|
|
1166
|
-
[style.display]="'block'"
|
|
1167
|
-
/>
|
|
1168
|
-
`, isInline: true, styles: [":host{display:block}.loro-image{max-width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1062
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: LoroImage, isStandalone: true, selector: "loro-image", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, fit: { classPropertyName: "fit", publicName: "fit", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<img\n class=\"loro-image\"\n [src]=\"src()\"\n [alt]=\"altText()\"\n [style.width]=\"resolvedWidth()\"\n [style.height]=\"resolvedHeight()\"\n [style.object-fit]=\"fit()\"\n [style.display]=\"'block'\"\n />", styles: [":host{display:block}.loro-image{max-width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1169
1063
|
}
|
|
1170
1064
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroImage, decorators: [{
|
|
1171
1065
|
type: Component,
|
|
1172
|
-
args: [{ selector: 'loro-image', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1173
|
-
<img
|
|
1174
|
-
class="loro-image"
|
|
1175
|
-
[src]="src()"
|
|
1176
|
-
[alt]="altText()"
|
|
1177
|
-
[style.width]="resolvedWidth()"
|
|
1178
|
-
[style.height]="resolvedHeight()"
|
|
1179
|
-
[style.object-fit]="fit()"
|
|
1180
|
-
[style.display]="'block'"
|
|
1181
|
-
/>
|
|
1182
|
-
`, styles: [":host{display:block}.loro-image{max-width:100%}\n"] }]
|
|
1066
|
+
args: [{ selector: 'loro-image', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<img\n class=\"loro-image\"\n [src]=\"src()\"\n [alt]=\"altText()\"\n [style.width]=\"resolvedWidth()\"\n [style.height]=\"resolvedHeight()\"\n [style.object-fit]=\"fit()\"\n [style.display]=\"'block'\"\n />", styles: [":host{display:block}.loro-image{max-width:100%}\n"] }]
|
|
1183
1067
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], fit: [{ type: i0.Input, args: [{ isSignal: true, alias: "fit", required: false }] }] } });
|
|
1184
1068
|
|
|
1185
1069
|
class LoroHapticsService {
|
|
@@ -1242,6 +1126,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1242
1126
|
args: [{ providedIn: 'root' }]
|
|
1243
1127
|
}] });
|
|
1244
1128
|
|
|
1129
|
+
/**
|
|
1130
|
+
* LoroButton Constants
|
|
1131
|
+
*
|
|
1132
|
+
* Default values, valid options, and configuration constants for the LoroButton component.
|
|
1133
|
+
* Update these to maintain consistency across all button usage.
|
|
1134
|
+
*/
|
|
1135
|
+
/**
|
|
1136
|
+
* Default input values for LoroButton
|
|
1137
|
+
*/
|
|
1138
|
+
const LORO_BUTTON_DEFAULTS = {
|
|
1139
|
+
text: '',
|
|
1140
|
+
label: '',
|
|
1141
|
+
variant: 'primary',
|
|
1142
|
+
type: 'primary',
|
|
1143
|
+
color: 'primary',
|
|
1144
|
+
size: 'md',
|
|
1145
|
+
fullWidth: false,
|
|
1146
|
+
buttonWidth: 'fit-content',
|
|
1147
|
+
disabled: false,
|
|
1148
|
+
loading: false,
|
|
1149
|
+
selected: false,
|
|
1150
|
+
htmlType: 'button',
|
|
1151
|
+
iconMode: 'none',
|
|
1152
|
+
socialMobileCompact: true,
|
|
1153
|
+
iconSize: 23,
|
|
1154
|
+
iconButtonSize: null,
|
|
1155
|
+
iconColor: '',
|
|
1156
|
+
};
|
|
1157
|
+
/**
|
|
1158
|
+
* Valid options for button variants
|
|
1159
|
+
*/
|
|
1160
|
+
const LORO_BUTTON_VARIANTS = [
|
|
1161
|
+
'primary',
|
|
1162
|
+
'outline',
|
|
1163
|
+
'ghost',
|
|
1164
|
+
'danger',
|
|
1165
|
+
'soft',
|
|
1166
|
+
'social',
|
|
1167
|
+
'action',
|
|
1168
|
+
'navigation',
|
|
1169
|
+
];
|
|
1170
|
+
/**
|
|
1171
|
+
* Valid options for button types
|
|
1172
|
+
*/
|
|
1173
|
+
const LORO_BUTTON_TYPES = ['primary', 'secondary', 'tertiary'];
|
|
1174
|
+
/**
|
|
1175
|
+
* Valid options for button colors
|
|
1176
|
+
*/
|
|
1177
|
+
const LORO_BUTTON_COLORS = ['primary', 'secondary', 'tertiary', 'danger'];
|
|
1178
|
+
/**
|
|
1179
|
+
* Valid options for button sizes
|
|
1180
|
+
*/
|
|
1181
|
+
const LORO_BUTTON_SIZES = ['sm', 'md', 'lg'];
|
|
1182
|
+
/**
|
|
1183
|
+
* Valid options for button widths
|
|
1184
|
+
*/
|
|
1185
|
+
const LORO_BUTTON_WIDTHS = ['fit-content', 'full'];
|
|
1186
|
+
/**
|
|
1187
|
+
* Valid options for icon modes
|
|
1188
|
+
*/
|
|
1189
|
+
const LORO_BUTTON_ICON_MODES = ['none', 'with-icon', 'only-icon'];
|
|
1190
|
+
/**
|
|
1191
|
+
* Valid options for HTML button types
|
|
1192
|
+
*/
|
|
1193
|
+
const LORO_BUTTON_HTML_TYPES = ['button', 'submit', 'reset'];
|
|
1194
|
+
/**
|
|
1195
|
+
* CSS class names used by LoroButton (BEM notation)
|
|
1196
|
+
*/
|
|
1197
|
+
const LORO_BUTTON_CLASSES = {
|
|
1198
|
+
container: 'loro-button',
|
|
1199
|
+
variant: (variant) => `loro-button--${variant}`,
|
|
1200
|
+
size: (size) => `loro-button--${size}`,
|
|
1201
|
+
color: (color) => `loro-button--${color}-color`,
|
|
1202
|
+
width: (width) => width === 'full' ? 'loro-button--full' : undefined,
|
|
1203
|
+
state: {
|
|
1204
|
+
disabled: 'loro-button--disabled',
|
|
1205
|
+
loading: 'loro-button--loading',
|
|
1206
|
+
selected: 'loro-button--selected',
|
|
1207
|
+
},
|
|
1208
|
+
elements: {
|
|
1209
|
+
label: 'loro-button__label',
|
|
1210
|
+
spinner: 'loro-button__spinner',
|
|
1211
|
+
srStatus: 'loro-button__sr-status',
|
|
1212
|
+
},
|
|
1213
|
+
};
|
|
1214
|
+
/**
|
|
1215
|
+
* Accessible labels for button states
|
|
1216
|
+
*/
|
|
1217
|
+
const LORO_BUTTON_ARIA_LABELS = {
|
|
1218
|
+
loading: 'Loading',
|
|
1219
|
+
disabled: 'Button is disabled',
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* LoroButton Component
|
|
1224
|
+
*
|
|
1225
|
+
* A versatile, accessible button component with multiple variants, sizes, and states.
|
|
1226
|
+
* Follows Angular 21 best practices with signals, OnPush change detection, and semantic HTML.
|
|
1227
|
+
*
|
|
1228
|
+
* @example
|
|
1229
|
+
* ```html
|
|
1230
|
+
* <loro-button
|
|
1231
|
+
* [text]="'Click me'"
|
|
1232
|
+
* variant="primary"
|
|
1233
|
+
* size="md"
|
|
1234
|
+
* (change)="onButtonClick()"
|
|
1235
|
+
* />
|
|
1236
|
+
* ```
|
|
1237
|
+
*/
|
|
1245
1238
|
class LoroButton {
|
|
1246
1239
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1247
1240
|
text = input('', ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
@@ -1535,55 +1528,11 @@ class LoroAssistantCard {
|
|
|
1535
1528
|
actionVariant = input('primary', ...(ngDevMode ? [{ debugName: "actionVariant" }] : /* istanbul ignore next */ []));
|
|
1536
1529
|
action = output();
|
|
1537
1530
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAssistantCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1538
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAssistantCard, isStandalone: true, selector: "loro-assistant-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: true, transformFunction: null }, imageName: { classPropertyName: "imageName", publicName: "imageName", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, actionIcon: { classPropertyName: "actionIcon", publicName: "actionIcon", isSignal: true, isRequired: false, transformFunction: null }, actionVariant: { classPropertyName: "actionVariant", publicName: "actionVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template:
|
|
1539
|
-
<section class="loro-assistant-card">
|
|
1540
|
-
<div class="loro-assistant-card__media">
|
|
1541
|
-
@if (imageName()) {
|
|
1542
|
-
<loro-image [name]="imageName()!" [alt]="title()" width="100%" />
|
|
1543
|
-
} @else {
|
|
1544
|
-
<loro-icon [name]="icon()" [size]="56" [alt]="title()" color="primary" />
|
|
1545
|
-
}
|
|
1546
|
-
</div>
|
|
1547
|
-
<div class="loro-assistant-card__copy">
|
|
1548
|
-
<h2>{{ title() }}</h2>
|
|
1549
|
-
<p>{{ description() }}</p>
|
|
1550
|
-
</div>
|
|
1551
|
-
@if (actionLabel()) {
|
|
1552
|
-
<loro-button
|
|
1553
|
-
[label]="actionLabel()"
|
|
1554
|
-
[icon]="actionIcon()"
|
|
1555
|
-
[variant]="actionVariant()"
|
|
1556
|
-
[fullWidth]="true"
|
|
1557
|
-
(buttonClick)="action.emit()" />
|
|
1558
|
-
}
|
|
1559
|
-
</section>
|
|
1560
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-assistant-card{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(12rem,auto);align-items:center;gap:1.5rem;padding:1.35rem 1.5rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-assistant-card__media{display:grid;width:6rem;height:5rem;place-items:center;overflow:hidden}.loro-assistant-card__copy{min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:1.2rem;font-weight:900;line-height:1.2}p{margin-top:.35rem;color:var(--loro-muted);font-weight:650;line-height:1.45}@media(max-width:680px){.loro-assistant-card{grid-template-columns:auto minmax(0,1fr)}loro-button{grid-column:1 / -1}}\n"], dependencies: [{ kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAssistantCard, isStandalone: true, selector: "loro-assistant-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: true, transformFunction: null }, imageName: { classPropertyName: "imageName", publicName: "imageName", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, actionIcon: { classPropertyName: "actionIcon", publicName: "actionIcon", isSignal: true, isRequired: false, transformFunction: null }, actionVariant: { classPropertyName: "actionVariant", publicName: "actionVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template: "<section class=\"loro-assistant-card\">\n <div class=\"loro-assistant-card__media\">\n @if (imageName()) {\n <loro-image [name]=\"imageName()!\" [alt]=\"title()\" width=\"100%\" />\n } @else {\n <loro-icon [name]=\"icon()\" [size]=\"56\" [alt]=\"title()\" color=\"primary\" />\n }\n </div>\n <div class=\"loro-assistant-card__copy\">\n <h2>{{ title() }}</h2>\n <p>{{ description() }}</p>\n </div>\n @if (actionLabel()) {\n <loro-button\n [label]=\"actionLabel()\"\n [icon]=\"actionIcon()\"\n [variant]=\"actionVariant()\"\n [fullWidth]=\"true\"\n (buttonClick)=\"action.emit()\" />\n }\n </section>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-assistant-card{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(12rem,auto);align-items:center;gap:1.5rem;padding:1.35rem 1.5rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-assistant-card__media{display:grid;width:6rem;height:5rem;place-items:center;overflow:hidden}.loro-assistant-card__copy{min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:1.2rem;font-weight:900;line-height:1.2}p{margin-top:.35rem;color:var(--loro-muted);font-weight:650;line-height:1.45}@media(max-width:680px){.loro-assistant-card{grid-template-columns:auto minmax(0,1fr)}loro-button{grid-column:1/-1}}\n"], dependencies: [{ kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1561
1532
|
}
|
|
1562
1533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAssistantCard, decorators: [{
|
|
1563
1534
|
type: Component,
|
|
1564
|
-
args: [{ selector: 'loro-assistant-card', standalone: true, imports: [LoroButton, LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1565
|
-
<section class="loro-assistant-card">
|
|
1566
|
-
<div class="loro-assistant-card__media">
|
|
1567
|
-
@if (imageName()) {
|
|
1568
|
-
<loro-image [name]="imageName()!" [alt]="title()" width="100%" />
|
|
1569
|
-
} @else {
|
|
1570
|
-
<loro-icon [name]="icon()" [size]="56" [alt]="title()" color="primary" />
|
|
1571
|
-
}
|
|
1572
|
-
</div>
|
|
1573
|
-
<div class="loro-assistant-card__copy">
|
|
1574
|
-
<h2>{{ title() }}</h2>
|
|
1575
|
-
<p>{{ description() }}</p>
|
|
1576
|
-
</div>
|
|
1577
|
-
@if (actionLabel()) {
|
|
1578
|
-
<loro-button
|
|
1579
|
-
[label]="actionLabel()"
|
|
1580
|
-
[icon]="actionIcon()"
|
|
1581
|
-
[variant]="actionVariant()"
|
|
1582
|
-
[fullWidth]="true"
|
|
1583
|
-
(buttonClick)="action.emit()" />
|
|
1584
|
-
}
|
|
1585
|
-
</section>
|
|
1586
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-assistant-card{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(12rem,auto);align-items:center;gap:1.5rem;padding:1.35rem 1.5rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-assistant-card__media{display:grid;width:6rem;height:5rem;place-items:center;overflow:hidden}.loro-assistant-card__copy{min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:1.2rem;font-weight:900;line-height:1.2}p{margin-top:.35rem;color:var(--loro-muted);font-weight:650;line-height:1.45}@media(max-width:680px){.loro-assistant-card{grid-template-columns:auto minmax(0,1fr)}loro-button{grid-column:1 / -1}}\n"] }]
|
|
1535
|
+
args: [{ selector: 'loro-assistant-card', standalone: true, imports: [LoroButton, LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"loro-assistant-card\">\n <div class=\"loro-assistant-card__media\">\n @if (imageName()) {\n <loro-image [name]=\"imageName()!\" [alt]=\"title()\" width=\"100%\" />\n } @else {\n <loro-icon [name]=\"icon()\" [size]=\"56\" [alt]=\"title()\" color=\"primary\" />\n }\n </div>\n <div class=\"loro-assistant-card__copy\">\n <h2>{{ title() }}</h2>\n <p>{{ description() }}</p>\n </div>\n @if (actionLabel()) {\n <loro-button\n [label]=\"actionLabel()\"\n [icon]=\"actionIcon()\"\n [variant]=\"actionVariant()\"\n [fullWidth]=\"true\"\n (buttonClick)=\"action.emit()\" />\n }\n </section>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-assistant-card{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(12rem,auto);align-items:center;gap:1.5rem;padding:1.35rem 1.5rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-assistant-card__media{display:grid;width:6rem;height:5rem;place-items:center;overflow:hidden}.loro-assistant-card__copy{min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:1.2rem;font-weight:900;line-height:1.2}p{margin-top:.35rem;color:var(--loro-muted);font-weight:650;line-height:1.45}@media(max-width:680px){.loro-assistant-card{grid-template-columns:auto minmax(0,1fr)}loro-button{grid-column:1/-1}}\n"] }]
|
|
1587
1536
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: true }] }], imageName: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageName", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], actionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionIcon", required: false }] }], actionVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionVariant", required: false }] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
1588
1537
|
|
|
1589
1538
|
function isNativeSocialIcon(icon) {
|
|
@@ -1609,66 +1558,22 @@ class LoroAuthSocialButton {
|
|
|
1609
1558
|
}
|
|
1610
1559
|
}
|
|
1611
1560
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAuthSocialButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1612
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAuthSocialButton, isStandalone: true, selector: "loro-auth-social-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
1613
|
-
<button
|
|
1614
|
-
type="button"
|
|
1615
|
-
class="loro-auth-social-button"
|
|
1616
|
-
[class.loro-auth-social-button--outline]="outline()"
|
|
1617
|
-
[class.loro-auth-social-button--selected]="selected()"
|
|
1618
|
-
(click)="releaseFocus($event)"
|
|
1619
|
-
>
|
|
1620
|
-
@if (nativeIconSrc()) {
|
|
1621
|
-
<img
|
|
1622
|
-
class="loro-auth-social-button__native-icon"
|
|
1623
|
-
[src]="nativeIconSrc()"
|
|
1624
|
-
alt=""
|
|
1625
|
-
aria-hidden="true"
|
|
1626
|
-
[style.width.px]="iconSize()"
|
|
1627
|
-
[style.height.px]="iconSize()"
|
|
1628
|
-
/>
|
|
1629
|
-
} @else {
|
|
1630
|
-
<loro-icon [name]="icon()" [size]="iconSize()" [alt]="label()" />
|
|
1631
|
-
}
|
|
1632
|
-
<span>{{ label() }}</span>
|
|
1633
|
-
</button>
|
|
1634
|
-
`, isInline: true, styles: [":host{display:block}.loro-auth-social-button{display:flex;width:100%;align-items:center;justify-content:center;gap:.8rem;border:1px solid var(--loro-border-subtle);border-radius:.9rem;background:var(--loro-surface);min-height:3.25rem;padding:.78rem 1rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font:inherit;font-family:var(--loro-font-brand);font-size:.92rem;font-weight:800;cursor:pointer;text-align:center;transition:border-color .18s ease,box-shadow .18s ease,transform .12s ease,background .12s ease}.loro-auth-social-button:hover,.loro-auth-social-button:focus-visible{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button:active{background:color-mix(in srgb,var(--loro-primary-500) 6%,var(--loro-surface));transform:scale(.985)}.loro-auth-social-button loro-icon{transform:scale(.82)}.loro-auth-social-button__native-icon{flex:0 0 auto;object-fit:contain}.loro-auth-social-button--outline{border:2px solid var(--loro-primary-500);box-shadow:none;color:var(--loro-primary-500);background:transparent}.loro-auth-social-button--outline:hover,.loro-auth-social-button--outline:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button--outline:active{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}@media(min-width:1024px){.loro-auth-social-button{min-height:3rem;padding:.65rem 1rem;font-size:.86rem}.loro-auth-social-button--outline{font-size:.92rem}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAuthSocialButton, isStandalone: true, selector: "loro-auth-social-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"loro-auth-social-button\"\n [class.loro-auth-social-button--outline]=\"outline()\"\n [class.loro-auth-social-button--selected]=\"selected()\"\n (click)=\"releaseFocus($event)\"\n >\n @if (nativeIconSrc()) {\n <img\n class=\"loro-auth-social-button__native-icon\"\n [src]=\"nativeIconSrc()\"\n alt=\"\"\n aria-hidden=\"true\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n />\n } @else {\n <loro-icon [name]=\"icon()\" [size]=\"iconSize()\" [alt]=\"label()\" />\n }\n <span>{{ label() }}</span>\n </button>", styles: [":host{display:block}.loro-auth-social-button{display:flex;width:100%;align-items:center;justify-content:center;gap:.8rem;border:1px solid var(--loro-border-subtle);border-radius:.9rem;background:var(--loro-surface);min-height:3.25rem;padding:.78rem 1rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font:inherit;font-family:var(--loro-font-brand);font-size:.92rem;font-weight:800;cursor:pointer;text-align:center;transition:border-color .18s ease,box-shadow .18s ease,transform .12s ease,background .12s ease}.loro-auth-social-button:hover,.loro-auth-social-button:focus-visible{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button:active{background:color-mix(in srgb,var(--loro-primary-500) 6%,var(--loro-surface));transform:scale(.985)}.loro-auth-social-button loro-icon{transform:scale(.82)}.loro-auth-social-button__native-icon{flex:0 0 auto;object-fit:contain}.loro-auth-social-button--outline{border:2px solid var(--loro-primary-500);box-shadow:none;color:var(--loro-primary-500);background:transparent}.loro-auth-social-button--outline:hover,.loro-auth-social-button--outline:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button--outline:active{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}@media(min-width:1024px){.loro-auth-social-button{min-height:3rem;padding:.65rem 1rem;font-size:.86rem}.loro-auth-social-button--outline{font-size:.92rem}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1635
1562
|
}
|
|
1636
1563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAuthSocialButton, decorators: [{
|
|
1637
1564
|
type: Component,
|
|
1638
|
-
args: [{ selector: 'loro-auth-social-button', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1639
|
-
<button
|
|
1640
|
-
type="button"
|
|
1641
|
-
class="loro-auth-social-button"
|
|
1642
|
-
[class.loro-auth-social-button--outline]="outline()"
|
|
1643
|
-
[class.loro-auth-social-button--selected]="selected()"
|
|
1644
|
-
(click)="releaseFocus($event)"
|
|
1645
|
-
>
|
|
1646
|
-
@if (nativeIconSrc()) {
|
|
1647
|
-
<img
|
|
1648
|
-
class="loro-auth-social-button__native-icon"
|
|
1649
|
-
[src]="nativeIconSrc()"
|
|
1650
|
-
alt=""
|
|
1651
|
-
aria-hidden="true"
|
|
1652
|
-
[style.width.px]="iconSize()"
|
|
1653
|
-
[style.height.px]="iconSize()"
|
|
1654
|
-
/>
|
|
1655
|
-
} @else {
|
|
1656
|
-
<loro-icon [name]="icon()" [size]="iconSize()" [alt]="label()" />
|
|
1657
|
-
}
|
|
1658
|
-
<span>{{ label() }}</span>
|
|
1659
|
-
</button>
|
|
1660
|
-
`, styles: [":host{display:block}.loro-auth-social-button{display:flex;width:100%;align-items:center;justify-content:center;gap:.8rem;border:1px solid var(--loro-border-subtle);border-radius:.9rem;background:var(--loro-surface);min-height:3.25rem;padding:.78rem 1rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font:inherit;font-family:var(--loro-font-brand);font-size:.92rem;font-weight:800;cursor:pointer;text-align:center;transition:border-color .18s ease,box-shadow .18s ease,transform .12s ease,background .12s ease}.loro-auth-social-button:hover,.loro-auth-social-button:focus-visible{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button:active{background:color-mix(in srgb,var(--loro-primary-500) 6%,var(--loro-surface));transform:scale(.985)}.loro-auth-social-button loro-icon{transform:scale(.82)}.loro-auth-social-button__native-icon{flex:0 0 auto;object-fit:contain}.loro-auth-social-button--outline{border:2px solid var(--loro-primary-500);box-shadow:none;color:var(--loro-primary-500);background:transparent}.loro-auth-social-button--outline:hover,.loro-auth-social-button--outline:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button--outline:active{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}@media(min-width:1024px){.loro-auth-social-button{min-height:3rem;padding:.65rem 1rem;font-size:.86rem}.loro-auth-social-button--outline{font-size:.92rem}}\n"] }]
|
|
1565
|
+
args: [{ selector: 'loro-auth-social-button', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"loro-auth-social-button\"\n [class.loro-auth-social-button--outline]=\"outline()\"\n [class.loro-auth-social-button--selected]=\"selected()\"\n (click)=\"releaseFocus($event)\"\n >\n @if (nativeIconSrc()) {\n <img\n class=\"loro-auth-social-button__native-icon\"\n [src]=\"nativeIconSrc()\"\n alt=\"\"\n aria-hidden=\"true\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n />\n } @else {\n <loro-icon [name]=\"icon()\" [size]=\"iconSize()\" [alt]=\"label()\" />\n }\n <span>{{ label() }}</span>\n </button>", styles: [":host{display:block}.loro-auth-social-button{display:flex;width:100%;align-items:center;justify-content:center;gap:.8rem;border:1px solid var(--loro-border-subtle);border-radius:.9rem;background:var(--loro-surface);min-height:3.25rem;padding:.78rem 1rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font:inherit;font-family:var(--loro-font-brand);font-size:.92rem;font-weight:800;cursor:pointer;text-align:center;transition:border-color .18s ease,box-shadow .18s ease,transform .12s ease,background .12s ease}.loro-auth-social-button:hover,.loro-auth-social-button:focus-visible{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button:active{background:color-mix(in srgb,var(--loro-primary-500) 6%,var(--loro-surface));transform:scale(.985)}.loro-auth-social-button loro-icon{transform:scale(.82)}.loro-auth-social-button__native-icon{flex:0 0 auto;object-fit:contain}.loro-auth-social-button--outline{border:2px solid var(--loro-primary-500);box-shadow:none;color:var(--loro-primary-500);background:transparent}.loro-auth-social-button--outline:hover,.loro-auth-social-button--outline:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-social-button--outline:active{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}@media(min-width:1024px){.loro-auth-social-button{min-height:3rem;padding:.65rem 1rem;font-size:.86rem}.loro-auth-social-button--outline{font-size:.92rem}}\n"] }]
|
|
1661
1566
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], outline: [{ type: i0.Input, args: [{ isSignal: true, alias: "outline", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }] } });
|
|
1662
1567
|
|
|
1663
1568
|
class LoroBadge {
|
|
1664
1569
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1665
1570
|
variant = input('info', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1666
1571
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1667
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: LoroBadge, isStandalone: true, selector: "loro-badge", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
1572
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: LoroBadge, isStandalone: true, selector: "loro-badge", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"loro-badge\" [class]=\"'loro-badge loro-badge--' + variant()\">{{ label() }}</span>", styles: [":host{display:inline-flex;min-width:0;font-family:var(--loro-font-brand)}.loro-badge{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:1.75rem;padding:.25rem .7rem;border:1px solid transparent;border-radius:var(--loro-radius-pill);font-size:.82rem;font-weight:800;line-height:1.1;white-space:nowrap}.loro-badge--success{border-color:#1f9d5533;background:#1f9d551f;color:#1f9d55}.loro-badge--error{border-color:#dc26262e;background:#dc26261a;color:#dc2626}.loro-badge--info{border-color:#6c3cff2e;background:#6c3cff1a;color:var(--loro-primary-700)}.loro-badge--warning{border-color:#f5a80038;background:#f5a8001f;color:#986c00}.loro-badge--neutral{border-color:var(--loro-border-soft);background:var(--loro-surface-muted);color:var(--loro-muted-strong)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1668
1573
|
}
|
|
1669
1574
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroBadge, decorators: [{
|
|
1670
1575
|
type: Component,
|
|
1671
|
-
args: [{ selector: 'loro-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1576
|
+
args: [{ selector: 'loro-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"loro-badge\" [class]=\"'loro-badge loro-badge--' + variant()\">{{ label() }}</span>", styles: [":host{display:inline-flex;min-width:0;font-family:var(--loro-font-brand)}.loro-badge{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:1.75rem;padding:.25rem .7rem;border:1px solid transparent;border-radius:var(--loro-radius-pill);font-size:.82rem;font-weight:800;line-height:1.1;white-space:nowrap}.loro-badge--success{border-color:#1f9d5533;background:#1f9d551f;color:#1f9d55}.loro-badge--error{border-color:#dc26262e;background:#dc26261a;color:#dc2626}.loro-badge--info{border-color:#6c3cff2e;background:#6c3cff1a;color:var(--loro-primary-700)}.loro-badge--warning{border-color:#f5a80038;background:#f5a8001f;color:#986c00}.loro-badge--neutral{border-color:var(--loro-border-soft);background:var(--loro-surface-muted);color:var(--loro-muted-strong)}\n"] }]
|
|
1672
1577
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
1673
1578
|
|
|
1674
1579
|
class LoroCard {
|
|
@@ -1700,165 +1605,11 @@ class LoroCard {
|
|
|
1700
1605
|
: normalizedSize;
|
|
1701
1606
|
}, ...(ngDevMode ? [{ debugName: "resolvedIconSize" }] : /* istanbul ignore next */ []));
|
|
1702
1607
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1703
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroCard, isStandalone: true, selector: "loro-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, mobileJustify: { classPropertyName: "mobileJustify", publicName: "mobileJustify", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, arrowSize: { classPropertyName: "arrowSize", publicName: "arrowSize", isSignal: true, isRequired: false, transformFunction: null }, heroGreeting: { classPropertyName: "heroGreeting", publicName: "heroGreeting", isSignal: true, isRequired: false, transformFunction: null }, heroSubtitle: { classPropertyName: "heroSubtitle", publicName: "heroSubtitle", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarSrc: { classPropertyName: "heroAvatarSrc", publicName: "heroAvatarSrc", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarAlt: { classPropertyName: "heroAvatarAlt", publicName: "heroAvatarAlt", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarIcon: { classPropertyName: "heroAvatarIcon", publicName: "heroAvatarIcon", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarIconSize: { classPropertyName: "heroAvatarIconSize", publicName: "heroAvatarIconSize", isSignal: true, isRequired: false, transformFunction: null }, heroVisualImage: { classPropertyName: "heroVisualImage", publicName: "heroVisualImage", isSignal: true, isRequired: false, transformFunction: null }, heroVisualAlt: { classPropertyName: "heroVisualAlt", publicName: "heroVisualAlt", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1704
|
-
<a
|
|
1705
|
-
class="loro-card"
|
|
1706
|
-
[routerLink]="link() || null"
|
|
1707
|
-
[class.loro-card--tinted]="variant() === 'tinted'"
|
|
1708
|
-
[class.loro-card--danger]="variant() === 'danger'"
|
|
1709
|
-
[class.loro-card--selectable]="variant() === 'selectable'"
|
|
1710
|
-
[class.loro-card--benefit]="variant() === 'benefit'"
|
|
1711
|
-
[class.loro-card--benefit-showcase]="variant() === 'benefit-showcase'"
|
|
1712
|
-
[class.loro-card--home-hero]="variant() === 'home-hero'"
|
|
1713
|
-
[class.loro-card--home-primary]="variant() === 'home-primary'"
|
|
1714
|
-
[class.loro-card--home-secondary]="variant() === 'home-secondary'"
|
|
1715
|
-
[class.loro-card--interactive]="!!link()"
|
|
1716
|
-
[class.loro-card--justify-start]="justify() === 'start'"
|
|
1717
|
-
[class.loro-card--justify-center]="justify() === 'center'"
|
|
1718
|
-
[class.loro-card--justify-end]="justify() === 'end'"
|
|
1719
|
-
[class.loro-card--mobile-justify-start]="mobileJustify() === 'start'"
|
|
1720
|
-
[class.loro-card--mobile-justify-center]="mobileJustify() === 'center'"
|
|
1721
|
-
[class.loro-card--mobile-justify-end]="mobileJustify() === 'end'"
|
|
1722
|
-
[class.loro-card--selected]="selected()">
|
|
1723
|
-
@if (variant() === 'home-hero') {
|
|
1724
|
-
<div class="loro-card__hero-main">
|
|
1725
|
-
<div class="loro-card__hero-avatar" aria-hidden="true">
|
|
1726
|
-
@if (heroAvatarSrc()) {
|
|
1727
|
-
<img [src]="heroAvatarSrc()!" [alt]="heroAvatarAlt()" />
|
|
1728
|
-
} @else {
|
|
1729
|
-
<loro-icon [name]="heroAvatarIcon()" [size]="heroAvatarIconSize()" [alt]="heroAvatarAlt()" />
|
|
1730
|
-
}
|
|
1731
|
-
</div>
|
|
1732
|
-
|
|
1733
|
-
<div class="loro-card__hero-copy">
|
|
1734
|
-
@if (heroGreeting()) {
|
|
1735
|
-
<p>{{ heroGreeting() }}</p>
|
|
1736
|
-
}
|
|
1737
|
-
@if (heroSubtitle()) {
|
|
1738
|
-
<span>{{ heroSubtitle() }}</span>
|
|
1739
|
-
}
|
|
1740
|
-
</div>
|
|
1741
|
-
</div>
|
|
1742
|
-
|
|
1743
|
-
@if (heroVisualImage()) {
|
|
1744
|
-
<div class="loro-card__hero-visual" aria-hidden="true">
|
|
1745
|
-
<loro-image [name]="heroVisualImage()!" [alt]="heroVisualAlt()" width="100%" />
|
|
1746
|
-
</div>
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
@if ((title() || icon()) && variant() !== 'home-hero') {
|
|
1751
|
-
<header class="loro-card__header">
|
|
1752
|
-
@if (icon()) {
|
|
1753
|
-
<span class="loro-card__icon">
|
|
1754
|
-
<loro-icon
|
|
1755
|
-
[name]="icon()!"
|
|
1756
|
-
[size]="resolvedIconSize()"
|
|
1757
|
-
[alt]="title() || icon()!"
|
|
1758
|
-
[color]="iconColor()"
|
|
1759
|
-
[decorative]="true"
|
|
1760
|
-
/>
|
|
1761
|
-
</span>
|
|
1762
|
-
}
|
|
1763
|
-
<div class="loro-card__copy">
|
|
1764
|
-
@if (title()) {
|
|
1765
|
-
<h2 class="loro-card__title">{{ title() }}</h2>
|
|
1766
|
-
}
|
|
1767
|
-
@if (description()) {
|
|
1768
|
-
<p class="loro-card__description">{{ description() }}</p>
|
|
1769
|
-
}
|
|
1770
|
-
</div>
|
|
1771
|
-
</header>
|
|
1772
|
-
}
|
|
1773
|
-
<ng-content />
|
|
1774
|
-
@if (showArrow()) {
|
|
1775
|
-
<span class="loro-card__arrow" aria-hidden="true">
|
|
1776
|
-
<loro-icon name="arrow-right" [size]="arrowSize()" alt="Ir" />
|
|
1777
|
-
</span>
|
|
1778
|
-
}
|
|
1779
|
-
</a>
|
|
1780
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand);container-type:inline-size}.loro-card{display:grid;gap:1.25rem;padding:clamp(1.25rem,3vw,1.75rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);text-decoration:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.loro-card--interactive{cursor:pointer}.loro-card--interactive:hover,.loro-card--interactive:focus-visible{transform:translateY(-1px);border-color:var(--loro-border-strong);outline:none}.loro-card--tinted{background:var(--loro-surface-tinted)}.loro-card--danger{border-color:#dc262638;background:#dc26260f}.loro-card--selectable{cursor:pointer}.loro-card--selected{border-color:var(--loro-primary-500);background:#6c3cff0d;box-shadow:0 0 0 1px #6c3cff33,var(--loro-shadow-soft)}.loro-card--benefit,.loro-card--benefit-showcase{gap:var(--loro-card-benefit-gap, .7rem);padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transition:none}.loro-card__header{display:flex;align-items:center;gap:1rem;min-width:0}.loro-card__icon{display:grid;width:3.5rem;height:3.5rem;flex:0 0 auto;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface);margin-block-end:.5rem}.loro-card--benefit .loro-card__header,.loro-card--benefit-showcase .loro-card__header{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:var(--loro-card-benefit-header-gap, .75rem);min-width:0}.loro-card--benefit .loro-card__icon,.loro-card--benefit-showcase .loro-card__icon{width:var(--loro-card-benefit-icon-width, var(--loro-card-benefit-icon-size, 2.25rem));height:var(--loro-card-benefit-icon-height, var(--loro-card-benefit-icon-size, 2.25rem));border-radius:999px;background:var(--loro-card-benefit-icon-bg, var(--loro-primary-500));color:#fff}.loro-card__copy{min-width:0}.loro-card__title,.loro-card__description{margin:0}.loro-card__title{color:var(--loro-text-strong);font-size:clamp(1.15rem,2vw,1.45rem);font-weight:900;line-height:1.15}.loro-card__description{margin-top:.35rem;color:var(--loro-muted);font-size:.95rem;line-height:1.45}.loro-card__arrow{display:none;align-items:center;justify-content:center;justify-self:end;width:2.2rem;height:2.2rem;border-radius:999px;line-height:0}.loro-card--benefit .loro-card__title,.loro-card--benefit-showcase .loro-card__title{color:var(--loro-text-strong);font-size:var(--loro-card-benefit-title-font-size, 1rem);font-weight:900;line-height:var(--loro-card-benefit-title-line-height, 1.15);overflow-wrap:anywhere}.loro-card--benefit .loro-card__description,.loro-card--benefit-showcase .loro-card__description{margin-top:.12rem;color:var(--loro-muted);font-size:var(--loro-card-benefit-description-font-size, .82rem);font-weight:var(--loro-card-benefit-description-font-weight, 750);line-height:var(--loro-card-benefit-description-line-height, 1.25);overflow-wrap:anywhere}.loro-card--benefit .loro-card__copy,.loro-card--benefit-showcase .loro-card__copy{min-width:0;width:100%;flex:1 1 auto}.loro-card--benefit-showcase{width:100%;min-width:0}.loro-card--benefit.loro-card--justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-start .loro-card__header{justify-content:flex-start;text-align:left}.loro-card--benefit.loro-card--justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-center .loro-card__header{justify-content:center;text-align:center}.loro-card--benefit.loro-card--justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-end .loro-card__header{justify-content:flex-end;text-align:right}.loro-card--home-primary,.loro-card--home-secondary{position:relative;display:flex;flex-direction:column;align-items:stretch;height:100%;gap:0;min-height:10.5rem;padding:1rem;overflow:hidden;isolation:isolate;border-color:var(--loro-home-card-border);border-radius:1.45rem;background:var(--loro-surface-soft);text-align:left}.loro-card--home-primary:before,.loro-card--home-primary:after,.loro-card--home-secondary:before,.loro-card--home-secondary:after{position:absolute;inset:0;content:\"\";pointer-events:none}.loro-card--home-primary>*,.loro-card--home-secondary>*{position:relative;z-index:1}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block;flex:1 1 auto;text-align:left}.loro-card--home-primary .loro-card__icon,.loro-card--home-secondary .loro-card__icon{position:relative;width:3rem;height:3rem;border:1px solid rgba(255,255,255,.2);border-radius:1.15rem;background:var(--loro-home-card-icon-bg);box-shadow:var(--loro-home-card-icon-shadow);color:var(--loro-home-card-icon-color)}.loro-card--home-primary .loro-card__copy,.loro-card--home-secondary .loro-card__copy{min-width:0;display:grid;grid-template-rows:auto auto;justify-items:start;gap:.4rem;min-height:0}.loro-card--home-primary .loro-card__title,.loro-card--home-secondary .loro-card__title{color:var(--loro-home-card-title);font-size:1.16rem;font-weight:800;line-height:1.15;letter-spacing:-.02em;text-align:left}.loro-card--home-primary .loro-card__description,.loro-card--home-secondary .loro-card__description{max-width:none;min-height:0;margin-top:0;color:var(--loro-home-card-description);font-size:.9rem;line-height:1.45;text-align:left}.loro-card--home-primary .loro-card__arrow,.loro-card--home-secondary .loro-card__arrow{display:inline-flex;color:var(--loro-home-card-arrow-color);align-items:center;justify-content:center;align-self:flex-end;margin-top:auto}.loro-card--home-secondary .loro-card__title{font-size:1.08rem}.loro-card--home-secondary .loro-card__description{font-size:.85rem}.loro-card--home-primary:hover,.loro-card--home-primary:focus-visible,.loro-card--home-secondary:hover,.loro-card--home-secondary:focus-visible{transform:translateY(-.24rem) scale(1.01);border-color:var(--loro-home-card-hover-border);box-shadow:var(--loro-home-card-hover-shadow)}.loro-card--home-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.75rem;min-height:6.25rem;overflow:hidden;border-color:var(--loro-home-hero-border);border-radius:1.1rem;background:var(--loro-home-hero-bg);padding:.875rem 1rem;color:var(--loro-home-hero-text)}.loro-card--home-hero .loro-card__header,.loro-card--home-hero .loro-card__copy,.loro-card--home-hero .loro-card__icon{display:none}.loro-card__hero-main{display:flex;align-items:center;gap:.75rem;min-width:0}.loro-card__hero-avatar{display:grid;width:3rem;height:3rem;flex:0 0 3rem;place-items:center;overflow:hidden;border-radius:.95rem;background:var(--loro-home-avatar-bg);color:var(--loro-home-avatar-color)}.loro-card__hero-avatar img{width:100%;height:100%;object-fit:cover}.loro-card__hero-copy{display:grid;gap:.18rem;min-width:0}.loro-card__hero-copy p,.loro-card__hero-copy span{margin:0}.loro-card__hero-copy p{font-size:1rem;font-weight:800;line-height:1.2}.loro-card__hero-copy span{color:var(--loro-home-hero-subtitle);font-size:.875rem;line-height:1.35}.loro-card__hero-visual{width:clamp(4.5rem,24vw,5.75rem);align-self:end}.loro-card--home-hero:hover,.loro-card--home-hero:focus-visible{transform:none;border-color:var(--loro-home-hero-border);box-shadow:var(--loro-shadow-soft)}@media(max-width:1023.88px){.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{text-align:left}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{text-align:center;justify-self:center;width:fit-content;max-width:100%;margin-inline:auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{text-align:right}.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{grid-template-columns:auto minmax(0,1fr)}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{grid-template-columns:auto auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{grid-template-columns:auto minmax(0,1fr)}}@container (min-width: 18rem){.loro-card--home-primary,.loro-card--home-secondary{min-height:9.75rem}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block}.loro-card--home-hero{min-height:7.25rem;padding:1rem 1.25rem}.loro-card__hero-visual{width:clamp(5.25rem,20vw,7rem)}}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1608
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroCard, isStandalone: true, selector: "loro-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, mobileJustify: { classPropertyName: "mobileJustify", publicName: "mobileJustify", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, arrowSize: { classPropertyName: "arrowSize", publicName: "arrowSize", isSignal: true, isRequired: false, transformFunction: null }, heroGreeting: { classPropertyName: "heroGreeting", publicName: "heroGreeting", isSignal: true, isRequired: false, transformFunction: null }, heroSubtitle: { classPropertyName: "heroSubtitle", publicName: "heroSubtitle", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarSrc: { classPropertyName: "heroAvatarSrc", publicName: "heroAvatarSrc", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarAlt: { classPropertyName: "heroAvatarAlt", publicName: "heroAvatarAlt", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarIcon: { classPropertyName: "heroAvatarIcon", publicName: "heroAvatarIcon", isSignal: true, isRequired: false, transformFunction: null }, heroAvatarIconSize: { classPropertyName: "heroAvatarIconSize", publicName: "heroAvatarIconSize", isSignal: true, isRequired: false, transformFunction: null }, heroVisualImage: { classPropertyName: "heroVisualImage", publicName: "heroVisualImage", isSignal: true, isRequired: false, transformFunction: null }, heroVisualAlt: { classPropertyName: "heroVisualAlt", publicName: "heroVisualAlt", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a\n class=\"loro-card\"\n [routerLink]=\"link() || null\"\n [class.loro-card--tinted]=\"variant() === 'tinted'\"\n [class.loro-card--danger]=\"variant() === 'danger'\"\n [class.loro-card--selectable]=\"variant() === 'selectable'\"\n [class.loro-card--benefit]=\"variant() === 'benefit'\"\n [class.loro-card--benefit-showcase]=\"variant() === 'benefit-showcase'\"\n [class.loro-card--home-hero]=\"variant() === 'home-hero'\"\n [class.loro-card--home-primary]=\"variant() === 'home-primary'\"\n [class.loro-card--home-secondary]=\"variant() === 'home-secondary'\"\n [class.loro-card--interactive]=\"!!link()\"\n [class.loro-card--justify-start]=\"justify() === 'start'\"\n [class.loro-card--justify-center]=\"justify() === 'center'\"\n [class.loro-card--justify-end]=\"justify() === 'end'\"\n [class.loro-card--mobile-justify-start]=\"mobileJustify() === 'start'\"\n [class.loro-card--mobile-justify-center]=\"mobileJustify() === 'center'\"\n [class.loro-card--mobile-justify-end]=\"mobileJustify() === 'end'\"\n [class.loro-card--selected]=\"selected()\">\n @if (variant() === 'home-hero') {\n <div class=\"loro-card__hero-main\">\n <div class=\"loro-card__hero-avatar\" aria-hidden=\"true\">\n @if (heroAvatarSrc()) {\n <img [src]=\"heroAvatarSrc()!\" [alt]=\"heroAvatarAlt()\" />\n } @else {\n <loro-icon [name]=\"heroAvatarIcon()\" [size]=\"heroAvatarIconSize()\" [alt]=\"heroAvatarAlt()\" />\n }\n </div>\n\n <div class=\"loro-card__hero-copy\">\n @if (heroGreeting()) {\n <p>{{ heroGreeting() }}</p>\n }\n @if (heroSubtitle()) {\n <span>{{ heroSubtitle() }}</span>\n }\n </div>\n </div>\n\n @if (heroVisualImage()) {\n <div class=\"loro-card__hero-visual\" aria-hidden=\"true\">\n <loro-image [name]=\"heroVisualImage()!\" [alt]=\"heroVisualAlt()\" width=\"100%\" />\n </div>\n }\n }\n\n @if ((title() || icon()) && variant() !== 'home-hero') {\n <header class=\"loro-card__header\">\n @if (icon()) {\n <span class=\"loro-card__icon\">\n <loro-icon\n [name]=\"icon()!\"\n [size]=\"resolvedIconSize()\"\n [alt]=\"title() || icon()!\"\n [color]=\"iconColor()\"\n [decorative]=\"true\"\n />\n </span>\n }\n <div class=\"loro-card__copy\">\n @if (title()) {\n <h2 class=\"loro-card__title\">{{ title() }}</h2>\n }\n @if (description()) {\n <p class=\"loro-card__description\">{{ description() }}</p>\n }\n </div>\n </header>\n }\n <ng-content />\n @if (showArrow()) {\n <span class=\"loro-card__arrow\" aria-hidden=\"true\">\n <loro-icon name=\"arrow-right\" [size]=\"arrowSize()\" alt=\"Ir\" />\n </span>\n }\n </a>", styles: [":host{display:block;font-family:var(--loro-font-brand);container-type:inline-size}.loro-card{display:grid;gap:1.25rem;padding:clamp(1.25rem,3vw,1.75rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);text-decoration:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.loro-card--interactive{cursor:pointer}.loro-card--interactive:hover,.loro-card--interactive:focus-visible{transform:translateY(-1px);border-color:var(--loro-border-strong);outline:none}.loro-card--tinted{background:var(--loro-surface-tinted)}.loro-card--danger{border-color:#dc262638;background:#dc26260f}.loro-card--selectable{cursor:pointer}.loro-card--selected{border-color:var(--loro-primary-500);background:#6c3cff0d;box-shadow:0 0 0 1px #6c3cff33,var(--loro-shadow-soft)}.loro-card--benefit,.loro-card--benefit-showcase{gap:var(--loro-card-benefit-gap, .7rem);padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transition:none}.loro-card__header{display:flex;align-items:center;gap:1rem;min-width:0}.loro-card__icon{display:grid;width:3.5rem;height:3.5rem;flex:0 0 auto;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface);margin-block-end:.5rem}.loro-card--benefit .loro-card__header,.loro-card--benefit-showcase .loro-card__header{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:var(--loro-card-benefit-header-gap, .75rem);min-width:0}.loro-card--benefit .loro-card__icon,.loro-card--benefit-showcase .loro-card__icon{width:var(--loro-card-benefit-icon-width, var(--loro-card-benefit-icon-size, 2.25rem));height:var(--loro-card-benefit-icon-height, var(--loro-card-benefit-icon-size, 2.25rem));border-radius:999px;background:var(--loro-card-benefit-icon-bg, var(--loro-primary-500));color:#fff}.loro-card__copy{min-width:0}.loro-card__title,.loro-card__description{margin:0}.loro-card__title{color:var(--loro-text-strong);font-size:clamp(1.15rem,2vw,1.45rem);font-weight:900;line-height:1.15}.loro-card__description{margin-top:.35rem;color:var(--loro-muted);font-size:.95rem;line-height:1.45}.loro-card__arrow{display:none;align-items:center;justify-content:center;justify-self:end;width:2.2rem;height:2.2rem;border-radius:999px;line-height:0}.loro-card--benefit .loro-card__title,.loro-card--benefit-showcase .loro-card__title{color:var(--loro-text-strong);font-size:var(--loro-card-benefit-title-font-size, 1rem);font-weight:900;line-height:var(--loro-card-benefit-title-line-height, 1.15);overflow-wrap:anywhere}.loro-card--benefit .loro-card__description,.loro-card--benefit-showcase .loro-card__description{margin-top:.12rem;color:var(--loro-muted);font-size:var(--loro-card-benefit-description-font-size, .82rem);font-weight:var(--loro-card-benefit-description-font-weight, 750);line-height:var(--loro-card-benefit-description-line-height, 1.25);overflow-wrap:anywhere}.loro-card--benefit .loro-card__copy,.loro-card--benefit-showcase .loro-card__copy{min-width:0;width:100%;flex:1 1 auto}.loro-card--benefit-showcase{width:100%;min-width:0}.loro-card--benefit.loro-card--justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-start .loro-card__header{justify-content:flex-start;text-align:left}.loro-card--benefit.loro-card--justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-center .loro-card__header{justify-content:center;text-align:center}.loro-card--benefit.loro-card--justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-end .loro-card__header{justify-content:flex-end;text-align:right}.loro-card--home-primary,.loro-card--home-secondary{position:relative;display:flex;flex-direction:column;align-items:stretch;height:100%;gap:0;min-height:10.5rem;padding:1rem;overflow:hidden;isolation:isolate;border-color:var(--loro-home-card-border);border-radius:1.45rem;background:var(--loro-surface-soft);text-align:left}.loro-card--home-primary:before,.loro-card--home-primary:after,.loro-card--home-secondary:before,.loro-card--home-secondary:after{position:absolute;inset:0;content:\"\";pointer-events:none}.loro-card--home-primary>*,.loro-card--home-secondary>*{position:relative;z-index:1}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block;flex:1 1 auto;text-align:left}.loro-card--home-primary .loro-card__icon,.loro-card--home-secondary .loro-card__icon{position:relative;width:3rem;height:3rem;border:1px solid rgba(255,255,255,.2);border-radius:1.15rem;background:var(--loro-home-card-icon-bg);box-shadow:var(--loro-home-card-icon-shadow);color:var(--loro-home-card-icon-color)}.loro-card--home-primary .loro-card__copy,.loro-card--home-secondary .loro-card__copy{min-width:0;display:grid;grid-template-rows:auto auto;justify-items:start;gap:.4rem;min-height:0}.loro-card--home-primary .loro-card__title,.loro-card--home-secondary .loro-card__title{color:var(--loro-home-card-title);font-size:1.16rem;font-weight:800;line-height:1.15;letter-spacing:-.02em;text-align:left}.loro-card--home-primary .loro-card__description,.loro-card--home-secondary .loro-card__description{max-width:none;min-height:0;margin-top:0;color:var(--loro-home-card-description);font-size:.9rem;line-height:1.45;text-align:left}.loro-card--home-primary .loro-card__arrow,.loro-card--home-secondary .loro-card__arrow{display:inline-flex;color:var(--loro-home-card-arrow-color);align-items:center;justify-content:center;align-self:flex-end;margin-top:auto}.loro-card--home-secondary .loro-card__title{font-size:1.08rem}.loro-card--home-secondary .loro-card__description{font-size:.85rem}.loro-card--home-primary:hover,.loro-card--home-primary:focus-visible,.loro-card--home-secondary:hover,.loro-card--home-secondary:focus-visible{transform:translateY(-.24rem) scale(1.01);border-color:var(--loro-home-card-hover-border);box-shadow:var(--loro-home-card-hover-shadow)}.loro-card--home-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.75rem;min-height:6.25rem;overflow:hidden;border-color:var(--loro-home-hero-border);border-radius:1.1rem;background:var(--loro-home-hero-bg);padding:.875rem 1rem;color:var(--loro-home-hero-text)}.loro-card--home-hero .loro-card__header,.loro-card--home-hero .loro-card__copy,.loro-card--home-hero .loro-card__icon{display:none}.loro-card__hero-main{display:flex;align-items:center;gap:.75rem;min-width:0}.loro-card__hero-avatar{display:grid;width:3rem;height:3rem;flex:0 0 3rem;place-items:center;overflow:hidden;border-radius:.95rem;background:var(--loro-home-avatar-bg);color:var(--loro-home-avatar-color)}.loro-card__hero-avatar img{width:100%;height:100%;object-fit:cover}.loro-card__hero-copy{display:grid;gap:.18rem;min-width:0}.loro-card__hero-copy p,.loro-card__hero-copy span{margin:0}.loro-card__hero-copy p{font-size:1rem;font-weight:800;line-height:1.2}.loro-card__hero-copy span{color:var(--loro-home-hero-subtitle);font-size:.875rem;line-height:1.35}.loro-card__hero-visual{width:clamp(4.5rem,24vw,5.75rem);align-self:end}.loro-card--home-hero:hover,.loro-card--home-hero:focus-visible{transform:none;border-color:var(--loro-home-hero-border);box-shadow:var(--loro-shadow-soft)}@media(max-width:1023.88px){.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{text-align:left}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{text-align:center;justify-self:center;width:fit-content;max-width:100%;margin-inline:auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{text-align:right}.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{grid-template-columns:auto minmax(0,1fr)}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{grid-template-columns:auto auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{grid-template-columns:auto minmax(0,1fr)}}@container (min-width: 18rem){.loro-card--home-primary,.loro-card--home-secondary{min-height:9.75rem}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block}.loro-card--home-hero{min-height:7.25rem;padding:1rem 1.25rem}.loro-card__hero-visual{width:clamp(5.25rem,20vw,7rem)}}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1781
1609
|
}
|
|
1782
1610
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroCard, decorators: [{
|
|
1783
1611
|
type: Component,
|
|
1784
|
-
args: [{ selector: 'loro-card', standalone: true, imports: [RouterLink, LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1785
|
-
<a
|
|
1786
|
-
class="loro-card"
|
|
1787
|
-
[routerLink]="link() || null"
|
|
1788
|
-
[class.loro-card--tinted]="variant() === 'tinted'"
|
|
1789
|
-
[class.loro-card--danger]="variant() === 'danger'"
|
|
1790
|
-
[class.loro-card--selectable]="variant() === 'selectable'"
|
|
1791
|
-
[class.loro-card--benefit]="variant() === 'benefit'"
|
|
1792
|
-
[class.loro-card--benefit-showcase]="variant() === 'benefit-showcase'"
|
|
1793
|
-
[class.loro-card--home-hero]="variant() === 'home-hero'"
|
|
1794
|
-
[class.loro-card--home-primary]="variant() === 'home-primary'"
|
|
1795
|
-
[class.loro-card--home-secondary]="variant() === 'home-secondary'"
|
|
1796
|
-
[class.loro-card--interactive]="!!link()"
|
|
1797
|
-
[class.loro-card--justify-start]="justify() === 'start'"
|
|
1798
|
-
[class.loro-card--justify-center]="justify() === 'center'"
|
|
1799
|
-
[class.loro-card--justify-end]="justify() === 'end'"
|
|
1800
|
-
[class.loro-card--mobile-justify-start]="mobileJustify() === 'start'"
|
|
1801
|
-
[class.loro-card--mobile-justify-center]="mobileJustify() === 'center'"
|
|
1802
|
-
[class.loro-card--mobile-justify-end]="mobileJustify() === 'end'"
|
|
1803
|
-
[class.loro-card--selected]="selected()">
|
|
1804
|
-
@if (variant() === 'home-hero') {
|
|
1805
|
-
<div class="loro-card__hero-main">
|
|
1806
|
-
<div class="loro-card__hero-avatar" aria-hidden="true">
|
|
1807
|
-
@if (heroAvatarSrc()) {
|
|
1808
|
-
<img [src]="heroAvatarSrc()!" [alt]="heroAvatarAlt()" />
|
|
1809
|
-
} @else {
|
|
1810
|
-
<loro-icon [name]="heroAvatarIcon()" [size]="heroAvatarIconSize()" [alt]="heroAvatarAlt()" />
|
|
1811
|
-
}
|
|
1812
|
-
</div>
|
|
1813
|
-
|
|
1814
|
-
<div class="loro-card__hero-copy">
|
|
1815
|
-
@if (heroGreeting()) {
|
|
1816
|
-
<p>{{ heroGreeting() }}</p>
|
|
1817
|
-
}
|
|
1818
|
-
@if (heroSubtitle()) {
|
|
1819
|
-
<span>{{ heroSubtitle() }}</span>
|
|
1820
|
-
}
|
|
1821
|
-
</div>
|
|
1822
|
-
</div>
|
|
1823
|
-
|
|
1824
|
-
@if (heroVisualImage()) {
|
|
1825
|
-
<div class="loro-card__hero-visual" aria-hidden="true">
|
|
1826
|
-
<loro-image [name]="heroVisualImage()!" [alt]="heroVisualAlt()" width="100%" />
|
|
1827
|
-
</div>
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
@if ((title() || icon()) && variant() !== 'home-hero') {
|
|
1832
|
-
<header class="loro-card__header">
|
|
1833
|
-
@if (icon()) {
|
|
1834
|
-
<span class="loro-card__icon">
|
|
1835
|
-
<loro-icon
|
|
1836
|
-
[name]="icon()!"
|
|
1837
|
-
[size]="resolvedIconSize()"
|
|
1838
|
-
[alt]="title() || icon()!"
|
|
1839
|
-
[color]="iconColor()"
|
|
1840
|
-
[decorative]="true"
|
|
1841
|
-
/>
|
|
1842
|
-
</span>
|
|
1843
|
-
}
|
|
1844
|
-
<div class="loro-card__copy">
|
|
1845
|
-
@if (title()) {
|
|
1846
|
-
<h2 class="loro-card__title">{{ title() }}</h2>
|
|
1847
|
-
}
|
|
1848
|
-
@if (description()) {
|
|
1849
|
-
<p class="loro-card__description">{{ description() }}</p>
|
|
1850
|
-
}
|
|
1851
|
-
</div>
|
|
1852
|
-
</header>
|
|
1853
|
-
}
|
|
1854
|
-
<ng-content />
|
|
1855
|
-
@if (showArrow()) {
|
|
1856
|
-
<span class="loro-card__arrow" aria-hidden="true">
|
|
1857
|
-
<loro-icon name="arrow-right" [size]="arrowSize()" alt="Ir" />
|
|
1858
|
-
</span>
|
|
1859
|
-
}
|
|
1860
|
-
</a>
|
|
1861
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand);container-type:inline-size}.loro-card{display:grid;gap:1.25rem;padding:clamp(1.25rem,3vw,1.75rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);text-decoration:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.loro-card--interactive{cursor:pointer}.loro-card--interactive:hover,.loro-card--interactive:focus-visible{transform:translateY(-1px);border-color:var(--loro-border-strong);outline:none}.loro-card--tinted{background:var(--loro-surface-tinted)}.loro-card--danger{border-color:#dc262638;background:#dc26260f}.loro-card--selectable{cursor:pointer}.loro-card--selected{border-color:var(--loro-primary-500);background:#6c3cff0d;box-shadow:0 0 0 1px #6c3cff33,var(--loro-shadow-soft)}.loro-card--benefit,.loro-card--benefit-showcase{gap:var(--loro-card-benefit-gap, .7rem);padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transition:none}.loro-card__header{display:flex;align-items:center;gap:1rem;min-width:0}.loro-card__icon{display:grid;width:3.5rem;height:3.5rem;flex:0 0 auto;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface);margin-block-end:.5rem}.loro-card--benefit .loro-card__header,.loro-card--benefit-showcase .loro-card__header{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:var(--loro-card-benefit-header-gap, .75rem);min-width:0}.loro-card--benefit .loro-card__icon,.loro-card--benefit-showcase .loro-card__icon{width:var(--loro-card-benefit-icon-width, var(--loro-card-benefit-icon-size, 2.25rem));height:var(--loro-card-benefit-icon-height, var(--loro-card-benefit-icon-size, 2.25rem));border-radius:999px;background:var(--loro-card-benefit-icon-bg, var(--loro-primary-500));color:#fff}.loro-card__copy{min-width:0}.loro-card__title,.loro-card__description{margin:0}.loro-card__title{color:var(--loro-text-strong);font-size:clamp(1.15rem,2vw,1.45rem);font-weight:900;line-height:1.15}.loro-card__description{margin-top:.35rem;color:var(--loro-muted);font-size:.95rem;line-height:1.45}.loro-card__arrow{display:none;align-items:center;justify-content:center;justify-self:end;width:2.2rem;height:2.2rem;border-radius:999px;line-height:0}.loro-card--benefit .loro-card__title,.loro-card--benefit-showcase .loro-card__title{color:var(--loro-text-strong);font-size:var(--loro-card-benefit-title-font-size, 1rem);font-weight:900;line-height:var(--loro-card-benefit-title-line-height, 1.15);overflow-wrap:anywhere}.loro-card--benefit .loro-card__description,.loro-card--benefit-showcase .loro-card__description{margin-top:.12rem;color:var(--loro-muted);font-size:var(--loro-card-benefit-description-font-size, .82rem);font-weight:var(--loro-card-benefit-description-font-weight, 750);line-height:var(--loro-card-benefit-description-line-height, 1.25);overflow-wrap:anywhere}.loro-card--benefit .loro-card__copy,.loro-card--benefit-showcase .loro-card__copy{min-width:0;width:100%;flex:1 1 auto}.loro-card--benefit-showcase{width:100%;min-width:0}.loro-card--benefit.loro-card--justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-start .loro-card__header{justify-content:flex-start;text-align:left}.loro-card--benefit.loro-card--justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-center .loro-card__header{justify-content:center;text-align:center}.loro-card--benefit.loro-card--justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-end .loro-card__header{justify-content:flex-end;text-align:right}.loro-card--home-primary,.loro-card--home-secondary{position:relative;display:flex;flex-direction:column;align-items:stretch;height:100%;gap:0;min-height:10.5rem;padding:1rem;overflow:hidden;isolation:isolate;border-color:var(--loro-home-card-border);border-radius:1.45rem;background:var(--loro-surface-soft);text-align:left}.loro-card--home-primary:before,.loro-card--home-primary:after,.loro-card--home-secondary:before,.loro-card--home-secondary:after{position:absolute;inset:0;content:\"\";pointer-events:none}.loro-card--home-primary>*,.loro-card--home-secondary>*{position:relative;z-index:1}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block;flex:1 1 auto;text-align:left}.loro-card--home-primary .loro-card__icon,.loro-card--home-secondary .loro-card__icon{position:relative;width:3rem;height:3rem;border:1px solid rgba(255,255,255,.2);border-radius:1.15rem;background:var(--loro-home-card-icon-bg);box-shadow:var(--loro-home-card-icon-shadow);color:var(--loro-home-card-icon-color)}.loro-card--home-primary .loro-card__copy,.loro-card--home-secondary .loro-card__copy{min-width:0;display:grid;grid-template-rows:auto auto;justify-items:start;gap:.4rem;min-height:0}.loro-card--home-primary .loro-card__title,.loro-card--home-secondary .loro-card__title{color:var(--loro-home-card-title);font-size:1.16rem;font-weight:800;line-height:1.15;letter-spacing:-.02em;text-align:left}.loro-card--home-primary .loro-card__description,.loro-card--home-secondary .loro-card__description{max-width:none;min-height:0;margin-top:0;color:var(--loro-home-card-description);font-size:.9rem;line-height:1.45;text-align:left}.loro-card--home-primary .loro-card__arrow,.loro-card--home-secondary .loro-card__arrow{display:inline-flex;color:var(--loro-home-card-arrow-color);align-items:center;justify-content:center;align-self:flex-end;margin-top:auto}.loro-card--home-secondary .loro-card__title{font-size:1.08rem}.loro-card--home-secondary .loro-card__description{font-size:.85rem}.loro-card--home-primary:hover,.loro-card--home-primary:focus-visible,.loro-card--home-secondary:hover,.loro-card--home-secondary:focus-visible{transform:translateY(-.24rem) scale(1.01);border-color:var(--loro-home-card-hover-border);box-shadow:var(--loro-home-card-hover-shadow)}.loro-card--home-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.75rem;min-height:6.25rem;overflow:hidden;border-color:var(--loro-home-hero-border);border-radius:1.1rem;background:var(--loro-home-hero-bg);padding:.875rem 1rem;color:var(--loro-home-hero-text)}.loro-card--home-hero .loro-card__header,.loro-card--home-hero .loro-card__copy,.loro-card--home-hero .loro-card__icon{display:none}.loro-card__hero-main{display:flex;align-items:center;gap:.75rem;min-width:0}.loro-card__hero-avatar{display:grid;width:3rem;height:3rem;flex:0 0 3rem;place-items:center;overflow:hidden;border-radius:.95rem;background:var(--loro-home-avatar-bg);color:var(--loro-home-avatar-color)}.loro-card__hero-avatar img{width:100%;height:100%;object-fit:cover}.loro-card__hero-copy{display:grid;gap:.18rem;min-width:0}.loro-card__hero-copy p,.loro-card__hero-copy span{margin:0}.loro-card__hero-copy p{font-size:1rem;font-weight:800;line-height:1.2}.loro-card__hero-copy span{color:var(--loro-home-hero-subtitle);font-size:.875rem;line-height:1.35}.loro-card__hero-visual{width:clamp(4.5rem,24vw,5.75rem);align-self:end}.loro-card--home-hero:hover,.loro-card--home-hero:focus-visible{transform:none;border-color:var(--loro-home-hero-border);box-shadow:var(--loro-shadow-soft)}@media(max-width:1023.88px){.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{text-align:left}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{text-align:center;justify-self:center;width:fit-content;max-width:100%;margin-inline:auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{text-align:right}.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{grid-template-columns:auto minmax(0,1fr)}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{grid-template-columns:auto auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{grid-template-columns:auto minmax(0,1fr)}}@container (min-width: 18rem){.loro-card--home-primary,.loro-card--home-secondary{min-height:9.75rem}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block}.loro-card--home-hero{min-height:7.25rem;padding:1rem 1.25rem}.loro-card__hero-visual{width:clamp(5.25rem,20vw,7rem)}}\n"] }]
|
|
1612
|
+
args: [{ selector: 'loro-card', standalone: true, imports: [RouterLink, LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n class=\"loro-card\"\n [routerLink]=\"link() || null\"\n [class.loro-card--tinted]=\"variant() === 'tinted'\"\n [class.loro-card--danger]=\"variant() === 'danger'\"\n [class.loro-card--selectable]=\"variant() === 'selectable'\"\n [class.loro-card--benefit]=\"variant() === 'benefit'\"\n [class.loro-card--benefit-showcase]=\"variant() === 'benefit-showcase'\"\n [class.loro-card--home-hero]=\"variant() === 'home-hero'\"\n [class.loro-card--home-primary]=\"variant() === 'home-primary'\"\n [class.loro-card--home-secondary]=\"variant() === 'home-secondary'\"\n [class.loro-card--interactive]=\"!!link()\"\n [class.loro-card--justify-start]=\"justify() === 'start'\"\n [class.loro-card--justify-center]=\"justify() === 'center'\"\n [class.loro-card--justify-end]=\"justify() === 'end'\"\n [class.loro-card--mobile-justify-start]=\"mobileJustify() === 'start'\"\n [class.loro-card--mobile-justify-center]=\"mobileJustify() === 'center'\"\n [class.loro-card--mobile-justify-end]=\"mobileJustify() === 'end'\"\n [class.loro-card--selected]=\"selected()\">\n @if (variant() === 'home-hero') {\n <div class=\"loro-card__hero-main\">\n <div class=\"loro-card__hero-avatar\" aria-hidden=\"true\">\n @if (heroAvatarSrc()) {\n <img [src]=\"heroAvatarSrc()!\" [alt]=\"heroAvatarAlt()\" />\n } @else {\n <loro-icon [name]=\"heroAvatarIcon()\" [size]=\"heroAvatarIconSize()\" [alt]=\"heroAvatarAlt()\" />\n }\n </div>\n\n <div class=\"loro-card__hero-copy\">\n @if (heroGreeting()) {\n <p>{{ heroGreeting() }}</p>\n }\n @if (heroSubtitle()) {\n <span>{{ heroSubtitle() }}</span>\n }\n </div>\n </div>\n\n @if (heroVisualImage()) {\n <div class=\"loro-card__hero-visual\" aria-hidden=\"true\">\n <loro-image [name]=\"heroVisualImage()!\" [alt]=\"heroVisualAlt()\" width=\"100%\" />\n </div>\n }\n }\n\n @if ((title() || icon()) && variant() !== 'home-hero') {\n <header class=\"loro-card__header\">\n @if (icon()) {\n <span class=\"loro-card__icon\">\n <loro-icon\n [name]=\"icon()!\"\n [size]=\"resolvedIconSize()\"\n [alt]=\"title() || icon()!\"\n [color]=\"iconColor()\"\n [decorative]=\"true\"\n />\n </span>\n }\n <div class=\"loro-card__copy\">\n @if (title()) {\n <h2 class=\"loro-card__title\">{{ title() }}</h2>\n }\n @if (description()) {\n <p class=\"loro-card__description\">{{ description() }}</p>\n }\n </div>\n </header>\n }\n <ng-content />\n @if (showArrow()) {\n <span class=\"loro-card__arrow\" aria-hidden=\"true\">\n <loro-icon name=\"arrow-right\" [size]=\"arrowSize()\" alt=\"Ir\" />\n </span>\n }\n </a>", styles: [":host{display:block;font-family:var(--loro-font-brand);container-type:inline-size}.loro-card{display:grid;gap:1.25rem;padding:clamp(1.25rem,3vw,1.75rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);text-decoration:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.loro-card--interactive{cursor:pointer}.loro-card--interactive:hover,.loro-card--interactive:focus-visible{transform:translateY(-1px);border-color:var(--loro-border-strong);outline:none}.loro-card--tinted{background:var(--loro-surface-tinted)}.loro-card--danger{border-color:#dc262638;background:#dc26260f}.loro-card--selectable{cursor:pointer}.loro-card--selected{border-color:var(--loro-primary-500);background:#6c3cff0d;box-shadow:0 0 0 1px #6c3cff33,var(--loro-shadow-soft)}.loro-card--benefit,.loro-card--benefit-showcase{gap:var(--loro-card-benefit-gap, .7rem);padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transition:none}.loro-card__header{display:flex;align-items:center;gap:1rem;min-width:0}.loro-card__icon{display:grid;width:3.5rem;height:3.5rem;flex:0 0 auto;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface);margin-block-end:.5rem}.loro-card--benefit .loro-card__header,.loro-card--benefit-showcase .loro-card__header{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:var(--loro-card-benefit-header-gap, .75rem);min-width:0}.loro-card--benefit .loro-card__icon,.loro-card--benefit-showcase .loro-card__icon{width:var(--loro-card-benefit-icon-width, var(--loro-card-benefit-icon-size, 2.25rem));height:var(--loro-card-benefit-icon-height, var(--loro-card-benefit-icon-size, 2.25rem));border-radius:999px;background:var(--loro-card-benefit-icon-bg, var(--loro-primary-500));color:#fff}.loro-card__copy{min-width:0}.loro-card__title,.loro-card__description{margin:0}.loro-card__title{color:var(--loro-text-strong);font-size:clamp(1.15rem,2vw,1.45rem);font-weight:900;line-height:1.15}.loro-card__description{margin-top:.35rem;color:var(--loro-muted);font-size:.95rem;line-height:1.45}.loro-card__arrow{display:none;align-items:center;justify-content:center;justify-self:end;width:2.2rem;height:2.2rem;border-radius:999px;line-height:0}.loro-card--benefit .loro-card__title,.loro-card--benefit-showcase .loro-card__title{color:var(--loro-text-strong);font-size:var(--loro-card-benefit-title-font-size, 1rem);font-weight:900;line-height:var(--loro-card-benefit-title-line-height, 1.15);overflow-wrap:anywhere}.loro-card--benefit .loro-card__description,.loro-card--benefit-showcase .loro-card__description{margin-top:.12rem;color:var(--loro-muted);font-size:var(--loro-card-benefit-description-font-size, .82rem);font-weight:var(--loro-card-benefit-description-font-weight, 750);line-height:var(--loro-card-benefit-description-line-height, 1.25);overflow-wrap:anywhere}.loro-card--benefit .loro-card__copy,.loro-card--benefit-showcase .loro-card__copy{min-width:0;width:100%;flex:1 1 auto}.loro-card--benefit-showcase{width:100%;min-width:0}.loro-card--benefit.loro-card--justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-start .loro-card__header{justify-content:flex-start;text-align:left}.loro-card--benefit.loro-card--justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-center .loro-card__header{justify-content:center;text-align:center}.loro-card--benefit.loro-card--justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--justify-end .loro-card__header{justify-content:flex-end;text-align:right}.loro-card--home-primary,.loro-card--home-secondary{position:relative;display:flex;flex-direction:column;align-items:stretch;height:100%;gap:0;min-height:10.5rem;padding:1rem;overflow:hidden;isolation:isolate;border-color:var(--loro-home-card-border);border-radius:1.45rem;background:var(--loro-surface-soft);text-align:left}.loro-card--home-primary:before,.loro-card--home-primary:after,.loro-card--home-secondary:before,.loro-card--home-secondary:after{position:absolute;inset:0;content:\"\";pointer-events:none}.loro-card--home-primary>*,.loro-card--home-secondary>*{position:relative;z-index:1}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block;flex:1 1 auto;text-align:left}.loro-card--home-primary .loro-card__icon,.loro-card--home-secondary .loro-card__icon{position:relative;width:3rem;height:3rem;border:1px solid rgba(255,255,255,.2);border-radius:1.15rem;background:var(--loro-home-card-icon-bg);box-shadow:var(--loro-home-card-icon-shadow);color:var(--loro-home-card-icon-color)}.loro-card--home-primary .loro-card__copy,.loro-card--home-secondary .loro-card__copy{min-width:0;display:grid;grid-template-rows:auto auto;justify-items:start;gap:.4rem;min-height:0}.loro-card--home-primary .loro-card__title,.loro-card--home-secondary .loro-card__title{color:var(--loro-home-card-title);font-size:1.16rem;font-weight:800;line-height:1.15;letter-spacing:-.02em;text-align:left}.loro-card--home-primary .loro-card__description,.loro-card--home-secondary .loro-card__description{max-width:none;min-height:0;margin-top:0;color:var(--loro-home-card-description);font-size:.9rem;line-height:1.45;text-align:left}.loro-card--home-primary .loro-card__arrow,.loro-card--home-secondary .loro-card__arrow{display:inline-flex;color:var(--loro-home-card-arrow-color);align-items:center;justify-content:center;align-self:flex-end;margin-top:auto}.loro-card--home-secondary .loro-card__title{font-size:1.08rem}.loro-card--home-secondary .loro-card__description{font-size:.85rem}.loro-card--home-primary:hover,.loro-card--home-primary:focus-visible,.loro-card--home-secondary:hover,.loro-card--home-secondary:focus-visible{transform:translateY(-.24rem) scale(1.01);border-color:var(--loro-home-card-hover-border);box-shadow:var(--loro-home-card-hover-shadow)}.loro-card--home-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.75rem;min-height:6.25rem;overflow:hidden;border-color:var(--loro-home-hero-border);border-radius:1.1rem;background:var(--loro-home-hero-bg);padding:.875rem 1rem;color:var(--loro-home-hero-text)}.loro-card--home-hero .loro-card__header,.loro-card--home-hero .loro-card__copy,.loro-card--home-hero .loro-card__icon{display:none}.loro-card__hero-main{display:flex;align-items:center;gap:.75rem;min-width:0}.loro-card__hero-avatar{display:grid;width:3rem;height:3rem;flex:0 0 3rem;place-items:center;overflow:hidden;border-radius:.95rem;background:var(--loro-home-avatar-bg);color:var(--loro-home-avatar-color)}.loro-card__hero-avatar img{width:100%;height:100%;object-fit:cover}.loro-card__hero-copy{display:grid;gap:.18rem;min-width:0}.loro-card__hero-copy p,.loro-card__hero-copy span{margin:0}.loro-card__hero-copy p{font-size:1rem;font-weight:800;line-height:1.2}.loro-card__hero-copy span{color:var(--loro-home-hero-subtitle);font-size:.875rem;line-height:1.35}.loro-card__hero-visual{width:clamp(4.5rem,24vw,5.75rem);align-self:end}.loro-card--home-hero:hover,.loro-card--home-hero:focus-visible{transform:none;border-color:var(--loro-home-hero-border);box-shadow:var(--loro-shadow-soft)}@media(max-width:1023.88px){.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{text-align:left}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{text-align:center;justify-self:center;width:fit-content;max-width:100%;margin-inline:auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{text-align:right}.loro-card--benefit.loro-card--mobile-justify-start .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-start .loro-card__header{grid-template-columns:auto minmax(0,1fr)}.loro-card--benefit.loro-card--mobile-justify-center .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-center .loro-card__header{grid-template-columns:auto auto}.loro-card--benefit.loro-card--mobile-justify-end .loro-card__header,.loro-card--benefit-showcase.loro-card--mobile-justify-end .loro-card__header{grid-template-columns:auto minmax(0,1fr)}}@container (min-width: 18rem){.loro-card--home-primary,.loro-card--home-secondary{min-height:9.75rem}.loro-card--home-primary .loro-card__header,.loro-card--home-secondary .loro-card__header{display:block}.loro-card--home-hero{min-height:7.25rem;padding:1rem 1.25rem}.loro-card__hero-visual{width:clamp(5.25rem,20vw,7rem)}}\n"] }]
|
|
1862
1613
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], mobileJustify: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileJustify", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], showArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "showArrow", required: false }] }], arrowSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrowSize", required: false }] }], heroGreeting: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroGreeting", required: false }] }], heroSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroSubtitle", required: false }] }], heroAvatarSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroAvatarSrc", required: false }] }], heroAvatarAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroAvatarAlt", required: false }] }], heroAvatarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroAvatarIcon", required: false }] }], heroAvatarIconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroAvatarIconSize", required: false }] }], heroVisualImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroVisualImage", required: false }] }], heroVisualAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroVisualAlt", required: false }] }] } });
|
|
1863
1614
|
|
|
1864
1615
|
class LoroRadio {
|
|
@@ -1869,53 +1620,11 @@ class LoroRadio {
|
|
|
1869
1620
|
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1870
1621
|
selected = output();
|
|
1871
1622
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1872
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroRadio, isStandalone: true, selector: "loro-radio", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template:
|
|
1873
|
-
<button
|
|
1874
|
-
type="button"
|
|
1875
|
-
class="loro-radio"
|
|
1876
|
-
[class.loro-radio--row]="variant() === 'row'"
|
|
1877
|
-
[class.loro-radio--checked]="checked()"
|
|
1878
|
-
[attr.aria-pressed]="checked()"
|
|
1879
|
-
(click)="selected.emit(value())">
|
|
1880
|
-
@if (variant() !== 'row') {
|
|
1881
|
-
<span class="loro-radio__mark"></span>
|
|
1882
|
-
}
|
|
1883
|
-
<span class="loro-radio__copy">
|
|
1884
|
-
<span class="loro-radio__label">{{ label() }}</span>
|
|
1885
|
-
@if (description()) {
|
|
1886
|
-
<span class="loro-radio__description">{{ description() }}</span>
|
|
1887
|
-
}
|
|
1888
|
-
</span>
|
|
1889
|
-
@if (variant() === 'row') {
|
|
1890
|
-
<span class="loro-radio__mark"></span>
|
|
1891
|
-
}
|
|
1892
|
-
</button>
|
|
1893
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-radio{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;width:100%;min-height:3rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-radio--row{grid-template-columns:minmax(0,1fr) auto;min-height:4.35rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);background:var(--loro-surface)}.loro-radio__mark{position:relative;width:1.35rem;height:1.35rem;border:2px solid var(--loro-muted);border-radius:50%}.loro-radio__mark:after{position:absolute;inset:.24rem;border-radius:50%;background:var(--loro-primary-500);opacity:0;content:\"\"}.loro-radio--checked .loro-radio__mark{border-color:var(--loro-primary-500)}.loro-radio--checked .loro-radio__mark:after{opacity:1}.loro-radio__copy{display:grid;gap:.18rem;min-width:0}.loro-radio__label{font-size:1rem;font-weight:900;line-height:1.2}.loro-radio__description{color:var(--loro-muted);font-size:.88rem;font-weight:600;line-height:1.35}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroRadio, isStandalone: true, selector: "loro-radio", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"loro-radio\"\n [class.loro-radio--row]=\"variant() === 'row'\"\n [class.loro-radio--checked]=\"checked()\"\n [attr.aria-pressed]=\"checked()\"\n (click)=\"selected.emit(value())\">\n @if (variant() !== 'row') {\n <span class=\"loro-radio__mark\"></span>\n }\n <span class=\"loro-radio__copy\">\n <span class=\"loro-radio__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"loro-radio__description\">{{ description() }}</span>\n }\n </span>\n @if (variant() === 'row') {\n <span class=\"loro-radio__mark\"></span>\n }\n </button>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-radio{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;width:100%;min-height:3rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-radio--row{grid-template-columns:minmax(0,1fr) auto;min-height:4.35rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);background:var(--loro-surface)}.loro-radio__mark{position:relative;width:1.35rem;height:1.35rem;border:2px solid var(--loro-muted);border-radius:50%}.loro-radio__mark:after{position:absolute;inset:.24rem;border-radius:50%;background:var(--loro-primary-500);opacity:0;content:\"\"}.loro-radio--checked .loro-radio__mark{border-color:var(--loro-primary-500)}.loro-radio--checked .loro-radio__mark:after{opacity:1}.loro-radio__copy{display:grid;gap:.18rem;min-width:0}.loro-radio__label{font-size:1rem;font-weight:900;line-height:1.2}.loro-radio__description{color:var(--loro-muted);font-size:.88rem;font-weight:600;line-height:1.35}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1894
1624
|
}
|
|
1895
1625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroRadio, decorators: [{
|
|
1896
1626
|
type: Component,
|
|
1897
|
-
args: [{ selector: 'loro-radio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1898
|
-
<button
|
|
1899
|
-
type="button"
|
|
1900
|
-
class="loro-radio"
|
|
1901
|
-
[class.loro-radio--row]="variant() === 'row'"
|
|
1902
|
-
[class.loro-radio--checked]="checked()"
|
|
1903
|
-
[attr.aria-pressed]="checked()"
|
|
1904
|
-
(click)="selected.emit(value())">
|
|
1905
|
-
@if (variant() !== 'row') {
|
|
1906
|
-
<span class="loro-radio__mark"></span>
|
|
1907
|
-
}
|
|
1908
|
-
<span class="loro-radio__copy">
|
|
1909
|
-
<span class="loro-radio__label">{{ label() }}</span>
|
|
1910
|
-
@if (description()) {
|
|
1911
|
-
<span class="loro-radio__description">{{ description() }}</span>
|
|
1912
|
-
}
|
|
1913
|
-
</span>
|
|
1914
|
-
@if (variant() === 'row') {
|
|
1915
|
-
<span class="loro-radio__mark"></span>
|
|
1916
|
-
}
|
|
1917
|
-
</button>
|
|
1918
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-radio{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;width:100%;min-height:3rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-radio--row{grid-template-columns:minmax(0,1fr) auto;min-height:4.35rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);background:var(--loro-surface)}.loro-radio__mark{position:relative;width:1.35rem;height:1.35rem;border:2px solid var(--loro-muted);border-radius:50%}.loro-radio__mark:after{position:absolute;inset:.24rem;border-radius:50%;background:var(--loro-primary-500);opacity:0;content:\"\"}.loro-radio--checked .loro-radio__mark{border-color:var(--loro-primary-500)}.loro-radio--checked .loro-radio__mark:after{opacity:1}.loro-radio__copy{display:grid;gap:.18rem;min-width:0}.loro-radio__label{font-size:1rem;font-weight:900;line-height:1.2}.loro-radio__description{color:var(--loro-muted);font-size:.88rem;font-weight:600;line-height:1.35}\n"] }]
|
|
1627
|
+
args: [{ selector: 'loro-radio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"loro-radio\"\n [class.loro-radio--row]=\"variant() === 'row'\"\n [class.loro-radio--checked]=\"checked()\"\n [attr.aria-pressed]=\"checked()\"\n (click)=\"selected.emit(value())\">\n @if (variant() !== 'row') {\n <span class=\"loro-radio__mark\"></span>\n }\n <span class=\"loro-radio__copy\">\n <span class=\"loro-radio__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"loro-radio__description\">{{ description() }}</span>\n }\n </span>\n @if (variant() === 'row') {\n <span class=\"loro-radio__mark\"></span>\n }\n </button>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-radio{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;width:100%;min-height:3rem;border:0;background:transparent;color:var(--loro-text-strong);font:inherit;text-align:left;cursor:pointer}.loro-radio--row{grid-template-columns:minmax(0,1fr) auto;min-height:4.35rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);background:var(--loro-surface)}.loro-radio__mark{position:relative;width:1.35rem;height:1.35rem;border:2px solid var(--loro-muted);border-radius:50%}.loro-radio__mark:after{position:absolute;inset:.24rem;border-radius:50%;background:var(--loro-primary-500);opacity:0;content:\"\"}.loro-radio--checked .loro-radio__mark{border-color:var(--loro-primary-500)}.loro-radio--checked .loro-radio__mark:after{opacity:1}.loro-radio__copy{display:grid;gap:.18rem;min-width:0}.loro-radio__label{font-size:1rem;font-weight:900;line-height:1.2}.loro-radio__description{color:var(--loro-muted);font-size:.88rem;font-weight:600;line-height:1.35}\n"] }]
|
|
1919
1628
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
1920
1629
|
|
|
1921
1630
|
class LoroToggle {
|
|
@@ -1937,33 +1646,11 @@ class LoroToggle {
|
|
|
1937
1646
|
this.checkedChange.emit(nextChecked);
|
|
1938
1647
|
}
|
|
1939
1648
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1940
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: LoroToggle, isStandalone: true, selector: "loro-toggle", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange", checkedChange: "checkedChange" }, ngImport: i0, template:
|
|
1941
|
-
<button
|
|
1942
|
-
type="button"
|
|
1943
|
-
class="loro-toggle"
|
|
1944
|
-
[class.loro-toggle--checked]="checked()"
|
|
1945
|
-
[disabled]="disabled()"
|
|
1946
|
-
[attr.aria-label]="ariaLabel()"
|
|
1947
|
-
[attr.aria-pressed]="checked()"
|
|
1948
|
-
(click)="toggle()">
|
|
1949
|
-
<span class="loro-toggle__thumb"></span>
|
|
1950
|
-
</button>
|
|
1951
|
-
`, isInline: true, styles: [":host{display:inline-flex;flex:0 0 auto}.loro-toggle{position:relative;display:inline-flex;align-items:center;width:4rem;height:2.25rem;padding:.2rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface-muted);cursor:pointer;transition:background .16s ease,border-color .16s ease,opacity .16s ease}.loro-toggle__thumb{display:block;width:1.85rem;height:1.85rem;border-radius:50%;background:var(--loro-surface);box-shadow:0 3px 10px #2219492e;transition:transform .16s ease}.loro-toggle--checked{border-color:color-mix(in srgb,var(--loro-primary-500) 54%,transparent);background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-500))}.loro-toggle--checked .loro-toggle__thumb{transform:translate(1.75rem)}.loro-toggle:disabled{cursor:not-allowed;opacity:.7}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1649
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: LoroToggle, isStandalone: true, selector: "loro-toggle", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange", checkedChange: "checkedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"loro-toggle\"\n [class.loro-toggle--checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-pressed]=\"checked()\"\n (click)=\"toggle()\">\n <span class=\"loro-toggle__thumb\"></span>\n </button>", styles: [":host{display:inline-flex;flex:0 0 auto}.loro-toggle{position:relative;display:inline-flex;align-items:center;width:4rem;height:2.25rem;padding:.2rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface-muted);cursor:pointer;transition:background .16s ease,border-color .16s ease,opacity .16s ease}.loro-toggle__thumb{display:block;width:1.85rem;height:1.85rem;border-radius:50%;background:var(--loro-surface);box-shadow:0 3px 10px #2219492e;transition:transform .16s ease}.loro-toggle--checked{border-color:color-mix(in srgb,var(--loro-primary-500) 54%,transparent);background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-500))}.loro-toggle--checked .loro-toggle__thumb{transform:translate(1.75rem)}.loro-toggle:disabled{cursor:not-allowed;opacity:.7}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1952
1650
|
}
|
|
1953
1651
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroToggle, decorators: [{
|
|
1954
1652
|
type: Component,
|
|
1955
|
-
args: [{ selector: 'loro-toggle', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
1956
|
-
<button
|
|
1957
|
-
type="button"
|
|
1958
|
-
class="loro-toggle"
|
|
1959
|
-
[class.loro-toggle--checked]="checked()"
|
|
1960
|
-
[disabled]="disabled()"
|
|
1961
|
-
[attr.aria-label]="ariaLabel()"
|
|
1962
|
-
[attr.aria-pressed]="checked()"
|
|
1963
|
-
(click)="toggle()">
|
|
1964
|
-
<span class="loro-toggle__thumb"></span>
|
|
1965
|
-
</button>
|
|
1966
|
-
`, styles: [":host{display:inline-flex;flex:0 0 auto}.loro-toggle{position:relative;display:inline-flex;align-items:center;width:4rem;height:2.25rem;padding:.2rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface-muted);cursor:pointer;transition:background .16s ease,border-color .16s ease,opacity .16s ease}.loro-toggle__thumb{display:block;width:1.85rem;height:1.85rem;border-radius:50%;background:var(--loro-surface);box-shadow:0 3px 10px #2219492e;transition:transform .16s ease}.loro-toggle--checked{border-color:color-mix(in srgb,var(--loro-primary-500) 54%,transparent);background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-500))}.loro-toggle--checked .loro-toggle__thumb{transform:translate(1.75rem)}.loro-toggle:disabled{cursor:not-allowed;opacity:.7}\n"] }]
|
|
1653
|
+
args: [{ selector: 'loro-toggle', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"loro-toggle\"\n [class.loro-toggle--checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-pressed]=\"checked()\"\n (click)=\"toggle()\">\n <span class=\"loro-toggle__thumb\"></span>\n </button>", styles: [":host{display:inline-flex;flex:0 0 auto}.loro-toggle{position:relative;display:inline-flex;align-items:center;width:4rem;height:2.25rem;padding:.2rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface-muted);cursor:pointer;transition:background .16s ease,border-color .16s ease,opacity .16s ease}.loro-toggle__thumb{display:block;width:1.85rem;height:1.85rem;border-radius:50%;background:var(--loro-surface);box-shadow:0 3px 10px #2219492e;transition:transform .16s ease}.loro-toggle--checked{border-color:color-mix(in srgb,var(--loro-primary-500) 54%,transparent);background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-500))}.loro-toggle--checked .loro-toggle__thumb{transform:translate(1.75rem)}.loro-toggle:disabled{cursor:not-allowed;opacity:.7}\n"] }]
|
|
1967
1654
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
|
|
1968
1655
|
|
|
1969
1656
|
class LoroCardNav {
|
|
@@ -2000,111 +1687,11 @@ class LoroCardNav {
|
|
|
2000
1687
|
}
|
|
2001
1688
|
}
|
|
2002
1689
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroCardNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2003
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroCardNav, isStandalone: true, selector: "loro-card-nav", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, trailing: { classPropertyName: "trailing", publicName: "trailing", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, badgeLabel: { classPropertyName: "badgeLabel", publicName: "badgeLabel", isSignal: true, isRequired: false, transformFunction: null }, badgeVariant: { classPropertyName: "badgeVariant", publicName: "badgeVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", checkedChange: "checkedChange", selectedChange: "selectedChange" }, ngImport: i0, template:
|
|
2004
|
-
<button
|
|
2005
|
-
type="button"
|
|
2006
|
-
class="loro-card-nav"
|
|
2007
|
-
[class.loro-card-nav--danger]="variant() === 'danger'"
|
|
2008
|
-
[class.loro-card-nav--soft]="variant() === 'soft'"
|
|
2009
|
-
[class.loro-card-nav--selected]="selected()"
|
|
2010
|
-
(click)="activate()">
|
|
2011
|
-
@if (icon()) {
|
|
2012
|
-
<span class="loro-card-nav__icon">
|
|
2013
|
-
<loro-icon
|
|
2014
|
-
[name]="icon()!"
|
|
2015
|
-
[size]="iconSize()"
|
|
2016
|
-
[alt]="title()"
|
|
2017
|
-
[color]="variant() === 'danger' ? 'danger' : iconColor()" />
|
|
2018
|
-
</span>
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
<span class="loro-card-nav__copy">
|
|
2022
|
-
<span class="loro-card-nav__title">{{ title() }}</span>
|
|
2023
|
-
@if (description()) {
|
|
2024
|
-
<span class="loro-card-nav__description">{{ description() }}</span>
|
|
2025
|
-
}
|
|
2026
|
-
</span>
|
|
2027
|
-
|
|
2028
|
-
<span class="loro-card-nav__trailing" (click)="$event.stopPropagation()">
|
|
2029
|
-
@switch (trailing()) {
|
|
2030
|
-
@case ('toggle') {
|
|
2031
|
-
<loro-toggle [checked]="checked()" [ariaLabel]="title()" (checkedChange)="checkedChange.emit($event)" />
|
|
2032
|
-
}
|
|
2033
|
-
@case ('radio') {
|
|
2034
|
-
<loro-radio [label]="''" [value]="value()" [checked]="selected()" (selected)="selectedChange.emit($event)" />
|
|
2035
|
-
}
|
|
2036
|
-
@case ('text') {
|
|
2037
|
-
<span class="loro-card-nav__value">{{ value() }}</span>
|
|
2038
|
-
}
|
|
2039
|
-
@case ('badge') {
|
|
2040
|
-
<loro-badge [label]="badgeLabel() || value()" [variant]="badgeVariant()" />
|
|
2041
|
-
}
|
|
2042
|
-
@case ('arrow') {
|
|
2043
|
-
<loro-icon
|
|
2044
|
-
class="loro-card-nav__arrow"
|
|
2045
|
-
name="chevron-right"
|
|
2046
|
-
[size]="22"
|
|
2047
|
-
alt="Abrir"
|
|
2048
|
-
[color]="variant() === 'danger' ? 'danger' : 'primary'" />
|
|
2049
|
-
}
|
|
2050
|
-
}
|
|
2051
|
-
</span>
|
|
2052
|
-
</button>
|
|
2053
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-card-nav{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;width:100%;min-height:4.8rem;padding:.95rem 1.1rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:transparent;color:var(--loro-text);font:inherit;text-align:left;cursor:pointer}.loro-card-nav:last-child{border-bottom:0}.loro-card-nav--soft,.loro-card-nav--danger{border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-card-nav--danger{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-card-nav--selected{border-color:#6c3cff52;background:#6c3cff0a}.loro-card-nav__icon{display:grid;width:3.15rem;height:3.15rem;place-items:center;border-radius:.9rem;background:var(--loro-brand-tint-surface)}.loro-card-nav--danger .loro-card-nav__icon{background:color-mix(in srgb,var(--loro-danger-text) 12%,transparent)}.loro-card-nav__copy{display:grid;gap:.25rem;min-width:0}.loro-card-nav__title{color:currentColor;font-size:1rem;font-weight:900;line-height:1.2}.loro-card-nav__description{color:var(--loro-muted);font-size:.9rem;font-weight:600;line-height:1.35}.loro-card-nav--danger .loro-card-nav__description{color:color-mix(in srgb,var(--loro-danger-text) 72%,var(--loro-muted))}.loro-card-nav__trailing{display:inline-flex;align-items:center;justify-content:flex-end;min-width:0}.loro-card-nav__value{color:var(--loro-muted-strong);font-weight:800;white-space:nowrap}@media(max-width:520px){.loro-card-nav{gap:.85rem;min-height:5.2rem;padding-inline:1rem}.loro-card-nav__icon{width:3rem;height:3rem}}\n"], dependencies: [{ kind: "component", type: LoroBadge, selector: "loro-badge", inputs: ["label", "variant"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroRadio, selector: "loro-radio", inputs: ["label", "value", "description", "checked", "variant"], outputs: ["selected"] }, { kind: "component", type: LoroToggle, selector: "loro-toggle", inputs: ["checked", "disabled", "required", "invalid", "errors", "touched", "ariaLabel"], outputs: ["checkedChange", "touchedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1690
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroCardNav, isStandalone: true, selector: "loro-card-nav", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, trailing: { classPropertyName: "trailing", publicName: "trailing", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, badgeLabel: { classPropertyName: "badgeLabel", publicName: "badgeLabel", isSignal: true, isRequired: false, transformFunction: null }, badgeVariant: { classPropertyName: "badgeVariant", publicName: "badgeVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", checkedChange: "checkedChange", selectedChange: "selectedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"loro-card-nav\"\n [class.loro-card-nav--danger]=\"variant() === 'danger'\"\n [class.loro-card-nav--soft]=\"variant() === 'soft'\"\n [class.loro-card-nav--selected]=\"selected()\"\n (click)=\"activate()\">\n @if (icon()) {\n <span class=\"loro-card-nav__icon\">\n <loro-icon\n [name]=\"icon()!\"\n [size]=\"iconSize()\"\n [alt]=\"title()\"\n [color]=\"variant() === 'danger' ? 'danger' : iconColor()\" />\n </span>\n }\n\n <span class=\"loro-card-nav__copy\">\n <span class=\"loro-card-nav__title\">{{ title() }}</span>\n @if (description()) {\n <span class=\"loro-card-nav__description\">{{ description() }}</span>\n }\n </span>\n\n <span class=\"loro-card-nav__trailing\" (click)=\"$event.stopPropagation()\">\n @switch (trailing()) {\n @case ('toggle') {\n <loro-toggle [checked]=\"checked()\" [ariaLabel]=\"title()\" (checkedChange)=\"checkedChange.emit($event)\" />\n }\n @case ('radio') {\n <loro-radio [label]=\"''\" [value]=\"value()\" [checked]=\"selected()\" (selected)=\"selectedChange.emit($event)\" />\n }\n @case ('text') {\n <span class=\"loro-card-nav__value\">{{ value() }}</span>\n }\n @case ('badge') {\n <loro-badge [label]=\"badgeLabel() || value()\" [variant]=\"badgeVariant()\" />\n }\n @case ('arrow') {\n <loro-icon\n class=\"loro-card-nav__arrow\"\n name=\"chevron-right\"\n [size]=\"22\"\n alt=\"Abrir\"\n [color]=\"variant() === 'danger' ? 'danger' : 'primary'\" />\n }\n }\n </span>\n </button>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-card-nav{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;width:100%;min-height:4.8rem;padding:.95rem 1.1rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:transparent;color:var(--loro-text);font:inherit;text-align:left;cursor:pointer}.loro-card-nav:last-child{border-bottom:0}.loro-card-nav--soft,.loro-card-nav--danger{border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-card-nav--danger{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-card-nav--selected{border-color:#6c3cff52;background:#6c3cff0a}.loro-card-nav__icon{display:grid;width:3.15rem;height:3.15rem;place-items:center;border-radius:.9rem;background:var(--loro-brand-tint-surface)}.loro-card-nav--danger .loro-card-nav__icon{background:color-mix(in srgb,var(--loro-danger-text) 12%,transparent)}.loro-card-nav__copy{display:grid;gap:.25rem;min-width:0}.loro-card-nav__title{color:currentColor;font-size:1rem;font-weight:900;line-height:1.2}.loro-card-nav__description{color:var(--loro-muted);font-size:.9rem;font-weight:600;line-height:1.35}.loro-card-nav--danger .loro-card-nav__description{color:color-mix(in srgb,var(--loro-danger-text) 72%,var(--loro-muted))}.loro-card-nav__trailing{display:inline-flex;align-items:center;justify-content:flex-end;min-width:0}.loro-card-nav__value{color:var(--loro-muted-strong);font-weight:800;white-space:nowrap}@media(max-width:520px){.loro-card-nav{gap:.85rem;min-height:5.2rem;padding-inline:1rem}.loro-card-nav__icon{width:3rem;height:3rem}}\n"], dependencies: [{ kind: "component", type: LoroBadge, selector: "loro-badge", inputs: ["label", "variant"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroRadio, selector: "loro-radio", inputs: ["label", "value", "description", "checked", "variant"], outputs: ["selected"] }, { kind: "component", type: LoroToggle, selector: "loro-toggle", inputs: ["checked", "disabled", "required", "invalid", "errors", "touched", "ariaLabel"], outputs: ["checkedChange", "touchedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2054
1691
|
}
|
|
2055
1692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroCardNav, decorators: [{
|
|
2056
1693
|
type: Component,
|
|
2057
|
-
args: [{ selector: 'loro-card-nav', standalone: true, imports: [LoroBadge, LoroIcon, LoroRadio, LoroToggle], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
2058
|
-
<button
|
|
2059
|
-
type="button"
|
|
2060
|
-
class="loro-card-nav"
|
|
2061
|
-
[class.loro-card-nav--danger]="variant() === 'danger'"
|
|
2062
|
-
[class.loro-card-nav--soft]="variant() === 'soft'"
|
|
2063
|
-
[class.loro-card-nav--selected]="selected()"
|
|
2064
|
-
(click)="activate()">
|
|
2065
|
-
@if (icon()) {
|
|
2066
|
-
<span class="loro-card-nav__icon">
|
|
2067
|
-
<loro-icon
|
|
2068
|
-
[name]="icon()!"
|
|
2069
|
-
[size]="iconSize()"
|
|
2070
|
-
[alt]="title()"
|
|
2071
|
-
[color]="variant() === 'danger' ? 'danger' : iconColor()" />
|
|
2072
|
-
</span>
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
<span class="loro-card-nav__copy">
|
|
2076
|
-
<span class="loro-card-nav__title">{{ title() }}</span>
|
|
2077
|
-
@if (description()) {
|
|
2078
|
-
<span class="loro-card-nav__description">{{ description() }}</span>
|
|
2079
|
-
}
|
|
2080
|
-
</span>
|
|
2081
|
-
|
|
2082
|
-
<span class="loro-card-nav__trailing" (click)="$event.stopPropagation()">
|
|
2083
|
-
@switch (trailing()) {
|
|
2084
|
-
@case ('toggle') {
|
|
2085
|
-
<loro-toggle [checked]="checked()" [ariaLabel]="title()" (checkedChange)="checkedChange.emit($event)" />
|
|
2086
|
-
}
|
|
2087
|
-
@case ('radio') {
|
|
2088
|
-
<loro-radio [label]="''" [value]="value()" [checked]="selected()" (selected)="selectedChange.emit($event)" />
|
|
2089
|
-
}
|
|
2090
|
-
@case ('text') {
|
|
2091
|
-
<span class="loro-card-nav__value">{{ value() }}</span>
|
|
2092
|
-
}
|
|
2093
|
-
@case ('badge') {
|
|
2094
|
-
<loro-badge [label]="badgeLabel() || value()" [variant]="badgeVariant()" />
|
|
2095
|
-
}
|
|
2096
|
-
@case ('arrow') {
|
|
2097
|
-
<loro-icon
|
|
2098
|
-
class="loro-card-nav__arrow"
|
|
2099
|
-
name="chevron-right"
|
|
2100
|
-
[size]="22"
|
|
2101
|
-
alt="Abrir"
|
|
2102
|
-
[color]="variant() === 'danger' ? 'danger' : 'primary'" />
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
</span>
|
|
2106
|
-
</button>
|
|
2107
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-card-nav{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;width:100%;min-height:4.8rem;padding:.95rem 1.1rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:transparent;color:var(--loro-text);font:inherit;text-align:left;cursor:pointer}.loro-card-nav:last-child{border-bottom:0}.loro-card-nav--soft,.loro-card-nav--danger{border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-card-nav--danger{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-card-nav--selected{border-color:#6c3cff52;background:#6c3cff0a}.loro-card-nav__icon{display:grid;width:3.15rem;height:3.15rem;place-items:center;border-radius:.9rem;background:var(--loro-brand-tint-surface)}.loro-card-nav--danger .loro-card-nav__icon{background:color-mix(in srgb,var(--loro-danger-text) 12%,transparent)}.loro-card-nav__copy{display:grid;gap:.25rem;min-width:0}.loro-card-nav__title{color:currentColor;font-size:1rem;font-weight:900;line-height:1.2}.loro-card-nav__description{color:var(--loro-muted);font-size:.9rem;font-weight:600;line-height:1.35}.loro-card-nav--danger .loro-card-nav__description{color:color-mix(in srgb,var(--loro-danger-text) 72%,var(--loro-muted))}.loro-card-nav__trailing{display:inline-flex;align-items:center;justify-content:flex-end;min-width:0}.loro-card-nav__value{color:var(--loro-muted-strong);font-weight:800;white-space:nowrap}@media(max-width:520px){.loro-card-nav{gap:.85rem;min-height:5.2rem;padding-inline:1rem}.loro-card-nav__icon{width:3rem;height:3rem}}\n"] }]
|
|
1694
|
+
args: [{ selector: 'loro-card-nav', standalone: true, imports: [LoroBadge, LoroIcon, LoroRadio, LoroToggle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"loro-card-nav\"\n [class.loro-card-nav--danger]=\"variant() === 'danger'\"\n [class.loro-card-nav--soft]=\"variant() === 'soft'\"\n [class.loro-card-nav--selected]=\"selected()\"\n (click)=\"activate()\">\n @if (icon()) {\n <span class=\"loro-card-nav__icon\">\n <loro-icon\n [name]=\"icon()!\"\n [size]=\"iconSize()\"\n [alt]=\"title()\"\n [color]=\"variant() === 'danger' ? 'danger' : iconColor()\" />\n </span>\n }\n\n <span class=\"loro-card-nav__copy\">\n <span class=\"loro-card-nav__title\">{{ title() }}</span>\n @if (description()) {\n <span class=\"loro-card-nav__description\">{{ description() }}</span>\n }\n </span>\n\n <span class=\"loro-card-nav__trailing\" (click)=\"$event.stopPropagation()\">\n @switch (trailing()) {\n @case ('toggle') {\n <loro-toggle [checked]=\"checked()\" [ariaLabel]=\"title()\" (checkedChange)=\"checkedChange.emit($event)\" />\n }\n @case ('radio') {\n <loro-radio [label]=\"''\" [value]=\"value()\" [checked]=\"selected()\" (selected)=\"selectedChange.emit($event)\" />\n }\n @case ('text') {\n <span class=\"loro-card-nav__value\">{{ value() }}</span>\n }\n @case ('badge') {\n <loro-badge [label]=\"badgeLabel() || value()\" [variant]=\"badgeVariant()\" />\n }\n @case ('arrow') {\n <loro-icon\n class=\"loro-card-nav__arrow\"\n name=\"chevron-right\"\n [size]=\"22\"\n alt=\"Abrir\"\n [color]=\"variant() === 'danger' ? 'danger' : 'primary'\" />\n }\n }\n </span>\n </button>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-card-nav{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;width:100%;min-height:4.8rem;padding:.95rem 1.1rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:transparent;color:var(--loro-text);font:inherit;text-align:left;cursor:pointer}.loro-card-nav:last-child{border-bottom:0}.loro-card-nav--soft,.loro-card-nav--danger{border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-card-nav--danger{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-card-nav--selected{border-color:#6c3cff52;background:#6c3cff0a}.loro-card-nav__icon{display:grid;width:3.15rem;height:3.15rem;place-items:center;border-radius:.9rem;background:var(--loro-brand-tint-surface)}.loro-card-nav--danger .loro-card-nav__icon{background:color-mix(in srgb,var(--loro-danger-text) 12%,transparent)}.loro-card-nav__copy{display:grid;gap:.25rem;min-width:0}.loro-card-nav__title{color:currentColor;font-size:1rem;font-weight:900;line-height:1.2}.loro-card-nav__description{color:var(--loro-muted);font-size:.9rem;font-weight:600;line-height:1.35}.loro-card-nav--danger .loro-card-nav__description{color:color-mix(in srgb,var(--loro-danger-text) 72%,var(--loro-muted))}.loro-card-nav__trailing{display:inline-flex;align-items:center;justify-content:flex-end;min-width:0}.loro-card-nav__value{color:var(--loro-muted-strong);font-weight:800;white-space:nowrap}@media(max-width:520px){.loro-card-nav{gap:.85rem;min-height:5.2rem;padding-inline:1rem}.loro-card-nav__icon{width:3rem;height:3rem}}\n"] }]
|
|
2108
1695
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], trailing: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailing", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], badgeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeLabel", required: false }] }], badgeVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeVariant", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }] } });
|
|
2109
1696
|
|
|
2110
1697
|
class LoroDashboardCard {
|
|
@@ -2293,273 +1880,11 @@ class LoroInput {
|
|
|
2293
1880
|
return normalized.includes(',') ? `${nextInteger},${nextDecimal}` : nextInteger.slice(0, 3);
|
|
2294
1881
|
}
|
|
2295
1882
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2296
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroInput, isStandalone: true, selector: "loro-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, inputmode: { classPropertyName: "inputmode", publicName: "inputmode", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingIconSize: { classPropertyName: "trailingIconSize", publicName: "trailingIconSize", isSignal: true, isRequired: false, transformFunction: null }, trailingAriaLabel: { classPropertyName: "trailingAriaLabel", publicName: "trailingAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", trailingClick: "trailingClick" }, viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2297
|
-
@if (variant() === 'stepper') {
|
|
2298
|
-
<span
|
|
2299
|
-
class="loro-input loro-input--stepper-field"
|
|
2300
|
-
[class.loro-input--error]="hasError()"
|
|
2301
|
-
[class.loro-input--success]="hasSuccess()">
|
|
2302
|
-
@if (label()) {
|
|
2303
|
-
<span class="loro-input__label">{{ label() }}</span>
|
|
2304
|
-
}
|
|
2305
|
-
<span
|
|
2306
|
-
class="loro-input--stepper"
|
|
2307
|
-
[class.loro-input--stepper-kg]="normalizedUnit() === 'kg'"
|
|
2308
|
-
[class.loro-input--stepper-ud]="normalizedUnit() === 'ud'"
|
|
2309
|
-
role="group"
|
|
2310
|
-
[attr.aria-label]="label() || 'Cantidad'"
|
|
2311
|
-
>
|
|
2312
|
-
<button type="button" aria-label="Restar" [disabled]="disabled()" (click)="adjust(-step())">-</button>
|
|
2313
|
-
<span class="loro-input__stepper-value">
|
|
2314
|
-
<input
|
|
2315
|
-
#control
|
|
2316
|
-
[attr.inputmode]="normalizedUnit() === 'kg' ? 'decimal' : 'numeric'"
|
|
2317
|
-
[attr.size]="stepperInputSize()"
|
|
2318
|
-
[attr.maxlength]="stepperInputMaxLength()"
|
|
2319
|
-
[attr.max]="max()"
|
|
2320
|
-
[attr.min]="min()"
|
|
2321
|
-
[value]="value()"
|
|
2322
|
-
[disabled]="disabled()"
|
|
2323
|
-
[readonly]="readonly()"
|
|
2324
|
-
[required]="required()"
|
|
2325
|
-
[attr.aria-label]="label() || 'Cantidad'"
|
|
2326
|
-
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
2327
|
-
[attr.aria-describedby]="hasError() && errorText() ? errorId : null"
|
|
2328
|
-
(keydown.enter)="$any($event.target).blur()"
|
|
2329
|
-
(input)="sanitizeStepperInput($event)"
|
|
2330
|
-
(blur)="markAsTouched(); normalizeValue(($any($event.target).value ?? '').toString())"
|
|
2331
|
-
/>
|
|
2332
|
-
<span>{{ normalizedUnit() }}</span>
|
|
2333
|
-
</span>
|
|
2334
|
-
<button type="button" aria-label="Sumar" [disabled]="disabled()" (click)="adjust(step())">+</button>
|
|
2335
|
-
</span>
|
|
2336
|
-
@if (hasError() && errorText()) {
|
|
2337
|
-
<span class="loro-input__error" [id]="errorId">
|
|
2338
|
-
<loro-icon name="shield-alert" [size]="16" color="danger" [decorative]="true" />
|
|
2339
|
-
<span>{{ errorText() }}</span>
|
|
2340
|
-
</span>
|
|
2341
|
-
} @else if (hasLoading() && helperText()) {
|
|
2342
|
-
<span class="loro-input__loading" aria-live="polite">
|
|
2343
|
-
<span>{{ helperText() }}</span>
|
|
2344
|
-
</span>
|
|
2345
|
-
} @else if (hasSuccess() && helperText()) {
|
|
2346
|
-
<span class="loro-input__success">
|
|
2347
|
-
<loro-icon name="check" [size]="16" color="success" [decorative]="true" />
|
|
2348
|
-
<span>{{ helperText() }}</span>
|
|
2349
|
-
</span>
|
|
2350
|
-
} @else if (helperText()) {
|
|
2351
|
-
<span class="loro-input__helper">{{ helperText() }}</span>
|
|
2352
|
-
}
|
|
2353
|
-
</span>
|
|
2354
|
-
} @else {
|
|
2355
|
-
<label
|
|
2356
|
-
class="loro-input"
|
|
2357
|
-
[class.loro-input--has-icon]="icon() || variant() === 'search'"
|
|
2358
|
-
[class.loro-input--error]="hasError()"
|
|
2359
|
-
[class.loro-input--success]="hasSuccess()"
|
|
2360
|
-
[class.loro-input--loading]="hasLoading()"
|
|
2361
|
-
>
|
|
2362
|
-
@if (label()) {
|
|
2363
|
-
<span class="loro-input__label">{{ label() }}</span>
|
|
2364
|
-
}
|
|
2365
|
-
<span class="loro-input__control">
|
|
2366
|
-
@if (icon() || variant() === 'search') {
|
|
2367
|
-
<loro-icon
|
|
2368
|
-
[name]="icon() || 'search'"
|
|
2369
|
-
[size]="iconSize()"
|
|
2370
|
-
[alt]="label() || placeholder()"
|
|
2371
|
-
[color]="resolvedLeadingIconColor()"
|
|
2372
|
-
/>
|
|
2373
|
-
}
|
|
2374
|
-
<input
|
|
2375
|
-
#control
|
|
2376
|
-
[type]="type()"
|
|
2377
|
-
[attr.name]="name() || null"
|
|
2378
|
-
[placeholder]="placeholder()"
|
|
2379
|
-
[value]="value()"
|
|
2380
|
-
[disabled]="disabled()"
|
|
2381
|
-
[readonly]="readonly()"
|
|
2382
|
-
[required]="required()"
|
|
2383
|
-
[attr.autocomplete]="autocomplete() || null"
|
|
2384
|
-
[attr.inputmode]="inputmode() || null"
|
|
2385
|
-
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
2386
|
-
[attr.aria-describedby]="hasError() && errorText() ? errorId : null"
|
|
2387
|
-
(input)="updateValue(($any($event.target).value ?? '').toString())"
|
|
2388
|
-
(blur)="markAsTouched()"
|
|
2389
|
-
/>
|
|
2390
|
-
@if (trailingIcon()) {
|
|
2391
|
-
<button
|
|
2392
|
-
type="button"
|
|
2393
|
-
class="loro-input__trailing-button"
|
|
2394
|
-
[attr.aria-label]="trailingAriaLabel() || null"
|
|
2395
|
-
(click)="trailingClick.emit()"
|
|
2396
|
-
>
|
|
2397
|
-
<loro-icon
|
|
2398
|
-
[name]="trailingIcon()!"
|
|
2399
|
-
[size]="trailingIconSize()"
|
|
2400
|
-
alt=""
|
|
2401
|
-
[decorative]="true"
|
|
2402
|
-
[color]="resolvedTrailingIconColor()"
|
|
2403
|
-
/>
|
|
2404
|
-
</button>
|
|
2405
|
-
}
|
|
2406
|
-
</span>
|
|
2407
|
-
@if (hasError() && errorText()) {
|
|
2408
|
-
<span class="loro-input__error" [id]="errorId">
|
|
2409
|
-
<loro-icon name="shield-alert" [size]="16" color="danger" [decorative]="true" />
|
|
2410
|
-
<span>{{ errorText() }}</span>
|
|
2411
|
-
</span>
|
|
2412
|
-
} @else if (hasLoading() && helperText()) {
|
|
2413
|
-
<span class="loro-input__loading" aria-live="polite">
|
|
2414
|
-
<span class="loro-input__loader" aria-hidden="true"></span>
|
|
2415
|
-
<span>{{ helperText() }}</span>
|
|
2416
|
-
</span>
|
|
2417
|
-
} @else if (hasSuccess() && helperText()) {
|
|
2418
|
-
<span class="loro-input__success">
|
|
2419
|
-
<loro-icon name="check" [size]="16" color="success" [decorative]="true" />
|
|
2420
|
-
<span>{{ helperText() }}</span>
|
|
2421
|
-
</span>
|
|
2422
|
-
} @else if (helperText()) {
|
|
2423
|
-
<span class="loro-input__helper">{{ helperText() }}</span>
|
|
2424
|
-
}
|
|
2425
|
-
</label>
|
|
2426
|
-
}
|
|
2427
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-input{display:grid;gap:.55rem;color:var(--loro-text)}.loro-input__label{color:var(--loro-muted-strong);font-size:var(--loro-input-label-font-size, .95rem);font-weight:var(--loro-input-label-font-weight, 800);line-height:var(--loro-input-label-line-height, 1.2)}.loro-input__control{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-height:var(--loro-input-control-min-height, 3.4rem);padding:var(--loro-input-control-padding, 0 1rem);border:1px solid var(--loro-input-control-border-color, var(--loro-border-subtle));border-radius:var(--loro-input-control-radius, var(--loro-radius-input));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:var(--loro-input-control-shadow, none);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-input--has-icon .loro-input__control{grid-template-columns:auto minmax(0,1fr);gap:var(--loro-input-control-gap, .8rem)}.loro-input--has-icon:has(.loro-input__trailing-button) .loro-input__control{grid-template-columns:auto minmax(0,1fr) auto}.loro-input__control input{font-size:var(--loro-input-field-font-size, 1rem);line-height:var(--loro-input-field-line-height, 1.2)}input{width:100%;border:0;outline:0;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:var(--loro-input-field-font-weight, 700)}input::placeholder{color:var(--loro-muted);font-weight:var(--loro-input-placeholder-font-weight, 600);opacity:var(--loro-input-placeholder-opacity, 1)}.loro-input__trailing-button{display:grid;width:2.5rem;height:2.5rem;place-items:center;margin-right:-.55rem;border:0;border-radius:50%;color:var(--loro-muted);background:transparent;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input__trailing-button:hover,.loro-input__trailing-button:focus-visible{color:var(--loro-primary-700);background:color-mix(in srgb,var(--loro-primary-500) 10%,transparent);outline:none}.loro-input--error .loro-input__control{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input__label{color:color-mix(in srgb,var(--loro-danger-text) 68%,var(--loro-muted-strong))}.loro-input--success .loro-input__control{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input__label{color:color-mix(in srgb,var(--loro-success, #1f9d55) 72%,var(--loro-muted-strong))}.loro-input--loading .loro-input__control{border-color:color-mix(in srgb,var(--loro-primary-500) 22%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}.loro-input__control:focus-within{border-color:var(--loro-input-control-focus-border-color, var(--loro-primary-500));box-shadow:var(--loro-input-control-focus-shadow, 0 0 0 3px color-mix(in srgb, var(--loro-primary-500) 16%, transparent))}.loro-input__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-danger-text);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__helper{display:inline-block;color:var(--loro-muted);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__success{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-success, #1f9d55);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loading{display:flex;align-items:center;gap:.35rem;color:var(--loro-primary-700);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loader{width:1rem;height:1rem;border:2px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-input-spin .75s linear infinite}.loro-input--stepper{display:grid;grid-template-columns:1.85rem minmax(3.9rem,1fr) 1.85rem;align-items:center;min-width:0;min-height:2.25rem;overflow:hidden;border:1px solid color-mix(in srgb,var(--loro-primary-500) 12%,var(--loro-border-subtle) 88%);border-radius:.65rem;background:var(--loro-surface);color:var(--loro-text-strong);font-weight:900;text-align:center;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent)}.loro-input--stepper button{height:100%;min-width:0;border:0;background:transparent;color:var(--loro-primary-700);font:inherit;font-weight:950;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input--stepper button:active{background:color-mix(in srgb,var(--loro-primary-500) 10%,var(--loro-surface) 90%)}.loro-input__stepper-value{display:inline-grid;grid-template-columns:minmax(1.55rem,max-content) auto;align-items:center;justify-content:center;gap:.18rem;min-width:0;overflow:hidden;padding-inline:.1rem;white-space:nowrap}.loro-input--stepper input{width:auto;min-width:1.55rem;max-width:2.75rem;overflow:hidden;padding:0;text-align:right;text-overflow:clip;white-space:nowrap;font-weight:900;font-size:clamp(.85rem,2.4vw,.98rem);letter-spacing:-.02em}.loro-input__stepper-value span{min-width:1.05rem;color:var(--loro-text-strong);font-size:clamp(.8rem,2.2vw,.92rem);font-weight:950;line-height:1}.loro-input--stepper-kg input{min-width:2.1rem;max-width:2.35rem}@media(max-width:1023.88px){.loro-input__control input{font-size:16px}.loro-input--stepper{grid-template-columns:1.65rem minmax(3.65rem,1fr) 1.65rem;min-height:2.2rem}.loro-input__stepper-value{gap:.16rem}}@keyframes loro-input-spin{to{transform:rotate(360deg)}}@keyframes loro-input-dot-blink{0%,20%{opacity:.25}50%{opacity:1}to{opacity:.25}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1883
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroInput, isStandalone: true, selector: "loro-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, inputmode: { classPropertyName: "inputmode", publicName: "inputmode", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingIconSize: { classPropertyName: "trailingIconSize", publicName: "trailingIconSize", isSignal: true, isRequired: false, transformFunction: null }, trailingAriaLabel: { classPropertyName: "trailingAriaLabel", publicName: "trailingAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", trailingClick: "trailingClick" }, viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (variant() === 'stepper') {\n <span\n class=\"loro-input loro-input--stepper-field\"\n [class.loro-input--error]=\"hasError()\"\n [class.loro-input--success]=\"hasSuccess()\">\n @if (label()) {\n <span class=\"loro-input__label\">{{ label() }}</span>\n }\n <span\n class=\"loro-input--stepper\"\n [class.loro-input--stepper-kg]=\"normalizedUnit() === 'kg'\"\n [class.loro-input--stepper-ud]=\"normalizedUnit() === 'ud'\"\n role=\"group\"\n [attr.aria-label]=\"label() || 'Cantidad'\"\n >\n <button type=\"button\" aria-label=\"Restar\" [disabled]=\"disabled()\" (click)=\"adjust(-step())\">-</button>\n <span class=\"loro-input__stepper-value\">\n <input\n #control\n [attr.inputmode]=\"normalizedUnit() === 'kg' ? 'decimal' : 'numeric'\"\n [attr.size]=\"stepperInputSize()\"\n [attr.maxlength]=\"stepperInputMaxLength()\"\n [attr.max]=\"max()\"\n [attr.min]=\"min()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.aria-label]=\"label() || 'Cantidad'\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [attr.aria-describedby]=\"hasError() && errorText() ? errorId : null\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (input)=\"sanitizeStepperInput($event)\"\n (blur)=\"markAsTouched(); normalizeValue(($any($event.target).value ?? '').toString())\"\n />\n <span>{{ normalizedUnit() }}</span>\n </span>\n <button type=\"button\" aria-label=\"Sumar\" [disabled]=\"disabled()\" (click)=\"adjust(step())\">+</button>\n </span>\n @if (hasError() && errorText()) {\n <span class=\"loro-input__error\" [id]=\"errorId\">\n <loro-icon name=\"shield-alert\" [size]=\"16\" color=\"danger\" [decorative]=\"true\" />\n <span>{{ errorText() }}</span>\n </span>\n } @else if (hasLoading() && helperText()) {\n <span class=\"loro-input__loading\" aria-live=\"polite\">\n <span>{{ helperText() }}</span>\n </span>\n } @else if (hasSuccess() && helperText()) {\n <span class=\"loro-input__success\">\n <loro-icon name=\"check\" [size]=\"16\" color=\"success\" [decorative]=\"true\" />\n <span>{{ helperText() }}</span>\n </span>\n } @else if (helperText()) {\n <span class=\"loro-input__helper\">{{ helperText() }}</span>\n }\n </span>\n } @else {\n <label\n class=\"loro-input\"\n [class.loro-input--has-icon]=\"icon() || variant() === 'search'\"\n [class.loro-input--error]=\"hasError()\"\n [class.loro-input--success]=\"hasSuccess()\"\n [class.loro-input--loading]=\"hasLoading()\"\n >\n @if (label()) {\n <span class=\"loro-input__label\">{{ label() }}</span>\n }\n <span class=\"loro-input__control\">\n @if (icon() || variant() === 'search') {\n <loro-icon\n [name]=\"icon() || 'search'\"\n [size]=\"iconSize()\"\n [alt]=\"label() || placeholder()\"\n [color]=\"resolvedLeadingIconColor()\"\n />\n }\n <input\n #control\n [type]=\"type()\"\n [attr.name]=\"name() || null\"\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.inputmode]=\"inputmode() || null\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [attr.aria-describedby]=\"hasError() && errorText() ? errorId : null\"\n (input)=\"updateValue(($any($event.target).value ?? '').toString())\"\n (blur)=\"markAsTouched()\"\n />\n @if (trailingIcon()) {\n <button\n type=\"button\"\n class=\"loro-input__trailing-button\"\n [attr.aria-label]=\"trailingAriaLabel() || null\"\n (click)=\"trailingClick.emit()\"\n >\n <loro-icon\n [name]=\"trailingIcon()!\"\n [size]=\"trailingIconSize()\"\n alt=\"\"\n [decorative]=\"true\"\n [color]=\"resolvedTrailingIconColor()\"\n />\n </button>\n }\n </span>\n @if (hasError() && errorText()) {\n <span class=\"loro-input__error\" [id]=\"errorId\">\n <loro-icon name=\"shield-alert\" [size]=\"16\" color=\"danger\" [decorative]=\"true\" />\n <span>{{ errorText() }}</span>\n </span>\n } @else if (hasLoading() && helperText()) {\n <span class=\"loro-input__loading\" aria-live=\"polite\">\n <span class=\"loro-input__loader\" aria-hidden=\"true\"></span>\n <span>{{ helperText() }}</span>\n </span>\n } @else if (hasSuccess() && helperText()) {\n <span class=\"loro-input__success\">\n <loro-icon name=\"check\" [size]=\"16\" color=\"success\" [decorative]=\"true\" />\n <span>{{ helperText() }}</span>\n </span>\n } @else if (helperText()) {\n <span class=\"loro-input__helper\">{{ helperText() }}</span>\n }\n </label>\n }", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-input{display:grid;gap:.55rem;color:var(--loro-text)}.loro-input__label{color:var(--loro-muted-strong);font-size:var(--loro-input-label-font-size, .95rem);font-weight:var(--loro-input-label-font-weight, 800);line-height:var(--loro-input-label-line-height, 1.2)}.loro-input__control{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-height:var(--loro-input-control-min-height, 3.4rem);padding:var(--loro-input-control-padding, 0 1rem);border:1px solid var(--loro-input-control-border-color, var(--loro-border-subtle));border-radius:var(--loro-input-control-radius, var(--loro-radius-input));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:var(--loro-input-control-shadow, none);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-input--has-icon .loro-input__control{grid-template-columns:auto minmax(0,1fr);gap:var(--loro-input-control-gap, .8rem)}.loro-input--has-icon:has(.loro-input__trailing-button) .loro-input__control{grid-template-columns:auto minmax(0,1fr) auto}.loro-input__control input{font-size:var(--loro-input-field-font-size, 1rem);line-height:var(--loro-input-field-line-height, 1.2)}input{width:100%;border:0;outline:0;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:var(--loro-input-field-font-weight, 700)}input::placeholder{color:var(--loro-muted);font-weight:var(--loro-input-placeholder-font-weight, 600);opacity:var(--loro-input-placeholder-opacity, 1)}.loro-input__trailing-button{display:grid;width:2.5rem;height:2.5rem;place-items:center;margin-right:-.55rem;border:0;border-radius:50%;color:var(--loro-muted);background:transparent;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input__trailing-button:hover,.loro-input__trailing-button:focus-visible{color:var(--loro-primary-700);background:color-mix(in srgb,var(--loro-primary-500) 10%,transparent);outline:none}.loro-input--error .loro-input__control{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input__label{color:color-mix(in srgb,var(--loro-danger-text) 68%,var(--loro-muted-strong))}.loro-input--success .loro-input__control{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input__label{color:color-mix(in srgb,var(--loro-success, #1f9d55) 72%,var(--loro-muted-strong))}.loro-input--loading .loro-input__control{border-color:color-mix(in srgb,var(--loro-primary-500) 22%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}.loro-input__control:focus-within{border-color:var(--loro-input-control-focus-border-color, var(--loro-primary-500));box-shadow:var(--loro-input-control-focus-shadow, 0 0 0 3px color-mix(in srgb, var(--loro-primary-500) 16%, transparent))}.loro-input__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-danger-text);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__helper{display:inline-block;color:var(--loro-muted);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__success{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-success, #1f9d55);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loading{display:flex;align-items:center;gap:.35rem;color:var(--loro-primary-700);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loader{width:1rem;height:1rem;border:2px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-input-spin .75s linear infinite}.loro-input--stepper{display:grid;grid-template-columns:1.85rem minmax(3.9rem,1fr) 1.85rem;align-items:center;min-width:0;min-height:2.25rem;overflow:hidden;border:1px solid color-mix(in srgb,var(--loro-primary-500) 12%,var(--loro-border-subtle) 88%);border-radius:.65rem;background:var(--loro-surface);color:var(--loro-text-strong);font-weight:900;text-align:center;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent)}.loro-input--stepper button{height:100%;min-width:0;border:0;background:transparent;color:var(--loro-primary-700);font:inherit;font-weight:950;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input--stepper button:active{background:color-mix(in srgb,var(--loro-primary-500) 10%,var(--loro-surface) 90%)}.loro-input__stepper-value{display:inline-grid;grid-template-columns:minmax(1.55rem,max-content) auto;align-items:center;justify-content:center;gap:.18rem;min-width:0;overflow:hidden;padding-inline:.1rem;white-space:nowrap}.loro-input--stepper input{width:auto;min-width:1.55rem;max-width:2.75rem;overflow:hidden;padding:0;text-align:right;text-overflow:clip;white-space:nowrap;font-weight:900;font-size:clamp(.85rem,2.4vw,.98rem);letter-spacing:-.02em}.loro-input__stepper-value span{min-width:1.05rem;color:var(--loro-text-strong);font-size:clamp(.8rem,2.2vw,.92rem);font-weight:950;line-height:1}.loro-input--stepper-kg input{min-width:2.1rem;max-width:2.35rem}@media(max-width:1023.88px){.loro-input__control input{font-size:16px}.loro-input--stepper{grid-template-columns:1.65rem minmax(3.65rem,1fr) 1.65rem;min-height:2.2rem}.loro-input__stepper-value{gap:.16rem}}@keyframes loro-input-spin{to{transform:rotate(360deg)}}@keyframes loro-input-dot-blink{0%,20%{opacity:.25}50%{opacity:1}to{opacity:.25}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2428
1884
|
}
|
|
2429
1885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroInput, decorators: [{
|
|
2430
1886
|
type: Component,
|
|
2431
|
-
args: [{ selector: 'loro-input', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
2432
|
-
@if (variant() === 'stepper') {
|
|
2433
|
-
<span
|
|
2434
|
-
class="loro-input loro-input--stepper-field"
|
|
2435
|
-
[class.loro-input--error]="hasError()"
|
|
2436
|
-
[class.loro-input--success]="hasSuccess()">
|
|
2437
|
-
@if (label()) {
|
|
2438
|
-
<span class="loro-input__label">{{ label() }}</span>
|
|
2439
|
-
}
|
|
2440
|
-
<span
|
|
2441
|
-
class="loro-input--stepper"
|
|
2442
|
-
[class.loro-input--stepper-kg]="normalizedUnit() === 'kg'"
|
|
2443
|
-
[class.loro-input--stepper-ud]="normalizedUnit() === 'ud'"
|
|
2444
|
-
role="group"
|
|
2445
|
-
[attr.aria-label]="label() || 'Cantidad'"
|
|
2446
|
-
>
|
|
2447
|
-
<button type="button" aria-label="Restar" [disabled]="disabled()" (click)="adjust(-step())">-</button>
|
|
2448
|
-
<span class="loro-input__stepper-value">
|
|
2449
|
-
<input
|
|
2450
|
-
#control
|
|
2451
|
-
[attr.inputmode]="normalizedUnit() === 'kg' ? 'decimal' : 'numeric'"
|
|
2452
|
-
[attr.size]="stepperInputSize()"
|
|
2453
|
-
[attr.maxlength]="stepperInputMaxLength()"
|
|
2454
|
-
[attr.max]="max()"
|
|
2455
|
-
[attr.min]="min()"
|
|
2456
|
-
[value]="value()"
|
|
2457
|
-
[disabled]="disabled()"
|
|
2458
|
-
[readonly]="readonly()"
|
|
2459
|
-
[required]="required()"
|
|
2460
|
-
[attr.aria-label]="label() || 'Cantidad'"
|
|
2461
|
-
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
2462
|
-
[attr.aria-describedby]="hasError() && errorText() ? errorId : null"
|
|
2463
|
-
(keydown.enter)="$any($event.target).blur()"
|
|
2464
|
-
(input)="sanitizeStepperInput($event)"
|
|
2465
|
-
(blur)="markAsTouched(); normalizeValue(($any($event.target).value ?? '').toString())"
|
|
2466
|
-
/>
|
|
2467
|
-
<span>{{ normalizedUnit() }}</span>
|
|
2468
|
-
</span>
|
|
2469
|
-
<button type="button" aria-label="Sumar" [disabled]="disabled()" (click)="adjust(step())">+</button>
|
|
2470
|
-
</span>
|
|
2471
|
-
@if (hasError() && errorText()) {
|
|
2472
|
-
<span class="loro-input__error" [id]="errorId">
|
|
2473
|
-
<loro-icon name="shield-alert" [size]="16" color="danger" [decorative]="true" />
|
|
2474
|
-
<span>{{ errorText() }}</span>
|
|
2475
|
-
</span>
|
|
2476
|
-
} @else if (hasLoading() && helperText()) {
|
|
2477
|
-
<span class="loro-input__loading" aria-live="polite">
|
|
2478
|
-
<span>{{ helperText() }}</span>
|
|
2479
|
-
</span>
|
|
2480
|
-
} @else if (hasSuccess() && helperText()) {
|
|
2481
|
-
<span class="loro-input__success">
|
|
2482
|
-
<loro-icon name="check" [size]="16" color="success" [decorative]="true" />
|
|
2483
|
-
<span>{{ helperText() }}</span>
|
|
2484
|
-
</span>
|
|
2485
|
-
} @else if (helperText()) {
|
|
2486
|
-
<span class="loro-input__helper">{{ helperText() }}</span>
|
|
2487
|
-
}
|
|
2488
|
-
</span>
|
|
2489
|
-
} @else {
|
|
2490
|
-
<label
|
|
2491
|
-
class="loro-input"
|
|
2492
|
-
[class.loro-input--has-icon]="icon() || variant() === 'search'"
|
|
2493
|
-
[class.loro-input--error]="hasError()"
|
|
2494
|
-
[class.loro-input--success]="hasSuccess()"
|
|
2495
|
-
[class.loro-input--loading]="hasLoading()"
|
|
2496
|
-
>
|
|
2497
|
-
@if (label()) {
|
|
2498
|
-
<span class="loro-input__label">{{ label() }}</span>
|
|
2499
|
-
}
|
|
2500
|
-
<span class="loro-input__control">
|
|
2501
|
-
@if (icon() || variant() === 'search') {
|
|
2502
|
-
<loro-icon
|
|
2503
|
-
[name]="icon() || 'search'"
|
|
2504
|
-
[size]="iconSize()"
|
|
2505
|
-
[alt]="label() || placeholder()"
|
|
2506
|
-
[color]="resolvedLeadingIconColor()"
|
|
2507
|
-
/>
|
|
2508
|
-
}
|
|
2509
|
-
<input
|
|
2510
|
-
#control
|
|
2511
|
-
[type]="type()"
|
|
2512
|
-
[attr.name]="name() || null"
|
|
2513
|
-
[placeholder]="placeholder()"
|
|
2514
|
-
[value]="value()"
|
|
2515
|
-
[disabled]="disabled()"
|
|
2516
|
-
[readonly]="readonly()"
|
|
2517
|
-
[required]="required()"
|
|
2518
|
-
[attr.autocomplete]="autocomplete() || null"
|
|
2519
|
-
[attr.inputmode]="inputmode() || null"
|
|
2520
|
-
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
2521
|
-
[attr.aria-describedby]="hasError() && errorText() ? errorId : null"
|
|
2522
|
-
(input)="updateValue(($any($event.target).value ?? '').toString())"
|
|
2523
|
-
(blur)="markAsTouched()"
|
|
2524
|
-
/>
|
|
2525
|
-
@if (trailingIcon()) {
|
|
2526
|
-
<button
|
|
2527
|
-
type="button"
|
|
2528
|
-
class="loro-input__trailing-button"
|
|
2529
|
-
[attr.aria-label]="trailingAriaLabel() || null"
|
|
2530
|
-
(click)="trailingClick.emit()"
|
|
2531
|
-
>
|
|
2532
|
-
<loro-icon
|
|
2533
|
-
[name]="trailingIcon()!"
|
|
2534
|
-
[size]="trailingIconSize()"
|
|
2535
|
-
alt=""
|
|
2536
|
-
[decorative]="true"
|
|
2537
|
-
[color]="resolvedTrailingIconColor()"
|
|
2538
|
-
/>
|
|
2539
|
-
</button>
|
|
2540
|
-
}
|
|
2541
|
-
</span>
|
|
2542
|
-
@if (hasError() && errorText()) {
|
|
2543
|
-
<span class="loro-input__error" [id]="errorId">
|
|
2544
|
-
<loro-icon name="shield-alert" [size]="16" color="danger" [decorative]="true" />
|
|
2545
|
-
<span>{{ errorText() }}</span>
|
|
2546
|
-
</span>
|
|
2547
|
-
} @else if (hasLoading() && helperText()) {
|
|
2548
|
-
<span class="loro-input__loading" aria-live="polite">
|
|
2549
|
-
<span class="loro-input__loader" aria-hidden="true"></span>
|
|
2550
|
-
<span>{{ helperText() }}</span>
|
|
2551
|
-
</span>
|
|
2552
|
-
} @else if (hasSuccess() && helperText()) {
|
|
2553
|
-
<span class="loro-input__success">
|
|
2554
|
-
<loro-icon name="check" [size]="16" color="success" [decorative]="true" />
|
|
2555
|
-
<span>{{ helperText() }}</span>
|
|
2556
|
-
</span>
|
|
2557
|
-
} @else if (helperText()) {
|
|
2558
|
-
<span class="loro-input__helper">{{ helperText() }}</span>
|
|
2559
|
-
}
|
|
2560
|
-
</label>
|
|
2561
|
-
}
|
|
2562
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-input{display:grid;gap:.55rem;color:var(--loro-text)}.loro-input__label{color:var(--loro-muted-strong);font-size:var(--loro-input-label-font-size, .95rem);font-weight:var(--loro-input-label-font-weight, 800);line-height:var(--loro-input-label-line-height, 1.2)}.loro-input__control{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-height:var(--loro-input-control-min-height, 3.4rem);padding:var(--loro-input-control-padding, 0 1rem);border:1px solid var(--loro-input-control-border-color, var(--loro-border-subtle));border-radius:var(--loro-input-control-radius, var(--loro-radius-input));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:var(--loro-input-control-shadow, none);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-input--has-icon .loro-input__control{grid-template-columns:auto minmax(0,1fr);gap:var(--loro-input-control-gap, .8rem)}.loro-input--has-icon:has(.loro-input__trailing-button) .loro-input__control{grid-template-columns:auto minmax(0,1fr) auto}.loro-input__control input{font-size:var(--loro-input-field-font-size, 1rem);line-height:var(--loro-input-field-line-height, 1.2)}input{width:100%;border:0;outline:0;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:var(--loro-input-field-font-weight, 700)}input::placeholder{color:var(--loro-muted);font-weight:var(--loro-input-placeholder-font-weight, 600);opacity:var(--loro-input-placeholder-opacity, 1)}.loro-input__trailing-button{display:grid;width:2.5rem;height:2.5rem;place-items:center;margin-right:-.55rem;border:0;border-radius:50%;color:var(--loro-muted);background:transparent;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input__trailing-button:hover,.loro-input__trailing-button:focus-visible{color:var(--loro-primary-700);background:color-mix(in srgb,var(--loro-primary-500) 10%,transparent);outline:none}.loro-input--error .loro-input__control{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input__label{color:color-mix(in srgb,var(--loro-danger-text) 68%,var(--loro-muted-strong))}.loro-input--success .loro-input__control{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input__label{color:color-mix(in srgb,var(--loro-success, #1f9d55) 72%,var(--loro-muted-strong))}.loro-input--loading .loro-input__control{border-color:color-mix(in srgb,var(--loro-primary-500) 22%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}.loro-input__control:focus-within{border-color:var(--loro-input-control-focus-border-color, var(--loro-primary-500));box-shadow:var(--loro-input-control-focus-shadow, 0 0 0 3px color-mix(in srgb, var(--loro-primary-500) 16%, transparent))}.loro-input__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-danger-text);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__helper{display:inline-block;color:var(--loro-muted);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__success{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-success, #1f9d55);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loading{display:flex;align-items:center;gap:.35rem;color:var(--loro-primary-700);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loader{width:1rem;height:1rem;border:2px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-input-spin .75s linear infinite}.loro-input--stepper{display:grid;grid-template-columns:1.85rem minmax(3.9rem,1fr) 1.85rem;align-items:center;min-width:0;min-height:2.25rem;overflow:hidden;border:1px solid color-mix(in srgb,var(--loro-primary-500) 12%,var(--loro-border-subtle) 88%);border-radius:.65rem;background:var(--loro-surface);color:var(--loro-text-strong);font-weight:900;text-align:center;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent)}.loro-input--stepper button{height:100%;min-width:0;border:0;background:transparent;color:var(--loro-primary-700);font:inherit;font-weight:950;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input--stepper button:active{background:color-mix(in srgb,var(--loro-primary-500) 10%,var(--loro-surface) 90%)}.loro-input__stepper-value{display:inline-grid;grid-template-columns:minmax(1.55rem,max-content) auto;align-items:center;justify-content:center;gap:.18rem;min-width:0;overflow:hidden;padding-inline:.1rem;white-space:nowrap}.loro-input--stepper input{width:auto;min-width:1.55rem;max-width:2.75rem;overflow:hidden;padding:0;text-align:right;text-overflow:clip;white-space:nowrap;font-weight:900;font-size:clamp(.85rem,2.4vw,.98rem);letter-spacing:-.02em}.loro-input__stepper-value span{min-width:1.05rem;color:var(--loro-text-strong);font-size:clamp(.8rem,2.2vw,.92rem);font-weight:950;line-height:1}.loro-input--stepper-kg input{min-width:2.1rem;max-width:2.35rem}@media(max-width:1023.88px){.loro-input__control input{font-size:16px}.loro-input--stepper{grid-template-columns:1.65rem minmax(3.65rem,1fr) 1.65rem;min-height:2.2rem}.loro-input__stepper-value{gap:.16rem}}@keyframes loro-input-spin{to{transform:rotate(360deg)}}@keyframes loro-input-dot-blink{0%,20%{opacity:.25}50%{opacity:1}to{opacity:.25}}\n"] }]
|
|
1887
|
+
args: [{ selector: 'loro-input', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (variant() === 'stepper') {\n <span\n class=\"loro-input loro-input--stepper-field\"\n [class.loro-input--error]=\"hasError()\"\n [class.loro-input--success]=\"hasSuccess()\">\n @if (label()) {\n <span class=\"loro-input__label\">{{ label() }}</span>\n }\n <span\n class=\"loro-input--stepper\"\n [class.loro-input--stepper-kg]=\"normalizedUnit() === 'kg'\"\n [class.loro-input--stepper-ud]=\"normalizedUnit() === 'ud'\"\n role=\"group\"\n [attr.aria-label]=\"label() || 'Cantidad'\"\n >\n <button type=\"button\" aria-label=\"Restar\" [disabled]=\"disabled()\" (click)=\"adjust(-step())\">-</button>\n <span class=\"loro-input__stepper-value\">\n <input\n #control\n [attr.inputmode]=\"normalizedUnit() === 'kg' ? 'decimal' : 'numeric'\"\n [attr.size]=\"stepperInputSize()\"\n [attr.maxlength]=\"stepperInputMaxLength()\"\n [attr.max]=\"max()\"\n [attr.min]=\"min()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.aria-label]=\"label() || 'Cantidad'\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [attr.aria-describedby]=\"hasError() && errorText() ? errorId : null\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (input)=\"sanitizeStepperInput($event)\"\n (blur)=\"markAsTouched(); normalizeValue(($any($event.target).value ?? '').toString())\"\n />\n <span>{{ normalizedUnit() }}</span>\n </span>\n <button type=\"button\" aria-label=\"Sumar\" [disabled]=\"disabled()\" (click)=\"adjust(step())\">+</button>\n </span>\n @if (hasError() && errorText()) {\n <span class=\"loro-input__error\" [id]=\"errorId\">\n <loro-icon name=\"shield-alert\" [size]=\"16\" color=\"danger\" [decorative]=\"true\" />\n <span>{{ errorText() }}</span>\n </span>\n } @else if (hasLoading() && helperText()) {\n <span class=\"loro-input__loading\" aria-live=\"polite\">\n <span>{{ helperText() }}</span>\n </span>\n } @else if (hasSuccess() && helperText()) {\n <span class=\"loro-input__success\">\n <loro-icon name=\"check\" [size]=\"16\" color=\"success\" [decorative]=\"true\" />\n <span>{{ helperText() }}</span>\n </span>\n } @else if (helperText()) {\n <span class=\"loro-input__helper\">{{ helperText() }}</span>\n }\n </span>\n } @else {\n <label\n class=\"loro-input\"\n [class.loro-input--has-icon]=\"icon() || variant() === 'search'\"\n [class.loro-input--error]=\"hasError()\"\n [class.loro-input--success]=\"hasSuccess()\"\n [class.loro-input--loading]=\"hasLoading()\"\n >\n @if (label()) {\n <span class=\"loro-input__label\">{{ label() }}</span>\n }\n <span class=\"loro-input__control\">\n @if (icon() || variant() === 'search') {\n <loro-icon\n [name]=\"icon() || 'search'\"\n [size]=\"iconSize()\"\n [alt]=\"label() || placeholder()\"\n [color]=\"resolvedLeadingIconColor()\"\n />\n }\n <input\n #control\n [type]=\"type()\"\n [attr.name]=\"name() || null\"\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.inputmode]=\"inputmode() || null\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [attr.aria-describedby]=\"hasError() && errorText() ? errorId : null\"\n (input)=\"updateValue(($any($event.target).value ?? '').toString())\"\n (blur)=\"markAsTouched()\"\n />\n @if (trailingIcon()) {\n <button\n type=\"button\"\n class=\"loro-input__trailing-button\"\n [attr.aria-label]=\"trailingAriaLabel() || null\"\n (click)=\"trailingClick.emit()\"\n >\n <loro-icon\n [name]=\"trailingIcon()!\"\n [size]=\"trailingIconSize()\"\n alt=\"\"\n [decorative]=\"true\"\n [color]=\"resolvedTrailingIconColor()\"\n />\n </button>\n }\n </span>\n @if (hasError() && errorText()) {\n <span class=\"loro-input__error\" [id]=\"errorId\">\n <loro-icon name=\"shield-alert\" [size]=\"16\" color=\"danger\" [decorative]=\"true\" />\n <span>{{ errorText() }}</span>\n </span>\n } @else if (hasLoading() && helperText()) {\n <span class=\"loro-input__loading\" aria-live=\"polite\">\n <span class=\"loro-input__loader\" aria-hidden=\"true\"></span>\n <span>{{ helperText() }}</span>\n </span>\n } @else if (hasSuccess() && helperText()) {\n <span class=\"loro-input__success\">\n <loro-icon name=\"check\" [size]=\"16\" color=\"success\" [decorative]=\"true\" />\n <span>{{ helperText() }}</span>\n </span>\n } @else if (helperText()) {\n <span class=\"loro-input__helper\">{{ helperText() }}</span>\n }\n </label>\n }", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-input{display:grid;gap:.55rem;color:var(--loro-text)}.loro-input__label{color:var(--loro-muted-strong);font-size:var(--loro-input-label-font-size, .95rem);font-weight:var(--loro-input-label-font-weight, 800);line-height:var(--loro-input-label-line-height, 1.2)}.loro-input__control{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-height:var(--loro-input-control-min-height, 3.4rem);padding:var(--loro-input-control-padding, 0 1rem);border:1px solid var(--loro-input-control-border-color, var(--loro-border-subtle));border-radius:var(--loro-input-control-radius, var(--loro-radius-input));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:var(--loro-input-control-shadow, none);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-input--has-icon .loro-input__control{grid-template-columns:auto minmax(0,1fr);gap:var(--loro-input-control-gap, .8rem)}.loro-input--has-icon:has(.loro-input__trailing-button) .loro-input__control{grid-template-columns:auto minmax(0,1fr) auto}.loro-input__control input{font-size:var(--loro-input-field-font-size, 1rem);line-height:var(--loro-input-field-line-height, 1.2)}input{width:100%;border:0;outline:0;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:var(--loro-input-field-font-weight, 700)}input::placeholder{color:var(--loro-muted);font-weight:var(--loro-input-placeholder-font-weight, 600);opacity:var(--loro-input-placeholder-opacity, 1)}.loro-input__trailing-button{display:grid;width:2.5rem;height:2.5rem;place-items:center;margin-right:-.55rem;border:0;border-radius:50%;color:var(--loro-muted);background:transparent;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input__trailing-button:hover,.loro-input__trailing-button:focus-visible{color:var(--loro-primary-700);background:color-mix(in srgb,var(--loro-primary-500) 10%,transparent);outline:none}.loro-input--error .loro-input__control{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-danger-text) 28%,var(--loro-border-subtle));background:var(--loro-surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-input--error .loro-input__label{color:color-mix(in srgb,var(--loro-danger-text) 68%,var(--loro-muted-strong))}.loro-input--success .loro-input__control{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));background:var(--loro-input-control-background, var(--loro-surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input--stepper{border-color:color-mix(in srgb,var(--loro-success, #1f9d55) 34%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-success, #1f9d55) 10%,transparent)}.loro-input--success .loro-input__label{color:color-mix(in srgb,var(--loro-success, #1f9d55) 72%,var(--loro-muted-strong))}.loro-input--loading .loro-input__control{border-color:color-mix(in srgb,var(--loro-primary-500) 22%,var(--loro-border-subtle));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 8%,transparent)}.loro-input__control:focus-within{border-color:var(--loro-input-control-focus-border-color, var(--loro-primary-500));box-shadow:var(--loro-input-control-focus-shadow, 0 0 0 3px color-mix(in srgb, var(--loro-primary-500) 16%, transparent))}.loro-input__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-danger-text);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__helper{display:inline-block;color:var(--loro-muted);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__success{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.4rem;color:var(--loro-success, #1f9d55);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loading{display:flex;align-items:center;gap:.35rem;color:var(--loro-primary-700);font-size:var(--loro-input-support-font-size, .82rem);font-weight:var(--loro-input-support-font-weight, 750);line-height:var(--loro-input-support-line-height, 1.35)}.loro-input__loader{width:1rem;height:1rem;border:2px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-input-spin .75s linear infinite}.loro-input--stepper{display:grid;grid-template-columns:1.85rem minmax(3.9rem,1fr) 1.85rem;align-items:center;min-width:0;min-height:2.25rem;overflow:hidden;border:1px solid color-mix(in srgb,var(--loro-primary-500) 12%,var(--loro-border-subtle) 88%);border-radius:.65rem;background:var(--loro-surface);color:var(--loro-text-strong);font-weight:900;text-align:center;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent)}.loro-input--stepper button{height:100%;min-width:0;border:0;background:transparent;color:var(--loro-primary-700);font:inherit;font-weight:950;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease}.loro-input--stepper button:active{background:color-mix(in srgb,var(--loro-primary-500) 10%,var(--loro-surface) 90%)}.loro-input__stepper-value{display:inline-grid;grid-template-columns:minmax(1.55rem,max-content) auto;align-items:center;justify-content:center;gap:.18rem;min-width:0;overflow:hidden;padding-inline:.1rem;white-space:nowrap}.loro-input--stepper input{width:auto;min-width:1.55rem;max-width:2.75rem;overflow:hidden;padding:0;text-align:right;text-overflow:clip;white-space:nowrap;font-weight:900;font-size:clamp(.85rem,2.4vw,.98rem);letter-spacing:-.02em}.loro-input__stepper-value span{min-width:1.05rem;color:var(--loro-text-strong);font-size:clamp(.8rem,2.2vw,.92rem);font-weight:950;line-height:1}.loro-input--stepper-kg input{min-width:2.1rem;max-width:2.35rem}@media(max-width:1023.88px){.loro-input__control input{font-size:16px}.loro-input--stepper{grid-template-columns:1.65rem minmax(3.65rem,1fr) 1.65rem;min-height:2.2rem}.loro-input__stepper-value{gap:.16rem}}@keyframes loro-input-spin{to{transform:rotate(360deg)}}@keyframes loro-input-dot-blink{0%,20%{opacity:.25}50%{opacity:1}to{opacity:.25}}\n"] }]
|
|
2563
1888
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], inputmode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputmode", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], trailingIconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIconSize", required: false }] }], trailingAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingAriaLabel", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], trailingClick: [{ type: i0.Output, args: ["trailingClick"] }], control: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }] } });
|
|
2564
1889
|
|
|
2565
1890
|
const TOUCH_TAP_TOLERANCE_PX = 10;
|
|
@@ -2799,73 +2124,11 @@ class LoroProductSection {
|
|
|
2799
2124
|
this.expanded.update((expanded) => !expanded);
|
|
2800
2125
|
}
|
|
2801
2126
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroProductSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2802
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroProductSection, isStandalone: true, selector: "loro-product-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
2803
|
-
<section class="loro-product-section">
|
|
2804
|
-
<header
|
|
2805
|
-
class="loro-product-section__header"
|
|
2806
|
-
[class.loro-product-section__header--collapsible]="collapsible()"
|
|
2807
|
-
[attr.role]="collapsible() ? 'button' : null"
|
|
2808
|
-
[attr.tabindex]="collapsible() ? 0 : null"
|
|
2809
|
-
[attr.aria-expanded]="collapsible() ? expanded() : null"
|
|
2810
|
-
(click)="toggle()"
|
|
2811
|
-
(keydown.enter)="toggle()"
|
|
2812
|
-
(keydown.space)="toggle()">
|
|
2813
|
-
<span class="loro-product-section__icon">
|
|
2814
|
-
<loro-icon [name]="icon()" [size]="18" [alt]="title()" color="inverse" />
|
|
2815
|
-
</span>
|
|
2816
|
-
<h2>{{ title() }}</h2>
|
|
2817
|
-
@if (collapsible()) {
|
|
2818
|
-
<span class="loro-product-section__toggle" aria-hidden="true">
|
|
2819
|
-
<loro-icon
|
|
2820
|
-
[name]="expanded() ? 'chevron-up' : 'chevron-down'"
|
|
2821
|
-
[size]="18"
|
|
2822
|
-
[alt]="expanded() ? 'Contraer' : 'Expandir'"
|
|
2823
|
-
color="primary-strong" />
|
|
2824
|
-
</span>
|
|
2825
|
-
}
|
|
2826
|
-
</header>
|
|
2827
|
-
@if (!collapsible() || expanded()) {
|
|
2828
|
-
<div class="loro-product-section__body">
|
|
2829
|
-
<ng-content />
|
|
2830
|
-
</div>
|
|
2831
|
-
}
|
|
2832
|
-
</section>
|
|
2833
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-product-section{display:grid;gap:.7rem}.loro-product-section__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;margin-inline:-.35rem;padding:.25rem .35rem;border-radius:.75rem;color:var(--loro-text-strong);transition:background .15s ease,transform .15s ease}.loro-product-section__header--collapsible{cursor:pointer;-webkit-tap-highlight-color:transparent}.loro-product-section__header--collapsible:hover{background:#6c3cff0e}.loro-product-section__header--collapsible:focus-visible{outline:2px solid rgba(108,60,255,.32);outline-offset:2px}.loro-product-section__header--collapsible:active{transform:scale(.995);background:#6c3cff14}.loro-product-section__icon{display:grid;width:2.1rem;height:2.1rem;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700))}h2{margin:0;font-size:1.12rem;font-weight:950;line-height:1.2}.loro-product-section__toggle{display:grid;width:2.25rem;height:2.25rem;place-items:center;border-radius:50%}.loro-product-section__body{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}@media(max-width:640px){.loro-product-section{gap:.25rem}.loro-product-section__header{grid-template-columns:1.2rem minmax(0,1fr) 1.35rem;gap:.35rem;margin-inline:0;padding:.08rem 0}.loro-product-section__icon{width:1.2rem;height:1.2rem}.loro-product-section__icon loro-icon,.loro-product-section__toggle loro-icon{transform:scale(.72)}h2{font-size:.72rem;line-height:1.05}.loro-product-section__toggle{display:grid;width:1.35rem;height:1.35rem;place-items:center;border:1px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);background:color-mix(in srgb,var(--loro-primary-500) 6%,transparent)}.loro-product-section__body{border-radius:.58rem}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2127
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroProductSection, isStandalone: true, selector: "loro-product-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section class=\"loro-product-section\">\n <header\n class=\"loro-product-section__header\"\n [class.loro-product-section__header--collapsible]=\"collapsible()\"\n [attr.role]=\"collapsible() ? 'button' : null\"\n [attr.tabindex]=\"collapsible() ? 0 : null\"\n [attr.aria-expanded]=\"collapsible() ? expanded() : null\"\n (click)=\"toggle()\"\n (keydown.enter)=\"toggle()\"\n (keydown.space)=\"toggle()\">\n <span class=\"loro-product-section__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"18\" [alt]=\"title()\" color=\"inverse\" />\n </span>\n <h2>{{ title() }}</h2>\n @if (collapsible()) {\n <span class=\"loro-product-section__toggle\" aria-hidden=\"true\">\n <loro-icon\n [name]=\"expanded() ? 'chevron-up' : 'chevron-down'\"\n [size]=\"18\"\n [alt]=\"expanded() ? 'Contraer' : 'Expandir'\"\n color=\"primary-strong\" />\n </span>\n }\n </header>\n @if (!collapsible() || expanded()) {\n <div class=\"loro-product-section__body\">\n <ng-content />\n </div>\n }\n </section>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-product-section{display:grid;gap:.7rem}.loro-product-section__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;margin-inline:-.35rem;padding:.25rem .35rem;border-radius:.75rem;color:var(--loro-text-strong);transition:background .15s ease,transform .15s ease}.loro-product-section__header--collapsible{cursor:pointer;-webkit-tap-highlight-color:transparent}.loro-product-section__header--collapsible:hover{background:#6c3cff0e}.loro-product-section__header--collapsible:focus-visible{outline:2px solid rgba(108,60,255,.32);outline-offset:2px}.loro-product-section__header--collapsible:active{transform:scale(.995);background:#6c3cff14}.loro-product-section__icon{display:grid;width:2.1rem;height:2.1rem;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700))}h2{margin:0;font-size:1.12rem;font-weight:950;line-height:1.2}.loro-product-section__toggle{display:grid;width:2.25rem;height:2.25rem;place-items:center;border-radius:50%}.loro-product-section__body{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}@media(max-width:640px){.loro-product-section{gap:.25rem}.loro-product-section__header{grid-template-columns:1.2rem minmax(0,1fr) 1.35rem;gap:.35rem;margin-inline:0;padding:.08rem 0}.loro-product-section__icon{width:1.2rem;height:1.2rem}.loro-product-section__icon loro-icon,.loro-product-section__toggle loro-icon{transform:scale(.72)}h2{font-size:.72rem;line-height:1.05}.loro-product-section__toggle{display:grid;width:1.35rem;height:1.35rem;place-items:center;border:1px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);background:color-mix(in srgb,var(--loro-primary-500) 6%,transparent)}.loro-product-section__body{border-radius:.58rem}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2834
2128
|
}
|
|
2835
2129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroProductSection, decorators: [{
|
|
2836
2130
|
type: Component,
|
|
2837
|
-
args: [{ selector: 'loro-product-section', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
2838
|
-
<section class="loro-product-section">
|
|
2839
|
-
<header
|
|
2840
|
-
class="loro-product-section__header"
|
|
2841
|
-
[class.loro-product-section__header--collapsible]="collapsible()"
|
|
2842
|
-
[attr.role]="collapsible() ? 'button' : null"
|
|
2843
|
-
[attr.tabindex]="collapsible() ? 0 : null"
|
|
2844
|
-
[attr.aria-expanded]="collapsible() ? expanded() : null"
|
|
2845
|
-
(click)="toggle()"
|
|
2846
|
-
(keydown.enter)="toggle()"
|
|
2847
|
-
(keydown.space)="toggle()">
|
|
2848
|
-
<span class="loro-product-section__icon">
|
|
2849
|
-
<loro-icon [name]="icon()" [size]="18" [alt]="title()" color="inverse" />
|
|
2850
|
-
</span>
|
|
2851
|
-
<h2>{{ title() }}</h2>
|
|
2852
|
-
@if (collapsible()) {
|
|
2853
|
-
<span class="loro-product-section__toggle" aria-hidden="true">
|
|
2854
|
-
<loro-icon
|
|
2855
|
-
[name]="expanded() ? 'chevron-up' : 'chevron-down'"
|
|
2856
|
-
[size]="18"
|
|
2857
|
-
[alt]="expanded() ? 'Contraer' : 'Expandir'"
|
|
2858
|
-
color="primary-strong" />
|
|
2859
|
-
</span>
|
|
2860
|
-
}
|
|
2861
|
-
</header>
|
|
2862
|
-
@if (!collapsible() || expanded()) {
|
|
2863
|
-
<div class="loro-product-section__body">
|
|
2864
|
-
<ng-content />
|
|
2865
|
-
</div>
|
|
2866
|
-
}
|
|
2867
|
-
</section>
|
|
2868
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-product-section{display:grid;gap:.7rem}.loro-product-section__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;margin-inline:-.35rem;padding:.25rem .35rem;border-radius:.75rem;color:var(--loro-text-strong);transition:background .15s ease,transform .15s ease}.loro-product-section__header--collapsible{cursor:pointer;-webkit-tap-highlight-color:transparent}.loro-product-section__header--collapsible:hover{background:#6c3cff0e}.loro-product-section__header--collapsible:focus-visible{outline:2px solid rgba(108,60,255,.32);outline-offset:2px}.loro-product-section__header--collapsible:active{transform:scale(.995);background:#6c3cff14}.loro-product-section__icon{display:grid;width:2.1rem;height:2.1rem;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700))}h2{margin:0;font-size:1.12rem;font-weight:950;line-height:1.2}.loro-product-section__toggle{display:grid;width:2.25rem;height:2.25rem;place-items:center;border-radius:50%}.loro-product-section__body{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}@media(max-width:640px){.loro-product-section{gap:.25rem}.loro-product-section__header{grid-template-columns:1.2rem minmax(0,1fr) 1.35rem;gap:.35rem;margin-inline:0;padding:.08rem 0}.loro-product-section__icon{width:1.2rem;height:1.2rem}.loro-product-section__icon loro-icon,.loro-product-section__toggle loro-icon{transform:scale(.72)}h2{font-size:.72rem;line-height:1.05}.loro-product-section__toggle{display:grid;width:1.35rem;height:1.35rem;place-items:center;border:1px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);background:color-mix(in srgb,var(--loro-primary-500) 6%,transparent)}.loro-product-section__body{border-radius:.58rem}}\n"] }]
|
|
2131
|
+
args: [{ selector: 'loro-product-section', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"loro-product-section\">\n <header\n class=\"loro-product-section__header\"\n [class.loro-product-section__header--collapsible]=\"collapsible()\"\n [attr.role]=\"collapsible() ? 'button' : null\"\n [attr.tabindex]=\"collapsible() ? 0 : null\"\n [attr.aria-expanded]=\"collapsible() ? expanded() : null\"\n (click)=\"toggle()\"\n (keydown.enter)=\"toggle()\"\n (keydown.space)=\"toggle()\">\n <span class=\"loro-product-section__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"18\" [alt]=\"title()\" color=\"inverse\" />\n </span>\n <h2>{{ title() }}</h2>\n @if (collapsible()) {\n <span class=\"loro-product-section__toggle\" aria-hidden=\"true\">\n <loro-icon\n [name]=\"expanded() ? 'chevron-up' : 'chevron-down'\"\n [size]=\"18\"\n [alt]=\"expanded() ? 'Contraer' : 'Expandir'\"\n color=\"primary-strong\" />\n </span>\n }\n </header>\n @if (!collapsible() || expanded()) {\n <div class=\"loro-product-section__body\">\n <ng-content />\n </div>\n }\n </section>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-product-section{display:grid;gap:.7rem}.loro-product-section__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;margin-inline:-.35rem;padding:.25rem .35rem;border-radius:.75rem;color:var(--loro-text-strong);transition:background .15s ease,transform .15s ease}.loro-product-section__header--collapsible{cursor:pointer;-webkit-tap-highlight-color:transparent}.loro-product-section__header--collapsible:hover{background:#6c3cff0e}.loro-product-section__header--collapsible:focus-visible{outline:2px solid rgba(108,60,255,.32);outline-offset:2px}.loro-product-section__header--collapsible:active{transform:scale(.995);background:#6c3cff14}.loro-product-section__icon{display:grid;width:2.1rem;height:2.1rem;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700))}h2{margin:0;font-size:1.12rem;font-weight:950;line-height:1.2}.loro-product-section__toggle{display:grid;width:2.25rem;height:2.25rem;place-items:center;border-radius:50%}.loro-product-section__body{overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}@media(max-width:640px){.loro-product-section{gap:.25rem}.loro-product-section__header{grid-template-columns:1.2rem minmax(0,1fr) 1.35rem;gap:.35rem;margin-inline:0;padding:.08rem 0}.loro-product-section__icon{width:1.2rem;height:1.2rem}.loro-product-section__icon loro-icon,.loro-product-section__toggle loro-icon{transform:scale(.72)}h2{font-size:.72rem;line-height:1.05}.loro-product-section__toggle{display:grid;width:1.35rem;height:1.35rem;place-items:center;border:1px solid color-mix(in srgb,var(--loro-primary-500) 18%,transparent);background:color-mix(in srgb,var(--loro-primary-500) 6%,transparent)}.loro-product-section__body{border-radius:.58rem}}\n"] }]
|
|
2869
2132
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }] } });
|
|
2870
2133
|
|
|
2871
2134
|
class LoroProfileCard {
|
|
@@ -2891,53 +2154,11 @@ class LoroProfileCard {
|
|
|
2891
2154
|
this.imageFailed.set(true);
|
|
2892
2155
|
}
|
|
2893
2156
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroProfileCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2894
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroProfileCard, isStandalone: true, selector: "loro-profile-card", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: true, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLabel: { classPropertyName: "changePhotoLabel", publicName: "changePhotoLabel", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLoadingLabel: { classPropertyName: "changePhotoLoadingLabel", publicName: "changePhotoLoadingLabel", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLoading: { classPropertyName: "changePhotoLoading", publicName: "changePhotoLoading", isSignal: true, isRequired: false, transformFunction: null }, changePhotoDisabled: { classPropertyName: "changePhotoDisabled", publicName: "changePhotoDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changePhotoClick: "changePhotoClick" }, ngImport: i0, template:
|
|
2895
|
-
<section class="loro-profile-card">
|
|
2896
|
-
<div class="loro-profile-card__avatar">
|
|
2897
|
-
@if (resolvedImageSrc()) {
|
|
2898
|
-
<img [src]="resolvedImageSrc()!" [alt]="name()" (error)="onImageError()" />
|
|
2899
|
-
} @else {
|
|
2900
|
-
<loro-icon name="user" [size]="72" [alt]="name()" color="primary" />
|
|
2901
|
-
}
|
|
2902
|
-
</div>
|
|
2903
|
-
<div class="loro-profile-card__copy">
|
|
2904
|
-
<h2>{{ name() }}</h2>
|
|
2905
|
-
<p>{{ email() }}</p>
|
|
2906
|
-
<loro-button
|
|
2907
|
-
[label]="changePhotoLoading() ? changePhotoLoadingLabel() : changePhotoLabel()"
|
|
2908
|
-
icon="camera"
|
|
2909
|
-
variant="outline"
|
|
2910
|
-
[disabled]="changePhotoDisabled() || changePhotoLoading()"
|
|
2911
|
-
[loading]="changePhotoLoading()"
|
|
2912
|
-
(buttonClick)="changePhotoClick.emit()" />
|
|
2913
|
-
</div>
|
|
2914
|
-
</section>
|
|
2915
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1.5rem;padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-profile-card__avatar{display:grid;width:clamp(7rem,16vw,9.5rem);aspect-ratio:1;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(180deg,#6c3cff24,#6c3cff0a)}img{width:100%;height:100%;object-fit:cover}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(2rem,4vw,2.7rem);font-weight:900;line-height:1}p{margin:.4rem 0 1rem;color:var(--loro-muted);font-size:1.05rem;font-weight:650}@media(max-width:520px){.loro-profile-card{grid-template-columns:max-content minmax(0,1fr);gap:1rem}}\n"], dependencies: [{ kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2157
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroProfileCard, isStandalone: true, selector: "loro-profile-card", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: true, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLabel: { classPropertyName: "changePhotoLabel", publicName: "changePhotoLabel", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLoadingLabel: { classPropertyName: "changePhotoLoadingLabel", publicName: "changePhotoLoadingLabel", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLoading: { classPropertyName: "changePhotoLoading", publicName: "changePhotoLoading", isSignal: true, isRequired: false, transformFunction: null }, changePhotoDisabled: { classPropertyName: "changePhotoDisabled", publicName: "changePhotoDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changePhotoClick: "changePhotoClick" }, ngImport: i0, template: "<section class=\"loro-profile-card\">\n <div class=\"loro-profile-card__avatar\">\n @if (resolvedImageSrc()) {\n <img [src]=\"resolvedImageSrc()!\" [alt]=\"name()\" (error)=\"onImageError()\" />\n } @else {\n <loro-icon name=\"user\" [size]=\"72\" [alt]=\"name()\" color=\"primary\" />\n }\n </div>\n <div class=\"loro-profile-card__copy\">\n <h2>{{ name() }}</h2>\n <p>{{ email() }}</p>\n <loro-button\n [label]=\"changePhotoLoading() ? changePhotoLoadingLabel() : changePhotoLabel()\"\n icon=\"camera\"\n variant=\"outline\"\n [disabled]=\"changePhotoDisabled() || changePhotoLoading()\"\n [loading]=\"changePhotoLoading()\"\n (buttonClick)=\"changePhotoClick.emit()\" />\n </div>\n </section>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1.5rem;padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-profile-card__avatar{display:grid;width:clamp(7rem,16vw,9.5rem);aspect-ratio:1;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(180deg,#6c3cff24,#6c3cff0a)}img{width:100%;height:100%;object-fit:cover}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(2rem,4vw,2.7rem);font-weight:900;line-height:1}p{margin:.4rem 0 1rem;color:var(--loro-muted);font-size:1.05rem;font-weight:650}@media(max-width:520px){.loro-profile-card{grid-template-columns:max-content minmax(0,1fr);gap:1rem}}\n"], dependencies: [{ kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2916
2158
|
}
|
|
2917
2159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroProfileCard, decorators: [{
|
|
2918
2160
|
type: Component,
|
|
2919
|
-
args: [{ selector: 'loro-profile-card', standalone: true, imports: [LoroButton, LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
2920
|
-
<section class="loro-profile-card">
|
|
2921
|
-
<div class="loro-profile-card__avatar">
|
|
2922
|
-
@if (resolvedImageSrc()) {
|
|
2923
|
-
<img [src]="resolvedImageSrc()!" [alt]="name()" (error)="onImageError()" />
|
|
2924
|
-
} @else {
|
|
2925
|
-
<loro-icon name="user" [size]="72" [alt]="name()" color="primary" />
|
|
2926
|
-
}
|
|
2927
|
-
</div>
|
|
2928
|
-
<div class="loro-profile-card__copy">
|
|
2929
|
-
<h2>{{ name() }}</h2>
|
|
2930
|
-
<p>{{ email() }}</p>
|
|
2931
|
-
<loro-button
|
|
2932
|
-
[label]="changePhotoLoading() ? changePhotoLoadingLabel() : changePhotoLabel()"
|
|
2933
|
-
icon="camera"
|
|
2934
|
-
variant="outline"
|
|
2935
|
-
[disabled]="changePhotoDisabled() || changePhotoLoading()"
|
|
2936
|
-
[loading]="changePhotoLoading()"
|
|
2937
|
-
(buttonClick)="changePhotoClick.emit()" />
|
|
2938
|
-
</div>
|
|
2939
|
-
</section>
|
|
2940
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1.5rem;padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-profile-card__avatar{display:grid;width:clamp(7rem,16vw,9.5rem);aspect-ratio:1;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(180deg,#6c3cff24,#6c3cff0a)}img{width:100%;height:100%;object-fit:cover}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(2rem,4vw,2.7rem);font-weight:900;line-height:1}p{margin:.4rem 0 1rem;color:var(--loro-muted);font-size:1.05rem;font-weight:650}@media(max-width:520px){.loro-profile-card{grid-template-columns:max-content minmax(0,1fr);gap:1rem}}\n"] }]
|
|
2161
|
+
args: [{ selector: 'loro-profile-card', standalone: true, imports: [LoroButton, LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"loro-profile-card\">\n <div class=\"loro-profile-card__avatar\">\n @if (resolvedImageSrc()) {\n <img [src]=\"resolvedImageSrc()!\" [alt]=\"name()\" (error)=\"onImageError()\" />\n } @else {\n <loro-icon name=\"user\" [size]=\"72\" [alt]=\"name()\" color=\"primary\" />\n }\n </div>\n <div class=\"loro-profile-card__copy\">\n <h2>{{ name() }}</h2>\n <p>{{ email() }}</p>\n <loro-button\n [label]=\"changePhotoLoading() ? changePhotoLoadingLabel() : changePhotoLabel()\"\n icon=\"camera\"\n variant=\"outline\"\n [disabled]=\"changePhotoDisabled() || changePhotoLoading()\"\n [loading]=\"changePhotoLoading()\"\n (buttonClick)=\"changePhotoClick.emit()\" />\n </div>\n </section>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1.5rem;padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-profile-card__avatar{display:grid;width:clamp(7rem,16vw,9.5rem);aspect-ratio:1;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(180deg,#6c3cff24,#6c3cff0a)}img{width:100%;height:100%;object-fit:cover}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(2rem,4vw,2.7rem);font-weight:900;line-height:1}p{margin:.4rem 0 1rem;color:var(--loro-muted);font-size:1.05rem;font-weight:650}@media(max-width:520px){.loro-profile-card{grid-template-columns:max-content minmax(0,1fr);gap:1rem}}\n"] }]
|
|
2941
2162
|
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], email: [{ type: i0.Input, args: [{ isSignal: true, alias: "email", required: true }] }], imageSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSrc", required: false }] }], changePhotoLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoLabel", required: false }] }], changePhotoLoadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoLoadingLabel", required: false }] }], changePhotoLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoLoading", required: false }] }], changePhotoDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoDisabled", required: false }] }], changePhotoClick: [{ type: i0.Output, args: ["changePhotoClick"] }] } });
|
|
2942
2163
|
|
|
2943
2164
|
class LoroProfileHero {
|
|
@@ -2992,79 +2213,11 @@ class LoroStatCard {
|
|
|
2992
2213
|
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2993
2214
|
total = input(0, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
2994
2215
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroStatCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2995
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroStatCard, isStandalone: true, selector: "loro-stat-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, eyebrow: { classPropertyName: "eyebrow", publicName: "eyebrow", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, topImage: { classPropertyName: "topImage", publicName: "topImage", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
2996
|
-
@if (variant() === 'image-corner' || variant() === 'card-basket') {
|
|
2997
|
-
<loro-image class="loro-stat-card__top-image" [name]="topImage() || 'loro-despensa'" [alt]="title()" width="6rem" />
|
|
2998
|
-
}
|
|
2999
|
-
<article class="loro-stat-card" [class]="'loro-stat-card loro-stat-card--' + variant()">
|
|
3000
|
-
@if (icon()) {
|
|
3001
|
-
<span class="loro-stat-card__icon">
|
|
3002
|
-
<loro-icon [name]="icon()!" [size]="iconSize()" [alt]="title()" [color]="variant() === 'danger' ? 'danger' : 'primary'" />
|
|
3003
|
-
</span>
|
|
3004
|
-
}
|
|
3005
|
-
<div class="loro-stat-card__copy">
|
|
3006
|
-
@if (eyebrow() || variant() === 'image-corner') {
|
|
3007
|
-
<p class="loro-stat-card__eyebrow">{{ eyebrow() || title() }}</p>
|
|
3008
|
-
<h2>{{ value() || title() }}</h2>
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
@if (value() && variant() !== 'image-corner') {
|
|
3012
|
-
<p class="loro-stat-card__title">{{ title() }}</p>
|
|
3013
|
-
}
|
|
3014
|
-
@if (description()) {
|
|
3015
|
-
<p class="loro-stat-card__description">{{ description() }}</p>
|
|
3016
|
-
}
|
|
3017
|
-
</div>
|
|
3018
|
-
@if (variant() === 'card-basket') {
|
|
3019
|
-
<div class="shopping-summary-card__total">
|
|
3020
|
-
<small>Total estimado</small>
|
|
3021
|
-
<strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} €</strong>
|
|
3022
|
-
</div>
|
|
3023
|
-
}
|
|
3024
|
-
@if (image()) {
|
|
3025
|
-
<loro-image class="loro-stat-card__image" [name]="image()!" [alt]="title()" width="5.8rem" />
|
|
3026
|
-
}
|
|
3027
|
-
</article>
|
|
3028
|
-
|
|
3029
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-stat-card__top-image{display:flex;justify-content:center;pointer-events:none}.loro-stat-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;min-height:6.8rem;padding:1.1rem 1.25rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);isolation:isolate}.loro-stat-card--tinted{background:var(--loro-surface-tinted)}.loro-stat-card--danger{background:#dc26260f}.loro-stat-card--compare-summary{grid-template-columns:3.85rem minmax(0,1fr);gap:.95rem;min-height:6rem;padding:.95rem 1.1rem;border-radius:1.35rem;background:var(--loro-surface)}.loro-stat-card--compare-inline{grid-template-columns:2.5rem minmax(0,1fr);gap:.65rem;min-height:3.7rem;padding:.7rem .9rem;border-radius:1rem;background:var(--loro-surface);box-shadow:none}.loro-stat-card--image-corner{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.85rem;min-height:11.5rem;padding:1.2rem 6.9rem 1.2rem 1.2rem;border-radius:1.35rem;background:color-mix(in srgb,var(--loro-primary-500) 4%,var(--loro-surface))}.loro-stat-card__icon{position:relative;z-index:1;display:grid;width:3.7rem;height:3.7rem;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface)}.loro-stat-card--danger .loro-stat-card__icon{background:#dc262617}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3.55rem;height:3.55rem;border-radius:1rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.5rem;height:2.5rem;border-radius:.85rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:3rem;height:3rem;border-radius:50%}.loro-stat-card__copy{position:relative;z-index:1;display:grid;align-content:center;min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(1.45rem,4vw,2.15rem);font-weight:950;line-height:1.05;overflow-wrap:anywhere}.loro-stat-card__title{color:var(--loro-text-strong);font-size:1rem;font-weight:900}.loro-stat-card--compare-summary h2{font-size:clamp(1.25rem,4.8vw,1.75rem);line-height:.98}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.95rem,3.6vw,1.1rem);line-height:1.05}.loro-stat-card--compare-inline h2{font-size:clamp(.95rem,1.7vw,1.15rem);line-height:1}.loro-stat-card--compare-inline .loro-stat-card__title{color:var(--loro-muted-strong);font-size:.78rem;font-weight:850;line-height:1.05}.loro-stat-card--image-corner h2{font-size:clamp(1.45rem,3vw,2.1rem);line-height:1.02}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{color:var(--loro-text-strong);font-size:1.05rem;font-weight:900;line-height:1.12}.loro-stat-card__description,.loro-stat-card__eyebrow{margin-top:.35rem;color:var(--loro-muted);font-weight:700;line-height:1.35}.loro-stat-card__image{align-self:end}.loro-stat-card--image-corner .loro-stat-card__copy{align-content:start;gap:.5rem}.loro-stat-card--image-corner .loro-stat-card__eyebrow{margin-top:.15rem}.loro-stat-card--image-corner .loro-stat-card__description{margin-top:0;white-space:pre-line;max-width:18ch}.loro-stat-card--image-corner .loro-stat-card__image{position:absolute;top:1.55rem;right:1.2rem;align-self:start;width:4.95rem;pointer-events:none}.shopping-summary-card__total{display:grid;justify-items:end;color:var(--loro-muted);font-weight:750}.shopping-summary-card__total strong{color:var(--loro-primary-700);font-size:2rem;font-weight:950}@media(max-width:640px){.loro-stat-card{gap:.8rem;min-height:5.5rem;padding:.9rem 1rem}.loro-stat-card__icon{width:3rem;height:3rem;border-radius:.85rem}h2{font-size:clamp(1.2rem,5vw,1.55rem);line-height:1}.loro-stat-card__title{font-size:clamp(.84rem,3vw,.95rem);line-height:1.15}.loro-stat-card--compare-summary{grid-template-columns:3.1rem minmax(0,1fr);gap:.75rem;min-height:5.35rem;padding:.8rem .9rem;border-radius:1.2rem}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3rem;height:3rem}.loro-stat-card--compare-summary h2{font-size:clamp(1.1rem,5vw,1.45rem)}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.88rem,3.4vw,1rem)}.loro-stat-card--compare-inline{grid-template-columns:2.2rem minmax(0,1fr);gap:.55rem;min-height:3.3rem;padding:.55rem .75rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.2rem;height:2.2rem;border-radius:.75rem}.loro-stat-card--compare-inline h2{font-size:1rem}.loro-stat-card--compare-inline .loro-stat-card__title{font-size:.74rem}.loro-stat-card--image-corner{min-height:8.25rem;gap:.65rem;padding:.95rem 4.6rem .95rem .95rem;border-radius:1.15rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:2.45rem;height:2.45rem}.loro-stat-card--image-corner h2{font-size:clamp(1.05rem,4.8vw,1.65rem);line-height:1}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{font-size:.88rem;line-height:1.05}.loro-stat-card--image-corner .loro-stat-card__description{font-size:.78rem;line-height:1.16;max-width:16ch}.loro-stat-card--image-corner .loro-stat-card__image{top:1.15rem;right:.9rem;width:3.55rem}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2216
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroStatCard, isStandalone: true, selector: "loro-stat-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, eyebrow: { classPropertyName: "eyebrow", publicName: "eyebrow", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, topImage: { classPropertyName: "topImage", publicName: "topImage", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (variant() === 'image-corner' || variant() === 'card-basket') {\n <loro-image class=\"loro-stat-card__top-image\" [name]=\"topImage() || 'loro-despensa'\" [alt]=\"title()\" width=\"6rem\" />\n }\n <article class=\"loro-stat-card\" [class]=\"'loro-stat-card loro-stat-card--' + variant()\">\n @if (icon()) {\n <span class=\"loro-stat-card__icon\">\n <loro-icon [name]=\"icon()!\" [size]=\"iconSize()\" [alt]=\"title()\" [color]=\"variant() === 'danger' ? 'danger' : 'primary'\" />\n </span>\n }\n <div class=\"loro-stat-card__copy\">\n @if (eyebrow() || variant() === 'image-corner') {\n <p class=\"loro-stat-card__eyebrow\">{{ eyebrow() || title() }}</p>\n <h2>{{ value() || title() }}</h2>\n }\n\n @if (value() && variant() !== 'image-corner') {\n <p class=\"loro-stat-card__title\">{{ title() }}</p>\n }\n @if (description()) {\n <p class=\"loro-stat-card__description\">{{ description() }}</p>\n }\n </div>\n @if (variant() === 'card-basket') {\n <div class=\"shopping-summary-card__total\">\n <small>Total estimado</small>\n <strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} \u20AC</strong>\n </div>\n }\n @if (image()) {\n <loro-image class=\"loro-stat-card__image\" [name]=\"image()!\" [alt]=\"title()\" width=\"5.8rem\" />\n }\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-stat-card__top-image{display:flex;justify-content:center;pointer-events:none}.loro-stat-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;min-height:6.8rem;padding:1.1rem 1.25rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);isolation:isolate}.loro-stat-card--tinted{background:var(--loro-surface-tinted)}.loro-stat-card--danger{background:#dc26260f}.loro-stat-card--compare-summary{grid-template-columns:3.85rem minmax(0,1fr);gap:.95rem;min-height:6rem;padding:.95rem 1.1rem;border-radius:1.35rem;background:var(--loro-surface)}.loro-stat-card--compare-inline{grid-template-columns:2.5rem minmax(0,1fr);gap:.65rem;min-height:3.7rem;padding:.7rem .9rem;border-radius:1rem;background:var(--loro-surface);box-shadow:none}.loro-stat-card--image-corner{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.85rem;min-height:11.5rem;padding:1.2rem 6.9rem 1.2rem 1.2rem;border-radius:1.35rem;background:color-mix(in srgb,var(--loro-primary-500) 4%,var(--loro-surface))}.loro-stat-card__icon{position:relative;z-index:1;display:grid;width:3.7rem;height:3.7rem;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface)}.loro-stat-card--danger .loro-stat-card__icon{background:#dc262617}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3.55rem;height:3.55rem;border-radius:1rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.5rem;height:2.5rem;border-radius:.85rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:3rem;height:3rem;border-radius:50%}.loro-stat-card__copy{position:relative;z-index:1;display:grid;align-content:center;min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(1.45rem,4vw,2.15rem);font-weight:950;line-height:1.05;overflow-wrap:anywhere}.loro-stat-card__title{color:var(--loro-text-strong);font-size:1rem;font-weight:900}.loro-stat-card--compare-summary h2{font-size:clamp(1.25rem,4.8vw,1.75rem);line-height:.98}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.95rem,3.6vw,1.1rem);line-height:1.05}.loro-stat-card--compare-inline h2{font-size:clamp(.95rem,1.7vw,1.15rem);line-height:1}.loro-stat-card--compare-inline .loro-stat-card__title{color:var(--loro-muted-strong);font-size:.78rem;font-weight:850;line-height:1.05}.loro-stat-card--image-corner h2{font-size:clamp(1.45rem,3vw,2.1rem);line-height:1.02}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{color:var(--loro-text-strong);font-size:1.05rem;font-weight:900;line-height:1.12}.loro-stat-card__description,.loro-stat-card__eyebrow{margin-top:.35rem;color:var(--loro-muted);font-weight:700;line-height:1.35}.loro-stat-card__image{align-self:end}.loro-stat-card--image-corner .loro-stat-card__copy{align-content:start;gap:.5rem}.loro-stat-card--image-corner .loro-stat-card__eyebrow{margin-top:.15rem}.loro-stat-card--image-corner .loro-stat-card__description{margin-top:0;white-space:pre-line;max-width:18ch}.loro-stat-card--image-corner .loro-stat-card__image{position:absolute;top:1.55rem;right:1.2rem;align-self:start;width:4.95rem;pointer-events:none}.shopping-summary-card__total{display:grid;justify-items:end;color:var(--loro-muted);font-weight:750}.shopping-summary-card__total strong{color:var(--loro-primary-700);font-size:2rem;font-weight:950}@media(max-width:640px){.loro-stat-card{gap:.8rem;min-height:5.5rem;padding:.9rem 1rem}.loro-stat-card__icon{width:3rem;height:3rem;border-radius:.85rem}h2{font-size:clamp(1.2rem,5vw,1.55rem);line-height:1}.loro-stat-card__title{font-size:clamp(.84rem,3vw,.95rem);line-height:1.15}.loro-stat-card--compare-summary{grid-template-columns:3.1rem minmax(0,1fr);gap:.75rem;min-height:5.35rem;padding:.8rem .9rem;border-radius:1.2rem}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3rem;height:3rem}.loro-stat-card--compare-summary h2{font-size:clamp(1.1rem,5vw,1.45rem)}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.88rem,3.4vw,1rem)}.loro-stat-card--compare-inline{grid-template-columns:2.2rem minmax(0,1fr);gap:.55rem;min-height:3.3rem;padding:.55rem .75rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.2rem;height:2.2rem;border-radius:.75rem}.loro-stat-card--compare-inline h2{font-size:1rem}.loro-stat-card--compare-inline .loro-stat-card__title{font-size:.74rem}.loro-stat-card--image-corner{min-height:8.25rem;gap:.65rem;padding:.95rem 4.6rem .95rem .95rem;border-radius:1.15rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:2.45rem;height:2.45rem}.loro-stat-card--image-corner h2{font-size:clamp(1.05rem,4.8vw,1.65rem);line-height:1}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{font-size:.88rem;line-height:1.05}.loro-stat-card--image-corner .loro-stat-card__description{font-size:.78rem;line-height:1.16;max-width:16ch}.loro-stat-card--image-corner .loro-stat-card__image{top:1.15rem;right:.9rem;width:3.55rem}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3030
2217
|
}
|
|
3031
2218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroStatCard, decorators: [{
|
|
3032
2219
|
type: Component,
|
|
3033
|
-
args: [{ selector: 'loro-stat-card', standalone: true, imports: [LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3034
|
-
@if (variant() === 'image-corner' || variant() === 'card-basket') {
|
|
3035
|
-
<loro-image class="loro-stat-card__top-image" [name]="topImage() || 'loro-despensa'" [alt]="title()" width="6rem" />
|
|
3036
|
-
}
|
|
3037
|
-
<article class="loro-stat-card" [class]="'loro-stat-card loro-stat-card--' + variant()">
|
|
3038
|
-
@if (icon()) {
|
|
3039
|
-
<span class="loro-stat-card__icon">
|
|
3040
|
-
<loro-icon [name]="icon()!" [size]="iconSize()" [alt]="title()" [color]="variant() === 'danger' ? 'danger' : 'primary'" />
|
|
3041
|
-
</span>
|
|
3042
|
-
}
|
|
3043
|
-
<div class="loro-stat-card__copy">
|
|
3044
|
-
@if (eyebrow() || variant() === 'image-corner') {
|
|
3045
|
-
<p class="loro-stat-card__eyebrow">{{ eyebrow() || title() }}</p>
|
|
3046
|
-
<h2>{{ value() || title() }}</h2>
|
|
3047
|
-
}
|
|
3048
|
-
|
|
3049
|
-
@if (value() && variant() !== 'image-corner') {
|
|
3050
|
-
<p class="loro-stat-card__title">{{ title() }}</p>
|
|
3051
|
-
}
|
|
3052
|
-
@if (description()) {
|
|
3053
|
-
<p class="loro-stat-card__description">{{ description() }}</p>
|
|
3054
|
-
}
|
|
3055
|
-
</div>
|
|
3056
|
-
@if (variant() === 'card-basket') {
|
|
3057
|
-
<div class="shopping-summary-card__total">
|
|
3058
|
-
<small>Total estimado</small>
|
|
3059
|
-
<strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} €</strong>
|
|
3060
|
-
</div>
|
|
3061
|
-
}
|
|
3062
|
-
@if (image()) {
|
|
3063
|
-
<loro-image class="loro-stat-card__image" [name]="image()!" [alt]="title()" width="5.8rem" />
|
|
3064
|
-
}
|
|
3065
|
-
</article>
|
|
3066
|
-
|
|
3067
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-stat-card__top-image{display:flex;justify-content:center;pointer-events:none}.loro-stat-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;min-height:6.8rem;padding:1.1rem 1.25rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);isolation:isolate}.loro-stat-card--tinted{background:var(--loro-surface-tinted)}.loro-stat-card--danger{background:#dc26260f}.loro-stat-card--compare-summary{grid-template-columns:3.85rem minmax(0,1fr);gap:.95rem;min-height:6rem;padding:.95rem 1.1rem;border-radius:1.35rem;background:var(--loro-surface)}.loro-stat-card--compare-inline{grid-template-columns:2.5rem minmax(0,1fr);gap:.65rem;min-height:3.7rem;padding:.7rem .9rem;border-radius:1rem;background:var(--loro-surface);box-shadow:none}.loro-stat-card--image-corner{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.85rem;min-height:11.5rem;padding:1.2rem 6.9rem 1.2rem 1.2rem;border-radius:1.35rem;background:color-mix(in srgb,var(--loro-primary-500) 4%,var(--loro-surface))}.loro-stat-card__icon{position:relative;z-index:1;display:grid;width:3.7rem;height:3.7rem;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface)}.loro-stat-card--danger .loro-stat-card__icon{background:#dc262617}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3.55rem;height:3.55rem;border-radius:1rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.5rem;height:2.5rem;border-radius:.85rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:3rem;height:3rem;border-radius:50%}.loro-stat-card__copy{position:relative;z-index:1;display:grid;align-content:center;min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(1.45rem,4vw,2.15rem);font-weight:950;line-height:1.05;overflow-wrap:anywhere}.loro-stat-card__title{color:var(--loro-text-strong);font-size:1rem;font-weight:900}.loro-stat-card--compare-summary h2{font-size:clamp(1.25rem,4.8vw,1.75rem);line-height:.98}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.95rem,3.6vw,1.1rem);line-height:1.05}.loro-stat-card--compare-inline h2{font-size:clamp(.95rem,1.7vw,1.15rem);line-height:1}.loro-stat-card--compare-inline .loro-stat-card__title{color:var(--loro-muted-strong);font-size:.78rem;font-weight:850;line-height:1.05}.loro-stat-card--image-corner h2{font-size:clamp(1.45rem,3vw,2.1rem);line-height:1.02}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{color:var(--loro-text-strong);font-size:1.05rem;font-weight:900;line-height:1.12}.loro-stat-card__description,.loro-stat-card__eyebrow{margin-top:.35rem;color:var(--loro-muted);font-weight:700;line-height:1.35}.loro-stat-card__image{align-self:end}.loro-stat-card--image-corner .loro-stat-card__copy{align-content:start;gap:.5rem}.loro-stat-card--image-corner .loro-stat-card__eyebrow{margin-top:.15rem}.loro-stat-card--image-corner .loro-stat-card__description{margin-top:0;white-space:pre-line;max-width:18ch}.loro-stat-card--image-corner .loro-stat-card__image{position:absolute;top:1.55rem;right:1.2rem;align-self:start;width:4.95rem;pointer-events:none}.shopping-summary-card__total{display:grid;justify-items:end;color:var(--loro-muted);font-weight:750}.shopping-summary-card__total strong{color:var(--loro-primary-700);font-size:2rem;font-weight:950}@media(max-width:640px){.loro-stat-card{gap:.8rem;min-height:5.5rem;padding:.9rem 1rem}.loro-stat-card__icon{width:3rem;height:3rem;border-radius:.85rem}h2{font-size:clamp(1.2rem,5vw,1.55rem);line-height:1}.loro-stat-card__title{font-size:clamp(.84rem,3vw,.95rem);line-height:1.15}.loro-stat-card--compare-summary{grid-template-columns:3.1rem minmax(0,1fr);gap:.75rem;min-height:5.35rem;padding:.8rem .9rem;border-radius:1.2rem}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3rem;height:3rem}.loro-stat-card--compare-summary h2{font-size:clamp(1.1rem,5vw,1.45rem)}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.88rem,3.4vw,1rem)}.loro-stat-card--compare-inline{grid-template-columns:2.2rem minmax(0,1fr);gap:.55rem;min-height:3.3rem;padding:.55rem .75rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.2rem;height:2.2rem;border-radius:.75rem}.loro-stat-card--compare-inline h2{font-size:1rem}.loro-stat-card--compare-inline .loro-stat-card__title{font-size:.74rem}.loro-stat-card--image-corner{min-height:8.25rem;gap:.65rem;padding:.95rem 4.6rem .95rem .95rem;border-radius:1.15rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:2.45rem;height:2.45rem}.loro-stat-card--image-corner h2{font-size:clamp(1.05rem,4.8vw,1.65rem);line-height:1}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{font-size:.88rem;line-height:1.05}.loro-stat-card--image-corner .loro-stat-card__description{font-size:.78rem;line-height:1.16;max-width:16ch}.loro-stat-card--image-corner .loro-stat-card__image{top:1.15rem;right:.9rem;width:3.55rem}}\n"] }]
|
|
2220
|
+
args: [{ selector: 'loro-stat-card', standalone: true, imports: [LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (variant() === 'image-corner' || variant() === 'card-basket') {\n <loro-image class=\"loro-stat-card__top-image\" [name]=\"topImage() || 'loro-despensa'\" [alt]=\"title()\" width=\"6rem\" />\n }\n <article class=\"loro-stat-card\" [class]=\"'loro-stat-card loro-stat-card--' + variant()\">\n @if (icon()) {\n <span class=\"loro-stat-card__icon\">\n <loro-icon [name]=\"icon()!\" [size]=\"iconSize()\" [alt]=\"title()\" [color]=\"variant() === 'danger' ? 'danger' : 'primary'\" />\n </span>\n }\n <div class=\"loro-stat-card__copy\">\n @if (eyebrow() || variant() === 'image-corner') {\n <p class=\"loro-stat-card__eyebrow\">{{ eyebrow() || title() }}</p>\n <h2>{{ value() || title() }}</h2>\n }\n\n @if (value() && variant() !== 'image-corner') {\n <p class=\"loro-stat-card__title\">{{ title() }}</p>\n }\n @if (description()) {\n <p class=\"loro-stat-card__description\">{{ description() }}</p>\n }\n </div>\n @if (variant() === 'card-basket') {\n <div class=\"shopping-summary-card__total\">\n <small>Total estimado</small>\n <strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} \u20AC</strong>\n </div>\n }\n @if (image()) {\n <loro-image class=\"loro-stat-card__image\" [name]=\"image()!\" [alt]=\"title()\" width=\"5.8rem\" />\n }\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-stat-card__top-image{display:flex;justify-content:center;pointer-events:none}.loro-stat-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;min-height:6.8rem;padding:1.1rem 1.25rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);color:var(--loro-text);isolation:isolate}.loro-stat-card--tinted{background:var(--loro-surface-tinted)}.loro-stat-card--danger{background:#dc26260f}.loro-stat-card--compare-summary{grid-template-columns:3.85rem minmax(0,1fr);gap:.95rem;min-height:6rem;padding:.95rem 1.1rem;border-radius:1.35rem;background:var(--loro-surface)}.loro-stat-card--compare-inline{grid-template-columns:2.5rem minmax(0,1fr);gap:.65rem;min-height:3.7rem;padding:.7rem .9rem;border-radius:1rem;background:var(--loro-surface);box-shadow:none}.loro-stat-card--image-corner{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.85rem;min-height:11.5rem;padding:1.2rem 6.9rem 1.2rem 1.2rem;border-radius:1.35rem;background:color-mix(in srgb,var(--loro-primary-500) 4%,var(--loro-surface))}.loro-stat-card__icon{position:relative;z-index:1;display:grid;width:3.7rem;height:3.7rem;place-items:center;border-radius:1rem;background:var(--loro-brand-tint-surface)}.loro-stat-card--danger .loro-stat-card__icon{background:#dc262617}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3.55rem;height:3.55rem;border-radius:1rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.5rem;height:2.5rem;border-radius:.85rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:3rem;height:3rem;border-radius:50%}.loro-stat-card__copy{position:relative;z-index:1;display:grid;align-content:center;min-width:0}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(1.45rem,4vw,2.15rem);font-weight:950;line-height:1.05;overflow-wrap:anywhere}.loro-stat-card__title{color:var(--loro-text-strong);font-size:1rem;font-weight:900}.loro-stat-card--compare-summary h2{font-size:clamp(1.25rem,4.8vw,1.75rem);line-height:.98}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.95rem,3.6vw,1.1rem);line-height:1.05}.loro-stat-card--compare-inline h2{font-size:clamp(.95rem,1.7vw,1.15rem);line-height:1}.loro-stat-card--compare-inline .loro-stat-card__title{color:var(--loro-muted-strong);font-size:.78rem;font-weight:850;line-height:1.05}.loro-stat-card--image-corner h2{font-size:clamp(1.45rem,3vw,2.1rem);line-height:1.02}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{color:var(--loro-text-strong);font-size:1.05rem;font-weight:900;line-height:1.12}.loro-stat-card__description,.loro-stat-card__eyebrow{margin-top:.35rem;color:var(--loro-muted);font-weight:700;line-height:1.35}.loro-stat-card__image{align-self:end}.loro-stat-card--image-corner .loro-stat-card__copy{align-content:start;gap:.5rem}.loro-stat-card--image-corner .loro-stat-card__eyebrow{margin-top:.15rem}.loro-stat-card--image-corner .loro-stat-card__description{margin-top:0;white-space:pre-line;max-width:18ch}.loro-stat-card--image-corner .loro-stat-card__image{position:absolute;top:1.55rem;right:1.2rem;align-self:start;width:4.95rem;pointer-events:none}.shopping-summary-card__total{display:grid;justify-items:end;color:var(--loro-muted);font-weight:750}.shopping-summary-card__total strong{color:var(--loro-primary-700);font-size:2rem;font-weight:950}@media(max-width:640px){.loro-stat-card{gap:.8rem;min-height:5.5rem;padding:.9rem 1rem}.loro-stat-card__icon{width:3rem;height:3rem;border-radius:.85rem}h2{font-size:clamp(1.2rem,5vw,1.55rem);line-height:1}.loro-stat-card__title{font-size:clamp(.84rem,3vw,.95rem);line-height:1.15}.loro-stat-card--compare-summary{grid-template-columns:3.1rem minmax(0,1fr);gap:.75rem;min-height:5.35rem;padding:.8rem .9rem;border-radius:1.2rem}.loro-stat-card--compare-summary .loro-stat-card__icon{width:3rem;height:3rem}.loro-stat-card--compare-summary h2{font-size:clamp(1.1rem,5vw,1.45rem)}.loro-stat-card--compare-summary .loro-stat-card__title{font-size:clamp(.88rem,3.4vw,1rem)}.loro-stat-card--compare-inline{grid-template-columns:2.2rem minmax(0,1fr);gap:.55rem;min-height:3.3rem;padding:.55rem .75rem}.loro-stat-card--compare-inline .loro-stat-card__icon{width:2.2rem;height:2.2rem;border-radius:.75rem}.loro-stat-card--compare-inline h2{font-size:1rem}.loro-stat-card--compare-inline .loro-stat-card__title{font-size:.74rem}.loro-stat-card--image-corner{min-height:8.25rem;gap:.65rem;padding:.95rem 4.6rem .95rem .95rem;border-radius:1.15rem}.loro-stat-card--image-corner .loro-stat-card__icon{width:2.45rem;height:2.45rem}.loro-stat-card--image-corner h2{font-size:clamp(1.05rem,4.8vw,1.65rem);line-height:1}.loro-stat-card--image-corner .loro-stat-card__title,.loro-stat-card--image-corner .loro-stat-card__eyebrow{font-size:.88rem;line-height:1.05}.loro-stat-card--image-corner .loro-stat-card__description{font-size:.78rem;line-height:1.16;max-width:16ch}.loro-stat-card--image-corner .loro-stat-card__image{top:1.15rem;right:.9rem;width:3.55rem}}\n"] }]
|
|
3068
2221
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], eyebrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "eyebrow", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], image: [{ type: i0.Input, args: [{ isSignal: true, alias: "image", required: false }] }], topImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "topImage", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }] } });
|
|
3069
2222
|
|
|
3070
2223
|
class LoroStoreRankCard {
|
|
@@ -3076,53 +2229,11 @@ class LoroStoreRankCard {
|
|
|
3076
2229
|
best = input(false, ...(ngDevMode ? [{ debugName: "best" }] : /* istanbul ignore next */ []));
|
|
3077
2230
|
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
3078
2231
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroStoreRankCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3079
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroStoreRankCard, isStandalone: true, selector: "loro-store-rank-card", inputs: { rank: { classPropertyName: "rank", publicName: "rank", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, price: { classPropertyName: "price", publicName: "price", isSignal: true, isRequired: true, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, logoName: { classPropertyName: "logoName", publicName: "logoName", isSignal: true, isRequired: false, transformFunction: null }, best: { classPropertyName: "best", publicName: "best", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template:
|
|
3080
|
-
<article
|
|
3081
|
-
class="loro-store-rank-card"
|
|
3082
|
-
[class.loro-store-rank-card--best]="best()"
|
|
3083
|
-
[class.loro-store-rank-card--compact]="variant() === 'compact'">
|
|
3084
|
-
@if (variant() !== 'compact') {
|
|
3085
|
-
<span class="loro-store-rank-card__rank">{{ rank() }}</span>
|
|
3086
|
-
}
|
|
3087
|
-
@if (logoName()) {
|
|
3088
|
-
<loro-image class="loro-store-rank-card__logo" [name]="logoName()!" [alt]="name()" width="100%" height="100%" fit="contain" />
|
|
3089
|
-
} @else {
|
|
3090
|
-
<span class="loro-store-rank-card__mark">{{ name().slice(0, 3) }}</span>
|
|
3091
|
-
}
|
|
3092
|
-
@if (variant() !== 'compact') {
|
|
3093
|
-
<h3>{{ name() }}</h3>
|
|
3094
|
-
}
|
|
3095
|
-
<strong>{{ price() | number: '1.2-2' }} €</strong>
|
|
3096
|
-
@if (variant() !== 'compact') {
|
|
3097
|
-
<loro-badge [label]="best() ? 'Mejor precio' : '+' + (delta() | number: '1.2-2') + ' €'" [variant]="best() ? 'success' : 'info'" />
|
|
3098
|
-
}
|
|
3099
|
-
</article>
|
|
3100
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-store-rank-card{position:relative;display:grid;justify-items:center;align-content:center;gap:.45rem;min-height:10.8rem;padding:1.4rem 1rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);text-align:center}.loro-store-rank-card--compact{gap:.25rem;min-height:4.9rem;padding:.7rem .8rem;border-radius:.95rem;box-shadow:none}.loro-store-rank-card__rank{position:absolute;top:.85rem;left:.85rem;display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--loro-surface-muted);color:var(--loro-primary-700);font-weight:950}.loro-store-rank-card--best .loro-store-rank-card__rank{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-store-rank-card__logo{display:block;width:4.5rem;height:2.6rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:3rem;height:1.8rem}.loro-store-rank-card__logo ::ng-deep img{width:100%;height:100%;object-fit:contain}.loro-store-rank-card__mark{color:var(--loro-primary-700);font-size:1.5rem;font-weight:950}h3,strong{margin:0;color:var(--loro-text-strong)}h3{font-size:1.05rem;font-weight:900;line-height:1.12;overflow-wrap:anywhere}strong{color:var(--loro-primary-700);font-size:clamp(1.35rem,3vw,1.8rem);font-weight:950;line-height:1;white-space:nowrap}.loro-store-rank-card--compact strong{font-size:clamp(1rem,2.1vw,1.2rem);line-height:1}@media(max-width:640px){.loro-store-rank-card{gap:.35rem;min-height:8.9rem;padding:1rem .65rem .85rem;border-radius:.9rem}.loro-store-rank-card__rank{top:.6rem;left:.6rem;width:1.75rem;height:1.75rem;font-size:.95rem}.loro-store-rank-card__logo{width:3.25rem;height:2rem}.loro-store-rank-card--compact{min-height:4.55rem;padding:.55rem .65rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:2.7rem;height:1.6rem}.loro-store-rank-card--compact strong{font-size:clamp(.92rem,3.8vw,1.08rem)}h3{font-size:clamp(.9rem,3.6vw,1rem)}strong{font-size:clamp(1.15rem,5vw,1.55rem)}}\n"], dependencies: [{ kind: "component", type: LoroBadge, selector: "loro-badge", inputs: ["label", "variant"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2232
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroStoreRankCard, isStandalone: true, selector: "loro-store-rank-card", inputs: { rank: { classPropertyName: "rank", publicName: "rank", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, price: { classPropertyName: "price", publicName: "price", isSignal: true, isRequired: true, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, logoName: { classPropertyName: "logoName", publicName: "logoName", isSignal: true, isRequired: false, transformFunction: null }, best: { classPropertyName: "best", publicName: "best", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<article\n class=\"loro-store-rank-card\"\n [class.loro-store-rank-card--best]=\"best()\"\n [class.loro-store-rank-card--compact]=\"variant() === 'compact'\">\n @if (variant() !== 'compact') {\n <span class=\"loro-store-rank-card__rank\">{{ rank() }}</span>\n }\n @if (logoName()) {\n <loro-image class=\"loro-store-rank-card__logo\" [name]=\"logoName()!\" [alt]=\"name()\" width=\"100%\" height=\"100%\" fit=\"contain\" />\n } @else {\n <span class=\"loro-store-rank-card__mark\">{{ name().slice(0, 3) }}</span>\n }\n @if (variant() !== 'compact') {\n <h3>{{ name() }}</h3>\n }\n <strong>{{ price() | number: '1.2-2' }} \u20AC</strong>\n @if (variant() !== 'compact') {\n <loro-badge [label]=\"best() ? 'Mejor precio' : '+' + (delta() | number: '1.2-2') + ' \u20AC'\" [variant]=\"best() ? 'success' : 'info'\" />\n }\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-store-rank-card{position:relative;display:grid;justify-items:center;align-content:center;gap:.45rem;min-height:10.8rem;padding:1.4rem 1rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);text-align:center}.loro-store-rank-card--compact{gap:.25rem;min-height:4.9rem;padding:.7rem .8rem;border-radius:.95rem;box-shadow:none}.loro-store-rank-card__rank{position:absolute;top:.85rem;left:.85rem;display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--loro-surface-muted);color:var(--loro-primary-700);font-weight:950}.loro-store-rank-card--best .loro-store-rank-card__rank{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-store-rank-card__logo{display:block;width:4.5rem;height:2.6rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:3rem;height:1.8rem}.loro-store-rank-card__logo ::ng-deep img{width:100%;height:100%;object-fit:contain}.loro-store-rank-card__mark{color:var(--loro-primary-700);font-size:1.5rem;font-weight:950}h3,strong{margin:0;color:var(--loro-text-strong)}h3{font-size:1.05rem;font-weight:900;line-height:1.12;overflow-wrap:anywhere}strong{color:var(--loro-primary-700);font-size:clamp(1.35rem,3vw,1.8rem);font-weight:950;line-height:1;white-space:nowrap}.loro-store-rank-card--compact strong{font-size:clamp(1rem,2.1vw,1.2rem);line-height:1}@media(max-width:640px){.loro-store-rank-card{gap:.35rem;min-height:8.9rem;padding:1rem .65rem .85rem;border-radius:.9rem}.loro-store-rank-card__rank{top:.6rem;left:.6rem;width:1.75rem;height:1.75rem;font-size:.95rem}.loro-store-rank-card__logo{width:3.25rem;height:2rem}.loro-store-rank-card--compact{min-height:4.55rem;padding:.55rem .65rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:2.7rem;height:1.6rem}.loro-store-rank-card--compact strong{font-size:clamp(.92rem,3.8vw,1.08rem)}h3{font-size:clamp(.9rem,3.6vw,1rem)}strong{font-size:clamp(1.15rem,5vw,1.55rem)}}\n"], dependencies: [{ kind: "component", type: LoroBadge, selector: "loro-badge", inputs: ["label", "variant"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3101
2233
|
}
|
|
3102
2234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroStoreRankCard, decorators: [{
|
|
3103
2235
|
type: Component,
|
|
3104
|
-
args: [{ selector: 'loro-store-rank-card', standalone: true, imports: [DecimalPipe, LoroBadge, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3105
|
-
<article
|
|
3106
|
-
class="loro-store-rank-card"
|
|
3107
|
-
[class.loro-store-rank-card--best]="best()"
|
|
3108
|
-
[class.loro-store-rank-card--compact]="variant() === 'compact'">
|
|
3109
|
-
@if (variant() !== 'compact') {
|
|
3110
|
-
<span class="loro-store-rank-card__rank">{{ rank() }}</span>
|
|
3111
|
-
}
|
|
3112
|
-
@if (logoName()) {
|
|
3113
|
-
<loro-image class="loro-store-rank-card__logo" [name]="logoName()!" [alt]="name()" width="100%" height="100%" fit="contain" />
|
|
3114
|
-
} @else {
|
|
3115
|
-
<span class="loro-store-rank-card__mark">{{ name().slice(0, 3) }}</span>
|
|
3116
|
-
}
|
|
3117
|
-
@if (variant() !== 'compact') {
|
|
3118
|
-
<h3>{{ name() }}</h3>
|
|
3119
|
-
}
|
|
3120
|
-
<strong>{{ price() | number: '1.2-2' }} €</strong>
|
|
3121
|
-
@if (variant() !== 'compact') {
|
|
3122
|
-
<loro-badge [label]="best() ? 'Mejor precio' : '+' + (delta() | number: '1.2-2') + ' €'" [variant]="best() ? 'success' : 'info'" />
|
|
3123
|
-
}
|
|
3124
|
-
</article>
|
|
3125
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-store-rank-card{position:relative;display:grid;justify-items:center;align-content:center;gap:.45rem;min-height:10.8rem;padding:1.4rem 1rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);text-align:center}.loro-store-rank-card--compact{gap:.25rem;min-height:4.9rem;padding:.7rem .8rem;border-radius:.95rem;box-shadow:none}.loro-store-rank-card__rank{position:absolute;top:.85rem;left:.85rem;display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--loro-surface-muted);color:var(--loro-primary-700);font-weight:950}.loro-store-rank-card--best .loro-store-rank-card__rank{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-store-rank-card__logo{display:block;width:4.5rem;height:2.6rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:3rem;height:1.8rem}.loro-store-rank-card__logo ::ng-deep img{width:100%;height:100%;object-fit:contain}.loro-store-rank-card__mark{color:var(--loro-primary-700);font-size:1.5rem;font-weight:950}h3,strong{margin:0;color:var(--loro-text-strong)}h3{font-size:1.05rem;font-weight:900;line-height:1.12;overflow-wrap:anywhere}strong{color:var(--loro-primary-700);font-size:clamp(1.35rem,3vw,1.8rem);font-weight:950;line-height:1;white-space:nowrap}.loro-store-rank-card--compact strong{font-size:clamp(1rem,2.1vw,1.2rem);line-height:1}@media(max-width:640px){.loro-store-rank-card{gap:.35rem;min-height:8.9rem;padding:1rem .65rem .85rem;border-radius:.9rem}.loro-store-rank-card__rank{top:.6rem;left:.6rem;width:1.75rem;height:1.75rem;font-size:.95rem}.loro-store-rank-card__logo{width:3.25rem;height:2rem}.loro-store-rank-card--compact{min-height:4.55rem;padding:.55rem .65rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:2.7rem;height:1.6rem}.loro-store-rank-card--compact strong{font-size:clamp(.92rem,3.8vw,1.08rem)}h3{font-size:clamp(.9rem,3.6vw,1rem)}strong{font-size:clamp(1.15rem,5vw,1.55rem)}}\n"] }]
|
|
2236
|
+
args: [{ selector: 'loro-store-rank-card', standalone: true, imports: [DecimalPipe, LoroBadge, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "<article\n class=\"loro-store-rank-card\"\n [class.loro-store-rank-card--best]=\"best()\"\n [class.loro-store-rank-card--compact]=\"variant() === 'compact'\">\n @if (variant() !== 'compact') {\n <span class=\"loro-store-rank-card__rank\">{{ rank() }}</span>\n }\n @if (logoName()) {\n <loro-image class=\"loro-store-rank-card__logo\" [name]=\"logoName()!\" [alt]=\"name()\" width=\"100%\" height=\"100%\" fit=\"contain\" />\n } @else {\n <span class=\"loro-store-rank-card__mark\">{{ name().slice(0, 3) }}</span>\n }\n @if (variant() !== 'compact') {\n <h3>{{ name() }}</h3>\n }\n <strong>{{ price() | number: '1.2-2' }} \u20AC</strong>\n @if (variant() !== 'compact') {\n <loro-badge [label]=\"best() ? 'Mejor precio' : '+' + (delta() | number: '1.2-2') + ' \u20AC'\" [variant]=\"best() ? 'success' : 'info'\" />\n }\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-store-rank-card{position:relative;display:grid;justify-items:center;align-content:center;gap:.45rem;min-height:10.8rem;padding:1.4rem 1rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft);text-align:center}.loro-store-rank-card--compact{gap:.25rem;min-height:4.9rem;padding:.7rem .8rem;border-radius:.95rem;box-shadow:none}.loro-store-rank-card__rank{position:absolute;top:.85rem;left:.85rem;display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--loro-surface-muted);color:var(--loro-primary-700);font-weight:950}.loro-store-rank-card--best .loro-store-rank-card__rank{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-store-rank-card__logo{display:block;width:4.5rem;height:2.6rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:3rem;height:1.8rem}.loro-store-rank-card__logo ::ng-deep img{width:100%;height:100%;object-fit:contain}.loro-store-rank-card__mark{color:var(--loro-primary-700);font-size:1.5rem;font-weight:950}h3,strong{margin:0;color:var(--loro-text-strong)}h3{font-size:1.05rem;font-weight:900;line-height:1.12;overflow-wrap:anywhere}strong{color:var(--loro-primary-700);font-size:clamp(1.35rem,3vw,1.8rem);font-weight:950;line-height:1;white-space:nowrap}.loro-store-rank-card--compact strong{font-size:clamp(1rem,2.1vw,1.2rem);line-height:1}@media(max-width:640px){.loro-store-rank-card{gap:.35rem;min-height:8.9rem;padding:1rem .65rem .85rem;border-radius:.9rem}.loro-store-rank-card__rank{top:.6rem;left:.6rem;width:1.75rem;height:1.75rem;font-size:.95rem}.loro-store-rank-card__logo{width:3.25rem;height:2rem}.loro-store-rank-card--compact{min-height:4.55rem;padding:.55rem .65rem}.loro-store-rank-card--compact .loro-store-rank-card__logo{width:2.7rem;height:1.6rem}.loro-store-rank-card--compact strong{font-size:clamp(.92rem,3.8vw,1.08rem)}h3{font-size:clamp(.9rem,3.6vw,1rem)}strong{font-size:clamp(1.15rem,5vw,1.55rem)}}\n"] }]
|
|
3126
2237
|
}], propDecorators: { rank: [{ type: i0.Input, args: [{ isSignal: true, alias: "rank", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], price: [{ type: i0.Input, args: [{ isSignal: true, alias: "price", required: true }] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], logoName: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoName", required: false }] }], best: [{ type: i0.Input, args: [{ isSignal: true, alias: "best", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
3127
2238
|
|
|
3128
2239
|
class LoroSummaryBar {
|
|
@@ -3138,77 +2249,11 @@ class LoroSummaryBar {
|
|
|
3138
2249
|
primaryAction = output();
|
|
3139
2250
|
secondaryAction = output();
|
|
3140
2251
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroSummaryBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroSummaryBar, isStandalone: true, selector: "loro-summary-bar", inputs: { totalLabel: { classPropertyName: "totalLabel", publicName: "totalLabel", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, primaryLabel: { classPropertyName: "primaryLabel", publicName: "primaryLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryLabel: { classPropertyName: "secondaryLabel", publicName: "secondaryLabel", isSignal: true, isRequired: false, transformFunction: null }, helper: { classPropertyName: "helper", publicName: "helper", isSignal: true, isRequired: false, transformFunction: null }, leftImage: { classPropertyName: "leftImage", publicName: "leftImage", isSignal: true, isRequired: false, transformFunction: null }, rightImage: { classPropertyName: "rightImage", publicName: "rightImage", isSignal: true, isRequired: false, transformFunction: null }, primaryDisabled: { classPropertyName: "primaryDisabled", publicName: "primaryDisabled", isSignal: true, isRequired: false, transformFunction: null }, secondaryDisabled: { classPropertyName: "secondaryDisabled", publicName: "secondaryDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, ngImport: i0, template:
|
|
3142
|
-
<aside class="loro-summary-bar">
|
|
3143
|
-
<div class="loro-summary-bar__total">
|
|
3144
|
-
<small>{{ totalLabel() }}</small>
|
|
3145
|
-
<strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} €</strong>
|
|
3146
|
-
@if (secondaryLabel()) {
|
|
3147
|
-
<loro-button
|
|
3148
|
-
[label]="secondaryLabel()"
|
|
3149
|
-
icon="tag"
|
|
3150
|
-
[iconSize]="20"
|
|
3151
|
-
variant="outline"
|
|
3152
|
-
[disabled]="secondaryDisabled()"
|
|
3153
|
-
(buttonClick)="secondaryAction.emit()" />
|
|
3154
|
-
}
|
|
3155
|
-
</div>
|
|
3156
|
-
<div class="loro-summary-bar__flow" aria-hidden="true">
|
|
3157
|
-
<loro-image [name]="leftImage()" alt="" width="5.9rem" />
|
|
3158
|
-
<loro-icon name="arrow-right" [size]="34" alt="" color="primary" />
|
|
3159
|
-
<loro-image [name]="rightImage()" alt="" width="5.25rem" />
|
|
3160
|
-
</div>
|
|
3161
|
-
<div class="loro-summary-bar__action">
|
|
3162
|
-
<loro-button
|
|
3163
|
-
[label]="primaryLabel()"
|
|
3164
|
-
icon="check"
|
|
3165
|
-
[iconSize]="21"
|
|
3166
|
-
[fullWidth]="true"
|
|
3167
|
-
[disabled]="primaryDisabled()"
|
|
3168
|
-
(buttonClick)="primaryAction.emit()" />
|
|
3169
|
-
@if (helper()) {
|
|
3170
|
-
<small>{{ helper() }}</small>
|
|
3171
|
-
}
|
|
3172
|
-
</div>
|
|
3173
|
-
</aside>
|
|
3174
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-summary-bar{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:1.45rem;width:100%;min-width:0;min-height:6.75rem;padding:.75rem 1.9rem;box-sizing:border-box;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-panel)}.loro-summary-bar__total{display:grid;grid-template-columns:minmax(7rem,auto) minmax(9.5rem,auto);align-items:end;justify-content:start;gap:.25rem 1.6rem;min-width:0}.loro-summary-bar__total loro-button{grid-row:1 / span 2;grid-column:2;align-self:center;--loro-summary-button-min-height: 2.9rem;--loro-summary-button-padding: .65rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar__action{display:grid;justify-items:stretch;gap:.45rem;min-width:0;max-width:100%;overflow:hidden}small{color:var(--loro-muted);font-size:.92rem;font-weight:750;line-height:1.3}strong{color:var(--loro-primary-700);font-size:2.15rem;font-weight:950;line-height:1;white-space:nowrap}.loro-summary-bar__flow{display:inline-grid;grid-template-columns:auto auto auto;align-items:center;justify-content:center;gap:clamp(.55rem,1vw,1rem);min-width:0;padding-inline:clamp(.75rem,1.8vw,2.1rem);border-left:1px solid var(--loro-border-subtle);color:var(--loro-primary-700);font-size:2rem;font-weight:900}.loro-summary-bar__action loro-button{min-width:0;--loro-summary-button-min-height: 2.65rem;--loro-summary-button-padding: .62rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar loro-button{--loro-button-min-height: var(--loro-summary-button-min-height);--loro-button-padding: var(--loro-summary-button-padding);--loro-button-radius: .55rem;--loro-button-font-size: var(--loro-summary-button-font-size)}:host ::ng-deep .loro-summary-bar loro-button .loro-button{max-width:100%;min-width:0}:host ::ng-deep .loro-summary-bar loro-button .loro-button span{min-width:0;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .loro-summary-bar__action loro-button,:host ::ng-deep .loro-summary-bar__action loro-button .loro-button{width:100%}.loro-summary-bar__action small{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:center}@media(max-width:1023.88px){.loro-summary-bar{grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);grid-template-areas:\"total flow\" \"total action\";align-items:center;gap:.55rem .8rem;min-height:0;padding:.85rem .95rem;border-radius:1.15rem}.loro-summary-bar__total{grid-area:total;grid-template-columns:1fr;align-content:center;justify-items:start;gap:.36rem;min-width:0;height:100%;padding-right:.65rem;border-right:1px solid var(--loro-border-subtle)}.loro-summary-bar__total loro-button{grid-row:auto;grid-column:auto;width:100%;max-width:9.6rem;--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .6rem;--loro-summary-button-font-size: .82rem}.loro-summary-bar__flow{grid-area:flow;display:inline-grid;justify-self:center;width:100%;max-width:10.75rem;gap:.32rem;padding-inline:0;border-left:0}.loro-summary-bar__flow loro-image:first-child{width:4.35rem}.loro-summary-bar__flow loro-image:last-child{width:3.85rem}.loro-summary-bar__action{grid-area:action;justify-items:stretch;gap:.28rem;min-width:0;width:100%}.loro-summary-bar__action loro-button{display:block;width:100%;min-width:0;--loro-summary-button-min-height: 2.35rem;--loro-summary-button-padding: .5rem .55rem;--loro-summary-button-font-size: .82rem}small{font-size:.82rem}strong{font-size:clamp(1.45rem,5.6vw,1.9rem)}}@media(max-width:640px){.loro-summary-bar{grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:.48rem .62rem;padding:.78rem .82rem}.loro-summary-bar__total loro-button{max-width:8.9rem;--loro-summary-button-min-height: 2.1rem;--loro-summary-button-padding: .44rem .52rem;--loro-summary-button-font-size: .74rem}.loro-summary-bar__flow loro-image:first-child{width:3.45rem}.loro-summary-bar__flow loro-image:last-child{width:3.2rem}.loro-summary-bar__flow{max-width:8.45rem;gap:.2rem}.loro-summary-bar__flow loro-icon{transform:scale(.78)}.loro-summary-bar__action loro-button{--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .44rem;--loro-summary-button-font-size: .74rem}small{font-size:.72rem}strong{font-size:clamp(1.28rem,7vw,1.6rem)}}@media(max-width:430px){.loro-summary-bar{grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);padding:.72rem}.loro-summary-bar__total{padding-right:.5rem}.loro-summary-bar__total loro-button{max-width:7.8rem;--loro-summary-button-font-size: .68rem}.loro-summary-bar__action loro-button{--loro-summary-button-font-size: .68rem}.loro-summary-bar__flow{max-width:7.6rem}.loro-summary-bar__flow loro-image:first-child{width:3rem}.loro-summary-bar__flow loro-image:last-child{width:2.85rem}}\n"], dependencies: [{ kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2252
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroSummaryBar, isStandalone: true, selector: "loro-summary-bar", inputs: { totalLabel: { classPropertyName: "totalLabel", publicName: "totalLabel", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, primaryLabel: { classPropertyName: "primaryLabel", publicName: "primaryLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryLabel: { classPropertyName: "secondaryLabel", publicName: "secondaryLabel", isSignal: true, isRequired: false, transformFunction: null }, helper: { classPropertyName: "helper", publicName: "helper", isSignal: true, isRequired: false, transformFunction: null }, leftImage: { classPropertyName: "leftImage", publicName: "leftImage", isSignal: true, isRequired: false, transformFunction: null }, rightImage: { classPropertyName: "rightImage", publicName: "rightImage", isSignal: true, isRequired: false, transformFunction: null }, primaryDisabled: { classPropertyName: "primaryDisabled", publicName: "primaryDisabled", isSignal: true, isRequired: false, transformFunction: null }, secondaryDisabled: { classPropertyName: "secondaryDisabled", publicName: "secondaryDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, ngImport: i0, template: "<aside class=\"loro-summary-bar\">\n <div class=\"loro-summary-bar__total\">\n <small>{{ totalLabel() }}</small>\n <strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} \u20AC</strong>\n @if (secondaryLabel()) {\n <loro-button\n [label]=\"secondaryLabel()\"\n icon=\"tag\"\n [iconSize]=\"20\"\n variant=\"outline\"\n [disabled]=\"secondaryDisabled()\"\n (buttonClick)=\"secondaryAction.emit()\" />\n }\n </div>\n <div class=\"loro-summary-bar__flow\" aria-hidden=\"true\">\n <loro-image [name]=\"leftImage()\" alt=\"\" width=\"5.9rem\" />\n <loro-icon name=\"arrow-right\" [size]=\"34\" alt=\"\" color=\"primary\" />\n <loro-image [name]=\"rightImage()\" alt=\"\" width=\"5.25rem\" />\n </div>\n <div class=\"loro-summary-bar__action\">\n <loro-button\n [label]=\"primaryLabel()\"\n icon=\"check\"\n [iconSize]=\"21\"\n [fullWidth]=\"true\"\n [disabled]=\"primaryDisabled()\"\n (buttonClick)=\"primaryAction.emit()\" />\n @if (helper()) {\n <small>{{ helper() }}</small>\n }\n </div>\n </aside>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-summary-bar{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:1.45rem;width:100%;min-width:0;min-height:6.75rem;padding:.75rem 1.9rem;box-sizing:border-box;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-panel)}.loro-summary-bar__total{display:grid;grid-template-columns:minmax(7rem,auto) minmax(9.5rem,auto);align-items:end;justify-content:start;gap:.25rem 1.6rem;min-width:0}.loro-summary-bar__total loro-button{grid-row:1/span 2;grid-column:2;align-self:center;--loro-summary-button-min-height: 2.9rem;--loro-summary-button-padding: .65rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar__action{display:grid;justify-items:stretch;gap:.45rem;min-width:0;max-width:100%;overflow:hidden}small{color:var(--loro-muted);font-size:.92rem;font-weight:750;line-height:1.3}strong{color:var(--loro-primary-700);font-size:2.15rem;font-weight:950;line-height:1;white-space:nowrap}.loro-summary-bar__flow{display:inline-grid;grid-template-columns:auto auto auto;align-items:center;justify-content:center;gap:clamp(.55rem,1vw,1rem);min-width:0;padding-inline:clamp(.75rem,1.8vw,2.1rem);border-left:1px solid var(--loro-border-subtle);color:var(--loro-primary-700);font-size:2rem;font-weight:900}.loro-summary-bar__action loro-button{min-width:0;--loro-summary-button-min-height: 2.65rem;--loro-summary-button-padding: .62rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar loro-button{--loro-button-min-height: var(--loro-summary-button-min-height);--loro-button-padding: var(--loro-summary-button-padding);--loro-button-radius: .55rem;--loro-button-font-size: var(--loro-summary-button-font-size)}:host ::ng-deep .loro-summary-bar loro-button .loro-button{max-width:100%;min-width:0}:host ::ng-deep .loro-summary-bar loro-button .loro-button span{min-width:0;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .loro-summary-bar__action loro-button,:host ::ng-deep .loro-summary-bar__action loro-button .loro-button{width:100%}.loro-summary-bar__action small{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:center}@media(max-width:1023.88px){.loro-summary-bar{grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);grid-template-areas:\"total flow\" \"total action\";align-items:center;gap:.55rem .8rem;min-height:0;padding:.85rem .95rem;border-radius:1.15rem}.loro-summary-bar__total{grid-area:total;grid-template-columns:1fr;align-content:center;justify-items:start;gap:.36rem;min-width:0;height:100%;padding-right:.65rem;border-right:1px solid var(--loro-border-subtle)}.loro-summary-bar__total loro-button{grid-row:auto;grid-column:auto;width:100%;max-width:9.6rem;--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .6rem;--loro-summary-button-font-size: .82rem}.loro-summary-bar__flow{grid-area:flow;display:inline-grid;justify-self:center;width:100%;max-width:10.75rem;gap:.32rem;padding-inline:0;border-left:0}.loro-summary-bar__flow loro-image:first-child{width:4.35rem}.loro-summary-bar__flow loro-image:last-child{width:3.85rem}.loro-summary-bar__action{grid-area:action;justify-items:stretch;gap:.28rem;min-width:0;width:100%}.loro-summary-bar__action loro-button{display:block;width:100%;min-width:0;--loro-summary-button-min-height: 2.35rem;--loro-summary-button-padding: .5rem .55rem;--loro-summary-button-font-size: .82rem}small{font-size:.82rem}strong{font-size:clamp(1.45rem,5.6vw,1.9rem)}}@media(max-width:640px){.loro-summary-bar{grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:.48rem .62rem;padding:.78rem .82rem}.loro-summary-bar__total loro-button{max-width:8.9rem;--loro-summary-button-min-height: 2.1rem;--loro-summary-button-padding: .44rem .52rem;--loro-summary-button-font-size: .74rem}.loro-summary-bar__flow loro-image:first-child{width:3.45rem}.loro-summary-bar__flow loro-image:last-child{width:3.2rem}.loro-summary-bar__flow{max-width:8.45rem;gap:.2rem}.loro-summary-bar__flow loro-icon{transform:scale(.78)}.loro-summary-bar__action loro-button{--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .44rem;--loro-summary-button-font-size: .74rem}small{font-size:.72rem}strong{font-size:clamp(1.28rem,7vw,1.6rem)}}@media(max-width:430px){.loro-summary-bar{grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);padding:.72rem}.loro-summary-bar__total{padding-right:.5rem}.loro-summary-bar__total loro-button{max-width:7.8rem;--loro-summary-button-font-size: .68rem}.loro-summary-bar__action loro-button{--loro-summary-button-font-size: .68rem}.loro-summary-bar__flow{max-width:7.6rem}.loro-summary-bar__flow loro-image:first-child{width:3rem}.loro-summary-bar__flow loro-image:last-child{width:2.85rem}}\n"], dependencies: [{ kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3175
2253
|
}
|
|
3176
2254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroSummaryBar, decorators: [{
|
|
3177
2255
|
type: Component,
|
|
3178
|
-
args: [{ selector: 'loro-summary-bar', standalone: true, imports: [LoroButton, LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3179
|
-
<aside class="loro-summary-bar">
|
|
3180
|
-
<div class="loro-summary-bar__total">
|
|
3181
|
-
<small>{{ totalLabel() }}</small>
|
|
3182
|
-
<strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} €</strong>
|
|
3183
|
-
@if (secondaryLabel()) {
|
|
3184
|
-
<loro-button
|
|
3185
|
-
[label]="secondaryLabel()"
|
|
3186
|
-
icon="tag"
|
|
3187
|
-
[iconSize]="20"
|
|
3188
|
-
variant="outline"
|
|
3189
|
-
[disabled]="secondaryDisabled()"
|
|
3190
|
-
(buttonClick)="secondaryAction.emit()" />
|
|
3191
|
-
}
|
|
3192
|
-
</div>
|
|
3193
|
-
<div class="loro-summary-bar__flow" aria-hidden="true">
|
|
3194
|
-
<loro-image [name]="leftImage()" alt="" width="5.9rem" />
|
|
3195
|
-
<loro-icon name="arrow-right" [size]="34" alt="" color="primary" />
|
|
3196
|
-
<loro-image [name]="rightImage()" alt="" width="5.25rem" />
|
|
3197
|
-
</div>
|
|
3198
|
-
<div class="loro-summary-bar__action">
|
|
3199
|
-
<loro-button
|
|
3200
|
-
[label]="primaryLabel()"
|
|
3201
|
-
icon="check"
|
|
3202
|
-
[iconSize]="21"
|
|
3203
|
-
[fullWidth]="true"
|
|
3204
|
-
[disabled]="primaryDisabled()"
|
|
3205
|
-
(buttonClick)="primaryAction.emit()" />
|
|
3206
|
-
@if (helper()) {
|
|
3207
|
-
<small>{{ helper() }}</small>
|
|
3208
|
-
}
|
|
3209
|
-
</div>
|
|
3210
|
-
</aside>
|
|
3211
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-summary-bar{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:1.45rem;width:100%;min-width:0;min-height:6.75rem;padding:.75rem 1.9rem;box-sizing:border-box;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-panel)}.loro-summary-bar__total{display:grid;grid-template-columns:minmax(7rem,auto) minmax(9.5rem,auto);align-items:end;justify-content:start;gap:.25rem 1.6rem;min-width:0}.loro-summary-bar__total loro-button{grid-row:1 / span 2;grid-column:2;align-self:center;--loro-summary-button-min-height: 2.9rem;--loro-summary-button-padding: .65rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar__action{display:grid;justify-items:stretch;gap:.45rem;min-width:0;max-width:100%;overflow:hidden}small{color:var(--loro-muted);font-size:.92rem;font-weight:750;line-height:1.3}strong{color:var(--loro-primary-700);font-size:2.15rem;font-weight:950;line-height:1;white-space:nowrap}.loro-summary-bar__flow{display:inline-grid;grid-template-columns:auto auto auto;align-items:center;justify-content:center;gap:clamp(.55rem,1vw,1rem);min-width:0;padding-inline:clamp(.75rem,1.8vw,2.1rem);border-left:1px solid var(--loro-border-subtle);color:var(--loro-primary-700);font-size:2rem;font-weight:900}.loro-summary-bar__action loro-button{min-width:0;--loro-summary-button-min-height: 2.65rem;--loro-summary-button-padding: .62rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar loro-button{--loro-button-min-height: var(--loro-summary-button-min-height);--loro-button-padding: var(--loro-summary-button-padding);--loro-button-radius: .55rem;--loro-button-font-size: var(--loro-summary-button-font-size)}:host ::ng-deep .loro-summary-bar loro-button .loro-button{max-width:100%;min-width:0}:host ::ng-deep .loro-summary-bar loro-button .loro-button span{min-width:0;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .loro-summary-bar__action loro-button,:host ::ng-deep .loro-summary-bar__action loro-button .loro-button{width:100%}.loro-summary-bar__action small{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:center}@media(max-width:1023.88px){.loro-summary-bar{grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);grid-template-areas:\"total flow\" \"total action\";align-items:center;gap:.55rem .8rem;min-height:0;padding:.85rem .95rem;border-radius:1.15rem}.loro-summary-bar__total{grid-area:total;grid-template-columns:1fr;align-content:center;justify-items:start;gap:.36rem;min-width:0;height:100%;padding-right:.65rem;border-right:1px solid var(--loro-border-subtle)}.loro-summary-bar__total loro-button{grid-row:auto;grid-column:auto;width:100%;max-width:9.6rem;--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .6rem;--loro-summary-button-font-size: .82rem}.loro-summary-bar__flow{grid-area:flow;display:inline-grid;justify-self:center;width:100%;max-width:10.75rem;gap:.32rem;padding-inline:0;border-left:0}.loro-summary-bar__flow loro-image:first-child{width:4.35rem}.loro-summary-bar__flow loro-image:last-child{width:3.85rem}.loro-summary-bar__action{grid-area:action;justify-items:stretch;gap:.28rem;min-width:0;width:100%}.loro-summary-bar__action loro-button{display:block;width:100%;min-width:0;--loro-summary-button-min-height: 2.35rem;--loro-summary-button-padding: .5rem .55rem;--loro-summary-button-font-size: .82rem}small{font-size:.82rem}strong{font-size:clamp(1.45rem,5.6vw,1.9rem)}}@media(max-width:640px){.loro-summary-bar{grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:.48rem .62rem;padding:.78rem .82rem}.loro-summary-bar__total loro-button{max-width:8.9rem;--loro-summary-button-min-height: 2.1rem;--loro-summary-button-padding: .44rem .52rem;--loro-summary-button-font-size: .74rem}.loro-summary-bar__flow loro-image:first-child{width:3.45rem}.loro-summary-bar__flow loro-image:last-child{width:3.2rem}.loro-summary-bar__flow{max-width:8.45rem;gap:.2rem}.loro-summary-bar__flow loro-icon{transform:scale(.78)}.loro-summary-bar__action loro-button{--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .44rem;--loro-summary-button-font-size: .74rem}small{font-size:.72rem}strong{font-size:clamp(1.28rem,7vw,1.6rem)}}@media(max-width:430px){.loro-summary-bar{grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);padding:.72rem}.loro-summary-bar__total{padding-right:.5rem}.loro-summary-bar__total loro-button{max-width:7.8rem;--loro-summary-button-font-size: .68rem}.loro-summary-bar__action loro-button{--loro-summary-button-font-size: .68rem}.loro-summary-bar__flow{max-width:7.6rem}.loro-summary-bar__flow loro-image:first-child{width:3rem}.loro-summary-bar__flow loro-image:last-child{width:2.85rem}}\n"] }]
|
|
2256
|
+
args: [{ selector: 'loro-summary-bar', standalone: true, imports: [LoroButton, LoroIcon, LoroImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside class=\"loro-summary-bar\">\n <div class=\"loro-summary-bar__total\">\n <small>{{ totalLabel() }}</small>\n <strong>{{ total().toLocaleString('es-ES', { minimumFractionDigits: 2 }) }} \u20AC</strong>\n @if (secondaryLabel()) {\n <loro-button\n [label]=\"secondaryLabel()\"\n icon=\"tag\"\n [iconSize]=\"20\"\n variant=\"outline\"\n [disabled]=\"secondaryDisabled()\"\n (buttonClick)=\"secondaryAction.emit()\" />\n }\n </div>\n <div class=\"loro-summary-bar__flow\" aria-hidden=\"true\">\n <loro-image [name]=\"leftImage()\" alt=\"\" width=\"5.9rem\" />\n <loro-icon name=\"arrow-right\" [size]=\"34\" alt=\"\" color=\"primary\" />\n <loro-image [name]=\"rightImage()\" alt=\"\" width=\"5.25rem\" />\n </div>\n <div class=\"loro-summary-bar__action\">\n <loro-button\n [label]=\"primaryLabel()\"\n icon=\"check\"\n [iconSize]=\"21\"\n [fullWidth]=\"true\"\n [disabled]=\"primaryDisabled()\"\n (buttonClick)=\"primaryAction.emit()\" />\n @if (helper()) {\n <small>{{ helper() }}</small>\n }\n </div>\n </aside>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-summary-bar{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:1.45rem;width:100%;min-width:0;min-height:6.75rem;padding:.75rem 1.9rem;box-sizing:border-box;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-panel)}.loro-summary-bar__total{display:grid;grid-template-columns:minmax(7rem,auto) minmax(9.5rem,auto);align-items:end;justify-content:start;gap:.25rem 1.6rem;min-width:0}.loro-summary-bar__total loro-button{grid-row:1/span 2;grid-column:2;align-self:center;--loro-summary-button-min-height: 2.9rem;--loro-summary-button-padding: .65rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar__action{display:grid;justify-items:stretch;gap:.45rem;min-width:0;max-width:100%;overflow:hidden}small{color:var(--loro-muted);font-size:.92rem;font-weight:750;line-height:1.3}strong{color:var(--loro-primary-700);font-size:2.15rem;font-weight:950;line-height:1;white-space:nowrap}.loro-summary-bar__flow{display:inline-grid;grid-template-columns:auto auto auto;align-items:center;justify-content:center;gap:clamp(.55rem,1vw,1rem);min-width:0;padding-inline:clamp(.75rem,1.8vw,2.1rem);border-left:1px solid var(--loro-border-subtle);color:var(--loro-primary-700);font-size:2rem;font-weight:900}.loro-summary-bar__action loro-button{min-width:0;--loro-summary-button-min-height: 2.65rem;--loro-summary-button-padding: .62rem 1rem;--loro-summary-button-font-size: 1rem}.loro-summary-bar loro-button{--loro-button-min-height: var(--loro-summary-button-min-height);--loro-button-padding: var(--loro-summary-button-padding);--loro-button-radius: .55rem;--loro-button-font-size: var(--loro-summary-button-font-size)}:host ::ng-deep .loro-summary-bar loro-button .loro-button{max-width:100%;min-width:0}:host ::ng-deep .loro-summary-bar loro-button .loro-button span{min-width:0;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .loro-summary-bar__action loro-button,:host ::ng-deep .loro-summary-bar__action loro-button .loro-button{width:100%}.loro-summary-bar__action small{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:center}@media(max-width:1023.88px){.loro-summary-bar{grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);grid-template-areas:\"total flow\" \"total action\";align-items:center;gap:.55rem .8rem;min-height:0;padding:.85rem .95rem;border-radius:1.15rem}.loro-summary-bar__total{grid-area:total;grid-template-columns:1fr;align-content:center;justify-items:start;gap:.36rem;min-width:0;height:100%;padding-right:.65rem;border-right:1px solid var(--loro-border-subtle)}.loro-summary-bar__total loro-button{grid-row:auto;grid-column:auto;width:100%;max-width:9.6rem;--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .6rem;--loro-summary-button-font-size: .82rem}.loro-summary-bar__flow{grid-area:flow;display:inline-grid;justify-self:center;width:100%;max-width:10.75rem;gap:.32rem;padding-inline:0;border-left:0}.loro-summary-bar__flow loro-image:first-child{width:4.35rem}.loro-summary-bar__flow loro-image:last-child{width:3.85rem}.loro-summary-bar__action{grid-area:action;justify-items:stretch;gap:.28rem;min-width:0;width:100%}.loro-summary-bar__action loro-button{display:block;width:100%;min-width:0;--loro-summary-button-min-height: 2.35rem;--loro-summary-button-padding: .5rem .55rem;--loro-summary-button-font-size: .82rem}small{font-size:.82rem}strong{font-size:clamp(1.45rem,5.6vw,1.9rem)}}@media(max-width:640px){.loro-summary-bar{grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:.48rem .62rem;padding:.78rem .82rem}.loro-summary-bar__total loro-button{max-width:8.9rem;--loro-summary-button-min-height: 2.1rem;--loro-summary-button-padding: .44rem .52rem;--loro-summary-button-font-size: .74rem}.loro-summary-bar__flow loro-image:first-child{width:3.45rem}.loro-summary-bar__flow loro-image:last-child{width:3.2rem}.loro-summary-bar__flow{max-width:8.45rem;gap:.2rem}.loro-summary-bar__flow loro-icon{transform:scale(.78)}.loro-summary-bar__action loro-button{--loro-summary-button-min-height: 2.2rem;--loro-summary-button-padding: .48rem .44rem;--loro-summary-button-font-size: .74rem}small{font-size:.72rem}strong{font-size:clamp(1.28rem,7vw,1.6rem)}}@media(max-width:430px){.loro-summary-bar{grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);padding:.72rem}.loro-summary-bar__total{padding-right:.5rem}.loro-summary-bar__total loro-button{max-width:7.8rem;--loro-summary-button-font-size: .68rem}.loro-summary-bar__action loro-button{--loro-summary-button-font-size: .68rem}.loro-summary-bar__flow{max-width:7.6rem}.loro-summary-bar__flow loro-image:first-child{width:3rem}.loro-summary-bar__flow loro-image:last-child{width:2.85rem}}\n"] }]
|
|
3212
2257
|
}], propDecorators: { totalLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalLabel", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], primaryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryLabel", required: false }] }], secondaryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryLabel", required: false }] }], helper: [{ type: i0.Input, args: [{ isSignal: true, alias: "helper", required: false }] }], leftImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftImage", required: false }] }], rightImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightImage", required: false }] }], primaryDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryDisabled", required: false }] }], secondaryDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryDisabled", required: false }] }], primaryAction: [{ type: i0.Output, args: ["primaryAction"] }], secondaryAction: [{ type: i0.Output, args: ["secondaryAction"] }] } });
|
|
3213
2258
|
|
|
3214
2259
|
class LoroTab {
|
|
@@ -3219,73 +2264,13 @@ class LoroTab {
|
|
|
3219
2264
|
iconSize = input(18, ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
3220
2265
|
change = output();
|
|
3221
2266
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3222
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroTab, isStandalone: true, selector: "loro-tab", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { properties: { "style.--loro-tab-count": "options().length" } }, ngImport: i0, template:
|
|
3223
|
-
<div
|
|
3224
|
-
class="loro-tab"
|
|
3225
|
-
role="tablist"
|
|
3226
|
-
[attr.aria-label]="ariaLabel() || null"
|
|
3227
|
-
[class.loro-tab--block]="align() === 'block'"
|
|
3228
|
-
>
|
|
3229
|
-
@for (option of options(); track option.value) {
|
|
3230
|
-
<button
|
|
3231
|
-
type="button"
|
|
3232
|
-
role="tab"
|
|
3233
|
-
class="loro-tab__button"
|
|
3234
|
-
[class.loro-tab__button--active]="value() === option.value"
|
|
3235
|
-
[attr.aria-selected]="value() === option.value"
|
|
3236
|
-
[attr.aria-label]="option.ariaLabel || option.label"
|
|
3237
|
-
(click)="change.emit(option.value)"
|
|
3238
|
-
>
|
|
3239
|
-
@if (option.icon) {
|
|
3240
|
-
<loro-icon
|
|
3241
|
-
[name]="option.icon"
|
|
3242
|
-
[size]="iconSize()"
|
|
3243
|
-
[alt]="option.label"
|
|
3244
|
-
[decorative]="true"
|
|
3245
|
-
[color]="value() === option.value ? 'primary' : 'muted'"
|
|
3246
|
-
/>
|
|
3247
|
-
}
|
|
3248
|
-
<span>{{ option.label }}</span>
|
|
3249
|
-
</button>
|
|
3250
|
-
}
|
|
3251
|
-
</div>
|
|
3252
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-tab{display:grid;grid-template-columns:repeat(var(--loro-tab-count, 2),minmax(0,1fr));min-height:var(--loro-tab-min-height, 2.8rem);overflow:hidden;border-bottom:1px solid var(--loro-border-subtle);background:transparent}.loro-tab__button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-width:0;min-height:100%;padding:var(--loro-tab-button-padding, .58rem .95rem .72rem);border:0;border-bottom:2px solid transparent;color:var(--loro-muted-strong);font:inherit;font-size:var(--loro-tab-font-size, .95rem);font-weight:900;line-height:var(--loro-tab-line-height, 1.15);background:transparent;cursor:pointer;transition:color .14s ease,border-color .14s ease,background .14s ease}.loro-tab--block .loro-tab__button{flex-direction:column;gap:.35rem}.loro-tab__button--active{border-bottom-color:var(--loro-primary-500);color:var(--loro-primary-500)}.loro-tab__button:hover{background:color-mix(in srgb,var(--loro-primary-500) 4%,transparent)}.loro-tab__button:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:-2px;border-radius:.35rem}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroTab, isStandalone: true, selector: "loro-tab", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { properties: { "style.--loro-tab-count": "options().length" } }, ngImport: i0, template: "<div\n class=\"loro-tab\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [class.loro-tab--block]=\"align() === 'block'\"\n >\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"loro-tab__button\"\n [class.loro-tab__button--active]=\"value() === option.value\"\n [attr.aria-selected]=\"value() === option.value\"\n [attr.aria-label]=\"option.ariaLabel || option.label\"\n (click)=\"change.emit(option.value)\"\n >\n @if (option.icon) {\n <loro-icon\n [name]=\"option.icon\"\n [size]=\"iconSize()\"\n [alt]=\"option.label\"\n [decorative]=\"true\"\n [color]=\"value() === option.value ? 'primary' : 'muted'\"\n />\n }\n <span>{{ option.label }}</span>\n </button>\n }\n </div>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-tab{display:grid;grid-template-columns:repeat(var(--loro-tab-count, 2),minmax(0,1fr));min-height:var(--loro-tab-min-height, 2.8rem);overflow:hidden;border-bottom:1px solid var(--loro-border-subtle);background:transparent}.loro-tab__button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-width:0;min-height:100%;padding:var(--loro-tab-button-padding, .58rem .95rem .72rem);border:0;border-bottom:2px solid transparent;color:var(--loro-muted-strong);font:inherit;font-size:var(--loro-tab-font-size, .95rem);font-weight:900;line-height:var(--loro-tab-line-height, 1.15);background:transparent;cursor:pointer;transition:color .14s ease,border-color .14s ease,background .14s ease}.loro-tab--block .loro-tab__button{flex-direction:column;gap:.35rem}.loro-tab__button--active{border-bottom-color:var(--loro-primary-500);color:var(--loro-primary-500)}.loro-tab__button:hover{background:color-mix(in srgb,var(--loro-primary-500) 4%,transparent)}.loro-tab__button:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:-2px;border-radius:.35rem}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3253
2268
|
}
|
|
3254
2269
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroTab, decorators: [{
|
|
3255
2270
|
type: Component,
|
|
3256
|
-
args: [{ selector: 'loro-tab', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3257
|
-
<div
|
|
3258
|
-
class="loro-tab"
|
|
3259
|
-
role="tablist"
|
|
3260
|
-
[attr.aria-label]="ariaLabel() || null"
|
|
3261
|
-
[class.loro-tab--block]="align() === 'block'"
|
|
3262
|
-
>
|
|
3263
|
-
@for (option of options(); track option.value) {
|
|
3264
|
-
<button
|
|
3265
|
-
type="button"
|
|
3266
|
-
role="tab"
|
|
3267
|
-
class="loro-tab__button"
|
|
3268
|
-
[class.loro-tab__button--active]="value() === option.value"
|
|
3269
|
-
[attr.aria-selected]="value() === option.value"
|
|
3270
|
-
[attr.aria-label]="option.ariaLabel || option.label"
|
|
3271
|
-
(click)="change.emit(option.value)"
|
|
3272
|
-
>
|
|
3273
|
-
@if (option.icon) {
|
|
3274
|
-
<loro-icon
|
|
3275
|
-
[name]="option.icon"
|
|
3276
|
-
[size]="iconSize()"
|
|
3277
|
-
[alt]="option.label"
|
|
3278
|
-
[decorative]="true"
|
|
3279
|
-
[color]="value() === option.value ? 'primary' : 'muted'"
|
|
3280
|
-
/>
|
|
3281
|
-
}
|
|
3282
|
-
<span>{{ option.label }}</span>
|
|
3283
|
-
</button>
|
|
3284
|
-
}
|
|
3285
|
-
</div>
|
|
3286
|
-
`, host: {
|
|
2271
|
+
args: [{ selector: 'loro-tab', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3287
2272
|
'[style.--loro-tab-count]': 'options().length',
|
|
3288
|
-
}, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-tab{display:grid;grid-template-columns:repeat(var(--loro-tab-count, 2),minmax(0,1fr));min-height:var(--loro-tab-min-height, 2.8rem);overflow:hidden;border-bottom:1px solid var(--loro-border-subtle);background:transparent}.loro-tab__button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-width:0;min-height:100%;padding:var(--loro-tab-button-padding, .58rem .95rem .72rem);border:0;border-bottom:2px solid transparent;color:var(--loro-muted-strong);font:inherit;font-size:var(--loro-tab-font-size, .95rem);font-weight:900;line-height:var(--loro-tab-line-height, 1.15);background:transparent;cursor:pointer;transition:color .14s ease,border-color .14s ease,background .14s ease}.loro-tab--block .loro-tab__button{flex-direction:column;gap:.35rem}.loro-tab__button--active{border-bottom-color:var(--loro-primary-500);color:var(--loro-primary-500)}.loro-tab__button:hover{background:color-mix(in srgb,var(--loro-primary-500) 4%,transparent)}.loro-tab__button:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:-2px;border-radius:.35rem}\n"] }]
|
|
2273
|
+
}, template: "<div\n class=\"loro-tab\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [class.loro-tab--block]=\"align() === 'block'\"\n >\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"loro-tab__button\"\n [class.loro-tab__button--active]=\"value() === option.value\"\n [attr.aria-selected]=\"value() === option.value\"\n [attr.aria-label]=\"option.ariaLabel || option.label\"\n (click)=\"change.emit(option.value)\"\n >\n @if (option.icon) {\n <loro-icon\n [name]=\"option.icon\"\n [size]=\"iconSize()\"\n [alt]=\"option.label\"\n [decorative]=\"true\"\n [color]=\"value() === option.value ? 'primary' : 'muted'\"\n />\n }\n <span>{{ option.label }}</span>\n </button>\n }\n </div>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-tab{display:grid;grid-template-columns:repeat(var(--loro-tab-count, 2),minmax(0,1fr));min-height:var(--loro-tab-min-height, 2.8rem);overflow:hidden;border-bottom:1px solid var(--loro-border-subtle);background:transparent}.loro-tab__button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-width:0;min-height:100%;padding:var(--loro-tab-button-padding, .58rem .95rem .72rem);border:0;border-bottom:2px solid transparent;color:var(--loro-muted-strong);font:inherit;font-size:var(--loro-tab-font-size, .95rem);font-weight:900;line-height:var(--loro-tab-line-height, 1.15);background:transparent;cursor:pointer;transition:color .14s ease,border-color .14s ease,background .14s ease}.loro-tab--block .loro-tab__button{flex-direction:column;gap:.35rem}.loro-tab__button--active{border-bottom-color:var(--loro-primary-500);color:var(--loro-primary-500)}.loro-tab__button:hover{background:color-mix(in srgb,var(--loro-primary-500) 4%,transparent)}.loro-tab__button:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:-2px;border-radius:.35rem}\n"] }]
|
|
3289
2274
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], change: [{ type: i0.Output, args: ["change"] }] } });
|
|
3290
2275
|
|
|
3291
2276
|
class LoroAlert {
|
|
@@ -3380,45 +2365,11 @@ class LoroNotification {
|
|
|
3380
2365
|
}, ...(ngDevMode ? [{ debugName: "badgeLabel" }] : /* istanbul ignore next */ []));
|
|
3381
2366
|
badgeAriaLabel = computed(() => `${this.badgeLabel()} unread notifications`, ...(ngDevMode ? [{ debugName: "badgeAriaLabel" }] : /* istanbul ignore next */ []));
|
|
3382
2367
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotification, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3383
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotification, isStandalone: true, selector: "loro-notification", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, showZero: { classPropertyName: "showZero", publicName: "showZero", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { notificationClick: "notificationClick" }, ngImport: i0, template:
|
|
3384
|
-
<button
|
|
3385
|
-
type="button"
|
|
3386
|
-
class="loro-notification"
|
|
3387
|
-
[class.loro-notification--active]="active()"
|
|
3388
|
-
[class.loro-notification--disabled]="disabled()"
|
|
3389
|
-
[disabled]="disabled()"
|
|
3390
|
-
[attr.aria-label]="ariaLabel()"
|
|
3391
|
-
[attr.aria-expanded]="expanded()"
|
|
3392
|
-
(click)="notificationClick.emit()">
|
|
3393
|
-
<loro-icon name="bell" [size]="iconSize()" alt="" [decorative]="true" color="primary" />
|
|
3394
|
-
@if (showBadge()) {
|
|
3395
|
-
<span class="loro-notification__badge" [attr.aria-label]="badgeAriaLabel()">
|
|
3396
|
-
{{ badgeLabel() }}
|
|
3397
|
-
</span>
|
|
3398
|
-
}
|
|
3399
|
-
</button>
|
|
3400
|
-
`, isInline: true, styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-notification{position:relative;display:grid;width:var(--loro-notification-size, 2.75rem);height:var(--loro-notification-size, 2.75rem);place-items:center;border:0;border-radius:50%;background:transparent;color:var(--loro-primary-700);cursor:pointer;transition:background .15s ease,transform .15s ease;-webkit-tap-highlight-color:transparent}.loro-notification:hover,.loro-notification--active{background:transparent}.loro-notification:focus-visible{outline:2px solid rgba(108,60,255,.35);outline-offset:2px}.loro-notification:active{transform:scale(.97)}.loro-notification--disabled{cursor:not-allowed;opacity:.55;transform:none}.loro-notification__badge{position:absolute;top:.18rem;right:.1rem;display:grid;min-width:1.15rem;height:1.15rem;place-items:center;padding-inline:.25rem;border:2px solid var(--loro-surface);border-radius:999px;background:var(--loro-primary-500);color:#fff;font-size:.68rem;font-weight:950;line-height:1;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotification, isStandalone: true, selector: "loro-notification", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, showZero: { classPropertyName: "showZero", publicName: "showZero", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { notificationClick: "notificationClick" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"loro-notification\"\n [class.loro-notification--active]=\"active()\"\n [class.loro-notification--disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"notificationClick.emit()\">\n <loro-icon name=\"bell\" [size]=\"iconSize()\" alt=\"\" [decorative]=\"true\" color=\"primary\" />\n @if (showBadge()) {\n <span class=\"loro-notification__badge\" [attr.aria-label]=\"badgeAriaLabel()\">\n {{ badgeLabel() }}\n </span>\n }\n </button>", styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-notification{position:relative;display:grid;width:var(--loro-notification-size, 2.75rem);height:var(--loro-notification-size, 2.75rem);place-items:center;border:0;border-radius:50%;background:transparent;color:var(--loro-primary-700);cursor:pointer;transition:background .15s ease,transform .15s ease;-webkit-tap-highlight-color:transparent}.loro-notification:hover,.loro-notification--active{background:transparent}.loro-notification:focus-visible{outline:2px solid rgba(108,60,255,.35);outline-offset:2px}.loro-notification:active{transform:scale(.97)}.loro-notification--disabled{cursor:not-allowed;opacity:.55;transform:none}.loro-notification__badge{position:absolute;top:.18rem;right:.1rem;display:grid;min-width:1.15rem;height:1.15rem;place-items:center;padding-inline:.25rem;border:2px solid var(--loro-surface);border-radius:999px;background:var(--loro-primary-500);color:#fff;font-size:.68rem;font-weight:950;line-height:1;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3401
2369
|
}
|
|
3402
2370
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotification, decorators: [{
|
|
3403
2371
|
type: Component,
|
|
3404
|
-
args: [{ selector: 'loro-notification', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3405
|
-
<button
|
|
3406
|
-
type="button"
|
|
3407
|
-
class="loro-notification"
|
|
3408
|
-
[class.loro-notification--active]="active()"
|
|
3409
|
-
[class.loro-notification--disabled]="disabled()"
|
|
3410
|
-
[disabled]="disabled()"
|
|
3411
|
-
[attr.aria-label]="ariaLabel()"
|
|
3412
|
-
[attr.aria-expanded]="expanded()"
|
|
3413
|
-
(click)="notificationClick.emit()">
|
|
3414
|
-
<loro-icon name="bell" [size]="iconSize()" alt="" [decorative]="true" color="primary" />
|
|
3415
|
-
@if (showBadge()) {
|
|
3416
|
-
<span class="loro-notification__badge" [attr.aria-label]="badgeAriaLabel()">
|
|
3417
|
-
{{ badgeLabel() }}
|
|
3418
|
-
</span>
|
|
3419
|
-
}
|
|
3420
|
-
</button>
|
|
3421
|
-
`, styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-notification{position:relative;display:grid;width:var(--loro-notification-size, 2.75rem);height:var(--loro-notification-size, 2.75rem);place-items:center;border:0;border-radius:50%;background:transparent;color:var(--loro-primary-700);cursor:pointer;transition:background .15s ease,transform .15s ease;-webkit-tap-highlight-color:transparent}.loro-notification:hover,.loro-notification--active{background:transparent}.loro-notification:focus-visible{outline:2px solid rgba(108,60,255,.35);outline-offset:2px}.loro-notification:active{transform:scale(.97)}.loro-notification--disabled{cursor:not-allowed;opacity:.55;transform:none}.loro-notification__badge{position:absolute;top:.18rem;right:.1rem;display:grid;min-width:1.15rem;height:1.15rem;place-items:center;padding-inline:.25rem;border:2px solid var(--loro-surface);border-radius:999px;background:var(--loro-primary-500);color:#fff;font-size:.68rem;font-weight:950;line-height:1;box-sizing:border-box}\n"] }]
|
|
2372
|
+
args: [{ selector: 'loro-notification', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"loro-notification\"\n [class.loro-notification--active]=\"active()\"\n [class.loro-notification--disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"notificationClick.emit()\">\n <loro-icon name=\"bell\" [size]=\"iconSize()\" alt=\"\" [decorative]=\"true\" color=\"primary\" />\n @if (showBadge()) {\n <span class=\"loro-notification__badge\" [attr.aria-label]=\"badgeAriaLabel()\">\n {{ badgeLabel() }}\n </span>\n }\n </button>", styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-notification{position:relative;display:grid;width:var(--loro-notification-size, 2.75rem);height:var(--loro-notification-size, 2.75rem);place-items:center;border:0;border-radius:50%;background:transparent;color:var(--loro-primary-700);cursor:pointer;transition:background .15s ease,transform .15s ease;-webkit-tap-highlight-color:transparent}.loro-notification:hover,.loro-notification--active{background:transparent}.loro-notification:focus-visible{outline:2px solid rgba(108,60,255,.35);outline-offset:2px}.loro-notification:active{transform:scale(.97)}.loro-notification--disabled{cursor:not-allowed;opacity:.55;transform:none}.loro-notification__badge{position:absolute;top:.18rem;right:.1rem;display:grid;min-width:1.15rem;height:1.15rem;place-items:center;padding-inline:.25rem;border:2px solid var(--loro-surface);border-radius:999px;background:var(--loro-primary-500);color:#fff;font-size:.68rem;font-weight:950;line-height:1;box-sizing:border-box}\n"] }]
|
|
3422
2373
|
}], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], maxCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCount", required: false }] }], showZero: [{ type: i0.Input, args: [{ isSignal: true, alias: "showZero", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], notificationClick: [{ type: i0.Output, args: ["notificationClick"] }] } });
|
|
3423
2374
|
|
|
3424
2375
|
class LoroNotificationRow {
|
|
@@ -3524,119 +2475,11 @@ class LoroNotificationRow {
|
|
|
3524
2475
|
window.setTimeout(() => this.rowRemove.emit(), 180);
|
|
3525
2476
|
}
|
|
3526
2477
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationRow, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3527
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotificationRow, isStandalone: true, selector: "loro-notification-row", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, unread: { classPropertyName: "unread", publicName: "unread", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowClick: "rowClick", rowRemove: "rowRemove" }, ngImport: i0, template:
|
|
3528
|
-
<div
|
|
3529
|
-
class="loro-notification-row-shell"
|
|
3530
|
-
data-horizontal-gesture
|
|
3531
|
-
[class.loro-notification-row-shell--dragging]="dragging()"
|
|
3532
|
-
[class.loro-notification-row-shell--armed]="armed()"
|
|
3533
|
-
[class.loro-notification-row-shell--removing]="removing()"
|
|
3534
|
-
(touchstart)="onTouchStart($event)"
|
|
3535
|
-
(touchmove)="onTouchMove($event)"
|
|
3536
|
-
(touchend)="onTouchEnd()"
|
|
3537
|
-
(touchcancel)="resetDrag()">
|
|
3538
|
-
<button
|
|
3539
|
-
type="button"
|
|
3540
|
-
class="loro-notification-row-shell__delete"
|
|
3541
|
-
aria-label="Eliminar notificacion"
|
|
3542
|
-
(pointerdown)="$event.stopPropagation()"
|
|
3543
|
-
(touchstart)="$event.stopPropagation()"
|
|
3544
|
-
(click)="onDeleteClick($event)">
|
|
3545
|
-
<loro-icon name="trash-white" [size]="22" alt="" [decorative]="true" color="inverse" />
|
|
3546
|
-
<span>Eliminar</span>
|
|
3547
|
-
</button>
|
|
3548
|
-
<article
|
|
3549
|
-
role="button"
|
|
3550
|
-
tabindex="0"
|
|
3551
|
-
class="loro-notification-row"
|
|
3552
|
-
[class.loro-notification-row--unread]="unread()"
|
|
3553
|
-
[style.transform]="'translate3d(' + dragX() + 'px, 0, 0)'"
|
|
3554
|
-
(click)="onRowClick()"
|
|
3555
|
-
(keydown.enter)="onRowKeydown($event)"
|
|
3556
|
-
(keydown.space)="onRowKeydown($event)">
|
|
3557
|
-
<span class="loro-notification-row__icon">
|
|
3558
|
-
<loro-icon [name]="icon()" [size]="26" [alt]="title()" color="primary" />
|
|
3559
|
-
</span>
|
|
3560
|
-
<span class="loro-notification-row__content">
|
|
3561
|
-
<span class="loro-notification-row__meta">
|
|
3562
|
-
<strong>{{ title() }}</strong>
|
|
3563
|
-
@if (time()) {
|
|
3564
|
-
<small>{{ time() }}</small>
|
|
3565
|
-
}
|
|
3566
|
-
</span>
|
|
3567
|
-
<span class="loro-notification-row__message">{{ message() }}</span>
|
|
3568
|
-
</span>
|
|
3569
|
-
@if (unread()) {
|
|
3570
|
-
<span class="loro-notification-row__dot" aria-label="Unread"></span>
|
|
3571
|
-
}
|
|
3572
|
-
<button
|
|
3573
|
-
type="button"
|
|
3574
|
-
class="loro-notification-row__delete-button"
|
|
3575
|
-
aria-label="Eliminar notificacion"
|
|
3576
|
-
(click)="onDeleteClick($event)">
|
|
3577
|
-
<loro-icon name="trash" [size]="18" alt="" [decorative]="true" color="danger" />
|
|
3578
|
-
</button>
|
|
3579
|
-
</article>
|
|
3580
|
-
</div>
|
|
3581
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;border:0;background:#ef4444;color:var(--loro-text-inverse);font:inherit;font-weight:850;cursor:pointer;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2478
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotificationRow, isStandalone: true, selector: "loro-notification-row", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, unread: { classPropertyName: "unread", publicName: "unread", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowClick: "rowClick", rowRemove: "rowRemove" }, ngImport: i0, template: "<div\n class=\"loro-notification-row-shell\"\n data-horizontal-gesture\n [class.loro-notification-row-shell--dragging]=\"dragging()\"\n [class.loro-notification-row-shell--armed]=\"armed()\"\n [class.loro-notification-row-shell--removing]=\"removing()\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd()\"\n (touchcancel)=\"resetDrag()\">\n <button\n type=\"button\"\n class=\"loro-notification-row-shell__delete\"\n aria-label=\"Eliminar notificacion\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onDeleteClick($event)\">\n <loro-icon name=\"trash-white\" [size]=\"22\" alt=\"\" [decorative]=\"true\" color=\"inverse\" />\n <span>Eliminar</span>\n </button>\n <article\n role=\"button\"\n tabindex=\"0\"\n class=\"loro-notification-row\"\n [class.loro-notification-row--unread]=\"unread()\"\n [style.transform]=\"'translate3d(' + dragX() + 'px, 0, 0)'\"\n (click)=\"onRowClick()\"\n (keydown.enter)=\"onRowKeydown($event)\"\n (keydown.space)=\"onRowKeydown($event)\">\n <span class=\"loro-notification-row__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"26\" [alt]=\"title()\" color=\"primary\" />\n </span>\n <span class=\"loro-notification-row__content\">\n <span class=\"loro-notification-row__meta\">\n <strong>{{ title() }}</strong>\n @if (time()) {\n <small>{{ time() }}</small>\n }\n </span>\n <span class=\"loro-notification-row__message\">{{ message() }}</span>\n </span>\n @if (unread()) {\n <span class=\"loro-notification-row__dot\" aria-label=\"Unread\"></span>\n }\n <button\n type=\"button\"\n class=\"loro-notification-row__delete-button\"\n aria-label=\"Eliminar notificacion\"\n (click)=\"onDeleteClick($event)\">\n <loro-icon name=\"trash\" [size]=\"18\" alt=\"\" [decorative]=\"true\" color=\"danger\" />\n </button>\n </article>\n </div>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;border:0;background:#ef4444;color:var(--loro-text-inverse);font:inherit;font-weight:850;cursor:pointer;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3582
2479
|
}
|
|
3583
2480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationRow, decorators: [{
|
|
3584
2481
|
type: Component,
|
|
3585
|
-
args: [{ selector: 'loro-notification-row', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3586
|
-
<div
|
|
3587
|
-
class="loro-notification-row-shell"
|
|
3588
|
-
data-horizontal-gesture
|
|
3589
|
-
[class.loro-notification-row-shell--dragging]="dragging()"
|
|
3590
|
-
[class.loro-notification-row-shell--armed]="armed()"
|
|
3591
|
-
[class.loro-notification-row-shell--removing]="removing()"
|
|
3592
|
-
(touchstart)="onTouchStart($event)"
|
|
3593
|
-
(touchmove)="onTouchMove($event)"
|
|
3594
|
-
(touchend)="onTouchEnd()"
|
|
3595
|
-
(touchcancel)="resetDrag()">
|
|
3596
|
-
<button
|
|
3597
|
-
type="button"
|
|
3598
|
-
class="loro-notification-row-shell__delete"
|
|
3599
|
-
aria-label="Eliminar notificacion"
|
|
3600
|
-
(pointerdown)="$event.stopPropagation()"
|
|
3601
|
-
(touchstart)="$event.stopPropagation()"
|
|
3602
|
-
(click)="onDeleteClick($event)">
|
|
3603
|
-
<loro-icon name="trash-white" [size]="22" alt="" [decorative]="true" color="inverse" />
|
|
3604
|
-
<span>Eliminar</span>
|
|
3605
|
-
</button>
|
|
3606
|
-
<article
|
|
3607
|
-
role="button"
|
|
3608
|
-
tabindex="0"
|
|
3609
|
-
class="loro-notification-row"
|
|
3610
|
-
[class.loro-notification-row--unread]="unread()"
|
|
3611
|
-
[style.transform]="'translate3d(' + dragX() + 'px, 0, 0)'"
|
|
3612
|
-
(click)="onRowClick()"
|
|
3613
|
-
(keydown.enter)="onRowKeydown($event)"
|
|
3614
|
-
(keydown.space)="onRowKeydown($event)">
|
|
3615
|
-
<span class="loro-notification-row__icon">
|
|
3616
|
-
<loro-icon [name]="icon()" [size]="26" [alt]="title()" color="primary" />
|
|
3617
|
-
</span>
|
|
3618
|
-
<span class="loro-notification-row__content">
|
|
3619
|
-
<span class="loro-notification-row__meta">
|
|
3620
|
-
<strong>{{ title() }}</strong>
|
|
3621
|
-
@if (time()) {
|
|
3622
|
-
<small>{{ time() }}</small>
|
|
3623
|
-
}
|
|
3624
|
-
</span>
|
|
3625
|
-
<span class="loro-notification-row__message">{{ message() }}</span>
|
|
3626
|
-
</span>
|
|
3627
|
-
@if (unread()) {
|
|
3628
|
-
<span class="loro-notification-row__dot" aria-label="Unread"></span>
|
|
3629
|
-
}
|
|
3630
|
-
<button
|
|
3631
|
-
type="button"
|
|
3632
|
-
class="loro-notification-row__delete-button"
|
|
3633
|
-
aria-label="Eliminar notificacion"
|
|
3634
|
-
(click)="onDeleteClick($event)">
|
|
3635
|
-
<loro-icon name="trash" [size]="18" alt="" [decorative]="true" color="danger" />
|
|
3636
|
-
</button>
|
|
3637
|
-
</article>
|
|
3638
|
-
</div>
|
|
3639
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;border:0;background:#ef4444;color:var(--loro-text-inverse);font:inherit;font-weight:850;cursor:pointer;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"] }]
|
|
2482
|
+
args: [{ selector: 'loro-notification-row', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"loro-notification-row-shell\"\n data-horizontal-gesture\n [class.loro-notification-row-shell--dragging]=\"dragging()\"\n [class.loro-notification-row-shell--armed]=\"armed()\"\n [class.loro-notification-row-shell--removing]=\"removing()\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd()\"\n (touchcancel)=\"resetDrag()\">\n <button\n type=\"button\"\n class=\"loro-notification-row-shell__delete\"\n aria-label=\"Eliminar notificacion\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onDeleteClick($event)\">\n <loro-icon name=\"trash-white\" [size]=\"22\" alt=\"\" [decorative]=\"true\" color=\"inverse\" />\n <span>Eliminar</span>\n </button>\n <article\n role=\"button\"\n tabindex=\"0\"\n class=\"loro-notification-row\"\n [class.loro-notification-row--unread]=\"unread()\"\n [style.transform]=\"'translate3d(' + dragX() + 'px, 0, 0)'\"\n (click)=\"onRowClick()\"\n (keydown.enter)=\"onRowKeydown($event)\"\n (keydown.space)=\"onRowKeydown($event)\">\n <span class=\"loro-notification-row__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"26\" [alt]=\"title()\" color=\"primary\" />\n </span>\n <span class=\"loro-notification-row__content\">\n <span class=\"loro-notification-row__meta\">\n <strong>{{ title() }}</strong>\n @if (time()) {\n <small>{{ time() }}</small>\n }\n </span>\n <span class=\"loro-notification-row__message\">{{ message() }}</span>\n </span>\n @if (unread()) {\n <span class=\"loro-notification-row__dot\" aria-label=\"Unread\"></span>\n }\n <button\n type=\"button\"\n class=\"loro-notification-row__delete-button\"\n aria-label=\"Eliminar notificacion\"\n (click)=\"onDeleteClick($event)\">\n <loro-icon name=\"trash\" [size]=\"18\" alt=\"\" [decorative]=\"true\" color=\"danger\" />\n </button>\n </article>\n </div>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;border:0;background:#ef4444;color:var(--loro-text-inverse);font:inherit;font-weight:850;cursor:pointer;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"] }]
|
|
3640
2483
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], unread: [{ type: i0.Input, args: [{ isSignal: true, alias: "unread", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowRemove: [{ type: i0.Output, args: ["rowRemove"] }] } });
|
|
3641
2484
|
|
|
3642
2485
|
class LoroNotificationPanel {
|
|
@@ -3666,117 +2509,11 @@ class LoroNotificationPanel {
|
|
|
3666
2509
|
this.clearAll.emit();
|
|
3667
2510
|
}
|
|
3668
2511
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3669
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotificationPanel, isStandalone: true, selector: "loro-notification-panel", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, showMarkAll: { classPropertyName: "showMarkAll", publicName: "showMarkAll", isSignal: true, isRequired: false, transformFunction: null }, markAllLabel: { classPropertyName: "markAllLabel", publicName: "markAllLabel", isSignal: true, isRequired: false, transformFunction: null }, showClearAll: { classPropertyName: "showClearAll", publicName: "showClearAll", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTitle: { classPropertyName: "emptyTitle", publicName: "emptyTitle", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemRemove: "itemRemove", markAllRead: "markAllRead", clearAll: "clearAll" }, ngImport: i0, template:
|
|
3670
|
-
<section
|
|
3671
|
-
class="loro-notification-panel"
|
|
3672
|
-
[class.loro-notification-panel--sheet]="presentation() === 'sheet'"
|
|
3673
|
-
[class.loro-notification-panel--empty]="items().length === 0">
|
|
3674
|
-
@if (presentation() === 'sheet') {
|
|
3675
|
-
<span class="loro-notification-panel__handle" aria-hidden="true"></span>
|
|
3676
|
-
}
|
|
3677
|
-
<header class="loro-notification-panel__header">
|
|
3678
|
-
<h2>{{ title() }}</h2>
|
|
3679
|
-
@if (items().length > 0) {
|
|
3680
|
-
<div class="loro-notification-panel__actions">
|
|
3681
|
-
@if (showMarkAll() && hasUnread()) {
|
|
3682
|
-
<button
|
|
3683
|
-
type="button"
|
|
3684
|
-
(pointerdown)="$event.stopPropagation()"
|
|
3685
|
-
(touchstart)="$event.stopPropagation()"
|
|
3686
|
-
(click)="onMarkAllReadClick($event)">{{ markAllLabel() }}</button>
|
|
3687
|
-
}
|
|
3688
|
-
@if (showClearAll()) {
|
|
3689
|
-
<button
|
|
3690
|
-
type="button"
|
|
3691
|
-
(pointerdown)="$event.stopPropagation()"
|
|
3692
|
-
(touchstart)="$event.stopPropagation()"
|
|
3693
|
-
(click)="onClearAllClick($event)">{{ clearAllLabel() }}</button>
|
|
3694
|
-
}
|
|
3695
|
-
</div>
|
|
3696
|
-
}
|
|
3697
|
-
</header>
|
|
3698
|
-
|
|
3699
|
-
@if (items().length > 0) {
|
|
3700
|
-
<div class="loro-notification-panel__list">
|
|
3701
|
-
@for (item of items(); track item.id) {
|
|
3702
|
-
<loro-notification-row
|
|
3703
|
-
[title]="item.title"
|
|
3704
|
-
[message]="item.message"
|
|
3705
|
-
[time]="item.time || ''"
|
|
3706
|
-
[icon]="item.icon || 'info'"
|
|
3707
|
-
[unread]="!!item.unread"
|
|
3708
|
-
(rowClick)="itemClick.emit(item)"
|
|
3709
|
-
(rowRemove)="itemRemove.emit(item)" />
|
|
3710
|
-
}
|
|
3711
|
-
</div>
|
|
3712
|
-
} @else {
|
|
3713
|
-
<div class="loro-notification-panel__empty">
|
|
3714
|
-
<span class="loro-notification-panel__empty-icon">
|
|
3715
|
-
<loro-icon [name]="emptyIcon()" [size]="64" [alt]="emptyTitle()" color="primary" />
|
|
3716
|
-
</span>
|
|
3717
|
-
<strong>{{ emptyTitle() }}</strong>
|
|
3718
|
-
<p>{{ emptyMessage() }}</p>
|
|
3719
|
-
</div>
|
|
3720
|
-
}
|
|
3721
|
-
</section>
|
|
3722
|
-
`, isInline: true, styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{min-height:2.2rem;border:0;border-radius:.65rem;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover,button:focus-visible{background:color-mix(in srgb,var(--loro-primary-500) 9%,transparent);outline:none}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.35rem}.loro-notification-panel__actions button{white-space:nowrap}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroNotificationRow, selector: "loro-notification-row", inputs: ["title", "message", "time", "icon", "unread"], outputs: ["rowClick", "rowRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2512
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotificationPanel, isStandalone: true, selector: "loro-notification-panel", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, showMarkAll: { classPropertyName: "showMarkAll", publicName: "showMarkAll", isSignal: true, isRequired: false, transformFunction: null }, markAllLabel: { classPropertyName: "markAllLabel", publicName: "markAllLabel", isSignal: true, isRequired: false, transformFunction: null }, showClearAll: { classPropertyName: "showClearAll", publicName: "showClearAll", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTitle: { classPropertyName: "emptyTitle", publicName: "emptyTitle", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemRemove: "itemRemove", markAllRead: "markAllRead", clearAll: "clearAll" }, ngImport: i0, template: "<section\n class=\"loro-notification-panel\"\n [class.loro-notification-panel--sheet]=\"presentation() === 'sheet'\"\n [class.loro-notification-panel--empty]=\"items().length === 0\"\n >\n @if (presentation() === 'sheet') {\n <span class=\"loro-notification-panel__handle\" aria-hidden=\"true\"></span>\n }\n <header class=\"loro-notification-panel__header\">\n <h2>{{ title() }}</h2>\n @if (items().length > 0) {\n <div class=\"loro-notification-panel__actions\">\n @if (showMarkAll() && hasUnread()) {\n <button\n type=\"button\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onMarkAllReadClick($event)\"\n >\n {{ markAllLabel() }}\n </button>\n } @else if (showClearAll()) {\n <button\n type=\"button\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onClearAllClick($event)\"\n >\n {{ clearAllLabel() }}\n </button>\n }\n </div>\n }\n </header>\n\n @if (items().length > 0) {\n <div class=\"loro-notification-panel__list\">\n @for (item of items(); track item.id) {\n <loro-notification-row\n [title]=\"item.title\"\n [message]=\"item.message\"\n [time]=\"item.time || ''\"\n [icon]=\"item.icon || 'info'\"\n [unread]=\"!!item.unread\"\n (rowClick)=\"itemClick.emit(item)\"\n (rowRemove)=\"itemRemove.emit(item)\"\n />\n }\n </div>\n } @else {\n <div class=\"loro-notification-panel__empty\">\n <span class=\"loro-notification-panel__empty-icon\">\n <loro-icon [name]=\"emptyIcon()\" [size]=\"64\" [alt]=\"emptyTitle()\" color=\"primary\" />\n </span>\n <strong>{{ emptyTitle() }}</strong>\n <p>{{ emptyMessage() }}</p>\n </div>\n }\n </section>", styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{min-height:2.2rem;border:0;border-radius:.65rem;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover,button:focus-visible{background:color-mix(in srgb,var(--loro-primary-500) 9%,transparent);outline:none}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.35rem}.loro-notification-panel__actions button{white-space:nowrap}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroNotificationRow, selector: "loro-notification-row", inputs: ["title", "message", "time", "icon", "unread"], outputs: ["rowClick", "rowRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3723
2513
|
}
|
|
3724
2514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationPanel, decorators: [{
|
|
3725
2515
|
type: Component,
|
|
3726
|
-
args: [{ selector: 'loro-notification-panel', standalone: true, imports: [LoroIcon, LoroNotificationRow], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3727
|
-
<section
|
|
3728
|
-
class="loro-notification-panel"
|
|
3729
|
-
[class.loro-notification-panel--sheet]="presentation() === 'sheet'"
|
|
3730
|
-
[class.loro-notification-panel--empty]="items().length === 0">
|
|
3731
|
-
@if (presentation() === 'sheet') {
|
|
3732
|
-
<span class="loro-notification-panel__handle" aria-hidden="true"></span>
|
|
3733
|
-
}
|
|
3734
|
-
<header class="loro-notification-panel__header">
|
|
3735
|
-
<h2>{{ title() }}</h2>
|
|
3736
|
-
@if (items().length > 0) {
|
|
3737
|
-
<div class="loro-notification-panel__actions">
|
|
3738
|
-
@if (showMarkAll() && hasUnread()) {
|
|
3739
|
-
<button
|
|
3740
|
-
type="button"
|
|
3741
|
-
(pointerdown)="$event.stopPropagation()"
|
|
3742
|
-
(touchstart)="$event.stopPropagation()"
|
|
3743
|
-
(click)="onMarkAllReadClick($event)">{{ markAllLabel() }}</button>
|
|
3744
|
-
}
|
|
3745
|
-
@if (showClearAll()) {
|
|
3746
|
-
<button
|
|
3747
|
-
type="button"
|
|
3748
|
-
(pointerdown)="$event.stopPropagation()"
|
|
3749
|
-
(touchstart)="$event.stopPropagation()"
|
|
3750
|
-
(click)="onClearAllClick($event)">{{ clearAllLabel() }}</button>
|
|
3751
|
-
}
|
|
3752
|
-
</div>
|
|
3753
|
-
}
|
|
3754
|
-
</header>
|
|
3755
|
-
|
|
3756
|
-
@if (items().length > 0) {
|
|
3757
|
-
<div class="loro-notification-panel__list">
|
|
3758
|
-
@for (item of items(); track item.id) {
|
|
3759
|
-
<loro-notification-row
|
|
3760
|
-
[title]="item.title"
|
|
3761
|
-
[message]="item.message"
|
|
3762
|
-
[time]="item.time || ''"
|
|
3763
|
-
[icon]="item.icon || 'info'"
|
|
3764
|
-
[unread]="!!item.unread"
|
|
3765
|
-
(rowClick)="itemClick.emit(item)"
|
|
3766
|
-
(rowRemove)="itemRemove.emit(item)" />
|
|
3767
|
-
}
|
|
3768
|
-
</div>
|
|
3769
|
-
} @else {
|
|
3770
|
-
<div class="loro-notification-panel__empty">
|
|
3771
|
-
<span class="loro-notification-panel__empty-icon">
|
|
3772
|
-
<loro-icon [name]="emptyIcon()" [size]="64" [alt]="emptyTitle()" color="primary" />
|
|
3773
|
-
</span>
|
|
3774
|
-
<strong>{{ emptyTitle() }}</strong>
|
|
3775
|
-
<p>{{ emptyMessage() }}</p>
|
|
3776
|
-
</div>
|
|
3777
|
-
}
|
|
3778
|
-
</section>
|
|
3779
|
-
`, styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{min-height:2.2rem;border:0;border-radius:.65rem;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover,button:focus-visible{background:color-mix(in srgb,var(--loro-primary-500) 9%,transparent);outline:none}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.35rem}.loro-notification-panel__actions button{white-space:nowrap}}\n"] }]
|
|
2516
|
+
args: [{ selector: 'loro-notification-panel', standalone: true, imports: [LoroIcon, LoroNotificationRow], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n class=\"loro-notification-panel\"\n [class.loro-notification-panel--sheet]=\"presentation() === 'sheet'\"\n [class.loro-notification-panel--empty]=\"items().length === 0\"\n >\n @if (presentation() === 'sheet') {\n <span class=\"loro-notification-panel__handle\" aria-hidden=\"true\"></span>\n }\n <header class=\"loro-notification-panel__header\">\n <h2>{{ title() }}</h2>\n @if (items().length > 0) {\n <div class=\"loro-notification-panel__actions\">\n @if (showMarkAll() && hasUnread()) {\n <button\n type=\"button\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onMarkAllReadClick($event)\"\n >\n {{ markAllLabel() }}\n </button>\n } @else if (showClearAll()) {\n <button\n type=\"button\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onClearAllClick($event)\"\n >\n {{ clearAllLabel() }}\n </button>\n }\n </div>\n }\n </header>\n\n @if (items().length > 0) {\n <div class=\"loro-notification-panel__list\">\n @for (item of items(); track item.id) {\n <loro-notification-row\n [title]=\"item.title\"\n [message]=\"item.message\"\n [time]=\"item.time || ''\"\n [icon]=\"item.icon || 'info'\"\n [unread]=\"!!item.unread\"\n (rowClick)=\"itemClick.emit(item)\"\n (rowRemove)=\"itemRemove.emit(item)\"\n />\n }\n </div>\n } @else {\n <div class=\"loro-notification-panel__empty\">\n <span class=\"loro-notification-panel__empty-icon\">\n <loro-icon [name]=\"emptyIcon()\" [size]=\"64\" [alt]=\"emptyTitle()\" color=\"primary\" />\n </span>\n <strong>{{ emptyTitle() }}</strong>\n <p>{{ emptyMessage() }}</p>\n </div>\n }\n </section>", styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{min-height:2.2rem;border:0;border-radius:.65rem;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover,button:focus-visible{background:color-mix(in srgb,var(--loro-primary-500) 9%,transparent);outline:none}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.35rem}.loro-notification-panel__actions button{white-space:nowrap}}\n"] }]
|
|
3780
2517
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: false }] }], showMarkAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkAll", required: false }] }], markAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "markAllLabel", required: false }] }], showClearAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearAll", required: false }] }], clearAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAllLabel", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], emptyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTitle", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemRemove: [{ type: i0.Output, args: ["itemRemove"] }], markAllRead: [{ type: i0.Output, args: ["markAllRead"] }], clearAll: [{ type: i0.Output, args: ["clearAll"] }] } });
|
|
3781
2518
|
|
|
3782
2519
|
class LoroSpinner {
|
|
@@ -3827,51 +2564,13 @@ class LoroToast {
|
|
|
3827
2564
|
}
|
|
3828
2565
|
}
|
|
3829
2566
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroToast, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3830
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroToast, isStandalone: true, selector: "loro-toast", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismiss: "dismiss" }, host: { properties: { "class.loro-toast-host--inline": "position() === 'inline'" } }, ngImport: i0, template:
|
|
3831
|
-
@if (visible()) {
|
|
3832
|
-
<aside
|
|
3833
|
-
class="loro-toast"
|
|
3834
|
-
[class]="'loro-toast loro-toast--' + variant() + ' loro-toast--' + position()"
|
|
3835
|
-
[attr.role]="variant() === 'error' ? 'alert' : 'status'">
|
|
3836
|
-
<span class="loro-toast__icon">
|
|
3837
|
-
@if (variant() === 'loading') {
|
|
3838
|
-
<span class="loro-toast__spinner" aria-hidden="true"></span>
|
|
3839
|
-
} @else {
|
|
3840
|
-
<loro-icon [name]="resolvedIcon()" [size]="24" [alt]="message()" [color]="iconColor()" />
|
|
3841
|
-
}
|
|
3842
|
-
</span>
|
|
3843
|
-
<span>{{ message() }}</span>
|
|
3844
|
-
@if (dismissible()) {
|
|
3845
|
-
<button type="button" (click)="dismiss.emit()" aria-label="Dismiss notification">x</button>
|
|
3846
|
-
}
|
|
3847
|
-
</aside>
|
|
3848
|
-
}
|
|
3849
|
-
`, isInline: true, styles: [":host{z-index:1000;display:block;font-family:var(--loro-font-brand);pointer-events:none}:host(.loro-toast-host--inline){width:100%}.loro-toast{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;width:min(24rem,calc(100vw - 2rem));min-height:3.6rem;padding:.85rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface);color:var(--loro-text-strong);box-shadow:var(--loro-shadow-panel);font-weight:800;pointer-events:auto}.loro-toast--top-right{position:fixed;top:1rem;right:1rem}.loro-toast--bottom-right{position:fixed;right:1rem;bottom:1rem}.loro-toast--bottom-center{position:fixed;bottom:1rem;left:50%;transform:translate(-50%)}.loro-toast--inline{position:static;width:100%;transform:none}.loro-toast__icon{display:grid;width:1.8rem;height:1.8rem;place-items:center}.loro-toast__spinner{width:1.35rem;height:1.35rem;border:2px solid rgba(108,60,255,.18);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-toast-spin .85s linear infinite}button{border:0;background:transparent;color:var(--loro-muted);font:inherit;cursor:pointer}@keyframes loro-toast-spin{to{transform:rotate(360deg)}}@media(max-width:1023.88px){.loro-toast:not(.loro-toast--inline){right:1rem;bottom:calc(env(safe-area-inset-bottom,0px) + 1rem);left:1rem;width:auto;transform:none}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroToast, isStandalone: true, selector: "loro-toast", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismiss: "dismiss" }, host: { properties: { "class.loro-toast-host--inline": "position() === 'inline'" } }, ngImport: i0, template: "@if (visible()) {\n <aside\n class=\"loro-toast\"\n [class]=\"'loro-toast loro-toast--' + variant() + ' loro-toast--' + position()\"\n [attr.role]=\"variant() === 'error' ? 'alert' : 'status'\">\n <span class=\"loro-toast__icon\">\n @if (variant() === 'loading') {\n <span class=\"loro-toast__spinner\" aria-hidden=\"true\"></span>\n } @else {\n <loro-icon [name]=\"resolvedIcon()\" [size]=\"24\" [alt]=\"message()\" [color]=\"iconColor()\" />\n }\n </span>\n <span>{{ message() }}</span>\n @if (dismissible()) {\n <button type=\"button\" (click)=\"dismiss.emit()\" aria-label=\"Dismiss notification\">x</button>\n }\n </aside>\n }", styles: [":host{z-index:1000;display:block;font-family:var(--loro-font-brand);pointer-events:none}:host(.loro-toast-host--inline){width:100%}.loro-toast{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;width:min(24rem,100vw - 2rem);min-height:3.6rem;padding:.85rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface);color:var(--loro-text-strong);box-shadow:var(--loro-shadow-panel);font-weight:800;pointer-events:auto}.loro-toast--top-right{position:fixed;top:1rem;right:1rem}.loro-toast--bottom-right{position:fixed;right:1rem;bottom:1rem}.loro-toast--bottom-center{position:fixed;bottom:1rem;left:50%;transform:translate(-50%)}.loro-toast--inline{position:static;width:100%;transform:none}.loro-toast__icon{display:grid;width:1.8rem;height:1.8rem;place-items:center}.loro-toast__spinner{width:1.35rem;height:1.35rem;border:2px solid rgba(108,60,255,.18);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-toast-spin .85s linear infinite}button{border:0;background:transparent;color:var(--loro-muted);font:inherit;cursor:pointer}@keyframes loro-toast-spin{to{transform:rotate(360deg)}}@media(max-width:1023.88px){.loro-toast:not(.loro-toast--inline){right:1rem;bottom:calc(env(safe-area-inset-bottom,0px) + 1rem);left:1rem;width:auto;transform:none}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3850
2568
|
}
|
|
3851
2569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroToast, decorators: [{
|
|
3852
2570
|
type: Component,
|
|
3853
2571
|
args: [{ selector: 'loro-toast', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3854
2572
|
'[class.loro-toast-host--inline]': "position() === 'inline'",
|
|
3855
|
-
}, template:
|
|
3856
|
-
@if (visible()) {
|
|
3857
|
-
<aside
|
|
3858
|
-
class="loro-toast"
|
|
3859
|
-
[class]="'loro-toast loro-toast--' + variant() + ' loro-toast--' + position()"
|
|
3860
|
-
[attr.role]="variant() === 'error' ? 'alert' : 'status'">
|
|
3861
|
-
<span class="loro-toast__icon">
|
|
3862
|
-
@if (variant() === 'loading') {
|
|
3863
|
-
<span class="loro-toast__spinner" aria-hidden="true"></span>
|
|
3864
|
-
} @else {
|
|
3865
|
-
<loro-icon [name]="resolvedIcon()" [size]="24" [alt]="message()" [color]="iconColor()" />
|
|
3866
|
-
}
|
|
3867
|
-
</span>
|
|
3868
|
-
<span>{{ message() }}</span>
|
|
3869
|
-
@if (dismissible()) {
|
|
3870
|
-
<button type="button" (click)="dismiss.emit()" aria-label="Dismiss notification">x</button>
|
|
3871
|
-
}
|
|
3872
|
-
</aside>
|
|
3873
|
-
}
|
|
3874
|
-
`, styles: [":host{z-index:1000;display:block;font-family:var(--loro-font-brand);pointer-events:none}:host(.loro-toast-host--inline){width:100%}.loro-toast{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;width:min(24rem,calc(100vw - 2rem));min-height:3.6rem;padding:.85rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface);color:var(--loro-text-strong);box-shadow:var(--loro-shadow-panel);font-weight:800;pointer-events:auto}.loro-toast--top-right{position:fixed;top:1rem;right:1rem}.loro-toast--bottom-right{position:fixed;right:1rem;bottom:1rem}.loro-toast--bottom-center{position:fixed;bottom:1rem;left:50%;transform:translate(-50%)}.loro-toast--inline{position:static;width:100%;transform:none}.loro-toast__icon{display:grid;width:1.8rem;height:1.8rem;place-items:center}.loro-toast__spinner{width:1.35rem;height:1.35rem;border:2px solid rgba(108,60,255,.18);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-toast-spin .85s linear infinite}button{border:0;background:transparent;color:var(--loro-muted);font:inherit;cursor:pointer}@keyframes loro-toast-spin{to{transform:rotate(360deg)}}@media(max-width:1023.88px){.loro-toast:not(.loro-toast--inline){right:1rem;bottom:calc(env(safe-area-inset-bottom,0px) + 1rem);left:1rem;width:auto;transform:none}}\n"] }]
|
|
2573
|
+
}, template: "@if (visible()) {\n <aside\n class=\"loro-toast\"\n [class]=\"'loro-toast loro-toast--' + variant() + ' loro-toast--' + position()\"\n [attr.role]=\"variant() === 'error' ? 'alert' : 'status'\">\n <span class=\"loro-toast__icon\">\n @if (variant() === 'loading') {\n <span class=\"loro-toast__spinner\" aria-hidden=\"true\"></span>\n } @else {\n <loro-icon [name]=\"resolvedIcon()\" [size]=\"24\" [alt]=\"message()\" [color]=\"iconColor()\" />\n }\n </span>\n <span>{{ message() }}</span>\n @if (dismissible()) {\n <button type=\"button\" (click)=\"dismiss.emit()\" aria-label=\"Dismiss notification\">x</button>\n }\n </aside>\n }", styles: [":host{z-index:1000;display:block;font-family:var(--loro-font-brand);pointer-events:none}:host(.loro-toast-host--inline){width:100%}.loro-toast{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;width:min(24rem,100vw - 2rem);min-height:3.6rem;padding:.85rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:.8rem;background:var(--loro-surface);color:var(--loro-text-strong);box-shadow:var(--loro-shadow-panel);font-weight:800;pointer-events:auto}.loro-toast--top-right{position:fixed;top:1rem;right:1rem}.loro-toast--bottom-right{position:fixed;right:1rem;bottom:1rem}.loro-toast--bottom-center{position:fixed;bottom:1rem;left:50%;transform:translate(-50%)}.loro-toast--inline{position:static;width:100%;transform:none}.loro-toast__icon{display:grid;width:1.8rem;height:1.8rem;place-items:center}.loro-toast__spinner{width:1.35rem;height:1.35rem;border:2px solid rgba(108,60,255,.18);border-top-color:var(--loro-primary-500);border-radius:50%;animation:loro-toast-spin .85s linear infinite}button{border:0;background:transparent;color:var(--loro-muted);font:inherit;cursor:pointer}@keyframes loro-toast-spin{to{transform:rotate(360deg)}}@media(max-width:1023.88px){.loro-toast:not(.loro-toast--inline){right:1rem;bottom:calc(env(safe-area-inset-bottom,0px) + 1rem);left:1rem;width:auto;transform:none}}\n"] }]
|
|
3875
2574
|
}], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }] } });
|
|
3876
2575
|
|
|
3877
2576
|
let nextLoroAuthFieldId = 0;
|
|
@@ -3913,93 +2612,11 @@ class LoroAuthField {
|
|
|
3913
2612
|
this.passwordVisible.update((value) => !value);
|
|
3914
2613
|
}
|
|
3915
2614
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAuthField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3916
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAuthField, isStandalone: true, selector: "loro-auth-field", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, ngImport: i0, template:
|
|
3917
|
-
<label
|
|
3918
|
-
class="loro-auth-field"
|
|
3919
|
-
[class.loro-auth-field--selected]="selected()"
|
|
3920
|
-
[class.loro-auth-field--error]="hasError()"
|
|
3921
|
-
>
|
|
3922
|
-
<span class="sr-only">{{ label() }}</span>
|
|
3923
|
-
<span class="loro-auth-field__icon">
|
|
3924
|
-
<loro-icon [name]="icon()" [size]="28" [alt]="label()" />
|
|
3925
|
-
</span>
|
|
3926
|
-
<input
|
|
3927
|
-
class="loro-auth-field__input"
|
|
3928
|
-
[type]="resolvedType()"
|
|
3929
|
-
[attr.autocomplete]="autocomplete()"
|
|
3930
|
-
[placeholder]="placeholder()"
|
|
3931
|
-
[value]="value()"
|
|
3932
|
-
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
3933
|
-
[disabled]="disabled()"
|
|
3934
|
-
[readonly]="readonly()"
|
|
3935
|
-
[required]="required()"
|
|
3936
|
-
[attr.aria-describedby]="hasError() && errorText() ? errorId : null"
|
|
3937
|
-
(input)="updateValue(($any($event.target).value ?? '').toString())"
|
|
3938
|
-
(blur)="markAsTouched()"
|
|
3939
|
-
/>
|
|
3940
|
-
@if (showToggle()) {
|
|
3941
|
-
<button
|
|
3942
|
-
type="button"
|
|
3943
|
-
class="loro-auth-field__toggle"
|
|
3944
|
-
(click)="toggleVisibility()"
|
|
3945
|
-
[attr.aria-label]="passwordVisible() ? 'Ocultar contenido' : 'Mostrar contenido'"
|
|
3946
|
-
>
|
|
3947
|
-
<loro-icon name="eye" [size]="26" alt="Mostrar contenido" />
|
|
3948
|
-
</button>
|
|
3949
|
-
}
|
|
3950
|
-
</label>
|
|
3951
|
-
@if (hasError() && errorText()) {
|
|
3952
|
-
<span class="loro-auth-field__error" [id]="errorId">
|
|
3953
|
-
<loro-icon name="shield-alert" [size]="15" color="danger" [decorative]="true" />
|
|
3954
|
-
<span>{{ errorText() }}</span>
|
|
3955
|
-
</span>
|
|
3956
|
-
}
|
|
3957
|
-
`, isInline: true, styles: [":host{display:grid;gap:.35rem}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;padding:0}.loro-auth-field{display:grid;grid-template-columns:2rem minmax(0,1fr) auto;align-items:center;border:1px solid var(--loro-border-strong);border-radius:.72rem;background:var(--loro-surface);padding:.48rem .65rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font-family:var(--loro-font-brand);transition:border-color .18s ease,box-shadow .18s ease}.loro-auth-field:hover,.loro-auth-field:focus-within,.loro-auth-field--selected{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-field--error{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,var(--loro-border-strong));background:color-mix(in srgb,var(--loro-danger-surface) 34%,var(--loro-surface));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-auth-field--error:hover,.loro-auth-field--error:focus-within{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-border-strong));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-auth-field__icon{display:grid;place-items:center;width:24px}.loro-auth-field__icon loro-icon{transform:scale(.62)}.loro-auth-field__input{width:100%;border:0;outline:none;background:transparent;color:var(--loro-text);font:inherit;font-size:.72rem;line-height:1.3}.loro-auth-field__input::placeholder{color:var(--loro-muted)}.loro-auth-field__toggle{border:0;background:transparent;padding:0;color:inherit;line-height:0;cursor:pointer}.loro-auth-field__toggle loro-icon{transform:scale(.62)}.loro-auth-field__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.35rem;color:var(--loro-danger-text);font-size:.72rem;font-weight:750;line-height:1.3}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2615
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAuthField, isStandalone: true, selector: "loro-auth-field", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, ngImport: i0, template: "<label\n class=\"loro-auth-field\"\n [class.loro-auth-field--selected]=\"selected()\"\n [class.loro-auth-field--error]=\"hasError()\"\n >\n <span class=\"sr-only\">{{ label() }}</span>\n <span class=\"loro-auth-field__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"28\" [alt]=\"label()\" />\n </span>\n <input\n class=\"loro-auth-field__input\"\n [type]=\"resolvedType()\"\n [attr.autocomplete]=\"autocomplete()\"\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.aria-describedby]=\"hasError() && errorText() ? errorId : null\"\n (input)=\"updateValue(($any($event.target).value ?? '').toString())\"\n (blur)=\"markAsTouched()\"\n />\n @if (showToggle()) {\n <button\n type=\"button\"\n class=\"loro-auth-field__toggle\"\n (click)=\"toggleVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? 'Ocultar contenido' : 'Mostrar contenido'\"\n >\n <loro-icon name=\"eye\" [size]=\"26\" alt=\"Mostrar contenido\" />\n </button>\n }\n </label>\n @if (hasError() && errorText()) {\n <span class=\"loro-auth-field__error\" [id]=\"errorId\">\n <loro-icon name=\"shield-alert\" [size]=\"15\" color=\"danger\" [decorative]=\"true\" />\n <span>{{ errorText() }}</span>\n </span>\n }", styles: [":host{display:grid;gap:.35rem}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;padding:0}.loro-auth-field{display:grid;grid-template-columns:2rem minmax(0,1fr) auto;align-items:center;border:1px solid var(--loro-border-strong);border-radius:.72rem;background:var(--loro-surface);padding:.48rem .65rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font-family:var(--loro-font-brand);transition:border-color .18s ease,box-shadow .18s ease}.loro-auth-field:hover,.loro-auth-field:focus-within,.loro-auth-field--selected{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-field--error{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,var(--loro-border-strong));background:color-mix(in srgb,var(--loro-danger-surface) 34%,var(--loro-surface));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-auth-field--error:hover,.loro-auth-field--error:focus-within{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-border-strong));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-auth-field__icon{display:grid;place-items:center;width:24px}.loro-auth-field__icon loro-icon{transform:scale(.62)}.loro-auth-field__input{width:100%;border:0;outline:none;background:transparent;color:var(--loro-text);font:inherit;font-size:.72rem;line-height:1.3}.loro-auth-field__input::placeholder{color:var(--loro-muted)}.loro-auth-field__toggle{border:0;background:transparent;padding:0;color:inherit;line-height:0;cursor:pointer}.loro-auth-field__toggle loro-icon{transform:scale(.62)}.loro-auth-field__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.35rem;color:var(--loro-danger-text);font-size:.72rem;font-weight:750;line-height:1.3}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3958
2616
|
}
|
|
3959
2617
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAuthField, decorators: [{
|
|
3960
2618
|
type: Component,
|
|
3961
|
-
args: [{ selector: 'loro-auth-field', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
3962
|
-
<label
|
|
3963
|
-
class="loro-auth-field"
|
|
3964
|
-
[class.loro-auth-field--selected]="selected()"
|
|
3965
|
-
[class.loro-auth-field--error]="hasError()"
|
|
3966
|
-
>
|
|
3967
|
-
<span class="sr-only">{{ label() }}</span>
|
|
3968
|
-
<span class="loro-auth-field__icon">
|
|
3969
|
-
<loro-icon [name]="icon()" [size]="28" [alt]="label()" />
|
|
3970
|
-
</span>
|
|
3971
|
-
<input
|
|
3972
|
-
class="loro-auth-field__input"
|
|
3973
|
-
[type]="resolvedType()"
|
|
3974
|
-
[attr.autocomplete]="autocomplete()"
|
|
3975
|
-
[placeholder]="placeholder()"
|
|
3976
|
-
[value]="value()"
|
|
3977
|
-
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
3978
|
-
[disabled]="disabled()"
|
|
3979
|
-
[readonly]="readonly()"
|
|
3980
|
-
[required]="required()"
|
|
3981
|
-
[attr.aria-describedby]="hasError() && errorText() ? errorId : null"
|
|
3982
|
-
(input)="updateValue(($any($event.target).value ?? '').toString())"
|
|
3983
|
-
(blur)="markAsTouched()"
|
|
3984
|
-
/>
|
|
3985
|
-
@if (showToggle()) {
|
|
3986
|
-
<button
|
|
3987
|
-
type="button"
|
|
3988
|
-
class="loro-auth-field__toggle"
|
|
3989
|
-
(click)="toggleVisibility()"
|
|
3990
|
-
[attr.aria-label]="passwordVisible() ? 'Ocultar contenido' : 'Mostrar contenido'"
|
|
3991
|
-
>
|
|
3992
|
-
<loro-icon name="eye" [size]="26" alt="Mostrar contenido" />
|
|
3993
|
-
</button>
|
|
3994
|
-
}
|
|
3995
|
-
</label>
|
|
3996
|
-
@if (hasError() && errorText()) {
|
|
3997
|
-
<span class="loro-auth-field__error" [id]="errorId">
|
|
3998
|
-
<loro-icon name="shield-alert" [size]="15" color="danger" [decorative]="true" />
|
|
3999
|
-
<span>{{ errorText() }}</span>
|
|
4000
|
-
</span>
|
|
4001
|
-
}
|
|
4002
|
-
`, styles: [":host{display:grid;gap:.35rem}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;padding:0}.loro-auth-field{display:grid;grid-template-columns:2rem minmax(0,1fr) auto;align-items:center;border:1px solid var(--loro-border-strong);border-radius:.72rem;background:var(--loro-surface);padding:.48rem .65rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font-family:var(--loro-font-brand);transition:border-color .18s ease,box-shadow .18s ease}.loro-auth-field:hover,.loro-auth-field:focus-within,.loro-auth-field--selected{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-field--error{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,var(--loro-border-strong));background:color-mix(in srgb,var(--loro-danger-surface) 34%,var(--loro-surface));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-auth-field--error:hover,.loro-auth-field--error:focus-within{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-border-strong));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-auth-field__icon{display:grid;place-items:center;width:24px}.loro-auth-field__icon loro-icon{transform:scale(.62)}.loro-auth-field__input{width:100%;border:0;outline:none;background:transparent;color:var(--loro-text);font:inherit;font-size:.72rem;line-height:1.3}.loro-auth-field__input::placeholder{color:var(--loro-muted)}.loro-auth-field__toggle{border:0;background:transparent;padding:0;color:inherit;line-height:0;cursor:pointer}.loro-auth-field__toggle loro-icon{transform:scale(.62)}.loro-auth-field__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.35rem;color:var(--loro-danger-text);font-size:.72rem;font-weight:750;line-height:1.3}\n"] }]
|
|
2619
|
+
args: [{ selector: 'loro-auth-field', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"loro-auth-field\"\n [class.loro-auth-field--selected]=\"selected()\"\n [class.loro-auth-field--error]=\"hasError()\"\n >\n <span class=\"sr-only\">{{ label() }}</span>\n <span class=\"loro-auth-field__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"28\" [alt]=\"label()\" />\n </span>\n <input\n class=\"loro-auth-field__input\"\n [type]=\"resolvedType()\"\n [attr.autocomplete]=\"autocomplete()\"\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.aria-describedby]=\"hasError() && errorText() ? errorId : null\"\n (input)=\"updateValue(($any($event.target).value ?? '').toString())\"\n (blur)=\"markAsTouched()\"\n />\n @if (showToggle()) {\n <button\n type=\"button\"\n class=\"loro-auth-field__toggle\"\n (click)=\"toggleVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? 'Ocultar contenido' : 'Mostrar contenido'\"\n >\n <loro-icon name=\"eye\" [size]=\"26\" alt=\"Mostrar contenido\" />\n </button>\n }\n </label>\n @if (hasError() && errorText()) {\n <span class=\"loro-auth-field__error\" [id]=\"errorId\">\n <loro-icon name=\"shield-alert\" [size]=\"15\" color=\"danger\" [decorative]=\"true\" />\n <span>{{ errorText() }}</span>\n </span>\n }", styles: [":host{display:grid;gap:.35rem}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;padding:0}.loro-auth-field{display:grid;grid-template-columns:2rem minmax(0,1fr) auto;align-items:center;border:1px solid var(--loro-border-strong);border-radius:.72rem;background:var(--loro-surface);padding:.48rem .65rem;box-shadow:var(--loro-shadow-soft);color:var(--loro-text);font-family:var(--loro-font-brand);transition:border-color .18s ease,box-shadow .18s ease}.loro-auth-field:hover,.loro-auth-field:focus-within,.loro-auth-field--selected{border-color:var(--loro-auth-field-active-border, var(--loro-primary-500));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-auth-field--error{border-color:color-mix(in srgb,var(--loro-danger-text) 30%,var(--loro-border-strong));background:color-mix(in srgb,var(--loro-danger-surface) 34%,var(--loro-surface));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 7%,transparent)}.loro-auth-field--error:hover,.loro-auth-field--error:focus-within{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-border-strong));box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-auth-field__icon{display:grid;place-items:center;width:24px}.loro-auth-field__icon loro-icon{transform:scale(.62)}.loro-auth-field__input{width:100%;border:0;outline:none;background:transparent;color:var(--loro-text);font:inherit;font-size:.72rem;line-height:1.3}.loro-auth-field__input::placeholder{color:var(--loro-muted)}.loro-auth-field__toggle{border:0;background:transparent;padding:0;color:inherit;line-height:0;cursor:pointer}.loro-auth-field__toggle loro-icon{transform:scale(.62)}.loro-auth-field__error{display:inline-grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.35rem;color:var(--loro-danger-text);font-size:.72rem;font-weight:750;line-height:1.3}\n"] }]
|
|
4003
2620
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
4004
2621
|
|
|
4005
2622
|
class LoroCheckbox {
|
|
@@ -4021,77 +2638,11 @@ class LoroCheckbox {
|
|
|
4021
2638
|
this.checked.set(checked);
|
|
4022
2639
|
}
|
|
4023
2640
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4024
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroCheckbox, isStandalone: true, selector: "loro-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, ngImport: i0, template:
|
|
4025
|
-
<label
|
|
4026
|
-
class="loro-checkbox"
|
|
4027
|
-
[class.loro-checkbox--checked]="checked()"
|
|
4028
|
-
[class.loro-checkbox--invalid]="showError()"
|
|
4029
|
-
[class.loro-checkbox--disabled]="disabled()"
|
|
4030
|
-
>
|
|
4031
|
-
<input
|
|
4032
|
-
type="checkbox"
|
|
4033
|
-
class="loro-checkbox__native"
|
|
4034
|
-
[checked]="checked()"
|
|
4035
|
-
[disabled]="disabled()"
|
|
4036
|
-
[required]="required()"
|
|
4037
|
-
[readonly]="readonly()"
|
|
4038
|
-
(change)="toggle(($any($event.target).checked))"
|
|
4039
|
-
(blur)="touched.set(true)"
|
|
4040
|
-
/>
|
|
4041
|
-
<span class="loro-checkbox__box" aria-hidden="true"></span>
|
|
4042
|
-
<span class="loro-checkbox__content">
|
|
4043
|
-
<span class="loro-checkbox__label">
|
|
4044
|
-
@if (text()) {
|
|
4045
|
-
{{ text() }}
|
|
4046
|
-
} @else {
|
|
4047
|
-
<ng-content></ng-content>
|
|
4048
|
-
}
|
|
4049
|
-
</span>
|
|
4050
|
-
@if (errorText()) {
|
|
4051
|
-
<span class="loro-checkbox__error">{{ errorText() }}</span>
|
|
4052
|
-
} @else if (helperText()) {
|
|
4053
|
-
<span class="loro-checkbox__helper">{{ helperText() }}</span>
|
|
4054
|
-
}
|
|
4055
|
-
</span>
|
|
4056
|
-
</label>
|
|
4057
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-checkbox{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.65rem;color:var(--loro-muted);cursor:pointer}.loro-checkbox--disabled{opacity:.62;cursor:not-allowed}.loro-checkbox__native{position:absolute;opacity:0;pointer-events:none}.loro-checkbox__box{position:relative;width:1.15rem;height:1.15rem;margin-top:.08rem;border:1.5px solid color-mix(in srgb,var(--loro-primary-500) 78%,#ffffff 22%);border-radius:.35rem;background:var(--loro-surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-checkbox--checked .loro-checkbox__box{background:linear-gradient(180deg,#8f6bff,#6d3dff);border-color:var(--loro-primary-500);box-shadow:inset 0 0 0 1px color-mix(in srgb,#ffffff 18%,transparent),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 12%,transparent)}.loro-checkbox--checked .loro-checkbox__box:after{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:.8rem;font-weight:900;line-height:1;content:\"\\2713\"}.loro-checkbox--invalid .loro-checkbox__box{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-primary-500));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-checkbox__content{display:grid;gap:.22rem;min-width:0}.loro-checkbox__label{color:inherit;font-size:var(--loro-checkbox-label-font-size, .9rem);font-weight:var(--loro-checkbox-label-font-weight, 750);line-height:var(--loro-checkbox-label-line-height, 1.35)}.loro-checkbox__helper,.loro-checkbox__error{font-size:.78rem;font-weight:700;line-height:1.3}.loro-checkbox__helper{color:var(--loro-muted)}.loro-checkbox__error{color:var(--loro-danger-text)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2641
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroCheckbox, isStandalone: true, selector: "loro-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, ngImport: i0, template: "<label\n class=\"loro-checkbox\"\n [class.loro-checkbox--checked]=\"checked()\"\n [class.loro-checkbox--invalid]=\"showError()\"\n [class.loro-checkbox--disabled]=\"disabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"loro-checkbox__native\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [readonly]=\"readonly()\"\n (change)=\"toggle(($any($event.target).checked))\"\n (blur)=\"touched.set(true)\"\n />\n <span class=\"loro-checkbox__box\" aria-hidden=\"true\"></span>\n <span class=\"loro-checkbox__content\">\n <span class=\"loro-checkbox__label\">\n @if (text()) {\n {{ text() }}\n } @else {\n <ng-content></ng-content>\n }\n </span>\n @if (errorText()) {\n <span class=\"loro-checkbox__error\">{{ errorText() }}</span>\n } @else if (helperText()) {\n <span class=\"loro-checkbox__helper\">{{ helperText() }}</span>\n }\n </span>\n </label>", styles: ["@charset \"UTF-8\";:host{display:block;font-family:var(--loro-font-brand)}.loro-checkbox{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.65rem;color:var(--loro-muted);cursor:pointer}.loro-checkbox--disabled{opacity:.62;cursor:not-allowed}.loro-checkbox__native{position:absolute;opacity:0;pointer-events:none}.loro-checkbox__box{position:relative;width:1.15rem;height:1.15rem;margin-top:.08rem;border:1.5px solid color-mix(in srgb,var(--loro-primary-500) 78%,#ffffff 22%);border-radius:.35rem;background:var(--loro-surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-checkbox--checked .loro-checkbox__box{background:linear-gradient(180deg,#8f6bff,#6d3dff);border-color:var(--loro-primary-500);box-shadow:inset 0 0 0 1px color-mix(in srgb,#ffffff 18%,transparent),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 12%,transparent)}.loro-checkbox--checked .loro-checkbox__box:after{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:.8rem;font-weight:900;line-height:1;content:\"\\2713\"}.loro-checkbox--invalid .loro-checkbox__box{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-primary-500));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-checkbox__content{display:grid;gap:.22rem;min-width:0}.loro-checkbox__label{color:inherit;font-size:var(--loro-checkbox-label-font-size, .9rem);font-weight:var(--loro-checkbox-label-font-weight, 750);line-height:var(--loro-checkbox-label-line-height, 1.35)}.loro-checkbox__helper,.loro-checkbox__error{font-size:.78rem;font-weight:700;line-height:1.3}.loro-checkbox__helper{color:var(--loro-muted)}.loro-checkbox__error{color:var(--loro-danger-text)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4058
2642
|
}
|
|
4059
2643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroCheckbox, decorators: [{
|
|
4060
2644
|
type: Component,
|
|
4061
|
-
args: [{ selector: 'loro-checkbox', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4062
|
-
<label
|
|
4063
|
-
class="loro-checkbox"
|
|
4064
|
-
[class.loro-checkbox--checked]="checked()"
|
|
4065
|
-
[class.loro-checkbox--invalid]="showError()"
|
|
4066
|
-
[class.loro-checkbox--disabled]="disabled()"
|
|
4067
|
-
>
|
|
4068
|
-
<input
|
|
4069
|
-
type="checkbox"
|
|
4070
|
-
class="loro-checkbox__native"
|
|
4071
|
-
[checked]="checked()"
|
|
4072
|
-
[disabled]="disabled()"
|
|
4073
|
-
[required]="required()"
|
|
4074
|
-
[readonly]="readonly()"
|
|
4075
|
-
(change)="toggle(($any($event.target).checked))"
|
|
4076
|
-
(blur)="touched.set(true)"
|
|
4077
|
-
/>
|
|
4078
|
-
<span class="loro-checkbox__box" aria-hidden="true"></span>
|
|
4079
|
-
<span class="loro-checkbox__content">
|
|
4080
|
-
<span class="loro-checkbox__label">
|
|
4081
|
-
@if (text()) {
|
|
4082
|
-
{{ text() }}
|
|
4083
|
-
} @else {
|
|
4084
|
-
<ng-content></ng-content>
|
|
4085
|
-
}
|
|
4086
|
-
</span>
|
|
4087
|
-
@if (errorText()) {
|
|
4088
|
-
<span class="loro-checkbox__error">{{ errorText() }}</span>
|
|
4089
|
-
} @else if (helperText()) {
|
|
4090
|
-
<span class="loro-checkbox__helper">{{ helperText() }}</span>
|
|
4091
|
-
}
|
|
4092
|
-
</span>
|
|
4093
|
-
</label>
|
|
4094
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-checkbox{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.65rem;color:var(--loro-muted);cursor:pointer}.loro-checkbox--disabled{opacity:.62;cursor:not-allowed}.loro-checkbox__native{position:absolute;opacity:0;pointer-events:none}.loro-checkbox__box{position:relative;width:1.15rem;height:1.15rem;margin-top:.08rem;border:1.5px solid color-mix(in srgb,var(--loro-primary-500) 78%,#ffffff 22%);border-radius:.35rem;background:var(--loro-surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-checkbox--checked .loro-checkbox__box{background:linear-gradient(180deg,#8f6bff,#6d3dff);border-color:var(--loro-primary-500);box-shadow:inset 0 0 0 1px color-mix(in srgb,#ffffff 18%,transparent),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 12%,transparent)}.loro-checkbox--checked .loro-checkbox__box:after{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:.8rem;font-weight:900;line-height:1;content:\"\\2713\"}.loro-checkbox--invalid .loro-checkbox__box{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-primary-500));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-checkbox__content{display:grid;gap:.22rem;min-width:0}.loro-checkbox__label{color:inherit;font-size:var(--loro-checkbox-label-font-size, .9rem);font-weight:var(--loro-checkbox-label-font-weight, 750);line-height:var(--loro-checkbox-label-line-height, 1.35)}.loro-checkbox__helper,.loro-checkbox__error{font-size:.78rem;font-weight:700;line-height:1.3}.loro-checkbox__helper{color:var(--loro-muted)}.loro-checkbox__error{color:var(--loro-danger-text)}\n"] }]
|
|
2645
|
+
args: [{ selector: 'loro-checkbox', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"loro-checkbox\"\n [class.loro-checkbox--checked]=\"checked()\"\n [class.loro-checkbox--invalid]=\"showError()\"\n [class.loro-checkbox--disabled]=\"disabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"loro-checkbox__native\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [readonly]=\"readonly()\"\n (change)=\"toggle(($any($event.target).checked))\"\n (blur)=\"touched.set(true)\"\n />\n <span class=\"loro-checkbox__box\" aria-hidden=\"true\"></span>\n <span class=\"loro-checkbox__content\">\n <span class=\"loro-checkbox__label\">\n @if (text()) {\n {{ text() }}\n } @else {\n <ng-content></ng-content>\n }\n </span>\n @if (errorText()) {\n <span class=\"loro-checkbox__error\">{{ errorText() }}</span>\n } @else if (helperText()) {\n <span class=\"loro-checkbox__helper\">{{ helperText() }}</span>\n }\n </span>\n </label>", styles: ["@charset \"UTF-8\";:host{display:block;font-family:var(--loro-font-brand)}.loro-checkbox{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.65rem;color:var(--loro-muted);cursor:pointer}.loro-checkbox--disabled{opacity:.62;cursor:not-allowed}.loro-checkbox__native{position:absolute;opacity:0;pointer-events:none}.loro-checkbox__box{position:relative;width:1.15rem;height:1.15rem;margin-top:.08rem;border:1.5px solid color-mix(in srgb,var(--loro-primary-500) 78%,#ffffff 22%);border-radius:.35rem;background:var(--loro-surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--loro-surface) 70%,transparent);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.loro-checkbox--checked .loro-checkbox__box{background:linear-gradient(180deg,#8f6bff,#6d3dff);border-color:var(--loro-primary-500);box-shadow:inset 0 0 0 1px color-mix(in srgb,#ffffff 18%,transparent),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 12%,transparent)}.loro-checkbox--checked .loro-checkbox__box:after{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:.8rem;font-weight:900;line-height:1;content:\"\\2713\"}.loro-checkbox--invalid .loro-checkbox__box{border-color:color-mix(in srgb,var(--loro-danger-text) 44%,var(--loro-primary-500));box-shadow:0 0 0 3px color-mix(in srgb,var(--loro-danger-text) 10%,transparent)}.loro-checkbox__content{display:grid;gap:.22rem;min-width:0}.loro-checkbox__label{color:inherit;font-size:var(--loro-checkbox-label-font-size, .9rem);font-weight:var(--loro-checkbox-label-font-weight, 750);line-height:var(--loro-checkbox-label-line-height, 1.35)}.loro-checkbox__helper,.loro-checkbox__error{font-size:.78rem;font-weight:700;line-height:1.3}.loro-checkbox__helper{color:var(--loro-muted)}.loro-checkbox__error{color:var(--loro-danger-text)}\n"] }]
|
|
4095
2646
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }] } });
|
|
4096
2647
|
|
|
4097
2648
|
class LoroDropdown {
|
|
@@ -4114,45 +2665,11 @@ class LoroDropdown {
|
|
|
4114
2665
|
this.touched.set(true);
|
|
4115
2666
|
}
|
|
4116
2667
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroDropdown, isStandalone: true, selector: "loro-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, ngImport: i0, template:
|
|
4118
|
-
<label class="loro-dropdown">
|
|
4119
|
-
@if (label()) {
|
|
4120
|
-
<span class="loro-dropdown__label">{{ label() }}</span>
|
|
4121
|
-
}
|
|
4122
|
-
<span class="loro-dropdown__control">
|
|
4123
|
-
<select [value]="value()" [disabled]="disabled() || readonly()" [required]="required()" (change)="updateValue(($any($event.target).value ?? '').toString())" (blur)="markAsTouched()">
|
|
4124
|
-
@if (placeholder()) {
|
|
4125
|
-
<option value="" disabled>{{ placeholder() }}</option>
|
|
4126
|
-
}
|
|
4127
|
-
@for (option of options(); track option.value) {
|
|
4128
|
-
<option [value]="option.value">{{ option.label }}</option>
|
|
4129
|
-
}
|
|
4130
|
-
</select>
|
|
4131
|
-
<loro-icon name="chevron-down" [size]="22" alt="Abrir opciones" color="primary" />
|
|
4132
|
-
</span>
|
|
4133
|
-
</label>
|
|
4134
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-dropdown{display:grid;gap:.55rem}.loro-dropdown__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-dropdown__control{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:3.4rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface)}select{width:100%;border:0;outline:0;appearance:none;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:700}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2668
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroDropdown, isStandalone: true, selector: "loro-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, ngImport: i0, template: "<label class=\"loro-dropdown\">\n @if (label()) {\n <span class=\"loro-dropdown__label\">{{ label() }}</span>\n }\n <span class=\"loro-dropdown__control\">\n <select [value]=\"value()\" [disabled]=\"disabled() || readonly()\" [required]=\"required()\" (change)=\"updateValue(($any($event.target).value ?? '').toString())\" (blur)=\"markAsTouched()\">\n @if (placeholder()) {\n <option value=\"\" disabled>{{ placeholder() }}</option>\n }\n @for (option of options(); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n <loro-icon name=\"chevron-down\" [size]=\"22\" alt=\"Abrir opciones\" color=\"primary\" />\n </span>\n </label>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-dropdown{display:grid;gap:.55rem}.loro-dropdown__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-dropdown__control{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:3.4rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface)}select{width:100%;border:0;outline:0;appearance:none;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:700}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4135
2669
|
}
|
|
4136
2670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroDropdown, decorators: [{
|
|
4137
2671
|
type: Component,
|
|
4138
|
-
args: [{ selector: 'loro-dropdown', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4139
|
-
<label class="loro-dropdown">
|
|
4140
|
-
@if (label()) {
|
|
4141
|
-
<span class="loro-dropdown__label">{{ label() }}</span>
|
|
4142
|
-
}
|
|
4143
|
-
<span class="loro-dropdown__control">
|
|
4144
|
-
<select [value]="value()" [disabled]="disabled() || readonly()" [required]="required()" (change)="updateValue(($any($event.target).value ?? '').toString())" (blur)="markAsTouched()">
|
|
4145
|
-
@if (placeholder()) {
|
|
4146
|
-
<option value="" disabled>{{ placeholder() }}</option>
|
|
4147
|
-
}
|
|
4148
|
-
@for (option of options(); track option.value) {
|
|
4149
|
-
<option [value]="option.value">{{ option.label }}</option>
|
|
4150
|
-
}
|
|
4151
|
-
</select>
|
|
4152
|
-
<loro-icon name="chevron-down" [size]="22" alt="Abrir opciones" color="primary" />
|
|
4153
|
-
</span>
|
|
4154
|
-
</label>
|
|
4155
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-dropdown{display:grid;gap:.55rem}.loro-dropdown__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-dropdown__control{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:3.4rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface)}select{width:100%;border:0;outline:0;appearance:none;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:700}\n"] }]
|
|
2672
|
+
args: [{ selector: 'loro-dropdown', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"loro-dropdown\">\n @if (label()) {\n <span class=\"loro-dropdown__label\">{{ label() }}</span>\n }\n <span class=\"loro-dropdown__control\">\n <select [value]=\"value()\" [disabled]=\"disabled() || readonly()\" [required]=\"required()\" (change)=\"updateValue(($any($event.target).value ?? '').toString())\" (blur)=\"markAsTouched()\">\n @if (placeholder()) {\n <option value=\"\" disabled>{{ placeholder() }}</option>\n }\n @for (option of options(); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n <loro-icon name=\"chevron-down\" [size]=\"22\" alt=\"Abrir opciones\" color=\"primary\" />\n </span>\n </label>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-dropdown{display:grid;gap:.55rem}.loro-dropdown__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-dropdown__control{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:3.4rem;padding:0 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface)}select{width:100%;border:0;outline:0;appearance:none;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:700}\n"] }]
|
|
4156
2673
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
4157
2674
|
|
|
4158
2675
|
class LoroFilterChip {
|
|
@@ -4162,25 +2679,11 @@ class LoroFilterChip {
|
|
|
4162
2679
|
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
4163
2680
|
selected = output();
|
|
4164
2681
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroFilterChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4165
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroFilterChip, isStandalone: true, selector: "loro-filter-chip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template:
|
|
4166
|
-
<button type="button" class="loro-filter-chip" [class.loro-filter-chip--active]="active()" (click)="selected.emit(value())">
|
|
4167
|
-
@if (icon()) {
|
|
4168
|
-
<loro-icon [name]="icon()!" [size]="20" [alt]="label()" [color]="active() ? 'inverse' : 'primary'" />
|
|
4169
|
-
}
|
|
4170
|
-
<span>{{ label() }}</span>
|
|
4171
|
-
</button>
|
|
4172
|
-
`, isInline: true, styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-filter-chip{display:inline-flex;align-items:center;gap:.45rem;min-height:2.55rem;padding:.55rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface);color:var(--loro-muted-strong);font:inherit;font-size:.9rem;font-weight:850;cursor:pointer;white-space:nowrap}.loro-filter-chip--active{border-color:transparent;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff;box-shadow:var(--loro-shadow-button)}@media(max-width:640px){.loro-filter-chip{gap:.4rem;min-height:2.3rem;padding:.48rem .78rem;font-size:clamp(.78rem,2.9vw,.9rem)}}@media(max-width:430px){.loro-filter-chip{gap:.34rem;min-height:2.2rem;padding:.42rem .7rem;font-size:clamp(.74rem,2.8vw,.84rem)}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2682
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroFilterChip, isStandalone: true, selector: "loro-filter-chip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<button type=\"button\" class=\"loro-filter-chip\" [class.loro-filter-chip--active]=\"active()\" (click)=\"selected.emit(value())\">\n @if (icon()) {\n <loro-icon [name]=\"icon()!\" [size]=\"20\" [alt]=\"label()\" [color]=\"active() ? 'inverse' : 'primary'\" />\n }\n <span>{{ label() }}</span>\n </button>", styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-filter-chip{display:inline-flex;align-items:center;gap:.45rem;min-height:2.55rem;padding:.55rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface);color:var(--loro-muted-strong);font:inherit;font-size:.9rem;font-weight:850;cursor:pointer;white-space:nowrap}.loro-filter-chip--active{border-color:transparent;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff;box-shadow:var(--loro-shadow-button)}@media(max-width:640px){.loro-filter-chip{gap:.4rem;min-height:2.3rem;padding:.48rem .78rem;font-size:clamp(.78rem,2.9vw,.9rem)}}@media(max-width:430px){.loro-filter-chip{gap:.34rem;min-height:2.2rem;padding:.42rem .7rem;font-size:clamp(.74rem,2.8vw,.84rem)}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4173
2683
|
}
|
|
4174
2684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroFilterChip, decorators: [{
|
|
4175
2685
|
type: Component,
|
|
4176
|
-
args: [{ selector: 'loro-filter-chip', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4177
|
-
<button type="button" class="loro-filter-chip" [class.loro-filter-chip--active]="active()" (click)="selected.emit(value())">
|
|
4178
|
-
@if (icon()) {
|
|
4179
|
-
<loro-icon [name]="icon()!" [size]="20" [alt]="label()" [color]="active() ? 'inverse' : 'primary'" />
|
|
4180
|
-
}
|
|
4181
|
-
<span>{{ label() }}</span>
|
|
4182
|
-
</button>
|
|
4183
|
-
`, styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-filter-chip{display:inline-flex;align-items:center;gap:.45rem;min-height:2.55rem;padding:.55rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface);color:var(--loro-muted-strong);font:inherit;font-size:.9rem;font-weight:850;cursor:pointer;white-space:nowrap}.loro-filter-chip--active{border-color:transparent;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff;box-shadow:var(--loro-shadow-button)}@media(max-width:640px){.loro-filter-chip{gap:.4rem;min-height:2.3rem;padding:.48rem .78rem;font-size:clamp(.78rem,2.9vw,.9rem)}}@media(max-width:430px){.loro-filter-chip{gap:.34rem;min-height:2.2rem;padding:.42rem .7rem;font-size:clamp(.74rem,2.8vw,.84rem)}}\n"] }]
|
|
2686
|
+
args: [{ selector: 'loro-filter-chip', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\" class=\"loro-filter-chip\" [class.loro-filter-chip--active]=\"active()\" (click)=\"selected.emit(value())\">\n @if (icon()) {\n <loro-icon [name]=\"icon()!\" [size]=\"20\" [alt]=\"label()\" [color]=\"active() ? 'inverse' : 'primary'\" />\n }\n <span>{{ label() }}</span>\n </button>", styles: [":host{display:inline-flex;font-family:var(--loro-font-brand)}.loro-filter-chip{display:inline-flex;align-items:center;gap:.45rem;min-height:2.55rem;padding:.55rem 1rem;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-pill);background:var(--loro-surface);color:var(--loro-muted-strong);font:inherit;font-size:.9rem;font-weight:850;cursor:pointer;white-space:nowrap}.loro-filter-chip--active{border-color:transparent;background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff;box-shadow:var(--loro-shadow-button)}@media(max-width:640px){.loro-filter-chip{gap:.4rem;min-height:2.3rem;padding:.48rem .78rem;font-size:clamp(.78rem,2.9vw,.9rem)}}@media(max-width:430px){.loro-filter-chip{gap:.34rem;min-height:2.2rem;padding:.42rem .7rem;font-size:clamp(.74rem,2.8vw,.84rem)}}\n"] }]
|
|
4184
2687
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
4185
2688
|
|
|
4186
2689
|
class LoroSegmentedControl {
|
|
@@ -4202,43 +2705,13 @@ class LoroSegmentedControl {
|
|
|
4202
2705
|
this.valueChange.emit(value);
|
|
4203
2706
|
}
|
|
4204
2707
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroSegmentedControl, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroSegmentedControl, isStandalone: true, selector: "loro-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, host: { properties: { "style.--loro-segmented-count": "options().length" } }, ngImport: i0, template:
|
|
4206
|
-
<div class="loro-segmented-control" role="tablist">
|
|
4207
|
-
@for (option of options(); track option.value) {
|
|
4208
|
-
<button
|
|
4209
|
-
type="button"
|
|
4210
|
-
role="tab"
|
|
4211
|
-
[attr.aria-selected]="value() === option.value"
|
|
4212
|
-
[class.loro-segmented-control__button--active]="value() === option.value"
|
|
4213
|
-
class="loro-segmented-control__button"
|
|
4214
|
-
[disabled]="disabled() || readonly()"
|
|
4215
|
-
(click)="selectValue(option.value)">
|
|
4216
|
-
{{ option.label }}
|
|
4217
|
-
</button>
|
|
4218
|
-
}
|
|
4219
|
-
</div>
|
|
4220
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-segmented-control{display:grid;grid-template-columns:repeat(var(--loro-segmented-count, 2),minmax(0,1fr));min-height:3.15rem;padding:.18rem;border:1px solid var(--loro-border-subtle);border-radius:.75rem;background:var(--loro-surface-muted);box-shadow:var(--loro-shadow-soft)}.loro-segmented-control__button{border:0;border-radius:.58rem;background:transparent;color:var(--loro-muted-strong);font:inherit;font-size:clamp(.95rem,3vw,1rem);font-weight:850;line-height:1.15;text-wrap:balance;cursor:pointer}.loro-segmented-control__button--active{background:var(--loro-surface);color:var(--loro-primary-700);box-shadow:0 6px 18px #22194914}@media(max-width:640px){.loro-segmented-control{min-height:3rem}.loro-segmented-control__button{padding-inline:.6rem}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2708
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroSegmentedControl, isStandalone: true, selector: "loro-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, host: { properties: { "style.--loro-segmented-count": "options().length" } }, ngImport: i0, template: "<div class=\"loro-segmented-control\" role=\"tablist\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n role=\"tab\"\n [attr.aria-selected]=\"value() === option.value\"\n [class.loro-segmented-control__button--active]=\"value() === option.value\"\n class=\"loro-segmented-control__button\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"selectValue(option.value)\">\n {{ option.label }}\n </button>\n }\n </div>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-segmented-control{display:grid;grid-template-columns:repeat(var(--loro-segmented-count, 2),minmax(0,1fr));min-height:3.15rem;padding:.18rem;border:1px solid var(--loro-border-subtle);border-radius:.75rem;background:var(--loro-surface-muted);box-shadow:var(--loro-shadow-soft)}.loro-segmented-control__button{border:0;border-radius:.58rem;background:transparent;color:var(--loro-muted-strong);font:inherit;font-size:clamp(.95rem,3vw,1rem);font-weight:850;line-height:1.15;text-wrap:balance;cursor:pointer}.loro-segmented-control__button--active{background:var(--loro-surface);color:var(--loro-primary-700);box-shadow:0 6px 18px #22194914}@media(max-width:640px){.loro-segmented-control{min-height:3rem}.loro-segmented-control__button{padding-inline:.6rem}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4221
2709
|
}
|
|
4222
2710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroSegmentedControl, decorators: [{
|
|
4223
2711
|
type: Component,
|
|
4224
|
-
args: [{ selector: 'loro-segmented-control', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4225
|
-
<div class="loro-segmented-control" role="tablist">
|
|
4226
|
-
@for (option of options(); track option.value) {
|
|
4227
|
-
<button
|
|
4228
|
-
type="button"
|
|
4229
|
-
role="tab"
|
|
4230
|
-
[attr.aria-selected]="value() === option.value"
|
|
4231
|
-
[class.loro-segmented-control__button--active]="value() === option.value"
|
|
4232
|
-
class="loro-segmented-control__button"
|
|
4233
|
-
[disabled]="disabled() || readonly()"
|
|
4234
|
-
(click)="selectValue(option.value)">
|
|
4235
|
-
{{ option.label }}
|
|
4236
|
-
</button>
|
|
4237
|
-
}
|
|
4238
|
-
</div>
|
|
4239
|
-
`, host: {
|
|
2712
|
+
args: [{ selector: 'loro-segmented-control', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4240
2713
|
'[style.--loro-segmented-count]': 'options().length'
|
|
4241
|
-
}, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-segmented-control{display:grid;grid-template-columns:repeat(var(--loro-segmented-count, 2),minmax(0,1fr));min-height:3.15rem;padding:.18rem;border:1px solid var(--loro-border-subtle);border-radius:.75rem;background:var(--loro-surface-muted);box-shadow:var(--loro-shadow-soft)}.loro-segmented-control__button{border:0;border-radius:.58rem;background:transparent;color:var(--loro-muted-strong);font:inherit;font-size:clamp(.95rem,3vw,1rem);font-weight:850;line-height:1.15;text-wrap:balance;cursor:pointer}.loro-segmented-control__button--active{background:var(--loro-surface);color:var(--loro-primary-700);box-shadow:0 6px 18px #22194914}@media(max-width:640px){.loro-segmented-control{min-height:3rem}.loro-segmented-control__button{padding-inline:.6rem}}\n"] }]
|
|
2714
|
+
}, template: "<div class=\"loro-segmented-control\" role=\"tablist\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n role=\"tab\"\n [attr.aria-selected]=\"value() === option.value\"\n [class.loro-segmented-control__button--active]=\"value() === option.value\"\n class=\"loro-segmented-control__button\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"selectValue(option.value)\">\n {{ option.label }}\n </button>\n }\n </div>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-segmented-control{display:grid;grid-template-columns:repeat(var(--loro-segmented-count, 2),minmax(0,1fr));min-height:3.15rem;padding:.18rem;border:1px solid var(--loro-border-subtle);border-radius:.75rem;background:var(--loro-surface-muted);box-shadow:var(--loro-shadow-soft)}.loro-segmented-control__button{border:0;border-radius:.58rem;background:transparent;color:var(--loro-muted-strong);font:inherit;font-size:clamp(.95rem,3vw,1rem);font-weight:850;line-height:1.15;text-wrap:balance;cursor:pointer}.loro-segmented-control__button--active{background:var(--loro-surface);color:var(--loro-primary-700);box-shadow:0 6px 18px #22194914}@media(max-width:640px){.loro-segmented-control{min-height:3rem}.loro-segmented-control__button{padding-inline:.6rem}}\n"] }]
|
|
4242
2715
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
4243
2716
|
|
|
4244
2717
|
class LoroSelect {
|
|
@@ -4252,49 +2725,11 @@ class LoroSelect {
|
|
|
4252
2725
|
actionLabel = input('', ...(ngDevMode ? [{ debugName: "actionLabel" }] : /* istanbul ignore next */ []));
|
|
4253
2726
|
action = output();
|
|
4254
2727
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4255
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroSelect, isStandalone: true, selector: "loro-select", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template:
|
|
4256
|
-
<article class="loro-select" [class.loro-select--selected]="selected()">
|
|
4257
|
-
<span class="loro-select__icon">
|
|
4258
|
-
<loro-icon [name]="icon()" [size]="44" [alt]="title()" color="primary-deep" />
|
|
4259
|
-
</span>
|
|
4260
|
-
<div class="loro-select__copy">
|
|
4261
|
-
<h3>{{ title() }} @if (badge()) {<loro-badge [label]="badge()" variant="info" />}</h3>
|
|
4262
|
-
<p>{{ subtitle() }}</p>
|
|
4263
|
-
<small>{{ meta() }}</small>
|
|
4264
|
-
</div>
|
|
4265
|
-
<div class="loro-select__side">
|
|
4266
|
-
@if (status()) {
|
|
4267
|
-
<span class="loro-select__status">{{ status() }}</span>
|
|
4268
|
-
}
|
|
4269
|
-
@if (actionLabel()) {
|
|
4270
|
-
<loro-button [label]="actionLabel()" variant="outline" (buttonClick)="action.emit()" />
|
|
4271
|
-
}
|
|
4272
|
-
</div>
|
|
4273
|
-
</article>
|
|
4274
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-select{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.25rem;padding:1rem;border-top:1px solid var(--loro-border-subtle);background:transparent}.loro-select--selected{border:1px solid rgba(108,60,255,.28);border-radius:1rem;background:#6c3cff0a}.loro-select__icon{display:grid;width:5.2rem;height:5.2rem;place-items:center;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-muted)}h3,p,small{margin:0}h3{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;color:var(--loro-text-strong);font-size:1.15rem;font-weight:900}p{margin-top:.35rem;color:var(--loro-muted-strong);font-weight:700}small,.loro-select__status{color:var(--loro-muted);font-weight:700}.loro-select__side{display:flex;align-items:center;justify-content:flex-end;gap:1rem}@media(max-width:680px){.loro-select{grid-template-columns:5rem minmax(0,1fr);border:1px solid var(--loro-border-subtle);border-radius:1rem}.loro-select__side{grid-column:2;justify-content:flex-start}}\n"], dependencies: [{ kind: "component", type: LoroBadge, selector: "loro-badge", inputs: ["label", "variant"] }, { kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2728
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroSelect, isStandalone: true, selector: "loro-select", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template: "<article class=\"loro-select\" [class.loro-select--selected]=\"selected()\">\n <span class=\"loro-select__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"44\" [alt]=\"title()\" color=\"primary-deep\" />\n </span>\n <div class=\"loro-select__copy\">\n <h3>{{ title() }} @if (badge()) {<loro-badge [label]=\"badge()\" variant=\"info\" />}</h3>\n <p>{{ subtitle() }}</p>\n <small>{{ meta() }}</small>\n </div>\n <div class=\"loro-select__side\">\n @if (status()) {\n <span class=\"loro-select__status\">{{ status() }}</span>\n }\n @if (actionLabel()) {\n <loro-button [label]=\"actionLabel()\" variant=\"outline\" (buttonClick)=\"action.emit()\" />\n }\n </div>\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-select{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.25rem;padding:1rem;border-top:1px solid var(--loro-border-subtle);background:transparent}.loro-select--selected{border:1px solid rgba(108,60,255,.28);border-radius:1rem;background:#6c3cff0a}.loro-select__icon{display:grid;width:5.2rem;height:5.2rem;place-items:center;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-muted)}h3,p,small{margin:0}h3{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;color:var(--loro-text-strong);font-size:1.15rem;font-weight:900}p{margin-top:.35rem;color:var(--loro-muted-strong);font-weight:700}small,.loro-select__status{color:var(--loro-muted);font-weight:700}.loro-select__side{display:flex;align-items:center;justify-content:flex-end;gap:1rem}@media(max-width:680px){.loro-select{grid-template-columns:5rem minmax(0,1fr);border:1px solid var(--loro-border-subtle);border-radius:1rem}.loro-select__side{grid-column:2;justify-content:flex-start}}\n"], dependencies: [{ kind: "component", type: LoroBadge, selector: "loro-badge", inputs: ["label", "variant"] }, { kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4275
2729
|
}
|
|
4276
2730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroSelect, decorators: [{
|
|
4277
2731
|
type: Component,
|
|
4278
|
-
args: [{ selector: 'loro-select', standalone: true, imports: [LoroBadge, LoroButton, LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4279
|
-
<article class="loro-select" [class.loro-select--selected]="selected()">
|
|
4280
|
-
<span class="loro-select__icon">
|
|
4281
|
-
<loro-icon [name]="icon()" [size]="44" [alt]="title()" color="primary-deep" />
|
|
4282
|
-
</span>
|
|
4283
|
-
<div class="loro-select__copy">
|
|
4284
|
-
<h3>{{ title() }} @if (badge()) {<loro-badge [label]="badge()" variant="info" />}</h3>
|
|
4285
|
-
<p>{{ subtitle() }}</p>
|
|
4286
|
-
<small>{{ meta() }}</small>
|
|
4287
|
-
</div>
|
|
4288
|
-
<div class="loro-select__side">
|
|
4289
|
-
@if (status()) {
|
|
4290
|
-
<span class="loro-select__status">{{ status() }}</span>
|
|
4291
|
-
}
|
|
4292
|
-
@if (actionLabel()) {
|
|
4293
|
-
<loro-button [label]="actionLabel()" variant="outline" (buttonClick)="action.emit()" />
|
|
4294
|
-
}
|
|
4295
|
-
</div>
|
|
4296
|
-
</article>
|
|
4297
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-select{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.25rem;padding:1rem;border-top:1px solid var(--loro-border-subtle);background:transparent}.loro-select--selected{border:1px solid rgba(108,60,255,.28);border-radius:1rem;background:#6c3cff0a}.loro-select__icon{display:grid;width:5.2rem;height:5.2rem;place-items:center;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-muted)}h3,p,small{margin:0}h3{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;color:var(--loro-text-strong);font-size:1.15rem;font-weight:900}p{margin-top:.35rem;color:var(--loro-muted-strong);font-weight:700}small,.loro-select__status{color:var(--loro-muted);font-weight:700}.loro-select__side{display:flex;align-items:center;justify-content:flex-end;gap:1rem}@media(max-width:680px){.loro-select{grid-template-columns:5rem minmax(0,1fr);border:1px solid var(--loro-border-subtle);border-radius:1rem}.loro-select__side{grid-column:2;justify-content:flex-start}}\n"] }]
|
|
2732
|
+
args: [{ selector: 'loro-select', standalone: true, imports: [LoroBadge, LoroButton, LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<article class=\"loro-select\" [class.loro-select--selected]=\"selected()\">\n <span class=\"loro-select__icon\">\n <loro-icon [name]=\"icon()\" [size]=\"44\" [alt]=\"title()\" color=\"primary-deep\" />\n </span>\n <div class=\"loro-select__copy\">\n <h3>{{ title() }} @if (badge()) {<loro-badge [label]=\"badge()\" variant=\"info\" />}</h3>\n <p>{{ subtitle() }}</p>\n <small>{{ meta() }}</small>\n </div>\n <div class=\"loro-select__side\">\n @if (status()) {\n <span class=\"loro-select__status\">{{ status() }}</span>\n }\n @if (actionLabel()) {\n <loro-button [label]=\"actionLabel()\" variant=\"outline\" (buttonClick)=\"action.emit()\" />\n }\n </div>\n </article>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-select{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.25rem;padding:1rem;border-top:1px solid var(--loro-border-subtle);background:transparent}.loro-select--selected{border:1px solid rgba(108,60,255,.28);border-radius:1rem;background:#6c3cff0a}.loro-select__icon{display:grid;width:5.2rem;height:5.2rem;place-items:center;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface-muted)}h3,p,small{margin:0}h3{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;color:var(--loro-text-strong);font-size:1.15rem;font-weight:900}p{margin-top:.35rem;color:var(--loro-muted-strong);font-weight:700}small,.loro-select__status{color:var(--loro-muted);font-weight:700}.loro-select__side{display:flex;align-items:center;justify-content:flex-end;gap:1rem}@media(max-width:680px){.loro-select{grid-template-columns:5rem minmax(0,1fr);border:1px solid var(--loro-border-subtle);border-radius:1rem}.loro-select__side{grid-column:2;justify-content:flex-start}}\n"] }]
|
|
4298
2733
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
4299
2734
|
|
|
4300
2735
|
function optionalNumberAttribute(value) {
|
|
@@ -4324,51 +2759,11 @@ class LoroTextArea {
|
|
|
4324
2759
|
this.touched.set(true);
|
|
4325
2760
|
}
|
|
4326
2761
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroTextArea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4327
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroTextArea, isStandalone: true, selector: "loro-text-area", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, ngImport: i0, template:
|
|
4328
|
-
<label class="loro-text-area">
|
|
4329
|
-
@if (label()) {
|
|
4330
|
-
<span class="loro-text-area__label">{{ label() }}</span>
|
|
4331
|
-
}
|
|
4332
|
-
<span class="loro-text-area__control">
|
|
4333
|
-
<textarea
|
|
4334
|
-
[placeholder]="placeholder()"
|
|
4335
|
-
[value]="value()"
|
|
4336
|
-
[disabled]="disabled()"
|
|
4337
|
-
[readonly]="readonly()"
|
|
4338
|
-
[required]="required()"
|
|
4339
|
-
[attr.maxlength]="maxLength()"
|
|
4340
|
-
(input)="updateValue(($any($event.target).value ?? '').toString())"
|
|
4341
|
-
(blur)="markAsTouched()"></textarea>
|
|
4342
|
-
@if (maxLength()) {
|
|
4343
|
-
<span class="loro-text-area__counter">{{ value().length }}/{{ maxLength() }}</span>
|
|
4344
|
-
}
|
|
4345
|
-
</span>
|
|
4346
|
-
</label>
|
|
4347
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-text-area{display:grid;gap:.55rem}.loro-text-area__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-text-area__control{display:grid;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface);overflow:hidden}textarea{width:100%;min-height:8rem;resize:vertical;border:0;outline:0;padding:1rem;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:650}textarea::placeholder{color:var(--loro-muted)}.loro-text-area__counter{justify-self:end;padding:0 1rem .75rem;color:var(--loro-muted);font-size:.85rem;font-weight:700}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2762
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroTextArea, isStandalone: true, selector: "loro-text-area", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", valueChange: "valueChange" }, ngImport: i0, template: "<label class=\"loro-text-area\">\n @if (label()) {\n <span class=\"loro-text-area__label\">{{ label() }}</span>\n }\n <span class=\"loro-text-area__control\">\n <textarea\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.maxlength]=\"maxLength()\"\n (input)=\"updateValue(($any($event.target).value ?? '').toString())\"\n (blur)=\"markAsTouched()\"></textarea>\n @if (maxLength()) {\n <span class=\"loro-text-area__counter\">{{ value().length }}/{{ maxLength() }}</span>\n }\n </span>\n </label>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-text-area{display:grid;gap:.55rem}.loro-text-area__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-text-area__control{display:grid;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface);overflow:hidden}textarea{width:100%;min-height:8rem;resize:vertical;border:0;outline:0;padding:1rem;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:650}textarea::placeholder{color:var(--loro-muted)}.loro-text-area__counter{justify-self:end;padding:0 1rem .75rem;color:var(--loro-muted);font-size:.85rem;font-weight:700}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4348
2763
|
}
|
|
4349
2764
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroTextArea, decorators: [{
|
|
4350
2765
|
type: Component,
|
|
4351
|
-
args: [{ selector: 'loro-text-area', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4352
|
-
<label class="loro-text-area">
|
|
4353
|
-
@if (label()) {
|
|
4354
|
-
<span class="loro-text-area__label">{{ label() }}</span>
|
|
4355
|
-
}
|
|
4356
|
-
<span class="loro-text-area__control">
|
|
4357
|
-
<textarea
|
|
4358
|
-
[placeholder]="placeholder()"
|
|
4359
|
-
[value]="value()"
|
|
4360
|
-
[disabled]="disabled()"
|
|
4361
|
-
[readonly]="readonly()"
|
|
4362
|
-
[required]="required()"
|
|
4363
|
-
[attr.maxlength]="maxLength()"
|
|
4364
|
-
(input)="updateValue(($any($event.target).value ?? '').toString())"
|
|
4365
|
-
(blur)="markAsTouched()"></textarea>
|
|
4366
|
-
@if (maxLength()) {
|
|
4367
|
-
<span class="loro-text-area__counter">{{ value().length }}/{{ maxLength() }}</span>
|
|
4368
|
-
}
|
|
4369
|
-
</span>
|
|
4370
|
-
</label>
|
|
4371
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-text-area{display:grid;gap:.55rem}.loro-text-area__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-text-area__control{display:grid;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface);overflow:hidden}textarea{width:100%;min-height:8rem;resize:vertical;border:0;outline:0;padding:1rem;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:650}textarea::placeholder{color:var(--loro-muted)}.loro-text-area__counter{justify-self:end;padding:0 1rem .75rem;color:var(--loro-muted);font-size:.85rem;font-weight:700}\n"] }]
|
|
2766
|
+
args: [{ selector: 'loro-text-area', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"loro-text-area\">\n @if (label()) {\n <span class=\"loro-text-area__label\">{{ label() }}</span>\n }\n <span class=\"loro-text-area__control\">\n <textarea\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.maxlength]=\"maxLength()\"\n (input)=\"updateValue(($any($event.target).value ?? '').toString())\"\n (blur)=\"markAsTouched()\"></textarea>\n @if (maxLength()) {\n <span class=\"loro-text-area__counter\">{{ value().length }}/{{ maxLength() }}</span>\n }\n </span>\n </label>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-text-area{display:grid;gap:.55rem}.loro-text-area__label{color:var(--loro-muted-strong);font-size:.95rem;font-weight:800}.loro-text-area__control{display:grid;border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-input);background:var(--loro-surface);overflow:hidden}textarea{width:100%;min-height:8rem;resize:vertical;border:0;outline:0;padding:1rem;background:transparent;color:var(--loro-text-strong);font:inherit;font-weight:650}textarea::placeholder{color:var(--loro-muted)}.loro-text-area__counter{justify-self:end;padding:0 1rem .75rem;color:var(--loro-muted);font-size:.85rem;font-weight:700}\n"] }]
|
|
4372
2767
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
4373
2768
|
|
|
4374
2769
|
class LoroUpload {
|
|
@@ -4380,49 +2775,11 @@ class LoroUpload {
|
|
|
4380
2775
|
compact = input(false, ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
|
|
4381
2776
|
fileSelected = output();
|
|
4382
2777
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroUpload, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4383
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroUpload, isStandalone: true, selector: "loro-upload", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileSelected: "fileSelected" }, ngImport: i0, template:
|
|
4384
|
-
<label class="loro-upload" [class.loro-upload--compact]="compact()">
|
|
4385
|
-
@if (label()) {
|
|
4386
|
-
<span class="loro-upload__label">{{ label() }} @if (optional()) {<small>Opcional</small>}</span>
|
|
4387
|
-
}
|
|
4388
|
-
<span class="loro-upload__drop">
|
|
4389
|
-
<loro-icon name="paperclip" [size]="28" alt="Adjuntar archivo" color="primary" />
|
|
4390
|
-
<span class="loro-upload__copy">
|
|
4391
|
-
<span>{{ title() }}</span>
|
|
4392
|
-
@if (description()) {
|
|
4393
|
-
<small>{{ description() }}</small>
|
|
4394
|
-
}
|
|
4395
|
-
</span>
|
|
4396
|
-
@if (compact()) {
|
|
4397
|
-
<loro-icon name="chevron-right" [size]="22" alt="Seleccionar" color="primary" />
|
|
4398
|
-
}
|
|
4399
|
-
<input type="file" [accept]="accept()" (change)="fileSelected.emit($any($event.target).files?.[0] ?? null)" />
|
|
4400
|
-
</span>
|
|
4401
|
-
</label>
|
|
4402
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-upload{display:grid;gap:.7rem}.loro-upload__label{display:flex;gap:.75rem;color:var(--loro-text-strong);font-weight:900}.loro-upload__label small{color:var(--loro-muted);font-weight:700}.loro-upload__drop{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;min-height:4.4rem;padding:1rem;border:1px dashed var(--loro-border-strong);border-radius:var(--loro-radius-input);background:var(--loro-surface);color:var(--loro-muted-strong);cursor:pointer}.loro-upload--compact .loro-upload__drop{grid-template-columns:auto minmax(0,1fr) auto;border-style:solid}.loro-upload__copy{display:grid;gap:.15rem;font-weight:800;line-height:1.25}.loro-upload__copy small{color:var(--loro-muted);font-weight:650}input{position:absolute;inset:0;opacity:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2778
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroUpload, isStandalone: true, selector: "loro-upload", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileSelected: "fileSelected" }, ngImport: i0, template: "<label class=\"loro-upload\" [class.loro-upload--compact]=\"compact()\">\n @if (label()) {\n <span class=\"loro-upload__label\">{{ label() }} @if (optional()) {<small>Opcional</small>}</span>\n }\n <span class=\"loro-upload__drop\">\n <loro-icon name=\"paperclip\" [size]=\"28\" alt=\"Adjuntar archivo\" color=\"primary\" />\n <span class=\"loro-upload__copy\">\n <span>{{ title() }}</span>\n @if (description()) {\n <small>{{ description() }}</small>\n }\n </span>\n @if (compact()) {\n <loro-icon name=\"chevron-right\" [size]=\"22\" alt=\"Seleccionar\" color=\"primary\" />\n }\n <input type=\"file\" [accept]=\"accept()\" (change)=\"fileSelected.emit($any($event.target).files?.[0] ?? null)\" />\n </span>\n </label>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-upload{display:grid;gap:.7rem}.loro-upload__label{display:flex;gap:.75rem;color:var(--loro-text-strong);font-weight:900}.loro-upload__label small{color:var(--loro-muted);font-weight:700}.loro-upload__drop{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;min-height:4.4rem;padding:1rem;border:1px dashed var(--loro-border-strong);border-radius:var(--loro-radius-input);background:var(--loro-surface);color:var(--loro-muted-strong);cursor:pointer}.loro-upload--compact .loro-upload__drop{grid-template-columns:auto minmax(0,1fr) auto;border-style:solid}.loro-upload__copy{display:grid;gap:.15rem;font-weight:800;line-height:1.25}.loro-upload__copy small{color:var(--loro-muted);font-weight:650}input{position:absolute;inset:0;opacity:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4403
2779
|
}
|
|
4404
2780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroUpload, decorators: [{
|
|
4405
2781
|
type: Component,
|
|
4406
|
-
args: [{ selector: 'loro-upload', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4407
|
-
<label class="loro-upload" [class.loro-upload--compact]="compact()">
|
|
4408
|
-
@if (label()) {
|
|
4409
|
-
<span class="loro-upload__label">{{ label() }} @if (optional()) {<small>Opcional</small>}</span>
|
|
4410
|
-
}
|
|
4411
|
-
<span class="loro-upload__drop">
|
|
4412
|
-
<loro-icon name="paperclip" [size]="28" alt="Adjuntar archivo" color="primary" />
|
|
4413
|
-
<span class="loro-upload__copy">
|
|
4414
|
-
<span>{{ title() }}</span>
|
|
4415
|
-
@if (description()) {
|
|
4416
|
-
<small>{{ description() }}</small>
|
|
4417
|
-
}
|
|
4418
|
-
</span>
|
|
4419
|
-
@if (compact()) {
|
|
4420
|
-
<loro-icon name="chevron-right" [size]="22" alt="Seleccionar" color="primary" />
|
|
4421
|
-
}
|
|
4422
|
-
<input type="file" [accept]="accept()" (change)="fileSelected.emit($any($event.target).files?.[0] ?? null)" />
|
|
4423
|
-
</span>
|
|
4424
|
-
</label>
|
|
4425
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-upload{display:grid;gap:.7rem}.loro-upload__label{display:flex;gap:.75rem;color:var(--loro-text-strong);font-weight:900}.loro-upload__label small{color:var(--loro-muted);font-weight:700}.loro-upload__drop{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;min-height:4.4rem;padding:1rem;border:1px dashed var(--loro-border-strong);border-radius:var(--loro-radius-input);background:var(--loro-surface);color:var(--loro-muted-strong);cursor:pointer}.loro-upload--compact .loro-upload__drop{grid-template-columns:auto minmax(0,1fr) auto;border-style:solid}.loro-upload__copy{display:grid;gap:.15rem;font-weight:800;line-height:1.25}.loro-upload__copy small{color:var(--loro-muted);font-weight:650}input{position:absolute;inset:0;opacity:0;cursor:pointer}\n"] }]
|
|
2782
|
+
args: [{ selector: 'loro-upload', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"loro-upload\" [class.loro-upload--compact]=\"compact()\">\n @if (label()) {\n <span class=\"loro-upload__label\">{{ label() }} @if (optional()) {<small>Opcional</small>}</span>\n }\n <span class=\"loro-upload__drop\">\n <loro-icon name=\"paperclip\" [size]=\"28\" alt=\"Adjuntar archivo\" color=\"primary\" />\n <span class=\"loro-upload__copy\">\n <span>{{ title() }}</span>\n @if (description()) {\n <small>{{ description() }}</small>\n }\n </span>\n @if (compact()) {\n <loro-icon name=\"chevron-right\" [size]=\"22\" alt=\"Seleccionar\" color=\"primary\" />\n }\n <input type=\"file\" [accept]=\"accept()\" (change)=\"fileSelected.emit($any($event.target).files?.[0] ?? null)\" />\n </span>\n </label>", styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-upload{display:grid;gap:.7rem}.loro-upload__label{display:flex;gap:.75rem;color:var(--loro-text-strong);font-weight:900}.loro-upload__label small{color:var(--loro-muted);font-weight:700}.loro-upload__drop{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.85rem;min-height:4.4rem;padding:1rem;border:1px dashed var(--loro-border-strong);border-radius:var(--loro-radius-input);background:var(--loro-surface);color:var(--loro-muted-strong);cursor:pointer}.loro-upload--compact .loro-upload__drop{grid-template-columns:auto minmax(0,1fr) auto;border-style:solid}.loro-upload__copy{display:grid;gap:.15rem;font-weight:800;line-height:1.25}.loro-upload__copy small{color:var(--loro-muted);font-weight:650}input{position:absolute;inset:0;opacity:0;cursor:pointer}\n"] }]
|
|
4426
2783
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], fileSelected: [{ type: i0.Output, args: ["fileSelected"] }] } });
|
|
4427
2784
|
|
|
4428
2785
|
class LoroModal {
|
|
@@ -4578,124 +2935,16 @@ class LoroModal {
|
|
|
4578
2935
|
return touch.clientY - dialogTop <= 52;
|
|
4579
2936
|
}
|
|
4580
2937
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4581
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroModal, isStandalone: true, selector: "loro-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, sheetDragToClose: { classPropertyName: "sheetDragToClose", publicName: "sheetDragToClose", isSignal: true, isRequired: false, transformFunction: null }, sheetRestTop: { classPropertyName: "sheetRestTop", publicName: "sheetRestTop", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modalClose: "modalClose" }, ngImport: i0, template:
|
|
4582
|
-
@if (open()) {
|
|
4583
|
-
<div class="loro-modal" [class]="'loro-modal loro-modal--' + placement()" role="presentation">
|
|
4584
|
-
@if (showBackdrop()) {
|
|
4585
|
-
<button
|
|
4586
|
-
type="button"
|
|
4587
|
-
class="loro-modal__backdrop"
|
|
4588
|
-
aria-label="Close modal"
|
|
4589
|
-
[style.opacity]="backdropOpacity()"
|
|
4590
|
-
(click)="closeOnBackdrop() && requestClose()"></button>
|
|
4591
|
-
}
|
|
4592
|
-
<section
|
|
4593
|
-
#dialog
|
|
4594
|
-
class="loro-modal__dialog"
|
|
4595
|
-
[class]="'loro-modal__dialog loro-modal__dialog--' + size()"
|
|
4596
|
-
[class.loro-modal__dialog--dragging]="sheetDragging()"
|
|
4597
|
-
[style.--loro-modal-sheet-drag-y]="sheetDragOffsetCss()"
|
|
4598
|
-
[style.--loro-modal-sheet-rest-top]="sheetRestTop() || sheetRestTopCss()"
|
|
4599
|
-
role="dialog"
|
|
4600
|
-
aria-modal="true"
|
|
4601
|
-
[attr.aria-label]="ariaLabel() || title()"
|
|
4602
|
-
(touchstart)="onSheetTouchStart($event, dialog)"
|
|
4603
|
-
(touchmove)="onSheetTouchMove($event)"
|
|
4604
|
-
(touchend)="onSheetTouchEnd()"
|
|
4605
|
-
(touchcancel)="onSheetTouchEnd()">
|
|
4606
|
-
@if (title() || dismissible()) {
|
|
4607
|
-
<header class="loro-modal__header">
|
|
4608
|
-
@if (title()) {
|
|
4609
|
-
<h2>{{ title() }}</h2>
|
|
4610
|
-
}
|
|
4611
|
-
@if (dismissible()) {
|
|
4612
|
-
<button
|
|
4613
|
-
type="button"
|
|
4614
|
-
class="loro-modal__close"
|
|
4615
|
-
aria-label="Cerrar modal"
|
|
4616
|
-
(pointerdown)="$event.stopPropagation()"
|
|
4617
|
-
(touchstart)="$event.stopPropagation()"
|
|
4618
|
-
(click)="onCloseClick($event)">
|
|
4619
|
-
X
|
|
4620
|
-
</button>
|
|
4621
|
-
}
|
|
4622
|
-
</header>
|
|
4623
|
-
}
|
|
4624
|
-
|
|
4625
|
-
<div
|
|
4626
|
-
class="loro-modal__content"
|
|
4627
|
-
[class.loro-modal__content--flush]="placement() === 'sheet' && !title()">
|
|
4628
|
-
<ng-content />
|
|
4629
|
-
</div>
|
|
4630
|
-
|
|
4631
|
-
<ng-content select="[loro-modal-actions]" />
|
|
4632
|
-
</section>
|
|
4633
|
-
</div>
|
|
4634
|
-
}
|
|
4635
|
-
`, isInline: true, styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem));overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;inset:auto 0 0;width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)));grid-template-rows:auto minmax(0,auto) auto;background:var(--loro-surface);overscroll-behavior-y:contain;transform:translate3d(0,var(--loro-modal-sheet-drag-y, 0px),0)}.loro-modal--sheet .loro-modal__dialog--dragging{transition:none}.loro-modal--sheet .loro-modal__content{display:block;height:auto;min-height:0;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)) - 4rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:.85rem;background:var(--loro-surface);touch-action:pan-y}.loro-modal--sheet .loro-modal__content--flush{padding:0}.loro-modal--center{align-items:center;padding:1rem}.loro-modal--center .loro-modal__dialog{border-radius:1.15rem}::ng-deep [loro-modal-actions]{flex-direction:column-reverse;padding:.7rem .9rem max(.85rem,env(safe-area-inset-bottom,0px));background:var(--loro-surface)}}@media(min-width:1024px){.loro-modal{place-items:center;padding:2rem}.loro-modal__backdrop{background:#070a129e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.loro-modal--center .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog{position:relative;inset:auto;max-height:min(46rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 4rem));border-radius:1.5rem}.loro-modal__dialog--sm{width:min(100%,28rem)}.loro-modal__dialog--md{width:min(100%,36rem)}.loro-modal__dialog--lg{width:min(100%,60rem)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2938
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroModal, isStandalone: true, selector: "loro-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, sheetDragToClose: { classPropertyName: "sheetDragToClose", publicName: "sheetDragToClose", isSignal: true, isRequired: false, transformFunction: null }, sheetRestTop: { classPropertyName: "sheetRestTop", publicName: "sheetRestTop", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modalClose: "modalClose" }, ngImport: i0, template: "@if (open()) {\n <div class=\"loro-modal\" [class]=\"'loro-modal loro-modal--' + placement()\" role=\"presentation\">\n @if (showBackdrop()) {\n <button\n type=\"button\"\n class=\"loro-modal__backdrop\"\n aria-label=\"Close modal\"\n [style.opacity]=\"backdropOpacity()\"\n (click)=\"closeOnBackdrop() && requestClose()\"></button>\n }\n <section\n #dialog\n class=\"loro-modal__dialog\"\n [class]=\"'loro-modal__dialog loro-modal__dialog--' + size()\"\n [class.loro-modal__dialog--dragging]=\"sheetDragging()\"\n [style.--loro-modal-sheet-drag-y]=\"sheetDragOffsetCss()\"\n [style.--loro-modal-sheet-rest-top]=\"sheetRestTop() || sheetRestTopCss()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"ariaLabel() || title()\"\n (touchstart)=\"onSheetTouchStart($event, dialog)\"\n (touchmove)=\"onSheetTouchMove($event)\"\n (touchend)=\"onSheetTouchEnd()\"\n (touchcancel)=\"onSheetTouchEnd()\">\n @if (title() || dismissible()) {\n <header class=\"loro-modal__header\">\n @if (title()) {\n <h2>{{ title() }}</h2>\n }\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"loro-modal__close\"\n aria-label=\"Cerrar modal\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n X\n </button>\n }\n </header>\n }\n\n <div\n class=\"loro-modal__content\"\n [class.loro-modal__content--flush]=\"placement() === 'sheet' && !title()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[loro-modal-actions]\" />\n </section>\n </div>\n }", styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem);overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;inset:auto 0 0;width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),env(safe-area-inset-top,0px) + .65rem));grid-template-rows:auto minmax(0,auto) auto;background:var(--loro-surface);overscroll-behavior-y:contain;transform:translate3d(0,var(--loro-modal-sheet-drag-y, 0px),0)}.loro-modal--sheet .loro-modal__dialog--dragging{transition:none}.loro-modal--sheet .loro-modal__content{display:block;height:auto;min-height:0;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),env(safe-area-inset-top,0px) + .65rem) - 4rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:.85rem;background:var(--loro-surface);touch-action:pan-y}.loro-modal--sheet .loro-modal__content--flush{padding:0}.loro-modal--center{align-items:center;padding:1rem}.loro-modal--center .loro-modal__dialog{border-radius:1.15rem}::ng-deep [loro-modal-actions]{flex-direction:column-reverse;padding:.7rem .9rem max(.85rem,env(safe-area-inset-bottom,0px));background:var(--loro-surface)}}@media(min-width:1024px){.loro-modal{place-items:center;padding:2rem}.loro-modal__backdrop{background:#070a129e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.loro-modal--center .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog{position:relative;inset:auto;max-height:min(46rem,var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 4rem);border-radius:1.5rem}.loro-modal__dialog--sm{width:min(100%,28rem)}.loro-modal__dialog--md{width:min(100%,36rem)}.loro-modal__dialog--lg{width:min(100%,60rem)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4636
2939
|
}
|
|
4637
2940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroModal, decorators: [{
|
|
4638
2941
|
type: Component,
|
|
4639
|
-
args: [{ selector: 'loro-modal', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template:
|
|
4640
|
-
@if (open()) {
|
|
4641
|
-
<div class="loro-modal" [class]="'loro-modal loro-modal--' + placement()" role="presentation">
|
|
4642
|
-
@if (showBackdrop()) {
|
|
4643
|
-
<button
|
|
4644
|
-
type="button"
|
|
4645
|
-
class="loro-modal__backdrop"
|
|
4646
|
-
aria-label="Close modal"
|
|
4647
|
-
[style.opacity]="backdropOpacity()"
|
|
4648
|
-
(click)="closeOnBackdrop() && requestClose()"></button>
|
|
4649
|
-
}
|
|
4650
|
-
<section
|
|
4651
|
-
#dialog
|
|
4652
|
-
class="loro-modal__dialog"
|
|
4653
|
-
[class]="'loro-modal__dialog loro-modal__dialog--' + size()"
|
|
4654
|
-
[class.loro-modal__dialog--dragging]="sheetDragging()"
|
|
4655
|
-
[style.--loro-modal-sheet-drag-y]="sheetDragOffsetCss()"
|
|
4656
|
-
[style.--loro-modal-sheet-rest-top]="sheetRestTop() || sheetRestTopCss()"
|
|
4657
|
-
role="dialog"
|
|
4658
|
-
aria-modal="true"
|
|
4659
|
-
[attr.aria-label]="ariaLabel() || title()"
|
|
4660
|
-
(touchstart)="onSheetTouchStart($event, dialog)"
|
|
4661
|
-
(touchmove)="onSheetTouchMove($event)"
|
|
4662
|
-
(touchend)="onSheetTouchEnd()"
|
|
4663
|
-
(touchcancel)="onSheetTouchEnd()">
|
|
4664
|
-
@if (title() || dismissible()) {
|
|
4665
|
-
<header class="loro-modal__header">
|
|
4666
|
-
@if (title()) {
|
|
4667
|
-
<h2>{{ title() }}</h2>
|
|
4668
|
-
}
|
|
4669
|
-
@if (dismissible()) {
|
|
4670
|
-
<button
|
|
4671
|
-
type="button"
|
|
4672
|
-
class="loro-modal__close"
|
|
4673
|
-
aria-label="Cerrar modal"
|
|
4674
|
-
(pointerdown)="$event.stopPropagation()"
|
|
4675
|
-
(touchstart)="$event.stopPropagation()"
|
|
4676
|
-
(click)="onCloseClick($event)">
|
|
4677
|
-
X
|
|
4678
|
-
</button>
|
|
4679
|
-
}
|
|
4680
|
-
</header>
|
|
4681
|
-
}
|
|
4682
|
-
|
|
4683
|
-
<div
|
|
4684
|
-
class="loro-modal__content"
|
|
4685
|
-
[class.loro-modal__content--flush]="placement() === 'sheet' && !title()">
|
|
4686
|
-
<ng-content />
|
|
4687
|
-
</div>
|
|
4688
|
-
|
|
4689
|
-
<ng-content select="[loro-modal-actions]" />
|
|
4690
|
-
</section>
|
|
4691
|
-
</div>
|
|
4692
|
-
}
|
|
4693
|
-
`, styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem));overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;inset:auto 0 0;width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)));grid-template-rows:auto minmax(0,auto) auto;background:var(--loro-surface);overscroll-behavior-y:contain;transform:translate3d(0,var(--loro-modal-sheet-drag-y, 0px),0)}.loro-modal--sheet .loro-modal__dialog--dragging{transition:none}.loro-modal--sheet .loro-modal__content{display:block;height:auto;min-height:0;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)) - 4rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:.85rem;background:var(--loro-surface);touch-action:pan-y}.loro-modal--sheet .loro-modal__content--flush{padding:0}.loro-modal--center{align-items:center;padding:1rem}.loro-modal--center .loro-modal__dialog{border-radius:1.15rem}::ng-deep [loro-modal-actions]{flex-direction:column-reverse;padding:.7rem .9rem max(.85rem,env(safe-area-inset-bottom,0px));background:var(--loro-surface)}}@media(min-width:1024px){.loro-modal{place-items:center;padding:2rem}.loro-modal__backdrop{background:#070a129e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.loro-modal--center .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog{position:relative;inset:auto;max-height:min(46rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 4rem));border-radius:1.5rem}.loro-modal__dialog--sm{width:min(100%,28rem)}.loro-modal__dialog--md{width:min(100%,36rem)}.loro-modal__dialog--lg{width:min(100%,60rem)}}\n"] }]
|
|
2942
|
+
args: [{ selector: 'loro-modal', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (open()) {\n <div class=\"loro-modal\" [class]=\"'loro-modal loro-modal--' + placement()\" role=\"presentation\">\n @if (showBackdrop()) {\n <button\n type=\"button\"\n class=\"loro-modal__backdrop\"\n aria-label=\"Close modal\"\n [style.opacity]=\"backdropOpacity()\"\n (click)=\"closeOnBackdrop() && requestClose()\"></button>\n }\n <section\n #dialog\n class=\"loro-modal__dialog\"\n [class]=\"'loro-modal__dialog loro-modal__dialog--' + size()\"\n [class.loro-modal__dialog--dragging]=\"sheetDragging()\"\n [style.--loro-modal-sheet-drag-y]=\"sheetDragOffsetCss()\"\n [style.--loro-modal-sheet-rest-top]=\"sheetRestTop() || sheetRestTopCss()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"ariaLabel() || title()\"\n (touchstart)=\"onSheetTouchStart($event, dialog)\"\n (touchmove)=\"onSheetTouchMove($event)\"\n (touchend)=\"onSheetTouchEnd()\"\n (touchcancel)=\"onSheetTouchEnd()\">\n @if (title() || dismissible()) {\n <header class=\"loro-modal__header\">\n @if (title()) {\n <h2>{{ title() }}</h2>\n }\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"loro-modal__close\"\n aria-label=\"Cerrar modal\"\n (pointerdown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n X\n </button>\n }\n </header>\n }\n\n <div\n class=\"loro-modal__content\"\n [class.loro-modal__content--flush]=\"placement() === 'sheet' && !title()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[loro-modal-actions]\" />\n </section>\n </div>\n }", styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem);overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;inset:auto 0 0;width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),env(safe-area-inset-top,0px) + .65rem));grid-template-rows:auto minmax(0,auto) auto;background:var(--loro-surface);overscroll-behavior-y:contain;transform:translate3d(0,var(--loro-modal-sheet-drag-y, 0px),0)}.loro-modal--sheet .loro-modal__dialog--dragging{transition:none}.loro-modal--sheet .loro-modal__content{display:block;height:auto;min-height:0;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),env(safe-area-inset-top,0px) + .65rem) - 4rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:.85rem;background:var(--loro-surface);touch-action:pan-y}.loro-modal--sheet .loro-modal__content--flush{padding:0}.loro-modal--center{align-items:center;padding:1rem}.loro-modal--center .loro-modal__dialog{border-radius:1.15rem}::ng-deep [loro-modal-actions]{flex-direction:column-reverse;padding:.7rem .9rem max(.85rem,env(safe-area-inset-bottom,0px));background:var(--loro-surface)}}@media(min-width:1024px){.loro-modal{place-items:center;padding:2rem}.loro-modal__backdrop{background:#070a129e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.loro-modal--center .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog{position:relative;inset:auto;max-height:min(46rem,var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 4rem);border-radius:1.5rem}.loro-modal__dialog--sm{width:min(100%,28rem)}.loro-modal__dialog--md{width:min(100%,36rem)}.loro-modal__dialog--lg{width:min(100%,60rem)}}\n"] }]
|
|
4694
2943
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], sheetDragToClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetDragToClose", required: false }] }], sheetRestTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetRestTop", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }] } });
|
|
4695
2944
|
|
|
4696
2945
|
/**
|
|
4697
2946
|
* Generated bundle index. Do not edit.
|
|
4698
2947
|
*/
|
|
4699
2948
|
|
|
4700
|
-
export { Footer, LORO_ICON_ASSETS, LORO_ICON_LEGACY_NAMES, LORO_ICON_PATHS, LORO_IMAGE_ASSETS, LORO_IMAGE_LEGACY_NAMES, LORO_IMAGE_PATHS, LoroAccordion, LoroAlert, LoroAppNav, LoroAssistantCard, LoroAuthField, LoroAuthSocialButton, LoroBadge, LoroButton, LoroCard, LoroCardNav, LoroCheckbox, LoroDashboardCard, LoroDivider, LoroDropdown, LoroFilterChip, LoroHapticsService, LoroIcon, LoroImage, LoroInput, LoroModal, LoroNotification, LoroNotificationPanel, LoroNotificationRow, LoroProductRow, LoroProductSection, LoroProfileCard, LoroProfileHero, LoroRadio, LoroSegmentedControl, LoroSelect, LoroSpinner, LoroStatCard, LoroStoreRankCard, LoroSummaryBar, LoroTab, LoroTextArea, LoroToast, LoroToggle, LoroUpload };
|
|
2949
|
+
export { Footer, LORO_BUTTON_CLASSES, LORO_BUTTON_COLORS, LORO_BUTTON_DEFAULTS, LORO_BUTTON_ICON_MODES, LORO_BUTTON_SIZES, LORO_BUTTON_TYPES, LORO_BUTTON_VARIANTS, LORO_ICON_ASSETS, LORO_ICON_LEGACY_NAMES, LORO_ICON_PATHS, LORO_IMAGE_ASSETS, LORO_IMAGE_LEGACY_NAMES, LORO_IMAGE_PATHS, LoroAccordion, LoroAlert, LoroAppNav, LoroAssistantCard, LoroAuthField, LoroAuthSocialButton, LoroBadge, LoroButton, LoroCard, LoroCardNav, LoroCheckbox, LoroDashboardCard, LoroDivider, LoroDropdown, LoroFilterChip, LoroHapticsService, LoroIcon, LoroImage, LoroInput, LoroModal, LoroNotification, LoroNotificationPanel, LoroNotificationRow, LoroProductRow, LoroProductSection, LoroProfileCard, LoroProfileHero, LoroRadio, LoroSegmentedControl, LoroSelect, LoroSpinner, LoroStatCard, LoroStoreRankCard, LoroSummaryBar, LoroTab, LoroTextArea, LoroToast, LoroToggle, LoroUpload };
|
|
4701
2950
|
//# sourceMappingURL=juligc99-loro-ui.mjs.map
|