ctt-babylon 0.27.10 → 0.27.11
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/esm2022/lib/components/core/babylon-language-modal/babylon-language-modal.component.mjs +20 -3
- package/fesm2022/ctt-babylon.mjs +19 -2
- package/fesm2022/ctt-babylon.mjs.map +1 -1
- package/lib/components/core/babylon-language-modal/babylon-language-modal.component.d.ts +8 -0
- package/package.json +1 -1
package/esm2022/lib/components/core/babylon-language-modal/babylon-language-modal.component.mjs
CHANGED
|
@@ -8,6 +8,23 @@ export class BabylonLanguageModalComponent {
|
|
|
8
8
|
this.languageSelect = new EventEmitter();
|
|
9
9
|
this.dialogRef = inject(MatDialogRef);
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Click en un idioma. Si el item trae `url` el enlace es un <a href> real
|
|
13
|
+
* (SEO); en click normal se evita la navegación nativa y se mantiene el
|
|
14
|
+
* flujo de siempre (languageSelect). Ctrl/Cmd/Shift/rueda → navegación nativa.
|
|
15
|
+
*/
|
|
16
|
+
onItemClick(event, language) {
|
|
17
|
+
if (language.url) {
|
|
18
|
+
if (event.ctrlKey ||
|
|
19
|
+
event.metaKey ||
|
|
20
|
+
event.shiftKey ||
|
|
21
|
+
event.button !== 0) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
}
|
|
26
|
+
this.selectLanguage(language);
|
|
27
|
+
}
|
|
11
28
|
selectLanguage(language) {
|
|
12
29
|
this.selected = language;
|
|
13
30
|
this.languageSelect.emit(language);
|
|
@@ -16,11 +33,11 @@ export class BabylonLanguageModalComponent {
|
|
|
16
33
|
this.dialogRef.close();
|
|
17
34
|
}
|
|
18
35
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BabylonLanguageModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BabylonLanguageModalComponent, isStandalone: true, selector: "lib-babylon-language-modal", inputs: { title: "title", subtitle: "subtitle", items: "items", selected: "selected", image: "image" }, outputs: { languageSelect: "languageSelect" }, ngImport: i0, template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"
|
|
36
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BabylonLanguageModalComponent, isStandalone: true, selector: "lib-babylon-language-modal", inputs: { title: "title", subtitle: "subtitle", items: "items", selected: "selected", image: "image" }, outputs: { languageSelect: "languageSelect" }, ngImport: i0, template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.href]=\"item.url || null\"\n [attr.hreflang]=\"item.url ? item.code : null\"\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"onItemClick($event, item)\"\n ><span class=\"line\"></span>{{ item.name\n }}<span class=\"icon babylon-arrow-right\"></span\n ></a>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".babylon-languages__close .babylon-plus svg{display:none}.babylon-languages{max-width:440px;max-height:100vh;overflow:auto;align-self:center;padding:50px 20px;width:100%;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.babylon-languages__wrapper{width:100%;height:100%;background-color:var(--cl_background_dark-opacity);position:relative}.babylon-languages .btn{opacity:1}.babylon-languages .btn:hover{opacity:.6}.babylon-languages__close{position:absolute;right:20px;top:20px;z-index:1}@media (min-width: 1025px){.babylon-languages__close{right:20px;top:20px}}.babylon-languages__close .babylon-plus:before{transform:rotate(-45deg)}.babylon-languages__header{width:100%;gap:15px;padding-bottom:65px}.babylon-languages h4,.babylon-languages .subtitle{color:var(--cl_title-light);font-weight:400;text-align:center}.babylon-languages .subtitle{font-family:var(--font-text);font-size:15px;font-weight:300}.babylon-languages__content{gap:20px;padding:0 20px}@media (min-width: 768px){.babylon-languages__content{gap:25px}}.babylon-languages__content a{width:100%;max-width:400px;height:60px;padding:19px 30px 14px 46px;background-color:var(--cl_title-light);position:relative;border-radius:5px;font-family:var(--font-title);font-size:18px;letter-spacing:.02em;font-weight:400;color:var(--cl_subtitle);text-decoration:none;cursor:pointer}.babylon-languages__content a:hover .icon{animation:move-right 2s infinite ease-in-out}.babylon-languages__content a .icon{display:none}.babylon-languages__content a:not(.babylon-languages__selected) .icon{display:initial;position:absolute;font-size:12px;right:30px;font-weight:700}.babylon-languages__content a .line{border-bottom:1px solid var(--cl_subtitle);width:13px;position:absolute;left:20.5px;top:50%;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
20
37
|
}
|
|
21
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BabylonLanguageModalComponent, decorators: [{
|
|
22
39
|
type: Component,
|
|
23
|
-
args: [{ selector: 'lib-babylon-language-modal', standalone: true, imports: [CommonModule], template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"
|
|
40
|
+
args: [{ selector: 'lib-babylon-language-modal', standalone: true, imports: [CommonModule], template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.href]=\"item.url || null\"\n [attr.hreflang]=\"item.url ? item.code : null\"\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"onItemClick($event, item)\"\n ><span class=\"line\"></span>{{ item.name\n }}<span class=\"icon babylon-arrow-right\"></span\n ></a>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".babylon-languages__close .babylon-plus svg{display:none}.babylon-languages{max-width:440px;max-height:100vh;overflow:auto;align-self:center;padding:50px 20px;width:100%;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.babylon-languages__wrapper{width:100%;height:100%;background-color:var(--cl_background_dark-opacity);position:relative}.babylon-languages .btn{opacity:1}.babylon-languages .btn:hover{opacity:.6}.babylon-languages__close{position:absolute;right:20px;top:20px;z-index:1}@media (min-width: 1025px){.babylon-languages__close{right:20px;top:20px}}.babylon-languages__close .babylon-plus:before{transform:rotate(-45deg)}.babylon-languages__header{width:100%;gap:15px;padding-bottom:65px}.babylon-languages h4,.babylon-languages .subtitle{color:var(--cl_title-light);font-weight:400;text-align:center}.babylon-languages .subtitle{font-family:var(--font-text);font-size:15px;font-weight:300}.babylon-languages__content{gap:20px;padding:0 20px}@media (min-width: 768px){.babylon-languages__content{gap:25px}}.babylon-languages__content a{width:100%;max-width:400px;height:60px;padding:19px 30px 14px 46px;background-color:var(--cl_title-light);position:relative;border-radius:5px;font-family:var(--font-title);font-size:18px;letter-spacing:.02em;font-weight:400;color:var(--cl_subtitle);text-decoration:none;cursor:pointer}.babylon-languages__content a:hover .icon{animation:move-right 2s infinite ease-in-out}.babylon-languages__content a .icon{display:none}.babylon-languages__content a:not(.babylon-languages__selected) .icon{display:initial;position:absolute;font-size:12px;right:30px;font-weight:700}.babylon-languages__content a .line{border-bottom:1px solid var(--cl_subtitle);width:13px;position:absolute;left:20.5px;top:50%;transform:translateY(-50%)}\n"] }]
|
|
24
41
|
}], propDecorators: { title: [{
|
|
25
42
|
type: Input
|
|
26
43
|
}], subtitle: [{
|
|
@@ -34,4 +51,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
34
51
|
}], languageSelect: [{
|
|
35
52
|
type: Output
|
|
36
53
|
}] } });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFieWxvbi1sYW5ndWFnZS1tb2RhbC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9iYWJ5bG9uL3NyYy9saWIvY29tcG9uZW50cy9jb3JlL2JhYnlsb24tbGFuZ3VhZ2UtbW9kYWwvYmFieWxvbi1sYW5ndWFnZS1tb2RhbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9iYWJ5bG9uL3NyYy9saWIvY29tcG9uZW50cy9jb3JlL2JhYnlsb24tbGFuZ3VhZ2UtbW9kYWwvYmFieWxvbi1sYW5ndWFnZS1tb2RhbC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0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gICAgICAgICAgICAgIEBmb3IgKGl0ZW0gb2YgaXRlbXM7IHRyYWNrICRpbmRleCkge1xuICAgICAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuaHJlZl09XCJpdGVtLnVybCB8fCBudWxsXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmhyZWZsYW5nXT1cIml0ZW0udXJsID8gaXRlbS5jb2RlIDogbnVsbFwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLWxhYmVsXT1cIml0ZW0ubmFtZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2JhYnlsb24tbGFuZ3VhZ2VzX19zZWxlY3RlZCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uaWQgPT0gc2VsZWN0ZWQ/LmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImQtZmxleCBhbGlnbi1pdGVtcy1jZW50ZXJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgKGNsaWNrKT1cIm9uSXRlbUNsaWNrKCRldmVudCwgaXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgPjxzcGFuIGNsYXNzPVwibGluZVwiPjwvc3Bhbj57eyBpdGVtLm5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH19PHNwYW4gY2xhc3M9XCJpY29uIGJhYnlsb24tYXJyb3ctcmlnaHRcIj48L3NwYW5cbiAgICAgICAgICAgICAgICAgICAgPjwvYT5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgfVxuICAgIDwvZGl2PlxuPC9kaXY+XG4iXX0=
|
package/fesm2022/ctt-babylon.mjs
CHANGED
|
@@ -19067,6 +19067,23 @@ class BabylonLanguageModalComponent {
|
|
|
19067
19067
|
this.languageSelect = new EventEmitter();
|
|
19068
19068
|
this.dialogRef = inject(MatDialogRef);
|
|
19069
19069
|
}
|
|
19070
|
+
/**
|
|
19071
|
+
* Click en un idioma. Si el item trae `url` el enlace es un <a href> real
|
|
19072
|
+
* (SEO); en click normal se evita la navegación nativa y se mantiene el
|
|
19073
|
+
* flujo de siempre (languageSelect). Ctrl/Cmd/Shift/rueda → navegación nativa.
|
|
19074
|
+
*/
|
|
19075
|
+
onItemClick(event, language) {
|
|
19076
|
+
if (language.url) {
|
|
19077
|
+
if (event.ctrlKey ||
|
|
19078
|
+
event.metaKey ||
|
|
19079
|
+
event.shiftKey ||
|
|
19080
|
+
event.button !== 0) {
|
|
19081
|
+
return;
|
|
19082
|
+
}
|
|
19083
|
+
event.preventDefault();
|
|
19084
|
+
}
|
|
19085
|
+
this.selectLanguage(language);
|
|
19086
|
+
}
|
|
19070
19087
|
selectLanguage(language) {
|
|
19071
19088
|
this.selected = language;
|
|
19072
19089
|
this.languageSelect.emit(language);
|
|
@@ -19075,11 +19092,11 @@ class BabylonLanguageModalComponent {
|
|
|
19075
19092
|
this.dialogRef.close();
|
|
19076
19093
|
}
|
|
19077
19094
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BabylonLanguageModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19078
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BabylonLanguageModalComponent, isStandalone: true, selector: "lib-babylon-language-modal", inputs: { title: "title", subtitle: "subtitle", items: "items", selected: "selected", image: "image" }, outputs: { languageSelect: "languageSelect" }, ngImport: i0, template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"
|
|
19095
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BabylonLanguageModalComponent, isStandalone: true, selector: "lib-babylon-language-modal", inputs: { title: "title", subtitle: "subtitle", items: "items", selected: "selected", image: "image" }, outputs: { languageSelect: "languageSelect" }, ngImport: i0, template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.href]=\"item.url || null\"\n [attr.hreflang]=\"item.url ? item.code : null\"\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"onItemClick($event, item)\"\n ><span class=\"line\"></span>{{ item.name\n }}<span class=\"icon babylon-arrow-right\"></span\n ></a>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".babylon-languages__close .babylon-plus svg{display:none}.babylon-languages{max-width:440px;max-height:100vh;overflow:auto;align-self:center;padding:50px 20px;width:100%;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.babylon-languages__wrapper{width:100%;height:100%;background-color:var(--cl_background_dark-opacity);position:relative}.babylon-languages .btn{opacity:1}.babylon-languages .btn:hover{opacity:.6}.babylon-languages__close{position:absolute;right:20px;top:20px;z-index:1}@media (min-width: 1025px){.babylon-languages__close{right:20px;top:20px}}.babylon-languages__close .babylon-plus:before{transform:rotate(-45deg)}.babylon-languages__header{width:100%;gap:15px;padding-bottom:65px}.babylon-languages h4,.babylon-languages .subtitle{color:var(--cl_title-light);font-weight:400;text-align:center}.babylon-languages .subtitle{font-family:var(--font-text);font-size:15px;font-weight:300}.babylon-languages__content{gap:20px;padding:0 20px}@media (min-width: 768px){.babylon-languages__content{gap:25px}}.babylon-languages__content a{width:100%;max-width:400px;height:60px;padding:19px 30px 14px 46px;background-color:var(--cl_title-light);position:relative;border-radius:5px;font-family:var(--font-title);font-size:18px;letter-spacing:.02em;font-weight:400;color:var(--cl_subtitle);text-decoration:none;cursor:pointer}.babylon-languages__content a:hover .icon{animation:move-right 2s infinite ease-in-out}.babylon-languages__content a .icon{display:none}.babylon-languages__content a:not(.babylon-languages__selected) .icon{display:initial;position:absolute;font-size:12px;right:30px;font-weight:700}.babylon-languages__content a .line{border-bottom:1px solid var(--cl_subtitle);width:13px;position:absolute;left:20.5px;top:50%;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
19079
19096
|
}
|
|
19080
19097
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BabylonLanguageModalComponent, decorators: [{
|
|
19081
19098
|
type: Component,
|
|
19082
|
-
args: [{ selector: 'lib-babylon-language-modal', standalone: true, imports: [CommonModule], template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"
|
|
19099
|
+
args: [{ selector: 'lib-babylon-language-modal', standalone: true, imports: [CommonModule], template: "<div class=\"babylon-languages__close\">\n <button\n name=\"close\"\n class=\"btn btn_primary btn--light babylon-plus btn-responsive\"\n (click)=\"close()\"\n >\n <svg aria-hidden=\"true\" focusable=\"false\">\n <use href=\"/assets/babylon/svg/close-icon.svg#close-icon\"></use>\n </svg>\n </button>\n</div>\n<div class=\"babylon-languages__wrapper\">\n <div class=\"babylon-languages\">\n @if (title || subtitle) {\n <div\n class=\"babylon-languages__header d-flex flex-column align-itemns-center\"\n >\n @if (title) {\n <h4 class=\"title--small\">{{ title }}</h4>\n }\n @if (subtitle) {\n <span class=\"subtitle\">{{ subtitle }}</span>\n }\n </div>\n }\n @if (items?.length) {\n <div\n class=\"babylon-languages__content d-flex flex-column align-items-center\"\n >\n @for (item of items; track $index) {\n <a\n [attr.href]=\"item.url || null\"\n [attr.hreflang]=\"item.url ? item.code : null\"\n [attr.aria-label]=\"item.name\"\n [ngClass]=\"{\n 'babylon-languages__selected':\n item.id == selected?.id,\n }\"\n class=\"d-flex align-items-center\"\n (click)=\"onItemClick($event, item)\"\n ><span class=\"line\"></span>{{ item.name\n }}<span class=\"icon babylon-arrow-right\"></span\n ></a>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".babylon-languages__close .babylon-plus svg{display:none}.babylon-languages{max-width:440px;max-height:100vh;overflow:auto;align-self:center;padding:50px 20px;width:100%;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.babylon-languages__wrapper{width:100%;height:100%;background-color:var(--cl_background_dark-opacity);position:relative}.babylon-languages .btn{opacity:1}.babylon-languages .btn:hover{opacity:.6}.babylon-languages__close{position:absolute;right:20px;top:20px;z-index:1}@media (min-width: 1025px){.babylon-languages__close{right:20px;top:20px}}.babylon-languages__close .babylon-plus:before{transform:rotate(-45deg)}.babylon-languages__header{width:100%;gap:15px;padding-bottom:65px}.babylon-languages h4,.babylon-languages .subtitle{color:var(--cl_title-light);font-weight:400;text-align:center}.babylon-languages .subtitle{font-family:var(--font-text);font-size:15px;font-weight:300}.babylon-languages__content{gap:20px;padding:0 20px}@media (min-width: 768px){.babylon-languages__content{gap:25px}}.babylon-languages__content a{width:100%;max-width:400px;height:60px;padding:19px 30px 14px 46px;background-color:var(--cl_title-light);position:relative;border-radius:5px;font-family:var(--font-title);font-size:18px;letter-spacing:.02em;font-weight:400;color:var(--cl_subtitle);text-decoration:none;cursor:pointer}.babylon-languages__content a:hover .icon{animation:move-right 2s infinite ease-in-out}.babylon-languages__content a .icon{display:none}.babylon-languages__content a:not(.babylon-languages__selected) .icon{display:initial;position:absolute;font-size:12px;right:30px;font-weight:700}.babylon-languages__content a .line{border-bottom:1px solid var(--cl_subtitle);width:13px;position:absolute;left:20.5px;top:50%;transform:translateY(-50%)}\n"] }]
|
|
19083
19100
|
}], propDecorators: { title: [{
|
|
19084
19101
|
type: Input
|
|
19085
19102
|
}], subtitle: [{
|