@lluc_llull/ui-lib 0.18.1 → 0.18.3
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/lluc_llull-ui-lib-content.mjs +5 -4
- package/fesm2022/lluc_llull-ui-lib-content.mjs.map +1 -1
- package/fesm2022/lluc_llull-ui-lib-feedback.mjs +3 -2
- package/fesm2022/lluc_llull-ui-lib-feedback.mjs.map +1 -1
- package/fesm2022/lluc_llull-ui-lib-mapper.mjs +3 -2
- package/fesm2022/lluc_llull-ui-lib-mapper.mjs.map +1 -1
- package/fesm2022/lluc_llull-ui-lib-modals.mjs +3 -2
- package/fesm2022/lluc_llull-ui-lib-modals.mjs.map +1 -1
- package/fesm2022/lluc_llull-ui-lib-utils.mjs +22 -7
- package/fesm2022/lluc_llull-ui-lib-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/styles/main.css +25 -21
- package/styles/main.css +25 -21
- package/utils/utils.d.ts +1 -1
|
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';
|
|
5
|
+
import { UiIconComponent } from '@lluc_llull/ui-lib/shared';
|
|
5
6
|
import { LinkType } from '@lluc_llull/ui-lib/enums';
|
|
6
7
|
|
|
7
8
|
class CategoryProgressComponent {
|
|
@@ -30,11 +31,11 @@ class HeroSectionComponent {
|
|
|
30
31
|
buttons;
|
|
31
32
|
highlight;
|
|
32
33
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: HeroSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: HeroSectionComponent, isStandalone: true, selector: "lib-hero-section", inputs: { pretitle: "pretitle", title: "title", subtitle: "subtitle", text: "text", buttons: "buttons", highlight: "highlight" }, ngImport: i0, template: "<div class=\"hero-section\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">\n @if (highlight && title.includes(highlight)) {\n {{ title.replace(highlight, '') }}\n <span class=\"highlight-text\">\n {{ highlight }}\n <div class=\"wave-wrapper\">\n <div class=\"wave\"></div>\n </div>\n </span>\n } @else {\n {{ title }}\n }\n </h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (buttons && buttons.length > 0) {\n <div class=\"btn-group--center\">\n @for (button of buttons; track $index) {\n <a class=\"btn btn-link\" [href]=\"button.url\" [linkType]=\"button.linkType\">\n
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: HeroSectionComponent, isStandalone: true, selector: "lib-hero-section", inputs: { pretitle: "pretitle", title: "title", subtitle: "subtitle", text: "text", buttons: "buttons", highlight: "highlight" }, ngImport: i0, template: "<div class=\"hero-section\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">\n @if (highlight && title.includes(highlight)) {\n {{ title.replace(highlight, '') }}\n <span class=\"highlight-text\">\n {{ highlight }}\n <div class=\"wave-wrapper\">\n <div class=\"wave\"></div>\n </div>\n </span>\n } @else {\n {{ title }}\n }\n </h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (buttons && buttons.length > 0) {\n <div class=\"btn-group--center\">\n @for (button of buttons; track $index) {\n <a class=\"btn btn-link\" [href]=\"button.url\" [linkType]=\"button.linkType\">\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n }\n </div>\n }\n</div>\n", styles: [":host{display:flex;flex:1 1 auto;height:100%}.hero-section{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:2rem}.text,.btn-link{font-size:1.3rem}@media (max-width: 768px){.text,.btn-link{font-size:1.1rem}}.title{font-size:4rem;font-family:var(--font-title-home);font-weight:200;display:flex;flex-direction:column;align-items:center;line-height:.85}@media (max-width: 768px){.title{font-size:3rem}}.title .highlight-text{font-size:11.25rem;cursor:help;display:block;position:relative;z-index:99;width:fit-content}@media (max-width: 768px){.title .highlight-text{font-size:8.25rem}}.title .highlight-text .wave-wrapper{position:absolute;top:85%;left:0;width:100%;height:50px;z-index:-1}@media (max-width: 768px){.title .highlight-text .wave-wrapper{top:90%}}.title .highlight-text .wave{position:absolute;background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 27.6 8.4\" style=\"enable-background:new 0 0 27.6 8.4;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:none;stroke:%23FFFFFF;stroke-width:2;stroke-miterlimit:10;}%0A<\\/style>%0A<path class=\"st0\" d=\"M0,1c2.7,0,5.2,1.2,6.9,3.2s4.2,3.2,6.9,3.2c2.7,0,5.2-1.2,6.9-3.2S24.9,1,27.6,1\"/>%0A</svg>%0A');background-repeat:repeat-x;background-position-x:0;background-position-y:0;top:-1.2rem;opacity:.5;width:100%;height:50%}@media (max-width: 768px){.title .highlight-text .wave{width:70%;left:50%;transform:translate(-50%)}}.title .highlight-text:hover .wave{animation:moveWave 5s infinite linear}@media (max-width: 768px){.title .highlight-text{display:block;margin-top:.5rem}}@keyframes moveWave{0%{background-position-x:0}to{background-position-x:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: LinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href"], outputs: ["anchorClicked"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
34
35
|
}
|
|
35
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: HeroSectionComponent, decorators: [{
|
|
36
37
|
type: Component,
|
|
37
|
-
args: [{ selector: 'lib-hero-section', standalone: true, imports: [CommonModule, LinkTypeDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"hero-section\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">\n @if (highlight && title.includes(highlight)) {\n {{ title.replace(highlight, '') }}\n <span class=\"highlight-text\">\n {{ highlight }}\n <div class=\"wave-wrapper\">\n <div class=\"wave\"></div>\n </div>\n </span>\n } @else {\n {{ title }}\n }\n </h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (buttons && buttons.length > 0) {\n <div class=\"btn-group--center\">\n @for (button of buttons; track $index) {\n <a class=\"btn btn-link\" [href]=\"button.url\" [linkType]=\"button.linkType\">\n
|
|
38
|
+
args: [{ selector: 'lib-hero-section', standalone: true, imports: [CommonModule, LinkTypeDirective, UiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"hero-section\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">\n @if (highlight && title.includes(highlight)) {\n {{ title.replace(highlight, '') }}\n <span class=\"highlight-text\">\n {{ highlight }}\n <div class=\"wave-wrapper\">\n <div class=\"wave\"></div>\n </div>\n </span>\n } @else {\n {{ title }}\n }\n </h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (buttons && buttons.length > 0) {\n <div class=\"btn-group--center\">\n @for (button of buttons; track $index) {\n <a class=\"btn btn-link\" [href]=\"button.url\" [linkType]=\"button.linkType\">\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n }\n </div>\n }\n</div>\n", styles: [":host{display:flex;flex:1 1 auto;height:100%}.hero-section{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:2rem}.text,.btn-link{font-size:1.3rem}@media (max-width: 768px){.text,.btn-link{font-size:1.1rem}}.title{font-size:4rem;font-family:var(--font-title-home);font-weight:200;display:flex;flex-direction:column;align-items:center;line-height:.85}@media (max-width: 768px){.title{font-size:3rem}}.title .highlight-text{font-size:11.25rem;cursor:help;display:block;position:relative;z-index:99;width:fit-content}@media (max-width: 768px){.title .highlight-text{font-size:8.25rem}}.title .highlight-text .wave-wrapper{position:absolute;top:85%;left:0;width:100%;height:50px;z-index:-1}@media (max-width: 768px){.title .highlight-text .wave-wrapper{top:90%}}.title .highlight-text .wave{position:absolute;background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 27.6 8.4\" style=\"enable-background:new 0 0 27.6 8.4;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:none;stroke:%23FFFFFF;stroke-width:2;stroke-miterlimit:10;}%0A<\\/style>%0A<path class=\"st0\" d=\"M0,1c2.7,0,5.2,1.2,6.9,3.2s4.2,3.2,6.9,3.2c2.7,0,5.2-1.2,6.9-3.2S24.9,1,27.6,1\"/>%0A</svg>%0A');background-repeat:repeat-x;background-position-x:0;background-position-y:0;top:-1.2rem;opacity:.5;width:100%;height:50%}@media (max-width: 768px){.title .highlight-text .wave{width:70%;left:50%;transform:translate(-50%)}}.title .highlight-text:hover .wave{animation:moveWave 5s infinite linear}@media (max-width: 768px){.title .highlight-text{display:block;margin-top:.5rem}}@keyframes moveWave{0%{background-position-x:0}to{background-position-x:100%}}\n"] }]
|
|
38
39
|
}], propDecorators: { pretitle: [{
|
|
39
40
|
type: Input
|
|
40
41
|
}], title: [{
|
|
@@ -79,11 +80,11 @@ class SectionIntroComponent {
|
|
|
79
80
|
text;
|
|
80
81
|
button;
|
|
81
82
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SectionIntroComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: SectionIntroComponent, isStandalone: true, selector: "lib-section-intro", inputs: { pretitle: "pretitle", title: "title", subtitle: "subtitle", text: "text", button: "button" }, ngImport: i0, template: "<div class=\"section-intro\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">{{ title }}</h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (button) {\n <a [href]=\"button.url\" [linkType]=\"button.linkType\" class=\"btn btn-link\">\n
|
|
83
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: SectionIntroComponent, isStandalone: true, selector: "lib-section-intro", inputs: { pretitle: "pretitle", title: "title", subtitle: "subtitle", text: "text", button: "button" }, ngImport: i0, template: "<div class=\"section-intro\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">{{ title }}</h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (button) {\n <div class=\"btn-group\">\n <a [href]=\"button.url\" [linkType]=\"button.linkType\" class=\"btn btn-link\">\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n </div>\n }\n</div>\n", styles: [":root{--font-title-home: \"Bebas Neue\", system-ui, sans-serif;--font-titles: \"Bebas Neue\", system-ui, sans-serif;--font-base: \"Inter\", system-ui, sans-serif;--font-size-base: 16px;--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 2rem;--border-radius: 8px}.section-intro{text-align:start;padding:2rem 10rem;align-items:start}@media (max-width: 768px){.section-intro{padding:2rem 4rem}}.title,.subtitle{text-transform:uppercase}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: LinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href"], outputs: ["anchorClicked"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
83
84
|
}
|
|
84
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SectionIntroComponent, decorators: [{
|
|
85
86
|
type: Component,
|
|
86
|
-
args: [{ selector: 'lib-section-intro', standalone: true, imports: [CommonModule, LinkTypeDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"section-intro\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">{{ title }}</h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (button) {\n <a [href]=\"button.url\" [linkType]=\"button.linkType\" class=\"btn btn-link\">\n
|
|
87
|
+
args: [{ selector: 'lib-section-intro', standalone: true, imports: [CommonModule, LinkTypeDirective, UiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"section-intro\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">{{ title }}</h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (button) {\n <div class=\"btn-group\">\n <a [href]=\"button.url\" [linkType]=\"button.linkType\" class=\"btn btn-link\">\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n </div>\n }\n</div>\n", styles: [":root{--font-title-home: \"Bebas Neue\", system-ui, sans-serif;--font-titles: \"Bebas Neue\", system-ui, sans-serif;--font-base: \"Inter\", system-ui, sans-serif;--font-size-base: 16px;--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 2rem;--border-radius: 8px}.section-intro{text-align:start;padding:2rem 10rem;align-items:start}@media (max-width: 768px){.section-intro{padding:2rem 4rem}}.title,.subtitle{text-transform:uppercase}\n"] }]
|
|
87
88
|
}], propDecorators: { pretitle: [{
|
|
88
89
|
type: Input
|
|
89
90
|
}], title: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lluc_llull-ui-lib-content.mjs","sources":["../../../projects/ui-lib/content/category-progress/category-progress.component.ts","../../../projects/ui-lib/content/category-progress/category-progress.component.html","../../../projects/ui-lib/content/hero-section/hero-section.component.ts","../../../projects/ui-lib/content/hero-section/hero-section.component.html","../../../projects/ui-lib/content/hero-section/hero-section.stories.ts","../../../projects/ui-lib/content/section-intro/section-intro.component.ts","../../../projects/ui-lib/content/section-intro/section-intro.component.html","../../../projects/ui-lib/content/lluc_llull-ui-lib-content.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'lib-category-progress',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './category-progress.component.html',\n styleUrl: './category-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CategoryProgressComponent {\n @Input() pretitle?: string;\n @Input() title?: string;\n @Input() categories?: ProgressCategoryI[];\n}\n\nexport interface ProgressItemI {\n label: string;\n value: number;\n}\n\nexport interface ProgressCategoryI {\n title: string;\n items: ProgressItemI[];\n}\n","<div class=\"category-progress\">\n @if (pretitle) {\n <h3 class=\"pretitle\">{{ pretitle }}</h3>\n }\n @if (title) {\n <h2 class=\"title\">{{ title }}</h2>\n }\n <div class=\"progress-grid\">\n @for (category of categories; track $index) {\n <div class=\"category\">\n <h3 class=\"subtitle\">{{ category.title }}</h3>\n\n @for (item of category.items; track $index) {\n <div class=\"item\">\n <span class=\"label\">{{ item.label }}</span>\n <div class=\"bar\">\n <div class=\"fill\" [style.width.%]=\"item.value\"></div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';\nimport { UiLibButtonI } from '@lluc_llull/ui-lib/interfaces';\n\n@Component({\n selector: 'lib-hero-section',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective],\n templateUrl: './hero-section.component.html',\n styleUrl: './hero-section.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HeroSectionComponent {\n @Input() pretitle?: string;\n @Input() title?: string;\n @Input() subtitle?: string;\n @Input() text?: string;\n @Input() buttons?: UiLibButtonI[];\n @Input() highlight?: string;\n}\n","<div class=\"hero-section\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">\n @if (highlight && title.includes(highlight)) {\n {{ title.replace(highlight, '') }}\n <span class=\"highlight-text\">\n {{ highlight }}\n <div class=\"wave-wrapper\">\n <div class=\"wave\"></div>\n </div>\n </span>\n } @else {\n {{ title }}\n }\n </h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (buttons && buttons.length > 0) {\n <div class=\"btn-group--center\">\n @for (button of buttons; track $index) {\n <a class=\"btn btn-link\" [href]=\"button.url\" [linkType]=\"button.linkType\">\n
|
|
1
|
+
{"version":3,"file":"lluc_llull-ui-lib-content.mjs","sources":["../../../projects/ui-lib/content/category-progress/category-progress.component.ts","../../../projects/ui-lib/content/category-progress/category-progress.component.html","../../../projects/ui-lib/content/hero-section/hero-section.component.ts","../../../projects/ui-lib/content/hero-section/hero-section.component.html","../../../projects/ui-lib/content/hero-section/hero-section.stories.ts","../../../projects/ui-lib/content/section-intro/section-intro.component.ts","../../../projects/ui-lib/content/section-intro/section-intro.component.html","../../../projects/ui-lib/content/lluc_llull-ui-lib-content.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'lib-category-progress',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './category-progress.component.html',\n styleUrl: './category-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CategoryProgressComponent {\n @Input() pretitle?: string;\n @Input() title?: string;\n @Input() categories?: ProgressCategoryI[];\n}\n\nexport interface ProgressItemI {\n label: string;\n value: number;\n}\n\nexport interface ProgressCategoryI {\n title: string;\n items: ProgressItemI[];\n}\n","<div class=\"category-progress\">\n @if (pretitle) {\n <h3 class=\"pretitle\">{{ pretitle }}</h3>\n }\n @if (title) {\n <h2 class=\"title\">{{ title }}</h2>\n }\n <div class=\"progress-grid\">\n @for (category of categories; track $index) {\n <div class=\"category\">\n <h3 class=\"subtitle\">{{ category.title }}</h3>\n\n @for (item of category.items; track $index) {\n <div class=\"item\">\n <span class=\"label\">{{ item.label }}</span>\n <div class=\"bar\">\n <div class=\"fill\" [style.width.%]=\"item.value\"></div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';\nimport { UiLibButtonI } from '@lluc_llull/ui-lib/interfaces';\nimport { UiIconComponent } from '@lluc_llull/ui-lib/shared';\n\n@Component({\n selector: 'lib-hero-section',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective, UiIconComponent],\n templateUrl: './hero-section.component.html',\n styleUrl: './hero-section.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HeroSectionComponent {\n @Input() pretitle?: string;\n @Input() title?: string;\n @Input() subtitle?: string;\n @Input() text?: string;\n @Input() buttons?: UiLibButtonI[];\n @Input() highlight?: string;\n}\n","<div class=\"hero-section\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">\n @if (highlight && title.includes(highlight)) {\n {{ title.replace(highlight, '') }}\n <span class=\"highlight-text\">\n {{ highlight }}\n <div class=\"wave-wrapper\">\n <div class=\"wave\"></div>\n </div>\n </span>\n } @else {\n {{ title }}\n }\n </h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (buttons && buttons.length > 0) {\n <div class=\"btn-group--center\">\n @for (button of buttons; track $index) {\n <a class=\"btn btn-link\" [href]=\"button.url\" [linkType]=\"button.linkType\">\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n }\n </div>\n }\n</div>\n","import { Meta, StoryObj } from '@storybook/angular';\nimport { LinkType } from \"@lluc_llull/ui-lib/enums\";\nimport { HeroSectionComponent } from './hero-section.component';\n\nexport default {\n title: 'Core/Content/HeroSection',\n component: HeroSectionComponent,\n tags: ['autodocs'],\n argTypes: {\n title: { control: 'text' },\n subtitle: { control: 'text' },\n text: { control: 'text' },\n buttons: { control: 'object' },\n },\n} as Meta<HeroSectionComponent>;\n\ntype Story = StoryObj<HeroSectionComponent>;\n\nexport const Default: Story = {\n args: {\n title: 'Título de ejemplo',\n subtitle: 'Subtítulo de ejemplo',\n text: 'Texto descriptivo de ejemplo para el Hero Section.',\n buttons: [\n { label: 'Botón 1', url: 'https://www.google.com', linkType: LinkType.External },\n { label: 'Botón 2', url: 'https://www.google.com', linkType: LinkType.External },\n ],\n },\n};\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';\nimport { UiLibButtonI } from '@lluc_llull/ui-lib/interfaces';\nimport { UiIconComponent } from '@lluc_llull/ui-lib/shared';\n\n@Component({\n selector: 'lib-section-intro',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective, UiIconComponent],\n templateUrl: './section-intro.component.html',\n styleUrl: './section-intro.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SectionIntroComponent {\n @Input() pretitle?: string;\n @Input() title?: string;\n @Input() subtitle?: string;\n @Input() text?: string;\n @Input() button?: UiLibButtonI;\n}\n","<div class=\"section-intro\">\n @if (pretitle) {\n <h2 class=\"pretitle\">{{ pretitle }}</h2>\n }\n @if (title) {\n <h1 class=\"title\">{{ title }}</h1>\n }\n @if (subtitle) {\n <h2 class=\"subtitle\">{{ subtitle }}</h2>\n }\n @if (text) {\n <p class=\"text\">{{ text }}</p>\n }\n @if (button) {\n <div class=\"btn-group\">\n <a [href]=\"button.url\" [linkType]=\"button.linkType\" class=\"btn btn-link\">\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAWa,yBAAyB,CAAA;AACzB,IAAA,QAAQ;AACR,IAAA,KAAK;AACL,IAAA,UAAU;wGAHV,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtC,krBAwBA,EAAA,MAAA,EAAA,CAAA,k5BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDlBc,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKb,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;+BACI,uBAAuB,EAAA,UAAA,EACrB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,CAAC,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,krBAAA,EAAA,MAAA,EAAA,CAAA,k5BAAA,CAAA,EAAA;8BAGtC,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,UAAU,EAAA,CAAA;sBAAlB;;;MEAQ,oBAAoB,CAAA;AACpB,IAAA,QAAQ;AACR,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,IAAI;AACJ,IAAA,OAAO;AACP,IAAA,SAAS;wGANT,oBAAoB,EAAA,IAAA,EAAA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AA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKjD,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,UAAA,EACjB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,iBAAiB,EAAE,eAAe,CAAC,EAAA,eAAA,EAG1C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6lBAAA,EAAA,MAAA,EAAA,CAAA,4cAAA,CAAA,EAAA;8BAGtC,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,MAAM,EAAA,CAAA;sBAAd;;;AEnBL;;AAEG;;;;"}
|
|
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { LinkTypeDirective, HighlightDirective } from '@lluc_llull/ui-lib/directives';
|
|
5
|
+
import { UiIconComponent } from '@lluc_llull/ui-lib/shared';
|
|
5
6
|
|
|
6
7
|
class NotFoundComponent {
|
|
7
8
|
title;
|
|
@@ -9,11 +10,11 @@ class NotFoundComponent {
|
|
|
9
10
|
highlight;
|
|
10
11
|
button;
|
|
11
12
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: NotFoundComponent, isStandalone: true, selector: "lib-404", inputs: { title: "title", subtitle: "subtitle", highlight: "highlight", button: "button" }, ngImport: i0, template: "<div class=\"notfound\">\n <div class=\"notfound__content\">\n @if (title) {\n <h1 class=\"notfound__title\">{{ title }}</h1>\n }\n\n @if (subtitle) {\n <h2 class=\"notfound__subtitle\" [highlight]=\"'#FFFFFF'\">{{ subtitle }}</h2>\n }\n\n @if (button) {\n <div class=\"btn-group\">\n <a\n [href]=\"button.url\"\n [linkType]=\"button.linkType\"\n class=\"btn btn-primary btn-primary--outline\"\n >\n <
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: NotFoundComponent, isStandalone: true, selector: "lib-404", inputs: { title: "title", subtitle: "subtitle", highlight: "highlight", button: "button" }, ngImport: i0, template: "<div class=\"notfound\">\n <div class=\"notfound__content\">\n @if (title) {\n <h1 class=\"notfound__title\">{{ title }}</h1>\n }\n\n @if (subtitle) {\n <h2 class=\"notfound__subtitle\" [highlight]=\"'#FFFFFF'\">{{ subtitle }}</h2>\n }\n\n @if (button) {\n <div class=\"btn-group\">\n <a\n [href]=\"button.url\"\n [linkType]=\"button.linkType\"\n class=\"btn btn-primary btn-primary--outline\"\n >\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n </div>\n }\n </div>\n\n @if (highlight) {\n <div class=\"notfound__highlight\">\n {{ highlight }}\n </div>\n }\n</div>\n", styles: [":root{--font-title-home: \"Bebas Neue\", system-ui, sans-serif;--font-titles: \"Bebas Neue\", system-ui, sans-serif;--font-base: \"Inter\", system-ui, sans-serif;--font-size-base: 16px;--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 2rem;--border-radius: 8px}.notfound{min-height:100%;overflow:hidden;padding:6rem 4rem 0}.notfound__content{max-width:45rem;position:relative;z-index:2}.notfound__title{font-size:3rem;font-weight:600;font-family:var(--font-base);margin:0}.notfound__subtitle{font-size:3rem;font-weight:600;line-height:1.2;font-family:var(--font-base);padding-block:0 1rem;margin:0}.notfound__highlight{position:fixed;bottom:0;left:50%;transform:translate(-50%,23%);font-size:38rem;color:var(--color-primary);font-family:var(--font-titles);z-index:1;pointer-events:none}@media (max-width: 768px){.notfound__highlight{font-size:10rem;transform:translate(-50%,-15%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: LinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href"], outputs: ["anchorClicked"] }, { kind: "directive", type: HighlightDirective, selector: "[highlight]", inputs: ["highlight", "highlightThickness"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13
14
|
}
|
|
14
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NotFoundComponent, decorators: [{
|
|
15
16
|
type: Component,
|
|
16
|
-
args: [{ selector: 'lib-404', standalone: true, imports: [CommonModule, LinkTypeDirective, HighlightDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"notfound\">\n <div class=\"notfound__content\">\n @if (title) {\n <h1 class=\"notfound__title\">{{ title }}</h1>\n }\n\n @if (subtitle) {\n <h2 class=\"notfound__subtitle\" [highlight]=\"'#FFFFFF'\">{{ subtitle }}</h2>\n }\n\n @if (button) {\n <div class=\"btn-group\">\n <a\n [href]=\"button.url\"\n [linkType]=\"button.linkType\"\n class=\"btn btn-primary btn-primary--outline\"\n >\n <
|
|
17
|
+
args: [{ selector: 'lib-404', standalone: true, imports: [CommonModule, LinkTypeDirective, HighlightDirective, UiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"notfound\">\n <div class=\"notfound__content\">\n @if (title) {\n <h1 class=\"notfound__title\">{{ title }}</h1>\n }\n\n @if (subtitle) {\n <h2 class=\"notfound__subtitle\" [highlight]=\"'#FFFFFF'\">{{ subtitle }}</h2>\n }\n\n @if (button) {\n <div class=\"btn-group\">\n <a\n [href]=\"button.url\"\n [linkType]=\"button.linkType\"\n class=\"btn btn-primary btn-primary--outline\"\n >\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n </div>\n }\n </div>\n\n @if (highlight) {\n <div class=\"notfound__highlight\">\n {{ highlight }}\n </div>\n }\n</div>\n", styles: [":root{--font-title-home: \"Bebas Neue\", system-ui, sans-serif;--font-titles: \"Bebas Neue\", system-ui, sans-serif;--font-base: \"Inter\", system-ui, sans-serif;--font-size-base: 16px;--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 2rem;--border-radius: 8px}.notfound{min-height:100%;overflow:hidden;padding:6rem 4rem 0}.notfound__content{max-width:45rem;position:relative;z-index:2}.notfound__title{font-size:3rem;font-weight:600;font-family:var(--font-base);margin:0}.notfound__subtitle{font-size:3rem;font-weight:600;line-height:1.2;font-family:var(--font-base);padding-block:0 1rem;margin:0}.notfound__highlight{position:fixed;bottom:0;left:50%;transform:translate(-50%,23%);font-size:38rem;color:var(--color-primary);font-family:var(--font-titles);z-index:1;pointer-events:none}@media (max-width: 768px){.notfound__highlight{font-size:10rem;transform:translate(-50%,-15%)}}\n"] }]
|
|
17
18
|
}], propDecorators: { title: [{
|
|
18
19
|
type: Input
|
|
19
20
|
}], subtitle: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lluc_llull-ui-lib-feedback.mjs","sources":["../../../projects/ui-lib/feedback/404/404.component.ts","../../../projects/ui-lib/feedback/404/404.component.html","../../../projects/ui-lib/feedback/lluc_llull-ui-lib-feedback.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UiLibButtonI } from '@lluc_llull/ui-lib/interfaces';\nimport { LinkTypeDirective, HighlightDirective } from '@lluc_llull/ui-lib/directives';\n\n@Component({\n selector: 'lib-404',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective, HighlightDirective],\n templateUrl: './404.component.html',\n styleUrl: './404.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NotFoundComponent {\n @Input() title?: string;\n @Input() subtitle?: string;\n @Input() highlight?: string;\n @Input() button?: UiLibButtonI;\n}\n","<div class=\"notfound\">\n <div class=\"notfound__content\">\n @if (title) {\n <h1 class=\"notfound__title\">{{ title }}</h1>\n }\n\n @if (subtitle) {\n <h2 class=\"notfound__subtitle\" [highlight]=\"'#FFFFFF'\">{{ subtitle }}</h2>\n }\n\n @if (button) {\n <div class=\"btn-group\">\n <a\n [href]=\"button.url\"\n [linkType]=\"button.linkType\"\n class=\"btn btn-primary btn-primary--outline\"\n >\n <
|
|
1
|
+
{"version":3,"file":"lluc_llull-ui-lib-feedback.mjs","sources":["../../../projects/ui-lib/feedback/404/404.component.ts","../../../projects/ui-lib/feedback/404/404.component.html","../../../projects/ui-lib/feedback/lluc_llull-ui-lib-feedback.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UiLibButtonI } from '@lluc_llull/ui-lib/interfaces';\nimport { LinkTypeDirective, HighlightDirective } from '@lluc_llull/ui-lib/directives';\nimport { UiIconComponent } from '@lluc_llull/ui-lib/shared';\n\n@Component({\n selector: 'lib-404',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective, HighlightDirective, UiIconComponent],\n templateUrl: './404.component.html',\n styleUrl: './404.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NotFoundComponent {\n @Input() title?: string;\n @Input() subtitle?: string;\n @Input() highlight?: string;\n @Input() button?: UiLibButtonI;\n}\n","<div class=\"notfound\">\n <div class=\"notfound__content\">\n @if (title) {\n <h1 class=\"notfound__title\">{{ title }}</h1>\n }\n\n @if (subtitle) {\n <h2 class=\"notfound__subtitle\" [highlight]=\"'#FFFFFF'\">{{ subtitle }}</h2>\n }\n\n @if (button) {\n <div class=\"btn-group\">\n <a\n [href]=\"button.url\"\n [linkType]=\"button.linkType\"\n class=\"btn btn-primary btn-primary--outline\"\n >\n <ui-icon [name]=\"button.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ button.label }}\n </a>\n </div>\n }\n </div>\n\n @if (highlight) {\n <div class=\"notfound__highlight\">\n {{ highlight }}\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAca,iBAAiB,CAAA;AACjB,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,MAAM;wGAJN,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,SAAA,EAAA,WAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECd9B,4vBA8BA,EAAA,MAAA,EAAA,CAAA,64BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDrBc,YAAY,+BAAE,iBAAiB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,eAAe,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKrE,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,UAAA,EACP,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,CAAC,EAAA,eAAA,EAG9D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4vBAAA,EAAA,MAAA,EAAA,CAAA,64BAAA,CAAA,EAAA;8BAGtC,KAAK,EAAA,CAAA;sBAAb;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,MAAM,EAAA,CAAA;sBAAd;;;AElBL;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mapButtons, mapImage } from '@lluc_llull/ui-lib/utils';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, PLATFORM_ID, Inject, Injectable } from '@angular/core';
|
|
4
4
|
|
|
@@ -49,6 +49,7 @@ const mapHeaderClear = (props, cdn) => {
|
|
|
49
49
|
lang: props?.lang || 'es',
|
|
50
50
|
navigation: props?.navigation,
|
|
51
51
|
socialItems: mapSocialLinks(props?.navigation),
|
|
52
|
+
homeLink: mapButtons(props?.buttons)[0],
|
|
52
53
|
};
|
|
53
54
|
};
|
|
54
55
|
|
|
@@ -98,7 +99,7 @@ const mapSectionIntro = (props) => ({
|
|
|
98
99
|
title: props?.texts?.title,
|
|
99
100
|
subtitle: props?.texts?.subtitle,
|
|
100
101
|
text: props?.texts?.text,
|
|
101
|
-
button: mapButtons(props?.
|
|
102
|
+
button: mapButtons(props?.buttons)[0],
|
|
102
103
|
});
|
|
103
104
|
|
|
104
105
|
const mapSocialFooter = (props) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lluc_llull-ui-lib-mapper.mjs","sources":["../../../projects/ui-lib/mapper/component-mappers/category-progress.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/nav-modal.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/header-clear.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/hero-section.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/lang-modal.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/legal-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/links-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/404.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/section-intro.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/social-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/visual-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/index.ts","../../../projects/ui-lib/mapper/cdn.token.ts","../../../projects/ui-lib/mapper/mapper.service.ts","../../../projects/ui-lib/mapper/lluc_llull-ui-lib-mapper.ts"],"sourcesContent":["import { ComponentMapperFn } from './types';\n\nexport const mapCategoryProgress: ComponentMapperFn = (props) => ({\n pretitle: props?.texts?.pretitle,\n title: props?.texts?.title,\n categories: props?.items?.map((item: any) => ({\n title: item.title,\n items: item.items?.map((subItem: any) => ({\n label: subItem.name,\n value: subItem.progress,\n })),\n })),\n});\n","import { UiLibNavItemsI, UiLibSocialItemsI } from '@lluc_llull/ui-lib/interfaces';\n\nexport const mapNavModal = (navigation: any, lang: string): UiLibNavItemsI[] => {\n if (!navigation?.items || !Array.isArray(navigation.items)) return [];\n\n return navigation.items.map((item: any) => {\n const slug = item.slug;\n\n const url = slug === 'home' || slug === '' ? `/${lang}` : `/${lang}/${slug}`;\n\n return {\n label: item.label?.[lang] ?? item.label?.['es'] ?? slug,\n url,\n linkType: 'internal',\n name: slug,\n active: true,\n children: [],\n };\n });\n};\n\nexport const mapSocialLinks = (navigation: any): UiLibSocialItemsI[] => {\n if (!navigation?.social || !Array.isArray(navigation.social)) return [];\n\n return navigation.social.map((item: any, index: number) => ({\n label: item.label ?? '',\n url: item.url ?? '',\n linkType: item.linkType ?? 'external',\n icon: item.icon ?? '',\n order: item.order ?? index,\n }));\n};\n","import { mapImage } from '@lluc_llull/ui-lib/utils';\nimport { mapSocialLinks } from './nav-modal.mapper';\nimport { ComponentMapperFn } from './types';\n\nexport const mapHeaderClear: ComponentMapperFn = (props, cdn) => {\n return {\n logo: mapImage(props?.logo, cdn),\n logoDark: mapImage(props?.logoDark, cdn),\n lang: props?.lang || 'es',\n navigation: props?.navigation,\n socialItems: mapSocialLinks(props?.navigation),\n };\n};\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapHeroSection: ComponentMapperFn = (props) => ({\n pretitle: props?.texts?.pretitle,\n title: props?.texts?.title,\n subtitle: props?.texts?.subtitle,\n text: props?.texts?.text,\n buttons: mapButtons(props?.buttons),\n highlight: props?.texts?.highlight,\n});\n","import { UiLibLangItemI } from '@lluc_llull/ui-lib/interfaces';\n\nexport const mapLangModal = (langs: any[], currentLang: string = 'es'): UiLibLangItemI[] => {\n if (!Array.isArray(langs)) return [];\n\n return langs.map((lang, index) => {\n const label = lang.labels?.[currentLang] || lang.labels?.[lang.code] || lang.code;\n\n return {\n id: lang.id ?? index,\n code: lang.code,\n label,\n };\n });\n};\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapLegalFooter: ComponentMapperFn = (props) => ({\n year: props?.texts?.year,\n brand: props?.texts?.brand,\n credits: props?.texts?.credits,\n links: mapButtons(props?.footer_links),\n //variant\n});\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapLinksFooter: ComponentMapperFn = (props) => ({\n links: mapButtons(props?.footer_links),\n});\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const map404: ComponentMapperFn = (props) => ({\n title: props?.texts?.title,\n subtitle: props?.texts?.subtitle,\n highlight: props?.texts?.highlight,\n button: mapButtons(props?.buttons)[0],\n});\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapSectionIntro: ComponentMapperFn = (props) => ({\n pretitle: props?.texts?.pretitle,\n title: props?.texts?.title,\n subtitle: props?.texts?.subtitle,\n text: props?.texts?.text,\n button: mapButtons(props?.button)[0],\n});\n","import { mapButtons, mapImage } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapSocialFooter: ComponentMapperFn = (props) => ({\n images: mapImage(props?.multimedia),\n socials: mapButtons(props?.social_links),\n hashtag: props?.texts?.hashtag,\n});\n","import { UiLibAddressI } from '@lluc_llull/ui-lib/interfaces';\nimport { mapButtons, mapImage } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapVisualFooter: ComponentMapperFn = (props) => ({\n contactTitle: props?.texts?.contactTitle,\n contactPhone: mapButtons(props?.contactPhone),\n contactEmail: mapButtons(props?.contactEmail),\n addressTitle: props?.texts?.addressTitle,\n address: {\n address: props?.address?.address,\n city: props?.address?.city,\n country: props?.address?.country,\n cp: props?.address?.cp,\n province: props?.address?.province,\n } as UiLibAddressI,\n socialsTitle: props?.texts?.socialsTitle,\n socials: mapButtons(props?.social_links),\n image: mapImage(props?.multimedia),\n});\n","\nexport * from './category-progress.mapper';\nexport * from './header-clear.mapper';\nexport * from './hero-section.mapper';\nexport * from './lang-modal.mapper';\nexport * from './legal-footer.mapper';\nexport * from './links-footer.mapper';\nexport * from './404.mapper';\nexport * from './section-intro.mapper';\nexport * from './social-footer.mapper';\nexport * from './visual-footer.mapper';\nexport * from './nav-modal.mapper';\n\nimport { mapCategoryProgress } from './category-progress.mapper';\nimport { mapHeaderClear } from './header-clear.mapper';\nimport { mapHeroSection } from './hero-section.mapper';\nimport { mapLangModal } from './lang-modal.mapper';\nimport { mapLegalFooter } from './legal-footer.mapper';\nimport { mapLinksFooter } from './links-footer.mapper';\nimport { map404 } from './404.mapper';\nimport { mapSectionIntro } from './section-intro.mapper';\nimport { mapSocialFooter } from './social-footer.mapper';\nimport { mapVisualFooter } from './visual-footer.mapper';\n\nexport const componentMappers: Record<string, (props: any, cdn?: string) => any> = {\n 'hero-section': mapHeroSection,\n 'header-clear': mapHeaderClear,\n 'lang-modal': mapLangModal,\n 'section-intro': mapSectionIntro,\n 'category-progress': mapCategoryProgress,\n 'links-footer': mapLinksFooter,\n 'legal-footer': mapLegalFooter,\n 'social-footer': mapSocialFooter,\n 'visual-footer': mapVisualFooter,\n 'not-found': map404,\n};\n","import { InjectionToken } from '@angular/core';\n\nexport const CDN_BASE_URL = new InjectionToken<string>('CDN_BASE_URL');","import { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { BodyComponent } from '@lluc_llull/ui-lib/interfaces';\nimport { CDN_BASE_URL } from './cdn.token';\nimport { componentMappers } from './component-mappers';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MapperService {\n\n constructor(@Inject(PLATFORM_ID) private readonly platformId: Object, @Inject(CDN_BASE_URL) private readonly cdn: string) {}\n\n mapComponents<T>(body: any[]): BodyComponent<T>[] {\n if (!body || body.length === 0) {\n return [];\n }\n\n return body\n .filter((component) => component && component.name && component.props)\n .map((component) => {\n const name = component.name.toLowerCase();\n const mapper = componentMappers[name];\n\n const mapped: BodyComponent<T> = {\n name,\n order: component.order,\n props: {} as T,\n };\n\n if (mapper) {\n try {\n mapped.props = mapper(component.props, this.cdn) as T;\n } catch (e) {\n console.error(`Error mapping props for component \"${name}\"`, e);\n }\n } else {\n console.warn(`No mapper found for component \"${name}\"`);\n }\n\n return mapped;\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAEa,mBAAmB,GAAsB,CAAC,KAAK,MAAM;AAC9D,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AAA,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAM;gBACzD;gBAAE,OAAO,CAAC,EAAE;oBACR,OAAO,CAAC,KAAK,CAAC,CAAA,mCAAA,EAAsC,IAAI,CAAA,CAAA,CAAG,EAAE,CAAC,CAAC;gBACnE;YACJ;iBAAO;AACH,gBAAA,OAAO,CAAC,IAAI,CAAC,kCAAkC,IAAI,CAAA,CAAA,CAAG,CAAC;YAC3D;AAEA,YAAA,OAAO,MAAM;AACjB,QAAA,CAAC,CAAC;IACV;wGAjCS,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAEF,WAAW,EAAA,EAAA,EAAA,KAAA,EAA+C,YAAY,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAFjF,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFV,MAAM,EAAA,CAAA;;4FAET,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;0BAGgB,MAAM;2BAAC,WAAW;;0BAAwC,MAAM;2BAAC,YAAY;;;ACV9F;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lluc_llull-ui-lib-mapper.mjs","sources":["../../../projects/ui-lib/mapper/component-mappers/category-progress.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/nav-modal.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/header-clear.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/hero-section.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/lang-modal.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/legal-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/links-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/404.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/section-intro.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/social-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/visual-footer.mapper.ts","../../../projects/ui-lib/mapper/component-mappers/index.ts","../../../projects/ui-lib/mapper/cdn.token.ts","../../../projects/ui-lib/mapper/mapper.service.ts","../../../projects/ui-lib/mapper/lluc_llull-ui-lib-mapper.ts"],"sourcesContent":["import { ComponentMapperFn } from './types';\n\nexport const mapCategoryProgress: ComponentMapperFn = (props) => ({\n pretitle: props?.texts?.pretitle,\n title: props?.texts?.title,\n categories: props?.items?.map((item: any) => ({\n title: item.title,\n items: item.items?.map((subItem: any) => ({\n label: subItem.name,\n value: subItem.progress,\n })),\n })),\n});\n","import { UiLibNavItemsI, UiLibSocialItemsI } from '@lluc_llull/ui-lib/interfaces';\n\nexport const mapNavModal = (navigation: any, lang: string): UiLibNavItemsI[] => {\n if (!navigation?.items || !Array.isArray(navigation.items)) return [];\n\n return navigation.items.map((item: any) => {\n const slug = item.slug;\n\n const url = slug === 'home' || slug === '' ? `/${lang}` : `/${lang}/${slug}`;\n\n return {\n label: item.label?.[lang] ?? item.label?.['es'] ?? slug,\n url,\n linkType: 'internal',\n name: slug,\n active: true,\n children: [],\n };\n });\n};\n\nexport const mapSocialLinks = (navigation: any): UiLibSocialItemsI[] => {\n if (!navigation?.social || !Array.isArray(navigation.social)) return [];\n\n return navigation.social.map((item: any, index: number) => ({\n label: item.label ?? '',\n url: item.url ?? '',\n linkType: item.linkType ?? 'external',\n icon: item.icon ?? '',\n order: item.order ?? index,\n }));\n};\n","import { mapImage, mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { mapSocialLinks } from './nav-modal.mapper';\nimport { ComponentMapperFn } from './types';\n\nexport const mapHeaderClear: ComponentMapperFn = (props, cdn) => {\n return {\n logo: mapImage(props?.logo, cdn),\n logoDark: mapImage(props?.logoDark, cdn),\n lang: props?.lang || 'es',\n navigation: props?.navigation,\n socialItems: mapSocialLinks(props?.navigation),\n homeLink: mapButtons(props?.buttons)[0],\n };\n};\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapHeroSection: ComponentMapperFn = (props) => ({\n pretitle: props?.texts?.pretitle,\n title: props?.texts?.title,\n subtitle: props?.texts?.subtitle,\n text: props?.texts?.text,\n buttons: mapButtons(props?.buttons),\n highlight: props?.texts?.highlight,\n});\n","import { UiLibLangItemI } from '@lluc_llull/ui-lib/interfaces';\n\nexport const mapLangModal = (langs: any[], currentLang: string = 'es'): UiLibLangItemI[] => {\n if (!Array.isArray(langs)) return [];\n\n return langs.map((lang, index) => {\n const label = lang.labels?.[currentLang] || lang.labels?.[lang.code] || lang.code;\n\n return {\n id: lang.id ?? index,\n code: lang.code,\n label,\n };\n });\n};\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapLegalFooter: ComponentMapperFn = (props) => ({\n year: props?.texts?.year,\n brand: props?.texts?.brand,\n credits: props?.texts?.credits,\n links: mapButtons(props?.footer_links),\n //variant\n});\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapLinksFooter: ComponentMapperFn = (props) => ({\n links: mapButtons(props?.footer_links),\n});\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const map404: ComponentMapperFn = (props) => ({\n title: props?.texts?.title,\n subtitle: props?.texts?.subtitle,\n highlight: props?.texts?.highlight,\n button: mapButtons(props?.buttons)[0],\n});\n","import { mapButtons } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapSectionIntro: ComponentMapperFn = (props) => ({\n pretitle: props?.texts?.pretitle,\n title: props?.texts?.title,\n subtitle: props?.texts?.subtitle,\n text: props?.texts?.text,\n button: mapButtons(props?.buttons)[0],\n});\n","import { mapButtons, mapImage } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapSocialFooter: ComponentMapperFn = (props) => ({\n images: mapImage(props?.multimedia),\n socials: mapButtons(props?.social_links),\n hashtag: props?.texts?.hashtag,\n});\n","import { UiLibAddressI } from '@lluc_llull/ui-lib/interfaces';\nimport { mapButtons, mapImage } from '@lluc_llull/ui-lib/utils';\nimport { ComponentMapperFn } from './types';\n\nexport const mapVisualFooter: ComponentMapperFn = (props) => ({\n contactTitle: props?.texts?.contactTitle,\n contactPhone: mapButtons(props?.contactPhone),\n contactEmail: mapButtons(props?.contactEmail),\n addressTitle: props?.texts?.addressTitle,\n address: {\n address: props?.address?.address,\n city: props?.address?.city,\n country: props?.address?.country,\n cp: props?.address?.cp,\n province: props?.address?.province,\n } as UiLibAddressI,\n socialsTitle: props?.texts?.socialsTitle,\n socials: mapButtons(props?.social_links),\n image: mapImage(props?.multimedia),\n});\n","\nexport * from './category-progress.mapper';\nexport * from './header-clear.mapper';\nexport * from './hero-section.mapper';\nexport * from './lang-modal.mapper';\nexport * from './legal-footer.mapper';\nexport * from './links-footer.mapper';\nexport * from './404.mapper';\nexport * from './section-intro.mapper';\nexport * from './social-footer.mapper';\nexport * from './visual-footer.mapper';\nexport * from './nav-modal.mapper';\n\nimport { mapCategoryProgress } from './category-progress.mapper';\nimport { mapHeaderClear } from './header-clear.mapper';\nimport { mapHeroSection } from './hero-section.mapper';\nimport { mapLangModal } from './lang-modal.mapper';\nimport { mapLegalFooter } from './legal-footer.mapper';\nimport { mapLinksFooter } from './links-footer.mapper';\nimport { map404 } from './404.mapper';\nimport { mapSectionIntro } from './section-intro.mapper';\nimport { mapSocialFooter } from './social-footer.mapper';\nimport { mapVisualFooter } from './visual-footer.mapper';\n\nexport const componentMappers: Record<string, (props: any, cdn?: string) => any> = {\n 'hero-section': mapHeroSection,\n 'header-clear': mapHeaderClear,\n 'lang-modal': mapLangModal,\n 'section-intro': mapSectionIntro,\n 'category-progress': mapCategoryProgress,\n 'links-footer': mapLinksFooter,\n 'legal-footer': mapLegalFooter,\n 'social-footer': mapSocialFooter,\n 'visual-footer': mapVisualFooter,\n 'not-found': map404,\n};\n","import { InjectionToken } from '@angular/core';\n\nexport const CDN_BASE_URL = new InjectionToken<string>('CDN_BASE_URL');","import { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { BodyComponent } from '@lluc_llull/ui-lib/interfaces';\nimport { CDN_BASE_URL } from './cdn.token';\nimport { componentMappers } from './component-mappers';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MapperService {\n\n constructor(@Inject(PLATFORM_ID) private readonly platformId: Object, @Inject(CDN_BASE_URL) private readonly cdn: string) {}\n\n mapComponents<T>(body: any[]): BodyComponent<T>[] {\n if (!body || body.length === 0) {\n return [];\n }\n\n return body\n .filter((component) => component && component.name && component.props)\n .map((component) => {\n const name = component.name.toLowerCase();\n const mapper = componentMappers[name];\n\n const mapped: BodyComponent<T> = {\n name,\n order: component.order,\n props: {} as T,\n };\n\n if (mapper) {\n try {\n mapped.props = mapper(component.props, this.cdn) as T;\n } catch (e) {\n console.error(`Error mapping props for component \"${name}\"`, e);\n }\n } else {\n console.warn(`No mapper found for component \"${name}\"`);\n }\n\n return mapped;\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAEa,mBAAmB,GAAsB,CAAC,KAAK,MAAM;AAC9D,IAAA,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ;AAChC,IAAA,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;AAC1B,IAAA,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,IAAS,MAAM;QAC1C,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,QAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAA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BACnE;YACJ;iBAAO;AACH,gBAAA,OAAO,CAAC,IAAI,CAAC,kCAAkC,IAAI,CAAA,CAAA,CAAG,CAAC;YAC3D;AAEA,YAAA,OAAO,MAAM;AACjB,QAAA,CAAC,CAAC;IACV;wGAjCS,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAEF,WAAW,EAAA,EAAA,EAAA,KAAA,EAA+C,YAAY,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAFjF,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFV,MAAM,EAAA,CAAA;;4FAET,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;0BAGgB,MAAM;2BAAC,WAAW;;0BAAwC,MAAM;2BAAC,YAAY;;;ACV9F;;AAEG;;;;"}
|
|
@@ -5,6 +5,7 @@ import * as i1 from '@angular/material/dialog';
|
|
|
5
5
|
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
6
6
|
import { mapLangModal } from '@lluc_llull/ui-lib/mapper';
|
|
7
7
|
import { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';
|
|
8
|
+
import { UiIconComponent } from '@lluc_llull/ui-lib/shared';
|
|
8
9
|
|
|
9
10
|
class LangModalComponent {
|
|
10
11
|
data;
|
|
@@ -44,11 +45,11 @@ class NavModalComponent {
|
|
|
44
45
|
this.close.emit();
|
|
45
46
|
}
|
|
46
47
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NavModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: NavModalComponent, isStandalone: true, selector: "lib-nav-modal", inputs: { navItems: "navItems", socialItems: "socialItems" }, outputs: { close: "close" }, ngImport: i0, template: "<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">\u2715</button>\n\n @if (navItems?.length) {\n <ol>\n @for (item of navItems; track item.name) {\n <a [href]=\"item.url\" [linkType]=\"item.linkType\" (click)=\"closeModal()\">\n <li>\n <span class=\"modal-item\">{{ item.label }}</span>\n </li>\n </a>\n }\n </ol>\n }\n\n @if (socialItems?.length) {\n <div class=\"btn-group
|
|
48
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: NavModalComponent, isStandalone: true, selector: "lib-nav-modal", inputs: { navItems: "navItems", socialItems: "socialItems" }, outputs: { close: "close" }, ngImport: i0, template: "<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">\u2715</button>\n\n @if (navItems?.length) {\n <ol>\n @for (item of navItems; track item.name) {\n <a [href]=\"item.url\" [linkType]=\"item.linkType\" (click)=\"closeModal()\">\n <li>\n <span class=\"modal-item\">{{ item.label }}</span>\n </li>\n </a>\n }\n </ol>\n }\n\n @if (socialItems?.length) {\n <div class=\"btn-group\">\n @for (social of socialItems; track social.label) {\n <a class=\"btn btn-link\" [href]=\"social.url\" [linkType]=\"social.linkType\">\n <ui-icon [name]=\"social.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ social.label }}\n </a>\n }\n </div>\n }\n</div>\n", styles: [":root{--font-title-home: \"Bebas Neue\", system-ui, sans-serif;--font-titles: \"Bebas Neue\", system-ui, sans-serif;--font-base: \"Inter\", system-ui, sans-serif;--font-size-base: 16px;--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 2rem;--border-radius: 8px}:host{position:fixed;inset:0;width:100vw;height:100vh;background:var(--modal-bg);z-index:1000;display:flex;align-items:center;justify-content:center}.close-btn{position:absolute;top:1rem;right:2rem;background:none;border:none;color:var(--close-btn);font-size:1.5rem;font-weight:700;cursor:pointer;z-index:1001}ol{padding:0;margin:0;text-align:center;width:100%;max-width:450px;list-style:none;counter-reset:item}li{cursor:pointer;text-align:start;counter-increment:item}a{text-decoration:none;text-transform:uppercase;color:var(--item-color)}li:before{content:counter(item,decimal-leading-zero) \". \"}.btn-link{text-transform:none}.btn-group{margin-top:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: LinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href"], outputs: ["anchorClicked"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
48
49
|
}
|
|
49
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NavModalComponent, decorators: [{
|
|
50
51
|
type: Component,
|
|
51
|
-
args: [{ selector: 'lib-nav-modal', standalone: true, imports: [CommonModule, LinkTypeDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">\u2715</button>\n\n @if (navItems?.length) {\n <ol>\n @for (item of navItems; track item.name) {\n <a [href]=\"item.url\" [linkType]=\"item.linkType\" (click)=\"closeModal()\">\n <li>\n <span class=\"modal-item\">{{ item.label }}</span>\n </li>\n </a>\n }\n </ol>\n }\n\n @if (socialItems?.length) {\n <div class=\"btn-group
|
|
52
|
+
args: [{ selector: 'lib-nav-modal', standalone: true, imports: [CommonModule, LinkTypeDirective, UiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">\u2715</button>\n\n @if (navItems?.length) {\n <ol>\n @for (item of navItems; track item.name) {\n <a [href]=\"item.url\" [linkType]=\"item.linkType\" (click)=\"closeModal()\">\n <li>\n <span class=\"modal-item\">{{ item.label }}</span>\n </li>\n </a>\n }\n </ol>\n }\n\n @if (socialItems?.length) {\n <div class=\"btn-group\">\n @for (social of socialItems; track social.label) {\n <a class=\"btn btn-link\" [href]=\"social.url\" [linkType]=\"social.linkType\">\n <ui-icon [name]=\"social.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ social.label }}\n </a>\n }\n </div>\n }\n</div>\n", styles: [":root{--font-title-home: \"Bebas Neue\", system-ui, sans-serif;--font-titles: \"Bebas Neue\", system-ui, sans-serif;--font-base: \"Inter\", system-ui, sans-serif;--font-size-base: 16px;--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 2rem;--border-radius: 8px}:host{position:fixed;inset:0;width:100vw;height:100vh;background:var(--modal-bg);z-index:1000;display:flex;align-items:center;justify-content:center}.close-btn{position:absolute;top:1rem;right:2rem;background:none;border:none;color:var(--close-btn);font-size:1.5rem;font-weight:700;cursor:pointer;z-index:1001}ol{padding:0;margin:0;text-align:center;width:100%;max-width:450px;list-style:none;counter-reset:item}li{cursor:pointer;text-align:start;counter-increment:item}a{text-decoration:none;text-transform:uppercase;color:var(--item-color)}li:before{content:counter(item,decimal-leading-zero) \". \"}.btn-link{text-transform:none}.btn-group{margin-top:0}\n"] }]
|
|
52
53
|
}], propDecorators: { navItems: [{
|
|
53
54
|
type: Input
|
|
54
55
|
}], socialItems: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lluc_llull-ui-lib-modals.mjs","sources":["../../../projects/ui-lib/modals/lang-modal/lang-modal.component.ts","../../../projects/ui-lib/modals/lang-modal/lang-modal.component.html","../../../projects/ui-lib/modals/nav-modal/nav-modal.component.ts","../../../projects/ui-lib/modals/nav-modal/nav-modal.component.html","../../../projects/ui-lib/modals/lluc_llull-ui-lib-modals.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Optional } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UiLibLangItemI } from '@lluc_llull/ui-lib/interfaces';\nimport { mapLangModal } from '@lluc_llull/ui-lib/mapper';\n\ninterface LangModalData {\n langs: any[];\n currentLang: string;\n}\n\n@Component({\n selector: 'lib-lang-modal',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './lang-modal.component.html',\n styleUrl: './lang-modal.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LangModalComponent {\n langs!: UiLibLangItemI[];\n\n constructor(\n @Optional() @Inject(MAT_DIALOG_DATA) public data: LangModalData,\n @Optional() public dialogRef?: MatDialogRef<LangModalComponent>,\n ) {\n this.langs = mapLangModal(data.langs, data.currentLang);\n }\n\n selectLang(lang: UiLibLangItemI) {\n this.dialogRef?.close(lang);\n }\n\n closeModal() {\n this.dialogRef?.close();\n }\n}\n","<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">✕</button>\n @if (langs && langs.length > 0) {\n <ol>\n @for (lang of langs; track lang.id) {\n <li (click)=\"selectLang(lang)\">\n <span class=\"modal-item\">{{ lang.label }}</span>\n </li>\n }\n </ol>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';\nimport { UiLibNavItemsI, UiLibSocialItemsI } from '@lluc_llull/ui-lib/interfaces';\n\n@Component({\n selector: 'lib-nav-modal',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective],\n templateUrl: './nav-modal.component.html',\n styleUrl: './nav-modal.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NavModalComponent {\n @Input() navItems?: UiLibNavItemsI[];\n @Input() socialItems?: UiLibSocialItemsI[];\n\n @Output() close = new EventEmitter<void>();\n\n closeModal() {\n this.close.emit();\n }\n}\n","<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">✕</button>\n\n @if (navItems?.length) {\n <ol>\n @for (item of navItems; track item.name) {\n <a [href]=\"item.url\" [linkType]=\"item.linkType\" (click)=\"closeModal()\">\n <li>\n <span class=\"modal-item\">{{ item.label }}</span>\n </li>\n </a>\n }\n </ol>\n }\n\n @if (socialItems?.length) {\n <div class=\"btn-group
|
|
1
|
+
{"version":3,"file":"lluc_llull-ui-lib-modals.mjs","sources":["../../../projects/ui-lib/modals/lang-modal/lang-modal.component.ts","../../../projects/ui-lib/modals/lang-modal/lang-modal.component.html","../../../projects/ui-lib/modals/nav-modal/nav-modal.component.ts","../../../projects/ui-lib/modals/nav-modal/nav-modal.component.html","../../../projects/ui-lib/modals/lluc_llull-ui-lib-modals.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Optional } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UiLibLangItemI } from '@lluc_llull/ui-lib/interfaces';\nimport { mapLangModal } from '@lluc_llull/ui-lib/mapper';\n\ninterface LangModalData {\n langs: any[];\n currentLang: string;\n}\n\n@Component({\n selector: 'lib-lang-modal',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './lang-modal.component.html',\n styleUrl: './lang-modal.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LangModalComponent {\n langs!: UiLibLangItemI[];\n\n constructor(\n @Optional() @Inject(MAT_DIALOG_DATA) public data: LangModalData,\n @Optional() public dialogRef?: MatDialogRef<LangModalComponent>,\n ) {\n this.langs = mapLangModal(data.langs, data.currentLang);\n }\n\n selectLang(lang: UiLibLangItemI) {\n this.dialogRef?.close(lang);\n }\n\n closeModal() {\n this.dialogRef?.close();\n }\n}\n","<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">✕</button>\n @if (langs && langs.length > 0) {\n <ol>\n @for (lang of langs; track lang.id) {\n <li (click)=\"selectLang(lang)\">\n <span class=\"modal-item\">{{ lang.label }}</span>\n </li>\n }\n </ol>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { LinkTypeDirective } from '@lluc_llull/ui-lib/directives';\nimport { UiLibNavItemsI, UiLibSocialItemsI } from '@lluc_llull/ui-lib/interfaces';\nimport { UiIconComponent } from '@lluc_llull/ui-lib/shared';\n\n@Component({\n selector: 'lib-nav-modal',\n standalone: true,\n imports: [CommonModule, LinkTypeDirective, UiIconComponent],\n templateUrl: './nav-modal.component.html',\n styleUrl: './nav-modal.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NavModalComponent {\n @Input() navItems?: UiLibNavItemsI[];\n @Input() socialItems?: UiLibSocialItemsI[];\n\n @Output() close = new EventEmitter<void>();\n\n closeModal() {\n this.close.emit();\n }\n}\n","<div class=\"modal-content\">\n <button (click)=\"closeModal()\" class=\"close-btn\">✕</button>\n\n @if (navItems?.length) {\n <ol>\n @for (item of navItems; track item.name) {\n <a [href]=\"item.url\" [linkType]=\"item.linkType\" (click)=\"closeModal()\">\n <li>\n <span class=\"modal-item\">{{ item.label }}</span>\n </li>\n </a>\n }\n </ol>\n }\n\n @if (socialItems?.length) {\n <div class=\"btn-group\">\n @for (social of socialItems; track social.label) {\n <a class=\"btn btn-link\" [href]=\"social.url\" [linkType]=\"social.linkType\">\n <ui-icon [name]=\"social.icon!\" [size]=\"17\" [color]=\"'var(--color-primary)'\"></ui-icon>\n {{ social.label }}\n </a>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAmBa,kBAAkB,CAAA;AAIqB,IAAA,IAAA;AACzB,IAAA,SAAA;AAJvB,IAAA,KAAK;IAEL,WAAA,CACgD,IAAmB,EAC5C,SAA4C,EAAA;QADnB,IAAA,CAAA,IAAI,GAAJ,IAAI;QAC7B,IAAA,CAAA,SAAS,GAAT,SAAS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
function mapButtons(data, lang = 'es') {
|
|
2
2
|
if (!Array.isArray(data))
|
|
3
3
|
return [];
|
|
4
4
|
return data
|
|
5
5
|
.filter((item) => item && typeof item === 'object')
|
|
6
|
-
.map((item) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
.map((item) => {
|
|
7
|
+
// 1. Gestión de etiquetas bilingües
|
|
8
|
+
const labelValue = item.label && typeof item.label === 'object'
|
|
9
|
+
? (item.label[lang] ?? item.label['es'] ?? '')
|
|
10
|
+
: (item.label ?? '');
|
|
11
|
+
// 2. Limpieza de 'home' y construcción de URL interna
|
|
12
|
+
let finalUrl = '';
|
|
13
|
+
if (item.link_type === 'internal') {
|
|
14
|
+
const slug = item.page === 'home' ? '' : (item.page ?? '');
|
|
15
|
+
finalUrl = slug === '' ? `/${lang}` : `/${lang}/${slug}`;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
finalUrl = item.url ?? '';
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
label: labelValue,
|
|
22
|
+
url: finalUrl,
|
|
23
|
+
linkType: item.link_type ?? 'none',
|
|
24
|
+
icon: item.icon,
|
|
25
|
+
};
|
|
26
|
+
});
|
|
12
27
|
}
|
|
13
28
|
function mapImage(data, cdn) {
|
|
14
29
|
if (!data || typeof data !== 'object')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lluc_llull-ui-lib-utils.mjs","sources":["../../../projects/ui-lib/utils/utils.ts","../../../projects/ui-lib/utils/lluc_llull-ui-lib-utils.ts"],"sourcesContent":["import { UiLibButtonI, UiLibImageI } from '@lluc_llull/ui-lib/interfaces';\n\nexport function mapButtons(data: any): UiLibButtonI[] {\n if (!Array.isArray(data)) return [];\n\n return data\n .filter((item) => item && typeof item === 'object')\n .map(
|
|
1
|
+
{"version":3,"file":"lluc_llull-ui-lib-utils.mjs","sources":["../../../projects/ui-lib/utils/utils.ts","../../../projects/ui-lib/utils/lluc_llull-ui-lib-utils.ts"],"sourcesContent":["import { UiLibButtonI, UiLibImageI } from '@lluc_llull/ui-lib/interfaces';\n\nexport function mapButtons(data: any, lang: string = 'es'): UiLibButtonI[] {\n if (!Array.isArray(data)) return [];\n\n return data\n .filter((item) => item && typeof item === 'object')\n .map((item): UiLibButtonI => {\n // 1. Gestión de etiquetas bilingües\n const labelValue =\n item.label && typeof item.label === 'object'\n ? (item.label[lang] ?? item.label['es'] ?? '')\n : (item.label ?? '');\n\n // 2. Limpieza de 'home' y construcción de URL interna\n let finalUrl = '';\n if (item.link_type === 'internal') {\n const slug = item.page === 'home' ? '' : (item.page ?? '');\n finalUrl = slug === '' ? `/${lang}` : `/${lang}/${slug}`;\n } else {\n finalUrl = item.url ?? '';\n }\n\n return {\n label: labelValue,\n url: finalUrl,\n linkType: item.link_type ?? 'none',\n icon: item.icon,\n };\n });\n}\n\nexport function mapImage(data: any, cdn?: string): UiLibImageI | null {\n if (!data || typeof data !== 'object') return null;\n\n const src = data.url ?? data.src ?? '';\n\n return {\n url: src.startsWith('http') ? src : (cdn ?? '') + src,\n alt: data.alt ?? '',\n width: data.width,\n height: data.height,\n format: data.format,\n };\n}\n\nexport function mapImageOrGallery(data: any, cdn?: string): UiLibImageI[] {\n if (!data) return [];\n\n if (Array.isArray(data)) {\n return data\n .filter((img) => img && typeof img === 'object')\n .map((img) => mapImage(img, cdn)!)\n .filter(Boolean);\n }\n\n const single = mapImage(data, cdn);\n return single ? [single] : [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAEgB,UAAU,CAAC,IAAS,EAAE,OAAe,IAAI,EAAA;AACrD,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AAAE,QAAA,OAAO,EAAE;AAEnC,IAAA,OAAO;AACF,SAAA,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AACjD,SAA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IAAI,CAAC,GAAG,IAAI,EAAE;QACnB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM;KACtB;AACL;AAEM,SAAU,iBAAiB,CAAC,IAAS,EAAE,GAAY,EAAA;AACrD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,EAAE;AAEpB,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AACrB,QAAA,OAAO;AACF,aAAA,MAAM,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;AAC9C,aAAA,GAAG,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAE;aAChC,MAAM,CAAC,OAAO,CAAC;IACxB;IAEA,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;IAClC,OAAO,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;AACjC;;AC1DA;;AAEG;;;;"}
|
package/package.json
CHANGED
package/src/lib/styles/main.css
CHANGED
|
@@ -15,11 +15,20 @@
|
|
|
15
15
|
border-radius: 6px;
|
|
16
16
|
font-weight: 600;
|
|
17
17
|
cursor: pointer;
|
|
18
|
-
transition:
|
|
18
|
+
transition: all 0.2s ease;
|
|
19
19
|
border: none;
|
|
20
20
|
display: inline-flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
justify-content: center;
|
|
23
|
+
gap: 0.5rem;
|
|
24
|
+
line-height: 1;
|
|
25
|
+
}
|
|
26
|
+
.btn ui-icon {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
transition: transform 0.3s ease;
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
.btn-primary {
|
|
@@ -59,16 +68,9 @@
|
|
|
59
68
|
font-weight: 300;
|
|
60
69
|
font-size: 1rem;
|
|
61
70
|
position: relative;
|
|
62
|
-
|
|
63
|
-
display: inline-flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 0.5rem;
|
|
66
|
-
}
|
|
67
|
-
.btn-link span {
|
|
68
|
-
font-size: 1rem;
|
|
69
|
-
transition: transform 0.3s ease;
|
|
71
|
+
padding: 4px 0;
|
|
70
72
|
}
|
|
71
|
-
.btn-link:hover
|
|
73
|
+
.btn-link:hover ui-icon {
|
|
72
74
|
transform: translateX(0.3rem);
|
|
73
75
|
}
|
|
74
76
|
.btn-link:hover::after {
|
|
@@ -77,51 +79,53 @@
|
|
|
77
79
|
.btn-link::after {
|
|
78
80
|
content: "";
|
|
79
81
|
position: absolute;
|
|
80
|
-
bottom:
|
|
82
|
+
bottom: 0;
|
|
81
83
|
left: 0;
|
|
82
84
|
width: 0;
|
|
83
85
|
height: 1px;
|
|
84
86
|
background-color: var(--button-link-text);
|
|
85
|
-
transition: width 0.
|
|
87
|
+
transition: width 0.3s ease;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
.btn-header {
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
91
|
height: 40px;
|
|
93
92
|
min-width: 40px;
|
|
94
93
|
padding: 0 12px;
|
|
95
94
|
background: transparent;
|
|
96
|
-
border: none;
|
|
97
95
|
border-radius: 4px;
|
|
98
|
-
transition: background 0.2s;
|
|
99
96
|
color: var(--button-header-text);
|
|
100
97
|
}
|
|
101
98
|
.btn-header:hover {
|
|
102
99
|
background: var(--button-header-bg-hover);
|
|
103
100
|
}
|
|
104
|
-
.btn-header ui-icon {
|
|
105
|
-
display: flex;
|
|
106
|
-
}
|
|
107
101
|
|
|
108
102
|
.btn-group {
|
|
109
103
|
display: flex;
|
|
110
104
|
flex-wrap: wrap;
|
|
111
105
|
gap: var(--spacing-md);
|
|
112
106
|
margin-top: 2rem;
|
|
107
|
+
width: 100%;
|
|
113
108
|
justify-content: flex-start;
|
|
114
109
|
}
|
|
115
110
|
.btn-group--center {
|
|
111
|
+
display: flex;
|
|
112
|
+
gap: var(--spacing-md);
|
|
116
113
|
justify-content: center;
|
|
114
|
+
align-items: center;
|
|
117
115
|
}
|
|
118
116
|
.btn-group--right {
|
|
117
|
+
display: flex;
|
|
118
|
+
gap: var(--spacing-md);
|
|
119
119
|
justify-content: flex-end;
|
|
120
|
+
align-items: flex-end;
|
|
120
121
|
}
|
|
121
122
|
@media (max-width: 768px) {
|
|
122
123
|
.btn-group {
|
|
123
124
|
flex-direction: column;
|
|
124
|
-
|
|
125
|
+
}
|
|
126
|
+
.btn-group--center {
|
|
127
|
+
gap: var(--spacing-sm);
|
|
128
|
+
align-items: center;
|
|
125
129
|
}
|
|
126
130
|
.btn-group .btn {
|
|
127
131
|
width: 100%;
|
package/styles/main.css
CHANGED
|
@@ -15,11 +15,20 @@
|
|
|
15
15
|
border-radius: 6px;
|
|
16
16
|
font-weight: 600;
|
|
17
17
|
cursor: pointer;
|
|
18
|
-
transition:
|
|
18
|
+
transition: all 0.2s ease;
|
|
19
19
|
border: none;
|
|
20
20
|
display: inline-flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
justify-content: center;
|
|
23
|
+
gap: 0.5rem;
|
|
24
|
+
line-height: 1;
|
|
25
|
+
}
|
|
26
|
+
.btn ui-icon {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
transition: transform 0.3s ease;
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
.btn-primary {
|
|
@@ -59,16 +68,9 @@
|
|
|
59
68
|
font-weight: 300;
|
|
60
69
|
font-size: 1rem;
|
|
61
70
|
position: relative;
|
|
62
|
-
|
|
63
|
-
display: inline-flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 0.5rem;
|
|
66
|
-
}
|
|
67
|
-
.btn-link span {
|
|
68
|
-
font-size: 1rem;
|
|
69
|
-
transition: transform 0.3s ease;
|
|
71
|
+
padding: 4px 0;
|
|
70
72
|
}
|
|
71
|
-
.btn-link:hover
|
|
73
|
+
.btn-link:hover ui-icon {
|
|
72
74
|
transform: translateX(0.3rem);
|
|
73
75
|
}
|
|
74
76
|
.btn-link:hover::after {
|
|
@@ -77,51 +79,53 @@
|
|
|
77
79
|
.btn-link::after {
|
|
78
80
|
content: "";
|
|
79
81
|
position: absolute;
|
|
80
|
-
bottom:
|
|
82
|
+
bottom: 0;
|
|
81
83
|
left: 0;
|
|
82
84
|
width: 0;
|
|
83
85
|
height: 1px;
|
|
84
86
|
background-color: var(--button-link-text);
|
|
85
|
-
transition: width 0.
|
|
87
|
+
transition: width 0.3s ease;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
.btn-header {
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
91
|
height: 40px;
|
|
93
92
|
min-width: 40px;
|
|
94
93
|
padding: 0 12px;
|
|
95
94
|
background: transparent;
|
|
96
|
-
border: none;
|
|
97
95
|
border-radius: 4px;
|
|
98
|
-
transition: background 0.2s;
|
|
99
96
|
color: var(--button-header-text);
|
|
100
97
|
}
|
|
101
98
|
.btn-header:hover {
|
|
102
99
|
background: var(--button-header-bg-hover);
|
|
103
100
|
}
|
|
104
|
-
.btn-header ui-icon {
|
|
105
|
-
display: flex;
|
|
106
|
-
}
|
|
107
101
|
|
|
108
102
|
.btn-group {
|
|
109
103
|
display: flex;
|
|
110
104
|
flex-wrap: wrap;
|
|
111
105
|
gap: var(--spacing-md);
|
|
112
106
|
margin-top: 2rem;
|
|
107
|
+
width: 100%;
|
|
113
108
|
justify-content: flex-start;
|
|
114
109
|
}
|
|
115
110
|
.btn-group--center {
|
|
111
|
+
display: flex;
|
|
112
|
+
gap: var(--spacing-md);
|
|
116
113
|
justify-content: center;
|
|
114
|
+
align-items: center;
|
|
117
115
|
}
|
|
118
116
|
.btn-group--right {
|
|
117
|
+
display: flex;
|
|
118
|
+
gap: var(--spacing-md);
|
|
119
119
|
justify-content: flex-end;
|
|
120
|
+
align-items: flex-end;
|
|
120
121
|
}
|
|
121
122
|
@media (max-width: 768px) {
|
|
122
123
|
.btn-group {
|
|
123
124
|
flex-direction: column;
|
|
124
|
-
|
|
125
|
+
}
|
|
126
|
+
.btn-group--center {
|
|
127
|
+
gap: var(--spacing-sm);
|
|
128
|
+
align-items: center;
|
|
125
129
|
}
|
|
126
130
|
.btn-group .btn {
|
|
127
131
|
width: 100%;
|
package/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UiLibButtonI, UiLibImageI } from '@lluc_llull/ui-lib/interfaces';
|
|
2
|
-
export declare function mapButtons(data: any): UiLibButtonI[];
|
|
2
|
+
export declare function mapButtons(data: any, lang?: string): UiLibButtonI[];
|
|
3
3
|
export declare function mapImage(data: any, cdn?: string): UiLibImageI | null;
|
|
4
4
|
export declare function mapImageOrGallery(data: any, cdn?: string): UiLibImageI[];
|